xrootd
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Attributes | List of all members
XrdSysXAttr Class Referenceabstract

#include <XrdSysXAttr.hh>

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

Classes

struct  AList
 

Public Member Functions

virtual int Copy (const char *iPath, int iFD, const char *oPath, int oFD, const char *Aname=0)
 
virtual int Del (const char *Aname, const char *Path, int fd=-1)=0
 
virtual void Free (AList *aPL)=0
 
virtual int Get (const char *Aname, void *Aval, int Avsz, const char *Path, int fd=-1)=0
 
virtual int List (AList **aPL, const char *Path, int fd=-1, int getSz=0)=0
 
virtual int Set (const char *Aname, const void *Aval, int Avsz, const char *Path, int fd=-1, int isNew=0)=0
 
virtual XrdSysErrorSetMsgRoute (XrdSysError *errP)
 
 XrdSysXAttr ()
 Constructor and Destructor.
 
virtual ~XrdSysXAttr ()
 

Protected Attributes

XrdSysErrorSay
 

Constructor & Destructor Documentation

◆ XrdSysXAttr()

XrdSysXAttr::XrdSysXAttr ( )
inline

Constructor and Destructor.

◆ ~XrdSysXAttr()

virtual XrdSysXAttr::~XrdSysXAttr ( )
inlinevirtual

Member Function Documentation

◆ Copy()

virtual int XrdSysXAttr::Copy ( const char *  iPath,
int  iFD,
const char *  oPath,
int  oFD,
const char *  Aname = 0 
)
virtual

Copy one or all extended attributes from one file to another (a default implementation is supplied).

Parameters
iPath-> Path of the file whose attribute(s) are to be copied.
iFDIf >=0 is the file descriptor of the opened source file.
oPath-> Path of the file to receive the extended attribute(s). Duplicate attributes are replaced.
oFDIf >=0 is the file descriptor of the opened target file.
Aname-> if nil, the all of the attributes of the source file are copied. Otherwise, only the attribute name pointed to by Aname is copied. If Aname does not exist or extended attributes are not supported, the operation succeeds by copying nothing.
Returns
=0 Attribute(s) successfully copied, did not exist, or extended attributes are not supported for source or target.
<0 Attribute(s) not copied, the return value is -errno that describes the reason for the failure.

◆ Del()

virtual int XrdSysXAttr::Del ( const char *  Aname,
const char *  Path,
int  fd = -1 
)
pure virtual

Remove an extended attribute.

Parameters
Aname-> The attribute name.
Path-> Path of the file whose attribute is to be removed.
fdIf >=0 is the file descriptor of the opened subject file.
Returns
=0 Attribute was successfully removed.
<0 Attribute was not removed or does not exist. The return value is -errno that describes the reason for the failure.

Implemented in XrdCephXAttr, and XrdSysFAttr.

Referenced by XrdOucXAttr< T >::Del().

◆ Free()

virtual void XrdSysXAttr::Free ( AList aPL)
pure virtual

Release storage occupied by the Alist structure returned by List().

Parameters
aPL-> The first element of the AList structure.

Implemented in XrdCephXAttr, and XrdSysFAttr.

◆ Get()

virtual int XrdSysXAttr::Get ( const char *  Aname,
void *  Aval,
int  Avsz,
const char *  Path,
int  fd = -1 
)
pure virtual

Get an attribute value and its size.

Parameters
Aname-> The attribute name.
Aval-> Buffer to receive the attribute value.
AvszLength of the buffer in bytes. Only up to this number of bytes should be returned. However, should Avsz be zero the the size of the attribute value should be returned and the Aval argument should be ignored.
Path-> Path of the file whose attribute is to be fetched.
fd-> If >=0 is the file descriptor of the opened subject file.
Returns
>0 The number of bytes placed in Aval. However, if avsz is zero then the value is the actual size of the attribute value.
=0 The attribute exists but has no associated value.
<0 The attribute value could not be returned. The returned value is -errno describing the reason.

Implemented in XrdCephXAttr, and XrdSysFAttr.

◆ List()

virtual int XrdSysXAttr::List ( AList **  aPL,
const char *  Path,
int  fd = -1,
int  getSz = 0 
)
pure virtual

Get all of the attributes associated with a file.

Parameters
aPL-> the pointer to hold the first element of AList. The storage occupied by the returned AList must be released by calling Free().
Path-> Path of the file whose attributes are t be returned.
fd-> If >=0 is the file descriptor of the opened subject file.
getSzWhen != 0 then the size of the maximum attribute value should be returned. Otherwise, upon success 0 is returned.
Returns
>0 Attributes were returned and aPL points to the first attribute value. The returned value is the largest size of an attribute value encountered (getSz != 0).
=0 Attributes were returned and aPL points to the first attribute value (getSz == 0).
<0 The attribute values could not be returned. The returned value is -errno describing the reason.

Implemented in XrdCephXAttr, and XrdSysFAttr.

◆ Set()

virtual int XrdSysXAttr::Set ( const char *  Aname,
const void *  Aval,
int  Avsz,
const char *  Path,
int  fd = -1,
int  isNew = 0 
)
pure virtual

Set an attribute.

Parameters
Aname-> The attribute name.
Aval-> Buffer holding the attribute value.
AvszLength of the buffer in bytes. This is the length of the attribute value which may contain binary data.
Path-> Path of the file whose attribute is to be set.
fd-> If >=0 is the file descriptor of the opened subject file.
isNewWhen !0 then the attribute must not exist (i.e. new). Otherwise, if it does exist, the value is replaced. In either case, if it does not exist it should be created.
Returns
=0 The attribute was successfully set.
<0 The attribute values could not be set. The returned value is -errno describing the reason.

Implemented in XrdCephXAttr, and XrdSysFAttr.

Referenced by XrdOucXAttr< T >::Set().

◆ SetMsgRoute()

virtual XrdSysError * XrdSysXAttr::SetMsgRoute ( XrdSysError errP)
virtual

Establish the error message routing. Unless it's established, no messages should be produced. A default implementation is supplied.

Parameters
errP-> Pointer to the error message object. If it is a nil pointer, no error messages should be produced.
Returns
The previous setting.

Member Data Documentation

◆ Say

XrdSysError* XrdSysXAttr::Say
protected

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