xrootd
|
00001 #ifndef __XRDCNSCONFIG_H__ 00002 #define __XRDCNSCONFIG_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d C n s C o n f i g . h h */ 00006 /* */ 00007 /* (c) 2009 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC02-76-SFO0515 with the Department of Energy */ 00011 /******************************************************************************/ 00012 00013 // $Id$ 00014 00015 class XrdCnsLogServer; 00016 class XrdCnsXref; 00017 class XrdOucTList; 00018 class XrdOucName2Name; 00019 00020 class XrdCnsConfig 00021 { 00022 public: 00023 00024 char *aPath; // Admin path 00025 char *bPath; // Backup path 00026 char *cPath; // Config file path 00027 char *ePath; // Event file path (where logfiles go) 00028 XrdOucTList *Dest; // Redir list (where namespace goes) 00029 XrdOucTList *bDest; // Bkup entry (where backup goes) 00030 XrdOucTList *Exports; // Local exports 00031 char *LCLRoot; 00032 XrdOucName2Name *N2N; 00033 XrdCnsLogServer *XrdCnsLog; 00034 XrdCnsXref *Space; 00035 char *logfn; // Logmsg path 00036 int logKeep; 00037 int Port; // Xroot server port number for Dest hosts 00038 int mInt; // Check interval for Inventory file 00039 int cInt; // Close interval for logfiles 00040 int qLim; // Close count for logfiles 00041 int Opts; 00042 00043 static const int optRecr = 0x0001; 00044 static const int optNoCns= 0x0002; 00045 00046 int Configure(int argc, char **argv, char *argt=0); 00047 00048 int Configure(); 00049 00050 int LocalPath(const char *oldp, char *newp, int newpsz); 00051 00052 int LogicPath(const char *oldp, char *newp, int newpsz); 00053 00054 int MountPath(const char *oldp, char *newp, int newpsz); 00055 00056 XrdCnsConfig() : aPath(0), bPath(0), cPath(0), ePath(0), 00057 Dest(0), bDest(0), Exports(0), 00058 LCLRoot(0), N2N(0), XrdCnsLog(0), Space(0), 00059 logfn(0), logKeep(0), Port(1095), 00060 mInt(1800), cInt(1200), qLim(512), Opts(0) 00061 {} 00062 ~XrdCnsConfig() {} 00063 00064 private: 00065 int ConfigN2N(); 00066 int NAPath(const char *What, const char *Path); 00067 }; 00068 #endif