xrootd
XrdCksConfig.hh
Go to the documentation of this file.
00001 #ifndef __XRDCKSCONFIG_HH__
00002 #define __XRDCKSCONFIG_HH__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                       X r d C k s C o n f i g . h h                        */
00006 /*                                                                            */
00007 /* (c) 2011 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 #include "XrdOuc/XrdOucTList.hh"
00014 
00015 class XrdCks;
00016 class XrdOucStream;
00017 class XrdSysError;
00018   
00019 class XrdCksConfig
00020 {
00021 public:
00022 
00023 XrdCks *Configure(const char *dfltCalc=0, int rdsz=0);
00024 
00025 int     Manager() {return CksLib != 0;}
00026 
00027 int     Manager(const char *Path, const char *Parms);
00028 
00029 int     ParseLib(XrdOucStream &Config);
00030 
00031         XrdCksConfig(const char *cFN, XrdSysError *Eroute)
00032                     : eDest(Eroute), cfgFN(cFN), CksLib(0), CksParm(0),
00033                       CksList(0), CksLast(0) {}
00034        ~XrdCksConfig() {XrdOucTList *tP;
00035                         if (CksLib)  free(CksLib);
00036                         if (CksParm) free(CksParm);
00037                         while((tP = CksList)) {CksList = tP->next; delete tP;}
00038                        }
00039 
00040 private:
00041 XrdCks      *getCks(int rdsz);
00042 
00043 XrdSysError *eDest;
00044 const char  *cfgFN;
00045 char        *CksLib;
00046 char        *CksParm;
00047 XrdOucTList *CksList;
00048 XrdOucTList *CksLast;
00049 };
00050 #endif