00001 #ifndef __SSI_SFS_H__
00002 #define __SSI_SFS_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <sys/types.h>
00033
00034 #include "XrdSfs/XrdSfsInterface.hh"
00035
00036 #include "XrdSsi/XrdSsiDir.hh"
00037 #include "XrdSsi/XrdSsiFile.hh"
00038
00039 struct XrdVersionInfo;
00040
00041 class XrdOucEnv;
00042 class XrdSecEntity;
00043
00044 class XrdSsiSfs : public XrdSfsFileSystem
00045 {
00046 friend class XrdSsiFile;
00047
00048 public:
00049
00050
00051
00052 XrdSfsDirectory *newDir(char *user=0, int MonID=0)
00053 {return new XrdSsiDir(user, MonID);}
00054
00055 XrdSfsFile *newFile(char *user=0,int MonID=0)
00056 {return new XrdSsiFile(user, MonID);}
00057
00058
00059
00060 int chksum( csFunc Func,
00061 const char *csName,
00062 const char *path,
00063 XrdOucErrInfo &eInfo,
00064 const XrdSecEntity *client = 0,
00065 const char *opaque = 0);
00066
00067 int chmod(const char *Name,
00068 XrdSfsMode Mode,
00069 XrdOucErrInfo &eInfo,
00070 const XrdSecEntity *client,
00071 const char *opaque = 0);
00072
00073 int exists(const char *fileName,
00074 XrdSfsFileExistence &exists_flag,
00075 XrdOucErrInfo &eInfo,
00076 const XrdSecEntity *client,
00077 const char *opaque = 0);
00078
00079 int fsctl(const int cmd,
00080 const char *args,
00081 XrdOucErrInfo &eInfo,
00082 const XrdSecEntity *client);
00083
00084 int getStats(char *buff, int blen);
00085
00086 const char *getVersion();
00087
00088 int mkdir(const char *dirName,
00089 XrdSfsMode Mode,
00090 XrdOucErrInfo &eInfo,
00091 const XrdSecEntity *client,
00092 const char *opaque = 0);
00093
00094 int prepare( XrdSfsPrep &pargs,
00095 XrdOucErrInfo &eInfo,
00096 const XrdSecEntity *client = 0);
00097
00098 int rem(const char *path,
00099 XrdOucErrInfo &eInfo,
00100 const XrdSecEntity *client,
00101 const char *info = 0);
00102
00103 int remdir(const char *dirName,
00104 XrdOucErrInfo &eInfo,
00105 const XrdSecEntity *client,
00106 const char *info = 0);
00107
00108 int rename(const char *oldFileName,
00109 const char *newFileName,
00110 XrdOucErrInfo &eInfo,
00111 const XrdSecEntity *client,
00112 const char *infoO = 0,
00113 const char *infoN = 0);
00114
00115 int stat(const char *Name,
00116 struct stat *buf,
00117 XrdOucErrInfo &eInfo,
00118 const XrdSecEntity *client,
00119 const char *opaque = 0);
00120
00121 int stat(const char *Name,
00122 mode_t &mode,
00123 XrdOucErrInfo &eInfo,
00124 const XrdSecEntity *client,
00125 const char *opaque = 0);
00126
00127 int truncate(const char *Name,
00128 XrdSfsFileOffset fileOffset,
00129 XrdOucErrInfo &eInfo,
00130 const XrdSecEntity *client = 0,
00131 const char *opaque = 0);
00132
00133
00134
00135 static void setMax(int mVal) {freeMax = mVal;}
00136
00137 XrdSsiSfs() {}
00138 virtual ~XrdSsiSfs() {}
00139
00140 private:
00141 static int freeMax;
00142
00143 int Emsg(const char *pfx, XrdOucErrInfo &einfo, int ecode,
00144 const char *op, const char *target);
00145 const char *Split(const char *Args, const char **Opq, char *Path, int Plen);
00146 };
00147 #endif