![]() |
XRootD
|
#include <XrdOfsConfigPI.hh>
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 | |
~XrdOfsConfigPI () | |
Destructor. More... | |
bool | ConfigCtl (XrdCmsClient *cmscP, XrdOucEnv *envP=0) |
bool | Configure (XrdCmsClient *cmscP, XrdOucEnv *envP) |
void | Default (TheLib what, const char *lpath, const char *lparm=0) |
void | DefaultCS (const char *alg) |
void | Display () |
Display configuration settings. More... | |
bool | LclCks () |
bool | Load (int what, XrdOucEnv *envP=0) |
bool | OssCks () |
bool | Parse (TheLib what) |
bool | Plugin (XrdAccAuthorize *&piP) |
Get Authorization plugin. More... | |
bool | Plugin (XrdCks *&pip) |
Get Checksum manager plugin. More... | |
bool | Plugin (XrdCmsClient_t &piP) |
Get Cms client object generator. More... | |
bool | Plugin (XrdOfsFSctl_PI *&piP) |
Get Ctl plugin. More... | |
bool | Plugin (XrdOfsPrepare *&piP) |
Get Prp plugin (prepare) More... | |
bool | Plugin (XrdOss *&piP) |
Get Oss plugin. More... | |
bool | PrepAuth () |
bool | Push (TheLib what, const char *plugP, const char *parmP=0) |
void | SetCksRdSz (int rdsz) |
Static Public Member Functions | |
static XrdOfsConfigPI * | New (const char *cfn, XrdOucStream *cfgP, XrdSysError *errP, XrdVersionInfo *verP=0, XrdSfsFileSystem *sfsP=0) |
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.
Definition at line 60 of file XrdOfsConfigPI.hh.
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 |
Definition at line 69 of file XrdOfsConfigPI.hh.
XrdOfsConfigPI::~XrdOfsConfigPI | ( | ) |
Destructor.
Definition at line 129 of file XrdOfsConfigPI.cc.
bool XrdOfsConfigPI::ConfigCtl | ( | XrdCmsClient * | cmscP, |
XrdOucEnv * | envP = 0 |
||
) |
Configure the fsctl plugin.
cmscP | Pointer to the cms plugin. |
envP | Pointer to the environment. |
Definition at line 297 of file XrdOfsConfigPI.cc.
References XrdOfsFSctl_PI::Plugins::autPI, XrdOfsFSctl_PI::Configure(), XrdProxy::envP, XrdOfsFSctl_PI::Plugins::ossPI, PIX, XrdOfsFSctl_PI::Plugins::sfsPI, and theCtlLib.
Referenced by XrdOfs::Configure().
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. |
Definition at line 288 of file XrdOfsConfigPI.cc.
References XrdCmsClient::Configure(), XrdProxy::envP, PIX, and theCmsLib.
void XrdOfsConfigPI::Default | ( | XrdOfsConfigPI::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) |
Definition at line 323 of file XrdOfsConfigPI.cc.
References maxXXXLib, and PIX.
Referenced by XrdOfs::Configure().
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. |
Definition at line 336 of file XrdOfsConfigPI.cc.
References XrdOucUtils::toLower().
void XrdOfsConfigPI::Display | ( | ) |
Display configuration settings.
Definition at line 347 of file XrdOfsConfigPI.cc.
References maxXXXLib, PIX, XrdSysError::Say(), theAtrLib, and theOssLib.
Referenced by XrdOfs::Config_Display().
|
inline |
Check if the checksum plugin runs on tghe local node irrespective of type.
Definition at line 168 of file XrdOfsConfigPI.hh.
Referenced by XrdOfs::Configure().
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. |
Definition at line 382 of file XrdOfsConfigPI.cc.
References XrdCksConfig::Configure(), DO_LOAD, XrdSysError::Emsg(), XrdProxy::envP, XrdOucEnv::Get(), XrdSysError::logger(), XrdOfsFSctl_PI::Plugins::ossPI, PIX, XrdSysXAttr::SetMsgRoute(), XrdSysFAttr::SetPlugin(), theAtrLib, theAutLib, theCksLib, theCmsLib, theCtlLib, theOssLib, thePrpLib, XrdSysFAttr::Xat, XrdOssGetSS(), and XrdSysXAttrActive.
Referenced by XrdPfc::Cache::Config(), XrdFrmConfig::Configure(), XrdOfs::Configure(), and main().
|
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. |
Definition at line 466 of file XrdOfsConfigPI.cc.
References XrdSysPlugin::VerCmp(), and XrdOfsFSctl_PI::XrdOfsConfigPI.
Referenced by XrdPfc::Cache::Config(), XrdOfs::Configure(), and main().
bool XrdOfsConfigPI::OssCks | ( | ) |
Check if the checksum plugin uses the oss plugin.
Definition at line 484 of file XrdOfsConfigPI.cc.
Referenced by XrdOfs::Configure().
bool XrdOfsConfigPI::Parse | ( | TheLib | what | ) |
Parse a plugin directive.
what | The enum specifying which plugin directive to parse. |
Definition at line 490 of file XrdOfsConfigPI.cc.
References XrdCms::Config, XrdSysError::Emsg(), XrdCksConfig::ManLib(), XrdCksConfig::ParseLib(), PIX, theAtrLib, theAutLib, theCksLib, theCmsLib, theCtlLib, theOssLib, and thePrpLib.
Referenced by XrdPfc::Cache::Config().
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. |
Definition at line 694 of file XrdOfsConfigPI.cc.
References XrdOfsFSctl_PI::Plugins::autPI.
Referenced by XrdPfc::Cache::Config(), XrdFrmConfig::Configure(), XrdOfs::Configure(), and main().
bool XrdOfsConfigPI::Plugin | ( | XrdCks *& | pip | ) |
Get Checksum manager plugin.
Definition at line 697 of file XrdOfsConfigPI.cc.
bool XrdOfsConfigPI::Plugin | ( | XrdCmsClient_t & | piP | ) |
Get Cms client object generator.
Definition at line 700 of file XrdOfsConfigPI.cc.
References XrdOfsFSctl_PI::Plugins::cmsPI.
bool XrdOfsConfigPI::Plugin | ( | XrdOfsFSctl_PI *& | piP | ) |
bool XrdOfsConfigPI::Plugin | ( | XrdOfsPrepare *& | piP | ) |
Get Prp plugin (prepare)
Definition at line 706 of file XrdOfsConfigPI.cc.
bool XrdOfsConfigPI::Plugin | ( | XrdOss *& | piP | ) |
Get Oss plugin.
Definition at line 709 of file XrdOfsConfigPI.cc.
References XrdOfsFSctl_PI::Plugins::ossPI.
bool XrdOfsConfigPI::PrepAuth | ( | ) |
Check if the prepare plugin wants authorization.
Definition at line 716 of file XrdOfsConfigPI.cc.
Referenced by XrdOfs::Configure().
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. |
Definition at line 722 of file XrdOfsConfigPI.cc.
References PIX.
Referenced by XrdPfc::Cache::Config().
void XrdOfsConfigPI::SetCksRdSz | ( | int | rdsz | ) |
Set the checksum read size
rdsz | The chesum read size buffer. |
Definition at line 785 of file XrdOfsConfigPI.cc.