objc2-home-kit 0.3.2

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

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/homekit/hmcameraaudiocontrol?language=objc)
    #[unsafe(super(HMCameraControl, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "HMCameraControl")]
    pub struct HMCameraAudioControl;
);

#[cfg(feature = "HMCameraControl")]
unsafe impl Send for HMCameraAudioControl {}

#[cfg(feature = "HMCameraControl")]
unsafe impl Sync for HMCameraAudioControl {}

#[cfg(feature = "HMCameraControl")]
extern_conformance!(
    unsafe impl NSObjectProtocol for HMCameraAudioControl {}
);

#[cfg(feature = "HMCameraControl")]
impl HMCameraAudioControl {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "HMCharacteristic")]
        /// Characteristic corresponding to mute setting on the camera.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(mute))]
        #[unsafe(method_family = none)]
        pub unsafe fn mute(&self) -> Option<Retained<HMCharacteristic>>;

        #[cfg(feature = "HMCharacteristic")]
        /// Characteristic corresponding to volume setting on the camera.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(volume))]
        #[unsafe(method_family = none)]
        pub unsafe fn volume(&self) -> Option<Retained<HMCharacteristic>>;
    );
}

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