objc2_intents/generated/
INUpdateMediaAffinityIntentResponse.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/intents/inupdatemediaaffinityintentresponsecode?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INUpdateMediaAffinityIntentResponseCode(pub NSInteger);
14impl INUpdateMediaAffinityIntentResponseCode {
15    #[doc(alias = "INUpdateMediaAffinityIntentResponseCodeUnspecified")]
16    pub const Unspecified: Self = Self(0);
17    #[doc(alias = "INUpdateMediaAffinityIntentResponseCodeReady")]
18    pub const Ready: Self = Self(1);
19    #[doc(alias = "INUpdateMediaAffinityIntentResponseCodeInProgress")]
20    pub const InProgress: Self = Self(2);
21    #[doc(alias = "INUpdateMediaAffinityIntentResponseCodeSuccess")]
22    pub const Success: Self = Self(3);
23    #[doc(alias = "INUpdateMediaAffinityIntentResponseCodeFailure")]
24    pub const Failure: Self = Self(4);
25    #[doc(alias = "INUpdateMediaAffinityIntentResponseCodeFailureRequiringAppLaunch")]
26    pub const FailureRequiringAppLaunch: Self = Self(5);
27}
28
29unsafe impl Encode for INUpdateMediaAffinityIntentResponseCode {
30    const ENCODING: Encoding = NSInteger::ENCODING;
31}
32
33unsafe impl RefEncode for INUpdateMediaAffinityIntentResponseCode {
34    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37extern_class!(
38    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inupdatemediaaffinityintentresponse?language=objc)
39    #[unsafe(super(INIntentResponse, NSObject))]
40    #[derive(Debug, PartialEq, Eq, Hash)]
41    #[cfg(feature = "INIntentResponse")]
42    pub struct INUpdateMediaAffinityIntentResponse;
43);
44
45#[cfg(feature = "INIntentResponse")]
46extern_conformance!(
47    unsafe impl NSCoding for INUpdateMediaAffinityIntentResponse {}
48);
49
50#[cfg(feature = "INIntentResponse")]
51extern_conformance!(
52    unsafe impl NSCopying for INUpdateMediaAffinityIntentResponse {}
53);
54
55#[cfg(feature = "INIntentResponse")]
56unsafe impl CopyingHelper for INUpdateMediaAffinityIntentResponse {
57    type Result = Self;
58}
59
60#[cfg(feature = "INIntentResponse")]
61extern_conformance!(
62    unsafe impl NSObjectProtocol for INUpdateMediaAffinityIntentResponse {}
63);
64
65#[cfg(feature = "INIntentResponse")]
66extern_conformance!(
67    unsafe impl NSSecureCoding for INUpdateMediaAffinityIntentResponse {}
68);
69
70#[cfg(feature = "INIntentResponse")]
71impl INUpdateMediaAffinityIntentResponse {
72    extern_methods!(
73        #[unsafe(method(init))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77        #[unsafe(method(initWithCode:userActivity:))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn initWithCode_userActivity(
80            this: Allocated<Self>,
81            code: INUpdateMediaAffinityIntentResponseCode,
82            user_activity: Option<&NSUserActivity>,
83        ) -> Retained<Self>;
84
85        #[unsafe(method(code))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn code(&self) -> INUpdateMediaAffinityIntentResponseCode;
88    );
89}
90
91/// Methods declared on superclass `NSObject`.
92#[cfg(feature = "INIntentResponse")]
93impl INUpdateMediaAffinityIntentResponse {
94    extern_methods!(
95        #[unsafe(method(new))]
96        #[unsafe(method_family = new)]
97        pub unsafe fn new() -> Retained<Self>;
98    );
99}