Skip to main content

OH_Scan_GetPictureScanProgress

Function OH_Scan_GetPictureScanProgress 

Source
pub unsafe extern "C" fn OH_Scan_GetPictureScanProgress(
    scannerId: *const c_char,
    prog: *mut Scan_PictureScanProgress,
) -> i32
Available on crate features scan and api-12 only.
Expand description

This API can get the progress of the scanner scanning the picture.A non-null value must be passed in, and the scan progress will be written to the structure to which the pointer points.

ohos.permission.PRINT

§Arguments

  • scannerId - The id for querying the image scanning progress of the scanner.

  • prog - The Scan_PictureScanProgress of scanning pictures, must be a non-null value.

§Returns

  • [Scan_ERROR_NONE] Indicates the scanner has successfully queried the progress of the scanned image. [SCAN_ERROR_NO_PERMISSION] Indicates have no permission to use this interface. [SCAN_ERROR_INVALID_PARAMETER] Indicates if the pointer is null or the character string is null. [SCAN_ERROR_RPC_FAILURE] Indicates an RPC communication error. [SCAN_ERROR_SERVER_FAILURE] Indicates An error occurs in the scan process. [SCAN_ERROR_JAMMED] Indicates the document feeder is jammed. [SCAN_ERROR_NO_DOCS] Indicates the document feeder is out of documents. [SCAN_ERROR_COVER_OPEN] Indicates the scanner cover is open. [SCAN_ERROR_IO_ERROR] Indicates an error occurred while communicating with the scanner. [SCAN_ERROR_NO_MEMORY] Indicates an insufficent amount of memory is available. [SCAN_ERROR_DEVICE_BUSY] Indicates the device is busy, the operation should be retried later.

Required System Capabilities: SystemCapability.Print.PrintFramework

Available since API-level: 12