From f4340d7bf9331f78cb1ef1548fa37c3396034b00 Mon Sep 17 00:00:00 2001 From: jsj Date: Mon, 7 Feb 2022 11:10:24 +0000 Subject: [PATCH] IssueNo:#I4SQCF Description: api add tags Sig:SIG_ApplicationFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: jsj Change-Id: I6dbcbf3d8717e8e609e58152641419f6437e847b --- api/@internal/ets/lifecycle.d.ts | 46 +++++++++++ api/@ohos.ability.featureAbility.d.ts | 12 +++ api/@ohos.ability.particleAbility.d.ts | 4 + api/@ohos.application.Ability.d.ts | 45 +++++++---- api/@ohos.application.AbilityStage.d.ts | 9 ++- api/@ohos.application.FormExtension.d.ts | 24 ++++-- api/@ohos.application.ServiceExtension.d.ts | 24 ++++-- api/@ohos.application.StartOptions.d.ts | 6 +- api/ability/dataAbilityHelper.d.ts | 14 ++++ api/ability/dataAbilityOperation.d.ts | 8 ++ api/ability/dataAbilityResult.d.ts | 2 + api/ability/startAbilityParameter.d.ts | 2 + api/app/context.d.ts | 16 ++++ api/application/AbilityContext.d.ts | 42 ++++++---- api/application/ApplicationStateObserver.d.ts | 2 +- api/application/Context.d.ts | 39 ++++++---- api/application/EventHub.d.ts | 76 ++++++++++--------- api/application/ExtensionContext.d.ts | 6 +- api/application/FormExtensionContext.d.ts | 6 +- api/application/PermissionRequestResult.d.ts | 9 ++- api/application/ServiceExtensionContext.d.ts | 21 +++-- 21 files changed, 299 insertions(+), 114 deletions(-) diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index a96e080645..6aa70affb5 100644 --- a/api/@internal/ets/lifecycle.d.ts +++ b/api/@internal/ets/lifecycle.d.ts @@ -33,6 +33,7 @@ import { PacMap } from "../ability/dataAbilityHelper"; * @since 7 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car + * @FAModelOnly */ export declare interface LifecycleForm { /** @@ -48,6 +49,7 @@ export declare interface LifecycleForm { * respectively. Such form information must be managed as persistent data for further form * acquisition, update, and deletion. * @return Returns the created {@link formBindingData#FormBindingData} object. + * @FAModelOnly */ onCreate?(want: Want): formBindingData.FormBindingData; @@ -59,6 +61,7 @@ export declare interface LifecycleForm { * @sysCap AAFwk * @param formId Indicates the ID of the form. * @return - + * @FAModelOnly */ onCastTempToNormal?(formId: string): void; @@ -70,6 +73,7 @@ export declare interface LifecycleForm { * @sysCap AAFwk * @param formId Indicates the ID of the form to update. * @return - + * @FAModelOnly */ onUpdate?(formId: string): void; @@ -85,6 +89,7 @@ export declare interface LifecycleForm { * means that the form becomes visible, and {@link formManager#VisibilityType#FORM_INVISIBLE} * means that the form becomes invisible. * @return - + * @FAModelOnly */ onVisibilityChanged?(newStatus: { [key: string]: number }): void; @@ -100,6 +105,7 @@ export declare interface LifecycleForm { * @param message Indicates the value of the {@code params} field of the message event. This parameter is * used to identify the specific component on which the event is triggered. * @return - + * @FAModelOnly */ onTriggerEvent?(formId: string, message: string): void; @@ -112,6 +118,7 @@ export declare interface LifecycleForm { * @sysCap AAFwk * @param formId Indicates the ID of the deleted form. * @return - + * @FAModelOnly */ onDelete?(formId: string): void; @@ -127,6 +134,7 @@ export declare interface LifecycleForm { * @param want Indicates the description of the form for which the {@link formManager#FormState} is obtained. * The description covers the bundle name, ability name, module name, form name, and form dimensions. * @return Returns the {@link formManager#FormState} object. + * @FAModelOnly */ onAcquireFormState?(want: Want): formManager.FormState; } @@ -138,6 +146,7 @@ export declare interface LifecycleForm { * @since 7 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car + * @FAModelOnly */ export declare interface LifecycleApp { /** @@ -147,6 +156,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onShow?(): void; @@ -157,6 +167,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onHide?(): void; @@ -167,6 +178,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onDestroy?(): void; @@ -177,6 +189,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onCreate?(): void; @@ -192,6 +205,7 @@ export declare interface LifecycleApp { * @param newConfig Indicates the new configuration information about this Page ability. * @return - * @systemapi hide for inner use. + * @FAModelOnly */ onWindowDisplayModeChanged?(isShownInMultiWindow: boolean, newConfig: resourceManager.Configuration): void; @@ -202,6 +216,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return Returns {@code true} if the user allows the migration; returns {@code false} otherwise. + * @FAModelOnly */ onStartContinuation?(): boolean; @@ -215,6 +230,7 @@ export declare interface LifecycleApp { * @sysCap AAFwk * @param data Indicates the user data to save. * @return Returns {@code true} if the data is successfully saved; returns {@code false} otherwise. + * @FAModelOnly */ onSaveData?(data: Object): boolean; @@ -230,6 +246,7 @@ export declare interface LifecycleApp { * @param result Indicates the migration result code. The value {@code 0} indicates that the migration is * successful, and {@code -1} indicates that the migration fails. * @return - + * @FAModelOnly */ onCompleteContinuation?(result: number): void; @@ -243,6 +260,7 @@ export declare interface LifecycleApp { * @sysCap AAFwk * @param data Indicates the user data to restore. * @return - + * @FAModelOnly */ onRestoreData?(data: Object): void; @@ -254,6 +272,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onRemoteTerminated?(): void; @@ -268,6 +287,7 @@ export declare interface LifecycleApp { * @param outState Indicates the {@code PacMap} object used for storing user data and states. This * parameter cannot be null. * @return - + * @FAModelOnly */ onSaveAbilityState?(outState: PacMap): void; @@ -282,6 +302,7 @@ export declare interface LifecycleApp { * @param inState Indicates the {@code PacMap} object used for storing data and states. This * parameter can not be null. * @return - + * @FAModelOnly */ onRestoreAbilityState?(inState: PacMap): void; @@ -293,6 +314,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onInactive?(): void; @@ -303,6 +325,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onActive?(): void; @@ -314,6 +337,7 @@ export declare interface LifecycleApp { * @sysCap AAFwk * @param want Indicates the new {@code want} containing information about the ability. * @return - + * @FAModelOnly */ onNewWant?(want: Want): void; @@ -326,6 +350,7 @@ export declare interface LifecycleApp { * @sysCap AAFwk * @param level Indicates the memory trim level, which shows the current memory usage status. * @return - + * @FAModelOnly */ onMemoryLevel?(level: number): void; } @@ -337,6 +362,7 @@ export declare interface LifecycleApp { * @since 7 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car + * @FAModelOnly */ export declare interface LifecycleService { /** @@ -347,6 +373,7 @@ export declare interface LifecycleService { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onStart?(): void; @@ -361,6 +388,7 @@ export declare interface LifecycleService { * incremented by 1 every time the ability is started. For example, if the ability has been started * for six times. * @return - + * @FAModelOnly */ onCommand?(want: Want, startId: number): void; @@ -371,6 +399,7 @@ export declare interface LifecycleService { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ onStop?(): void; @@ -382,6 +411,7 @@ export declare interface LifecycleService { * @sysCap AAFwk * @param want Indicates connection information about the Service ability. * @return Returns the proxy of the Service ability. + * @FAModelOnly */ onConnect?(want: Want): rpc.RemoteObject; @@ -393,6 +423,7 @@ export declare interface LifecycleService { * @sysCap AAFwk * @param want Indicates disconnection information about the Service ability. * @return - + * @FAModelOnly */ onDisconnect?(want: Want): void; @@ -408,6 +439,7 @@ export declare interface LifecycleService { * @sysCap AAFwk * @param want Indicates the want of the Service ability being connected. * @return - + * @FAModelOnly */ onReconnect?(want: Want): void; } @@ -419,6 +451,7 @@ export declare interface LifecycleService { * @since 7 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car + * @FAModelOnly */ export declare interface LifecycleData { /** @@ -433,6 +466,7 @@ export declare interface LifecycleData { * default. * @return Returns the number of data records updated. * @return - + * @FAModelOnly */ async update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): number; @@ -448,6 +482,7 @@ export declare interface LifecycleData { * @param predicates Indicates filter criteria. If this parameter is null, all data records will be queried by * default. * @return Returns the queried data. + * @FAModelOnly */ async query?(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): ResultSet; @@ -461,6 +496,7 @@ export declare interface LifecycleData { * @param predicates Indicates filter criteria. If this parameter is null, all data records will be deleted by * default. * @return Returns the number of data records deleted. + * @FAModelOnly */ async delete?(uri: string, predicates: dataAbility.DataAbilityPredicates): number; @@ -472,6 +508,7 @@ export declare interface LifecycleData { * @sysCap AAFwk * @param ops Indicates the data operation list, which can contain multiple operations on the database. * @return Returns the result of each operation, in array. + * @FAModelOnly */ async executeBatch?(ops: Array): Array; @@ -485,6 +522,7 @@ export declare interface LifecycleData { * @sysCap AAFwk * @param uri Indicates the uri to normalize. * @return Returns the normalized uri if the Data ability supports URI normalization; + * @FAModelOnly */ normalizeUri?(uri: string): string; @@ -497,6 +535,7 @@ export declare interface LifecycleData { * @param uri Indicates the position where the data is to insert. * @param valueBuckets Indicates the data to insert. * @return Returns the number of data records inserted. + * @FAModelOnly */ async batchInsert?(uri: string, valueBuckets: Array): number; @@ -511,6 +550,7 @@ export declare interface LifecycleData { * @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. + * @FAModelOnly */ denormalizeUri?(uri: string): string; @@ -523,6 +563,7 @@ export declare interface LifecycleData { * @param uri Indicates the position where the data is to insert. * @param valueBucket Indicates the data to insert. * @return Returns the index of the newly inserted data record. + * @FAModelOnly */ async insert?(uri: string, valueBucket: rdb.ValuesBucket): number; @@ -538,6 +579,7 @@ export declare interface LifecycleData { * "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. * @return Returns the file descriptor. + * @FAModelOnly */ async openFile?(uri: string, mode: string): number; @@ -554,6 +596,7 @@ export declare interface LifecycleData { *

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 MIME type of the matched files; returns null if there is no type that matches the Data + * @FAModelOnly */ getFileTypes?(uri: string, mimeTypeFilter: string): Array; @@ -567,6 +610,7 @@ export declare interface LifecycleData { * @param arg Indicates the parameter transferred by the method. * @param extras Indicates the parameter transferred by the method. * @return Returns the result of the method. + * @FAModelOnly */ async call?(method: string, arg: string, extras: PacMap): PacMap; @@ -578,6 +622,7 @@ export declare interface LifecycleData { * @sysCap AAFwk * @param info Indicates the {@code AbilityInfo} object containing information about this ability. * @return - + * @FAModelOnly */ onInitialized?(info: AbilityInfo): void; @@ -592,6 +637,7 @@ export declare interface LifecycleData { * @sysCap AAFwk * @param uri Indicates the uri of the data. * @return Returns the MIME type that matches the data specified by {@code uri}. + * @FAModelOnly */ getType?(uri: string): string; } diff --git a/api/@ohos.ability.featureAbility.d.ts b/api/@ohos.ability.featureAbility.d.ts index 5ca62026d8..2b085c5781 100644 --- a/api/@ohos.ability.featureAbility.d.ts +++ b/api/@ohos.ability.featureAbility.d.ts @@ -28,6 +28,7 @@ import { ContinueAbilityOptions } from './ability/continueAbilityOptions'; * @sysCap AAFwk * @devices phone, tablet * @permission N/A + * @FAModelOnly */ declare namespace featureAbility { /** @@ -38,6 +39,7 @@ declare namespace featureAbility { * @sysCap AAFwk * @param parameter Indicates the ability to start. * @return - + * @FAModelOnly */ function getWant(callback: AsyncCallback): void; function getWant(): Promise; @@ -50,6 +52,7 @@ declare namespace featureAbility { * @sysCap AAFwk * @param parameter Indicates the ability to start. * @return - + * @FAModelOnly */ function startAbility(parameter: StartAbilityParameter, callback: AsyncCallback): void; function startAbility(parameter: StartAbilityParameter): Promise; @@ -59,6 +62,7 @@ declare namespace featureAbility { * * @return Returns the application context. * @since 6 + * @FAModelOnly */ function getContext(): Context; @@ -70,6 +74,7 @@ declare namespace featureAbility { * @sysCap AAFwk * @param parameter Indicates the ability to start. * @return Returns the {@link AbilityResult}. + * @FAModelOnly */ function startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback): void; function startAbilityForResult(parameter: StartAbilityParameter): Promise; @@ -83,6 +88,7 @@ declare namespace featureAbility { * @sysCap AAFwk * @param parameter Indicates the result to return. * @return - + * @FAModelOnly */ function terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback): void; function terminateSelfWithResult(parameter: AbilityResult): Promise; @@ -94,6 +100,7 @@ declare namespace featureAbility { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ function terminateSelf(callback: AsyncCallback): void; function terminateSelf(): Promise; @@ -106,6 +113,7 @@ declare namespace featureAbility { * @sysCap AAFwk * @param uri Indicates the path of the file to open. * @return Returns the dataAbilityHelper. + * @FAModelOnly */ function acquireDataAbilityHelper(uri: string): DataAbilityHelper; @@ -116,6 +124,7 @@ declare namespace featureAbility { * @since 7 * @sysCap AAFwk * @return Returns {@code true} if this ability currently has window focus; returns {@code false} otherwise. + * @FAModelOnly */ function hasWindowFocus(callback: AsyncCallback): void; function hasWindowFocus(): Promise; @@ -129,6 +138,7 @@ declare namespace featureAbility { * @param request The element name of the service ability * @param options The remote object instance * @return Returns the number code of the ability connected + * @FAModelOnly */ function connectAbility(request: Want, options:ConnectOptions ): number; @@ -139,6 +149,7 @@ declare namespace featureAbility { * @since 7 * @SysCap aafwk * @param connection The number code of the ability connected + * @FAModelOnly */ function disconnectAbility(connection: number, callback:AsyncCallback): void; function disconnectAbility(connection: number): Promise; @@ -150,6 +161,7 @@ declare namespace featureAbility { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ function continueAbility(options: ContinueAbilityOptions, callback: AsyncCallback): void; function continueAbility(options: ContinueAbilityOptions): Promise; diff --git a/api/@ohos.ability.particleAbility.d.ts b/api/@ohos.ability.particleAbility.d.ts index 74ff162975..cc64f223e1 100644 --- a/api/@ohos.ability.particleAbility.d.ts +++ b/api/@ohos.ability.particleAbility.d.ts @@ -24,6 +24,7 @@ import { DataAbilityHelper } from './ability/dataAbilityHelper'; * @sysCap AAFwk * @devices phone, tablet * @permission N/A + * @FAModelOnly */ declare namespace particleAbility { /** @@ -34,6 +35,7 @@ declare namespace particleAbility { * @sysCap AAFwk * @param parameter Indicates the ability to start. * @return - + * @FAModelOnly */ function startAbility(parameter: StartAbilityParameter, callback: AsyncCallback): void; function startAbility(parameter: StartAbilityParameter): Promise; @@ -45,6 +47,7 @@ declare namespace particleAbility { * @since 7 * @sysCap AAFwk * @return - + * @FAModelOnly */ function terminateSelf(callback: AsyncCallback): void; function terminateSelf(): Promise; @@ -57,6 +60,7 @@ declare namespace particleAbility { * @sysCap AAFwk * @param uri Indicates the path of the file to open. * @return Returns the dataAbilityHelper. + * @FAModelOnly */ function acquireDataAbilityHelper(uri: string): DataAbilityHelper; } diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 7395dc55cf..8978d11534 100644 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -20,33 +20,37 @@ import window from './@ohos.window'; /** * The class of an ability. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class Ability { /** * Indicates configuration information about an ability context. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ context: AbilityContext; /** * Indicates ability launch want. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ launchWant: Want; /** * Indicates ability last request want. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ lastRequestWant: Want; @@ -54,9 +58,10 @@ export default class Ability { * Called back when an ability is started for initialization. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ onCreate(want: Want, param: LaunchParam): void; @@ -64,9 +69,10 @@ export default class Ability { * Called back when an ability window stage is created. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ onWindowStageCreate(windowStage: window.WindowStage): void; @@ -74,9 +80,10 @@ export default class Ability { * Called back when an ability window stage is destroyed. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ onWindowStageDestroy(): void; @@ -84,9 +91,10 @@ export default class Ability { * Called back before an ability is destroyed. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ onDestroy(): void; @@ -94,9 +102,10 @@ export default class Ability { * Called back when the state of an ability changes to foreground. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ onForeground(): void; @@ -104,9 +113,10 @@ export default class Ability { * Called back when the state of an ability changes to background. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ onBackground(): void; @@ -114,9 +124,10 @@ export default class Ability { * Called back when an ability prepares to migrate. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return true if ability agrees to migrate and saves data successfully, otherwise false. + * @StageModelOnly */ onContinue(wantParam : {[key: string]: any}): boolean; } @@ -125,16 +136,18 @@ export interface LaunchParam { /** * Indicates launch reason. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ launchReason: LaunchReason; /** * Indicates last exit reason. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ lastExitReason: LastExitReason; } @@ -142,8 +155,9 @@ export interface LaunchParam { /** * Type of launch reason. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ export enum LaunchReason { UNKNOWN = 0, @@ -155,8 +169,9 @@ export enum LaunchReason { /** * Type of last exit reason. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ export enum LastExitReason { UNKNOWN = 0, diff --git a/api/@ohos.application.AbilityStage.d.ts b/api/@ohos.application.AbilityStage.d.ts index c552646d49..6d4c0d63ac 100644 --- a/api/@ohos.application.AbilityStage.d.ts +++ b/api/@ohos.application.AbilityStage.d.ts @@ -18,17 +18,19 @@ import AbilityStageContext from "./application/AbilityStageContext"; /** * The class of an ability stage. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class AbilityStage { /** * Indicates configuration information about context. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ context: AbilityStageContext; @@ -36,9 +38,10 @@ export default class AbilityStage { * Called back when an ability stage is started for initialization. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ onCreate(): void; } \ No newline at end of file diff --git a/api/@ohos.application.FormExtension.d.ts b/api/@ohos.application.FormExtension.d.ts index ea608614d1..4a9912fe8a 100644 --- a/api/@ohos.application.FormExtension.d.ts +++ b/api/@ohos.application.FormExtension.d.ts @@ -20,16 +20,18 @@ import Want from './@ohos.application.Want'; /** * class of form extension. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car + * @StageModelOnly */ export default class FormExtension { /** * Indicates form extension context. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ context: FormExtensionContext; @@ -37,13 +39,14 @@ export default class FormExtension { * Called to return a {@link formBindingData#FormBindingData} object. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want Indicates the detailed information for creating a {@link formBindingData#FormBindingData}. * The {@code Want} object must include the form ID, form name, and grid style of the form. * Such form information must be managed as persistent data for further form * acquisition, update, and deletion. * @return Returns the created {@link formBindingData#FormBindingData} object. + * @StageModelOnly */ onCreate(want: Want): formBindingData.FormBindingData; @@ -51,10 +54,11 @@ export default class FormExtension { * Called when the form provider is notified that a temporary form is successfully converted to a normal form. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param formId Indicates the ID of the form. * @return - + * @StageModelOnly */ onCastToNormal(formId: string): void; @@ -62,10 +66,11 @@ export default class FormExtension { * Called to notify the form provider to update a specified form. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param formId Indicates the ID of the form to update. * @return - + * @StageModelOnly */ onUpdate(formId: string): void; @@ -73,7 +78,7 @@ export default class FormExtension { * Called when the form provider receives form events from the system. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param newStatus Indicates the form events occurred. The key in the {@code Map} object indicates the form ID, * and the value indicates the event type, which can be either {@link formManager#VisibilityType#FORM_VISIBLE} @@ -81,6 +86,7 @@ export default class FormExtension { * means that the form becomes visible, and {@link formManager#VisibilityType#FORM_INVISIBLE} * means that the form becomes invisible. * @return - + * @StageModelOnly */ onVisibilityChange(newStatus: { [key: string]: number }): void; @@ -89,13 +95,14 @@ export default class FormExtension { * JS forms. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param formId Indicates the ID of the form on which the message event is triggered, which is provided by * the client to the form provider. * @param message Indicates the value of the {@code params} field of the message event. This parameter is * used to identify the specific component on which the event is triggered. * @return - + * @StageModelOnly */ onEvent(formId: string, message: string): void; @@ -104,10 +111,11 @@ export default class FormExtension { * you want your application, as the form provider, to be notified of form deletion. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param formId Indicates the ID of the destroyed form. * @return - + * @StageModelOnly */ onDestroy(formId: string): void; } \ No newline at end of file diff --git a/api/@ohos.application.ServiceExtension.d.ts b/api/@ohos.application.ServiceExtension.d.ts index bb4e660bff..87345bf96e 100644 --- a/api/@ohos.application.ServiceExtension.d.ts +++ b/api/@ohos.application.ServiceExtension.d.ts @@ -20,18 +20,20 @@ import Want from './@ohos.application.Want'; /** * class of service extension. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @systemapi hide for inner use. + * @StageModelOnly */ export default class ServiceExtension { /** * Indicates service extension context. * - * @since 8 + * @since 9 * @sysCap AAFwk * @systemapi hide for inner use. + * @StageModelOnly */ context: ServiceExtensionContext; @@ -39,10 +41,11 @@ export default class ServiceExtension { * Called back when a service extension is started for initialization. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @systemapi hide for inner use. * @return - + * @StageModelOnly */ onCreate(want: Want): void; @@ -50,10 +53,11 @@ export default class ServiceExtension { * Called back before a service extension is destroyed. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @systemapi hide for inner use. * @return - + * @StageModelOnly */ onDestroy(): void; @@ -61,7 +65,7 @@ export default class ServiceExtension { * Called back when a service extension is started. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want Indicates the want of service extension to start. * @param startId Indicates the number of times the service extension has been started. The {@code startId} is @@ -69,6 +73,7 @@ export default class ServiceExtension { * has been started for six times. * @systemapi hide for inner use. * @return - + * @StageModelOnly */ onRequest(want: Want, startId: number): void; @@ -76,11 +81,12 @@ export default class ServiceExtension { * Called back when a service extension is first connected to an ability. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want Indicates connection information about the Service ability. * @systemapi hide for inner use. * @return Returns the proxy of the Service ability. + * @StageModelOnly */ onConnect(want: Want): rpc.RemoteObject; @@ -88,11 +94,12 @@ export default class ServiceExtension { * Called back when all abilities connected to a service extension are disconnected. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want Indicates disconnection information about the service extension. * @systemapi hide for inner use. * @return - + * @StageModelOnly */ onDisconnect(want: Want): void; @@ -101,11 +108,12 @@ export default class ServiceExtension { * are disconnected. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want Indicates the want of the service extension being connected. * @systemapi hide for inner use. * @return - + * @StageModelOnly */ onReconnect(want: Want): void; } diff --git a/api/@ohos.application.StartOptions.d.ts b/api/@ohos.application.StartOptions.d.ts index c9678c0e64..41f6bd95d5 100644 --- a/api/@ohos.application.StartOptions.d.ts +++ b/api/@ohos.application.StartOptions.d.ts @@ -17,18 +17,20 @@ * StartOptions is the basic communication component of the system. * * @name StartOptions - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class StartOptions { /** * windowMode * @default - * @devices phone, tablet - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ windowMode?: number; } \ No newline at end of file diff --git a/api/ability/dataAbilityHelper.d.ts b/api/ability/dataAbilityHelper.d.ts index e9c37677bd..73b9b82c25 100644 --- a/api/ability/dataAbilityHelper.d.ts +++ b/api/ability/dataAbilityHelper.d.ts @@ -25,6 +25,7 @@ import rdb from '../@ohos.data.rdb'; * @devices phone, tablet * * @since 7 + * @FAModelOnly */ export interface DataAbilityHelper { /** @@ -40,6 +41,7 @@ export interface DataAbilityHelper { * 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. + * @FAModelOnly */ openFile(uri: string, mode: string, callback: AsyncCallback): void; openFile(uri: string, mode: string): Promise; @@ -54,6 +56,7 @@ export interface DataAbilityHelper { * @param uri Indicates the path of the data to operate. * @param callback Indicates the callback when dataChange. * @return - + * @FAModelOnly */ on(type: 'dataChange', uri: string, callback: AsyncCallback): void; @@ -67,6 +70,7 @@ export interface DataAbilityHelper { * @param uri Indicates the path of the data to operate. * @param callback Indicates the registered callback. * @return - + * @FAModelOnly */ off(type: 'dataChange', uri: string, callback?: AsyncCallback): void; @@ -78,6 +82,7 @@ export interface DataAbilityHelper { * @SysCap AAFwk * @param uri Indicates the path of the data to operate. * @return Returns the MIME type that matches the data specified by uri. + * @FAModelOnly */ getType(uri: string, callback: AsyncCallback): void; getType(uri: string): Promise; @@ -91,6 +96,7 @@ export interface DataAbilityHelper { * @param uri Indicates the path of the files to obtain. * @param mimeTypeFilter Indicates the MIME types of the files to obtain. * @return Returns the matched MIME types Array. + * @FAModelOnly */ getFileTypes(uri: string, mimeTypeFilter: string, callback: AsyncCallback>): void; getFileTypes(uri: string, mimeTypeFilter: string): Promise>; @@ -103,6 +109,7 @@ export interface DataAbilityHelper { * @SysCap AAFwk * @param uri Indicates the uri object to normalize. * @return Returns the normalized uri object if the Data ability supports URI normalization or null. + * @FAModelOnly */ normalizeUri(uri: string, callback: AsyncCallback): void; normalizeUri(uri: string): Promise; @@ -115,6 +122,7 @@ export interface DataAbilityHelper { * @SysCap AAFwk * @param uri Indicates the uri object to normalize. * @return Returns the denormalized uri object if the denormalization is successful. + * @FAModelOnly */ denormalizeUri(uri: string, callback: AsyncCallback): void; denormalizeUri(uri: string): Promise; @@ -127,6 +135,7 @@ export interface DataAbilityHelper { * @SysCap AAFwk * @param uri Indicates the path of the data to operate. * @return - + * @FAModelOnly */ notifyChange(uri: string, callback: AsyncCallback): void; notifyChange(uri: string): Promise; @@ -140,6 +149,7 @@ export interface DataAbilityHelper { * @param uri Indicates the path of the data to insert. * @param valuesBucket 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. + * @FAModelOnly */ insert(uri: string, valuesBucket: rdb.ValuesBucket, callback: AsyncCallback): void; insert(uri: string, valuesBucket: rdb.ValuesBucket): Promise; @@ -153,6 +163,7 @@ export interface DataAbilityHelper { * @param uri Indicates the path of the data to batchInsert. * @param valuesBuckets Indicates the data records to insert. * @return Returns the number of data records inserted. + * @FAModelOnly */ batchInsert(uri: string, valuesBuckets: Array, callback: AsyncCallback): void; batchInsert(uri: string, valuesBuckets: Array): Promise; @@ -166,6 +177,7 @@ export interface DataAbilityHelper { * @param uri Indicates the path of the data to delete. * @param predicates Indicates filter criteria. You should define the processing logic when this parameter is null. * @return Returns the number of data records deleted. + * @FAModelOnly */ delete(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; delete(uri: string, predicates: dataAbility.DataAbilityPredicates): Promise; @@ -180,6 +192,7 @@ export interface DataAbilityHelper { * @param valuesBucket Indicates the data to update. * @param predicates Indicates filter criteria. You should define the processing logic when this parameter is null. * @return Returns the number of data records updated. + * @FAModelOnly */ update(uri: string, valuesBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; update(uri: string, valuesBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): Promise; @@ -194,6 +207,7 @@ export interface DataAbilityHelper { * @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 {@link ResultSet}. + * @FAModelOnly */ query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): Promise; diff --git a/api/ability/dataAbilityOperation.d.ts b/api/ability/dataAbilityOperation.d.ts index 2d045916a1..a87a732cd0 100644 --- a/api/ability/dataAbilityOperation.d.ts +++ b/api/ability/dataAbilityOperation.d.ts @@ -24,6 +24,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ uri: string; @@ -33,6 +34,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ type: featureAbility.DataAbilityOperationType; @@ -42,6 +44,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ valuesBucket?: rdb.ValuesBucket; @@ -51,6 +54,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ valueBackReferences?: rdb.ValuesBucket; @@ -61,6 +65,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ predicates?: dataAbility.DataAbilityPredicates; @@ -70,6 +75,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ predicatesBackReferences?: Map; @@ -79,6 +85,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ interrupted?: boolean; @@ -88,6 +95,7 @@ export interface DataAbilityOperation { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ expectedCount?: number; } \ No newline at end of file diff --git a/api/ability/dataAbilityResult.d.ts b/api/ability/dataAbilityResult.d.ts index fc5878a672..96393e5886 100644 --- a/api/ability/dataAbilityResult.d.ts +++ b/api/ability/dataAbilityResult.d.ts @@ -20,6 +20,7 @@ export interface DataAbilityResult { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ uri?: string; @@ -29,6 +30,7 @@ export interface DataAbilityResult { * @devices phone, tablet * @since 7 * @sysCap AAFwk + * @FAModelOnly */ count?:number; } \ No newline at end of file diff --git a/api/ability/startAbilityParameter.d.ts b/api/ability/startAbilityParameter.d.ts index 9d99dcb38d..77b0d56e90 100644 --- a/api/ability/startAbilityParameter.d.ts +++ b/api/ability/startAbilityParameter.d.ts @@ -22,6 +22,7 @@ export interface StartAbilityParameter { * @devices phone, tablet * @since 3 * @SysCap aafwk + * @FAModelOnly */ want: Want; @@ -32,6 +33,7 @@ export interface StartAbilityParameter { * @devices phone, tablet * @since 3 * @SysCap aafwk + * @FAModelOnly */ abilityStartSetting?: {[key: string]: any}; diff --git a/api/app/context.d.ts b/api/app/context.d.ts index e4babaa2bd..dd43071451 100644 --- a/api/app/context.d.ts +++ b/api/app/context.d.ts @@ -29,6 +29,7 @@ import BaseContext from '../application/BaseContext'; * @devices phone, tablet, tv, wearable, car * @import import abilityManager from 'app/context' * @permission N/A + * @FAModelOnly */ export interface Context extends BaseContext { @@ -42,6 +43,7 @@ export interface Context extends BaseContext { * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car * @return the root dir + * @FAModelOnly */ getOrCreateLocalDir(): Promise; getOrCreateLocalDir(callback: AsyncCallback): void; @@ -58,6 +60,7 @@ export interface Context extends BaseContext { * @devices phone, tablet, tv, wearable, car * @return asynchronous callback with {@code 0} if the PID * and UID have the permission; callback with {@code -1} otherwise. + * @FAModelOnly */ verifyPermission(permission: string, options?: PermissionOptions): Promise; verifyPermission(permission: string, options: PermissionOptions, callback: AsyncCallback): void; @@ -70,6 +73,7 @@ export interface Context extends BaseContext { * @since 7 * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car + * @FAModelOnly */ requestPermissionsFromUser(permissions: Array, requestCode: number, resultCallback: AsyncCallback): void; @@ -78,6 +82,7 @@ export interface Context extends BaseContext { * @since 7 * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable + * @FAModelOnly */ getApplicationInfo(callback: AsyncCallback): void getApplicationInfo(): Promise; @@ -87,6 +92,7 @@ export interface Context extends BaseContext { * @since 7 * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable + * @FAModelOnly */ getBundleName(callback: AsyncCallback): void getBundleName(): Promise; @@ -96,6 +102,7 @@ export interface Context extends BaseContext { * @since 7 * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable + * @FAModelOnly */ getProcessInfo(callback: AsyncCallback): void getProcessInfo(): Promise; @@ -105,6 +112,7 @@ export interface Context extends BaseContext { * @since 7 * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable + * @FAModelOnly */ getElementName(callback: AsyncCallback): void getElementName(): Promise; @@ -114,6 +122,7 @@ export interface Context extends BaseContext { * @since 7 * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable + * @FAModelOnly */ getProcessName(callback: AsyncCallback): void getProcessName(): Promise; @@ -123,6 +132,7 @@ export interface Context extends BaseContext { * @since 7 * @sysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable + * @FAModelOnly */ getCallingBundle(callback: AsyncCallback): void getCallingBundle(): Promise; @@ -134,12 +144,14 @@ export interface Context extends BaseContext { * @SysCap SystemCapability.Appexecfwk * @permission N/A * @devices phone, tablet, tv, wearable, car + * @FAModelOnly */ interface PermissionRequestResult { /** * @default The request code passed in by the user * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ requestCode: number; @@ -147,6 +159,7 @@ interface PermissionRequestResult { * @default The permissions passed in by the user * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ permissions: Array; @@ -154,6 +167,7 @@ interface PermissionRequestResult { * @default The results for the corresponding request permissions * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ authResults: Array; } @@ -163,6 +177,7 @@ interface PermissionOptions { * @default The process id * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ pid?: number; @@ -170,6 +185,7 @@ interface PermissionOptions { * @default The user id * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ uid?: number; } \ No newline at end of file diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index 65a97c683e..1757c2c771 100644 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -26,25 +26,28 @@ import PermissionRequestResult from "./PermissionRequestResult"; /** * The context of an ability. It allows access to ability-specific resources. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class AbilityContext extends Context { /** * Indicates configuration information about an ability. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ abilityInfo: AbilityInfo; /** * Indicates configuration information about an module. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ currentHapModuleInfo: HapModuleInfo; @@ -52,10 +55,11 @@ export default class AbilityContext extends Context { * Starts a new ability. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param parameter Indicates the ability to start. * @return - + * @StageModelOnly */ startAbility(want: Want, callback: AsyncCallback): void; startAbility(want: Want, options: StartOptions, callback: AsyncCallback): void; @@ -65,12 +69,13 @@ export default class AbilityContext extends Context { * Starts a new ability with account. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want Indicates the want info to start. * @param want Indicates the account to start. * @systemapi hide for inner use. * @return - + * @StageModelOnly */ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; @@ -80,10 +85,11 @@ export default class AbilityContext extends Context { * Starts an ability and returns the execution result when the ability is destroyed. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param parameter Indicates the ability to start. * @return Returns the {@link AbilityResult}. + * @StageModelOnly */ startAbilityForResult(want: Want, callback: AsyncCallback): void; startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback): void; @@ -93,12 +99,13 @@ export default class AbilityContext extends Context { * Starts an ability and returns the execution result when the ability is destroyed with account. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want Indicates the want info to start. * @param want Indicates the account to start. * @systemapi hide for inner use. * @return Returns the {@link AbilityResult}. + * @StageModelOnly */ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; @@ -108,9 +115,10 @@ export default class AbilityContext extends Context { * Destroys this Page ability. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return - + * @StageModelOnly */ terminateSelf(callback: AsyncCallback): void; terminateSelf(): Promise; @@ -120,10 +128,11 @@ export default class AbilityContext extends Context { * and destroys this Page ability. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param parameter Indicates the result to return. * @return - + * @StageModelOnly */ terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback): void; terminateSelfWithResult(parameter: AbilityResult): Promise; @@ -132,12 +141,13 @@ export default class AbilityContext extends Context { * Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want The element name of the service ability * @param options The remote object instance * @hide hide for inner use. * @return Returns the number code of the ability connected + * @StageModelOnly */ connectAbility(want: Want, options: ConnectOptions): number; @@ -145,13 +155,14 @@ export default class AbilityContext extends Context { * Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template with account. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param want The element name of the service ability * @param options The remote object instance * @param accountId The account to connect * @systemapi hide for inner use. * @return Returns the number code of the ability connected + * @StageModelOnly */ connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; @@ -159,10 +170,11 @@ export default class AbilityContext extends Context { * The callback interface was connect successfully. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param connection The number code of the ability connected * @hide hide for inner use. + * @StageModelOnly */ disconnectAbility(connection: number, callback:AsyncCallback): void; disconnectAbility(connection: number): Promise; @@ -171,9 +183,10 @@ export default class AbilityContext extends Context { * Set mission label of current ability. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param label The label of ability that showed in recent missions. + * @StageModelOnly */ setMissionLabel(label: string, callback:AsyncCallback): void; setMissionLabel(label: string): Promise; @@ -182,9 +195,10 @@ export default class AbilityContext extends Context { * Requests certain permissions from the system. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param permissions Indicates the list of permissions to be requested. This parameter cannot be null or empty. + * @StageModelOnly */ requestPermissionsFromUser(permissions: Array, requestCallback: AsyncCallback) : void; requestPermissionsFromUser(permissions: Array) : Promise; diff --git a/api/application/ApplicationStateObserver.d.ts b/api/application/ApplicationStateObserver.d.ts index 4c45a87c3d..fd3a39fbd4 100644 --- a/api/application/ApplicationStateObserver.d.ts +++ b/api/application/ApplicationStateObserver.d.ts @@ -55,7 +55,7 @@ export default class ApplicationStateObserver { * Will be called when extension state changed. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap appexecfwk * @param abilityStateData State changed extension info. * @systemapi hide for inner use. diff --git a/api/application/Context.d.ts b/api/application/Context.d.ts index 0ffc1c524e..51c0417238 100644 --- a/api/application/Context.d.ts +++ b/api/application/Context.d.ts @@ -22,89 +22,100 @@ import EventHub from "./EventHub"; * The base context of an ability or an application. It allows access to * application-specific resources. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class Context extends BaseContext { /** * Indicates the capability of accessing application resources. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ resourceManager: resmgr.ResourceManager; /** * Indicates configuration information about an application. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ applicationInfo: ApplicationInfo; /** * Indicates app cache dir. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ cacheDir: string; /** * Indicates app temp dir. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ tempDir: string; /** * Indicates app files dir. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ filesDir : string; /** * Indicates app database dir. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ databaseDir : string; /** * Indicates app storage dir. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ storageDir : string; /** * Indicates app bundle code dir. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ bundleCodeDir : string; /** * Indicates app distributed files dir. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ distributedFilesDir: string; /** * Indicates event hub. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ eventHub: EventHub; @@ -112,11 +123,12 @@ export default class Context extends BaseContext { * Create a bundle context * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @systemapi hide for inner use. * @param bundleName Indicates the bundle name. * @return application context + * @StageModelOnly */ createBundleContext(bundleName: string): Context; @@ -124,9 +136,10 @@ export default class Context extends BaseContext { * Get application context * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @return application context + * @StageModelOnly */ getApplicationContext(): Context; } \ No newline at end of file diff --git a/api/application/EventHub.d.ts b/api/application/EventHub.d.ts index ddcd46dae5..7f0099bf51 100644 --- a/api/application/EventHub.d.ts +++ b/api/application/EventHub.d.ts @@ -16,45 +16,49 @@ /** * The event center of a context, support the subscription and publication of events. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ - export default class EventHub { - /** - * Subscribe to an event. - * - * @devices phone, tablet, tv, wearable, car - * @since 8 - * @sysCap AAFwk - * @param event Indicates the event. - * @param callback Indicates the callback. - * @return - - */ - on(event: string, callback: Function): void +export default class EventHub { + /** + * Subscribe to an event. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @param event Indicates the event. + * @param callback Indicates the callback. + * @return - + * @StageModelOnly + */ + on(event: string, callback: Function): void - /** - * Unsubscribe from an event. - * - * @devices phone, tablet, tv, wearable, car - * @since 8 - * @sysCap AAFwk - * @param event Indicates the event. - * @param callback Indicates the callback. - * @return - - */ - off(event: string, callback?: Function): void + /** + * Unsubscribe from an event. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @param event Indicates the event. + * @param callback Indicates the callback. + * @return - + * @StageModelOnly + */ + off(event: string, callback?: Function): void - /** - * Trigger the event callbacks. - * - * @devices phone, tablet, tv, wearable, car - * @since 8 - * @sysCap AAFwk - * @param event Indicates the event. - * @param args Indicates the callback arguments. - * @return - - */ - emit(event: string, ...args: Object[]): void - } \ No newline at end of file + /** + * Trigger the event callbacks. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @param event Indicates the event. + * @param args Indicates the callback arguments. + * @return - + * @StageModelOnly + */ + emit(event: string, ...args: Object[]): void +} \ No newline at end of file diff --git a/api/application/ExtensionContext.d.ts b/api/application/ExtensionContext.d.ts index 6033c35b12..ab86068a27 100644 --- a/api/application/ExtensionContext.d.ts +++ b/api/application/ExtensionContext.d.ts @@ -19,18 +19,20 @@ import Context from "./Context"; /** * The context of an extension. It allows access to extension-specific resources. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class ExtensionContext extends Context { /** * Indicates configuration information about an module. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ currentHapModuleInfo: HapModuleInfo; } \ No newline at end of file diff --git a/api/application/FormExtensionContext.d.ts b/api/application/FormExtensionContext.d.ts index 68b378a331..39ea06079a 100644 --- a/api/application/FormExtensionContext.d.ts +++ b/api/application/FormExtensionContext.d.ts @@ -21,10 +21,11 @@ import formBindingData from '../@ohos.application.formBindingData'; * The context of form extension. It allows access to * formExtension-specific resources. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class FormExtensionContext extends ExtensionContext { @@ -34,12 +35,13 @@ export default class FormExtensionContext extends ExtensionContext { *

You can use this method to update the given form

* * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @permission ohos.permission.REQUIRE_FORM. * @param formId Indicates the given form. * @param formBindingData Indicates the form data. * @return - + * @StageModelOnly */ updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback): void; updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise; diff --git a/api/application/PermissionRequestResult.d.ts b/api/application/PermissionRequestResult.d.ts index 9bf51a133f..c031d326ad 100755 --- a/api/application/PermissionRequestResult.d.ts +++ b/api/application/PermissionRequestResult.d.ts @@ -16,17 +16,19 @@ /** * The result of requestPermissionsFromUser with asynchronous callback. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @permission N/A + * @StageModelOnly */ export default class PermissionRequestResult { /** * The permissions passed in by the user. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ permissions: Array; @@ -34,8 +36,9 @@ export default class PermissionRequestResult { * The results for the corresponding request permissions. The value 0 indicates that a * permission is granted, and the value -1 indicates not. * - * @since 8 + * @since 9 * @sysCap AAFwk + * @StageModelOnly */ authResults: Array; } \ No newline at end of file diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index 200e2b3281..b9ea4f76c2 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -23,22 +23,24 @@ import StartOptions from "../@ohos.application.StartOptions"; * The context of service extension. It allows access to * serviceExtension-specific resources. * - * @since 8 + * @since 9 * @sysCap AAFwk * @devices phone, tablet, tv, wearable, car * @systemapi hide for inner use. * @permission N/A + * @StageModelOnly */ export default class ServiceExtensionContext extends ExtensionContext { /** * Service extension uses this method to start a specific ability. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param parameter Indicates the ability to start. * @systemapi hide for inner use. * @return - + * @StageModelOnly */ startAbility(want: Want, callback: AsyncCallback): void; startAbility(want: Want, options: StartOptions, callback: AsyncCallback): void; @@ -48,12 +50,13 @@ export default class ServiceExtensionContext extends ExtensionContext { * Service extension uses this method to start a specific ability with account. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param parameter Indicates the ability to start. * @param parameter Indicates the accountId to start. * @systemapi hide for inner use. * @return - + * @StageModelOnly */ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; @@ -63,10 +66,11 @@ export default class ServiceExtensionContext extends ExtensionContext { * Destroys this service extension. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @systemapi hide for inner use. * @return - + * @StageModelOnly */ terminateSelf(callback: AsyncCallback): void; terminateSelf(): Promise; @@ -79,11 +83,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * service extension when the Service extension is connected.

* * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param request Indicates the service extension to connect. * @systemapi hide for inner use. * @return connection id, int value. + * @StageModelOnly */ connectAbility(want: Want, options: ConnectOptions): number; @@ -95,12 +100,13 @@ export default class ServiceExtensionContext extends ExtensionContext { * service extension when the Service extension is connected.

* * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param request Indicates the service extension to connect. * @param request Indicates the account to connect. * @systemapi hide for inner use. * @return connection id, int value. + * @StageModelOnly */ connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; @@ -109,11 +115,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * {@link connectAbility}. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 * @sysCap AAFwk * @param connection the connection id returned from connectAbility api. * @systemapi hide for inner use. * @return - + * @StageModelOnly */ disconnectAbility(connection: number, callback:AsyncCallback): void; disconnectAbility(connection: number): Promise; -- Gitee