objc2_call_kit/generated/
CXPlayDTMFCallAction.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/callkit/cxplaydtmfcallactiontype?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct CXPlayDTMFCallActionType(pub NSInteger);
15impl CXPlayDTMFCallActionType {
16    #[doc(alias = "CXPlayDTMFCallActionTypeSingleTone")]
17    pub const SingleTone: Self = Self(1);
18    #[doc(alias = "CXPlayDTMFCallActionTypeSoftPause")]
19    pub const SoftPause: Self = Self(2);
20    #[doc(alias = "CXPlayDTMFCallActionTypeHardPause")]
21    pub const HardPause: Self = Self(3);
22}
23
24unsafe impl Encode for CXPlayDTMFCallActionType {
25    const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for CXPlayDTMFCallActionType {
29    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32extern_class!(
33    /// [Apple's documentation](https://developer.apple.com/documentation/callkit/cxplaydtmfcallaction?language=objc)
34    #[unsafe(super(CXCallAction, CXAction, NSObject))]
35    #[derive(Debug, PartialEq, Eq, Hash)]
36    #[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
37    pub struct CXPlayDTMFCallAction;
38);
39
40#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
41unsafe impl NSCoding for CXPlayDTMFCallAction {}
42
43#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
44unsafe impl NSCopying for CXPlayDTMFCallAction {}
45
46#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
47unsafe impl CopyingHelper for CXPlayDTMFCallAction {
48    type Result = Self;
49}
50
51#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
52unsafe impl NSObjectProtocol for CXPlayDTMFCallAction {}
53
54#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
55unsafe impl NSSecureCoding for CXPlayDTMFCallAction {}
56
57#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
58impl CXPlayDTMFCallAction {
59    extern_methods!(
60        #[unsafe(method(initWithCallUUID:digits:type:))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn initWithCallUUID_digits_type(
63            this: Allocated<Self>,
64            call_uuid: &NSUUID,
65            digits: &NSString,
66            r#type: CXPlayDTMFCallActionType,
67        ) -> Retained<Self>;
68
69        #[unsafe(method(initWithCoder:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithCoder(
72            this: Allocated<Self>,
73            a_decoder: &NSCoder,
74        ) -> Option<Retained<Self>>;
75
76        #[unsafe(method(initWithCallUUID:))]
77        #[unsafe(method_family = init)]
78        pub unsafe fn initWithCallUUID(this: Allocated<Self>, call_uuid: &NSUUID)
79            -> Retained<Self>;
80
81        #[unsafe(method(digits))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn digits(&self) -> Retained<NSString>;
84
85        /// Setter for [`digits`][Self::digits].
86        #[unsafe(method(setDigits:))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn setDigits(&self, digits: &NSString);
89
90        #[unsafe(method(type))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn r#type(&self) -> CXPlayDTMFCallActionType;
93
94        /// Setter for [`type`][Self::type].
95        #[unsafe(method(setType:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn setType(&self, r#type: CXPlayDTMFCallActionType);
98    );
99}
100
101/// Methods declared on superclass `CXCallAction`.
102#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
103impl CXPlayDTMFCallAction {
104    extern_methods!(
105        #[unsafe(method(init))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
108    );
109}
110
111/// Methods declared on superclass `NSObject`.
112#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
113impl CXPlayDTMFCallAction {
114    extern_methods!(
115        #[unsafe(method(new))]
116        #[unsafe(method_family = new)]
117        pub unsafe fn new() -> Retained<Self>;
118    );
119}