diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts old mode 100644 new mode 100755 index 822a6d703875ba212ec8c0a07f12f23581862e1f..b07a0a0022dbd8d2234aa94aae81c79e2c459b01 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -17,6 +17,88 @@ import AbilityConstant from "./@ohos.application.AbilityConstant"; import AbilityContext from "./application/AbilityContext"; import Want from './@ohos.application.Want'; import window from './@ohos.window'; +import { Configuration } from './@ohos.application.Configuration'; +import rpc from '/@ohos.rpc'; + +/** + * The interface of a Caller. + * + * @since 9 + * @sysCap AAFwk + * @devices phone, tablet, tv, wearable, car + * @permission N/A + * @StageModelOnly + */ + interface Caller { + /** + * Notify the server of Sequenceable type data. + * + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + call(method, data: rpc.Sequenceable): Promise; + + /** + * Notify the server of Sequenceable type data and return the notification result. + * + * @since 9 + * @sysCap AAFwk + * return Sequenceable data + * @StageModelOnly + */ + callWithResult(method: string, data: rpc.Sequenceable): Promise; + + /** + * Clear service records. + * + * @since 9 + * @sysCap AAFwk + * return Sequenceable data + * @StageModelOnly + */ + release(): void; + + /** + * Register death listener notification callback. + * + * @since 9 + * @sysCap AAFwk + * return Sequenceable data + * @StageModelOnly + */ + onRelease(callback: function): void; + } + + /** + * The interface of a Callee. + * + * @since 9 + * @sysCap AAFwk + * @devices phone, tablet, tv, wearable, car + * @permission N/A + * @StageModelOnly + */ + interface Callee { + + /** + * Register data listener callback. + * + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + on(method: string, callback: function): void; + + /** + * Unregister data listener callback. + * + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + off(method: string): void; + } /** * The class of an ability. @@ -54,6 +136,15 @@ export default class Ability { */ lastRequestWant: Want; + /** + * Call Service Stub Object. + * + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + callee: Callee; + /** * Called back when an ability is started for initialization. * @@ -123,4 +214,27 @@ export default class Ability { * @StageModelOnly */ onContinue(wantParam : {[key: string]: any}): boolean; + + /** + * Called when the launch mode of an ability is set to singleton. + * This happens when you re-launch an ability that has been at the top of the ability stack. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @return - + * @StageModelOnly + */ + onNewWant(want: Want): void; + + /** + * Called when the system configuration is updated. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @return - + * @StageModelOnly + */ + onConfigurationUpdated(config: Configuration): void; } diff --git a/api/@ohos.application.AbilityStage.d.ts b/api/@ohos.application.AbilityStage.d.ts index 60fbfac572a84829174580e3f311c8f409a9fa06..9f6a4a8b568a2e0a066ae19d08588b657cc1aef0 100644 --- a/api/@ohos.application.AbilityStage.d.ts +++ b/api/@ohos.application.AbilityStage.d.ts @@ -14,6 +14,7 @@ */ import AbilityStageContext from "./application/AbilityStageContext"; +import Want from './@ohos.application.Want'; /** * The class of an ability stage. @@ -42,4 +43,15 @@ export default class AbilityStage { * @StageModelOnly */ onCreate(): void; + + /** + * Called back when start specified ability. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @return - + * @StageModelOnly + */ + onAcceptWant(want: Want): string; } \ No newline at end of file diff --git a/api/@ohos.application.StartOptions.d.ts b/api/@ohos.application.StartOptions.d.ts index 17b7bcc7da735c60fcf847f6b4f32b809dd0490e..5c0b9e7d041e9e27f562824297483e010cc21b6e 100644 --- a/api/@ohos.application.StartOptions.d.ts +++ b/api/@ohos.application.StartOptions.d.ts @@ -31,4 +31,14 @@ export default class StartOptions { * @StageModelOnly */ windowMode?: number; + + /** + * displayId + * @default - + * @devices phone, tablet + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + displayId?: number; } \ No newline at end of file diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts index 36bfa7f40cdd75710f5cef2aff3c67c2001cea6e..ff2426a5e7bc9e4598d977d2e6bd62e604fb6fba 100644 --- a/api/@ohos.application.abilityManager.d.ts +++ b/api/@ohos.application.abilityManager.d.ts @@ -58,7 +58,6 @@ declare namespace abilityManager { * * @since 8 * @SysCap SystemCapability.Ability.AbilityRuntime.Core - * @param config Indicates the new configuration. * @systemapi Hide this for inner system use. * @return - */ @@ -70,7 +69,7 @@ declare namespace abilityManager { * * @since 9 * @SysCap SystemCapability.Ability.AbilityRuntime.Core - * @param config Indicates the new configuration. + * @param upperLimit Get the maximum limit of the number of messages * @systemapi Hide this for inner system use. * @return - */ diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts old mode 100644 new mode 100755 index 68cf988156f95cbe8dfb64c386cc1c6f38174294..442c46a5d07d4cb904e775c2375a2ff8223c8c7b --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -22,6 +22,8 @@ import Context from "./Context"; import Want from "../@ohos.application.Want"; import StartOptions from "../@ohos.application.StartOptions"; import PermissionRequestResult from "./PermissionRequestResult"; +import { Configuration } from '../@ohos.application.Configuration'; +import Caller from '../@ohos.application.Ability'; /** * The context of an ability. It allows access to ability-specific resources. @@ -50,6 +52,15 @@ export default class AbilityContext extends Context { */ currentHapModuleInfo: HapModuleInfo; + /** + * Indicates configuration information. + * + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + config: Configuration; + /** * Starts a new ability. * @@ -63,6 +74,18 @@ export default class AbilityContext extends Context { startAbility(want: Want, options: StartOptions, callback: AsyncCallback): void; startAbility(want: Want, options?: StartOptions): Promise; + /** + * Get the caller object of the startup capability + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @param parameter Indicates the ability to start. + * @return Caller + * @StageModelOnly + */ + startAbilityByCall(want: Want): Promise; + /** * Starts a new ability with account. * diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index 41017e10426a72c161a87666c5fa67309928eb01..ce5e61f0654409a57810d33d2bb64108bf4c0509 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -18,6 +18,7 @@ import { ConnectOptions } from "../ability/connectOptions"; import ExtensionContext from "./ExtensionContext"; import Want from "../@ohos.application.Want"; import StartOptions from "../@ohos.application.StartOptions"; +import { ExtensionAbilityInfo } from "../bundle/extensionAbilityInfo"; /** * The context of service extension. It allows access to @@ -30,6 +31,14 @@ import StartOptions from "../@ohos.application.StartOptions"; * @StageModelOnly */ export default class ServiceExtensionContext extends ExtensionContext { + /** + * Service extension information. + * + * @since 9 + * @sysCap AAFwk + */ + extensionAbilityInfo: ExtensionAbilityInfo; + /** * Service extension uses this method to start a specific ability. *