xrootd
|
#include <XrdOfsConfigPI.hh>
Classes | |
struct | ctlLP |
struct | xxxLP |
Public Types | |
enum | TheLib { theAtrLib = 0x0100 , theAutLib = 0x0201 , theCksLib = 0x0402 , theCmsLib = 0x0803 , theCtlLib = 0x1004 , theOssLib = 0x2005 , thePrpLib = 0x4006 , allXXXLib = 0x7f07 , maxXXXLib = 0x0007 , libIXMask = 0x00ff } |
Public Member Functions | |
bool | Configure (XrdCmsClient *cmscP, XrdOucEnv *envP) |
bool | ConfigCtl (XrdCmsClient *cmscP, XrdOucEnv *envP=0) |
void | Default (TheLib what, const char *lpath, const char *lparm=0) |
void | DefaultCS (const char *alg) |
void | Display () |
Display configuration settings. | |
bool | Load (int what, XrdOucEnv *envP=0) |
bool | LclCks () |
bool | OssCks () |
bool | Parse (TheLib what) |
bool | Plugin (XrdAccAuthorize *&piP) |
Get Authorization plugin. | |
bool | Plugin (XrdCks *&pip) |
Get Checksum manager plugin. | |
bool | Plugin (XrdCmsClient_t &piP) |
Get Cms client object generator. | |
bool | Plugin (XrdOfsFSctl_PI *&piP) |
Get Ctl plugin. | |
bool | Plugin (XrdOfsPrepare *&piP) |
Get Prp plugin (prepare) | |
bool | Plugin (XrdOss *&piP) |
Get Oss plugin. | |
bool | PrepAuth () |
bool | Push (TheLib what, const char *plugP, const char *parmP=0) |
void | SetCksRdSz (int rdsz) |
~XrdOfsConfigPI () | |
Destructor. | |
Static Public Member Functions | |
static XrdOfsConfigPI * | New (const char *cfn, XrdOucStream *cfgP, XrdSysError *errP, XrdVersionInfo *verP=0, XrdSfsFileSystem *sfsP=0) |
Private Member Functions | |
XrdOfsConfigPI (const char *cfn, XrdOucStream *cfgP, XrdSysError *errP, XrdSfsFileSystem *sfsP, XrdVersionInfo *verP=0) | |
bool | AddLib (TheLib what) |
bool | AddLibAtr (XrdOucEnv *envP, XrdSysXAttr *&atrPI) |
bool | AddLibAut (XrdOucEnv *envP) |
bool | AddLibCtl (XrdOucEnv *envP) |
bool | AddLibOss (XrdOucEnv *envP) |
bool | AddLibPrp (XrdOucEnv *envP) |
bool | ParseAtrLib () |
bool | ParseOssLib () |
bool | ParsePrpLib () |
bool | RepLib (TheLib what, const char *newLib, const char *newParms=0, bool parseParms=true) |
bool | SetupAttr (TheLib what, XrdOucEnv *envP) |
bool | SetupAuth (XrdOucEnv *envP) |
bool | SetupCtl (XrdOucEnv *envP) |
bool | SetupCms () |
bool | SetupPrp (XrdOucEnv *envP) |
Private Attributes | |
XrdAccAuthorize * | autPI |
-> Authorization plugin | |
XrdCks * | cksPI |
-> Checksum manager plugin | |
XrdCmsClient_t | cmsPI |
-> Cms client object generator plugin | |
XrdOfsFSctl_PI * | ctlPI |
-> Ctl plugin (FSCtl) | |
XrdOfsPrepare * | prpPI |
-> Prp plugin (prepare) | |
XrdOss * | ossPI |
-> Oss plugin | |
XrdSfsFileSystem * | sfsPI |
-> Ofs plugin | |
XrdVersionInfo * | urVer |
-> Version information | |
XrdOucStream * | Config |
XrdSysError * | Eroute |
XrdCksConfig * | CksConfig |
const char * | ConfigFN |
struct XrdOfsConfigPI::xxxLP | LP [maxXXXLib] |
std::vector< xxxLP > | ALP [maxXXXLib] |
std::vector< ctlLP > | ctlVec |
char * | CksAlg |
int | CksRdsz |
bool | pushOK [maxXXXLib] |
bool | defLib [maxXXXLib] |
bool | ossXAttr |
char | ossCksio |
bool | prpAuth |
bool | Loaded |
bool | LoadOK |
bool | cksLcl |
The XrdOfsConfigPI is a helper class to handle ofs plugins. It is a safe class in that the invoker of this class may reside in a different shared library even though the implementation of this class may change. This is because nothing is this class depends on the invoker knowing the layout of thie class members nor the actual size of this class. Note that you must use the static New() method to obtain an instance of this class.
The following enum is passed either alone or in combination to various methods to indicate what plugin is being referenced.
Enumerator | |
---|---|
theAtrLib | Extended attribute plugin. |
theAutLib | Authorization plugin. |
theCksLib | Checksum manager plugin. |
theCmsLib | Cms client plugin. |
theCtlLib | Ctl plugin (FSCtl) |
theOssLib | Oss plugin. |
thePrpLib | Prp plugin (prepare) |
allXXXLib | All plugins (Load() only) |
maxXXXLib | Maximum different plugins. |
libIXMask |
XrdOfsConfigPI::~XrdOfsConfigPI | ( | ) |
Destructor.
|
private |
Constructor (private to force use of New()).
cfn | Pointer to the configuration file name. |
cfgP | Pointer to the stream that reads the configuration file. |
errP | Pointer to the error message object that routes messages. |
sfsP | Pointer to the file system plugin (i.e. caller). |
verP | Pointer to the version information of the object creator. If zero, the version information of this object is used. Generally, if the creator resides in a different shared library, the creator's version should be supplied. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
bool XrdOfsConfigPI::ConfigCtl | ( | XrdCmsClient * | cmscP, |
XrdOucEnv * | envP = 0 |
||
) |
Configure the fsctl plugin.
cmscP | Pointer to the cms plugin. |
envP | Pointer to the environment. |
bool XrdOfsConfigPI::Configure | ( | XrdCmsClient * | cmscP, |
XrdOucEnv * | envP | ||
) |
Configure the cms client.
cmscP | Pointer to the cms client instance. |
envP | Pointer to the environment normally passed to the cms client istance. |
void XrdOfsConfigPI::Default | ( | TheLib | what, |
const char * | lpath, | ||
const char * | lparm = 0 |
||
) |
Set the default plugin path and parms. This method may be called before or after the configuration file is parsed.
what | The enum that specified which plugin is being set. |
lpath | The plugin library path |
lparm | The plugin parameters (0 if none) |
void XrdOfsConfigPI::DefaultCS | ( | const char * | alg | ) |
Set the default checksum algorithm. This method must be called before Load() is called.
alg | Pointer to the default algorithm name, it is duplicated. |
void XrdOfsConfigPI::Display | ( | ) |
Display configuration settings.
|
inline |
Check if the checksum plugin runs on tghe local node irrespective of type.
References cksLcl.
bool XrdOfsConfigPI::Load | ( | int | what, |
XrdOucEnv * | envP = 0 |
||
) |
Load required plugins. This is a one time call!
what | A "or" combination of TheLib enums specifying which plugins need to be loaded. |
envP | Pointer to the environment normally passed to the default oss plugin at load time. |
|
static |
Obtain an instance of this class (note that the constructor is private).
cfn | Pointer to the configuration file name. |
cfgP | Pointer to the stream that reads the configuration file. |
errP | Pointer to the error message object that routes messages. |
verP | Pointer to the version information of the object creator. If zero, the version information of this object is used. Generally, if the creator resides in a different shared library, the creator's version should be supplied. |
sfsP | Pointer to file system doing the loading, if applicable. |
bool XrdOfsConfigPI::OssCks | ( | ) |
Check if the checksum plugin uses the oss plugin.
bool XrdOfsConfigPI::Parse | ( | TheLib | what | ) |
Parse a plugin directive.
what | The enum specifying which plugin directive to parse. |
|
private |
|
private |
|
private |
bool XrdOfsConfigPI::Plugin | ( | XrdAccAuthorize *& | piP | ) |
Get Authorization plugin.
Obtain a pointer to a plugin handled by this class.
piP | Refererence to the pointer to receive the plugin pointer. |
bool XrdOfsConfigPI::Plugin | ( | XrdCks *& | pip | ) |
Get Checksum manager plugin.
bool XrdOfsConfigPI::Plugin | ( | XrdCmsClient_t & | piP | ) |
Get Cms client object generator.
bool XrdOfsConfigPI::Plugin | ( | XrdOfsFSctl_PI *& | piP | ) |
Get Ctl plugin.
bool XrdOfsConfigPI::Plugin | ( | XrdOfsPrepare *& | piP | ) |
Get Prp plugin (prepare)
bool XrdOfsConfigPI::Plugin | ( | XrdOss *& | piP | ) |
Get Oss plugin.
bool XrdOfsConfigPI::PrepAuth | ( | ) |
Check if the prepare plugin wants authorization.
bool XrdOfsConfigPI::Push | ( | TheLib | what, |
const char * | plugP, | ||
const char * | parmP = 0 |
||
) |
Push a plugin on top of eixsting plugins to be loaded.
what | The enum specifying which plugin to push. |
plugP | Pointer to the name or path of the shared library |
parmP | Pointer to library parameters, if any. |
|
private |
void XrdOfsConfigPI::SetCksRdSz | ( | int | rdsz | ) |
Set the checksum read size
rdsz | The chesum read size buffer. |
|
private |
|
private |
|
private |
|
private |
|
private |
-> Authorization plugin
|
private |
|
private |
|
private |
Referenced by LclCks().
|
private |
-> Checksum manager plugin
|
private |
|
private |
-> Cms client object generator plugin
|
private |
|
private |
|
private |
-> Ctl plugin (FSCtl)
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
-> Oss plugin
|
private |
|
private |
|
private |
-> Prp plugin (prepare)
|
private |
|
private |
-> Ofs plugin
|
private |
-> Version information