objc2_call_kit/generated/
CXProviderConfiguration.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/cxproviderconfiguration?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct CXProviderConfiguration;
15);
16
17extern_conformance!(
18    unsafe impl NSCopying for CXProviderConfiguration {}
19);
20
21unsafe impl CopyingHelper for CXProviderConfiguration {
22    type Result = Self;
23}
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for CXProviderConfiguration {}
27);
28
29impl CXProviderConfiguration {
30    extern_methods!(
31        /// Localized name of the provider
32        #[deprecated = "No longer supported"]
33        #[unsafe(method(localizedName))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn localizedName(&self) -> Option<Retained<NSString>>;
36
37        /// Name of resource in app's bundle to play as ringtone for incoming call
38        #[unsafe(method(ringtoneSound))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn ringtoneSound(&self) -> Option<Retained<NSString>>;
41
42        /// Setter for [`ringtoneSound`][Self::ringtoneSound].
43        #[unsafe(method(setRingtoneSound:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn setRingtoneSound(&self, ringtone_sound: Option<&NSString>);
46
47        #[unsafe(method(iconTemplateImageData))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn iconTemplateImageData(&self) -> Option<Retained<NSData>>;
50
51        /// Setter for [`iconTemplateImageData`][Self::iconTemplateImageData].
52        ///
53        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
54        #[unsafe(method(setIconTemplateImageData:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setIconTemplateImageData(&self, icon_template_image_data: Option<&NSData>);
57
58        #[unsafe(method(maximumCallGroups))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn maximumCallGroups(&self) -> NSUInteger;
61
62        /// Setter for [`maximumCallGroups`][Self::maximumCallGroups].
63        #[unsafe(method(setMaximumCallGroups:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn setMaximumCallGroups(&self, maximum_call_groups: NSUInteger);
66
67        #[unsafe(method(maximumCallsPerCallGroup))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn maximumCallsPerCallGroup(&self) -> NSUInteger;
70
71        /// Setter for [`maximumCallsPerCallGroup`][Self::maximumCallsPerCallGroup].
72        #[unsafe(method(setMaximumCallsPerCallGroup:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn setMaximumCallsPerCallGroup(&self, maximum_calls_per_call_group: NSUInteger);
75
76        /// Whether this provider's calls should be included in the system's Recents list at the end of each call.
77        /// Default: YES
78        #[unsafe(method(includesCallsInRecents))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn includesCallsInRecents(&self) -> bool;
81
82        /// Setter for [`includesCallsInRecents`][Self::includesCallsInRecents].
83        #[unsafe(method(setIncludesCallsInRecents:))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn setIncludesCallsInRecents(&self, includes_calls_in_recents: bool);
86
87        #[unsafe(method(supportsVideo))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn supportsVideo(&self) -> bool;
90
91        /// Setter for [`supportsVideo`][Self::supportsVideo].
92        #[unsafe(method(setSupportsVideo:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn setSupportsVideo(&self, supports_video: bool);
95
96        #[unsafe(method(supportsAudioTranslation))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn supportsAudioTranslation(&self) -> bool;
99
100        /// Setter for [`supportsAudioTranslation`][Self::supportsAudioTranslation].
101        #[unsafe(method(setSupportsAudioTranslation:))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn setSupportsAudioTranslation(&self, supports_audio_translation: bool);
104
105        #[unsafe(method(supportedHandleTypes))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn supportedHandleTypes(&self) -> Retained<NSSet<NSNumber>>;
108
109        /// Setter for [`supportedHandleTypes`][Self::supportedHandleTypes].
110        ///
111        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
112        #[unsafe(method(setSupportedHandleTypes:))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn setSupportedHandleTypes(&self, supported_handle_types: &NSSet<NSNumber>);
115
116        #[unsafe(method(init))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
119
120        #[deprecated]
121        #[unsafe(method(initWithLocalizedName:))]
122        #[unsafe(method_family = init)]
123        pub unsafe fn initWithLocalizedName(
124            this: Allocated<Self>,
125            localized_name: &NSString,
126        ) -> Retained<Self>;
127    );
128}
129
130/// Methods declared on superclass `NSObject`.
131impl CXProviderConfiguration {
132    extern_methods!(
133        #[unsafe(method(new))]
134        #[unsafe(method_family = new)]
135        pub unsafe fn new() -> Retained<Self>;
136    );
137}