Loading...
Searching...
No Matches
XrdCksWrapper.hh
Go to the documentation of this file.
#ifndef __XRDCKSWRAPPER_HH__
#define __XRDCKSWRAPPER_HH__
/******************************************************************************/
/* */
/* X r d C k s W r a p p e r . h h */
/* */
/* (c) 2021 by the Board of Trustees of the Leland Stanford, Jr., University */
/* All Rights Reserved */
/* Produced by Andrew Hanushevsky for Stanford University under contract */
/* DE-AC02-76-SFO0515 with the Department of Energy */
/* */
/* This file is part of the XRootD software suite. */
/* */
/* XRootD is free software: you can redistribute it and/or modify it under */
/* the terms of the GNU Lesser General Public License as published by the */
/* Free Software Foundation, either version 3 of the License, or (at your */
/* option) any later version. */
/* */
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
/* */
/* The copyright holder's institutional names and contributor's names may not */
/* be used to endorse or promote products derived from this software without */
/* specific prior written permission of the institution or contributor. */
/******************************************************************************/
#include "XrdCks/XrdCks.hh"
class XrdCksCalc;
class XrdCksData;
class XrdOucEnv;
class XrdOucStream;
class XrdSysError;
class XrdCksWrapper : public XrdCks
{
public:
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Calc( const char *Xfn, XrdCksData &Cks, int doSet=1)
{return cksPI.Calc(Xfn, Cks, doSet);}
virtual
int Calc( const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP, int doSet=1)
{(void)pcbP; return Calc(Xfn, Cks, doSet);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Del( const char *Xfn, XrdCksData &Cks)
{return cksPI.Del(Xfn, Cks);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Get( const char *Xfn, XrdCksData &Cks)
{return cksPI.Get(Xfn, Cks);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Config(const char *Token, char *Line)
{return cksPI.Config(Token, Line);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Init(const char *ConfigFN, const char *DfltCalc=0)
{return cksPI.Init(ConfigFN, DfltCalc);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
char *List(const char *Xfn, char *Buff, int Blen, char Sep=' ')
{return cksPI.List(Xfn, Buff, Blen, Sep);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual const
char *Name(int seqNum=0) {return cksPI.Name(seqNum);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
XrdCksCalc *Object(const char *name) {return cksPI.Object(name);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Size( const char *Name=0) {return cksPI.Size(Name);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Set( const char *Xfn, XrdCksData &Cks, int myTime=0)
{return cksPI.Set(Xfn, Cks, myTime);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual
int Ver( const char *Xfn, XrdCksData &Cks)
{return cksPI.Ver(Xfn, Cks);}
virtual
int Ver( const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP)
{(void)pcbP; return Ver(Xfn, Cks);}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
XrdCksWrapper(XrdCks &prevPI, XrdSysError *errP)
: XrdCks(errP), cksPI(prevPI) {}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
virtual ~XrdCksWrapper() {}
protected:
XrdCks &cksPI;
};
/******************************************************************************/
/* X r d C k s A d d 2 */
/******************************************************************************/
#define XRDCKSADD2PARMS XrdCks &, XrdSysError *, const char *, \
const char *, XrdOucEnv *
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
#endif
XrdCks.hh
XrdCksCalc
Definition XrdCksCalc.hh:40
XrdCksData
Definition XrdCksData.hh:38
XrdCksPCB
Definition XrdCks.hh:56
XrdCksWrapper::Size
virtual int Size(const char *Name=0)
Definition XrdCksWrapper.hh:191
XrdCksWrapper::Ver
virtual int Ver(const char *Xfn, XrdCksData &Cks)
Definition XrdCksWrapper.hh:225
XrdCksWrapper::Init
virtual int Init(const char *ConfigFN, const char *DfltCalc=0)
Definition XrdCksWrapper.hh:133
XrdCksWrapper::Object
virtual XrdCksCalc * Object(const char *name)
Definition XrdCksWrapper.hh:180
XrdCksWrapper::Calc
virtual int Calc(const char *Xfn, XrdCksData &Cks, int doSet=1)
Definition XrdCksWrapper.hh:71
XrdCksWrapper::XrdCksWrapper
XrdCksWrapper(XrdCks &prevPI, XrdSysError *errP)
Definition XrdCksWrapper.hh:239
XrdCksWrapper::Del
virtual int Del(const char *Xfn, XrdCksData &Cks)
Definition XrdCksWrapper.hh:88
XrdCksWrapper::Name
virtual const char * Name(int seqNum=0)
Definition XrdCksWrapper.hh:165
XrdCksWrapper::Set
virtual int Set(const char *Xfn, XrdCksData &Cks, int myTime=0)
Definition XrdCksWrapper.hh:206
XrdCksWrapper::Get
virtual int Get(const char *Xfn, XrdCksData &Cks)
Definition XrdCksWrapper.hh:104
XrdCksWrapper::Calc
virtual int Calc(const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP, int doSet=1)
Definition XrdCksWrapper.hh:75
XrdCksWrapper::cksPI
XrdCks & cksPI
Definition XrdCksWrapper.hh:250
XrdCksWrapper::List
virtual char * List(const char *Xfn, char *Buff, int Blen, char Sep=' ')
Definition XrdCksWrapper.hh:151
XrdCksWrapper::Ver
virtual int Ver(const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP)
Definition XrdCksWrapper.hh:229
XrdCksWrapper::~XrdCksWrapper
virtual ~XrdCksWrapper()
Destructor.
Definition XrdCksWrapper.hh:246
XrdCksWrapper::Config
virtual int Config(const char *Token, char *Line)
Definition XrdCksWrapper.hh:117
XrdCks::XrdCks
XrdCks(XrdSysError *erP)
Constructor.
Definition XrdCks.hh:272
XrdOucEnv
Definition XrdOucEnv.hh:42
XrdOucStream
Definition XrdOucStream.hh:47
XrdSysError
Definition XrdSysError.hh:90