From 7ad79db029ee7d63f2d18d66aa430fe725b82522 Mon Sep 17 00:00:00 2001 From: b30052170 Date: Tue, 5 Mar 2024 19:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=96=B0=E5=A2=9E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20Signed-off-by:baozewei@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: b30052170 --- api/@ohos.print.d.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/api/@ohos.print.d.ts b/api/@ohos.print.d.ts index 930b862bd..3e4cef3fd 100644 --- a/api/@ohos.print.d.ts +++ b/api/@ohos.print.d.ts @@ -2087,6 +2087,31 @@ declare namespace print { * @since 11 */ function notifyPrintService(jobId: string, type: 'spooler_closed_for_cancelled' | 'spooler_closed_for_started'): Promise; + + /** + * Query all added printers. + * @permission ohos.permission.MANAGE_PRINT_JOB + * @returns { Promise> } 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>; + + /** + * Query printer info by printer id. + * @permission ohos.permission.MANAGE_PRINT_JOB + * @param { string } printerId - Indicates id of the printer. + * @returns { Promise } 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; } export default print; \ No newline at end of file