xrootd
XrdOfsConfigPI.hh
Go to the documentation of this file.
1#ifndef __XRDOFSCONFIGPI_HH__
2#define __XRDOFSCONFIGPI_HH__
3/******************************************************************************/
4/* */
5/* X r d O f s C o n f i g P I . h h */
6/* */
7/* (c) 2014 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
34
35class XrdAccAuthorize;
36class XrdCks;
37class XrdCksConfig;
38class XrdOfs;
39class XrdOfsPrepare;
40class XrdOss;
41class XrdOucEnv;
42class XrdOucStream;
43class XrdSysError;
44struct XrdVersionInfo;
45
46//-----------------------------------------------------------------------------
53//-----------------------------------------------------------------------------
54
56{
57public:
58
59//-----------------------------------------------------------------------------
62//-----------------------------------------------------------------------------
63
64enum TheLib {theAtrLib = 0x0100,
65 theAutLib = 0x0201,
66 theCksLib = 0x0402,
67 theCmsLib = 0x0803,
68 theOssLib = 0x1004,
69 thePrpLib = 0x2005,
70 allXXXLib = 0x3f06,
71 maxXXXLib = 0x0006,
72 libIXMask = 0x00ff
73 };
74
75//-----------------------------------------------------------------------------
83//-----------------------------------------------------------------------------
84
85bool Configure(XrdCmsClient *cmscP, XrdOucEnv *envP);
86
87//-----------------------------------------------------------------------------
94//-----------------------------------------------------------------------------
95
96void Default(TheLib what, const char *lpath, const char *lparm=0);
97
98//-----------------------------------------------------------------------------
103//-----------------------------------------------------------------------------
104
105void DefaultCS(const char *alg);
106
107//-----------------------------------------------------------------------------
109//-----------------------------------------------------------------------------
110
111void Display();
112
113//-----------------------------------------------------------------------------
123//-----------------------------------------------------------------------------
124
125bool Load(int what, XrdOfs *ofsP=0, XrdOucEnv *envP=0);
126
127//-----------------------------------------------------------------------------
141//-----------------------------------------------------------------------------
142
143static
144XrdOfsConfigPI *New(const char *cfn, XrdOucStream *cfgP, XrdSysError *errP,
145 XrdVersionInfo *verP=0);
146
147//-----------------------------------------------------------------------------
151//-----------------------------------------------------------------------------
152
153bool LclCks() {return cksLcl;}
154
155//-----------------------------------------------------------------------------
159//-----------------------------------------------------------------------------
160
161bool OssCks();
162
163//-----------------------------------------------------------------------------
168//-----------------------------------------------------------------------------
169
170bool Parse(TheLib what);
171
172//-----------------------------------------------------------------------------
179//-----------------------------------------------------------------------------
180
182bool Plugin(XrdCks *&pip);
185bool Plugin(XrdOss *&piP);
186
187//-----------------------------------------------------------------------------
191//-----------------------------------------------------------------------------
192
193bool PrepAuth();
194
195//-----------------------------------------------------------------------------
199//-----------------------------------------------------------------------------
200
201void SetCksRdSz(int rdsz);
202
203//-----------------------------------------------------------------------------
205//-----------------------------------------------------------------------------
206
208
209private:
210
211//-----------------------------------------------------------------------------
221//-----------------------------------------------------------------------------
222
223 XrdOfsConfigPI(const char *cfn, XrdOucStream *cfgP, XrdSysError *errP,
224 XrdVersionInfo *verP=0);
225
229bool RepLib(TheLib what, const char *newLib, const char *newParms=0, bool parseParms=true);
230bool SetupAttr(TheLib what);
232bool SetupCms();
233bool SetupPrp(XrdOfs *ofsP, XrdOucEnv *envP);
234
240XrdVersionInfo *urVer;
241
245const char *ConfigFN;
246
247struct xxxLP
248 {char *lib;
249 char *parms;
250 char *opts;
251 xxxLP() : lib(0), parms(0), opts(0) {}
252 ~xxxLP() {if (lib) free(lib);
253 if (parms) free(parms);
254 if (opts) free(opts);
255 }
257char *CksAlg;
266};
267#endif
XrdCmsClient *(* XrdCmsClient_t)(XrdSysLogger *, int, int, XrdOss *)
Definition: XrdCmsClient.hh:413
Definition: XrdAccAuthorize.hh:65
Definition: XrdCksConfig.hh:43
Definition: XrdCks.hh:49
Definition: XrdCmsClient.hh:116
Definition: XrdOfsConfigPI.hh:56
bool Plugin(XrdOfsPrepare *&piP)
Get Prp plugin (prepare)
XrdOss * ossPI
-> Oss plugin
Definition: XrdOfsConfigPI.hh:239
XrdOfsConfigPI(const char *cfn, XrdOucStream *cfgP, XrdSysError *errP, XrdVersionInfo *verP=0)
XrdCksConfig * CksConfig
Definition: XrdOfsConfigPI.hh:244
XrdVersionInfo * urVer
-> Version information
Definition: XrdOfsConfigPI.hh:240
bool Parse(TheLib what)
void Default(TheLib what, const char *lpath, const char *lparm=0)
bool ParsePrpLib()
bool ossXAttr
Definition: XrdOfsConfigPI.hh:260
bool ossCksio
Definition: XrdOfsConfigPI.hh:261
bool Loaded
Definition: XrdOfsConfigPI.hh:263
void SetCksRdSz(int rdsz)
bool ParseAtrLib()
bool Plugin(XrdAccAuthorize *&piP)
Get Authorization plugin.
bool prpAuth
Definition: XrdOfsConfigPI.hh:262
static XrdOfsConfigPI * New(const char *cfn, XrdOucStream *cfgP, XrdSysError *errP, XrdVersionInfo *verP=0)
bool SetupAttr(TheLib what)
int CksRdsz
Definition: XrdOfsConfigPI.hh:258
bool RepLib(TheLib what, const char *newLib, const char *newParms=0, bool parseParms=true)
struct XrdOfsConfigPI::xxxLP LP[maxXXXLib]
bool LclCks()
Definition: XrdOfsConfigPI.hh:153
~XrdOfsConfigPI()
Destructor.
bool ParseOssLib()
const char * ConfigFN
Definition: XrdOfsConfigPI.hh:245
XrdCks * cksPI
-> Checksum manager plugin
Definition: XrdOfsConfigPI.hh:236
void DefaultCS(const char *alg)
bool Plugin(XrdCmsClient_t &piP)
Get Cms client object generator.
XrdSysError * Eroute
Definition: XrdOfsConfigPI.hh:243
bool LoadOK
Definition: XrdOfsConfigPI.hh:264
bool defLib[maxXXXLib]
Definition: XrdOfsConfigPI.hh:259
bool Plugin(XrdCks *&pip)
Get Checksum manager plugin.
bool SetupPrp(XrdOfs *ofsP, XrdOucEnv *envP)
bool Plugin(XrdOss *&piP)
Get Oss plugin.
XrdOfsPrepare * prpPI
-> Prp plugin (prepare)
Definition: XrdOfsConfigPI.hh:238
bool cksLcl
Definition: XrdOfsConfigPI.hh:265
XrdCmsClient_t cmsPI
-> Cms client object generator plugin
Definition: XrdOfsConfigPI.hh:237
char * CksAlg
Definition: XrdOfsConfigPI.hh:257
XrdOucStream * Config
Definition: XrdOfsConfigPI.hh:242
bool Configure(XrdCmsClient *cmscP, XrdOucEnv *envP)
XrdAccAuthorize * autPI
-> Authorization plugin
Definition: XrdOfsConfigPI.hh:235
TheLib
Definition: XrdOfsConfigPI.hh:64
@ theOssLib
Oss plugin.
Definition: XrdOfsConfigPI.hh:68
@ allXXXLib
All plugins (Load() only)
Definition: XrdOfsConfigPI.hh:70
@ maxXXXLib
Maximum different plugins.
Definition: XrdOfsConfigPI.hh:71
@ libIXMask
Definition: XrdOfsConfigPI.hh:72
@ theCksLib
Checksum manager plugin.
Definition: XrdOfsConfigPI.hh:66
@ thePrpLib
Prp plugin (prepare)
Definition: XrdOfsConfigPI.hh:69
@ theCmsLib
Cms client plugin.
Definition: XrdOfsConfigPI.hh:67
@ theAtrLib
Extended attribute plugin.
Definition: XrdOfsConfigPI.hh:64
@ theAutLib
Authorization plugin.
Definition: XrdOfsConfigPI.hh:65
bool Load(int what, XrdOfs *ofsP=0, XrdOucEnv *envP=0)
void Display()
Display configuration settings.
Definition: XrdOfsPrepare.hh:47
Definition: XrdOfs.hh:186
Definition: XrdOss.hh:174
Definition: XrdOucEnv.hh:42
Definition: XrdOucStream.hh:46
Definition: XrdSysError.hh:90
Definition: XrdOfsConfigPI.hh:248
char * parms
Definition: XrdOfsConfigPI.hh:249
char * lib
Definition: XrdOfsConfigPI.hh:248
xxxLP()
Definition: XrdOfsConfigPI.hh:251
char * opts
Definition: XrdOfsConfigPI.hh:250
~xxxLP()
Definition: XrdOfsConfigPI.hh:252