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
39extern_conformance!(
40 unsafe impl NSObjectProtocol for CXCallDirectoryManager {}
41);
42
43impl CXCallDirectoryManager {
44 extern_methods!(
45 #[unsafe(method(sharedInstance))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn sharedInstance() -> Retained<CXCallDirectoryManager>;
48
49 #[cfg(feature = "block2")]
50 #[unsafe(method(reloadExtensionWithIdentifier:completionHandler:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn reloadExtensionWithIdentifier_completionHandler(
53 &self,
54 identifier: &NSString,
55 completion: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
56 );
57
58 #[cfg(feature = "block2")]
59 #[unsafe(method(getEnabledStatusForExtensionWithIdentifier:completionHandler:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn getEnabledStatusForExtensionWithIdentifier_completionHandler(
62 &self,
63 identifier: &NSString,
64 completion: &block2::DynBlock<dyn Fn(CXCallDirectoryEnabledStatus, *mut NSError)>,
65 );
66
67 #[cfg(feature = "block2")]
68 #[unsafe(method(openSettingsWithCompletionHandler:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn openSettingsWithCompletionHandler(
71 &self,
72 completion: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
73 );
74 );
75}
76
77impl CXCallDirectoryManager {
79 extern_methods!(
80 #[unsafe(method(init))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84 #[unsafe(method(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new() -> Retained<Self>;
87 );
88}