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
30extern_conformance!(
31 unsafe impl NSObjectProtocol for CXCallDirectoryExtensionContext {}
32);
33
34impl CXCallDirectoryExtensionContext {
35 extern_methods!(
36 #[unsafe(method(delegate))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn delegate(
39 &self,
40 ) -> Option<Retained<ProtocolObject<dyn CXCallDirectoryExtensionContextDelegate>>>;
41
42 #[unsafe(method(setDelegate:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn setDelegate(
47 &self,
48 delegate: Option<&ProtocolObject<dyn CXCallDirectoryExtensionContextDelegate>>,
49 );
50
51 #[unsafe(method(isIncremental))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn isIncremental(&self) -> bool;
61
62 #[cfg(feature = "CXCallDirectory")]
63 #[unsafe(method(addBlockingEntryWithNextSequentialPhoneNumber:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn addBlockingEntryWithNextSequentialPhoneNumber(
66 &self,
67 phone_number: CXCallDirectoryPhoneNumber,
68 );
69
70 #[cfg(feature = "CXCallDirectory")]
71 #[unsafe(method(removeBlockingEntryWithPhoneNumber:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn removeBlockingEntryWithPhoneNumber(
81 &self,
82 phone_number: CXCallDirectoryPhoneNumber,
83 );
84
85 #[unsafe(method(removeAllBlockingEntries))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn removeAllBlockingEntries(&self);
92
93 #[cfg(feature = "CXCallDirectory")]
94 #[unsafe(method(addIdentificationEntryWithNextSequentialPhoneNumber:label:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn addIdentificationEntryWithNextSequentialPhoneNumber_label(
97 &self,
98 phone_number: CXCallDirectoryPhoneNumber,
99 label: &NSString,
100 );
101
102 #[cfg(feature = "CXCallDirectory")]
103 #[unsafe(method(removeIdentificationEntryWithPhoneNumber:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn removeIdentificationEntryWithPhoneNumber(
114 &self,
115 phone_number: CXCallDirectoryPhoneNumber,
116 );
117
118 #[unsafe(method(removeAllIdentificationEntries))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn removeAllIdentificationEntries(&self);
125
126 #[cfg(feature = "block2")]
127 #[unsafe(method(completeRequestWithCompletionHandler:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn completeRequestWithCompletionHandler(
130 &self,
131 completion: Option<&block2::DynBlock<dyn Fn(Bool)>>,
132 );
133
134 #[cfg(feature = "block2")]
135 #[unsafe(method(completeRequestReturningItems:completionHandler:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn completeRequestReturningItems_completionHandler(
138 &self,
139 items: Option<&NSArray>,
140 completion_handler: Option<&block2::DynBlock<dyn Fn(Bool)>>,
141 );
142 );
143}
144
145impl CXCallDirectoryExtensionContext {
147 extern_methods!(
148 #[unsafe(method(init))]
149 #[unsafe(method_family = init)]
150 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
151
152 #[unsafe(method(new))]
153 #[unsafe(method_family = new)]
154 pub unsafe fn new() -> Retained<Self>;
155 );
156}