objc2_av_routing/generated/
AVCustomDeviceRoute.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An object that represents a custom device route.
11    ///
12    /// Use the value of a route’s ``AVCustomDeviceRoute/networkEndpoint`` or
13    /// ``AVCustomDeviceRoute/bluetoothIdentifier`` property to establish a
14    /// connection to a device. Typically, only one of the properties provides a
15    /// valid value, depending on the type of device. In certain cases, both
16    /// properties might provide valid values, in which case your app determines which
17    /// one to use.
18    ///
19    /// See also [Apple's documentation](https://developer.apple.com/documentation/avrouting/avcustomdeviceroute?language=objc)
20    #[unsafe(super(NSObject))]
21    #[derive(Debug, PartialEq, Eq, Hash)]
22    pub struct AVCustomDeviceRoute;
23);
24
25unsafe impl Send for AVCustomDeviceRoute {}
26
27unsafe impl Sync for AVCustomDeviceRoute {}
28
29extern_conformance!(
30    unsafe impl NSObjectProtocol for AVCustomDeviceRoute {}
31);
32
33impl AVCustomDeviceRoute {
34    extern_methods!(
35        /// An identifier to use to establish a connection to a Bluetooth device.
36        ///
37        /// This property is not atomic.
38        ///
39        /// # Safety
40        ///
41        /// This might not be thread-safe.
42        #[unsafe(method(bluetoothIdentifier))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn bluetoothIdentifier(&self) -> Option<Retained<NSUUID>>;
45    );
46}
47
48/// Methods declared on superclass `NSObject`.
49impl AVCustomDeviceRoute {
50    extern_methods!(
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55        #[unsafe(method(new))]
56        #[unsafe(method_family = new)]
57        pub unsafe fn new() -> Retained<Self>;
58    );
59}