objc2_home_kit/generated/
HMAccessoryProfile.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Represents a profile implemented by an accessory.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmaccessoryprofile?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct HMAccessoryProfile;
16);
17
18unsafe impl Send for HMAccessoryProfile {}
19
20unsafe impl Sync for HMAccessoryProfile {}
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for HMAccessoryProfile {}
24);
25
26impl HMAccessoryProfile {
27    extern_methods!(
28        #[unsafe(method(init))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32        /// A unique identifier for the profile.
33        #[unsafe(method(uniqueIdentifier))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn uniqueIdentifier(&self) -> Retained<NSUUID>;
36
37        #[cfg(feature = "HMService")]
38        /// Collection of services representing the profile.
39        #[unsafe(method(services))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn services(&self) -> Retained<NSArray<HMService>>;
42
43        #[cfg(feature = "HMAccessory")]
44        /// Accessory implementing the profile.
45        #[unsafe(method(accessory))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn accessory(&self) -> Option<Retained<HMAccessory>>;
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52impl HMAccessoryProfile {
53    extern_methods!(
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new() -> Retained<Self>;
57    );
58}