objc2_intents/generated/
INSearchCallHistoryIntent.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/intents/insearchcallhistoryintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INSearchCallHistoryIntent is deprecated. There is no replacement."]
16    pub struct INSearchCallHistoryIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INSearchCallHistoryIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INSearchCallHistoryIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INSearchCallHistoryIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INSearchCallHistoryIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INSearchCallHistoryIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INSearchCallHistoryIntent {
46    extern_methods!(
47        #[cfg(all(
48            feature = "INCallCapabilityOptions",
49            feature = "INCallRecordTypeOptions",
50            feature = "INDateComponentsRange",
51            feature = "INPerson"
52        ))]
53        #[unsafe(method(initWithDateCreated:recipient:callCapabilities:callTypes:unseen:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithDateCreated_recipient_callCapabilities_callTypes_unseen(
56            this: Allocated<Self>,
57            date_created: Option<&INDateComponentsRange>,
58            recipient: Option<&INPerson>,
59            call_capabilities: INCallCapabilityOptions,
60            call_types: INCallRecordTypeOptions,
61            unseen: Option<&NSNumber>,
62        ) -> Retained<Self>;
63
64        #[cfg(feature = "INDateComponentsRange")]
65        #[deprecated = "INSearchCallHistoryIntent is deprecated. There is no replacement."]
66        #[unsafe(method(dateCreated))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn dateCreated(&self) -> Option<Retained<INDateComponentsRange>>;
69
70        #[cfg(feature = "INPerson")]
71        #[deprecated = "INSearchCallHistoryIntent is deprecated. There is no replacement."]
72        #[unsafe(method(recipient))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn recipient(&self) -> Option<Retained<INPerson>>;
75
76        #[cfg(feature = "INCallCapabilityOptions")]
77        #[deprecated = "INSearchCallHistoryIntent is deprecated. There is no replacement."]
78        #[unsafe(method(callCapabilities))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn callCapabilities(&self) -> INCallCapabilityOptions;
81
82        #[cfg(feature = "INCallRecordTypeOptions")]
83        #[unsafe(method(callTypes))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn callTypes(&self) -> INCallRecordTypeOptions;
86
87        #[unsafe(method(unseen))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn unseen(&self) -> Option<Retained<NSNumber>>;
90    );
91}
92
93/// Methods declared on superclass `NSObject`.
94#[cfg(feature = "INIntent")]
95impl INSearchCallHistoryIntent {
96    extern_methods!(
97        #[unsafe(method(init))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
100
101        #[unsafe(method(new))]
102        #[unsafe(method_family = new)]
103        pub unsafe fn new() -> Retained<Self>;
104    );
105}
106
107extern_protocol!(
108    /// Protocol to declare support for handling an INSearchCallHistoryIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
109    ///
110    /// The minimum requirement for an implementing class is that it should be able to handle the intent. The resolution and confirmation methods are optional. The handling method is always called last, after resolving and confirming the intent.
111    ///
112    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insearchcallhistoryintenthandling?language=objc)
113    #[deprecated = "INSearchCallHistoryIntentHandling is deprecated. There is no replacement."]
114    pub unsafe trait INSearchCallHistoryIntentHandling: NSObjectProtocol {
115        #[cfg(all(
116            feature = "INIntent",
117            feature = "INIntentResponse",
118            feature = "INSearchCallHistoryIntentResponse",
119            feature = "block2"
120        ))]
121        /// Handling method - Execute the task represented by the INSearchCallHistoryIntent that's passed in
122        ///
123        /// Called to actually execute the intent. The app must return a response for this intent.
124        ///
125        ///
126        /// Parameter `intent`: The input intent
127        ///
128        /// Parameter `completion`: The response handling block takes a INSearchCallHistoryIntentResponse containing the details of the result of having executed the intent
129        ///
130        ///
131        /// See: INSearchCallHistoryIntentResponse
132        #[deprecated = "INSearchCallHistoryIntentHandling is deprecated. There is no replacement."]
133        #[unsafe(method(handleSearchCallHistory:completion:))]
134        #[unsafe(method_family = none)]
135        unsafe fn handleSearchCallHistory_completion(
136            &self,
137            intent: &INSearchCallHistoryIntent,
138            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchCallHistoryIntentResponse>)>,
139        );
140
141        #[cfg(all(
142            feature = "INIntent",
143            feature = "INIntentResponse",
144            feature = "INSearchCallHistoryIntentResponse",
145            feature = "block2"
146        ))]
147        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
148        ///
149        /// Called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid following resolution, and will assume there is no additional information relevant to this intent.
150        ///
151        ///
152        /// Parameter `intent`: The input intent
153        ///
154        /// Parameter `completion`: The response block contains an INSearchCallHistoryIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
155        ///
156        ///
157        /// See: INSearchCallHistoryIntentResponse
158        #[deprecated = "INSearchCallHistoryIntentHandling is deprecated. There is no replacement."]
159        #[optional]
160        #[unsafe(method(confirmSearchCallHistory:completion:))]
161        #[unsafe(method_family = none)]
162        unsafe fn confirmSearchCallHistory_completion(
163            &self,
164            intent: &INSearchCallHistoryIntent,
165            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchCallHistoryIntentResponse>)>,
166        );
167
168        #[cfg(all(
169            feature = "INCallRecordTypeResolutionResult",
170            feature = "INIntent",
171            feature = "INIntentResolutionResult",
172            feature = "block2"
173        ))]
174        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
175        ///
176        /// Called to make sure the app extension is capable of handling this intent in its current form. This method is for validating if the intent needs any further fleshing out.
177        ///
178        ///
179        /// Parameter `intent`: The input intent
180        ///
181        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
182        ///
183        ///
184        /// See: INIntentResolutionResult
185        #[deprecated = "INSearchCallHistoryIntentHandling is deprecated. There is no replacement."]
186        #[optional]
187        #[unsafe(method(resolveCallTypeForSearchCallHistory:withCompletion:))]
188        #[unsafe(method_family = none)]
189        unsafe fn resolveCallTypeForSearchCallHistory_withCompletion(
190            &self,
191            intent: &INSearchCallHistoryIntent,
192            completion: &block2::DynBlock<dyn Fn(NonNull<INCallRecordTypeResolutionResult>)>,
193        );
194
195        #[cfg(all(
196            feature = "INDateComponentsRangeResolutionResult",
197            feature = "INIntent",
198            feature = "INIntentResolutionResult",
199            feature = "block2"
200        ))]
201        #[deprecated = "INSearchCallHistoryIntentHandling is deprecated. There is no replacement."]
202        #[optional]
203        #[unsafe(method(resolveDateCreatedForSearchCallHistory:withCompletion:))]
204        #[unsafe(method_family = none)]
205        unsafe fn resolveDateCreatedForSearchCallHistory_withCompletion(
206            &self,
207            intent: &INSearchCallHistoryIntent,
208            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
209        );
210
211        #[cfg(all(
212            feature = "INIntent",
213            feature = "INIntentResolutionResult",
214            feature = "INPersonResolutionResult",
215            feature = "block2"
216        ))]
217        #[deprecated = "INSearchCallHistoryIntentHandling is deprecated. There is no replacement."]
218        #[optional]
219        #[unsafe(method(resolveRecipientForSearchCallHistory:withCompletion:))]
220        #[unsafe(method_family = none)]
221        unsafe fn resolveRecipientForSearchCallHistory_withCompletion(
222            &self,
223            intent: &INSearchCallHistoryIntent,
224            completion: &block2::DynBlock<dyn Fn(NonNull<INPersonResolutionResult>)>,
225        );
226
227        #[cfg(all(
228            feature = "INCallRecordTypeOptionsResolutionResult",
229            feature = "INIntent",
230            feature = "INIntentResolutionResult",
231            feature = "block2"
232        ))]
233        #[optional]
234        #[unsafe(method(resolveCallTypesForSearchCallHistory:withCompletion:))]
235        #[unsafe(method_family = none)]
236        unsafe fn resolveCallTypesForSearchCallHistory_withCompletion(
237            &self,
238            intent: &INSearchCallHistoryIntent,
239            completion: &block2::DynBlock<dyn Fn(NonNull<INCallRecordTypeOptionsResolutionResult>)>,
240        );
241
242        #[cfg(all(
243            feature = "INBooleanResolutionResult",
244            feature = "INIntent",
245            feature = "INIntentResolutionResult",
246            feature = "block2"
247        ))]
248        #[optional]
249        #[unsafe(method(resolveUnseenForSearchCallHistory:withCompletion:))]
250        #[unsafe(method_family = none)]
251        unsafe fn resolveUnseenForSearchCallHistory_withCompletion(
252            &self,
253            intent: &INSearchCallHistoryIntent,
254            completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
255        );
256    }
257);