objc2_intents/generated/
INSetRadioStationIntent.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/insetradiostationintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INSetRadioStationIntent is deprecated. There is no replacement."]
16    pub struct INSetRadioStationIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INSetRadioStationIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INSetRadioStationIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INSetRadioStationIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INSetRadioStationIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INSetRadioStationIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INSetRadioStationIntent {
46    extern_methods!(
47        #[cfg(feature = "INRadioType")]
48        #[deprecated = "INSetRadioStationIntent is deprecated. There is no replacement."]
49        #[unsafe(method(initWithRadioType:frequency:stationName:channel:presetNumber:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithRadioType_frequency_stationName_channel_presetNumber(
52            this: Allocated<Self>,
53            radio_type: INRadioType,
54            frequency: Option<&NSNumber>,
55            station_name: Option<&NSString>,
56            channel: Option<&NSString>,
57            preset_number: Option<&NSNumber>,
58        ) -> Retained<Self>;
59
60        #[cfg(feature = "INRadioType")]
61        #[deprecated = "INSetRadioStationIntent is deprecated. There is no replacement."]
62        #[unsafe(method(radioType))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn radioType(&self) -> INRadioType;
65
66        #[deprecated = "INSetRadioStationIntent is deprecated. There is no replacement."]
67        #[unsafe(method(frequency))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn frequency(&self) -> Option<Retained<NSNumber>>;
70
71        #[deprecated = "INSetRadioStationIntent is deprecated. There is no replacement."]
72        #[unsafe(method(stationName))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn stationName(&self) -> Option<Retained<NSString>>;
75
76        #[deprecated = "INSetRadioStationIntent is deprecated. There is no replacement."]
77        #[unsafe(method(channel))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn channel(&self) -> Option<Retained<NSString>>;
80
81        #[deprecated = "INSetRadioStationIntent is deprecated. There is no replacement."]
82        #[unsafe(method(presetNumber))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn presetNumber(&self) -> Option<Retained<NSNumber>>;
85    );
86}
87
88/// Methods declared on superclass `NSObject`.
89#[cfg(feature = "INIntent")]
90impl INSetRadioStationIntent {
91    extern_methods!(
92        #[unsafe(method(init))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
95
96        #[unsafe(method(new))]
97        #[unsafe(method_family = new)]
98        pub unsafe fn new() -> Retained<Self>;
99    );
100}
101
102extern_protocol!(
103    /// Protocol to declare support for handling an INSetRadioStationIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
104    ///
105    /// 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.
106    ///
107    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insetradiostationintenthandling?language=objc)
108    #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
109    pub unsafe trait INSetRadioStationIntentHandling: NSObjectProtocol {
110        #[cfg(all(
111            feature = "INIntent",
112            feature = "INIntentResponse",
113            feature = "INSetRadioStationIntentResponse",
114            feature = "block2"
115        ))]
116        /// Handling method - Execute the task represented by the INSetRadioStationIntent that's passed in
117        ///
118        /// Called to actually execute the intent. The app must return a response for this intent.
119        ///
120        ///
121        /// Parameter `intent`: The input intent
122        ///
123        /// Parameter `completion`: The response handling block takes a INSetRadioStationIntentResponse containing the details of the result of having executed the intent
124        ///
125        ///
126        /// See: INSetRadioStationIntentResponse
127        #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
128        #[unsafe(method(handleSetRadioStation:completion:))]
129        #[unsafe(method_family = none)]
130        unsafe fn handleSetRadioStation_completion(
131            &self,
132            intent: &INSetRadioStationIntent,
133            completion: &block2::DynBlock<dyn Fn(NonNull<INSetRadioStationIntentResponse>)>,
134        );
135
136        #[cfg(all(
137            feature = "INIntent",
138            feature = "INIntentResponse",
139            feature = "INSetRadioStationIntentResponse",
140            feature = "block2"
141        ))]
142        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
143        ///
144        /// 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.
145        ///
146        ///
147        /// Parameter `intent`: The input intent
148        ///
149        /// Parameter `completion`: The response block contains an INSetRadioStationIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
150        ///
151        ///
152        /// See: INSetRadioStationIntentResponse
153        #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
154        #[optional]
155        #[unsafe(method(confirmSetRadioStation:completion:))]
156        #[unsafe(method_family = none)]
157        unsafe fn confirmSetRadioStation_completion(
158            &self,
159            intent: &INSetRadioStationIntent,
160            completion: &block2::DynBlock<dyn Fn(NonNull<INSetRadioStationIntentResponse>)>,
161        );
162
163        #[cfg(all(
164            feature = "INIntent",
165            feature = "INIntentResolutionResult",
166            feature = "INRadioTypeResolutionResult",
167            feature = "block2"
168        ))]
169        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
170        ///
171        /// 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.
172        ///
173        ///
174        /// Parameter `intent`: The input intent
175        ///
176        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
177        ///
178        ///
179        /// See: INIntentResolutionResult
180        #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
181        #[optional]
182        #[unsafe(method(resolveRadioTypeForSetRadioStation:withCompletion:))]
183        #[unsafe(method_family = none)]
184        unsafe fn resolveRadioTypeForSetRadioStation_withCompletion(
185            &self,
186            intent: &INSetRadioStationIntent,
187            completion: &block2::DynBlock<dyn Fn(NonNull<INRadioTypeResolutionResult>)>,
188        );
189
190        #[cfg(all(
191            feature = "INDoubleResolutionResult",
192            feature = "INIntent",
193            feature = "INIntentResolutionResult",
194            feature = "block2"
195        ))]
196        #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
197        #[optional]
198        #[unsafe(method(resolveFrequencyForSetRadioStation:withCompletion:))]
199        #[unsafe(method_family = none)]
200        unsafe fn resolveFrequencyForSetRadioStation_withCompletion(
201            &self,
202            intent: &INSetRadioStationIntent,
203            completion: &block2::DynBlock<dyn Fn(NonNull<INDoubleResolutionResult>)>,
204        );
205
206        #[cfg(all(
207            feature = "INIntent",
208            feature = "INIntentResolutionResult",
209            feature = "INStringResolutionResult",
210            feature = "block2"
211        ))]
212        #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
213        #[optional]
214        #[unsafe(method(resolveStationNameForSetRadioStation:withCompletion:))]
215        #[unsafe(method_family = none)]
216        unsafe fn resolveStationNameForSetRadioStation_withCompletion(
217            &self,
218            intent: &INSetRadioStationIntent,
219            completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
220        );
221
222        #[cfg(all(
223            feature = "INIntent",
224            feature = "INIntentResolutionResult",
225            feature = "INStringResolutionResult",
226            feature = "block2"
227        ))]
228        #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
229        #[optional]
230        #[unsafe(method(resolveChannelForSetRadioStation:withCompletion:))]
231        #[unsafe(method_family = none)]
232        unsafe fn resolveChannelForSetRadioStation_withCompletion(
233            &self,
234            intent: &INSetRadioStationIntent,
235            completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
236        );
237
238        #[cfg(all(
239            feature = "INIntegerResolutionResult",
240            feature = "INIntent",
241            feature = "INIntentResolutionResult",
242            feature = "block2"
243        ))]
244        #[deprecated = "INSetRadioStationIntentHandling is deprecated. There is no replacement."]
245        #[optional]
246        #[unsafe(method(resolvePresetNumberForSetRadioStation:withCompletion:))]
247        #[unsafe(method_family = none)]
248        unsafe fn resolvePresetNumberForSetRadioStation_withCompletion(
249            &self,
250            intent: &INSetRadioStationIntent,
251            completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
252        );
253    }
254);