xrootd
XrdSysPlugin.hh
Go to the documentation of this file.
1 #ifndef __XRDSYSPLUGIN__
2 #define __XRDSYSPLUGIN__
3 /******************************************************************************/
4 /* */
5 /* X r d S y s P l u g i n . h h */
6 /* */
7 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 #include <strings.h>
14 
15 class XrdSysError;
16 
18 {
19 public:
20 
21 void *getPlugin(const char *pname, int errok=0);
22 void *getPlugin(const char *pname, int errok, bool global);
23 
24  XrdSysPlugin(XrdSysError *erp, const char *path)
25  : eDest(erp), libHandle(0)
26  {if (path) libPath = strdup(path);
27  else libPath = 0;
28  }
29  ~XrdSysPlugin();
30 
31 private:
32 
34 char *libPath;
35 void *libHandle;
36 };
37 #endif