XrdSecPManager.hh

Go to the documentation of this file.
00001 #ifndef __SEC_PMANAGER_HH__
00002 #define __SEC_PMANAGER_HH__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                     X r d S e c P M a n a g e r . h h                      */
00006 /*                                                                            */
00007 /* (c) 2003 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-AC03-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 //       $Id: XrdSecPManager.hh 27487 2009-02-18 13:17:34Z ganis $
00014 
00015 #include <sys/socket.h>
00016   
00017 #include "XrdSec/XrdSecInterface.hh"
00018 #include "XrdSys/XrdSysPthread.hh"
00019 
00020 class XrdOucErrInfo;
00021 class XrdSecProtList;
00022 class XrdSecProtocol;
00023 
00024 typedef int XrdSecPMask_t;
00025 
00026 #define PROTPARMS const char, const char *, const struct sockaddr &, \
00027                   const char *, XrdOucErrInfo *
00028 
00029 class XrdSecPManager
00030 {
00031 public:
00032 
00033 XrdSecPMask_t   Find(const         char  *pid,      // In
00034                                    char **parg=0);  // Out
00035 
00036 XrdSecProtocol *Get(const char     *hname,
00037                     const sockaddr &netaddr,
00038                     const char     *pname,
00039                     XrdOucErrInfo  *erp);
00040 
00041 XrdSecProtocol *Get (const char             *hname,
00042                      const struct sockaddr  &netaddr,
00043                            XrdSecParameters &secparm);
00044 
00045 int             Load(XrdOucErrInfo *eMsg,    // In
00046                      const char     pmode,   // In 'c' | 's'
00047                      const char    *pid,     // In
00048                      const char    *parg,    // In
00049                      const char    *path)    // In
00050                      {return (0 != ldPO(eMsg, pmode, pid, parg, path));}
00051 
00052 void            setDebug(int dbg) {DebugON = dbg;}
00053 
00054                 XrdSecPManager(int dbg=0)
00055                    {First = Last = 0; DebugON = dbg; protnum = 1;}
00056                ~XrdSecPManager() {}
00057 
00058 private:
00059 
00060 XrdSecProtList    *Add(XrdOucErrInfo  *eMsg, const char *pid,
00061                        XrdSecProtocol *(*ep)(PROTPARMS), const char *parg);
00062 XrdSecProtList    *ldPO(XrdOucErrInfo *eMsg,    // In
00063                         const char     pmode,   // In 'c' | 's'
00064                         const char    *pid,     // In
00065                         const char    *parg=0,  // In
00066                         const char    *spath=0);// In
00067 XrdSecProtList    *Lookup(const char *pid);
00068 
00069 XrdSecPMask_t      protnum;
00070 XrdSysMutex        myMutex;
00071 XrdSecProtList    *First;
00072 XrdSecProtList    *Last;
00073 int                DebugON;
00074 };
00075 #endif

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