objc2_intents/generated/
INStartPhotoPlaybackIntent.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/instartphotoplaybackintent?language=objc)
14    #[unsafe(super(INIntent, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "INIntent")]
17    #[deprecated = "INStartPhotoPlaybackIntent is deprecated. There is no replacement."]
18    pub struct INStartPhotoPlaybackIntent;
19);
20
21#[cfg(feature = "INIntent")]
22extern_conformance!(
23    unsafe impl NSCoding for INStartPhotoPlaybackIntent {}
24);
25
26#[cfg(feature = "INIntent")]
27extern_conformance!(
28    unsafe impl NSCopying for INStartPhotoPlaybackIntent {}
29);
30
31#[cfg(feature = "INIntent")]
32unsafe impl CopyingHelper for INStartPhotoPlaybackIntent {
33    type Result = Self;
34}
35
36#[cfg(feature = "INIntent")]
37extern_conformance!(
38    unsafe impl NSObjectProtocol for INStartPhotoPlaybackIntent {}
39);
40
41#[cfg(feature = "INIntent")]
42extern_conformance!(
43    unsafe impl NSSecureCoding for INStartPhotoPlaybackIntent {}
44);
45
46#[cfg(feature = "INIntent")]
47impl INStartPhotoPlaybackIntent {
48    extern_methods!(
49        #[cfg(all(
50            feature = "INDateComponentsRange",
51            feature = "INPerson",
52            feature = "INPhotoAttributeOptions",
53            feature = "objc2-core-location"
54        ))]
55        #[deprecated = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 = "INStartPhotoPlaybackIntent 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 INStartPhotoPlaybackIntent {
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 INStartPhotoPlaybackIntent. 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/instartphotoplaybackintenthandling?language=objc)
143    #[deprecated = "INStartPhotoPlaybackIntentHandling is deprecated. There is no replacement."]
144    pub unsafe trait INStartPhotoPlaybackIntentHandling: NSObjectProtocol {
145        #[cfg(all(
146            feature = "INIntent",
147            feature = "INIntentResponse",
148            feature = "INStartPhotoPlaybackIntentResponse",
149            feature = "block2"
150        ))]
151        /// Handling method - Execute the task represented by the INStartPhotoPlaybackIntent 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 INStartPhotoPlaybackIntentResponse containing the details of the result of having executed the intent
159        ///
160        ///
161        /// See: INStartPhotoPlaybackIntentResponse
162        #[deprecated = "INStartPhotoPlaybackIntentHandling is deprecated. There is no replacement."]
163        #[unsafe(method(handleStartPhotoPlayback:completion:))]
164        #[unsafe(method_family = none)]
165        unsafe fn handleStartPhotoPlayback_completion(
166            &self,
167            intent: &INStartPhotoPlaybackIntent,
168            completion: &block2::DynBlock<dyn Fn(NonNull<INStartPhotoPlaybackIntentResponse>)>,
169        );
170
171        #[cfg(all(
172            feature = "INIntent",
173            feature = "INIntentResponse",
174            feature = "INStartPhotoPlaybackIntentResponse",
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 INStartPhotoPlaybackIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
185        ///
186        ///
187        /// See: INStartPhotoPlaybackIntentResponse
188        #[deprecated = "INStartPhotoPlaybackIntentHandling is deprecated. There is no replacement."]
189        #[optional]
190        #[unsafe(method(confirmStartPhotoPlayback:completion:))]
191        #[unsafe(method_family = none)]
192        unsafe fn confirmStartPhotoPlayback_completion(
193            &self,
194            intent: &INStartPhotoPlaybackIntent,
195            completion: &block2::DynBlock<dyn Fn(NonNull<INStartPhotoPlaybackIntentResponse>)>,
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 = "INStartPhotoPlaybackIntentHandling is deprecated. There is no replacement."]
216        #[optional]
217        #[unsafe(method(resolveDateCreatedForStartPhotoPlayback:withCompletion:))]
218        #[unsafe(method_family = none)]
219        unsafe fn resolveDateCreatedForStartPhotoPlayback_withCompletion(
220            &self,
221            intent: &INStartPhotoPlaybackIntent,
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 = "INStartPhotoPlaybackIntentHandling is deprecated. There is no replacement."]
232        #[optional]
233        #[unsafe(method(resolveLocationCreatedForStartPhotoPlayback:withCompletion:))]
234        #[unsafe(method_family = none)]
235        unsafe fn resolveLocationCreatedForStartPhotoPlayback_withCompletion(
236            &self,
237            intent: &INStartPhotoPlaybackIntent,
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 = "INStartPhotoPlaybackIntentHandling is deprecated. There is no replacement."]
248        #[optional]
249        #[unsafe(method(resolveAlbumNameForStartPhotoPlayback:withCompletion:))]
250        #[unsafe(method_family = none)]
251        unsafe fn resolveAlbumNameForStartPhotoPlayback_withCompletion(
252            &self,
253            intent: &INStartPhotoPlaybackIntent,
254            completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
255        );
256
257        #[cfg(all(
258            feature = "INIntent",
259            feature = "INIntentResolutionResult",
260            feature = "INPersonResolutionResult",
261            feature = "block2"
262        ))]
263        #[deprecated = "INStartPhotoPlaybackIntentHandling is deprecated. There is no replacement."]
264        #[optional]
265        #[unsafe(method(resolvePeopleInPhotoForStartPhotoPlayback:withCompletion:))]
266        #[unsafe(method_family = none)]
267        unsafe fn resolvePeopleInPhotoForStartPhotoPlayback_withCompletion(
268            &self,
269            intent: &INStartPhotoPlaybackIntent,
270            completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INPersonResolutionResult>>)>,
271        );
272    }
273);