XrdOfsConfigPI Class Reference

#include <XrdOfsConfigPI.hh>

Collaboration diagram for XrdOfsConfigPI:
Collaboration graph
[legend]

List of all members.

Classes

struct  xxxLP

Public Types

enum  TheLib {
  theAtrLib = 0x0100, theAutLib = 0x0201, theCksLib = 0x0402, theCmsLib = 0x0803,
  theOssLib = 0x1004, thePrpLib = 0x2005, allXXXLib = 0x3f06, maxXXXLib = 0x0006,
  libIXMask = 0x00ff
}

Public Member Functions

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.
bool Load (int what, XrdOfs *ofsP=0, 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 (XrdOfsPrepare *&piP)
 Get Prp plugin (prepare).
bool Plugin (XrdOss *&piP)
 Get Oss plugin.
bool PrepAuth ()
void SetCksRdSz (int rdsz)
 ~XrdOfsConfigPI ()
 Destructor.

Static Public Member Functions

static XrdOfsConfigPINew (const char *cfn, XrdOucStream *cfgP, XrdSysError *errP, XrdVersionInfo *verP=0)

Private Member Functions

 XrdOfsConfigPI (const char *cfn, XrdOucStream *cfgP, XrdSysError *errP, XrdVersionInfo *verP=0)
bool ParseAtrLib ()
bool ParseOssLib ()
bool ParsePrpLib ()
bool RepLib (TheLib what, const char *newLib, const char *newParms=0, bool parseParms=true)
bool SetupAttr (TheLib what)
bool SetupAuth ()
bool SetupCms ()
bool SetupPrp (XrdOfs *ofsP, XrdOucEnv *envP)

Private Attributes

XrdAccAuthorizeautPI
 -> Authorization plugin
XrdCkscksPI
 -> Checksum manager plugin
XrdCmsClient_t cmsPI
 -> Cms client object generator plugin
XrdOfsPrepareprpPI
 -> Prp plugin (prepare)
XrdOssossPI
 -> Oss plugin
XrdVersionInfo * urVer
 -> Version information
XrdOucStreamConfig
XrdSysErrorEroute
XrdCksConfigCksConfig
const char * ConfigFN
struct XrdOfsConfigPI::xxxLP LP [maxXXXLib]
char * CksAlg
int CksRdsz
bool defLib [maxXXXLib]
bool ossXAttr
bool ossCksio
bool prpAuth
bool Loaded
bool LoadOK
bool cksLcl

Detailed Description

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.


Member Enumeration Documentation

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.

theOssLib 

Oss plugin.

thePrpLib 

Prp plugin (prepare).

allXXXLib 

All plugins (Load() only).

maxXXXLib 

Maximum different plugins.

libIXMask 

Constructor & Destructor Documentation

XrdOfsConfigPI::~XrdOfsConfigPI (  ) 

Destructor.

XrdOfsConfigPI::XrdOfsConfigPI ( const char *  cfn,
XrdOucStream cfgP,
XrdSysError errP,
XrdVersionInfo *  verP = 0 
) [private]

Constructor (private to force use of New()).

Parameters:
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.

Member Function Documentation

bool XrdOfsConfigPI::Configure ( XrdCmsClient cmscP,
XrdOucEnv envP 
)

Configure the cms client.

Parameters:
cmscP Pointer to the cms client instance.
envP Pointer to the environment normally passed to the cms client istance.
Returns:
true upon success and false upon failure.
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.

Parameters:
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.

Parameters:
alg Pointer to the default algorithm name, it is duplicated.
void XrdOfsConfigPI::Display (  ) 

Display configuration settings.

bool XrdOfsConfigPI::LclCks (  )  [inline]

Check if the checksum plugin runs on tghe local node irrespective of type.

Returns:
True if the plugin runs on the local node, false otherwise.

References cksLcl.

bool XrdOfsConfigPI::Load ( int  what,
XrdOfs ofsP = 0,
XrdOucEnv envP = 0 
)

Load required plugins. This is a one time call!

Parameters:
what A "or" combination of TheLib enums specifying which plugins need to be loaded.
ofsP Pointer to the ofs plugin requesting he load.
envP Pointer to the environment normally passed to the default oss plugin at load time.
Returns:
true upon success and false upon failure.
static XrdOfsConfigPI* XrdOfsConfigPI::New ( const char *  cfn,
XrdOucStream cfgP,
XrdSysError errP,
XrdVersionInfo *  verP = 0 
) [static]

Obtain an instance of this class (note that the constructor is private).

Parameters:
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.
Returns:
Pointer to an instance of this class. If the pointer is nil, either the caller's version is incompatible or there is not enough memory (unlikely).
bool XrdOfsConfigPI::OssCks (  ) 

Check if the checksum plugin uses the oss plugin.

Returns:
True if the plugin uses the oss plugin, false otherwise.
bool XrdOfsConfigPI::Parse ( TheLib  what  ) 

Parse a plugin directive.

Parameters:
what The enum specifying which plugin directive to parse.
Returns:
true upon success and false upon failure.
bool XrdOfsConfigPI::ParseAtrLib (  )  [private]
bool XrdOfsConfigPI::ParseOssLib (  )  [private]
bool XrdOfsConfigPI::ParsePrpLib (  )  [private]
bool XrdOfsConfigPI::Plugin ( XrdOss *&  piP  ) 

Get Oss plugin.

bool XrdOfsConfigPI::Plugin ( XrdOfsPrepare *&  piP  ) 

Get Prp plugin (prepare).

bool XrdOfsConfigPI::Plugin ( XrdCmsClient_t piP  ) 

Get Cms client object generator.

bool XrdOfsConfigPI::Plugin ( XrdCks *&  pip  ) 

Get Checksum manager plugin.

bool XrdOfsConfigPI::Plugin ( XrdAccAuthorize *&  piP  ) 

Get Authorization plugin.

Obtain a pointer to a plugin handled by this class.

Parameters:
piP Refererence to the pointer to receive the plugin pointer.
Returns:
true Plugin pointer has been returned.
false The plugin was not oaded and the pointer is nil.
bool XrdOfsConfigPI::PrepAuth (  ) 

Check if the prepare plugin wants authorization.

Returns:
True if the plugin wants authorization, false otherwise.
bool XrdOfsConfigPI::RepLib ( TheLib  what,
const char *  newLib,
const char *  newParms = 0,
bool  parseParms = true 
) [private]
void XrdOfsConfigPI::SetCksRdSz ( int  rdsz  ) 

Set the checksum read size

Parameters:
rdsz The chesum read size buffer.
bool XrdOfsConfigPI::SetupAttr ( TheLib  what  )  [private]
bool XrdOfsConfigPI::SetupAuth (  )  [private]
bool XrdOfsConfigPI::SetupCms (  )  [private]
bool XrdOfsConfigPI::SetupPrp ( XrdOfs ofsP,
XrdOucEnv envP 
) [private]

Member Data Documentation

-> Authorization plugin

char* XrdOfsConfigPI::CksAlg [private]
bool XrdOfsConfigPI::cksLcl [private]

Referenced by LclCks().

-> Checksum manager plugin

int XrdOfsConfigPI::CksRdsz [private]

-> Cms client object generator plugin

const char* XrdOfsConfigPI::ConfigFN [private]
bool XrdOfsConfigPI::defLib[maxXXXLib] [private]
bool XrdOfsConfigPI::Loaded [private]
bool XrdOfsConfigPI::LoadOK [private]
struct XrdOfsConfigPI::xxxLP XrdOfsConfigPI::LP[maxXXXLib] [private]
bool XrdOfsConfigPI::ossCksio [private]

-> Oss plugin

bool XrdOfsConfigPI::ossXAttr [private]
bool XrdOfsConfigPI::prpAuth [private]

-> Prp plugin (prepare)

XrdVersionInfo* XrdOfsConfigPI::urVer [private]

-> Version information


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Sep 2020 for xrootd by  doxygen 1.6.1