objc2_call_kit/generated/
CXCallDirectoryExtensionContext.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait CXCallDirectoryExtensionContextDelegate: NSObjectProtocol {
13 #[unsafe(method(requestFailedForExtensionContext:withError:))]
14 #[unsafe(method_family = none)]
15 unsafe fn requestFailedForExtensionContext_withError(
16 &self,
17 extension_context: &CXCallDirectoryExtensionContext,
18 error: &NSError,
19 );
20 }
21);
22
23extern_class!(
24 #[unsafe(super(NSExtensionContext, NSObject))]
26 #[derive(Debug, PartialEq, Eq, Hash)]
27 pub struct CXCallDirectoryExtensionContext;
28);
29
30unsafe impl NSObjectProtocol for CXCallDirectoryExtensionContext {}
31
32impl CXCallDirectoryExtensionContext {
33 extern_methods!(
34 #[unsafe(method(delegate))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn delegate(
37 &self,
38 ) -> Option<Retained<ProtocolObject<dyn CXCallDirectoryExtensionContextDelegate>>>;
39
40 #[unsafe(method(setDelegate:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn setDelegate(
45 &self,
46 delegate: Option<&ProtocolObject<dyn CXCallDirectoryExtensionContextDelegate>>,
47 );
48
49 #[unsafe(method(isIncremental))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn isIncremental(&self) -> bool;
59
60 #[cfg(feature = "CXCallDirectory")]
61 #[unsafe(method(addBlockingEntryWithNextSequentialPhoneNumber:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn addBlockingEntryWithNextSequentialPhoneNumber(
64 &self,
65 phone_number: CXCallDirectoryPhoneNumber,
66 );
67
68 #[cfg(feature = "CXCallDirectory")]
69 #[unsafe(method(removeBlockingEntryWithPhoneNumber:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn removeBlockingEntryWithPhoneNumber(
79 &self,
80 phone_number: CXCallDirectoryPhoneNumber,
81 );
82
83 #[unsafe(method(removeAllBlockingEntries))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn removeAllBlockingEntries(&self);
90
91 #[cfg(feature = "CXCallDirectory")]
92 #[unsafe(method(addIdentificationEntryWithNextSequentialPhoneNumber:label:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn addIdentificationEntryWithNextSequentialPhoneNumber_label(
95 &self,
96 phone_number: CXCallDirectoryPhoneNumber,
97 label: &NSString,
98 );
99
100 #[cfg(feature = "CXCallDirectory")]
101 #[unsafe(method(removeIdentificationEntryWithPhoneNumber:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn removeIdentificationEntryWithPhoneNumber(
112 &self,
113 phone_number: CXCallDirectoryPhoneNumber,
114 );
115
116 #[unsafe(method(removeAllIdentificationEntries))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn removeAllIdentificationEntries(&self);
123
124 #[cfg(feature = "block2")]
125 #[unsafe(method(completeRequestWithCompletionHandler:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn completeRequestWithCompletionHandler(
128 &self,
129 completion: Option<&block2::Block<dyn Fn(Bool)>>,
130 );
131
132 #[cfg(feature = "block2")]
133 #[unsafe(method(completeRequestReturningItems:completionHandler:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn completeRequestReturningItems_completionHandler(
136 &self,
137 items: Option<&NSArray>,
138 completion_handler: Option<&block2::Block<dyn Fn(Bool)>>,
139 );
140 );
141}
142
143impl CXCallDirectoryExtensionContext {
145 extern_methods!(
146 #[unsafe(method(init))]
147 #[unsafe(method_family = init)]
148 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
149
150 #[unsafe(method(new))]
151 #[unsafe(method_family = new)]
152 pub unsafe fn new() -> Retained<Self>;
153 );
154}