use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;
use crate::*;
#[cfg(feature = "objc2-ui-kit")]
pub type MSPresentationAnchor = UIWindow;
extern_protocol!(
pub unsafe trait MSAuthenticationPresentationContext: NSObjectProtocol {
#[cfg(feature = "objc2-ui-kit")]
#[unsafe(method(presentationAnchor))]
#[unsafe(method_family = none)]
unsafe fn presentationAnchor(
&self,
mtm: MainThreadMarker,
) -> Option<Retained<MSPresentationAnchor>>;
}
);
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MSSetupSession;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MSSetupSession {}
);
impl MSSetupSession {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[cfg(feature = "MSServiceAccount")]
#[unsafe(method(initWithServiceAccount:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithServiceAccount(
this: Allocated<Self>,
service_account: &MSServiceAccount,
) -> Retained<Self>;
#[unsafe(method(startWithError:_))]
#[unsafe(method_family = none)]
pub unsafe fn startWithError(&self) -> Result<(), Retained<NSError>>;
#[unsafe(method(presentationContext))]
#[unsafe(method_family = none)]
pub unsafe fn presentationContext(
&self,
) -> Option<Retained<ProtocolObject<dyn MSAuthenticationPresentationContext>>>;
#[unsafe(method(setPresentationContext:))]
#[unsafe(method_family = none)]
pub unsafe fn setPresentationContext(
&self,
presentation_context: Option<&ProtocolObject<dyn MSAuthenticationPresentationContext>>,
);
#[cfg(feature = "MSServiceAccount")]
#[unsafe(method(account))]
#[unsafe(method_family = none)]
pub unsafe fn account(&self) -> Retained<MSServiceAccount>;
);
}