objc2_home_kit/generated/
HMHomeAccessControl.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// Represents the access control of a user associated with a home.
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmhomeaccesscontrol?language=objc)
12    #[unsafe(super(HMAccessControl, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "HMAccessControl")]
15    pub struct HMHomeAccessControl;
16);
17
18#[cfg(feature = "HMAccessControl")]
19unsafe impl Send for HMHomeAccessControl {}
20
21#[cfg(feature = "HMAccessControl")]
22unsafe impl Sync for HMHomeAccessControl {}
23
24#[cfg(feature = "HMAccessControl")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for HMHomeAccessControl {}
27);
28
29#[cfg(feature = "HMAccessControl")]
30impl HMHomeAccessControl {
31    extern_methods!(
32        /// Specifies if the user has administrative privileges for the home.
33        #[unsafe(method(isAdministrator))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn isAdministrator(&self) -> bool;
36
37        #[unsafe(method(init))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40    );
41}
42
43/// Methods declared on superclass `NSObject`.
44#[cfg(feature = "HMAccessControl")]
45impl HMHomeAccessControl {
46    extern_methods!(
47        #[unsafe(method(new))]
48        #[unsafe(method_family = new)]
49        pub unsafe fn new() -> Retained<Self>;
50    );
51}