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