1use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
11#[deprecated]
12#[repr(C)]
13#[derive(Clone, Copy, Debug, PartialEq)]
14pub struct cssm_spi_dl_funcs {
15 pub DbOpen: Option<
16 unsafe extern "C-unwind" fn(
17 CSSM_DL_HANDLE,
18 *const c_char,
19 *const CSSM_NET_ADDRESS,
20 CSSM_DB_ACCESS_TYPE,
21 *const CSSM_ACCESS_CREDENTIALS,
22 *const c_void,
23 *mut CSSM_DB_HANDLE,
24 ) -> CSSM_RETURN,
25 >,
26 pub DbClose: Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE) -> CSSM_RETURN>,
27 pub DbCreate: Option<
28 unsafe extern "C-unwind" fn(
29 CSSM_DL_HANDLE,
30 *const c_char,
31 *const CSSM_NET_ADDRESS,
32 *const CSSM_DBINFO,
33 CSSM_DB_ACCESS_TYPE,
34 *const CSSM_RESOURCE_CONTROL_CONTEXT,
35 *const c_void,
36 *mut CSSM_DB_HANDLE,
37 ) -> CSSM_RETURN,
38 >,
39 pub DbDelete: Option<
40 unsafe extern "C-unwind" fn(
41 CSSM_DL_HANDLE,
42 *const c_char,
43 *const CSSM_NET_ADDRESS,
44 *const CSSM_ACCESS_CREDENTIALS,
45 ) -> CSSM_RETURN,
46 >,
47 pub CreateRelation: Option<
48 unsafe extern "C-unwind" fn(
49 CSSM_DL_DB_HANDLE,
50 CSSM_DB_RECORDTYPE,
51 *const c_char,
52 uint32,
53 *const CSSM_DB_SCHEMA_ATTRIBUTE_INFO,
54 uint32,
55 *const CSSM_DB_SCHEMA_INDEX_INFO,
56 ) -> CSSM_RETURN,
57 >,
58 pub DestroyRelation:
59 Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE, CSSM_DB_RECORDTYPE) -> CSSM_RETURN>,
60 pub Authenticate: Option<
61 unsafe extern "C-unwind" fn(
62 CSSM_DL_DB_HANDLE,
63 CSSM_DB_ACCESS_TYPE,
64 *const CSSM_ACCESS_CREDENTIALS,
65 ) -> CSSM_RETURN,
66 >,
67 pub GetDbAcl: Option<
68 unsafe extern "C-unwind" fn(
69 CSSM_DL_DB_HANDLE,
70 *const CSSM_STRING,
71 *mut uint32,
72 *mut CSSM_ACL_ENTRY_INFO_PTR,
73 ) -> CSSM_RETURN,
74 >,
75 pub ChangeDbAcl: Option<
76 unsafe extern "C-unwind" fn(
77 CSSM_DL_DB_HANDLE,
78 *const CSSM_ACCESS_CREDENTIALS,
79 *const CSSM_ACL_EDIT,
80 ) -> CSSM_RETURN,
81 >,
82 pub GetDbOwner: Option<
83 unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE, CSSM_ACL_OWNER_PROTOTYPE_PTR) -> CSSM_RETURN,
84 >,
85 pub ChangeDbOwner: Option<
86 unsafe extern "C-unwind" fn(
87 CSSM_DL_DB_HANDLE,
88 *const CSSM_ACCESS_CREDENTIALS,
89 *const CSSM_ACL_OWNER_PROTOTYPE,
90 ) -> CSSM_RETURN,
91 >,
92 pub GetDbNames:
93 Option<unsafe extern "C-unwind" fn(CSSM_DL_HANDLE, *mut CSSM_NAME_LIST_PTR) -> CSSM_RETURN>,
94 pub GetDbNameFromHandle:
95 Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE, *mut *mut c_char) -> CSSM_RETURN>,
96 pub FreeNameList:
97 Option<unsafe extern "C-unwind" fn(CSSM_DL_HANDLE, CSSM_NAME_LIST_PTR) -> CSSM_RETURN>,
98 pub DataInsert: Option<
99 unsafe extern "C-unwind" fn(
100 CSSM_DL_DB_HANDLE,
101 CSSM_DB_RECORDTYPE,
102 *const CSSM_DB_RECORD_ATTRIBUTE_DATA,
103 *const SecAsn1Item,
104 *mut CSSM_DB_UNIQUE_RECORD_PTR,
105 ) -> CSSM_RETURN,
106 >,
107 pub DataDelete: Option<
108 unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE, *const CSSM_DB_UNIQUE_RECORD) -> CSSM_RETURN,
109 >,
110 pub DataModify: Option<
111 unsafe extern "C-unwind" fn(
112 CSSM_DL_DB_HANDLE,
113 CSSM_DB_RECORDTYPE,
114 CSSM_DB_UNIQUE_RECORD_PTR,
115 *const CSSM_DB_RECORD_ATTRIBUTE_DATA,
116 *const SecAsn1Item,
117 CSSM_DB_MODIFY_MODE,
118 ) -> CSSM_RETURN,
119 >,
120 pub DataGetFirst: Option<
121 unsafe extern "C-unwind" fn(
122 CSSM_DL_DB_HANDLE,
123 *const CSSM_QUERY,
124 CSSM_HANDLE_PTR,
125 CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR,
126 CSSM_DATA_PTR,
127 *mut CSSM_DB_UNIQUE_RECORD_PTR,
128 ) -> CSSM_RETURN,
129 >,
130 pub DataGetNext: Option<
131 unsafe extern "C-unwind" fn(
132 CSSM_DL_DB_HANDLE,
133 CSSM_HANDLE,
134 CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR,
135 CSSM_DATA_PTR,
136 *mut CSSM_DB_UNIQUE_RECORD_PTR,
137 ) -> CSSM_RETURN,
138 >,
139 pub DataAbortQuery:
140 Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE, CSSM_HANDLE) -> CSSM_RETURN>,
141 pub DataGetFromUniqueRecordId: Option<
142 unsafe extern "C-unwind" fn(
143 CSSM_DL_DB_HANDLE,
144 *const CSSM_DB_UNIQUE_RECORD,
145 CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR,
146 CSSM_DATA_PTR,
147 ) -> CSSM_RETURN,
148 >,
149 pub FreeUniqueRecord: Option<
150 unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE, CSSM_DB_UNIQUE_RECORD_PTR) -> CSSM_RETURN,
151 >,
152 pub PassThrough: Option<
153 unsafe extern "C-unwind" fn(
154 CSSM_DL_DB_HANDLE,
155 uint32,
156 *const c_void,
157 *mut *mut c_void,
158 ) -> CSSM_RETURN,
159 >,
160}
161
162#[cfg(all(
163 feature = "SecAsn1Types",
164 feature = "cssmconfig",
165 feature = "cssmtype",
166 feature = "objc2"
167))]
168unsafe impl Encode for cssm_spi_dl_funcs {
169 const ENCODING: Encoding = Encoding::Struct("cssm_spi_dl_funcs", &[
170 <Option<unsafe extern "C-unwind" fn(CSSM_DL_HANDLE,*const c_char,*const CSSM_NET_ADDRESS,CSSM_DB_ACCESS_TYPE,*const CSSM_ACCESS_CREDENTIALS,*const c_void,*mut CSSM_DB_HANDLE,) -> CSSM_RETURN>>::ENCODING,
171 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,) -> CSSM_RETURN>>::ENCODING,
172 <Option<unsafe extern "C-unwind" fn(CSSM_DL_HANDLE,*const c_char,*const CSSM_NET_ADDRESS,*const CSSM_DBINFO,CSSM_DB_ACCESS_TYPE,*const CSSM_RESOURCE_CONTROL_CONTEXT,*const c_void,*mut CSSM_DB_HANDLE,) -> CSSM_RETURN>>::ENCODING,
173 <Option<unsafe extern "C-unwind" fn(CSSM_DL_HANDLE,*const c_char,*const CSSM_NET_ADDRESS,*const CSSM_ACCESS_CREDENTIALS,) -> CSSM_RETURN>>::ENCODING,
174 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_DB_RECORDTYPE,*const c_char,uint32,*const CSSM_DB_SCHEMA_ATTRIBUTE_INFO,uint32,*const CSSM_DB_SCHEMA_INDEX_INFO,) -> CSSM_RETURN>>::ENCODING,
175 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_DB_RECORDTYPE,) -> CSSM_RETURN>>::ENCODING,
176 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_DB_ACCESS_TYPE,*const CSSM_ACCESS_CREDENTIALS,) -> CSSM_RETURN>>::ENCODING,
177 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,*const CSSM_STRING,*mut uint32,*mut CSSM_ACL_ENTRY_INFO_PTR,) -> CSSM_RETURN>>::ENCODING,
178 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,*const CSSM_ACCESS_CREDENTIALS,*const CSSM_ACL_EDIT,) -> CSSM_RETURN>>::ENCODING,
179 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_ACL_OWNER_PROTOTYPE_PTR,) -> CSSM_RETURN>>::ENCODING,
180 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,*const CSSM_ACCESS_CREDENTIALS,*const CSSM_ACL_OWNER_PROTOTYPE,) -> CSSM_RETURN>>::ENCODING,
181 <Option<unsafe extern "C-unwind" fn(CSSM_DL_HANDLE,*mut CSSM_NAME_LIST_PTR,) -> CSSM_RETURN>>::ENCODING,
182 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,*mut *mut c_char,) -> CSSM_RETURN>>::ENCODING,
183 <Option<unsafe extern "C-unwind" fn(CSSM_DL_HANDLE,CSSM_NAME_LIST_PTR,) -> CSSM_RETURN>>::ENCODING,
184 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_DB_RECORDTYPE,*const CSSM_DB_RECORD_ATTRIBUTE_DATA,*const SecAsn1Item,*mut CSSM_DB_UNIQUE_RECORD_PTR,) -> CSSM_RETURN>>::ENCODING,
185 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,*const CSSM_DB_UNIQUE_RECORD,) -> CSSM_RETURN>>::ENCODING,
186 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_DB_RECORDTYPE,CSSM_DB_UNIQUE_RECORD_PTR,*const CSSM_DB_RECORD_ATTRIBUTE_DATA,*const SecAsn1Item,CSSM_DB_MODIFY_MODE,) -> CSSM_RETURN>>::ENCODING,
187 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,*const CSSM_QUERY,CSSM_HANDLE_PTR,CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR,CSSM_DATA_PTR,*mut CSSM_DB_UNIQUE_RECORD_PTR,) -> CSSM_RETURN>>::ENCODING,
188 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_HANDLE,CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR,CSSM_DATA_PTR,*mut CSSM_DB_UNIQUE_RECORD_PTR,) -> CSSM_RETURN>>::ENCODING,
189 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_HANDLE,) -> CSSM_RETURN>>::ENCODING,
190 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,*const CSSM_DB_UNIQUE_RECORD,CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
191 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,CSSM_DB_UNIQUE_RECORD_PTR,) -> CSSM_RETURN>>::ENCODING,
192 <Option<unsafe extern "C-unwind" fn(CSSM_DL_DB_HANDLE,uint32,*const c_void,*mut *mut c_void,) -> CSSM_RETURN>>::ENCODING,
193 ]);
194}
195
196#[cfg(all(
197 feature = "SecAsn1Types",
198 feature = "cssmconfig",
199 feature = "cssmtype",
200 feature = "objc2"
201))]
202unsafe impl RefEncode for cssm_spi_dl_funcs {
203 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
204}
205
206#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
208pub type CSSM_SPI_DL_FUNCS = cssm_spi_dl_funcs;
209
210#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
212pub type CSSM_SPI_DL_FUNCS_PTR = *mut cssm_spi_dl_funcs;