161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit BasicServicesKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport type { AsyncCallback, Callback } from './@ohos.base';
2261847f8eSopenharmony_ciimport type Context from './application/Context';
2361847f8eSopenharmony_ci
2461847f8eSopenharmony_ci/**
2561847f8eSopenharmony_ci * System print
2661847f8eSopenharmony_ci *
2761847f8eSopenharmony_ci * @namespace print
2861847f8eSopenharmony_ci * @syscap SystemCapability.Print.PrintFramework
2961847f8eSopenharmony_ci * @since 10
3061847f8eSopenharmony_ci */
3161847f8eSopenharmony_cideclare namespace print {
3261847f8eSopenharmony_ci
3361847f8eSopenharmony_ci  /**
3461847f8eSopenharmony_ci   * PrintTask provide event callback.
3561847f8eSopenharmony_ci   * @interface PrintTask
3661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
3761847f8eSopenharmony_ci   * @since 10
3861847f8eSopenharmony_ci   */
3961847f8eSopenharmony_ci  interface PrintTask {
4061847f8eSopenharmony_ci    /**
4161847f8eSopenharmony_ci     * Register event callback when the current print task is in process.
4261847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
4361847f8eSopenharmony_ci     * @param { 'block' } type - Indicates the print task has been blocked.
4461847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
4561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
4661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
4761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
4861847f8eSopenharmony_ci     * @since 10
4961847f8eSopenharmony_ci     */
5061847f8eSopenharmony_ci    on(type: 'block', callback: Callback<void>): void;
5161847f8eSopenharmony_ci
5261847f8eSopenharmony_ci    /**
5361847f8eSopenharmony_ci     * Register event callback when the current print task is in process.
5461847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
5561847f8eSopenharmony_ci     * @param { 'succeed' } type - Indicates the print task succeed.
5661847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
5761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
5861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
5961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
6061847f8eSopenharmony_ci     * @since 10
6161847f8eSopenharmony_ci     */
6261847f8eSopenharmony_ci    on(type: 'succeed', callback: Callback<void>): void;
6361847f8eSopenharmony_ci
6461847f8eSopenharmony_ci    /**
6561847f8eSopenharmony_ci     * Register event callback when the current print task is in process.
6661847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
6761847f8eSopenharmony_ci     * @param { 'fail' } type - Indicates the print task has completed with failure.
6861847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
6961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
7061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
7161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
7261847f8eSopenharmony_ci     * @since 10
7361847f8eSopenharmony_ci     */
7461847f8eSopenharmony_ci    on(type: 'fail', callback: Callback<void>): void;
7561847f8eSopenharmony_ci
7661847f8eSopenharmony_ci    /**
7761847f8eSopenharmony_ci     * Register event callback when the current print task is in process.
7861847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
7961847f8eSopenharmony_ci     * @param { 'cancel' } type - Indicates the print task has been cancelled.
8061847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
8161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
8261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
8361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
8461847f8eSopenharmony_ci     * @since 10
8561847f8eSopenharmony_ci     */
8661847f8eSopenharmony_ci    on(type: 'cancel', callback: Callback<void>): void;
8761847f8eSopenharmony_ci
8861847f8eSopenharmony_ci    /**
8961847f8eSopenharmony_ci     * Unregister event callback when the current print task is in process.
9061847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
9161847f8eSopenharmony_ci     * @param { 'block' } type - Indicates the print task has been blocked.
9261847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
9361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
9461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
9561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
9661847f8eSopenharmony_ci     * @since 10
9761847f8eSopenharmony_ci     */
9861847f8eSopenharmony_ci    off(type: 'block', callback?: Callback<void>): void;
9961847f8eSopenharmony_ci
10061847f8eSopenharmony_ci    /**
10161847f8eSopenharmony_ci     * Unregister event callback when the current print task is in process.
10261847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
10361847f8eSopenharmony_ci     * @param { 'succeed' } type - Indicates the print task succeed.
10461847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
10561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
10661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
10761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
10861847f8eSopenharmony_ci     * @since 10
10961847f8eSopenharmony_ci     */
11061847f8eSopenharmony_ci    off(type: 'succeed', callback?: Callback<void>): void;
11161847f8eSopenharmony_ci
11261847f8eSopenharmony_ci    /**
11361847f8eSopenharmony_ci     * Unregister event callback when the current print task is in process.
11461847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
11561847f8eSopenharmony_ci     * @param { 'fail' } type - Indicates the print task has completed with failure.
11661847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
11761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
11861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
11961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
12061847f8eSopenharmony_ci     * @since 10
12161847f8eSopenharmony_ci     */
12261847f8eSopenharmony_ci    off(type: 'fail', callback?: Callback<void>): void;
12361847f8eSopenharmony_ci
12461847f8eSopenharmony_ci    /**
12561847f8eSopenharmony_ci     * Unregister event callback when the current print task is in process.
12661847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
12761847f8eSopenharmony_ci     * @param { 'cancel' } type - Indicates the print task has been cancelled.
12861847f8eSopenharmony_ci     * @param { Callback<void> } callback - The callback function for print task change event
12961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
13061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
13161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
13261847f8eSopenharmony_ci     * @since 10
13361847f8eSopenharmony_ci     */
13461847f8eSopenharmony_ci    off(type: 'cancel', callback?: Callback<void>): void;
13561847f8eSopenharmony_ci  }
13661847f8eSopenharmony_ci
13761847f8eSopenharmony_ci  /**
13861847f8eSopenharmony_ci   * Third-party application implement this interface to render files to be printed.
13961847f8eSopenharmony_ci   * @interface PrintDocumentAdapter
14061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
14161847f8eSopenharmony_ci   * @since 11
14261847f8eSopenharmony_ci   */
14361847f8eSopenharmony_ci  interface PrintDocumentAdapter {
14461847f8eSopenharmony_ci
14561847f8eSopenharmony_ci    /**
14661847f8eSopenharmony_ci     * Implement this function to update the print file.
14761847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
14861847f8eSopenharmony_ci     * @param { string } jobId - Indicates print job id.
14961847f8eSopenharmony_ci     * @param { PrintAttributes } oldAttrs - Indicates old print attributes.
15061847f8eSopenharmony_ci     * @param { PrintAttributes } newAttrs - Indicates new print attributes.
15161847f8eSopenharmony_ci     * @param { number } fd - Indicates print file fd.
15261847f8eSopenharmony_ci     * @param { function } writeResultCallback - Indicates this function should execute after the file is updated.
15361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
15461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
15561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
15661847f8eSopenharmony_ci     * @since 11
15761847f8eSopenharmony_ci     */
15861847f8eSopenharmony_ci    onStartLayoutWrite(jobId: string, oldAttrs: PrintAttributes, newAttrs: PrintAttributes, fd: number,
15961847f8eSopenharmony_ci      writeResultCallback: (jobId: string, writeResult: PrintFileCreationState) => void): void;
16061847f8eSopenharmony_ci
16161847f8eSopenharmony_ci    /**
16261847f8eSopenharmony_ci     * Implement this function to listen job status change.
16361847f8eSopenharmony_ci     * @permission ohos.permission.PRINT
16461847f8eSopenharmony_ci     * @param { string } jobId - Indicates print job id.
16561847f8eSopenharmony_ci     * @param { PrintDocumentAdapterState } state - Indicates job changes to this state.
16661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - the application does not have permission to call this function.
16761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
16861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
16961847f8eSopenharmony_ci     * @since 11
17061847f8eSopenharmony_ci     */
17161847f8eSopenharmony_ci    onJobStateChanged(jobId: string, state: PrintDocumentAdapterState): void;
17261847f8eSopenharmony_ci  }
17361847f8eSopenharmony_ci
17461847f8eSopenharmony_ci  /**
17561847f8eSopenharmony_ci   * Start new print task for App.
17661847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
17761847f8eSopenharmony_ci   * @param { Array<string> } files - Indicates the filepath list to be printed. Only pdf and picture filetype are supported.
17861847f8eSopenharmony_ci   * @param { AsyncCallback<PrintTask> } callback - The callback function for print task.
17961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
18061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
18161847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
18261847f8eSopenharmony_ci   * @since 10
18361847f8eSopenharmony_ci   */
18461847f8eSopenharmony_ci  function print(files: Array<string>, callback: AsyncCallback<PrintTask>): void;
18561847f8eSopenharmony_ci
18661847f8eSopenharmony_ci  /**
18761847f8eSopenharmony_ci   * Start new print task for App.
18861847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
18961847f8eSopenharmony_ci   * @param { Array<string> } files - Indicates the filepath list to be printed. Only pdf and picture filetype are supported.
19061847f8eSopenharmony_ci   * @returns { Promise<PrintTask> } the promise returned by the function.
19161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
19261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
19361847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
19461847f8eSopenharmony_ci   * @since 10
19561847f8eSopenharmony_ci   */
19661847f8eSopenharmony_ci  function print(files: Array<string>): Promise<PrintTask>;
19761847f8eSopenharmony_ci
19861847f8eSopenharmony_ci  /**
19961847f8eSopenharmony_ci   * Start new print task for App.
20061847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
20161847f8eSopenharmony_ci   * @param { Array<string> } files - Indicates the filepath list to be printed. Only pdf and picture filetype are supported.
20261847f8eSopenharmony_ci   * @param { Context } context - The ability context that initiates the call print request.
20361847f8eSopenharmony_ci   * @param { AsyncCallback<PrintTask> } callback - The callback function for print task.
20461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
20561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
20661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
20761847f8eSopenharmony_ci   * @since 11
20861847f8eSopenharmony_ci   */
20961847f8eSopenharmony_ci  function print(files: Array<string>, context: Context, callback: AsyncCallback<PrintTask>): void;
21061847f8eSopenharmony_ci
21161847f8eSopenharmony_ci  /**
21261847f8eSopenharmony_ci   * Start new print task for App.
21361847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
21461847f8eSopenharmony_ci   * @param { Array<string> } files - Indicates the filepath list to be printed. Only pdf and picture filetype are supported.
21561847f8eSopenharmony_ci   * @param { Context } context - The ability context that initiates the call print request.
21661847f8eSopenharmony_ci   * @returns { Promise<PrintTask> } the promise returned by the function.
21761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
21861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
21961847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
22061847f8eSopenharmony_ci   * @since 11
22161847f8eSopenharmony_ci   */
22261847f8eSopenharmony_ci  function print(files: Array<string>, context: Context): Promise<PrintTask>;
22361847f8eSopenharmony_ci
22461847f8eSopenharmony_ci  /**
22561847f8eSopenharmony_ci   * Start new print task for App And the App need update print file.
22661847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
22761847f8eSopenharmony_ci   * @param { string } jobName - Indicates print file Name.
22861847f8eSopenharmony_ci   * @param { PrintDocumentAdapter } printAdapter - Indicates functions implemented by the cpp.
22961847f8eSopenharmony_ci   * @param { PrintAttributes } printAttributes - Indicates print attributes.
23061847f8eSopenharmony_ci   * @param { Context } context - The ability context that initiates the call print request.
23161847f8eSopenharmony_ci   * @returns { Promise<PrintTask> } the promise returned by the function.
23261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
23361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
23461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
23561847f8eSopenharmony_ci   * @since 11
23661847f8eSopenharmony_ci   */
23761847f8eSopenharmony_ci  function print(jobName: string, printAdapter: PrintDocumentAdapter, printAttributes: PrintAttributes,
23861847f8eSopenharmony_ci    context: Context): Promise<PrintTask>;
23961847f8eSopenharmony_ci
24061847f8eSopenharmony_ci  /**
24161847f8eSopenharmony_ci   * defines print attributes.
24261847f8eSopenharmony_ci   * @typedef PrintAttributes
24361847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
24461847f8eSopenharmony_ci   * @since 11
24561847f8eSopenharmony_ci   */
24661847f8eSopenharmony_ci  interface PrintAttributes {
24761847f8eSopenharmony_ci    /**
24861847f8eSopenharmony_ci     * Copies of document list.
24961847f8eSopenharmony_ci     * @type { ?number }
25061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
25161847f8eSopenharmony_ci     * @since 11
25261847f8eSopenharmony_ci     */
25361847f8eSopenharmony_ci    copyNumber?: number;
25461847f8eSopenharmony_ci
25561847f8eSopenharmony_ci    /**
25661847f8eSopenharmony_ci     * Range size to be printed.
25761847f8eSopenharmony_ci     * @type { ?PrintPageRange }
25861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
25961847f8eSopenharmony_ci     * @since 11
26061847f8eSopenharmony_ci     */
26161847f8eSopenharmony_ci    pageRange?: PrintPageRange;
26261847f8eSopenharmony_ci
26361847f8eSopenharmony_ci    /**
26461847f8eSopenharmony_ci     * Page size.
26561847f8eSopenharmony_ci     * @type { ?(PrintPageSize | PrintPageType) }
26661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
26761847f8eSopenharmony_ci     * @since 11
26861847f8eSopenharmony_ci     */
26961847f8eSopenharmony_ci    pageSize?: PrintPageSize | PrintPageType;
27061847f8eSopenharmony_ci
27161847f8eSopenharmony_ci    /**
27261847f8eSopenharmony_ci     * Print direction.
27361847f8eSopenharmony_ci     * @type { ?PrintDirectionMode }
27461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
27561847f8eSopenharmony_ci     * @since 11
27661847f8eSopenharmony_ci     */
27761847f8eSopenharmony_ci    directionMode?: PrintDirectionMode;
27861847f8eSopenharmony_ci
27961847f8eSopenharmony_ci    /**
28061847f8eSopenharmony_ci     * Color mode.
28161847f8eSopenharmony_ci     * @type { ?PrintColorMode }
28261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
28361847f8eSopenharmony_ci     * @since 11
28461847f8eSopenharmony_ci     */
28561847f8eSopenharmony_ci    colorMode?: PrintColorMode;
28661847f8eSopenharmony_ci
28761847f8eSopenharmony_ci    /**
28861847f8eSopenharmony_ci     * Duplex mode.
28961847f8eSopenharmony_ci     * @type { ?PrintDuplexMode }
29061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
29161847f8eSopenharmony_ci     * @since 11
29261847f8eSopenharmony_ci     */
29361847f8eSopenharmony_ci    duplexMode?: PrintDuplexMode;
29461847f8eSopenharmony_ci  }
29561847f8eSopenharmony_ci
29661847f8eSopenharmony_ci  /**
29761847f8eSopenharmony_ci   * defines print page range.
29861847f8eSopenharmony_ci   * @typedef PrintPageRange
29961847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
30061847f8eSopenharmony_ci   * @since 11
30161847f8eSopenharmony_ci   */
30261847f8eSopenharmony_ci  interface PrintPageRange {
30361847f8eSopenharmony_ci    /**
30461847f8eSopenharmony_ci     * Start page of sequence.
30561847f8eSopenharmony_ci     * @type { ?number }
30661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
30761847f8eSopenharmony_ci     * @since 11
30861847f8eSopenharmony_ci     */
30961847f8eSopenharmony_ci    startPage?: number;
31061847f8eSopenharmony_ci
31161847f8eSopenharmony_ci    /**
31261847f8eSopenharmony_ci     * End page of sequence.
31361847f8eSopenharmony_ci     * @type { ?number }
31461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
31561847f8eSopenharmony_ci     * @since 11
31661847f8eSopenharmony_ci     */
31761847f8eSopenharmony_ci    endPage?: number;
31861847f8eSopenharmony_ci
31961847f8eSopenharmony_ci    /**
32061847f8eSopenharmony_ci     * Discrete page of sequence.
32161847f8eSopenharmony_ci     * @type { ?Array<number> }
32261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
32361847f8eSopenharmony_ci     * @since 11
32461847f8eSopenharmony_ci     */
32561847f8eSopenharmony_ci    pages?: Array<number>;
32661847f8eSopenharmony_ci  }
32761847f8eSopenharmony_ci
32861847f8eSopenharmony_ci  /**
32961847f8eSopenharmony_ci   * defines print margin.
33061847f8eSopenharmony_ci   * @typedef PrintMargin
33161847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
33261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
33361847f8eSopenharmony_ci   * @since 10
33461847f8eSopenharmony_ci   */
33561847f8eSopenharmony_ci  interface PrintMargin {
33661847f8eSopenharmony_ci    /**
33761847f8eSopenharmony_ci     * Top margin.
33861847f8eSopenharmony_ci     * @type { ?number }
33961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
34061847f8eSopenharmony_ci     * @systemapi
34161847f8eSopenharmony_ci     * @since 10
34261847f8eSopenharmony_ci     */
34361847f8eSopenharmony_ci    top?: number;
34461847f8eSopenharmony_ci
34561847f8eSopenharmony_ci    /**
34661847f8eSopenharmony_ci     * Bottom margin.
34761847f8eSopenharmony_ci     * @type { ?number }
34861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
34961847f8eSopenharmony_ci     * @systemapi
35061847f8eSopenharmony_ci     * @since 10
35161847f8eSopenharmony_ci     */
35261847f8eSopenharmony_ci    bottom?: number;
35361847f8eSopenharmony_ci
35461847f8eSopenharmony_ci    /**
35561847f8eSopenharmony_ci     * Left margin.
35661847f8eSopenharmony_ci     * @type { ?number }
35761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
35861847f8eSopenharmony_ci     * @systemapi
35961847f8eSopenharmony_ci     * @since 10
36061847f8eSopenharmony_ci     */
36161847f8eSopenharmony_ci    left?: number;
36261847f8eSopenharmony_ci
36361847f8eSopenharmony_ci    /**
36461847f8eSopenharmony_ci     * Right margin.
36561847f8eSopenharmony_ci     * @type { ?number }
36661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
36761847f8eSopenharmony_ci     * @systemapi
36861847f8eSopenharmony_ci     * @since 10
36961847f8eSopenharmony_ci     */
37061847f8eSopenharmony_ci    right?: number;
37161847f8eSopenharmony_ci  }
37261847f8eSopenharmony_ci
37361847f8eSopenharmony_ci  /**
37461847f8eSopenharmony_ci   * defines print range.
37561847f8eSopenharmony_ci   * @typedef PrinterRange
37661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
37761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
37861847f8eSopenharmony_ci   * @since 10
37961847f8eSopenharmony_ci   */
38061847f8eSopenharmony_ci  interface PrinterRange {
38161847f8eSopenharmony_ci    /**
38261847f8eSopenharmony_ci     * Start page of sequence.
38361847f8eSopenharmony_ci     * @type { ?number }
38461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
38561847f8eSopenharmony_ci     * @systemapi
38661847f8eSopenharmony_ci     * @since 10
38761847f8eSopenharmony_ci     */
38861847f8eSopenharmony_ci    startPage?: number;
38961847f8eSopenharmony_ci
39061847f8eSopenharmony_ci    /**
39161847f8eSopenharmony_ci     * End page of sequence.
39261847f8eSopenharmony_ci     * @type { ?number }
39361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
39461847f8eSopenharmony_ci     * @systemapi
39561847f8eSopenharmony_ci     * @since 10
39661847f8eSopenharmony_ci     */
39761847f8eSopenharmony_ci    endPage?: number;
39861847f8eSopenharmony_ci
39961847f8eSopenharmony_ci    /**
40061847f8eSopenharmony_ci     * Discrete page of sequence.
40161847f8eSopenharmony_ci     * @type { ?Array<number> }
40261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
40361847f8eSopenharmony_ci     * @systemapi
40461847f8eSopenharmony_ci     * @since 10
40561847f8eSopenharmony_ci     */
40661847f8eSopenharmony_ci    pages?: Array<number>;
40761847f8eSopenharmony_ci  }
40861847f8eSopenharmony_ci
40961847f8eSopenharmony_ci  /**
41061847f8eSopenharmony_ci   * defines print preview attribute.
41161847f8eSopenharmony_ci   * @typedef PreviewAttribute
41261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
41361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
41461847f8eSopenharmony_ci   * @since 10
41561847f8eSopenharmony_ci   */
41661847f8eSopenharmony_ci  interface PreviewAttribute {
41761847f8eSopenharmony_ci    /**
41861847f8eSopenharmony_ci     * Preview page range.
41961847f8eSopenharmony_ci     * @type { PrinterRange }
42061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
42161847f8eSopenharmony_ci     * @systemapi
42261847f8eSopenharmony_ci     * @since 10
42361847f8eSopenharmony_ci     */
42461847f8eSopenharmony_ci    previewRange: PrinterRange;
42561847f8eSopenharmony_ci
42661847f8eSopenharmony_ci    /**
42761847f8eSopenharmony_ci     * Preview file result.
42861847f8eSopenharmony_ci     * @type { ?number }
42961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
43061847f8eSopenharmony_ci     * @systemapi
43161847f8eSopenharmony_ci     * @since 10
43261847f8eSopenharmony_ci     */
43361847f8eSopenharmony_ci    result?: number;
43461847f8eSopenharmony_ci  }
43561847f8eSopenharmony_ci
43661847f8eSopenharmony_ci  /**
43761847f8eSopenharmony_ci   * defines print resolution.
43861847f8eSopenharmony_ci   * @typedef PrintResolution
43961847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
44061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
44161847f8eSopenharmony_ci   * @since 10
44261847f8eSopenharmony_ci   */
44361847f8eSopenharmony_ci  interface PrintResolution {
44461847f8eSopenharmony_ci    /**
44561847f8eSopenharmony_ci     * Resolution id.
44661847f8eSopenharmony_ci     * @type { string }
44761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
44861847f8eSopenharmony_ci     * @systemapi
44961847f8eSopenharmony_ci     * @since 10
45061847f8eSopenharmony_ci     */
45161847f8eSopenharmony_ci    id: string;
45261847f8eSopenharmony_ci
45361847f8eSopenharmony_ci    /**
45461847f8eSopenharmony_ci     * Horizontal DPI.
45561847f8eSopenharmony_ci     * @type { number }
45661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
45761847f8eSopenharmony_ci     * @systemapi
45861847f8eSopenharmony_ci     * @since 10
45961847f8eSopenharmony_ci     */
46061847f8eSopenharmony_ci    horizontalDpi: number;
46161847f8eSopenharmony_ci
46261847f8eSopenharmony_ci    /**
46361847f8eSopenharmony_ci     * Vertical DPI.
46461847f8eSopenharmony_ci     * @type { number }
46561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
46661847f8eSopenharmony_ci     * @systemapi
46761847f8eSopenharmony_ci     * @since 10
46861847f8eSopenharmony_ci     */
46961847f8eSopenharmony_ci    verticalDpi: number;
47061847f8eSopenharmony_ci  }
47161847f8eSopenharmony_ci
47261847f8eSopenharmony_ci  /**
47361847f8eSopenharmony_ci   * defines print page size.
47461847f8eSopenharmony_ci   * @typedef PrintPageSize
47561847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
47661847f8eSopenharmony_ci   * @since 11
47761847f8eSopenharmony_ci   */
47861847f8eSopenharmony_ci  interface PrintPageSize {
47961847f8eSopenharmony_ci    /**
48061847f8eSopenharmony_ci     * Page size id.
48161847f8eSopenharmony_ci     * @type { string }
48261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
48361847f8eSopenharmony_ci     * @since 11
48461847f8eSopenharmony_ci     */
48561847f8eSopenharmony_ci    id: string;
48661847f8eSopenharmony_ci
48761847f8eSopenharmony_ci    /**
48861847f8eSopenharmony_ci     * Page size name.
48961847f8eSopenharmony_ci     * @type { string }
49061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
49161847f8eSopenharmony_ci     * @since 11
49261847f8eSopenharmony_ci     */
49361847f8eSopenharmony_ci    name: string;
49461847f8eSopenharmony_ci
49561847f8eSopenharmony_ci    /**
49661847f8eSopenharmony_ci     * Unit: millimeter width.
49761847f8eSopenharmony_ci     * @type { number }
49861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
49961847f8eSopenharmony_ci     * @since 11
50061847f8eSopenharmony_ci     */
50161847f8eSopenharmony_ci    width: number;
50261847f8eSopenharmony_ci
50361847f8eSopenharmony_ci    /**
50461847f8eSopenharmony_ci     * Unit: millimeter height.
50561847f8eSopenharmony_ci     * @type { number }
50661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
50761847f8eSopenharmony_ci     * @since 11
50861847f8eSopenharmony_ci     */
50961847f8eSopenharmony_ci    height: number;
51061847f8eSopenharmony_ci  }
51161847f8eSopenharmony_ci
51261847f8eSopenharmony_ci  /**
51361847f8eSopenharmony_ci   * defines print capability.
51461847f8eSopenharmony_ci   * @typedef PrinterCapability
51561847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
51661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
51761847f8eSopenharmony_ci   * @since 10
51861847f8eSopenharmony_ci   */
51961847f8eSopenharmony_ci  interface PrinterCapability {
52061847f8eSopenharmony_ci    /**
52161847f8eSopenharmony_ci     * Color mode.
52261847f8eSopenharmony_ci     * @type { number }
52361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
52461847f8eSopenharmony_ci     * @systemapi
52561847f8eSopenharmony_ci     * @since 10
52661847f8eSopenharmony_ci     */
52761847f8eSopenharmony_ci    colorMode: number;
52861847f8eSopenharmony_ci
52961847f8eSopenharmony_ci    /**
53061847f8eSopenharmony_ci     * Duplex mode.
53161847f8eSopenharmony_ci     * @type { number }
53261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
53361847f8eSopenharmony_ci     * @systemapi
53461847f8eSopenharmony_ci     * @since 10
53561847f8eSopenharmony_ci     */
53661847f8eSopenharmony_ci    duplexMode: number;
53761847f8eSopenharmony_ci
53861847f8eSopenharmony_ci    /**
53961847f8eSopenharmony_ci     * The page size list supported by the printer.
54061847f8eSopenharmony_ci     * @type { Array<PrintPageSize> }
54161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
54261847f8eSopenharmony_ci     * @systemapi
54361847f8eSopenharmony_ci     * @since 10
54461847f8eSopenharmony_ci     */
54561847f8eSopenharmony_ci    pageSize: Array<PrintPageSize>;
54661847f8eSopenharmony_ci
54761847f8eSopenharmony_ci    /**
54861847f8eSopenharmony_ci     * The resolution list supported by the printer.
54961847f8eSopenharmony_ci     * @type { ?Array<PrintResolution> }
55061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
55161847f8eSopenharmony_ci     * @systemapi
55261847f8eSopenharmony_ci     * @since 10
55361847f8eSopenharmony_ci     */
55461847f8eSopenharmony_ci    resolution?: Array<PrintResolution>;
55561847f8eSopenharmony_ci
55661847f8eSopenharmony_ci    /**
55761847f8eSopenharmony_ci     * Min margin of printer.
55861847f8eSopenharmony_ci     * @type { ?PrintMargin }
55961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
56061847f8eSopenharmony_ci     * @systemapi
56161847f8eSopenharmony_ci     * @since 10
56261847f8eSopenharmony_ci     */
56361847f8eSopenharmony_ci    minMargin?: PrintMargin;
56461847f8eSopenharmony_ci
56561847f8eSopenharmony_ci    /**
56661847f8eSopenharmony_ci     * JSON object string.
56761847f8eSopenharmony_ci     * @type { ?Object }
56861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
56961847f8eSopenharmony_ci     * @systemapi
57061847f8eSopenharmony_ci     * @since 11
57161847f8eSopenharmony_ci     */
57261847f8eSopenharmony_ci    options?: Object;
57361847f8eSopenharmony_ci  }
57461847f8eSopenharmony_ci
57561847f8eSopenharmony_ci  /**
57661847f8eSopenharmony_ci   * defines print info.
57761847f8eSopenharmony_ci   * @typedef PrinterInfo
57861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
57961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
58061847f8eSopenharmony_ci   * @since 10
58161847f8eSopenharmony_ci   */
58261847f8eSopenharmony_ci  interface PrinterInfo {
58361847f8eSopenharmony_ci    /**
58461847f8eSopenharmony_ci     * Printer id.
58561847f8eSopenharmony_ci     * @type { string }
58661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
58761847f8eSopenharmony_ci     * @systemapi
58861847f8eSopenharmony_ci     * @since 10
58961847f8eSopenharmony_ci     */
59061847f8eSopenharmony_ci    printerId: string;
59161847f8eSopenharmony_ci
59261847f8eSopenharmony_ci    /**
59361847f8eSopenharmony_ci     * Printer name.
59461847f8eSopenharmony_ci     * @type { string }
59561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
59661847f8eSopenharmony_ci     * @systemapi
59761847f8eSopenharmony_ci     * @since 10
59861847f8eSopenharmony_ci     */
59961847f8eSopenharmony_ci    printerName: string;
60061847f8eSopenharmony_ci
60161847f8eSopenharmony_ci    /**
60261847f8eSopenharmony_ci     * Current printer state.
60361847f8eSopenharmony_ci     * @type { PrinterState }
60461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
60561847f8eSopenharmony_ci     * @systemapi
60661847f8eSopenharmony_ci     * @since 10
60761847f8eSopenharmony_ci     */
60861847f8eSopenharmony_ci    printerState: PrinterState;
60961847f8eSopenharmony_ci
61061847f8eSopenharmony_ci    /**
61161847f8eSopenharmony_ci     * Resource id of printer icon.
61261847f8eSopenharmony_ci     * @type { ?number }
61361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
61461847f8eSopenharmony_ci     * @systemapi
61561847f8eSopenharmony_ci     * @since 10
61661847f8eSopenharmony_ci     */
61761847f8eSopenharmony_ci    printerIcon?: number;
61861847f8eSopenharmony_ci
61961847f8eSopenharmony_ci    /**
62061847f8eSopenharmony_ci     * Printer description.
62161847f8eSopenharmony_ci     * @type { ?string }
62261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
62361847f8eSopenharmony_ci     * @systemapi
62461847f8eSopenharmony_ci     * @since 10
62561847f8eSopenharmony_ci     */
62661847f8eSopenharmony_ci    description?: string;
62761847f8eSopenharmony_ci
62861847f8eSopenharmony_ci    /**
62961847f8eSopenharmony_ci     * Printer capability.
63061847f8eSopenharmony_ci     * @type { ?PrinterCapability }
63161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
63261847f8eSopenharmony_ci     * @systemapi
63361847f8eSopenharmony_ci     * @since 10
63461847f8eSopenharmony_ci     */
63561847f8eSopenharmony_ci    capability?: PrinterCapability;
63661847f8eSopenharmony_ci
63761847f8eSopenharmony_ci    /**
63861847f8eSopenharmony_ci     * JSON object string.
63961847f8eSopenharmony_ci     * @type { ?Object }
64061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
64161847f8eSopenharmony_ci     * @systemapi
64261847f8eSopenharmony_ci     * @since 10
64361847f8eSopenharmony_ci     */
64461847f8eSopenharmony_ci    options?: Object;
64561847f8eSopenharmony_ci  }
64661847f8eSopenharmony_ci
64761847f8eSopenharmony_ci  /**
64861847f8eSopenharmony_ci   * defines print job.
64961847f8eSopenharmony_ci   * @typedef PrintJob
65061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
65161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
65261847f8eSopenharmony_ci   * @since 10
65361847f8eSopenharmony_ci   */
65461847f8eSopenharmony_ci  interface PrintJob {
65561847f8eSopenharmony_ci    /**
65661847f8eSopenharmony_ci     * Document fd list to be printed.
65761847f8eSopenharmony_ci     * @type { Array<number> }
65861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
65961847f8eSopenharmony_ci     * @systemapi
66061847f8eSopenharmony_ci     * @since 10
66161847f8eSopenharmony_ci     */
66261847f8eSopenharmony_ci    fdList: Array<number>;
66361847f8eSopenharmony_ci
66461847f8eSopenharmony_ci    /**
66561847f8eSopenharmony_ci     * Job id.
66661847f8eSopenharmony_ci     * @type { string }
66761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
66861847f8eSopenharmony_ci     * @systemapi
66961847f8eSopenharmony_ci     * @since 10
67061847f8eSopenharmony_ci     */
67161847f8eSopenharmony_ci    jobId: string;
67261847f8eSopenharmony_ci
67361847f8eSopenharmony_ci    /**
67461847f8eSopenharmony_ci     * Printer id to take charge of printing.
67561847f8eSopenharmony_ci     * @type { string }
67661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
67761847f8eSopenharmony_ci     * @systemapi
67861847f8eSopenharmony_ci     * @since 10
67961847f8eSopenharmony_ci     */
68061847f8eSopenharmony_ci    printerId: string;
68161847f8eSopenharmony_ci
68261847f8eSopenharmony_ci    /**
68361847f8eSopenharmony_ci     * Current print job state.
68461847f8eSopenharmony_ci     * @type { PrintJobState }
68561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
68661847f8eSopenharmony_ci     * @systemapi
68761847f8eSopenharmony_ci     * @since 10
68861847f8eSopenharmony_ci     */
68961847f8eSopenharmony_ci    jobState: PrintJobState;
69061847f8eSopenharmony_ci
69161847f8eSopenharmony_ci    /**
69261847f8eSopenharmony_ci     * Current print job sub state.
69361847f8eSopenharmony_ci     * @type { PrintJobSubState }
69461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
69561847f8eSopenharmony_ci     * @systemapi
69661847f8eSopenharmony_ci     * @since 11
69761847f8eSopenharmony_ci     */
69861847f8eSopenharmony_ci    jobSubstate: PrintJobSubState;
69961847f8eSopenharmony_ci
70061847f8eSopenharmony_ci    /**
70161847f8eSopenharmony_ci     * Copies of document list.
70261847f8eSopenharmony_ci     * @type { number }
70361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
70461847f8eSopenharmony_ci     * @systemapi
70561847f8eSopenharmony_ci     * @since 10
70661847f8eSopenharmony_ci     */
70761847f8eSopenharmony_ci    copyNumber: number;
70861847f8eSopenharmony_ci
70961847f8eSopenharmony_ci    /**
71061847f8eSopenharmony_ci     * Range size to be printed.
71161847f8eSopenharmony_ci     * @type { PrinterRange }
71261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
71361847f8eSopenharmony_ci     * @systemapi
71461847f8eSopenharmony_ci     * @since 10
71561847f8eSopenharmony_ci     */
71661847f8eSopenharmony_ci    pageRange: PrinterRange;
71761847f8eSopenharmony_ci
71861847f8eSopenharmony_ci    /**
71961847f8eSopenharmony_ci     * Sequential print.
72061847f8eSopenharmony_ci     * @type { boolean }
72161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
72261847f8eSopenharmony_ci     * @systemapi
72361847f8eSopenharmony_ci     * @since 10
72461847f8eSopenharmony_ci     */
72561847f8eSopenharmony_ci    isSequential: boolean;
72661847f8eSopenharmony_ci
72761847f8eSopenharmony_ci    /**
72861847f8eSopenharmony_ci     * The selected page size.
72961847f8eSopenharmony_ci     * @type { PrintPageSize }
73061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
73161847f8eSopenharmony_ci     * @systemapi
73261847f8eSopenharmony_ci     * @since 10
73361847f8eSopenharmony_ci     */
73461847f8eSopenharmony_ci    pageSize: PrintPageSize;
73561847f8eSopenharmony_ci
73661847f8eSopenharmony_ci    /**
73761847f8eSopenharmony_ci     * Vertical printing.
73861847f8eSopenharmony_ci     * @type { boolean }
73961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
74061847f8eSopenharmony_ci     * @systemapi
74161847f8eSopenharmony_ci     * @since 10
74261847f8eSopenharmony_ci     */
74361847f8eSopenharmony_ci    isLandscape: boolean;
74461847f8eSopenharmony_ci
74561847f8eSopenharmony_ci    /**
74661847f8eSopenharmony_ci     * Color mode.
74761847f8eSopenharmony_ci     * @type { number }
74861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
74961847f8eSopenharmony_ci     * @systemapi
75061847f8eSopenharmony_ci     * @since 10
75161847f8eSopenharmony_ci     */
75261847f8eSopenharmony_ci    colorMode: number;
75361847f8eSopenharmony_ci
75461847f8eSopenharmony_ci    /**
75561847f8eSopenharmony_ci     * Duplex mode.
75661847f8eSopenharmony_ci     * @type { number }
75761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
75861847f8eSopenharmony_ci     * @systemapi
75961847f8eSopenharmony_ci     * @since 10
76061847f8eSopenharmony_ci     */
76161847f8eSopenharmony_ci    duplexMode: number;
76261847f8eSopenharmony_ci
76361847f8eSopenharmony_ci    /**
76461847f8eSopenharmony_ci     * Current margin setting.
76561847f8eSopenharmony_ci     * @type { ?PrintMargin }
76661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
76761847f8eSopenharmony_ci     * @systemapi
76861847f8eSopenharmony_ci     * @since 10
76961847f8eSopenharmony_ci     */
77061847f8eSopenharmony_ci    margin?: PrintMargin;
77161847f8eSopenharmony_ci
77261847f8eSopenharmony_ci    /**
77361847f8eSopenharmony_ci     * Preview setting.
77461847f8eSopenharmony_ci     * @type { ?PreviewAttribute }
77561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
77661847f8eSopenharmony_ci     * @systemapi
77761847f8eSopenharmony_ci     * @since 10
77861847f8eSopenharmony_ci     */
77961847f8eSopenharmony_ci    preview?: PreviewAttribute;
78061847f8eSopenharmony_ci
78161847f8eSopenharmony_ci    /**
78261847f8eSopenharmony_ci     * JSON object string.
78361847f8eSopenharmony_ci     * @type { ?Object }
78461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
78561847f8eSopenharmony_ci     * @systemapi
78661847f8eSopenharmony_ci     * @since 10
78761847f8eSopenharmony_ci     */
78861847f8eSopenharmony_ci    options?: Object;
78961847f8eSopenharmony_ci  }
79061847f8eSopenharmony_ci
79161847f8eSopenharmony_ci  /**
79261847f8eSopenharmony_ci   * Enumeration of Print Direction Mode.
79361847f8eSopenharmony_ci   * @enum { number } PrintDirectionMode
79461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
79561847f8eSopenharmony_ci   * @since 11
79661847f8eSopenharmony_ci   */
79761847f8eSopenharmony_ci  enum PrintDirectionMode {
79861847f8eSopenharmony_ci    /**
79961847f8eSopenharmony_ci     * Automatically select direction.
80061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
80161847f8eSopenharmony_ci     * @since 11
80261847f8eSopenharmony_ci     */
80361847f8eSopenharmony_ci    DIRECTION_MODE_AUTO = 0,
80461847f8eSopenharmony_ci
80561847f8eSopenharmony_ci    /**
80661847f8eSopenharmony_ci     * Print portrait.
80761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
80861847f8eSopenharmony_ci     * @since 11
80961847f8eSopenharmony_ci     */
81061847f8eSopenharmony_ci    DIRECTION_MODE_PORTRAIT = 1,
81161847f8eSopenharmony_ci
81261847f8eSopenharmony_ci    /**
81361847f8eSopenharmony_ci     * Print landscape.
81461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
81561847f8eSopenharmony_ci     * @since 11
81661847f8eSopenharmony_ci     */
81761847f8eSopenharmony_ci    DIRECTION_MODE_LANDSCAPE = 2,
81861847f8eSopenharmony_ci  }
81961847f8eSopenharmony_ci
82061847f8eSopenharmony_ci  /**
82161847f8eSopenharmony_ci   * Enumeration of Print Color Mode.
82261847f8eSopenharmony_ci   * @enum { number } PrintColorMode
82361847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
82461847f8eSopenharmony_ci   * @since 11
82561847f8eSopenharmony_ci   */
82661847f8eSopenharmony_ci  enum PrintColorMode {
82761847f8eSopenharmony_ci    /**
82861847f8eSopenharmony_ci     * Print monochrome.
82961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
83061847f8eSopenharmony_ci     * @since 11
83161847f8eSopenharmony_ci     */
83261847f8eSopenharmony_ci    COLOR_MODE_MONOCHROME = 0,
83361847f8eSopenharmony_ci
83461847f8eSopenharmony_ci    /**
83561847f8eSopenharmony_ci     * Color printing.
83661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
83761847f8eSopenharmony_ci     * @since 11
83861847f8eSopenharmony_ci     */
83961847f8eSopenharmony_ci    COLOR_MODE_COLOR = 1,
84061847f8eSopenharmony_ci  }
84161847f8eSopenharmony_ci
84261847f8eSopenharmony_ci  /**
84361847f8eSopenharmony_ci   * Enumeration of Print Duplex Mode.
84461847f8eSopenharmony_ci   * @enum { number } PrintDuplexMode
84561847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
84661847f8eSopenharmony_ci   * @since 11
84761847f8eSopenharmony_ci   */
84861847f8eSopenharmony_ci  enum PrintDuplexMode {
84961847f8eSopenharmony_ci    /**
85061847f8eSopenharmony_ci     * Single side printing.
85161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
85261847f8eSopenharmony_ci     * @since 11
85361847f8eSopenharmony_ci     */
85461847f8eSopenharmony_ci    DUPLEX_MODE_NONE = 0,
85561847f8eSopenharmony_ci
85661847f8eSopenharmony_ci    /**
85761847f8eSopenharmony_ci     * Long-edge flip-up duplex printing.
85861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
85961847f8eSopenharmony_ci     * @since 11
86061847f8eSopenharmony_ci     */
86161847f8eSopenharmony_ci    DUPLEX_MODE_LONG_EDGE = 1,
86261847f8eSopenharmony_ci
86361847f8eSopenharmony_ci    /**
86461847f8eSopenharmony_ci     * Short-edge flip-up duplex printing.
86561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
86661847f8eSopenharmony_ci     * @since 11
86761847f8eSopenharmony_ci     */
86861847f8eSopenharmony_ci    DUPLEX_MODE_SHORT_EDGE = 2,
86961847f8eSopenharmony_ci  }
87061847f8eSopenharmony_ci
87161847f8eSopenharmony_ci  /**
87261847f8eSopenharmony_ci   * Enumeration of Print Page Type.
87361847f8eSopenharmony_ci   * @enum { number } PrintPageType
87461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
87561847f8eSopenharmony_ci   * @since 11
87661847f8eSopenharmony_ci   */
87761847f8eSopenharmony_ci  enum PrintPageType {
87861847f8eSopenharmony_ci    /**
87961847f8eSopenharmony_ci     * A3 page.
88061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
88161847f8eSopenharmony_ci     * @since 11
88261847f8eSopenharmony_ci     */
88361847f8eSopenharmony_ci    PAGE_ISO_A3 = 0,
88461847f8eSopenharmony_ci
88561847f8eSopenharmony_ci    /**
88661847f8eSopenharmony_ci     * A4 page.
88761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
88861847f8eSopenharmony_ci     * @since 11
88961847f8eSopenharmony_ci     */
89061847f8eSopenharmony_ci    PAGE_ISO_A4 = 1,
89161847f8eSopenharmony_ci
89261847f8eSopenharmony_ci    /**
89361847f8eSopenharmony_ci     * A5 page.
89461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
89561847f8eSopenharmony_ci     * @since 11
89661847f8eSopenharmony_ci     */
89761847f8eSopenharmony_ci    PAGE_ISO_A5 = 2,
89861847f8eSopenharmony_ci
89961847f8eSopenharmony_ci    /**
90061847f8eSopenharmony_ci     * B5 page.
90161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
90261847f8eSopenharmony_ci     * @since 11
90361847f8eSopenharmony_ci     */
90461847f8eSopenharmony_ci    PAGE_JIS_B5 = 3,
90561847f8eSopenharmony_ci
90661847f8eSopenharmony_ci    /**
90761847f8eSopenharmony_ci     * C5 page.
90861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
90961847f8eSopenharmony_ci     * @since 11
91061847f8eSopenharmony_ci     */
91161847f8eSopenharmony_ci    PAGE_ISO_C5 = 4,
91261847f8eSopenharmony_ci
91361847f8eSopenharmony_ci    /**
91461847f8eSopenharmony_ci     * DL Envelope.
91561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
91661847f8eSopenharmony_ci     * @since 11
91761847f8eSopenharmony_ci     */
91861847f8eSopenharmony_ci    PAGE_ISO_DL = 5,
91961847f8eSopenharmony_ci
92061847f8eSopenharmony_ci    /**
92161847f8eSopenharmony_ci     * Letter.
92261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
92361847f8eSopenharmony_ci     * @since 11
92461847f8eSopenharmony_ci     */
92561847f8eSopenharmony_ci    PAGE_LETTER = 6,
92661847f8eSopenharmony_ci
92761847f8eSopenharmony_ci    /**
92861847f8eSopenharmony_ci     * Legal.
92961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
93061847f8eSopenharmony_ci     * @since 11
93161847f8eSopenharmony_ci     */
93261847f8eSopenharmony_ci    PAGE_LEGAL = 7,
93361847f8eSopenharmony_ci
93461847f8eSopenharmony_ci    /**
93561847f8eSopenharmony_ci     * Photo 4x6.
93661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
93761847f8eSopenharmony_ci     * @since 11
93861847f8eSopenharmony_ci     */
93961847f8eSopenharmony_ci    PAGE_PHOTO_4X6 = 8,
94061847f8eSopenharmony_ci
94161847f8eSopenharmony_ci    /**
94261847f8eSopenharmony_ci     * Photo 5x7.
94361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
94461847f8eSopenharmony_ci     * @since 11
94561847f8eSopenharmony_ci     */
94661847f8eSopenharmony_ci    PAGE_PHOTO_5X7 = 9,
94761847f8eSopenharmony_ci
94861847f8eSopenharmony_ci    /**
94961847f8eSopenharmony_ci     * Envelope INT DL.
95061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
95161847f8eSopenharmony_ci     * @since 11
95261847f8eSopenharmony_ci     */
95361847f8eSopenharmony_ci    PAGE_INT_DL_ENVELOPE = 10,
95461847f8eSopenharmony_ci
95561847f8eSopenharmony_ci    /**
95661847f8eSopenharmony_ci     * Tabloid B.
95761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
95861847f8eSopenharmony_ci     * @since 11
95961847f8eSopenharmony_ci     */
96061847f8eSopenharmony_ci    PAGE_B_TABLOID = 11,
96161847f8eSopenharmony_ci  }
96261847f8eSopenharmony_ci
96361847f8eSopenharmony_ci  /**
96461847f8eSopenharmony_ci   * Enumeration of Print Document Adapter State.
96561847f8eSopenharmony_ci   * @enum { number } PrintDocumentAdapterState
96661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
96761847f8eSopenharmony_ci   * @since 11
96861847f8eSopenharmony_ci   */
96961847f8eSopenharmony_ci  enum PrintDocumentAdapterState {
97061847f8eSopenharmony_ci    /**
97161847f8eSopenharmony_ci     * Preview failed.
97261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
97361847f8eSopenharmony_ci     * @since 11
97461847f8eSopenharmony_ci     */
97561847f8eSopenharmony_ci    PREVIEW_DESTROY = 0,
97661847f8eSopenharmony_ci
97761847f8eSopenharmony_ci    /**
97861847f8eSopenharmony_ci     * Print state is succeed.
97961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
98061847f8eSopenharmony_ci     * @since 11
98161847f8eSopenharmony_ci     */
98261847f8eSopenharmony_ci    PRINT_TASK_SUCCEED = 1,
98361847f8eSopenharmony_ci
98461847f8eSopenharmony_ci    /**
98561847f8eSopenharmony_ci     * Print state is fail.
98661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
98761847f8eSopenharmony_ci     * @since 11
98861847f8eSopenharmony_ci     */
98961847f8eSopenharmony_ci    PRINT_TASK_FAIL = 2,
99061847f8eSopenharmony_ci
99161847f8eSopenharmony_ci    /**
99261847f8eSopenharmony_ci     * Print state is cancel.
99361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
99461847f8eSopenharmony_ci     * @since 11
99561847f8eSopenharmony_ci     */
99661847f8eSopenharmony_ci    PRINT_TASK_CANCEL = 3,
99761847f8eSopenharmony_ci
99861847f8eSopenharmony_ci    /**
99961847f8eSopenharmony_ci     * Print state is block.
100061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
100161847f8eSopenharmony_ci     * @since 11
100261847f8eSopenharmony_ci     */
100361847f8eSopenharmony_ci    PRINT_TASK_BLOCK = 4,
100461847f8eSopenharmony_ci  }
100561847f8eSopenharmony_ci
100661847f8eSopenharmony_ci  /**
100761847f8eSopenharmony_ci   * Enumeration of Print File Creation State.
100861847f8eSopenharmony_ci   * @enum { number } PrintFileCreationState
100961847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
101061847f8eSopenharmony_ci   * @since 11
101161847f8eSopenharmony_ci   */
101261847f8eSopenharmony_ci  enum PrintFileCreationState {
101361847f8eSopenharmony_ci    /**
101461847f8eSopenharmony_ci     * Print file created success.
101561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
101661847f8eSopenharmony_ci     * @since 11
101761847f8eSopenharmony_ci     */
101861847f8eSopenharmony_ci    PRINT_FILE_CREATED = 0,
101961847f8eSopenharmony_ci
102061847f8eSopenharmony_ci    /**
102161847f8eSopenharmony_ci     * Print file created fail.
102261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
102361847f8eSopenharmony_ci     * @since 11
102461847f8eSopenharmony_ci     */
102561847f8eSopenharmony_ci    PRINT_FILE_CREATION_FAILED = 1,
102661847f8eSopenharmony_ci
102761847f8eSopenharmony_ci    /**
102861847f8eSopenharmony_ci     * Print file created success but unrendered.
102961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
103061847f8eSopenharmony_ci     * @since 11
103161847f8eSopenharmony_ci     */
103261847f8eSopenharmony_ci    PRINT_FILE_CREATED_UNRENDERED = 2,
103361847f8eSopenharmony_ci  }
103461847f8eSopenharmony_ci
103561847f8eSopenharmony_ci  /**
103661847f8eSopenharmony_ci   * Enumeration of Printer State.
103761847f8eSopenharmony_ci   * @enum { number } PrinterState
103861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
103961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
104061847f8eSopenharmony_ci   * @since 10
104161847f8eSopenharmony_ci   */
104261847f8eSopenharmony_ci  enum PrinterState {
104361847f8eSopenharmony_ci    /**
104461847f8eSopenharmony_ci     * New printers arrival.
104561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
104661847f8eSopenharmony_ci     * @systemapi
104761847f8eSopenharmony_ci     * @since 10
104861847f8eSopenharmony_ci     */
104961847f8eSopenharmony_ci    PRINTER_ADDED = 0,
105061847f8eSopenharmony_ci
105161847f8eSopenharmony_ci    /**
105261847f8eSopenharmony_ci     * Printer lost.
105361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
105461847f8eSopenharmony_ci     * @systemapi
105561847f8eSopenharmony_ci     * @since 10
105661847f8eSopenharmony_ci     */
105761847f8eSopenharmony_ci    PRINTER_REMOVED = 1,
105861847f8eSopenharmony_ci
105961847f8eSopenharmony_ci    /**
106061847f8eSopenharmony_ci     * Printer update.
106161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
106261847f8eSopenharmony_ci     * @systemapi
106361847f8eSopenharmony_ci     * @since 10
106461847f8eSopenharmony_ci     */
106561847f8eSopenharmony_ci    PRINTER_CAPABILITY_UPDATED = 2,
106661847f8eSopenharmony_ci
106761847f8eSopenharmony_ci    /**
106861847f8eSopenharmony_ci     * Printer has been connected.
106961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
107061847f8eSopenharmony_ci     * @systemapi
107161847f8eSopenharmony_ci     * @since 10
107261847f8eSopenharmony_ci     */
107361847f8eSopenharmony_ci    PRINTER_CONNECTED = 3,
107461847f8eSopenharmony_ci
107561847f8eSopenharmony_ci    /**
107661847f8eSopenharmony_ci     * Printer has been disconnected.
107761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
107861847f8eSopenharmony_ci     * @systemapi
107961847f8eSopenharmony_ci     * @since 10
108061847f8eSopenharmony_ci     */
108161847f8eSopenharmony_ci    PRINTER_DISCONNECTED = 4,
108261847f8eSopenharmony_ci
108361847f8eSopenharmony_ci    /**
108461847f8eSopenharmony_ci     * Printer is working.
108561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
108661847f8eSopenharmony_ci     * @systemapi
108761847f8eSopenharmony_ci     * @since 10
108861847f8eSopenharmony_ci     */
108961847f8eSopenharmony_ci    PRINTER_RUNNING = 5,
109061847f8eSopenharmony_ci  }
109161847f8eSopenharmony_ci
109261847f8eSopenharmony_ci  /**
109361847f8eSopenharmony_ci   * Enumeration of  Print Job State.
109461847f8eSopenharmony_ci   * @enum { number } PrintJobState
109561847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
109661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
109761847f8eSopenharmony_ci   * @since 10
109861847f8eSopenharmony_ci   */
109961847f8eSopenharmony_ci  enum PrintJobState {
110061847f8eSopenharmony_ci    /**
110161847f8eSopenharmony_ci     * Initial state of print job.
110261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
110361847f8eSopenharmony_ci     * @systemapi
110461847f8eSopenharmony_ci     * @since 10
110561847f8eSopenharmony_ci     */
110661847f8eSopenharmony_ci    PRINT_JOB_PREPARE = 0,
110761847f8eSopenharmony_ci
110861847f8eSopenharmony_ci    /**
110961847f8eSopenharmony_ci     * Deliver print job to the printer.
111061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
111161847f8eSopenharmony_ci     * @systemapi
111261847f8eSopenharmony_ci     * @since 10
111361847f8eSopenharmony_ci     */
111461847f8eSopenharmony_ci    PRINT_JOB_QUEUED = 1,
111561847f8eSopenharmony_ci
111661847f8eSopenharmony_ci    /**
111761847f8eSopenharmony_ci     * Executing print job.
111861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
111961847f8eSopenharmony_ci     * @systemapi
112061847f8eSopenharmony_ci     * @since 10
112161847f8eSopenharmony_ci     */
112261847f8eSopenharmony_ci    PRINT_JOB_RUNNING = 2,
112361847f8eSopenharmony_ci
112461847f8eSopenharmony_ci    /**
112561847f8eSopenharmony_ci     * Print job has been blocked.
112661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
112761847f8eSopenharmony_ci     * @systemapi
112861847f8eSopenharmony_ci     * @since 10
112961847f8eSopenharmony_ci     */
113061847f8eSopenharmony_ci    PRINT_JOB_BLOCKED = 3,
113161847f8eSopenharmony_ci
113261847f8eSopenharmony_ci    /**
113361847f8eSopenharmony_ci     * Print job completed.
113461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
113561847f8eSopenharmony_ci     * @systemapi
113661847f8eSopenharmony_ci     * @since 10
113761847f8eSopenharmony_ci     */
113861847f8eSopenharmony_ci    PRINT_JOB_COMPLETED = 4,
113961847f8eSopenharmony_ci  }
114061847f8eSopenharmony_ci
114161847f8eSopenharmony_ci  /**
114261847f8eSopenharmony_ci   * Enumeration of  Print Job Sub State.
114361847f8eSopenharmony_ci   * @enum { number } PrintJobSubState
114461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
114561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
114661847f8eSopenharmony_ci   * @since 10
114761847f8eSopenharmony_ci   */
114861847f8eSopenharmony_ci  enum PrintJobSubState {
114961847f8eSopenharmony_ci    /**
115061847f8eSopenharmony_ci     * Print job succeed.
115161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
115261847f8eSopenharmony_ci     * @systemapi
115361847f8eSopenharmony_ci     * @since 10
115461847f8eSopenharmony_ci     */
115561847f8eSopenharmony_ci    PRINT_JOB_COMPLETED_SUCCESS = 0,
115661847f8eSopenharmony_ci
115761847f8eSopenharmony_ci    /**
115861847f8eSopenharmony_ci     * Print job fail.
115961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
116061847f8eSopenharmony_ci     * @systemapi
116161847f8eSopenharmony_ci     * @since 10
116261847f8eSopenharmony_ci     */
116361847f8eSopenharmony_ci    PRINT_JOB_COMPLETED_FAILED = 1,
116461847f8eSopenharmony_ci
116561847f8eSopenharmony_ci    /**
116661847f8eSopenharmony_ci     * Print job has been cancelled.
116761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
116861847f8eSopenharmony_ci     * @systemapi
116961847f8eSopenharmony_ci     * @since 10
117061847f8eSopenharmony_ci     */
117161847f8eSopenharmony_ci    PRINT_JOB_COMPLETED_CANCELLED = 2,
117261847f8eSopenharmony_ci
117361847f8eSopenharmony_ci    /**
117461847f8eSopenharmony_ci     * Print job has been corrupted.
117561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
117661847f8eSopenharmony_ci     * @systemapi
117761847f8eSopenharmony_ci     * @since 10
117861847f8eSopenharmony_ci     */
117961847f8eSopenharmony_ci    PRINT_JOB_COMPLETED_FILE_CORRUPTED = 3,
118061847f8eSopenharmony_ci
118161847f8eSopenharmony_ci    /**
118261847f8eSopenharmony_ci     * Print is offline.
118361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
118461847f8eSopenharmony_ci     * @systemapi
118561847f8eSopenharmony_ci     * @since 10
118661847f8eSopenharmony_ci     */
118761847f8eSopenharmony_ci    PRINT_JOB_BLOCK_OFFLINE = 4,
118861847f8eSopenharmony_ci
118961847f8eSopenharmony_ci    /**
119061847f8eSopenharmony_ci     * Print is occupied by other process.
119161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
119261847f8eSopenharmony_ci     * @systemapi
119361847f8eSopenharmony_ci     * @since 10
119461847f8eSopenharmony_ci     */
119561847f8eSopenharmony_ci    PRINT_JOB_BLOCK_BUSY = 5,
119661847f8eSopenharmony_ci
119761847f8eSopenharmony_ci    /**
119861847f8eSopenharmony_ci     * Print job has been cancelled.
119961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
120061847f8eSopenharmony_ci     * @systemapi
120161847f8eSopenharmony_ci     * @since 10
120261847f8eSopenharmony_ci     */
120361847f8eSopenharmony_ci    PRINT_JOB_BLOCK_CANCELLED = 6,
120461847f8eSopenharmony_ci
120561847f8eSopenharmony_ci    /**
120661847f8eSopenharmony_ci     * Print out of paper.
120761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
120861847f8eSopenharmony_ci     * @systemapi
120961847f8eSopenharmony_ci     * @since 10
121061847f8eSopenharmony_ci     */
121161847f8eSopenharmony_ci    PRINT_JOB_BLOCK_OUT_OF_PAPER = 7,
121261847f8eSopenharmony_ci
121361847f8eSopenharmony_ci    /**
121461847f8eSopenharmony_ci     * Print out of ink.
121561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
121661847f8eSopenharmony_ci     * @systemapi
121761847f8eSopenharmony_ci     * @since 10
121861847f8eSopenharmony_ci     */
121961847f8eSopenharmony_ci    PRINT_JOB_BLOCK_OUT_OF_INK = 8,
122061847f8eSopenharmony_ci
122161847f8eSopenharmony_ci    /**
122261847f8eSopenharmony_ci     * Print out of toner.
122361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
122461847f8eSopenharmony_ci     * @systemapi
122561847f8eSopenharmony_ci     * @since 10
122661847f8eSopenharmony_ci     */
122761847f8eSopenharmony_ci    PRINT_JOB_BLOCK_OUT_OF_TONER = 9,
122861847f8eSopenharmony_ci
122961847f8eSopenharmony_ci    /**
123061847f8eSopenharmony_ci     * Print paper jam.
123161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
123261847f8eSopenharmony_ci     * @systemapi
123361847f8eSopenharmony_ci     * @since 10
123461847f8eSopenharmony_ci     */
123561847f8eSopenharmony_ci    PRINT_JOB_BLOCK_JAMMED = 10,
123661847f8eSopenharmony_ci
123761847f8eSopenharmony_ci    /**
123861847f8eSopenharmony_ci     * Print cover open.
123961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
124061847f8eSopenharmony_ci     * @systemapi
124161847f8eSopenharmony_ci     * @since 10
124261847f8eSopenharmony_ci     */
124361847f8eSopenharmony_ci    PRINT_JOB_BLOCK_DOOR_OPEN = 11,
124461847f8eSopenharmony_ci
124561847f8eSopenharmony_ci    /**
124661847f8eSopenharmony_ci     * Print service request.
124761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
124861847f8eSopenharmony_ci     * @systemapi
124961847f8eSopenharmony_ci     * @since 10
125061847f8eSopenharmony_ci     */
125161847f8eSopenharmony_ci    PRINT_JOB_BLOCK_SERVICE_REQUEST = 12,
125261847f8eSopenharmony_ci
125361847f8eSopenharmony_ci    /**
125461847f8eSopenharmony_ci     * Print low on ink.
125561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
125661847f8eSopenharmony_ci     * @systemapi
125761847f8eSopenharmony_ci     * @since 10
125861847f8eSopenharmony_ci     */
125961847f8eSopenharmony_ci    PRINT_JOB_BLOCK_LOW_ON_INK = 13,
126061847f8eSopenharmony_ci
126161847f8eSopenharmony_ci    /**
126261847f8eSopenharmony_ci     * Print low on toner.
126361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
126461847f8eSopenharmony_ci     * @systemapi
126561847f8eSopenharmony_ci     * @since 10
126661847f8eSopenharmony_ci     */
126761847f8eSopenharmony_ci    PRINT_JOB_BLOCK_LOW_ON_TONER = 14,
126861847f8eSopenharmony_ci
126961847f8eSopenharmony_ci    /**
127061847f8eSopenharmony_ci     * Print really low on ink.
127161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
127261847f8eSopenharmony_ci     * @systemapi
127361847f8eSopenharmony_ci     * @since 10
127461847f8eSopenharmony_ci     */
127561847f8eSopenharmony_ci    PRINT_JOB_BLOCK_REALLY_LOW_ON_INK = 15,
127661847f8eSopenharmony_ci
127761847f8eSopenharmony_ci    /**
127861847f8eSopenharmony_ci     * Print bad certification.
127961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
128061847f8eSopenharmony_ci     * @systemapi
128161847f8eSopenharmony_ci     * @since 10
128261847f8eSopenharmony_ci     */
128361847f8eSopenharmony_ci    PRINT_JOB_BLOCK_BAD_CERTIFICATE = 16,
128461847f8eSopenharmony_ci
128561847f8eSopenharmony_ci    /**
128661847f8eSopenharmony_ci     * Print an error occurred when printing the account.
128761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
128861847f8eSopenharmony_ci     * @systemapi
128961847f8eSopenharmony_ci     * @since 11
129061847f8eSopenharmony_ci     */
129161847f8eSopenharmony_ci    PRINT_JOB_BLOCK_ACCOUNT_ERROR = 18,
129261847f8eSopenharmony_ci
129361847f8eSopenharmony_ci    /**
129461847f8eSopenharmony_ci     * Print the printing permission is abnormal.
129561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
129661847f8eSopenharmony_ci     * @systemapi
129761847f8eSopenharmony_ci     * @since 11
129861847f8eSopenharmony_ci     */
129961847f8eSopenharmony_ci    PRINT_JOB_BLOCK_PRINT_PERMISSION_ERROR = 19,
130061847f8eSopenharmony_ci
130161847f8eSopenharmony_ci    /**
130261847f8eSopenharmony_ci     * Print color printing permission exception.
130361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
130461847f8eSopenharmony_ci     * @systemapi
130561847f8eSopenharmony_ci     * @since 11
130661847f8eSopenharmony_ci     */
130761847f8eSopenharmony_ci    PRINT_JOB_BLOCK_PRINT_COLOR_PERMISSION_ERROR = 20,
130861847f8eSopenharmony_ci
130961847f8eSopenharmony_ci    /**
131061847f8eSopenharmony_ci     * Print the device is not connected to the network.
131161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
131261847f8eSopenharmony_ci     * @systemapi
131361847f8eSopenharmony_ci     * @since 11
131461847f8eSopenharmony_ci     */
131561847f8eSopenharmony_ci    PRINT_JOB_BLOCK_NETWORK_ERROR = 21,
131661847f8eSopenharmony_ci
131761847f8eSopenharmony_ci    /**
131861847f8eSopenharmony_ci     * Print unable to connect to the server.
131961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
132061847f8eSopenharmony_ci     * @systemapi
132161847f8eSopenharmony_ci     * @since 11
132261847f8eSopenharmony_ci     */
132361847f8eSopenharmony_ci    PRINT_JOB_BLOCK_SERVER_CONNECTION_ERROR = 22,
132461847f8eSopenharmony_ci
132561847f8eSopenharmony_ci    /**
132661847f8eSopenharmony_ci     * Print large file exception.
132761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
132861847f8eSopenharmony_ci     * @systemapi
132961847f8eSopenharmony_ci     * @since 11
133061847f8eSopenharmony_ci     */
133161847f8eSopenharmony_ci    PRINT_JOB_BLOCK_LARGE_FILE_ERROR = 23,
133261847f8eSopenharmony_ci
133361847f8eSopenharmony_ci    /**
133461847f8eSopenharmony_ci     * Print file parsing exception.
133561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
133661847f8eSopenharmony_ci     * @systemapi
133761847f8eSopenharmony_ci     * @since 11
133861847f8eSopenharmony_ci     */
133961847f8eSopenharmony_ci    PRINT_JOB_BLOCK_FILE_PARSING_ERROR = 24,
134061847f8eSopenharmony_ci
134161847f8eSopenharmony_ci    /**
134261847f8eSopenharmony_ci     * Print the file conversion is too slow.
134361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
134461847f8eSopenharmony_ci     * @systemapi
134561847f8eSopenharmony_ci     * @since 11
134661847f8eSopenharmony_ci     */
134761847f8eSopenharmony_ci    PRINT_JOB_BLOCK_SLOW_FILE_CONVERSION = 25,
134861847f8eSopenharmony_ci
134961847f8eSopenharmony_ci    /**
135061847f8eSopenharmony_ci     * Print uploading file.
135161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
135261847f8eSopenharmony_ci     * @systemapi
135361847f8eSopenharmony_ci     * @since 11
135461847f8eSopenharmony_ci     */
135561847f8eSopenharmony_ci    PRINT_JOB_RUNNING_UPLOADING_FILES = 26,
135661847f8eSopenharmony_ci
135761847f8eSopenharmony_ci    /**
135861847f8eSopenharmony_ci     * Print converting files.
135961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
136061847f8eSopenharmony_ci     * @systemapi
136161847f8eSopenharmony_ci     * @since 11
136261847f8eSopenharmony_ci     */
136361847f8eSopenharmony_ci    PRINT_JOB_RUNNING_CONVERTING_FILES = 27,
136461847f8eSopenharmony_ci
136561847f8eSopenharmony_ci    /**
136661847f8eSopenharmony_ci     * Print unknown issue.
136761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
136861847f8eSopenharmony_ci     * @systemapi
136961847f8eSopenharmony_ci     * @since 10
137061847f8eSopenharmony_ci     */
137161847f8eSopenharmony_ci    PRINT_JOB_BLOCK_UNKNOWN = 99,
137261847f8eSopenharmony_ci  }
137361847f8eSopenharmony_ci
137461847f8eSopenharmony_ci  /**
137561847f8eSopenharmony_ci   * Enumeration of  Print error Code.
137661847f8eSopenharmony_ci   * @enum { number } PrintErrorCode
137761847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
137861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
137961847f8eSopenharmony_ci   * @since 10
138061847f8eSopenharmony_ci   */
138161847f8eSopenharmony_ci  enum PrintErrorCode {
138261847f8eSopenharmony_ci    /**
138361847f8eSopenharmony_ci     * No error.
138461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
138561847f8eSopenharmony_ci     * @systemapi
138661847f8eSopenharmony_ci     * @since 10
138761847f8eSopenharmony_ci     */
138861847f8eSopenharmony_ci    E_PRINT_NONE = 0,
138961847f8eSopenharmony_ci
139061847f8eSopenharmony_ci    /**
139161847f8eSopenharmony_ci     * No permission.
139261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
139361847f8eSopenharmony_ci     * @systemapi
139461847f8eSopenharmony_ci     * @since 10
139561847f8eSopenharmony_ci     */
139661847f8eSopenharmony_ci    E_PRINT_NO_PERMISSION = 201,
139761847f8eSopenharmony_ci
139861847f8eSopenharmony_ci    /**
139961847f8eSopenharmony_ci     * Invalid parameter.
140061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
140161847f8eSopenharmony_ci     * @systemapi
140261847f8eSopenharmony_ci     * @since 10
140361847f8eSopenharmony_ci     */
140461847f8eSopenharmony_ci    E_PRINT_INVALID_PARAMETER = 401,
140561847f8eSopenharmony_ci
140661847f8eSopenharmony_ci    /**
140761847f8eSopenharmony_ci     * Generic failure of print.
140861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
140961847f8eSopenharmony_ci     * @systemapi
141061847f8eSopenharmony_ci     * @since 10
141161847f8eSopenharmony_ci     */
141261847f8eSopenharmony_ci    E_PRINT_GENERIC_FAILURE = 13100001,
141361847f8eSopenharmony_ci
141461847f8eSopenharmony_ci    /**
141561847f8eSopenharmony_ci     * RPC failure.
141661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
141761847f8eSopenharmony_ci     * @systemapi
141861847f8eSopenharmony_ci     * @since 10
141961847f8eSopenharmony_ci     */
142061847f8eSopenharmony_ci    E_PRINT_RPC_FAILURE = 13100002,
142161847f8eSopenharmony_ci
142261847f8eSopenharmony_ci    /**
142361847f8eSopenharmony_ci     * Failure of print service.
142461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
142561847f8eSopenharmony_ci     * @systemapi
142661847f8eSopenharmony_ci     * @since 10
142761847f8eSopenharmony_ci     */
142861847f8eSopenharmony_ci    E_PRINT_SERVER_FAILURE = 13100003,
142961847f8eSopenharmony_ci
143061847f8eSopenharmony_ci    /**
143161847f8eSopenharmony_ci     * Invalid print extension.
143261847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
143361847f8eSopenharmony_ci     * @systemapi
143461847f8eSopenharmony_ci     * @since 10
143561847f8eSopenharmony_ci     */
143661847f8eSopenharmony_ci    E_PRINT_INVALID_EXTENSION = 13100004,
143761847f8eSopenharmony_ci
143861847f8eSopenharmony_ci    /**
143961847f8eSopenharmony_ci     * Invalid printer.
144061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
144161847f8eSopenharmony_ci     * @systemapi
144261847f8eSopenharmony_ci     * @since 10
144361847f8eSopenharmony_ci     */
144461847f8eSopenharmony_ci    E_PRINT_INVALID_PRINTER = 13100005,
144561847f8eSopenharmony_ci
144661847f8eSopenharmony_ci    /**
144761847f8eSopenharmony_ci     * Invalid print job.
144861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
144961847f8eSopenharmony_ci     * @systemapi
145061847f8eSopenharmony_ci     * @since 10
145161847f8eSopenharmony_ci     */
145261847f8eSopenharmony_ci    E_PRINT_INVALID_PRINT_JOB = 13100006,
145361847f8eSopenharmony_ci
145461847f8eSopenharmony_ci    /**
145561847f8eSopenharmony_ci     * File i/o error.
145661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
145761847f8eSopenharmony_ci     * @systemapi
145861847f8eSopenharmony_ci     * @since 10
145961847f8eSopenharmony_ci     */
146061847f8eSopenharmony_ci    E_PRINT_FILE_IO = 13100007,
146161847f8eSopenharmony_ci  }
146261847f8eSopenharmony_ci
146361847f8eSopenharmony_ci  /**
146461847f8eSopenharmony_ci   * Enumeration of application event.
146561847f8eSopenharmony_ci   * @enum { number } ApplicationEvent
146661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
146761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
146861847f8eSopenharmony_ci   * @since 12
146961847f8eSopenharmony_ci   */
147061847f8eSopenharmony_ci  enum ApplicationEvent {
147161847f8eSopenharmony_ci    /**
147261847f8eSopenharmony_ci     * Application created.
147361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
147461847f8eSopenharmony_ci     * @systemapi
147561847f8eSopenharmony_ci     * @since 12
147661847f8eSopenharmony_ci     */
147761847f8eSopenharmony_ci    APPLICATION_CREATED = 0,
147861847f8eSopenharmony_ci
147961847f8eSopenharmony_ci    /**
148061847f8eSopenharmony_ci     * Application closed for printing started.
148161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
148261847f8eSopenharmony_ci     * @systemapi
148361847f8eSopenharmony_ci     * @since 12
148461847f8eSopenharmony_ci     */
148561847f8eSopenharmony_ci    APPLICATION_CLOSED_FOR_STARTED = 1,
148661847f8eSopenharmony_ci
148761847f8eSopenharmony_ci    /**
148861847f8eSopenharmony_ci     * Application closed for printing canceled.
148961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
149061847f8eSopenharmony_ci     * @systemapi
149161847f8eSopenharmony_ci     * @since 12
149261847f8eSopenharmony_ci     */
149361847f8eSopenharmony_ci    APPLICATION_CLOSED_FOR_CANCELED = 2,
149461847f8eSopenharmony_ci  }
149561847f8eSopenharmony_ci
149661847f8eSopenharmony_ci  /**
149761847f8eSopenharmony_ci   * defines print ExtensionInfo.
149861847f8eSopenharmony_ci   * @typedef PrinterExtensionInfo
149961847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
150061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
150161847f8eSopenharmony_ci   * @since 10
150261847f8eSopenharmony_ci   */
150361847f8eSopenharmony_ci  interface PrinterExtensionInfo {
150461847f8eSopenharmony_ci    /**
150561847f8eSopenharmony_ci     * Extension id of printer extension.
150661847f8eSopenharmony_ci     * @type { string }
150761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
150861847f8eSopenharmony_ci     * @systemapi
150961847f8eSopenharmony_ci     * @since 10
151061847f8eSopenharmony_ci     */
151161847f8eSopenharmony_ci    extensionId: string;
151261847f8eSopenharmony_ci
151361847f8eSopenharmony_ci    /**
151461847f8eSopenharmony_ci     * Vendor id of extension.
151561847f8eSopenharmony_ci     * @type { string }
151661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
151761847f8eSopenharmony_ci     * @systemapi
151861847f8eSopenharmony_ci     * @since 10
151961847f8eSopenharmony_ci     */
152061847f8eSopenharmony_ci    vendorId: string;
152161847f8eSopenharmony_ci
152261847f8eSopenharmony_ci    /**
152361847f8eSopenharmony_ci     * Vendor name.
152461847f8eSopenharmony_ci     * @type { string }
152561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
152661847f8eSopenharmony_ci     * @systemapi
152761847f8eSopenharmony_ci     * @since 10
152861847f8eSopenharmony_ci     */
152961847f8eSopenharmony_ci    vendorName: string;
153061847f8eSopenharmony_ci
153161847f8eSopenharmony_ci    /**
153261847f8eSopenharmony_ci     * Vendor icon.
153361847f8eSopenharmony_ci     * @type { number }
153461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
153561847f8eSopenharmony_ci     * @systemapi
153661847f8eSopenharmony_ci     * @since 10
153761847f8eSopenharmony_ci     */
153861847f8eSopenharmony_ci    vendorIcon: number;
153961847f8eSopenharmony_ci
154061847f8eSopenharmony_ci    /**
154161847f8eSopenharmony_ci     * Version of current printer extension.
154261847f8eSopenharmony_ci     * @type { string }
154361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
154461847f8eSopenharmony_ci     * @systemapi
154561847f8eSopenharmony_ci     * @since 10
154661847f8eSopenharmony_ci     */
154761847f8eSopenharmony_ci    version: string;
154861847f8eSopenharmony_ci  }
154961847f8eSopenharmony_ci
155061847f8eSopenharmony_ci  /**
155161847f8eSopenharmony_ci   * Get all printer extension installed.
155261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
155361847f8eSopenharmony_ci   * @param { AsyncCallback<Array<PrinterExtensionInfo>> } callback - The callback function for handling the extension list found.
155461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
155561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
155661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
155761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
155861847f8eSopenharmony_ci   * @since 10
155961847f8eSopenharmony_ci   */
156061847f8eSopenharmony_ci  function queryAllPrinterExtensionInfos(callback: AsyncCallback<Array<PrinterExtensionInfo>>): void;
156161847f8eSopenharmony_ci
156261847f8eSopenharmony_ci  /**
156361847f8eSopenharmony_ci   * Get all printer extension installed.
156461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
156561847f8eSopenharmony_ci   * @returns { Promise<Array<PrinterExtensionInfo>> } the promise returned by the function.
156661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
156761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
156861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
156961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
157061847f8eSopenharmony_ci   * @since 10
157161847f8eSopenharmony_ci   */
157261847f8eSopenharmony_ci  function queryAllPrinterExtensionInfos(): Promise<Array<PrinterExtensionInfo>>;
157361847f8eSopenharmony_ci
157461847f8eSopenharmony_ci  /**
157561847f8eSopenharmony_ci   * Load the specific printer extension and start to discover printer.
157661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
157761847f8eSopenharmony_ci   * @param { Array<string> } extensionList - Indicates the list of printer extension.
157861847f8eSopenharmony_ci   *        empty list of extensionList Indicates to find printer with all installed extension.
157961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
158061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
158161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
158261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
158361847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
158461847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
158561847f8eSopenharmony_ci   * @since 10
158661847f8eSopenharmony_ci   */
158761847f8eSopenharmony_ci  function startDiscoverPrinter(extensionList: Array<string>, callback: AsyncCallback<void>): void;
158861847f8eSopenharmony_ci
158961847f8eSopenharmony_ci  /**
159061847f8eSopenharmony_ci   * Load the specific printer extension and start to discover printer.
159161847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
159261847f8eSopenharmony_ci   * @param { Array<string> } extensionList - Indicates the list of printer extension.
159361847f8eSopenharmony_ci   *        empty list of extensionList Indicates to find printer with all installed extension.
159461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
159561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
159661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
159761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
159861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
159961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
160061847f8eSopenharmony_ci   * @since 10
160161847f8eSopenharmony_ci   */
160261847f8eSopenharmony_ci  function startDiscoverPrinter(extensionList: Array<string>): Promise<void>;
160361847f8eSopenharmony_ci
160461847f8eSopenharmony_ci  /**
160561847f8eSopenharmony_ci   * Stop discovering the printer with specific printer extension.
160661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
160761847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
160861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
160961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
161061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
161161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
161261847f8eSopenharmony_ci   * @since 10
161361847f8eSopenharmony_ci   */
161461847f8eSopenharmony_ci  function stopDiscoverPrinter(callback: AsyncCallback<void>): void;
161561847f8eSopenharmony_ci
161661847f8eSopenharmony_ci  /**
161761847f8eSopenharmony_ci   * Stop discovering the printer with specific printer extension.
161861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
161961847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
162061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
162161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
162261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
162361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
162461847f8eSopenharmony_ci   * @since 10
162561847f8eSopenharmony_ci   */
162661847f8eSopenharmony_ci  function stopDiscoverPrinter(): Promise<void>;
162761847f8eSopenharmony_ci
162861847f8eSopenharmony_ci  /**
162961847f8eSopenharmony_ci   * Connect the specific printer.
163061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
163161847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
163261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
163361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
163461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
163561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
163661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
163761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
163861847f8eSopenharmony_ci   * @since 10
163961847f8eSopenharmony_ci   */
164061847f8eSopenharmony_ci  function connectPrinter(printerId: string, callback: AsyncCallback<void>): void;
164161847f8eSopenharmony_ci
164261847f8eSopenharmony_ci  /**
164361847f8eSopenharmony_ci   * Connect the specific printer.
164461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
164561847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
164661847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
164761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
164861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
164961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
165061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
165161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
165261847f8eSopenharmony_ci   * @since 10
165361847f8eSopenharmony_ci   */
165461847f8eSopenharmony_ci  function connectPrinter(printerId: string): Promise<void>;
165561847f8eSopenharmony_ci
165661847f8eSopenharmony_ci  /**
165761847f8eSopenharmony_ci   * Disconnect the specific printer.
165861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
165961847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
166061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
166161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
166261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
166361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
166461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
166561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
166661847f8eSopenharmony_ci   * @since 10
166761847f8eSopenharmony_ci   */
166861847f8eSopenharmony_ci  function disconnectPrinter(printerId: string, callback: AsyncCallback<void>): void;
166961847f8eSopenharmony_ci
167061847f8eSopenharmony_ci  /**
167161847f8eSopenharmony_ci   * Disconnect the specific printer.
167261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
167361847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
167461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
167561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
167661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
167761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
167861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
167961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
168061847f8eSopenharmony_ci   * @since 10
168161847f8eSopenharmony_ci   */
168261847f8eSopenharmony_ci  function disconnectPrinter(printerId: string): Promise<void>;
168361847f8eSopenharmony_ci
168461847f8eSopenharmony_ci  /**
168561847f8eSopenharmony_ci   * Query capability for the specific printer.
168661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
168761847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
168861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for capability from printer.
168961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
169061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
169161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
169261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
169361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
169461847f8eSopenharmony_ci   * @since 10
169561847f8eSopenharmony_ci   */
169661847f8eSopenharmony_ci  function queryPrinterCapability(printerId: string, callback: AsyncCallback<void>): void;
169761847f8eSopenharmony_ci
169861847f8eSopenharmony_ci  /**
169961847f8eSopenharmony_ci   * Query capability for the specific printer.
170061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
170161847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
170261847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
170361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
170461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
170561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
170661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
170761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
170861847f8eSopenharmony_ci   * @since 10
170961847f8eSopenharmony_ci   */
171061847f8eSopenharmony_ci  function queryPrinterCapability(printerId: string): Promise<void>;
171161847f8eSopenharmony_ci
171261847f8eSopenharmony_ci  /**
171361847f8eSopenharmony_ci   * Start print job.
171461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
171561847f8eSopenharmony_ci   * @param { PrintJob } jobInfo - Indicates the information of print job.
171661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
171761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
171861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
171961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
172061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
172161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
172261847f8eSopenharmony_ci   * @since 10
172361847f8eSopenharmony_ci   */
172461847f8eSopenharmony_ci  function startPrintJob(jobInfo: PrintJob, callback: AsyncCallback<void>): void;
172561847f8eSopenharmony_ci
172661847f8eSopenharmony_ci  /**
172761847f8eSopenharmony_ci   * Start print job.
172861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
172961847f8eSopenharmony_ci   * @param { PrintJob } jobInfo - Indicates the information of print job.
173061847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
173161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
173261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
173361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
173461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
173561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
173661847f8eSopenharmony_ci   * @since 10
173761847f8eSopenharmony_ci   */
173861847f8eSopenharmony_ci  function startPrintJob(jobInfo: PrintJob): Promise<void>;
173961847f8eSopenharmony_ci
174061847f8eSopenharmony_ci  /**
174161847f8eSopenharmony_ci   * Cancel the print job has been sent to printer.
174261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
174361847f8eSopenharmony_ci   * @param { string } jobId - Indicates the specific print job.
174461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
174561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
174661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
174761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
174861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
174961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
175061847f8eSopenharmony_ci   * @since 10
175161847f8eSopenharmony_ci   */
175261847f8eSopenharmony_ci  function cancelPrintJob(jobId: string, callback: AsyncCallback<void>): void;
175361847f8eSopenharmony_ci
175461847f8eSopenharmony_ci  /**
175561847f8eSopenharmony_ci   * Cancel the print job has been sent to printer.
175661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
175761847f8eSopenharmony_ci   * @param { string } jobId - Indicates the specific print job.
175861847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
175961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
176061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
176161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
176261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
176361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
176461847f8eSopenharmony_ci   * @since 10
176561847f8eSopenharmony_ci   */
176661847f8eSopenharmony_ci  function cancelPrintJob(jobId: string): Promise<void>;
176761847f8eSopenharmony_ci
176861847f8eSopenharmony_ci  /**
176961847f8eSopenharmony_ci   * Request preview of the print job.
177061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
177161847f8eSopenharmony_ci   * @param { PrintJob } jobInfo - Indicates the information of print job.
177261847f8eSopenharmony_ci   * @param { Callback<number> } callback - The callback function for indcating the result of API execution.
177361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
177461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
177561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
177661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
177761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
177861847f8eSopenharmony_ci   * @since 10
177961847f8eSopenharmony_ci   */
178061847f8eSopenharmony_ci  function requestPrintPreview(jobInfo: PrintJob, callback: Callback<number>): void;
178161847f8eSopenharmony_ci
178261847f8eSopenharmony_ci  /**
178361847f8eSopenharmony_ci   * Request preview of the print job.
178461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
178561847f8eSopenharmony_ci   * @param { PrintJob } jobInfo - Indicates the information of print job.
178661847f8eSopenharmony_ci   * @returns { Promise<number> } the promise returned by the function.
178761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
178861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
178961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
179061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
179161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
179261847f8eSopenharmony_ci   * @since 10
179361847f8eSopenharmony_ci   */
179461847f8eSopenharmony_ci  function requestPrintPreview(jobInfo: PrintJob): Promise<number>;
179561847f8eSopenharmony_ci
179661847f8eSopenharmony_ci  /**
179761847f8eSopenharmony_ci   * Register event callback for the state change of printer.
179861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
179961847f8eSopenharmony_ci   * @param { 'printerStateChange' } type - Indicates state change of printer.
180061847f8eSopenharmony_ci   * @param { function } callback - The callback function for state change of printer.
180161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
180261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
180361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
180461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
180561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
180661847f8eSopenharmony_ci   * @since 10
180761847f8eSopenharmony_ci   */
180861847f8eSopenharmony_ci  function on(type: 'printerStateChange', callback: (state: PrinterState, info: PrinterInfo) => void): void;
180961847f8eSopenharmony_ci
181061847f8eSopenharmony_ci  /**
181161847f8eSopenharmony_ci   * Unregister event callback for the state change of printer.
181261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
181361847f8eSopenharmony_ci   * @param { 'printerStateChange' } type - Indicates state change of printer.
181461847f8eSopenharmony_ci   * @param { Callback<boolean> } callback - The callback function for state change of printer.
181561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
181661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
181761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
181861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
181961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
182061847f8eSopenharmony_ci   * @since 10
182161847f8eSopenharmony_ci   */
182261847f8eSopenharmony_ci  function off(type: 'printerStateChange', callback?: Callback<boolean>): void;
182361847f8eSopenharmony_ci
182461847f8eSopenharmony_ci  /**
182561847f8eSopenharmony_ci   * Register event callback for the state change of print job.
182661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
182761847f8eSopenharmony_ci   * @param { 'jobStateChange' } type - Indicates state change of printer.
182861847f8eSopenharmony_ci   * @param { function } callback - The callback function for state change of printer.
182961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
183061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
183161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
183261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
183361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
183461847f8eSopenharmony_ci   * @since 10
183561847f8eSopenharmony_ci   */
183661847f8eSopenharmony_ci  function on(type: 'jobStateChange', callback: (state: PrintJobState, job: PrintJob) => void): void;
183761847f8eSopenharmony_ci
183861847f8eSopenharmony_ci  /**
183961847f8eSopenharmony_ci   * Unregister event callback for the state change of print job.
184061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
184161847f8eSopenharmony_ci   * @param { 'jobStateChange' } type - Indicates state change of printer.
184261847f8eSopenharmony_ci   * @param { Callback<boolean> } callback - The callback function for state change of printer.
184361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
184461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
184561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
184661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
184761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
184861847f8eSopenharmony_ci   * @since 10
184961847f8eSopenharmony_ci   */
185061847f8eSopenharmony_ci  function off(type: 'jobStateChange', callback?: Callback<boolean>): void;
185161847f8eSopenharmony_ci
185261847f8eSopenharmony_ci  /**
185361847f8eSopenharmony_ci   * Register event callback for the information change of print extension.
185461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
185561847f8eSopenharmony_ci   * @param { 'extInfoChange' } type - Indicates information change of print extension.
185661847f8eSopenharmony_ci   * @param { function } callback - The callback function for information change of print extension.
185761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
185861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
185961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
186061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
186161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
186261847f8eSopenharmony_ci   * @since 10
186361847f8eSopenharmony_ci   */
186461847f8eSopenharmony_ci  function on(type: 'extInfoChange', callback: (extensionId: string, info: string) => void): void;
186561847f8eSopenharmony_ci
186661847f8eSopenharmony_ci  /**
186761847f8eSopenharmony_ci   * Unregister event callback for the information change of print extension.
186861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
186961847f8eSopenharmony_ci   * @param { 'extInfoChange' } type - Indicates state change of printer.
187061847f8eSopenharmony_ci   * @param { Callback<boolean> } callback - The callback function for state change of printer.
187161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
187261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
187361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
187461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
187561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
187661847f8eSopenharmony_ci   * @since 10
187761847f8eSopenharmony_ci   */
187861847f8eSopenharmony_ci  function off(type: 'extInfoChange', callback?: Callback<boolean>): void;
187961847f8eSopenharmony_ci
188061847f8eSopenharmony_ci  /**
188161847f8eSopenharmony_ci   * New printers have been found and notify Print SA.
188261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
188361847f8eSopenharmony_ci   * @param { Array<PrinterInfo> } printers - Indicates new arrived printer lists.
188461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
188561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
188661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
188761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
188861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
188961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
189061847f8eSopenharmony_ci   * @since 10
189161847f8eSopenharmony_ci   */
189261847f8eSopenharmony_ci  function addPrinters(printers: Array<PrinterInfo>, callback: AsyncCallback<void>): void;
189361847f8eSopenharmony_ci
189461847f8eSopenharmony_ci  /**
189561847f8eSopenharmony_ci   * New printers have been found and notify Print SA.
189661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
189761847f8eSopenharmony_ci   * @param { Array<PrinterInfo> } printers - Indicates new arrived printer lists.
189861847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
189961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
190061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
190161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
190261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
190361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
190461847f8eSopenharmony_ci   * @since 10
190561847f8eSopenharmony_ci   */
190661847f8eSopenharmony_ci  function addPrinters(printers: Array<PrinterInfo>): Promise<void>;
190761847f8eSopenharmony_ci
190861847f8eSopenharmony_ci  /**
190961847f8eSopenharmony_ci   * Printers have been lost and notify Print SA.
191061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
191161847f8eSopenharmony_ci   * @param { Array<string> } printerIds - Indicates the lost printer lists.
191261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
191361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
191461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
191561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
191661847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
191761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
191861847f8eSopenharmony_ci   * @since 10
191961847f8eSopenharmony_ci   */
192061847f8eSopenharmony_ci  function removePrinters(printerIds: Array<string>, callback: AsyncCallback<void>): void;
192161847f8eSopenharmony_ci
192261847f8eSopenharmony_ci  /**
192361847f8eSopenharmony_ci   * Printers have been lost and notify Print SA.
192461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
192561847f8eSopenharmony_ci   * @param { Array<string> } printerIds - Indicates the lost printer lists.
192661847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
192761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
192861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
192961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
193061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
193161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
193261847f8eSopenharmony_ci   * @since 10
193361847f8eSopenharmony_ci   */
193461847f8eSopenharmony_ci  function removePrinters(printerIds: Array<string>): Promise<void>;
193561847f8eSopenharmony_ci
193661847f8eSopenharmony_ci  /**
193761847f8eSopenharmony_ci   * Update the information of the specific printers.
193861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
193961847f8eSopenharmony_ci   * @param { Array<PrinterInfo> } printers - Indicates to be updated printer lists.
194061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
194161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
194261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
194361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
194461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
194561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
194661847f8eSopenharmony_ci   * @since 10
194761847f8eSopenharmony_ci   */
194861847f8eSopenharmony_ci  function updatePrinters(printers: Array<PrinterInfo>, callback: AsyncCallback<void>): void;
194961847f8eSopenharmony_ci
195061847f8eSopenharmony_ci  /**
195161847f8eSopenharmony_ci   * Update the information of the specific printers.
195261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
195361847f8eSopenharmony_ci   * @param { Array<PrinterInfo> } printers - Indicates to be updated printer lists.
195461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
195561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
195661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
195761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
195861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
195961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
196061847f8eSopenharmony_ci   * @since 10
196161847f8eSopenharmony_ci   */
196261847f8eSopenharmony_ci  function updatePrinters(printers: Array<PrinterInfo>): Promise<void>;
196361847f8eSopenharmony_ci
196461847f8eSopenharmony_ci  /**
196561847f8eSopenharmony_ci   * Notify Print SA the state of printer has been changed.
196661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
196761847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
196861847f8eSopenharmony_ci   * @param { PrinterState } state - Indicates state of the printer.
196961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
197061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
197161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
197261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
197361847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
197461847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
197561847f8eSopenharmony_ci   * @since 10
197661847f8eSopenharmony_ci   */
197761847f8eSopenharmony_ci  function updatePrinterState(printerId: string, state: PrinterState, callback: AsyncCallback<void>): void;
197861847f8eSopenharmony_ci
197961847f8eSopenharmony_ci  /**
198061847f8eSopenharmony_ci   * Notify Print SA the state of printer has been changed.
198161847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
198261847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
198361847f8eSopenharmony_ci   * @param { PrinterState } state - Indicates state of the printer.
198461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
198561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
198661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
198761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
198861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
198961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
199061847f8eSopenharmony_ci   * @since 10
199161847f8eSopenharmony_ci   */
199261847f8eSopenharmony_ci  function updatePrinterState(printerId: string, state: PrinterState): Promise<void>;
199361847f8eSopenharmony_ci
199461847f8eSopenharmony_ci  /**
199561847f8eSopenharmony_ci   * Notify Print SA the state of print job has been changed.
199661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
199761847f8eSopenharmony_ci   * @param { string} jobId - Indicates id of the print job.
199861847f8eSopenharmony_ci   * @param { PrintJobState } state - Indicates new state of print job.
199961847f8eSopenharmony_ci   * @param { PrintJobSubState } subState - Indicates sub state of print job.
200061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
200161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
200261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
200361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
200461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
200561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
200661847f8eSopenharmony_ci   * @since 10
200761847f8eSopenharmony_ci   */
200861847f8eSopenharmony_ci  function updatePrintJobState(jobId: string, state: PrintJobState, subState: PrintJobSubState, callback: AsyncCallback<void>): void;
200961847f8eSopenharmony_ci
201061847f8eSopenharmony_ci  /**
201161847f8eSopenharmony_ci   * Notify Print SA the state of print job has been changed.
201261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
201361847f8eSopenharmony_ci   * @param { string} jobId - Indicates id of the print job.
201461847f8eSopenharmony_ci   * @param { PrintJobState } state - Indicates new state of print job.
201561847f8eSopenharmony_ci   * @param { PrintJobSubState } subState - Indicates sub state of print job.
201661847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
201761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
201861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
201961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
202061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
202161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
202261847f8eSopenharmony_ci   * @since 10
202361847f8eSopenharmony_ci   */
202461847f8eSopenharmony_ci  function updatePrintJobState(jobId: string, state: PrintJobState, subState: PrintJobSubState): Promise<void>;
202561847f8eSopenharmony_ci
202661847f8eSopenharmony_ci  /**
202761847f8eSopenharmony_ci   * Notify Print SA the state of print extension has been changed.
202861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
202961847f8eSopenharmony_ci   * @param { string } info - Indicates changed information of print extension.
203061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
203161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
203261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
203361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
203461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
203561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
203661847f8eSopenharmony_ci   * @since 10
203761847f8eSopenharmony_ci   */
203861847f8eSopenharmony_ci  function updateExtensionInfo(info: string, callback: AsyncCallback<void>): void;
203961847f8eSopenharmony_ci
204061847f8eSopenharmony_ci  /**
204161847f8eSopenharmony_ci   * Notify Print SA the state of print extension has been changed.
204261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
204361847f8eSopenharmony_ci   * @param { string } info - Indicates changed information of print extension.
204461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
204561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
204661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
204761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
204861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
204961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
205061847f8eSopenharmony_ci   * @since 10
205161847f8eSopenharmony_ci   */
205261847f8eSopenharmony_ci  function updateExtensionInfo(info: string): Promise<void>;
205361847f8eSopenharmony_ci
205461847f8eSopenharmony_ci  /**
205561847f8eSopenharmony_ci   * Get all the printJobs in the queue.
205661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
205761847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for handling the printJob list found.
205861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
205961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
206061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
206161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
206261847f8eSopenharmony_ci   * @since 10
206361847f8eSopenharmony_ci   * @deprecated since 11
206461847f8eSopenharmony_ci   * @useinstead print#queryPrintJobList
206561847f8eSopenharmony_ci   */
206661847f8eSopenharmony_ci  function queryAllPrintJobs(callback: AsyncCallback<void>): void;
206761847f8eSopenharmony_ci
206861847f8eSopenharmony_ci  /**
206961847f8eSopenharmony_ci   * Get all the printJobs in the queue.
207061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
207161847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
207261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
207361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
207461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
207561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
207661847f8eSopenharmony_ci   * @since 10
207761847f8eSopenharmony_ci   * @deprecated since 11
207861847f8eSopenharmony_ci   * @useinstead print#queryPrintJobList
207961847f8eSopenharmony_ci   */
208061847f8eSopenharmony_ci  function queryAllPrintJobs(): Promise<void>;
208161847f8eSopenharmony_ci
208261847f8eSopenharmony_ci  /**
208361847f8eSopenharmony_ci   * Get all the printJobs in the queue.
208461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
208561847f8eSopenharmony_ci   * @param { AsyncCallback<Array<PrintJob>> } callback - The callback function for handling the printJob list found.
208661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
208761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
208861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
208961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
209061847f8eSopenharmony_ci   * @since 11
209161847f8eSopenharmony_ci   */
209261847f8eSopenharmony_ci  function queryPrintJobList(callback: AsyncCallback<Array<PrintJob>>): void;
209361847f8eSopenharmony_ci
209461847f8eSopenharmony_ci  /**
209561847f8eSopenharmony_ci   * Get all the printJobs in the queue.
209661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
209761847f8eSopenharmony_ci   * @returns { Promise<Array<PrintJob>> } the promise returned by the function.
209861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
209961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
210061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
210161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
210261847f8eSopenharmony_ci   * @since 11
210361847f8eSopenharmony_ci   */
210461847f8eSopenharmony_ci  function queryPrintJobList(): Promise<Array<PrintJob>>;
210561847f8eSopenharmony_ci
210661847f8eSopenharmony_ci  /**
210761847f8eSopenharmony_ci   * Get printJob by jobId.
210861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
210961847f8eSopenharmony_ci   * @param { string } jobId - Indicates id of the print job.
211061847f8eSopenharmony_ci   * @param { AsyncCallback<PrintJob> } callback - The callback function for get printJob by jobId.
211161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
211261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
211361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
211461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
211561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
211661847f8eSopenharmony_ci   * @since 11
211761847f8eSopenharmony_ci   */
211861847f8eSopenharmony_ci  function queryPrintJobById(jobId: string, callback: AsyncCallback<PrintJob>): void;
211961847f8eSopenharmony_ci
212061847f8eSopenharmony_ci  /**
212161847f8eSopenharmony_ci   * Get printJob by jobId.
212261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
212361847f8eSopenharmony_ci   * @param { string } jobId - Indicates id of the print job.
212461847f8eSopenharmony_ci   * @returns { Promise<PrintJob> } the promise returned by the function.
212561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
212661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
212761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
212861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
212961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
213061847f8eSopenharmony_ci   * @since 11
213161847f8eSopenharmony_ci   */
213261847f8eSopenharmony_ci  function queryPrintJobById(jobId: string): Promise<PrintJob>;
213361847f8eSopenharmony_ci
213461847f8eSopenharmony_ci  /**
213561847f8eSopenharmony_ci   * Start getting print file.
213661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
213761847f8eSopenharmony_ci   * @param { string } jobId - Indicates id of the print job.
213861847f8eSopenharmony_ci   * @param { PrintAttributes } printAttributes - Indicates print attributes.
213961847f8eSopenharmony_ci   * @param { number } fd - Indicates print file fd.
214061847f8eSopenharmony_ci   * @param { Callback<PrintFileCreationState> } onFileStateChanged - The callback function for update the file state.
214161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
214261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
214361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
214461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
214561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
214661847f8eSopenharmony_ci   * @since 11
214761847f8eSopenharmony_ci   */
214861847f8eSopenharmony_ci  function startGettingPrintFile(jobId: string, printAttributes: PrintAttributes, fd: number,
214961847f8eSopenharmony_ci    onFileStateChanged: Callback<PrintFileCreationState>): void;
215061847f8eSopenharmony_ci
215161847f8eSopenharmony_ci  /**
215261847f8eSopenharmony_ci   * Notify print service the information.
215361847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
215461847f8eSopenharmony_ci   * @param { string } jobId - Indicates id of the print job.
215561847f8eSopenharmony_ci   * @param { 'spooler_closed_for_cancelled' | 'spooler_closed_for_started' } type - Indicates notify information.
215661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback function for indcating the result of API execution.
215761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
215861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
215961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
216061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
216161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
216261847f8eSopenharmony_ci   * @since 11
216361847f8eSopenharmony_ci   */
216461847f8eSopenharmony_ci  function notifyPrintService(jobId: string, type: 'spooler_closed_for_cancelled' | 'spooler_closed_for_started', callback: AsyncCallback<void>): void;
216561847f8eSopenharmony_ci
216661847f8eSopenharmony_ci  /**
216761847f8eSopenharmony_ci   * Notify print service the information.
216861847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
216961847f8eSopenharmony_ci   * @param { string } jobId - Indicates id of the print job.
217061847f8eSopenharmony_ci   * @param { 'spooler_closed_for_cancelled' | 'spooler_closed_for_started' } type - Indicates notify information.
217161847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
217261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
217361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
217461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
217561847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
217661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
217761847f8eSopenharmony_ci   * @since 11
217861847f8eSopenharmony_ci   */
217961847f8eSopenharmony_ci  function notifyPrintService(jobId: string, type: 'spooler_closed_for_cancelled' | 'spooler_closed_for_started'): Promise<void>;
218061847f8eSopenharmony_ci
218161847f8eSopenharmony_ci  /**
218261847f8eSopenharmony_ci   * Get all added printers.
218361847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
218461847f8eSopenharmony_ci   * @returns { Promise<Array<string>> } the promise returned by the function.
218561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
218661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
218761847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
218861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
218961847f8eSopenharmony_ci   * @since 12
219061847f8eSopenharmony_ci   */
219161847f8eSopenharmony_ci  function getAddedPrinters(): Promise<Array<string>>;
219261847f8eSopenharmony_ci
219361847f8eSopenharmony_ci  /**
219461847f8eSopenharmony_ci   * Get printer info by printer id.
219561847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
219661847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
219761847f8eSopenharmony_ci   * @returns { Promise<PrinterInfo> } the promise returned by the function.
219861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
219961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
220061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
220161847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
220261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
220361847f8eSopenharmony_ci   * @since 12
220461847f8eSopenharmony_ci   */
220561847f8eSopenharmony_ci  function getPrinterInfoById(printerId: string): Promise<PrinterInfo>;
220661847f8eSopenharmony_ci
220761847f8eSopenharmony_ci  /**
220861847f8eSopenharmony_ci   * Notify print service of application event.
220961847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_PRINT_JOB
221061847f8eSopenharmony_ci   * @param { ApplicationEvent } event - Indicates the event to be notified.
221161847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
221261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
221361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - not system application
221461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
221561847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
221661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
221761847f8eSopenharmony_ci   * @since 12
221861847f8eSopenharmony_ci   */
221961847f8eSopenharmony_ci  function notifyPrintServiceEvent(event: ApplicationEvent): Promise<void>;
222061847f8eSopenharmony_ci
222161847f8eSopenharmony_ci  /**
222261847f8eSopenharmony_ci   * New printers have been found and notify Print SA.
222361847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
222461847f8eSopenharmony_ci   * @param { PrinterInformation } printerInformation - Indicates new arrived printer lists.
222561847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
222661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
222761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
222861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
222961847f8eSopenharmony_ci   * @since 13
223061847f8eSopenharmony_ci   */
223161847f8eSopenharmony_ci  function addPrinterToDiscovery(printerInformation: PrinterInformation): Promise<void>;
223261847f8eSopenharmony_ci
223361847f8eSopenharmony_ci  /**
223461847f8eSopenharmony_ci   * Update the information of the specific printer.
223561847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
223661847f8eSopenharmony_ci   * @param { PrinterInformation } printerInformation - Indicates to be updated printer lists.
223761847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
223861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
223961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
224061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
224161847f8eSopenharmony_ci   * @since 13
224261847f8eSopenharmony_ci   */
224361847f8eSopenharmony_ci  function updatePrinterInDiscovery(printerInformation: PrinterInformation): Promise<void>;
224461847f8eSopenharmony_ci
224561847f8eSopenharmony_ci  /**
224661847f8eSopenharmony_ci   * Notify Print SA to remove printer.
224761847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
224861847f8eSopenharmony_ci   * @param { string } printerId - Indicates the lost printer lists.
224961847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
225061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
225161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
225261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
225361847f8eSopenharmony_ci   * @since 13
225461847f8eSopenharmony_ci   */
225561847f8eSopenharmony_ci  function removePrinterFromDiscovery(printerId: string): Promise<void>;
225661847f8eSopenharmony_ci
225761847f8eSopenharmony_ci  /**
225861847f8eSopenharmony_ci   * Get printerInformation by printer id.
225961847f8eSopenharmony_ci   * @permission ohos.permission.PRINT
226061847f8eSopenharmony_ci   * @param { string } printerId - Indicates id of the printer.
226161847f8eSopenharmony_ci   * @returns { Promise<PrinterInformation> } the promise returned by the function.
226261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - the application does not have permission to call this function.
226361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
226461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
226561847f8eSopenharmony_ci   * @since 13
226661847f8eSopenharmony_ci   */
226761847f8eSopenharmony_ci  function getPrinterInformationById(printerId: string): Promise<PrinterInformation>;
226861847f8eSopenharmony_ci
226961847f8eSopenharmony_ci  /**
227061847f8eSopenharmony_ci   * defines printer information.
227161847f8eSopenharmony_ci   * @typedef PrinterInformation
227261847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
227361847f8eSopenharmony_ci   * @since 13
227461847f8eSopenharmony_ci   */
227561847f8eSopenharmony_ci  interface PrinterInformation {
227661847f8eSopenharmony_ci    /**
227761847f8eSopenharmony_ci     * Printer id.
227861847f8eSopenharmony_ci     * @type { string }
227961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
228061847f8eSopenharmony_ci     * @since 13
228161847f8eSopenharmony_ci     */
228261847f8eSopenharmony_ci    printerId: string;
228361847f8eSopenharmony_ci
228461847f8eSopenharmony_ci    /**
228561847f8eSopenharmony_ci     * Printer name.
228661847f8eSopenharmony_ci     * @type { string }
228761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
228861847f8eSopenharmony_ci     * @since 13
228961847f8eSopenharmony_ci     */
229061847f8eSopenharmony_ci    printerName: string;
229161847f8eSopenharmony_ci
229261847f8eSopenharmony_ci    /**
229361847f8eSopenharmony_ci     * Current printer status.
229461847f8eSopenharmony_ci     * @type { PrinterStatus }
229561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
229661847f8eSopenharmony_ci     * @since 13
229761847f8eSopenharmony_ci     */
229861847f8eSopenharmony_ci    printerStatus: PrinterStatus;
229961847f8eSopenharmony_ci
230061847f8eSopenharmony_ci    /**
230161847f8eSopenharmony_ci     * Printer description.
230261847f8eSopenharmony_ci     * @type { ?string }
230361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
230461847f8eSopenharmony_ci     * @since 13
230561847f8eSopenharmony_ci     */
230661847f8eSopenharmony_ci    description?: string;
230761847f8eSopenharmony_ci
230861847f8eSopenharmony_ci    /**
230961847f8eSopenharmony_ci     * Printer capabilities.
231061847f8eSopenharmony_ci     * @type { ?PrinterCapabilities }
231161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
231261847f8eSopenharmony_ci     * @since 13
231361847f8eSopenharmony_ci     */
231461847f8eSopenharmony_ci    capability?: PrinterCapabilities;
231561847f8eSopenharmony_ci
231661847f8eSopenharmony_ci    /**
231761847f8eSopenharmony_ci     * Printer uri.
231861847f8eSopenharmony_ci     * @type { ?string }
231961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
232061847f8eSopenharmony_ci     * @since 13
232161847f8eSopenharmony_ci     */
232261847f8eSopenharmony_ci    uri?: string;
232361847f8eSopenharmony_ci
232461847f8eSopenharmony_ci    /**
232561847f8eSopenharmony_ci     * Printer make.
232661847f8eSopenharmony_ci     * @type { ?string }
232761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
232861847f8eSopenharmony_ci     * @since 13
232961847f8eSopenharmony_ci     */
233061847f8eSopenharmony_ci    printerMake?: string;
233161847f8eSopenharmony_ci
233261847f8eSopenharmony_ci    /**
233361847f8eSopenharmony_ci     * Detail information in json format.
233461847f8eSopenharmony_ci     * @type { ?string }
233561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
233661847f8eSopenharmony_ci     * @since 13
233761847f8eSopenharmony_ci     */
233861847f8eSopenharmony_ci    options?: string;
233961847f8eSopenharmony_ci  }
234061847f8eSopenharmony_ci
234161847f8eSopenharmony_ci  /**
234261847f8eSopenharmony_ci   * defines printer capabilities.
234361847f8eSopenharmony_ci   * @typedef PrinterCapabilities
234461847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
234561847f8eSopenharmony_ci   * @since 13
234661847f8eSopenharmony_ci   */
234761847f8eSopenharmony_ci  interface PrinterCapabilities {
234861847f8eSopenharmony_ci    /**
234961847f8eSopenharmony_ci     * The page size list supported by the printer.
235061847f8eSopenharmony_ci     * @type { Array<PrintPageSize> }
235161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
235261847f8eSopenharmony_ci     * @since 13
235361847f8eSopenharmony_ci     */
235461847f8eSopenharmony_ci    supportedPageSizes: Array<PrintPageSize>;
235561847f8eSopenharmony_ci
235661847f8eSopenharmony_ci    /**
235761847f8eSopenharmony_ci     * Array of supported color mode.
235861847f8eSopenharmony_ci     * @type { Array<PrintColorMode> }
235961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
236061847f8eSopenharmony_ci     * @since 13
236161847f8eSopenharmony_ci     */
236261847f8eSopenharmony_ci    supportedColorModes: Array<PrintColorMode>;
236361847f8eSopenharmony_ci
236461847f8eSopenharmony_ci    /**
236561847f8eSopenharmony_ci     * Array of supported duplex mode.
236661847f8eSopenharmony_ci     * @type { Array<PrintDuplexMode> }
236761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
236861847f8eSopenharmony_ci     * @since 13
236961847f8eSopenharmony_ci     */
237061847f8eSopenharmony_ci    supportedDuplexModes: Array<PrintDuplexMode>;
237161847f8eSopenharmony_ci
237261847f8eSopenharmony_ci    /**
237361847f8eSopenharmony_ci     * Array of supported print media types.
237461847f8eSopenharmony_ci     * @type { ?Array<string> }
237561847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
237661847f8eSopenharmony_ci     * @since 13
237761847f8eSopenharmony_ci     */
237861847f8eSopenharmony_ci    supportedMediaTypes?: Array<string>;
237961847f8eSopenharmony_ci
238061847f8eSopenharmony_ci    /**
238161847f8eSopenharmony_ci     * Array of supported print quality.
238261847f8eSopenharmony_ci     * @type { ?Array<PrintQuality> }
238361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
238461847f8eSopenharmony_ci     * @since 13
238561847f8eSopenharmony_ci     */
238661847f8eSopenharmony_ci    supportedQualities?: Array<PrintQuality>;
238761847f8eSopenharmony_ci
238861847f8eSopenharmony_ci    /**
238961847f8eSopenharmony_ci     * Array of supported print orientation.
239061847f8eSopenharmony_ci     * @type { ?Array<PrintOrientationMode> }
239161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
239261847f8eSopenharmony_ci     * @since 13
239361847f8eSopenharmony_ci     */
239461847f8eSopenharmony_ci    supportedOrientations?: Array<PrintOrientationMode>;
239561847f8eSopenharmony_ci
239661847f8eSopenharmony_ci    /**
239761847f8eSopenharmony_ci     * Advanced capability in json format.
239861847f8eSopenharmony_ci     * @type { ?string }
239961847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
240061847f8eSopenharmony_ci     * @since 13
240161847f8eSopenharmony_ci     */
240261847f8eSopenharmony_ci    options?: string;
240361847f8eSopenharmony_ci  }
240461847f8eSopenharmony_ci
240561847f8eSopenharmony_ci  /**
240661847f8eSopenharmony_ci   * Enumeration of Print Quality.
240761847f8eSopenharmony_ci   * @enum { number } PrintQuality
240861847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
240961847f8eSopenharmony_ci   * @since 13
241061847f8eSopenharmony_ci   */
241161847f8eSopenharmony_ci  enum PrintQuality {
241261847f8eSopenharmony_ci    /**
241361847f8eSopenharmony_ci     * Draft quality mode.
241461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
241561847f8eSopenharmony_ci     * @since 13
241661847f8eSopenharmony_ci     */
241761847f8eSopenharmony_ci    QUALITY_DRAFT = 3,
241861847f8eSopenharmony_ci
241961847f8eSopenharmony_ci    /**
242061847f8eSopenharmony_ci     * Normal quality mode.
242161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
242261847f8eSopenharmony_ci     * @since 13
242361847f8eSopenharmony_ci     */
242461847f8eSopenharmony_ci    QUALITY_NORMAL = 4,
242561847f8eSopenharmony_ci
242661847f8eSopenharmony_ci    /**
242761847f8eSopenharmony_ci     * High quality mode.
242861847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
242961847f8eSopenharmony_ci     * @since 13
243061847f8eSopenharmony_ci     */
243161847f8eSopenharmony_ci    QUALITY_HIGH = 5,
243261847f8eSopenharmony_ci  }
243361847f8eSopenharmony_ci
243461847f8eSopenharmony_ci  /**
243561847f8eSopenharmony_ci   * Enumeration of Print OrientationMode.
243661847f8eSopenharmony_ci   * @enum { number } PrintOrientationMode
243761847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
243861847f8eSopenharmony_ci   * @since 13
243961847f8eSopenharmony_ci   */
244061847f8eSopenharmony_ci  enum PrintOrientationMode {
244161847f8eSopenharmony_ci    /**
244261847f8eSopenharmony_ci     * Portrait mode.
244361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
244461847f8eSopenharmony_ci     * @since 13
244561847f8eSopenharmony_ci     */
244661847f8eSopenharmony_ci    ORIENTATION_MODE_PORTRAIT = 0,
244761847f8eSopenharmony_ci
244861847f8eSopenharmony_ci    /**
244961847f8eSopenharmony_ci     * Landscape mode.
245061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
245161847f8eSopenharmony_ci     * @since 13
245261847f8eSopenharmony_ci     */
245361847f8eSopenharmony_ci    ORIENTATION_MODE_LANDSCAPE= 1,
245461847f8eSopenharmony_ci
245561847f8eSopenharmony_ci    /**
245661847f8eSopenharmony_ci     * Reverse landscape mode.
245761847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
245861847f8eSopenharmony_ci     * @since 13
245961847f8eSopenharmony_ci     */
246061847f8eSopenharmony_ci    ORIENTATION_MODE_REVERSE_LANDSCAPE = 2,
246161847f8eSopenharmony_ci
246261847f8eSopenharmony_ci    /**
246361847f8eSopenharmony_ci     * Reverse portrait mode.
246461847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
246561847f8eSopenharmony_ci     * @since 13
246661847f8eSopenharmony_ci     */
246761847f8eSopenharmony_ci    ORIENTATION_MODE_REVERSE_PORTRAIT = 3,
246861847f8eSopenharmony_ci
246961847f8eSopenharmony_ci    /**
247061847f8eSopenharmony_ci     * Not specified.
247161847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
247261847f8eSopenharmony_ci     * @since 13
247361847f8eSopenharmony_ci     */
247461847f8eSopenharmony_ci    ORIENTATION_MODE_NONE = 4,
247561847f8eSopenharmony_ci  }
247661847f8eSopenharmony_ci
247761847f8eSopenharmony_ci  /**
247861847f8eSopenharmony_ci   * Enumeration of Printer Status.
247961847f8eSopenharmony_ci   * @enum { number } PrinterStatus
248061847f8eSopenharmony_ci   * @syscap SystemCapability.Print.PrintFramework
248161847f8eSopenharmony_ci   * @since 13
248261847f8eSopenharmony_ci   */
248361847f8eSopenharmony_ci  enum PrinterStatus {
248461847f8eSopenharmony_ci    /**
248561847f8eSopenharmony_ci     * Printer idle.
248661847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
248761847f8eSopenharmony_ci     * @since 13
248861847f8eSopenharmony_ci     */
248961847f8eSopenharmony_ci    PRINTER_IDLE = 0,
249061847f8eSopenharmony_ci
249161847f8eSopenharmony_ci    /**
249261847f8eSopenharmony_ci     * Printer busy.
249361847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
249461847f8eSopenharmony_ci     * @since 13
249561847f8eSopenharmony_ci     */
249661847f8eSopenharmony_ci    PRINTER_BUSY = 1,
249761847f8eSopenharmony_ci
249861847f8eSopenharmony_ci    /**
249961847f8eSopenharmony_ci     * Printer not available.
250061847f8eSopenharmony_ci     * @syscap SystemCapability.Print.PrintFramework
250161847f8eSopenharmony_ci     * @since 13
250261847f8eSopenharmony_ci     */
250361847f8eSopenharmony_ci    PRINTER_UNAVAILABLE = 2,
250461847f8eSopenharmony_ci  }
250561847f8eSopenharmony_ci
250661847f8eSopenharmony_ci}
250761847f8eSopenharmony_ci
250861847f8eSopenharmony_ciexport default print;