xrootd
Loading...
Searching...
No Matches
XrdPssCks.hh
Go to the documentation of this file.
1#ifndef __XRDPSSCKS_HH__
2#define __XRDPSSCKS_HH__
3/******************************************************************************/
4/* */
5/* X r d P s s C k s . h h */
6/* */
7/* (c) 2011 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 <cerrno>
34
35#include "XrdCks/XrdCks.hh"
36#include "XrdCks/XrdCksData.hh"
37
38class XrdSysError;
39
40class XrdPssCks : public XrdCks
41{
42public:
43
44virtual int Calc( const char *Pfn, XrdCksData &Cks, int doSet=1)
45 {return Get(Pfn, Cks);}
46
47virtual int Del( const char *Pfn, XrdCksData &Cks)
48 {return -ENOTSUP;}
49
50virtual int Get( const char *Pfn, XrdCksData &Cks);
51
52virtual int Config(const char *Token, char *Line) {return 1;}
53
54virtual int Init(const char *ConfigFN, const char *DfltCalc=0);
55
56virtual char *List(const char *Pfn, char *Buff, int Blen, char Sep=' ')
57 {return 0;}
58
59virtual const char *Name(int seqNum=0);
60
61virtual int Size( const char *Name=0);
62
63virtual int Set( const char *Pfn, XrdCksData &Cks, int myTime=0)
64 {return -ENOTSUP;}
65
66virtual int Ver( const char *Pfn, XrdCksData &Cks);
67
69virtual ~XrdPssCks() {}
70
71private:
72
73struct csInfo
75 int Len;
76 csInfo() : Len(0) {memset(Name, 0, sizeof(Name));}
77 };
78
79csInfo *Find(const char *Name);
80
81static const int csMax = 4;
84};
85#endif
Definition XrdCksData.hh:38
static const int NameSize
Definition XrdCksData.hh:41
Definition XrdCks.hh:92
Definition XrdPssCks.hh:41
virtual int Size(const char *Name=0)
virtual int Config(const char *Token, char *Line)
Definition XrdPssCks.hh:52
static const int csMax
Definition XrdPssCks.hh:81
virtual ~XrdPssCks()
Definition XrdPssCks.hh:69
virtual int Get(const char *Pfn, XrdCksData &Cks)
virtual int Del(const char *Pfn, XrdCksData &Cks)
Definition XrdPssCks.hh:47
int csLast
Definition XrdPssCks.hh:83
csInfo * Find(const char *Name)
virtual int Set(const char *Pfn, XrdCksData &Cks, int myTime=0)
Definition XrdPssCks.hh:63
XrdPssCks(XrdSysError *erP)
virtual const char * Name(int seqNum=0)
virtual char * List(const char *Pfn, char *Buff, int Blen, char Sep=' ')
Definition XrdPssCks.hh:56
virtual int Init(const char *ConfigFN, const char *DfltCalc=0)
virtual int Ver(const char *Pfn, XrdCksData &Cks)
csInfo csTab[csMax]
Definition XrdPssCks.hh:82
virtual int Calc(const char *Pfn, XrdCksData &Cks, int doSet=1)
Definition XrdPssCks.hh:44
Definition XrdSysError.hh:90
Definition XrdPssCks.hh:74
char Name[XrdCksData::NameSize]
Definition XrdPssCks.hh:74
int Len
Definition XrdPssCks.hh:75
csInfo()
Definition XrdPssCks.hh:76