icrate/generated/CallKit/
CXCallDirectoryExtensionContext.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::CallKit::*;
5use crate::Foundation::*;
6
7extern_protocol!(
8    pub unsafe trait CXCallDirectoryExtensionContextDelegate: NSObjectProtocol {
9        #[cfg(all(
10            feature = "CallKit_CXCallDirectoryExtensionContext",
11            feature = "Foundation_NSError"
12        ))]
13        #[method(requestFailedForExtensionContext:withError:)]
14        unsafe fn requestFailedForExtensionContext_withError(
15            &self,
16            extension_context: &CXCallDirectoryExtensionContext,
17            error: &NSError,
18        );
19    }
20
21    unsafe impl ProtocolType for dyn CXCallDirectoryExtensionContextDelegate {}
22);
23
24extern_class!(
25    #[derive(Debug, PartialEq, Eq, Hash)]
26    #[cfg(feature = "CallKit_CXCallDirectoryExtensionContext")]
27    pub struct CXCallDirectoryExtensionContext;
28
29    #[cfg(feature = "CallKit_CXCallDirectoryExtensionContext")]
30    unsafe impl ClassType for CXCallDirectoryExtensionContext {
31        #[inherits(NSObject)]
32        type Super = NSExtensionContext;
33        type Mutability = InteriorMutable;
34    }
35);
36
37#[cfg(feature = "CallKit_CXCallDirectoryExtensionContext")]
38unsafe impl NSObjectProtocol for CXCallDirectoryExtensionContext {}
39
40extern_methods!(
41    #[cfg(feature = "CallKit_CXCallDirectoryExtensionContext")]
42    unsafe impl CXCallDirectoryExtensionContext {
43        #[method_id(@__retain_semantics Other delegate)]
44        pub unsafe fn delegate(
45            &self,
46        ) -> Option<Id<ProtocolObject<dyn CXCallDirectoryExtensionContextDelegate>>>;
47
48        #[method(setDelegate:)]
49        pub unsafe fn setDelegate(
50            &self,
51            delegate: Option<&ProtocolObject<dyn CXCallDirectoryExtensionContextDelegate>>,
52        );
53
54        #[method(isIncremental)]
55        pub unsafe fn isIncremental(&self) -> bool;
56
57        #[method(addBlockingEntryWithNextSequentialPhoneNumber:)]
58        pub unsafe fn addBlockingEntryWithNextSequentialPhoneNumber(
59            &self,
60            phone_number: CXCallDirectoryPhoneNumber,
61        );
62
63        #[method(removeBlockingEntryWithPhoneNumber:)]
64        pub unsafe fn removeBlockingEntryWithPhoneNumber(
65            &self,
66            phone_number: CXCallDirectoryPhoneNumber,
67        );
68
69        #[method(removeAllBlockingEntries)]
70        pub unsafe fn removeAllBlockingEntries(&self);
71
72        #[cfg(feature = "Foundation_NSString")]
73        #[method(addIdentificationEntryWithNextSequentialPhoneNumber:label:)]
74        pub unsafe fn addIdentificationEntryWithNextSequentialPhoneNumber_label(
75            &self,
76            phone_number: CXCallDirectoryPhoneNumber,
77            label: &NSString,
78        );
79
80        #[method(removeIdentificationEntryWithPhoneNumber:)]
81        pub unsafe fn removeIdentificationEntryWithPhoneNumber(
82            &self,
83            phone_number: CXCallDirectoryPhoneNumber,
84        );
85
86        #[method(removeAllIdentificationEntries)]
87        pub unsafe fn removeAllIdentificationEntries(&self);
88
89        #[method(completeRequestWithCompletionHandler:)]
90        pub unsafe fn completeRequestWithCompletionHandler(
91            &self,
92            completion: Option<&Block<(Bool,), ()>>,
93        );
94
95        #[cfg(feature = "Foundation_NSArray")]
96        #[method(completeRequestReturningItems:completionHandler:)]
97        pub unsafe fn completeRequestReturningItems_completionHandler(
98            &self,
99            items: Option<&NSArray>,
100            completion_handler: Option<&Block<(Bool,), ()>>,
101        );
102    }
103);
104
105extern_methods!(
106    /// Methods declared on superclass `NSObject`
107    #[cfg(feature = "CallKit_CXCallDirectoryExtensionContext")]
108    unsafe impl CXCallDirectoryExtensionContext {
109        #[method_id(@__retain_semantics Init init)]
110        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
111
112        #[method_id(@__retain_semantics New new)]
113        pub unsafe fn new() -> Id<Self>;
114    }
115);