From c8a94856cd92d1702e0edb8e5314fab57c949390 Mon Sep 17 00:00:00 2001 From: lxt Date: Mon, 23 Jun 2025 11:26:20 +0800 Subject: [PATCH] feat:modify pasteboard.d.ets for ArkTs1.2 on branch 0603 Signed-off-by: lxt --- api/@ohos.pasteboard.d.ts | 295 +++++++++++++++++++------------------- 1 file changed, 144 insertions(+), 151 deletions(-) diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index 9abc116e98..ddd320d4b1 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -21,9 +21,7 @@ import { AsyncCallback } from './@ohos.base'; import Want from './@ohos.app.ability.Want'; import image from './@ohos.multimedia.image'; -/*** if arkts 1.1 */ import unifiedDataChannel from './@ohos.data.unifiedDataChannel'; -/*** endif */ /** * systemPasteboard @@ -36,7 +34,7 @@ import unifiedDataChannel from './@ohos.data.unifiedDataChannel'; * @namespace pasteboard * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare namespace pasteboard { @@ -65,11 +63,10 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ const MIMETYPE_TEXT_HTML = 'text/html'; - /** * Indicates MIME types of wants. * @constant @@ -81,11 +78,9 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ const MIMETYPE_TEXT_WANT = 'text/want'; - /** * Indicates MIME types of plain text. * @constant @@ -97,11 +92,10 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ const MIMETYPE_TEXT_PLAIN = 'text/plain'; - /** * Indicates MIME types of URIs. * @constant @@ -113,11 +107,10 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ const MIMETYPE_TEXT_URI = 'text/uri'; - /** * Indicates MIME type of PixelMap. * @constant @@ -129,8 +122,7 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ const MIMETYPE_PIXELMAP = 'pixelMap'; @@ -145,7 +137,7 @@ declare namespace pasteboard { * @typedef { string | image.PixelMap | Want | ArrayBuffer } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ type ValueType = string | image.PixelMap | Want | ArrayBuffer; @@ -206,7 +198,7 @@ declare namespace pasteboard { * @since 9 */ /** - * Creates a PasteData object with MIME type and value. + * Creates a PasteData object of the specified type. * @param { string } mimeType - indicates MIME type of value, its size cannot be greater than 1024 bytes. * @param { ValueType } value - indicates the content that is set to PasteData. * @returns { PasteData } a new PasteData object which contains mimeType and value. @@ -215,7 +207,7 @@ declare namespace pasteboard { * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function createData(mimeType: string, value: ValueType): PasteData; @@ -228,7 +220,7 @@ declare namespace pasteboard { * 2. Incorrect parameters types; * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard - * @since arkts {'1.1':'14', '1.2':'20'} + * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 */ function createData(data: Record): PasteData; @@ -289,10 +281,10 @@ declare namespace pasteboard { * @since 9 */ /** - * Creates a record object with MIME type and value. + * Creates a PasteDataRecord object of the specified type. * @param { string } mimeType - indicates MIME type of value, its size cannot be greater than 1024 bytes. - * @param { ValueType } value - content to be saved. - * @returns { PasteDataRecord } a new PasteDataRecord object which contains mimeType and value. + * @param { ValueType } value - Data content of the specified type. + * @returns { PasteDataRecord } A new paste data record of a specified type. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types; * 3. Parameter verification failed. @@ -313,7 +305,7 @@ declare namespace pasteboard { * @returns { SystemPasteboard } The system clipboard object * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function getSystemPasteboard(): SystemPasteboard; @@ -329,7 +321,7 @@ declare namespace pasteboard { * @enum { number } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ enum ShareOption { @@ -339,10 +331,10 @@ declare namespace pasteboard { * @since 9 */ /** - * INAPP indicates that only paste in the same app is allowed. + * INAPP indicates that only intra-application pasting is allowed. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ INAPP, @@ -352,10 +344,10 @@ declare namespace pasteboard { * @since 9 */ /** - * LOCALDEVICE indicates that paste in any app in this device is allowed. + * LOCALDEVICE indicates that paste is allowed in any application. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ LOCALDEVICE, @@ -365,11 +357,10 @@ declare namespace pasteboard { * @since 9 */ /** - * CROSSDEVICE indicates that paste in any app across devices is allowed. + * CROSSDEVICE indicates that paste is allowed in any application across devices. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 * @deprecated since 12 */ CROSSDEVICE @@ -379,29 +370,28 @@ declare namespace pasteboard { * Enumerates the patterns allowed in the system pasteboard. * @enum { number } * @syscap SystemCapability.MiscServices.Pasteboard - * @since arkts {'1.1':'13', '1.2':'20'} + * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ enum Pattern { /** * URL pattern. * @syscap SystemCapability.MiscServices.Pasteboard - * @since arkts {'1.1':'13', '1.2':'20'} + * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ URL = 0, /** * Number pattern. * @syscap SystemCapability.MiscServices.Pasteboard - * @since arkts {'1.1':'13', '1.2':'20'} + * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ NUMBER = 1, /** * Email address pattern. * @syscap SystemCapability.MiscServices.Pasteboard - * @since arkts {'1.1':'13', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ EMAIL_ADDRESS = 2, } @@ -414,11 +404,12 @@ declare namespace pasteboard { * @since 7 */ /** - * Paste data property. + * Defines the properties of all data records on the pasteboard, including the timestamp, data type, pasteable range, + * and additional data. The defined properties can be applied to the pasteboard only with the setProperty method. * @interface PasteDataProperty * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface PasteDataProperty { @@ -465,7 +456,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ tag: string; @@ -478,14 +469,14 @@ declare namespace pasteboard { */ /** * a timestamp, which indicates when data is written to the system pasteboard. - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - readonly timestamp: number; + readonly timestamp: long; /** * Checks whether PasteData is set for local access only. * @type { boolean } @@ -513,7 +504,7 @@ declare namespace pasteboard { * @type { ShareOption } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ shareOption: ShareOption; @@ -530,7 +521,7 @@ declare namespace pasteboard { * @interface PasteDataRecord * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface PasteDataRecord { @@ -573,7 +564,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ mimeType: string; @@ -588,7 +579,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ plainText: string; @@ -603,7 +594,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ uri: string; @@ -618,7 +609,8 @@ declare namespace pasteboard { * @type { image.PixelMap } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pixelMap: image.PixelMap; /** @@ -670,7 +662,8 @@ declare namespace pasteboard { * @returns { string } the string returned by the function. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ toPlainText(): string; @@ -706,7 +699,8 @@ declare namespace pasteboard { * 2. Incorrect parameters types; * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getData(type: string): Promise; } @@ -722,7 +716,7 @@ declare namespace pasteboard { * @interface PasteData * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface PasteData { @@ -757,7 +751,7 @@ declare namespace pasteboard { * @param { PasteDataRecord } record - The content of a new record. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ addRecord(record: PasteDataRecord): void; @@ -812,7 +806,7 @@ declare namespace pasteboard { * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ addRecord(mimeType: string, value: ValueType): void; @@ -828,7 +822,8 @@ declare namespace pasteboard { * @returns { Array } type of array * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getMimeTypes(): Array; @@ -843,7 +838,8 @@ declare namespace pasteboard { * @returns { string } type of htmltext * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryHtml(): string; @@ -858,7 +854,8 @@ declare namespace pasteboard { * @returns { Want } type of want * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryWant(): Want; @@ -873,7 +870,8 @@ declare namespace pasteboard { * @returns { string } type of mimetype * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryMimeType(): string; @@ -888,7 +886,8 @@ declare namespace pasteboard { * @returns { string } type of text * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryText(): string; @@ -903,7 +902,8 @@ declare namespace pasteboard { * @returns { string } type of uri * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryUri(): string; @@ -933,7 +933,7 @@ declare namespace pasteboard { * @returns { PasteDataProperty } PasteDataProperty type of PasteDataProperty * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ getProperty(): PasteDataProperty; @@ -953,7 +953,7 @@ declare namespace pasteboard { * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ setProperty(property: PasteDataProperty): void; @@ -983,17 +983,17 @@ declare namespace pasteboard { */ /** * Gets record by index in PasteData. - * @param { number } index - indicates the record index in PasteData. + * @param { int } index - indicates the record index in PasteData. * @returns { PasteDataRecord } the record in PasteData with index. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. * @throws { BusinessError } 12900001 - The index is out of the record. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - getRecord(index: number): PasteDataRecord; + getRecord(index: int): PasteDataRecord; /** * the number of records in a PasteData object. @@ -1003,13 +1003,13 @@ declare namespace pasteboard { */ /** * the number of records in a PasteData object. - * @returns { number } The number of the clipboard contents + * @returns { int } The number of the clipboard contents * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - getRecordCount(): number; + getRecordCount(): int; /** * the user-defined tag of a PasteData object. @@ -1022,7 +1022,8 @@ declare namespace pasteboard { * @returns { string } type of tag * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTag(): string; @@ -1097,7 +1098,7 @@ declare namespace pasteboard { /** * Replaces a specified record with a new one. * @param { number } index - indicates the record index in PasteData. - * @param { PasteDataRecord } record - the content of a new record. + * @param { PasteDataRecord } record - the content of the replaced record. * @returns { boolean } The query returns True on success, or False on failure. * @syscap SystemCapability.MiscServices.Pasteboard * @since 7 @@ -1119,7 +1120,7 @@ declare namespace pasteboard { /** * Replaces a specified record with a new one. * @param { number } index - indicates the record index in PasteData. - * @param { PasteDataRecord } record - the content of a new record. + * @param { PasteDataRecord } record - the content of the replaced record. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. * @throws { BusinessError } 12900001 - The index is out of the record. @@ -1149,16 +1150,14 @@ declare namespace pasteboard { * @enum { number } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ enum FileConflictOptions { /** * OVERWRITE overwrite when destUri has file with same name. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ OVERWRITE, @@ -1166,8 +1165,7 @@ declare namespace pasteboard { * SKIP skip when destUri has file with same name. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ SKIP } @@ -1177,16 +1175,14 @@ declare namespace pasteboard { * @enum { number } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ enum ProgressIndicator { /** * NONE getting data without system default progress indicator. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ NONE, @@ -1194,8 +1190,7 @@ declare namespace pasteboard { * DEFALUT getting data with system default progress indicator. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ DEFAULT } @@ -1205,8 +1200,7 @@ declare namespace pasteboard { * @interface ProgressInfo * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface ProgressInfo { /** @@ -1214,8 +1208,7 @@ declare namespace pasteboard { * @type { number } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ progress: number; } @@ -1225,8 +1218,7 @@ declare namespace pasteboard { * @typedef { function } ProgressListener * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ type ProgressListener = (progress: ProgressInfo) => void; @@ -1235,16 +1227,14 @@ declare namespace pasteboard { * @class ProgressSignal * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ export class ProgressSignal { /** * Cancel the paste in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ cancel(): void; } @@ -1254,8 +1244,7 @@ declare namespace pasteboard { * @interface GetDataParams * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface GetDataParams { /** @@ -1264,8 +1253,7 @@ declare namespace pasteboard { * @default - * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ destUri?: string; @@ -1275,8 +1263,7 @@ declare namespace pasteboard { * @default FileConflictOptions.OVERWRITE * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ fileConflictOptions?: FileConflictOptions; @@ -1285,8 +1272,7 @@ declare namespace pasteboard { * @type { ProgressIndicator } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ progressIndicator: ProgressIndicator; @@ -1296,8 +1282,7 @@ declare namespace pasteboard { * @default - * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ progressListener?: ProgressListener; @@ -1307,8 +1292,7 @@ declare namespace pasteboard { * @default - * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ progressSignal?: ProgressSignal; } @@ -1324,7 +1308,7 @@ declare namespace pasteboard { * @interface SystemPasteboard * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface SystemPasteboard { @@ -1335,7 +1319,8 @@ declare namespace pasteboard { * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'update', callback: () => void): void; @@ -1347,14 +1332,15 @@ declare namespace pasteboard { * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'update', callback?: () => void): void; /** * Checks whether the data is remote. * @returns { boolean } True is remote data, else false. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 11 @@ -1362,12 +1348,12 @@ declare namespace pasteboard { isRemoteData(): boolean; /** - * Gets source of data. - * @returns { string } data source. - * @throws { BusinessError } 12900005 - Request timed out. + * Obtains the application bundle name of the data source. + * @returns { string } Application bundle name of the data source. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ getDataSource(): string; @@ -1378,10 +1364,10 @@ declare namespace pasteboard { * @returns { boolean } if having mimeType in PasteData returns true, else returns false. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ hasDataType(mimeType: string): boolean; @@ -1423,7 +1409,7 @@ declare namespace pasteboard { * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ clearData(callback: AsyncCallback): void; @@ -1439,17 +1425,18 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the clearData. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ clearData(): Promise; /** * Clears the pasteboard. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clearDataSync(): void; @@ -1480,7 +1467,7 @@ declare namespace pasteboard { * @param { AsyncCallback } callback - the callback of getData. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @since 9 */ @@ -1489,7 +1476,7 @@ declare namespace pasteboard { * @param { AsyncCallback } callback - the callback of getData. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 11 @@ -1502,24 +1489,25 @@ declare namespace pasteboard { * permission required to call the API. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getData(callback: AsyncCallback): void; /** * Gets pastedata from the system pasteboard. * @returns { Promise } the promise returned by the getData. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @since 9 */ /** * Gets pastedata from the system pasteboard. * @returns { Promise } the promise returned by the getData. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 11 @@ -1530,17 +1518,18 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the getData. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the * permission required to call the API. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getData(): Promise; /** * Gets pasteData from the system pasteboard. * @returns { PasteData } a new PasteData. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 11 @@ -1551,10 +1540,10 @@ declare namespace pasteboard { * @returns { PasteData } a new PasteData. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the * permission required to call the API. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ getDataSync(): PasteData; @@ -1596,7 +1585,8 @@ declare namespace pasteboard { * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hasData(callback: AsyncCallback): void; @@ -1611,17 +1601,19 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the function. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hasData(): Promise; /** * Checks whether there is content in the system pasteboard. * @returns { boolean } True exists, false does not exist. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hasDataSync(): boolean; @@ -1655,8 +1647,8 @@ declare namespace pasteboard { * @param { AsyncCallback } callback - the callback of setData. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. - * @throws { BusinessError } 12900004 - Replication is prohibited. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787278 - Replication is prohibited. * @syscap SystemCapability.MiscServices.Pasteboard * @since 9 */ @@ -1666,11 +1658,11 @@ declare namespace pasteboard { * @param { AsyncCallback } callback - the callback of setData. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. - * @throws { BusinessError } 12900004 - Replication is prohibited. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787278 - Replication is prohibited. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ setData(data: PasteData, callback: AsyncCallback): void; @@ -1681,8 +1673,8 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. - * @throws { BusinessError } 12900004 - Replication is prohibited. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787278 - Replication is prohibited. * @syscap SystemCapability.MiscServices.Pasteboard * @since 9 */ @@ -1692,11 +1684,11 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. - * @throws { BusinessError } 12900004 - Replication is prohibited. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787278 - Replication is prohibited. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ setData(data: PasteData): Promise; @@ -1706,7 +1698,7 @@ declare namespace pasteboard { * @param { PasteData } data - PasteData will be written to the clipboard. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 11 @@ -1719,7 +1711,7 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the getData. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the * permission required to call the API. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 12 @@ -1732,7 +1724,7 @@ declare namespace pasteboard { * @returns { unifiedDataChannel.UnifiedData } a new UnifiedData. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the * permission required to call the API. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 12 @@ -1745,8 +1737,8 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. - * @throws { BusinessError } 12900004 - Replication is prohibited. + * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. + * @throws { BusinessError } 27787278 - Replication is prohibited. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 12 @@ -1758,7 +1750,7 @@ declare namespace pasteboard { * @param { unifiedDataChannel.UnifiedData } data - Unified data will be written to the pasteboard. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. - * @throws { BusinessError } 12900005 - Request timed out. + * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 12 @@ -1832,7 +1824,8 @@ declare namespace pasteboard { * @returns { Promise> } Promise used to return the MIME types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getMimeTypes(): Promise>; @@ -1856,10 +1849,10 @@ declare namespace pasteboard { * permission required to call the API. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 12900003 - Another copy or paste operation is in progress. - * @throws { BusinessError } 12900007 - Copy file failed. + * @throws { BusinessError } 12900007 - Invalid destUri or file system error. * @throws { BusinessError } 12900008 - Failed to start progress. * @throws { BusinessError } 12900009 - Progress exits abnormally. - * @throws { BusinessError } 12900010 - Get pasteData error. + * @throws { BusinessError } 12900010 - System error occurred during paste execution. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice * @since 15 -- Gitee