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
23extern_conformance!(
24    unsafe impl NSObjectProtocol for AVContinuityDevice {}
25);
26
27impl AVContinuityDevice {
28    extern_methods!(
29        #[unsafe(method(init))]
30        #[unsafe(method_family = init)]
31        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33        #[unsafe(method(new))]
34        #[unsafe(method_family = new)]
35        pub unsafe fn new() -> Retained<Self>;
36
37        /// A connection ID of the continuity device.
38        ///
39        ///
40        /// 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.
41        #[unsafe(method(connectionID))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn connectionID(&self) -> Retained<NSUUID>;
44
45        /// Indicates whether the continuity device is connected and available to the system.
46        ///
47        ///
48        /// 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.
49        #[unsafe(method(isConnected))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn isConnected(&self) -> bool;
52
53        #[cfg(feature = "AVCaptureDevice")]
54        /// The video capture devices available from the continuity device.
55        #[unsafe(method(videoDevices))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn videoDevices(&self) -> Retained<NSArray<AVCaptureDevice>>;
58
59        #[cfg(feature = "objc2-avf-audio")]
60        /// The audio session inputs available from the continuity device.
61        #[unsafe(method(audioSessionInputs))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn audioSessionInputs(&self)
64            -> Retained<NSArray<AVAudioSessionPortDescription>>;
65    );
66}