objc2_intents/generated/
INStartCallContactResolutionResult.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/instartcallcontactunsupportedreason?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INStartCallContactUnsupportedReason(pub NSInteger);
14impl INStartCallContactUnsupportedReason {
15    #[doc(alias = "INStartCallContactUnsupportedReasonNoContactFound")]
16    pub const NoContactFound: Self = Self(1);
17    #[doc(alias = "INStartCallContactUnsupportedReasonMultipleContactsUnsupported")]
18    pub const MultipleContactsUnsupported: Self = Self(2);
19    #[doc(alias = "INStartCallContactUnsupportedReasonNoHandleForLabel")]
20    pub const NoHandleForLabel: Self = Self(3);
21    #[doc(alias = "INStartCallContactUnsupportedReasonInvalidHandle")]
22    pub const InvalidHandle: Self = Self(4);
23    #[doc(alias = "INStartCallContactUnsupportedReasonUnsupportedMmiUssd")]
24    pub const UnsupportedMmiUssd: Self = Self(5);
25    #[doc(alias = "INStartCallContactUnsupportedReasonNoCallHistoryForRedial")]
26    #[deprecated]
27    pub const NoCallHistoryForRedial: Self = Self(6);
28    #[doc(alias = "INStartCallContactUnsupportedReasonNoUsableHandleForRedial")]
29    pub const NoUsableHandleForRedial: Self = Self(7);
30    #[doc(alias = "INStartCallContactUnsupportedReasonRequiringInAppAuthentication")]
31    pub const RequiringInAppAuthentication: Self = Self(8);
32}
33
34unsafe impl Encode for INStartCallContactUnsupportedReason {
35    const ENCODING: Encoding = NSInteger::ENCODING;
36}
37
38unsafe impl RefEncode for INStartCallContactUnsupportedReason {
39    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
40}
41
42extern_class!(
43    /// [Apple's documentation](https://developer.apple.com/documentation/intents/instartcallcontactresolutionresult?language=objc)
44    #[unsafe(super(INPersonResolutionResult, INIntentResolutionResult, NSObject))]
45    #[derive(Debug, PartialEq, Eq, Hash)]
46    #[cfg(all(
47        feature = "INIntentResolutionResult",
48        feature = "INPersonResolutionResult"
49    ))]
50    pub struct INStartCallContactResolutionResult;
51);
52
53#[cfg(all(
54    feature = "INIntentResolutionResult",
55    feature = "INPersonResolutionResult"
56))]
57extern_conformance!(
58    unsafe impl NSObjectProtocol for INStartCallContactResolutionResult {}
59);
60
61#[cfg(all(
62    feature = "INIntentResolutionResult",
63    feature = "INPersonResolutionResult"
64))]
65impl INStartCallContactResolutionResult {
66    extern_methods!(
67        #[unsafe(method(unsupportedForReason:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn unsupportedForReason(
70            reason: INStartCallContactUnsupportedReason,
71        ) -> Retained<Self>;
72
73        #[unsafe(method(initWithPersonResolutionResult:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithPersonResolutionResult(
76            this: Allocated<Self>,
77            person_resolution_result: &INPersonResolutionResult,
78        ) -> Retained<Self>;
79    );
80}
81
82/// Methods declared on superclass `INPersonResolutionResult`.
83#[cfg(all(
84    feature = "INIntentResolutionResult",
85    feature = "INPersonResolutionResult"
86))]
87impl INStartCallContactResolutionResult {
88    extern_methods!(
89        #[cfg(feature = "INPerson")]
90        #[unsafe(method(successWithResolvedPerson:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn successWithResolvedPerson(resolved_person: &INPerson) -> Retained<Self>;
93
94        #[cfg(feature = "INPerson")]
95        #[unsafe(method(disambiguationWithPeopleToDisambiguate:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn disambiguationWithPeopleToDisambiguate(
98            people_to_disambiguate: &NSArray<INPerson>,
99        ) -> Retained<Self>;
100
101        #[cfg(feature = "INPerson")]
102        #[unsafe(method(confirmationRequiredWithPersonToConfirm:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn confirmationRequiredWithPersonToConfirm(
105            person_to_confirm: Option<&INPerson>,
106        ) -> Retained<Self>;
107    );
108}
109
110/// Methods declared on superclass `INIntentResolutionResult`.
111#[cfg(all(
112    feature = "INIntentResolutionResult",
113    feature = "INPersonResolutionResult"
114))]
115impl INStartCallContactResolutionResult {
116    extern_methods!(
117        #[unsafe(method(init))]
118        #[unsafe(method_family = init)]
119        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120
121        #[unsafe(method(needsValue))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn needsValue() -> Retained<Self>;
124
125        #[unsafe(method(notRequired))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn notRequired() -> Retained<Self>;
128
129        #[unsafe(method(unsupported))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn unsupported() -> Retained<Self>;
132    );
133}
134
135/// Methods declared on superclass `NSObject`.
136#[cfg(all(
137    feature = "INIntentResolutionResult",
138    feature = "INPersonResolutionResult"
139))]
140impl INStartCallContactResolutionResult {
141    extern_methods!(
142        #[unsafe(method(new))]
143        #[unsafe(method_family = new)]
144        pub unsafe fn new() -> Retained<Self>;
145    );
146}