pub trait ICDevice: Sized {
Show 28 methods
// Required methods
unsafe fn delegate(self) -> id;
unsafe fn setDelegate(self, delegate: id);
unsafe fn type_(self) -> ICDeviceType;
unsafe fn name(self) -> id;
unsafe fn icon(self) -> CGImageRef;
unsafe fn capabilities(self) -> id;
unsafe fn modulePath(self) -> id;
unsafe fn moduleVersion(self) -> id;
unsafe fn isRemote(self) -> BOOL;
unsafe fn transportType(self) -> id;
unsafe fn usbLocationID(self) -> c_int;
unsafe fn usbProductID(self) -> c_int;
unsafe fn usbVendorID(self) -> c_int;
unsafe fn fwGUID(self) -> c_longlong;
unsafe fn serialNumberString(self) -> id;
unsafe fn locationDescription(self) -> id;
unsafe fn hasOpenSession(self) -> BOOL;
unsafe fn UUIDString(self) -> id;
unsafe fn persistentIDString(self) -> id;
unsafe fn buttonPressed(self) -> id;
unsafe fn autolaunchApplicationPath(self) -> id;
unsafe fn setAutolaunchApplicationPath(self, autolaunchApplicationPath: id);
unsafe fn userData(self) -> id;
unsafe fn requestOpenSession(self);
unsafe fn requestCloseSession(self);
unsafe fn requestYield(self);
unsafe fn requestSendMessage(
self,
messageCode: u64,
outData: id,
maxReturnedDataSize: u64,
sendMessageDelegate: id,
didSendMessageSelector: id,
contextInfo: id,
);
unsafe fn requestEjectOrDisconnect(self);
}Required Methods§
Sourceunsafe fn setDelegate(self, delegate: id)
unsafe fn setDelegate(self, delegate: id)
Set the delegate.
Sourceunsafe fn type_(self) -> ICDeviceType
unsafe fn type_(self) -> ICDeviceType
The type of the device as defined by ICDeviceType OR’d with its ICDeviceLocationType. The type of this device can be obtained by AND’ing the value retuned by this property with an appropriate ICDeviceTypeMask. The location type of this device can be obtained by AND’ing the value retuned by this property with an appropriate ICDeviceLocationTypeMask.
Sourceunsafe fn name(self) -> id
unsafe fn name(self) -> id
Name of the device as reported by the device module or by the device transport when a device module is not in control of this device. This name may change if the device module overrides the default name of the device reported by the device’s transport, or if the name of the filesystem volume mounted by the device is changed by the user.
Sourceunsafe fn icon(self) -> CGImageRef
unsafe fn icon(self) -> CGImageRef
Icon image for the device.
Sourceunsafe fn capabilities(self) -> id
unsafe fn capabilities(self) -> id
The capabilities of the device as reported by the device module.
Sourceunsafe fn modulePath(self) -> id
unsafe fn modulePath(self) -> id
Filesystem path of the device module that is associated with this device.
Sourceunsafe fn moduleVersion(self) -> id
unsafe fn moduleVersion(self) -> id
The bundle version of the device module associated with this device.
Sourceunsafe fn isRemote(self) -> BOOL
unsafe fn isRemote(self) -> BOOL
Indicates whether the device is a remote device published by Image Capture device sharing facility.
Sourceunsafe fn transportType(self) -> id
unsafe fn transportType(self) -> id
The transport type used by the device.
Sourceunsafe fn usbLocationID(self) -> c_int
unsafe fn usbLocationID(self) -> c_int
The USB location ID of a USB device in the IOKit registry. This will be 0 for non-USB devices.
Sourceunsafe fn usbProductID(self) -> c_int
unsafe fn usbProductID(self) -> c_int
The USB product ID of a USB device in the IOKit registry. This will be 0 for non-USB devices.
Sourceunsafe fn usbVendorID(self) -> c_int
unsafe fn usbVendorID(self) -> c_int
The USB vendor ID of a USB device in the IOKit registry. This will be 0 for non-USB devices.
Sourceunsafe fn fwGUID(self) -> c_longlong
unsafe fn fwGUID(self) -> c_longlong
The FireWire GUID of a FireWire device in the IOKit registry. This will be 0 for non-FireWire devices.
Sourceunsafe fn serialNumberString(self) -> id
unsafe fn serialNumberString(self) -> id
The serial number of the device. This will be NULL if the device does not provide a serial number.
Sourceunsafe fn locationDescription(self) -> id
unsafe fn locationDescription(self) -> id
A non-localized location description string for the device.
Sourceunsafe fn hasOpenSession(self) -> BOOL
unsafe fn hasOpenSession(self) -> BOOL
Indicates whether the device has an open session.
Sourceunsafe fn UUIDString(self) -> id
unsafe fn UUIDString(self) -> id
A string representation of the Universally Unique ID of the device.
Sourceunsafe fn persistentIDString(self) -> id
unsafe fn persistentIDString(self) -> id
A string representation of the persistent ID of the device.
A string object with one of the ICButtonType values.
Sourceunsafe fn autolaunchApplicationPath(self) -> id
unsafe fn autolaunchApplicationPath(self) -> id
Filesystem path of an application that is to be automatically launched when this device is added.
Sourceunsafe fn setAutolaunchApplicationPath(self, autolaunchApplicationPath: id)
unsafe fn setAutolaunchApplicationPath(self, autolaunchApplicationPath: id)
Set the filesystem path of an application that is to be automatically launched when this device is added.
Sourceunsafe fn userData(self) -> id
unsafe fn userData(self) -> id
A mutable dictionary to store arbitrary key-value pairs associated with a device object. This can be used by view objects that bind to this object to store “house-keeping” information.
Sourceunsafe fn requestOpenSession(self)
unsafe fn requestOpenSession(self)
This message requests to open a session on the device.
Sourceunsafe fn requestCloseSession(self)
unsafe fn requestCloseSession(self)
This message requests to close a previously opened session on this device.
Sourceunsafe fn requestYield(self)
unsafe fn requestYield(self)
This message requests the device module in control of this device to yield control.
Sourceunsafe fn requestSendMessage(
self,
messageCode: u64,
outData: id,
maxReturnedDataSize: u64,
sendMessageDelegate: id,
didSendMessageSelector: id,
contextInfo: id,
)
unsafe fn requestSendMessage( self, messageCode: u64, outData: id, maxReturnedDataSize: u64, sendMessageDelegate: id, didSendMessageSelector: id, contextInfo: id, )
This method asynchronously sends an arbitrary message with optional data to a device.
Sourceunsafe fn requestEjectOrDisconnect(self)
unsafe fn requestEjectOrDisconnect(self)
Eject the media if permitted by the device, or disconnect from a remote device.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".