xrootd
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
XrdCksManOss Class Reference

#include <XrdCksManOss.hh>

Inheritance diagram for XrdCksManOss:
Inheritance graph
[legend]
Collaboration diagram for XrdCksManOss:
Collaboration graph
[legend]

Public Member Functions

virtual int Calc (const char *Lfn, XrdCksData &Cks, int doSet=1)
 
virtual int Del (const char *Lfn, XrdCksData &Cks)
 
virtual int Get (const char *Lfn, XrdCksData &Cks)
 
virtual char * List (const char *Lfn, char *Buff, int Blen, char Sep=' ')
 
virtual int Set (const char *Lfn, XrdCksData &Cks, int myTime=0)
 
virtual int Ver (const char *Lfn, XrdCksData &Cks)
 
 XrdCksManOss (XrdOss *ossX, XrdSysError *erP, int iosz, XrdVersionInfo &vInfo, bool autoload=false)
 
virtual ~XrdCksManOss ()
 
- Public Member Functions inherited from XrdCksManager
virtual int Config (const char *Token, char *Line)
 
virtual int Init (const char *ConfigFN, const char *AddCalc=0)
 
virtual const char * Name (int seqNum=0)
 
virtual XrdCksCalcObject (const char *name)
 
virtual int Size (const char *Name=0)
 
 XrdCksManager (XrdSysError *erP, int iosz, XrdVersionInfo &vInfo, bool autoload=false)
 
virtual ~XrdCksManager ()
 
- Public Member Functions inherited from XrdCks
virtual int Calc (const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP, int doSet=1)
 
virtual int Ver (const char *Xfn, XrdCksData &Cks, XrdCksPCB *pcbP)
 
 XrdCks (XrdSysError *erP)
 Constructor.
 
virtual ~XrdCks ()
 Destructor.
 

Protected Member Functions

virtual int Calc (const char *Lfn, time_t &MTime, XrdCksCalc *CksObj)
 
virtual int ModTime (const char *Pfn, time_t &MTime)
 

Private Attributes

int buffSZ
 

Additional Inherited Members

- Protected Attributes inherited from XrdCks
XrdSysErroreDest
 

Constructor & Destructor Documentation

◆ XrdCksManOss()

XrdCksManOss::XrdCksManOss ( XrdOss ossX,
XrdSysError erP,
int  iosz,
XrdVersionInfo &  vInfo,
bool  autoload = false 
)

◆ ~XrdCksManOss()

virtual XrdCksManOss::~XrdCksManOss ( )
inlinevirtual

Member Function Documentation

◆ Calc() [1/2]

virtual int XrdCksManOss::Calc ( const char *  Lfn,
time_t &  MTime,
XrdCksCalc CksObj 
)
protectedvirtual

Reimplemented from XrdCksManager.

◆ Calc() [2/2]

virtual int XrdCksManOss::Calc ( const char *  Xfn,
XrdCksData Cks,
int  doSet = 1 
)
virtual

Calculate a new checksum for a physical file using the checksum algorithm named in the Cks parameter.

Parameters
XfnThe logical or physical name of the file to be checksumed.
CksFor input, it specifies the checksum algorithm to be used. For output, the checksum value is returned upon success.
doSetWhen true, the new value must replace any existing value in the Xfn's extended file attributes.
pcbPIn the second form, the pointer to the callback object. A nil pointer does not invoke any callback.
Returns
Success: zero with Cks structure holding the checksum value. Failure: -errno (see significant error numbers below).

Reimplemented from XrdCksManager.

◆ Del()

virtual int XrdCksManOss::Del ( const char *  Xfn,
XrdCksData Cks 
)
virtual

Delete the checksum from the Xfn's xattrs.

Parameters
XfnThe logical or physical name of the file to be checksumed.
CksSpecifies the checksum type to delete.
Returns
Success: 0 Failure: -errno (see significant error numbers below).

Reimplemented from XrdCksManager.

◆ Get()

virtual int XrdCksManOss::Get ( const char *  Xfn,
XrdCksData Cks 
)
virtual

Retreive the checksum from the Xfn's xattrs and return it and indicate whether or not it is stale (i.e. the file modification has changed or the name and length are not the expected values).

Parameters
XfnThe logical or physical name of the file to be checksumed.
CksFor input, it specifies the checksum type to return. For output, the checksum value is returned upon success.
Returns
Success: The length of the binary checksum in the Cks structure. Failure: -errno (see significant error numbers below).

Reimplemented from XrdCksManager.

◆ List()

virtual char * XrdCksManOss::List ( const char *  Xfn,
char *  Buff,
int  Blen,
char  Sep = ' ' 
)
virtual

List names of the checksums associated with a Xfn or all supported ones.

Parameters
XfnThe logical or physical file name whose checksum names are to be returned. When Xfn is null, return all supported checksum algorithm names.
BuffPoints to a buffer, at least 64 bytes in length, to hold a "Sep" separated list of checksum names.
BlenThe length of the buffer.
SepThe separation character to be used between adjacent names.
Returns
Success: Pointer to Buff holding at least one checksum name. Failure: A nil pointer is returned.

Reimplemented from XrdCksManager.

◆ ModTime()

virtual int XrdCksManOss::ModTime ( const char *  Pfn,
time_t &  MTime 
)
protectedvirtual

Reimplemented from XrdCksManager.

◆ Set()

virtual int XrdCksManOss::Set ( const char *  Xfn,
XrdCksData Cks,
int  myTime = 0 
)
virtual

Set a file's checksum in the extended attributes along with the file's mtime and the time of setting.

Parameters
XfnThe logical or physical name of the file to be set.
CksSpecifies the checksum name and value.
myTimeWhen true then the fmTime and gmTime in the Cks structure are to be used; as opposed to the current time.
Returns
Success: zero is returned. Failure: -errno (see significant error numbers below).

Reimplemented from XrdCksManager.

◆ Ver()

virtual int XrdCksManOss::Ver ( const char *  Xfn,
XrdCksData Cks 
)
virtual

Retreive the checksum from the Xfn's xattrs and compare it to the supplied checksum. If the checksum is not available or is stale, a new checksum is calculated and written to the extended attributes.

Parameters
XfnThe logical or physical name of the file to be verified.
CksSpecifies the checksum name and value.
pcbPIn the second form, the pointer to the callback object. A nil pointer does not invoke any callback.
Returns
Success: True Failure: False (the checksums do not match) or -errno indicating that verification could not be performed (see significant error numbers below).

Reimplemented from XrdCksManager.

Member Data Documentation

◆ buffSZ

int XrdCksManOss::buffSZ
private

The documentation for this class was generated from the following file: