objc2_home_kit/generated/
HMAccessorySetupManager.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// This class can be used to launch system UI that will allow the user to go through the process
12    /// of adding one or more accessories to a particular home and follow up with additional setup.
13    /// These APIs do not require that the current app has home data authorization
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmaccessorysetupmanager?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct HMAccessorySetupManager;
19);
20
21unsafe impl Send for HMAccessorySetupManager {}
22
23unsafe impl Sync for HMAccessorySetupManager {}
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for HMAccessorySetupManager {}
27);
28
29impl HMAccessorySetupManager {
30    extern_methods!(
31        #[unsafe(method(init))]
32        #[unsafe(method_family = init)]
33        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
34
35        #[cfg(all(
36            feature = "HMAccessorySetupRequest",
37            feature = "HMAccessorySetupResult",
38            feature = "block2"
39        ))]
40        /// Launch system UI to perform the process of setting up accessories with the given request.
41        /// During this process, each of the accessories is added to a home, assigned to a room and
42        /// further configured based on its services
43        ///
44        ///
45        /// Parameter `request`: A request object describing information about how to set up the accessory
46        ///
47        /// Parameter `completion`: A block that is invoked once the setup process finishes. On failure, the result will be
48        /// nil and the error will provide additional information
49        #[unsafe(method(performAccessorySetupUsingRequest:completionHandler:))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn performAccessorySetupUsingRequest_completionHandler(
52            &self,
53            request: &HMAccessorySetupRequest,
54            completion: &block2::DynBlock<dyn Fn(*mut HMAccessorySetupResult, *mut NSError)>,
55        );
56    );
57}
58
59/// Methods declared on superclass `NSObject`.
60impl HMAccessorySetupManager {
61    extern_methods!(
62        #[unsafe(method(new))]
63        #[unsafe(method_family = new)]
64        pub unsafe fn new() -> Retained<Self>;
65    );
66}