00001 #ifndef _CMS_CLIENTCONFIG_H
00002 #define _CMS_CLIENTCONFIG_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 "XrdOuc/XrdOucTList.hh"
00034 #include "XrdOuc/XrdOuca2x.hh"
00035
00036 class XrdOucStream;
00037 class XrdSysError;
00038
00039 #define ODC_FAILOVER 'f'
00040 #define ODC_ROUNDROB 'r'
00041
00042 class XrdCmsClientConfig
00043 {
00044 public:
00045
00046 enum configHow {configMeta = 1, configNorm = 2, configProxy = 4};
00047 enum configWhat {configMan = 1, configSuper = 2, configServer = 4};
00048
00049 int Configure(const char *cfn, configWhat What, configHow How);
00050
00051 int ConWait;
00052 int RepWait;
00053 int RepWaitMS;
00054 int RepDelay;
00055 int RepNone;
00056 int PrepWait;
00057 int FwdWait;
00058 int haveMeta;
00059
00060 char *CMSPath;
00061 const char *myHost;
00062 const char *myName;
00063 char *myVNID;
00064 char *cidTag;
00065
00066 XrdOucTList *ManList;
00067 XrdOucTList *PanList;
00068 unsigned char SMode;
00069 unsigned char SModeP;
00070
00071 enum {FailOver = 'f', RoundRob = 'r'};
00072
00073 XrdCmsClientConfig() : ConWait(10), RepWait(3), RepWaitMS(3000),
00074 RepDelay(5), RepNone(8), PrepWait(33),
00075 FwdWait(0), haveMeta(0), CMSPath(0),
00076 myHost(0), myName(0), myVNID(0),
00077 cidTag(0), ManList(0), PanList(0),
00078 SMode(FailOver), SModeP(FailOver),
00079 VNID_Lib(0), VNID_Parms(0),
00080 isMeta(0), isMan(0) {}
00081 ~XrdCmsClientConfig();
00082
00083 private:
00084 char *VNID_Lib;
00085 char *VNID_Parms;
00086
00087 int isMeta;
00088 int isMan;
00089
00090 int ConfigProc(const char *cfn);
00091 bool ConfigSID(const char *cFile, XrdOucTList *tpl, char sfx);
00092 int ConfigXeq(char *var, XrdOucStream &Config);
00093 int xapath(XrdOucStream &Config);
00094 int xcidt(XrdOucStream &Config);
00095 int xconw(XrdOucStream &Config);
00096 int xmang(XrdOucStream &Config);
00097 int xreqs(XrdOucStream &Config);
00098 int xtrac(XrdOucStream &Config);
00099 int xvnid(XrdOucStream &Config);
00100 };
00101 #endif