00001 #ifndef __XRDSYSXATTR_HH__ 00002 #define __XRDSYSXATTR_HH__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d S y s X A t t r . h h */ 00006 /* */ 00007 /* (c) 2014 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 /* This file is part of the XRootD software suite. */ 00013 /* */ 00014 /* XRootD is free software: you can redistribute it and/or modify it under */ 00015 /* the terms of the GNU Lesser General Public License as published by the */ 00016 /* Free Software Foundation, either version 3 of the License, or (at your */ 00017 /* option) any later version. */ 00018 /* */ 00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 00021 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 00022 /* License for more details. */ 00023 /* */ 00024 /* You should have received a copy of the GNU Lesser General Public License */ 00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 00026 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 00027 /* */ 00028 /* The copyright holder's institutional names and contributor's names may not */ 00029 /* be used to endorse or promote products derived from this software without */ 00030 /* specific prior written permission of the institution or contributor. */ 00031 /******************************************************************************/ 00032 00033 //------------------------------------------------------------------------------ 00037 //------------------------------------------------------------------------------ 00038 00039 class XrdSysError; 00040 00041 class XrdSysXAttr 00042 { 00043 public: 00044 //------------------------------------------------------------------------------ 00049 //------------------------------------------------------------------------------ 00050 00051 struct AList 00052 {AList *Next; 00053 int Vlen; 00054 int Nlen; 00055 char Name[1]; 00056 }; 00057 00058 //------------------------------------------------------------------------------ 00077 //------------------------------------------------------------------------------ 00078 00079 virtual int Copy(const char *iPath, int iFD, const char *oPath, int oFD, 00080 const char *Aname=0); 00081 00082 //------------------------------------------------------------------------------ 00092 //------------------------------------------------------------------------------ 00093 00094 virtual int Del(const char *Aname, const char *Path, int fd=-1) = 0; 00095 00096 //------------------------------------------------------------------------------ 00100 //------------------------------------------------------------------------------ 00101 00102 virtual void Free(AList *aPL) = 0; 00103 00104 //------------------------------------------------------------------------------ 00121 //------------------------------------------------------------------------------ 00122 00123 virtual int Get(const char *Aname, void *Aval, int Avsz, 00124 const char *Path, int fd=-1) = 0; 00125 00126 //------------------------------------------------------------------------------ 00144 //------------------------------------------------------------------------------ 00145 00146 virtual int List(AList **aPL, const char *Path, int fd=-1, int getSz=0) = 0; 00147 00148 //------------------------------------------------------------------------------ 00164 //------------------------------------------------------------------------------ 00165 00166 virtual int Set(const char *Aname, const void *Aval, int Avsz, 00167 const char *Path, int fd=-1, int isNew=0) = 0; 00168 00169 //------------------------------------------------------------------------------ 00177 //------------------------------------------------------------------------------ 00178 00179 virtual XrdSysError *SetMsgRoute(XrdSysError *errP); 00180 00181 //------------------------------------------------------------------------------ 00183 //------------------------------------------------------------------------------ 00184 00185 XrdSysXAttr() : Say(0) {} 00186 virtual ~XrdSysXAttr() {} 00187 00188 protected: 00189 00190 XrdSysError *Say; 00191 }; 00192 00193 /******************************************************************************/ 00194 /* 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 */ 00195 /******************************************************************************/ 00196 00197 //------------------------------------------------------------------------------ 00210 //------------------------------------------------------------------------------ 00217 //------------------------------------------------------------------------------ 00222 //------------------------------------------------------------------------------ 00223 00230 /******************************************************************************/ 00231 /* 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 */ 00232 /******************************************************************************/ 00233 00234 //------------------------------------------------------------------------------ 00238 //------------------------------------------------------------------------------ 00239 00240 //------------------------------------------------------------------------------ 00247 //------------------------------------------------------------------------------ 00248 #endif