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