xrootd
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdOfsConfigPI Class Reference

#include <XrdOfsConfigPI.hh>

Collaboration diagram for XrdOfsConfigPI:
Collaboration graph
[legend]

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 XrdOfsConfigPINew (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

XrdAccAuthorizeautPI
 -> Authorization plugin
 
XrdCkscksPI
 -> Checksum manager plugin
 
XrdCmsClient_t cmsPI
 -> Cms client object generator plugin
 
XrdOfsFSctl_PIctlPI
 -> Ctl plugin (FSCtl)
 
XrdOfsPrepareprpPI
 -> Prp plugin (prepare)
 
XrdOssossPI
 -> Oss plugin
 
XrdSfsFileSystemsfsPI
 -> Ofs plugin
 
XrdVersionInfo * urVer
 -> Version information
 
XrdOucStreamConfig
 
XrdSysErrorEroute
 
XrdCksConfigCksConfig
 
const char * ConfigFN
 
struct XrdOfsConfigPI::xxxLP LP [maxXXXLib]
 
std::vector< xxxLPALP [maxXXXLib]
 
std::vector< ctlLPctlVec
 
char * CksAlg
 
int CksRdsz
 
bool pushOK [maxXXXLib]
 
bool defLib [maxXXXLib]
 
bool ossXAttr
 
char 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

◆ TheLib

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 

Constructor & Destructor Documentation

◆ ~XrdOfsConfigPI()

XrdOfsConfigPI::~XrdOfsConfigPI ( )

Destructor.

◆ XrdOfsConfigPI()

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

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

Parameters
cfnPointer to the configuration file name.
cfgPPointer to the stream that reads the configuration file.
errPPointer to the error message object that routes messages.
sfsPPointer to the file system plugin (i.e. caller).
verPPointer 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

◆ AddLib()

bool XrdOfsConfigPI::AddLib ( TheLib  what)
private

◆ AddLibAtr()

bool XrdOfsConfigPI::AddLibAtr ( XrdOucEnv envP,
XrdSysXAttr *&  atrPI 
)
private

◆ AddLibAut()

bool XrdOfsConfigPI::AddLibAut ( XrdOucEnv envP)
private

◆ AddLibCtl()

bool XrdOfsConfigPI::AddLibCtl ( XrdOucEnv envP)
private

◆ AddLibOss()

bool XrdOfsConfigPI::AddLibOss ( XrdOucEnv envP)
private

◆ AddLibPrp()

bool XrdOfsConfigPI::AddLibPrp ( XrdOucEnv envP)
private

◆ ConfigCtl()

bool XrdOfsConfigPI::ConfigCtl ( XrdCmsClient cmscP,
XrdOucEnv envP = 0 
)

Configure the fsctl plugin.

Parameters
cmscPPointer to the cms plugin.
envPPointer to the environment.

◆ Configure()

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

Configure the cms client.

Parameters
cmscPPointer to the cms client instance.
envPPointer to the environment normally passed to the cms client istance.
Returns
true upon success and false upon failure.

◆ Default()

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
whatThe enum that specified which plugin is being set.
lpathThe plugin library path
lparmThe plugin parameters (0 if none)

◆ DefaultCS()

void XrdOfsConfigPI::DefaultCS ( const char *  alg)

Set the default checksum algorithm. This method must be called before Load() is called.

Parameters
algPointer to the default algorithm name, it is duplicated.

◆ Display()

void XrdOfsConfigPI::Display ( )

Display configuration settings.

◆ LclCks()

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.

◆ Load()

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

Load required plugins. This is a one time call!

Parameters
whatA "or" combination of TheLib enums specifying which plugins need to be loaded.
envPPointer to the environment normally passed to the default oss plugin at load time.
Returns
true upon success and false upon failure.

◆ New()

static XrdOfsConfigPI * XrdOfsConfigPI::New ( const char *  cfn,
XrdOucStream cfgP,
XrdSysError errP,
XrdVersionInfo *  verP = 0,
XrdSfsFileSystem sfsP = 0 
)
static

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

Parameters
cfnPointer to the configuration file name.
cfgPPointer to the stream that reads the configuration file.
errPPointer to the error message object that routes messages.
verPPointer 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.
sfsPPointer to file system doing the loading, if applicable.
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).

◆ OssCks()

bool XrdOfsConfigPI::OssCks ( )

Check if the checksum plugin uses the oss plugin.

Returns
True if the plugin uses the oss plugin, false otherwise.

◆ Parse()

bool XrdOfsConfigPI::Parse ( TheLib  what)

Parse a plugin directive.

Parameters
whatThe enum specifying which plugin directive to parse.
Returns
true upon success and false upon failure.

◆ ParseAtrLib()

bool XrdOfsConfigPI::ParseAtrLib ( )
private

◆ ParseOssLib()

bool XrdOfsConfigPI::ParseOssLib ( )
private

◆ ParsePrpLib()

bool XrdOfsConfigPI::ParsePrpLib ( )
private

◆ Plugin() [1/6]

