pub unsafe extern "C" fn OH_Scan_SetScannerParameter(
scannerId: *const c_char,
option: i32,
value: *const c_char,
) -> i32Available on crate features
scan and api-12 only.Expand description
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.
ohos.permission.PRINT
§Arguments
-
scannerId- This id is used to set the options for a specific scanner. -
option- Options number to be set.The value ranges from 0 to [optionCount] - 1, be obtained from theScan_ScannerOptions. -
value- Option value to be set, valid value is obtained from the [ranges], be obtained from theScan_ScannerOptions.
§Returns
- [
Scan_ERROR_NONE] Indicates that the scanner parameters were successfully set. [SCAN_ERROR_NO_PERMISSION] Indicates have no permission to use this interface. [SCAN_ERROR_RPC_FAILURE] Indicates an RPC communication error. [SCAN_ERROR_SERVER_FAILURE] Indicates an error occurs in the scan process. [SCAN_ERROR_INVALID_PARAMETER] Indicates invalid parameter.
Required System Capabilities: SystemCapability.Print.PrintFramework
Available since API-level: 12