xrootd
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 
13 #include <errno.h>
14 
15 #include "XrdCks/XrdCks.hh"
16 #include "XrdCks/XrdCksData.hh"
17 
18 class XrdSysError;
19 
20 class XrdPssCks : public XrdCks
21 {
22 public:
23 
24 virtual int Calc( const char *Pfn, XrdCksData &Cks, int doSet=1)
25  {return Get(Pfn, Cks);}
26 
27 virtual int Del( const char *Pfn, XrdCksData &Cks)
28  {return -ENOTSUP;}
29 
30 virtual int Get( const char *Pfn, XrdCksData &Cks);
31 
32 virtual int Config(const char *Token, char *Line) {return 1;}
33 
34 virtual int Init(const char *ConfigFN, const char *DfltCalc=0);
35 
36 virtual char *List(const char *Pfn, char *Buff, int Blen, char Sep=' ')
37  {return 0;}
38 
39 virtual const char *Name(int seqNum=0);
40 
41 virtual int Size( const char *Name=0);
42 
43 virtual int Set( const char *Pfn, XrdCksData &Cks, int myTime=0)
44  {return -ENOTSUP;}
45 
46 virtual int Ver( const char *Pfn, XrdCksData &Cks);
47 
48  XrdPssCks(XrdSysError *erP);
49 virtual ~XrdPssCks() {}
50 
51 private:
52 
53 struct csInfo
55  int Len;
56  csInfo() : Len(0) {memset(Name, 0, sizeof(Name));}
57  };
58 
59 csInfo *Find(const char *Name);
60 
61 static const int csMax = 4;
63 int csLast;
64 };
65 #endif