File: _lcmaps_return_poolindex.h

package info (click to toggle)
lcmaps 1.6.6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,016 kB
  • ctags: 1,428
  • sloc: sh: 11,191; ansic: 9,519; makefile: 530; lex: 184; perl: 92; yacc: 60
file content (152 lines) | stat: -rw-r--r-- 5,711 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
 * Copyright (c) Members of the EGEE Collaboration. 2004-2010. 
 * See http://www.eu-egee.org/partners/ for details on the copyright
 * holders.  
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */


/**
    \file   _lcmaps_return_poolindex.h
    \brief  This file holds implementation details of the \a lcmaps_return_poolindex
    interface that users of the API should not need to deal with.
    \author Dennis van Dok is taking all the blame


    \ingroup LcmapsHiddenInterface
*/

#ifndef _LCMAPS_RETURN_POOLINDEX_H
#define _LCMAPS_RETURN_POOLINDEX_H

#include <stdio.h>

# ifdef LCMAPS_USE_DLOPEN

/*!
  \def LCMAPS_LIB_RETURN_POOLINDEX
  \brief The name of the shared object that implements the interface.
*/
#define LCMAPS_LIB_RETURN_POOLINDEX "liblcmaps_return_poolindex" LIBSUFF

/**
   \struct _lcmaps_handle_return_poolindex_s
    \brief Struct containing all the LCMAPS functions, will be filled using dlsym() 
*/
typedef struct _lcmaps_handle_return_poolindex_s {
    const char *libfilename;
    const char *helpername;
    void *handle,*helper;   /* handles to the LCMAPS library and its optional
			       helper (the latter is needed for the 'old' API to
			       provide missing symbols) */
    char *errmsg;
    lcmaps_init_t *lcmaps_init;
    lcmaps_account_info_init_t *lcmaps_account_info_init;
    lcmaps_return_poolindex_t *lcmaps_return_poolindex;
    lcmaps_return_poolindex_from_gss_cred_t *lcmaps_return_poolindex_from_gss_cred;
    lcmaps_term_t *lcmaps_term;
    lcmaps_account_info_clean_t *lcmaps_account_info_clean;
    /* Remainder is for 'new' API */
    /* LCMAPS_HANDLE_VERSION_MEMBERS; */
    getMajorVersion_t *getMajorVersion;
    lcmaps_get_major_version_t *lcmaps_get_major_version;
    lcmaps_get_minor_version_t *lcmaps_get_minor_version;
    lcmaps_get_patch_version_t *lcmaps_get_patch_version;
    /* If the above cannot be found (old lcmaps) these values will be
       set to 0 */
    int majorversion, minorversion, patchversion;
    /* Next three is the 'OSG API' */
    lcmaps_disable_voms_attributes_verification_t *lcmaps_disable_voms_attributes_verification;
    lcmaps_enable_voms_attributes_verification_t *lcmaps_enable_voms_attributes_verification;
    lcmaps_is_set_to_verify_voms_attributes_t *lcmaps_is_set_to_verify_voms_attributes;
    /* Plus the new two more fine-grained functions */
    lcmaps_set_voms_attributes_verification_t *lcmaps_set_voms_attributes_verification;
    lcmaps_get_voms_attributes_verification_t *lcmaps_get_voms_attributes_verification;
    /* Verification time of proxies */
    lcmaps_set_voms_verification_time_t *lcmaps_set_voms_verification_time;
    lcmaps_get_voms_verification_time_t *lcmaps_get_voms_verification_time;
} _lcmaps_handle_return_poolindex_t;

/* The declarator of the handle object */
#define _LCMAPS_DECL_HANDLE_RETURN_POOLINDEX(l)	      \
    _lcmaps_handle_return_poolindex_t l = {	      \
	LCMAPS_LIB_RETURN_POOLINDEX,		      \
	LCMAPS_FIXVOMSHACKSO,			      \
	NULL,					      \
	NULL,					      \
	NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        -1,-1,-1,				      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
        NULL,					      \
    };


/* The initializer of the handle object */
#define _LCMAPS_INIT_HANDLE_RETURN_POOLINDEX(l)			\
    (									\
    (l)->libfilename = LCMAPS_LIB_RETURN_POOLINDEX,		\
    (l)->helpername = LCMAPS_FIXVOMSHACKSO,				\
    (l)->handle = (l)->helper = NULL,					\
    (l)->errmsg = NULL,							\
    (l)->majorversion = (l)->minorversion = (l)->patchversion = -1,	\
    (l)->lcmaps_init = NULL,						\
    (l)->lcmaps_return_poolindex = NULL,				\
    (l)->lcmaps_return_poolindex_from_gss_cred = NULL,				\
    (l)->lcmaps_term = NULL,						\
    (l)->getMajorVersion = NULL,					\
    (l)->lcmaps_disable_voms_attributes_verification = NULL,		\
    (l)->lcmaps_enable_voms_attributes_verification = NULL,		\
    (l)->lcmaps_is_set_to_verify_voms_attributes = NULL,		\
    (l)->lcmaps_set_voms_attributes_verification = NULL,		\
    (l)->lcmaps_get_voms_attributes_verification = NULL,		\
    (l)->lcmaps_set_voms_verification_time = NULL,			\
    (l)->lcmaps_get_voms_verification_time = NULL,			\
    1									\
    )


/* The single macro to call to initialize lcmaps */
#define _LCMAPS_LOAD_RETURN_POOLINDEX(l)				\
    (									\
     _LCMAPS_LOAD_INTERFACE_WITH_FIX(l)					\
     && LCMAPS_LOAD_FUNC(l,lcmaps_init)					\
     && LCMAPS_LOAD_FUNC(l,lcmaps_return_poolindex)			\
     && LCMAPS_LOAD_FUNC(l,lcmaps_return_poolindex_from_gss_cred)	\
     && LCMAPS_LOAD_FUNC(l,lcmaps_term)					\
    )	    

# else /* LCMAPS_USE_DLOPEN */

typedef void * _lcmaps_handle_return_poolindex_t;

#define _LCMAPS_DECL_HANDLE_RETURN_POOLINDEX(l)
#define _LCMAPS_INIT_HANDLE_RETURN_POOLINDEX(l) (l = NULL)
#define _LCMAPS_INTERFACE_RETURN_POOLINDEX(l) (1)

# endif /* LCMAPS_USE_DLOPEN */

#endif /* _LCMAPS_RETURN_POOLINDEX_H */