1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
/// A class conforming to the VZVirtualMachineDelegate protocol can provide methods for tracking the virtual machine state.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzvirtualmachinedelegate?language=objc)
pub unsafe trait VZVirtualMachineDelegate: NSObjectProtocol {
#[cfg(feature = "VZVirtualMachine")]
/// Invoked when a guest has stopped the virtual machine.
///
/// Parameter `virtualMachine`: The virtual machine invoking the delegate method.
#[optional]
#[unsafe(method(guestDidStopVirtualMachine:))]
#[unsafe(method_family = none)]
unsafe fn guestDidStopVirtualMachine(&self, virtual_machine: &VZVirtualMachine);
#[cfg(feature = "VZVirtualMachine")]
/// Invoked when a virtual machine is stopped due to an error.
///
/// Parameter `virtualMachine`: The virtual machine invoking the delegate method.
///
/// Parameter `error`: The error.
#[optional]
#[unsafe(method(virtualMachine:didStopWithError:))]
#[unsafe(method_family = none)]
unsafe fn virtualMachine_didStopWithError(
&self,
virtual_machine: &VZVirtualMachine,
error: &NSError,
);
#[cfg(all(feature = "VZNetworkDevice", feature = "VZVirtualMachine"))]
/// Invoked when a virtual machine's network attachment has been disconnected.
///
/// This method is invoked every time that the network interface fails to start, resulting in the network attachment being disconnected. This can happen
/// in many situations such as initial boot, device reset, reboot, etc. Therefore, this method may be invoked several times during a virtual machine's life cycle.
///
/// The VZNetworkDevice.attachment property will be nil after the method is invoked.
///
/// Parameter `virtualMachine`: The virtual machine invoking the delegate method.
///
/// Parameter `networkDevice`: The network device whose attachment was disconnected.
///
/// Parameter `error`: The error.
#[optional]
#[unsafe(method(virtualMachine:networkDevice:attachmentWasDisconnectedWithError:))]
#[unsafe(method_family = none)]
unsafe fn virtualMachine_networkDevice_attachmentWasDisconnectedWithError(
&self,
virtual_machine: &VZVirtualMachine,
network_device: &VZNetworkDevice,
error: &NSError,
);
}
);