00001
00002
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 #ifndef XRDCMSREDIRPLUGIN_HH_
00030 #define XRDCMSREDIRPLUGIN_HH_
00031 #include <XrdCms/XrdCmsFinder.hh>
00032 #include <XrdCms/XrdCmsClient.hh>
00033 #include <XrdNet/XrdNetAddr.hh>
00034 #include <XrdOss/XrdOss.hh>
00035 #include <XrdOuc/XrdOucEnv.hh>
00036 #include <XrdSec/XrdSecEntity.hh>
00037 #include <XrdSfs/XrdSfsInterface.hh>
00038 #include <XrdOuc/XrdOucStream.hh>
00039 #include <XrdOuc/XrdOucString.hh>
00040 #include <XrdVersion.hh>
00041 #include <string>
00042 #include <fcntl.h>
00043
00044 class XrdCmsRedirLocal : public XrdCmsClient {
00045 public:
00046 XrdCmsRedirLocal(XrdSysLogger *Logger, int opMode, int myPort, XrdOss *theSS);
00047 ~XrdCmsRedirLocal();
00048 int Configure(const char *cfn, char *Parms, XrdOucEnv *EnvInfo);
00049 void loadConfig(const char *filename);
00050 int Locate(XrdOucErrInfo &Resp, const char *path, int flags,
00051 XrdOucEnv *EnvInfo);
00052
00053 int Space(XrdOucErrInfo &Resp, const char *path, XrdOucEnv *EnvInfo);
00054 void Added(const char *path, int Pend = 0) {
00055 nativeCmsFinder->Added(path, Pend);
00056 }
00057 int Forward(XrdOucErrInfo &Resp, const char *cmd, const char *arg1 = 0,
00058 const char *arg2 = 0, XrdOucEnv *Env1 = 0, XrdOucEnv *Env2 = 0) {
00059 return nativeCmsFinder->Forward(Resp, cmd, arg1, arg2, Env1, Env2);
00060 }
00061 int isRemote() { return nativeCmsFinder->isRemote(); }
00062 XrdOucTList *Managers() { return nativeCmsFinder->Managers(); }
00063 int Prepare(XrdOucErrInfo &Resp, XrdSfsPrep &pargs, XrdOucEnv *Info = 0) {
00064 return nativeCmsFinder->Prepare(Resp, pargs, Info);
00065 }
00066 void Removed(const char *path) { return nativeCmsFinder->Removed(path); }
00067 void Resume(int Perm = 1) { nativeCmsFinder->Resume(Perm); }
00068 void Suspend(int Perm = 1) { nativeCmsFinder->Suspend(Perm); }
00069 int Resource(int n) { return nativeCmsFinder->Resource(n); }
00070 int Reserve(int n = 1) { return nativeCmsFinder->Reserve(n); }
00071 int Release(int n = 1) { return nativeCmsFinder->Release(n); }
00072
00073
00075
00076 XrdCmsClient *nativeCmsFinder;
00077 XrdOss *theSS;
00078 bool readOnlyredirect;
00079 };
00080
00081 #endif // XRDCMSREDIRPLUGIN_HH_