00001 #ifndef _XRDOUCPSX_H
00002 #define _XRDOUCPSX_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
00033 #include <stdlib.h>
00034 #include <string.h>
00035 #include <sys/types.h>
00036
00037 #include "XrdOuc/XrdOucCacheCM.hh"
00038
00039 class XrdOucCacheIF;
00040 class XrdOucEnv;
00041 class XrdOucName2Name;
00042 class XrdSysError;
00043 class XrdOucStream;
00044 class XrdOucTList;
00045
00046 struct XrdVersionInfo;
00047
00048 class XrdOucPsx
00049 {
00050 public:
00051
00052 const
00053 char *CCMInfo(const char *&path) {path = mPath; return mParm;}
00054
00055 bool ClientConfig(const char *pfx, bool hush=false);
00056
00057 bool ConfigSetup(XrdSysError &eDest, bool hush=false);
00058
00059 bool ParseCache(XrdSysError *Eroute, XrdOucStream &Config);
00060
00061 bool ParseCio(XrdSysError *Eroute, XrdOucStream &Config);
00062
00063 bool ParseCLib(XrdSysError *Eroute, XrdOucStream &Config);
00064
00065 bool ParseMLib(XrdSysError *Eroute, XrdOucStream &Config);
00066
00067 bool ParseINet(XrdSysError *Eroute, XrdOucStream &Config);
00068
00069 bool ParseNLib(XrdSysError *Eroute, XrdOucStream &Config);
00070
00071 bool ParseSet(XrdSysError *Eroute, XrdOucStream &Config);
00072
00073 bool ParseTrace(XrdSysError *Eroute, XrdOucStream &Config);
00074
00075 void SetRoot(const char *lroot, const char *oroot=0);
00076
00077 char *configFN;
00078 XrdSysLogger *theLogger;
00079 XrdOucEnv *theEnv;
00080 XrdOucName2Name *theN2N;
00081 XrdOucCache *theCache;
00082 XrdOucCache2 *theCache2;
00083 XrdOucCacheCMInit_t initCCM;
00084 char *mCache;
00085 XrdOucTList *setFirst;
00086 XrdOucTList *setLast;
00087 int maxRHCB;
00088 int traceLvl;
00089 int debugLvl;
00090 int cioWait;
00091 int cioTries;
00092 bool useV4;
00093 bool xLfn2Pfn;
00094 bool xPfn2Lfn;
00095 bool xNameLib;
00096
00097 XrdOucPsx(XrdVersionInfo *vInfo, const char *cfn, XrdSysLogger *lp=0)
00098 : configFN(strdup(cfn)), theLogger(lp), theEnv(0),
00099 theN2N(0), theCache(0), theCache2(0), initCCM(0),
00100 mCache(0), setFirst(0), setLast(0), maxRHCB(0),
00101 traceLvl(0), debugLvl(0), cioWait(0), cioTries(0),
00102 useV4(false), xLfn2Pfn(false), xPfn2Lfn(false),
00103 xNameLib(false),
00104 LocalRoot(0), RemotRoot(0), N2NLib(0), N2NParms(0),
00105 cPath(0), cParm(0), mPath(0), mParm(0),
00106 myVersion(vInfo) {}
00107 ~XrdOucPsx();
00108
00109 private:
00110
00111 char *LocalRoot;
00112 char *RemotRoot;
00113 char *N2NLib;
00114 char *N2NParms;
00115 char *cPath;
00116 char *cParm;
00117 char *mPath;
00118 char *mParm;
00119 XrdVersionInfo *myVersion;
00120
00121 bool ConfigCache(XrdSysError &eDest);
00122 bool ConfigN2N(XrdSysError &eDest);
00123 bool LoadCCM(XrdSysError &eDest);
00124 bool Parse(char*, XrdOucStream&, XrdSysError&);
00125 char *ParseCache(XrdSysError *Eroute, XrdOucStream &Config, char *pBuff);
00126 void ParseSet(const char *kword, int kval);
00127 void WarnConfig(XrdSysError &eDest, XrdOucTList *tList, bool fatal);
00128 void WarnPlugin(XrdSysError &eDest, XrdOucTList *tList,
00129 const char *txt1, const char *txt2);
00130 };
00131 #endif