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")]
25unsafe impl NSObjectProtocol for HMHomeAccessControl {}
26
27#[cfg(feature = "HMAccessControl")]
28impl HMHomeAccessControl {
29    extern_methods!(
30        /// Specifies if the user has administrative privileges for the home.
31        #[unsafe(method(isAdministrator))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn isAdministrator(&self) -> bool;
34
35        #[unsafe(method(init))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38    );
39}
40
41/// Methods declared on superclass `NSObject`.
42#[cfg(feature = "HMAccessControl")]
43impl HMHomeAccessControl {
44    extern_methods!(
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new() -> Retained<Self>;
48    );
49}