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
17extern_conformance!(
18    unsafe impl NSCopying for CXCallUpdate {}
19);
20
21unsafe impl CopyingHelper for CXCallUpdate {
22    type Result = Self;
23}
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for CXCallUpdate {}
27);
28
29impl CXCallUpdate {
30    extern_methods!(
31        #[cfg(feature = "CXHandle")]
32        /// Handle for the remote party (for an incoming call, the caller; for an outgoing call, the callee).
33        #[unsafe(method(remoteHandle))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn remoteHandle(&self) -> Option<Retained<CXHandle>>;
36
37        #[cfg(feature = "CXHandle")]
38        /// Setter for [`remoteHandle`][Self::remoteHandle].
39        ///
40        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
41        #[unsafe(method(setRemoteHandle:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn setRemoteHandle(&self, remote_handle: Option<&CXHandle>);
44
45        /// Override the computed caller name to a provider-defined value.
46        /// 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.
47        #[unsafe(method(localizedCallerName))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn localizedCallerName(&self) -> Option<Retained<NSString>>;
50
51        /// Setter for [`localizedCallerName`][Self::localizedCallerName].
52        ///
53        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
54        #[unsafe(method(setLocalizedCallerName:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setLocalizedCallerName(&self, localized_caller_name: Option<&NSString>);
57
58        /// Whether the call can be held on its own or swapped with another call
59        #[unsafe(method(supportsHolding))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn supportsHolding(&self) -> bool;
62
63        /// Setter for [`supportsHolding`][Self::supportsHolding].
64        #[unsafe(method(setSupportsHolding:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn setSupportsHolding(&self, supports_holding: bool);
67
68        /// Whether the call can be grouped (merged) with other calls when it is ungrouped
69        #[unsafe(method(supportsGrouping))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn supportsGrouping(&self) -> bool;
72
73        /// Setter for [`supportsGrouping`][Self::supportsGrouping].
74        #[unsafe(method(setSupportsGrouping:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn setSupportsGrouping(&self, supports_grouping: bool);
77
78        /// The call can be ungrouped (taken private) when it is grouped
79        #[unsafe(method(supportsUngrouping))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn supportsUngrouping(&self) -> bool;
82
83        /// Setter for [`supportsUngrouping`][Self::supportsUngrouping].
84        #[unsafe(method(setSupportsUngrouping:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn setSupportsUngrouping(&self, supports_ungrouping: bool);
87
88        /// The call can send DTMF tones via hard pause digits or in-call keypad entries
89        #[unsafe(method(supportsDTMF))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn supportsDTMF(&self) -> bool;
92
93        /// Setter for [`supportsDTMF`][Self::supportsDTMF].
94        #[unsafe(method(setSupportsDTMF:))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn setSupportsDTMF(&self, supports_dtmf: bool);
97
98        /// The call includes video in addition to audio.
99        #[unsafe(method(hasVideo))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn hasVideo(&self) -> bool;
102
103        /// Setter for [`hasVideo`][Self::hasVideo].
104        #[unsafe(method(setHasVideo:))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn setHasVideo(&self, has_video: bool);
107    );
108}
109
110/// Methods declared on superclass `NSObject`.
111impl CXCallUpdate {
112    extern_methods!(
113        #[unsafe(method(init))]
114        #[unsafe(method_family = init)]
115        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
116
117        #[unsafe(method(new))]
118        #[unsafe(method_family = new)]
119        pub unsafe fn new() -> Retained<Self>;
120    );
121}