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