Skip to main content

Module scan

Module scan 

Source
Available on crate features scan and api-12 only.

Structs§

Scan_ErrorCode
Defines error codes.
Scan_PictureScanProgress
Indicates the progress of scanning a picture by the scanner.
Scan_ScannerDevice
Indicates scanner device information.
Scan_ScannerOptions
Indicates all parameter options for one scanner.

Functions§

OH_Scan_CancelScan
This API allows the scanner to cancel the scan.
OH_Scan_CloseScanner
This API is used to close the connected scanner device.
OH_Scan_Exit
This API can be used to exit the scanning service, free the Scan Framework Memory, and unregister the callback for scanner discover.
OH_Scan_GetPictureScanProgress
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.
OH_Scan_GetScannerParameter
This API can be used to get a list of options that can be set by the scanner. The returned struct pointer points to memory that is automatically freed when OH_Scan_Exit, and only one copy will be stored in memory for each model.
OH_Scan_Init
This API checks and pulls up the scan service, initializes the scan client, and establishes a connection to the scan service.
OH_Scan_OpenScanner
This API connects to scanner devices.
OH_Scan_SetScannerParameter
This API can be used to set one of the scanner’s option parameters. The option and value passed in are obtained from OH_Scan_GetScannerParameter.
OH_Scan_StartScan
This API allows the scanner to start scanning.
OH_Scan_StartScannerDiscovery
This API starts discovering scanners, Register a callback to handle discovered scanner devices.

Type Aliases§

Scan_ScannerDiscoveryCallback
Scanner devices discovery callback, register by OH_Scan_StartScannerDiscovery. The memory to which the pointer points will be released when the callback function ends.