xrootd
XrdSysPlugin.hh
Go to the documentation of this file.
00001 #ifndef __XRDSYSPLUGIN__
00002 #define __XRDSYSPLUGIN__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                       X r d S y s P l u g i n . h h                        */
00006 /*                                                                            */
00007 /* (c) 2005 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 <strings.h>
00014 
00015 class XrdSysError;
00016 
00017 class XrdSysPlugin
00018 {
00019 public:
00020 
00021 void *getPlugin(const char *pname, int errok=0);
00022 void *getPlugin(const char *pname, int errok, bool global);
00023 
00024       XrdSysPlugin(XrdSysError *erp, const char *path)
00025                   : eDest(erp), libHandle(0)
00026                   {if (path) libPath = strdup(path);
00027                       else   libPath = 0;
00028                   }
00029      ~XrdSysPlugin();
00030 
00031 private:
00032 
00033 XrdSysError *eDest;
00034 char        *libPath;
00035 void        *libHandle;
00036 };
00037 #endif