objc2_call_kit/generated/
CXCallDirectoryManager.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct CXCallDirectoryEnabledStatus(pub NSInteger);
15impl CXCallDirectoryEnabledStatus {
16 #[doc(alias = "CXCallDirectoryEnabledStatusUnknown")]
17 pub const Unknown: Self = Self(0);
18 #[doc(alias = "CXCallDirectoryEnabledStatusDisabled")]
19 pub const Disabled: Self = Self(1);
20 #[doc(alias = "CXCallDirectoryEnabledStatusEnabled")]
21 pub const Enabled: Self = Self(2);
22}
23
24unsafe impl Encode for CXCallDirectoryEnabledStatus {
25 const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for CXCallDirectoryEnabledStatus {
29 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32extern_class!(
33 #[unsafe(super(NSObject))]
35 #[derive(Debug, PartialEq, Eq, Hash)]
36 pub struct CXCallDirectoryManager;
37);
38
39unsafe impl NSObjectProtocol for CXCallDirectoryManager {}
40
41impl CXCallDirectoryManager {
42 extern_methods!(
43 #[unsafe(method(sharedInstance))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn sharedInstance() -> Retained<CXCallDirectoryManager>;
46
47 #[cfg(feature = "block2")]
48 #[unsafe(method(reloadExtensionWithIdentifier:completionHandler:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn reloadExtensionWithIdentifier_completionHandler(
51 &self,
52 identifier: &NSString,
53 completion: Option<&block2::Block<dyn Fn(*mut NSError)>>,
54 );
55
56 #[cfg(feature = "block2")]
57 #[unsafe(method(getEnabledStatusForExtensionWithIdentifier:completionHandler:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn getEnabledStatusForExtensionWithIdentifier_completionHandler(
60 &self,
61 identifier: &NSString,
62 completion: &block2::Block<dyn Fn(CXCallDirectoryEnabledStatus, *mut NSError)>,
63 );
64
65 #[cfg(feature = "block2")]
66 #[unsafe(method(openSettingsWithCompletionHandler:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn openSettingsWithCompletionHandler(
69 &self,
70 completion: Option<&block2::Block<dyn Fn(*mut NSError)>>,
71 );
72 );
73}
74
75impl CXCallDirectoryManager {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new() -> Retained<Self>;
85 );
86}