xrootd
XrdCnsConfig.hh
Go to the documentation of this file.
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 /* This file is part of the XRootD software suite.                            */
00013 /*                                                                            */
00014 /* XRootD is free software: you can redistribute it and/or modify it under    */
00015 /* the terms of the GNU Lesser General Public License as published by the     */
00016 /* Free Software Foundation, either version 3 of the License, or (at your     */
00017 /* option) any later version.                                                 */
00018 /*                                                                            */
00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
00021 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
00022 /* License for more details.                                                  */
00023 /*                                                                            */
00024 /* You should have received a copy of the GNU Lesser General Public License   */
00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
00026 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
00027 /*                                                                            */
00028 /* The copyright holder's institutional names and contributor's names may not */
00029 /* be used to endorse or promote products derived from this software without  */
00030 /* specific prior written permission of the institution or contributor.       */
00031 /******************************************************************************/
00032 
00033 class XrdCnsLogServer;
00034 class XrdCnsXref;
00035 class XrdOucTList;
00036 class XrdOucName2Name;
00037 
00038 class XrdCnsConfig
00039 {
00040 public:
00041 
00042 char             *aPath;       // Admin       path
00043 char             *bPath;       // Backup      path
00044 char             *cPath;       // Config file path
00045 char             *ePath;       // Event  file path (where logfiles  go)
00046 XrdOucTList      *Dest;        // Redir  list      (where namespace goes)
00047 XrdOucTList      *bDest;       // Bkup   entry     (where backup    goes)
00048 XrdOucTList      *Exports;     // Local  exports
00049 char             *LCLRoot;
00050 XrdOucName2Name  *N2N;
00051 XrdCnsLogServer  *XrdCnsLog;
00052 XrdCnsXref       *Space;
00053 char             *logfn;       // Logmsg path
00054 int               logKeep;
00055 int               Port;        // Xroot server port number for  Dest hosts
00056 int               mInt;        // Check interval for Inventory file
00057 int               cInt;        // Close interval for logfiles
00058 int               qLim;        // Close count    for logfiles
00059 int               Opts;
00060 
00061 static const int  optRecr = 0x0001;
00062 static const int  optNoCns= 0x0002;
00063 
00064 int               Configure(int argc, char **argv, char *argt=0);
00065 
00066 int               Configure();
00067 
00068 int               LocalPath(const char *oldp, char *newp, int newpsz);
00069 
00070 int               LogicPath(const char *oldp, char *newp, int newpsz);
00071 
00072 int               MountPath(const char *oldp, char *newp, int newpsz);
00073 
00074                   XrdCnsConfig() : aPath(0), bPath(0), cPath(0), ePath(0),
00075                                    Dest(0),  bDest(0), Exports(0),
00076                                    LCLRoot(0), N2N(0), XrdCnsLog(0), Space(0),
00077                                    logfn(0), logKeep(0), Port(1095),
00078                                    mInt(1800), cInt(1200), qLim(512), Opts(0)
00079                                  {}
00080                  ~XrdCnsConfig() {}
00081 
00082 private:
00083 int ConfigN2N();
00084 int NAPath(const char *What, const char *Path);
00085 };
00086 #endif