打印新增接口 Signed-off-by:baozewei@huawei.com

Signed-off-by: b30052170 <baozewei@huawei.com>
This commit is contained in:
b30052170 2024-03-05 19:15:28 +08:00
parent 1a533a25c2
commit 7ad79db029

25
api/@ohos.print.d.ts vendored
View File

@ -2087,6 +2087,31 @@ declare namespace print {
* @since 11
*/
function notifyPrintService(jobId: string, type: 'spooler_closed_for_cancelled' | 'spooler_closed_for_started'): Promise<void>;
/**
* Query all added printers.
* @permission ohos.permission.MANAGE_PRINT_JOB
* @returns { Promise<Array<string>> } the promise returned by the function.
* @throws { BusinessError } 201 - the application does not have permission to call this function.
* @throws { BusinessError } 202 - not system application
* @syscap SystemCapability.Print.PrintFramework
* @systemapi Hide this for inner system use.
* @since 12
*/
function queryAddedPrinters(): Promise<Array<string>>;
/**
* Query printer info by printer id.
* @permission ohos.permission.MANAGE_PRINT_JOB
* @param { string } printerId - Indicates id of the printer.
* @returns { Promise<PrinterInfo> } the promise returned by the function.
* @throws { BusinessError } 201 - the application does not have permission to call this function.
* @throws { BusinessError } 202 - not system application
* @syscap SystemCapability.Print.PrintFramework
* @systemapi Hide this for inner system use.
* @since 12
*/
function queryPrinterInfoByPrinterId(printerId: string): Promise<PrinterInfo>;
}
export default print;