objc2_intents/generated/
INAppendToNoteIntentResponse.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
10/// [Apple's documentation](https://developer.apple.com/documentation/intents/inappendtonoteintentresponsecode?language=objc)
11// NS_ENUM
12#[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
13#[repr(transparent)]
14#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
15pub struct INAppendToNoteIntentResponseCode(pub NSInteger);
16impl INAppendToNoteIntentResponseCode {
17    #[doc(alias = "INAppendToNoteIntentResponseCodeUnspecified")]
18    #[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
19    pub const Unspecified: Self = Self(0);
20    #[doc(alias = "INAppendToNoteIntentResponseCodeReady")]
21    #[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
22    pub const Ready: Self = Self(1);
23    #[doc(alias = "INAppendToNoteIntentResponseCodeInProgress")]
24    #[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
25    pub const InProgress: Self = Self(2);
26    #[doc(alias = "INAppendToNoteIntentResponseCodeSuccess")]
27    #[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
28    pub const Success: Self = Self(3);
29    #[doc(alias = "INAppendToNoteIntentResponseCodeFailure")]
30    #[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
31    pub const Failure: Self = Self(4);
32    #[doc(alias = "INAppendToNoteIntentResponseCodeFailureRequiringAppLaunch")]
33    #[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
34    pub const FailureRequiringAppLaunch: Self = Self(5);
35    #[doc(alias = "INAppendToNoteIntentResponseCodeFailureCannotUpdatePasswordProtectedNote")]
36    #[deprecated = "INAppendToNoteIntentResponseCode is deprecated. There is no replacement."]
37    pub const FailureCannotUpdatePasswordProtectedNote: Self = Self(6);
38}
39
40unsafe impl Encode for INAppendToNoteIntentResponseCode {
41    const ENCODING: Encoding = NSInteger::ENCODING;
42}
43
44unsafe impl RefEncode for INAppendToNoteIntentResponseCode {
45    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
46}
47
48extern_class!(
49    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inappendtonoteintentresponse?language=objc)
50    #[unsafe(super(INIntentResponse, NSObject))]
51    #[derive(Debug, PartialEq, Eq, Hash)]
52    #[cfg(feature = "INIntentResponse")]
53    #[deprecated = "INAppendToNoteIntentResponse is deprecated. There is no replacement."]
54    pub struct INAppendToNoteIntentResponse;
55);
56
57#[cfg(feature = "INIntentResponse")]
58extern_conformance!(
59    unsafe impl NSCoding for INAppendToNoteIntentResponse {}
60);
61
62#[cfg(feature = "INIntentResponse")]
63extern_conformance!(
64    unsafe impl NSCopying for INAppendToNoteIntentResponse {}
65);
66
67#[cfg(feature = "INIntentResponse")]
68unsafe impl CopyingHelper for INAppendToNoteIntentResponse {
69    type Result = Self;
70}
71
72#[cfg(feature = "INIntentResponse")]
73extern_conformance!(
74    unsafe impl NSObjectProtocol for INAppendToNoteIntentResponse {}
75);
76
77#[cfg(feature = "INIntentResponse")]
78extern_conformance!(
79    unsafe impl NSSecureCoding for INAppendToNoteIntentResponse {}
80);
81
82#[cfg(feature = "INIntentResponse")]
83impl INAppendToNoteIntentResponse {
84    extern_methods!(
85        #[deprecated = "INAppendToNoteIntentResponse is deprecated. There is no replacement."]
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[deprecated = "INAppendToNoteIntentResponse is deprecated. There is no replacement."]
91        #[unsafe(method(initWithCode:userActivity:))]
92        #[unsafe(method_family = init)]
93        pub unsafe fn initWithCode_userActivity(
94            this: Allocated<Self>,
95            code: INAppendToNoteIntentResponseCode,
96            user_activity: Option<&NSUserActivity>,
97        ) -> Retained<Self>;
98
99        #[deprecated = "INAppendToNoteIntentResponse is deprecated. There is no replacement."]
100        #[unsafe(method(code))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn code(&self) -> INAppendToNoteIntentResponseCode;
103
104        #[cfg(feature = "INNote")]
105        #[deprecated = "INAppendToNoteIntentResponse is deprecated. There is no replacement."]
106        #[unsafe(method(note))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn note(&self) -> Option<Retained<INNote>>;
109
110        #[cfg(feature = "INNote")]
111        /// Setter for [`note`][Self::note].
112        ///
113        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
114        #[deprecated = "INAppendToNoteIntentResponse is deprecated. There is no replacement."]
115        #[unsafe(method(setNote:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn setNote(&self, note: Option<&INNote>);
118    );
119}
120
121/// Methods declared on superclass `NSObject`.
122#[cfg(feature = "INIntentResponse")]
123impl INAppendToNoteIntentResponse {
124    extern_methods!(
125        #[unsafe(method(new))]
126        #[unsafe(method_family = new)]
127        pub unsafe fn new() -> Retained<Self>;
128    );
129}