00001 #ifndef __XRDOFSFSCTL_PI_H__ 00002 #define __XRDOFSFSCTL_PI_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d O f s F S c t l _ P I . h h */ 00006 /* */ 00007 /* (c) 2020 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 00035 00036 class XrdAccAuthorize; 00037 class XrdCmsClient; 00038 class XrdOss; 00039 class XrdOucEnv; 00040 class XrdOucErrInfo; 00041 class XrdSecEntity; 00042 class XrdSfsFile; 00043 class XrdSfsFileSystem; 00044 class XrdSfsFSctl; 00045 class XrdSysError; 00046 00047 /******************************************************************************/ 00048 /* X r d O f s F S C t l */ 00049 /******************************************************************************/ 00050 00051 class XrdOfsFSctl_PI 00052 { 00053 public: 00054 friend class XrdOfsConfigPI; 00055 00056 //----------------------------------------------------------------------------- 00058 //----------------------------------------------------------------------------- 00059 00060 struct Plugins 00061 {XrdAccAuthorize *autPI; 00062 XrdCmsClient *cmsPI; 00063 XrdOss *ossPI; 00064 XrdSfsFileSystem *sfsPI; 00065 }; 00066 00067 //----------------------------------------------------------------------------- 00077 //----------------------------------------------------------------------------- 00078 00079 virtual bool Configure(const char *CfgFN, 00080 const char *Parms, 00081 XrdOucEnv *envP, 00082 const Plugins &plugs) {return true;} 00083 00084 //----------------------------------------------------------------------------- 00100 //----------------------------------------------------------------------------- 00101 00102 virtual int FSctl(const int cmd, 00103 int alen, 00104 const char *args, 00105 XrdSfsFile &file, 00106 XrdOucErrInfo &eInfo, 00107 const XrdSecEntity *client = 0) = 0; 00108 00109 //----------------------------------------------------------------------------- 00125 //----------------------------------------------------------------------------- 00126 00127 virtual int FSctl(const int cmd, 00128 XrdSfsFSctl &args, 00129 XrdOucErrInfo &eInfo, 00130 const XrdSecEntity *client = 0) = 0; 00131 00132 //------------------------------------------------------------------------------ 00134 //------------------------------------------------------------------------------ 00135 00136 XrdOfsFSctl_PI() : prvPI(0), eDest(0) {} 00137 00138 //------------------------------------------------------------------------------ 00140 //------------------------------------------------------------------------------ 00141 00142 virtual ~XrdOfsFSctl_PI() {} 00143 00144 protected: 00145 00146 XrdOfsFSctl_PI *prvPI; // Stacked CTL plugin behind this one for forwarding 00147 // If none, then the pointer is zero. 00148 XrdSysError *eDest; // Message logging object to be used for messages. 00149 }; 00150 00151 /******************************************************************************/ 00152 /* X r d O f s F S c t l P l u g i n */ 00153 /******************************************************************************/ 00154 00155 //------------------------------------------------------------------------------ 00159 //------------------------------------------------------------------------------ 00160 00166 //------------------------------------------------------------------------------ 00172 //------------------------------------------------------------------------------ 00173 00179 #endif