1 /* 2 * Copyright (c) 2013 Red Hat Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 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. 18 * 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 30 * DAMAGE. 31 * 32 * Author: Stef Walter <stefw@redhat.com> 33 */ 34 35 #ifndef __P11_KIT_DEPRECATED_H__ 36 #define __P11_KIT_DEPRECATED_H__ 37 38 #ifndef __P11_KIT_H__ 39 #error "Please include <p11-kit/p11-kit.h> instead of this file." 40 #endif 41 42 #ifdef __cplusplus 43 extern "C" { 44 #endif 45 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__)) 51 #endif 52 #endif 53 54 #ifndef P11_KIT_DEPRECATED_FOR 55 #define P11_KIT_DEPRECATED_FOR(f) 56 #endif 57 58 #ifndef P11_KIT_DISABLE_DEPRECATED 59 60 P11_KIT_DEPRECATED_FOR (p11_kit_modules_load) 61 CK_RV p11_kit_initialize_registered (void); 62 63 P11_KIT_DEPRECATED_FOR (p11_kit_modules_release) 64 CK_RV p11_kit_finalize_registered (void); 65 66 P11_KIT_DEPRECATED_FOR (p11_kit_modules_release) 67 CK_FUNCTION_LIST_PTR * p11_kit_registered_modules (void); 68 69 P11_KIT_DEPRECATED_FOR (p11_kit_module_for_name) 70 CK_FUNCTION_LIST_PTR p11_kit_registered_name_to_module (const char *name); 71 72 P11_KIT_DEPRECATED_FOR (p11_kit_module_get_name) 73 char * p11_kit_registered_module_to_name (CK_FUNCTION_LIST_PTR module); 74 75 P11_KIT_DEPRECATED_FOR (p11_kit_config_option) 76 char * p11_kit_registered_option (CK_FUNCTION_LIST_PTR module, 77 const char *field); 78 79 P11_KIT_DEPRECATED_FOR (module->C_Initialize) 80 CK_RV p11_kit_initialize_module (CK_FUNCTION_LIST_PTR module); 81 82 P11_KIT_DEPRECATED_FOR (module->C_Finalize) 83 CK_RV p11_kit_finalize_module (CK_FUNCTION_LIST_PTR module); 84 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); 88 89 #endif /* P11_KIT_DISABLE_DEPRECATED */ 90 91 #undef P11_KIT_DEPRECATED_FOR 92 93 #ifdef __cplusplus 94 } /* extern "C" */ 95 #endif 96 97 #endif /* __P11_KIT_DEPRECATED_H__ */ 98