bool XrdOfsConfigPI::Plugin ( XrdAccAuthorize *&  piP)

Get Authorization plugin.

Obtain a pointer to a plugin handled by this class.

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

◆ Plugin() [2/6]

bool XrdOfsConfigPI::Plugin ( XrdCks *&  pip)

Get Checksum manager plugin.

◆ Plugin() [3/6]

bool XrdOfsConfigPI::Plugin ( XrdCmsClient_t piP)

Get Cms client object generator.

◆ Plugin() [4/6]

bool XrdOfsConfigPI::Plugin ( XrdOfsFSctl_PI *&  piP)

Get Ctl plugin.

◆ Plugin() [5/6]

bool XrdOfsConfigPI::Plugin ( XrdOfsPrepare *&  piP)

Get Prp plugin (prepare)

◆ Plugin() [6/6]

bool XrdOfsConfigPI::Plugin ( XrdOss *&  piP)

Get Oss plugin.

◆ PrepAuth()

bool XrdOfsConfigPI::PrepAuth ( )

Check if the prepare plugin wants authorization.

Returns
True if the plugin wants authorization, false otherwise.

◆ Push()

bool XrdOfsConfigPI::Push ( TheLib  what,
const char *  plugP,
const char *  parmP = 0 
)

Push a plugin on top of eixsting plugins to be loaded.

Parameters
whatThe enum specifying which plugin to push.
plugPPointer to the name or path of the shared library
parmPPointer to library parameters, if any.
Returns
True upon success, false if plugin is not pushable.

◆ RepLib()

bool XrdOfsConfigPI::RepLib ( TheLib  what,
const char *  newLib,
const char *  newParms = 0,
bool  parseParms = true 
)
private

◆ SetCksRdSz()

void XrdOfsConfigPI::SetCksRdSz ( int  rdsz)

Set the checksum read size

Parameters
rdszThe chesum read size buffer.

◆ SetupAttr()

bool XrdOfsConfigPI::SetupAttr ( TheLib  what,
XrdOucEnv envP 
)
private

◆ SetupAuth()

bool XrdOfsConfigPI::SetupAuth ( XrdOucEnv envP)
private

◆ SetupCms()

bool XrdOfsConfigPI::SetupCms ( )
private

◆ SetupCtl()

bool XrdOfsConfigPI::SetupCtl ( XrdOucEnv envP)
private

◆ SetupPrp()

bool XrdOfsConfigPI::SetupPrp ( XrdOucEnv envP)
private

Member Data Documentation

◆ ALP

std::vector<xxxLP> XrdOfsConfigPI::ALP[maxXXXLib]
private

◆ autPI

XrdAccAuthorize* XrdOfsConfigPI::autPI
private

-> Authorization plugin

◆ CksAlg

char* XrdOfsConfigPI::CksAlg
private

◆ CksConfig

XrdCksConfig* XrdOfsConfigPI::CksConfig
private

◆ cksLcl

bool XrdOfsConfigPI::cksLcl
private

Referenced by LclCks().

◆ cksPI

XrdCks* XrdOfsConfigPI::cksPI
private

-> Checksum manager plugin

◆ CksRdsz

int XrdOfsConfigPI::CksRdsz
private

◆ cmsPI

XrdCmsClient_t XrdOfsConfigPI::cmsPI
private

-> Cms client object generator plugin

◆ Config

XrdOucStream* XrdOfsConfigPI::Config
private

◆ ConfigFN

const char* XrdOfsConfigPI::ConfigFN
private

◆ ctlPI

XrdOfsFSctl_PI* XrdOfsConfigPI::ctlPI
private

-> Ctl plugin (FSCtl)

◆ ctlVec

std::vector<ctlLP> XrdOfsConfigPI::ctlVec
private

◆ defLib

bool XrdOfsConfigPI::defLib[maxXXXLib]
private

◆ Eroute

XrdSysError* XrdOfsConfigPI::Eroute
private

◆ Loaded

bool XrdOfsConfigPI::Loaded
private

◆ LoadOK

bool XrdOfsConfigPI::LoadOK
private

◆ LP

struct XrdOfsConfigPI::xxxLP XrdOfsConfigPI::LP[maxXXXLib]
private

◆ ossCksio

char XrdOfsConfigPI::ossCksio
private

◆ ossPI

XrdOss* XrdOfsConfigPI::ossPI
private

-> Oss plugin

◆ ossXAttr

bool XrdOfsConfigPI::ossXAttr
private

◆ prpAuth

bool XrdOfsConfigPI::prpAuth
private

◆ prpPI

XrdOfsPrepare* XrdOfsConfigPI::prpPI
private

-> Prp plugin (prepare)

◆ pushOK

bool XrdOfsConfigPI::pushOK[maxXXXLib]
private

◆ sfsPI

XrdSfsFileSystem* XrdOfsConfigPI::sfsPI
private

-> Ofs plugin

◆ urVer

XrdVersionInfo* XrdOfsConfigPI::urVer
private

-> Version information


The documentation for this class was generated from the following file: