1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//! 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/homekit/hmaccessorysetuprequest?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HMAccessorySetupRequest;
);
unsafe impl Send for HMAccessorySetupRequest {}
unsafe impl Sync for HMAccessorySetupRequest {}
extern_conformance!(
unsafe impl NSCopying for HMAccessorySetupRequest {}
);
unsafe impl CopyingHelper for HMAccessorySetupRequest {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for HMAccessorySetupRequest {}
);
impl HMAccessorySetupRequest {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "HMAccessorySetupPayload")]
/// The payload to use for accessory setup
///
/// Note: When this is non-nil, the following entitlement is required:
/// com.apple.developer.homekit.allow-setup-payload
#[unsafe(method(payload))]
#[unsafe(method_family = none)]
pub unsafe fn payload(&self) -> Option<Retained<HMAccessorySetupPayload>>;
#[cfg(feature = "HMAccessorySetupPayload")]
/// Setter for [`payload`][Self::payload].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setPayload:))]
#[unsafe(method_family = none)]
pub unsafe fn setPayload(&self, payload: Option<&HMAccessorySetupPayload>);
/// The -[HMHome uniqueIdentifier] that corresponds to the HMHome that the accessory should be
/// added to when being set up. If nil, then the user will be prompted to choose a home
#[unsafe(method(homeUniqueIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn homeUniqueIdentifier(&self) -> Option<Retained<NSUUID>>;
/// Setter for [`homeUniqueIdentifier`][Self::homeUniqueIdentifier].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setHomeUniqueIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setHomeUniqueIdentifier(&self, home_unique_identifier: Option<&NSUUID>);
/// The -[HMRoom uniqueIdentifier] that corresponds to the existing HMRoom that should be
/// suggested when the user is prompted to choose a room to add the accessory to. If nil, then any
/// room may be suggested
///
/// Note: This value will be ignored if homeUniqueIdentifier is nil
#[unsafe(method(suggestedRoomUniqueIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn suggestedRoomUniqueIdentifier(&self) -> Option<Retained<NSUUID>>;
/// Setter for [`suggestedRoomUniqueIdentifier`][Self::suggestedRoomUniqueIdentifier].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setSuggestedRoomUniqueIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setSuggestedRoomUniqueIdentifier(
&self,
suggested_room_unique_identifier: Option<&NSUUID>,
);
/// The name that will be suggested when the user is prompted to name the accessory being set up.
/// If nil, then the suggested name will be taken from the accessory itself
///
/// Note: If an accessory bridge is being set up, then this value only applies to the accessory bridge
/// and not any accessories behind the bridge
#[unsafe(method(suggestedAccessoryName))]
#[unsafe(method_family = none)]
pub unsafe fn suggestedAccessoryName(&self) -> Option<Retained<NSString>>;
/// Setter for [`suggestedAccessoryName`][Self::suggestedAccessoryName].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setSuggestedAccessoryName:))]
#[unsafe(method_family = none)]
pub unsafe fn setSuggestedAccessoryName(&self, suggested_accessory_name: Option<&NSString>);
);
}
/// Methods declared on superclass `NSObject`.
impl HMAccessorySetupRequest {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}