XrdProtLoad.hh

Go to the documentation of this file.
00001 #ifndef __XrdProtLoad_H__
00002 #define __XrdProtLoad_H__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                        X r d P r o t L o a d . h h                         */
00006 /*                                                                            */
00007 /* (c) 2006 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*       All Rights Reserved. See XrdInfo.cc for complete License Terms       */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 //         $Id: XrdProtLoad.hh 22437 2008-03-04 14:35:16Z rdm $
00014 
00015 #include "Xrd/XrdProtocol.hh"
00016 
00017 class XrdSysPlugin;
00018   
00019 // This class load and allows the selection of the appropriate link protocol. 
00020 //
00021 class XrdProtLoad : public XrdProtocol
00022 {
00023 public:
00024 
00025 void          DoIt() {}
00026 
00027 static int    Load(const char *lname, const char *pname, char *parms,
00028                    XrdProtocol_Config *pi);
00029 
00030 static int    Port(const char *lname, const char *pname, char *parms,
00031                    XrdProtocol_Config *pi);
00032 
00033 XrdProtocol  *Match(XrdLink *) {return 0;}
00034 
00035 int           Process(XrdLink *lp);
00036 
00037 void          Recycle(XrdLink *lp, int ctime, const char *txt);
00038 
00039 int           Stats(char *buff, int blen, int do_sync=0);
00040 
00041               XrdProtLoad(int port=-1);
00042              ~XrdProtLoad();
00043 
00044 static const int ProtoMax = 8;
00045 
00046 private:
00047 
00048 static XrdProtocol *getProtocol    (const char *lname, const char *pname,
00049                                     char *parms, XrdProtocol_Config *pi);
00050 static int          getProtocolPort(const char *lname, const char *pname,
00051                                     char *parms, XrdProtocol_Config *pi);
00052 
00053 static char          *ProtName[ProtoMax];   // ->Supported protocol names
00054 static XrdProtocol   *Protocol[ProtoMax];   // ->Supported protocol objects
00055 static int            ProtPort[ProtoMax];   // ->Supported protocol ports
00056 static XrdProtocol   *ProtoWAN[ProtoMax];   // ->Supported protocol objects WAN
00057 static int            ProtoCnt;             // Number in table (at least 1)
00058 static int            ProtWCnt;             // Number in table (WAN may be 0)
00059 
00060 static char          *liblist[ProtoMax];    // -> Path used for shared library
00061 static XrdSysPlugin  *libhndl[ProtoMax];    // -> Plugin object
00062 static int            libcnt;               // Number in table
00063 
00064        int            myPort;
00065 };
00066 #endif

Generated on Tue Jul 5 14:46:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1