1 #ifndef __XRDSYSPLUGIN__
2 #define __XRDSYSPLUGIN__
35 struct XrdVersionInfo;
74 void *
getLibrary(
bool allMsgs=
true,
bool global=
false);
90 void *
getPlugin(
const char *pname,
int optional=0);
109 void *
getPlugin(
const char *pname,
int optional,
bool global);
118 void *
Persist() {
void *lHan = libHandle; libHandle = 0;
return lHan;}
140 bool Preload(
const char *path,
char *ebuff=0,
int eblen=0);
154 bool VerCmp(XrdVersionInfo &vInf1, XrdVersionInfo &vInf2,
bool noMsg=
false);
166 : eDest(erp), libName(0), libPath(path ? strdup(path) : 0),
167 libHandle(0), myInfo(0), eBuff(0), eBLen(0), msgCnt(-1) {}
186 XrdVersionInfo *vinf=0,
int msgNum=-1)
187 : eDest(erp), libName(lname),
188 libPath(path ? strdup(path) : 0), libHandle(0),
189 myInfo(vinf), eBuff(0), eBLen(0), msgCnt(msgNum) {}
210 XrdSysPlugin(
char *ebuff,
int eblen,
const char *path,
const char *lname,
211 XrdVersionInfo *vinf=0,
int msgNum=-1)
212 : eDest(0), libName(lname),
213 libPath(path ? strdup(path) : 0), libHandle(0),
214 myInfo(vinf), eBuff(ebuff), eBLen(eblen), msgCnt(msgNum) {}
223 enum cvResult {cvBad = 0, cvNone, cvMissing, cvClean, cvDirty};
225 cvResult badVersion(XrdVersionInfo &urInfo,
char mmv,
int majv,
int minv);
226 cvResult chkVersion(XrdVersionInfo &urInfo,
const char *pname,
void *lh);
227 static int DLflags();
228 static void *Find(
const char *libname);
229 void Inform(
const char *txt1,
const char *txt2=0,
const char *txt3=0,
230 const char *txt4=0,
const char *txt5=0,
int noHush=0);
231 cvResult libMsg(
const char *txt1,
const char *txt2,
const char *mSym=0);
232 const char *msgSuffix(
const char *Word,
char *buff,
int bsz);
238 XrdVersionInfo *myInfo;
243 struct PLlist {PLlist *next;
248 static PLlist *plList;
void * getPlugin(const char *pname, int optional=0)
static bool Preload(const char *path, char *ebuff=0, int eblen=0)
~XrdSysPlugin()
Destructor.
void * getLibrary(bool allMsgs=true, bool global=false)
XrdSysPlugin(char *ebuff, int eblen, const char *path, const char *lname, XrdVersionInfo *vinf=0, int msgNum=-1)
XrdSysPlugin(XrdSysError *erp, const char *path, const char *lname, XrdVersionInfo *vinf=0, int msgNum=-1)
XrdSysPlugin(XrdSysError *erp, const char *path)
static bool VerCmp(XrdVersionInfo &vInf1, XrdVersionInfo &vInf2, bool noMsg=false)