xrootd
XrdCksWrapper.hh
Go to the documentation of this file.
1 #ifndef __XRDCKSWRAPPER_HH__
2 #define __XRDCKSWRAPPER_HH__
3 /******************************************************************************/
4 /* */
5 /* X r d C k s W r a p p e r . h h */
6 /* */
7 /* (c) 2021 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 
33 #include "XrdCks/XrdCks.hh"
34 
35 class XrdCksCalc;
36 class XrdCksData;
37 class XrdOucEnv;
38 class XrdOucStream;
39 class XrdSysError;
40 
51 class XrdCksWrapper : public XrdCks
52 {
53 public:
54 
55 //------------------------------------------------------------------------------
69 //------------------------------------------------------------------------------
70 virtual
71 int Calc( const char *Xfn, XrdCksData &Cks, int doSet=1)
72  {return cksPI.Calc(Xfn, Cks, doSet);}
73 
74 virtual
75 int Calc( const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP, int doSet=1)
76  {(void)pcbP; return Calc(Xfn, Cks, doSet);}
77 
78 //------------------------------------------------------------------------------
86 //------------------------------------------------------------------------------
87 virtual
88 int Del( const char *Xfn, XrdCksData &Cks)
89  {return cksPI.Del(Xfn, Cks);}
90 
91 //------------------------------------------------------------------------------
102 //------------------------------------------------------------------------------
103 virtual
104 int Get( const char *Xfn, XrdCksData &Cks)
105  {return cksPI.Get(Xfn, Cks);}
106 
107 //------------------------------------------------------------------------------
115 //------------------------------------------------------------------------------
116 virtual
117 int Config(const char *Token, char *Line)
118  {return cksPI.Config(Token, Line);}
119 
120 //------------------------------------------------------------------------------
131 //------------------------------------------------------------------------------
132 virtual
133 int Init(const char *ConfigFN, const char *DfltCalc=0)
134  {return cksPI.Init(ConfigFN, DfltCalc);}
135 
136 //------------------------------------------------------------------------------
149 //------------------------------------------------------------------------------
150 virtual
151 char *List(const char *Xfn, char *Buff, int Blen, char Sep=' ')
152  {return cksPI.List(Xfn, Buff, Blen, Sep);}
153 
154 //------------------------------------------------------------------------------
163 //------------------------------------------------------------------------------
164 virtual const
165 char *Name(int seqNum=0) {return cksPI.Name(seqNum);}
166 
167 //------------------------------------------------------------------------------
178 //------------------------------------------------------------------------------
179 virtual
180 XrdCksCalc *Object(const char *name) {return cksPI.Object(name);}
181 
182 //------------------------------------------------------------------------------
189 //------------------------------------------------------------------------------
190 virtual
191 int Size( const char *Name=0) {return cksPI.Size(Name);}
192 
193 //------------------------------------------------------------------------------
204 //------------------------------------------------------------------------------
205 virtual
206 int Set( const char *Xfn, XrdCksData &Cks, int myTime=0)
207  {return cksPI.Set(Xfn, Cks, myTime);}
208 
209 //------------------------------------------------------------------------------
223 //------------------------------------------------------------------------------
224 virtual
225 int Ver( const char *Xfn, XrdCksData &Cks)
226  {return cksPI.Ver(Xfn, Cks);}
227 
228 virtual
229 int Ver( const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP)
230  {(void)pcbP; return Ver(Xfn, Cks);}
231 
232 //------------------------------------------------------------------------------
237 //------------------------------------------------------------------------------
238 
240  : XrdCks(errP), cksPI(prevPI) {}
241 
242 //------------------------------------------------------------------------------
244 //------------------------------------------------------------------------------
245 
246 virtual ~XrdCksWrapper() {}
247 
248 protected:
249 
251 };
252 
253 /******************************************************************************/
254 /* X r d C k s A d d 2 */
255 /******************************************************************************/
256 
257 #define XRDCKSADD2PARMS XrdCks &, XrdSysError *, const char *, \
258  const char *, XrdOucEnv *
259 
260 //------------------------------------------------------------------------------
279 //------------------------------------------------------------------------------
280 
288 //------------------------------------------------------------------------------
294 //------------------------------------------------------------------------------
295 
301 #endif
virtual const char * Name(int seqNum=0)=0
Definition: XrdCks.hh:91
XrdCksWrapper(XrdCks &prevPI, XrdSysError *errP)
Definition: XrdCksWrapper.hh:239
virtual int Ver(const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP)
Definition: XrdCksWrapper.hh:229
Definition: XrdOucStream.hh:46
virtual int Size(const char *Name=0)
Definition: XrdCksWrapper.hh:191
virtual int Config(const char *Token, char *Line)=0
Definition: XrdCksData.hh:37
Definition: XrdCksWrapper.hh:51
virtual int Ver(const char *Xfn, XrdCksData &Cks)=0
Definition: XrdSysError.hh:89
virtual char * List(const char *Xfn, char *Buff, int Blen, char Sep=' ')=0
virtual int Get(const char *Xfn, XrdCksData &Cks)
Definition: XrdCksWrapper.hh:104
virtual const char * Name(int seqNum=0)
Definition: XrdCksWrapper.hh:165
virtual int Get(const char *Xfn, XrdCksData &Cks)=0
virtual int Calc(const char *Xfn, XrdCksData &Cks, int doSet=1)=0
virtual int Init(const char *ConfigFN, const char *DfltCalc=0)
Definition: XrdCksWrapper.hh:133
Definition: XrdCksCalc.hh:39
XrdCks & cksPI
Definition: XrdCksWrapper.hh:250
virtual int Init(const char *ConfigFN, const char *DfltCalc=0)=0
Definition: XrdOucEnv.hh:41
virtual int Ver(const char *Xfn, XrdCksData &Cks)
Definition: XrdCksWrapper.hh:225
virtual int Set(const char *Xfn, XrdCksData &Cks, int myTime=0)
Definition: XrdCksWrapper.hh:206
virtual XrdCksCalc * Object(const char *name)
Definition: XrdCksWrapper.hh:180
virtual int Calc(const char *Xfn, XrdCksData &Cks, int doSet=1)
Definition: XrdCksWrapper.hh:71
Definition: XrdCks.hh:55
virtual int Calc(const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP, int doSet=1)
Definition: XrdCksWrapper.hh:75
virtual int Size(const char *Name=0)=0
virtual char * List(const char *Xfn, char *Buff, int Blen, char Sep=' ')
Definition: XrdCksWrapper.hh:151
virtual int Set(const char *Xfn, XrdCksData &Cks, int myTime=0)=0
virtual ~XrdCksWrapper()
Destructor.
Definition: XrdCksWrapper.hh:246
virtual int Config(const char *Token, char *Line)
Definition: XrdCksWrapper.hh:117
virtual int Del(const char *Xfn, XrdCksData &Cks)=0
virtual int Del(const char *Xfn, XrdCksData &Cks)
Definition: XrdCksWrapper.hh:88
virtual XrdCksCalc * Object(const char *name)
Definition: XrdCks.hh:214