use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct EPDeveloperToolStatus(pub NSInteger);
impl EPDeveloperToolStatus {
#[doc(alias = "EPDeveloperToolStatusNotDetermined")]
pub const NotDetermined: Self = Self(0);
#[doc(alias = "EPDeveloperToolStatusRestricted")]
pub const Restricted: Self = Self(1);
#[doc(alias = "EPDeveloperToolStatusDenied")]
pub const Denied: Self = Self(2);
#[doc(alias = "EPDeveloperToolStatusAuthorized")]
pub const Authorized: Self = Self(3);
}
unsafe impl Encode for EPDeveloperToolStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for EPDeveloperToolStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct EPDeveloperTool;
);
extern_conformance!(
unsafe impl NSObjectProtocol for EPDeveloperTool {}
);
impl EPDeveloperTool {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(authorizationStatus))]
#[unsafe(method_family = none)]
pub unsafe fn authorizationStatus(&self) -> EPDeveloperToolStatus;
#[cfg(feature = "block2")]
#[unsafe(method(requestDeveloperToolAccessWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn requestDeveloperToolAccessWithCompletionHandler(
&self,
handler: &block2::DynBlock<dyn Fn(Bool)>,
);
);
}
impl EPDeveloperTool {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}