From 7c40f84a19bcce3324a56ef4f0da229324d6c9c0 Mon Sep 17 00:00:00 2001 From: duanweiling Date: Thu, 7 Apr 2022 17:26:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=A0=E6=8E=89systemapi=E7=9A=84?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3=EF=BC=8C=E5=8F=96=E6=B6=88=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: duanweiling --- api/@ohos.data.dataShare.d.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/api/@ohos.data.dataShare.d.ts b/api/@ohos.data.dataShare.d.ts index ee6279552e..ceec386a3c 100644 --- a/api/@ohos.data.dataShare.d.ts +++ b/api/@ohos.data.dataShare.d.ts @@ -29,7 +29,6 @@ declare namespace dataShare { * @param want Indicates The element parameter of the service ability. * @param uri Indicates the path of the file to open. * @return Returns the dataShareHelper. - * @systemapi Hide this for inner system use. */ function createDataShareHelper(context: Context, want: Want, uri: string): DataShareHelper; @@ -37,7 +36,6 @@ declare namespace dataShare { * DataShareHelper * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer - * @systemapi Hide this for inner system use. */ interface DataShareHelper { /** @@ -48,7 +46,6 @@ declare namespace dataShare { * @param uri Indicates the path of the data to operate. * @param callback Indicates the callback when dataChange. * @return - - * @systemapi Hide this for inner system use. */ on(type: 'dataChange', uri: string, callback: AsyncCallback): void; @@ -60,7 +57,6 @@ declare namespace dataShare { * @param uri Indicates the path of the data to operate. * @param callback Indicates the registered callback. * @return - - * @systemapi Hide this for inner system use. */ off(type: 'dataChange', uri: string, callback?: AsyncCallback): void; @@ -71,7 +67,6 @@ declare namespace dataShare { * @param uri Indicates the path of the data to operate. * @param value Indicates the data record to insert. If this parameter is null, a blank row will be inserted. * @return Returns the index of the inserted data record. - * @systemapi Hide this for inner system use. */ insert(uri: string, value: rdb.ValuesBucket, callback: AsyncCallback): void; insert(uri: string, value: rdb.ValuesBucket): Promise; @@ -83,7 +78,6 @@ declare namespace dataShare { * @param uri Indicates the path of the data to operate. * @param predicates Indicates filter criteria. You should define the processing logic when this parameter is null. * @return Returns the number of data records deleted. - * @systemapi Hide this for inner system use. */ delete(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; delete(uri: string, predicates: dataAbility.DataAbilityPredicates): Promise; @@ -97,7 +91,6 @@ declare namespace dataShare { * @param columns Indicates the columns to query. If this parameter is null, all columns are queried. * @param predicates Indicates filter criteria. You should define the processing logic when this parameter is null. * @return Returns the query result. - * @systemapi Hide this for inner system use. */ query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): Promise; @@ -110,7 +103,6 @@ declare namespace dataShare { * @param value Indicates the data to update. This parameter can be null. * @param predicates Indicates filter criteria. You should define the processing logic when this parameter is null. * @return Returns the number of data records updated. - * @systemapi Hide this for inner system use. */ update(uri: string, value: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; update(uri: string, value: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): Promise; @@ -123,7 +115,6 @@ declare namespace dataShare { * @param uri Indicates the path of the data to operate. * @param values Indicates the data records to insert. * @return Returns the number of data records inserted. - * @systemapi Hide this for inner system use. */ batchInsert(uri: string, values: Array, callback: AsyncCallback): void; batchInsert(uri: string, values: Array): Promise; @@ -134,7 +125,6 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @param uri Indicates the path of the data to operate. * @return Returns the MIME type that matches the data specified by uri. - * @systemapi Hide this for inner system use. */ getType(uri: string, callback: AsyncCallback): void; getType(uri: string): Promise; @@ -149,7 +139,6 @@ declare namespace dataShare { *

2. "image/*": Obtains files whose main type is image of any subtype. *

3. "*/jpg": Obtains files whose subtype is JPG of any main type. * @return Returns the matched MIME types. If there is no match, {@code null} is returned. - * @systemapi Hide this for inner system use. */ getFileTypes(uri: string, mimeTypeFilter:string, callback: AsyncCallback>): void; getFileTypes(uri: string, mimeTypeFilter: string): Promise>; @@ -168,7 +157,6 @@ declare namespace dataShare { * @throws DataShareRemoteException Throws this exception if the remote process exits. * @throws NullPointerException Throws this exception if {@code uri} is null. * @see #denormalizeUri - * @systemapi Hide this for inner system use. */ normalizeUri(uri: string, callback: AsyncCallback): void; normalizeUri(uri: string): Promise; @@ -184,7 +172,6 @@ declare namespace dataShare { * @throws DataShareRemoteException Throws this exception if the remote process exits. * @throws NullPointerException Throws this exception if {@code uri} is null. * @see #normalizeUri - * @systemapi Hide this for inner system use. */ denormalizeUri(uri: string, callback: AsyncCallback): void; denormalizeUri(uri: string): Promise; @@ -195,7 +182,6 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @param uri Indicates the {@link ohos.utils.net.Uri} object to notifyChange. * @return - - * @systemapi Hide this for inner system use. */ notifyChange(uri: string, callback: AsyncCallback): void; notifyChange(uri: string): Promise; -- Gitee From a29f607f87a439a29c13dd5eac7e4067cf510e1b Mon Sep 17 00:00:00 2001 From: duanweiling Date: Fri, 8 Apr 2022 14:13:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0openFile=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=92=8CStageModelOnly=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: duanweiling --- ...application.DataShareExtensionAbility.d.ts | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/api/@ohos.application.DataShareExtensionAbility.d.ts b/api/@ohos.application.DataShareExtensionAbility.d.ts index 495ac85091..26dc1a5d7e 100644 --- a/api/@ohos.application.DataShareExtensionAbility.d.ts +++ b/api/@ohos.application.DataShareExtensionAbility.d.ts @@ -25,15 +25,32 @@ import rdb from './@ohos.data.rdb'; * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider - * @systemapi Hide this for inner system use. + * @StageModelOnly. */ export default class DataShareExtensionAbility { + /** + * Opens a file in a specified remote path. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @param uri Indicates the path of the file to open. + * @param mode Indicates the file open mode, which can be "r" for read-only access, "w" for write-only access + * (erasing whatever data is currently in the file), "wt" for write access that truncates any existing + * file, "wa" for write-only access to append to any existing data, "rw" for read and write access on + * any existing data, or "rwt" for read and write access that truncates any existing file. + * @param callback Indicates the callback when openfile success + * @return Returns the file descriptor. + * @StageModelOnly. + */ + openFile(uri: string, mode: string, callback: AsyncCallback): void; + openFile(uri: string, mode: string): Promise; + /** * Indicates datashare extension ability context. * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider - * @systemapi Hide this for inner system use. + * @StageModelOnly. */ context?: ExtensionContext; @@ -43,7 +60,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param want Indicates connection information about the datashare extension ability. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return - */ onCreate?(want: Want): void; @@ -59,7 +76,7 @@ export default class DataShareExtensionAbility { *

1. "*/*": Obtains all types supported by a data share. *

2. "image/*": Obtains files whose main type is image of any subtype. *

3. "*/jpg": Obtains files whose subtype is JPG of any main type. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the MIME type of the matched files; returns null if there is no type that matches the Data */ getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback>): void; @@ -71,7 +88,7 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the position where the data is to insert. * @param valueBucket Indicates the data to insert. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the index of the newly inserted data record. */ insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback): void; @@ -85,7 +102,7 @@ export default class DataShareExtensionAbility { * @param valueBucket Indicates the data to update. This parameter can be null. * @param predicates Indicates filter criteria. If this parameter is null, all data records will be updated by * default. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the number of data records updated. */ update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, @@ -99,7 +116,7 @@ export default class DataShareExtensionAbility { * @param uri Indicates the database table storing the data to delete. * @param predicates Indicates filter criteria. If this parameter is null, all data records will be deleted by * default. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the number of data records deleted. */ delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; @@ -114,7 +131,7 @@ export default class DataShareExtensionAbility { * the processing logic when this parameter is null. * @param predicates Indicates filter criteria. If this parameter is null, all data records will be queried by * default. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the queried data. */ query?(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates, @@ -129,7 +146,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the uri of the data. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the MIME type that matches the data specified by {@code uri}. */ getType?(uri: string, callback: AsyncCallback): void; @@ -141,7 +158,7 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the position where the data is to insert. * @param valueBuckets Indicates the data to insert. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the number of data records inserted. */ batchInsert?(uri: string, valueBuckets: Array, callback: AsyncCallback): void; @@ -154,7 +171,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the uri to normalize. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the normalized uri if the data share supports URI normalization; */ normalizeUri?(uri: string, callback: AsyncCallback): void; @@ -166,7 +183,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the uri to denormalize. - * @systemapi Hide this for inner system use. + * @StageModelOnly. * @return Returns the denormalized {@code uri} object if the denormalization is successful; returns the original * {@code uri} passed to this method if there is nothing to do; returns {@code null} if the data identified by * the original {@code uri} cannot be found in the current environment. -- Gitee From 06c9d1f0e4464ec0bc5f58792dd563ef2724a87c Mon Sep 17 00:00:00 2001 From: duanweiling Date: Fri, 8 Apr 2022 14:29:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0openFile=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=92=8CStageModelOnly=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: duanweiling --- api/@ohos.application.DataShareExtensionAbility.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/@ohos.application.DataShareExtensionAbility.d.ts b/api/@ohos.application.DataShareExtensionAbility.d.ts index 26dc1a5d7e..9483c3e4b2 100644 --- a/api/@ohos.application.DataShareExtensionAbility.d.ts +++ b/api/@ohos.application.DataShareExtensionAbility.d.ts @@ -40,6 +40,7 @@ export default class DataShareExtensionAbility { * any existing data, or "rwt" for read and write access that truncates any existing file. * @param callback Indicates the callback when openfile success * @return Returns the file descriptor. + * @systemapi Hide this for inner system use. * @StageModelOnly. */ openFile(uri: string, mode: string, callback: AsyncCallback): void; @@ -50,6 +51,7 @@ export default class DataShareExtensionAbility { * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi Hide this for inner system use. * @StageModelOnly. */ context?: ExtensionContext; @@ -60,6 +62,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param want Indicates connection information about the datashare extension ability. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return - */ @@ -76,6 +79,7 @@ export default class DataShareExtensionAbility { *

1. "*/*": Obtains all types supported by a data share. *

2. "image/*": Obtains files whose main type is image of any subtype. *

3. "*/jpg": Obtains files whose subtype is JPG of any main type. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the MIME type of the matched files; returns null if there is no type that matches the Data */ @@ -88,6 +92,7 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the position where the data is to insert. * @param valueBucket Indicates the data to insert. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the index of the newly inserted data record. */ @@ -102,6 +107,7 @@ export default class DataShareExtensionAbility { * @param valueBucket Indicates the data to update. This parameter can be null. * @param predicates Indicates filter criteria. If this parameter is null, all data records will be updated by * default. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the number of data records updated. */ @@ -116,6 +122,7 @@ export default class DataShareExtensionAbility { * @param uri Indicates the database table storing the data to delete. * @param predicates Indicates filter criteria. If this parameter is null, all data records will be deleted by * default. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the number of data records deleted. */ @@ -131,6 +138,7 @@ export default class DataShareExtensionAbility { * the processing logic when this parameter is null. * @param predicates Indicates filter criteria. If this parameter is null, all data records will be queried by * default. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the queried data. */ @@ -146,6 +154,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the uri of the data. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the MIME type that matches the data specified by {@code uri}. */ @@ -158,6 +167,7 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the position where the data is to insert. * @param valueBuckets Indicates the data to insert. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the number of data records inserted. */ @@ -171,6 +181,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the uri to normalize. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the normalized uri if the data share supports URI normalization; */ @@ -183,6 +194,7 @@ export default class DataShareExtensionAbility { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @param uri Indicates the uri to denormalize. + * @systemapi Hide this for inner system use. * @StageModelOnly. * @return Returns the denormalized {@code uri} object if the denormalization is successful; returns the original * {@code uri} passed to this method if there is nothing to do; returns {@code null} if the data identified by -- Gitee