xrootd
XrdSysXAttr.hh
Go to the documentation of this file.
1#ifndef __XRDSYSXATTR_HH__
2#define __XRDSYSXATTR_HH__
3/******************************************************************************/
4/* */
5/* X r d S y s X A t t r . h h */
6/* */
7/* (c) 2014 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//------------------------------------------------------------------------------
37//------------------------------------------------------------------------------
38
39class XrdSysError;
40
42{
43public:
44//------------------------------------------------------------------------------
49//------------------------------------------------------------------------------
50
51struct AList
53 int Vlen;
54 int Nlen;
55 char Name[1];
56 };
57
58//------------------------------------------------------------------------------
77//------------------------------------------------------------------------------
78
79virtual int Copy(const char *iPath, int iFD, const char *oPath, int oFD,
80 const char *Aname=0);
81
82//------------------------------------------------------------------------------
92//------------------------------------------------------------------------------
93
94virtual int Del(const char *Aname, const char *Path, int fd=-1) = 0;
95
96//------------------------------------------------------------------------------
100//------------------------------------------------------------------------------
101
102virtual void Free(AList *aPL) = 0;
103
104//------------------------------------------------------------------------------
121//------------------------------------------------------------------------------
122
123virtual int Get(const char *Aname, void *Aval, int Avsz,
124 const char *Path, int fd=-1) = 0;
125
126//------------------------------------------------------------------------------
144//------------------------------------------------------------------------------
145
146virtual int List(AList **aPL, const char *Path, int fd=-1, int getSz=0) = 0;
147
148//------------------------------------------------------------------------------
164//------------------------------------------------------------------------------
165
166virtual int Set(const char *Aname, const void *Aval, int Avsz,
167 const char *Path, int fd=-1, int isNew=0) = 0;
168
169//------------------------------------------------------------------------------
177//------------------------------------------------------------------------------
178
180
181//------------------------------------------------------------------------------
183//------------------------------------------------------------------------------
184
185 XrdSysXAttr() : Say(0) {}
186virtual ~XrdSysXAttr() {}
187
188protected:
189
191};
192
193/******************************************************************************/
194/* X r d S y s X A t t r O b j e c t I n s t a n t i a t o r */
195/******************************************************************************/
196
197//------------------------------------------------------------------------------
210//------------------------------------------------------------------------------
217//------------------------------------------------------------------------------
222//------------------------------------------------------------------------------
223
230/******************************************************************************/
231/* X r d S y s X A t t r I m p l e m e n t a t i o n s */
232/******************************************************************************/
233
234//------------------------------------------------------------------------------
238//------------------------------------------------------------------------------
239
240//------------------------------------------------------------------------------
247//------------------------------------------------------------------------------
248#endif
Definition: XrdSysError.hh:90
Definition: XrdSysXAttr.hh:42
virtual XrdSysError * SetMsgRoute(XrdSysError *errP)
virtual ~XrdSysXAttr()
Definition: XrdSysXAttr.hh:186
virtual int List(AList **aPL, const char *Path, int fd=-1, int getSz=0)=0
virtual int Copy(const char *iPath, int iFD, const char *oPath, int oFD, const char *Aname=0)
XrdSysError * Say
Definition: XrdSysXAttr.hh:190
virtual int Get(const char *Aname, void *Aval, int Avsz, const char *Path, int fd=-1)=0
virtual int Set(const char *Aname, const void *Aval, int Avsz, const char *Path, int fd=-1, int isNew=0)=0
virtual void Free(AList *aPL)=0
virtual int Del(const char *Aname, const char *Path, int fd=-1)=0
XrdSysXAttr()
Constructor and Destructor.
Definition: XrdSysXAttr.hh:185
Definition: XrdSysXAttr.hh:52
char Name[1]
Start of the name (size of struct is dynamic)
Definition: XrdSysXAttr.hh:55
int Vlen
The length of the attribute value;.
Definition: XrdSysXAttr.hh:53
int Nlen
The length of the attribute name that follows.
Definition: XrdSysXAttr.hh:54
AList * Next
-> next element.
Definition: XrdSysXAttr.hh:52