objc2_call_kit/generated/
CXStartCallAction.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/cxstartcallaction?language=objc)
12    #[unsafe(super(CXCallAction, CXAction, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
15    pub struct CXStartCallAction;
16);
17
18#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
19extern_conformance!(
20    unsafe impl NSCoding for CXStartCallAction {}
21);
22
23#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
24extern_conformance!(
25    unsafe impl NSCopying for CXStartCallAction {}
26);
27
28#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
29unsafe impl CopyingHelper for CXStartCallAction {
30    type Result = Self;
31}
32
33#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for CXStartCallAction {}
36);
37
38#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
39extern_conformance!(
40    unsafe impl NSSecureCoding for CXStartCallAction {}
41);
42
43#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
44impl CXStartCallAction {
45    extern_methods!(
46        #[cfg(feature = "CXHandle")]
47        #[unsafe(method(initWithCallUUID:handle:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithCallUUID_handle(
50            this: Allocated<Self>,
51            call_uuid: &NSUUID,
52            handle: &CXHandle,
53        ) -> Retained<Self>;
54
55        /// # Safety
56        ///
57        /// `a_decoder` possibly has further requirements.
58        #[unsafe(method(initWithCoder:))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn initWithCoder(
61            this: Allocated<Self>,
62            a_decoder: &NSCoder,
63        ) -> Option<Retained<Self>>;
64
65        #[unsafe(method(initWithCallUUID:))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn initWithCallUUID(this: Allocated<Self>, call_uuid: &NSUUID)
68            -> Retained<Self>;
69
70        #[cfg(feature = "CXHandle")]
71        /// Handle for the party to call
72        #[unsafe(method(handle))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn handle(&self) -> Retained<CXHandle>;
75
76        #[cfg(feature = "CXHandle")]
77        /// Setter for [`handle`][Self::handle].
78        ///
79        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
80        #[unsafe(method(setHandle:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn setHandle(&self, handle: &CXHandle);
83
84        #[unsafe(method(contactIdentifier))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn contactIdentifier(&self) -> Option<Retained<NSString>>;
87
88        /// Setter for [`contactIdentifier`][Self::contactIdentifier].
89        ///
90        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
91        #[unsafe(method(setContactIdentifier:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setContactIdentifier(&self, contact_identifier: Option<&NSString>);
94
95        #[unsafe(method(isVideo))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn isVideo(&self) -> bool;
98
99        /// Setter for [`isVideo`][Self::isVideo].
100        #[unsafe(method(setVideo:))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn setVideo(&self, video: bool);
103
104        /// Normally, providers can just call -[CXAction fulfill] to indicate action fulfillment. Use this method to note a specific date that the call started if it is different from [NSDate date]. A call is considered started when its invitation has been sent to the remote callee.
105        #[unsafe(method(fulfillWithDateStarted:))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn fulfillWithDateStarted(&self, date_started: &NSDate);
108    );
109}
110
111/// Methods declared on superclass `CXCallAction`.
112#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
113impl CXStartCallAction {
114    extern_methods!(
115        #[unsafe(method(init))]
116        #[unsafe(method_family = init)]
117        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
118    );
119}
120
121/// Methods declared on superclass `NSObject`.
122#[cfg(all(feature = "CXAction", feature = "CXCallAction"))]
123impl CXStartCallAction {
124    extern_methods!(
125        #[unsafe(method(new))]
126        #[unsafe(method_family = new)]
127        pub unsafe fn new() -> Retained<Self>;
128    );
129}