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
29unsafe impl NSObjectProtocol for AVCustomDeviceRoute {}
30
31impl AVCustomDeviceRoute {
32 extern_methods!(
33 /// An identifier to use to establish a connection to a Bluetooth device.
34 #[unsafe(method(bluetoothIdentifier))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn bluetoothIdentifier(&self) -> Option<Retained<NSUUID>>;
37 );
38}
39
40/// Methods declared on superclass `NSObject`.
41impl AVCustomDeviceRoute {
42 extern_methods!(
43 #[unsafe(method(init))]
44 #[unsafe(method_family = init)]
45 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47 #[unsafe(method(new))]
48 #[unsafe(method_family = new)]
49 pub unsafe fn new() -> Retained<Self>;
50 );
51}