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 void EnvInfo(XrdOucEnv *envP);
00074
00075 int exists(const char *fileName,
00076 XrdSfsFileExistence &exists_flag,
00077 XrdOucErrInfo &eInfo,
00078 const XrdSecEntity *client,
00079 const char *opaque = 0);
00080
00081 int fsctl(const int cmd,
00082 const char *args,
00083 XrdOucErrInfo &eInfo,
00084 const XrdSecEntity *client);
00085
00086 int getStats(char *buff, int blen);
00087
00088 const char *getVersion();
00089
00090 int mkdir(const char *dirName,
00091 XrdSfsMode Mode,
00092 XrdOucErrInfo &eInfo,
00093 const XrdSecEntity *client,
00094 const char *opaque = 0);
00095
00096 int prepare( XrdSfsPrep &pargs,
00097 XrdOucErrInfo &eInfo,
00098 const XrdSecEntity *client = 0);
00099
00100 int rem(const char *path,
00101 XrdOucErrInfo &eInfo,
00102 const XrdSecEntity *client,
00103 const char *info = 0);
00104
00105 int remdir(const char *dirName,
00106 XrdOucErrInfo &eInfo,
00107 const XrdSecEntity *client,
00108 const char *info = 0);
00109
00110 int rename(const char *oldFileName,
00111 const char *newFileName,
00112 XrdOucErrInfo &eInfo,
00113 const XrdSecEntity *client,
00114 const char *infoO = 0,
00115 const char *infoN = 0);
00116
00117 int stat(const char *Name,
00118 struct stat *buf,
00119 XrdOucErrInfo &eInfo,
00120 const XrdSecEntity *client,
00121 const char *opaque = 0);
00122
00123 int stat(const char *Name,
00124 mode_t &mode,
00125 XrdOucErrInfo &eInfo,
00126 const XrdSecEntity *client,
00127 const char *opaque = 0);
00128
00129 int truncate(const char *Name,
00130 XrdSfsFileOffset fileOffset,
00131 XrdOucErrInfo &eInfo,
00132 const XrdSecEntity *client = 0,
00133 const char *opaque = 0);
00134
00135
00136
00137 static void setMax(int mVal) {freeMax = mVal;}
00138
00139 XrdSsiSfs() {}
00140 virtual ~XrdSsiSfs() {}
00141
00142 private:
00143 static int freeMax;
00144
00145 int Emsg(const char *pfx, XrdOucErrInfo &einfo, int ecode,
00146 const char *op, const char *target);
00147 const char *Split(const char *Args, const char **Opq, char *Path, int Plen);
00148 };
00149 #endif