#[cfg(feature = "block2")]
use block2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct DCAppAttestService;
unsafe impl ClassType for DCAppAttestService {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for DCAppAttestService {}
extern_methods!(
unsafe impl DCAppAttestService {
#[method_id(@__retain_semantics Other sharedService)]
pub unsafe fn sharedService() -> Id<DCAppAttestService>;
#[method(isSupported)]
pub unsafe fn isSupported(&self) -> bool;
#[cfg(feature = "block2")]
#[method(generateKeyWithCompletionHandler:)]
pub unsafe fn generateKeyWithCompletionHandler(
&self,
completion_handler: &Block<dyn Fn(*mut NSString, *mut NSError)>,
);
#[cfg(feature = "block2")]
#[method(attestKey:clientDataHash:completionHandler:)]
pub unsafe fn attestKey_clientDataHash_completionHandler(
&self,
key_id: &NSString,
client_data_hash: &NSData,
completion_handler: &Block<dyn Fn(*mut NSData, *mut NSError)>,
);
#[cfg(feature = "block2")]
#[method(generateAssertion:clientDataHash:completionHandler:)]
pub unsafe fn generateAssertion_clientDataHash_completionHandler(
&self,
key_id: &NSString,
client_data_hash: &NSData,
completion_handler: &Block<dyn Fn(*mut NSData, *mut NSError)>,
);
}
);
extern_methods!(
unsafe impl DCAppAttestService {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);