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 { ... }
}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§
Sourceunsafe fn scannerDeviceDidBecomeAvailable(&self, scanner: &ICScannerDevice)
unsafe fn scannerDeviceDidBecomeAvailable(&self, scanner: &ICScannerDevice)
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.
Sourceunsafe fn scannerDevice_didSelectFunctionalUnit_error(
&self,
scanner: &ICScannerDevice,
functional_unit: &ICScannerFunctionalUnit,
error: Option<&NSError>,
)
Available on crate feature ICScannerFunctionalUnits only.
unsafe fn scannerDevice_didSelectFunctionalUnit_error( &self, scanner: &ICScannerDevice, functional_unit: &ICScannerFunctionalUnit, error: Option<&NSError>, )
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.
Sourceunsafe fn scannerDevice_didScanToURL_data(
&self,
scanner: &ICScannerDevice,
url: &NSURL,
data: &NSData,
)
👎Deprecated: Use didScanToURL: for file URLs and didScanToBandData: for memory based transfers
unsafe fn scannerDevice_didScanToURL_data( &self, scanner: &ICScannerDevice, url: &NSURL, data: &NSData, )
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.
Sourceunsafe fn scannerDevice_didScanToURL(
&self,
scanner: &ICScannerDevice,
url: &NSURL,
)
unsafe fn scannerDevice_didScanToURL( &self, scanner: &ICScannerDevice, url: &NSURL, )
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.
Sourceunsafe fn scannerDevice_didScanToBandData(
&self,
scanner: &ICScannerDevice,
data: &ICScannerBandData,
)
Available on crate feature ICScannerBandData only.
unsafe fn scannerDevice_didScanToBandData( &self, scanner: &ICScannerDevice, data: &ICScannerBandData, )
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.
Sourceunsafe fn scannerDevice_didCompleteOverviewScanWithError(
&self,
scanner: &ICScannerDevice,
error: Option<&NSError>,
)
unsafe fn scannerDevice_didCompleteOverviewScanWithError( &self, scanner: &ICScannerDevice, error: Option<&NSError>, )
This message is sent after the scanner device completes an overview scan.
This message is sent after the scanner device completes an overview scan.
Sourceunsafe fn scannerDevice_didCompleteScanWithError(
&self,
scanner: &ICScannerDevice,
error: Option<&NSError>,
)
unsafe fn scannerDevice_didCompleteScanWithError( &self, scanner: &ICScannerDevice, error: Option<&NSError>, )
This message is sent after the scanner device completes a scan.
This message is sent after the scanner device completes a scan.