use core::ffi::*;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use crate::*;
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype"
))]
#[deprecated]
#[repr(C)]
#[allow(unpredictable_function_pointer_comparisons)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_state_funcs {
pub cssm_GetAttachFunctions: Option<
unsafe extern "C-unwind" fn(
CSSM_MODULE_HANDLE,
CSSM_SERVICE_MASK,
*mut *mut c_void,
CSSM_GUID_PTR,
*mut CSSM_BOOL,
) -> CSSM_RETURN,
>,
pub cssm_ReleaseAttachFunctions:
Option<unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE) -> CSSM_RETURN>,
pub cssm_GetAppMemoryFunctions:
Option<unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE, CSSM_UPCALLS_PTR) -> CSSM_RETURN>,
pub cssm_IsFuncCallValid: Option<
unsafe extern "C-unwind" fn(
CSSM_MODULE_HANDLE,
CSSM_PROC_ADDR,
CSSM_PROC_ADDR,
CSSM_PRIVILEGE,
*mut CSSM_PRIVILEGE,
CSSM_BITMASK,
*mut CSSM_BOOL,
) -> CSSM_RETURN,
>,
pub cssm_DeregisterManagerServices:
Option<unsafe extern "C-unwind" fn(*const CSSM_GUID) -> CSSM_RETURN>,
pub cssm_DeliverModuleManagerEvent:
Option<unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION) -> CSSM_RETURN>,
}
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype",
feature = "objc2"
))]
unsafe impl Encode for cssm_state_funcs {
const ENCODING: Encoding = Encoding::Struct(
"cssm_state_funcs",
&[
<Option<
unsafe extern "C-unwind" fn(
CSSM_MODULE_HANDLE,
CSSM_SERVICE_MASK,
*mut *mut c_void,
CSSM_GUID_PTR,
*mut CSSM_BOOL,
) -> CSSM_RETURN,
>>::ENCODING,
<Option<unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE) -> CSSM_RETURN>>::ENCODING,
<Option<
unsafe extern "C-unwind" fn(CSSM_MODULE_HANDLE, CSSM_UPCALLS_PTR) -> CSSM_RETURN,
>>::ENCODING,
<Option<
unsafe extern "C-unwind" fn(
CSSM_MODULE_HANDLE,
CSSM_PROC_ADDR,
CSSM_PROC_ADDR,
CSSM_PRIVILEGE,
*mut CSSM_PRIVILEGE,
CSSM_BITMASK,
*mut CSSM_BOOL,
) -> CSSM_RETURN,
>>::ENCODING,
<Option<unsafe extern "C-unwind" fn(*const CSSM_GUID) -> CSSM_RETURN>>::ENCODING,
<Option<
unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION) -> CSSM_RETURN,
>>::ENCODING,
],
);
}
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype",
feature = "objc2"
))]
unsafe impl RefEncode for cssm_state_funcs {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype"
))]
pub type CSSM_STATE_FUNCS = cssm_state_funcs;
#[deprecated]
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype"
))]
pub type CSSM_STATE_FUNCS_PTR = *mut cssm_state_funcs;
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype"
))]
#[deprecated]
#[repr(C)]
#[allow(unpredictable_function_pointer_comparisons)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_manager_registration_info {
pub Initialize: Option<unsafe extern "C-unwind" fn(uint32, uint32) -> CSSM_RETURN>,
pub Terminate: Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>,
pub RegisterDispatchTable:
Option<unsafe extern "C-unwind" fn(CSSM_STATE_FUNCS_PTR) -> CSSM_RETURN>,
pub DeregisterDispatchTable: Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>,
pub EventNotifyManager:
Option<unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION) -> CSSM_RETURN>,
pub RefreshFunctionTable:
Option<unsafe extern "C-unwind" fn(CSSM_FUNC_NAME_ADDR_PTR, uint32) -> CSSM_RETURN>,
}
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype",
feature = "objc2"
))]
unsafe impl Encode for cssm_manager_registration_info {
const ENCODING: Encoding = Encoding::Struct("cssm_manager_registration_info", &[
<Option<unsafe extern "C-unwind" fn(uint32,uint32,) -> CSSM_RETURN>>::ENCODING,
<Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>>::ENCODING,
<Option<unsafe extern "C-unwind" fn(CSSM_STATE_FUNCS_PTR,) -> CSSM_RETURN>>::ENCODING,
<Option<unsafe extern "C-unwind" fn() -> CSSM_RETURN>>::ENCODING,
<Option<unsafe extern "C-unwind" fn(*const CSSM_MANAGER_EVENT_NOTIFICATION,) -> CSSM_RETURN>>::ENCODING,
<Option<unsafe extern "C-unwind" fn(CSSM_FUNC_NAME_ADDR_PTR,uint32,) -> CSSM_RETURN>>::ENCODING,
]);
}
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype",
feature = "objc2"
))]
unsafe impl RefEncode for cssm_manager_registration_info {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype"
))]
pub type CSSM_MANAGER_REGISTRATION_INFO = cssm_manager_registration_info;
#[deprecated]
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmspi",
feature = "cssmtype",
feature = "emmtype"
))]
pub type CSSM_MANAGER_REGISTRATION_INFO_PTR = *mut cssm_manager_registration_info;
pub const CSSM_HINT_NONE: c_uint = 0;
pub const CSSM_HINT_ADDRESS_APP: c_uint = 1;
pub const CSSM_HINT_ADDRESS_SP: c_uint = 2;