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
//! 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!(
/// This class can be used to launch system UI that will allow the user to go through the process
/// of adding one or more accessories to a particular home and follow up with additional setup.
/// These APIs do not require that the current app has home data authorization
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmaccessorysetupmanager?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HMAccessorySetupManager;
);
unsafe impl Send for HMAccessorySetupManager {}
unsafe impl Sync for HMAccessorySetupManager {}
extern_conformance!(
unsafe impl NSObjectProtocol for HMAccessorySetupManager {}
);
impl HMAccessorySetupManager {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(
feature = "HMAccessorySetupRequest",
feature = "HMAccessorySetupResult",
feature = "block2"
))]
/// Launch system UI to perform the process of setting up accessories with the given request.
/// During this process, each of the accessories is added to a home, assigned to a room and
/// further configured based on its services
///
///
/// Parameter `request`: A request object describing information about how to set up the accessory
///
/// Parameter `completion`: A block that is invoked once the setup process finishes. On failure, the result will be
/// nil and the error will provide additional information
#[unsafe(method(performAccessorySetupUsingRequest:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn performAccessorySetupUsingRequest_completionHandler(
&self,
request: &HMAccessorySetupRequest,
completion: &block2::DynBlock<dyn Fn(*mut HMAccessorySetupResult, *mut NSError)>,
);
);
}
/// Methods declared on superclass `NSObject`.
impl HMAccessorySetupManager {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}