00001 #ifndef __XRDVERSIONPLUGIN_HH__ 00002 #define __XRDVERSIONPLUGIN_HH__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d V e r s i o n P l u g i n . h h */ 00006 /* */ 00007 /* (c) 2012 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 /* The following section defines the versioning rules for plugins. The rules are 00034 applied by 'XrdSysPlugin.cc'. The rules defined by the XrdVERSIONPLUGIN_RULE 00035 macro (see below) are used to initialize a data the following data structure. 00036 */ 00037 struct XrdVersionPlugin 00038 {const char *pName; 00039 int vProcess; 00040 short vMajLow; 00041 short vMinLow; 00042 }; 00043 00044 /* The rules are defined here because they apply to every class that uses a 00045 plugin. This file *must* be updated whenever a plugin interface materially 00046 changes; including any material changes (layout or size) to any classes 00047 passed as arguments to the plugin. 00048 */ 00049 00050 // Macros used to define version checking rule values (see explanation below). 00051 // 00052 #define XrdVERSIONPLUGIN_DoNotChk -1 00053 #define XrdVERSIONPLUGIN_Optional 0 00054 #define XrdVERSIONPLUGIN_Required 1 00055 00056 #define XrdVERSIONPLUGIN_Rule(procMode, majorVer, minorVer, piSymbol)\ 00057 {#piSymbol, XrdVERSIONPLUGIN_##procMode, majorVer, minorVer}, 00058 00059 /* Each rule must be defined by the XrdVERSIONPLUGIN_RULE macro which takes four 00060 arguments, as follows: 00061 00062 procMode: Version procsessing mode: 00063 DoNotChk -> Skip version check as it's already been done by a 00064 previous getPlugin() call for a library symbol. 00065 Optional -> Version check is optional, do it if version information 00066 present but warn if it is missing. 00067 Required -> Version check required; plugin must define a version 00068 number and issue error message if it is missing. 00069 00070 majorVer: The required major version number. It is checked as follows: 00071 < 0: major version numbers must be identical. 00072 >= 0: is the lowest valid major version number allowed. 00073 00074 minorVer: The required minor version number, It is check as follows: 00075 < 0: minor version numbers must be identical. 00076 >= 0: the lowest valid minor version for the major number allowed. 00077 > 99: Do not check the minor version number, it's immaterial. 00078 00079 piSymbol: The plugin's object creator's unquoted function name. When this 00080 symbol is looked-up, the defined version rule is applied. 00081 00082 Note: a plugin may not have a major.minor version number greater than the 00083 program's major.minor version number unless either one is unreleased. 00084 Unreleased versions can use any version. However, a message is issued. 00085 */ 00086 #define XrdVERSIONPLUGINRULES \ 00087 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdAccAuthorizeObject )\ 00088 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdBwmPolicyObject )\ 00089 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdCksCalcInit )\ 00090 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdCksInit )\ 00091 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdCmsGetClient )\ 00092 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdCmsgetXmi )\ 00093 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdgetProtocol )\ 00094 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdgetProtocolPort )\ 00095 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdOssGetStorageSystem )\ 00096 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdOucGetCache )\ 00097 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdOucgetName2Name )\ 00098 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecGetProtocol )\ 00099 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgetService )\ 00100 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiAuthzFun )\ 00101 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiAuthzInit )\ 00102 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiAuthzKey )\ 00103 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiGMAPFun )\ 00104 XrdVERSIONPLUGIN_Rule(DoNotChk, 0, 0, XrdSecProtocolgsiInit )\ 00105 XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdSecProtocolgsiObject )\ 00106 XrdVERSIONPLUGIN_Rule(DoNotChk, 0, 0, XrdSecProtocolkrb5Init )\ 00107 XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdSecProtocolkrb5Object )\ 00108 XrdVERSIONPLUGIN_Rule(DoNotChk, 0, 0, XrdSecProtocolpwdInit )\ 00109 XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdSecProtocolpwdObject )\ 00110 XrdVERSIONPLUGIN_Rule(DoNotChk, 0, 0, XrdSecProtocolsssInit )\ 00111 XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdSecProtocolsssObject )\ 00112 XrdVERSIONPLUGIN_Rule(DoNotChk, 0, 0, XrdSecProtocolunixInit )\ 00113 XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdSecProtocolunixObject )\ 00114 XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSfsGetFileSystem )\ 00115 XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdClGetMonitor )\ 00116 { 0, 0, 0, 0} 00117 #endif