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 #[unsafe(method(bluetoothIdentifier))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn bluetoothIdentifier(&self) -> Option<Retained<NSUUID>>;
39 );
40}
41
42/// Methods declared on superclass `NSObject`.
43impl AVCustomDeviceRoute {
44 extern_methods!(
45 #[unsafe(method(init))]
46 #[unsafe(method_family = init)]
47 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49 #[unsafe(method(new))]
50 #[unsafe(method_family = new)]
51 pub unsafe fn new() -> Retained<Self>;
52 );
53}