objc2_av_foundation/generated/AVContinuityDevice.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::*;
5#[cfg(feature = "objc2-avf-audio")]
6use objc2_avf_audio::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 /// An AVContinuityDevice represents a physical iOS device that provides capture devices and audio session ports.
13 ///
14 ///
15 /// Each instance of AVContinuityDevice corresponds to a continuity device, such as an iPhone or iPad. Instances of AVContinuityDevice cannot be created directly.
16 ///
17 /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcontinuitydevice?language=objc)
18 #[unsafe(super(NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 pub struct AVContinuityDevice;
21);
22
23unsafe impl NSObjectProtocol for AVContinuityDevice {}
24
25impl AVContinuityDevice {
26 extern_methods!(
27 #[unsafe(method(init))]
28 #[unsafe(method_family = init)]
29 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
30
31 #[unsafe(method(new))]
32 #[unsafe(method_family = new)]
33 pub unsafe fn new() -> Retained<Self>;
34
35 /// A connection ID of the continuity device.
36 ///
37 ///
38 /// This property can be used to uniquely identify a continuity device. Every available continuity device has a unique ID that regenerates across device connections and disconnections.
39 #[unsafe(method(connectionID))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn connectionID(&self) -> Retained<NSUUID>;
42
43 /// Indicates whether the continuity device is connected and available to the system.
44 ///
45 ///
46 /// The value of this property is a BOOL indicating whether the continuity device represented by the receiver is connected and available for use. Clients can key value observe the value of this property to be notified when a continuity device is no longer available. When the value of this property becomes NO for a given instance, it will not become YES again. If the same physical continuity device again becomes available to the system, it will be represented using a new instance of AVContinuityDevice.
47 #[unsafe(method(isConnected))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn isConnected(&self) -> bool;
50
51 #[cfg(feature = "AVCaptureDevice")]
52 /// The video capture devices available from the continuity device.
53 #[unsafe(method(videoDevices))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn videoDevices(&self) -> Retained<NSArray<AVCaptureDevice>>;
56
57 #[cfg(feature = "objc2-avf-audio")]
58 /// The audio session inputs available from the continuity device.
59 #[unsafe(method(audioSessionInputs))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn audioSessionInputs(&self)
62 -> Retained<NSArray<AVAudioSessionPortDescription>>;
63 );
64}