objc2_accessory_setup_kit/generated/
ASAccessorySettings.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    /// [Apple's documentation](https://developer.apple.com/documentation/accessorysetupkit/asaccessorysettings?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct ASAccessorySettings;
15);
16
17unsafe impl Send for ASAccessorySettings {}
18
19unsafe impl Sync for ASAccessorySettings {}
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for ASAccessorySettings {}
23);
24
25impl ASAccessorySettings {
26    extern_methods!(
27        /// An empty settings object.
28        #[unsafe(method(defaultSettings))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn defaultSettings() -> Retained<ASAccessorySettings>;
31
32        /// A hotspot identifier that clients can use to connect to an accessory's hotspot.
33        ///
34        /// This property is not atomic.
35        ///
36        /// # Safety
37        ///
38        /// This might not be thread-safe.
39        #[unsafe(method(SSID))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn SSID(&self) -> Option<Retained<NSString>>;
42
43        /// Setter for [`SSID`][Self::SSID].
44        ///
45        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
46        ///
47        /// # Safety
48        ///
49        /// This might not be thread-safe.
50        #[unsafe(method(setSSID:))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn setSSID(&self, ssid: Option<&NSString>);
53
54        /// A 6-byte identifier for bridging classic transport profiles.
55        ///
56        /// AccessorySetupKit ignores this property if another app already authorized and bridged the accessory.
57        ///
58        /// This property is not atomic.
59        ///
60        /// # Safety
61        ///
62        /// This might not be thread-safe.
63        #[unsafe(method(bluetoothTransportBridgingIdentifier))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn bluetoothTransportBridgingIdentifier(&self) -> Option<Retained<NSData>>;
66
67        /// Setter for [`bluetoothTransportBridgingIdentifier`][Self::bluetoothTransportBridgingIdentifier].
68        ///
69        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
70        ///
71        /// # Safety
72        ///
73        /// This might not be thread-safe.
74        #[unsafe(method(setBluetoothTransportBridgingIdentifier:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn setBluetoothTransportBridgingIdentifier(
77            &self,
78            bluetooth_transport_bridging_identifier: Option<&NSData>,
79        );
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84impl ASAccessorySettings {
85    extern_methods!(
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}