objc2-call-kit 0.3.2

Bindings to the CallKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/callkit/cxproviderconfiguration?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CXProviderConfiguration;
);

extern_conformance!(
    unsafe impl NSCopying for CXProviderConfiguration {}
);

unsafe impl CopyingHelper for CXProviderConfiguration {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for CXProviderConfiguration {}
);

impl CXProviderConfiguration {
    extern_methods!(
        /// Localized name of the provider
        #[deprecated = "No longer supported"]
        #[unsafe(method(localizedName))]
        #[unsafe(method_family = none)]
        pub unsafe fn localizedName(&self) -> Option<Retained<NSString>>;

        /// Name of resource in app's bundle to play as ringtone for incoming call
        #[unsafe(method(ringtoneSound))]
        #[unsafe(method_family = none)]
        pub unsafe fn ringtoneSound(&self) -> Option<Retained<NSString>>;

        /// Setter for [`ringtoneSound`][Self::ringtoneSound].
        #[unsafe(method(setRingtoneSound:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRingtoneSound(&self, ringtone_sound: Option<&NSString>);

        #[unsafe(method(iconTemplateImageData))]
        #[unsafe(method_family = none)]
        pub unsafe fn iconTemplateImageData(&self) -> Option<Retained<NSData>>;

        /// Setter for [`iconTemplateImageData`][Self::iconTemplateImageData].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setIconTemplateImageData:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setIconTemplateImageData(&self, icon_template_image_data: Option<&NSData>);

        #[unsafe(method(maximumCallGroups))]
        #[unsafe(method_family = none)]
        pub unsafe fn maximumCallGroups(&self) -> NSUInteger;

        /// Setter for [`maximumCallGroups`][Self::maximumCallGroups].
        #[unsafe(method(setMaximumCallGroups:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaximumCallGroups(&self, maximum_call_groups: NSUInteger);

        #[unsafe(method(maximumCallsPerCallGroup))]
        #[unsafe(method_family = none)]
        pub unsafe fn maximumCallsPerCallGroup(&self) -> NSUInteger;

        /// Setter for [`maximumCallsPerCallGroup`][Self::maximumCallsPerCallGroup].
        #[unsafe(method(setMaximumCallsPerCallGroup:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaximumCallsPerCallGroup(&self, maximum_calls_per_call_group: NSUInteger);

        /// Whether this provider's calls should be included in the system's Recents list at the end of each call.
        /// Default: YES
        #[unsafe(method(includesCallsInRecents))]
        #[unsafe(method_family = none)]
        pub unsafe fn includesCallsInRecents(&self) -> bool;

        /// Setter for [`includesCallsInRecents`][Self::includesCallsInRecents].
        #[unsafe(method(setIncludesCallsInRecents:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setIncludesCallsInRecents(&self, includes_calls_in_recents: bool);

        #[unsafe(method(supportsVideo))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportsVideo(&self) -> bool;

        /// Setter for [`supportsVideo`][Self::supportsVideo].
        #[unsafe(method(setSupportsVideo:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSupportsVideo(&self, supports_video: bool);

        #[unsafe(method(supportsAudioTranslation))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportsAudioTranslation(&self) -> bool;

        /// Setter for [`supportsAudioTranslation`][Self::supportsAudioTranslation].
        #[unsafe(method(setSupportsAudioTranslation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSupportsAudioTranslation(&self, supports_audio_translation: bool);

        #[unsafe(method(supportedHandleTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedHandleTypes(&self) -> Retained<NSSet<NSNumber>>;

        /// Setter for [`supportedHandleTypes`][Self::supportedHandleTypes].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setSupportedHandleTypes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSupportedHandleTypes(&self, supported_handle_types: &NSSet<NSNumber>);

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated]
        #[unsafe(method(initWithLocalizedName:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithLocalizedName(
            this: Allocated<Self>,
            localized_name: &NSString,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl CXProviderConfiguration {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}