xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
39 class XrdOucEnv;
40 class XrdSysError;
41 
43 {
44 public:
45 //------------------------------------------------------------------------------
50 //------------------------------------------------------------------------------
51 
52 struct AList
53  {AList *Next;
54  int Vlen;
55  int Nlen;
56  char Name[1];
57  };
58 
59 //------------------------------------------------------------------------------
78 //------------------------------------------------------------------------------
79 
80 virtual int Copy(const char *iPath, int iFD, const char *oPath, int oFD,
81  const char *Aname=0);
82 
83 //------------------------------------------------------------------------------
93 //------------------------------------------------------------------------------
94 
95 virtual int Del(const char *Aname, const char *Path, int fd=-1) = 0;
96 
97 //------------------------------------------------------------------------------
101 //------------------------------------------------------------------------------
102 
103 virtual void Free(AList *aPL) = 0;
104 
105 //------------------------------------------------------------------------------
122 //------------------------------------------------------------------------------
123 
124 virtual int Get(const char *Aname, void *Aval, int Avsz,
125  const char *Path, int fd=-1) = 0;
126 
127 //------------------------------------------------------------------------------
145 //------------------------------------------------------------------------------
146 
147 virtual int List(AList **aPL, const char *Path, int fd=-1, int getSz=0) = 0;
148 
149 //------------------------------------------------------------------------------
165 //------------------------------------------------------------------------------
166 
167 virtual int Set(const char *Aname, const void *Aval, int Avsz,
168  const char *Path, int fd=-1, int isNew=0) = 0;
169 
170 //------------------------------------------------------------------------------
178 //------------------------------------------------------------------------------
179 
180 virtual XrdSysError *SetMsgRoute(XrdSysError *errP);
181 
182 //------------------------------------------------------------------------------
184 //------------------------------------------------------------------------------
185 
186  XrdSysXAttr() : Say(0) {}
187 virtual ~XrdSysXAttr() {}
188 
189 protected:
190 
192 };
193 
194 /******************************************************************************/
195 /* 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 */
196 /******************************************************************************/
197 
198 //------------------------------------------------------------------------------
211 //------------------------------------------------------------------------------
212 
213 typedef XrdSysXAttr *(*XrdSysGetXAttrObject_t)(XrdSysError *errP,
214  const char *config_fn,
215  const char *parms);
222 //------------------------------------------------------------------------------
238 //------------------------------------------------------------------------------
239 
240 typedef XrdSysXAttr *(*XrdSysAddXAttrObject_t)(XrdSysError *errP,
241  const char *config_fn,
242  const char *parms,
243  XrdOucEnv *envP,
244  XrdSysXAttr *attrP);
252 //------------------------------------------------------------------------------
257 //------------------------------------------------------------------------------
258 
265 /******************************************************************************/
266 /* 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 */
267 /******************************************************************************/
268 
269 //------------------------------------------------------------------------------
273 //------------------------------------------------------------------------------
274 
275 //------------------------------------------------------------------------------
282 //------------------------------------------------------------------------------
283 #endif
virtual int Set(const char *Aname, const void *Aval, int Avsz, const char *Path, int fd=-1, int isNew=0)=0
char Name[1]
Start of the name (size of struct is dynamic)
Definition: XrdSysXAttr.hh:56
Definition: XrdSysXAttr.hh:42
XrdSysError * Say
Definition: XrdSysXAttr.hh:191
virtual void Free(AList *aPL)=0
Definition: XrdSysXAttr.hh:52
virtual XrdSysError * SetMsgRoute(XrdSysError *errP)
Definition: XrdSysError.hh:89
virtual int Copy(const char *iPath, int iFD, const char *oPath, int oFD, const char *Aname=0)
XrdSysXAttr()
Constructor and Destructor.
Definition: XrdSysXAttr.hh:186
virtual int List(AList **aPL, const char *Path, int fd=-1, int getSz=0)=0
virtual int Del(const char *Aname, const char *Path, int fd=-1)=0
int Vlen
The length of the attribute value;.
Definition: XrdSysXAttr.hh:54
virtual int Get(const char *Aname, void *Aval, int Avsz, const char *Path, int fd=-1)=0
Definition: XrdOucEnv.hh:41
int Nlen
The length of the attribute name that follows.
Definition: XrdSysXAttr.hh:55
virtual ~XrdSysXAttr()
Definition: XrdSysXAttr.hh:187
AList * Next
-&gt; next element.
Definition: XrdSysXAttr.hh:53