ICDeviceDelegate

Trait ICDeviceDelegate 

Source
pub unsafe trait ICDeviceDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn device_didCloseSessionWithError(
        &self,
        device: &ICDevice,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn didRemoveDevice(&self, device: &ICDevice)
       where Self: Sized + Message { ... }
    unsafe fn device_didOpenSessionWithError(
        &self,
        device: &ICDevice,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn deviceDidBecomeReady(&self, device: &ICDevice)
       where Self: Sized + Message { ... }
    unsafe fn deviceDidChangeName(&self, device: &ICDevice)
       where Self: Sized + Message { ... }
    unsafe fn device_didReceiveStatusInformation(
        &self,
        device: &ICDevice,
        status: &NSDictionary<ICDeviceStatus, AnyObject>,
    )
       where Self: Sized + Message { ... }
    unsafe fn device_didEncounterError(
        &self,
        device: &ICDevice,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn device_didEjectWithError(
        &self,
        device: &ICDevice,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn deviceDidChangeSharingState(&self, device: &ICDevice)
       where Self: Sized + Message { ... }
}
Available on crate feature ICDevice only.
Expand description

A delegate of ICDevice must conform to ICDeviceDelegate protocol.

Note: Unless otherwise noted, all delegate callbacks will occur on the main thread.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn device_didCloseSessionWithError( &self, device: &ICDevice, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent when a session is closed on a device.

This message completes the process initiated by the message “requestCloseSession” sent to the device object. This message is also sent if the device module in control of the device ceases to control the device.

Note: Execution of the delegate callback will occur on the main thread.

Source

unsafe fn didRemoveDevice(&self, device: &ICDevice)
where Self: Sized + Message,

This message is sent to the delegate to inform that a device has been removed.

Source

unsafe fn device_didOpenSessionWithError( &self, device: &ICDevice, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent when a session is opened on a device.

This message completes the process initiated by the message “requestOpenSession” sent to the device object.

Note: Execution of the delegate callback will occur on the main thread.

Source

unsafe fn deviceDidBecomeReady(&self, device: &ICDevice)
where Self: Sized + Message,

This message is sent when the device is ready to receive requests.

Note: Execution of the delegate callback will occur on the main thread.

Source

unsafe fn deviceDidChangeName(&self, device: &ICDevice)
where Self: Sized + Message,

This message is sent if the name of a device changes.

This happens if the device module overrides the default name of the device reported by the device’s transport layer, or if the name of the filesystem volume mounted by the device is changed by the user.

Note: Execution of the delegate callback will occur on the main thread.

Source

unsafe fn device_didReceiveStatusInformation( &self, device: &ICDevice, status: &NSDictionary<ICDeviceStatus, AnyObject>, )
where Self: Sized + Message,

This message is sent to the device delegate when status information is received from a device.

The ‘status’ dictionary contains two keys, ICStatusNotificationKey and ICLocalizedStatusNotificationKey, which are defined above. Status information keys are located in their respective ICDevice type class header.

Note: Execution of the delegate callback will occur on the main thread.

§Safety

status generic should be of the correct type.

Source

unsafe fn device_didEncounterError( &self, device: &ICDevice, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent to the device delegate a device encounters an error.

Note: Execution of the delegate callback will occur on the main thread.

Source

unsafe fn device_didEjectWithError( &self, device: &ICDevice, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent to the device delegate when the eject has completed.

Note: Execution of the delegate callback will occur on the main thread.

Source

unsafe fn deviceDidChangeSharingState(&self, device: &ICDevice)
where Self: Sized + Message,

👎Deprecated: Device sharing is no longer available

This message is sent when the sharing state of a device has changes.

Any Image Capture client application can choose to share the device over the network using the sharing or webSharing facility in Image Capture.

Note: Execution of the delegate callback will occur on the main thread.

Trait Implementations§

Source§

impl ProtocolType for dyn ICDeviceDelegate

Source§

const NAME: &'static str = "ICDeviceDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn ICDeviceDelegate

Implementations on Foreign Types§

Source§

impl<T> ICDeviceDelegate for ProtocolObject<T>
where T: ?Sized + ICDeviceDelegate,

Implementors§