00001 #ifndef _CMS_CLIENTCONFIG_H
00002 #define _CMS_CLIENTCONFIG_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "XrdOuc/XrdOucTList.hh"
00014 #include "XrdOuc/XrdOuca2x.hh"
00015
00016 class XrdOucStream;
00017 class XrdSysError;
00018
00019 #define ODC_FAILOVER 'f'
00020 #define ODC_ROUNDROB 'r'
00021
00022 class XrdCmsClientConfig
00023 {
00024 public:
00025
00026 enum configHow {configMeta = 1, configNorm = 2, configProxy = 4};
00027 enum configWhat {configMan = 1, configSuper = 2, configServer = 4};
00028
00029 int Configure(char *cfn, configWhat What, configHow How);
00030
00031 int ConWait;
00032 int RepWait;
00033 int RepWaitMS;
00034 int RepDelay;
00035 int RepNone;
00036 int PrepWait;
00037 int FwdWait;
00038 int haveMeta;
00039
00040 char *CMSPath;
00041 char *myHost;
00042 const char *myName;
00043
00044 XrdOucTList *ManList;
00045 XrdOucTList *PanList;
00046 unsigned char SMode;
00047 unsigned char SModeP;
00048
00049 enum {FailOver = 'f', RoundRob = 'r'};
00050
00051 XrdCmsClientConfig() : ConWait(10), RepWait(3), RepWaitMS(3000),
00052 RepDelay(5), RepNone(8), PrepWait(33),
00053 FwdWait(0), haveMeta(0), CMSPath(0),
00054 myHost(0), myName(0),
00055 ManList(0), PanList(0),
00056 SMode(FailOver), SModeP(FailOver), isMeta(0) {}
00057 ~XrdCmsClientConfig();
00058
00059 private:
00060 int isMeta;
00061 int isMan;
00062
00063 int ConfigProc(char *cfn);
00064 int ConfigXeq(char *var, XrdOucStream &Config);
00065 int xapath(XrdOucStream &Config);
00066 int xconw(XrdOucStream &Config);
00067 int xmang(XrdOucStream &Config);
00068 int xreqs(XrdOucStream &Config);
00069 int xtrac(XrdOucStream &Config);
00070 };
00071 #endif