xrootd
XrdPssCks.hh
Go to the documentation of this file.
00001 #ifndef __XRDPSSCKS_HH__
00002 #define __XRDPSSCKS_HH__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                          X r d P s s C k s . h h                           */
00006 /*                                                                            */
00007 /* (c) 2011 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 #include <errno.h>
00014 
00015 #include "XrdCks/XrdCks.hh"
00016 #include "XrdCks/XrdCksData.hh"
00017 
00018 class XrdSysError;
00019 
00020 class XrdPssCks : public XrdCks
00021 {
00022 public:
00023 
00024 virtual int         Calc( const char *Pfn, XrdCksData &Cks, int doSet=1)
00025                         {return Get(Pfn, Cks);}
00026 
00027 virtual int         Del(  const char *Pfn, XrdCksData &Cks)
00028                        {return -ENOTSUP;}
00029 
00030 virtual int         Get(  const char *Pfn, XrdCksData &Cks);
00031 
00032 virtual int         Config(const char *Token, char *Line) {return 1;}
00033 
00034 virtual int         Init(const char *ConfigFN, const char *DfltCalc=0);
00035 
00036 virtual char       *List(const char *Pfn, char *Buff, int Blen, char Sep=' ')
00037                         {return 0;}
00038 
00039 virtual const char *Name(int seqNum=0);
00040 
00041 virtual int         Size( const char  *Name=0);
00042 
00043 virtual int         Set(  const char *Pfn, XrdCksData &Cks, int myTime=0)
00044                        {return -ENOTSUP;}
00045 
00046 virtual int         Ver(  const char *Pfn, XrdCksData &Cks);
00047 
00048            XrdPssCks(XrdSysError *erP);
00049 virtual   ~XrdPssCks() {}
00050 
00051 private:
00052 
00053 struct csInfo
00054       {char          Name[XrdCksData::NameSize];
00055        int           Len;
00056                      csInfo() : Len(0) {memset(Name, 0, sizeof(Name));}
00057       };
00058 
00059 csInfo *Find(const char *Name);
00060 
00061 static const int csMax = 4;
00062 csInfo           csTab[csMax];
00063 int              csLast;
00064 };
00065 #endif