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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/homekit/hmaccessoryownershiptoken?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HMAccessoryOwnershipToken;
);
unsafe impl Send for HMAccessoryOwnershipToken {}
unsafe impl Sync for HMAccessoryOwnershipToken {}
extern_conformance!(
unsafe impl NSObjectProtocol for HMAccessoryOwnershipToken {}
);
impl HMAccessoryOwnershipToken {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
/// Creates a new accessory ownership token to add an accessory to the home.
///
///
/// Parameter `data`: Data to be sent to prove ownership of this accessory.
///
///
/// This initializer may return nil if the data provided is not a valid ownership token
/// (e.g. if it's too short or determined to be insufficient for some other reason).
///
///
/// Returns: Returns an ownership token object.
#[unsafe(method(initWithData:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Option<Retained<Self>>;
);
}
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/homekit/hmaccessorysetuppayload?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HMAccessorySetupPayload;
);
unsafe impl Send for HMAccessorySetupPayload {}
unsafe impl Sync for HMAccessorySetupPayload {}
extern_conformance!(
unsafe impl NSObjectProtocol for HMAccessorySetupPayload {}
);
impl HMAccessorySetupPayload {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
/// Creates a new accessory setup payload to add an accessory to the home.
///
///
/// Parameter `setupPayloadURL`: The HomeKit setup payload for the accessory being added to the home.
///
///
/// Returns: Returns an accessory setup payload object if successful or nil on error.
#[unsafe(method(initWithURL:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithURL(
this: Allocated<Self>,
setup_payload_url: Option<&NSURL>,
) -> Option<Retained<Self>>;
/// Creates a new accessory setup payload to add an accessory to the home.
///
///
/// Parameter `setupPayloadURL`: The HomeKit setup payload URL for the accessory being added to the home.`
///
///
/// Parameter `ownershipToken`: The token proving ownership of the accessory being added to the home.
///
///
/// Returns: Returns an accessory setup payload object if successful or nil on error.
#[unsafe(method(initWithURL:ownershipToken:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithURL_ownershipToken(
this: Allocated<Self>,
setup_payload_url: &NSURL,
ownership_token: Option<&HMAccessoryOwnershipToken>,
) -> Option<Retained<Self>>;
);
}