From 7b5ca4dda00b88d745bc9c73f6ffeb05c32a76c6 Mon Sep 17 00:00:00 2001 From: njupthan Date: Mon, 17 Jan 2022 17:36:12 +0800 Subject: [PATCH 001/163] AMS test framework AbilityDelegator related DTS submission Signed-off-by: njupthan --- api/@ohos.app.abilityDelegatorRegistry.d.ts | 61 ++++++++++ api/app/abilityDelegator.d.ts | 123 ++++++++++++++++++++ api/app/abilityDelegatorArgs.d.ts | 53 +++++++++ api/app/abilityMonitor.d.ts | 77 ++++++++++++ api/app/shellCmdResult.d.ts | 40 +++++++ api/app/testRunner.d.ts | 41 +++++++ 6 files changed, 395 insertions(+) create mode 100644 api/@ohos.app.abilityDelegatorRegistry.d.ts create mode 100644 api/app/abilityDelegator.d.ts create mode 100644 api/app/abilityDelegatorArgs.d.ts create mode 100644 api/app/abilityMonitor.d.ts create mode 100644 api/app/shellCmdResult.d.ts create mode 100644 api/app/testRunner.d.ts diff --git a/api/@ohos.app.abilityDelegatorRegistry.d.ts b/api/@ohos.app.abilityDelegatorRegistry.d.ts new file mode 100644 index 0000000000..7ec09965a6 --- /dev/null +++ b/api/@ohos.app.abilityDelegatorRegistry.d.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback } from './basic'; +import { AbilityDelegator } from './app/abilityDelegator' +import { AbilityDelegatorArgs } from './app/abilityDelegatorArgs' + +/** + * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered + * during application startup. + * 在应用程序启动期间,保存AbilityDelegator和AbilityDelegatorArgs对象的全局存储器 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import abilityManager from '@ohos.app.abilityManager' + * @permission N/A + */ +declare namespace abilityDelegatorRegistry { + /** + * Get the AbilityDelegator object of the application. + * 异步方式获取应用程序的AbilityDelegator对象 + * @return the AbilityDelegator object initialized when the application is started. + * 应用程序启动时被初始化的AbilityDelegator对象 + */ + function getAbilityDelegator(callback: AsyncCallback): void; + function getAbilityDelegator(): Promise; + + /** + * Get unit test parameters stored in the AbilityDelegatorArgs object. + * 异步的方式获取单元测试参数AbilityDelegatorArgs对象 + * @return the previously registered AbilityDelegatorArgs object. + * 单元测试参数AbilityDelegatorArgs对象 + */ + function getArguments(callback: AsyncCallback): void; + function getArguments(): Promise;​ + + /** + * Describes all lifecycle states of an ability. + */ + export enum AbilityLifecycleState { + CREATE, + FOREGROUND, + BACKGROUND, + DESTROY, + } +} + +export default abilityDelegatorRegistry; \ No newline at end of file diff --git a/api/app/abilityDelegator.d.ts b/api/app/abilityDelegator.d.ts new file mode 100644 index 0000000000..2b5dc8426c --- /dev/null +++ b/api/app/abilityDelegator.d.ts @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback } from '../basic'; +import { Ability } from '../@ohos.application.Ability' +import { AbilityMonitor } from './abilityMonitor' +import { Context } from './context' +import { ShellCmdResult } from './shellCmdResult' +import { Want } from '../ability/want' + +/** + * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities. + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import AbilityDelegator from 'app/abilityDelegator.d' + * @permission N/A + */ +export interface AbilityDelegator { + /** + * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability. + * 添加AbilityMonitor实例,用于监听ability生命周期变换 + * @param monitor AbilityMonitor实例 + */ + addAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; + addAbilityMonitor​(monitor: AbilityMonitor): Promise; + + /** + * Remove a specified AbilityMonitor object from the application memory. + * 删除已经添加的AbilityMonitor实例 + * @param monitor AbilityMonitor实例 + */ + removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void;​ + removeAbilityMonitor(monitor: AbilityMonitor): Promise; + + /** + * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. + * 等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例 + * @param monitor AbilityMonitor实例 + * @param timeout 最大等待时间,单位毫秒 + * @return 如果监听到与指定AbilityMonitor实例匹配的Abilityability到达OnCreate生命周期,则返回ability实例;否则返回空 + */ + waitAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; + waitAbilityMonitor​(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void; + waitAbilityMonitor​(monitor: AbilityMonitor, timeout?: number): Promise; + + /** + * Obtain the application context. + * 异步方式获取应用Context,通过异步回调将Context实例返回 + * @return 应用Context + */ + getAppContext(callback: AsyncCallback): void; + getAppContext(): Promise; + + /** + * Obtain the lifecycle state of a specified ability. + * 异步方式获取指定ability状态 + * @param ability 指定Ability对象 + * @return 指定Ability对象的状态 + */ + getAbilityState(ability: Ability, callback: AsyncCallback): void; + getAbilityState(ability: Ability): Promise; + + /** + * Obtain the ability that is currently being displayed. + * 异步方式获取当前应用顶部ability + * @return 当前应用顶部ability + */ + getCurrentTopAbility(callback: AsyncCallback): void; + getCurrentTopAbility(): Promise + + /** + * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state. + * 异步方式调度指定ability生命周期状态到Foreground状态 + * @param ability 指定Ability对象 + * @return true: 成功 false: 失败 + */ + doAbilityForeground(ability: Ability, callback: AsyncCallback): void; + doAbilityForeground(ability: Ability): Promise; + + /** + * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state. + * 异步方式调度指定ability生命周期状态到Background状态 + * @param ability 指定Ability对象 + * @return true: 成功 false: 失败 + */ + doAbilityBackground(ability: Ability, callback: AsyncCallback): void; + doAbilityBackground(ability: Ability): Promise; + + /** + * Prints log information to the unit testing console. + * The total length of the log information to be printed cannot exceed 1000 characters. + * 异步方式打印日志信息到单元测试终端控制台 + * 日志信息字符串长度最大不超过1000个字符 + * @param msg 日志字符串 + */ + print(msg: string, callback: AsyncCallback): void; + print(msg: string): Promise; + + /** + * Execute the given command in the aa tools side. + * 异步方式执行指定的shell命令 + * @param cmd shell命令字符串 + * @return shell命令执行结果对象 + */ + executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void;​ + executeShellCommand(cmd: string, timeoutSecs: number): Promise;​ +} + +export default AbilityDelegator; \ No newline at end of file diff --git a/api/app/abilityDelegatorArgs.d.ts b/api/app/abilityDelegatorArgs.d.ts new file mode 100644 index 0000000000..8b3476cfeb --- /dev/null +++ b/api/app/abilityDelegatorArgs.d.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/** + * Store unit testing-related parameters, including test case names, and test runner name. + * 存储单元测试相关的参数,包括测试用例名称,测试用例执行器名称 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import AbilityDelegatorArgs from 'app/abilityDelegatorArgs.d' + * @permission N/A + */ +export interface AbilityDelegatorArgs { + /** + * the bundle name of the application being tested. + * 表示当前被测试应用的包名 + */ + bundleName: string; + + /** + * the parameters used for unit testing. + * 表示当前启动单元测试的参数 + */ + parameters​: {[key: string]: string}; + + /** + * the class names of all test cases. + * 测试用例名称 + */ + testCaseNames: string; + + /** + * the class name of the test runner used to execute test cases. + * 执行测试用例的测试执行器的名称 + */ + testRunnerClassName: string;​ +} + +export default AbilityDelegatorArgs; \ No newline at end of file diff --git a/api/app/abilityMonitor.d.ts b/api/app/abilityMonitor.d.ts new file mode 100644 index 0000000000..15f68e434a --- /dev/null +++ b/api/app/abilityMonitor.d.ts @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Provide methods for matching monitored Ability objects that meet specified conditions. + * The most recently matched Ability objects will be saved in the AbilityMonitor object. + * 监听指定Ability生命周期状态变化的监听器 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import AbilityMonitor from 'app/abilityMonitor.d' + * @permission N/A + */ +export interface AbilityMonitor { + /** + * The name of the ability to monitor. + * 表示当前AbilityMonitor绑定的ability name + */ + abilityName: string; + + /** + * Called back when the ability is started for initialization. + * ability被启动初始化时的回调函数 + */ + onAbilityCreate?:() => void; + + /** + * Called back when the state of the ability changes to foreground. + * ability状态变成前台时的回调函数 + */ + onAbilityForeground?:() => void; + + /** + * Called back when the state of the ability changes to background. + * ability状态变成后台时的回调函数 + */ + onAbilityBackground?:() => void; + + /** + * Called back before the ability is destroyed. + * ability被销毁前的回调函数 + */ + onAbilityDestroy?:() => void; + + /** + * Called back when an ability window stage is created. + * window stage被创建时的回调函数 + */ + onWindowStageCreate?:() => void; + + /** + * Called back when an ability window stage is restored. + * window stage被重载时的回调函数 + */ + onWindowStageRestore?:() => void; + + /** + * Called back when an ability window stage is destroyed. + * window stage被销毁前的回调函数 + */ + onWindowStageDestroy?:() => void; +} + +export default AbilityMonitor; \ No newline at end of file diff --git a/api/app/shellCmdResult.d.ts b/api/app/shellCmdResult.d.ts new file mode 100644 index 0000000000..d29515c95d --- /dev/null +++ b/api/app/shellCmdResult.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A object that records the result of shell command executes. + * 执行shell命令的结果 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import ShellCmdResult from 'app/shellCmdResult.d' + * @permission N/A + */ +export interface ShellCmdResult { + /** + * the cmd standard result. + * shell命令标准输出结果 + */ + stdResult: String; + + /** + * shell cmd exec result. + * shell命令执行的结果 + */ + exitCode: number; +} + +export default ShellCmdResult; \ No newline at end of file diff --git a/api/app/testRunner.d.ts b/api/app/testRunner.d.ts new file mode 100644 index 0000000000..30b3e1c83f --- /dev/null +++ b/api/app/testRunner.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Base class for the test framework. + * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. + * 测试框架的执行器基类 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import TestRunner from 'app/testRunner.d' + * @permission N/A + */ +export interface TestRunner { + /** + * Prepare the unit testing environment for running test cases. + * 为执行器准备单元测试环境 + */ + onPrepare​(): void; + + /** + * Run all test cases. + * 运行所有的测试用例 + */ + onRun​(): void; +} + +export default TestRunner; \ No newline at end of file -- Gitee From cd6a8d812dd31a3c988113e01f76752d79f62e44 Mon Sep 17 00:00:00 2001 From: hanhaibin Date: Wed, 19 Jan 2022 22:38:46 +0800 Subject: [PATCH 002/163] Update d.ts Signed-off-by: hanhaibin --- ....application.abilityDelegatorRegistry.d.ts | 61 +++++++++ api/@ohos.application.testRunner.d.ts | 41 ++++++ api/application/abilityDelegator.d.ts | 122 ++++++++++++++++++ api/application/abilityDelegatorArgs.d.ts | 53 ++++++++ api/application/abilityMonitor.d.ts | 77 +++++++++++ api/application/shellCmdResult.d.ts | 40 ++++++ 6 files changed, 394 insertions(+) create mode 100644 api/@ohos.application.abilityDelegatorRegistry.d.ts create mode 100644 api/@ohos.application.testRunner.d.ts create mode 100644 api/application/abilityDelegator.d.ts create mode 100644 api/application/abilityDelegatorArgs.d.ts create mode 100644 api/application/abilityMonitor.d.ts create mode 100644 api/application/shellCmdResult.d.ts diff --git a/api/@ohos.application.abilityDelegatorRegistry.d.ts b/api/@ohos.application.abilityDelegatorRegistry.d.ts new file mode 100644 index 0000000000..0293d32f0d --- /dev/null +++ b/api/@ohos.application.abilityDelegatorRegistry.d.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback } from './basic'; +import { AbilityDelegator } from './application/abilityDelegator' +import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs' + +/** + * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered + * during application startup. + * 在应用程序启动期间,保存AbilityDelegator和AbilityDelegatorArgs对象的全局存储器 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import abilityManager from '@ohos.application.abilityManager' + * @permission N/A + */ +declare namespace abilityDelegatorRegistry { + /** + * Get the AbilityDelegator object of the application. + * 异步方式获取应用程序的AbilityDelegator对象 + * @return the AbilityDelegator object initialized when the application is started. + * 应用程序启动时被初始化的AbilityDelegator对象 + */ + function getAbilityDelegator(callback: AsyncCallback): void; + function getAbilityDelegator(): Promise; + + /** + * Get unit test parameters stored in the AbilityDelegatorArgs object. + * 异步的方式获取单元测试参数AbilityDelegatorArgs对象 + * @return the previously registered AbilityDelegatorArgs object. + * 单元测试参数AbilityDelegatorArgs对象 + */ + function getArguments(callback: AsyncCallback): void; + function getArguments(): Promise;​ + + /** + * Describes all lifecycle states of an ability. + */ + export enum AbilityLifecycleState { + CREATE, + FOREGROUND, + BACKGROUND, + DESTROY, + } +} + +export default abilityDelegatorRegistry; \ No newline at end of file diff --git a/api/@ohos.application.testRunner.d.ts b/api/@ohos.application.testRunner.d.ts new file mode 100644 index 0000000000..994bc70efe --- /dev/null +++ b/api/@ohos.application.testRunner.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Base class for the test framework. + * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. + * 测试框架的执行器基类 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import TestRunner from '@ohos.application.testRunner' + * @permission N/A + */ +export interface TestRunner { + /** + * Prepare the unit testing environment for running test cases. + * 为执行器准备单元测试环境 + */ + onPrepare​(): void; + + /** + * Run all test cases. + * 运行所有的测试用例 + */ + onRun​(): void; +} + +export default TestRunner; \ No newline at end of file diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts new file mode 100644 index 0000000000..e3a96d55f4 --- /dev/null +++ b/api/application/abilityDelegator.d.ts @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback } from '../basic'; +import { Ability } from '../@ohos.application.Ability' +import { AbilityMonitor } from './abilityMonitor' +import { Context } from '../app/context' +import { ShellCmdResult } from './shellCmdResult' + +/** + * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities. + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import AbilityDelegator from 'application/abilityDelegator.d' + * @permission N/A + */ +export interface AbilityDelegator { + /** + * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability. + * 添加AbilityMonitor实例,用于监听ability生命周期变换 + * @param monitor AbilityMonitor实例 + */ + addAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; + addAbilityMonitor​(monitor: AbilityMonitor): Promise; + + /** + * Remove a specified AbilityMonitor object from the application memory. + * 删除已经添加的AbilityMonitor实例 + * @param monitor AbilityMonitor实例 + */ + removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void;​ + removeAbilityMonitor(monitor: AbilityMonitor): Promise; + + /** + * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. + * 等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例 + * @param monitor AbilityMonitor实例 + * @param timeout 最大等待时间,单位毫秒 + * @return 如果监听到与指定AbilityMonitor实例匹配的Abilityability到达OnCreate生命周期,则返回ability实例;否则返回空 + */ + waitAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; + waitAbilityMonitor​(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void; + waitAbilityMonitor​(monitor: AbilityMonitor, timeout?: number): Promise; + + /** + * Obtain the application context. + * 异步方式获取应用Context,通过异步回调将Context实例返回 + * @return 应用Context + */ + getAppContext(callback: AsyncCallback): void; + getAppContext(): Promise; + + /** + * Obtain the lifecycle state of a specified ability. + * 异步方式获取指定ability状态 + * @param ability 指定Ability对象 + * @return 指定Ability对象的状态 + */ + getAbilityState(ability: Ability, callback: AsyncCallback): void; + getAbilityState(ability: Ability): Promise; + + /** + * Obtain the ability that is currently being displayed. + * 异步方式获取当前应用顶部ability + * @return 当前应用顶部ability + */ + getCurrentTopAbility(callback: AsyncCallback): void; + getCurrentTopAbility(): Promise + + /** + * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state. + * 异步方式调度指定ability生命周期状态到Foreground状态 + * @param ability 指定Ability对象 + * @return true: 成功 false: 失败 + */ + doAbilityForeground(ability: Ability, callback: AsyncCallback): void; + doAbilityForeground(ability: Ability): Promise; + + /** + * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state. + * 异步方式调度指定ability生命周期状态到Background状态 + * @param ability 指定Ability对象 + * @return true: 成功 false: 失败 + */ + doAbilityBackground(ability: Ability, callback: AsyncCallback): void; + doAbilityBackground(ability: Ability): Promise; + + /** + * Prints log information to the unit testing console. + * The total length of the log information to be printed cannot exceed 1000 characters. + * 异步方式打印日志信息到单元测试终端控制台 + * 日志信息字符串长度最大不超过1000个字符 + * @param msg 日志字符串 + */ + print(msg: string, callback: AsyncCallback): void; + print(msg: string): Promise; + + /** + * Execute the given command in the aa tools side. + * 异步方式执行指定的shell命令 + * @param cmd shell命令字符串 + * @return shell命令执行结果对象 + */ + executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void;​ + executeShellCommand(cmd: string, timeoutSecs: number): Promise;​ +} + +export default AbilityDelegator; \ No newline at end of file diff --git a/api/application/abilityDelegatorArgs.d.ts b/api/application/abilityDelegatorArgs.d.ts new file mode 100644 index 0000000000..6cad52981b --- /dev/null +++ b/api/application/abilityDelegatorArgs.d.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/** + * Store unit testing-related parameters, including test case names, and test runner name. + * 存储单元测试相关的参数,包括测试用例名称,测试用例执行器名称 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import AbilityDelegatorArgs from 'application/abilityDelegatorArgs.d' + * @permission N/A + */ +export interface AbilityDelegatorArgs { + /** + * the bundle name of the application being tested. + * 表示当前被测试应用的包名 + */ + bundleName: string; + + /** + * the parameters used for unit testing. + * 表示当前启动单元测试的参数 + */ + parameters​: {[key: string]: string}; + + /** + * the class names of all test cases. + * 测试用例名称 + */ + testCaseNames: string; + + /** + * the class name of the test runner used to execute test cases. + * 执行测试用例的测试执行器的名称 + */ + testRunnerClassName: string;​ +} + +export default AbilityDelegatorArgs; \ No newline at end of file diff --git a/api/application/abilityMonitor.d.ts b/api/application/abilityMonitor.d.ts new file mode 100644 index 0000000000..9bdf341e18 --- /dev/null +++ b/api/application/abilityMonitor.d.ts @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Provide methods for matching monitored Ability objects that meet specified conditions. + * The most recently matched Ability objects will be saved in the AbilityMonitor object. + * 监听指定Ability生命周期状态变化的监听器 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import AbilityMonitor from 'application/abilityMonitor.d' + * @permission N/A + */ +export interface AbilityMonitor { + /** + * The name of the ability to monitor. + * 表示当前AbilityMonitor绑定的ability name + */ + abilityName: string; + + /** + * Called back when the ability is started for initialization. + * ability被启动初始化时的回调函数 + */ + onAbilityCreate?:() => void; + + /** + * Called back when the state of the ability changes to foreground. + * ability状态变成前台时的回调函数 + */ + onAbilityForeground?:() => void; + + /** + * Called back when the state of the ability changes to background. + * ability状态变成后台时的回调函数 + */ + onAbilityBackground?:() => void; + + /** + * Called back before the ability is destroyed. + * ability被销毁前的回调函数 + */ + onAbilityDestroy?:() => void; + + /** + * Called back when an ability window stage is created. + * window stage被创建时的回调函数 + */ + onWindowStageCreate?:() => void; + + /** + * Called back when an ability window stage is restored. + * window stage被重载时的回调函数 + */ + onWindowStageRestore?:() => void; + + /** + * Called back when an ability window stage is destroyed. + * window stage被销毁前的回调函数 + */ + onWindowStageDestroy?:() => void; +} + +export default AbilityMonitor; \ No newline at end of file diff --git a/api/application/shellCmdResult.d.ts b/api/application/shellCmdResult.d.ts new file mode 100644 index 0000000000..4eebad7cc9 --- /dev/null +++ b/api/application/shellCmdResult.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A object that records the result of shell command executes. + * 执行shell命令的结果 + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @import import ShellCmdResult from 'application/shellCmdResult.d' + * @permission N/A + */ +export interface ShellCmdResult { + /** + * the cmd standard result. + * shell命令标准输出结果 + */ + stdResult: String; + + /** + * shell cmd exec result. + * shell命令执行的结果 + */ + exitCode: number; +} + +export default ShellCmdResult; \ No newline at end of file -- Gitee From e3ecfdabba34c9dc2229cc94e8678269b1882909 Mon Sep 17 00:00:00 2001 From: hanhaibin Date: Sun, 23 Jan 2022 00:41:43 +0800 Subject: [PATCH 003/163] Update d.ts Signed-off-by: hanhaibin --- api/application/abilityDelegator.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index e3a96d55f4..861e73f172 100644 --- a/api/application/abilityDelegator.d.ts +++ b/api/application/abilityDelegator.d.ts @@ -113,10 +113,12 @@ export interface AbilityDelegator { * Execute the given command in the aa tools side. * 异步方式执行指定的shell命令 * @param cmd shell命令字符串 - * @return shell命令执行结果对象 + * @param timeoutSecs 超时时间,单位秒 + * @return shell命令的执行结果ShellCmdResult对象 */ + executeShellCommand(cmd: string, callback: AsyncCallback): void;​ executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void;​ - executeShellCommand(cmd: string, timeoutSecs: number): Promise;​ + executeShellCommand(cmd: string, timeoutSecs?: number): Promise;​ } export default AbilityDelegator; \ No newline at end of file -- Gitee From e6b7f00bfe624e6c2e5fd90601c46da62febe2a5 Mon Sep 17 00:00:00 2001 From: njupthan Date: Mon, 24 Jan 2022 16:01:02 +0000 Subject: [PATCH 004/163] add dts for Distributed Signed-off-by: njupthan --- api/@ohos.notification.d.ts | 154 ++++++++++++++++++++-- api/notification/notificationRequest.d.ts | 53 +++++++- 2 files changed, 193 insertions(+), 14 deletions(-) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index c24a7a258e..a967820681 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -552,6 +552,58 @@ declare namespace notification { function isSupportTemplate(templateName: string, callback: AsyncCallback): void; function isSupportTemplate(templateName: string): Promise; + /** + * Sets whether the device supports distributed notification. + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + function enableDistributed(enable: boolean, callback: AsyncCallback): void; + function enableDistributed(enable: boolean): Promise; + + /** + * Obtains whether the device supports distributed notification. + * + * @since 8 + */ + function isDistributedEnabled(callback: AsyncCallback): void; + function isDistributedEnabled(): Promise; + + /** + * Sets whether an application supports distributed notification. + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + function enableDistributedByBundle(bundle: BundleOption, enable: boolean, callback: AsyncCallback): void; + function enableDistributedByBundle(bundle: BundleOption, enable: boolean): Promise; + + /** + * Sets whether the application supports distributed notification. + * + * @since 8 + */ + function enableDistributedSelf(enable: boolean, callback: AsyncCallback): void; + function enableDistributedSelf(enable: boolean): Promise; + + /** + * Obtains whether an application supports distributed notification. + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + function isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback): void; + function isDistributedEnabledByBundle(bundle: BundleOption): Promise; + + /** + * Obtains the remind modes of the notification. + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + function getDeviceRemindType(callback: AsyncCallback): void; + function getDeviceRemindType(): Promise; + /** * Describes a BundleOption. */ @@ -569,34 +621,82 @@ declare namespace notification { } /** - * DisturbMode + * The type of the Do Not Disturb. + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + export enum DoNotDisturbType { + /** + * Non do not disturb type notification + */ + TYPE_NONE = 0, + + /** + * Execute do not disturb once in the set time period (only watch hours and minutes) + */ + TYPE_ONCE = 1, + + /** + * Execute do not disturb every day with a set time period (only watch hours and minutes) + */ + TYPE_DAILY = 2, + + /** + * Execute in the set time period (specify the time, month, day and hour) + */ + TYPE_CLEARLY = 3, + } + + /** + * Describes a DoNotDisturbDate instance. * * @systemapi Hide this for inner system use. */ - export enum DoNotDisturbMode { - ALLOW_UNKNOWN, + export interface DoNotDisturbDate { + /** + * the type of the Do Not Disturb. + * + * @since 8 + */ + type: DoNotDisturbType; + + /** + * the start time of the Do Not Disturb. + * + * @since 8 + */ + begin: Date; /** - * Indicates that all notifications are allowed to interrupt the user in Do Not Disturb mode. + * the end time of the Do Not Disturb. + * + * @since 8 */ - ALLOW_ALL, + end: Date; + } + /** + * Notification source type + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + export enum SourceType { /** - * Indicates that only notifications meeting the specified priority criteria are allowed to interrupt - * the user in Do Not Disturb mode. + * General notification */ - ALLOW_PRIORITY, + TYPE_NORMAL = 0x00000000, /** - * Indicates that no notifications are allowed to interrupt the user in Do Not Disturb mode. + * Continuous notification */ - ALLOW_NONE, + TYPE_CONTINUOUS = 0x00000001, /** - * Indicates that only notifications of the {@link NotificationRequest#CLASSIFICATION_ALARM} category - * are allowed to interrupt the user in Do Not Disturb mode. + * Scheduled notification */ - ALLOW_ALARMS + TYPE_TIMER = 0x00000002, } /** @@ -677,6 +777,34 @@ declare namespace notification { */ TYPE_TIMER = 0x00000002, } + + /** + * The remind type of the nofication. + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + export enum DeviceRemindType { + /** + * The device is not in use, no reminder + */ + IDLE_DONOT_REMIND = 0, + + /** + * The device is not in use, remind + */ + IDLE_REMIND = 1, + + /** + * The device is in use, no reminder + */ + ACTIVE_DONOT_REMIND = 2, + + /** + * The device is in use, reminder + */ + ACTIVE_REMIND = 3, + } } export default notification; diff --git a/api/notification/notificationRequest.d.ts b/api/notification/notificationRequest.d.ts index 669a492e34..07f15c39a4 100644 --- a/api/notification/notificationRequest.d.ts +++ b/api/notification/notificationRequest.d.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http?://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -197,4 +197,55 @@ export interface NotificationRequest { * @since 8 */ template?: NotificationTemplate; + + /** + * The options to distributed notification. + * + * @since 8 + */ + distributedOption?: DistributedOptions; + + /** + * The device ID of the notification source. + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + readonly deviceId?: string; } + + +/** + * Describes distributed options. + * + * @name DistributedOptions + * @since 8 + * @sysCap SystemCapability.Notification.ANS + * @devices phone, tablet, tv, wearable, car + * @permission N/A + */ +export interface DistributedOptions { + /** + * Obtains whether is the distributed notification. + * + * @default true + */ + isDistributed?: boolean; + + /** + * Obtains the types of devices to which the notification can be synchronized. + */ + supportDisplayDevices?: Array; + + /** + * Obtains the devices on which notifications can be open. + */ + supportOperateDevices?: Array; + + /** + * Obtains the remind mode of the notification. enum DeviceRemindType. + + * @systemapi Hide this for inner system use. + */ + readonly remindType?: number; +} \ No newline at end of file -- Gitee From 4e71e30653db9b511b2e9a7991b9a499749797f6 Mon Sep 17 00:00:00 2001 From: liqiang Date: Fri, 11 Feb 2022 10:20:33 +0800 Subject: [PATCH 005/163] IssueNo:https://gitee.com/openharmony/interface_sdk-js/issues/I4T8XM Description:add syscap declaration for wantagent module Sig: SIG_ApplicationFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: liqiang Change-Id: Id9908dd341ff1b7b17a82a95d1994f29a235ef20 --- api/@ohos.wantAgent.d.ts | 2 +- api/wantAgent/triggerInfo.d.ts | 2 +- api/wantAgent/wantAgentInfo.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.wantAgent.d.ts b/api/@ohos.wantAgent.d.ts index 17dd1c8aa2..15a908ec67 100644 --- a/api/@ohos.wantAgent.d.ts +++ b/api/@ohos.wantAgent.d.ts @@ -24,7 +24,7 @@ import { TriggerInfo } from './wantAgent/triggerInfo'; * * @name wantAgent * @since 7 - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import wantAgent from '@ohos.wantAgent'; * @permission N/A */ diff --git a/api/wantAgent/triggerInfo.d.ts b/api/wantAgent/triggerInfo.d.ts index 8cd951dce9..ff8eaea6e2 100644 --- a/api/wantAgent/triggerInfo.d.ts +++ b/api/wantAgent/triggerInfo.d.ts @@ -20,7 +20,7 @@ import { Want } from '../ability/want'; * * @name TriggerInfo * @since 7 - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export interface TriggerInfo { diff --git a/api/wantAgent/wantAgentInfo.d.ts b/api/wantAgent/wantAgentInfo.d.ts index f33531d327..c6e0bb37e1 100644 --- a/api/wantAgent/wantAgentInfo.d.ts +++ b/api/wantAgent/wantAgentInfo.d.ts @@ -21,7 +21,7 @@ import wantAgent from '../@ohos.wantAgent' * * @name WantAgentInfo * @since 7 - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export interface WantAgentInfo { -- Gitee From b1588f309136d08df2e77c03ecf22daf9e747183 Mon Sep 17 00:00:00 2001 From: PaDaBoo Date: Mon, 21 Feb 2022 17:32:43 +0800 Subject: [PATCH 006/163] Changes storage to preferences Signed-off-by: PaDaBoo --- api/@ohos.data.preferences.d.ts | 199 ++++++++++++++++++++++++++++++++ api/@ohos.data.storage.d.ts | 15 +++ 2 files changed, 214 insertions(+) create mode 100644 api/@ohos.data.preferences.d.ts diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts new file mode 100644 index 0000000000..c575537103 --- /dev/null +++ b/api/@ohos.data.preferences.d.ts @@ -0,0 +1,199 @@ +/* +* Copyright (c) 2022 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +import { AsyncCallback, Callback } from './basic'; +import Context from "./application/Context"; + +/** + * Provides interfaces to obtain and modify preferences data. + * + * @name preferences + * @since 8 + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * + */ +declare namespace preferences { + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + * + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param context Indicates the context of application or capability. + * @param name Indicates the preferences file name. + * @return Returns the {@link Preferences} instance matching the specified preferences file name. + * @throws BusinessError if invoked failed + * @since 8 + */ + function getPreferences(context: Context, name: string, callback: AsyncCallback): void; + function getPreferences(context: Context, name: string): Promise; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + * + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param context Indicates the context of application or capability. + * @param name Indicates the preferences file name. + * @throws BusinessError if invoked failed + * @since 8 + */ + function deletePreferences(context: Context, name: string, callback: AsyncCallback): void; + function deletePreferences(context: Context, name: string): Promise; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + * + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param context Indicates the context of application or capability. + * @param name Indicates the preferences file name. + * @throws BusinessError if invoked failed + * @since 8 + */ + function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback): void; + function removePreferencesFromCache(context: Context, name: string): Promise; + + /** + * Provides interfaces to obtain and modify preferences data. + * + *

The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory. + * You can use getPreferences to obtain the {@link Preferences} instance matching + * the file that stores preferences data, and use emovePreferencesFromCache + * to remove the {@link Preferences} instance from the memory. + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * + * @since 8 + */ + interface Preferences { + /** + * Obtains the value of a preferences in the int format. + * + *

If the value is {@code null} or not in the int format, the default value is returned. + * + * @param key Indicates the key of the preferences. It cannot be {@code null} or empty. + * @param defValue Indicates the default value to return. + * @return Returns the value matching the specified key if it is found; returns the default value otherwise. + * @throws BusinessError if invoked failed + * @since 8 + */ + get(key: string, defValue: ValueType, callback: AsyncCallback): void; + get(key: string, defValue: ValueType): Promise; + + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. + * + * @param key Indicates the key of the preferences to check for. + * @return Returns {@code true} if the {@link Preferences} object contains a preferences with the specified key; + * returns {@code false} otherwise. + * @throws BusinessError if invoked failed + * @since 8 + */ + has(key: string, callback: AsyncCallback): boolean; + has(key: string): Promise; + + /** + * Sets an int value for the key in the {@link Preferences} object. + * + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + * + * @param key Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * @param value Indicates the value of the preferences. + * MAX_KEY_LENGTH. + * @throws BusinessError if invoked failed + * @since 8 + */ + put(key: string, value: ValueType, callback: AsyncCallback): void; + put(key: string, value: ValueType): Promise; + + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. + * + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + * + * @param key Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @throws BusinessError if invoked failed + * @since 8 + */ + delete(key: string, callback: AsyncCallback): void; + delete(key: string): Promise; + + /** + * Clears all preferences from the {@link Preferences} object. + * + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + * + * @throws BusinessError if invoked failed + * @since 8 + */ + clear(callback: AsyncCallback): void; + clear(): Promise; + + /** + * Asynchronously saves the {@link Preferences} object to the file. + * + * @throws BusinessError if invoked failed + * @since 8 + */ + flush(callback: AsyncCallback): void; + flush(): Promise; + + /** + * Registers an observer to listen for the change of a {@link Preferences} object. + * + * @param callback Indicates the callback when preferences changes. + * @throws BusinessError if invoked failed + * @since 8 + */ + on(type: 'change', callback: Callback<{ key: string }>): void; + + /** + * Unregisters an existing observer. + * + * @param callback Indicates the registered callback. + * @throws BusinessError if invoked failed + * @since 8 + */ + off(type: 'change', callback: Callback<{ key: string }>): void; + } + + /** + * Indicates possible value types + */ + type ValueType = number | string | boolean; + + /** + * Indicates the maximum length of a key (80 characters). + */ + const MAX_KEY_LENGTH: 80; + + /** + * Indicates the maximum length of a string (8192 characters). + */ + const MAX_VALUE_LENGTH: 8192; +} + +export default preferences; \ No newline at end of file diff --git a/api/@ohos.data.storage.d.ts b/api/@ohos.data.storage.d.ts index 10190d3808..15c6b1b06b 100644 --- a/api/@ohos.data.storage.d.ts +++ b/api/@ohos.data.storage.d.ts @@ -19,6 +19,7 @@ import { AsyncCallback, Callback } from './basic'; * * @name storage * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. * @syscap SystemCapability.DistributedDataManager.Preferences.Core * */ @@ -33,7 +34,9 @@ declare namespace storage { * @return Returns the {@link Storage} instance matching the specified storage file name. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ + function getStorageSync(path: string): Storage; function getStorage(path: string, callback: AsyncCallback): void; function getStorage(path: string): Promise; @@ -50,6 +53,7 @@ declare namespace storage { * @param path Indicates the path of storage file * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ function deleteStorageSync(path: string): void; function deleteStorage(path: string, callback: AsyncCallback): void; @@ -66,6 +70,7 @@ declare namespace storage { * @param path Indicates the path of storage file. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ function removeStorageFromCacheSync(path: string): void; function removeStorageFromCache(path: string, callback: AsyncCallback): void; @@ -82,6 +87,7 @@ declare namespace storage { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ interface Storage { /** @@ -94,6 +100,7 @@ declare namespace storage { * @return Returns the value matching the specified key if it is found; returns the default value otherwise. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ getSync(key: string, defValue: ValueType): ValueType; get(key: string, defValue: ValueType, callback: AsyncCallback): void; @@ -107,6 +114,7 @@ declare namespace storage { * returns {@code false} otherwise. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ hasSync(key: string): boolean; has(key: string, callback: AsyncCallback): boolean; @@ -123,6 +131,7 @@ declare namespace storage { * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ putSync(key: string, value: ValueType): void; put(key: string, value: ValueType, callback: AsyncCallback): void; @@ -138,6 +147,7 @@ declare namespace storage { * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ deleteSync(key: string): void; delete(key: string, callback: AsyncCallback): void; @@ -151,6 +161,7 @@ declare namespace storage { * * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ clearSync(): void; clear(callback: AsyncCallback): void; @@ -161,6 +172,7 @@ declare namespace storage { * * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ flushSync(): void; flush(callback: AsyncCallback): void; @@ -172,6 +184,7 @@ declare namespace storage { * @param callback Indicates the callback when storage changes. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ on(type: 'change', callback: Callback): void; @@ -181,6 +194,7 @@ declare namespace storage { * @param callback Indicates the registered callback. * @throws BusinessError if invoked failed * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ off(type: 'change', callback: Callback): void; } @@ -196,6 +210,7 @@ declare namespace storage { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * * @since 5 + * @deprecated since 8, please use @ohos.data.preferences instead. */ interface StorageObserver { /** -- Gitee From 0eefe94fbee5389bb3b0a7402099df4336b96db5 Mon Sep 17 00:00:00 2001 From: chyyy0213 Date: Mon, 21 Feb 2022 10:47:40 +0800 Subject: [PATCH 007/163] add permission for create Signed-off-by: chyyy0213 Change-Id: Ifaa413939e83468e8ab3c7617deef84feea9338c --- api/@ohos.window.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 868d38934d..62d9ac3eb7 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -86,6 +86,7 @@ declare namespace window { * @param id Indicates window id. * @param type Indicates window type. * @systemapi Hide this for inner system use. + * @permission ohos.permission.SYSTEM_FLOAT_WINDOW * @since 8 */ function create(ctx: Context, id: string, type: WindowType): Promise; -- Gitee From 6109d29b203a7e811591f4736eeb66e42f8424fb Mon Sep 17 00:00:00 2001 From: njupthan Date: Tue, 22 Feb 2022 19:31:36 +0800 Subject: [PATCH 008/163] Update d.ts Signed-off-by: njupthan --- ....application.abilityDelegatorRegistry.d.ts | 16 ++-- api/@ohos.application.testRunner.d.ts | 9 +-- api/application/abilityDelegator.d.ts | 81 +++++++++---------- api/application/abilityDelegatorArgs.d.ts | 11 +-- api/application/abilityMonitor.d.ts | 11 +-- api/application/shellCmdResult.d.ts | 5 +- 6 files changed, 52 insertions(+), 81 deletions(-) diff --git a/api/@ohos.application.abilityDelegatorRegistry.d.ts b/api/@ohos.application.abilityDelegatorRegistry.d.ts index 0293d32f0d..81de8836d1 100644 --- a/api/@ohos.application.abilityDelegatorRegistry.d.ts +++ b/api/@ohos.application.abilityDelegatorRegistry.d.ts @@ -20,37 +20,31 @@ import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs' /** * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered * during application startup. - * 在应用程序启动期间,保存AbilityDelegator和AbilityDelegatorArgs对象的全局存储器 * - * @since 8 + * @since 9 * @SysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car - * @import import abilityManager from '@ohos.application.abilityManager' + * @import import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' * @permission N/A */ declare namespace abilityDelegatorRegistry { /** * Get the AbilityDelegator object of the application. - * 异步方式获取应用程序的AbilityDelegator对象 * @return the AbilityDelegator object initialized when the application is started. - * 应用程序启动时被初始化的AbilityDelegator对象 */ - function getAbilityDelegator(callback: AsyncCallback): void; - function getAbilityDelegator(): Promise; + function getAbilityDelegator(): AbilityDelegator; /** * Get unit test parameters stored in the AbilityDelegatorArgs object. - * 异步的方式获取单元测试参数AbilityDelegatorArgs对象 * @return the previously registered AbilityDelegatorArgs object. - * 单元测试参数AbilityDelegatorArgs对象 */ - function getArguments(callback: AsyncCallback): void; - function getArguments(): Promise;​ + function getArguments(): AbilityDelegatorArgs; /** * Describes all lifecycle states of an ability. */ export enum AbilityLifecycleState { + UNINITIALIZED, CREATE, FOREGROUND, BACKGROUND, diff --git a/api/@ohos.application.testRunner.d.ts b/api/@ohos.application.testRunner.d.ts index 994bc70efe..41b228c1f5 100644 --- a/api/@ohos.application.testRunner.d.ts +++ b/api/@ohos.application.testRunner.d.ts @@ -16,9 +16,8 @@ /** * Base class for the test framework. * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. - * 测试框架的执行器基类 * - * @since 8 + * @since 9 * @SysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car * @import import TestRunner from '@ohos.application.testRunner' @@ -27,15 +26,13 @@ export interface TestRunner { /** * Prepare the unit testing environment for running test cases. - * 为执行器准备单元测试环境 */ - onPrepare​(): void; + onPrepare(): void; /** * Run all test cases. - * 运行所有的测试用例 */ - onRun​(): void; + onRun(): void; } export default TestRunner; \ No newline at end of file diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index 861e73f172..80cd8ea991 100644 --- a/api/application/abilityDelegator.d.ts +++ b/api/application/abilityDelegator.d.ts @@ -22,7 +22,7 @@ import { ShellCmdResult } from './shellCmdResult' /** * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities. * - * @since 8 + * @since 9 * @SysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car * @import import AbilityDelegator from 'application/abilityDelegator.d' @@ -31,70 +31,60 @@ import { ShellCmdResult } from './shellCmdResult' export interface AbilityDelegator { /** * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability. - * 添加AbilityMonitor实例,用于监听ability生命周期变换 - * @param monitor AbilityMonitor实例 + * @param monitor AbilityMonitor object */ - addAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; - addAbilityMonitor​(monitor: AbilityMonitor): Promise; + addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; + addAbilityMonitor(monitor: AbilityMonitor): Promise; /** * Remove a specified AbilityMonitor object from the application memory. - * 删除已经添加的AbilityMonitor实例 - * @param monitor AbilityMonitor实例 + * @param monitor AbilityMonitor object */ - removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void;​ + removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; removeAbilityMonitor(monitor: AbilityMonitor): Promise; /** * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. - * 等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例 - * @param monitor AbilityMonitor实例 - * @param timeout 最大等待时间,单位毫秒 - * @return 如果监听到与指定AbilityMonitor实例匹配的Abilityability到达OnCreate生命周期,则返回ability实例;否则返回空 + * @param monitor AbilityMonitor object + * @param timeout Maximum wait time, in milliseconds + * @return success: return the Ability object, failure: return null */ - waitAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; - waitAbilityMonitor​(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void; - waitAbilityMonitor​(monitor: AbilityMonitor, timeout?: number): Promise; + waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; + waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void; + waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise; /** * Obtain the application context. - * 异步方式获取应用Context,通过异步回调将Context实例返回 - * @return 应用Context + * @return App Context */ - getAppContext(callback: AsyncCallback): void; - getAppContext(): Promise; + getAppContext(): Context; /** * Obtain the lifecycle state of a specified ability. - * 异步方式获取指定ability状态 - * @param ability 指定Ability对象 - * @return 指定Ability对象的状态 + * @param ability The Ability object + * @return The state of the Ability object */ - getAbilityState(ability: Ability, callback: AsyncCallback): void; - getAbilityState(ability: Ability): Promise; + getAbilityState(ability: Ability): number; /** * Obtain the ability that is currently being displayed. - * 异步方式获取当前应用顶部ability - * @return 当前应用顶部ability + * @return The top ability of the current application */ getCurrentTopAbility(callback: AsyncCallback): void; getCurrentTopAbility(): Promise /** * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state. - * 异步方式调度指定ability生命周期状态到Foreground状态 - * @param ability 指定Ability对象 - * @return true: 成功 false: 失败 + * @param ability The ability object + * @return true: success false: failure */ doAbilityForeground(ability: Ability, callback: AsyncCallback): void; doAbilityForeground(ability: Ability): Promise; /** * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state. - * 异步方式调度指定ability生命周期状态到Background状态 - * @param ability 指定Ability对象 - * @return true: 成功 false: 失败 + * @param ability The ability object + * @return true: success false: failure */ doAbilityBackground(ability: Ability, callback: AsyncCallback): void; doAbilityBackground(ability: Ability): Promise; @@ -102,23 +92,30 @@ export interface AbilityDelegator { /** * Prints log information to the unit testing console. * The total length of the log information to be printed cannot exceed 1000 characters. - * 异步方式打印日志信息到单元测试终端控制台 - * 日志信息字符串长度最大不超过1000个字符 - * @param msg 日志字符串 + * @param msg Log information */ print(msg: string, callback: AsyncCallback): void; print(msg: string): Promise; /** * Execute the given command in the aa tools side. - * 异步方式执行指定的shell命令 - * @param cmd shell命令字符串 - * @param timeoutSecs 超时时间,单位秒 - * @return shell命令的执行结果ShellCmdResult对象 + * @param cmd Shell command + * @param timeoutSecs Timeout, in seconds + * @return ShellCmdResult object */ - executeShellCommand(cmd: string, callback: AsyncCallback): void;​ - executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void;​ - executeShellCommand(cmd: string, timeoutSecs?: number): Promise;​ + executeShellCommand(cmd: string, callback: AsyncCallback): void; + executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void; + executeShellCommand(cmd: string, timeoutSecs?: number): Promise; + + /** + * Prints log information to the unit testing console. + * The total length of the log information to be printed cannot exceed 1000 characters. + * @param msg Log information + * @param code Result code + * @hide + */ + finishTest(msg: string, code: number, callback: AsyncCallback): void; + finishTest(msg: string, code: number): Promise; } export default AbilityDelegator; \ No newline at end of file diff --git a/api/application/abilityDelegatorArgs.d.ts b/api/application/abilityDelegatorArgs.d.ts index 6cad52981b..2f0a508824 100644 --- a/api/application/abilityDelegatorArgs.d.ts +++ b/api/application/abilityDelegatorArgs.d.ts @@ -16,9 +16,8 @@ /** * Store unit testing-related parameters, including test case names, and test runner name. - * 存储单元测试相关的参数,包括测试用例名称,测试用例执行器名称 * - * @since 8 + * @since 9 * @SysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car * @import import AbilityDelegatorArgs from 'application/abilityDelegatorArgs.d' @@ -27,27 +26,23 @@ export interface AbilityDelegatorArgs { /** * the bundle name of the application being tested. - * 表示当前被测试应用的包名 */ bundleName: string; /** * the parameters used for unit testing. - * 表示当前启动单元测试的参数 */ - parameters​: {[key: string]: string}; + parameters: {[key: string]: string}; /** * the class names of all test cases. - * 测试用例名称 */ testCaseNames: string; /** * the class name of the test runner used to execute test cases. - * 执行测试用例的测试执行器的名称 */ - testRunnerClassName: string;​ + testRunnerClassName: string; } export default AbilityDelegatorArgs; \ No newline at end of file diff --git a/api/application/abilityMonitor.d.ts b/api/application/abilityMonitor.d.ts index 9bdf341e18..72705575a0 100644 --- a/api/application/abilityMonitor.d.ts +++ b/api/application/abilityMonitor.d.ts @@ -16,9 +16,8 @@ /** * Provide methods for matching monitored Ability objects that meet specified conditions. * The most recently matched Ability objects will be saved in the AbilityMonitor object. - * 监听指定Ability生命周期状态变化的监听器 * - * @since 8 + * @since 9 * @SysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car * @import import AbilityMonitor from 'application/abilityMonitor.d' @@ -27,49 +26,41 @@ export interface AbilityMonitor { /** * The name of the ability to monitor. - * 表示当前AbilityMonitor绑定的ability name */ abilityName: string; /** * Called back when the ability is started for initialization. - * ability被启动初始化时的回调函数 */ onAbilityCreate?:() => void; /** * Called back when the state of the ability changes to foreground. - * ability状态变成前台时的回调函数 */ onAbilityForeground?:() => void; /** * Called back when the state of the ability changes to background. - * ability状态变成后台时的回调函数 */ onAbilityBackground?:() => void; /** * Called back before the ability is destroyed. - * ability被销毁前的回调函数 */ onAbilityDestroy?:() => void; /** * Called back when an ability window stage is created. - * window stage被创建时的回调函数 */ onWindowStageCreate?:() => void; /** * Called back when an ability window stage is restored. - * window stage被重载时的回调函数 */ onWindowStageRestore?:() => void; /** * Called back when an ability window stage is destroyed. - * window stage被销毁前的回调函数 */ onWindowStageDestroy?:() => void; } diff --git a/api/application/shellCmdResult.d.ts b/api/application/shellCmdResult.d.ts index 4eebad7cc9..3dc6ab2dc5 100644 --- a/api/application/shellCmdResult.d.ts +++ b/api/application/shellCmdResult.d.ts @@ -15,9 +15,8 @@ /** * A object that records the result of shell command executes. - * 执行shell命令的结果 * - * @since 8 + * @since 9 * @SysCap SystemCapability.Appexecfwk * @devices phone, tablet, tv, wearable, car * @import import ShellCmdResult from 'application/shellCmdResult.d' @@ -26,13 +25,11 @@ export interface ShellCmdResult { /** * the cmd standard result. - * shell命令标准输出结果 */ stdResult: String; /** * shell cmd exec result. - * shell命令执行的结果 */ exitCode: number; } -- Gitee From 9713dba6743429ae3f0cc50e15fd2db5168d8287 Mon Sep 17 00:00:00 2001 From: njupthan Date: Wed, 23 Feb 2022 16:26:56 +0800 Subject: [PATCH 009/163] Update d.ts Signed-off-by: njupthan --- ....application.abilityDelegatorRegistry.d.ts | 13 ++++-- api/@ohos.application.testRunner.d.ts | 9 ++++- api/application/abilityDelegator.d.ts | 40 +++++++++++++++++-- api/application/abilityDelegatorArgs.d.ts | 15 ++++++- api/application/abilityMonitor.d.ts | 27 ++++++++++++- api/application/shellCmdResult.d.ts | 9 ++++- 6 files changed, 98 insertions(+), 15 deletions(-) diff --git a/api/@ohos.application.abilityDelegatorRegistry.d.ts b/api/@ohos.application.abilityDelegatorRegistry.d.ts index 81de8836d1..8a8443d4ee 100644 --- a/api/@ohos.application.abilityDelegatorRegistry.d.ts +++ b/api/@ohos.application.abilityDelegatorRegistry.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ -import { AsyncCallback } from './basic'; import { AbilityDelegator } from './application/abilityDelegator' import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs' @@ -22,26 +21,34 @@ import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs' * during application startup. * * @since 9 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' * @permission N/A */ declare namespace abilityDelegatorRegistry { /** * Get the AbilityDelegator object of the application. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @return the AbilityDelegator object initialized when the application is started. */ function getAbilityDelegator(): AbilityDelegator; /** * Get unit test parameters stored in the AbilityDelegatorArgs object. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @return the previously registered AbilityDelegatorArgs object. */ function getArguments(): AbilityDelegatorArgs; /** * Describes all lifecycle states of an ability. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ export enum AbilityLifecycleState { UNINITIALIZED, diff --git a/api/@ohos.application.testRunner.d.ts b/api/@ohos.application.testRunner.d.ts index 41b228c1f5..6ae4908fcd 100644 --- a/api/@ohos.application.testRunner.d.ts +++ b/api/@ohos.application.testRunner.d.ts @@ -18,19 +18,24 @@ * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. * * @since 9 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @import import TestRunner from '@ohos.application.testRunner' * @permission N/A */ export interface TestRunner { /** * Prepare the unit testing environment for running test cases. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onPrepare(): void; /** * Run all test cases. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onRun(): void; } diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index 80cd8ea991..729694b38f 100644 --- a/api/application/abilityDelegator.d.ts +++ b/api/application/abilityDelegator.d.ts @@ -23,14 +23,16 @@ import { ShellCmdResult } from './shellCmdResult' * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities. * * @since 9 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityDelegator from 'application/abilityDelegator.d' * @permission N/A */ export interface AbilityDelegator { /** * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param monitor AbilityMonitor object */ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; @@ -38,6 +40,9 @@ export interface AbilityDelegator { /** * Remove a specified AbilityMonitor object from the application memory. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param monitor AbilityMonitor object */ removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; @@ -45,6 +50,9 @@ export interface AbilityDelegator { /** * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param monitor AbilityMonitor object * @param timeout Maximum wait time, in milliseconds * @return success: return the Ability object, failure: return null @@ -55,19 +63,28 @@ export interface AbilityDelegator { /** * Obtain the application context. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @return App Context */ getAppContext(): Context; /** * Obtain the lifecycle state of a specified ability. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param ability The Ability object - * @return The state of the Ability object + * @return The state of the Ability object. enum AbilityLifecycleState */ getAbilityState(ability: Ability): number; /** * Obtain the ability that is currently being displayed. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @return The top ability of the current application */ getCurrentTopAbility(callback: AsyncCallback): void; @@ -75,6 +92,9 @@ export interface AbilityDelegator { /** * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param ability The ability object * @return true: success false: failure */ @@ -83,6 +103,9 @@ export interface AbilityDelegator { /** * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param ability The ability object * @return true: success false: failure */ @@ -92,6 +115,9 @@ export interface AbilityDelegator { /** * Prints log information to the unit testing console. * The total length of the log information to be printed cannot exceed 1000 characters. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param msg Log information */ print(msg: string, callback: AsyncCallback): void; @@ -99,6 +125,9 @@ export interface AbilityDelegator { /** * Execute the given command in the aa tools side. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @param cmd Shell command * @param timeoutSecs Timeout, in seconds * @return ShellCmdResult object @@ -110,9 +139,12 @@ export interface AbilityDelegator { /** * Prints log information to the unit testing console. * The total length of the log information to be printed cannot exceed 1000 characters. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @hide * @param msg Log information * @param code Result code - * @hide */ finishTest(msg: string, code: number, callback: AsyncCallback): void; finishTest(msg: string, code: number): Promise; diff --git a/api/application/abilityDelegatorArgs.d.ts b/api/application/abilityDelegatorArgs.d.ts index 2f0a508824..fb9905a667 100644 --- a/api/application/abilityDelegatorArgs.d.ts +++ b/api/application/abilityDelegatorArgs.d.ts @@ -18,29 +18,40 @@ * Store unit testing-related parameters, including test case names, and test runner name. * * @since 9 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityDelegatorArgs from 'application/abilityDelegatorArgs.d' * @permission N/A */ export interface AbilityDelegatorArgs { /** * the bundle name of the application being tested. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ bundleName: string; /** * the parameters used for unit testing. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ parameters: {[key: string]: string}; /** * the class names of all test cases. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ testCaseNames: string; /** * the class name of the test runner used to execute test cases. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ testRunnerClassName: string; } diff --git a/api/application/abilityMonitor.d.ts b/api/application/abilityMonitor.d.ts index 72705575a0..71215ba908 100644 --- a/api/application/abilityMonitor.d.ts +++ b/api/application/abilityMonitor.d.ts @@ -18,49 +18,72 @@ * The most recently matched Ability objects will be saved in the AbilityMonitor object. * * @since 9 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityMonitor from 'application/abilityMonitor.d' * @permission N/A */ export interface AbilityMonitor { /** * The name of the ability to monitor. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ abilityName: string; /** * Called back when the ability is started for initialization. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityCreate?:() => void; /** * Called back when the state of the ability changes to foreground. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityForeground?:() => void; /** * Called back when the state of the ability changes to background. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityBackground?:() => void; /** * Called back before the ability is destroyed. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityDestroy?:() => void; /** * Called back when an ability window stage is created. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onWindowStageCreate?:() => void; /** * Called back when an ability window stage is restored. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onWindowStageRestore?:() => void; /** * Called back when an ability window stage is destroyed. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ onWindowStageDestroy?:() => void; } diff --git a/api/application/shellCmdResult.d.ts b/api/application/shellCmdResult.d.ts index 3dc6ab2dc5..ac951d855c 100644 --- a/api/application/shellCmdResult.d.ts +++ b/api/application/shellCmdResult.d.ts @@ -17,19 +17,24 @@ * A object that records the result of shell command executes. * * @since 9 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @import import ShellCmdResult from 'application/shellCmdResult.d' * @permission N/A */ export interface ShellCmdResult { /** * the cmd standard result. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ stdResult: String; /** * shell cmd exec result. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.Core */ exitCode: number; } -- Gitee From 806d2339d38e8fb3fff3868bb961856013fe6f75 Mon Sep 17 00:00:00 2001 From: njupthan Date: Wed, 23 Feb 2022 18:04:21 +0800 Subject: [PATCH 010/163] update d.ts file Signed-off-by: njupthan --- api/@ohos.notification.d.ts | 131 +++++++++++++++--- .../notificationActionButton.d.ts | 5 +- api/notification/notificationRequest.d.ts | 22 ++- api/notification/notificationSubscriber.d.ts | 27 +++- 4 files changed, 150 insertions(+), 35 deletions(-) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index a967820681..4fd30fa4b3 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -32,8 +32,7 @@ import { NotificationRequest } from './notification/notificationRequest'; * * @name notification * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @import import notification from '@ohos.notification'; * @permission N/A */ @@ -44,23 +43,37 @@ declare namespace notification { *

If a notification with the same ID has been published by the current application and has not been deleted, * this method will update the notification. * - * @param Publishes a notification. + * @param request notification request + * @param callback callback function */ function publish(request: NotificationRequest, callback: AsyncCallback): void; function publish(request: NotificationRequest): Promise; + /** + * Publishes a notification to the specified user. + * + * @since 8 + * @param Publishes a notification. + * @param userId of subscriber receiving the notification + * + */ + function publish(request: NotificationRequest, userId: number, callback: AsyncCallback): void; + function publish(request: NotificationRequest, userId: number): Promise; + /** * Cancels a notification with the specified ID. * - * @param ID of the notification to cancel, which must be unique in the application. + * @param id of the notification to cancel, which must be unique in the application. + * @param callback callback function */ function cancel(id: number, callback: AsyncCallback): void; /** * Cancels a notification with the specified label and ID. * - * @param ID of the notification to cancel, which must be unique in the application. - * @param Label of the notification to cancel. + * @param id ID of the notification to cancel, which must be unique in the application. + * @param label Label of the notification to cancel. + * @param callback callback function */ function cancel(id: number, label: string, callback: AsyncCallback): void; function cancel(id: number, label?: string): Promise; @@ -76,8 +89,9 @@ declare namespace notification { * * @param slot Indicates the notification slot to be created, which is set by {@link NotificationSlot}. * This parameter must be specified. - * + * @param callback callback function * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function addSlot(slot: NotificationSlot, callback: AsyncCallback): void; @@ -88,13 +102,15 @@ declare namespace notification { * This parameter must be specified. * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function addSlot(slot: NotificationSlot): Promise; /** * Adds a slot type. * - * @param Slot type to add. + * @param type Slot type to add. + * @param callback callback function */ function addSlot(type: SlotType, callback: AsyncCallback): void; function addSlot(type: SlotType): Promise; @@ -104,8 +120,9 @@ declare namespace notification { * * @param slots Indicates the notification slots to be created, which is set by {@link NotificationSlot}. * This parameter must be specified. - * + * @param callback callback function * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function addSlots(slots: Array, callback: AsyncCallback): void; @@ -116,14 +133,15 @@ declare namespace notification { * This parameter must be specified. * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function addSlots(slots: Array): Promise; /** * Obtains a notification slot of the specified slot type. * - * @param Type of the notification slot to obtain. - * + * @param slotType Type of the notification slot to obtain. + * @param callback callback function * @return Returns the created {@link NotificationSlot}. */ function getSlot(slotType: SlotType, callback: AsyncCallback): void; @@ -140,7 +158,8 @@ declare namespace notification { /** * Removes a NotificationSlot of the specified SlotType created by the current application. * - * @param Type of the NotificationSlot to remove. + * @param slotType Type of the NotificationSlot to remove. + * @param callback callback function */ function removeSlot(slotType: SlotType, callback: AsyncCallback): void; function removeSlot(slotType: SlotType): Promise; @@ -186,8 +205,7 @@ declare namespace notification { * * @name ContentType * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export enum ContentType { @@ -311,6 +329,7 @@ declare namespace notification { * isNotificationEnabled * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isNotificationEnabled(bundle: BundleOption, callback: AsyncCallback): void; @@ -318,6 +337,7 @@ declare namespace notification { * isNotificationEnabled * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isNotificationEnabled(bundle: BundleOption): Promise; @@ -325,6 +345,7 @@ declare namespace notification { * isNotificationEnabled * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isNotificationEnabled(callback: AsyncCallback): void; @@ -332,13 +353,25 @@ declare namespace notification { * isNotificationEnabled * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isNotificationEnabled(): Promise; + /** + * Checks whether this application has permission to publish notifications under the user. + * + * since 8 + * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER + */ + function isNotificationEnabled(userId: number, callback: AsyncCallback): void; + function isNotificationEnabled(userId: number): Promise; + /** * displayBadge * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function displayBadge(bundle: BundleOption, enable: boolean, callback: AsyncCallback): void; @@ -346,6 +379,7 @@ declare namespace notification { * displayBadge * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function displayBadge(bundle: BundleOption, enable: boolean): Promise; @@ -353,6 +387,7 @@ declare namespace notification { * isBadgeDisplayed * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isBadgeDisplayed(bundle: BundleOption, callback: AsyncCallback): void; @@ -360,6 +395,7 @@ declare namespace notification { * isBadgeDisplayed * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isBadgeDisplayed(bundle: BundleOption): Promise; @@ -399,6 +435,7 @@ declare namespace notification { * getSlotNumByBundle * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback): void; @@ -406,6 +443,7 @@ declare namespace notification { * getSlotNumByBundle * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function getSlotNumByBundle(bundle: BundleOption): Promise; @@ -457,6 +495,16 @@ declare namespace notification { */ function removeAll(callback: AsyncCallback): void; + /** + * Remove all notifications under the specified user. + * + * @since 8 + * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER + */ + function removeAll(userId: number, callback: AsyncCallback): void; + function removeAll(userId: number): Promise; + /** * removeAll * @@ -523,6 +571,16 @@ declare namespace notification { function setDoNotDisturbDate(date: DoNotDisturbDate, callback: AsyncCallback): void; function setDoNotDisturbDate(date: DoNotDisturbDate): Promise; + /** + * Set the Do Not Disturb date under the specified user. + * + * @since 8 + * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER + */ + function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number, callback: AsyncCallback): void; + function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number): Promise; + /** * Obtains the Do Not Disturb date. * @@ -533,6 +591,16 @@ declare namespace notification { function getDoNotDisturbDate(callback: AsyncCallback): void; function getDoNotDisturbDate(): Promise; + /** + * Obtains the Do Not Disturb date. + * + * @since 8 + * @systemapi Hide this for inner system use under the specified user. + * @permission ohos.permission.NOTIFICATION_CONTROLLER + */ + function getDoNotDisturbDate(userId: number, callback: AsyncCallback): void; + function getDoNotDisturbDate(userId: number): Promise; + /** * Obtains whether to support the Do Not Disturb mode. * @@ -548,15 +616,33 @@ declare namespace notification { * * @since 8 * @param templateName Name of template to be Obtained + * @param callback callback function */ function isSupportTemplate(templateName: string, callback: AsyncCallback): void; function isSupportTemplate(templateName: string): Promise; + /** + * Query notification sending permission. + * + * @since 8 + */ + function isNotificationEnabledSelf(callback: AsyncCallback): void; + function isNotificationEnabledSelf(): Promise; + + /** + * Request permission to send notification. + * + * @since 8 + */ + function requestEnableNotification(callback: AsyncCallback): void; + function requestEnableNotification(): Promise; + /** * Sets whether the device supports distributed notification. * * @since 8 * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function enableDistributed(enable: boolean, callback: AsyncCallback): void; function enableDistributed(enable: boolean): Promise; @@ -574,32 +660,35 @@ declare namespace notification { * * @since 8 * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function enableDistributedByBundle(bundle: BundleOption, enable: boolean, callback: AsyncCallback): void; function enableDistributedByBundle(bundle: BundleOption, enable: boolean): Promise; /** - * Sets whether the application supports distributed notification. + * Obtains whether an application supports distributed notification. * * @since 8 + * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ - function enableDistributedSelf(enable: boolean, callback: AsyncCallback): void; - function enableDistributedSelf(enable: boolean): Promise; + function isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback): void; + function isDistributedEnabledByBundle(bundle: BundleOption): Promise; /** - * Obtains whether an application supports distributed notification. + * Sets whether the application supports distributed notification. * * @since 8 - * @systemapi Hide this for inner system use. */ - function isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback): void; - function isDistributedEnabledByBundle(bundle: BundleOption): Promise; + function enableDistributedSelf(enable: boolean, callback: AsyncCallback): void; + function enableDistributedSelf(enable: boolean): Promise; /** * Obtains the remind modes of the notification. * * @since 8 * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function getDeviceRemindType(callback: AsyncCallback): void; function getDeviceRemindType(): Promise; diff --git a/api/notification/notificationActionButton.d.ts b/api/notification/notificationActionButton.d.ts index d67934492a..cd67a4452b 100644 --- a/api/notification/notificationActionButton.d.ts +++ b/api/notification/notificationActionButton.d.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http?://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,9 +20,8 @@ import { WantAgent } from '../@ohos.wantAgent'; * Describes an action button displayed in a notification. * @name NotificationActionButton * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission N/A - * @sysCap SystemCapability.Notification.ANS + * @syscap SystemCapability.Notification.Notification */ export interface NotificationActionButton { /** diff --git a/api/notification/notificationRequest.d.ts b/api/notification/notificationRequest.d.ts index 07f15c39a4..e68532b8c9 100644 --- a/api/notification/notificationRequest.d.ts +++ b/api/notification/notificationRequest.d.ts @@ -19,14 +19,14 @@ import { WantAgent } from '../@ohos.wantAgent'; import { NotificationContent } from './notificationContent'; import { NotificationActionButton } from './notificationActionButton'; import { NotificationTemplate } from './notificationTemplate'; +import { NotificationFlags } from './notificationFlags'; /** * Defines a NotificationRequest instance. * * @name NotificationRequest * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export interface NotificationRequest { @@ -162,6 +162,11 @@ export interface NotificationRequest { */ readonly creatorPid?: number; + /** + * Read-only UserId of the notification creator. + */ + readonly creatorUserId?: number; + /** * Obtains the classification of this notification. * @@ -212,16 +217,21 @@ export interface NotificationRequest { * @systemapi Hide this for inner system use. */ readonly deviceId?: string; -} + /** + * Obtains the set of identifiers for the notification. + * + * @since 8 + */ + readonly notificationFlags?: NotificationFlags; +} /** * Describes distributed options. * * @name DistributedOptions * @since 8 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @sysCap SystemCapability.Notification.Notification * @permission N/A */ export interface DistributedOptions { @@ -248,4 +258,4 @@ export interface DistributedOptions { * @systemapi Hide this for inner system use. */ readonly remindType?: number; -} \ No newline at end of file +} diff --git a/api/notification/notificationSubscriber.d.ts b/api/notification/notificationSubscriber.d.ts index d8e2277bc7..d14e59c088 100644 --- a/api/notification/notificationSubscriber.d.ts +++ b/api/notification/notificationSubscriber.d.ts @@ -22,8 +22,7 @@ import notification from '../@ohos.notification'; * a notification is canceled. * * @name NotificationSubscriber - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A * @systemapi Hide this for inner system use. * @since 7 @@ -35,7 +34,6 @@ export interface NotificationSubscriber { onConnect?:() => void; onDisconnect?:() => void; onDestroy?:() => void; - onDisturbModeChange?:(mode: notification.DoNotDisturbMode) => void; /** * Callback when the Do Not Disturb setting changed. @@ -43,6 +41,13 @@ export interface NotificationSubscriber { * @since 8 */ onDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => void; + + /** + * Callback when the notificaition permission is changed. + * + * @since 8 + */ + onEnabledNotificationChanged?:(callbackData: EnabledNotificationCallbackData) => void; } /** @@ -50,8 +55,7 @@ export interface NotificationSubscriber { * a notification is canceled. * * @name SubscribeCallbackData - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A * @systemapi Hide this for inner system use. * @since 7 @@ -62,4 +66,17 @@ export interface SubscribeCallbackData { readonly reason?: number; readonly sound?: string; readonly vibrationValues?: Array; +} + +/** + * Describes the properties of the application that the permission to send notifications has changed. + * + * @name EnabledNotificationCallbackData + * @systemapi Hide this for inner system use. + * @since 8 + */ +export interface EnabledNotificationCallbackData { + readonly bundle: string; + readonly uid: number; + readonly enable: boolean; } \ No newline at end of file -- Gitee From 527fd8f634ab526f06d357e805ec5c1df32f1381 Mon Sep 17 00:00:00 2001 From: njupthan Date: Wed, 23 Feb 2022 18:20:07 +0800 Subject: [PATCH 011/163] update d.ts file Signed-off-by: njupthan --- api/@ohos.notification.d.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index 9c6ba7ef52..4fd30fa4b3 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -349,15 +349,6 @@ declare namespace notification { */ function isNotificationEnabled(callback: AsyncCallback): void; - /** - * Checks whether this application has permission to publish notifications under the user. - * - * since 8 - * @systemapi Hide this for inner system use. - */ - function isNotificationEnabled(userId: number, callback: AsyncCallback): void; - function isNotificationEnabled(userId: number): Promise; - /** * isNotificationEnabled * -- Gitee From a51736abab69614c1a4db9c151acc75fe5c0857a Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Wed, 23 Feb 2022 19:43:42 +0800 Subject: [PATCH 012/163] modify sidebar according comment Signed-off-by: yaoyuchi --- api/@internal/component/ets/sidebar.d.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index 083b948e47..bc58cec239 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -17,7 +17,7 @@ * Sets the sidebar style of showing * @since 8 */ -declare enum SideBarContainerStyle { +declare enum SideBarContainerType { /** * The sidebar invisible * @since 8 @@ -73,9 +73,7 @@ interface SideBarContainerInterface { * Called when showing the sidebar of a block entry. * @since 8 */ - (options?: { showSideBarContainer?: boolean, - style?: SideBarContainerStyle, - buttonAttr?: ButtonStyle}): SideBarContainerAttribute; + (type?: SideBarContainerType): SideBarContainerAttribute; } /** @@ -84,6 +82,16 @@ interface SideBarContainerInterface { */ declare class SideBarContainerAttribute extends CommonMethod { + /** + * Callback showControlButton function when setting the status of sidebar + * @since 8 + */ + showSideBar(value: boolean): SideBarContainerAttribute; + /** + * Callback controlButton function when setting the style of button + * @since 8 + */ + controlButton(value: ButtonStyle): SideBarContainerAttribute; /** * Callback showControlButton function when setting the status of button * @since 8 -- Gitee From 38c7562d0ccd4b7495dbcfe6208569ad2bc32b35 Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Thu, 24 Feb 2022 09:32:29 +0800 Subject: [PATCH 013/163] add style attribute Signed-off-by: yaoyuchi --- api/@internal/component/ets/progress.d.ts | 37 +++++++++++++++++------ 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 6b4ba18da4..6f46826f0f 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -13,6 +13,30 @@ * limitations under the License. */ +/** + * Defines style option for progress component. + * @since 8 + */ +declare interface ProgressStyleOption { + /** + * Defines the strokeWidth property. + * @since 8 + */ + strokeWidth?: Length; + + /** + * Defines the scaleCoun property. + * @since 8 + */ + scaleCount?: number; + + /** + * Defines the scaleWidth property. + * @since 8 + */ + scaleWidth?: Length; +} + /** * Type of progress bar * @since 7 @@ -95,17 +119,10 @@ declare class ProgressAttribute extends CommonMethod { color(value: ResourceColor): ProgressAttribute; /** - * Called when the style of the circular progress bar is set. - * @since 7 - */ - circularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): ProgressAttribute; - - /** - * Called when the style of the cricular progress bar is set. - * @since 7 - * @deprecated since 7 + * Called when the style of progress bar is set. + * @since 8 */ - cricularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): ProgressAttribute; + style(value: ProgressStyleOption): ProgressAttribute; } declare const Progress: ProgressInterface; -- Gitee From 79d23d96cf02cdd71c57511814559301d8920cb7 Mon Sep 17 00:00:00 2001 From: njupthan Date: Thu, 24 Feb 2022 17:05:43 +0800 Subject: [PATCH 014/163] update d.ts file Signed-off-by: njupthan --- api/@ohos.notification.d.ts | 58 ++--------------------- api/notification/notificationRequest.d.ts | 1 + 2 files changed, 4 insertions(+), 55 deletions(-) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index 4fd30fa4b3..ecfb62086d 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -55,7 +55,9 @@ declare namespace notification { * @since 8 * @param Publishes a notification. * @param userId of subscriber receiving the notification - * + * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * */ function publish(request: NotificationRequest, userId: number, callback: AsyncCallback): void; function publish(request: NotificationRequest, userId: number): Promise; @@ -675,14 +677,6 @@ declare namespace notification { function isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback): void; function isDistributedEnabledByBundle(bundle: BundleOption): Promise; - /** - * Sets whether the application supports distributed notification. - * - * @since 8 - */ - function enableDistributedSelf(enable: boolean, callback: AsyncCallback): void; - function enableDistributedSelf(enable: boolean): Promise; - /** * Obtains the remind modes of the notification. * @@ -765,29 +759,6 @@ declare namespace notification { end: Date; } - /** - * Notification source type - * - * @since 8 - * @systemapi Hide this for inner system use. - */ - export enum SourceType { - /** - * General notification - */ - TYPE_NORMAL = 0x00000000, - - /** - * Continuous notification - */ - TYPE_CONTINUOUS = 0x00000001, - - /** - * Scheduled notification - */ - TYPE_TIMER = 0x00000002, - } - /** * The type of the Do Not Disturb. * @@ -844,29 +815,6 @@ declare namespace notification { end: Date; } - /** - * Notification source type - * - * @since 8 - * @systemapi Hide this for inner system use. - */ - export enum SourceType { - /** - * General notification - */ - TYPE_NORMAL = 0x00000000, - - /** - * Continuous notification - */ - TYPE_CONTINUOUS = 0x00000001, - - /** - * Scheduled notification - */ - TYPE_TIMER = 0x00000002, - } - /** * The remind type of the nofication. * diff --git a/api/notification/notificationRequest.d.ts b/api/notification/notificationRequest.d.ts index e68532b8c9..9accc34cc1 100644 --- a/api/notification/notificationRequest.d.ts +++ b/api/notification/notificationRequest.d.ts @@ -163,6 +163,7 @@ export interface NotificationRequest { readonly creatorPid?: number; /** + * @since 8 * Read-only UserId of the notification creator. */ readonly creatorUserId?: number; -- Gitee From 022acfa803e7f1fba6b4e306b1bc6ff0994f73da Mon Sep 17 00:00:00 2001 From: youqijing Date: Thu, 17 Feb 2022 17:03:47 +0800 Subject: [PATCH 015/163] Add dispaly interface Signed-off-by: youqijing Change-Id: I88e24ca8f96ef7f12c653a332b1b001d0a29e450 --- api/@ohos.display.d.ts | 171 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 api/@ohos.display.d.ts diff --git a/api/@ohos.display.d.ts b/api/@ohos.display.d.ts new file mode 100644 index 0000000000..024a10daef --- /dev/null +++ b/api/@ohos.display.d.ts @@ -0,0 +1,171 @@ +/* +* Copyright (c) 2021 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import { AsyncCallback, Callback } from './basic'; + +/** + * interface of display manager + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 7 + */ +declare namespace display { + /** + * get the default display + * @since 7 + */ + function getDefaultDisplay(callback: AsyncCallback): void; + + /** + * get the default display + * @since 7 + */ + function getDefaultDisplay(): Promise; + + /** + * get all displays + * @since 7 + */ + function getAllDisplay(callback: AsyncCallback>): void; + + /** + * get all displays + * @since 7 + */ + function getAllDisplay(): Promise>; + + /** + * register the callback of display change + * @param type: type of callback + * @since 7 + */ + function on(type: 'add' | 'remove' | 'change', callback: Callback): void; + + /** + * unregister the callback of display change + * @param type: type of callback + * @since 7 + */ + function off(type: 'add' | 'remove' | 'change', callback?: Callback): void; + + /** + * the state of display + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 7 + */ + enum DisplayState { + /** + * unknown + */ + STATE_UNKNOWN = 0, + /** + * screen off + */ + STATE_OFF, + /** + * screen on + */ + STATE_ON, + /** + * doze, but it will update for some important system messages + */ + STATE_DOZE, + /** + * doze and not update + */ + STATE_DOZE_SUSPEND, + /** + * VR node + */ + STATE_VR, + /** + * screen on and not update + */ + STATE_ON_SUSPEND, + } + + /** + * Properties of display, it couldn't update automatically + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 7 + */ + interface Display { + /** + * display id + */ + id: number; + + /** + * display name + */ + name: string; + + /** + * the display is alive + */ + alive: boolean; + + /** + * the state of display + */ + state: DisplayState; + + /** + * refresh rate, unit: Hz + */ + refreshRate: number; + + /** + * the rotation degrees of the display + */ + rotation: number; + + /** + * the width of display, unit: pixel + */ + width: number; + + /** + * the height of display, unit: pixel + */ + height: number; + + /** + * indicates the display resolution. + */ + densityDPI: number; + + /** + * indicates the display density in pixels. The value of a low-resolution display is 1.0 + */ + densityPixels: number; + + /** + * indicates the text scale density of a display. + */ + scaledDensity: number; + + /** + * the DPI on X-axis. + */ + xDPI: number; + + /** + * the DPI on Y-axis. + */ + yDPI: number; + } +} + +export default display; \ No newline at end of file -- Gitee From 76c93d3bf3838959b7332317704320ec09c56370 Mon Sep 17 00:00:00 2001 From: clevercong Date: Fri, 25 Feb 2022 09:46:39 +0800 Subject: [PATCH 016/163] update telephony and net js api. Signed-off-by: clevercong --- api/@ohos.net.http.d.ts | 27 ++++++++++++++++++++++++++- api/@ohos.telephony.radio.d.ts | 15 ++++++++++++--- api/@ohos.telephony.sim.d.ts | 7 ++++++- api/@ohos.telephony.sms.d.ts | 2 ++ 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts index 9d555afdde..de5a6c3ec8 100644 --- a/api/@ohos.net.http.d.ts +++ b/api/@ohos.net.http.d.ts @@ -71,13 +71,38 @@ declare namespace http { /** * Registers an observer for HTTP Response Header events. + * + * @deprecated use on_headersReceive instead since 8. */ on(type: "headerReceive", callback: AsyncCallback): void; /** * Unregisters the observer for HTTP Response Header events. + * + * @deprecated use off_headersReceive instead since 8. */ off(type: "headerReceive", callback?: AsyncCallback): void; + + /** + * Registers an observer for HTTP Response Header events. + * + * @since 8 + */ + on(type: "headersReceive", callback: Callback): void; + + /** + * Unregisters the observer for HTTP Response Header events. + * + * @since 8 + */ + off(type: "headersReceive", callback?: Callback): void; + + /** + * Registers a one-time observer for HTTP Response Header events. + * + * @since 8 + */ + once(type: "headersReceive", callback: Callback): void; } export enum RequestMethod { @@ -131,7 +156,7 @@ declare namespace http { export interface HttpResponse { /** - * result can be a string or an Object (API 6) or an ArrayBuffer(API 8). + * result can be a string (API 6) or an ArrayBuffer(API 8). Object is deprecated from API 8. */ result: string | Object | ArrayBuffer; /** diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index cae3d90ff7..4feeab2e85 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -143,6 +143,7 @@ declare namespace radio { * supported by the device. * @param callback Returns the IMEI; returns an empty string if the IMEI does not exist. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 8 */ function getIMEI(callback: AsyncCallback): void; @@ -158,6 +159,7 @@ declare namespace radio { * supported by the device. * @param callback Returns the MEID; returns an empty string if the MEID does not exist. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 8 */ function getMEID(callback: AsyncCallback): void; @@ -177,6 +179,7 @@ declare namespace radio { * supported by the device. * @param callback Returns the unique device ID; returns an empty string if the unique device ID does not exist. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 8 */ function getUniqueDeviceId(callback: AsyncCallback): void; @@ -233,27 +236,33 @@ declare namespace radio { function isNrSupported(slotId: number): boolean; /** + * @param slotId Indicates the card slot index number, * @permission ohos.permission.GET_NETWORK_INFO * @since 7 */ function isRadioOn(callback: AsyncCallback): void; - function isRadioOn(): Promise; + function isRadioOn(slotId: number, callback: AsyncCallback): void + function isRadioOn(slotId?: number): Promise; /** + * @param slotId Indicates the card slot index number, * @permission ohos.permission.SET_TELEPHONY_STATE * @systemapi Hide this for inner system use. * @since 7 */ function turnOnRadio(callback: AsyncCallback): void; - function turnOnRadio(): Promise; + function turnOnRadio(slotId: number, callback: AsyncCallback): void; + function turnOnRadio(slotId?: number): Promise; /** + * @param slotId Indicates the card slot index number, * @permission ohos.permission.SET_TELEPHONY_STATE * @systemapi Hide this for inner system use. * @since 7 */ function turnOffRadio(callback: AsyncCallback): void; - function turnOffRadio(): Promise; + function turnOffRadio(slotId: number, callback: AsyncCallback): void; + function turnOffRadio(slotId?: number): Promise; /** * @since 7 diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index 35b4253181..fbb55314b0 100644 --- a/api/@ohos.telephony.sim.d.ts +++ b/api/@ohos.telephony.sim.d.ts @@ -133,6 +133,7 @@ declare namespace sim { * ranging from 0 to the maximum card slot index number supported by the device. * @param callback Returns the ICCID; returns an empty string if no SIM card is inserted. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. */ function getSimIccId(slotId: number, callback: AsyncCallback): void; function getSimIccId(slotId: number): Promise; @@ -147,6 +148,7 @@ declare namespace sim { * @param callback Returns the voice mailbox alpha identifier; * returns an empty string if no voice mailbox alpha identifier is written into the SIM card. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 8 */ function getVoiceMailIdentifier(slotId: number, callback: AsyncCallback): void; @@ -162,6 +164,7 @@ declare namespace sim { * @param callback Returns the voice mailbox number; * returns an empty string if no voice mailbox number is written into the SIM card. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 8 */ function getVoiceMailNumber(slotId: number, callback: AsyncCallback): void; @@ -186,6 +189,7 @@ declare namespace sim { * @param callback Returns the MSISDN; returns an empty string if no SIM card is inserted or * no MSISDN is recorded in the EFMSISDN file. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 8 */ function getSimTelephoneNumber(slotId: number, callback: AsyncCallback): void; @@ -202,7 +206,8 @@ declare namespace sim { * @param callback Returns the GID1; returns an empty string if no SIM card is inserted or * no GID1 in the SIM card. * @permission ohos.permission.GET_TELEPHONY_STATE - * @since 8 + * @systemapi Hide this for inner system use. + * @since 7 */ function getSimGid1(slotId: number, callback: AsyncCallback): void; function getSimGid1(slotId: number): Promise; diff --git a/api/@ohos.telephony.sms.d.ts b/api/@ohos.telephony.sms.d.ts index 2a18155c13..5b8e4b45e2 100644 --- a/api/@ohos.telephony.sms.d.ts +++ b/api/@ohos.telephony.sms.d.ts @@ -98,6 +98,7 @@ declare namespace sms { * @param slotId Indicates the ID of the slot holding the SIM card for sending SMS messages. * @param smscAddr Indicates the SMSC address. * @permission ohos.permission.SET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 7 */ function setSmscAddr(slotId: number, smscAddr: string, callback: AsyncCallback): void; @@ -111,6 +112,7 @@ declare namespace sms { * @param slotId Indicates the ID of the slot holding the SIM card for sending SMS messages. * @param callback Returns the SMSC address. * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. * @since 7 */ function getSmscAddr(slotId: number, callback: AsyncCallback): void; -- Gitee From 73ba1a0207df0bd8c8f2d9e7923c9e0a962575b8 Mon Sep 17 00:00:00 2001 From: clevercong Date: Fri, 25 Feb 2022 09:49:28 +0800 Subject: [PATCH 017/163] update net api Signed-off-by: clevercong --- api/@ohos.net.statistics.d.ts | 157 ---------------------------------- 1 file changed, 157 deletions(-) delete mode 100644 api/@ohos.net.statistics.d.ts diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts deleted file mode 100644 index 9f1446839d..0000000000 --- a/api/@ohos.net.statistics.d.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (C) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {AsyncCallback, Callback} from "./basic"; - -/** - * Obtains traffic statistics. - * - * @since 8 - * @syscap SystemCapability.Communication.NetManager.Core - */ -declare namespace statistics { - /** - * Queries the data traffic (including all TCP and UDP data packets) received through a specified NIC. - * - * @param nic Indicates the NIC name. - * @param callback Returns the data traffic received through the specified NIC. - */ - function getIfaceRxBytes(nic: string, callback: AsyncCallback): void; - function getIfaceRxBytes(nic: string): Promise; - - /** - * Queries the data traffic (including all TCP and UDP data packets) sent through a specified NIC. - * - * @param nic Indicates the NIC name. - * @param callback Returns the data traffic sent through the specified NIC. - */ - function getIfaceTxBytes(nic: string, callback: AsyncCallback): void; - function getIfaceTxBytes(nic: string): Promise; - - /** - * Queries the data traffic (including all TCP and UDP data packets) received through the cellular network. - * - * @param callback Returns the data traffic received through the cellular network. - */ - function getCellularRxBytes(callback: AsyncCallback): void; - function getCellularRxBytes(): Promise; - - /** - * Queries the data traffic (including all TCP and UDP data packets) sent through the cellular network. - * - * @param callback Returns the data traffic sent through the cellular network. - */ - function getCellularTxBytes(callback: AsyncCallback): void; - function getCellularTxBytes(): Promise; - - /** - * Queries the data traffic (including all TCP and UDP data packets) sent through all NICs. - * - * @param callback Returns the data traffic sent through all NICs. - */ - function getAllTxBytes(callback: AsyncCallback): void; - function getAllTxBytes(): Promise; - - /** - * Queries the data traffic (including all TCP and UDP data packets) received through all NICs. - * - * @param callback Returns the data traffic received through all NICs. - */ - function getAllRxBytes(callback: AsyncCallback): void; - function getAllRxBytes(): Promise; - - /** - * Queries the data traffic (including all TCP and UDP data packets) received by a specified application. - * This method applies only to system applications and your own applications. - * - * @param uid Indicates the process ID of the application. - * @param callback Returns the data traffic received by the specified application. - */ - function getUidRxBytes(uid: number, callback: AsyncCallback): void; - function getUidRxBytes(uid: number): Promise; - - /** - * Queries the data traffic (including all TCP and UDP data packets) sent by a specified application. - * This method applies only to system applications and your own applications. - * - * @param uid Indicates the process ID of the application. - * @param callback Returns the data traffic sent by the specified application. - */ - function getUidTxBytes(uid: number, callback: AsyncCallback): void; - function getUidTxBytes(uid: number): Promise; - - /** - * Register notifications of network traffic updates, restrictions, and warnings. - * - * @permission ohos.permission.GET_NETSTATS_SUMMARY - * @systemapi Hide this for inner system use. - */ - function on(type: 'netStatsChange', callback: Callback<{ iface: string, uid?: number }>): void; - - /** - * @systemapi Hide this for inner system use. - */ - function off(type: 'netStatsChange', callback?: Callback<{ iface: string, uid?: number }>): void; - - /** - * Get the traffic usage details of the network interface in the specified time period. - * - * @param IfaceInfo Indicates the handle. See {@link IfaceInfo}. - * @permission ohos.permission.GET_NETSTATS_SUMMARY - * @systemapi Hide this for inner system use. - */ - function getIfaceStats(ifaceInfo: IfaceInfo, callback: AsyncCallback): void; - function getIfaceStats(ifaceInfo: IfaceInfo): Promise; - - /** - * Get the traffic usage details of the specified time period of the application. - * - * @param UidStatsInfo Indicates the handle. See {@link UidStatsInfo}. - * @permission ohos.permission.GET_NETSTATS_SUMMARY - * @systemapi Hide this for inner system use. - */ - function getIfaceUidStats(uidStatsInfo: UidStatsInfo, callback: AsyncCallback): void; - function getIfaceUidStats(uidStatsInfo: UidStatsInfo): Promise; - - /** - * @systemapi Hide this for inner system use. - */ - export interface IfaceInfo { - iface: string; - startTime: number; - endTime: number; - } - - /** - * @systemapi Hide this for inner system use. - */ - export interface UidStatsInfo { - /*See {@link IfaceInfo}*/ - ifaceInfo: IfaceInfo; - uid: number; - } - - /** - * @systemapi Hide this for inner system use. - */ - export interface NetStatsInfo { - rxBytes: number; - txBytes: number; - rxPackets: number; - txPackets: number; - } -} - -export default statistics; \ No newline at end of file -- Gitee From 2fc46abaabb8469b38761ba962e70c161a3e858b Mon Sep 17 00:00:00 2001 From: clevercong Date: Fri, 25 Feb 2022 10:15:35 +0800 Subject: [PATCH 018/163] update telephony api Signed-off-by: clevercong --- api/@ohos.telephony.sim.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index fbb55314b0..83d8ed9902 100644 --- a/api/@ohos.telephony.sim.d.ts +++ b/api/@ohos.telephony.sim.d.ts @@ -134,6 +134,7 @@ declare namespace sim { * @param callback Returns the ICCID; returns an empty string if no SIM card is inserted. * @permission ohos.permission.GET_TELEPHONY_STATE * @systemapi Hide this for inner system use. + * @since 7 */ function getSimIccId(slotId: number, callback: AsyncCallback): void; function getSimIccId(slotId: number): Promise; -- Gitee From 77ce9f67289ea78d92495c5fda3fc97facb688f0 Mon Sep 17 00:00:00 2001 From: magekkkk Date: Fri, 25 Feb 2022 06:12:45 +0000 Subject: [PATCH 019/163] change camera and phone related api into system api Signed-off-by: magekkkk --- api/@ohos.multimedia.audio.d.ts | 6 ++++-- api/@ohos.multimedia.image.d.ts | 5 +++++ api/@ohos.multimedia.media.d.ts | 8 ++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) mode change 100755 => 100644 api/@ohos.multimedia.media.d.ts diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 9970a64dab..2327bf9485 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -782,7 +782,7 @@ declare namespace audio { * Enumerates audio scenes. * @since 8 * @syscap SystemCapability.Multimedia.Audio.Communication - */ + */ enum AudioScene { /** * Default audio scene @@ -1030,12 +1030,14 @@ declare namespace audio { * This method uses an asynchronous callback to return the execution result. * @since 8 * @syscap SystemCapability.Multimedia.Audio.Communication + * @systemapi */ setAudioScene(scene: AudioScene, callback: AsyncCallback ): void; /** * Sets the audio scene mode to change audio strategy. This method uses a promise to return the execution result. * @since 8 * @syscap SystemCapability.Multimedia.Audio.Communication + * @systemapi */ setAudioScene(scene: AudioScene): Promise; /** @@ -1043,7 +1045,7 @@ declare namespace audio { * @since 8 * @syscap SystemCapability.Multimedia.Audio.Communication */ - getAudioScene(callback: AsyncCallback ): void; + getAudioScene(callback: AsyncCallback): void; /** * Obtains the system audio scene mode. This method uses a promise to return the execution result. * @since 8 diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index da3700eec7..74aef73ea4 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -162,6 +162,7 @@ declare namespace image { * The componet type of image. * @since 8 * @syscap SystemCapability.Multimedia.Image.ImageReceiver + * @systemapi */ enum ComponentType { /** @@ -374,6 +375,7 @@ declare namespace image { * Describes image color components. * @since 8 * @syscap SystemCapability.Multimedia.Image.Core + * @systemapi */ interface Component { /** @@ -483,6 +485,7 @@ declare namespace image { * {@link ImageFormat} constants. Note that not all formats are supported, like ImageFormat.NV21. * @param capacity The maximum number of images the user will want to access simultaneously. * @return Returns the ImageReceiver instance if the operation is successful; returns null otherwise. + * @systemapi */ function createImageReceiver(width: number, height: number, format: number, capacity: number): ImageReceiver; @@ -817,6 +820,7 @@ declare namespace image { * Provides basic image operations, including obtaining image information, and reading and writing image data. * @since 8 * @syscap SystemCapability.Multimedia.Image.Core + * @systemapi */ interface Image { /** @@ -879,6 +883,7 @@ declare namespace image { * Image receiver object. * @since 8 * @syscap SystemCapability.Multimedia.Image.ImageReceiver + * @systemapi */ interface ImageReceiver { /** diff --git a/api/@ohos.multimedia.media.d.ts b/api/@ohos.multimedia.media.d.ts old mode 100755 new mode 100644 index c33f70bef3..b016477d3f --- a/api/@ohos.multimedia.media.d.ts +++ b/api/@ohos.multimedia.media.d.ts @@ -62,6 +62,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @import import media from '@ohos.multimedia.media' * @param callback Callback used to return AudioPlayer instance if the operation is successful; returns null otherwise. + * @systemapi */ function createVideoRecorder(callback: AsyncCallback): void; /** @@ -70,6 +71,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @import import media from '@ohos.multimedia.media' * @return A Promise instance used to return VideoRecorder instance if the operation is successful; returns null otherwise. + * @systemapi */ function createVideoRecorder(): Promise; @@ -559,6 +561,7 @@ declare namespace media { * Describes video recorder states. * @since 8 * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi */ type VideoRecordState = 'idle' | 'prepared' | 'playing' | 'paused' | 'stopped' | 'error'; @@ -567,6 +570,7 @@ declare namespace media { * to create an VideoRecorder instance. * @since 8 * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi */ interface VideoRecorder { /** @@ -1158,6 +1162,7 @@ declare namespace media { * Provides the video recorder profile definitions. * @since 8 * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi */ interface VideoRecorderProfile { /** @@ -1236,6 +1241,7 @@ declare namespace media { * @since 8 * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @import import media from '@ohos.multimedia.media' + * @systemapi */ enum AudioSourceType { /** @@ -1257,6 +1263,7 @@ declare namespace media { * @since 8 * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @import import media from '@ohos.multimedia.media' + * @systemapi */ enum VideoSourceType { /** @@ -1277,6 +1284,7 @@ declare namespace media { * Provides the video recorder configuration definitions. * @since 8 * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi */ interface VideoRecorderConfig { /** -- Gitee From 054df00cd36552bd77365d453aca386138962a3c Mon Sep 17 00:00:00 2001 From: chyyy0213 Date: Wed, 23 Feb 2022 14:37:28 +0800 Subject: [PATCH 020/163] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chyyy0213 Change-Id: I06d674de154fadaca351bfe479ea78118fe815cc Signed-off-by: chyyy0213 --- api/@ohos.window.d.ts | 224 +++++++++++++++++++++++------------------- 1 file changed, 121 insertions(+), 103 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 62d9ac3eb7..69c33f7bf3 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -14,11 +14,11 @@ */ import { AsyncCallback, Callback } from './basic' ; import { Context } from './app/context'; -import { ContenStorage } from './@internal/component/ets/stateManagement' +import { ContentStorage } from './@internal/component/ets/stateManagement' /** * Window manager. * @syscap SystemCapability.WindowManager.WindowManager.Core -*/ + */ declare namespace window { /** * The type of a window. @@ -64,90 +64,6 @@ declare namespace window { FLOATING } - /** - * Create a sub window with a specific id and type, only support 7. - * @param id Indicates window id. - * @param type Indicates window type. - * @since 7 - */ - function create(id: string, type: WindowType, callback: AsyncCallback): void; - - /** - * Create a sub window with a specific id and type, only support 7. - * @param id Indicates window id. - * @param type Indicates window type. - * @since 7 - */ - function create(id: string, type: WindowType): Promise; - - /** - * Create a system window with a specific id and type. - * @param ctx Indicates the context on which the window depends - * @param id Indicates window id. - * @param type Indicates window type. - * @systemapi Hide this for inner system use. - * @permission ohos.permission.SYSTEM_FLOAT_WINDOW - * @since 8 - */ - function create(ctx: Context, id: string, type: WindowType): Promise; - - /** - * Find the window by id. - * @param id Indicates window id. - * @since 7 - */ - function find(id: string, callback: AsyncCallback): void; - - /** - * Find the window by id. - * @param id Indicates window id. - * @since 7 - */ - function find(id: string): Promise; - - /** - * Get the final show window. - * @param id Indicates window id. - * @since 6 - */ - function getTopWindow(callback: AsyncCallback): void; - - /** - * Get the final show window. - * @since 6 - */ - function getTopWindow(): Promise; - - /** - * Get the final show window. - * @param ctx Indicates the context on which the window depends - * @since 8 - */ - function getTopWindow(ctx: Context): Promise; - - /** - * Get the final show window. - * @param ctx Indicates the context on which the window depends - * @since 8 - */ - function getTopWindow(ctx: Context, callback: AsyncCallback): void; - - /** - * register the callback of systemBarTintChange - * @param type: 'systemBarTintChange' - * @systemapi Hide this for inner system use. - * @since 8 - */ - function on(type: 'systemBarTintChange', callback: Callback): void; - - /** - * unregister the callback of systemBarTintChange - * @param type: 'systemBarTintChange' - * @systemapi Hide this for inner system use. - * @since 8 - */ - function off(type: 'systemBarTintChange', callback?: Callback): void; - /** * Properties of status bar and navigation bar, it couldn't update automatically * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -326,7 +242,7 @@ declare namespace window { /** * Whether the window layout is in full screen mode(whether the window is immersive). The default value is false. - * @since 6 + * @since 7 */ isLayoutFullScreen: boolean @@ -338,7 +254,7 @@ declare namespace window { /** * Whether the window is touchable. The default value is false - * @since 6 + * @since 7 */ touchable: boolean } @@ -358,41 +274,136 @@ declare namespace window { WIDE_GAMUT, } + /** + * Create a sub window with a specific id and type, only support 7. + * @param id Indicates window id. + * @param type Indicates window type. + * @since 7 + */ + function create(id: string, type: WindowType, callback: AsyncCallback): void; + + /** + * Create a sub window with a specific id and type, only support 7. + * @param id Indicates window id. + * @param type Indicates window type. + * @since 7 + */ + function create(id: string, type: WindowType): Promise; + + /** + * Create a system or float window with a specific id and type. + * @param ctx Indicates the context on which the window depends + * @param id Indicates window id. + * @param type Indicates window type. + * @systemapi Hide this for inner system use. + * @permission ohos.permission.SYSTEM_FLOAT_WINDOW + * @since 8 + */ + function create(ctx: Context, id: string, type: WindowType): Promise; + + /** + * Create a system or float window with a specific id and type. + * @param ctx Indicates the context on which the window depends + * @param id Indicates window id. + * @param type Indicates window type. + * @systemapi Hide this for inner system use. + * @permission ohos.permission.SYSTEM_FLOAT_WINDOW + * @since 8 + */ + function create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback): void; + + /** + * Find the window by id. + * @param id Indicates window id. + * @since 7 + */ + function find(id: string, callback: AsyncCallback): void; + + /** + * Find the window by id. + * @param id Indicates window id. + * @since 7 + */ + function find(id: string): Promise; + + /** + * Get the final show window. + * @param id Indicates window id. + * @since 6 + */ + function getTopWindow(callback: AsyncCallback): void; + + /** + * Get the final show window. + * @since 6 + */ + function getTopWindow(): Promise; + + /** + * Get the final show window. + * @param ctx Indicates the context on which the window depends + * @since 8 + */ + function getTopWindow(ctx: Context): Promise; + + /** + * Get the final show window. + * @param ctx Indicates the context on which the window depends + * @since 8 + */ + function getTopWindow(ctx: Context, callback: AsyncCallback): void; + + /** + * register the callback of systemBarTintChange + * @param type: 'systemBarTintChange' + * @systemapi Hide this for inner system use. + * @since 8 + */ + function on(type: 'systemBarTintChange', callback: Callback): void; + + /** + * unregister the callback of systemBarTintChange + * @param type: 'systemBarTintChange' + * @systemapi Hide this for inner system use. + * @since 8 + */ + function off(type: 'systemBarTintChange', callback?: Callback): void; + interface Window { /** - * hide sub window. + * hide window. * @systemapi Hide this for inner system use. * @since 7 */ hide (callback: AsyncCallback): void; /** - * hide sub window. + * hide window. * @systemapi Hide this for inner system use. * @since 7 */ hide(): Promise; /** - * show sub window. + * show window. * @since 7 */ show(callback: AsyncCallback): void; /** - * show sub window. + * show window. * @since 7 */ show(): Promise; /** - * Destroy the sub window. + * Destroy the window. * @since 7 */ destroy(callback: AsyncCallback): void; /** - * Destroy the sub window. + * Destroy the window. * @since 7 */ destroy(): Promise; @@ -550,23 +561,24 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 8 */ - loadContent(path: string, storage: ContenStorage, callback: AsyncCallback): void; + loadContent(path: string, storage: ContentStorage, callback: AsyncCallback): void; /** * Loads content * @param path path of the page to which the content will be loaded + * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 7 + * @since 9 */ - loadContent(path: string, callback: AsyncCallback): void; + loadContent(path: string, storage?: ContentStorage): Promise; /** * Loads content - * @param path path of the page to which the content will be loaded + * @param path path of the page to which the content will be loaded2 * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ - loadContent(path: string, storage?: ContenStorage): Promise; + loadContent(path: string, callback: AsyncCallback): void; /** * Checks whether the window is displayed @@ -652,7 +664,11 @@ declare namespace window { */ getColorSpace(callback: AsyncCallback): void; } - + /** + * window stage callback event type + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 9 + */ enum WindowStageEventType { FOREGROUND = 1, ACTIVE, @@ -662,6 +678,7 @@ declare namespace window { /** * WindowStage * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 9 */ interface WindowStage { /** @@ -703,21 +720,22 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ - loadContent(path: string, storage: ContenStorage, callback: AsyncCallback): void; + loadContent(path: string, storage: ContentStorage, callback: AsyncCallback): void; /** * Loads content * @param path path of the page to which the content will be loaded + * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ - loadContent(path: string, callback: AsyncCallback): void; + loadContent(path: string, storage?: ContentStorage): Promise; /** * Loads content * @param path path of the page to which the content will be loaded * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ - loadContent(path: string, storage?: ContenStorage): Promise; + loadContent(path: string, callback: AsyncCallback): void; /** * window stage event callback on. * @since 9 -- Gitee From 94c7f8a237e079d341bfda38156fffc13d4b77a5 Mon Sep 17 00:00:00 2001 From: AOL Date: Fri, 25 Feb 2022 06:45:26 +0000 Subject: [PATCH 021/163] add api7 compatible js api for media Signed-off-by: magekkkk --- api/@ohos.multimedia.media.d.ts | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/api/@ohos.multimedia.media.d.ts b/api/@ohos.multimedia.media.d.ts index c33f70bef3..22cf0ebc31 100755 --- a/api/@ohos.multimedia.media.d.ts +++ b/api/@ohos.multimedia.media.d.ts @@ -349,12 +349,40 @@ declare namespace media { * @deprecated since 8 */ enum AudioEncoder { + /** + * Default audio encoding format, which is AMR-NB. + * @since 6 + * @syscap SystemCapability.Multimedia.Media.AudioRecorder + */ + DEFAULT = 0, + + /** + * Indicates the AMR-NB audio encoding format. + * @since 6 + * @syscap SystemCapability.Multimedia.Media.AudioRecorder + */ + AMR_NB = 1, + + /** + * Indicates the AMR-WB audio encoding format. + * @since 6 + * @syscap SystemCapability.Multimedia.Media.AudioRecorder + */ + AMR_WB = 2, + /** * Advanced Audio Coding Low Complexity (AAC-LC). * @since 6 * @syscap SystemCapability.Multimedia.Media.AudioRecorder */ AAC_LC = 3, + + /** + * High-Efficiency Advanced Audio Coding (HE-AAC). + * @since 6 + * @syscap SystemCapability.Multimedia.Media.AudioRecorder + */ + HE_AAC = 4 } /** @@ -365,6 +393,13 @@ declare namespace media { * @deprecated since 8 */ enum AudioOutputFormat { + /** + * Default audio output format, which is Moving Pictures Expert Group 4 (MPEG-4). + * @since 6 + * @syscap SystemCapability.Multimedia.Media.AudioRecorder + */ + DEFAULT = 0, + /** * Indicates the Moving Picture Experts Group-4 (MPEG4) media format. * @since 6 @@ -372,6 +407,20 @@ declare namespace media { */ MPEG_4 = 2, + /** + * Indicates the Adaptive Multi-Rate Narrowband (AMR-NB) media format. + * @since 6 + * @syscap SystemCapability.Multimedia.Media.AudioRecorder + */ + AMR_NB = 3, + + /** + * Indicates the Adaptive Multi-Rate Wideband (AMR-WB) media format. + * @since 6 + * @syscap SystemCapability.Multimedia.Media.AudioRecorder + */ + AMR_WB = 4, + /** * Audio Data Transport Stream (ADTS), a transmission stream format of Advanced Audio Coding (AAC) audio. * @since 6 -- Gitee From f3b59f0e7ee1268ef9b0c4fba94cd0f1064f1838 Mon Sep 17 00:00:00 2001 From: clevercong Date: Fri, 25 Feb 2022 15:42:39 +0800 Subject: [PATCH 022/163] update js api d.ts Signed-off-by: clevercong --- api/@ohos.telephony.radio.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index 4feeab2e85..38b942aba0 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -236,7 +236,10 @@ declare namespace radio { function isNrSupported(slotId: number): boolean; /** + * Checks whether the radio service is enabled. + * * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. * @permission ohos.permission.GET_NETWORK_INFO * @since 7 */ @@ -245,7 +248,10 @@ declare namespace radio { function isRadioOn(slotId?: number): Promise; /** + * Turn on the radio service. + * * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. * @permission ohos.permission.SET_TELEPHONY_STATE * @systemapi Hide this for inner system use. * @since 7 @@ -255,7 +261,10 @@ declare namespace radio { function turnOnRadio(slotId?: number): Promise; /** + * Turn off the radio service. + * * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. * @permission ohos.permission.SET_TELEPHONY_STATE * @systemapi Hide this for inner system use. * @since 7 -- Gitee From 963da833e82d4d0de81d17f649f8dfc114965b70 Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Wed, 23 Feb 2022 21:21:35 +0800 Subject: [PATCH 023/163] houhaoyu@huawei.com change syscapSchema Signed-off-by: houhaoyu Change-Id: I167d8a9307b56ff13bee8d790e1c9f1db7899be4 --- api/device-define/PC.json | 5 +++++ api/device-define/car.json | 5 +++++ api/device-define/liteWearable.json | 5 +++++ api/device-define/router.json | 5 +++++ api/device-define/smartVision.json | 5 +++++ api/device-define/tablet.json | 5 +++++ api/device-define/tv.json | 5 +++++ api/device-define/wearable.json | 5 +++++ api/syscapCheck/sysCapSchema.json | 27 +++++++++++++++------------ 9 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 api/device-define/PC.json create mode 100644 api/device-define/car.json create mode 100644 api/device-define/liteWearable.json create mode 100644 api/device-define/router.json create mode 100644 api/device-define/smartVision.json create mode 100644 api/device-define/tablet.json create mode 100644 api/device-define/tv.json create mode 100644 api/device-define/wearable.json diff --git a/api/device-define/PC.json b/api/device-define/PC.json new file mode 100644 index 0000000000..053868fe2e --- /dev/null +++ b/api/device-define/PC.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Full" + ] +} \ No newline at end of file diff --git a/api/device-define/car.json b/api/device-define/car.json new file mode 100644 index 0000000000..053868fe2e --- /dev/null +++ b/api/device-define/car.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Full" + ] +} \ No newline at end of file diff --git a/api/device-define/liteWearable.json b/api/device-define/liteWearable.json new file mode 100644 index 0000000000..17bc0061a2 --- /dev/null +++ b/api/device-define/liteWearable.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Lite" + ] +} \ No newline at end of file diff --git a/api/device-define/router.json b/api/device-define/router.json new file mode 100644 index 0000000000..1aaf14cd60 --- /dev/null +++ b/api/device-define/router.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.Communication.SoftBus.Core" + ] +} \ No newline at end of file diff --git a/api/device-define/smartVision.json b/api/device-define/smartVision.json new file mode 100644 index 0000000000..17bc0061a2 --- /dev/null +++ b/api/device-define/smartVision.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Lite" + ] +} \ No newline at end of file diff --git a/api/device-define/tablet.json b/api/device-define/tablet.json new file mode 100644 index 0000000000..053868fe2e --- /dev/null +++ b/api/device-define/tablet.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Full" + ] +} \ No newline at end of file diff --git a/api/device-define/tv.json b/api/device-define/tv.json new file mode 100644 index 0000000000..053868fe2e --- /dev/null +++ b/api/device-define/tv.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Full" + ] +} \ No newline at end of file diff --git a/api/device-define/wearable.json b/api/device-define/wearable.json new file mode 100644 index 0000000000..053868fe2e --- /dev/null +++ b/api/device-define/wearable.json @@ -0,0 +1,5 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Full" + ] +} \ No newline at end of file diff --git a/api/syscapCheck/sysCapSchema.json b/api/syscapCheck/sysCapSchema.json index 5650316dbf..f0da24203d 100644 --- a/api/syscapCheck/sysCapSchema.json +++ b/api/syscapCheck/sysCapSchema.json @@ -3,25 +3,28 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": true, + "required": [ + "devices" + ], "propertyNames": { "enum": [ - "base", + "devices", "development", "production" ] }, "properties": { - "base": { + "devices": { "description": "Basic system capability", "type": "object", "propertyNames": { "enum": [ - "deviceType", - "NDeviceSysCaps" + "general", + "custom" ] }, "properties": { - "deviceType": { + "general": { "description": "core equipment", "type":"array", "items": { @@ -31,19 +34,19 @@ "tv", "tablet", "wearable", - "litewearable", - "car" + "liteWearable", + "car", + "smartVision", + "PC", + "router" ] } }, - "NDeviceSysCaps": { + "custom": { "description": "N equipment", "type":"array", "items": { - "type": "array", - "items": { - "type": "string" - } + "type": "object" } } } -- Gitee From e222e984750720c44e43095b0b966aee1825988e Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sat, 26 Feb 2022 02:46:57 +0000 Subject: [PATCH 024/163] update input consumer Signed-off-by: mayunteng_1 Change-Id: Ibddfacb55172c096f3ef287b3dae3c26de3b4803 --- api/@ohos.multimodalInput.inputConsumer.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 389f62a013..2b3239b48c 100755 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { AsyncCallback } from './basic'; +import { Callback } from './basic'; /** * The event of key input management module is configured to subscribe and unsubscribe system keys. @@ -34,7 +34,7 @@ declare namespace inputConsumer { * @param isFinalKeyDown The final key press down or up. * @param finalKeyDownDuration Duration of final key press. */ - interface KeyOptions { + interface KeyOption { preKeys: Array; finalKey: number; isFinalKeyDown: boolean; @@ -47,11 +47,11 @@ declare namespace inputConsumer { * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @permission N/A - * @param type type of the keyevent about input which is to be subscribed. + * @param type type of the inputevent about input which is to be subscribed. * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function on(type: string, keyOption: KeyOptions, callback: AsyncCallback): void; + function on(type: "key", keyOption: KeyOption, callback: Callback): void; /** * Subscribe system keys. @@ -59,11 +59,11 @@ declare namespace inputConsumer { * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @permission N/A - * @param type type of the keyevent about input which is to be subscribed. + * @param type type of the inputevent about input which is to be subscribed. * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function off(type: string, keyOption: KeyOptions, callback: AsyncCallback): void; + function off(type: "key", keyOption: KeyOption, callback?: Callback): void; } export default inputConsumer; \ No newline at end of file -- Gitee From c7229168bf473212009506926d09d3c2c1b986da Mon Sep 17 00:00:00 2001 From: huye Date: Tue, 15 Feb 2022 16:29:46 +0800 Subject: [PATCH 025/163] web view api. Signed-off-by: huye --- api/@internal/component/ets/web.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 9aa29f08fa..72ade82fe5 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -223,19 +223,19 @@ declare class WebController { * Means to load a piece of code and execute JS code in the context of the currently displayed page * @since 8 */ - runJavaScript(jscode: string, callback?: (result: string) => void); + runJavaScript(options: { script: string, callback?: (result: string) => void }); /** * Indicates that a piece of code is loaded * @since 8 */ - loadData(value: { data: string, mimeType: string, encoding: string, baseUrl?: string, historyUrl?: string }); + loadData(options: { data: string, mimeType: string, encoding: string, baseUrl?: string, historyUrl?: string }); /** * Load the given URL * @since 8 */ - loadUrl(url: string, additionalHttpHeaders?: Array<{ key: string, value: string }>); + loadUrl(options: {url: string, headers?: Array<{ key: string, value: string }> }); /** * refreshes the current URL. @@ -253,13 +253,13 @@ declare class WebController { * Registers the JavaScript object and method list. * @since 8 */ - registerJavaScriptProxy(value: { obj: object, name: string, methodList: Array }); + registerJavaScriptProxy(options: { obj: object, name: string, methodList: Array }); /** * Deletes a registered JavaScript object with given name. * @since 8 */ - deleteJavaScriptProxy(value: { name: string }); + deleteJavaScriptRegister(name: string); /** * Get the type of hit test. -- Gitee From de04ea881dfc1f7865ab9f086af0055a38e55ab8 Mon Sep 17 00:00:00 2001 From: youqijing Date: Sat, 26 Feb 2022 10:42:05 +0800 Subject: [PATCH 026/163] Update screenshot.d.ts file. Signed-off-by: youqijing Change-Id: I41937bd8bf1c9613cc1acdbb06406640491e8b8a --- api/@ohos.screenshot.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/@ohos.screenshot.d.ts b/api/@ohos.screenshot.d.ts index 7fa60edc4b..cbb2a2f69f 100644 --- a/api/@ohos.screenshot.d.ts +++ b/api/@ohos.screenshot.d.ts @@ -23,6 +23,14 @@ import image from './@ohos.multimedia.image'; * @since 7 */ declare namespace screenshot { + /** + * Takes a screenshot and saves it as a PixelMap object + * @param options Screenshot options, which consist of screenRect, imageSize, and rotation. You need to set these parameters + * @permission ohos.permission.CAPTURE_SCREEN + * @since 7 + */ + function save(options?: ScreenshotOptions, callback: AsyncCallback): void; + /** * Takes a screenshot and saves it as a PixelMap object * @param options Screenshot options, which consist of screenRect, imageSize, and rotation. You need to set these parameters -- Gitee From 27dbe748b311bac124dcfc4babf68ef1f6d179aa Mon Sep 17 00:00:00 2001 From: wplan1 Date: Sat, 26 Feb 2022 15:54:15 +0800 Subject: [PATCH 027/163] delete api 9 preview Signed-off-by: wplan1 --- api/@ohos.resourceManager.d.ts | 42 ---------------------------------- 1 file changed, 42 deletions(-) diff --git a/api/@ohos.resourceManager.d.ts b/api/@ohos.resourceManager.d.ts index 2589783880..5fc83772b6 100644 --- a/api/@ohos.resourceManager.d.ts +++ b/api/@ohos.resourceManager.d.ts @@ -230,48 +230,6 @@ export function getResourceManager(): Promise; */ export function getResourceManager(bundleName: string): Promise; -/** - * Obtains the ResourceManager object of the current application. - * - * @param ctx The Context object. - * @param callback Indicates the callback containing the ResourceManager object. - * @since 9 preview - * @StageModelOnly - */ -export function getResourceManager(ctx: Context, callback: AsyncCallback); - -/** - * Obtains the ResourceManager object of the specified application. - * - * @param ctx The Context object. - * @param bundleName Indicates the bundle name of the specified application. - * @param callback Indicates the callback containing the ResourceManager object. - * @since 9 preview - * @StageModelOnly - */ -export function getResourceManager(ctx: Context, bundleName: string, callback: AsyncCallback); - -/** - * Obtains the ResourceManager object of the current application. - * - * @param ctx The Context object. - * @return Returns that the ResourceManager object is returned in Promise mode. - * @since 9 preview - * @StageModelOnly - */ -export function getResourceManager(ctx: Context): Promise; - -/** - * Obtains the ResourceManager object of the specified application. - * - * @param ctx The Context object. - * @param bundleName Indicates the bundle name of the specified application. - * @return Returns that the ResourceManager object is returned in Promise mode. - * @since 9 preview - * @StageModelOnly - */ -export function getResourceManager(ctx: Context, bundleName: string): Promise; - /** * Provides the capability of accessing application resources. * -- Gitee From 9bab58f3764738219ad9026c5e96dd259f08c139 Mon Sep 17 00:00:00 2001 From: AOL Date: Sat, 26 Feb 2022 08:56:16 +0000 Subject: [PATCH 028/163] set infeasible api to system for commercial device Signed-off-by: magekkkk --- api/@ohos.multimedia.audio.d.ts | 2 ++ api/@ohos.multimedia.mediaLibrary.d.ts | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 9970a64dab..e783003099 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -690,6 +690,7 @@ declare namespace audio { * Interrupt force type. * @since 8 * @syscap SystemCapability.Multimedia.Audio.Renderer + * @systemapi */ enum InterruptForceType { /** @@ -1391,6 +1392,7 @@ declare namespace audio { * @return InterruptEvent callback. * @since 8 * @syscap SystemCapability.Multimedia.Audio.Renderer + * @systemapi */ on(type: 'interrupt', callback: Callback): void; /** diff --git a/api/@ohos.multimedia.mediaLibrary.d.ts b/api/@ohos.multimedia.mediaLibrary.d.ts index 32b8fd0b1a..d25e9a9c91 100644 --- a/api/@ohos.multimedia.mediaLibrary.d.ts +++ b/api/@ohos.multimedia.mediaLibrary.d.ts @@ -276,12 +276,14 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param callback, no value will be returned. + * @systemapi */ commitModify(callback: AsyncCallback): void; /** * Modify meta data where the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @systemapi */ commitModify(): Promise; /** @@ -342,6 +344,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param isFavorite ture is favorite file, false is not favorite file * @param callback Callback used to return, No value is returned. + * @systemapi */ favorite(isFavorite: boolean, callback: AsyncCallback): void; /** @@ -349,6 +352,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param isFavorite ture is favorite file, false is not favorite file + * @systemapi */ favorite(isFavorite: boolean): Promise; /** @@ -356,12 +360,14 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param callback Callback used to return true or false. + * @systemapi */ isFavorite(callback: AsyncCallback): void; /** * If the file is favorite when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @systemapi */ isFavorite():Promise; /** @@ -369,7 +375,8 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param isTrash true is trashed file, false is not trashed file - * @param callback Callback used to return, No value is returned. + * @param callback Callback used to return, No value is returned. + * @systemapi */ trash(isTrash: boolean, callback: AsyncCallback): void; /** @@ -377,6 +384,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param isTrash true is trashed file, false is not trashed file + * @systemapi */ trash(isTrash: boolean,): Promise; /** @@ -384,12 +392,14 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param callback Callback used to return true or false. + * @systemapi */ isTrash(callback: AsyncCallback): void; /** * If the file is in trash when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @systemapi */ isTrash():Promise; } @@ -732,12 +742,14 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param callback, no value will be returned. + * @systemapi */ commitModify(callback: AsyncCallback): void; /** * Modify the meta data for the album * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @systemapi */ commitModify(): Promise; /** @@ -892,6 +904,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param uri, FileAsset's URI * @param callback no value returned + * @systemapi */ deleteAsset(uri: string, callback: AsyncCallback): void; /** @@ -900,6 +913,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param uri, FileAsset's URI * @return A Promise instance, no value returned + * @systemapi */ deleteAsset(uri: string): Promise; /** -- Gitee From 9118ddcff6aab4b674e1a1432f639d8ba74e1494 Mon Sep 17 00:00:00 2001 From: zengsiyu Date: Sat, 26 Feb 2022 19:06:37 +0800 Subject: [PATCH 029/163] fix: remove IsNotificationEnabledSelf Signed-off-by: zengsiyu Change-Id: I129788ef6748806e170d08ad4dac290a53185d09 --- api/@ohos.notification.d.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index ecfb62086d..5ca1f74e4f 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -623,14 +623,6 @@ declare namespace notification { function isSupportTemplate(templateName: string, callback: AsyncCallback): void; function isSupportTemplate(templateName: string): Promise; - /** - * Query notification sending permission. - * - * @since 8 - */ - function isNotificationEnabledSelf(callback: AsyncCallback): void; - function isNotificationEnabledSelf(): Promise; - /** * Request permission to send notification. * -- Gitee From 4dcfddf08a939dbbf12182679d55910b50364c70 Mon Sep 17 00:00:00 2001 From: "yu.xu" Date: Sat, 26 Feb 2022 19:22:23 +0800 Subject: [PATCH 030/163] Update thermal level change for @ohos.commonEvent.d.ts Signed-off-by: yu.xu --- api/@ohos.commonEvent.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/@ohos.commonEvent.d.ts b/api/@ohos.commonEvent.d.ts index e9b04424dc..58be913459 100644 --- a/api/@ohos.commonEvent.d.ts +++ b/api/@ohos.commonEvent.d.ts @@ -170,6 +170,12 @@ declare namespace commonEvent { */ COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON", + /** + * this commonEvent means when the thermal state level change + * @since 8 + */ + COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED", + /** * this commonEvent means when the user is present after the device waked up. */ -- Gitee From c520905ed9e0f86614cf57be5a9530e6ada90477 Mon Sep 17 00:00:00 2001 From: shilei Date: Sun, 27 Feb 2022 08:24:18 +0000 Subject: [PATCH 031/163] add metadata for hapModuleInfo Signed-off-by: shilei Change-Id: Ie08624c418e7b9b5fb5a42becb0dec40e633c902 --- api/bundle/hapModuleInfo.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/bundle/hapModuleInfo.d.ts b/api/bundle/hapModuleInfo.d.ts index 9c428d4376..477ca86021 100644 --- a/api/bundle/hapModuleInfo.d.ts +++ b/api/bundle/hapModuleInfo.d.ts @@ -15,6 +15,7 @@ import { AbilityInfo } from "./abilityInfo"; import { ExtensionAbilityInfo } from "./extensionAbilityInfo"; +import { Metadata } from './metadata' /** * @name Obtains configuration information about an module. @@ -128,4 +129,11 @@ export interface HapModuleInfo { * @syscap SystemCapability.BundleManager.BundleFramework */ readonly extensionAbilityInfo: Array; + /** + * @default Indicates the metadata of ability + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * + */ + readonly metadata: Array; } \ No newline at end of file -- Gitee From ff0b3a5dba8145655d7c5e4adc0ca05d186ff99c Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Fri, 25 Feb 2022 17:10:56 +0800 Subject: [PATCH 032/163] houhaoyu@huawei.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit syscap补齐 Signed-off-by: houhaoyu Change-Id: I950e0bc3eaac1e7820307b9af692f3f3ea621f61 --- api/@internal/component/ets/middle_class.d.ts | 2 +- api/device-define/PC.json | 5 - api/device-define/car.json | 132 +++++++++++++- api/device-define/liteWearable.json | 16 +- api/device-define/pc.json | 157 +++++++++++++++++ api/device-define/phone.json | 150 +++++++++++++++- api/device-define/router.json | 12 +- api/device-define/smartVision.json | 14 +- api/device-define/tablet.json | 161 +++++++++++++++++- api/device-define/tv.json | 139 ++++++++++++++- api/device-define/wearable.json | 140 ++++++++++++++- api/syscapCheck/sysCapSchema.json | 2 +- 12 files changed, 915 insertions(+), 15 deletions(-) delete mode 100644 api/device-define/PC.json create mode 100644 api/device-define/pc.json diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts index 05aaf273f8..69f31c3b81 100644 --- a/api/@internal/component/ets/middle_class.d.ts +++ b/api/@internal/component/ets/middle_class.d.ts @@ -601,7 +601,7 @@ declare class TSSwipeGestureInterface { pop(): SwipeGestureInterface; } -declare class PinchGestureInterface { +declare class TSPinchGestureInterface { create(value?: { fingers?: number; distance?: number; diff --git a/api/device-define/PC.json b/api/device-define/PC.json deleted file mode 100644 index 053868fe2e..0000000000 --- a/api/device-define/PC.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "SysCaps": [ - "SystemCapability.ArkUI.ArkUI.Full" - ] -} \ No newline at end of file diff --git a/api/device-define/car.json b/api/device-define/car.json index 053868fe2e..25cda119ad 100644 --- a/api/device-define/car.json +++ b/api/device-define/car.json @@ -1,5 +1,135 @@ { "SysCaps": [ - "SystemCapability.ArkUI.ArkUI.Full" + "SystemCapability.ArkUI.ArkUI.Full", + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.ArkUI.ArkUI.Napi", + "SystemCapability.ArkUI.ArkUI.Libuv", + "SystemCapability.BundleManager.BundleFramework", + "SystemCapability.BundleManager.DistributedBundleFramework", + "SystemCapability.BundleManager.BundleTool", + "SystemCapability.BundleManager.Zlib", + "SystemCapability.BundleManager.PackingTool", + "SystemCapability.Graphic.Graphic2D.WebGL", + "SystemCapability.Graphic.Graphic2D.WebGL2", + "SystemCapability.WindowManager.WindowManager.Core", + "SystemCapability.WindowManager.WindowManager.MutiScreen", + "SystemCapability.Notification.CommonEvent", + "SystemCapability.Notification.Notification", + "SystemCapability.Notification.ReminderAgent", + "SystemCapability.Notification.Emitter", + "SystemCapability.Communication.IPC.Core", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.Communication.NetManager.Core", + "SystemCapability.Communication.NetManager.Extension", + "SystemCapability.Communication.NetStack", + "SystemCapability.Communication.WiFi.Core", + "SystemCapability.Communication.WiFi.STA", + "SystemCapability.Communication.WiFi.AP", + "SystemCapability.Communication.WiFi.P2P", + "SystemCapability.Communication.Bluetooth.Core", + "SystemCapability.Communication.Bluetooth.Lite", + "SystemCapability.Location.Location.Base", + "SystemCapability.Location.Location.Geocoder", + "SystemCapability.Location.Location.Geofence", + "SystemCapability.Location.Location.Gnss", + "SystemCapability.Location.Location.Lite", + "SystemCapability.MultimodalInput.Input.Core", + "SystemCapability.MultimodalInput.Input.InputDevice", + "SystemCapability.MultimodalInput.Input.RemoteInputDevice", + "SystemCapability.MultimodalInput.Input.InputMonitor", + "SystemCapability.MultimodalInput.Input.InputConsumer", + "SystemCapability.MultimodalInput.Input.InputSimulator", + "SystemCapability.MultimodalInput.Input.InputFilter", + "SystemCapability.PowerManager.ThermalManager", + "SystemCapability.PowerManager.PowerManager.Core", + "SystemCapability.Multimedia.Media.Core", + "SystemCapability.Multimedia.Media.AudioPlayer", + "SystemCapability.Multimedia.Media.AudioRecorder", + "SystemCapability.Multimedia.Media.VideoPlayer", + "SystemCapability.Multimedia.Media.VideoRecorder", + "SystemCapability.Multimedia.Media.Codec", + "SystemCapability.Multimedia.Media.Spliter", + "SystemCapability.Multimedia.Media.Muxer", + "SystemCapability.Multimedia.Audio.Core", + "SystemCapability.Multimedia.Audio.Renderer", + "SystemCapability.Multimedia.Audio.Capturer", + "SystemCapability.Multimedia.Audio.Device", + "SystemCapability.Multimedia.Audio.Volume", + "SystemCapability.Multimedia.Audio.Communication", + "SystemCapability.Multimedia.Camera.Core", + "SystemCapability.Multimedia.Camera.DistributedCore", + "SystemCapability.Multimedia.Image.Core", + "SystemCapability.Multimedia.Image.ImageSource", + "SystemCapability.Multimedia.Image.ImagePacker", + "SystemCapability.Multimedia.Image.ImageReceiver", + "SystemCapability.Multimedia.MediaLibrary.Core", + "SystemCapability.Multimedia.MediaLibrary.SmartAlbum", + "SystemCapability.Multimedia.MediaLibrary.DistributedCore", + "SystemCapability.Telephony.CallManager", + "SystemCapability.Global.I18n", + "SystemCapability.Global.ResourceManager", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.Customization.EnterpriseDeviceManager", + "SystemCapability.BarrierFree.Accessibility.Core", + "SystemCapability.BarrierFree.Accessibility.Vision", + "SystemCapability.BarrierFree.Accessibility.Hearing", + "SystemCapability.ResourceSchedule.WorkScheduler", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask", + "SystemCapability.ResourceSchedule.UsageStatistics.App", + "SystemCapability.ResourceSchedule.UsageStatistics.AppGroup", + "SystemCapability.Utils.Lang", + "SystemCapability.HiviewDFX.HiLog", + "SystemCapability.HiviewDFX.HiTrace", + "SystemCapability.HiviewDFX.Hiview.FaultLogger", + "SystemCapability.HiviewDFX.HiChecker", + "SystemCapability.HiviewDFX.HiCollie", + "SystemCapability.HiviewDFX.HiDumper", + "SystemCapability.HiviewDFX.HiAppEvent", + "SystemCapability.HiviewDFX.HiSysEvent", + "SystemCapability.HiviewDFX.HiProfiler.HiDebug", + "SystemCapability.Update.Core", + "SystemCapability.Security.AccessToken", + "SystemCapability.Account.OsAccount", + "SystemCapability.Account.AppAccount", + "SystemCapability.FileManagement.StorageService.Backup", + "SystemCapability.FileManagement.StorageService.SpatialStatistics", + "SystemCapability.FileManagement.StorageService.Volume", + "SystemCapability.FileManagement.StorageService.Encryption", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.FileManagement.File.DistributedFile", + "SystemCapability.FileManagement.AppFileService", + "SystemCapability.FileManagement.UserFileService", + "SystemCapability.USB.USBManager", + "SystemCapability.Startup.SystemInfo", + "SystemCapability.DistributedDataManager.RelationalStore.Core", + "SystemCapability.DistributedDataManager.RelationalStore.Synchronize", + "SystemCapability.DistributedDataManager.KVStore.Core", + "SystemCapability.DistributedDataManager.KVStore.DistributedKVStore", + "SystemCapability.DistributedDataManager.DataObject.Core", + "SystemCapability.DistributedDataManager.DataObject.DistributedObject", + "SystemCapability.DistributedDataManager.Preferences.Core", + "SystemCapability.DistributedDataManager.DataShare.Core", + "SystemCapability.DistributedDataManager.DataShare.Consumer", + "SystemCapability.DistributedDataManager.DataShare.Provider", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.AbilityCore", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Mission", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityTools.AbilityAssistant", + "SystemCapability.Ability.Form", + "SystemCapability.Applications.ContactsData" ] } \ No newline at end of file diff --git a/api/device-define/liteWearable.json b/api/device-define/liteWearable.json index 17bc0061a2..30bb33b1a6 100644 --- a/api/device-define/liteWearable.json +++ b/api/device-define/liteWearable.json @@ -1,5 +1,19 @@ { "SysCaps": [ - "SystemCapability.ArkUI.ArkUI.Lite" + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.BundleManager.PackingTool", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.Communication.Bluetooth.Lite", + "SystemCapability.Location.Location.Lite", + "SystemCapability.PowerManager.PowerManager.Lite", + "SystemCapability.PowerManager.BatteryManager.Lite", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.HiviewDFX.HiLogLite", + "SystemCapability.HiviewDFX.HiviewLite", + "SystemCapability.HiviewDFX.HiEventLite", + "SystemCapability.Update.Core", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.Startup.SystemInfo" ] } \ No newline at end of file diff --git a/api/device-define/pc.json b/api/device-define/pc.json new file mode 100644 index 0000000000..f18e372763 --- /dev/null +++ b/api/device-define/pc.json @@ -0,0 +1,157 @@ +{ + "SysCaps": [ + "SystemCapability.ArkUI.ArkUI.Full", + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.ArkUI.ArkUI.Napi", + "SystemCapability.ArkUI.ArkUI.Libuv", + "SystemCapability.BundleManager.BundleFramework", + "SystemCapability.BundleManager.DistributedBundleFramework", + "SystemCapability.BundleManager.BundleTool", + "SystemCapability.BundleManager.Zlib", + "SystemCapability.BundleManager.PackingTool", + "SystemCapability.Graphic.Graphic2D.WebGL", + "SystemCapability.Graphic.Graphic2D.WebGL2", + "SystemCapability.WindowManager.WindowManager.Core", + "SystemCapability.WindowManager.WindowManager.MutiScreen", + "SystemCapability.Notification.CommonEvent", + "SystemCapability.Notification.Notification", + "SystemCapability.Notification.ReminderAgent", + "SystemCapability.Notification.Emitter", + "SystemCapability.Communication.IPC.Core", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.Communication.NetManager.Core", + "SystemCapability.Communication.NetManager.Extension", + "SystemCapability.Communication.NetStack", + "SystemCapability.Communication.WiFi.Core", + "SystemCapability.Communication.WiFi.STA", + "SystemCapability.Communication.WiFi.AP", + "SystemCapability.Communication.WiFi.P2P", + "SystemCapability.Communication.Bluetooth.Core", + "SystemCapability.Communication.Bluetooth.Lite", + "SystemCapability.MultimodalInput.Input.Core", + "SystemCapability.MultimodalInput.Input.InputDevice", + "SystemCapability.MultimodalInput.Input.RemoteInputDevice", + "SystemCapability.MultimodalInput.Input.InputMonitor", + "SystemCapability.MultimodalInput.Input.InputConsumer", + "SystemCapability.MultimodalInput.Input.InputSimulator", + "SystemCapability.MultimodalInput.Input.InputFilter", + "SystemCapability.PowerManager.BatteryManager.Extension", + "SystemCapability.PowerManager.BatteryStatistics", + "SystemCapability.PowerManager.DisplayManager", + "SystemCapability.PowerManager.ThermalManager", + "SystemCapability.PowerManager.PowerManager.Core", + "SystemCapability.PowerManager.BatteryManager.Core", + "SystemCapability.PowerManager.PowerManager.Extension", + "SystemCapability.Multimedia.Media.Core", + "SystemCapability.Multimedia.Media.AudioPlayer", + "SystemCapability.Multimedia.Media.AudioRecorder", + "SystemCapability.Multimedia.Media.VideoPlayer", + "SystemCapability.Multimedia.Media.VideoRecorder", + "SystemCapability.Multimedia.Media.Codec", + "SystemCapability.Multimedia.Media.Spliter", + "SystemCapability.Multimedia.Media.Muxer", + "SystemCapability.Multimedia.Audio.Core", + "SystemCapability.Multimedia.Audio.Renderer", + "SystemCapability.Multimedia.Audio.Capturer", + "SystemCapability.Multimedia.Audio.Device", + "SystemCapability.Multimedia.Audio.Volume", + "SystemCapability.Multimedia.Audio.Communication", + "SystemCapability.Multimedia.Camera.Core", + "SystemCapability.Multimedia.Camera.DistributedCore", + "SystemCapability.Multimedia.Image.Core", + "SystemCapability.Multimedia.Image.ImageSource", + "SystemCapability.Multimedia.Image.ImagePacker", + "SystemCapability.Multimedia.Image.ImageReceiver", + "SystemCapability.Multimedia.MediaLibrary.Core", + "SystemCapability.Multimedia.MediaLibrary.SmartAlbum", + "SystemCapability.Multimedia.MediaLibrary.DistributedCore", + "SystemCapability.Telephony.CoreService", + "SystemCapability.Telephony.CallManager", + "SystemCapability.Telephony.CellularCall", + "SystemCapability.Telephony.CellularData", + "SystemCapability.Telephony.SmsMms", + "SystemCapability.Telephony.StateRegistry", + "SystemCapability.Global.I18n", + "SystemCapability.Global.ResourceManager", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.Customization.EnterpriseDeviceManager", + "SystemCapability.BarrierFree.Accessibility.Core", + "SystemCapability.BarrierFree.Accessibility.Vision", + "SystemCapability.BarrierFree.Accessibility.Hearing", + "SystemCapability.BarrierFree.Accessibility.Interaction", + "SystemCapability.ResourceSchedule.WorkScheduler", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask", + "SystemCapability.ResourceSchedule.UsageStatistics.App", + "SystemCapability.ResourceSchedule.UsageStatistics.AppGroup", + "SystemCapability.Utils.Lang", + "SystemCapability.HiviewDFX.HiLog", + "SystemCapability.HiviewDFX.HiTrace", + "SystemCapability.HiviewDFX.Hiview.FaultLogger", + "SystemCapability.HiviewDFX.HiChecker", + "SystemCapability.HiviewDFX.HiCollie", + "SystemCapability.HiviewDFX.HiDumper", + "SystemCapability.HiviewDFX.HiAppEvent", + "SystemCapability.HiviewDFX.HiSysEvent", + "SystemCapability.HiviewDFX.HiProfiler.HiDebug", + "SystemCapability.Update.Core", + "SystemCapability.DistributedHardware.DeviceManager", + "SystemCapability.Security.DeviceAuth", + "SystemCapability.Security.DataTransitManager", + "SystemCapability.Security.DeviceSecurityLevel", + "SystemCapability.Security.SecurityHuks", + "SystemCapability.Security.AccessToken", + "SystemCapability.Account.OsAccount", + "SystemCapability.Account.AppAccount", + "SystemCapability.UserIAM.UserAuth.Core", + "SystemCapability.UserIAM.AuthExecutorManager", + "SystemCapability.UserIAM.UserAuth.PinAuth", + "SystemCapability.UserIAM.UserIdm", + "SystemCapability.UserIAM.UserAuth.FaceAuth", + "SystemCapability.Miscservices.InputMethodFramework", + "SystemCapability.Miscservices.Pasteboard", + "SystemCapability.Miscservices.Time", + "SystemCapability.Miscservices.WallpaperFramework", + "SystemCapability.MiscServices.ScreenLock", + "SystemCapability.MiscServices.Request", + "SystemCapability.FileManagement.StorageService.Backup", + "SystemCapability.FileManagement.StorageService.SpatialStatistics", + "SystemCapability.FileManagement.StorageService.Volume", + "SystemCapability.FileManagement.StorageService.Encryption", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.FileManagement.File.DistributedFile", + "SystemCapability.FileManagement.AppFileService", + "SystemCapability.FileManagement.UserFileService", + "SystemCapability.USB.USBManager", + "SystemCapability.Startup.SystemInfo", + "SystemCapability.DistributedDataManager.RelationalStore.Core", + "SystemCapability.DistributedDataManager.RelationalStore.Synchronize", + "SystemCapability.DistributedDataManager.KVStore.Core", + "SystemCapability.DistributedDataManager.KVStore.DistributedKVStore", + "SystemCapability.DistributedDataManager.DataObject.Core", + "SystemCapability.DistributedDataManager.DataObject.DistributedObject", + "SystemCapability.DistributedDataManager.Preferences.Core", + "SystemCapability.DistributedDataManager.DataShare.Core", + "SystemCapability.DistributedDataManager.DataShare.Consumer", + "SystemCapability.DistributedDataManager.DataShare.Provider", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.AbilityCore", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Mission", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityTools.AbilityAssistant", + "SystemCapability.Ability.Form", + "SystemCapability.Applications.ContactsData" + ] +} \ No newline at end of file diff --git a/api/device-define/phone.json b/api/device-define/phone.json index 23513a932b..119c023154 100644 --- a/api/device-define/phone.json +++ b/api/device-define/phone.json @@ -11,6 +11,154 @@ "SystemCapability.BundleManager.PackingTool", "SystemCapability.Graphic.Graphic2D.WebGL", "SystemCapability.Graphic.Graphic2D.WebGL2", - "SystemCapability.WindowManager.WindowManager.Core" + "SystemCapability.WindowManager.WindowManager.Core", + "SystemCapability.WindowManager.WindowManager.MutiScreen", + "SystemCapability.Notification.CommonEvent", + "SystemCapability.Notification.Notification", + "SystemCapability.Notification.ReminderAgent", + "SystemCapability.Notification.Emitter", + "SystemCapability.Communication.IPC.Core", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.Communication.NetManager.Core", + "SystemCapability.Communication.NetManager.Extension", + "SystemCapability.Communication.NetStack", + "SystemCapability.Communication.WiFi.Core", + "SystemCapability.Communication.WiFi.STA", + "SystemCapability.Communication.WiFi.AP", + "SystemCapability.Communication.WiFi.P2P", + "SystemCapability.Communication.Bluetooth.Core", + "SystemCapability.Communication.Bluetooth.Lite", + "SystemCapability.Location.Location.Base", + "SystemCapability.Location.Location.Geocoder", + "SystemCapability.Location.Location.Geofence", + "SystemCapability.Location.Location.Gnss", + "SystemCapability.Location.Location.Lite", + "SystemCapability.MultimodalInput.Input.Core", + "SystemCapability.MultimodalInput.Input.InputDevice", + "SystemCapability.MultimodalInput.Input.RemoteInputDevice", + "SystemCapability.MultimodalInput.Input.InputMonitor", + "SystemCapability.MultimodalInput.Input.InputConsumer", + "SystemCapability.MultimodalInput.Input.InputSimulator", + "SystemCapability.MultimodalInput.Input.InputFilter", + "SystemCapability.PowerManager.BatteryManager.Extension", + "SystemCapability.PowerManager.BatteryStatistics", + "SystemCapability.PowerManager.DisplayManager", + "SystemCapability.PowerManager.ThermalManager", + "SystemCapability.PowerManager.PowerManager.Core", + "SystemCapability.PowerManager.BatteryManager.Core", + "SystemCapability.PowerManager.PowerManager.Extension", + "SystemCapability.Multimedia.Media.Core", + "SystemCapability.Multimedia.Media.AudioPlayer", + "SystemCapability.Multimedia.Media.AudioRecorder", + "SystemCapability.Multimedia.Media.VideoPlayer", + "SystemCapability.Multimedia.Media.VideoRecorder", + "SystemCapability.Multimedia.Media.Codec", + "SystemCapability.Multimedia.Media.Spliter", + "SystemCapability.Multimedia.Media.Muxer", + "SystemCapability.Multimedia.Audio.Core", + "SystemCapability.Multimedia.Audio.Renderer", + "SystemCapability.Multimedia.Audio.Capturer", + "SystemCapability.Multimedia.Audio.Device", + "SystemCapability.Multimedia.Audio.Volume", + "SystemCapability.Multimedia.Audio.Communication", + "SystemCapability.Multimedia.Camera.Core", + "SystemCapability.Multimedia.Camera.DistributedCore", + "SystemCapability.Multimedia.Image.Core", + "SystemCapability.Multimedia.Image.ImageSource", + "SystemCapability.Multimedia.Image.ImagePacker", + "SystemCapability.Multimedia.Image.ImageReceiver", + "SystemCapability.Multimedia.MediaLibrary.Core", + "SystemCapability.Multimedia.MediaLibrary.SmartAlbum", + "SystemCapability.Multimedia.MediaLibrary.DistributedCore", + "SystemCapability.Telephony.CoreService", + "SystemCapability.Telephony.CallManager", + "SystemCapability.Telephony.CellularCall", + "SystemCapability.Telephony.CellularData", + "SystemCapability.Telephony.SmsMms", + "SystemCapability.Telephony.StateRegistry", + "SystemCapability.Global.I18n", + "SystemCapability.Global.ResourceManager", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.Customization.EnterpriseDeviceManager", + "SystemCapability.BarrierFree.Accessibility.Core", + "SystemCapability.BarrierFree.Accessibility.Vision", + "SystemCapability.BarrierFree.Accessibility.Hearing", + "SystemCapability.BarrierFree.Accessibility.Interaction", + "SystemCapability.ResourceSchedule.WorkScheduler", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask", + "SystemCapability.ResourceSchedule.UsageStatistics.App", + "SystemCapability.ResourceSchedule.UsageStatistics.AppGroup", + "SystemCapability.Utils.Lang", + "SystemCapability.HiviewDFX.HiLog", + "SystemCapability.HiviewDFX.HiTrace", + "SystemCapability.HiviewDFX.Hiview.FaultLogger", + "SystemCapability.HiviewDFX.HiChecker", + "SystemCapability.HiviewDFX.HiCollie", + "SystemCapability.HiviewDFX.HiDumper", + "SystemCapability.HiviewDFX.HiAppEvent", + "SystemCapability.HiviewDFX.HiSysEvent", + "SystemCapability.HiviewDFX.HiProfiler.HiDebug", + "SystemCapability.Update.Core", + "SystemCapability.DistributedHardware.DeviceManager", + "SystemCapability.Security.DeviceAuth", + "SystemCapability.Security.DataTransitManager", + "SystemCapability.Security.DeviceSecurityLevel", + "SystemCapability.Security.SecurityHuks", + "SystemCapability.Security.AccessToken", + "SystemCapability.Account.OsAccount", + "SystemCapability.Account.AppAccount", + "SystemCapability.UserIAM.UserAuth.Core", + "SystemCapability.UserIAM.AuthExecutorManager", + "SystemCapability.UserIAM.UserAuth.PinAuth", + "SystemCapability.UserIAM.UserIdm", + "SystemCapability.UserIAM.UserAuth.FaceAuth", + "SystemCapability.Miscservices.InputMethodFramework", + "SystemCapability.Miscservices.Pasteboard", + "SystemCapability.Miscservices.Time", + "SystemCapability.Miscservices.WallpaperFramework", + "SystemCapability.MiscServices.ScreenLock", + "SystemCapability.MiscServices.Request", + "SystemCapability.FileManagement.StorageService.Backup", + "SystemCapability.FileManagement.StorageService.SpatialStatistics", + "SystemCapability.FileManagement.StorageService.Volume", + "SystemCapability.FileManagement.StorageService.Encryption", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.FileManagement.File.DistributedFile", + "SystemCapability.FileManagement.AppFileService", + "SystemCapability.FileManagement.UserFileService", + "SystemCapability.USB.USBManager", + "SystemCapability.Sensors.Sensor", + "SystemCapability.Sensors.MiscDevice", + "SystemCapability.Startup.SystemInfo", + "SystemCapability.DistributedDataManager.RelationalStore.Core", + "SystemCapability.DistributedDataManager.RelationalStore.Synchronize", + "SystemCapability.DistributedDataManager.KVStore.Core", + "SystemCapability.DistributedDataManager.KVStore.DistributedKVStore", + "SystemCapability.DistributedDataManager.DataObject.Core", + "SystemCapability.DistributedDataManager.DataObject.DistributedObject", + "SystemCapability.DistributedDataManager.Preferences.Core", + "SystemCapability.DistributedDataManager.DataShare.Core", + "SystemCapability.DistributedDataManager.DataShare.Consumer", + "SystemCapability.DistributedDataManager.DataShare.Provider", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.AbilityCore", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Mission", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityTools.AbilityAssistant", + "SystemCapability.Ability.Form", + "SystemCapability.Applications.ContactsData" ] } \ No newline at end of file diff --git a/api/device-define/router.json b/api/device-define/router.json index 1aaf14cd60..4cd72120a6 100644 --- a/api/device-define/router.json +++ b/api/device-define/router.json @@ -1,5 +1,15 @@ { "SysCaps": [ - "SystemCapability.Communication.SoftBus.Core" + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.PowerManager.PowerManager.Lite", + "SystemCapability.PowerManager.BatteryManager.Lite", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.HiviewDFX.HiLogLite", + "SystemCapability.HiviewDFX.HiviewLite", + "SystemCapability.HiviewDFX.HiEventLite", + "SystemCapability.Update.Core", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.Startup.SystemInfo" ] } \ No newline at end of file diff --git a/api/device-define/smartVision.json b/api/device-define/smartVision.json index 17bc0061a2..1d22734511 100644 --- a/api/device-define/smartVision.json +++ b/api/device-define/smartVision.json @@ -1,5 +1,17 @@ { "SysCaps": [ - "SystemCapability.ArkUI.ArkUI.Lite" + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.BundleManager.PackingTool", + "SystemCapability.Communication.IPC.Core", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.PowerManager.PowerManager.Lite", + "SystemCapability.PowerManager.BatteryManager.Lite", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.HiviewDFX.HiLogLite", + "SystemCapability.HiviewDFX.HiviewLite", + "SystemCapability.Update.Core", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.Startup.SystemInfo" ] } \ No newline at end of file diff --git a/api/device-define/tablet.json b/api/device-define/tablet.json index 053868fe2e..119c023154 100644 --- a/api/device-define/tablet.json +++ b/api/device-define/tablet.json @@ -1,5 +1,164 @@ { "SysCaps": [ - "SystemCapability.ArkUI.ArkUI.Full" + "SystemCapability.ArkUI.ArkUI.Full", + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.ArkUI.ArkUI.Napi", + "SystemCapability.ArkUI.ArkUI.Libuv", + "SystemCapability.BundleManager.BundleFramework", + "SystemCapability.BundleManager.DistributedBundleFramework", + "SystemCapability.BundleManager.BundleTool", + "SystemCapability.BundleManager.Zlib", + "SystemCapability.BundleManager.PackingTool", + "SystemCapability.Graphic.Graphic2D.WebGL", + "SystemCapability.Graphic.Graphic2D.WebGL2", + "SystemCapability.WindowManager.WindowManager.Core", + "SystemCapability.WindowManager.WindowManager.MutiScreen", + "SystemCapability.Notification.CommonEvent", + "SystemCapability.Notification.Notification", + "SystemCapability.Notification.ReminderAgent", + "SystemCapability.Notification.Emitter", + "SystemCapability.Communication.IPC.Core", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.Communication.NetManager.Core", + "SystemCapability.Communication.NetManager.Extension", + "SystemCapability.Communication.NetStack", + "SystemCapability.Communication.WiFi.Core", + "SystemCapability.Communication.WiFi.STA", + "SystemCapability.Communication.WiFi.AP", + "SystemCapability.Communication.WiFi.P2P", + "SystemCapability.Communication.Bluetooth.Core", + "SystemCapability.Communication.Bluetooth.Lite", + "SystemCapability.Location.Location.Base", + "SystemCapability.Location.Location.Geocoder", + "SystemCapability.Location.Location.Geofence", + "SystemCapability.Location.Location.Gnss", + "SystemCapability.Location.Location.Lite", + "SystemCapability.MultimodalInput.Input.Core", + "SystemCapability.MultimodalInput.Input.InputDevice", + "SystemCapability.MultimodalInput.Input.RemoteInputDevice", + "SystemCapability.MultimodalInput.Input.InputMonitor", + "SystemCapability.MultimodalInput.Input.InputConsumer", + "SystemCapability.MultimodalInput.Input.InputSimulator", + "SystemCapability.MultimodalInput.Input.InputFilter", + "SystemCapability.PowerManager.BatteryManager.Extension", + "SystemCapability.PowerManager.BatteryStatistics", + "SystemCapability.PowerManager.DisplayManager", + "SystemCapability.PowerManager.ThermalManager", + "SystemCapability.PowerManager.PowerManager.Core", + "SystemCapability.PowerManager.BatteryManager.Core", + "SystemCapability.PowerManager.PowerManager.Extension", + "SystemCapability.Multimedia.Media.Core", + "SystemCapability.Multimedia.Media.AudioPlayer", + "SystemCapability.Multimedia.Media.AudioRecorder", + "SystemCapability.Multimedia.Media.VideoPlayer", + "SystemCapability.Multimedia.Media.VideoRecorder", + "SystemCapability.Multimedia.Media.Codec", + "SystemCapability.Multimedia.Media.Spliter", + "SystemCapability.Multimedia.Media.Muxer", + "SystemCapability.Multimedia.Audio.Core", + "SystemCapability.Multimedia.Audio.Renderer", + "SystemCapability.Multimedia.Audio.Capturer", + "SystemCapability.Multimedia.Audio.Device", + "SystemCapability.Multimedia.Audio.Volume", + "SystemCapability.Multimedia.Audio.Communication", + "SystemCapability.Multimedia.Camera.Core", + "SystemCapability.Multimedia.Camera.DistributedCore", + "SystemCapability.Multimedia.Image.Core", + "SystemCapability.Multimedia.Image.ImageSource", + "SystemCapability.Multimedia.Image.ImagePacker", + "SystemCapability.Multimedia.Image.ImageReceiver", + "SystemCapability.Multimedia.MediaLibrary.Core", + "SystemCapability.Multimedia.MediaLibrary.SmartAlbum", + "SystemCapability.Multimedia.MediaLibrary.DistributedCore", + "SystemCapability.Telephony.CoreService", + "SystemCapability.Telephony.CallManager", + "SystemCapability.Telephony.CellularCall", + "SystemCapability.Telephony.CellularData", + "SystemCapability.Telephony.SmsMms", + "SystemCapability.Telephony.StateRegistry", + "SystemCapability.Global.I18n", + "SystemCapability.Global.ResourceManager", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.Customization.EnterpriseDeviceManager", + "SystemCapability.BarrierFree.Accessibility.Core", + "SystemCapability.BarrierFree.Accessibility.Vision", + "SystemCapability.BarrierFree.Accessibility.Hearing", + "SystemCapability.BarrierFree.Accessibility.Interaction", + "SystemCapability.ResourceSchedule.WorkScheduler", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask", + "SystemCapability.ResourceSchedule.UsageStatistics.App", + "SystemCapability.ResourceSchedule.UsageStatistics.AppGroup", + "SystemCapability.Utils.Lang", + "SystemCapability.HiviewDFX.HiLog", + "SystemCapability.HiviewDFX.HiTrace", + "SystemCapability.HiviewDFX.Hiview.FaultLogger", + "SystemCapability.HiviewDFX.HiChecker", + "SystemCapability.HiviewDFX.HiCollie", + "SystemCapability.HiviewDFX.HiDumper", + "SystemCapability.HiviewDFX.HiAppEvent", + "SystemCapability.HiviewDFX.HiSysEvent", + "SystemCapability.HiviewDFX.HiProfiler.HiDebug", + "SystemCapability.Update.Core", + "SystemCapability.DistributedHardware.DeviceManager", + "SystemCapability.Security.DeviceAuth", + "SystemCapability.Security.DataTransitManager", + "SystemCapability.Security.DeviceSecurityLevel", + "SystemCapability.Security.SecurityHuks", + "SystemCapability.Security.AccessToken", + "SystemCapability.Account.OsAccount", + "SystemCapability.Account.AppAccount", + "SystemCapability.UserIAM.UserAuth.Core", + "SystemCapability.UserIAM.AuthExecutorManager", + "SystemCapability.UserIAM.UserAuth.PinAuth", + "SystemCapability.UserIAM.UserIdm", + "SystemCapability.UserIAM.UserAuth.FaceAuth", + "SystemCapability.Miscservices.InputMethodFramework", + "SystemCapability.Miscservices.Pasteboard", + "SystemCapability.Miscservices.Time", + "SystemCapability.Miscservices.WallpaperFramework", + "SystemCapability.MiscServices.ScreenLock", + "SystemCapability.MiscServices.Request", + "SystemCapability.FileManagement.StorageService.Backup", + "SystemCapability.FileManagement.StorageService.SpatialStatistics", + "SystemCapability.FileManagement.StorageService.Volume", + "SystemCapability.FileManagement.StorageService.Encryption", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.FileManagement.File.DistributedFile", + "SystemCapability.FileManagement.AppFileService", + "SystemCapability.FileManagement.UserFileService", + "SystemCapability.USB.USBManager", + "SystemCapability.Sensors.Sensor", + "SystemCapability.Sensors.MiscDevice", + "SystemCapability.Startup.SystemInfo", + "SystemCapability.DistributedDataManager.RelationalStore.Core", + "SystemCapability.DistributedDataManager.RelationalStore.Synchronize", + "SystemCapability.DistributedDataManager.KVStore.Core", + "SystemCapability.DistributedDataManager.KVStore.DistributedKVStore", + "SystemCapability.DistributedDataManager.DataObject.Core", + "SystemCapability.DistributedDataManager.DataObject.DistributedObject", + "SystemCapability.DistributedDataManager.Preferences.Core", + "SystemCapability.DistributedDataManager.DataShare.Core", + "SystemCapability.DistributedDataManager.DataShare.Consumer", + "SystemCapability.DistributedDataManager.DataShare.Provider", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.AbilityCore", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Mission", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityTools.AbilityAssistant", + "SystemCapability.Ability.Form", + "SystemCapability.Applications.ContactsData" ] } \ No newline at end of file diff --git a/api/device-define/tv.json b/api/device-define/tv.json index 053868fe2e..0be15a6b9e 100644 --- a/api/device-define/tv.json +++ b/api/device-define/tv.json @@ -1,5 +1,142 @@ { "SysCaps": [ - "SystemCapability.ArkUI.ArkUI.Full" + "SystemCapability.ArkUI.ArkUI.Full", + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.ArkUI.ArkUI.Napi", + "SystemCapability.ArkUI.ArkUI.Libuv", + "SystemCapability.BundleManager.BundleFramework", + "SystemCapability.BundleManager.DistributedBundleFramework", + "SystemCapability.BundleManager.BundleTool", + "SystemCapability.BundleManager.Zlib", + "SystemCapability.BundleManager.PackingTool", + "SystemCapability.Graphic.Graphic2D.WebGL", + "SystemCapability.Graphic.Graphic2D.WebGL2", + "SystemCapability.WindowManager.WindowManager.Core", + "SystemCapability.WindowManager.WindowManager.MutiScreen", + "SystemCapability.Notification.CommonEvent", + "SystemCapability.Notification.Notification", + "SystemCapability.Notification.ReminderAgent", + "SystemCapability.Notification.Emitter", + "SystemCapability.Communication.IPC.Core", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.Communication.NetManager.Core", + "SystemCapability.Communication.NetManager.Extension", + "SystemCapability.Communication.NetStack", + "SystemCapability.Communication.WiFi.Core", + "SystemCapability.Communication.WiFi.STA", + "SystemCapability.Communication.WiFi.AP", + "SystemCapability.Communication.WiFi.P2P", + "SystemCapability.Communication.Bluetooth.Core", + "SystemCapability.Communication.Bluetooth.Lite", + "SystemCapability.MultimodalInput.Input.Core", + "SystemCapability.MultimodalInput.Input.InputDevice", + "SystemCapability.MultimodalInput.Input.RemoteInputDevice", + "SystemCapability.MultimodalInput.Input.InputMonitor", + "SystemCapability.MultimodalInput.Input.InputConsumer", + "SystemCapability.MultimodalInput.Input.InputSimulator", + "SystemCapability.MultimodalInput.Input.InputFilter", + "SystemCapability.PowerManager.DisplayManager", + "SystemCapability.PowerManager.ThermalManager", + "SystemCapability.PowerManager.PowerManager.Core", + "SystemCapability.PowerManager.PowerManager.Extension", + "SystemCapability.Multimedia.Media.Core", + "SystemCapability.Multimedia.Media.AudioPlayer", + "SystemCapability.Multimedia.Media.AudioRecorder", + "SystemCapability.Multimedia.Media.VideoPlayer", + "SystemCapability.Multimedia.Media.VideoRecorder", + "SystemCapability.Multimedia.Media.Codec", + "SystemCapability.Multimedia.Media.Spliter", + "SystemCapability.Multimedia.Media.Muxer", + "SystemCapability.Multimedia.Audio.Core", + "SystemCapability.Multimedia.Audio.Renderer", + "SystemCapability.Multimedia.Audio.Capturer", + "SystemCapability.Multimedia.Audio.Device", + "SystemCapability.Multimedia.Audio.Volume", + "SystemCapability.Multimedia.Audio.Communication", + "SystemCapability.Multimedia.Camera.Core", + "SystemCapability.Multimedia.Camera.DistributedCore", + "SystemCapability.Multimedia.Image.Core", + "SystemCapability.Multimedia.Image.ImageSource", + "SystemCapability.Multimedia.Image.ImagePacker", + "SystemCapability.Multimedia.Image.ImageReceiver", + "SystemCapability.Multimedia.MediaLibrary.Core", + "SystemCapability.Multimedia.MediaLibrary.SmartAlbum", + "SystemCapability.Multimedia.MediaLibrary.DistributedCore", + "SystemCapability.Global.I18n", + "SystemCapability.Global.ResourceManager", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.Customization.EnterpriseDeviceManager", + "SystemCapability.BarrierFree.Accessibility.Core", + "SystemCapability.BarrierFree.Accessibility.Vision", + "SystemCapability.BarrierFree.Accessibility.Hearing", + "SystemCapability.BarrierFree.Accessibility.Interaction", + "SystemCapability.ResourceSchedule.WorkScheduler", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask", + "SystemCapability.ResourceSchedule.UsageStatistics.App", + "SystemCapability.ResourceSchedule.UsageStatistics.AppGroup", + "SystemCapability.Utils.Lang", + "SystemCapability.HiviewDFX.HiLog", + "SystemCapability.HiviewDFX.HiTrace", + "SystemCapability.HiviewDFX.Hiview.FaultLogger", + "SystemCapability.HiviewDFX.HiChecker", + "SystemCapability.HiviewDFX.HiCollie", + "SystemCapability.HiviewDFX.HiDumper", + "SystemCapability.HiviewDFX.HiAppEvent", + "SystemCapability.HiviewDFX.HiSysEvent", + "SystemCapability.HiviewDFX.HiProfiler.HiDebug", + "SystemCapability.Update.Core", + "SystemCapability.DistributedHardware.DeviceManager", + "SystemCapability.Security.DeviceAuth", + "SystemCapability.Security.DataTransitManager", + "SystemCapability.Security.DeviceSecurityLevel", + "SystemCapability.Security.SecurityHuks", + "SystemCapability.Security.AccessToken", + "SystemCapability.Account.OsAccount", + "SystemCapability.Account.AppAccount", + "SystemCapability.UserIAM.UserAuth.Core", + "SystemCapability.UserIAM.AuthExecutorManager", + "SystemCapability.UserIAM.UserAuth.PinAuth", + "SystemCapability.UserIAM.UserIdm", + "SystemCapability.UserIAM.UserAuth.FaceAuth", + "SystemCapability.Miscservices.Time", + "SystemCapability.FileManagement.StorageService.Backup", + "SystemCapability.FileManagement.StorageService.SpatialStatistics", + "SystemCapability.FileManagement.StorageService.Volume", + "SystemCapability.FileManagement.StorageService.Encryption", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.FileManagement.File.DistributedFile", + "SystemCapability.FileManagement.AppFileService", + "SystemCapability.FileManagement.UserFileService", + "SystemCapability.USB.USBManager", + "SystemCapability.Startup.SystemInfo", + "SystemCapability.DistributedDataManager.RelationalStore.Core", + "SystemCapability.DistributedDataManager.RelationalStore.Synchronize", + "SystemCapability.DistributedDataManager.KVStore.Core", + "SystemCapability.DistributedDataManager.KVStore.DistributedKVStore", + "SystemCapability.DistributedDataManager.DataObject.Core", + "SystemCapability.DistributedDataManager.DataObject.DistributedObject", + "SystemCapability.DistributedDataManager.Preferences.Core", + "SystemCapability.DistributedDataManager.DataShare.Core", + "SystemCapability.DistributedDataManager.DataShare.Consumer", + "SystemCapability.DistributedDataManager.DataShare.Provider", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.AbilityCore", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Mission", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityTools.AbilityAssistant", + "SystemCapability.Ability.Form" ] } \ No newline at end of file diff --git a/api/device-define/wearable.json b/api/device-define/wearable.json index 053868fe2e..1da3ca316b 100644 --- a/api/device-define/wearable.json +++ b/api/device-define/wearable.json @@ -1,5 +1,143 @@ { "SysCaps": [ - "SystemCapability.ArkUI.ArkUI.Full" + "SystemCapability.ArkUI.ArkUI.Full", + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.ArkUI.ArkUI.Napi", + "SystemCapability.ArkUI.ArkUI.Libuv", + "SystemCapability.BundleManager.BundleFramework", + "SystemCapability.BundleManager.DistributedBundleFramework", + "SystemCapability.BundleManager.BundleTool", + "SystemCapability.BundleManager.Zlib", + "SystemCapability.BundleManager.PackingTool", + "SystemCapability.Graphic.Graphic2D.WebGL", + "SystemCapability.Graphic.Graphic2D.WebGL2", + "SystemCapability.WindowManager.WindowManager.Core", + "SystemCapability.Notification.CommonEvent", + "SystemCapability.Notification.Notification", + "SystemCapability.Notification.ReminderAgent", + "SystemCapability.Notification.Emitter", + "SystemCapability.Communication.IPC.Core", + "SystemCapability.Communication.SoftBus.Core", + "SystemCapability.Communication.NetManager.Core", + "SystemCapability.Communication.NetStack", + "SystemCapability.Communication.WiFi.Core", + "SystemCapability.Communication.WiFi.STA", + "SystemCapability.Communication.WiFi.AP", + "SystemCapability.Communication.WiFi.P2P", + "SystemCapability.Communication.Bluetooth.Core", + "SystemCapability.Communication.Bluetooth.Lite", + "SystemCapability.Location.Location.Base", + "SystemCapability.Location.Location.Geocoder", + "SystemCapability.Location.Location.Geofence", + "SystemCapability.Location.Location.Gnss", + "SystemCapability.Location.Location.Lite", + "SystemCapability.MultimodalInput.Input.Core", + "SystemCapability.MultimodalInput.Input.InputConsumer", + "SystemCapability.PowerManager.BatteryManager.Extension", + "SystemCapability.PowerManager.BatteryStatistics", + "SystemCapability.PowerManager.DisplayManager", + "SystemCapability.PowerManager.ThermalManager", + "SystemCapability.PowerManager.PowerManager.Core", + "SystemCapability.PowerManager.BatteryManager.Core", + "SystemCapability.PowerManager.PowerManager.Extension", + "SystemCapability.Multimedia.Media.Core", + "SystemCapability.Multimedia.Media.AudioPlayer", + "SystemCapability.Multimedia.Media.AudioRecorder", + "SystemCapability.Multimedia.Media.VideoPlayer", + "SystemCapability.Multimedia.Media.VideoRecorder", + "SystemCapability.Multimedia.Media.Codec", + "SystemCapability.Multimedia.Media.Spliter", + "SystemCapability.Multimedia.Media.Muxer", + "SystemCapability.Multimedia.Audio.Core", + "SystemCapability.Multimedia.Audio.Renderer", + "SystemCapability.Multimedia.Audio.Capturer", + "SystemCapability.Multimedia.Audio.Device", + "SystemCapability.Multimedia.Audio.Volume", + "SystemCapability.Multimedia.Audio.Communication", + "SystemCapability.Multimedia.Camera.Core", + "SystemCapability.Multimedia.Camera.DistributedCore", + "SystemCapability.Multimedia.Image.Core", + "SystemCapability.Multimedia.Image.ImageSource", + "SystemCapability.Multimedia.Image.ImagePacker", + "SystemCapability.Multimedia.Image.ImageReceiver", + "SystemCapability.Multimedia.MediaLibrary.Core", + "SystemCapability.Multimedia.MediaLibrary.SmartAlbum", + "SystemCapability.Multimedia.MediaLibrary.DistributedCore", + "SystemCapability.Telephony.CoreService", + "SystemCapability.Telephony.CallManager", + "SystemCapability.Telephony.CellularCall", + "SystemCapability.Telephony.CellularData", + "SystemCapability.Telephony.SmsMms", + "SystemCapability.Telephony.StateRegistry", + "SystemCapability.Global.I18n", + "SystemCapability.Global.ResourceManager", + "SystemCapability.Customization.ConfigPolicy", + "SystemCapability.Customization.EnterpriseDeviceManager", + "SystemCapability.BarrierFree.Accessibility.Core", + "SystemCapability.BarrierFree.Accessibility.Vision", + "SystemCapability.ResourceSchedule.WorkScheduler", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask", + "SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask", + "SystemCapability.ResourceSchedule.UsageStatistics.App", + "SystemCapability.ResourceSchedule.UsageStatistics.AppGroup", + "SystemCapability.Utils.Lang", + "SystemCapability.HiviewDFX.HiLog", + "SystemCapability.HiviewDFX.HiTrace", + "SystemCapability.HiviewDFX.Hiview.FaultLogger", + "SystemCapability.HiviewDFX.HiChecker", + "SystemCapability.HiviewDFX.HiCollie", + "SystemCapability.HiviewDFX.HiDumper", + "SystemCapability.HiviewDFX.HiAppEvent", + "SystemCapability.HiviewDFX.HiSysEvent", + "SystemCapability.HiviewDFX.HiProfiler.HiDebug", + "SystemCapability.Update.Core", + "SystemCapability.DistributedHardware.DeviceManager", + "SystemCapability.Security.DeviceAuth", + "SystemCapability.Security.DataTransitManager", + "SystemCapability.Security.DeviceSecurityLevel", + "SystemCapability.Security.SecurityHuks", + "SystemCapability.Security.AccessToken", + "SystemCapability.Account.OsAccount", + "SystemCapability.Account.AppAccount", + "SystemCapability.UserIAM.UserAuth.Core", + "SystemCapability.UserIAM.AuthExecutorManager", + "SystemCapability.UserIAM.UserAuth.PinAuth", + "SystemCapability.UserIAM.UserIdm", + "SystemCapability.UserIAM.UserAuth.FaceAuth", + "SystemCapability.Miscservices.Time", + "SystemCapability.FileManagement.StorageService.SpatialStatistics", + "SystemCapability.FileManagement.File.FileIO", + "SystemCapability.FileManagement.File.Environment", + "SystemCapability.FileManagement.UserFileService", + "SystemCapability.Sensors.Sensor", + "SystemCapability.Sensors.MiscDevice", + "SystemCapability.Startup.SystemInfo", + "SystemCapability.DistributedDataManager.RelationalStore.Core", + "SystemCapability.DistributedDataManager.KVStore.Core", + "SystemCapability.DistributedDataManager.KVStore.DistributedKVStore", + "SystemCapability.DistributedDataManager.DataObject.Core", + "SystemCapability.DistributedDataManager.DataObject.DistributedObject", + "SystemCapability.DistributedDataManager.Preferences.Core", + "SystemCapability.DistributedDataManager.DataShare.Core", + "SystemCapability.DistributedDataManager.DataShare.Consumer", + "SystemCapability.DistributedDataManager.DataShare.Provider", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityBase", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.FAModel", + "SystemCapability.Ability.AbilityRumtime.AbilityCore", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Mission", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityRumtime.Core", + "SystemCapability.Ability.AbilityTools.AbilityAssistant", + "SystemCapability.Ability.Form", + "SystemCapability.Applications.ContactsData" ] } \ No newline at end of file diff --git a/api/syscapCheck/sysCapSchema.json b/api/syscapCheck/sysCapSchema.json index f0da24203d..b4c4d35971 100644 --- a/api/syscapCheck/sysCapSchema.json +++ b/api/syscapCheck/sysCapSchema.json @@ -37,7 +37,7 @@ "liteWearable", "car", "smartVision", - "PC", + "pc", "router" ] } -- Gitee From 08ee687d134b73c6e561dd6c350df418f0f4b894 Mon Sep 17 00:00:00 2001 From: ohos-lsw Date: Mon, 28 Feb 2022 10:02:59 +0800 Subject: [PATCH 033/163] rename ohos.contact.d.ts Signed-off-by: ohos-lsw --- api/{ohos.contact.d.ts => @ohos.contact.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/{ohos.contact.d.ts => @ohos.contact.d.ts} (100%) diff --git a/api/ohos.contact.d.ts b/api/@ohos.contact.d.ts similarity index 100% rename from api/ohos.contact.d.ts rename to api/@ohos.contact.d.ts -- Gitee From 3f95317db9b1e51b5971ab626580ba5039fc6552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=87=E8=BF=AA?= Date: Mon, 28 Feb 2022 10:11:02 +0800 Subject: [PATCH 034/163] change to api9 according to review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张文迪 --- api/@ohos.commonEvent.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/@ohos.commonEvent.d.ts b/api/@ohos.commonEvent.d.ts index e9b04424dc..fa76c35735 100644 --- a/api/@ohos.commonEvent.d.ts +++ b/api/@ohos.commonEvent.d.ts @@ -890,35 +890,35 @@ declare namespace commonEvent { /** * The external storage was removed. * This is a protected common event that can only be sent by system. - * @since 8 + * @since 9 */ COMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED", /** * The external storage was unmounted. * This is a protected common event that can only be sent by system. - * @since 8 + * @since 9 */ COMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED", /** * The external storage was mounted. * This is a protected common event that can only be sent by system. - * @since 8 + * @since 9 */ COMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED", /** * The external storage was bad removal. * This is a protected common event that can only be sent by system. - * @since 8 + * @since 9 */ COMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL", /** * The external storage was eject. * This is a protected common event that can only be sent by system. - * @since 8 + * @since 9 */ COMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT", -- Gitee From 407f1e28b52111db07f7e4f530f67529d60e765c Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 28 Feb 2022 10:44:07 +0800 Subject: [PATCH 035/163] add reminderAgent api Signed-off-by: derek Change-Id: If22a0ab008a3cfa38a9a8c92c2b20935d831b480 --- api/@ohos.reminderAgent.d.ts | 120 ++++++++++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/api/@ohos.reminderAgent.d.ts b/api/@ohos.reminderAgent.d.ts index 67c0841c9b..363402f25c 100644 --- a/api/@ohos.reminderAgent.d.ts +++ b/api/@ohos.reminderAgent.d.ts @@ -188,6 +188,28 @@ declare namespace reminderAgent { abilityName: string; } + /** + * Max screen want agent information. + * + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent + */ + interface MaxScreenWantAgent { + /** + * Name of the package that is automatically started when the reminder arrives and the device is not in use. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + pkgName: string; + + /** + * Name of the ability that is automatically started when the reminder arrives and the device is not in use. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + abilityName: string; + } + /** * Reminder Common information. * @@ -217,6 +239,35 @@ declare namespace reminderAgent { */ wantAgent?: WantAgent; + /** + * Information about the ability that is automatically started when the reminder arrives. + * If the device is in use, a notification will be displayed. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent + */ + maxScreenWantAgent?: MaxScreenWantAgent; + + /** + * Ringing duration. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + ringDuration?: number; + + /** + * Number of reminder snooze times. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + snoozeTimes?: number; + + /** + * Reminder snooze interval. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + timeInterval?: number; + /** * Reminder title. * @since 7 @@ -232,12 +283,19 @@ declare namespace reminderAgent { content?: string; /** - * Content to be displayed when the reminder is snoozing. + * Content to be displayed when the reminder is expired. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent */ expiredContent?: string; + /** + * Content to be displayed when the reminder is snoozing. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + snoozeContent?: string; + /** * notification id. If there are reminders with the same ID, the later one will overwrite the earlier one. * @since 7 @@ -253,6 +311,29 @@ declare namespace reminderAgent { slotType?: notification.SlotType; } + interface ReminderRequestCalendar extends ReminderRequest { + /** + * Reminder time. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + dateTime: LocalDataTime; + + /** + * Month in which the reminder repeats. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + repeatMonths?: Array; + + /** + * Date on which the reminder repeats. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + repeatDays?: Array; + } + /** * Alarm reminder information. * @@ -291,5 +372,42 @@ declare namespace reminderAgent { interface ReminderRequestTimer extends ReminderRequest { triggerTimeInSeconds: number; } + + interface LocalDataTime { + /** + * value of year. + * @since 7 + * @syscap LocalDataTime. + */ + year: number; + + /** + * value of month. + * @since 7 + * @syscap LocalDataTime. + */ + month: number; + + /** + * value of day. + * @since 7 + * @syscap LocalDataTime. + */ + day: number; + + /** + * value of hour. + * @since 7 + * @syscap LocalDataTime. + */ + hour: number; + + /** + * value of minute. + * @since 7 + * @syscap LocalDataTime. + */ + minute: number; + } } export default reminderAgent; \ No newline at end of file -- Gitee From 1ad7a0184777f6e4ad7ff08c577d619c062cf668 Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 28 Feb 2022 10:48:15 +0800 Subject: [PATCH 036/163] add reminderAgent api Signed-off-by: derek Change-Id: I6dd72c020199d41d15a9020a4c55d7f37a2fd9ea --- api/@ohos.reminderAgent.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/@ohos.reminderAgent.d.ts b/api/@ohos.reminderAgent.d.ts index 363402f25c..4fb85da2d0 100644 --- a/api/@ohos.reminderAgent.d.ts +++ b/api/@ohos.reminderAgent.d.ts @@ -317,7 +317,7 @@ declare namespace reminderAgent { * @since 7 * @syscap SystemCapability.Notification.ReminderAgent. */ - dateTime: LocalDataTime; + dateTime: LocalDateTime; /** * Month in which the reminder repeats. @@ -373,39 +373,39 @@ declare namespace reminderAgent { triggerTimeInSeconds: number; } - interface LocalDataTime { + interface LocalDateTime { /** * value of year. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ year: number; /** * value of month. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ month: number; /** * value of day. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ day: number; /** * value of hour. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ hour: number; /** * value of minute. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ minute: number; } -- Gitee From 27279966e4a03ed2a84c2e19dbe02272cd5de821 Mon Sep 17 00:00:00 2001 From: zhangxiao72 Date: Mon, 28 Feb 2022 12:37:06 +0800 Subject: [PATCH 037/163] =?UTF-8?q?web=20api=20=E9=80=82=E9=85=8D=E5=86=85?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1609e440506ff69fa6f44e381e59276b5440620a Signed-off-by: zhangxiao72 --- api/@internal/component/ets/web.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 6c34f1228c..0a861bee49 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -30,24 +30,24 @@ declare enum MessageLevel { Warn } -declare enum MixedModeContent { +declare enum MixedMode { /** - * MIXED_CONTENT_ALWAYS_ALLOW level. + * Allows all sources. * @since 8 */ - MIXED_CONTENT_ALWAYS_ALLOW, + ALL, /** - * MIXED_CONTENT_NEVER_ALLOW level. + * Allows sources Compatibly. * @since 8 */ - MIXED_CONTENT_NEVER_ALLOW, + Compatible, /** - * MIXED_CONTENT_COMPATIBILITY_MODE level. + * Don't allow unsecure sources from a secure origin. * @since 8 */ - MIXED_CONTENT_COMPATIBILITY_MODE, + None, } declare enum HitTestType { @@ -450,7 +450,7 @@ declare class WebAttribute extends CommonMethod { * Whether to load HTTP and HTTPS content * @since 8 */ - mixedMode(mixedMode: MixedModeContent): WebAttribute; + mixedMode(mixedMode: MixedMode): WebAttribute; /** * Sets whether the WebView supports zooming using on-screen controls or gestures -- Gitee From 2fb56c40736fa2a9f39ac96d0d0357a2fb3dd9cd Mon Sep 17 00:00:00 2001 From: Vincentchenhao Date: Mon, 28 Feb 2022 14:50:12 +0800 Subject: [PATCH 038/163] add syscapbility description Signed-off-by: Vincentchenhao --- api/@ohos.security.huks.d.ts | 102 +++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/api/@ohos.security.huks.d.ts b/api/@ohos.security.huks.d.ts index 4e31ac7dd2..7745e387fb 100755 --- a/api/@ohos.security.huks.d.ts +++ b/api/@ohos.security.huks.d.ts @@ -133,22 +133,46 @@ declare namespace huks { */ function getSdkVersion(options: HuksOptions) : string; + /** + * Interface of huks param. + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export interface HuksParam { tag: HuksTag; value: boolean | number | bigint | Uint8Array; } + /** + * Interface of huks handle. + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export interface HuksHandle { errorCode: number; handle: number; token?: Uint8Array; } + /** + * Interface of huks option. + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export interface HuksOptions { properties?: Array; inData?: Uint8Array; } + /** + * Interface of huks result. + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export interface HuksResult { errorCode: number; outData?: Uint8Array; @@ -156,6 +180,12 @@ declare namespace huks { certChains?: Array; } + /** + * @name HuksErrorCode + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksErrorCode { HUKS_SUCCESS = 0, HUKS_FAILURE = -1, @@ -228,6 +258,12 @@ declare namespace huks { HUKS_ERROR_UNKNOWN_ERROR = -1000, } + /** + * @name HuksKeyPurpose + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeyPurpose { HUKS_KEY_PURPOSE_ENCRYPT = 1, /* Usable with RSA, EC and AES keys. */ HUKS_KEY_PURPOSE_DECRYPT = 2, /* Usable with RSA, EC and AES keys. */ @@ -240,6 +276,12 @@ declare namespace huks { HUKS_KEY_PURPOSE_AGREE = 256, /* Usable with agree. */ } + /** + * @name HuksKeyDigest + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeyDigest { HUKS_DIGEST_NONE = 0, HUKS_DIGEST_MD5 = 1, @@ -250,6 +292,12 @@ declare namespace huks { HUKS_DIGEST_SHA512 = 14, } + /** + * @name HuksKeyPadding + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeyPadding { HUKS_PADDING_NONE = 0, HUKS_PADDING_OAEP = 1, @@ -259,6 +307,12 @@ declare namespace huks { HUKS_PADDING_PKCS7 = 5, } + /** + * @name HuksCipherMode + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksCipherMode { HUKS_MODE_ECB = 1, HUKS_MODE_CBC = 2, @@ -268,6 +322,12 @@ declare namespace huks { HUKS_MODE_GCM = 32, } + /** + * @name HuksKeySize + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeySize { HUKS_RSA_KEY_SIZE_512 = 512, HUKS_RSA_KEY_SIZE_768 = 768, @@ -293,6 +353,12 @@ declare namespace huks { HUKS_DH_KEY_SIZE_4096 = 4096, } + /** + * @name HuksKeyAlg + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeyAlg { HUKS_ALG_RSA = 1, HUKS_ALG_ECC = 2, @@ -309,12 +375,24 @@ declare namespace huks { HUKS_ALG_DH = 103, } + /** + * @name HuksKeyGenerateType + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeyGenerateType { HUKS_KEY_GENERATE_TYPE_DEFAULT = 0, HUKS_KEY_GENERATE_TYPE_DERIVE = 1, HUKS_KEY_GENERATE_TYPE_AGREE = 2, } + /** + * @name HuksKeyFlag + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeyFlag { HUKS_KEY_FLAG_IMPORT_KEY = 1, HUKS_KEY_FLAG_GENERATE_KEY = 2, @@ -322,16 +400,34 @@ declare namespace huks { HUKS_KEY_FLAG_DERIVE_KEY = 4, } + /** + * @name HuksKeyStorageType + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksKeyStorageType { HUKS_STORAGE_TEMP = 0, HUKS_STORAGE_PERSISTENT = 1, } + /** + * @name HuksSendType + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksSendType { HUKS_SEND_TYPE_ASYNC = 0, HUKS_SEND_TYPE_SYNC = 1, } + /** + * @name HuksTagType + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ declare enum HuksTagType { HUKS_TAG_TYPE_INVALID = 0 << 28, HUKS_TAG_TYPE_INT = 1 << 28, @@ -341,6 +437,12 @@ declare namespace huks { HUKS_TAG_TYPE_BYTES = 5 << 28, } + /** + * @name HuksTag + * @since 8 + * @syscap SystemCapability.Security.Huks + * @permission N/A + */ export enum HuksTag { /* Invalid TAG */ HUKS_TAG_INVALID = HuksTagType.HUKS_TAG_TYPE_INVALID | 0, -- Gitee From 58ff4fce6026d6582297c6ba10096fce6d05c9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=87=E8=BF=AA?= Date: Mon, 28 Feb 2022 15:17:58 +0800 Subject: [PATCH 039/163] change API arg and change to API9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张文迪 --- api/@ohos.storageStatistics.d.ts | 6 +++--- api/@ohos.volumeManager.d.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/@ohos.storageStatistics.d.ts b/api/@ohos.storageStatistics.d.ts index 7fb9e06aed..e8fa8d8634 100644 --- a/api/@ohos.storageStatistics.d.ts +++ b/api/@ohos.storageStatistics.d.ts @@ -40,7 +40,7 @@ declare namespace storageStatistics { /** * Get the bundlestat * - * @since 8 + * @since 9 */ export interface BundleStats { @@ -48,8 +48,8 @@ declare namespace storageStatistics { cacheSize: number; dataSize: number; } - function getBundleStats(volumeUuid: string, packageName: string, callback: AsyncCallback): void; - function getBundleStats(volumeUuid: string, packageName: string): Promise; + function getBundleStats(packageName: string, callback: AsyncCallback): void; + function getBundleStats(packageName: string): Promise; } diff --git a/api/@ohos.volumeManager.d.ts b/api/@ohos.volumeManager.d.ts index 0aa1f21277..563201404b 100644 --- a/api/@ohos.volumeManager.d.ts +++ b/api/@ohos.volumeManager.d.ts @@ -18,7 +18,7 @@ import {AsyncCallback, Callback} from "./basic"; /** * Provides volumemanager statistics APIs * - * @since 8 + * @since 9 * @syscap SystemCapability.FileManagement.StorageService.Volume */ declare namespace volumeManager { @@ -26,10 +26,10 @@ declare namespace volumeManager { /** * Get All Volumes * - * @since 8 + * @since 9 */ export interface Volume { - id: number; + id: string; uuid: string; description: string; removeAble: boolean; @@ -43,7 +43,7 @@ function getAllVolumes(): Promise>; /** * Mount * - * @since 8 + * @since 9 */ function mount(volumeId: string, callback: AsyncCallback): void; function mount(volumeId: string): Promise; @@ -51,7 +51,7 @@ function mount(volumeId: string): Promise; /** * UnMount * - * @since 8 + * @since 9 */ function unmount(volumeId: string, callback: AsyncCallback): void; function unmount(volumeId: string): Promise; -- Gitee From 58a1a12d445d8e754bbc68f76ff09cb2cc612bbf Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Mon, 28 Feb 2022 07:40:20 +0000 Subject: [PATCH 040/163] modify keyOption to keyOptions Signed-off-by: mayunteng_1 Change-Id: Ice99967a2a02cf6a26316981eca55f5d8edc10d8 --- api/@ohos.multimodalInput.inputConsumer.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 2b3239b48c..e10019666d 100755 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -34,7 +34,7 @@ declare namespace inputConsumer { * @param isFinalKeyDown The final key press down or up. * @param finalKeyDownDuration Duration of final key press. */ - interface KeyOption { + interface KeyOptions { preKeys: Array; finalKey: number; isFinalKeyDown: boolean; @@ -51,7 +51,7 @@ declare namespace inputConsumer { * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function on(type: "key", keyOption: KeyOption, callback: Callback): void; + function on(type: "key", keyOptions: KeyOptions, callback: Callback): void; /** * Subscribe system keys. @@ -63,7 +63,7 @@ declare namespace inputConsumer { * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function off(type: "key", keyOption: KeyOption, callback?: Callback): void; + function off(type: "key", keyOptions: KeyOptions, callback?: Callback): void; } export default inputConsumer; \ No newline at end of file -- Gitee From 35a0f478ea2ccf37833366b4aa7e2f4ccee0bdeb Mon Sep 17 00:00:00 2001 From: raul Date: Sat, 26 Feb 2022 20:07:28 +0800 Subject: [PATCH 041/163] add restore window stage interface Signed-off-by: laoyitong Change-Id: Id0481a78a63899a3f4f8bc71aabc3146439c0434 --- api/@ohos.application.Ability.d.ts | 11 +++++++++++ api/application/AbilityContext.d.ts | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 65963be527..38a08deac1 100755 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -175,6 +175,17 @@ export default class Ability { */ onWindowStageDestroy(): void; + /** + * Called back when an ability window stage is restored. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param windowStage window stage to restore + * @return - + * @StageModelOnly + */ + onWindowStageRestore(windowStage: window.WindowStage): void; + /** * Called back before an ability is destroyed. * diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index 442c46a5d0..3238ae439e 100755 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -24,6 +24,7 @@ import StartOptions from "../@ohos.application.StartOptions"; import PermissionRequestResult from "./PermissionRequestResult"; import { Configuration } from '../@ohos.application.Configuration'; import Caller from '../@ohos.application.Ability'; +import { ContentStorage } from '../@internal/component/ets/state_management'; /** * The context of an ability. It allows access to ability-specific resources. @@ -213,4 +214,15 @@ export default class AbilityContext extends Context { */ requestPermissionsFromUser(permissions: Array, requestCallback: AsyncCallback) : void; requestPermissionsFromUser(permissions: Array) : Promise; + + /** + * Restore window stage data in ability continuation + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param contentStorage the storage data used to restore window stage + * @StageModelOnly + */ + restoreWindowStage(contentStorage: ContentStorage) : void; + } \ No newline at end of file -- Gitee From ab3e8c1db9fbe5aa32e4f929d49d11d316ffcc0d Mon Sep 17 00:00:00 2001 From: njupthan Date: Mon, 28 Feb 2022 16:32:28 +0800 Subject: [PATCH 042/163] update d.ts file Signed-off-by: njupthan --- ....application.abilityDelegatorRegistry.d.ts | 8 +++---- api/@ohos.application.testRunner.d.ts | 6 ++--- api/application/abilityDelegator.d.ts | 24 +++++++++---------- api/application/abilityDelegatorArgs.d.ts | 10 ++++---- api/application/abilityMonitor.d.ts | 18 +++++++------- api/application/shellCmdResult.d.ts | 6 ++--- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/api/@ohos.application.abilityDelegatorRegistry.d.ts b/api/@ohos.application.abilityDelegatorRegistry.d.ts index 8a8443d4ee..c21a8cc64e 100644 --- a/api/@ohos.application.abilityDelegatorRegistry.d.ts +++ b/api/@ohos.application.abilityDelegatorRegistry.d.ts @@ -21,7 +21,7 @@ import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs' * during application startup. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' * @permission N/A */ @@ -30,7 +30,7 @@ declare namespace abilityDelegatorRegistry { * Get the AbilityDelegator object of the application. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return the AbilityDelegator object initialized when the application is started. */ function getAbilityDelegator(): AbilityDelegator; @@ -39,7 +39,7 @@ declare namespace abilityDelegatorRegistry { * Get unit test parameters stored in the AbilityDelegatorArgs object. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return the previously registered AbilityDelegatorArgs object. */ function getArguments(): AbilityDelegatorArgs; @@ -48,7 +48,7 @@ declare namespace abilityDelegatorRegistry { * Describes all lifecycle states of an ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ export enum AbilityLifecycleState { UNINITIALIZED, diff --git a/api/@ohos.application.testRunner.d.ts b/api/@ohos.application.testRunner.d.ts index 6ae4908fcd..58593017d0 100644 --- a/api/@ohos.application.testRunner.d.ts +++ b/api/@ohos.application.testRunner.d.ts @@ -18,7 +18,7 @@ * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import TestRunner from '@ohos.application.testRunner' * @permission N/A */ @@ -27,7 +27,7 @@ export interface TestRunner { * Prepare the unit testing environment for running test cases. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onPrepare(): void; @@ -35,7 +35,7 @@ export interface TestRunner { * Run all test cases. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onRun(): void; } diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index 729694b38f..8f48ca1ad1 100644 --- a/api/application/abilityDelegator.d.ts +++ b/api/application/abilityDelegator.d.ts @@ -23,7 +23,7 @@ import { ShellCmdResult } from './shellCmdResult' * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityDelegator from 'application/abilityDelegator.d' * @permission N/A */ @@ -32,7 +32,7 @@ export interface AbilityDelegator { * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param monitor AbilityMonitor object */ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; @@ -42,7 +42,7 @@ export interface AbilityDelegator { * Remove a specified AbilityMonitor object from the application memory. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param monitor AbilityMonitor object */ removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; @@ -52,7 +52,7 @@ export interface AbilityDelegator { * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param monitor AbilityMonitor object * @param timeout Maximum wait time, in milliseconds * @return success: return the Ability object, failure: return null @@ -65,7 +65,7 @@ export interface AbilityDelegator { * Obtain the application context. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return App Context */ getAppContext(): Context; @@ -74,7 +74,7 @@ export interface AbilityDelegator { * Obtain the lifecycle state of a specified ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param ability The Ability object * @return The state of the Ability object. enum AbilityLifecycleState */ @@ -84,7 +84,7 @@ export interface AbilityDelegator { * Obtain the ability that is currently being displayed. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return The top ability of the current application */ getCurrentTopAbility(callback: AsyncCallback): void; @@ -94,7 +94,7 @@ export interface AbilityDelegator { * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param ability The ability object * @return true: success false: failure */ @@ -105,7 +105,7 @@ export interface AbilityDelegator { * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param ability The ability object * @return true: success false: failure */ @@ -117,7 +117,7 @@ export interface AbilityDelegator { * The total length of the log information to be printed cannot exceed 1000 characters. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param msg Log information */ print(msg: string, callback: AsyncCallback): void; @@ -127,7 +127,7 @@ export interface AbilityDelegator { * Execute the given command in the aa tools side. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param cmd Shell command * @param timeoutSecs Timeout, in seconds * @return ShellCmdResult object @@ -141,7 +141,7 @@ export interface AbilityDelegator { * The total length of the log information to be printed cannot exceed 1000 characters. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @hide * @param msg Log information * @param code Result code diff --git a/api/application/abilityDelegatorArgs.d.ts b/api/application/abilityDelegatorArgs.d.ts index fb9905a667..321a68e0d2 100644 --- a/api/application/abilityDelegatorArgs.d.ts +++ b/api/application/abilityDelegatorArgs.d.ts @@ -18,7 +18,7 @@ * Store unit testing-related parameters, including test case names, and test runner name. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityDelegatorArgs from 'application/abilityDelegatorArgs.d' * @permission N/A */ @@ -27,7 +27,7 @@ export interface AbilityDelegatorArgs { * the bundle name of the application being tested. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ bundleName: string; @@ -35,7 +35,7 @@ export interface AbilityDelegatorArgs { * the parameters used for unit testing. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ parameters: {[key: string]: string}; @@ -43,7 +43,7 @@ export interface AbilityDelegatorArgs { * the class names of all test cases. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ testCaseNames: string; @@ -51,7 +51,7 @@ export interface AbilityDelegatorArgs { * the class name of the test runner used to execute test cases. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ testRunnerClassName: string; } diff --git a/api/application/abilityMonitor.d.ts b/api/application/abilityMonitor.d.ts index 71215ba908..81806c4369 100644 --- a/api/application/abilityMonitor.d.ts +++ b/api/application/abilityMonitor.d.ts @@ -18,7 +18,7 @@ * The most recently matched Ability objects will be saved in the AbilityMonitor object. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityMonitor from 'application/abilityMonitor.d' * @permission N/A */ @@ -27,7 +27,7 @@ export interface AbilityMonitor { * The name of the ability to monitor. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ abilityName: string; @@ -35,7 +35,7 @@ export interface AbilityMonitor { * Called back when the ability is started for initialization. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityCreate?:() => void; @@ -43,7 +43,7 @@ export interface AbilityMonitor { * Called back when the state of the ability changes to foreground. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityForeground?:() => void; @@ -51,7 +51,7 @@ export interface AbilityMonitor { * Called back when the state of the ability changes to background. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityBackground?:() => void; @@ -59,7 +59,7 @@ export interface AbilityMonitor { * Called back before the ability is destroyed. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onAbilityDestroy?:() => void; @@ -67,7 +67,7 @@ export interface AbilityMonitor { * Called back when an ability window stage is created. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onWindowStageCreate?:() => void; @@ -75,7 +75,7 @@ export interface AbilityMonitor { * Called back when an ability window stage is restored. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onWindowStageRestore?:() => void; @@ -83,7 +83,7 @@ export interface AbilityMonitor { * Called back when an ability window stage is destroyed. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ onWindowStageDestroy?:() => void; } diff --git a/api/application/shellCmdResult.d.ts b/api/application/shellCmdResult.d.ts index ac951d855c..b8cc3f894a 100644 --- a/api/application/shellCmdResult.d.ts +++ b/api/application/shellCmdResult.d.ts @@ -17,7 +17,7 @@ * A object that records the result of shell command executes. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import ShellCmdResult from 'application/shellCmdResult.d' * @permission N/A */ @@ -26,7 +26,7 @@ export interface ShellCmdResult { * the cmd standard result. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ stdResult: String; @@ -34,7 +34,7 @@ export interface ShellCmdResult { * shell cmd exec result. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ exitCode: number; } -- Gitee From d702982e63409df805cb10730226e687abf24e62 Mon Sep 17 00:00:00 2001 From: njupthan Date: Mon, 28 Feb 2022 16:43:06 +0800 Subject: [PATCH 043/163] Delete d.ts file Signed-off-by: njupthan --- api/@ohos.app.abilityDelegatorRegistry.d.ts | 61 ---------- api/app/abilityDelegator.d.ts | 123 -------------------- api/app/abilityDelegatorArgs.d.ts | 53 --------- api/app/abilityMonitor.d.ts | 77 ------------ api/app/shellCmdResult.d.ts | 40 ------- api/app/testRunner.d.ts | 41 ------- 6 files changed, 395 deletions(-) delete mode 100644 api/@ohos.app.abilityDelegatorRegistry.d.ts delete mode 100644 api/app/abilityDelegator.d.ts delete mode 100644 api/app/abilityDelegatorArgs.d.ts delete mode 100644 api/app/abilityMonitor.d.ts delete mode 100644 api/app/shellCmdResult.d.ts delete mode 100644 api/app/testRunner.d.ts diff --git a/api/@ohos.app.abilityDelegatorRegistry.d.ts b/api/@ohos.app.abilityDelegatorRegistry.d.ts deleted file mode 100644 index 7ec09965a6..0000000000 --- a/api/@ohos.app.abilityDelegatorRegistry.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AsyncCallback } from './basic'; -import { AbilityDelegator } from './app/abilityDelegator' -import { AbilityDelegatorArgs } from './app/abilityDelegatorArgs' - -/** - * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered - * during application startup. - * 在应用程序启动期间,保存AbilityDelegator和AbilityDelegatorArgs对象的全局存储器 - * - * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car - * @import import abilityManager from '@ohos.app.abilityManager' - * @permission N/A - */ -declare namespace abilityDelegatorRegistry { - /** - * Get the AbilityDelegator object of the application. - * 异步方式获取应用程序的AbilityDelegator对象 - * @return the AbilityDelegator object initialized when the application is started. - * 应用程序启动时被初始化的AbilityDelegator对象 - */ - function getAbilityDelegator(callback: AsyncCallback): void; - function getAbilityDelegator(): Promise; - - /** - * Get unit test parameters stored in the AbilityDelegatorArgs object. - * 异步的方式获取单元测试参数AbilityDelegatorArgs对象 - * @return the previously registered AbilityDelegatorArgs object. - * 单元测试参数AbilityDelegatorArgs对象 - */ - function getArguments(callback: AsyncCallback): void; - function getArguments(): Promise;​ - - /** - * Describes all lifecycle states of an ability. - */ - export enum AbilityLifecycleState { - CREATE, - FOREGROUND, - BACKGROUND, - DESTROY, - } -} - -export default abilityDelegatorRegistry; \ No newline at end of file diff --git a/api/app/abilityDelegator.d.ts b/api/app/abilityDelegator.d.ts deleted file mode 100644 index 2b5dc8426c..0000000000 --- a/api/app/abilityDelegator.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AsyncCallback } from '../basic'; -import { Ability } from '../@ohos.application.Ability' -import { AbilityMonitor } from './abilityMonitor' -import { Context } from './context' -import { ShellCmdResult } from './shellCmdResult' -import { Want } from '../ability/want' - -/** - * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities. - * - * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car - * @import import AbilityDelegator from 'app/abilityDelegator.d' - * @permission N/A - */ -export interface AbilityDelegator { - /** - * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability. - * 添加AbilityMonitor实例,用于监听ability生命周期变换 - * @param monitor AbilityMonitor实例 - */ - addAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; - addAbilityMonitor​(monitor: AbilityMonitor): Promise; - - /** - * Remove a specified AbilityMonitor object from the application memory. - * 删除已经添加的AbilityMonitor实例 - * @param monitor AbilityMonitor实例 - */ - removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void;​ - removeAbilityMonitor(monitor: AbilityMonitor): Promise; - - /** - * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. - * 等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例 - * @param monitor AbilityMonitor实例 - * @param timeout 最大等待时间,单位毫秒 - * @return 如果监听到与指定AbilityMonitor实例匹配的Abilityability到达OnCreate生命周期,则返回ability实例;否则返回空 - */ - waitAbilityMonitor​(monitor: AbilityMonitor, callback: AsyncCallback): void; - waitAbilityMonitor​(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void; - waitAbilityMonitor​(monitor: AbilityMonitor, timeout?: number): Promise; - - /** - * Obtain the application context. - * 异步方式获取应用Context,通过异步回调将Context实例返回 - * @return 应用Context - */ - getAppContext(callback: AsyncCallback): void; - getAppContext(): Promise; - - /** - * Obtain the lifecycle state of a specified ability. - * 异步方式获取指定ability状态 - * @param ability 指定Ability对象 - * @return 指定Ability对象的状态 - */ - getAbilityState(ability: Ability, callback: AsyncCallback): void; - getAbilityState(ability: Ability): Promise; - - /** - * Obtain the ability that is currently being displayed. - * 异步方式获取当前应用顶部ability - * @return 当前应用顶部ability - */ - getCurrentTopAbility(callback: AsyncCallback): void; - getCurrentTopAbility(): Promise - - /** - * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state. - * 异步方式调度指定ability生命周期状态到Foreground状态 - * @param ability 指定Ability对象 - * @return true: 成功 false: 失败 - */ - doAbilityForeground(ability: Ability, callback: AsyncCallback): void; - doAbilityForeground(ability: Ability): Promise; - - /** - * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state. - * 异步方式调度指定ability生命周期状态到Background状态 - * @param ability 指定Ability对象 - * @return true: 成功 false: 失败 - */ - doAbilityBackground(ability: Ability, callback: AsyncCallback): void; - doAbilityBackground(ability: Ability): Promise; - - /** - * Prints log information to the unit testing console. - * The total length of the log information to be printed cannot exceed 1000 characters. - * 异步方式打印日志信息到单元测试终端控制台 - * 日志信息字符串长度最大不超过1000个字符 - * @param msg 日志字符串 - */ - print(msg: string, callback: AsyncCallback): void; - print(msg: string): Promise; - - /** - * Execute the given command in the aa tools side. - * 异步方式执行指定的shell命令 - * @param cmd shell命令字符串 - * @return shell命令执行结果对象 - */ - executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void;​ - executeShellCommand(cmd: string, timeoutSecs: number): Promise;​ -} - -export default AbilityDelegator; \ No newline at end of file diff --git a/api/app/abilityDelegatorArgs.d.ts b/api/app/abilityDelegatorArgs.d.ts deleted file mode 100644 index 8b3476cfeb..0000000000 --- a/api/app/abilityDelegatorArgs.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/** - * Store unit testing-related parameters, including test case names, and test runner name. - * 存储单元测试相关的参数,包括测试用例名称,测试用例执行器名称 - * - * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car - * @import import AbilityDelegatorArgs from 'app/abilityDelegatorArgs.d' - * @permission N/A - */ -export interface AbilityDelegatorArgs { - /** - * the bundle name of the application being tested. - * 表示当前被测试应用的包名 - */ - bundleName: string; - - /** - * the parameters used for unit testing. - * 表示当前启动单元测试的参数 - */ - parameters​: {[key: string]: string}; - - /** - * the class names of all test cases. - * 测试用例名称 - */ - testCaseNames: string; - - /** - * the class name of the test runner used to execute test cases. - * 执行测试用例的测试执行器的名称 - */ - testRunnerClassName: string;​ -} - -export default AbilityDelegatorArgs; \ No newline at end of file diff --git a/api/app/abilityMonitor.d.ts b/api/app/abilityMonitor.d.ts deleted file mode 100644 index 15f68e434a..0000000000 --- a/api/app/abilityMonitor.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Provide methods for matching monitored Ability objects that meet specified conditions. - * The most recently matched Ability objects will be saved in the AbilityMonitor object. - * 监听指定Ability生命周期状态变化的监听器 - * - * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car - * @import import AbilityMonitor from 'app/abilityMonitor.d' - * @permission N/A - */ -export interface AbilityMonitor { - /** - * The name of the ability to monitor. - * 表示当前AbilityMonitor绑定的ability name - */ - abilityName: string; - - /** - * Called back when the ability is started for initialization. - * ability被启动初始化时的回调函数 - */ - onAbilityCreate?:() => void; - - /** - * Called back when the state of the ability changes to foreground. - * ability状态变成前台时的回调函数 - */ - onAbilityForeground?:() => void; - - /** - * Called back when the state of the ability changes to background. - * ability状态变成后台时的回调函数 - */ - onAbilityBackground?:() => void; - - /** - * Called back before the ability is destroyed. - * ability被销毁前的回调函数 - */ - onAbilityDestroy?:() => void; - - /** - * Called back when an ability window stage is created. - * window stage被创建时的回调函数 - */ - onWindowStageCreate?:() => void; - - /** - * Called back when an ability window stage is restored. - * window stage被重载时的回调函数 - */ - onWindowStageRestore?:() => void; - - /** - * Called back when an ability window stage is destroyed. - * window stage被销毁前的回调函数 - */ - onWindowStageDestroy?:() => void; -} - -export default AbilityMonitor; \ No newline at end of file diff --git a/api/app/shellCmdResult.d.ts b/api/app/shellCmdResult.d.ts deleted file mode 100644 index d29515c95d..0000000000 --- a/api/app/shellCmdResult.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A object that records the result of shell command executes. - * 执行shell命令的结果 - * - * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car - * @import import ShellCmdResult from 'app/shellCmdResult.d' - * @permission N/A - */ -export interface ShellCmdResult { - /** - * the cmd standard result. - * shell命令标准输出结果 - */ - stdResult: String; - - /** - * shell cmd exec result. - * shell命令执行的结果 - */ - exitCode: number; -} - -export default ShellCmdResult; \ No newline at end of file diff --git a/api/app/testRunner.d.ts b/api/app/testRunner.d.ts deleted file mode 100644 index 30b3e1c83f..0000000000 --- a/api/app/testRunner.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Base class for the test framework. - * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. - * 测试框架的执行器基类 - * - * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car - * @import import TestRunner from 'app/testRunner.d' - * @permission N/A - */ -export interface TestRunner { - /** - * Prepare the unit testing environment for running test cases. - * 为执行器准备单元测试环境 - */ - onPrepare​(): void; - - /** - * Run all test cases. - * 运行所有的测试用例 - */ - onRun​(): void; -} - -export default TestRunner; \ No newline at end of file -- Gitee From 925250c4d46a1bdb1874faef461e9a9a5a1ee775 Mon Sep 17 00:00:00 2001 From: panqiangbiao Date: Mon, 28 Feb 2022 19:58:49 +0800 Subject: [PATCH 044/163] change api as 9 Signed-off-by: panqiangbiao --- api/@ohos.fileManager.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/@ohos.fileManager.d.ts b/api/@ohos.fileManager.d.ts index f6df405e7e..5486431568 100644 --- a/api/@ohos.fileManager.d.ts +++ b/api/@ohos.fileManager.d.ts @@ -30,7 +30,7 @@ declare namespace filemanager { * * @note N/A * @syscap SystemCapability.FileManagement.FileManagerService - * @since 8 + * @since 9 * @permission N/A * @function listFile * @param {string} path - path. @@ -51,7 +51,7 @@ declare function listFile(path: string, type: string, options?: {dev?: DevInfo, * * @note N/A * @syscap SystemCapability.FileManagement.FileManagerService - * @since 8 + * @since 9 * @permission N/A * @function getRoot * @param {Object} options - options @@ -68,7 +68,7 @@ declare function getRoot(options?: {dev?: DevInfo}, callback: AsyncCallback Date: Mon, 28 Feb 2022 20:12:53 +0800 Subject: [PATCH 045/163] update d.ts file Signed-off-by: njupthan --- api/@ohos.application.Ability.d.ts | 77 ++++++++++++++++++++++------- api/application/AbilityContext.d.ts | 10 ++-- 2 files changed, 64 insertions(+), 23 deletions(-) diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 65963be527..9f98343b86 100755 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -20,21 +20,54 @@ import window from './@ohos.window'; import { Configuration } from './@ohos.application.Configuration'; import rpc from '/@ohos.rpc'; +/** + * The prototype of the listener function interface registered by the Caller. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @devices phone, tablet, tv, wearable, car + * @permission N/A + * @param msg Monitor status notification information. + * @return - + * @StageModelOnly + */ +export interface OnReleaseCallBack { + (msg: string): void; +} + +/** + * The prototype of the message listener function interface registered by the Callee. + * + * @since 9 + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @devices phone, tablet, tv, wearable, car + * @permission N/A + * @param indata Notification data notified from the caller. + * @return rpc.Sequenceable + * @StageModelOnly + */ +export interface CaleeCallBack { + (indata: rpc.MessageParcel): rpc.Sequenceable; +} + /** * The interface of a Caller. * * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore * @devices phone, tablet, tv, wearable, car * @permission N/A * @StageModelOnly */ - interface Caller { +export interface Caller { /** * Notify the server of Sequenceable type data. * * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param method The notification event string listened to by the callee. + * @param data Notification data to the callee. + * @return - * @StageModelOnly */ call(method: string, data: rpc.Sequenceable): Promise; @@ -43,8 +76,10 @@ import rpc from '/@ohos.rpc'; * Notify the server of Sequenceable type data and return the notification result. * * @since 9 - * @sysCap AAFwk - * return Sequenceable data + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param method The notification event string listened to by the callee. + * @param data Notification data to the callee. + * @return Returns the callee's notification result data on success, and returns undefined on failure. * @StageModelOnly */ callWithResult(method: string, data: rpc.Sequenceable): Promise; @@ -53,8 +88,8 @@ import rpc from '/@ohos.rpc'; * Clear service records. * * @since 9 - * @sysCap AAFwk - * return Sequenceable data + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @return - * @StageModelOnly */ release(): void; @@ -63,38 +98,44 @@ import rpc from '/@ohos.rpc'; * Register death listener notification callback. * * @since 9 - * @sysCap AAFwk - * return Sequenceable data + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param callback Register a callback function for listening for notifications. + * @return - * @StageModelOnly */ - onRelease(callback: function): void; + onRelease(callback: OnReleaseCallBack): void; } /** * The interface of a Callee. * * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore * @devices phone, tablet, tv, wearable, car * @permission N/A * @StageModelOnly */ - interface Callee { +export interface Callee { /** * Register data listener callback. * * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param method A string registered to listen for notification events. + * @param callback Register a callback function that listens for notification events. + * @return - * @StageModelOnly */ - on(method: string, callback: function): void; + on(method: string, callback: CaleeCallBack): void; /** * Unregister data listener callback. * * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param method A string registered to listen for notification events. + * @return - * @StageModelOnly */ off(method: string): void; @@ -140,7 +181,7 @@ export default class Ability { * Call Service Stub Object. * * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly */ callee: Callee; @@ -221,7 +262,7 @@ export default class Ability { * * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -232,7 +273,7 @@ export default class Ability { * * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index 442c46a5d0..df2e6292b9 100755 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -56,7 +56,7 @@ export default class AbilityContext extends Context { * Indicates configuration information. * * @since 9 - * @sysCap AAFwk + * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ config: Configuration; @@ -79,12 +79,12 @@ export default class AbilityContext extends Context { * * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk - * @param parameter Indicates the ability to start. - * @return Caller + * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @param want Indicates the ability to start. + * @return Returns to the Caller interface on success Returns empty or undefined on failure * @StageModelOnly */ - startAbilityByCall(want: Want): Promise; + startAbilityByCall(want: Want): Promise; /** * Starts a new ability with account. -- Gitee From 5e8874c8ba5ed9cdbc187ea1dc912675112e04dc Mon Sep 17 00:00:00 2001 From: gudehe Date: Mon, 28 Feb 2022 16:45:36 +0800 Subject: [PATCH 046/163] fix codingstyle Signed-off-by: gudehe --- api/@ohos.multimedia.mediaLibrary.d.ts | 64 +++++++++++++------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/api/@ohos.multimedia.mediaLibrary.d.ts b/api/@ohos.multimedia.mediaLibrary.d.ts index d25e9a9c91..c2ff5cc72d 100644 --- a/api/@ohos.multimedia.mediaLibrary.d.ts +++ b/api/@ohos.multimedia.mediaLibrary.d.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import { AsyncCallback } from './basic'; -import Context from './@ohos.ability'; +import { AsyncCallback, Callback } from './basic'; +import Context from './app/context'; import image from './@ohos.multimedia.image'; /** @@ -38,7 +38,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @StageModelOnly - * @param Hap context information + * @param context hap context information * @return Instance of MediaLibrary */ function getMediaLibrary(context: Context): MediaLibrary; @@ -262,7 +262,7 @@ declare namespace mediaLibrary { * If it is a directory where the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param callback, Callback return the result of isDerectory. + * @param callback Callback return the result of isDerectory. */ isDirectory(callback: AsyncCallback): void; /** @@ -275,7 +275,7 @@ declare namespace mediaLibrary { * Modify meta data where the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param callback, no value will be returned. + * @param callback no value will be returned. * @systemapi */ commitModify(callback: AsyncCallback): void; @@ -290,30 +290,30 @@ declare namespace mediaLibrary { * Open the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param mode, mode for open, for example: rw, r, w. - * @param callback, Callback return the fd of the file. + * @param mode mode for open, for example: rw, r, w. + * @param callback Callback return the fd of the file. */ open(mode: string, callback: AsyncCallback): void; /** * Open the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param mode, mode for open, for example: rw, r, w. + * @param mode mode for open, for example: rw, r, w. */ open(mode: string): Promise; /** * Close the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param fd, fd of the file which had been opened - * @param callback, no value will be returned. + * @param fd fd of the file which had been opened + * @param callback no value will be returned. */ close(fd: number, callback: AsyncCallback): void; /** * Close the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param fd, fd of the file which had been opened + * @param fd fd of the file which had been opened */ close(fd: number): Promise; /** @@ -327,7 +327,7 @@ declare namespace mediaLibrary { * Get thumbnail of the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param size, thumbnail's size + * @param size thumbnail's size * @param callback Callback used to return the thumbnail's pixelmap. */ getThumbnail(size: Size, callback: AsyncCallback): void; @@ -335,7 +335,7 @@ declare namespace mediaLibrary { * Get thumbnail of the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param size, thumbnail's size + * @param size thumbnail's size */ getThumbnail(size?: Size): Promise; /** @@ -833,15 +833,15 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param type, public directory predefined in DirectoryType. - * @param callback, Callback return the FetchFileResult. + * @param callback Callback return the FetchFileResult. */ getPublicDirectory(type: DirectoryType, callback: AsyncCallback): void; /** * get system predefined root dir, use to create file asset by relative path * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param type, public directory predefined in DirectoryType. - * @param return A promise instance used to return the public directory in the format of string + * @param type public directory predefined in DirectoryType. + * @return A promise instance used to return the public directory in the format of string */ getPublicDirectory(type: DirectoryType): Promise; /** @@ -858,33 +858,33 @@ declare namespace mediaLibrary { * if need all data, getAllObject from FetchFileResult * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param options, Media retrieval options. + * @param options Media retrieval options. * @return A promise instance used to return the files in the format of a FetchFileResult instance */ getFileAssets(options: MediaFetchOptions): Promise; /** - * Trun on mornitor the data changes by media type + * Turn on mornitor the data changes by media type * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param type, mediaType + * @param type one of 'deviceChange','albumChange','imageChange','audioChange','videoChange','fileChange','remoteFileChange' * @param callback no value returned */ - on(type: 'Device'|'Album'|'Image'|'Audio'|'Video'|'File'| 'Remote file', callback: () => {}): void; + on(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange'|'fileChange'|'remoteFileChange', callback: Callback): void; /** - * Trun off Mornitor the data changes by media type + * Turn off mornitor the data changes by media type * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param type, mediaType + * @param type one of 'deviceChange','albumChange','imageChange','audioChange','videoChange','fileChange','remoteFileChange' * @param callback no value returned */ - off(type: 'Device'|'Album'|'Image'|'Audio'|'Video'|'File'| 'Remote file', callback?: () => {}): void; + off(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange'|'fileChange'|'remoteFileChange', callback?: Callback): void; /** * Create File Asset * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param mediaType, mediaType for example:IMAGE, VIDEO, AUDIO, FILE - * @param displayName, file name - * @param relativePath, relative path + * @param mediaType mediaType for example:IMAGE, VIDEO, AUDIO, FILE + * @param displayName file name + * @param relativePath relative path * @param callback Callback used to return the FileAsset */ createAsset(mediaType: MediaType, displayName: string, relativePath: string, callback: AsyncCallback): void; @@ -892,9 +892,9 @@ declare namespace mediaLibrary { * Create File Asset * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param mediaType, mediaType for example:IMAGE, VIDEO, AUDIO, FILE - * @param displayName, file name - * @param relativePath, relative path + * @param mediaType mediaType for example:IMAGE, VIDEO, AUDIO, FILE + * @param displayName file name + * @param relativePath relative path * @return A Promise instance used to return the FileAsset */ createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise; @@ -902,7 +902,7 @@ declare namespace mediaLibrary { * Delete File Asset * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param uri, FileAsset's URI + * @param uri FileAsset's URI * @param callback no value returned * @systemapi */ @@ -1016,7 +1016,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore * @systemapi - * @param callback, Callback return the list of the all the peer devices' information + * @param callback Callback return the list of the all the peer devices' information */ getAllPeers(callback: AsyncCallback>): void; /** @@ -1031,7 +1031,7 @@ declare namespace mediaLibrary { * Release MediaLibrary instance * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @param callback, no value returned + * @param callback no value returned */ release(callback: AsyncCallback): void; /** -- Gitee From 835a8f0deb87890b6ef6509fcb7bcb88263c51e5 Mon Sep 17 00:00:00 2001 From: verystone Date: Tue, 1 Mar 2022 10:13:25 +0800 Subject: [PATCH 047/163] Modify data share extension api to async method Signed-off-by: verystone --- ...application.DataShareExtensionAbility.d.ts | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/api/@ohos.application.DataShareExtensionAbility.d.ts b/api/@ohos.application.DataShareExtensionAbility.d.ts index dce6c206a8..495ac85091 100644 --- a/api/@ohos.application.DataShareExtensionAbility.d.ts +++ b/api/@ohos.application.DataShareExtensionAbility.d.ts @@ -62,7 +62,7 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @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): Array; + getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback>): void; /** * Inserts a data record into the database. This method should be implemented by a data share. @@ -74,7 +74,7 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @return Returns the index of the newly inserted data record. */ - insert?(uri: string, valueBucket: rdb.ValuesBucket): number; + insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback): void; /** * Updates one or more data records in the database. This method should be implemented by a data share. @@ -88,7 +88,8 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @return Returns the number of data records updated. */ - update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): number; + update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, + callback: AsyncCallback): void; /** * Deletes one or more data records. This method should be implemented by a data share. @@ -101,7 +102,7 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @return Returns the number of data records deleted. */ - delete?(uri: string, predicates: dataAbility.DataAbilityPredicates): number; + delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; /** * Queries one or more data records in the database. This method should be implemented by a data share. @@ -116,7 +117,8 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @return Returns the queried data. */ - query?(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): ResultSet; + query?(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates, + callback: AsyncCallback): void; /** * Obtains the MIME type matching the data specified by the URI of the data share. This method should be @@ -130,7 +132,7 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @return Returns the MIME type that matches the data specified by {@code uri}. */ - getType?(uri: string): string; + getType?(uri: string, callback: AsyncCallback): void; /** * Inserts multiple data records into the database. This method should be implemented by a data share. @@ -142,7 +144,7 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @return Returns the number of data records inserted. */ - batchInsert?(uri: string, valueBuckets: Array): number; + batchInsert?(uri: string, valueBuckets: Array, callback: AsyncCallback): void; /** * Converts the given {@code uri} that refer to the data share into a normalized URI. A normalized URI can be @@ -155,7 +157,7 @@ export default class DataShareExtensionAbility { * @systemapi Hide this for inner system use. * @return Returns the normalized uri if the data share supports URI normalization; */ - normalizeUri?(uri: string): string; + normalizeUri?(uri: string, callback: AsyncCallback): void; /** * Converts the given normalized {@code uri} generated by {@link #normalizeUri(uri)} into a denormalized one. @@ -169,5 +171,5 @@ export default class DataShareExtensionAbility { * {@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. */ - denormalizeUri?(uri: string): string; + denormalizeUri?(uri: string, callback: AsyncCallback): void; } \ No newline at end of file -- Gitee From 254eed481265e40aea0d4bff47214308294caf15 Mon Sep 17 00:00:00 2001 From: clevercong Date: Tue, 1 Mar 2022 12:11:12 +0800 Subject: [PATCH 048/163] update telephony and net js api d.ts files. Signed-off-by: clevercong --- api/@ohos.net.socket.d.ts | 26 +++--- api/@ohos.net.webSocket.d.ts | 126 ++++++++++++++++++++++++++++++ api/@ohos.telephony.call.d.ts | 68 +++++++++------- api/@ohos.telephony.data.d.ts | 26 +++--- api/@ohos.telephony.observer.d.ts | 6 +- api/@ohos.telephony.radio.d.ts | 36 ++++----- api/@ohos.telephony.sim.d.ts | 26 +++--- api/@ohos.telephony.sms.d.ts | 26 +++--- 8 files changed, 238 insertions(+), 102 deletions(-) create mode 100644 api/@ohos.net.webSocket.d.ts diff --git a/api/@ohos.net.socket.d.ts b/api/@ohos.net.socket.d.ts index ccabf9041a..a659f947f7 100644 --- a/api/@ohos.net.socket.d.ts +++ b/api/@ohos.net.socket.d.ts @@ -1,17 +1,17 @@ /* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import {AsyncCallback, Callback, ErrorCallback} from "./basic"; import connection from "./@ohos.net.connection"; diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts new file mode 100644 index 0000000000..ebf4dcd5ca --- /dev/null +++ b/api/@ohos.net.webSocket.d.ts @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AsyncCallback, ErrorCallback} from "./basic"; + +/** + * Provides WebSocket APIs. + * + * @since 6 + * @syscap SystemCapability.Communication.NetStack + */ +declare namespace webSocket { + /** + * Creates a web socket connection. + */ + function createWebSocket(): WebSocket; + + export interface WebSocketRequestOptions { + /** + * HTTP request header. + */ + header?: Object; + } + + export interface WebSocketCloseOptions { + /** + * Error code. + */ + code?: number; + /** + * Error cause. + */ + reason?: string; + } + + export interface WebSocket { + /** + * Initiates a WebSocket request to establish a WebSocket connection to a given URL. + * + * @param url URL for establishing a WebSocket connection. + * @param options Optional parameters {@link WebSocketRequestOptions}. + * @param callback Returns callback used to return the execution result. + * @permission ohos.permission.INTERNET + */ + connect(url: string, callback: AsyncCallback): void; + connect(url: string, options: WebSocketRequestOptions, callback: AsyncCallback): void; + connect(url: string, options?: WebSocketRequestOptions): Promise; + + /** + * Sends data through a WebSocket connection. + * + * @param data Data to send. It can be a string(API 6) or an ArrayBuffer(API 8). + * @param callback Returns callback used to return the execution result. + * @permission ohos.permission.INTERNET + */ + send(data: string | ArrayBuffer, callback: AsyncCallback): void; + send(data: string | ArrayBuffer): Promise; + + /** + * Closes a WebSocket connection. + * + * @param options Optional parameters {@link WebSocketCloseOptions}. + * @param callback Returns callback used to return the execution result. + * @permission ohos.permission.INTERNET + */ + close(callback: AsyncCallback): void; + close(options: WebSocketCloseOptions, callback: AsyncCallback): void; + close(options?: WebSocketCloseOptions): Promise; + + /** + * Enables listening for the open events of a WebSocket connection. + */ + on(type: 'open', callback: AsyncCallback): void; + + /** + * Cancels listening for the open events of a WebSocket connection. + */ + off(type: 'open', callback?: AsyncCallback): void; + + /** + * Enables listening for the message events of a WebSocket connection. + * data in AsyncCallback can be a string(API 6) or an ArrayBuffer(API 8). + */ + on(type: 'message', callback: AsyncCallback): void; + + /** + * Cancels listening for the message events of a WebSocket connection. + * data in AsyncCallback can be a string(API 6) or an ArrayBuffer(API 8). + */ + off(type: 'message', callback?: AsyncCallback): void; + + /** + * Enables listening for the close events of a WebSocket connection. + */ + on(type: 'close', callback: AsyncCallback<{ code: number, reason: string }>): void; + + /** + * Cancels listening for the close events of a WebSocket connection. + */ + off(type: 'close', callback?: AsyncCallback<{ code: number, reason: string }>): void; + + /** + * Enables listening for the error events of a WebSocket connection. + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Cancels listening for the error events of a WebSocket connection. + */ + off(type: 'error', callback?: ErrorCallback): void; + } +} + +export default webSocket; \ No newline at end of file diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 7b5a03dd61..11f0ddb79b 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -1,17 +1,17 @@ /* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import {AsyncCallback, Callback} from "./basic"; @@ -38,6 +38,16 @@ declare namespace call { function dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback): void; function dial(phoneNumber: string, options?: DialOptions): Promise; + /** + * Go to the dial screen and the called number is displayed. + * + * @param phoneNumber Indicates the called number. + * @syscap SystemCapability.SysAppComponents.CONTACT + * @devices phone, tablet + */ + function makeCall(phoneNumber: string, callback: AsyncCallback): void; + function makeCall(phoneNumber: string): Promise; + /** * Checks whether a call is ongoing. * @@ -414,9 +424,9 @@ declare namespace call { * @since 8 */ export interface CallTransferInfo { - transferNum: string, - type: CallTransferType, - settingType: CallTransferSettingType + transferNum: string; + type: CallTransferType; + settingType: CallTransferSettingType; } /** @@ -446,16 +456,16 @@ declare namespace call { * @since 7 */ export interface CallAttributeOptions { - accountNumber: string, - speakerphoneOn: boolean, - accountId: number, - videoState: VideoStateType, - startTime: number, - isEcc: boolean, - callType: CallType, - callId: number, - callState: DetailedCallState, - conferenceState: ConferenceState, + accountNumber: string; + speakerphoneOn: boolean; + accountId: number; + videoState: VideoStateType; + startTime: number; + isEcc: boolean; + callType: CallType; + callId: number; + callState: DetailedCallState; + conferenceState: ConferenceState; } /** @@ -510,9 +520,9 @@ declare namespace call { * @since 8 */ export interface CallRestrictionInfo { - type: CallRestrictionType, - password: string - mode: CallRestrictionMode + type: CallRestrictionType; + password: string; + mode: CallRestrictionMode; } /** diff --git a/api/@ohos.telephony.data.d.ts b/api/@ohos.telephony.data.d.ts index 24a6fa7556..8f394b6477 100644 --- a/api/@ohos.telephony.data.d.ts +++ b/api/@ohos.telephony.data.d.ts @@ -1,17 +1,17 @@ /* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import {AsyncCallback} from "./basic"; diff --git a/api/@ohos.telephony.observer.d.ts b/api/@ohos.telephony.observer.d.ts index e7d6294044..2fd39fa9c0 100644 --- a/api/@ohos.telephony.observer.d.ts +++ b/api/@ohos.telephony.observer.d.ts @@ -162,12 +162,12 @@ declare namespace observer { * @since 7 */ export interface SimStateData { - type: CardType, - state: SimState, + type: CardType; + state: SimState; /** * @since 8 */ - reason: LockReason + reason: LockReason; } /** diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index 38b942aba0..e3a6bcbeb9 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -1,17 +1,17 @@ /* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import {AsyncCallback} from "./basic"; @@ -641,11 +641,11 @@ declare namespace radio { * @since 8 */ export interface CdmaCellInformation { - baseId: number, - latitude: number, - longitude: number, - nid: number, - sid: number, + baseId: number; + latitude: number; + longitude: number; + nid: number; + sid: number; } /** diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index 83d8ed9902..93237791f0 100644 --- a/api/@ohos.telephony.sim.d.ts +++ b/api/@ohos.telephony.sim.d.ts @@ -1,17 +1,17 @@ /* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import {AsyncCallback} from "./basic"; diff --git a/api/@ohos.telephony.sms.d.ts b/api/@ohos.telephony.sms.d.ts index 5b8e4b45e2..f011e9dd03 100644 --- a/api/@ohos.telephony.sms.d.ts +++ b/api/@ohos.telephony.sms.d.ts @@ -1,17 +1,17 @@ /* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import {AsyncCallback} from "./basic"; -- Gitee From 1abcc570a6d3bf6edd76d40610a1a6d68f3af9a0 Mon Sep 17 00:00:00 2001 From: njupthan Date: Tue, 1 Mar 2022 13:36:50 +0800 Subject: [PATCH 049/163] update d.ts file Signed-off-by: njupthan --- api/@ohos.application.Ability.d.ts | 54 +++++++++++++---------------- api/application/AbilityContext.d.ts | 33 +++++++++--------- 2 files changed, 40 insertions(+), 47 deletions(-) diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 9f98343b86..7849829fcb 100755 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -24,8 +24,7 @@ import rpc from '/@ohos.rpc'; * The prototype of the listener function interface registered by the Caller. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @permission N/A * @param msg Monitor status notification information. * @return - @@ -39,8 +38,7 @@ export interface OnReleaseCallBack { * The prototype of the message listener function interface registered by the Callee. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @permission N/A * @param indata Notification data notified from the caller. * @return rpc.Sequenceable @@ -54,8 +52,7 @@ export interface CaleeCallBack { * The interface of a Caller. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @permission N/A * @StageModelOnly */ @@ -64,7 +61,7 @@ export interface Caller { * Notify the server of Sequenceable type data. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param method The notification event string listened to by the callee. * @param data Notification data to the callee. * @return - @@ -76,7 +73,7 @@ export interface Caller { * Notify the server of Sequenceable type data and return the notification result. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param method The notification event string listened to by the callee. * @param data Notification data to the callee. * @return Returns the callee's notification result data on success, and returns undefined on failure. @@ -88,7 +85,7 @@ export interface Caller { * Clear service records. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -98,7 +95,7 @@ export interface Caller { * Register death listener notification callback. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param callback Register a callback function for listening for notifications. * @return - * @StageModelOnly @@ -110,8 +107,7 @@ export interface Caller { * The interface of a Callee. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @permission N/A * @StageModelOnly */ @@ -121,7 +117,7 @@ export interface Callee { * Register data listener callback. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param method A string registered to listen for notification events. * @param callback Register a callback function that listens for notification events. * @return - @@ -133,7 +129,7 @@ export interface Callee { * Unregister data listener callback. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param method A string registered to listen for notification events. * @return - * @StageModelOnly @@ -145,7 +141,7 @@ export interface Callee { * The class of an ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @permission N/A * @StageModelOnly */ @@ -154,7 +150,7 @@ export default class Ability { * Indicates configuration information about an ability context. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly */ context: AbilityContext; @@ -163,7 +159,7 @@ export default class Ability { * Indicates ability launch want. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly */ launchWant: Want; @@ -172,7 +168,7 @@ export default class Ability { * Indicates ability last request want. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly */ lastRequestWant: Want; @@ -181,7 +177,7 @@ export default class Ability { * Call Service Stub Object. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly */ callee: Callee; @@ -190,7 +186,7 @@ export default class Ability { * Called back when an ability is started for initialization. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -200,7 +196,7 @@ export default class Ability { * Called back when an ability window stage is created. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -210,7 +206,7 @@ export default class Ability { * Called back when an ability window stage is destroyed. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -220,7 +216,7 @@ export default class Ability { * Called back before an ability is destroyed. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -230,7 +226,7 @@ export default class Ability { * Called back when the state of an ability changes to foreground. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -240,7 +236,7 @@ export default class Ability { * Called back when the state of an ability changes to background. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -250,7 +246,7 @@ export default class Ability { * Called back when an ability prepares to migrate. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return true if ability agrees to migrate and saves data successfully, otherwise false. * @StageModelOnly */ @@ -260,9 +256,8 @@ export default class Ability { * 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 SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ @@ -271,9 +266,8 @@ export default class Ability { /** * Called when the system configuration is updated. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @return - * @StageModelOnly */ diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index df2e6292b9..8dbcd71363 100755 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -29,7 +29,7 @@ import Caller from '../@ohos.application.Ability'; * The context of an ability. It allows access to ability-specific resources. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @StageModelOnly */ @@ -38,7 +38,7 @@ export default class AbilityContext extends Context { * Indicates configuration information about an ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ abilityInfo: AbilityInfo; @@ -47,7 +47,7 @@ export default class AbilityContext extends Context { * Indicates configuration information about an module. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ currentHapModuleInfo: HapModuleInfo; @@ -56,7 +56,7 @@ export default class AbilityContext extends Context { * Indicates configuration information. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ config: Configuration; @@ -65,7 +65,7 @@ export default class AbilityContext extends Context { * Starts a new ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param parameter Indicates the ability to start. * @return - * @StageModelOnly @@ -77,9 +77,8 @@ export default class AbilityContext extends Context { /** * Get the caller object of the startup capability * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates the ability to start. * @return Returns to the Caller interface on success Returns empty or undefined on failure * @StageModelOnly @@ -90,7 +89,7 @@ export default class AbilityContext extends Context { * Starts a new ability with account. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates the want info to start. * @param want Indicates the account to start. * @systemapi hide for inner use. @@ -105,7 +104,7 @@ export default class AbilityContext extends Context { * Starts an ability and returns the execution result when the ability is destroyed. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param parameter Indicates the ability to start. * @return Returns the {@link AbilityResult}. * @StageModelOnly @@ -118,7 +117,7 @@ export default class AbilityContext extends Context { * Starts an ability and returns the execution result when the ability is destroyed with account. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates the want info to start. * @param want Indicates the account to start. * @systemapi hide for inner use. @@ -133,7 +132,7 @@ export default class AbilityContext extends Context { * Destroys this Page ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return - * @StageModelOnly */ @@ -145,7 +144,7 @@ export default class AbilityContext extends Context { * and destroys this Page ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param parameter Indicates the result to return. * @return - * @StageModelOnly @@ -157,7 +156,7 @@ export default class AbilityContext extends Context { * Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want The element name of the service ability * @param options The remote object instance * @hide hide for inner use. @@ -170,7 +169,7 @@ export default class AbilityContext extends Context { * Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template with account. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want The element name of the service ability * @param options The remote object instance * @param accountId The account to connect @@ -184,7 +183,7 @@ export default class AbilityContext extends Context { * The callback interface was connect successfully. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param connection The number code of the ability connected * @hide hide for inner use. * @StageModelOnly @@ -196,7 +195,7 @@ export default class AbilityContext extends Context { * Set mission label of current ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param label The label of ability that showed in recent missions. * @StageModelOnly */ @@ -207,7 +206,7 @@ export default class AbilityContext extends Context { * Requests certain permissions from the system. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param permissions Indicates the list of permissions to be requested. This parameter cannot be null or empty. * @StageModelOnly */ -- Gitee From eca2c789d426c068f95c89a77886894ae808fd95 Mon Sep 17 00:00:00 2001 From: SoftSquirrel Date: Tue, 1 Mar 2022 14:54:16 +0800 Subject: [PATCH 050/163] IssueNo: #I4VQXI: delete getAllShortcutInfo interface Description: delete getAllShortcutInfo interface Sig: SIG_ApplicaitonFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: SoftSquirrel --- api/@ohos.bundle.d.ts | 12 ------------ api/bundle/abilityInfo.d.ts | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 8d2be229f4..d33f0a1e05 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -489,18 +489,6 @@ declare namespace bundle { function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback): void; function getLaunchWantForBundle(bundleName: string): Promise; - /** - * Obtains information about the shortcuts of the application. - * - * @since 7 - * @syscap SystemCapability.BundleManager.BundleFramework - * @param bundleName Indicates the bundle name of the application. - * @return Returns a list of ShortcutInfo objects containing shortcut information about the application. - * @permission ohos.permission.MANAGE_SHORTCUTS - */ - function getAllShortcutInfo(bundleName: string, callback: AsyncCallback>): void; - function getAllShortcutInfo(bundleName: string): Promise>; - /** * get module usage record list in descending order of lastLaunchTime. * diff --git a/api/bundle/abilityInfo.d.ts b/api/bundle/abilityInfo.d.ts index 87bd8399bc..099ba7a1b7 100644 --- a/api/bundle/abilityInfo.d.ts +++ b/api/bundle/abilityInfo.d.ts @@ -225,7 +225,7 @@ export interface AbilityInfo { readonly metadata: Array; /** - * @default Indicates the metadata of ability + * @default Indicates whether the ability is enabled * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework */ -- Gitee From 29c295c15ba9383540e2ca9d549e2f1be6967458 Mon Sep 17 00:00:00 2001 From: SoftSquirrel Date: Tue, 1 Mar 2022 14:58:56 +0800 Subject: [PATCH 051/163] IssueNo: #I4VQXI: delete getAllShortcutInfo interface Description: delete getAllShortcutInfo interface Sig: SIG_ApplicaitonFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: SoftSquirrel --- api/@ohos.bundle.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index d33f0a1e05..bdef6418df 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -20,7 +20,6 @@ import { AbilityInfo } from './bundle/abilityInfo'; import { ExtensionAbilityInfo } from './bundle/extensionAbilityInfo'; import { Want } from './ability/want'; import { BundleInstaller } from './bundle/bundleInstaller'; -import { ShortcutInfo } from './bundle/shortcutInfo'; import { ModuleUsageRecord } from './bundle/moduleUsageRecord'; import { PermissionDef } from './bundle/PermissionDef'; -- Gitee From f3eae663f9359eb0132100ef984050b73597c99d Mon Sep 17 00:00:00 2001 From: sunyaozu Date: Tue, 1 Mar 2022 15:23:14 +0800 Subject: [PATCH 052/163] fix wrong intl syscap Signed-off-by: sunyaozu --- api/@ohos.intl.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/api/@ohos.intl.d.ts b/api/@ohos.intl.d.ts index 2a1bcdda72..070d0614a1 100755 --- a/api/@ohos.intl.d.ts +++ b/api/@ohos.intl.d.ts @@ -671,7 +671,7 @@ export class PluralRules { /** * Provides the input options of RelativeTimeFormat. * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @since 8 */ export interface RelativeTimeFormatInputOptions { @@ -697,7 +697,7 @@ export class PluralRules { /** * Provides the resolved options of RelativeTimeFormat. * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @since 8 */ export interface RelativeTimeFormatResolvedOptions { @@ -728,14 +728,14 @@ export interface RelativeTimeFormatResolvedOptions { * Given a Time period length value and a unit, RelativeTimeFormat object enables * language-sensitive relative time formatting. * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @since 8 */ export class RelativeTimeFormat { /** * A constructor used to create RelativeTimeFormat object. * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -743,7 +743,7 @@ export class RelativeTimeFormat { /** * A constructor used to create RelativeTimeFormat object. * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the RelativeTimeFormat object. * @param options Indicates the options used to initialize RelativeTimeFormat object. @@ -754,7 +754,7 @@ export class RelativeTimeFormat { /** * formats a value and unit according to the locale and formatting options of this object. * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @param value Numeric value to use in the internationalized relative time message. * @param unit Unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. @@ -767,7 +767,7 @@ export class RelativeTimeFormat { * returns an Array of objects representing the relative time format in parts that can be used for * custom locale-aware formatting * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @param value Numeric value to use in the internationalized relative time message. * @param unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. @@ -780,7 +780,7 @@ export class RelativeTimeFormat { * Returns a new object with properties reflecting the locale and formatting options computed during * initialization of the object. * - * @sysCap SystemCapability.Intl + * @sysCap SystemCapability.Global.I18n * @returns RelativeTimeFormatOptions which reflecting the locale and formatting options of the object. * @since 8 */ -- Gitee From e1fbd9183f4f747c8382d95db97a4be11bb98660 Mon Sep 17 00:00:00 2001 From: altay Date: Tue, 1 Mar 2022 15:47:10 +0800 Subject: [PATCH 053/163] Description:fixed verifyUriPermission Sig:SIG_ApplicationFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: altay Change-Id: Ic71b0382793dbbb475ff8fd8896ddc07c54c4779 --- ...r.d.ts => @ohos.application.uriPermissionManager.d.ts} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename api/{@ohos.application.UriPermissionManager.d.ts => @ohos.application.uriPermissionManager.d.ts} (78%) diff --git a/api/@ohos.application.UriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts similarity index 78% rename from api/@ohos.application.UriPermissionManager.d.ts rename to api/@ohos.application.uriPermissionManager.d.ts index f79c741008..ad3ad1de00 100644 --- a/api/@ohos.application.UriPermissionManager.d.ts +++ b/api/@ohos.application.uriPermissionManager.d.ts @@ -23,7 +23,7 @@ import wantConstant from "./@ohos.ability.wantConstant"; * @sysCap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ -export default class UriPermissionManager { +declare namespace uriPermissionManager { /** * Check whether the application corresponding to the accesstokenID has access rights to the URI. * @@ -34,6 +34,8 @@ export default class UriPermissionManager { * @param accessTokenId Indicates the access token of the application. * @return Returns 0 if the verification is successful, otherwise returns -1. */ - verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number, callback: AsyncCallback): void; - verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number): Promise; + function verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number, callback: AsyncCallback): void; + function verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number): Promise; } + +export default uriPermissionManager; \ No newline at end of file -- Gitee From d42564d938f47f3d9f98ea934c771a6e4cc40304 Mon Sep 17 00:00:00 2001 From: wanghang Date: Tue, 1 Mar 2022 16:10:50 +0800 Subject: [PATCH 054/163] IssueNo:#I4VSFT:updata permission Description:updata permission Sig:SIG_ApplicaitonFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: wanghang Change-Id: I82dd1ec2ab1598ae6dbf7cff87101dca4651485b --- api/@ohos.distributedBundle.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/@ohos.distributedBundle.d.ts b/api/@ohos.distributedBundle.d.ts index 90aef0113a..e9fea81850 100644 --- a/api/@ohos.distributedBundle.d.ts +++ b/api/@ohos.distributedBundle.d.ts @@ -23,6 +23,7 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; * @since 8 * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @permission NA + * @systemapi Hide this for inner system use */ declare namespace distributedBundle { /** @@ -32,7 +33,7 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @param elementName Indicates the elementName. * @return Returns the ability info of the remote device. - * @permission ohos.permission.GET_REMOTE_ABILITY_INFO_PRIVILEGED + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @systemapi */ function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback): void; @@ -45,7 +46,7 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @param elementNames Indicates the elementNames, Maximum array length ten. * @return Returns the ability infos of the remote device. - * @permission ohos.permission.GET_REMOTE_ABILITY_INFO_PRIVILEGED + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @systemapi */ function getRemoteAbilityInfos(elementNames: Array, callback: AsyncCallback>): void; -- Gitee From fd8b3608d21716a78ff924a8ec09bede1fac0065 Mon Sep 17 00:00:00 2001 From: lvxiaoqiang Date: Tue, 1 Mar 2022 16:51:15 +0800 Subject: [PATCH 055/163] add settings const value napi Signed-off-by: lvxiaoqiang --- api/@ohos.settings.d.ts | 852 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 829 insertions(+), 23 deletions(-) diff --git a/api/@ohos.settings.d.ts b/api/@ohos.settings.d.ts index 90c9e382fc..68ce75932a 100644 --- a/api/@ohos.settings.d.ts +++ b/api/@ohos.settings.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,47 +12,853 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { AsyncCallback } from './basic'; import { DataAbilityHelper } from './ability/dataAbilityHelper'; /** * This module provides settings data access abilities. * - * @since 8 + * @since 7 * @devices phone, tablet, tv, wearable, car * @import import settings from '@ohos.settings' * @permission N/A */ declare namespace settings { + /** + * Provides methods for setting time and date formats. + * + * @since 7 + */ + namespace date { + /** + * Indicates the date format. + * + *

The formats {@code mm/dd/yyyy}, {@code dd/mm/yyyy}, and {@code yyyy/mm/dd} are available. + * + * @since 7 + */ + const DATE_FORMAT: string + + /** + * Specifies whether the time is displayed in 12-hour or 24-hour format. + * + *

If the value is {@code 12}, the 12-hour format is used. If the value is {@code 24}, the 24-hour format + * is used. + * + * @since 7 + */ + const TIME_FORMAT: string + + /** + * Specifies whether the date, time, and time zone are automatically obtained from the Network + * Identity and Time Zone (NITZ). + * + *

If the value is {@code true}, the information is automatically obtained from NITZ. + * If the value is {@code false}, the information is not obtained from NITZ. + * + * @since 7 + */ + const AUTO_GAIN_TIME: string + + /** + * Specifies whether the time zone is automatically obtained from NITZ. + * + *

If the value is {@code true}, the information is automatically obtained from NITZ. If the value + * is {@code false}, the information is not obtained from NITZ. + * + * @since 7 + */ + const AUTO_GAIN_TIME_ZONE: string + } + + /** + * Provides methods for setting the display effect, including the font size, screen brightness, screen rotation, + * animation factor, and display color. + * + * @since 7 + */ + namespace display { + /** + * Indicates the scaling factor of fonts, which is a float number. + * + * @since 7 + */ + const FONT_SCALE: string + + /** + * Indicates the screen brightness. The value ranges from 0 to 255. + * + * @since 7 + */ + const SCREEN_BRIGHTNESS_STATUS: string + + /** + * Specifies whether automatic screen brightness adjustment is enabled. + * + *

If the value is {@code 1}, automatic adjustment is enabled. If the value is {@code 0}, automatic + * adjustment is disabled. + * + * @since 7 + */ + const AUTO_SCREEN_BRIGHTNESS: string + + /** + * Indicates the value of {@code AUTO_SCREEN_BRIGHTNESS} when automatic screen brightness adjustment is used. + * + * @since 7 + */ + const AUTO_SCREEN_BRIGHTNESS_MODE: number + + /** + * Indicates the value of {@code AUTO_SCREEN_BRIGHTNESS} when manual screen brightness adjustment is used. + * + * @since 7 + */ + const MANUAL_SCREEN_BRIGHTNESS_MODE: number + + /** + * Indicates the duration that the device waits before going to sleep after a period of inactivity, in + * milliseconds. + * + * @since 7 + */ + const SCREEN_OFF_TIMEOUT: string + + /** + * Indicates the screen rotation when no other policy is available. + * + *

This constant is invalid when auto-rotation is enabled. When auto-rotation is disabled, the following + * values are available: + * + *

    + *
  • {@code 0} - The screen rotates 0 degrees. + *
  • {@code 1} - The screen rotates 90 degrees. + *
  • {@code 2} - The screen rotates 180 degrees. + *
  • {@code 3} - The screen rotates 270 degrees. + *
+ * + * @since 7 + */ + const DEFAULT_SCREEN_ROTATION: string + + /** + * Indicates the scaling factor for the animation duration. + * + *

This affects the start delay and duration of all such animations. If the value is {@code 0}, + * the animation ends immediately. The default value is {@code 1}. + * + * @since 7 + */ + const ANIMATOR_DURATION_SCALE: string + + /** + * Indicates the scaling factor for transition animations. + * If the value is {@code 0}, transition animations are disabled. + * + * @since 7 + */ + const TRANSITION_ANIMATION_SCALE: string + + /** + * Indicates the scaling factor for normal window animations. + * If the value is {@code 0}, window animations are disabled. + * + * @since 7 + */ + const WINDOW_ANIMATION_SCALE: string + + /** + * Specifies whether display color inversion is enabled. + * + *

If the value is {@code 1}, display color inversion is enabled. If the value is {@code 0}, display color + * inversion is disabled. + * + * @since 7 + */ + const DISPLAY_INVERSION_STATUS: string + } + + /** + * Provides methods for setting general information about devices, including the device name, startup wizard, + * airplane mode, debugging information, accessibility feature switch, and touch exploration status. + * + * @since 7 + */ + namespace general { + /** + * Specifies whether the startup wizard has been run. + * + *

If the value is {@code 0}, the startup wizard has not been run. If the value is not {@code 0}, the startup + * wizard has been run. + * + * @since 7 + */ + const SETUP_WIZARD_FINISHED: string + + /** + * Specifies what happens after the user presses the call end button if the user is not in a call. + * + *

    + *
  • {@code 0} - Nothing happens. + *
  • {@code 1} - The home screen is displayed. + *
  • {@code 2} - The device enters the sleep state and the screen is locked. + *
  • {@code 3} - The home screen is displayed. If the user is already on the home screen, the device enters + * the sleep state. + *
+ * + * @since 7 + */ + const END_BUTTON_ACTION: string + + /** + * Specifies whether the accelerometer is used to change screen orientation, that is, whether auto-rotation is + * enabled. + * + *

The value {@code 1} indicates that the accelerometer is enabled by default, and {@code 0} indicates that + * the accelerometer is disabled by default. + * + * @since 7 + */ + const ACCELEROMETER_ROTATION_STATUS: string + + /** + * Specifies whether airplane mode is enabled. + * + *

If the value is {@code 1}, airplane mode is enabled. If the value is {@code 0}, airplane mode is disabled. + * + * @since 7 + */ + const AIRPLANE_MODE_STATUS: string + + /** + * Specifies whether the device is provisioned. + * + *

On a multi-user device with a single system user, the screen may be locked when the value is {@code true}. + * In addition, other abilities cannot be started on the system user unless they are marked to display over + * the screen lock. + * + * @since 7 + */ + const DEVICE_PROVISION_STATUS: string + + /** + * Specifies whether the hard disk controller (HDC) on USB devices is enabled. + * + *

If the value is {@code true}, the HDC is enabled. If the value is {@code false}, the HDC is disabled. + * + * @since 7 + */ + const HDC_STATUS: string + + /** + * Indicates the number of boot operations after the device is powered on. + * + * @since 7 + */ + const BOOT_COUNTING: string + + /** + * Specifies whether contact metadata synchronization is enabled. + * + *

If the value is {@code true}, synchronization is enabled. If the value is {@code false}, + * synchronization is disabled. + * + * @since 7 + */ + const CONTACT_METADATA_SYNC_STATUS: string + + /** + * Specifies whether developer options are enabled. + * + *

If the value is {@code true}, developer options are enabled. + * If the value is {@code false}, developer options are disabled. + * + * @since 7 + */ + const DEVELOPMENT_SETTINGS_STATUS: string + + /** + * Indicates the device name. + * + * @since 7 + */ + const DEVICE_NAME: string + + /** + * Specifies whether USB mass storage is enabled. + * + *

If the value is {@code true}, USB mass storage is enabled. + * If the value is {@code false}, USB mass storage is disabled. + * + * @since 7 + */ + const USB_STORAGE_STATUS: string + + /** + * Specifies whether the device waits for the debugger when starting an application to debug. + * + *

If the value is {@code 1}, the device waits for the debugger. + * If the value is {@code 0}, the system does not wait for the debugger, and so the application runs normally. + * + * @since 7 + */ + const DEBUGGER_WAITING: string + + /** + * Indicates the bundle name of the application to debug. + * + * @since 7 + */ + const DEBUG_APP_PACKAGE: string + + /** + * Specifies whether any accessibility feature is enabled. + * + *

If the value is {@code 1}, the accessibility feature is enabled. If the value is {@code 0}, the + * accessibility feature is disabled. + * + * @since 7 + */ + const ACCESSIBILITY_STATUS: string + + /** + * Indicates the list of accessibility features that have been activated. + * + * @since 7 + */ + const ACTIVATED_ACCESSIBILITY_SERVICES: string + + /** + * Indicates the default geographical location that can be used by the browser. Multiple geographical locations + * are separated by spaces. + * + * @since 7 + */ + const GEOLOCATION_ORIGINS_ALLOWED: string + + /** + * Specifies whether an application should attempt to skip all introductory hints at the first startup. This is + * intended for temporary users or users who are familiar with the environment. + * + *

If the value is {@code 1}, the application attempts to skip all introductory hints at the first startup. + * If the value is {@code 0}, the application does not skip introductory hints at the first startup. + * + * @since 7 + */ + const SKIP_USE_HINTS: string + + /** + * Indicates whether touch exploration is enabled. + * + *

If the value is {@code 1}, touch exploration is enabled. If the value is {@code 0}, touch exploration is + * disabled. + * + * @since 7 + */ + const TOUCH_EXPLORATION_STATUS: string + } + + /** + * Provides methods for setting information about input methods, including automatic capitalization, automatic + * punctuation, autocorrect, password presentation, input method engine, and input method subtypes. + * + * @since 7 + */ + namespace input { + /** + * Indicates the default input method and its ID. + * + * @since 7 + */ + const DEFAULT_INPUT_METHOD: string + + /** + * Indicates the default input method keyboard type and its ID. + * + * @since 7 + */ + const ACTIVATED_INPUT_METHOD_SUB_MODE: string + + /** + * Indicates the list of input methods that have been activated. + * + *

The list is a string that contains the IDs of activated input methods. The IDs are separated by colons + * (:), and keyboardTypes of an input method are separated by semicolons (;). An example format is + * {@code ima0:keyboardType0;keyboardType1;ima1:ima2:keyboardTypes0}. The type of imaID is ElementName, + * and the type of keyboard is int. + * + * @since 7 + */ + const ACTIVATED_INPUT_METHODS: string + + /** + * Specifies whether the input method selector is visible. + * + *

If the value is {@code 1}, the input method selector is visible. If the value is {@code 0}, the input + * method selector is invisible. + * + * @since 7 + */ + const SELECTOR_VISIBILITY_FOR_INPUT_METHOD: string + + /** + * Specifies whether automatic capitalization is enabled for the text editor. + * + *

If the value is {@code 0}, automatic capitalization is disabled. If the value {@code 1}, automatic + * capitalization is enabled. + * + * @since 7 + */ + const AUTO_CAPS_TEXT_INPUT: string + + /** + * Specifies whether automatic punctuation is enabled for the text editor. Automatic punctuation enables the + * text editor to convert two spaces into a period (.) and a space. + * + *

If the value is {@code 0}, automatic punctuation is disabled. If the value {@code 1}, automatic + * punctuation is enabled. + * + * @since 7 + */ + const AUTO_PUNCTUATE_TEXT_INPUT: string + + /** + * Specifies whether autocorrect is enabled for the text editor. Autocorrect enables the text editor to correct + * typos. + * + *

If the value is {@code 0}, autocorrect is disabled. If the value {@code 1}, autocorrect is enabled. + * + * @since 7 + */ + const AUTO_REPLACE_TEXT_INPUT: string + + /** + * Specifies whether password presentation is enabled in the text editor. Password presentation enables the + * text editor to show password characters when the user types them. + * + *

If the value is {@code 0}, password presentation is disabled. If the value {@code 1}, password + * presentation is enabled. + * + * @since 7 + */ + const SHOW_PASSWORD_TEXT_INPUT: string + } + + /** + * Provides methods for setting network information, including the data roaming status, HTTP proxy configurations, + * and preferred networks. + * + * @since 7 + */ + namespace network { + /** + * Specifies whether data roaming is enabled. + * + *

If the value is {@code true}, data roaming is enabled. If the value is {@code false}, + * data roaming is disabled. + * + * @since 7 + */ + const DATA_ROAMING_STATUS: string + + /** + * Indicates the host name and port number of the global HTTP proxy. + * The host name and port number are separated by a colon (:). + * + * @since 7 + */ + const HTTP_PROXY_CFG: string + + /** + * Indicates the user preferences of the network to use. + * + * @since 7 + */ + const NETWORK_PREFERENCE_USAGE: string + } + + /** + * Provides methods for setting the answering mode of incoming and outgoing calls. + * + * @since 7 + */ + namespace phone { + /** + * Specifies whether real-time text (RTT) calling is enabled. If enabled, incoming and outgoing calls are + * answered as RTT calls when supported by the device and carrier. If the value is {@code 1}, RTT calling is + * enabled. If the value is {@code 0}, RTT calling is disabled. + * + * @since 7 + */ + const RTT_CALLING_STATUS: string + } + + /** + * Provides methods for setting the sound effect, including the ringtone, dial tone, alarm sound, notification tone, + * and haptic feedback. + * + * @since 7 + */ + namespace sound { + /** + * Indicates whether the device vibrates when it is ringing for an incoming call. + * + *

This constant will be used by Phone and Settings applications. The value is of the boolean type. + * This constant affects only the scenario where the device rings for an incoming call. It does not affect + * any other application or scenario. + * + * @since 7 + */ + const VIBRATE_WHILE_RINGING: string + + /** + * Indicates the storage area of the system default alarm. + * + *

You can obtain the URI of the system default alarm. + * + * @since 7 + */ + const DEFAULT_ALARM_ALERT: string + + /** + * Indicates the type of the dual-tone multifrequency (DTMF) tone played when dialing. + * + *

The value {@code 0} indicates the normal short sound effect, and {@code 1} indicates the long sound + * effect. + * + * @since 7 + */ + const DTMF_TONE_TYPE_WHILE_DIALING: string + + /** + * Specifies whether the DTMF tone is played when dialing. + * + *

If the value is {@code 1}, the DTMF tone is played. If the value is {@code 0}, the DTMF tone is not + * played. + * + * @since 7 + */ + const DTMF_TONE_WHILE_DIALING: string + + /** + * Specifies which audio streams are affected by changes on the ringing mode and Do Not Disturb (DND) mode. + * + *

If you want a specific audio stream to be affected by changes of the ringing mode and DDN mode, set the + * corresponding bit to {@code 1}. + * + * @since 7 + */ + const AFFECTED_MODE_RINGER_STREAMS: string + + /** + * Specifies which audio streams are affected by the mute mode. + * + *

If you want a specific audio stream to remain muted in mute mode, set the corresponding bit to {@code 1}. + * + * @since 7 + */ + const AFFECTED_MUTE_STREAMS: string + + /** + * Indicates the storage area of the system default notification tone. + * + *

You can obtain the URI of the system default notification tone. + * + * @since 7 + */ + const DEFAULT_NOTIFICATION_SOUND: string + + /** + * Indicates the storage area of the system default ringtone. + * + *

You can obtain the URI of the system default ringtone. + * + * @since 7 + */ + const DEFAULT_RINGTONE: string + + /** + * Specifies whether the sound effects are enabled. + * + *

If the value is {@code 0}, the sound effects are disabled. If the value is {@code 1}, the sound effects + * are enabled. + * + * @since 7 + */ + const SOUND_EFFECTS_STATUS: string + + /** + * Specifies whether the device vibrates for an event. This parameter is used inside the system. + * + *

If the value is {@code 1}, the device vibrates for an event. If the value is {@code 0}, the device does + * not vibrate for an event. + * + * @since 7 + */ + const VIBRATE_STATUS: string + + /** + * Indicates whether the device enables haptic feedback. + * + *

The value is of the boolean type. + * + * @since 7 + */ + const HAPTIC_FEEDBACK_STATUS: string + } + + /** + * Provides methods for setting information about text-to-speech (TTS) conversion, including the pitch, speech rate, + * engine, and plug-ins. + * + * @since 7 + */ + namespace TTS { + /** + * Indicates the default pitch of the text-to-speech (TTS) engine. + * + *

100 = 1x. If the value is set to {@code 200}, the frequency is twice the normal sound frequency. + * + * @since 7 + */ + const DEFAULT_TTS_PITCH: string + + /** + * Indicates the default speech rate of the TTS engine. 100 = 1x. + * + * @since 7 + */ + const DEFAULT_TTS_RATE: string + + /** + * Indicates the default TTS engine. + * + * @since 7 + */ + const DEFAULT_TTS_SYNTH: string + + /** + * Indicates the list of activated plug-in packages used for TTS. Multiple plug-in packages are separated by + * spaces. + * + * @since 7 + */ + const ENABLED_TTS_PLUGINS: string + } + + /** + * Provides methods for setting radio network information, including information about Bluetooth, Wi-Fi, Near Field + * Communication (NFC), and the airplane mode. + * + * @since 7 + */ + namespace wireless { + /** + * Specifies whether the device can be discovered or connected by other devices through Bluetooth. + * + * If the value is {@code 0}, the device cannot be connected or discovered. If the value is {@code 1}, the + * device can be connected but cannot be discovered. If the value is {@code 2}, the device can be connected + * and discovered. + * + * @since 7 + */ + const BLUETOOTH_DISCOVER_ABILITY_STATUS: string + + /** + * Indicates the duration (in seconds) that the device can be discovered through Bluetooth. + * + *

After the duration expires, the device cannot be discovered through Bluetooth. + * + * @since 7 + */ + const BLUETOOTH_DISCOVER_TIMEOUT: string + + /** + * Indicates the list of radio signals to be disabled when airplane mode is enabled. Multiple radio + * signals are separated by commas (,). + * + *

    + *
  • {@code BLUETOOTH_RADIO} - Bluetooth is disabled in airplane mode. + *
  • {@code CELL_RADIO} - Cellular radio is disabled in airplane mode. + *
  • {@code NFC_RADIO} - NFC is disabled in airplane mode. + *
  • {@code WIFI_RADIO} - Wi-Fi is disabled in airplane mode. + *
+ * + * @since 7 + */ + const AIRPLANE_MODE_RADIOS: string /** - * get settingsdata uri - * @since 8 - * @param name uri parameter - * @return settingsdata uri + * Specifies whether Bluetooth is enabled. + * + *

If the value is {@code true}, Bluetooth is enabled. If the value is {@code false}, Bluetooth is disabled. + * + * @since 7 */ - function getUri(name: string): string; + const BLUETOOTH_STATUS: string /** - * get value from settingsdata - * @since 8 - * @param dataAbilityHelper dataAbilityHelper instance - * @param name name - * @param defValue default value - * @return settingsdata value + * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that Bluetooth is disabled in airplane mode. + * + * @since 7 */ - function getValue(dataAbilityHelper: DataAbilityHelper, name: string, defValue: string): string; + const BLUETOOTH_RADIO: string /** - * set settingsdata value - * @need permission ohos.permission.WRITE_SYSTEM_SETTING - * @since 8 - * @param dataAbilityHelper dataAbilityHelper instance - * @param name name - * @param value value - * @return value set result + * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that cellular radio is disabled in airplane mode. + * + * @since 7 */ - function setValue(dataAbilityHelper: DataAbilityHelper, name: string, value: string): boolean; + const CELL_RADIO: string + + /** + * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that NFC is disabled in airplane mode. + * + * @since 7 + */ + const NFC_RADIO: string + + /** + * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that Wi-Fi is disabled in airplane mode. + * + * @since 7 + */ + const WIFI_RADIO: string + + /** + * Specifies whether the Wi-Fi configuration created by the application of the device owner should be + * locked down. + * + *

If the value is {@code true}, the Wi-Fi configuration should be locked down. + * If the value is {@code false}, the Wi-Fi configuration should not be locked down. + * + * @since 7 + */ + const OWNER_LOCKDOWN_WIFI_CFG: string + + /** + * Indicates the maximum number of attempts to obtain an IP address from the DHCP server. + * + * @since 7 + */ + const WIFI_DHCP_MAX_RETRY_COUNT: string + + /** + * Indicates the maximum duration to hold a wake lock when waiting for the mobile data connection to + * establish after the Wi-Fi connection is disconnected. + * + * @since 7 + */ + const WIFI_TO_MOBILE_DATA_AWAKE_TIMEOUT: string + + /** + * Specifies whether Wi-Fi is enabled. + * + *

If the value is {@code true}, Wi-Fi is enabled. If the value is {@code false}, Wi-Fi is disabled. + * + * @since 7 + */ + const WIFI_STATUS: string + + /** + * Specifies whether Wi-Fi watchdog is enabled. + * + *

If the value is {@code true}, Wi-Fi watchdog is enabled. + * If the value is {@code false}, Wi-Fi watchdog is disabled. + * + * @since 7 + */ + const WIFI_WATCHDOG_STATUS: string + } + + /** + * Constructs a URI for a specific name-value pair for monitoring data of the ability that uses the Data + * template. + * + * @param name Indicates the name of the setting to set. + * @return Returns the corresponding URI; returns {@code null} if the URI does not exist. + * @since 7 + */ + function getURI(name: string, callback: AsyncCallback): void; + function getURI(name: string): Promise; + + /** + * Obtains the value of a specified character string in the database. + * + * @param dataAbilityHelper Indicates the {@link ohos.aafwk.ability.DataAbilityHelper} used to access + * the database. + * @param name Indicates the name of the character string. + * @return Returns the value of the character string in the table if any is found; returns {@code null} + * otherwise. + * @since 7 + */ + function getValue(dataAbilityHelper: DataAbilityHelper, name: string, callback: AsyncCallback): void; + function getValue(dataAbilityHelper: DataAbilityHelper, name: string): Promise; + + /** + * Saves a character string name and its value to the database. + * + * @param dataAbilityHelper Indicates the {@link ohos.aafwk.ability.DataAbilityHelper} used to access + * the database. + * @param name Indicates the name of the character string. + * @param value Indicates the value of the character string. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. + * @since 7 + * @hide SystemApi + */ + function setValue(dataAbilityHelper: DataAbilityHelper, name: string, value: object, callback: AsyncCallback): void; + function setValue(dataAbilityHelper: DataAbilityHelper, name: string, value: object): Promise; + + /** + * Enables or disables airplane mode. + * + * @param enable Specifies whether to enable airplane mode. The value {@code true} means to enable airplane + * mode, and {@code false} means to disable airplane mode. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. + * @since 7 + */ + function enableAirplaneMode(enable: boolean, callback: AsyncCallback): void; + function enableAirplaneMode(enable: boolean): Promise; + + /** + * Checks whether a specified application can show as float window. + * + * @param context Indicates the application context. + * @return Returns {@code true} if the application can draw over other applications; returns {@code false} + * otherwise. + * @since 7 + */ + function canShowFloating(callback: AsyncCallback): void; + function canShowFloating(): Promise; + + /** + * get settingsdata uri(synchronization method) + * @since 8 + * @param name Indicates the name of the setting to set. + * @return Return settingsdata uri. + */ + function getUriSync(name: string): string; + /** + * get value from settingsdata(synchronization method) + * @since 8 + * @param dataAbilityHelper Indicates dataAbilityHelper instance + * @param name Indicates the name of the character string. + * @param defValue Indicates the default value of the character string. + * @return settingsdata value + */ + function getValueSync(dataAbilityHelper: DataAbilityHelper, name: string, defValue: string): string; + + /** + * set settingsdata value(synchronization method) + * @need permission ohos.permission.WRITE_SYSTEM_SETTING + * @since 8 + * @param dataAbilityHelper Indicates dataAbilityHelper instance + * @param name Indicates the name of the character string. + * @param value Indicates the value of the character string. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. + */ + function setValueSync(dataAbilityHelper: DataAbilityHelper, name: string, value: string): boolean; } -export default settings; +export default settings; \ No newline at end of file -- Gitee From 3171b52686061274330253f074e0ffcafda89cf1 Mon Sep 17 00:00:00 2001 From: clevercong Date: Tue, 1 Mar 2022 19:38:52 +0800 Subject: [PATCH 056/163] update doc Signed-off-by: clevercong --- api/@ohos.net.webSocket.d.ts | 2 +- api/@ohos.telephony.call.d.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index ebf4dcd5ca..cbb967bee4 100644 --- a/api/@ohos.net.webSocket.d.ts +++ b/api/@ohos.net.webSocket.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 11f0ddb79b..9a0f4077d0 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -42,8 +42,7 @@ declare namespace call { * Go to the dial screen and the called number is displayed. * * @param phoneNumber Indicates the called number. - * @syscap SystemCapability.SysAppComponents.CONTACT - * @devices phone, tablet + * @syscap SystemCapability.Applications.Contacts */ function makeCall(phoneNumber: string, callback: AsyncCallback): void; function makeCall(phoneNumber: string): Promise; -- Gitee From 9e0b1faa9327ac30c9795d6d0a06a5fbf6681a1e Mon Sep 17 00:00:00 2001 From: clevercong Date: Tue, 1 Mar 2022 19:45:46 +0800 Subject: [PATCH 057/163] update copyright date. Signed-off-by: clevercong --- api/@ohos.net.http.d.ts | 2 +- api/@ohos.net.socket.d.ts | 2 +- api/@ohos.telephony.call.d.ts | 2 +- api/@ohos.telephony.data.d.ts | 2 +- api/@ohos.telephony.observer.d.ts | 2 +- api/@ohos.telephony.radio.d.ts | 2 +- api/@ohos.telephony.sim.d.ts | 2 +- api/@ohos.telephony.sms.d.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts index de5a6c3ec8..b6ecab57c1 100644 --- a/api/@ohos.net.http.d.ts +++ b/api/@ohos.net.http.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.net.socket.d.ts b/api/@ohos.net.socket.d.ts index a659f947f7..fb88669e14 100644 --- a/api/@ohos.net.socket.d.ts +++ b/api/@ohos.net.socket.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 9a0f4077d0..d1e4486775 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.telephony.data.d.ts b/api/@ohos.telephony.data.d.ts index 8f394b6477..d32d033a35 100644 --- a/api/@ohos.telephony.data.d.ts +++ b/api/@ohos.telephony.data.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.telephony.observer.d.ts b/api/@ohos.telephony.observer.d.ts index 2fd39fa9c0..8193aca055 100644 --- a/api/@ohos.telephony.observer.d.ts +++ b/api/@ohos.telephony.observer.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index e3a6bcbeb9..c7486d60a3 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index 93237791f0..3b3eac8443 100644 --- a/api/@ohos.telephony.sim.d.ts +++ b/api/@ohos.telephony.sim.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.telephony.sms.d.ts b/api/@ohos.telephony.sms.d.ts index f011e9dd03..d674251555 100644 --- a/api/@ohos.telephony.sms.d.ts +++ b/api/@ohos.telephony.sms.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -- Gitee From 486be759c0807917cf4cac8547dae15e6d1ada51 Mon Sep 17 00:00:00 2001 From: guyuanzhang Date: Tue, 1 Mar 2022 19:50:02 +0800 Subject: [PATCH 058/163] IssueNo:#I4VUH0 Description: fix syscap err Sig: SIG_ApplicationFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: guyuanzhang Change-Id: I7afeadecfc43a92acf52fe19d2963b9b18ab00bf --- api/@internal/ets/lifecycle.d.ts | 88 +++++++++---------- api/@ohos.ability.dataUriUtils.d.ts | 8 +- api/@ohos.ability.featureAbility.d.ts | 24 ++--- api/@ohos.ability.particleAbility.d.ts | 8 +- api/@ohos.ability.wantConstant.d.ts | 6 +- api/@ohos.app.abilityManager.d.ts | 10 +-- api/@ohos.application.AbilityConstant.d.ts | 12 +-- api/@ohos.application.AbilityStage.d.ts | 1 - api/@ohos.application.ServiceExtAbility.d.ts | 23 ++--- api/@ohos.application.StartOptions.d.ts | 7 +- api/@ohos.application.Want.d.ts | 20 ++--- api/@ohos.application.abilityManager.d.ts | 12 +-- api/@ohos.application.appManager.d.ts | 20 ++--- api/@ohos.application.formBindingData.d.ts | 4 +- api/@ohos.application.missionManager.d.ts | 22 ++--- ...ohos.application.uriPermissionManager.d.ts | 4 +- api/ability/abilityResult.d.ts | 6 +- api/ability/connectOptions.d.ts | 8 +- api/ability/continueAbilityOptions.d.ts | 6 +- api/ability/dataAbilityHelper.d.ts | 28 +++--- api/ability/dataAbilityOperation.d.ts | 18 ++-- api/ability/dataAbilityResult.d.ts | 6 +- api/ability/startAbilityParameter.d.ts | 6 +- api/ability/want.d.ts | 24 ++--- api/app/abilityMissionInfo.d.ts | 10 +-- api/app/activeProcessInfo.d.ts | 10 +-- api/app/context.d.ts | 34 +++---- api/app/processInfo.d.ts | 6 +- api/application/AbilityRunningInfo.d.ts | 16 ++-- api/application/AbilityStateData.d.ts | 15 ++-- api/application/AppStateData.d.ts | 8 +- api/application/ApplicationStateObserver.d.ts | 10 +-- api/application/BaseContext.d.ts | 4 +- api/application/Context.d.ts | 28 +++--- api/application/EventHub.d.ts | 12 +-- api/application/ExtAbilityContext.d.ts | 5 +- api/application/ExtensionRunningInfo.d.ts | 16 ++-- api/application/FormExtensionContext.d.ts | 4 +- api/application/MissionInfo.d.ts | 19 ++-- api/application/MissionListener.d.ts | 10 +-- api/application/MissionSnapshot.d.ts | 6 +- api/application/PermissionRequestResult.d.ts | 6 +- api/application/ProcessData.d.ts | 8 +- api/application/ProcessRunningInfo.d.ts | 14 +-- api/application/ServiceExtAbilityContext.d.ts | 21 ++--- api/application/ServiceExtensionContext.d.ts | 16 ++-- 46 files changed, 312 insertions(+), 337 deletions(-) diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index e93c7b285f..1ab0f948b8 100644 --- a/api/@internal/ets/lifecycle.d.ts +++ b/api/@internal/ets/lifecycle.d.ts @@ -31,7 +31,7 @@ import { PacMap } from "../ability/dataAbilityHelper"; * * @name LifecycleForm * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleForm { @@ -39,7 +39,7 @@ export declare interface LifecycleForm { * Called to return a {@link formBindingData.FormBindingData} object. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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, * which can be obtained from {@link formManager#FormParam#IDENTITY_KEY}, @@ -55,7 +55,7 @@ export declare interface LifecycleForm { * Called when the form provider is notified that a temporary form is successfully converted to a normal form. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param formId Indicates the ID of the form. * @return - * @FAModelOnly @@ -66,7 +66,7 @@ export declare interface LifecycleForm { * Called to notify the form provider to update a specified form. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param formId Indicates the ID of the form to update. * @return - * @FAModelOnly @@ -77,7 +77,7 @@ export declare interface LifecycleForm { * Called when the form provider receives form events from the system. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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} * or {@link formManager#VisibilityType#FORM_INVISIBLE}. {@link formManager#VisibilityType#FORM_VISIBLE} @@ -93,7 +93,7 @@ export declare interface LifecycleForm { * JS forms. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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 @@ -108,7 +108,7 @@ export declare interface LifecycleForm { * you want your application, as the form provider, to be notified of form deletion. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param formId Indicates the ID of the deleted form. * @return - * @FAModelOnly @@ -122,7 +122,7 @@ export declare interface LifecycleForm { * this method returns {@link FormState#DEFAULT} by default.

* * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -136,7 +136,7 @@ export declare interface LifecycleForm { * * @name LifecycleApp * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleApp { @@ -144,7 +144,7 @@ export declare interface LifecycleApp { * Called back when the state of an ability changes from BACKGROUND to INACTIVE. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -154,7 +154,7 @@ export declare interface LifecycleApp { * Called back when an ability enters the BACKGROUND state. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -164,7 +164,7 @@ export declare interface LifecycleApp { * Called back before an ability is destroyed. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -174,7 +174,7 @@ export declare interface LifecycleApp { * Called back when an ability is started for initialization. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -185,7 +185,7 @@ export declare interface LifecycleApp { * to multi-window mode or from multi-window mode to fullscreen mode. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param isShownInMultiWindow Specifies whether this ability is currently in multi-window mode. * The value {@code true} indicates the multi-window mode, and {@code false} indicates another mode. * @param newConfig Indicates the new configuration information about this Page ability. @@ -199,7 +199,7 @@ export declare interface LifecycleApp { * Asks a user whether to start the migration. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return Returns {@code true} if the user allows the migration; returns {@code false} otherwise. * @FAModelOnly */ @@ -211,7 +211,7 @@ export declare interface LifecycleApp { * Scheduler Service requests data from the local ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param data Indicates the user data to save. * @return Returns {@code true} if the data is successfully saved; returns {@code false} otherwise. * @FAModelOnly @@ -225,7 +225,7 @@ export declare interface LifecycleApp { * notify the user of the successful migration and then exit the local ability.

* * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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 - @@ -239,7 +239,7 @@ export declare interface LifecycleApp { * is restored. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param data Indicates the user data to restore. * @return - * @FAModelOnly @@ -251,7 +251,7 @@ export declare interface LifecycleApp { * migration is performed for the ability from the local device to the remote device. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -263,7 +263,7 @@ export declare interface LifecycleApp { * this method is used only to save temporary states. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param outState Indicates the {@code PacMap} object used for storing user data and states. This * parameter cannot be null. * @return - @@ -277,7 +277,7 @@ export declare interface LifecycleApp { * states. Generally, this method is called after the {@link #onStart(Want)} method. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param inState Indicates the {@code PacMap} object used for storing data and states. This * parameter can not be null. * @return - @@ -290,7 +290,7 @@ export declare interface LifecycleApp { * change to the BACKGROUND or ACTIVE state). * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -300,7 +300,7 @@ export declare interface LifecycleApp { * Called back when an ability enters the ACTIVE state. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -310,7 +310,7 @@ export declare interface LifecycleApp { * Called when the launch mode of an ability is set to singleton. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates the new {@code want} containing information about the ability. * @return - * @FAModelOnly @@ -322,7 +322,7 @@ export declare interface LifecycleApp { * background and there is no enough memory for running as many background processes as possible. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param level Indicates the memory trim level, which shows the current memory usage status. * @return - * @FAModelOnly @@ -335,7 +335,7 @@ export declare interface LifecycleApp { * * @name LifecycleService * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleService { @@ -344,7 +344,7 @@ export declare interface LifecycleService { * an ability). * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -354,7 +354,7 @@ export declare interface LifecycleService { * Called back when Service is started. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates the want of Service to start. * @param startId Indicates the number of times the Service ability has been started. The {@code startId} is * incremented by 1 every time the ability is started. For example, if the ability has been started @@ -368,7 +368,7 @@ export declare interface LifecycleService { * Called back before an ability is destroyed. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -378,7 +378,7 @@ export declare interface LifecycleService { * Called back when a Service ability is first connected to an ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates connection information about the Service ability. * @return Returns the proxy of the Service ability. * @FAModelOnly @@ -389,7 +389,7 @@ export declare interface LifecycleService { * Called back when all abilities connected to a Service ability are disconnected. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates disconnection information about the Service ability. * @return - * @FAModelOnly @@ -404,7 +404,7 @@ export declare interface LifecycleService { * called but {@link #terminateSelf} has not.

* * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates the want of the Service ability being connected. * @return - * @FAModelOnly @@ -417,7 +417,7 @@ export declare interface LifecycleService { * * @name LifecycleData * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleData { @@ -425,7 +425,7 @@ export declare interface LifecycleData { * Updates one or more data records in the database. This method should be implemented by a Data ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the database table storing the data to update. * @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 @@ -441,7 +441,7 @@ export declare interface LifecycleData { * Queries one or more data records in the database. This method should be implemented by a Data ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the database table storing the data to query. * @param columns Indicates the columns to be queried, in array, for example, {"name","age"}. You should define * the processing logic when this parameter is null. @@ -458,7 +458,7 @@ export declare interface LifecycleData { * Deletes one or more data records. This method should be implemented by a Data ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -475,7 +475,7 @@ export declare interface LifecycleData { * even if the context has changed. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri to normalize. * @param callback function specified by framework to receive the result, developer should call this function to * return the result to framework. @@ -488,7 +488,7 @@ export declare interface LifecycleData { * Inserts multiple data records into the database. This method should be implemented by a Data ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the position where the data is to insert. * @param valueBuckets Indicates the data to insert. * @param callback function specified by framework to receive the result, developer should call this function to @@ -503,7 +503,7 @@ export declare interface LifecycleData { * The default implementation of this method returns the original uri passed to it. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri to denormalize. * @param callback function specified by framework to receive the result, developer should call this function to * return the result to framework. @@ -516,7 +516,7 @@ export declare interface LifecycleData { * Inserts a data record into the database. This method should be implemented by a Data ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the position where the data is to insert. * @param valueBucket Indicates the data to insert. * @param callback function specified by framework to receive the result, developer should call this function to @@ -530,7 +530,7 @@ export declare interface LifecycleData { * Opens a file. This method should be implemented by a Data ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the file to open. * @param mode Indicates the 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, @@ -547,7 +547,7 @@ export declare interface LifecycleData { * Obtains the MIME type of files. This method should be implemented by a Data ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the files to obtain. * @param mimeTypeFilter Indicates the MIME type of the files to obtain. This parameter cannot be set to {@code * null}. @@ -565,7 +565,7 @@ export declare interface LifecycleData { * Called to carry {@code AbilityInfo} to this ability after the ability is initialized. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param info Indicates the {@code AbilityInfo} object containing information about this ability. * @return - * @FAModelOnly @@ -579,7 +579,7 @@ export declare interface LifecycleData { *

Data abilities supports general data types, including text, HTML, and JPEG.

* * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri of the data. * @param callback function specified by framework to receive the result, developer should call this function to * return the result to framework. diff --git a/api/@ohos.ability.dataUriUtils.d.ts b/api/@ohos.ability.dataUriUtils.d.ts index 3b978c07dd..af7b680500 100644 --- a/api/@ohos.ability.dataUriUtils.d.ts +++ b/api/@ohos.ability.dataUriUtils.d.ts @@ -25,7 +25,7 @@ declare namespace dataUriUtils { * Obtains the ID attached to the end of the path component of the given uri. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param uri Indicates the uri object from which the ID is to be obtained. * @return Returns the ID attached to the end of the path component; */ @@ -35,7 +35,7 @@ declare namespace dataUriUtils { * Attaches the given ID to the end of the path component of the given uri. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param uri Indicates the uri string from which the ID is to be obtained. * @param id Indicates the ID to attach. * @return Returns the uri object with the given ID attached. @@ -46,7 +46,7 @@ declare namespace dataUriUtils { * Deletes the ID from the end of the path component of the given uri. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param uri Indicates the uri object from which the ID is to be deleted. * @return Returns the uri object with the ID deleted. */ @@ -56,7 +56,7 @@ declare namespace dataUriUtils { * Updates the ID in the specified uri * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param uri Indicates the uri object to be updated. * @param id Indicates the new ID. * @return Returns the updated uri object. diff --git a/api/@ohos.ability.featureAbility.d.ts b/api/@ohos.ability.featureAbility.d.ts index 20b110239b..0aebda140e 100644 --- a/api/@ohos.ability.featureAbility.d.ts +++ b/api/@ohos.ability.featureAbility.d.ts @@ -25,7 +25,7 @@ import { ContinueAbilityOptions } from './ability/continueAbilityOptions'; * A Feature Ability represents an ability with a UI and is designed to interact with users. * @name featureAbility * @since 6 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @permission N/A * @FAModelOnly */ @@ -34,7 +34,7 @@ declare namespace featureAbility { * Obtain the want sended from the source ability. * * @since 6 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param parameter Indicates the ability to start. * @return - * @FAModelOnly @@ -46,7 +46,7 @@ declare namespace featureAbility { * Starts a new ability. * * @since 6 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param parameter Indicates the ability to start. * @return - * @FAModelOnly @@ -57,7 +57,7 @@ declare namespace featureAbility { /** * Obtains the application context. * - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return Returns the application context. * @since 6 * @FAModelOnly @@ -68,7 +68,7 @@ declare namespace featureAbility { * Starts an ability and returns the execution result when the ability is destroyed. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param parameter Indicates the ability to start. * @return Returns the {@link AbilityResult}. * @FAModelOnly @@ -81,7 +81,7 @@ declare namespace featureAbility { * and destroys this Page ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param parameter Indicates the result to return. * @return - * @FAModelOnly @@ -93,7 +93,7 @@ declare namespace featureAbility { * Destroys this Page ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -104,7 +104,7 @@ declare namespace featureAbility { * Obtains the dataAbilityHelper. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the file to open. * @return Returns the dataAbilityHelper. * @FAModelOnly @@ -115,7 +115,7 @@ declare namespace featureAbility { * Checks whether the main window of this ability has window focus. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return Returns {@code true} if this ability currently has window focus; returns {@code false} otherwise. * @FAModelOnly */ @@ -126,7 +126,7 @@ declare namespace featureAbility { * Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template. * @default - * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param request The element name of the service ability * @param options The remote object instance * @return Returns the number code of the ability connected @@ -138,7 +138,7 @@ declare namespace featureAbility { * The callback interface was connect successfully. * @default - * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param connection The number code of the ability connected * @FAModelOnly */ @@ -149,7 +149,7 @@ declare namespace featureAbility { * Migrates this ability to the given device on the same distributed network. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ diff --git a/api/@ohos.ability.particleAbility.d.ts b/api/@ohos.ability.particleAbility.d.ts index fc367272ac..968b176d9c 100644 --- a/api/@ohos.ability.particleAbility.d.ts +++ b/api/@ohos.ability.particleAbility.d.ts @@ -22,7 +22,7 @@ import { NotificationRequest } from './notification/notificationRequest'; * A Particle Ability represents an ability with service. * @name particleAbility * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @permission N/A * @FAModelOnly */ @@ -31,7 +31,7 @@ declare namespace particleAbility { * Service ability uses this method to start a specific ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param parameter Indicates the ability to start. * @return - * @FAModelOnly @@ -43,7 +43,7 @@ declare namespace particleAbility { * Destroys this service ability. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -54,7 +54,7 @@ declare namespace particleAbility { * Obtains the dataAbilityHelper. * * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the file to open. * @return Returns the dataAbilityHelper. * @FAModelOnly diff --git a/api/@ohos.ability.wantConstant.d.ts b/api/@ohos.ability.wantConstant.d.ts index a0483c0095..bc93801bab 100644 --- a/api/@ohos.ability.wantConstant.d.ts +++ b/api/@ohos.ability.wantConstant.d.ts @@ -17,7 +17,7 @@ * the constant for action and entity in the want * @name wantConstant * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ declare namespace wantConstant { @@ -25,7 +25,7 @@ declare namespace wantConstant { * the constant for action of the want * @name Action * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ export enum Action { @@ -221,7 +221,7 @@ declare namespace wantConstant { * the constant for Entity of the want * @name Action * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ export enum Entity { diff --git a/api/@ohos.app.abilityManager.d.ts b/api/@ohos.app.abilityManager.d.ts index 9b430de3ca..cc24a83c7b 100644 --- a/api/@ohos.app.abilityManager.d.ts +++ b/api/@ohos.app.abilityManager.d.ts @@ -22,7 +22,7 @@ import { MissionSnapshot } from './app/missionSnapshot'; * This module provides the capability to manage abilities and obtaining system task information. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import abilityManager from '@ohos.app.abilityManager' * @permission N/A */ @@ -38,7 +38,7 @@ declare namespace abilityManager { /** * Get information about running processes * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return a list of ActiveProcessInfo records describing each process. * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION * @systemapi hide this for inner system use @@ -49,7 +49,7 @@ declare namespace abilityManager { /** * Get information about the running ability missions * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param upperLimit The maximum number of mission infos to return in the array. * @return an array of AbilityMissionInfo records describing each active mission. * @permission ohos.permission.ACCESS_MISSIONS @@ -61,7 +61,7 @@ declare namespace abilityManager { /** * Get information about recently run missions * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param upperLimit The maximum number of previous mission infos to return in the array. * @return an array of AbilityMissionInfo records describing each of the previous mission. * @permission ohos.permission.ACCESS_MISSIONS_EXTRA @@ -73,7 +73,7 @@ declare namespace abilityManager { /** * Delete the specified missions * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param missionIds An array of missions, representing the missions that need to be deleted. * @permission ohos.permission.DELETE_MISSIONS * @systemapi hide this for inner system use diff --git a/api/@ohos.application.AbilityConstant.d.ts b/api/@ohos.application.AbilityConstant.d.ts index d2691c2e98..e43db61c8a 100644 --- a/api/@ohos.application.AbilityConstant.d.ts +++ b/api/@ohos.application.AbilityConstant.d.ts @@ -17,7 +17,7 @@ * The definition of AbilityConstant. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @StageModelOnly */ @@ -26,7 +26,7 @@ declare namespace AbilityConstant { * Interface of launch param. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ export interface LaunchParam { @@ -34,7 +34,7 @@ declare namespace AbilityConstant { * Indicates launch reason. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ launchReason: LaunchReason; @@ -43,7 +43,7 @@ declare namespace AbilityConstant { * Indicates last exit reason. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ lastExitReason: LastExitReason; @@ -53,7 +53,7 @@ declare namespace AbilityConstant { * Type of launch reason. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ export enum LaunchReason { @@ -67,7 +67,7 @@ declare namespace AbilityConstant { * Type of last exit reason. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ export enum LastExitReason { diff --git a/api/@ohos.application.AbilityStage.d.ts b/api/@ohos.application.AbilityStage.d.ts index 7d1762c145..5ef0796012 100644 --- a/api/@ohos.application.AbilityStage.d.ts +++ b/api/@ohos.application.AbilityStage.d.ts @@ -48,7 +48,6 @@ export default class AbilityStage { /** * Called back when start specified ability. * - * @devices phone, tablet, tv, wearable, car * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return - diff --git a/api/@ohos.application.ServiceExtAbility.d.ts b/api/@ohos.application.ServiceExtAbility.d.ts index 57a549082f..c87682539c 100644 --- a/api/@ohos.application.ServiceExtAbility.d.ts +++ b/api/@ohos.application.ServiceExtAbility.d.ts @@ -21,8 +21,7 @@ import Want from './@ohos.application.Want'; * class of service extension ability. * * @since 9 - * @sysCap AAFwk - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @StageModelOnly */ @@ -31,7 +30,7 @@ export default class ServiceExtAbility { * Indicates service extension ability context. * * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @StageModelOnly */ @@ -40,9 +39,8 @@ export default class ServiceExtAbility { /** * Called back when a service extension is started for initialization. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -52,9 +50,8 @@ export default class ServiceExtAbility { /** * Called back before a service extension is destroyed. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -64,9 +61,8 @@ export default class ServiceExtAbility { /** * Called back when a service extension is started. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @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 * incremented by 1 every time the service extension is started. For example, if the service extension @@ -80,9 +76,8 @@ export default class ServiceExtAbility { /** * Called back when a service extension is first connected to an ability. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates connection information about the Service ability. * @systemapi hide for inner use. * @return Returns the proxy of the Service ability. @@ -93,9 +88,8 @@ export default class ServiceExtAbility { /** * Called back when all abilities connected to a service extension are disconnected. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates disconnection information about the service extension. * @systemapi hide for inner use. * @return - @@ -107,9 +101,8 @@ export default class ServiceExtAbility { * Called when a new client attempts to connect to a service extension after all previous client connections to it * are disconnected. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates the want of the service extension being connected. * @systemapi hide for inner use. * @return - diff --git a/api/@ohos.application.StartOptions.d.ts b/api/@ohos.application.StartOptions.d.ts index 5c0b9e7d04..b4cd41bbce 100644 --- a/api/@ohos.application.StartOptions.d.ts +++ b/api/@ohos.application.StartOptions.d.ts @@ -18,7 +18,7 @@ * * @name StartOptions * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @StageModelOnly */ @@ -27,7 +27,7 @@ export default class StartOptions { * windowMode * @default - * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ windowMode?: number; @@ -35,9 +35,8 @@ export default class StartOptions { /** * displayId * @default - - * @devices phone, tablet * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ displayId?: number; diff --git a/api/@ohos.application.Want.d.ts b/api/@ohos.application.Want.d.ts index 337e376ae1..6b2c2b0ae6 100644 --- a/api/@ohos.application.Want.d.ts +++ b/api/@ohos.application.Want.d.ts @@ -18,7 +18,7 @@ * * @name Want * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ export default class Want { @@ -26,7 +26,7 @@ export default class Want { * device id * @default - * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ deviceId?: string; @@ -34,7 +34,7 @@ export default class Want { * bundle name * @default - * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ bundleName?: string; @@ -42,14 +42,14 @@ export default class Want { * ability name * @default - * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ abilityName?: string; /** * The description of a URI in a Want. * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ uri?: string; @@ -57,7 +57,7 @@ export default class Want { /** * The description of the type in this Want. * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ type?: string; @@ -65,7 +65,7 @@ export default class Want { /** * The options of the flags in this Want. * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ flags?: number; @@ -73,7 +73,7 @@ export default class Want { /** * The description of an action in an want. * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ action?: string; @@ -81,7 +81,7 @@ export default class Want { /** * The description of the WantParams object in an Want * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ parameters?: {[key: string]: any}; @@ -89,7 +89,7 @@ export default class Want { /** * The description of a entities in a Want. * @since 8 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ entities?: Array; diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts index ff2426a5e7..44885db203 100644 --- a/api/@ohos.application.abilityManager.d.ts +++ b/api/@ohos.application.abilityManager.d.ts @@ -22,7 +22,7 @@ import { ExtensionRunningInfo } from './application/ExtensionRunningInfo'; * The class of an ability manager. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ declare namespace abilityManager { @@ -30,7 +30,7 @@ declare namespace abilityManager { /** * @name AbilityState * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export enum AbilityState { @@ -45,7 +45,7 @@ declare namespace abilityManager { * Updates the configuration by modifying the configuration. * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param config Indicates the new configuration. * @systemapi Hide this for inner system use. * @return - @@ -57,18 +57,18 @@ declare namespace abilityManager { * Get information about running abilitys * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. * @return - */ function getAbilityRunningInfos(): Promise>; function getAbilityRunningInfos(callback: AsyncCallback>): void; - + /** * Get information about running extensions * * @since 9 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param upperLimit Get the maximum limit of the number of messages * @systemapi Hide this for inner system use. * @return - diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts index dcb6dca86a..b6956e4857 100644 --- a/api/@ohos.application.appManager.d.ts +++ b/api/@ohos.application.appManager.d.ts @@ -22,7 +22,7 @@ import { ProcessRunningInfo } from './application/ProcessRunningInfo'; * This module provides the function of app manager service. * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import appManager from '@ohos.application.appManager' * @permission N/A */ @@ -32,7 +32,7 @@ declare namespace appManager { * * @default - * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param observer The application state observer. * @systemapi hide this for inner system use * @return Returns the number code of the observer. @@ -43,7 +43,7 @@ declare namespace appManager { * Unregister application state observer. * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param observerId Indicates the number code of the observer. * @systemapi hide this for inner system use * @return - @@ -55,7 +55,7 @@ declare namespace appManager { * getForegroundApplications. * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide this for inner system use * @return Returns the list of AppStateData. */ @@ -66,7 +66,7 @@ declare namespace appManager { * Kill process with account. * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param bundleName The process bundle name. * @param accountId The account id. * @systemapi hide this for inner system use @@ -79,7 +79,7 @@ declare namespace appManager { * Is user running in stability test. * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return Returns true if user is running stability test. */ function isRunningInStabilityTest(callback: AsyncCallback): void; @@ -89,7 +89,7 @@ declare namespace appManager { * Get information about running processes * * @since 8 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. * @return - */ @@ -99,8 +99,7 @@ declare namespace appManager { /** * Kill processes by bundle name * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param bundleName bundle name. * @permission ohos.permission.DELETE_MISSIONS * @systemapi hide this for inner system use @@ -111,8 +110,7 @@ declare namespace appManager { /** * Clear up application data by bundle name * @since 8 - * @SysCap SystemCapability.Appexecfwk - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param bundleName bundle name. * @permission ohos.permission.DELETE_MISSIONS * @systemapi hide this for inner system use diff --git a/api/@ohos.application.formBindingData.d.ts b/api/@ohos.application.formBindingData.d.ts index ad39876591..6ede7819dc 100644 --- a/api/@ohos.application.formBindingData.d.ts +++ b/api/@ohos.application.formBindingData.d.ts @@ -18,14 +18,14 @@ * * @name formBindingData * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ declare namespace formBindingData { /** * Create an FormBindingData instance. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param obj Indicates the FormBindingData instance data. * @return Returns the {@link FormBindingData} instance. */ diff --git a/api/@ohos.application.missionManager.d.ts b/api/@ohos.application.missionManager.d.ts index 94f172f8e5..cc0a560a1a 100644 --- a/api/@ohos.application.missionManager.d.ts +++ b/api/@ohos.application.missionManager.d.ts @@ -24,7 +24,7 @@ import StartOptions from "./@ohos.application.StartOptions"; * * @name missionManager * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @permission N/A * @systemapi hide for inner use. */ @@ -33,7 +33,7 @@ declare namespace missionManager { * Register the missionListener to ams. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return The index number of the MissionListener. */ function registerMissionListener(listener: MissionListener): number; @@ -42,7 +42,7 @@ declare namespace missionManager { * Unrgister the missionListener to ams. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ function unregisterMissionListener(listenerId: number, callback: AsyncCallback): void; @@ -52,7 +52,7 @@ declare namespace missionManager { * Get the missionInfo with the given missionId. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return the {@link MissionInfo} of the given id. */ function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void; @@ -62,7 +62,7 @@ declare namespace missionManager { * Get the missionInfo with the given missionId. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return The array of the {@link MissionInfo}. */ function getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback>): void; @@ -72,7 +72,7 @@ declare namespace missionManager { * Get the mission snapshot with the given missionId. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return The {@link MissionSnapshot} of the given id. */ function getMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void; @@ -82,7 +82,7 @@ declare namespace missionManager { * Lock the mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ function lockMission(missionId: number, callback: AsyncCallback): void; @@ -92,7 +92,7 @@ declare namespace missionManager { * Unlock the mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ function unlockMission(missionId: number, callback: AsyncCallback): void; @@ -102,7 +102,7 @@ declare namespace missionManager { * Clear the given mission in the ability manager service. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ function clearMission(missionId: number, callback: AsyncCallback): void; @@ -112,7 +112,7 @@ declare namespace missionManager { * Clear all missions in the ability manager service. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ function clearAllMissions(callback: AsyncCallback): void; @@ -122,7 +122,7 @@ declare namespace missionManager { * Schedule the given mission to foreground. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ function moveMissionToFront(missionId: number, callback: AsyncCallback): void; diff --git a/api/@ohos.application.uriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts index ad3ad1de00..37cd85441c 100644 --- a/api/@ohos.application.uriPermissionManager.d.ts +++ b/api/@ohos.application.uriPermissionManager.d.ts @@ -20,7 +20,7 @@ import wantConstant from "./@ohos.ability.wantConstant"; * The management class for uri of file. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ declare namespace uriPermissionManager { @@ -28,7 +28,7 @@ declare namespace uriPermissionManager { * Check whether the application corresponding to the accesstokenID has access rights to the URI. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param uri File URI. * @param flag wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION or wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION * @param accessTokenId Indicates the access token of the application. diff --git a/api/ability/abilityResult.d.ts b/api/ability/abilityResult.d.ts index bac8cd8756..253243e97f 100644 --- a/api/ability/abilityResult.d.ts +++ b/api/ability/abilityResult.d.ts @@ -16,7 +16,7 @@ import { Want } from './want'; /** * @since 7 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ export interface AbilityResult { @@ -25,7 +25,7 @@ export interface AbilityResult { * code to identify an error. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ resultCode: number; @@ -34,7 +34,7 @@ export interface AbilityResult { * This parameter can be null. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ want?: Want; } \ No newline at end of file diff --git a/api/ability/connectOptions.d.ts b/api/ability/connectOptions.d.ts index 1604b9bf5e..8b283b0da1 100644 --- a/api/ability/connectOptions.d.ts +++ b/api/ability/connectOptions.d.ts @@ -17,7 +17,7 @@ import rpc from './../@ohos.rpc'; /** * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export interface ConnectOptions { @@ -26,7 +26,7 @@ export interface ConnectOptions { * * @default - * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param elementName The element name of the service ability * @param remoteObject The remote object instance */ @@ -37,7 +37,7 @@ export interface ConnectOptions { * * @default - * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param elementName The element name of the service ability */ onDisconnect: (elementName: ElementName) => void; @@ -47,7 +47,7 @@ export interface ConnectOptions { * * @default - * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param code The error code of the failed. */ onFailed: (code: number) => void; diff --git a/api/ability/continueAbilityOptions.d.ts b/api/ability/continueAbilityOptions.d.ts index 32c09d1414..12f2772298 100755 --- a/api/ability/continueAbilityOptions.d.ts +++ b/api/ability/continueAbilityOptions.d.ts @@ -15,7 +15,7 @@ /** * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export interface ContinueAbilityOptions { @@ -24,7 +24,7 @@ export interface ContinueAbilityOptions { * * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ deviceId: string; @@ -35,7 +35,7 @@ export interface ContinueAbilityOptions { * * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ reversible?: boolean; diff --git a/api/ability/dataAbilityHelper.d.ts b/api/ability/dataAbilityHelper.d.ts index f1cf3feefb..f1bf139a73 100644 --- a/api/ability/dataAbilityHelper.d.ts +++ b/api/ability/dataAbilityHelper.d.ts @@ -22,7 +22,7 @@ import rdb from '../@ohos.data.rdb'; /** * DataAbilityHelper - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * * @since 7 * @FAModelOnly @@ -32,7 +32,7 @@ export interface DataAbilityHelper { * Opens a file in a specified remote path. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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 @@ -49,7 +49,7 @@ export interface DataAbilityHelper { * Registers an observer to observe data specified by the given uri. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param type dataChange. * @param uri Indicates the path of the data to operate. * @param callback Indicates the callback when dataChange. @@ -62,7 +62,7 @@ export interface DataAbilityHelper { * Deregisters an observer used for monitoring data specified by the given uri. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param type dataChange. * @param uri Indicates the path of the data to operate. * @param callback Indicates the registered callback. @@ -75,7 +75,7 @@ export interface DataAbilityHelper { * Obtains the MIME type of the date specified by the given URI. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the data to operate. * @return Returns the MIME type that matches the data specified by uri. * @FAModelOnly @@ -87,7 +87,7 @@ export interface DataAbilityHelper { * Obtains the MIME types of files supported. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -100,7 +100,7 @@ export interface DataAbilityHelper { * Converts the given uri that refers to the Data ability into a normalized uri. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri object to normalize. * @return Returns the normalized uri object if the Data ability supports URI normalization or null. * @FAModelOnly @@ -112,7 +112,7 @@ export interface DataAbilityHelper { * Converts the given normalized uri generated by normalizeUri(uri) into a denormalized one. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri object to normalize. * @return Returns the denormalized uri object if the denormalization is successful. * @FAModelOnly @@ -124,7 +124,7 @@ export interface DataAbilityHelper { * Notifies the registered observers of a change to the data resource specified by uri. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the data to operate. * @return - * @FAModelOnly @@ -136,7 +136,7 @@ export interface DataAbilityHelper { * Inserts a single data record into the database. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -149,7 +149,7 @@ export interface DataAbilityHelper { * Inserts multiple data records into the database. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -162,7 +162,7 @@ export interface DataAbilityHelper { * Deletes one or more data records from the database. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -175,7 +175,7 @@ export interface DataAbilityHelper { * Updates data records in the database. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of data to update. * @param valuesBucket Indicates the data to update. * @param predicates Indicates filter criteria. You should define the processing logic when this parameter is null. @@ -189,7 +189,7 @@ export interface DataAbilityHelper { * Queries data in the database. * * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of data to query. * @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. diff --git a/api/ability/dataAbilityOperation.d.ts b/api/ability/dataAbilityOperation.d.ts index 4d961357d1..8b8a1ca9c8 100644 --- a/api/ability/dataAbilityOperation.d.ts +++ b/api/ability/dataAbilityOperation.d.ts @@ -19,7 +19,7 @@ import rdb from '../@ohos.data.rdb'; /** * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @permission N/A */ export interface DataAbilityOperation { @@ -27,7 +27,7 @@ export interface DataAbilityOperation { * Indicates the path of data to operate. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ uri: string; @@ -36,7 +36,7 @@ export interface DataAbilityOperation { * Indicates a operation type. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ type: featureAbility.DataAbilityOperationType; @@ -45,7 +45,7 @@ export interface DataAbilityOperation { * Indicates the data values to be set. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ valuesBucket?: rdb.ValuesBucket; @@ -54,7 +54,7 @@ export interface DataAbilityOperation { * Indicates the valuesBucket object containing a set of key-value pairs. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ valueBackReferences?: rdb.ValuesBucket; @@ -64,7 +64,7 @@ export interface DataAbilityOperation { * will be operated by default. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ predicates?: dataAbility.DataAbilityPredicates; @@ -73,7 +73,7 @@ export interface DataAbilityOperation { * Indicates the back reference to be used as a filter criterion in predicates. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ predicatesBackReferences?: Map; @@ -82,7 +82,7 @@ export interface DataAbilityOperation { * Specifies whether a batch operation can be interrupted. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ interrupted?: boolean; @@ -91,7 +91,7 @@ export interface DataAbilityOperation { * Indicates the expected number of rows to update or delete. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ expectedCount?: number; diff --git a/api/ability/dataAbilityResult.d.ts b/api/ability/dataAbilityResult.d.ts index e7c53bc8f7..4b6600d682 100644 --- a/api/ability/dataAbilityResult.d.ts +++ b/api/ability/dataAbilityResult.d.ts @@ -16,7 +16,7 @@ /** * @name DataAbilityResult * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @permission N/A */ export interface DataAbilityResult { @@ -24,7 +24,7 @@ export interface DataAbilityResult { * Indicates the path of data to operate. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ uri?: string; @@ -33,7 +33,7 @@ export interface DataAbilityResult { * Indicates the number of rows affected by the operation. * @default - * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ count?:number; diff --git a/api/ability/startAbilityParameter.d.ts b/api/ability/startAbilityParameter.d.ts index 7ad38ddddd..29a635d29c 100644 --- a/api/ability/startAbilityParameter.d.ts +++ b/api/ability/startAbilityParameter.d.ts @@ -16,7 +16,7 @@ import { Want } from './want'; /** * @since 3 - * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @permission N/A */ export interface StartAbilityParameter { @@ -25,7 +25,7 @@ export interface StartAbilityParameter { * * @default - * @since 3 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ want: Want; @@ -35,7 +35,7 @@ export interface StartAbilityParameter { * * @default - * @since 3 - * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ abilityStartSetting?: {[key: string]: any}; diff --git a/api/ability/want.d.ts b/api/ability/want.d.ts index f6c264684f..40bfe433ae 100644 --- a/api/ability/want.d.ts +++ b/api/ability/want.d.ts @@ -17,7 +17,7 @@ * Want is the basic communication component of the system. * @name Want * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ export declare interface Want { @@ -25,7 +25,7 @@ export declare interface Want { * device id * @default - * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ deviceId?: string; @@ -33,7 +33,7 @@ export declare interface Want { * bundle name * @default - * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ bundleName?: string; @@ -41,14 +41,14 @@ export declare interface Want { * ability name * @default - * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase */ abilityName?: string; /** * The description of a URI in a Want. * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ uri?: string; @@ -56,7 +56,7 @@ export declare interface Want { /** * The description of the type in this Want. * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ type?: string; @@ -64,7 +64,7 @@ export declare interface Want { /** * The options of the flags in this Want. * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ flags?: number; @@ -72,7 +72,7 @@ export declare interface Want { /** * The description of an action in an want. * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ action?: string; @@ -80,7 +80,7 @@ export declare interface Want { /** * The description of the WantParams object in an Want * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ parameters?: {[key: string]: any}; @@ -88,7 +88,7 @@ export declare interface Want { /** * The description of a entities in a Want. * @since 6 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ entities?: Array; @@ -96,7 +96,7 @@ export declare interface Want { /** * The description of a extension ability name in a Want. * @since 9 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ extensionAbilityName?: string; @@ -104,7 +104,7 @@ export declare interface Want { /** * The description of a extension ability type in a Want. * @since 9 - * @sysCap SystemCapability.Ability.AbilityBase + * @syscap SystemCapability.Ability.AbilityBase * @default - */ extensionAbilityType?: number; diff --git a/api/app/abilityMissionInfo.d.ts b/api/app/abilityMissionInfo.d.ts index 19c7870cd4..082993e896 100644 --- a/api/app/abilityMissionInfo.d.ts +++ b/api/app/abilityMissionInfo.d.ts @@ -18,7 +18,7 @@ import { ElementName } from '../bundle/elementName'; /** * @name Mission information corresponding to ability * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import AbilityMissionInfo from 'app/abilityMissionInfo' * @permission N/A */ @@ -26,7 +26,7 @@ export interface AbilityMissionInfo { /** * @default Unique identification of task stack information corresponding to ability * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ missionId: number; @@ -34,7 +34,7 @@ export interface AbilityMissionInfo { * @default The component launched as the first ability in the task stack * This can be considered the "application" of this task stack * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ bottomAbility: ElementName; @@ -42,14 +42,14 @@ export interface AbilityMissionInfo { * @default The ability component at the top of the history stack of the task * This is what the user is currently doing * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ topAbility: ElementName; /** * @default The corresponding ability description information in the task stack * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ windowMode: number; } diff --git a/api/app/activeProcessInfo.d.ts b/api/app/activeProcessInfo.d.ts index 68571a2d49..72ac4eb1bb 100644 --- a/api/app/activeProcessInfo.d.ts +++ b/api/app/activeProcessInfo.d.ts @@ -16,7 +16,7 @@ /** * @name This class saves process information about an application * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import app from 'app/activeProcessInfo' * @permission N/A */ @@ -24,28 +24,28 @@ export interface ActiveProcessInfo { /** * @default process id * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ pid: number; /** * @default user id * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ uid: number; /** * @default the name of the process * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ processName: string; /** * @default an array of the bundleNames running in the process * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ bundleNames: Array; } diff --git a/api/app/context.d.ts b/api/app/context.d.ts index 6bdb28af61..06097c18c9 100644 --- a/api/app/context.d.ts +++ b/api/app/context.d.ts @@ -25,7 +25,7 @@ import BaseContext from '../application/BaseContext'; * Can only be obtained through the ability. * * @since 6 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import abilityManager from 'app/context' * @permission N/A * @FAModelOnly @@ -39,7 +39,7 @@ export interface Context extends BaseContext { * the ability; if in the context of the application, return the * root dir of the application. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return the root dir * @FAModelOnly */ @@ -54,7 +54,7 @@ export interface Context extends BaseContext { * @note Pid and uid are optional. If you do not pass in pid and uid, * it will check your own permission. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return asynchronous callback with {@code 0} if the PID * and UID have the permission; callback with {@code -1} otherwise. * @FAModelOnly @@ -68,7 +68,7 @@ export interface Context extends BaseContext { * @param permissions Indicates the list of permissions to be requested. This parameter cannot be null. * @param requestCode Indicates the request code to be passed to the PermissionRequestResult * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ requestPermissionsFromUser(permissions: Array, requestCode: number, resultCallback: AsyncCallback): void; @@ -76,7 +76,7 @@ export interface Context extends BaseContext { /** * Obtains information about the current application. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ getApplicationInfo(callback: AsyncCallback): void @@ -85,7 +85,7 @@ export interface Context extends BaseContext { /** * Obtains the bundle name of the current ability. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ getBundleName(callback: AsyncCallback): void @@ -94,7 +94,7 @@ export interface Context extends BaseContext { /** * Obtains information about the current process, including the process ID and name. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ getProcessInfo(callback: AsyncCallback): void @@ -103,7 +103,7 @@ export interface Context extends BaseContext { /** * Obtains the ohos.bundle.ElementName object of the current ability. This method is available only to Page abilities. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ getElementName(callback: AsyncCallback): void @@ -112,7 +112,7 @@ export interface Context extends BaseContext { /** * Obtains the name of the current process. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ getProcessName(callback: AsyncCallback): void @@ -121,7 +121,7 @@ export interface Context extends BaseContext { /** * Obtains the bundle name of the ability that called the current ability. * @since 7 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ getCallingBundle(callback: AsyncCallback): void @@ -131,7 +131,7 @@ export interface Context extends BaseContext { /** * @name the result of requestPermissionsFromUser with asynchronous callback * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @FAModelOnly */ @@ -139,7 +139,7 @@ interface PermissionRequestResult { /** * @default The request code passed in by the user * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ requestCode: number; @@ -147,7 +147,7 @@ interface PermissionRequestResult { /** * @default The permissions passed in by the user * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ permissions: Array; @@ -155,7 +155,7 @@ interface PermissionRequestResult { /** * @default The results for the corresponding request permissions * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ authResults: Array; @@ -164,7 +164,7 @@ interface PermissionRequestResult { /** * @name PermissionOptions * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @FAModelOnly */ @@ -172,7 +172,7 @@ interface PermissionOptions { /** * @default The process id * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ pid?: number; @@ -180,7 +180,7 @@ interface PermissionOptions { /** * @default The user id * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @FAModelOnly */ uid?: number; diff --git a/api/app/processInfo.d.ts b/api/app/processInfo.d.ts index cd25a592d8..1074141503 100644 --- a/api/app/processInfo.d.ts +++ b/api/app/processInfo.d.ts @@ -16,7 +16,7 @@ /** * @name This class saves process information about an application * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @import import ProcessInfo from 'app/processInfo' * @permission N/A */ @@ -26,7 +26,7 @@ export interface ProcessInfo { * * @default - * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ pid: number; @@ -35,7 +35,7 @@ export interface ProcessInfo { * * @default - * @since 7 - * @SysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ processName: string; } \ No newline at end of file diff --git a/api/application/AbilityRunningInfo.d.ts b/api/application/AbilityRunningInfo.d.ts index 41bff388ce..243f1b4827 100644 --- a/api/application/AbilityRunningInfo.d.ts +++ b/api/application/AbilityRunningInfo.d.ts @@ -20,49 +20,49 @@ import abilityManager from '../@ohos.application.abilityManager'; * The class of an ability running information. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export interface AbilityRunningInfo { /** * @default ability element name * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ ability: ElementName; /** * @default process id * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ pid: number; /** * @default user id * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ uid: number; - + /** * @default the name of the process * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ processName: string; /** * @default ability start time * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ startTime: number; /** * @default Enumerates state of the ability state info * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ abilityState: abilityManager.AbilityState; } \ No newline at end of file diff --git a/api/application/AbilityStateData.d.ts b/api/application/AbilityStateData.d.ts index 653d556b05..0f32059761 100644 --- a/api/application/AbilityStateData.d.ts +++ b/api/application/AbilityStateData.d.ts @@ -17,7 +17,7 @@ * The ability or extension state data. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @permission N/A */ @@ -26,7 +26,7 @@ export default class AbilityStateData { * The bundle name. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ bundleName: string; @@ -35,7 +35,7 @@ export default class AbilityStateData { * The ability name. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ abilityName: string; @@ -44,7 +44,7 @@ export default class AbilityStateData { * The pid. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ pid: number; @@ -53,7 +53,7 @@ export default class AbilityStateData { * The uid. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ uid: number; @@ -62,7 +62,7 @@ export default class AbilityStateData { * The application state. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ state: number; @@ -70,9 +70,8 @@ export default class AbilityStateData { /** * The ability type, page or service and so on. * - * @devices phone, tablet, tv, wearable, car * @since 8 - * @sysCap appexecfwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ abilityType: number; diff --git a/api/application/AppStateData.d.ts b/api/application/AppStateData.d.ts index 62ae586ba6..753f38cc35 100644 --- a/api/application/AppStateData.d.ts +++ b/api/application/AppStateData.d.ts @@ -17,7 +17,7 @@ * The application state data. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @permission N/A */ @@ -26,7 +26,7 @@ export default class AppStateData { * The bundle name. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ bundleName: string; @@ -35,7 +35,7 @@ export default class AppStateData { * The uid. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ uid: number; @@ -44,7 +44,7 @@ export default class AppStateData { * The application state. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ state: number; diff --git a/api/application/ApplicationStateObserver.d.ts b/api/application/ApplicationStateObserver.d.ts index 5ce1e00ba5..96341bd8a3 100644 --- a/api/application/ApplicationStateObserver.d.ts +++ b/api/application/ApplicationStateObserver.d.ts @@ -21,7 +21,7 @@ import ProcessData from "./ProcessData"; * The application state observer. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @permission N/A */ @@ -30,7 +30,7 @@ export default class ApplicationStateObserver { * Will be called when foreground or background application changed. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param appStateData State changed Application info. * @systemapi hide for inner use. * @return - @@ -41,7 +41,7 @@ export default class ApplicationStateObserver { * Will be called when ability state changed. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param abilityStateData State changed ability info. * @systemapi hide for inner use. * @return - @@ -52,7 +52,7 @@ export default class ApplicationStateObserver { * Will be called when process created. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param processData Process info. * @systemapi hide for inner use. * @return - @@ -63,7 +63,7 @@ export default class ApplicationStateObserver { * Will be called when process died. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param processData Process info. * @systemapi hide for inner use. * @return - diff --git a/api/application/BaseContext.d.ts b/api/application/BaseContext.d.ts index 7b63cc832d..50ab781d4c 100644 --- a/api/application/BaseContext.d.ts +++ b/api/application/BaseContext.d.ts @@ -18,7 +18,7 @@ * 'application.Context' for Stage Mode. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export default interface BaseContext { @@ -26,7 +26,7 @@ export default interface BaseContext { * Indicates the context is FA Mode or Stage Mode. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ stageMode: boolean; } \ No newline at end of file diff --git a/api/application/Context.d.ts b/api/application/Context.d.ts index e8678b4327..73e7f73e2f 100755 --- a/api/application/Context.d.ts +++ b/api/application/Context.d.ts @@ -23,7 +23,7 @@ import EventHub from "./EventHub"; * application-specific resources. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @StageModelOnly */ @@ -32,7 +32,7 @@ export default class Context extends BaseContext { * Indicates the capability of accessing application resources. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ resourceManager: resmgr.ResourceManager; @@ -41,7 +41,7 @@ export default class Context extends BaseContext { * Indicates configuration information about an application. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ applicationInfo: ApplicationInfo; @@ -50,7 +50,7 @@ export default class Context extends BaseContext { * Indicates app cache dir. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ cacheDir: string; @@ -59,7 +59,7 @@ export default class Context extends BaseContext { * Indicates app temp dir. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ tempDir: string; @@ -68,7 +68,7 @@ export default class Context extends BaseContext { * Indicates app files dir. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ filesDir : string; @@ -77,7 +77,7 @@ export default class Context extends BaseContext { * Indicates app database dir. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ databaseDir : string; @@ -86,7 +86,7 @@ export default class Context extends BaseContext { * Indicates app storage dir. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ storageDir : string; @@ -95,7 +95,7 @@ export default class Context extends BaseContext { * Indicates app bundle code dir. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ bundleCodeDir : string; @@ -104,7 +104,7 @@ export default class Context extends BaseContext { * Indicates app distributed files dir. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ distributedFilesDir: string; @@ -113,7 +113,7 @@ export default class Context extends BaseContext { * Indicates event hub. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ eventHub: EventHub; @@ -122,7 +122,7 @@ export default class Context extends BaseContext { * Create a bundle context * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @param bundleName Indicates the bundle name. * @return application context @@ -134,7 +134,7 @@ export default class Context extends BaseContext { * Get application context * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return application context * @StageModelOnly */ @@ -144,7 +144,7 @@ export default class Context extends BaseContext { * Switch file area * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param mode file area. * @StageModelOnly */ diff --git a/api/application/EventHub.d.ts b/api/application/EventHub.d.ts index 8c198ce678..cbc9cbdc8b 100644 --- a/api/application/EventHub.d.ts +++ b/api/application/EventHub.d.ts @@ -17,8 +17,7 @@ * The event center of a context, support the subscription and publication of events. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @StageModelOnly */ @@ -26,9 +25,8 @@ export default class EventHub { /** * Subscribe to an event. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param event Indicates the event. * @param callback Indicates the callback. * @return - @@ -39,9 +37,8 @@ export default class EventHub { /** * Unsubscribe from an event. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param event Indicates the event. * @param callback Indicates the callback. * @return - @@ -52,9 +49,8 @@ export default class EventHub { /** * Trigger the event callbacks. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param event Indicates the event. * @param args Indicates the callback arguments. * @return - diff --git a/api/application/ExtAbilityContext.d.ts b/api/application/ExtAbilityContext.d.ts index c8cccfb6b2..36ddd06d4d 100644 --- a/api/application/ExtAbilityContext.d.ts +++ b/api/application/ExtAbilityContext.d.ts @@ -20,8 +20,7 @@ import Context from "./Context"; * The context of an extension. It allows access to extension-specific resources. * * @since 9 - * @sysCap AAFwk - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @StageModelOnly */ @@ -31,7 +30,7 @@ export default class ExtAbilityContext extends Context { * Indicates configuration information about an module. * * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly */ currentHapModuleInfo: HapModuleInfo; diff --git a/api/application/ExtensionRunningInfo.d.ts b/api/application/ExtensionRunningInfo.d.ts index 17cd0bd6e7..21b196d364 100644 --- a/api/application/ExtensionRunningInfo.d.ts +++ b/api/application/ExtensionRunningInfo.d.ts @@ -20,56 +20,56 @@ import bundle from '../@ohos.bundle'; * The class of an extension running information. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A */ export interface ExtensionRunningInfo { /** * @default Indicates the extension of the extension info * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ extension: ElementName; /** * @default process id * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ pid: number; /** * @default user id * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ uid: number; /** * @default the name of the process * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ processName: string; /** * @default ability start time * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ startTime: number; /** * @default All package names under the current process * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ clientPackage: Array; /** * @default Enumerates types of the entension info * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core */ type: bundle.ExtensionAbilityType; } \ No newline at end of file diff --git a/api/application/FormExtensionContext.d.ts b/api/application/FormExtensionContext.d.ts index dd2d16bc81..c3bd85bdb2 100644 --- a/api/application/FormExtensionContext.d.ts +++ b/api/application/FormExtensionContext.d.ts @@ -22,7 +22,7 @@ import formBindingData from '../@ohos.application.formBindingData'; * formExtension-specific resources. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission N/A * @StageModelOnly */ @@ -34,7 +34,7 @@ export default class FormExtensionContext extends ExtensionContext { *

You can use this method to update the given form

* * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Core + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @permission ohos.permission.REQUIRE_FORM. * @param formId Indicates the given form. * @param formBindingData Indicates the form data. diff --git a/api/application/MissionInfo.d.ts b/api/application/MissionInfo.d.ts index 0b2a3e92a1..5233bce35e 100644 --- a/api/application/MissionInfo.d.ts +++ b/api/application/MissionInfo.d.ts @@ -19,8 +19,7 @@ import Want from "../@ohos.application.Want"; * Mission information corresponding to ability. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @permission N/A * @systemapi hide for inner use. */ @@ -29,7 +28,7 @@ export interface MissionInfo { * Indicates mission id. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ missionId: number; @@ -37,7 +36,7 @@ export interface MissionInfo { * Indicates running state. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ runningState: number; @@ -45,7 +44,7 @@ export interface MissionInfo { * Indicates locked state. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ lockedState: boolean; @@ -53,7 +52,7 @@ export interface MissionInfo { * Indicates the recent create or update time of the mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ timestamp: string; @@ -61,7 +60,7 @@ export interface MissionInfo { * Indicates want of the mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ want: Want; @@ -69,7 +68,7 @@ export interface MissionInfo { * Indicates label of the mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ label: string; @@ -77,7 +76,7 @@ export interface MissionInfo { * Indicates icon path of the mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ iconPath: string; @@ -85,7 +84,7 @@ export interface MissionInfo { * Indicates whether the mision is continuable. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ continuable: boolean; } \ No newline at end of file diff --git a/api/application/MissionListener.d.ts b/api/application/MissionListener.d.ts index d9f36505f5..12bd9e64bd 100644 --- a/api/application/MissionListener.d.ts +++ b/api/application/MissionListener.d.ts @@ -18,7 +18,7 @@ * * @name MissionListener * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @permission N/A * @systemapi hide for inner use. */ @@ -27,7 +27,7 @@ * Called by system when mission created. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ onMissionCreated(mission: number): void; @@ -36,7 +36,7 @@ * Called by system when mission destroyed. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ onMissionDestroyed(mission: number): void; @@ -45,7 +45,7 @@ * Called by system when mission shapshot changed. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ onMissionSnapshotChanged(mission: number): void; @@ -54,7 +54,7 @@ * Called by system when mission moved to fornt. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @return - */ onMissionMovedToFront(mission: number): void; diff --git a/api/application/MissionSnapshot.d.ts b/api/application/MissionSnapshot.d.ts index d7b85a300f..3fa0dd0587 100644 --- a/api/application/MissionSnapshot.d.ts +++ b/api/application/MissionSnapshot.d.ts @@ -20,7 +20,7 @@ import { image } from '../@ohos.multimedia.image'; * Mission snapshot corresponding to mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @permission N/A * @systemapi hide for inner use. */ @@ -29,7 +29,7 @@ export interface MissionSnapshot { * Indicates the ability elementName of the mission. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ ability: ElementName; @@ -37,7 +37,7 @@ export interface MissionSnapshot { * Indicates mission snapshot. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ snapshot: image.PixelMap; } \ No newline at end of file diff --git a/api/application/PermissionRequestResult.d.ts b/api/application/PermissionRequestResult.d.ts index 6c44ea461f..bd84e1f626 100755 --- a/api/application/PermissionRequestResult.d.ts +++ b/api/application/PermissionRequestResult.d.ts @@ -17,7 +17,7 @@ * The result of requestPermissionsFromUser with asynchronous callback. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @permission N/A * @StageModelOnly */ @@ -26,7 +26,7 @@ export default class PermissionRequestResult { * The permissions passed in by the user. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @StageModelOnly */ permissions: Array; @@ -36,7 +36,7 @@ export default class PermissionRequestResult { * permission is granted, and the value -1 indicates not. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @StageModelOnly */ authResults: Array; diff --git a/api/application/ProcessData.d.ts b/api/application/ProcessData.d.ts index 3bd2427106..8be5e311ef 100644 --- a/api/application/ProcessData.d.ts +++ b/api/application/ProcessData.d.ts @@ -17,7 +17,7 @@ * The process data. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi hide for inner use. * @permission N/A */ @@ -26,7 +26,7 @@ export default class ProcessData { * The bundle name. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi hide for inner use. */ bundleName: string; @@ -35,7 +35,7 @@ export default class ProcessData { * The pid. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi hide for inner use. */ pid: number; @@ -44,7 +44,7 @@ export default class ProcessData { * The uid. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi hide for inner use. */ uid: number; diff --git a/api/application/ProcessRunningInfo.d.ts b/api/application/ProcessRunningInfo.d.ts index 9349cb9135..ba19a3b55b 100644 --- a/api/application/ProcessRunningInfo.d.ts +++ b/api/application/ProcessRunningInfo.d.ts @@ -17,35 +17,35 @@ * The class of an process running information. * * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @permission N/A */ export interface ProcessRunningInfo { /** * @default process id * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ pid: number; /** * @default user id * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ uid: number; - + /** * @default the name of the process * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ processName: string; - + /** * @default an array of the bundleNames running in the process * @since 8 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ bundleNames: Array; } \ No newline at end of file diff --git a/api/application/ServiceExtAbilityContext.d.ts b/api/application/ServiceExtAbilityContext.d.ts index 6ffe342387..f10e58fc9a 100644 --- a/api/application/ServiceExtAbilityContext.d.ts +++ b/api/application/ServiceExtAbilityContext.d.ts @@ -24,8 +24,7 @@ import StartOptions from "../@ohos.application.StartOptions"; * serviceExtension-specific resources. * * @since 9 - * @sysCap AAFwk - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @permission N/A * @StageModelOnly @@ -34,9 +33,8 @@ export default class ServiceExtAbilityContext extends ExtAbilityContext { /** * Service extension uses this method to start a specific ability. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param parameter Indicates the ability to start. * @systemapi hide for inner use. * @return - @@ -49,9 +47,8 @@ export default class ServiceExtAbilityContext extends ExtAbilityContext { /** * Service extension uses this method to start a specific ability with account. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param parameter Indicates the ability to start. * @param parameter Indicates the accountId to start. * @systemapi hide for inner use. @@ -65,9 +62,8 @@ export default class ServiceExtAbilityContext extends ExtAbilityContext { /** * Destroys this service extension. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -82,9 +78,8 @@ export default class ServiceExtAbilityContext extends ExtAbilityContext { * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target * service extension when the Service extension is connected.

* - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param request Indicates the service extension to connect. * @systemapi hide for inner use. * @return connection id, int value. @@ -99,9 +94,8 @@ export default class ServiceExtAbilityContext extends ExtAbilityContext { * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target * service extension when the Service extension is connected.

* - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param request Indicates the service extension to connect. * @param request Indicates the account to connect. * @systemapi hide for inner use. @@ -114,9 +108,8 @@ export default class ServiceExtAbilityContext extends ExtAbilityContext { * Disconnects an ability to a service extension, in contrast to * {@link connectAbility}. * - * @devices phone, tablet, tv, wearable, car * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param connection the connection id returned from connectAbility api. * @systemapi hide for inner use. * @return - diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index ce5e61f065..d07171a1fd 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -25,7 +25,7 @@ import { ExtensionAbilityInfo } from "../bundle/extensionAbilityInfo"; * serviceExtension-specific resources. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi hide for inner use. * @permission N/A * @StageModelOnly @@ -35,7 +35,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * Service extension information. * * @since 9 - * @sysCap AAFwk + * @syscap SystemCapability.Ability.AbilityRuntime.Mission */ extensionAbilityInfo: ExtensionAbilityInfo; @@ -43,7 +43,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * Service extension uses this method to start a specific ability. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @param parameter Indicates the ability to start. * @systemapi hide for inner use. * @return - @@ -57,7 +57,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * Service extension uses this method to start a specific ability with account. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @param parameter Indicates the ability to start. * @param parameter Indicates the accountId to start. * @systemapi hide for inner use. @@ -72,7 +72,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * Destroys this service extension. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -88,7 +88,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * service extension when the Service extension is connected.

* * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @param request Indicates the service extension to connect. * @systemapi hide for inner use. * @return connection id, int value. @@ -104,7 +104,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * service extension when the Service extension is connected.

* * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @param request Indicates the service extension to connect. * @param request Indicates the account to connect. * @systemapi hide for inner use. @@ -118,7 +118,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * {@link connectAbility}. * * @since 9 - * @sysCap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @param connection the connection id returned from connectAbility api. * @systemapi hide for inner use. * @return - -- Gitee From a3ec17f945feb70c95cea805da23e1800899f0cf Mon Sep 17 00:00:00 2001 From: clevercong Date: Tue, 1 Mar 2022 20:20:03 +0800 Subject: [PATCH 059/163] add since Signed-off-by: clevercong --- api/@ohos.telephony.call.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index d1e4486775..96816be1f7 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -43,6 +43,7 @@ declare namespace call { * * @param phoneNumber Indicates the called number. * @syscap SystemCapability.Applications.Contacts + * @since 7 */ function makeCall(phoneNumber: string, callback: AsyncCallback): void; function makeCall(phoneNumber: string): Promise; -- Gitee From 5dfb2760f3b02d6ea12218956db5f2fec2d22465 Mon Sep 17 00:00:00 2001 From: "https://gitee.com/WALL_EYE" Date: Tue, 1 Mar 2022 21:36:34 +0800 Subject: [PATCH 060/163] API8 need AuthType Signed-off-by: https://gitee.com/WALL_EYE Change-Id: I8565a78b084a8a23efd38504e9c929ec0933d7e4 --- api/@ohos.userIAM.userAuth.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.userIAM.userAuth.d.ts b/api/@ohos.userIAM.userAuth.d.ts index faf424d0e5..8a6e196087 100644 --- a/api/@ohos.userIAM.userAuth.d.ts +++ b/api/@ohos.userIAM.userAuth.d.ts @@ -92,7 +92,6 @@ declare namespace userAuth { /** * Auth types - * @deprecated since 8 */ type AuthType = "ALL" | "FACE_ONLY"; -- Gitee From 897a8659f4fe5a6b26ff08b17d2324b09545761f Mon Sep 17 00:00:00 2001 From: zhangbingce Date: Wed, 2 Mar 2022 02:10:59 +0800 Subject: [PATCH 061/163] getXComponentContext of xcomponent Signed-off-by: zhangbingce Change-Id: I1f16eb6ea97eb5d76380ed7b0e1d2282dc5cad0a --- api/@internal/component/ets/xcomponent.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 9cbc7cb1cd..ef19b96d11 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -32,6 +32,13 @@ declare class XComponentController { * @systemapi */ getXComponentSurfaceId(); + + /** + * get the context of native XComponent. + * @since 8 + * @systemapi + */ + getXComponentContext(); } /** -- Gitee From 80c20685e5a4c70696c78de6ec465c4c307bb334 Mon Sep 17 00:00:00 2001 From: l00438547 Date: Tue, 1 Mar 2022 22:22:03 +0800 Subject: [PATCH 062/163] add js api for nfc tag and hce Signed-off-by: l00438547 --- api/@ohos.nfc.cardEmulation.js | 105 +++++++++++++++++++++++++ api/@ohos.nfc.controller.js | 116 +++++++++++++++++++++++++++ api/@ohos.nfc.tag.js | 118 ++++++++++++++++++++++++++++ api/tag/nfctech.js | 139 +++++++++++++++++++++++++++++++++ api/tag/tagSession.js | 132 +++++++++++++++++++++++++++++++ 5 files changed, 610 insertions(+) create mode 100755 api/@ohos.nfc.cardEmulation.js create mode 100755 api/@ohos.nfc.controller.js create mode 100755 api/@ohos.nfc.tag.js create mode 100755 api/tag/nfctech.js create mode 100755 api/tag/tagSession.js diff --git a/api/@ohos.nfc.cardEmulation.js b/api/@ohos.nfc.cardEmulation.js new file mode 100755 index 0000000000..505b362654 --- /dev/null +++ b/api/@ohos.nfc.cardEmulation.js @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Provides methods to operate or manage NFC card emulation. + * + * @import import cardEmulation from '@ohos.nfc.cardEmulation'; + * + * @since 6 + * @syscap SystemCapability.Communication.NFC.Core + */ +declare namespace cardEmulation { + enum Featuretype { + /** This constant is used to check whether HCE card emulation is supported. */ + HCE = 0, + + /** This constant is used to check whether SIM card emulation is supported. */ + UICC = 1, + + /** This constant is used to check whether eSE card emulation is supported. */ + ESE = 2, + } + + /** + * Checks whether a specified type of card emulation is supported. + * + *

This method is used to check Whether the host or secure element supports card emulation. + * + * @param feature Indicates the card emulation type, {@code HCE}, {@code UICC}, or {@code ESE}. + * @return Returns {@code true} if the specified type of card emulation is supported; returns + * {@code false} otherwise. + * + * @since 6 + */ + function isSupported(feature: number):boolean; + + /** + * A class for NFC host application. + * + *

The NFC host application use this class, then Nfc service can access the application + * installation information and connect to services of the application. + * + * @since 8 + * @syscap SystemCapability.Communication.NFC.Core + */ + export class HceService { + /** + * start HCE + * + * @return Returns {@code true} if HCE is enabled or has been enabled; returns {@code false} otherwise. + * @permission ohos.permission.NFC_CARD_EMULATION + * + * @since 8 + */ + startHCE(aidList: string[]): boolean; + + /** + * stop HCE + * + * @return Returns {@code true} if HCE is disabled or has been disabled; returns {@code false} otherwise. + * @permission ohos.permission.NFC_CARD_EMULATION + * + * @since 8 + */ + stopHCE(): boolean; + + + /** + * register HCE event to receive the APDU data. + * + * @param type the type to register. + * @param callback Callback used to listen for HCE data device received. + * @permission ohos.permission.NFC_CARD_EMULATION + * + * @since 8 + */ + + on(type: "hceCmd", callback: AsyncCallback): void; + + /** + * Sends a response APDU to the remote device. + * + *

This method is used by a host application when swiping card. + * + * @param responseApdu Indicates the response, which is a byte array. + * @permission ohos.permission.NFC_CARD_EMULATION + * + * @since 8 + */ + sendResponse(responseApdu: number[]): void; + } +} +export default cardEmulation; diff --git a/api/@ohos.nfc.controller.js b/api/@ohos.nfc.controller.js new file mode 100755 index 0000000000..35c767cb74 --- /dev/null +++ b/api/@ohos.nfc.controller.js @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Callback } from './basic'; + +/** + * Provides methods to operate or manage NFC. + * + * @import import controller from '@ohos.nfc.controller'; + * + * @since 7 + * @syscap SystemCapability.Communication.NFC.Core + */ +declare namespace nfcController { + enum NfcState { + /** Indicates that NFC is disabled. */ + STATE_OFF = 1, + + /** Indicates that NFC is being enabled. */ + STATE_TURNING_ON = 2, + + /** Indicates that NFC is enabled. */ + STATE_ON = 3, + + /** Indicates that NFC is being disabled. */ + STATE_TURNING_OFF = 4, + } + + /** + * Checks whether a device supports NFC. + * + * @return Returns {@code true} if the device supports NFC; returns {@code false} otherwise. + * + * @since 7 + */ + function isNfcAvailable(): boolean + + /** + * register nfc state changed event. + * + * @param type the type to register. + * @param callback Callback used to listen for the nfc state changed event. + * + * @since 7 + */ + + function on(type: "nfcStateChange", callback: Callback): void + + /** + * unregister nfc state changed event. + * + * @param type the type to unregister. + * @param callback Callback used to listen for the nfc state changed event. + * + * @since 7 + */ + + function off(type: "nfcStateChange", callback?: Callback): void + + /** + * Enables NFC. + * + * @return Returns {@code true} if NFC is enabled or has been enabled; returns {@code false} otherwise. + * @permission ohos.permission.MANAGE_SECURE_SETTINGS + * + * @since 7 + */ + function openNfc(): boolean + + /** + * Disables NFC. + * + * @return Returns {@code true} if NFC is disabled or has been disabled; returns {@code false} otherwise. + * @permission ohos.permission.MANAGE_SECURE_SETTINGS + * + * @since 7 + */ + function closeNfc(): boolean + + /** + * Checks whether NFC is enabled. + * + * @return Returns {@code true} if NFC is enabled; returns {@code false} otherwise. + * + * @since 7 + */ + function isNfcOpen(): boolean + + /** + * Obtains the NFC status. + * + *

The NFC status can be any of the following:

  • {@link #STATE_OFF}: Indicates that NFC + * is disabled.
  • {@link #STATE_TURNING_ON}: Indicates that NFC is being enabled. + *
  • {@link #STATE_ON}: Indicates that NFC is enabled.
  • {@link #STATE_TURNING_OFF}: Indicates + * that NFC is being disabled.
+ * + * @return Returns the NFC status. + * + * @since 7 + */ + function getNfcState(): boolean +} + +export default nfcController; \ No newline at end of file diff --git a/api/@ohos.nfc.tag.js b/api/@ohos.nfc.tag.js new file mode 100755 index 0000000000..78ec3e6702 --- /dev/null +++ b/api/@ohos.nfc.tag.js @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { NfcATag, NfcBTag, NfcFTag, NfcVTag } from './tag/nfctech'; + +/** + * Provides methods to operate or manage NFC tag. + * + * @import import tag from '@ohos.nfc.tag'; + * + * @since 7 + * @sysCap SystemCapability.Communication.NFC.Core + */ +declare namespace tag { + /** Indicates an NFC-A tag. */ + const NFC_A = 1; + + /** Indicates an NFC-B tag. */ + const NFC_B = 2; + + /** Indicates an ISO-DEP tag. */ + const ISO_DEP = 3; + + /** Indicates an NFC-F tag. */ + const NFC_F = 4; + + /** Indicates an NFC-V tag. */ + const NFC_V = 5; + + /** Indicated an NDEF tag. */ + const NDEF = 6; + + /** Indicates a MifareClassic tag. */ + const MIFARE_CLASSIC = 8; + + /** Indicates a MifareUltralight tag. */ + const MIFARE_ULTRALIGHT = 9; + + /** + * Obtains an {@code NfcATag} object based on the tag information. + * + *

During tag reading, if the tag supports the NFC-A technology, an {@code NfcATag} object + * will be created based on the tag information. + * + * @param tagInfo Indicates the tag information. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + function getNfcATag(tagInfo: TagInfo): NfcATag + + /** + * Obtains an {@code NfcBTag} object based on the tag information. + * + *

During tag reading, if the tag supports the NFC-B technology, an {@code NfcBTag} object + * will be created based on the tag information. + * + * @param tagInfo Indicates the tag information. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + function getNfcBTag(tagInfo: TagInfo): NfcBTag + + /** + * Obtains an {@code NfcFTag} object based on the tag information. + * + *

During tag reading, if the tag supports the NFC-F technology, an {@code NfcFTag} object + * will be created based on the tag information. + * + * @param tagInfo Indicates the tag information. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + function getNfcFTag(tagInfo: TagInfo): NfcFTag + + /** + * Obtains an {@code NfcVTag} object based on the tag information. + * + *

During tag reading, if the tag supports the NFC-V technology, an {@code NfcVTag} object + * will be created based on the tag information. + * + * @param tagInfo Indicates the tag information. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + function getNfcVTag(tagInfo: TagInfo): NfcVTag + + + /** + * Provides tag information. + * + *

This class provides the technology a tag supports, for example, NFC-A. Applications can create + * different tags based on the supported technology. + * + * @since 7 + * @syscap SystemCapability.Communication.NFC.Core + * @permission ohos.permission.NFC_TAG + */ + export interface TagInfo { + supportedProfiles: number[]; + } +} +export default tag; \ No newline at end of file diff --git a/api/tag/nfctech.js b/api/tag/nfctech.js new file mode 100755 index 0000000000..fbcc5f2897 --- /dev/null +++ b/api/tag/nfctech.js @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TagSession } form './tagSession'; + +/** + * Provides interfaces to control the read and write of tags that support the NFC-A technology. + * + *

This class is inherited from the {@link TagSession} abstract class, and provides methods to create + * {@code NfcATag} objects and obtain the ATQA and SAK. + * + * @since 7 + * @syscap SystemCapability.Communication.NFC.Core + */ +export interface NfcATag extends TagSession{ + /** + * Obtains the SAK of an NFC-A tag. + * + * @return Returns the SAK of the NFC-A tag. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getSak():number; + + /** + * Obtains the ATQA of an NFC-A tag. + * + * @return Returns the ATQA of the NFC-A tag. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getAtqa():number[]; +} + +/** + * Provides interfaces to create an {@code NfcBTag} and perform I/O operations on the tag. + * + *

This class inherits from the {@link TagSession} abstract class and provides interfaces to create an + * {@code NfcBTag} and obtain the tag information. + * + * @since 7 + * @syscap SystemCapability.Communication.NFC.Core + */ +export interface NfcBTag extends TagSession{ + /** + * Obtains the application data of a tag. + * + * @return Returns the application data of the tag. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getRespAppData():number[]; + + /** + * Obtains the protocol information of a tag. + * + * @return Returns the protocol information of the tag. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getRespProtocol():number[]; +} + +/** + * Provides methods for creating an NFC-F tag, obtaining tag information, and controlling tag read and write. + * + *

This class inherits from the {@link TagSession} abstract class and provides interfaces to create an + * {@code NfcFTag} and obtain the tag information. + * + * @since 7 + * @syscap SystemCapability.Communication.NFC.Core + */ +export interface NfcFTag extends TagSession{ + /** + * Obtains the system code from this {@code NfcFTag} instance. + * + * @return Returns the system code. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getSystemCode():number[]; + + /** + * Obtains the PMm (consisting of the IC code and manufacturer parameters) from this {@code NfcFTag} instance. + * + * @return Returns the PMm. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getPmm():number[]; +} + +/** + * Provides methods for creating an NFC-V tag, obtaining tag information, and controlling tag read and write. + * + *

This class inherits from the {@link TagSession} abstract class and provides interfaces to create an + * {@code NfcVTag} and obtain the tag information. + * + * @since 7 + * @syscap SystemCapability.Communication.NFC.Core + */ +export interface NfcVTag extends TagSession{ + /** + * Obtains the response flags from this {@code NfcVTag} instance. + * + * @return Returns the response flags. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getResponseFlags():number; + + /** + * Obtains the data storage format identifier (DSFID) from this {@code NfcVTag} instance. + * + * @return Returns the DSFID. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getDsfId():number; +} diff --git a/api/tag/tagSession.js b/api/tag/tagSession.js new file mode 100755 index 0000000000..c50deecbf2 --- /dev/null +++ b/api/tag/tagSession.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import tag from '../ohos.nfc.tag'; +import { AsyncCallback } form './basic'; + +/** + * Controls tag read and write. + * + *

Classes for different types of tags inherit from this abstract class to control connections to + * tags, read data from tags, and write data to tags. + * + * @since 7 + * @syscap SystemCapability.Communication.NFC.Core + */ +export interface TagSession { + /** + * Obtains the tag information. + * + * @return Returns the tag information, which is a {@link TagInfo} object. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getTagInfo(): tag.TagInfo; + + /** + * Connects to a tag. + * + *

This method must be called before data is read from or written to the tag. + * + * @return Returns {@code true} if the connection is set up; returns {@code false} otherwise. + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + connectTag(): boolean; + + /** + * Resets a connection with a tag and restores the default timeout duration for writing data to the tag. + * + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + reset(): void; + + /** + * Checks whether a connection has been set up with a tag. + * + * @return Returns {@code true} if a connection has been set up with the tag; + * returns {@code false} otherwise. + * + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + isTagConnected(); boolean; + + /** + * Sets the timeout duration (ms) for sending data to a tag. + * + *

If data is not sent to the tag within the duration, data sending fails. + * + * @param timeout Indicates the timeout duration to be set. + * @return Returns {@code true} if the setting is successful; returns {@code false} otherwise. + * + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + setSendDataTimeout(timeout: number): boolean; + + /** + * Queries the timeout duration (ms) for sending data to a tag. + * + * @return Returns the timeout duration. + * + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getSendDataTimeout(): number; + + /** + * Writes data to a tag. + * + * @param data Indicates the data to be written to the tag. + * @return Returns bytes received in response. Or bytes with a length of 0 if the + * data fails to be written to the tag. + * + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + sendData(data: number[]): Promise; + + /** + * Writes data to a tag. + * + * @param data Indicates the data to be written to the tag. + * @return Returns bytes received in response. Or bytes with a length of 0 if the + * data fails to be written to the tag. + * + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + sendData(data: number[], callback: AsyncCallback): void; + + /** + * Queries the maximum length of data that can be sent to a tag. + * + * @return Returns the maximum length of the data to be sent to the tag. + * + * @permission ohos.permission.NFC_TAG + * + * @since 7 + */ + getMaxSendLength(): number; +} \ No newline at end of file -- Gitee From 7f17adcece7a35ebea1551d0b0be3511c3a4cee5 Mon Sep 17 00:00:00 2001 From: sunyaozu Date: Wed, 2 Mar 2022 10:19:16 +0800 Subject: [PATCH 063/163] fix sysCap error Signed-off-by: sunyaozu --- api/@ohos.i18n.d.ts | 132 ++++++++++++++++++++++---------------------- api/@ohos.intl.d.ts | 86 ++++++++++++++--------------- 2 files changed, 109 insertions(+), 109 deletions(-) diff --git a/api/@ohos.i18n.d.ts b/api/@ohos.i18n.d.ts index cec6042811..b8dc57ffdc 100644 --- a/api/@ohos.i18n.d.ts +++ b/api/@ohos.i18n.d.ts @@ -16,14 +16,14 @@ /** * Provides international settings related APIs. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 7 */ declare namespace i18n { /** * Obtains the country or region name localized for display on a given locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param country The locale whose country or region name will be displayed. * @param locale The locale used to display the country or region. * @param sentenceCase Specifies whether the country or region name is displayed in sentence case. @@ -35,7 +35,7 @@ export function getDisplayCountry(country: string, locale: string, sentenceCase? /** * Obtains the language name localized for display on a given locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The locale whose language name will be displayed. * @param locale The locale used to display the language. * @param sentenceCase Specifies whether the language name is displayed in sentence case. @@ -47,7 +47,7 @@ export function getDisplayLanguage(language: string, locale: string, sentenceCas /** * Obtain all languages supported by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns all languages supported by the system. * @since 7 * @systemapi Hide this for inner system use. @@ -57,7 +57,7 @@ export function getSystemLanguages(): Array; /** * Obtain all regions supported by the system in the language. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The language used to get the list of regions. * @return Returns all regions supported by the system in the language. * @since 7 @@ -68,7 +68,7 @@ export function getSystemCountries(language: string): Array; /** * Determine whether the current language or region is recommended. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The language code. * @param region The region code. * @return Returns whether the current language or region is recommended. @@ -80,7 +80,7 @@ export function isSuggested(language: string, region?: string): boolean; /** * Obtain the language currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the language currently used by the system. * @since 7 */ @@ -89,7 +89,7 @@ export function getSystemLanguage(): string; /** * Set the language currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The language to be used. * @since 7 * @systemapi Hide this for inner system use. @@ -99,7 +99,7 @@ export function setSystemLanguage(language: string): boolean; /** * Obtain the region currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the region currently used by the system. * @since 7 */ @@ -108,7 +108,7 @@ export function getSystemRegion(): string; /** * Set the region currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param region The region to be used. * @since 7 * @systemapi Hide this for inner system use. @@ -118,7 +118,7 @@ export function setSystemRegion(region: string): boolean; /** * Obtain the locale currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the locale currently used by the system. * @since 7 */ @@ -127,7 +127,7 @@ export function getSystemLocale(): string; /** * Set the locale currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale to be used. * @since 7 * @systemapi Hide this for inner system use. @@ -137,14 +137,14 @@ export function setSystemLocale(locale: string): boolean; /** * Provides util functions. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface Util { /** * Convert from unit to to unit and format according to the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param fromUnit Information of the unit to be converted. * @param toUnit Information about the unit to be converted to. * @param value Indicates the number to be formatted. @@ -158,7 +158,7 @@ export interface Util { /** * Provides the options of unit. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface UnitInfo { @@ -176,7 +176,7 @@ export interface UnitInfo { /** * Provides the options of PhoneNumberFormat. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface PhoneNumberFormatOptions { @@ -189,14 +189,14 @@ export interface PhoneNumberFormatOptions { /** * Provides the API for formatting phone number strings * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class PhoneNumberFormat { /** * A constructor used to create a PhoneNumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param country Indicates a character string containing the country information for the PhoneNumberFormat object. * @param type Indicates the type used to format the phone number, includes: "E164", "RFC3966", "INTERNATIONAL", "NATIONAL". * @since 8 @@ -206,7 +206,7 @@ export class PhoneNumberFormat { /** * Judges whether phone number is valid. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param number Indicates the input phone number to be judged. * @return Returns a boolean indicates whether the input phone number is valid. * @since 8 @@ -216,7 +216,7 @@ export class PhoneNumberFormat { /** * Obtains the formatted phone number strings of number. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param number Indicates the input phone number to be formatted. * @return Returns the formatted phone number. * @since 8 @@ -227,7 +227,7 @@ export class PhoneNumberFormat { /** * Get a Calendar instance specified by locale and type. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale used to get calendar. * @param type If type is not specified, get locale's default Calendar, else get the specified type of Calendar. * such as buddhist, chinese, coptic, ethiopic, hebrew, gregory, indian, islamic_civil, islamic_tbla, islamic_umalqura, @@ -240,7 +240,7 @@ export class Calendar { /** * set the date. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param date Date object used to set the time and date. * @since 8 */ @@ -249,7 +249,7 @@ export class Calendar { /** * set the time. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param time Indicates the elapsed milliseconds from 1970.1.1 00:00:00 GMT. * @since 8 */ @@ -258,7 +258,7 @@ export class Calendar { /** * Set the time * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param year The year field of the calendar, ranges from 0 to 9999. * @param month The month field of the calendar, ranges from 0 to 11. * @param date The day field of the calendar, ranges from 1 to 31. @@ -272,7 +272,7 @@ export class Calendar { /** * Set the timezone of this calendar. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param timezone The id of a timezone. * @since 8 */ @@ -281,7 +281,7 @@ export class Calendar { /** * Get the timezone id of this calendar instance. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the timezone id of this calendar. * @since 8 */ @@ -290,7 +290,7 @@ export class Calendar { /** * Get the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns start day of a week. * @since 8 */ @@ -299,7 +299,7 @@ export class Calendar { /** * Set the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value Indicates the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * @since 8 */ @@ -308,7 +308,7 @@ export class Calendar { /** * Get the minimal days of a week, which is needed for the first day of a year. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the minimal days of a week. * @since 8 */ @@ -317,7 +317,7 @@ export class Calendar { /** * Set the minimal days of a week, which is needed for the first week of a year. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value The value to be set. * @since 8 */ @@ -326,7 +326,7 @@ export class Calendar { /** * Get the associated value with the field. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param field Field values such as era, year, month, week_of_year, week_of_month, date, day_of_year, day_of_week * day_of_week_in_month, hour, hour_of_day, minute, second, millisecond, zone_offset, dst_offset, year_woy, * dow_local, extended_year, julian_day, milliseconds_in_day, is_leap_month. @@ -338,7 +338,7 @@ export class Calendar { /** * Get calendar's name localized for display in the given locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Locale used to get the localized name for this calendar. * @return Returns the localized name of this calendar. * @since 8 @@ -349,7 +349,7 @@ export class Calendar { * Returns true if the given date is a weekend day. If the date is not given, * the date object of this calendar is used. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param date Date object whose attribute is desired. * @return Returns whether the date is a weekend day. * @since 8 @@ -360,7 +360,7 @@ export class Calendar { /** * Judge whether the locale is RTL locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale to be used. * @return Returns true representing the locale is an RTL locale * @@ -371,7 +371,7 @@ export function isRTL(locale: string): boolean; /** * Obtains a BreakIterator object for finding the location of break point in text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale the returned BreakIterator will adapt the rule, specified by the locale, to break text. * @return Returns a newly constructed BreakIterator object. * @since 8 @@ -381,14 +381,14 @@ export function isRTL(locale: string): boolean; /** * The BreakIterator class is used for finding the location of break point in text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class BreakIterator { /** * Obtains the current position of the BreakIterator instance. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the current position of the BreakIterator instance. * @since 8 */ @@ -398,7 +398,7 @@ export class BreakIterator { * Set the BreakIterator's position to the first break point, the first break point is always the beginning of the * processed text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the first break point. * @since 8 */ @@ -408,7 +408,7 @@ export class BreakIterator { * Set the BreakIterator's position to the last break point. the last break point is always the index beyond the * last character of the processed text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the last break point. * @since 8 */ @@ -417,7 +417,7 @@ export class BreakIterator { /** * Set the BreakItertor's position to the nth break point from the current break point. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param index indicates the number of break points to advance. If index is not given, n is treated as 1. * @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @since 8 @@ -427,7 +427,7 @@ export class BreakIterator { /** * Set the BreakItertor's position to the break point preceding the current break point. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @since 8 */ @@ -436,7 +436,7 @@ export class BreakIterator { /** * Set the text to be processed. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param text Indicates the text to be processed by the BreakIterator. * @since 8 */ @@ -445,7 +445,7 @@ export class BreakIterator { /** * Set the BreakIterator's position to the first break point following the specified offset. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @since 8 */ @@ -454,7 +454,7 @@ export class BreakIterator { /** * Obtains the text being processed. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the text that is processed by the BreakIterator. * @since 8 */ @@ -465,7 +465,7 @@ export class BreakIterator { * position will be set to the position indicated by the offset if it returns true, otherwise the BreakIterator * will be moved to the break point following the offset. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param offset The offset to be checked. * @return Returns true if the offset is a break point. * @since 8 @@ -477,14 +477,14 @@ export class BreakIterator { * Sequence text can be grouped under the specified area, * and grouping index with different lengths can be specified. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class IndexUtil { /** * Get IndexUtil object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the NumberFormat object. * @return Returns IndexUtil object. @@ -495,7 +495,7 @@ export class IndexUtil { /** * Get a list of labels for use as a UI index * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a list of labels * @since 8 */ @@ -504,7 +504,7 @@ export class IndexUtil { /** * Add the index characters from a Locale to the index. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale whose index characters are to be added. * @since 8 */ @@ -513,7 +513,7 @@ export class IndexUtil { /** * Get corresponding index of the input text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param text input text * @since 8 */ @@ -523,14 +523,14 @@ export class IndexUtil { /** * Provides the API for accessing unicode character properties, sunch as whether a character is a digit. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class Character { /** * Determines whether the specified code point is a digit character * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a digit character */ @@ -539,7 +539,7 @@ export class Character { /** * Determines if the specified character is a space character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a space character */ @@ -548,7 +548,7 @@ export class Character { /** * Determines if the specified character is a whitespace character * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a whitespace character */ @@ -557,7 +557,7 @@ export class Character { /** * Determines if the specified character is a RTL character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a RTL character */ @@ -566,7 +566,7 @@ export class Character { /** * Determines if the specified character is a Ideographic character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a Ideographic character */ @@ -575,7 +575,7 @@ export class Character { /** * Determines if the specified character is a Letter or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a Letter */ @@ -584,7 +584,7 @@ export class Character { /** * Determines if the specified character is a LowerCase character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a LowerCase character */ @@ -593,7 +593,7 @@ export class Character { /** * Determines if the specified character is a UpperCase character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a UpperCase character */ @@ -602,7 +602,7 @@ export class Character { /** * Get the general category value of the specified character. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns the general category of the specified character. */ @@ -612,7 +612,7 @@ export class Character { /** * check out whether system is 24-hour system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a boolean represent whether system is 24-hour system. * @since 8 */ @@ -621,7 +621,7 @@ export class Character { /** * set 24-hour system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param option represent the boolean to be set. * @return Returns a boolean represent whether setting 24-hour system success. * @since 8 @@ -631,7 +631,7 @@ export class Character { /** * Add one language to preferred language List. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language the language to be added. * @param index the position of preferred language list to be inserted. * @return Returns a boolean represent whether language added success. @@ -642,7 +642,7 @@ export function addPreferredLanguage(language: string, index?: number): boolean; /** * Remove one language from preferred language list. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param index the position of removed language in preferred language list. * @return Returns a boolean represent whether removed success. * @since 8 @@ -652,7 +652,7 @@ export function removePreferredLanguage(index: number): boolean; /** * Access the system preferred language list. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a string Array represent the preferred language list. * @since 8 */ @@ -661,7 +661,7 @@ export function getPreferredLanguageList(): Array; /** * Get the first preferred language of system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a string represent the first preferred language of system. * @since 8 */ diff --git a/api/@ohos.intl.d.ts b/api/@ohos.intl.d.ts index 070d0614a1..5bf8f664ee 100755 --- a/api/@ohos.intl.d.ts +++ b/api/@ohos.intl.d.ts @@ -16,7 +16,7 @@ /** * Provides internationalization related APIs. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ declare namespace intl { @@ -24,7 +24,7 @@ declare namespace intl { * Provides the options of Locale. * * @since 8 - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export interface LocaleOptions { /** @@ -73,14 +73,14 @@ export interface LocaleOptions { /** * Provides APIs for obtaining locale information. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ export class Locale { /** * A constructor used to create a Locale object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region. * @since 6 @@ -90,7 +90,7 @@ export class Locale { /** * Indicates the language of the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ language: string @@ -98,7 +98,7 @@ export class Locale { /** * Indicates the script of the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ script: string @@ -106,7 +106,7 @@ export class Locale { /** * Indicates the region of the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ region: string @@ -115,7 +115,7 @@ export class Locale { * Indicates the basic locale information, which is returned as a substring of * a complete locale string. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ baseName: string @@ -153,7 +153,7 @@ export class Locale { /** * Convert the locale information to string. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns locale information in string form. */ toString(): string; @@ -161,7 +161,7 @@ export class Locale { /** * Maximize the locale's base information. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns maximized locale. */ maximize(): Locale; @@ -169,7 +169,7 @@ export class Locale { /** * Minimize the locale's base information. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns minimized locale. */ minimize(): Locale; @@ -178,7 +178,7 @@ export class Locale { /** * Provides the options of date time format. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export interface DateTimeOptions { /** @@ -280,14 +280,14 @@ export interface DateTimeOptions { /** * Provides the API for formatting date strings. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ export class DateTimeFormat { /** * A constructor used to create a DateTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -295,7 +295,7 @@ export class DateTimeFormat { /** * A constructor used to create a DateTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates character string containing the locale information, including * the language and optionally the script and region, for the DateTimeFormat object. * @param options Indicates the options used to format the date. @@ -306,7 +306,7 @@ export class DateTimeFormat { /** * Obtains the formatted date strings. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param date Indicates the Date object to be formatted. * @return Returns a date string formatted based on the specified locale. * @since 6 @@ -316,7 +316,7 @@ export class DateTimeFormat { /** * Obtains the formatted date strings of a date range. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param startDate Indicates the start date of the date range. * @param endDate Indicates the end date of the date range. * @return Returns a date string formatted based on the specified locale. @@ -327,7 +327,7 @@ export class DateTimeFormat { /** * Obtains the options of the DateTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the options of the DateTimeFormat object. * @since 6 */ @@ -337,7 +337,7 @@ export class DateTimeFormat { /** * Provides the options of number format. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export interface NumberOptions { /** @@ -439,13 +439,13 @@ export interface NumberOptions { /** * Provides the API for formatting number strings. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export class NumberFormat { /** * A constructor used to create a NumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -453,7 +453,7 @@ export class NumberFormat { /** * A constructor used to create a NumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the NumberFormat object. * @param options Indicates the options used to format the number. @@ -464,7 +464,7 @@ export class NumberFormat { /** * Obtains the formatted number string. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param number Indicates the number to be formatted. * @return Returns a number string formatted based on the specified locale. * @since 6 @@ -474,7 +474,7 @@ export class NumberFormat { /** * Obtains the options of the NumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the options of the NumberFormat object. * @since 6 */ @@ -484,7 +484,7 @@ export class NumberFormat { /** * Provides the options of Collator * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface CollatorOptions { @@ -533,21 +533,21 @@ export interface CollatorOptions { /** * Enable language-sensitive string comparison. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class Collator { /** * A constructor used to create Collator object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); /** * A constructor used to create Collator Object; * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the Collator object. * @param options Indicates the options used to initialize Collator object. @@ -558,7 +558,7 @@ export class Collator { /** * compares two strings according to the sort order of this Collator object * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param first The first string to compare. * @param second The second string to compare. * @return Returns a number indicating how first compare to second: @@ -573,7 +573,7 @@ export class Collator { * Returns a new object with properties reflecting the locale and collation options computed * during initialization of the object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a CollatorOptions object reflecting the properties of this object. * @since 8 */ @@ -583,7 +583,7 @@ export class Collator { /** * Provides the options of PluralRules * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface PluralRulesOptions { @@ -633,14 +633,14 @@ export interface PluralRulesOptions { /** * Enables plural-sensitive formatting and plural-related language rules. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class PluralRules { /** * A constructor used to create PluralRules object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -648,7 +648,7 @@ export class PluralRules { /** * A constructor used to create PluralRules object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the PluralRules object. * @param options Indicates the options used to initialize PluralRules object. @@ -659,7 +659,7 @@ export class PluralRules { /** * Returns a string indicating which plural rule to use for locale-aware formatting. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param n The number to get a plural rule for. * @return A string representing the pluralization category of the number, * can be one of zero, one, two, few, many or other. @@ -671,7 +671,7 @@ export class PluralRules { /** * Provides the input options of RelativeTimeFormat. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface RelativeTimeFormatInputOptions { @@ -697,7 +697,7 @@ export class PluralRules { /** * Provides the resolved options of RelativeTimeFormat. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface RelativeTimeFormatResolvedOptions { @@ -728,14 +728,14 @@ export interface RelativeTimeFormatResolvedOptions { * Given a Time period length value and a unit, RelativeTimeFormat object enables * language-sensitive relative time formatting. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class RelativeTimeFormat { /** * A constructor used to create RelativeTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -743,7 +743,7 @@ export class RelativeTimeFormat { /** * A constructor used to create RelativeTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the RelativeTimeFormat object. * @param options Indicates the options used to initialize RelativeTimeFormat object. @@ -754,7 +754,7 @@ export class RelativeTimeFormat { /** * formats a value and unit according to the locale and formatting options of this object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value Numeric value to use in the internationalized relative time message. * @param unit Unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. @@ -767,7 +767,7 @@ export class RelativeTimeFormat { * returns an Array of objects representing the relative time format in parts that can be used for * custom locale-aware formatting * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value Numeric value to use in the internationalized relative time message. * @param unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. @@ -780,7 +780,7 @@ export class RelativeTimeFormat { * Returns a new object with properties reflecting the locale and formatting options computed during * initialization of the object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @returns RelativeTimeFormatOptions which reflecting the locale and formatting options of the object. * @since 8 */ -- Gitee From 4f55b7c7d6b61c4ce849f393470d07a83e42de23 Mon Sep 17 00:00:00 2001 From: x00405909 Date: Wed, 2 Mar 2022 10:19:56 +0800 Subject: [PATCH 064/163] =?UTF-8?q?syscap=20=E6=94=B9=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: x00405909 Change-Id: I56891fcba44d730c51398d851bc23b2510b7fbab --- api/@ohos.deviceInfo.d.ts | 2 +- api/@ohos.systemparameter.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.deviceInfo.d.ts b/api/@ohos.deviceInfo.d.ts index 18cca63174..8e91729a90 100644 --- a/api/@ohos.deviceInfo.d.ts +++ b/api/@ohos.deviceInfo.d.ts @@ -17,7 +17,7 @@ * A static class pertaining to the product information. * * @since 6 - * @Syscap SystemCapability.Startup.SysInfo + * @syscap SystemCapability.Startup.SysInfo */ declare namespace deviceInfo { /** diff --git a/api/@ohos.systemparameter.d.ts b/api/@ohos.systemparameter.d.ts index 57a2906095..1e20358fa7 100644 --- a/api/@ohos.systemparameter.d.ts +++ b/api/@ohos.systemparameter.d.ts @@ -19,7 +19,7 @@ import { AsyncCallback, BusinessError } from './basic'; * The interface of system parameters class. * * @since 6 - * @Syscap SystemCapability.Startup.SysInfo + * @syscap SystemCapability.Startup.SysInfo * @hide */ declare namespace systemParameter { -- Gitee From e7de43efb44f169c9b2661a45b917e4b91b45b42 Mon Sep 17 00:00:00 2001 From: PaDaBoo Date: Wed, 2 Mar 2022 10:45:21 +0800 Subject: [PATCH 065/163] =?UTF-8?q?=E4=BF=AE=E6=94=B9storage=E5=92=8Cprefe?= =?UTF-8?q?rences=E6=8E=A5=E5=8F=A3=E7=89=88=E6=9C=AC=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: PaDaBoo --- api/@ohos.data.preferences.d.ts | 32 ++++++++++++++--------------- api/@ohos.data.storage.d.ts | 36 ++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index c575537103..000599ed5d 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -19,9 +19,9 @@ import Context from "./application/Context"; * Provides interfaces to obtain and modify preferences data. * * @name preferences - * @since 8 + * @since 9 * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * + * */ declare namespace preferences { /** @@ -34,7 +34,7 @@ declare namespace preferences { * @param name Indicates the preferences file name. * @return Returns the {@link Preferences} instance matching the specified preferences file name. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ function getPreferences(context: Context, name: string, callback: AsyncCallback): void; function getPreferences(context: Context, name: string): Promise; @@ -51,7 +51,7 @@ declare namespace preferences { * @param context Indicates the context of application or capability. * @param name Indicates the preferences file name. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ function deletePreferences(context: Context, name: string, callback: AsyncCallback): void; function deletePreferences(context: Context, name: string): Promise; @@ -67,7 +67,7 @@ declare namespace preferences { * @param context Indicates the context of application or capability. * @param name Indicates the preferences file name. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback): void; function removePreferencesFromCache(context: Context, name: string): Promise; @@ -81,8 +81,8 @@ declare namespace preferences { * to remove the {@link Preferences} instance from the memory. * * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * - * @since 8 + * + * @since 9 */ interface Preferences { /** @@ -94,7 +94,7 @@ declare namespace preferences { * @param defValue Indicates the default value to return. * @return Returns the value matching the specified key if it is found; returns the default value otherwise. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ get(key: string, defValue: ValueType, callback: AsyncCallback): void; get(key: string, defValue: ValueType): Promise; @@ -106,7 +106,7 @@ declare namespace preferences { * @return Returns {@code true} if the {@link Preferences} object contains a preferences with the specified key; * returns {@code false} otherwise. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ has(key: string, callback: AsyncCallback): boolean; has(key: string): Promise; @@ -121,7 +121,7 @@ declare namespace preferences { * @param value Indicates the value of the preferences. * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ put(key: string, value: ValueType, callback: AsyncCallback): void; put(key: string, value: ValueType): Promise; @@ -135,7 +135,7 @@ declare namespace preferences { * @param key Indicates the key of the preferences to delete. It cannot be {@code null} or empty. * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ delete(key: string, callback: AsyncCallback): void; delete(key: string): Promise; @@ -147,7 +147,7 @@ declare namespace preferences { * file. * * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ clear(callback: AsyncCallback): void; clear(): Promise; @@ -156,7 +156,7 @@ declare namespace preferences { * Asynchronously saves the {@link Preferences} object to the file. * * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ flush(callback: AsyncCallback): void; flush(): Promise; @@ -166,7 +166,7 @@ declare namespace preferences { * * @param callback Indicates the callback when preferences changes. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ on(type: 'change', callback: Callback<{ key: string }>): void; @@ -175,7 +175,7 @@ declare namespace preferences { * * @param callback Indicates the registered callback. * @throws BusinessError if invoked failed - * @since 8 + * @since 9 */ off(type: 'change', callback: Callback<{ key: string }>): void; } @@ -196,4 +196,4 @@ declare namespace preferences { const MAX_VALUE_LENGTH: 8192; } -export default preferences; \ No newline at end of file +export default preferences; diff --git a/api/@ohos.data.storage.d.ts b/api/@ohos.data.storage.d.ts index 15c6b1b06b..3da37c191e 100644 --- a/api/@ohos.data.storage.d.ts +++ b/api/@ohos.data.storage.d.ts @@ -19,9 +19,9 @@ import { AsyncCallback, Callback } from './basic'; * * @name storage * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * + * */ declare namespace storage { /** @@ -34,7 +34,7 @@ declare namespace storage { * @return Returns the {@link Storage} instance matching the specified storage file name. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ function getStorageSync(path: string): Storage; @@ -53,7 +53,7 @@ declare namespace storage { * @param path Indicates the path of storage file * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ function deleteStorageSync(path: string): void; function deleteStorage(path: string, callback: AsyncCallback): void; @@ -70,7 +70,7 @@ declare namespace storage { * @param path Indicates the path of storage file. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ function removeStorageFromCacheSync(path: string): void; function removeStorageFromCache(path: string, callback: AsyncCallback): void; @@ -85,9 +85,9 @@ declare namespace storage { * to remove the {@link Storage} instance from the memory. * * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * + * * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ interface Storage { /** @@ -100,7 +100,7 @@ declare namespace storage { * @return Returns the value matching the specified key if it is found; returns the default value otherwise. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ getSync(key: string, defValue: ValueType): ValueType; get(key: string, defValue: ValueType, callback: AsyncCallback): void; @@ -114,7 +114,7 @@ declare namespace storage { * returns {@code false} otherwise. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ hasSync(key: string): boolean; has(key: string, callback: AsyncCallback): boolean; @@ -131,7 +131,7 @@ declare namespace storage { * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ putSync(key: string, value: ValueType): void; put(key: string, value: ValueType, callback: AsyncCallback): void; @@ -147,7 +147,7 @@ declare namespace storage { * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ deleteSync(key: string): void; delete(key: string, callback: AsyncCallback): void; @@ -161,7 +161,7 @@ declare namespace storage { * * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ clearSync(): void; clear(callback: AsyncCallback): void; @@ -172,7 +172,7 @@ declare namespace storage { * * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ flushSync(): void; flush(callback: AsyncCallback): void; @@ -184,7 +184,7 @@ declare namespace storage { * @param callback Indicates the callback when storage changes. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ on(type: 'change', callback: Callback): void; @@ -194,7 +194,7 @@ declare namespace storage { * @param callback Indicates the registered callback. * @throws BusinessError if invoked failed * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ off(type: 'change', callback: Callback): void; } @@ -208,9 +208,9 @@ declare namespace storage { * Define the change data information object. * * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * + * * @since 5 - * @deprecated since 8, please use @ohos.data.preferences instead. + * @deprecated since 9, please use @ohos.data.preferences instead. */ interface StorageObserver { /** @@ -230,4 +230,4 @@ declare namespace storage { const MAX_VALUE_LENGTH: 8192; } -export default storage; \ No newline at end of file +export default storage; -- Gitee From 37f62fc77a8c508cb92e63d42805f8508e190b70 Mon Sep 17 00:00:00 2001 From: zhangxiao72 Date: Wed, 2 Mar 2022 10:54:16 +0800 Subject: [PATCH 066/163] =?UTF-8?q?=E4=BF=AE=E6=94=B9JavaScriptProxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5408dd6293a3b00cf2a8f6e4869863e8df2ebeed Signed-off-by: zhangxiao72 --- api/@internal/component/ets/form_component.d.ts | 7 +++++++ api/@internal/component/ets/web.d.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index 1d3fa7dfdd..d2a7037831 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -132,6 +132,13 @@ declare class FormComponentAttribute extends CommonMethod void): FormComponentAttribute; + + /** + * Uninstall Card. + * @since 7 + * @systemapi + */ + onUninstall(callback: (info: { id: number }) => void): FormComponentAttribute; } declare const FormComponent: FormComponentInterface; diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index d75f2cda11..41529e68d5 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -468,7 +468,7 @@ declare class WebAttribute extends CommonMethod { * Inject the arkUI JS object into H5 and invoke the function of the object in H5. * @since 8 */ - javaScriptProxy(javaScriptProxy: { obj: object, name: string, methodList: Array }): WebAttribute; + javaScriptProxy(javaScriptProxy: { obj: object, name: string, methodList: Array, controller: WebController }): WebAttribute; /* * Sets whether the Web should save the password. -- Gitee From ace311d85369866f7d4af511dd8513390c231680 Mon Sep 17 00:00:00 2001 From: lancer <591320480@qq.com> Date: Wed, 2 Mar 2022 11:15:48 +0800 Subject: [PATCH 067/163] Description: update capability comment Feature or Bugfix: Bugfix Binary Source:No Signed-off-by: lancer --- api/liteWearable/@system.app.d.ts | 2 +- api/liteWearable/@system.router.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/liteWearable/@system.app.d.ts b/api/liteWearable/@system.app.d.ts index a25c8d9414..1da69498d0 100644 --- a/api/liteWearable/@system.app.d.ts +++ b/api/liteWearable/@system.app.d.ts @@ -60,7 +60,7 @@ export interface ScreenOnVisibleOptions { } /** - * @Syscap SysCap.ACE.UIEngineLite + * @syscap SystemCapability.ArkUI.ArkUI.Lite */ export default class App { /** diff --git a/api/liteWearable/@system.router.d.ts b/api/liteWearable/@system.router.d.ts index 6435e2e693..100ba99982 100644 --- a/api/liteWearable/@system.router.d.ts +++ b/api/liteWearable/@system.router.d.ts @@ -35,7 +35,7 @@ export interface RouterOptions { } /** - * @Syscap SysCap.ACE.UIEngineLite + * @syscap SystemCapability.ArkUI.ArkUI.Lite */ export default class Router { /** -- Gitee From 6513da04b1685c10631d12b698fa99465d16e4c4 Mon Sep 17 00:00:00 2001 From: huangke11 Date: Wed, 2 Mar 2022 11:23:43 +0800 Subject: [PATCH 068/163] modify syscap Signed-off-by: huangke11 --- api/@ohos.configPolicy.d.ts | 8 +-- api/@ohos.i18n.d.ts | 132 ++++++++++++++++++------------------ api/@ohos.intl.d.ts | 86 +++++++++++------------ 3 files changed, 113 insertions(+), 113 deletions(-) diff --git a/api/@ohos.configPolicy.d.ts b/api/@ohos.configPolicy.d.ts index 32ef672ca0..d12690c30f 100644 --- a/api/@ohos.configPolicy.d.ts +++ b/api/@ohos.configPolicy.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback} from "./basic"; * Provides file path related APIS. * * @since 8 - * @sysCap SystemCapability.Customization.ConfigPolicy + * @syscap SystemCapability.Customization.ConfigPolicy */ declare namespace configPolicy { /** @@ -27,7 +27,7 @@ declare namespace configPolicy { * * @since 8 * @systemapi Hide this for inner system use. - * @sysCap SystemCapability.Customization.ConfigPolicy + * @syscap SystemCapability.Customization.ConfigPolicy * @param relPath the relative path of the config file. * @return Returns the path of the highest priority config file. */ @@ -39,7 +39,7 @@ declare namespace configPolicy { * * @since 8 * @systemapi Hide this for inner system use. - * @sysCap SystemCapability.Customization.ConfigPolicy + * @syscap SystemCapability.Customization.ConfigPolicy * @param relPath the relative path of the config file. * @return Returns paths of config files. */ @@ -51,7 +51,7 @@ declare namespace configPolicy { * * @since 8 * @systemapi Hide this for inner system use. - * @sysCap SystemCapability.Customization.ConfigPolicy + * @syscap SystemCapability.Customization.ConfigPolicy * @return Returns paths of config directories. */ function getCfgDirList(callback: AsyncCallback>); diff --git a/api/@ohos.i18n.d.ts b/api/@ohos.i18n.d.ts index cec6042811..b8dc57ffdc 100644 --- a/api/@ohos.i18n.d.ts +++ b/api/@ohos.i18n.d.ts @@ -16,14 +16,14 @@ /** * Provides international settings related APIs. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 7 */ declare namespace i18n { /** * Obtains the country or region name localized for display on a given locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param country The locale whose country or region name will be displayed. * @param locale The locale used to display the country or region. * @param sentenceCase Specifies whether the country or region name is displayed in sentence case. @@ -35,7 +35,7 @@ export function getDisplayCountry(country: string, locale: string, sentenceCase? /** * Obtains the language name localized for display on a given locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The locale whose language name will be displayed. * @param locale The locale used to display the language. * @param sentenceCase Specifies whether the language name is displayed in sentence case. @@ -47,7 +47,7 @@ export function getDisplayLanguage(language: string, locale: string, sentenceCas /** * Obtain all languages supported by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns all languages supported by the system. * @since 7 * @systemapi Hide this for inner system use. @@ -57,7 +57,7 @@ export function getSystemLanguages(): Array; /** * Obtain all regions supported by the system in the language. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The language used to get the list of regions. * @return Returns all regions supported by the system in the language. * @since 7 @@ -68,7 +68,7 @@ export function getSystemCountries(language: string): Array; /** * Determine whether the current language or region is recommended. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The language code. * @param region The region code. * @return Returns whether the current language or region is recommended. @@ -80,7 +80,7 @@ export function isSuggested(language: string, region?: string): boolean; /** * Obtain the language currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the language currently used by the system. * @since 7 */ @@ -89,7 +89,7 @@ export function getSystemLanguage(): string; /** * Set the language currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language The language to be used. * @since 7 * @systemapi Hide this for inner system use. @@ -99,7 +99,7 @@ export function setSystemLanguage(language: string): boolean; /** * Obtain the region currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the region currently used by the system. * @since 7 */ @@ -108,7 +108,7 @@ export function getSystemRegion(): string; /** * Set the region currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param region The region to be used. * @since 7 * @systemapi Hide this for inner system use. @@ -118,7 +118,7 @@ export function setSystemRegion(region: string): boolean; /** * Obtain the locale currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the locale currently used by the system. * @since 7 */ @@ -127,7 +127,7 @@ export function getSystemLocale(): string; /** * Set the locale currently used by the system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale to be used. * @since 7 * @systemapi Hide this for inner system use. @@ -137,14 +137,14 @@ export function setSystemLocale(locale: string): boolean; /** * Provides util functions. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface Util { /** * Convert from unit to to unit and format according to the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param fromUnit Information of the unit to be converted. * @param toUnit Information about the unit to be converted to. * @param value Indicates the number to be formatted. @@ -158,7 +158,7 @@ export interface Util { /** * Provides the options of unit. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface UnitInfo { @@ -176,7 +176,7 @@ export interface UnitInfo { /** * Provides the options of PhoneNumberFormat. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface PhoneNumberFormatOptions { @@ -189,14 +189,14 @@ export interface PhoneNumberFormatOptions { /** * Provides the API for formatting phone number strings * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class PhoneNumberFormat { /** * A constructor used to create a PhoneNumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param country Indicates a character string containing the country information for the PhoneNumberFormat object. * @param type Indicates the type used to format the phone number, includes: "E164", "RFC3966", "INTERNATIONAL", "NATIONAL". * @since 8 @@ -206,7 +206,7 @@ export class PhoneNumberFormat { /** * Judges whether phone number is valid. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param number Indicates the input phone number to be judged. * @return Returns a boolean indicates whether the input phone number is valid. * @since 8 @@ -216,7 +216,7 @@ export class PhoneNumberFormat { /** * Obtains the formatted phone number strings of number. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param number Indicates the input phone number to be formatted. * @return Returns the formatted phone number. * @since 8 @@ -227,7 +227,7 @@ export class PhoneNumberFormat { /** * Get a Calendar instance specified by locale and type. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale used to get calendar. * @param type If type is not specified, get locale's default Calendar, else get the specified type of Calendar. * such as buddhist, chinese, coptic, ethiopic, hebrew, gregory, indian, islamic_civil, islamic_tbla, islamic_umalqura, @@ -240,7 +240,7 @@ export class Calendar { /** * set the date. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param date Date object used to set the time and date. * @since 8 */ @@ -249,7 +249,7 @@ export class Calendar { /** * set the time. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param time Indicates the elapsed milliseconds from 1970.1.1 00:00:00 GMT. * @since 8 */ @@ -258,7 +258,7 @@ export class Calendar { /** * Set the time * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param year The year field of the calendar, ranges from 0 to 9999. * @param month The month field of the calendar, ranges from 0 to 11. * @param date The day field of the calendar, ranges from 1 to 31. @@ -272,7 +272,7 @@ export class Calendar { /** * Set the timezone of this calendar. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param timezone The id of a timezone. * @since 8 */ @@ -281,7 +281,7 @@ export class Calendar { /** * Get the timezone id of this calendar instance. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the timezone id of this calendar. * @since 8 */ @@ -290,7 +290,7 @@ export class Calendar { /** * Get the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns start day of a week. * @since 8 */ @@ -299,7 +299,7 @@ export class Calendar { /** * Set the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value Indicates the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * @since 8 */ @@ -308,7 +308,7 @@ export class Calendar { /** * Get the minimal days of a week, which is needed for the first day of a year. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the minimal days of a week. * @since 8 */ @@ -317,7 +317,7 @@ export class Calendar { /** * Set the minimal days of a week, which is needed for the first week of a year. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value The value to be set. * @since 8 */ @@ -326,7 +326,7 @@ export class Calendar { /** * Get the associated value with the field. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param field Field values such as era, year, month, week_of_year, week_of_month, date, day_of_year, day_of_week * day_of_week_in_month, hour, hour_of_day, minute, second, millisecond, zone_offset, dst_offset, year_woy, * dow_local, extended_year, julian_day, milliseconds_in_day, is_leap_month. @@ -338,7 +338,7 @@ export class Calendar { /** * Get calendar's name localized for display in the given locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Locale used to get the localized name for this calendar. * @return Returns the localized name of this calendar. * @since 8 @@ -349,7 +349,7 @@ export class Calendar { * Returns true if the given date is a weekend day. If the date is not given, * the date object of this calendar is used. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param date Date object whose attribute is desired. * @return Returns whether the date is a weekend day. * @since 8 @@ -360,7 +360,7 @@ export class Calendar { /** * Judge whether the locale is RTL locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale to be used. * @return Returns true representing the locale is an RTL locale * @@ -371,7 +371,7 @@ export function isRTL(locale: string): boolean; /** * Obtains a BreakIterator object for finding the location of break point in text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale the returned BreakIterator will adapt the rule, specified by the locale, to break text. * @return Returns a newly constructed BreakIterator object. * @since 8 @@ -381,14 +381,14 @@ export function isRTL(locale: string): boolean; /** * The BreakIterator class is used for finding the location of break point in text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class BreakIterator { /** * Obtains the current position of the BreakIterator instance. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the current position of the BreakIterator instance. * @since 8 */ @@ -398,7 +398,7 @@ export class BreakIterator { * Set the BreakIterator's position to the first break point, the first break point is always the beginning of the * processed text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the first break point. * @since 8 */ @@ -408,7 +408,7 @@ export class BreakIterator { * Set the BreakIterator's position to the last break point. the last break point is always the index beyond the * last character of the processed text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the last break point. * @since 8 */ @@ -417,7 +417,7 @@ export class BreakIterator { /** * Set the BreakItertor's position to the nth break point from the current break point. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param index indicates the number of break points to advance. If index is not given, n is treated as 1. * @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @since 8 @@ -427,7 +427,7 @@ export class BreakIterator { /** * Set the BreakItertor's position to the break point preceding the current break point. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @since 8 */ @@ -436,7 +436,7 @@ export class BreakIterator { /** * Set the text to be processed. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param text Indicates the text to be processed by the BreakIterator. * @since 8 */ @@ -445,7 +445,7 @@ export class BreakIterator { /** * Set the BreakIterator's position to the first break point following the specified offset. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @since 8 */ @@ -454,7 +454,7 @@ export class BreakIterator { /** * Obtains the text being processed. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the text that is processed by the BreakIterator. * @since 8 */ @@ -465,7 +465,7 @@ export class BreakIterator { * position will be set to the position indicated by the offset if it returns true, otherwise the BreakIterator * will be moved to the break point following the offset. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param offset The offset to be checked. * @return Returns true if the offset is a break point. * @since 8 @@ -477,14 +477,14 @@ export class BreakIterator { * Sequence text can be grouped under the specified area, * and grouping index with different lengths can be specified. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class IndexUtil { /** * Get IndexUtil object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the NumberFormat object. * @return Returns IndexUtil object. @@ -495,7 +495,7 @@ export class IndexUtil { /** * Get a list of labels for use as a UI index * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a list of labels * @since 8 */ @@ -504,7 +504,7 @@ export class IndexUtil { /** * Add the index characters from a Locale to the index. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale The locale whose index characters are to be added. * @since 8 */ @@ -513,7 +513,7 @@ export class IndexUtil { /** * Get corresponding index of the input text. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param text input text * @since 8 */ @@ -523,14 +523,14 @@ export class IndexUtil { /** * Provides the API for accessing unicode character properties, sunch as whether a character is a digit. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class Character { /** * Determines whether the specified code point is a digit character * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a digit character */ @@ -539,7 +539,7 @@ export class Character { /** * Determines if the specified character is a space character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a space character */ @@ -548,7 +548,7 @@ export class Character { /** * Determines if the specified character is a whitespace character * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a whitespace character */ @@ -557,7 +557,7 @@ export class Character { /** * Determines if the specified character is a RTL character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a RTL character */ @@ -566,7 +566,7 @@ export class Character { /** * Determines if the specified character is a Ideographic character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a Ideographic character */ @@ -575,7 +575,7 @@ export class Character { /** * Determines if the specified character is a Letter or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a Letter */ @@ -584,7 +584,7 @@ export class Character { /** * Determines if the specified character is a LowerCase character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a LowerCase character */ @@ -593,7 +593,7 @@ export class Character { /** * Determines if the specified character is a UpperCase character or not. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns true if the character is a UpperCase character */ @@ -602,7 +602,7 @@ export class Character { /** * Get the general category value of the specified character. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param char the character to be tested * @return Returns the general category of the specified character. */ @@ -612,7 +612,7 @@ export class Character { /** * check out whether system is 24-hour system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a boolean represent whether system is 24-hour system. * @since 8 */ @@ -621,7 +621,7 @@ export class Character { /** * set 24-hour system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param option represent the boolean to be set. * @return Returns a boolean represent whether setting 24-hour system success. * @since 8 @@ -631,7 +631,7 @@ export class Character { /** * Add one language to preferred language List. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param language the language to be added. * @param index the position of preferred language list to be inserted. * @return Returns a boolean represent whether language added success. @@ -642,7 +642,7 @@ export function addPreferredLanguage(language: string, index?: number): boolean; /** * Remove one language from preferred language list. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param index the position of removed language in preferred language list. * @return Returns a boolean represent whether removed success. * @since 8 @@ -652,7 +652,7 @@ export function removePreferredLanguage(index: number): boolean; /** * Access the system preferred language list. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a string Array represent the preferred language list. * @since 8 */ @@ -661,7 +661,7 @@ export function getPreferredLanguageList(): Array; /** * Get the first preferred language of system. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a string represent the first preferred language of system. * @since 8 */ diff --git a/api/@ohos.intl.d.ts b/api/@ohos.intl.d.ts index 070d0614a1..5bf8f664ee 100755 --- a/api/@ohos.intl.d.ts +++ b/api/@ohos.intl.d.ts @@ -16,7 +16,7 @@ /** * Provides internationalization related APIs. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ declare namespace intl { @@ -24,7 +24,7 @@ declare namespace intl { * Provides the options of Locale. * * @since 8 - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export interface LocaleOptions { /** @@ -73,14 +73,14 @@ export interface LocaleOptions { /** * Provides APIs for obtaining locale information. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ export class Locale { /** * A constructor used to create a Locale object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region. * @since 6 @@ -90,7 +90,7 @@ export class Locale { /** * Indicates the language of the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ language: string @@ -98,7 +98,7 @@ export class Locale { /** * Indicates the script of the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ script: string @@ -106,7 +106,7 @@ export class Locale { /** * Indicates the region of the locale. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ region: string @@ -115,7 +115,7 @@ export class Locale { * Indicates the basic locale information, which is returned as a substring of * a complete locale string. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ baseName: string @@ -153,7 +153,7 @@ export class Locale { /** * Convert the locale information to string. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns locale information in string form. */ toString(): string; @@ -161,7 +161,7 @@ export class Locale { /** * Maximize the locale's base information. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns maximized locale. */ maximize(): Locale; @@ -169,7 +169,7 @@ export class Locale { /** * Minimize the locale's base information. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns minimized locale. */ minimize(): Locale; @@ -178,7 +178,7 @@ export class Locale { /** * Provides the options of date time format. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export interface DateTimeOptions { /** @@ -280,14 +280,14 @@ export interface DateTimeOptions { /** * Provides the API for formatting date strings. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 6 */ export class DateTimeFormat { /** * A constructor used to create a DateTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -295,7 +295,7 @@ export class DateTimeFormat { /** * A constructor used to create a DateTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates character string containing the locale information, including * the language and optionally the script and region, for the DateTimeFormat object. * @param options Indicates the options used to format the date. @@ -306,7 +306,7 @@ export class DateTimeFormat { /** * Obtains the formatted date strings. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param date Indicates the Date object to be formatted. * @return Returns a date string formatted based on the specified locale. * @since 6 @@ -316,7 +316,7 @@ export class DateTimeFormat { /** * Obtains the formatted date strings of a date range. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param startDate Indicates the start date of the date range. * @param endDate Indicates the end date of the date range. * @return Returns a date string formatted based on the specified locale. @@ -327,7 +327,7 @@ export class DateTimeFormat { /** * Obtains the options of the DateTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the options of the DateTimeFormat object. * @since 6 */ @@ -337,7 +337,7 @@ export class DateTimeFormat { /** * Provides the options of number format. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export interface NumberOptions { /** @@ -439,13 +439,13 @@ export interface NumberOptions { /** * Provides the API for formatting number strings. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n */ export class NumberFormat { /** * A constructor used to create a NumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -453,7 +453,7 @@ export class NumberFormat { /** * A constructor used to create a NumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the NumberFormat object. * @param options Indicates the options used to format the number. @@ -464,7 +464,7 @@ export class NumberFormat { /** * Obtains the formatted number string. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param number Indicates the number to be formatted. * @return Returns a number string formatted based on the specified locale. * @since 6 @@ -474,7 +474,7 @@ export class NumberFormat { /** * Obtains the options of the NumberFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns the options of the NumberFormat object. * @since 6 */ @@ -484,7 +484,7 @@ export class NumberFormat { /** * Provides the options of Collator * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface CollatorOptions { @@ -533,21 +533,21 @@ export interface CollatorOptions { /** * Enable language-sensitive string comparison. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class Collator { /** * A constructor used to create Collator object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); /** * A constructor used to create Collator Object; * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the Collator object. * @param options Indicates the options used to initialize Collator object. @@ -558,7 +558,7 @@ export class Collator { /** * compares two strings according to the sort order of this Collator object * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param first The first string to compare. * @param second The second string to compare. * @return Returns a number indicating how first compare to second: @@ -573,7 +573,7 @@ export class Collator { * Returns a new object with properties reflecting the locale and collation options computed * during initialization of the object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @return Returns a CollatorOptions object reflecting the properties of this object. * @since 8 */ @@ -583,7 +583,7 @@ export class Collator { /** * Provides the options of PluralRules * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface PluralRulesOptions { @@ -633,14 +633,14 @@ export interface PluralRulesOptions { /** * Enables plural-sensitive formatting and plural-related language rules. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class PluralRules { /** * A constructor used to create PluralRules object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -648,7 +648,7 @@ export class PluralRules { /** * A constructor used to create PluralRules object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the PluralRules object. * @param options Indicates the options used to initialize PluralRules object. @@ -659,7 +659,7 @@ export class PluralRules { /** * Returns a string indicating which plural rule to use for locale-aware formatting. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param n The number to get a plural rule for. * @return A string representing the pluralization category of the number, * can be one of zero, one, two, few, many or other. @@ -671,7 +671,7 @@ export class PluralRules { /** * Provides the input options of RelativeTimeFormat. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface RelativeTimeFormatInputOptions { @@ -697,7 +697,7 @@ export class PluralRules { /** * Provides the resolved options of RelativeTimeFormat. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export interface RelativeTimeFormatResolvedOptions { @@ -728,14 +728,14 @@ export interface RelativeTimeFormatResolvedOptions { * Given a Time period length value and a unit, RelativeTimeFormat object enables * language-sensitive relative time formatting. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ export class RelativeTimeFormat { /** * A constructor used to create RelativeTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @since 8 */ constructor(); @@ -743,7 +743,7 @@ export class RelativeTimeFormat { /** * A constructor used to create RelativeTimeFormat object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param locale Indicates a character string containing the locale information, including * the language and optionally the script and region, for the RelativeTimeFormat object. * @param options Indicates the options used to initialize RelativeTimeFormat object. @@ -754,7 +754,7 @@ export class RelativeTimeFormat { /** * formats a value and unit according to the locale and formatting options of this object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value Numeric value to use in the internationalized relative time message. * @param unit Unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. @@ -767,7 +767,7 @@ export class RelativeTimeFormat { * returns an Array of objects representing the relative time format in parts that can be used for * custom locale-aware formatting * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @param value Numeric value to use in the internationalized relative time message. * @param unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. @@ -780,7 +780,7 @@ export class RelativeTimeFormat { * Returns a new object with properties reflecting the locale and formatting options computed during * initialization of the object. * - * @sysCap SystemCapability.Global.I18n + * @syscap SystemCapability.Global.I18n * @returns RelativeTimeFormatOptions which reflecting the locale and formatting options of the object. * @since 8 */ -- Gitee From bbc20135f8245d3153ae0786b485d42ac2fdaf8f Mon Sep 17 00:00:00 2001 From: hellohyh001 Date: Wed, 2 Mar 2022 11:52:17 +0800 Subject: [PATCH 069/163] Signed-off-by:hellohyh001 Signed-off-by: hellohyh001 --- api/@system.sensor.d.ts | 878 ++++++++++++++++++++++++++++++++++++++ api/@system.vibrator.d.ts | 66 +++ 2 files changed, 944 insertions(+) create mode 100644 api/@system.sensor.d.ts create mode 100644 api/@system.vibrator.d.ts diff --git a/api/@system.sensor.d.ts b/api/@system.sensor.d.ts new file mode 100644 index 0000000000..ec89fd8622 --- /dev/null +++ b/api/@system.sensor.d.ts @@ -0,0 +1,878 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.ACCELEROMETER + * @since 3 + * @deprecated since 8 + */ +export interface AccelerometerResponse { + /** + * X-coordinate + * @since 3 + */ + x: number; + + /** + * Y-coordinate + * @since 3 + */ + y: number; + + /** + * Z-coordinate + * @since 3 + */ + z: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.ACCELEROMETER + * @since 3 + * @deprecated since 8 + */ +export interface subscribeAccelerometerOptions { + /** + * Execution frequency of the callback function for listening to acceleration sensor data. + * Available values are as follows: + * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. + * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. + * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. + * The default value is normal. + * @since 3 + */ + interval: string; + + /** + * Called when acceleration sensor data changes. + * @since 3 + */ + success: (data: AccelerometerResponse) => void; + + /** + * Called when the listening fails. + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface CompassResponse { + /** + * Direction of the device (in degrees). + * @since 3 + */ + direction: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface SubscribeCompassOptions { + /** + * Called when compass sensor data changes. + * @since 3 + */ + success: (data: CompassResponse) => void; + + /** + * Called when the listening fails. + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface ProximityResponse { + /** + * Distance between a visible object and the device screen + * @since 3 + */ + distance: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface SubscribeProximityOptions { + /** + * Called when distance sensor data changes. + * @since 3 + */ + success: (data: ProximityResponse) => void; + + /** + * Called when the listening fails. + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface LightResponse { + /** + * Light intensity, in lux. + * @since 3 + */ + intensity: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface SubscribeLightOptions { + /** + * Called when ambient light sensor data changes. + * @since 3 + */ + success: (data: LightResponse) => void; + + /** + * Called when the listening fails. + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.ACTIVITY_MOTION + * @since 3 + * @deprecated since 8 + */ +export interface StepCounterResponse { + /** + * Number of steps counted. + * Each time the device restarts, the value is recalculated from 0 in phone, tablet. + * @since 3 + */ + steps: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.ACTIVITY_MOTION + * @since 3 + * @deprecated since 8 + */ +export interface SubscribeStepCounterOptions { + /** + * Called when step counter sensor data changes. + * @since 3 + */ + success: (data: StepCounterResponse) => void; + + /** + * Called when the listening fails. + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface BarometerResponse { + /** + * Pressure, in pascal. + * @since 3 + */ + pressure: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface SubscribeBarometerOptions { + /** + * Called when the barometer sensor data changes. + * @since 3 + */ + success: (data: BarometerResponse) => void; + + /** + * Called when the listening fails. + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.READ_HEALTH_DATA + * @since 3 + * @deprecated since 8 + */ +export interface HeartRateResponse { + /** + * Heart rate. + * 255 indicates an invalid value in lite wearable. + * @since 3 + */ + heartRate: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.READ_HEALTH_DATA + * @since 3 + * @deprecated since 8 + */ +export interface SubscribeHeartRateOptions { + /** + * Called when the heart rate sensor data changes. + * @since 3 + */ + success: (data: HeartRateResponse) => void; + + /** + * Called when the listening fails + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface OnBodyStateResponse { + /** + * Whether the sensor is worn. + * @since 3 + */ + value: boolean; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface SubscribeOnBodyStateOptions { + /** + * Called when the wearing status changes. + * @since 3 + */ + success: (data: OnBodyStateResponse) => void; + + /** + * Called when the listening fails. + * @since 3 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 3 + * @deprecated since 8 + */ +export interface GetOnBodyStateOptions { + /** + * Called when the sensor wearing state is obtained + * @since 3 + */ + success: (data: OnBodyStateResponse) => void; + + /** + * Called when the sensor wearing state fails to be obtained + * @since 3 + */ + fail?: (data: string, code: number) => void; + + /** + * Called when the execution is completed + * @since 3 + */ + complete?: () => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 6 + * @deprecated since 8 + */ +export interface DeviceOrientationResponse { + /** + * alpha + * @since 6 + */ + alpha: number; + + /** + * beta + * @since 6 + */ + beta: number; + + /** + * gamma + * @since 6 + */ + gamma: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 6 + * @deprecated since 8 + */ +export interface SubscribeDeviceOrientationOptions { + /** + * Execution frequency of the callback function for listening to device orientation sensor data. + * Available values are as follows: + * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. + * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. + * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. + * The default value is normal. + * @since 6 + */ + interval: string; + + /** + * Called when device orientation sensor data changes. + * @since 6 + */ + success: (data: DeviceOrientationResponse) => void; + + /** + * Called when the listening fails. + * @since 6 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.GYROSCOPE + * @since 6 + * @deprecated since 8 + */ +export interface GyroscopeResponse { + /** + * X-coordinate + * @since 6 + */ + x: number; + + /** + * Y-coordinate + * @since 6 + */ + y: number; + + /** + * Z-coordinate + * @since 6 + */ + z: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @permission ohos.permission.GYROSCOPE + * @since 6 + * @deprecated since 8 + */ +export interface SubscribeGyroscopeOptions { + /** + * Execution frequency of the callback function for listening to gyroscope sensor data. + * Available values are as follows: + * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. + * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. + * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. + * The default value is normal. + * @since 6 + */ + interval: string; + + /** + * Called when gyroscope sensor data changes. + * @since 6 + */ + success: (data: GyroscopeResponse) => void; + + /** + * Called when the listening fails. + * @since 6 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 7 + * @deprecated since 8 + */ +export interface GravityResponse { + /** + * X-coordinate + * @since 7 + */ + x: number; + + /** + * Y-coordinate + * @since 7 + */ + y: number; + + /** + * Z-coordinate + * @since 7 + */ + z: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 7 + * @deprecated since 8 + */ +export interface SubscribeGravityOptions { + /** + * Execution frequency of the callback function for listening to gravity sensor data. + * Available values are as follows: + * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. + * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. + * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. + * The default value is normal. + * @since 7 + */ + interval: string; + + /** + * Called when gravity sensor data changes. + * @since 7 + */ + success: (data: GravityResponse) => void; + + /** + * Called when the listening fails. + * @since 7 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 7 + * @deprecated since 8 + */ +export interface MagneticResponse { + /** + * X-coordinate + * @since 7 + */ + x: number; + + /** + * Y-coordinate + * @since 7 + */ + y: number; + + /** + * Z-coordinate + * @since 7 + */ + z: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 7 + * @deprecated since 8 + */ +export interface SubscribeMagneticOptions { + /** + * Execution frequency of the callback function for listening to magnetic sensor data. + * Available values are as follows: + * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. + * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. + * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. + * The default value is normal. + * @since 7 + */ + interval: string; + + /** + * Called when magnetic sensor data changes. + * @since 7 + */ + success: (data: MagneticResponse) => void; + + /** + * Called when the listening fails. + * @since 7 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 7 + * @deprecated since 8 + */ +export interface HallResponse { + /** + * Indicates the hall sensor data. + * @since 7 + */ + value: number; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 7 + * @deprecated since 8 + */ +export interface SubscribeHallOptions { + /** + * Execution frequency of the callback function for listening to hall sensor data. + * Available values are as follows: + * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. + * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. + * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. + * The default value is normal. + * @since 7 + */ + interval: string; + + /** + * Called when hall sensor data changes. + * @since 7 + */ + success: (data: HallResponse) => void; + + /** + * Called when the listening fails. + * @since 7 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @syscap SystemCapability.Sensors.Sensor + * @import import sensor from '@system.sensor'; + * @since 7 + * @deprecated since 8 + */ +export default class Sensor { + /** + * Listens to acceleration sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACCELEROMETER + * @since 3 + * @deprecated since 8 + */ + static subscribeAccelerometer(options: subscribeAccelerometerOptions): void; + + /** + * Cancels listening to acceleration sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACCELEROMETER + * @since 3 + * @deprecated since 8 + */ + static unsubscribeAccelerometer(): void; + + /** + * Listens to compass sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static subscribeCompass(options: SubscribeCompassOptions): void; + + /** + * Cancels listening to compass sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static unsubscribeCompass(): void; + + /** + * Listens to distance sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static subscribeProximity(options: SubscribeProximityOptions): void; + + /** + * Cancels listening to distance sensor data. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static unsubscribeProximity(): void; + + /** + * Listens to ambient light sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static subscribeLight(options: SubscribeLightOptions): void; + + /** + * Cancels listening to ambient light sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static unsubscribeLight(): void; + + /** + * Listens to step counter sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACTIVITY_MOTION + * @since 3 + * @deprecated since 8 + */ + static subscribeStepCounter(options: SubscribeStepCounterOptions): void; + + /** + * Cancels listening to step counter sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACTIVITY_MOTION + * @since 3 + * @deprecated since 8 + */ + static unsubscribeStepCounter(): void; + + /** + * Listens to barometer sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static subscribeBarometer(options: SubscribeBarometerOptions): void; + + /** + * Cancels listening to barometer sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static unsubscribeBarometer(): void; + + /** + * Listens to changes of heart rate sensor data. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.READ_HEALTH_DATA + * @since 3 + * @deprecated since 8 + */ + static subscribeHeartRate(options: SubscribeHeartRateOptions): void; + + /** + * Cancels listening to heart rate sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.READ_HEALTH_DATA + * @since 3 + * @deprecated since 8 + */ + static unsubscribeHeartRate(): void; + + /** + * Listens to whether a sensor is worn. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static subscribeOnBodyState(options: SubscribeOnBodyStateOptions): void; + + /** + * Cancels listening to whether the sensor is worn. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static unsubscribeOnBodyState(): void; + + /** + * Obtains the sensor wearing state. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 3 + * @deprecated since 8 + */ + static getOnBodyState(options: GetOnBodyStateOptions): void; + + /** + * Listens to device orientation sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 6 + * @deprecated since 8 + */ + static subscribeDeviceOrientation(options: SubscribeDeviceOrientationOptions): void; + + /** + * Cancels listening to device orientation sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @since 6 + * @deprecated since 8 + */ + static unsubscribeDeviceOrientation(): void; + + /** + * Listens to gyroscope sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.GYROSCOPE + * @since 6 + * @deprecated since 8 + */ + static subscribeGyroscope(options: SubscribeGyroscopeOptions): void; + + /** + * Cancels listening to gyroscope sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.GYROSCOPE + * @since 6 + * @deprecated since 8 + */ + static unsubscribeGyroscope(): void; + + /** + * Listens to gravity sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 7 + * @deprecated since 8 + */ + static subscribeGravity(options: SubscribeGravityOptions): void; + + /** + * Cancels listening to gravity sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @since 7 + * @deprecated since 8 + */ + static unsubscribeGravity(): void; + + /** + * Listens to magnetic sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 7 + * @deprecated since 8 + */ + static subscribeMagnetic(options: SubscribeMagneticOptions): void; + + /** + * Cancels listening to magnetic sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @since 7 + * @deprecated since 8 + */ + static unsubscribeMagnetic(): void; + + /** + * Listens to hall sensor data changes. + * If this API is called multiple times, the last call takes effect. + * @param options Options. + * @syscap SystemCapability.Sensors.Sensor + * @since 7 + * @deprecated since 8 + */ + static subscribeHall(options: SubscribeHallOptions): void; + + /** + * Cancels listening to hall sensor data. + * @syscap SystemCapability.Sensors.Sensor + * @since 7 + * @deprecated since 8 + */ + static unsubscribeHall(): void; +} diff --git a/api/@system.vibrator.d.ts b/api/@system.vibrator.d.ts new file mode 100644 index 0000000000..f8fd9d1be2 --- /dev/null +++ b/api/@system.vibrator.d.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @syscap SystemCapability.Sensors.MiscDevice + * @import import vibrator from '@system.vibrator'; + * @permission ohos.permission.VIBRATE + * @since 3 + * @deprecated since 8 + */ +export interface VibrateOptions { + /** + * Vibration mode. The value long indicates long vibration, and short indicates short vibration. + * The default value is long. + * @since 3 + */ + mode?: "long" | "short"; + + /** + * Called when success to trigger vibration. + * @since 3 + */ + success: () => void; + + /** + * Called when fail to trigger vibration. + * @since 3 + */ + fail?: (data: string, code: number) => void; + + /** + * Called when the execution is completed. + * @since 3 + */ + complete?: () => void; +} + +/** + * @syscap SystemCapability.Sensors.MiscDevice + * @import import vibrator from '@system.vibrator'; + * @permission ohos.permission.VIBRATE + * @since 3 + * @deprecated since 8 + */ +export default class Vibrator { + /** + * Triggers vibration. + * @param options Options. + * @permission ohos.permission.VIBRATE + * @since 3 + * @deprecated since 8 + */ + static vibrate(options?: VibrateOptions): void; +} -- Gitee From 4f80230676e4a92f5060051e499010ec4c1a9342 Mon Sep 17 00:00:00 2001 From: wyuanchao Date: Wed, 2 Mar 2022 14:21:10 +0800 Subject: [PATCH 070/163] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20ohos.bundleState.d?= =?UTF-8?q?.ts=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wyuanchao --- api/@ohos.bundleState.d.ts | 277 +++++++++++++++++++++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 api/@ohos.bundleState.d.ts diff --git a/api/@ohos.bundleState.d.ts b/api/@ohos.bundleState.d.ts new file mode 100644 index 0000000000..9a5f353a8b --- /dev/null +++ b/api/@ohos.bundleState.d.ts @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback } from './basic'; + +/** + * Provides methods for managing bundle usage statistics, + * including the methods for querying bundle usage information and state data. + * + *

You can use the methods defined in this class to query + * the usage history and states of bundles in a specified period. + * The system stores the query result in a {@link BundleStateInfo} or {@link BundleActiveState} instance and + * then returns it to you. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + */ +declare namespace bundleState { + + /** + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + */ + interface BundleStateInfo { + /** + * the identifier of BundleStateInfo. + */ + id: number; + /** + * the total duration, in milliseconds. + */ + abilityInFgTotalTime?: number; + /** + * the last time when the application was accessed, in milliseconds. + */ + abilityPrevAccessTime?: number; + /** + * the last time when the application was visible in the foreground, in milliseconds. + */ + abilityPrevSeenTime?: number; + /** + * the total duration, in milliseconds. + */ + abilitySeenTotalTime?: number; + /** + * the bundle name of the application. + */ + bundleName?: string; + /** + * the total duration, in milliseconds. + */ + fgAbilityAccessTotalTime?: number; + /** + * the last time when the foreground application was accessed, in milliseconds. + */ + fgAbilityPrevAccessTime?: number; + /** + * the time of the first bundle usage record in this {@code BundleActiveInfo} object, + * in milliseconds. + */ + infosBeginTime?: number; + /** + * the time of the last bundle usage record in this {@code BundleActiveInfo} object, + * in milliseconds. + */ + infosEndTime?: number; + + /** + * Merges a specified {@link BundleActiveInfo} object with this {@link BundleActiveInfo} object. + * The bundle name of both objects must be the same. + * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + * @param toMerge Indicates the {@link BundleActiveInfo} object to merge. + * if the bundle names of the two {@link BundleActiveInfo} objects are different. + */ + merge(toMerge: BundleStateInfo): void; + } + + /** + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + */ + interface BundleActiveState { + /** + * the usage priority group of the application. + */ + appUsagePriorityGroup?: number; + /** + * the bundle name. + */ + bundleName?: string; + /** + * the shortcut ID. + */ + indexOfLink?: string; + /** + * the class name. + */ + nameOfClass?: string; + /** + * the time when this state occurred, in milliseconds. + */ + stateOccurredTime?: number; + /** + * the state type. + */ + stateType?: number; + } + + /** + * Checks whether the application with a specified bundle name is in the idle state. + * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + * @param bundleName Indicates the bundle name of the application to query. + * @return Returns {@code true} if the application is idle in a particular period; + * returns {@code false} otherwise. The time range of the particular period is defined by the system, + * which may be hours or days. + */ + function isIdleState(bundleName: string, callback: AsyncCallback): void; + function isIdleState(bundleName: string): Promise; + + /** + * Queries the usage priority group of the calling application. + * + *

The priority defined in a priority group restricts the resource usage of an application, + * for example, restricting the running of background tasks.

+ * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + * @return Returns the usage priority group of the calling application. + */ + function queryAppUsagePriorityGroup(callback: AsyncCallback): void; + function queryAppUsagePriorityGroup(): Promise; + + /** + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + */ + interface BundleActiveInfoResponse { + [key: string]: BundleStateInfo; + } + + /** + * Queries usage information about each bundle within a specified period. + * + *

This method queries usage information at the {@link #BY_OPTIMIZED} interval by default.

+ * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + * @param begin Indicates the start time of the query period, in milliseconds. + * @param end Indicates the end time of the query period, in milliseconds. + * @return Returns the {@link BundleActiveInfoResponse} objects containing the usage information about each bundle. + */ + function queryBundleStateInfos(begin: number, end: number, callback: AsyncCallback): void; + function queryBundleStateInfos(begin: number, end: number): Promise; + + /** + * Declares interval type. + * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + */ + export enum IntervalType { + /** + * Indicates the interval type that will determine the optimal interval based on the start and end time. + */ + BY_OPTIMIZED = 0, + + /** + * Indicates the daily interval. + */ + BY_DAILY = 1, + + /** + * Indicates the weekly interval. + */ + BY_WEEKLY = 2, + + /** + * Indicates the monthly interval. + */ + BY_MONTHLY = 3, + + /** + * Indicates the annually interval. + */ + BY_ANNUALLY = 4 + } + + /** + * Queries usage information about each bundle within a specified period at a specified interval. + * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + * @param byInterval Indicates the interval at which the usage statistics are queried. + * The value can be {@link #BY_OPTIMIZED}, {@link #BY_DAILY}, + * {@link #BY_WEEKLY}, {@link #BY_MONTHLY}, or {@link #BY_ANNUALLY}. + * @param begin Indicates the start time of the query period, in milliseconds. + * @param end Indicates the end time of the query period, in milliseconds. + * @return Returns the list of {@link BundleStateInfo} objects containing the usage information about each bundle. + */ + function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback>): void; + function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise>; + + /** + * Queries state data of all bundles within a specified period identified by the start and end time. + * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + * @param begin Indicates the start time of the query period, in milliseconds. + * @param end Indicates the end time of the query period, in milliseconds. + * @return Returns the list of {@link BundleActiveState} objects containing the state data of all bundles. + */ + function queryBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void; + function queryBundleActiveStates(begin: number, end: number): Promise>; + + /** + * Queries state data of the current bundle within a specified period. + * + * @since 7 + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. + * @devices phone, tablet, tv, wearable, car. + * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @systemapi Hide this for inner system use. + * @param begin Indicates the start time of the query period, in milliseconds. + * @param end Indicates the end time of the query period, in milliseconds. + * @return Returns the {@link BundleActiveState} object Array containing the state data of the current bundle. + */ + function queryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void; + function queryCurrentBundleActiveStates(begin: number, end: number): Promise>; +} + +export default bundleState; \ No newline at end of file -- Gitee From 49a92d0fa9917e11cd3e6ac2a88523bc9df0d820 Mon Sep 17 00:00:00 2001 From: zhangfeng Date: Tue, 1 Mar 2022 14:42:11 +0000 Subject: [PATCH 071/163] update wifi d.ts file Signed-off-by: zhangfeng --- api/@ohos.wifi.d.ts | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/api/@ohos.wifi.d.ts b/api/@ohos.wifi.d.ts index f778a933ff..2df449ff62 100644 --- a/api/@ohos.wifi.d.ts +++ b/api/@ohos.wifi.d.ts @@ -444,6 +444,7 @@ declare namespace wifi { * @return Returns the P2P connection information. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function getP2pLinkedInfo(): Promise; function getP2pLinkedInfo(callback: AsyncCallback): void; @@ -454,6 +455,7 @@ declare namespace wifi { * @return Returns the current group information. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION */ function getCurrentGroup(): Promise; function getCurrentGroup(callback: AsyncCallback): void; @@ -464,26 +466,29 @@ declare namespace wifi { * @return Returns the found devices list. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION */ - function getP2pDevices(): Promise; - function getP2pDevices(callback: AsyncCallback): void; + function getP2pPeerDevices(): Promise; + function getP2pPeerDevices(callback: AsyncCallback): void; /** * Creates a P2P group. * * @param config Indicates the configuration for creating a group. - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function createGroup(config: WifiP2PConfig): boolean; /** * Removes a P2P group. * - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function removeGroup(): boolean; @@ -491,36 +496,40 @@ declare namespace wifi { * Initiates a P2P connection to a device with the specified configuration. * * @param config Indicates the configuration for connecting to a specific group. - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION */ function p2pConnect(config: WifiP2PConfig): boolean; /** * Canceling a P2P connection. * - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function p2pCancelConnect(): boolean; /** * Discovers Wi-Fi P2P devices. * - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION */ function startDiscoverDevices(): boolean; /** * Stops discovering Wi-Fi P2P devices. * - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function stopDiscoverDevices(): boolean; @@ -528,9 +537,11 @@ declare namespace wifi { * Deletes the persistent P2P group with the specified network ID. * * @param netId Indicates the network ID of the group to be deleted. - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.SET_WIFI_INFO, ohos.permission.MANAGE_WIFI_CONNECTION + * @systemapi Hide this for inner system use. */ function deletePersistentGroup(netId: number): boolean; @@ -538,9 +549,11 @@ declare namespace wifi { * Sets the name of the Wi-Fi P2P device. * * @param devName Indicates the name to be set. - * @return Returns {@code true} if the scanning is successful; returns {@code false} otherwise. + * @return Returns {@code true} if the operation is successful; returns {@code false} otherwise. * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.SET_WIFI_INFO, ohos.permission.MANAGE_WIFI_CONNECTION + * @systemapi Hide this for inner system use. */ function setDeviceName(devName: string): boolean; @@ -723,6 +736,7 @@ declare namespace wifi { * @return Returns 1: idle, 2: starting, 3:started, 4: closing, 5: closed * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function on(type: "p2pStateChange", callback: Callback): void; @@ -731,6 +745,7 @@ declare namespace wifi { * * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function off(type: "p2pStateChange", callback?: Callback): void; @@ -740,6 +755,7 @@ declare namespace wifi { * @return Returns WifiP2pLinkedInfo * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function on(type: "p2pConnectionChange", callback: AsyncCallback): void; @@ -748,6 +764,7 @@ declare namespace wifi { * * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function off(type: "p2pConnectionChange", callback?: AsyncCallback): void; @@ -757,6 +774,7 @@ declare namespace wifi { * @return Returns WifiP2pDevice * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION */ function on(type: "p2pDeviceChange", callback: AsyncCallback): void; @@ -766,6 +784,7 @@ declare namespace wifi { * @return Returns WifiP2pDevice * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.LOCATION */ function off(type: "p2pDeviceChange", callback?: AsyncCallback): void; @@ -775,6 +794,7 @@ declare namespace wifi { * @return Returns WifiP2pDevice[] * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION */ function on(type: "p2pPeerDeviceChange", callback: AsyncCallback): void; @@ -783,6 +803,7 @@ declare namespace wifi { * * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.LOCATION */ function off(type: "p2pPeerDeviceChange", callback?: AsyncCallback): void; @@ -792,6 +813,7 @@ declare namespace wifi { * @return Returns void * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function on(type: "p2pPersistentGroupChange", callback: Callback): void; @@ -800,6 +822,7 @@ declare namespace wifi { * * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function off(type: "p2pPersistentGroupChange", callback?: Callback): void; @@ -809,6 +832,7 @@ declare namespace wifi { * @return Returns 0: initial state, 1: discovery succeeded * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function on(type: "p2pDiscoveryChange", callback: Callback): void; @@ -817,6 +841,7 @@ declare namespace wifi { * * @since 8 * @syscap SystemCapability.Communication.WiFi.P2P + * @permission ohos.permission.GET_WIFI_INFO */ function off(type: "p2pDiscoveryChange", callback?: Callback): void; -- Gitee From cec16f1e0079370bd6304b8bced66d2a6921a25b Mon Sep 17 00:00:00 2001 From: jiangwensai Date: Wed, 23 Feb 2022 02:39:37 +0000 Subject: [PATCH 072/163] IssueNo: #I4UUXH Description: Fix Extension Name. Sig: SIG_ApplicationFramework Feature or Bugfix: Bugfix Binary Source: No Signed-off-by: jiangwensai Change-Id: If5930c04b37998cdd9c59c6c008b256edfb1cd07 --- ....application.ServiceExtensionAbility.d.ts} | 8 +- api/application/ExtAbilityContext.d.ts | 37 ------ api/application/ServiceExtAbilityContext.d.ts | 120 ------------------ 3 files changed, 4 insertions(+), 161 deletions(-) rename api/{@ohos.application.ServiceExtAbility.d.ts => @ohos.application.ServiceExtensionAbility.d.ts} (94%) delete mode 100644 api/application/ExtAbilityContext.d.ts delete mode 100644 api/application/ServiceExtAbilityContext.d.ts diff --git a/api/@ohos.application.ServiceExtAbility.d.ts b/api/@ohos.application.ServiceExtensionAbility.d.ts similarity index 94% rename from api/@ohos.application.ServiceExtAbility.d.ts rename to api/@ohos.application.ServiceExtensionAbility.d.ts index c87682539c..a2567c8945 100644 --- a/api/@ohos.application.ServiceExtAbility.d.ts +++ b/api/@ohos.application.ServiceExtensionAbility.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,7 +14,7 @@ */ import rpc from "./@ohos.rpc"; -import ServiceExtAbilityContext from "./application/ServiceExtAbilityContext"; +import ServiceExtensionContext from "./application/ServiceExtensionContext"; import Want from './@ohos.application.Want'; /** @@ -25,7 +25,7 @@ import Want from './@ohos.application.Want'; * @systemapi hide for inner use. * @StageModelOnly */ -export default class ServiceExtAbility { +export default class ServiceExtensionAbility { /** * Indicates service extension ability context. * @@ -34,7 +34,7 @@ export default class ServiceExtAbility { * @systemapi hide for inner use. * @StageModelOnly */ - context: ServiceExtAbilityContext; + context: ServiceExtensionContext; /** * Called back when a service extension is started for initialization. diff --git a/api/application/ExtAbilityContext.d.ts b/api/application/ExtAbilityContext.d.ts deleted file mode 100644 index 36ddd06d4d..0000000000 --- a/api/application/ExtAbilityContext.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { HapModuleInfo } from "../bundle/hapModuleInfo"; -import Context from "./Context"; - -/** - * The context of an extension. It allows access to extension-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class ExtAbilityContext extends Context { - - /** - * Indicates configuration information about an module. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - currentHapModuleInfo: HapModuleInfo; -} \ No newline at end of file diff --git a/api/application/ServiceExtAbilityContext.d.ts b/api/application/ServiceExtAbilityContext.d.ts deleted file mode 100644 index f10e58fc9a..0000000000 --- a/api/application/ServiceExtAbilityContext.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AsyncCallback } from "../basic"; -import { ConnectOptions } from "../ability/connectOptions"; -import ExtAbilityContext from "./ExtAbilityContext"; -import Want from "../@ohos.application.Want"; -import StartOptions from "../@ohos.application.StartOptions"; - -/** - * The context of service extension. It allows access to - * serviceExtension-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @permission N/A - * @StageModelOnly - */ -export default class ServiceExtAbilityContext extends ExtAbilityContext { - /** - * Service extension uses this method to start a specific ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @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; - startAbility(want: Want, options?: StartOptions): Promise; - - /** - * Service extension uses this method to start a specific ability with account. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @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; - startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise; - - /** - * Destroys this service extension. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - terminateSelf(callback: AsyncCallback): void; - terminateSelf(): Promise; - - /** - * Connects an ability to a Service extension. - * - *

This method can be called by an ability or service extension, but the destination of the connection must be a - * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target - * service extension when the Service extension is connected.

- * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @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; - - /** - * Connects an ability to a Service extension with account. - * - *

This method can be called by an ability or service extension, but the destination of the connection must be a - * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target - * service extension when the Service extension is connected.

- * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @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; - - /** - * Disconnects an ability to a service extension, in contrast to - * {@link connectAbility}. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @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; -} \ No newline at end of file -- Gitee From 6005a924ae1a814d906bda7eb78e4fc33cd232b9 Mon Sep 17 00:00:00 2001 From: YOUR_NAME Date: Wed, 2 Mar 2022 15:08:42 +0800 Subject: [PATCH 073/163] Fix: Usb module Adds system capabilities Signed-off-by: YOUR_NAME --- api/@ohos.usb.d.ts | 70 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/api/@ohos.usb.d.ts b/api/@ohos.usb.d.ts index ac295ca5d2..4d8b08a6a2 100644 --- a/api/@ohos.usb.d.ts +++ b/api/@ohos.usb.d.ts @@ -161,19 +161,22 @@ declare namespace usb { * Represents the USB endpoint from which data is sent or received. * You can obtain the USB endpoint through USBInterface {@link USBInterface}. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interface USBEndpoint { /** * Endpoint address. - * + * + * @syscap SystemCapability.USB.USBManager * @since 8 */ address: number; /** * Endpoint attributes. - * + * + * @syscap SystemCapability.USB.USBManager * @since 8 */ attributes: number; @@ -181,6 +184,7 @@ declare namespace usb { /** * Endpoint interval. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interval: number; @@ -188,6 +192,7 @@ declare namespace usb { /** * Maximun size of data packets on the endpoint. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ maxPacketSize: number; @@ -195,6 +200,7 @@ declare namespace usb { /** * Endpoint direction. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ direction: USBRequestDirection; @@ -202,6 +208,7 @@ declare namespace usb { /** * Endpoint number. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ number: number; @@ -209,6 +216,7 @@ declare namespace usb { /** * Endpoint type * + * @syscap SystemCapability.USB.USBManager * @since 8 */ type: number; @@ -216,6 +224,7 @@ declare namespace usb { /** * Unique ID of the interface to which the endpoint belongs {@link USBInterface.id} * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interfaceId: number; @@ -226,12 +235,14 @@ declare namespace usb { * Represents a USB interface. One USBconfig {@link USBConfig} can contain multiple USBInterface instances, * each providing a specific function. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interface USBInterface { /** * Unique ID of the USB interface. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ id: number; @@ -239,6 +250,7 @@ declare namespace usb { /** * Interface protocol. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ protocol: number; @@ -246,6 +258,7 @@ declare namespace usb { /** * Device type. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ clazz: number; @@ -253,6 +266,7 @@ declare namespace usb { /** * Device subclass. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ subClass: number; @@ -260,6 +274,7 @@ declare namespace usb { /** * Alternating between descripors of the same USB interface. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ alternateSetting: number; @@ -267,6 +282,7 @@ declare namespace usb { /** * Interface name. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ name: string; @@ -274,6 +290,7 @@ declare namespace usb { /** * Endpoints {@link USBEndpoint} that belongs to the USB interface. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ endpoints: Array; @@ -282,21 +299,22 @@ declare namespace usb { /** * Represents the USB configuration. One USBDevice{@link USBDevice} can contain multiple USBConfig instances. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interface USBConfig { /** * Unique ID if the USB configuration. * + * @syscap SystemCapability.USB.USBManager * @since 8 - * - * */ id: number; /** * Configuration attributes. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ attributes: number; @@ -304,6 +322,7 @@ declare namespace usb { /** * Maximum power consumption, in mA. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ maxPower: number; @@ -311,6 +330,7 @@ declare namespace usb { /** * Configuration name, which can be left empty. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ name: string; @@ -318,6 +338,7 @@ declare namespace usb { /** * Support for remote wakeup. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ isRemoteWakeup: boolean; @@ -325,6 +346,7 @@ declare namespace usb { /** * Support for independent power supplies. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ isSelfPowered: boolean; @@ -332,6 +354,7 @@ declare namespace usb { /** * Supported interface attributes {@link USBInterface}. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interfaces: Array; @@ -340,84 +363,98 @@ declare namespace usb { /** * Represents a USB device. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interface USBDevice { /** * Bus address. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ busNum: number; /** * Device address. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ devAddress: number; /** * Device SN. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ serial: string; /** * Device name. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ name: string; /** * Device manufacturer. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ manufacturerName: string; /** * Product name. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ productName: string; /** * Product version. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ version: string; /** * Vendor ID. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ vendorId: number; /** * Product ID. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ productId: number; /** * Device class. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ clazz: number; /** * Device subclass. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ subClass: number; /** * Device protocol code. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ protocol: number; /** * Device configuration descriptor information {@link USBConfig}. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ configs: Array; @@ -426,18 +463,21 @@ declare namespace usb { /** * Represents a USB device pipe, which is used to determine the USB device. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interface USBDevicePipe { /** * Bus address. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ busNum: number; /** * Device address. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ devAddress: number; @@ -446,41 +486,49 @@ declare namespace usb { /** * Represents control transfer parameters. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ interface USBControlParams { /** * Request type. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ request: number; /** * Request target tyoe. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ target: USBRequestTargetType; /** * Request control type. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ reqType: USBControlRequestType; /** * Request parameter value. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ value: number; /** * Index of the parameter value. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ index: number; /** * Data written to or read from the buffer. + * + * @syscap SystemCapability.USB.USBManager * @since 8 */ data: Uint8Array; @@ -489,30 +537,35 @@ declare namespace usb { /** * Enumerates USB request target types. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ enum USBRequestTargetType { /** * Device. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_TARGET_DEVICE = 0, /** * Interface. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_TARGET_INTERFACE, /** * Endpoint. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_TARGET_ENDPOINT, /** * Others. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_TARGET_OTHER @@ -520,24 +573,29 @@ declare namespace usb { /** * Enumerates control request types. + * + * @syscap SystemCapability.USB.USBManager * @since 8 */ enum USBControlRequestType { /** * Standard. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_TYPE_STANDARD = 0, /** * Class. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_TYPE_CLASS, /** * Verdor. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_TYPE_VENDOR @@ -545,18 +603,22 @@ declare namespace usb { /** * Enumerates request directions. + * + * @syscap SystemCapability.USB.USBManager * @since 8 */ enum USBRequestDirection { /** * Request for writing data from the host to the device. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_DIR_TO_DEVICE = 0, /** * Request for reading data from the device to the host. * + * @syscap SystemCapability.USB.USBManager * @since 8 */ USB_REQUEST_DIR_FROM_DEVICE = 0x80 -- Gitee From 2e2ac7ef3bde5f8b29c05c3b451cd88f0a3ed14c Mon Sep 17 00:00:00 2001 From: yudechen Date: Wed, 2 Mar 2022 15:09:39 +0800 Subject: [PATCH 074/163] =?UTF-8?q?=E4=BF=AE=E6=94=B9canIUse=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A3=B0=E6=98=8E=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6cca9039d8d3b7c26216c1408be29ce3b59664cf Signed-off-by: yudechen --- api/@internal/component/ets/common.d.ts | 6 ------ api/common/@internal/global.d.ts | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index c1157b0610..a71d0c9067 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -274,12 +274,6 @@ interface DragItemInfo { extraInfo?: string; } -/** - * Defining syscap function. - * @since 8 - */ -declare function canIUse(syscap: string): boolean; - /** * Defining animation function. * @since 7 diff --git a/api/common/@internal/global.d.ts b/api/common/@internal/global.d.ts index 36a6d6d182..128c337c20 100644 --- a/api/common/@internal/global.d.ts +++ b/api/common/@internal/global.d.ts @@ -51,6 +51,12 @@ export declare function clearInterval(intervalID?: number): void; */ export declare function clearTimeout(timeoutID?: number): void; +/** + * Defining syscap function. + * @since 8 + */ + export declare function canIUse(syscap: string): boolean; + /** * Obtain the objects exposed in app.js * @devices tv, phone, tablet, wearable, smartVision -- Gitee From 2db2e933149e935a6b6616876fa3b3e32e60c10b Mon Sep 17 00:00:00 2001 From: wplan1 Date: Tue, 1 Mar 2022 23:18:37 +0800 Subject: [PATCH 075/163] add close rawfd Signed-off-by: wplan1 --- api/@ohos.resourceManager.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/@ohos.resourceManager.d.ts b/api/@ohos.resourceManager.d.ts index 5fc83772b6..55fe1e882c 100644 --- a/api/@ohos.resourceManager.d.ts +++ b/api/@ohos.resourceManager.d.ts @@ -402,6 +402,24 @@ export interface ResourceManager { */ getRawFileDescriptor(path: string): Promise; + /** + * Obtains close raw file resource descriptor corresponding to the specified resource path in callback mode. + * + * @param path Indicates the resource relative path. + * @param callback Indicates the asynchronous callback used to return result close raw file resource descriptor. + * @since 8 + */ + closeRawFileDescriptor(path: string, callback: AsyncCallback): void; + + /** + * Obtains close raw file resource descriptor corresponding to the specified resource path in Promise mode. + * + * @param path Indicates the resource relative path. + * @return Returns result close raw file resource descriptor corresponding to the specified resource path. + * @since 8 + */ + closeRawFileDescriptor(path: string): Promise; + /** * Obtains release resourceManager. * -- Gitee From 80e24032754fde2c7196556e28fed8f4a6b0d7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 2 Mar 2022 07:21:21 +0000 Subject: [PATCH 076/163] update api/@ohos.wallpaper.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.wallpaper.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.wallpaper.d.ts b/api/@ohos.wallpaper.d.ts index b0f83f66f4..9b1776d5c4 100644 --- a/api/@ohos.wallpaper.d.ts +++ b/api/@ohos.wallpaper.d.ts @@ -17,7 +17,7 @@ import image from './@ohos.multimedia.image' /** * System wallpaper - * @sysCap SystemCapability.Miscservices.WallpaperFramework + * @syscap SystemCapability.Miscservices.WallpaperFramework * @devices phone, tablet, tv, wearable, car * @import import wallpaper from '@ohos.wallpaper'; * @since 7 -- Gitee From 0f91d5c27087f1d087951200446be5cd05c13d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 2 Mar 2022 07:22:05 +0000 Subject: [PATCH 077/163] update api/@ohos.systemTime.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.systemTime.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.systemTime.d.ts b/api/@ohos.systemTime.d.ts index 9071438b0e..8a15765fcb 100755 --- a/api/@ohos.systemTime.d.ts +++ b/api/@ohos.systemTime.d.ts @@ -18,7 +18,7 @@ import { AsyncCallback, ErrorCallback } from './basic'; /** * System time and timezone. * @since 7 - * @sysCap SystemCapability.Miscservices.Time + * @syscap SystemCapability.Miscservices.Time * @devices phone, tablet, tv, wearable, car * @import systemTime from '@ohos.systemTime'; */ -- Gitee From ce772be61580b1a9f1040c2ca0069ead2bc6ce53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 2 Mar 2022 07:22:50 +0000 Subject: [PATCH 078/163] update api/@ohos.pasteboard.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.pasteboard.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index facf37ba9e..e1e14bcded 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -17,7 +17,7 @@ import { Want } from './ability/want'; /** * systemPasteboard - * @sysCap SystemCapability.Miscservices.Pasteboard + * @syscap SystemCapability.Miscservices.Pasteboard * @devices phone, tablet, tv, wearable, car * @import import pasteboard from '@ohos.pasteboard'; */ -- Gitee From 0a5c2559ae399da64070ff50836e66080180fe7f Mon Sep 17 00:00:00 2001 From: aqxyjay Date: Wed, 2 Mar 2022 15:44:27 +0800 Subject: [PATCH 079/163] normalize syscap Signed-off-by: aqxyjay --- api/@ohos.batteryinfo.d.ts | 8 ++++---- api/@ohos.brightness.d.ts | 3 +-- api/@ohos.power.d.ts | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/api/@ohos.batteryinfo.d.ts b/api/@ohos.batteryinfo.d.ts index a139929f6d..265f6c4df2 100644 --- a/api/@ohos.batteryinfo.d.ts +++ b/api/@ohos.batteryinfo.d.ts @@ -19,7 +19,7 @@ *

Battery information includes the remaining battery power, * voltage, temperature, model, and charger type. * - * @sysCap SystemCapability.PowerManager.BatteryManage.Core + * @syscap SystemCapability.PowerManager.BatteryManage.Core * @since 6 */ declare namespace batteryInfo { @@ -74,7 +74,7 @@ declare namespace batteryInfo { /** * Indicates the charger type of a device. * - * @sysCap SystemCapability.PowerManager.BatteryManage.Core + * @syscap SystemCapability.PowerManager.BatteryManage.Core * @since 6 */ export enum BatteryPluggedType { @@ -103,7 +103,7 @@ declare namespace batteryInfo { /** * Indicates the battery charging status of a device. * - * @sysCap SystemCapability.PowerManager.BatteryManage.Core + * @syscap SystemCapability.PowerManager.BatteryManage.Core * @since 6 */ export enum BatteryChargeState { @@ -132,7 +132,7 @@ declare namespace batteryInfo { /** * Indicates the battery health status of a device. * - * @sysCap SystemCapability.PowerManager.BatteryManage.Core + * @syscap SystemCapability.PowerManager.BatteryManage.Core * @since 6 */ export enum BatteryHealthState { diff --git a/api/@ohos.brightness.d.ts b/api/@ohos.brightness.d.ts index f12bc7a706..bb8b098804 100644 --- a/api/@ohos.brightness.d.ts +++ b/api/@ohos.brightness.d.ts @@ -18,7 +18,7 @@ import { AsyncCallback } from './basic'; /** * Provides interfaces to control the power of display. * - * @sysCap SystemCapability.PowerManager.DisplayPowerManager + * @syscap SystemCapability.PowerManager.DisplayPowerManager * @since 7 */ declare namespace brightness { @@ -26,7 +26,6 @@ declare namespace brightness { * Sets the screen brightness. * * @param value Brightness value, ranging from 0 to 255. - * @sysCap SystemCapability.PowerManager.DisplayPowerManager * @systemapi * @since 7 */ diff --git a/api/@ohos.power.d.ts b/api/@ohos.power.d.ts index 90da7f5099..5f59da72f5 100644 --- a/api/@ohos.power.d.ts +++ b/api/@ohos.power.d.ts @@ -18,7 +18,7 @@ import {AsyncCallback} from './basic'; /** * Provides interfaces to manage power. * - * @sysCap SystemCapability.PowerManager.PowerManager.Core + * @syscap SystemCapability.PowerManager.PowerManager.Core * @since 7 */ declare namespace power { -- Gitee From 642e76d19f33ff3896d6fe76e6ce5d4c95b53583 Mon Sep 17 00:00:00 2001 From: zero-cyc Date: Wed, 2 Mar 2022 16:06:25 +0800 Subject: [PATCH 080/163] chenlien@huawei.com Signed-off-by: zero-cyc Change-Id: Ide73e7f099e285f8d86df0e648ebfc1862b01257 --- api/notification/notificationSubscriber.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/notification/notificationSubscriber.d.ts b/api/notification/notificationSubscriber.d.ts index d14e59c088..f2356ec81f 100644 --- a/api/notification/notificationSubscriber.d.ts +++ b/api/notification/notificationSubscriber.d.ts @@ -37,14 +37,14 @@ export interface NotificationSubscriber { /** * Callback when the Do Not Disturb setting changed. - * + * @syscap SystemCapability.Notification.Notification * @since 8 */ onDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => void; /** * Callback when the notificaition permission is changed. - * + * @syscap SystemCapability.Notification.Notification * @since 8 */ onEnabledNotificationChanged?:(callbackData: EnabledNotificationCallbackData) => void; @@ -72,6 +72,7 @@ export interface SubscribeCallbackData { * Describes the properties of the application that the permission to send notifications has changed. * * @name EnabledNotificationCallbackData + * @syscap SystemCapability.Notification.Notification * @systemapi Hide this for inner system use. * @since 8 */ @@ -79,4 +80,4 @@ export interface EnabledNotificationCallbackData { readonly bundle: string; readonly uid: number; readonly enable: boolean; -} \ No newline at end of file +} -- Gitee From 294ac0827034114a1195b3c125b4b9c271a2bf01 Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Wed, 2 Mar 2022 16:10:54 +0800 Subject: [PATCH 081/163] houhaoyu@huawei.com Signed-off-by: houhaoyu Change-Id: Ib238f6b3400611b891ebe48eabe8944b1555261f --- api/@internal/ets/lifecycle.d.ts | 44 -------------------------------- 1 file changed, 44 deletions(-) diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index 1ab0f948b8..18cff8475e 100644 --- a/api/@internal/ets/lifecycle.d.ts +++ b/api/@internal/ets/lifecycle.d.ts @@ -31,7 +31,6 @@ import { PacMap } from "../ability/dataAbilityHelper"; * * @name LifecycleForm * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleForm { @@ -39,7 +38,6 @@ export declare interface LifecycleForm { * Called to return a {@link formBindingData.FormBindingData} object. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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, * which can be obtained from {@link formManager#FormParam#IDENTITY_KEY}, @@ -55,7 +53,6 @@ export declare interface LifecycleForm { * Called when the form provider is notified that a temporary form is successfully converted to a normal form. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param formId Indicates the ID of the form. * @return - * @FAModelOnly @@ -66,7 +63,6 @@ export declare interface LifecycleForm { * Called to notify the form provider to update a specified form. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param formId Indicates the ID of the form to update. * @return - * @FAModelOnly @@ -77,7 +73,6 @@ export declare interface LifecycleForm { * Called when the form provider receives form events from the system. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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} * or {@link formManager#VisibilityType#FORM_INVISIBLE}. {@link formManager#VisibilityType#FORM_VISIBLE} @@ -93,7 +88,6 @@ export declare interface LifecycleForm { * JS forms. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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 @@ -108,7 +102,6 @@ export declare interface LifecycleForm { * you want your application, as the form provider, to be notified of form deletion. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param formId Indicates the ID of the deleted form. * @return - * @FAModelOnly @@ -122,7 +115,6 @@ export declare interface LifecycleForm { * this method returns {@link FormState#DEFAULT} by default.

* * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -136,7 +128,6 @@ export declare interface LifecycleForm { * * @name LifecycleApp * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleApp { @@ -144,7 +135,6 @@ export declare interface LifecycleApp { * Called back when the state of an ability changes from BACKGROUND to INACTIVE. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -154,7 +144,6 @@ export declare interface LifecycleApp { * Called back when an ability enters the BACKGROUND state. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -164,7 +153,6 @@ export declare interface LifecycleApp { * Called back before an ability is destroyed. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -174,7 +162,6 @@ export declare interface LifecycleApp { * Called back when an ability is started for initialization. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -185,7 +172,6 @@ export declare interface LifecycleApp { * to multi-window mode or from multi-window mode to fullscreen mode. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param isShownInMultiWindow Specifies whether this ability is currently in multi-window mode. * The value {@code true} indicates the multi-window mode, and {@code false} indicates another mode. * @param newConfig Indicates the new configuration information about this Page ability. @@ -199,7 +185,6 @@ export declare interface LifecycleApp { * Asks a user whether to start the migration. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return Returns {@code true} if the user allows the migration; returns {@code false} otherwise. * @FAModelOnly */ @@ -211,7 +196,6 @@ export declare interface LifecycleApp { * Scheduler Service requests data from the local ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param data Indicates the user data to save. * @return Returns {@code true} if the data is successfully saved; returns {@code false} otherwise. * @FAModelOnly @@ -225,7 +209,6 @@ export declare interface LifecycleApp { * notify the user of the successful migration and then exit the local ability.

* * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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 - @@ -239,7 +222,6 @@ export declare interface LifecycleApp { * is restored. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param data Indicates the user data to restore. * @return - * @FAModelOnly @@ -251,7 +233,6 @@ export declare interface LifecycleApp { * migration is performed for the ability from the local device to the remote device. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -263,7 +244,6 @@ export declare interface LifecycleApp { * this method is used only to save temporary states. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param outState Indicates the {@code PacMap} object used for storing user data and states. This * parameter cannot be null. * @return - @@ -277,7 +257,6 @@ export declare interface LifecycleApp { * states. Generally, this method is called after the {@link #onStart(Want)} method. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param inState Indicates the {@code PacMap} object used for storing data and states. This * parameter can not be null. * @return - @@ -290,7 +269,6 @@ export declare interface LifecycleApp { * change to the BACKGROUND or ACTIVE state). * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -300,7 +278,6 @@ export declare interface LifecycleApp { * Called back when an ability enters the ACTIVE state. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -310,7 +287,6 @@ export declare interface LifecycleApp { * Called when the launch mode of an ability is set to singleton. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates the new {@code want} containing information about the ability. * @return - * @FAModelOnly @@ -322,7 +298,6 @@ export declare interface LifecycleApp { * background and there is no enough memory for running as many background processes as possible. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param level Indicates the memory trim level, which shows the current memory usage status. * @return - * @FAModelOnly @@ -335,7 +310,6 @@ export declare interface LifecycleApp { * * @name LifecycleService * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleService { @@ -344,7 +318,6 @@ export declare interface LifecycleService { * an ability). * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -354,7 +327,6 @@ export declare interface LifecycleService { * Called back when Service is started. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates the want of Service to start. * @param startId Indicates the number of times the Service ability has been started. The {@code startId} is * incremented by 1 every time the ability is started. For example, if the ability has been started @@ -368,7 +340,6 @@ export declare interface LifecycleService { * Called back before an ability is destroyed. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @return - * @FAModelOnly */ @@ -378,7 +349,6 @@ export declare interface LifecycleService { * Called back when a Service ability is first connected to an ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates connection information about the Service ability. * @return Returns the proxy of the Service ability. * @FAModelOnly @@ -389,7 +359,6 @@ export declare interface LifecycleService { * Called back when all abilities connected to a Service ability are disconnected. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates disconnection information about the Service ability. * @return - * @FAModelOnly @@ -404,7 +373,6 @@ export declare interface LifecycleService { * called but {@link #terminateSelf} has not.

* * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param want Indicates the want of the Service ability being connected. * @return - * @FAModelOnly @@ -417,7 +385,6 @@ export declare interface LifecycleService { * * @name LifecycleData * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @FAModelOnly */ export declare interface LifecycleData { @@ -425,7 +392,6 @@ export declare interface LifecycleData { * Updates one or more data records in the database. This method should be implemented by a Data ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the database table storing the data to update. * @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 @@ -441,7 +407,6 @@ export declare interface LifecycleData { * Queries one or more data records in the database. This method should be implemented by a Data ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the database table storing the data to query. * @param columns Indicates the columns to be queried, in array, for example, {"name","age"}. You should define * the processing logic when this parameter is null. @@ -458,7 +423,6 @@ export declare interface LifecycleData { * Deletes one or more data records. This method should be implemented by a Data ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @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. @@ -475,7 +439,6 @@ export declare interface LifecycleData { * even if the context has changed. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri to normalize. * @param callback function specified by framework to receive the result, developer should call this function to * return the result to framework. @@ -488,7 +451,6 @@ export declare interface LifecycleData { * Inserts multiple data records into the database. This method should be implemented by a Data ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the position where the data is to insert. * @param valueBuckets Indicates the data to insert. * @param callback function specified by framework to receive the result, developer should call this function to @@ -503,7 +465,6 @@ export declare interface LifecycleData { * The default implementation of this method returns the original uri passed to it. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri to denormalize. * @param callback function specified by framework to receive the result, developer should call this function to * return the result to framework. @@ -516,7 +477,6 @@ export declare interface LifecycleData { * Inserts a data record into the database. This method should be implemented by a Data ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the position where the data is to insert. * @param valueBucket Indicates the data to insert. * @param callback function specified by framework to receive the result, developer should call this function to @@ -530,7 +490,6 @@ export declare interface LifecycleData { * Opens a file. This method should be implemented by a Data ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the file to open. * @param mode Indicates the 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, @@ -547,7 +506,6 @@ export declare interface LifecycleData { * Obtains the MIME type of files. This method should be implemented by a Data ability. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the path of the files to obtain. * @param mimeTypeFilter Indicates the MIME type of the files to obtain. This parameter cannot be set to {@code * null}. @@ -565,7 +523,6 @@ export declare interface LifecycleData { * Called to carry {@code AbilityInfo} to this ability after the ability is initialized. * * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param info Indicates the {@code AbilityInfo} object containing information about this ability. * @return - * @FAModelOnly @@ -579,7 +536,6 @@ export declare interface LifecycleData { *

Data abilities supports general data types, including text, HTML, and JPEG.

* * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.FAModel * @param uri Indicates the uri of the data. * @param callback function specified by framework to receive the result, developer should call this function to * return the result to framework. -- Gitee From 68033806cf61892ae2e1bc51d71e9df61564f5dd Mon Sep 17 00:00:00 2001 From: hellohyh001 Date: Wed, 2 Mar 2022 16:36:54 +0800 Subject: [PATCH 082/163] Signed-off-by:hellohyh001 Signed-off-by: hellohyh001 --- api/@ohos.sensor.d.ts | 273 +++++++++++++++++++++++++++++++++++------- 1 file changed, 227 insertions(+), 46 deletions(-) mode change 100755 => 100644 api/@ohos.sensor.d.ts diff --git a/api/@ohos.sensor.d.ts b/api/@ohos.sensor.d.ts old mode 100755 new mode 100644 index 231c236f6b..79297988d2 --- a/api/@ohos.sensor.d.ts +++ b/api/@ohos.sensor.d.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { AsyncCallback } from './basic'; +import { AsyncCallback, Callback } from "./basic"; /** * This module provides the capability to subscribe to sensor data. @@ -32,7 +32,7 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback, options?: Options): void; /** @@ -43,7 +43,7 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, callback: Callback, options?: Options): void; /** @@ -54,7 +54,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: Callback, options?: Options): void; /** @@ -65,7 +65,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback: Callback, options?: Options): void; /** @@ -76,7 +76,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: Callback, options?: Options): void; /** @@ -87,7 +87,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: Callback, options?: Options): void; /** @@ -98,7 +98,7 @@ declare namespace sensor { * @permission ohos.permission.GRYOSCOPE * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: Callback, options?: Options): void; /** @@ -109,7 +109,7 @@ declare namespace sensor { * @permission ohos.permission.GRYOSCOPE * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback: Callback, options?: Options): void; /** @@ -120,7 +120,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_HALL, callback: Callback, options?: Options): void; /** @@ -131,7 +131,7 @@ declare namespace sensor { * @permission ohos.permission.HEALTH_DATA * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback, options?: Options): void; /** @@ -142,7 +142,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: Callback, options?: Options): void; /** @@ -153,7 +153,7 @@ declare namespace sensor { * @permission ohos.permission.ACCELEROMETER * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: Callback, options?: Options): void; /** @@ -164,7 +164,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: Callback, options?: Options): void; /** @@ -175,7 +175,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback: Callback, options?: Options): void; /** @@ -186,7 +186,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: Callback, options?: Options): void; /** @@ -197,7 +197,7 @@ declare namespace sensor { * @permission ohos.permission.ACTIVITY_MOTION * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: Callback, options?: Options): void; /** @@ -208,7 +208,7 @@ declare namespace sensor { * @permission ohos.permission.ACTIVITY_MOTION * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: Callback, options?: Options): void; /** @@ -219,7 +219,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: Callback, options?: Options): void; /** @@ -230,7 +230,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback: Callback, options?: Options): void; /** @@ -241,7 +241,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: Callback, options?: Options): void; /** @@ -252,7 +252,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function on(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback, + function on(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: Callback, options?: Options): void; /** @@ -262,7 +262,7 @@ declare namespace sensor { * @permission ohos.permission.ACCELEROMETER * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback): void; /** * Subscribe to sensor data once. @@ -271,7 +271,7 @@ declare namespace sensor { * @permission ohos.permission.ACCELEROMETER * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, callback: Callback): void; /** * Subscribe to sensor data once. @@ -280,7 +280,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: Callback): void; /** * Subscribe to sensor data once. @@ -289,7 +289,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback: Callback): void; /** * Subscribe to sensor data once. @@ -298,7 +298,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: Callback): void; /** * Subscribe to sensor data once. @@ -307,7 +307,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: Callback): void; /** * Subscribe to sensor data once. @@ -316,7 +316,7 @@ declare namespace sensor { * @permission ohos.permission.GYROSCOPE * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: Callback): void; /** * Subscribe to sensor data once. @@ -325,7 +325,7 @@ declare namespace sensor { * @permission ohos.permission.GYROSCOPE * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback: Callback): void; /** * Subscribe to sensor data once. @@ -334,7 +334,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_HALL, callback: Callback): void; /** * Subscribe to sensor data once. @@ -343,7 +343,7 @@ declare namespace sensor { * @permission ohos.permission.HEART_RATE * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback): void; /** * Subscribe to sensor data once. @@ -352,7 +352,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: Callback): void; /** * Subscribe to sensor data once. @@ -361,7 +361,7 @@ declare namespace sensor { * @permission ohos.permission.ACCELERATION * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: Callback): void; /** * Subscribe to sensor data once. @@ -370,7 +370,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: Callback): void; /** * Subscribe to sensor data once. @@ -379,7 +379,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback: Callback): void; /** * Subscribe to sensor data once. @@ -388,7 +388,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: Callback): void; /** * Subscribe to sensor data once. @@ -397,7 +397,7 @@ declare namespace sensor { * @permission ohos.permission.ACTIVITY_MOTION * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: Callback): void; /** * Subscribe to sensor data once. @@ -406,7 +406,7 @@ declare namespace sensor { * @permission ohos.permission.ACTIVITY_MOTION * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: Callback): void; /** * Subscribe to sensor data once. @@ -415,7 +415,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: Callback): void; /** * Subscribe to sensor data once. @@ -424,7 +424,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback: Callback): void; /** * Subscribe to sensor data once. @@ -433,7 +433,7 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: Callback): void; /** * Subscribe to sensor data once. @@ -442,16 +442,197 @@ declare namespace sensor { * @permission N/A * @since 8 */ - function once(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback): void; + function once(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: Callback): void; /** - * Unsubscribe to sensor data once. - * @param type Indicate the sensor type to listen for, {@code SensorType}. + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER}. + * @permission ohos.permission.ACCELEROMETER + * @syscap SystemCapability.Sensors.Sensor + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED}. + * @permission ohos.permission.ACCELEROMETER + * @syscap SystemCapability.Sensors.Sensor + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, + callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_BAROMETER}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_GRAVITY}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.GRYOSCOPE + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.GRYOSCOPE + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_HALL}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_HALL, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_HEART_RATE}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.HEALTH_DATA + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_HUMIDITY}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACCELEROMETER + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_ORIENTATION}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_PEDOMETER}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACTIVITY_MOTION + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACTIVITY_MOTION + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_PROXIMITY}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION}. + * @syscap SystemCapability.Sensors.Sensor + * @permission N/A + * @since 8 + */ + function off(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback?: Callback): void; + + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_WEAR_DETECTION}. * @syscap SystemCapability.Sensors.Sensor * @permission N/A * @since 8 */ - function off(type: SensorType, callback: AsyncCallback): void; + function off(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback?: Callback): void; /** * Indicates geographic location. -- Gitee From ceedda81d5396fc6e65d8cc9dc505b4078af42c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= Date: Wed, 2 Mar 2022 08:46:10 +0000 Subject: [PATCH 083/163] rename api/@ohos.nfc.tag.js to api/@ohos.nfc.tag.d.ts. fix tag and hce api file extension Signed-off-by: l00438547 --- api/{@ohos.nfc.tag.js => @ohos.nfc.tag.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/{@ohos.nfc.tag.js => @ohos.nfc.tag.d.ts} (100%) diff --git a/api/@ohos.nfc.tag.js b/api/@ohos.nfc.tag.d.ts similarity index 100% rename from api/@ohos.nfc.tag.js rename to api/@ohos.nfc.tag.d.ts -- Gitee From a54b33e800f9f1b00c34e6b4a4c4721784f491af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= Date: Wed, 2 Mar 2022 08:56:12 +0000 Subject: [PATCH 084/163] rename api/tag/nfctech.js to api/tag/nfctech.d.ts. fix tag and hce api file extension Signed-off-by: l00438547 --- api/tag/{nfctech.js => nfctech.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/tag/{nfctech.js => nfctech.d.ts} (100%) diff --git a/api/tag/nfctech.js b/api/tag/nfctech.d.ts similarity index 100% rename from api/tag/nfctech.js rename to api/tag/nfctech.d.ts -- Gitee From 4a850d40f20b4007baedf8f02015bbd1a77ee116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= Date: Wed, 2 Mar 2022 08:56:55 +0000 Subject: [PATCH 085/163] rename api/@ohos.nfc.cardEmulation.js to api/@ohos.nfc.cardEmulation.d.ts. fix tag and hce api file extension Signed-off-by: l00438547 --- api/{@ohos.nfc.cardEmulation.js => @ohos.nfc.cardEmulation.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/{@ohos.nfc.cardEmulation.js => @ohos.nfc.cardEmulation.d.ts} (100%) diff --git a/api/@ohos.nfc.cardEmulation.js b/api/@ohos.nfc.cardEmulation.d.ts similarity index 100% rename from api/@ohos.nfc.cardEmulation.js rename to api/@ohos.nfc.cardEmulation.d.ts -- Gitee From 17847e77b5b573b5f9a87a2bd7b31318cdf05278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= Date: Wed, 2 Mar 2022 08:58:01 +0000 Subject: [PATCH 086/163] rename api/tag/tagSession.js to api/tag/tagSession.d.ts. fix tag and hce api file extension Signed-off-by: l00438547 --- api/tag/{tagSession.js => tagSession.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/tag/{tagSession.js => tagSession.d.ts} (100%) diff --git a/api/tag/tagSession.js b/api/tag/tagSession.d.ts similarity index 100% rename from api/tag/tagSession.js rename to api/tag/tagSession.d.ts -- Gitee From fc8ee9ff8cab95aec11a34567c01b988b154a6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= Date: Wed, 2 Mar 2022 08:59:22 +0000 Subject: [PATCH 087/163] rename api/@ohos.nfc.controller.js to api/@ohos.nfc.controller.d.ts. fix tag and hce api file extension Signed-off-by: l00438547 --- api/{@ohos.nfc.controller.js => @ohos.nfc.controller.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/{@ohos.nfc.controller.js => @ohos.nfc.controller.d.ts} (100%) diff --git a/api/@ohos.nfc.controller.js b/api/@ohos.nfc.controller.d.ts similarity index 100% rename from api/@ohos.nfc.controller.js rename to api/@ohos.nfc.controller.d.ts -- Gitee From 83e3ec41e4ef82c7d9315821cee69df0890cf3c4 Mon Sep 17 00:00:00 2001 From: wyuanchao Date: Wed, 2 Mar 2022 17:16:36 +0800 Subject: [PATCH 088/163] modify bundleState.d.ts Signed-off-by: wyuanchao --- api/@ohos.bundleState.d.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/api/@ohos.bundleState.d.ts b/api/@ohos.bundleState.d.ts index 9a5f353a8b..eb724fd056 100644 --- a/api/@ohos.bundleState.d.ts +++ b/api/@ohos.bundleState.d.ts @@ -25,14 +25,12 @@ import { AsyncCallback } from './basic'; * then returns it to you. * * @since 7 - * @devices phone, tablet, tv, wearable, car */ declare namespace bundleState { /** * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. */ @@ -86,7 +84,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. * @param toMerge Indicates the {@link BundleActiveInfo} object to merge. @@ -98,7 +95,6 @@ declare namespace bundleState { /** * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. */ @@ -134,7 +130,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. * @param bundleName Indicates the bundle name of the application to query. @@ -153,7 +148,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. * @return Returns the usage priority group of the calling application. @@ -164,7 +158,6 @@ declare namespace bundleState { /** * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. */ @@ -179,7 +172,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. * @param begin Indicates the start time of the query period, in milliseconds. @@ -194,7 +186,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. */ @@ -230,7 +221,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. * @param byInterval Indicates the interval at which the usage statistics are queried. @@ -248,7 +238,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. * @param begin Indicates the start time of the query period, in milliseconds. @@ -263,7 +252,6 @@ declare namespace bundleState { * * @since 7 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @devices phone, tablet, tv, wearable, car. * @permission ohos.permission.BUNDLE_ACTIVE_INFO. * @systemapi Hide this for inner system use. * @param begin Indicates the start time of the query period, in milliseconds. -- Gitee From a3c4480eba5d9f451bd159c12106acea3eb44f56 Mon Sep 17 00:00:00 2001 From: dy_study Date: Wed, 2 Mar 2022 02:37:39 +0000 Subject: [PATCH 089/163] IssueNo:api7 ts Description:commit applicationFramework api7 interface ts files Sig:SIG_ApplicationFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: dy_study Change-Id: Id5077cb0282c46fb0e5c93265055434ea8eee6b1 --- api/@ohos.ability.errorCode.d.ts | 49 +++++++++++++ api/@ohos.ability.featureAbility.d.ts | 1 + api/@ohos.ability.particleAbility.d.ts | 24 +++++++ api/@ohos.app.abilityManager.d.ts | 18 +++++ api/@ohos.bundle.d.ts | 74 ++++++++++++++++++-- api/ability/dataAbilityHelper.d.ts | 40 +++++++++++ api/app/appVersionInfo.d.ts | 46 ++++++++++++ api/app/context.d.ts | 97 +++++++++++++++++++++++++- api/app/processInfo.d.ts | 2 +- 9 files changed, 343 insertions(+), 8 deletions(-) create mode 100644 api/@ohos.ability.errorCode.d.ts create mode 100644 api/app/appVersionInfo.d.ts diff --git a/api/@ohos.ability.errorCode.d.ts b/api/@ohos.ability.errorCode.d.ts new file mode 100644 index 0000000000..155f039766 --- /dev/null +++ b/api/@ohos.ability.errorCode.d.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /** + * Defines error codes used when starting an ability, for example, featureAbility.ErrorCode.NO_ERROR. + * @since 6 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ +export enum ErrorCode { + /** + * Permission denied. + * @since 6 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + PERMISSION_DENY = -3, + + /** + * Ability not found. + * @since 6 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + ABILITY_NOT_FOUND = -2, + + /** + * Invalid parameter. + * @since 6 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + INVALID_PARAMETER = -1, + + /** + * No error. + * @since 6 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + NO_ERROR = 0 +} diff --git a/api/@ohos.ability.featureAbility.d.ts b/api/@ohos.ability.featureAbility.d.ts index 0aebda140e..44de8063d5 100644 --- a/api/@ohos.ability.featureAbility.d.ts +++ b/api/@ohos.ability.featureAbility.d.ts @@ -13,6 +13,7 @@ * limitations under the License. */ import { AsyncCallback } from './basic'; +import { Callback } from './basic'; import { Want } from './ability/want'; import { StartAbilityParameter } from './ability/startAbilityParameter'; import { AbilityResult } from './ability/abilityResult'; diff --git a/api/@ohos.ability.particleAbility.d.ts b/api/@ohos.ability.particleAbility.d.ts index 968b176d9c..f6d62b65b4 100644 --- a/api/@ohos.ability.particleAbility.d.ts +++ b/api/@ohos.ability.particleAbility.d.ts @@ -17,6 +17,8 @@ import { AsyncCallback } from './basic'; import { StartAbilityParameter } from './ability/startAbilityParameter'; import { DataAbilityHelper } from './ability/dataAbilityHelper'; import { NotificationRequest } from './notification/notificationRequest'; +import { ConnectOptions } from './ability/connectOptions'; +import { Want } from './ability/want'; /** * A Particle Ability represents an ability with service. @@ -85,5 +87,27 @@ declare namespace particleAbility { */ function cancelBackgroundRunning(callback: AsyncCallback): void; function cancelBackgroundRunning(): Promise; + + /** + * Connects an ability to a Service ability. + * + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel + * @param request Indicates the Service ability to connect. + * @param options Callback object for the client. If this parameter is null, an exception is thrown. + * @return unique identifier of the connection between the client and the service side. + * @FAModelOnly + */ + function connectAbility(request: Want, options:ConnectOptions ): number; + + /** + * Disconnects ability to a Service ability. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel + * @param connection the connection id returned from connectAbility api. + * @FAModelOnly + */ + function disconnectAbility(connection: number, callback:AsyncCallback): void; + function disconnectAbility(connection: number): Promise; } export default particleAbility; diff --git a/api/@ohos.app.abilityManager.d.ts b/api/@ohos.app.abilityManager.d.ts index cc24a83c7b..8dc9575ac0 100644 --- a/api/@ohos.app.abilityManager.d.ts +++ b/api/@ohos.app.abilityManager.d.ts @@ -80,6 +80,24 @@ declare namespace abilityManager { */ function deleteMissions(missionIds: Array): Promise; function deleteMissions(missionIds: Array, callback: AsyncCallback): void; + + /** + * Is it a ram-constrained device + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @return whether a ram-constrained device. + */ + function isRamConstrainedDevice(): Promise; + function isRamConstrainedDevice(callback: AsyncCallback): void; + + /** + * Get the memory size of the application + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @return application memory size. + */ + function getAppMemorySize(): Promise; + function getAppMemorySize(callback: AsyncCallback): void; } export default abilityManager; diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index bdef6418df..0a7500990c 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -22,6 +22,7 @@ import { Want } from './ability/want'; import { BundleInstaller } from './bundle/bundleInstaller'; import { ModuleUsageRecord } from './bundle/moduleUsageRecord'; import { PermissionDef } from './bundle/PermissionDef'; +import image from './@ohos.multimedia.image'; /** * bundle. @@ -383,6 +384,19 @@ declare namespace bundle { */ function getBundleInstaller(callback: AsyncCallback): void; function getBundleInstaller(): Promise; + + /** + * Obtains information about the current ability. + * + * @since 7 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the application bundle name to be queried. + * @param abilityName Indicates the ability name. + * @return Returns the AbilityInfo object for the current ability. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO + */ + function getAbilityInfo(bundleName: string, abilityName: string, callback: AsyncCallback): void; + function getAbilityInfo(bundleName: string, abilityName: string): Promise; /** * Obtains based on a given bundle name. @@ -392,12 +406,13 @@ declare namespace bundle { * @param bundleName Indicates the application bundle name to be queried. * @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo object * that will be returned. - * @param userId Indicates the user ID. + * @param userId Indicates the user ID or do not pass user ID. * @return Returns the ApplicationInfo object. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO */ function getApplicationInfo(bundleName: string, bundleFlags: number, userId: number, callback: AsyncCallback) : void; - function getApplicationInfo(bundleName: string, bundleFlags: number, userId: number) : Promise; + function getApplicationInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback) : void; + function getApplicationInfo(bundleName: string, bundleFlags: number, userId?: number) : Promise; /** * Query the AbilityInfo by the given Want. @@ -438,12 +453,13 @@ declare namespace bundle { * @syscap SystemCapability.BundleManager.BundleFramework * @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo objects * that will be returned. - * @param userId Indicates the user ID. + * @param userId Indicates the user ID or do not pass user ID. * @return Returns a list of ApplicationInfo objects. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED */ function getAllApplicationInfo(bundleFlags: number, userId: number, callback: AsyncCallback>) : void; - function getAllApplicationInfo(bundleFlags: number, userId: number) : Promise>; + function getAllApplicationInfo(bundleFlags: number, callback: AsyncCallback>) : void; + function getAllApplicationInfo(bundleFlags: number, userId?: number) : Promise>; /** * Obtains bundle name by the given uid. @@ -470,8 +486,6 @@ declare namespace bundle { function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback) : void function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number) : Promise; - /** - /** * Obtains the Want for starting the main ability of an application based on the * given bundle name. The main ability of an application is the ability that has the @@ -569,6 +583,54 @@ declare namespace bundle { */ function getPermissionDef(permissionName: string, callback: AsyncCallback): void; function getPermissionDef(permissionName: string): Promise; + + /** + * Obtains the label of a specified ability. + * + * @since 8 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the bundle name of the application to which the ability belongs. + * @param abilityName Indicates the ability name. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @return Returns the label representing the label of the specified ability. + */ + function getAbilityLabel(bundleName: string, abilityName: string, callback: AsyncCallback): void; + function getAbilityLabel(bundleName: string, abilityName: string): Promise; + + /** + * Obtains the icon of a specified ability. + * + * @since 8 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the bundle name of the application to which the ability belongs. + * @param abilityName Indicates the ability name. + * @return Returns the PixelMap object representing the icon of the specified ability. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + */ + function getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback): void; + function getAbilityIcon(bundleName: string, abilityName: string): Promise; + + /** + * Checks whether a specified ability is enabled. + * + * @since 8 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param info Indicates information about the ability to check. + * @returns Returns true if the ability is enabled; returns false otherwise. + */ + function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback): void; + function isAbilityEnabled(info: AbilityInfo): Promise; + + /** + * Checks whether a specified application is enabled. + * + * @since 8 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the bundle name of the application. + * @returns Returns true if the application is enabled; returns false otherwise. + */ + function isApplicationEnabled(bundleName: string, callback: AsyncCallback): void; + function isApplicationEnabled(bundleName: string): Promise; } export default bundle; diff --git a/api/ability/dataAbilityHelper.d.ts b/api/ability/dataAbilityHelper.d.ts index f1bf139a73..1fd91039bf 100644 --- a/api/ability/dataAbilityHelper.d.ts +++ b/api/ability/dataAbilityHelper.d.ts @@ -198,4 +198,44 @@ export interface DataAbilityHelper { */ query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void; query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): Promise; + + /** + * Calls the extended API of the DataAbility. This method uses a promise to return the result. + * + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel + * @param uri URI of the Data ability. Example: "dataability:///com.example.xxx.xxxx" + * @param method Indicates the method to call. + * @param arg Indicates the parameter of the String type. + * @param extras Indicates the parameter of the PacMap type. + * If a custom Sequenceable object is put in the PacMap object and will be transferred across processes, + * you must call BasePacMap.setClassLoader(ClassLoader) to set a class loader for the custom object. + * If the PacMap object is to be transferred to a non-OHOS process, + * values of primitive types are supported, but not custom Sequenceable objects. + * @return Returns the query result {@link PacMap}. + * @FAModelOnly + */ + call(uri: string, method: string, arg: string, extras: PacMap, callback: AsyncCallback): void; + call(uri: string, method: string, arg: string, extras: PacMap): Promise; +} + +/** + * Defines a PacMap object for storing a series of values. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel + * @FAModelOnly + */ + export interface PacMap { + + /** + * Indicates the parameter of the PacMap type. + * If a custom Sequenceable object is put in the PacMap object and will be transferred across processes, + * you must call BasePacMap.setClassLoader(ClassLoader) to set a class loader for the custom object. + * If the PacMap object is to be transferred to a non-OHOS process, + * values of primitive types are supported, but not custom Sequenceable objects. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.FAModel + * @FAModelOnly + */ + [key: string]: number | string | boolean | Array | null; } diff --git a/api/app/appVersionInfo.d.ts b/api/app/appVersionInfo.d.ts new file mode 100644 index 0000000000..9aa63fc268 --- /dev/null +++ b/api/app/appVersionInfo.d.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Defines an AppVersionInfo object. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ +export interface AppVersionInfo { + + /** + * Application name. + * @default appName + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + readonly appName: string; + + /** + * Application version number. + * @default versionCode + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + readonly versionCode: number; + + /** + * Application version name. + * @default versionName + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + readonly versionName: string; +} diff --git a/api/app/context.d.ts b/api/app/context.d.ts index 06097c18c9..048c033f5d 100644 --- a/api/app/context.d.ts +++ b/api/app/context.d.ts @@ -18,6 +18,10 @@ import { ApplicationInfo } from '../bundle/applicationInfo'; import { ProcessInfo } from './processInfo'; import { ElementName } from '../bundle/elementName'; import BaseContext from '../application/BaseContext'; +import { HapModuleInfo } from '../bundle/hapModuleInfo'; +import { AppVersionInfo } from './appVersionInfo'; +import { AbilityInfo } from '../bundle/abilityInfo'; + /** * The context of an ability or an application. It allows access to @@ -126,6 +130,97 @@ export interface Context extends BaseContext { */ getCallingBundle(callback: AsyncCallback): void getCallingBundle(): Promise; + + /** + * Obtains the file directory of this application on the internal storage. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getFilesDir(callback: AsyncCallback): void; + getFilesDir(): Promise; + + /** + * Obtains the cache directory of this application on the internal storage. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getCacheDir(callback: AsyncCallback): void; + getCacheDir(): Promise; + + /** + * Obtains the distributed file path for storing ability or application data files. + * If the distributed file path does not exist, the system will create a path and return the created path. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getOrCreateDistributedDir(): Promise; + getOrCreateDistributedDir(callback: AsyncCallback): void; + + /** + * Obtains the application type. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getAppType(callback: AsyncCallback): void + getAppType(): Promise; + + /** + * Obtains the ModuleInfo object for this application. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getHapModuleInfo(callback: AsyncCallback): void + getHapModuleInfo(): Promise; + + /** + * Obtains the application version information. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getAppVersionInfo(callback: AsyncCallback): void + getAppVersionInfo(): Promise; + + /** + * Obtains the context of this application. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getApplicationContext(): Context; + + /** + * Checks the detailed information of this ability. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + getAbilityInfo(callback: AsyncCallback): void + getAbilityInfo(): Promise; + + /** + * Checks whether the configuration of this ability is changing. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @return true if the configuration of this ability is changing and false otherwise. + * @FAModelOnly + */ + isUpdatingConfigurations(): Promise; + isUpdatingConfigurations(callback: AsyncCallback): void; + + /** + * Informs the system of the time required for drawing this Page ability. + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @FAModelOnly + */ + printDrawnCompleted(): Promise; + printDrawnCompleted(callback: AsyncCallback): void; } /** @@ -184,4 +279,4 @@ interface PermissionOptions { * @FAModelOnly */ uid?: number; -} \ No newline at end of file +} diff --git a/api/app/processInfo.d.ts b/api/app/processInfo.d.ts index 1074141503..5f3c2a825d 100644 --- a/api/app/processInfo.d.ts +++ b/api/app/processInfo.d.ts @@ -37,5 +37,5 @@ export interface ProcessInfo { * @since 7 * @syscap SystemCapability.Ability.AbilityRuntime.Core */ - processName: string; + processName: string; } \ No newline at end of file -- Gitee From da077a3c7ae71d302287608c9e9aba8e7d93526f Mon Sep 17 00:00:00 2001 From: gudehe Date: Tue, 1 Mar 2022 20:35:18 +0800 Subject: [PATCH 090/163] add permission for medialibrary Signed-off-by: gudehe --- api/@ohos.multimedia.mediaLibrary.d.ts | 54 +++++++++++++++++++------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/api/@ohos.multimedia.mediaLibrary.d.ts b/api/@ohos.multimedia.mediaLibrary.d.ts index c2ff5cc72d..45a0cbd125 100644 --- a/api/@ohos.multimedia.mediaLibrary.d.ts +++ b/api/@ohos.multimedia.mediaLibrary.d.ts @@ -14,7 +14,7 @@ */ import { AsyncCallback, Callback } from './basic'; -import Context from './app/context'; +import { Context } from './app/context'; import image from './@ohos.multimedia.image'; /** @@ -262,6 +262,7 @@ declare namespace mediaLibrary { * If it is a directory where the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param callback Callback return the result of isDerectory. */ isDirectory(callback: AsyncCallback): void; @@ -269,27 +270,29 @@ declare namespace mediaLibrary { * If it is a directory where the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA */ isDirectory():Promise; /** * Modify meta data where the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param callback no value will be returned. - * @systemapi */ commitModify(callback: AsyncCallback): void; /** * Modify meta data where the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @systemapi + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA */ commitModify(): Promise; /** * Open the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA * @param mode mode for open, for example: rw, r, w. * @param callback Callback return the fd of the file. */ @@ -298,6 +301,7 @@ declare namespace mediaLibrary { * Open the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA * @param mode mode for open, for example: rw, r, w. */ open(mode: string): Promise; @@ -305,6 +309,7 @@ declare namespace mediaLibrary { * Close the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA * @param fd fd of the file which had been opened * @param callback no value will be returned. */ @@ -313,6 +318,7 @@ declare namespace mediaLibrary { * Close the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA * @param fd fd of the file which had been opened */ close(fd: number): Promise; @@ -320,6 +326,7 @@ declare namespace mediaLibrary { * Get thumbnail of the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param callback Callback used to return the thumbnail's pixelmap. */ getThumbnail(callback: AsyncCallback): void; @@ -327,6 +334,7 @@ declare namespace mediaLibrary { * Get thumbnail of the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param size thumbnail's size * @param callback Callback used to return the thumbnail's pixelmap. */ @@ -335,6 +343,7 @@ declare namespace mediaLibrary { * Get thumbnail of the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param size thumbnail's size */ getThumbnail(size?: Size): Promise; @@ -342,64 +351,64 @@ declare namespace mediaLibrary { * Set favorite for the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param isFavorite ture is favorite file, false is not favorite file * @param callback Callback used to return, No value is returned. - * @systemapi */ favorite(isFavorite: boolean, callback: AsyncCallback): void; /** * Set favorite for the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param isFavorite ture is favorite file, false is not favorite file - * @systemapi */ favorite(isFavorite: boolean): Promise; /** * If the file is favorite when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param callback Callback used to return true or false. - * @systemapi */ isFavorite(callback: AsyncCallback): void; /** * If the file is favorite when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @systemapi + * @permission ohos.permission.READ_MEDIA */ isFavorite():Promise; /** * Set trash for the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param isTrash true is trashed file, false is not trashed file * @param callback Callback used to return, No value is returned. - * @systemapi */ trash(isTrash: boolean, callback: AsyncCallback): void; /** * Set trash for the file when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param isTrash true is trashed file, false is not trashed file - * @systemapi */ - trash(isTrash: boolean,): Promise; + trash(isTrash: boolean): Promise; /** * If the file is in trash when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param callback Callback used to return true or false. - * @systemapi */ isTrash(callback: AsyncCallback): void; /** * If the file is in trash when the file is located. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @systemapi + * @permission ohos.permission.READ_MEDIA */ isTrash():Promise; } @@ -545,7 +554,7 @@ declare namespace mediaLibrary { */ selectionArgs: Array; /** - * Sorting criterion of the retrieval results, for example, order: "datetaken DESC,_display_name DESC, _id DESC". + * Sorting criterion of the retrieval results, for example, order: "datetaken DESC,display_name DESC, file_id DESC". * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core */ @@ -741,21 +750,22 @@ declare namespace mediaLibrary { * Modify the meta data for the album * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param callback, no value will be returned. - * @systemapi */ commitModify(callback: AsyncCallback): void; /** * Modify the meta data for the album * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @systemapi + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA */ commitModify(): Promise; /** * SObtains files in an album. This method uses an asynchronous callback to return the files. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param callback Callback used to return the files in the format of a FetchFileResult instance. */ getFileAssets(callback: AsyncCallback): void; @@ -763,6 +773,7 @@ declare namespace mediaLibrary { * SObtains files in an album. This method uses an asynchronous callback to return the files. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param option Media retrieval options. * @param callback Callback used to return the files in the format of a FetchFileResult instance. */ @@ -771,6 +782,7 @@ declare namespace mediaLibrary { * Obtains files in an album. This method uses a promise to return the files. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param option Media retrieval options. * @return A Promise instance used to return the files in the format of a FetchFileResult instance. */ @@ -849,6 +861,7 @@ declare namespace mediaLibrary { * if need all data, getAllObject from FetchFileResult * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param options, Media retrieval options. * @param callback, Callback return the FetchFileResult. */ @@ -858,6 +871,7 @@ declare namespace mediaLibrary { * if need all data, getAllObject from FetchFileResult * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param options Media retrieval options. * @return A promise instance used to return the files in the format of a FetchFileResult instance */ @@ -882,6 +896,7 @@ declare namespace mediaLibrary { * Create File Asset * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param mediaType mediaType for example:IMAGE, VIDEO, AUDIO, FILE * @param displayName file name * @param relativePath relative path @@ -892,6 +907,7 @@ declare namespace mediaLibrary { * Create File Asset * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param mediaType mediaType for example:IMAGE, VIDEO, AUDIO, FILE * @param displayName file name * @param relativePath relative path @@ -902,6 +918,7 @@ declare namespace mediaLibrary { * Delete File Asset * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param uri FileAsset's URI * @param callback no value returned * @systemapi @@ -911,6 +928,7 @@ declare namespace mediaLibrary { * Delete File Asset * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA * @param uri, FileAsset's URI * @return A Promise instance, no value returned * @systemapi @@ -920,6 +938,7 @@ declare namespace mediaLibrary { * Obtains albums based on the media retrieval options. This method uses an asynchronous callback to return. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param option Media retrieval options. * @param callback Callback used to return an album array. */ @@ -928,6 +947,7 @@ declare namespace mediaLibrary { * Obtains albums based on the media retrieval options. This method uses a promise to return the albums. * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core + * @permission ohos.permission.READ_MEDIA * @param option Media retrieval options. * @return A Promise instance used to return an album array. */ @@ -999,6 +1019,7 @@ declare namespace mediaLibrary { * Get Active Peer device information * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore + * @permission ohos.permission.READ_MEDIA * @systemapi * @param callback, Callback return the list of the active peer devices' information */ @@ -1007,6 +1028,7 @@ declare namespace mediaLibrary { * Get Active Peer device information * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore + * @permission ohos.permission.READ_MEDIA * @systemapi * @return Promise used to return the list of the active peer devices' information */ @@ -1015,6 +1037,7 @@ declare namespace mediaLibrary { * Get all the peer devices' information * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore + * @permission ohos.permission.READ_MEDIA * @systemapi * @param callback Callback return the list of the all the peer devices' information */ @@ -1023,6 +1046,7 @@ declare namespace mediaLibrary { * Get all the peer devices' information * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore + * @permission ohos.permission.READ_MEDIA * @systemapi * @return Promise used to return the list of the all the peer devices' information */ -- Gitee From a6319053f741bab04df7ed0e003443d44817f966 Mon Sep 17 00:00:00 2001 From: linjun9528 Date: Wed, 2 Mar 2022 17:32:06 +0800 Subject: [PATCH 091/163] alter js api description Signed-off-by: linjun9528 --- api/common/@system.file.d.ts | 187 ++++++++++++++++++----------------- 1 file changed, 96 insertions(+), 91 deletions(-) diff --git a/api/common/@system.file.d.ts b/api/common/@system.file.d.ts index 7f2424a1f5..e5ef9f3e20 100644 --- a/api/common/@system.file.d.ts +++ b/api/common/@system.file.d.ts @@ -16,6 +16,7 @@ export interface FileResponse { /** * File URI. + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; @@ -23,6 +24,7 @@ export interface FileResponse { /** * File size, in bytes. * If type is dir, the length value is fixed to 0. + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ length: number; @@ -30,6 +32,7 @@ export interface FileResponse { /** * Timestamp when the file is stored, which is the number of milliseconds elapsed since 1970/01/01 00:00:00. * For lite wearables, the value is fixed to 0, because this parameter is restricted by the underlying file system. + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ lastModifiedTime: number; @@ -38,6 +41,7 @@ export interface FileResponse { * File type. The values are as follows: * dir: directory * file: file + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ type: "dir" | "file"; @@ -45,13 +49,14 @@ export interface FileResponse { /** * File list. When the recursive value is true and the type is dir, the file information under the subdirectory will be returned. * Otherwise, no value will be returned. + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ subFiles?: Array; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileMoveOption { /** @@ -59,7 +64,7 @@ export interface FileMoveOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ srcUri: string; @@ -69,7 +74,7 @@ export interface FileMoveOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ dstUri: string; @@ -77,39 +82,39 @@ export interface FileMoveOption { /** * Called when the source file is moved to the specified location successfully. * This function returns the URI of the file moved to the target location. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: (uri: string) => void; /** * Called when moving fails. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileListResponse { /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fileList: Array; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileListOption { /** @@ -117,28 +122,28 @@ export interface FileListOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; /** * Called when the list is obtained successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: (data: FileListResponse) => void; /** * Called when the list fails to be obtained. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; @@ -150,7 +155,7 @@ export interface FileCopyOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ srcUri: string; @@ -160,7 +165,7 @@ export interface FileCopyOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ dstUri: string; @@ -168,21 +173,21 @@ export interface FileCopyOption { /** * Called when the copy file is saved successful. * This function returns the URI of the file saved to the target location. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: (uri: string) => void; /** * Called when the copy or save operation fails. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; @@ -194,7 +199,7 @@ export interface FileGetOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; @@ -202,28 +207,28 @@ export interface FileGetOption { /** * Whether to recursively obtain the file list under a subdirectory. * The default value is false. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ recursive?: boolean; /** * Called when file information is obtained successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: (file: FileResponse) => void; /** * Called when file information fails to be obtained. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; @@ -235,35 +240,35 @@ export interface FileDeleteOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; /** * Called when local files are deleted successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: () => void; /** * Called when the deletion fails. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileWriteTextOption { /** @@ -271,60 +276,60 @@ export interface FileWriteTextOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; /** * Character string to write into the local file. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ text: string; /** * Encoding format. The default format is UTF-8. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ encoding?: string; /** * Whether to enable the append mode. The default value is false. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ append?: boolean; /** * Called when texts are written into a file successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: () => void; /** * Called when texts fail to be written into a file. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileReadTextResponse { /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ text: string; @@ -336,7 +341,7 @@ export interface FileReadTextOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; @@ -344,7 +349,7 @@ export interface FileReadTextOption { /** * Encoding format. The default format is UTF-8. * Currently, only UTF-8 is supported. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ encoding?: string; @@ -352,7 +357,7 @@ export interface FileReadTextOption { /** * Position where the reading starts. * The default value is the start position of the file. - * @devices liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ position?: number; @@ -360,35 +365,35 @@ export interface FileReadTextOption { /** * Position where the reading starts. * The default value is the start position of the file. - * @devices liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ length?: number; /** * Called when texts are read successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: (data: FileReadTextResponse) => void; /** * Called when texts fail to be read. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileWriteArrayBufferOption { /** @@ -396,21 +401,21 @@ export interface FileWriteArrayBufferOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; /** * Buffer from which the data is derived. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ buffer: Uint8Array; /** * Offset to the position where the writing starts. The default value is 0. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ position?: number; @@ -418,46 +423,46 @@ export interface FileWriteArrayBufferOption { /** * Whether to enable the append mode. * The default value is false. If the value is true, the position parameter will become invalid. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ append?: boolean; /** * Called when data from a buffer is written into a file successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: () => void; /** * Called when data from a buffer fails to be written into a file. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileReadArrayBufferResponse { /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ buffer: Uint8Array; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileReadArrayBufferOption { /** @@ -465,7 +470,7 @@ export interface FileReadArrayBufferOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; @@ -473,7 +478,7 @@ export interface FileReadArrayBufferOption { /** * Position where the reading starts. * The default value is the start position of the file. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ position?: number; @@ -481,35 +486,35 @@ export interface FileReadArrayBufferOption { /** * Length of the content to read. * If this parameter is not set, all content of the file will be read. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ length?: number; /** * Called when the buffer data is read successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: (data: FileReadArrayBufferResponse) => void; /** * Called when the buffer data fails to be read. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileAccessOption { /** @@ -517,35 +522,35 @@ export interface FileAccessOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; /** * Called when the check result is obtained successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: () => void; /** * Called when the check fails. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileMkdirOption { /** @@ -554,7 +559,7 @@ export interface FileMkdirOption { * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. * 3. A maximum of five recursions are allowed for creating the directory. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; @@ -562,35 +567,35 @@ export interface FileMkdirOption { /** * Whether to create the directory after creating its upper-level directory recursively. * The default value is false. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ recursive?: boolean; /** * Called when the directory is created successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: () => void; /** * Called when the creation fails. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export interface FileRmdirOption { /** @@ -598,7 +603,7 @@ export interface FileRmdirOption { * Restricted by the underlying file system of lite wearables, the value must meet the following requirements: * 1. The URI cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * 2. The maximum number of characters allowed is 128. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ uri: string; @@ -606,118 +611,118 @@ export interface FileRmdirOption { /** * Whether to delete files and subdirectories recursively. * The default value is false. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ recursive?: boolean; /** * Called when the directory is deleted successfully. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ success?: () => void; /** * Called when the deletion fails. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO * @since 3 */ complete?: () => void; } /** - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @syscap SystemCapability.FileManagement.File.FileIO */ export default class File { /** * Moves the source file to a specified location. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static move(options: FileMoveOption): void; /** * Copies a source file and save the copy to a specified location. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static copy(options: FileCopyOption): void; /** * Obtains the list of files in a specified directory. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static list(options: FileListOption): void; /** * Obtains information about a local file. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static get(options: FileGetOption): void; /** * Deletes local files. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static delete(options: FileDeleteOption): void; /** * Writes texts into a file. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static writeText(options: FileWriteTextOption): void; /** * Reads texts from a file. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static readText(options: FileReadTextOption): void; /** * Writes data from a buffer into a file. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static writeArrayBuffer(options: FileWriteArrayBufferOption): void; /** * Reads buffer data from a file. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static readArrayBuffer(options: FileReadArrayBufferOption): void; /** * Checks whether a file or directory exists. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static access(options: FileAccessOption): void; /** * Creates a directory. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static mkdir(options: FileMkdirOption): void; /** * Deletes a directory. + * @syscap SystemCapability.FileManagement.File.FileIO * @param options Options. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static rmdir(options: FileRmdirOption): void; } -- Gitee From 800cb64127ed52e785dd32f3fcb820a9b85839f5 Mon Sep 17 00:00:00 2001 From: linjun9528 Date: Wed, 2 Mar 2022 19:10:04 +0800 Subject: [PATCH 092/163] alter file js api description Signed-off-by: linjun9528 --- api/common/@system.file.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/common/@system.file.d.ts b/api/common/@system.file.d.ts index e5ef9f3e20..b65af860dc 100644 --- a/api/common/@system.file.d.ts +++ b/api/common/@system.file.d.ts @@ -452,6 +452,7 @@ export interface FileWriteArrayBufferOption { /** * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 */ export interface FileReadArrayBufferResponse { /** @@ -463,6 +464,7 @@ export interface FileReadArrayBufferResponse { /** * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 */ export interface FileReadArrayBufferOption { /** @@ -515,6 +517,7 @@ export interface FileReadArrayBufferOption { /** * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 */ export interface FileAccessOption { /** @@ -551,6 +554,7 @@ export interface FileAccessOption { /** * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 */ export interface FileMkdirOption { /** @@ -596,6 +600,7 @@ export interface FileMkdirOption { /** * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 */ export interface FileRmdirOption { /** @@ -640,11 +645,13 @@ export interface FileRmdirOption { /** * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 */ export default class File { /** * Moves the source file to a specified location. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static move(options: FileMoveOption): void; @@ -652,6 +659,7 @@ export default class File { /** * Copies a source file and save the copy to a specified location. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static copy(options: FileCopyOption): void; @@ -659,6 +667,7 @@ export default class File { /** * Obtains the list of files in a specified directory. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static list(options: FileListOption): void; @@ -666,6 +675,7 @@ export default class File { /** * Obtains information about a local file. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static get(options: FileGetOption): void; @@ -673,6 +683,7 @@ export default class File { /** * Deletes local files. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static delete(options: FileDeleteOption): void; @@ -680,6 +691,7 @@ export default class File { /** * Writes texts into a file. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static writeText(options: FileWriteTextOption): void; @@ -687,6 +699,7 @@ export default class File { /** * Reads texts from a file. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static readText(options: FileReadTextOption): void; @@ -694,6 +707,7 @@ export default class File { /** * Writes data from a buffer into a file. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static writeArrayBuffer(options: FileWriteArrayBufferOption): void; @@ -701,6 +715,7 @@ export default class File { /** * Reads buffer data from a file. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static readArrayBuffer(options: FileReadArrayBufferOption): void; @@ -708,6 +723,7 @@ export default class File { /** * Checks whether a file or directory exists. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static access(options: FileAccessOption): void; @@ -715,6 +731,7 @@ export default class File { /** * Creates a directory. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static mkdir(options: FileMkdirOption): void; @@ -722,6 +739,7 @@ export default class File { /** * Deletes a directory. * @syscap SystemCapability.FileManagement.File.FileIO + * @since 3 * @param options Options. */ static rmdir(options: FileRmdirOption): void; -- Gitee From aba438d2e05b40e92ff94b0f1d95f0490911a85f Mon Sep 17 00:00:00 2001 From: kukixi Date: Wed, 2 Mar 2022 19:32:45 +0800 Subject: [PATCH 093/163] add arkui api syscap Signed-off-by: kukixi Change-Id: I5994bbd6ab7d5a4c07854adcf593a35d2fcc5533 --- api/@ohos.animator.d.ts | 1 + api/@ohos.curves.d.ts | 1 + api/@ohos.matrix4.d.ts | 1 + api/@ohos.mediaquery.d.ts | 17 +++++--- api/@ohos.pluginComponent.d.ts | 2 + api/@ohos.prompt.d.ts | 1 + api/@ohos.router.d.ts | 4 ++ api/common/@internal/console.d.ts | 1 + api/common/@internal/global.d.ts | 13 ++++++ api/common/@internal/viewmodel.d.ts | 62 ++++++++++++++++++++++++++- api/common/@system.app.d.ts | 10 +++++ api/common/@system.configuration.d.ts | 6 +++ api/common/@system.mediaquery.d.ts | 10 +++++ api/common/@system.prompt.d.ts | 26 +++++++++++ api/common/@system.router.d.ts | 29 +++++++++++++ 15 files changed, 178 insertions(+), 6 deletions(-) diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts index 2f306abcc6..6ed9e0219b 100644 --- a/api/@ohos.animator.d.ts +++ b/api/@ohos.animator.d.ts @@ -14,6 +14,7 @@ */ /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices phone, tablet, wearable, tv, car * @since 6 */ diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index 1ffd9819ad..c4166aaf66 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -16,6 +16,7 @@ /** * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. * @import import Curves from '@ohos.curves' + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices phone, tablet, tv, wearable * @since 7 */ diff --git a/api/@ohos.matrix4.d.ts b/api/@ohos.matrix4.d.ts index 635a260179..30158cb8cc 100644 --- a/api/@ohos.matrix4.d.ts +++ b/api/@ohos.matrix4.d.ts @@ -16,6 +16,7 @@ /** * Used to do matrix operations * @import import Matrix4 from '@ohos.matrix4' + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices phone, tablet, tv, wearable * @since 7 */ diff --git a/api/@ohos.mediaquery.d.ts b/api/@ohos.mediaquery.d.ts index fe889218bf..011ea459d1 100644 --- a/api/@ohos.mediaquery.d.ts +++ b/api/@ohos.mediaquery.d.ts @@ -15,6 +15,13 @@ import {Callback} from './basic'; +/** + * Used to do mediaquery operations. + * @import import mediaquery from '@ohos.mediaquery' + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @devices phone, tablet, tv, wearable + * @since 7 + */ declare namespace mediaquery { interface MediaQueryResult { @@ -22,14 +29,14 @@ declare namespace mediaquery { /** * Whether the match condition is met. * This parameter is read-only. - * @since 8 + * @since 7 */ readonly matches: boolean; /** * Matching condition of a media event. * This parameter is read-only. - * @since 8 + * @since 7 */ readonly media: string; } @@ -39,21 +46,21 @@ declare namespace mediaquery { /** * Registers a callback with the corresponding query condition by using the handle. * This callback is triggered when the media attributes change. - * @since 8 + * @since 7 */ on(type: 'change', callback: Callback): void; /** * Deregisters a callback with the corresponding query condition by using the handle. * This callback is not triggered when the media attributes chang. - * @since 8 + * @since 7 */ off(type: 'change', callback?: Callback): void; } /** * Sets the media query criteria and returns the corresponding listening handle - * @since 8 + * @since 7 */ function matchMediaSync(condition: string): MediaQueryListener; } diff --git a/api/@ohos.pluginComponent.d.ts b/api/@ohos.pluginComponent.d.ts index c73c4d7342..4e54e39500 100644 --- a/api/@ohos.pluginComponent.d.ts +++ b/api/@ohos.pluginComponent.d.ts @@ -18,6 +18,7 @@ import { Want } from './ability/want'; /** * Plugin component template property. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ interface PluginComponentTemplate { @@ -27,6 +28,7 @@ interface PluginComponentTemplate { /** * Plugin component manager interface. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ declare namespace pluginComponentManager { diff --git a/api/@ohos.prompt.d.ts b/api/@ohos.prompt.d.ts index 40dc9faa4b..0cdce80386 100644 --- a/api/@ohos.prompt.d.ts +++ b/api/@ohos.prompt.d.ts @@ -16,6 +16,7 @@ import {AsyncCallback} from './basic'; /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 * @import prompt from '@ohos.prompt'; */ diff --git a/api/@ohos.router.d.ts b/api/@ohos.router.d.ts index dc9fb60ca4..74a6234d48 100644 --- a/api/@ohos.router.d.ts +++ b/api/@ohos.router.d.ts @@ -16,6 +16,7 @@ import {Callback} from './basic'; /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 * @import router from '@ohos.router'; */ @@ -33,6 +34,7 @@ declare namespace router { * pages/index/index * pages/detail/detail * 2. Particular path. If the URI is a slash (/), the home page is displayed. + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 8 */ url: string; @@ -41,6 +43,7 @@ declare namespace router { * Data that needs to be passed to the destination page during navigation. * After the destination page is displayed, the parameter can be directly used for the page. * For example, this.data1 (data1 is the key value of the params used for page navigation.) + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 8 */ params?: Object; @@ -54,6 +57,7 @@ declare namespace router { /** * Returns to the page of the specified path. * If the page with the specified path does not exist in the page stack, router.back() is called by default. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ path?: string; diff --git a/api/common/@internal/console.d.ts b/api/common/@internal/console.d.ts index 69aa3336d5..f1eec6e6d8 100644 --- a/api/common/@internal/console.d.ts +++ b/api/common/@internal/console.d.ts @@ -14,6 +14,7 @@ */ /** + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3 */ diff --git a/api/common/@internal/global.d.ts b/api/common/@internal/global.d.ts index 36a6d6d182..dd3a79286b 100644 --- a/api/common/@internal/global.d.ts +++ b/api/common/@internal/global.d.ts @@ -15,6 +15,7 @@ /** * Sets the interval for repeatedly calling a function. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. * @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. @@ -26,6 +27,7 @@ export declare function setInterval(handler: Function | string, delay: number, . /** * Sets a timer after which a function will be executed. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. @@ -37,6 +39,7 @@ export declare function setTimeout(handler: Function | string, delay?: number, . /** * Cancels the interval set by " setInterval()". + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @param intervalID Indicates the timer ID returned by "setInterval()". * @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3 @@ -45,6 +48,7 @@ export declare function clearInterval(intervalID?: number): void; /** * Cancels the timer set by "setTimeout()". + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @param timeoutID Indicates the timer ID returned by "setTimeout()". * @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3 @@ -53,6 +57,7 @@ export declare function clearTimeout(timeoutID?: number): void; /** * Obtain the objects exposed in app.js + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable, smartVision * @since 6 */ @@ -60,6 +65,7 @@ export declare function getApp(): object; /** * You can create an Image object by calling new Image(). + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export declare class Image { @@ -92,6 +98,7 @@ export declare class Image { /** * An ImageData object is a common object that stores the actual pixel data of a Canvas object. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export declare class ImageData { @@ -115,6 +122,7 @@ export declare class ImageData { /** * OffscreenCanvas provides a Canvas object that can be rendered off-screen. * It works in both window and Web worker environments. + * @syscap SystemCapability.ArkUI.ArkUI.Full */ export declare class OffscreenCanvas { /** @@ -156,6 +164,9 @@ export declare class OffscreenCanvas { transferToImageBitmap(): ImageBitmap; } +/** + * @syscap SystemCapability.ArkUI.ArkUI.Full + */ export declare class ImageBitmap { /** * The height of the Image Bitmap object @@ -170,10 +181,12 @@ export declare class ImageBitmap { /** * Conditional compilation for rich equipment + * @syscap SystemCapability.ArkUI.ArkUI.Full */ export declare const STANDARD: string; /** * Conditional compilation for lite equipment + * @syscap SystemCapability.ArkUI.ArkUI.Full */ export declare const LITE: string; diff --git a/api/common/@internal/viewmodel.d.ts b/api/common/@internal/viewmodel.d.ts index 149e18bb6e..062a8d2c2a 100644 --- a/api/common/@internal/viewmodel.d.ts +++ b/api/common/@internal/viewmodel.d.ts @@ -18,6 +18,7 @@ import { WebGLContextAttributes, WebGLRenderingContext } from "../webgl/webgl"; import { WebGL2RenderingContext } from "../webgl/webgl2"; /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface FocusParamObj { @@ -28,6 +29,7 @@ export interface FocusParamObj { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface RectObj { @@ -50,6 +52,7 @@ export interface RectObj { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface ContextAttrOptions { @@ -57,6 +60,7 @@ export interface ContextAttrOptions { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface AnimateStyle { @@ -131,6 +135,7 @@ export interface AnimateStyle { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface TransformObject { @@ -302,6 +307,7 @@ export interface TransformObject { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface AnimateOptions { @@ -365,6 +371,7 @@ export interface AnimateOptions { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface AnimationResult { @@ -440,6 +447,7 @@ export interface AnimationResult { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface Element { @@ -520,6 +528,9 @@ export interface Element { setStyle(name: string, value: string): boolean } +/** + * @syscap SystemCapability.ArkUI.ArkUI.Full + */ export interface observer { /** * Turn on the listener. @@ -534,6 +545,7 @@ export interface observer { /** * animation element + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface AnimationElement extends Element { @@ -565,6 +577,7 @@ export interface AnimationElement extends Element { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface ScrollParam { @@ -588,6 +601,7 @@ export interface ScrollParam { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface CurrentOffsetResultValue { @@ -605,6 +619,7 @@ export interface CurrentOffsetResultValue { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ export interface ListScrollToOptions { @@ -616,6 +631,7 @@ export interface ListScrollToOptions { /** * The component provides a list container. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface ListElement extends Element { @@ -703,6 +719,7 @@ export interface ListElement extends Element { /** * The component provides a swiper container. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface SwiperElement extends Element { @@ -732,6 +749,7 @@ export interface SwiperElement extends Element { /** * @devices tv, phone, tablet, wearable + * @syscap SystemCapability.ArkUI.ArkUI.Full */ export interface CameraTakePhotoOptions { /** @@ -762,7 +780,8 @@ export interface CameraTakePhotoOptions { } /** - * The component provides preview and photographing functions.. + * The component provides preview and photographing functions. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface CameraElement extends Element { @@ -776,6 +795,7 @@ export interface CameraElement extends Element { /** * The component is a container for displaying web page content. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet */ export interface WebElement extends Element { @@ -788,6 +808,7 @@ export interface WebElement extends Element { /** * The component is a custom pop-up container. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface DialogElement extends Element { @@ -805,6 +826,7 @@ export interface DialogElement extends Element { /** * The component is used to provide an image frame animator. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface ImageAnimatorElement extends Element { @@ -841,6 +863,7 @@ export interface ImageAnimatorElement extends Element { /** * The component inserts scrolling text, which is displayed in a single line by default. * When the text length exceeds the display area of the component, the marquee effect is displayed. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface MarqueeElement extends Element { @@ -859,6 +882,7 @@ export interface MarqueeElement extends Element { /** * The component provides menus as temporary pop-up windows to display operations that can be performed by users. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet */ export interface MenuElement extends Element { @@ -878,6 +902,7 @@ export interface MenuElement extends Element { /** * The component displays line charts, gauge charts, and bar charts. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface ChartElement extends Element { @@ -902,6 +927,7 @@ export interface ChartElement extends Element { /** * The component provides an interactive interface to receive user input, which is displayed in a single line by default. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @devices tv, phone, tablet, wearable */ export interface InputElement extends Element { @@ -930,6 +956,7 @@ export interface InputElement extends Element { /** * The