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