2 * Copyright (c) 2013 Red Hat Inc.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * * Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the
10 * following disclaimer.
11 * * Redistributions in binary form must reproduce the
12 * above copyright notice, this list of conditions and
13 * the following disclaimer in the documentation and/or
14 * other materials provided with the distribution.
15 * * The names of contributors to this software may not be
16 * used to endorse or promote products derived from this
17 * software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
29 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
32 * Author: Stef Walter <stefw@redhat.com>
35 #ifndef __P11_KIT_DEPRECATED_H__
36 #define __P11_KIT_DEPRECATED_H__
39 #error "Please include <p11-kit/p11-kit.h> instead of this file."
46 #ifndef P11_KIT_NO_DEPRECATIONS
47 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
48 #define P11_KIT_DEPRECATED_FOR(f) __attribute__((deprecated("Use " #f " instead")))
49 #elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
50 #define P11_KIT_DEPRECATED_FOR(f) __attribute__((__deprecated__))
54 #ifndef P11_KIT_DEPRECATED_FOR
55 #define P11_KIT_DEPRECATED_FOR(f)
58 #ifndef P11_KIT_DISABLE_DEPRECATED
60 P11_KIT_DEPRECATED_FOR (p11_kit_modules_load
)
61 CK_RV
p11_kit_initialize_registered (void);
63 P11_KIT_DEPRECATED_FOR (p11_kit_modules_release
)
64 CK_RV
p11_kit_finalize_registered (void);
66 P11_KIT_DEPRECATED_FOR (p11_kit_modules_release
)
67 CK_FUNCTION_LIST_PTR
* p11_kit_registered_modules (void);
69 P11_KIT_DEPRECATED_FOR (p11_kit_module_for_name
)
70 CK_FUNCTION_LIST_PTR
p11_kit_registered_name_to_module (const char *name
);
72 P11_KIT_DEPRECATED_FOR (p11_kit_module_get_name
)
73 char * p11_kit_registered_module_to_name (CK_FUNCTION_LIST_PTR module
);
75 P11_KIT_DEPRECATED_FOR (p11_kit_config_option
)
76 char * p11_kit_registered_option (CK_FUNCTION_LIST_PTR module
,
79 P11_KIT_DEPRECATED_FOR (module
->C_Initialize
)
80 CK_RV
p11_kit_initialize_module (CK_FUNCTION_LIST_PTR module
);
82 P11_KIT_DEPRECATED_FOR (module
->C_Finalize
)
83 CK_RV
p11_kit_finalize_module (CK_FUNCTION_LIST_PTR module
);
85 P11_KIT_DEPRECATED_FOR (p11_kit_module_load
)
86 CK_RV
p11_kit_load_initialize_module (const char *module_path
,
87 CK_FUNCTION_LIST_PTR
*module
);
89 #endif /* P11_KIT_DISABLE_DEPRECATED */
91 #undef P11_KIT_DEPRECATED_FOR
97 #endif /* __P11_KIT_DEPRECATED_H__ */