ICScannerDeviceDelegate

Trait ICScannerDeviceDelegate 

Source
pub unsafe trait ICScannerDeviceDelegate: ICDeviceDelegate {
    // Provided methods
    unsafe fn scannerDeviceDidBecomeAvailable(&self, scanner: &ICScannerDevice)
       where Self: Sized + Message { ... }
    unsafe fn scannerDevice_didSelectFunctionalUnit_error(
        &self,
        scanner: &ICScannerDevice,
        functional_unit: &ICScannerFunctionalUnit,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDevice_didScanToURL_data(
        &self,
        scanner: &ICScannerDevice,
        url: &NSURL,
        data: &NSData,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDevice_didScanToURL(
        &self,
        scanner: &ICScannerDevice,
        url: &NSURL,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDevice_didScanToBandData(
        &self,
        scanner: &ICScannerDevice,
        data: &ICScannerBandData,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDevice_didCompleteOverviewScanWithError(
        &self,
        scanner: &ICScannerDevice,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDevice_didCompleteScanWithError(
        &self,
        scanner: &ICScannerDevice,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
}
Available on crate features ICDevice and ICScannerDevice only.
Expand description

A delegate of ICScannerDevice must conform to ICScannerDeviceDelegate protocol.

The ICScannerDeviceDelegate protocol inherits from the ICDeviceDelegate protocol.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn scannerDeviceDidBecomeAvailable(&self, scanner: &ICScannerDevice)
where Self: Sized + Message,

This message is sent when another client closes an open session on the scanner.

Scanners require exclusive access, only one client can open a session on a scanner. The scanner is available if it does not have a session opened by another client. Attempting to open a session on a scanner that already has an open session for another client will result in an error. A client that wants to open a session on a scanner as soon as it is available should implement this method and send “requestOpenSession” message to scanner object from that method.

Source

unsafe fn scannerDevice_didSelectFunctionalUnit_error( &self, scanner: &ICScannerDevice, functional_unit: &ICScannerFunctionalUnit, error: Option<&NSError>, )
where Self: Sized + Message,

Available on crate feature ICScannerFunctionalUnits only.

This message is sent when a functional unit is selected on the scanner device.

A functional unit is selected immediately after the scanner device is instantiated and in response to “requestSelectFunctionalUnit:” message.

Source

unsafe fn scannerDevice_didScanToURL_data( &self, scanner: &ICScannerDevice, url: &NSURL, data: &NSData, )
where Self: Sized + Message,

👎Deprecated: Use didScanToURL: for file URLs and didScanToBandData: for memory based transfers

This message is sent when the scanner device receives the requested scan. If selectedFunctionalUnit is a document feeder, then this message will be sent once for each scanned page.

This method has been deprecated and superceded by the didScanToURL: method for file based transfer, along with the didScanToBandData: for memory based transfer.

Source

unsafe fn scannerDevice_didScanToURL( &self, scanner: &ICScannerDevice, url: &NSURL, )
where Self: Sized + Message,

This message is sent when the scanner device receives the requested scan. If selectedFunctionalUnit is a document feeder, then this message will be sent once for each scanned page.

This message is sent when the scanner device receives the requested scan. If selectedFunctionalUnit is a document feeder, then this message will be sent once for each scanned page.

Source

unsafe fn scannerDevice_didScanToBandData( &self, scanner: &ICScannerDevice, data: &ICScannerBandData, )
where Self: Sized + Message,

Available on crate feature ICScannerBandData only.

This message is sent when the scanner device receives the requested scan progress notification and a band of data is sent for each notification received.

In memory transfer mode, this will send a band of size that has been selected by the client via the maxMemoryBandSize property.

Source

unsafe fn scannerDevice_didCompleteOverviewScanWithError( &self, scanner: &ICScannerDevice, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent after the scanner device completes an overview scan.

This message is sent after the scanner device completes an overview scan.

Source

unsafe fn scannerDevice_didCompleteScanWithError( &self, scanner: &ICScannerDevice, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent after the scanner device completes a scan.

This message is sent after the scanner device completes a scan.

Trait Implementations§

Source§

impl ProtocolType for dyn ICScannerDeviceDelegate

Source§

const NAME: &'static str = "ICScannerDeviceDelegate"

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 ICScannerDeviceDelegate

Implementations on Foreign Types§

Source§

impl<T> ICScannerDeviceDelegate for ProtocolObject<T>

Implementors§