objc2_security/generated/
emmspi.rs1use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[cfg(all(
11 feature = "SecAsn1Types",
12 feature = "cssmconfig",
13 feature = "cssmspi",
14 feature = "cssmtype",
15 feature = "emmtype"
16))]
17#[deprecated]
18#[repr(C)]
19#[allow(unpredictable_function_pointer_comparisons)]
20#[derive(Clone, Copy, Debug, PartialEq)]
21pub struct cssm_state_funcs {
22 pub cssm_GetAttachFunctions: Option<
23 unsafe extern "C-unwind" fn(
24 CSSM_MODULE_HANDLE,
25 CSSM_SERVICE_MASK,
26 *mut *mut c_void,
27 CSSM_GUID_PTR,
28 *mut CSSM_BOOL,
29 ) -> CSSM_RETURN,
30 >,
31 pub cssm_ReleaseAttachFunctions:
32 Option<unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE) -> CSSM_RETURN>,
33 pub cssm_GetAppMemoryFunctions:
34 Option<unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE, CSSM_UPCALLS_PTR) -> CSSM_RETURN>,
35 pub cssm_IsFuncCallValid: Option<
36 unsafe extern "C-unwind" fn(
37 CSSM_MODULE_HANDLE,
38 CSSM_PROC_ADDR,
39 CSSM_PROC_ADDR,
40 CSSM_PRIVILEGE,
41 *mut CSSM_PRIVILEGE,
42 CSSM_BITMASK,
43 *mut CSSM_BOOL,
44 ) -> CSSM_RETURN,
45 >,
46 pub cssm_DeregisterManagerServices:
47 Option<unsafe extern "C-unwind" fn(*const CSSM_GUID) -> CSSM_RETURN>,
48 pub cssm_DeliverModuleManagerEvent:
49 Option<unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION) -> CSSM_RETURN>,
50}
51
52#[cfg(all(
53 feature = "SecAsn1Types",
54 feature = "cssmconfig",
55 feature = "cssmspi",
56 feature = "cssmtype",
57 feature = "emmtype",
58 feature = "objc2"
59))]
60unsafe impl Encode for cssm_state_funcs {
61 const ENCODING: Encoding = Encoding::Struct(
62 "cssm_state_funcs",
63 &[
64 <Option<
65 unsafe extern "C-unwind" fn(
66 CSSM_MODULE_HANDLE,
67 CSSM_SERVICE_MASK,
68 *mut *mut c_void,
69 CSSM_GUID_PTR,
70 *mut CSSM_BOOL,
71 ) -> CSSM_RETURN,
72 >>::ENCODING,
73 <Option<unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE) -> CSSM_RETURN>>::ENCODING,
74 <Option<
75 unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE, CSSM_UPCALLS_PTR) -> CSSM_RETURN,
76 >>::ENCODING,
77 <Option<
78 unsafe extern "C-unwind" fn(
79 CSSM_MODULE_HANDLE,
80 CSSM_PROC_ADDR,
81 CSSM_PROC_ADDR,
82 CSSM_PRIVILEGE,
83 *mut CSSM_PRIVILEGE,
84 CSSM_BITMASK,
85 *mut CSSM_BOOL,
86 ) -> CSSM_RETURN,
87 >>::ENCODING,
88 <Option<unsafe extern "C-unwind" fn(*const CSSM_GUID) -> CSSM_RETURN>>::ENCODING,
89 <Option<
90 unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION) -> CSSM_RETURN,
91 >>::ENCODING,
92 ],
93 );
94}
95
96#[cfg(all(
97 feature = "SecAsn1Types",
98 feature = "cssmconfig",
99 feature = "cssmspi",
100 feature = "cssmtype",
101 feature = "emmtype",
102 feature = "objc2"
103))]
104unsafe impl RefEncode for cssm_state_funcs {
105 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
106}
107
108#[deprecated]
110#[cfg(all(
111 feature = "SecAsn1Types",
112 feature = "cssmconfig",
113 feature = "cssmspi",
114 feature = "cssmtype",
115 feature = "emmtype"
116))]
117pub type CSSM_STATE_FUNCS = cssm_state_funcs;
118
119#[deprecated]
121#[cfg(all(
122 feature = "SecAsn1Types",
123 feature = "cssmconfig",
124 feature = "cssmspi",
125 feature = "cssmtype",
126 feature = "emmtype"
127))]
128pub type CSSM_STATE_FUNCS_PTR = *mut cssm_state_funcs;
129
130#[cfg(all(
132 feature = "SecAsn1Types",
133 feature = "cssmconfig",
134 feature = "cssmspi",
135 feature = "cssmtype",
136 feature = "emmtype"
137))]
138#[deprecated]
139#[repr(C)]
140#[allow(unpredictable_function_pointer_comparisons)]
141#[derive(Clone, Copy, Debug, PartialEq)]
142pub struct cssm_manager_registration_info {
143 pub Initialize: Option<unsafe extern "C-unwind" fn(uint32, uint32) -> CSSM_RETURN>,
144 pub Terminate: Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>,
145 pub RegisterDispatchTable:
146 Option<unsafe extern "C-unwind" fn(CSSM_STATE_FUNCS_PTR) -> CSSM_RETURN>,
147 pub DeregisterDispatchTable: Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>,
148 pub EventNotifyManager:
149 Option<unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION) -> CSSM_RETURN>,
150 pub RefreshFunctionTable:
151 Option<unsafe extern "C-unwind" fn(CSSM_FUNC_NAME_ADDR_PTR, uint32) -> CSSM_RETURN>,
152}
153
154#[cfg(all(
155 feature = "SecAsn1Types",
156 feature = "cssmconfig",
157 feature = "cssmspi",
158 feature = "cssmtype",
159 feature = "emmtype",
160 feature = "objc2"
161))]
162unsafe impl Encode for cssm_manager_registration_info {
163 const ENCODING: Encoding = Encoding::Struct("cssm_manager_registration_info", &[
164 <Option<unsafe extern "C-unwind" fn(uint32,uint32,) -> CSSM_RETURN>>::ENCODING,
165 <Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>>::ENCODING,
166 <Option<unsafe extern "C-unwind" fn(CSSM_STATE_FUNCS_PTR,) -> CSSM_RETURN>>::ENCODING,
167 <Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>>::ENCODING,
168 <Option<unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION,) -> CSSM_RETURN>>::ENCODING,
169 <Option<unsafe extern "C-unwind" fn(CSSM_FUNC_NAME_ADDR_PTR,uint32,) -> CSSM_RETURN>>::ENCODING,
170 ]);
171}
172
173#[cfg(all(
174 feature = "SecAsn1Types",
175 feature = "cssmconfig",
176 feature = "cssmspi",
177 feature = "cssmtype",
178 feature = "emmtype",
179 feature = "objc2"
180))]
181unsafe impl RefEncode for cssm_manager_registration_info {
182 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
183}
184
185#[deprecated]
187#[cfg(all(
188 feature = "SecAsn1Types",
189 feature = "cssmconfig",
190 feature = "cssmspi",
191 feature = "cssmtype",
192 feature = "emmtype"
193))]
194pub type CSSM_MANAGER_REGISTRATION_INFO = cssm_manager_registration_info;
195
196#[deprecated]
198#[cfg(all(
199 feature = "SecAsn1Types",
200 feature = "cssmconfig",
201 feature = "cssmspi",
202 feature = "cssmtype",
203 feature = "emmtype"
204))]
205pub type CSSM_MANAGER_REGISTRATION_INFO_PTR = *mut cssm_manager_registration_info;
206
207pub const CSSM_HINT_NONE: c_uint = 0;
209pub const CSSM_HINT_ADDRESS_APP: c_uint = 1;
211pub const CSSM_HINT_ADDRESS_SP: c_uint = 2;