| RSA BSAFE Micro Edition Suite |
Streamlined security for mobile and embedded devices |
 
![]() |
00001 /* $Id: r_res.h,v 1.39 2004/09/29 05:58:48 spingel Exp $ */ 00002 /* 00003 * Copyright (C) 1998-2003 RSA Security Inc. All rights reserved. 00004 * 00005 * This work contains proprietary information of RSA Security. 00006 * Distribution is limited to authorized licensees of RSA 00007 * Security. Any unauthorized reproduction, distribution or 00008 * modification of this work is strictly prohibited. 00009 */ 00010 00017 #ifndef HEADER_COMMON_R_RES_H 00018 #define HEADER_COMMON_R_RES_H 00019 00020 #ifdef __cplusplus 00021 extern "C" { 00022 #endif 00023 00024 #include "r_com.h" 00025 #include "r_modid.h" 00026 00036 #define R_RES_LIST_FLAG_STATIC 0x01 00037 00039 #define R_RES_LIST_FLAG_COPY 0x02 00040 00042 #define R_RES_LIST_FLAG_READ_ONLY 0x04 00043 00061 typedef struct r_res_item_st R_RES_ITEM; 00062 00069 typedef R_RES_ITEM R_RES_LIST; 00070 00075 typedef int R_RES_FLAG; 00076 00085 struct r_res_item_st 00086 { 00088 int mod_id; 00089 00091 int impl_id; 00092 00094 int sub_id; 00095 00099 R_RES_FLAG flag; 00100 00102 int (*start)(R_RES_LIST *, R_RES_ITEM *, void **); 00103 00105 int (*finish)(R_RES_LIST *, R_RES_ITEM *, void **); 00106 00108 void *(*meth)(void *); 00109 00111 void *(*data)(void *); 00112 }; 00113 00114 int R_CDECL R_RES_LIST_set_resource(R_RES_LIST *res_list, int mod_id, int impl_id, 00115 int sub_id, R_RES_FLAG flag, int res_type, void *data); 00116 int R_CDECL R_RES_LIST_get_resource(R_RES_LIST *res_list, int mod_id, int imp_id, 00117 int sub_id, R_RES_FLAG flag, int res_type, void **data); 00118 00119 int R_CDECL R_RES_LIST_get_item(R_RES_LIST *res_list, int mod_id, int imp_id, 00120 int sub_id, R_RES_FLAG flag, R_RES_ITEM **data, R_RES_LIST **next); 00121 int R_CDECL R_RES_LIST_set_item(R_RES_LIST **res_list, int action, R_RES_ITEM *item); 00122 00123 int R_CDECL R_RES_LIST_get_next_item(R_RES_LIST *res_list, R_RES_ITEM **data, 00124 R_RES_LIST **next); 00125 00126 int R_CDECL R_RES_LIST_get_num_entries(R_RES_LIST *res_list, int *count); 00127 int R_CDECL R_RES_LIST_check_writable(R_RES_LIST *res_list); 00128 int R_CDECL R_RES_LIST_set_writable(R_RES_LIST *res_list, int flag); 00129 00130 int R_CDECL R_RES_LIST_lib_finish(R_RES_LIST *res_list, R_RES_ITEM *item, 00131 void **imp_data); 00132 int R_CDECL R_RES_LIST_free(R_RES_LIST *res_list); 00133 00134 int R_CDECL R_RES_LIST_join(R_RES_LIST **new_list, R_RES_LIST *append_list); 00135 int R_CDECL R_RES_LIST_dup(R_RES_LIST **new_list, R_RES_LIST *res_list); 00136 00149 #define R_RES_END_OF_LIST \ 00150 { R_RES_MOD_ID_RES_LIST, R_RES_IMPL_ID_DEF, R_RES_SUB_ID_DEF, \ 00151 R_RES_LIST_FLAG_STATIC, NULL, R_RES_LIST_lib_finish, NULL, NULL } 00152 00157 #define R_RES_END_OF_LIST_READ_ONLY \ 00158 { R_RES_MOD_ID_RES_LIST, R_RES_IMPL_ID_DEF, R_RES_SUB_ID_DEF, \ 00159 (R_RES_LIST_FLAG_STATIC|R_RES_LIST_FLAG_READ_ONLY), NULL, NULL, \ 00160 NULL, NULL } 00161 00166 #ifdef __cplusplus 00167 } 00168 #endif 00169 00170 #endif /* HEADER_COMMON_R_RES_H */ 00171 00172