objc2_call_kit/generated/
CXCallUpdate.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
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/callkit/cxcallupdate?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct CXCallUpdate;
15);
16
17unsafe impl NSCopying for CXCallUpdate {}
18
19unsafe impl CopyingHelper for CXCallUpdate {
20    type Result = Self;
21}
22
23unsafe impl NSObjectProtocol for CXCallUpdate {}
24
25impl CXCallUpdate {
26    extern_methods!(
27        #[cfg(feature = "CXHandle")]
28        /// Handle for the remote party (for an incoming call, the caller; for an outgoing call, the callee)
29        #[unsafe(method(remoteHandle))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn remoteHandle(&self) -> Option<Retained<CXHandle>>;
32
33        #[cfg(feature = "CXHandle")]
34        /// Setter for [`remoteHandle`][Self::remoteHandle].
35        #[unsafe(method(setRemoteHandle:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn setRemoteHandle(&self, remote_handle: Option<&CXHandle>);
38
39        /// Override the computed caller name to a provider-defined value.
40        /// Normally the system will determine the appropriate caller name to display (e.g. using the user's contacts) based on the supplied caller identifier. Set this property to customize.
41        #[unsafe(method(localizedCallerName))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn localizedCallerName(&self) -> Option<Retained<NSString>>;
44
45        /// Setter for [`localizedCallerName`][Self::localizedCallerName].
46        #[unsafe(method(setLocalizedCallerName:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn setLocalizedCallerName(&self, localized_caller_name: Option<&NSString>);
49
50        /// Whether the call can be held on its own or swapped with another call
51        #[unsafe(method(supportsHolding))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn supportsHolding(&self) -> bool;
54
55        /// Setter for [`supportsHolding`][Self::supportsHolding].
56        #[unsafe(method(setSupportsHolding:))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn setSupportsHolding(&self, supports_holding: bool);
59
60        /// Whether the call can be grouped (merged) with other calls when it is ungrouped
61        #[unsafe(method(supportsGrouping))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn supportsGrouping(&self) -> bool;
64
65        /// Setter for [`supportsGrouping`][Self::supportsGrouping].
66        #[unsafe(method(setSupportsGrouping:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setSupportsGrouping(&self, supports_grouping: bool);
69
70        /// The call can be ungrouped (taken private) when it is grouped
71        #[unsafe(method(supportsUngrouping))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn supportsUngrouping(&self) -> bool;
74
75        /// Setter for [`supportsUngrouping`][Self::supportsUngrouping].
76        #[unsafe(method(setSupportsUngrouping:))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn setSupportsUngrouping(&self, supports_ungrouping: bool);
79
80        /// The call can send DTMF tones via hard pause digits or in-call keypad entries
81        #[unsafe(method(supportsDTMF))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn supportsDTMF(&self) -> bool;
84
85        /// Setter for [`supportsDTMF`][Self::supportsDTMF].
86        #[unsafe(method(setSupportsDTMF:))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn setSupportsDTMF(&self, supports_dtmf: bool);
89
90        /// The call includes video in addition to audio.
91        #[unsafe(method(hasVideo))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn hasVideo(&self) -> bool;
94
95        /// Setter for [`hasVideo`][Self::hasVideo].
96        #[unsafe(method(setHasVideo:))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn setHasVideo(&self, has_video: bool);
99    );
100}
101
102/// Methods declared on superclass `NSObject`.
103impl CXCallUpdate {
104    extern_methods!(
105        #[unsafe(method(init))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
108
109        #[unsafe(method(new))]
110        #[unsafe(method_family = new)]
111        pub unsafe fn new() -> Retained<Self>;
112    );
113}