objc2_intents/generated/
INSearchForPhotosIntent.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::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/intents/insearchforphotosintent?language=objc)
14    #[unsafe(super(INIntent, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "INIntent")]
17    #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
18    pub struct INSearchForPhotosIntent;
19);
20
21#[cfg(feature = "INIntent")]
22extern_conformance!(
23    unsafe impl NSCoding for INSearchForPhotosIntent {}
24);
25
26#[cfg(feature = "INIntent")]
27extern_conformance!(
28    unsafe impl NSCopying for INSearchForPhotosIntent {}
29);
30
31#[cfg(feature = "INIntent")]
32unsafe impl CopyingHelper for INSearchForPhotosIntent {
33    type Result = Self;
34}
35
36#[cfg(feature = "INIntent")]
37extern_conformance!(
38    unsafe impl NSObjectProtocol for INSearchForPhotosIntent {}
39);
40
41#[cfg(feature = "INIntent")]
42extern_conformance!(
43    unsafe impl NSSecureCoding for INSearchForPhotosIntent {}
44);
45
46#[cfg(feature = "INIntent")]
47impl INSearchForPhotosIntent {
48    extern_methods!(
49        #[cfg(all(
50            feature = "INDateComponentsRange",
51            feature = "INPerson",
52            feature = "INPhotoAttributeOptions",
53            feature = "objc2-core-location"
54        ))]
55        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
56        #[unsafe(method(initWithDateCreated:locationCreated:albumName:searchTerms:includedAttributes:excludedAttributes:peopleInPhoto:))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn initWithDateCreated_locationCreated_albumName_searchTerms_includedAttributes_excludedAttributes_peopleInPhoto(
59            this: Allocated<Self>,
60            date_created: Option<&INDateComponentsRange>,
61            location_created: Option<&CLPlacemark>,
62            album_name: Option<&NSString>,
63            search_terms: Option<&NSArray<NSString>>,
64            included_attributes: INPhotoAttributeOptions,
65            excluded_attributes: INPhotoAttributeOptions,
66            people_in_photo: Option<&NSArray<INPerson>>,
67        ) -> Retained<Self>;
68
69        #[cfg(feature = "INDateComponentsRange")]
70        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
71        #[unsafe(method(dateCreated))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn dateCreated(&self) -> Option<Retained<INDateComponentsRange>>;
74
75        #[cfg(feature = "objc2-core-location")]
76        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
77        #[unsafe(method(locationCreated))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn locationCreated(&self) -> Option<Retained<CLPlacemark>>;
80
81        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
82        #[unsafe(method(albumName))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn albumName(&self) -> Option<Retained<NSString>>;
85
86        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
87        #[unsafe(method(searchTerms))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn searchTerms(&self) -> Option<Retained<NSArray<NSString>>>;
90
91        #[cfg(feature = "INConditionalOperator")]
92        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
93        #[unsafe(method(searchTermsOperator))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn searchTermsOperator(&self) -> INConditionalOperator;
96
97        #[cfg(feature = "INPhotoAttributeOptions")]
98        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
99        #[unsafe(method(includedAttributes))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn includedAttributes(&self) -> INPhotoAttributeOptions;
102
103        #[cfg(feature = "INPhotoAttributeOptions")]
104        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
105        #[unsafe(method(excludedAttributes))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn excludedAttributes(&self) -> INPhotoAttributeOptions;
108
109        #[cfg(feature = "INPerson")]
110        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
111        #[unsafe(method(peopleInPhoto))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn peopleInPhoto(&self) -> Option<Retained<NSArray<INPerson>>>;
114
115        #[cfg(feature = "INConditionalOperator")]
116        #[deprecated = "INSearchForPhotosIntent is deprecated. There is no replacement."]
117        #[unsafe(method(peopleInPhotoOperator))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn peopleInPhotoOperator(&self) -> INConditionalOperator;
120    );
121}
122
123/// Methods declared on superclass `NSObject`.
124#[cfg(feature = "INIntent")]
125impl INSearchForPhotosIntent {
126    extern_methods!(
127        #[unsafe(method(init))]
128        #[unsafe(method_family = init)]
129        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
130
131        #[unsafe(method(new))]
132        #[unsafe(method_family = new)]
133        pub unsafe fn new() -> Retained<Self>;
134    );
135}
136
137extern_protocol!(
138    /// Protocol to declare support for handling an INSearchForPhotosIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
139    ///
140    /// 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.
141    ///
142    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insearchforphotosintenthandling?language=objc)
143    #[deprecated = "INSearchForPhotosIntentHandling is deprecated. There is no replacement."]
144    pub unsafe trait INSearchForPhotosIntentHandling: NSObjectProtocol {
145        #[cfg(all(
146            feature = "INIntent",
147            feature = "INIntentResponse",
148            feature = "INSearchForPhotosIntentResponse",
149            feature = "block2"
150        ))]
151        /// Handling method - Execute the task represented by the INSearchForPhotosIntent that's passed in
152        ///
153        /// Called to actually execute the intent. The app must return a response for this intent.
154        ///
155        ///
156        /// Parameter `intent`: The input intent
157        ///
158        /// Parameter `completion`: The response handling block takes a INSearchForPhotosIntentResponse containing the details of the result of having executed the intent
159        ///
160        ///
161        /// See: INSearchForPhotosIntentResponse
162        #[deprecated = "INSearchForPhotosIntentHandling is deprecated. There is no replacement."]
163        #[unsafe(method(handleSearchForPhotos:completion:))]
164        #[unsafe(method_family = none)]
165        unsafe fn handleSearchForPhotos_completion(
166            &self,
167            intent: &INSearchForPhotosIntent,
168            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForPhotosIntentResponse>)>,
169        );
170
171        #[cfg(all(
172            feature = "INIntent",
173            feature = "INIntentResponse",
174            feature = "INSearchForPhotosIntentResponse",
175            feature = "block2"
176        ))]
177        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
178        ///
179        /// 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.
180        ///
181        ///
182        /// Parameter `intent`: The input intent
183        ///
184        /// Parameter `completion`: The response block contains an INSearchForPhotosIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
185        ///
186        ///
187        /// See: INSearchForPhotosIntentResponse
188        #[deprecated = "INSearchForPhotosIntentHandling is deprecated. There is no replacement."]
189        #[optional]
190        #[unsafe(method(confirmSearchForPhotos:completion:))]
191        #[unsafe(method_family = none)]
192        unsafe fn confirmSearchForPhotos_completion(
193            &self,
194            intent: &INSearchForPhotosIntent,
195            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForPhotosIntentResponse>)>,
196        );
197
198        #[cfg(all(
199            feature = "INDateComponentsRangeResolutionResult",
200            feature = "INIntent",
201            feature = "INIntentResolutionResult",
202            feature = "block2"
203        ))]
204        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
205        ///
206        /// 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.
207        ///
208        ///
209        /// Parameter `intent`: The input intent
210        ///
211        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
212        ///
213        ///
214        /// See: INIntentResolutionResult
215        #[deprecated = "INSearchForPhotosIntentHandling is deprecated. There is no replacement."]
216        #[optional]
217        #[unsafe(method(resolveDateCreatedForSearchForPhotos:withCompletion:))]
218        #[unsafe(method_family = none)]
219        unsafe fn resolveDateCreatedForSearchForPhotos_withCompletion(
220            &self,
221            intent: &INSearchForPhotosIntent,
222            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
223        );
224
225        #[cfg(all(
226            feature = "INIntent",
227            feature = "INIntentResolutionResult",
228            feature = "INPlacemarkResolutionResult",
229            feature = "block2"
230        ))]
231        #[deprecated = "INSearchForPhotosIntentHandling is deprecated. There is no replacement."]
232        #[optional]
233        #[unsafe(method(resolveLocationCreatedForSearchForPhotos:withCompletion:))]
234        #[unsafe(method_family = none)]
235        unsafe fn resolveLocationCreatedForSearchForPhotos_withCompletion(
236            &self,
237            intent: &INSearchForPhotosIntent,
238            completion: &block2::DynBlock<dyn Fn(NonNull<INPlacemarkResolutionResult>)>,
239        );
240
241        #[cfg(all(
242            feature = "INIntent",
243            feature = "INIntentResolutionResult",
244            feature = "INStringResolutionResult",
245            feature = "block2"
246        ))]
247        #[deprecated = "INSearchForPhotosIntentHandling is deprecated. There is no replacement."]
248        #[optional]
249        #[unsafe(method(resolveAlbumNameForSearchForPhotos:withCompletion:))]
250        #[unsafe(method_family = none)]
251        unsafe fn resolveAlbumNameForSearchForPhotos_withCompletion(
252            &self,
253            intent: &INSearchForPhotosIntent,
254            completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
255        );
256
257        #[cfg(all(
258            feature = "INIntent",
259            feature = "INIntentResolutionResult",
260            feature = "INStringResolutionResult",
261            feature = "block2"
262        ))]
263        #[deprecated]
264        #[optional]
265        #[unsafe(method(resolveSearchTermsForSearchForPhotos:withCompletion:))]
266        #[unsafe(method_family = none)]
267        unsafe fn resolveSearchTermsForSearchForPhotos_withCompletion(
268            &self,
269            intent: &INSearchForPhotosIntent,
270            completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INStringResolutionResult>>)>,
271        );
272
273        #[cfg(all(
274            feature = "INIntent",
275            feature = "INIntentResolutionResult",
276            feature = "INPersonResolutionResult",
277            feature = "block2"
278        ))]
279        #[deprecated = "INSearchForPhotosIntentHandling is deprecated. There is no replacement."]
280        #[optional]
281        #[unsafe(method(resolvePeopleInPhotoForSearchForPhotos:withCompletion:))]
282        #[unsafe(method_family = none)]
283        unsafe fn resolvePeopleInPhotoForSearchForPhotos_withCompletion(
284            &self,
285            intent: &INSearchForPhotosIntent,
286            completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INPersonResolutionResult>>)>,
287        );
288    }
289);