XrdClientAdmin_c.hh

Go to the documentation of this file.
00001 /********************************************************************************/
00002 /*                     X T N e t A d m i n _ c i n t f . h h                    */
00003 /*                                    2004                                      */
00004 /*     Produced by Alvise Dorigo & Fabrizio Furano for INFN padova              */
00005 /*                 A C wrapper for XTNetAdmin functionalities                   */
00006 /********************************************************************************/
00007 //
00008 //   $Id: XrdClientAdmin_c.hh 22437 2008-03-04 14:35:16Z rdm $
00009 //
00010 // Author: Alvise Dorigo, Fabrizio Furano
00011 
00012 
00013 #ifdef SWIG
00014 %module XrdClientAdmin
00015 %include typemaps.i                       // Load the typemaps librayr
00016 
00017  // This tells SWIG to treat an char * argument with name res as
00018  // an output value.  
00019 
00020 %typemap(argout) char *OUTPUT {
00021    $result = sv_newmortal();
00022    sv_setnv($result, arg2);
00023    argvi++;                     /* Increment return count -- important! */
00024 }
00025 
00026 // We don't care what the input value is. Ignore, but set to a temporary variable
00027 
00028 %typemap(in,numinputs=0) char *OUTPUT(char junk) {
00029    $1 = &junk;
00030 }
00031 
00032 %apply char *OUTPUT { char *ans };
00033 
00034 // For the stat function to return an array containing the
00035 // various fields of the answer
00036 %apply long *OUTPUT {long *id};   // Make "result" an output parameter
00037 %apply long long *OUTPUT {long long *size};   // Make "result" an output parameter
00038 %apply long *OUTPUT {long *flags};   // Make "result" an output parameter
00039 %apply long *OUTPUT {long *modtime};   // Make "result" an output parameter
00040 
00041 %{
00042 #include "XrdClient/XrdClientAdmin_c.hh"
00043    %}
00044 
00045 #endif
00046 
00047 extern "C" {
00048    // Some prototypes to wrap ctor and dtor
00049    // In this version we support only one instance to be handled
00050    // by this wrapper. Supporting more than one instance should be no
00051    // problem.
00052    bool XrdInitialize(const char *url, const char *EnvValues);
00053    bool XrdTerminate();
00054 
00055    // The other functions, slightly modified from the originals
00056    char *XrdSysStatX(const char *paths_list);
00057 
00058    char *XrdExistFiles(const char *filepaths);
00059    char *XrdExistDirs(const char *filepaths);
00060    char *XrdIsFileOnline(const char *filepaths);
00061 
00062    bool XrdMv(const char *fileSrc, const char *fileDest);
00063    bool XrdMkdir(const char *dir, int user, int group, int other);
00064    bool XrdChmod(const char *file, int user, int group, int other);
00065    bool XrdRm(const char *file);
00066    bool XrdRmdir(const char *path);
00067    bool XrdPrepare(const char *filepaths, unsigned char opts, unsigned char prty);
00068    char *XrdDirList(const char *dir);
00069    char *XrdGetChecksum(const char *path);
00070    char *XrdGetCurrentHost();
00071 
00072    bool XrdStat(const char *fname, long *id, long long *size, long *flags, long *modtime);
00073 }

Generated on Tue Jul 5 14:46:17 2011 for ROOT_528-00b_version by  doxygen 1.5.1