xrootd
XrdVersionPlugin.hh
Go to the documentation of this file.
1 #ifndef __XRDVERSIONPLUGIN_HH__
2 #define __XRDVERSIONPLUGIN_HH__
3 /******************************************************************************/
4 /* */
5 /* X r d V e r s i o n P l u g i n . h h */
6 /* */
7 /* (c) 2012 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 /* The following section defines the versioning rules for plugins. The rules are
34  applied by 'XrdSysPlugin.cc'. The rules defined by the XrdVERSIONPLUGIN_RULE
35  macro (see below) are used to initialize a data the following data structure.
36 */
38  {const char *pName;
39  int vProcess;
40  short vMajLow;
41  short vMinLow;
42  };
43 
44 /* The rules are defined here because they apply to every class that uses a
45  plugin. This file *must* be updated whenever a plugin interface materially
46  changes; including any material changes (layout or size) to any classes
47  passed as arguments to the plugin.
48 */
49 
50 // Macros used to define version checking rule values (see explanation below).
51 //
52 #define XrdVERSIONPLUGIN_DoNotChk -1
53 #define XrdVERSIONPLUGIN_Optional 0
54 #define XrdVERSIONPLUGIN_Required 1
55 
56 #define XrdVERSIONPLUGIN_Rule(procMode, majorVer, minorVer, piSymbol)\
57  {#piSymbol, XrdVERSIONPLUGIN_##procMode, majorVer, minorVer},
58 
59 /* Each rule must be defined by the XrdVERSIONPLUGIN_RULE macro which takes four
60  arguments, as follows:
61 
62  procMode: Version procsessing mode:
63  DoNotChk -> Skip version check as it's already been done by a
64  previous getPlugin() call for a library symbol.
65  Optional -> Version check is optional, do it if version information
66  present but warn if it is missing.
67  Required -> Version check required; plugin must define a version
68  number and issue error message if it is missing.
69 
70  majorVer: The required major version number. It is checked as follows:
71  < 0: major version numbers must be identical.
72  >= 0: is the lowest valid major version number allowed.
73 
74  minorVer: The required minor version number, It is check as follows:
75  < 0: minor version numbers must be identical.
76  >= 0: the lowest valid minor version for the major number allowed.
77  > 99: Do not check the minor version number, it's immaterial.
78 
79  piSymbol: The plugin's object creator's unquoted function name. When this
80  symbol is looked-up, the defined version rule is applied.
81 
82  Note: a plugin may not have a major.minor version number greater than the
83  program's major.minor version number unless either one is unreleased.
84  Unreleased versions can use any version. However, a message is issued.
85 */
86 #define XrdVERSIONPLUGINRULES \
87  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdAccAuthorizeObject )\
88  XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdBwmPolicyObject )\
89  XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdCksCalcInit )\
90  XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdCksInit )\
91  XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdCmsGetClient )\
92  XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdCmsgetXmi )\
93  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdgetProtocol )\
94  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdgetProtocolPort )\
95  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdOssGetStorageSystem )\
96  XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdOssStatInfoInit )\
97  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdOucGetCache )\
98  XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdOucgetName2Name )\
99  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecGetProtocol )\
100  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecgetService )\
101  XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiAuthzFun )\
102  XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiAuthzInit )\
103  XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiAuthzKey )\
104  XrdVERSIONPLUGIN_Rule(Optional, 0, 0, XrdSecgsiGMAPFun )\
105  XrdVERSIONPLUGIN_Rule(DoNotChk, 4, 0, XrdSecProtocolgsiInit )\
106  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecProtocolgsiObject )\
107  XrdVERSIONPLUGIN_Rule(DoNotChk, 4, 0, XrdSecProtocolkrb5Init )\
108  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecProtocolkrb5Object )\
109  XrdVERSIONPLUGIN_Rule(DoNotChk, 4, 0, XrdSecProtocolpwdInit )\
110  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecProtocolpwdObject )\
111  XrdVERSIONPLUGIN_Rule(DoNotChk, 4, 0, XrdSecProtocolsssInit )\
112  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecProtocolsssObject )\
113  XrdVERSIONPLUGIN_Rule(DoNotChk, 4, 0, XrdSecProtocolunixInit )\
114  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecProtocolunixObject )\
115  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSfsGetFileSystem )\
116  XrdVERSIONPLUGIN_Rule(Required, 3, 0, XrdClGetMonitor )\
117  XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdClGetPlugIn )\
118  { 0, 0, 0, 0}
119 #endif
short vMinLow
Lowest compatible minor (&gt;99 don&#39;t check).
Definition: XrdVersionPlugin.hh:41
short vMajLow
Lowest compatible major version number.
Definition: XrdVersionPlugin.hh:40
const char * pName
-&gt; plugin object creator function name
Definition: XrdVersionPlugin.hh:38
Definition: XrdVersionPlugin.hh:37
int vProcess
version: &lt;0 skip, =0 optional, &gt;0 required
Definition: XrdVersionPlugin.hh:39