objc2_virtualization/generated/VZUSBMassStorageDevice.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
6use crate::*;
7
8extern_class!(
9 /// Class representing a hot-pluggable USB Mass Storage device.
10 ///
11 /// This device is created through either instantiating it directly and passing VZUSBMassStorageDeviceConfiguration to its initializer
12 /// or instantiating a VZUSBMassStorageDeviceConfiguration in a VZVirtualMachineConfiguration. Direct instantiation will create
13 /// an object that can be passed to -[VZUSBController attachDevice:completionHandler:] method. Instantiation via VZUSBMassStorageDeviceConfiguration
14 /// will make the device available in VZUSBController.usbDevices property.
15 ///
16 /// See: VZUSBController
17 ///
18 /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzusbmassstoragedevice?language=objc)
19 #[unsafe(super(VZStorageDevice, NSObject))]
20 #[derive(Debug, PartialEq, Eq, Hash)]
21 #[cfg(feature = "VZStorageDevice")]
22 pub struct VZUSBMassStorageDevice;
23);
24
25#[cfg(feature = "VZStorageDevice")]
26extern_conformance!(
27 unsafe impl NSObjectProtocol for VZUSBMassStorageDevice {}
28);
29
30#[cfg(all(feature = "VZStorageDevice", feature = "VZUSBDevice"))]
31extern_conformance!(
32 unsafe impl VZUSBDevice for VZUSBMassStorageDevice {}
33);
34
35#[cfg(feature = "VZStorageDevice")]
36impl VZUSBMassStorageDevice {
37 extern_methods!(
38 #[cfg(all(
39 feature = "VZStorageDeviceConfiguration",
40 feature = "VZUSBMassStorageDeviceConfiguration"
41 ))]
42 /// Initialize the runtime USB Mass Storage device object.
43 ///
44 /// Parameter `configuration`: The configuration of the USB Mass Storage device.
45 ///
46 /// See: VZUSBMassStorageDeviceConfiguration
47 #[unsafe(method(initWithConfiguration:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithConfiguration(
50 this: Allocated<Self>,
51 configuration: &VZUSBMassStorageDeviceConfiguration,
52 ) -> Retained<Self>;
53 );
54}
55
56/// Methods declared on superclass `VZStorageDevice`.
57#[cfg(feature = "VZStorageDevice")]
58impl VZUSBMassStorageDevice {
59 extern_methods!(
60 #[unsafe(method(new))]
61 #[unsafe(method_family = new)]
62 pub unsafe fn new() -> Retained<Self>;
63
64 #[unsafe(method(init))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67 );
68}