objc2_intents/generated/
INAppendToNoteIntent.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/inappendtonoteintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INAppendToNoteIntent is deprecated. There is no replacement."]
16    pub struct INAppendToNoteIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INAppendToNoteIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INAppendToNoteIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INAppendToNoteIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INAppendToNoteIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INAppendToNoteIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INAppendToNoteIntent {
46    extern_methods!(
47        #[cfg(all(feature = "INNote", feature = "INNoteContent"))]
48        #[deprecated = "INAppendToNoteIntent is deprecated. There is no replacement."]
49        #[unsafe(method(initWithTargetNote:content:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithTargetNote_content(
52            this: Allocated<Self>,
53            target_note: Option<&INNote>,
54            content: Option<&INNoteContent>,
55        ) -> Retained<Self>;
56
57        #[cfg(feature = "INNote")]
58        #[deprecated = "INAppendToNoteIntent is deprecated. There is no replacement."]
59        #[unsafe(method(targetNote))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn targetNote(&self) -> Option<Retained<INNote>>;
62
63        #[cfg(feature = "INNoteContent")]
64        #[deprecated = "INAppendToNoteIntent is deprecated. There is no replacement."]
65        #[unsafe(method(content))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn content(&self) -> Option<Retained<INNoteContent>>;
68    );
69}
70
71/// Methods declared on superclass `NSObject`.
72#[cfg(feature = "INIntent")]
73impl INAppendToNoteIntent {
74    extern_methods!(
75        #[unsafe(method(init))]
76        #[unsafe(method_family = init)]
77        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78
79        #[unsafe(method(new))]
80        #[unsafe(method_family = new)]
81        pub unsafe fn new() -> Retained<Self>;
82    );
83}
84
85extern_protocol!(
86    /// Protocol to declare support for handling an INAppendToNoteIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
87    ///
88    /// 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.
89    ///
90    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/inappendtonoteintenthandling?language=objc)
91    #[deprecated = "INAppendToNoteIntentHandling is deprecated. There is no replacement."]
92    pub unsafe trait INAppendToNoteIntentHandling: NSObjectProtocol {
93        #[cfg(all(
94            feature = "INAppendToNoteIntentResponse",
95            feature = "INIntent",
96            feature = "INIntentResponse",
97            feature = "block2"
98        ))]
99        /// Handling method - Execute the task represented by the INAppendToNoteIntent that's passed in
100        ///
101        /// Called to actually execute the intent. The app must return a response for this intent.
102        ///
103        ///
104        /// Parameter `intent`: The input intent
105        ///
106        /// Parameter `completion`: The response handling block takes a INAppendToNoteIntentResponse containing the details of the result of having executed the intent
107        ///
108        ///
109        /// See: INAppendToNoteIntentResponse
110        #[deprecated = "INAppendToNoteIntentHandling is deprecated. There is no replacement."]
111        #[unsafe(method(handleAppendToNote:completion:))]
112        #[unsafe(method_family = none)]
113        unsafe fn handleAppendToNote_completion(
114            &self,
115            intent: &INAppendToNoteIntent,
116            completion: &block2::DynBlock<dyn Fn(NonNull<INAppendToNoteIntentResponse>)>,
117        );
118
119        #[cfg(all(
120            feature = "INAppendToNoteIntentResponse",
121            feature = "INIntent",
122            feature = "INIntentResponse",
123            feature = "block2"
124        ))]
125        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
126        ///
127        /// 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.
128        ///
129        ///
130        /// Parameter `intent`: The input intent
131        ///
132        /// Parameter `completion`: The response block contains an INAppendToNoteIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
133        ///
134        ///
135        /// See: INAppendToNoteIntentResponse
136        #[deprecated = "INAppendToNoteIntentHandling is deprecated. There is no replacement."]
137        #[optional]
138        #[unsafe(method(confirmAppendToNote:completion:))]
139        #[unsafe(method_family = none)]
140        unsafe fn confirmAppendToNote_completion(
141            &self,
142            intent: &INAppendToNoteIntent,
143            completion: &block2::DynBlock<dyn Fn(NonNull<INAppendToNoteIntentResponse>)>,
144        );
145
146        #[cfg(all(
147            feature = "INIntent",
148            feature = "INIntentResolutionResult",
149            feature = "INNoteResolutionResult",
150            feature = "block2"
151        ))]
152        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
153        ///
154        /// 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.
155        ///
156        ///
157        /// Parameter `intent`: The input intent
158        ///
159        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
160        ///
161        ///
162        /// See: INIntentResolutionResult
163        #[deprecated = "INAppendToNoteIntentHandling is deprecated. There is no replacement."]
164        #[optional]
165        #[unsafe(method(resolveTargetNoteForAppendToNote:withCompletion:))]
166        #[unsafe(method_family = none)]
167        unsafe fn resolveTargetNoteForAppendToNote_withCompletion(
168            &self,
169            intent: &INAppendToNoteIntent,
170            completion: &block2::DynBlock<dyn Fn(NonNull<INNoteResolutionResult>)>,
171        );
172
173        #[cfg(all(
174            feature = "INIntent",
175            feature = "INIntentResolutionResult",
176            feature = "INNoteContentResolutionResult",
177            feature = "block2"
178        ))]
179        #[deprecated = "INAppendToNoteIntentHandling is deprecated. There is no replacement."]
180        #[optional]
181        #[unsafe(method(resolveContentForAppendToNote:withCompletion:))]
182        #[unsafe(method_family = none)]
183        unsafe fn resolveContentForAppendToNote_withCompletion(
184            &self,
185            intent: &INAppendToNoteIntent,
186            completion: &block2::DynBlock<dyn Fn(NonNull<INNoteContentResolutionResult>)>,
187        );
188    }
189);