diff --git a/CODEOWNERS b/CODEOWNERS index 9a386c2a47546563e5dbbf48be8464054f323e29..1723d5288fa2d4fa89dff9a3c2999c31370b55fd 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -135,7 +135,7 @@ zh-cn/application-dev/IDL/ @RayShih @littlejerry1 @gwang2008 @ccllee @chengxingz zh-cn/application-dev/device-usage-statistics/ @chenmingJay @ningningW @tangtiantian2021 @nan-xiansen @iceice1001 zh-cn/application-dev/ui/ @HelloCrease @huaweimaxuchu @tomatodevboy @niulihua zh-cn/application-dev/notification/ @RayShih @jayleehw @li-weifeng2 @currydavids -zh-cn/application-dev/windowmanager/ @ge-yafang @zhangqiang183 @zhouyaoying @zxg-gitee +zh-cn/application-dev/windowmanager/ @ge-yafang @zhangqiang183 @zhouyaoying @zxg-gitee @nobuggers zh-cn/application-dev/webgl/ @zengyawen @zhangqiang183 @wind_zj @zxg-gitee zh-cn/application-dev/media/audio-overview.md @zengyawen @liuyuehua1 @saga2020 @currydavids zh-cn/application-dev/media/audio-playback.md @zengyawen @liuyuehua1 @saga2020 @currydavids @@ -186,9 +186,12 @@ zh-cn/application-dev/dfx/errormanager-guidelines.md @littlejerry1 @ccllee @chen zh-cn/application-dev/dfx/errormanager-guidelines.md @littlejerry1 @ccllee @chengxingzhen @RayShih zh-cn/application-dev/key-features/multi-device-app-dev/ @lingminghw @crazyracing0726 zh-cn/application-dev/database/ @ge-yafang @feng-aiwen @gong-a-shi @logic42 -zh-cn/application-dev/napi/native-window-guidelines.md @ge-yafang @zhangqiang183 @zhouyaoying @zxg-gitee -zh-cn/application-dev/napi/mindspore-lite-guidelines.md @ge-yafang @grbuzhidao @jianghui58 @auraxu -zh-cn/application-dev/napi/mindspore-lite-offline-model-guidelines.md @ge-yafang @grbuzhidao @jianghui58 @auraxu +zh-cn/application-dev/napi/native-window-guidelines.md @ge-yafang @zhangqiang183 @zhouyaoying @zxg-gitee @nobuggers +zh-cn/application-dev/napi/mindspore-lite-guidelines.md @ge-yafang @principal87 @jianghui58 +zh-cn/application-dev/napi/mindspore-lite-offline-model-guidelines.md @ge-yafang @principal87 @jianghui58 +zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md @ge-yafang @principal87 @jianghui58 +zh-cn/application-dev/ai/mindspore-lite-js-guidelines.md @ge-yafang @principal87 @jianghui58 +zh-cn/application-dev/napi/neural-network-runtime-guidelines.md @ge-yafang @principal87 @win10wei zh-cn/application-dev/napi/rawfile_guidelines.md @ningningW zh-cn/application-dev/background-agent-scheduled-reminder/ @RayShih zh-cn/application-dev/background-task-management/ @ningningW @wangwenli_wolf @tangtiantian2021 @nan-xiansen @@ -275,9 +278,9 @@ zh-cn/application-dev/reference/apis/js-apis-application-shellCmdResult.md @litt zh-cn/application-dev/reference/apis/js-apis-application-StartOptions.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen zh-cn/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen zh-cn/application-dev/reference/apis/js-apis-application-Want.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen -zh-cn/application-dev/reference/apis/js-apis-application-WindowExtensionAbility.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee -zh-cn/application-dev/application-models/windowextensionability.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee -zh-cn/application-dev/reference/apis/js-apis-inner-application-windowExtensionContext.md @ge-yafang @zhouyaoying @zxg-gitee +zh-cn/application-dev/reference/apis/js-apis-application-WindowExtensionAbility.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee @nobuggers +zh-cn/application-dev/application-models/windowextensionability.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee @nobuggers +zh-cn/application-dev/reference/apis/js-apis-inner-application-windowExtensionContext.md @ge-yafang @zhouyaoying @zxg-gitee @nobuggers zh-cn/application-dev/reference/apis/js-apis-appmanager.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen zh-cn/application-dev/reference/apis/js-apis-arraylist.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-audio.md @liuyuehua1 @zengyawen @magekkkk @currydavids @@ -334,7 +337,7 @@ zh-cn/application-dev/reference/apis/js-apis-deque.md @gongjunsong @ge-yafang @f zh-cn/application-dev/reference/apis/js-apis-device-info.md @mupceet @zengyawen @handyohos @nan-xiansen zh-cn/application-dev/reference/apis/js-apis-device-manager.md @intermilano @RayShih @william-ligang @liuhonggang123 zh-cn/application-dev/reference/apis/js-apis-deviceUsageStatistics.md @shuaytao @RayShih @wangzhen107 @inter515 -zh-cn/application-dev/reference/apis/js-apis-display.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee +zh-cn/application-dev/reference/apis/js-apis-display.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee @nobuggers zh-cn/application-dev/reference/apis/js-apis-distributed-account.md @nianCode @zengyawen @JiDong-CS @murphy1984 zh-cn/application-dev/reference/apis/js-apis-distributed-data.md @feng-aiwen @ge-yafang @gong-a-shi @logic42 zh-cn/application-dev/reference/apis/js-apis-distributedMissionManager.md @chenmingJay @ningningW @nan-xiansen @iceice1001 @@ -418,9 +421,8 @@ zh-cn/application-dev/reference/apis/js-apis-resource-manager.md @Buda-Liu @ning zh-cn/application-dev/reference/apis/js-apis-router.md @huaweimaxuchu @HelloCrease @niulihua @tomatodevboy zh-cn/application-dev/reference/apis/js-apis-rpc.md @xuepianpian @RayShih @zhaopeng_gitee @vagrant_world zh-cn/application-dev/reference/apis/js-apis-runninglock.md @aqxyjay @zengyawen @aqxyjay @alien0208 - -zh-cn/application-dev/reference/apis/js-apis-screen.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee -zh-cn/application-dev/reference/apis/js-apis-screenshot.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee +zh-cn/application-dev/reference/apis/js-apis-screen.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee @nobuggers +zh-cn/application-dev/reference/apis/js-apis-screenshot.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee @nobuggers zh-cn/application-dev/reference/apis/js-apis-securityLabel.md @panqinxu @zengyawen @bubble_mao @jinhaihw zh-cn/application-dev/reference/apis/js-apis-sensor.md @hellohyh001 @ningningW @butterls @star-wind-snow-and-rain zh-cn/application-dev/reference/apis/js-apis-service-extension-ability.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen @@ -461,6 +463,8 @@ zh-cn/application-dev/reference/apis/js-apis-testRunner.md @inter515 @littlejerr zh-cn/application-dev/reference/apis/js-apis-thermal.md @aqxyjay @zengyawen @aqxyjay @alien0208 zh-cn/application-dev/reference/apis/js-apis-timer.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-touchevent.md @mayunteng_1 @ningningW @cococoler @alien0208 +zh-cn/application-dev/reference/apis/js-apis-shortKey.md @mayunteng_1 @ningningW @cococoler @alien0208 +zh-cn/application-dev/reference/apis/js-apis-devicestatus-cooperate.md @mayunteng_1 @ningningW @cococoler @alien0208 zh-cn/application-dev/reference/apis/js-apis-treemap.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-treeset.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-uitest.md @inter515 @ningningW @inter515 @jiyong @@ -476,17 +480,19 @@ zh-cn/application-dev/reference/apis/js-apis-vector.md @gongjunsong @ge-yafang @ zh-cn/application-dev/reference/apis/js-apis-vibrator.md @hellohyh001 @ningningW @butterls @star-wind-snow-and-rain zh-cn/application-dev/reference/apis/js-apis-volumemanager.md @panqinxu @zengyawen @bubble_mao @jinhaihw zh-cn/application-dev/reference/apis/js-apis-wallpaper.md @feng-aiwen @ningningW @wangzhangjun @murphy1984 +zh-cn/application-dev/reference/apis/js-apis-screen-lock.md @feng-aiwen @ningningW @wangzhangjun @murphy1984 zh-cn/application-dev/reference/apis/js-apis-wantAgent.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen zh-cn/application-dev/reference/apis/js-apis-webgl.md @zhangqiang183 @ge-yafang @wind_zj @zxg-gitee zh-cn/application-dev/reference/apis/js-apis-webgl2.md @zhangqiang183 @ge-yafang @wind_zj @zxg-gitee zh-cn/application-dev/reference/apis/js-apis-webSocket.md @zhang-hai-feng @zengyawen @jyh926 @gaoxi785 zh-cn/application-dev/reference/apis/js-apis-wifi.md @cheng_guohong @RayShih @cheng_guohong @quanli125 zh-cn/application-dev/reference/apis/js-apis-wifiext.md @cheng_guohong @RayShih @cheng_guohong @quanli125 -zh-cn/application-dev/reference/apis/js-apis-window.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee +zh-cn/application-dev/reference/apis/js-apis-window.md @zhangqiang183 @ge-yafang @zhouyaoying @zxg-gitee @nobuggers zh-cn/application-dev/reference/apis/js-apis-windowAnimationManager.md @zhangqiang183 @ge-yafang @wind_zj @zxg-gitee zh-cn/application-dev/reference/apis/js-apis-worker.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-taskpool.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-workScheduler.md @chenmingJay @ningningW @nan-xiansen @iceice1001 +zh-cn/application-dev/reference/apis/js-apis-inner-application-WorkSchedulerExtensionContext.md @chenmingJay @ningningW @nan-xiansen @iceice1001 zh-cn/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md @chenmingJay @ningningW @nan-xiansen @iceice1001 zh-cn/application-dev/reference/apis/js-apis-xml.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-zlib.md @shuaytao @RayShih @wangzhen107 @inter515 @@ -532,6 +538,7 @@ zh-cn/application-dev/reference/apis/js-apis-curve.md @huaweimaxuchu @HelloCreas zh-cn/application-dev/reference/apis/js-apis-defaultAppManager.md @shuaytao @RayShih @wangzhen107 @inter515 zh-cn/application-dev/reference/apis/js-apis-distributedBundle.md @shuaytao @RayShih @wangzhen107 @inter515 zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md @feng-aiwen @ge-yafang @gong-a-shi @logic42 +zh-cn/application-dev/reference/apis/js-apis-enterprise-applicationManager.md @liuzuming @ningningW @yangqing3 zh-cn/application-dev/reference/apis/js-apis-enterprise-accountManager.md @liuzuming @ningningW @yangqing3 zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md @liuzuming @ningningW @yangqing3 zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md @liuzuming @ningningW @yangqing3 @@ -554,8 +561,10 @@ zh-cn/application-dev/reference/apis/js-apis-net-sharing.md @zhang-hai-feng @zen zh-cn/application-dev/reference/apis/js-apis-nfctech.md @cheng_guohong @RayShih @cheng_guohong @quanli125 zh-cn/application-dev/reference/apis/js-apis-promptAction.md @huaweimaxuchu @HelloCrease @niulihua @tomatodevboy zh-cn/application-dev/reference/apis/js-apis-reminderAgentManager.md @chenmingJay @ningningW @nan-xiansen @iceice1001 +zh-cn/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md @chenmingJay @ningningW @nan-xiansen @iceice1001 zh-cn/application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md @chenmingJay @ningningW @nan-xiansen @iceice1001 zh-cn/application-dev/reference/apis/js-apis-resourceschedule-deviceUsageStatistics.md @chenmingJay @ningningW @nan-xiansen @iceice1001 +zh-cn/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md @chenmingJay @ningningW @nan-xiansen @iceice1001 zh-cn/application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md @chenmingJay @ningningW @nan-xiansen @iceice1001 zh-cn/application-dev/reference/apis/js-apis-stationary.md @mayunteng_1 @ningningW @cococoler @alien0208 zh-cn/application-dev/reference/apis/js-apis-system-capability.md taiyipei taiyipei BlackStone @@ -610,6 +619,7 @@ zh-cn/application-dev/reference/errorcodes/errorcode-request.md @ningningW zh-cn/application-dev/reference/errorcodes/errorcode-resource-manager.md @ningningW zh-cn/application-dev/reference/errorcodes/errorcode-router.md @HelloCrease zh-cn/application-dev/reference/errorcodes/errorcode-rpc.md @RayShih +zh-cn/application-dev/reference/errorcodes/errorcode-screenlock.md @ningningW zh-cn/application-dev/reference/errorcodes/errorcode-runninglock.md @zengyawen zh-cn/application-dev/reference/errorcodes/errorcode-sensor.md @ningningW zh-cn/application-dev/reference/errorcodes/errorcode-system-parameterV9.md @zengyawen diff --git a/en/application-dev/application-models/application-component-configuration-stage.md b/en/application-dev/application-models/application-component-configuration-stage.md index b50d40b4a694ecdf55338d249a20ff458d36ba20..db1f4b9f8205993e30c1d4de1000fae72c6d5b08 100644 --- a/en/application-dev/application-models/application-component-configuration-stage.md +++ b/en/application-dev/application-models/application-component-configuration-stage.md @@ -6,7 +6,7 @@ Icons and labels are usually configured together. There is the application icon, The application icon and label are used in **Settings**. For example, they are displayed in the application list in **Settings**. The entry icon is displayed on the device's home screen after the application is installed. The entry icon maps to a [UIAbility](uiability-overview.md) component. Therefore, an application can have multiple entry icons and entry labels. When you touch one of them, the corresponding UIAbility page is displayed. -**Figure 1** Icons and labels +**Figure 1** Icons and labels ![application-component-configuration-stage](figures/application-component-configuration-stage.png) diff --git a/en/application-dev/application-models/inputmethodextentionability.md b/en/application-dev/application-models/inputmethodextentionability.md index b36cf2a050cd15c1d4047410406ed46343f604e5..49686c5d5c087d8a484123f0f6d58a12f6283976 100644 --- a/en/application-dev/application-models/inputmethodextentionability.md +++ b/en/application-dev/application-models/inputmethodextentionability.md @@ -1,4 +1,4 @@ -# InputMethodExtensionAbility Development +# InputMethodExtensionAbility ## When to Use [InputMethodExtensionAbility](../reference/apis/js-apis-inputmethod-extension-ability.md), inherited from [ExtensionAbility](extensionability-overview.md), is used for developing input method applications. diff --git a/en/application-dev/application-models/serviceextensionability.md b/en/application-dev/application-models/serviceextensionability.md index 3f9e96cf03318d900b428348bdb1bdfb0151f611..37f5d31a347dee577532850fd26a154e191a2a19 100644 --- a/en/application-dev/application-models/serviceextensionability.md +++ b/en/application-dev/application-models/serviceextensionability.md @@ -401,7 +401,7 @@ When ServiceExtensionAbility is used to provide sensitive services, the client i console.info(TAG, 'getBundleNameByUid: ' + callerBundleName); // Identify the bundle name of the client. if (callerBundleName != 'com.example.connectextapp') { // The verification fails. - console.info(TAG, 'The caller bundle is not in whitelist, reject'); + console.info(TAG, 'The caller bundle is not in trustlist, reject'); return; } // The verification is successful, and service logic is executed normally. diff --git a/en/application-dev/application-models/windowextensionability.md b/en/application-dev/application-models/windowextensionability.md index 3c1d364cd50e73c8232c5ba2482e04b2ca2a6077..bf593acef9ae090fd2e24fb5bdd88a40568094d2 100644 --- a/en/application-dev/application-models/windowextensionability.md +++ b/en/application-dev/application-models/windowextensionability.md @@ -1,4 +1,4 @@ -# WindowExtensionAbility +# WindowExtensionAbility (for System Applications Only) [WindowExtensionAbility](../reference/apis/js-apis-application-windowExtensionAbility.md) is a type of ExtensionAbility component that allows a system application to be embedded in and displayed over another application. @@ -15,7 +15,7 @@ the context is [WindowExtensionContext](../reference/apis/js-apis-inner-applicat > -## Setting an Embedded UIAbility (for System Applications Only) +## Setting an Embedded UIAbility The **WindowExtensionAbility** class provides **onConnect()**, **onDisconnect()**, and **onWindowReady()** lifecycle callbacks, which can be overridden. @@ -79,7 +79,7 @@ To implement an embedded application, manually create a WindowExtensionAbility i ``` -## Starting an Embedded UIAbility (for System Applications Only) +## Starting an Embedded UIAbility System applications can load the created WindowExtensionAbility through the AbilityComponent. diff --git a/en/application-dev/application-test/arkxtest-guidelines.md b/en/application-dev/application-test/arkxtest-guidelines.md index 64edba5e9f4d4ebbd6b7bfbff44c4b01c8a67d4d..00c733c7c37676511ccab4d53dc9992b01456ff8 100644 --- a/en/application-dev/application-test/arkxtest-guidelines.md +++ b/en/application-dev/application-test/arkxtest-guidelines.md @@ -3,7 +3,7 @@ ## Overview -To accelerate test automation of OpenHarmony, arkXtest — an automated test framework that supports both the JavaScript (JS) and TypeScript (TS) programming languages — is provided. +To accelerate test automation of OpenHarmony, arkXtest — an automated unit and UI test framework that supports both the JavaScript (JS) and TypeScript (TS) programming languages — is provided. In this document you will learn about the key functions of arkXtest and how to use it to perform unit testing on application or system APIs and to write UI automated test scripts. @@ -13,7 +13,7 @@ In this document you will learn about the key functions of arkXtest and how to u arkXtest is part of the OpenHarmony toolkit and provides basic capabilities of writing and running OpenHarmony automated test scripts. In terms of test script writing, arkXtest offers a wide range of APIs, including basic process APIs, assertion APIs, and APIs related to UI operations. In terms of test script running, arkXtest offers such features as identifying, scheduling, and executing test scripts, as well as summarizing test script execution results. -### Principles +### Implementation arkXtest is divided into two parts: unit test framework and UI test framework. @@ -27,16 +27,16 @@ arkXtest is divided into two parts: unit test framework and UI test framework. ![](figures/TestFlow.PNG) -- UI Testing Framework +- UI Test Framework - The UI test framework provides [UiTest APIs](../reference/apis/js-apis-uitest.md) for you to call in different test scenarios. The test scripts are executed on top of the unit test framework mentioned above. + The UI test framework provides [UiTest APIs](../reference/apis/js-apis-uitest.md) for you to call in different test scenarios. The UI test scripts are executed on top of the aformentioned unit test framework. The figure below shows the main functions of the UI test framework. ![](figures/Uitest.PNG) -### Limitations and Constraints +### Constraints - The features of the UI test framework are available only in OpenHarmony 3.1 and later versions. - The feature availability of the unit test framework varies by version. For details about the mappings between the features and versions, see [arkXtest](https://gitee.com/openharmony/testfwk_arkxtest/blob/master/README_en.md). @@ -46,9 +46,9 @@ arkXtest is divided into two parts: unit test framework and UI test framework. ### Environment Requirements -Software for writing test scripts: DevEco Studio 3.0 or later +Software: DevEco Studio 3.0 or later -Hardware for running test scripts: PC connected to an OpenHarmony device, such as the RK3568 development board +Hardware: PC connected to an OpenHarmony device, such as the RK3568 development board ### Setting Up the Environment @@ -57,7 +57,7 @@ Hardware for running test scripts: PC connected to an OpenHarmony device, such a ## Creating a Test Script -1. Open DevEco Studio and create a project, where the **ohos** directory is where the test script is located. +1. Open DevEco Studio and create a project, in which the **ohos** directory is where the test script is located. 2. Open the .ets file of the module to be tested in the project directory. Move the cursor to any position in the code, and then right-click and choose **Show Context Actions** > **Create Ohos Test** or press **Alt+Enter** and choose **Create Ohos Test** to create a test class. ## Writing a Unit Test Script @@ -95,7 +95,7 @@ export default function abilityTest() { The unit test script must contain the following basic elements: -1. Import of the dependency package so that the dependent test APIs can be used. +1. Import of the dependencies so that the dependent test APIs can be used. 2. Test code, mainly about the related logic, such as API invoking. @@ -105,7 +105,7 @@ The unit test script must contain the following basic elements: You write a UI test script based on the unit test framework, adding the invoking of APIs provided by the UI test framework to implement the corresponding test logic. -In this example, the UI test script is written based on the preceding unit test script. First, add the dependency package, as shown below: +In this example, the UI test script is written based on the preceding unit test script. First, import the dependency, as shown below: ```js import {Driver,ON,Component,MatchPattern} from '@ohos.uitest' @@ -158,11 +158,9 @@ export default function abilityTest() { You can run a test script in DevEco Studio in any of the following modes: -1. Test package level: All test cases in the test package are executed. - -2. Test suite level: All test cases defined in the **describe** method are executed. - -3. Test method level: The specified **it** method, that is, a single test case, is executed. +- Test package level: All test cases in the test package are executed. +- Test suite level: All test cases defined in the **describe** method are executed. +- Test method level: The specified **it** method, that is, a single test case, is executed. ![](figures/Execute.PNG) @@ -176,7 +174,7 @@ After the test is complete, you can view the test result in DevEco Studio, as sh To run a test script in the CLI, execute **aa** commands with different execution control keywords. -Parameters in aa test commands +The table below lists the keywords in **aa** test commands. | Keyword | Abbreviation| Description | Example | | ------------- | ------------ | -------------------------------------- | ---------------------------------- | @@ -187,18 +185,18 @@ Parameters in aa test commands The framework supports multiple test case execution modes, which are triggered by the key-value pair following the **-s** keyword. The table below lists the available keys and values. -| Key | Description | Value | Parameter | +| Key | Description | Value | Example | | ------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------- | -| unittest | OpenHarmonyTestRunner object used for test case execution. | **OpenHarmonyTestRunner** or custom runner name. | - s unittest OpenHarmonyTestRunner | +| unittest | **OpenHarmonyTestRunner** object used for test case execution. | **OpenHarmonyTestRunner** or custom runner name. | - s unittest OpenHarmonyTestRunner | | class | Test suite or test case to be executed. | {describeName}#{itName}, {describeName} | -s class attributeTest#testAttributeIt | | notClass | Test suite or test case that does not need to be executed. | {describeName}#{itName}, {describeName} | -s notClass attributeTest#testAttributeIt | | itName | Test case to be executed. | {itName} | -s itName testAttributeIt | | timeout | Timeout interval for executing a test case. | Positive integer (unit: ms). If no value is set, the default value 5000 is used. | -s timeout 15000 | -| breakOnError | Whether to enable break-on-error mode. When this mode is enabled, the test execution process exits if a test assertion error or any other error occurs.| **true**/**false** (default value) | -s breakOnError true | +| breakOnError | Whether to enable break-on-error mode. When this mode is enabled, the test execution process exits if a test assertion failure or error occurs.| **true**/**false** (default value) | -s breakOnError true | | random | Whether to execute test cases in random sequence.| **true**/**false** (default value) | -s random true | | testType | Type of the test case to be executed. | function, performance, power, reliability, security, global, compatibility, user, standard, safety, resilience| -s testType function | | level | Level of the test case to be executed. | 0, 1, 2, 3, 4 | -s level 0 | -| size | Size of the test case to be executed. | small, medium, large | -s size small | +| size | Size of the test case to be executed. | small, medium, large | -s size small | stress | Number of times that the test case is executed. | Positive integer | -s stress 1000 | **Running Commands** @@ -306,7 +304,7 @@ OHOS_REPORT_STATUS: consuming=4 | OHOS_REPORT_STATUS: stream | Error information of the current test case.| | OHOS_REPORT_STATUS: test| Name of the current test case.| | OHOS_REPORT_STATUS_CODE | Execution result of the current test case. The options are as follows:
**0**: pass
**1**: error
**2**: fail| -| OHOS_REPORT_STATUS: consuming | Execution duration of the current test case.| +| OHOS_REPORT_STATUS: consuming | Time spent in executing the current test case.| - After the commands are executed, the log information similar to the following is displayed: @@ -324,7 +322,7 @@ OHOS_REPORT_STATUS: taskconsuming=16029 | Failure | Number of failed test cases.| | Error | Number of test cases whose execution encounters errors. | | Pass | Number of passed test cases.| -| Ignore | Number of test cases not executed.| +| Ignore | Number of test cases not yet executed.| | taskconsuming| Total time spent in executing the current test case.| > When an error occurs in break-on-error mode, check the **Ignore** and interrupt information. @@ -341,11 +339,11 @@ The logs added to the test case are displayed after the test case execution, rat **Possible Causes** -More than one asynchronous interface is called in the test case.
In principle, logs in the test case are printed before the test case execution is complete. +More than one asynchronous API is called in the test case.
In principle, logs in the test case are printed before the test case execution is complete. **Solution** -If more than one asynchronous interface is called, you are advised to encapsulate the interface invoking into the promise mode +If more than one asynchronous API is called, you are advised to encapsulate the API invoking into the promise mode. #### Error "fail to start ability" is reported during test case execution @@ -373,7 +371,7 @@ After the test case execution is complete, the console displays the error messag 2. The time taken for API invocation is longer than the timeout interval set for test case execution. -3. Test assertion fails, and a failure exception is thrown. As a result, the test case execution does not end until the timeout expires. +3. Test assertion fails, and a failure exception is thrown. As a result, the test case execution does not end until it times out. **Solution** @@ -388,11 +386,11 @@ After the test case execution is complete, the console displays the error messag **Problem** -The UI test case fails to be executed. The HiLog file contains the error message "Get windows failed/GetRootByWindow failed". +The UI test case fails to be executed. The HiLog file contains the error message "Get windows failed/GetRootByWindow failed." **Possible Causes** -The ArkUI feature is disabled. As a result, the control tree information on the test page is not generated. +The ArkUI feature is disabled. As a result, the component tree information is not generated on the test page. **Solution** @@ -410,13 +408,13 @@ The UI test case fails to be executed. The HiLog file contains the error message **Possible Causes** -1. In the test case, the **await** operator is not added to the asynchronous interface provided by the UI test framework. +1. In the test case, the **await** operator is not added to the asynchronous API provided by the UI test framework. 2. The UI test case is executed in multiple processes. As a result, multiple UI test processes are started. The framework does not support multi-process invoking. **Solution** -1. Check the case implementation and add the **await** operator to the asynchronous interface invoking. +1. Check the case implementation and add the **await** operator to the asynchronous API. 2. Do not execute UI test cases in multiple processes. @@ -424,11 +422,11 @@ The UI test case fails to be executed. The HiLog file contains the error message **Problem** -The UI test case fails to be executed. The HiLog file contains the error message "does not exist on current UI! Check if the UI has changed after you got the widget object". +The UI test case fails to be executed. The HiLog file contains the error message "does not exist on current UI! Check if the UI has changed after you got the widget object." **Possible Causes** -After the target component is found in the code of the test case, the device UI changes. As a result, the found component is lost and the emulation operation cannot be performed. +After the target component is found in the code of the test case, the device UI changes, resulting in loss of the found component and inability to perform emulation. **Solution** diff --git a/en/application-dev/connectivity/http-request.md b/en/application-dev/connectivity/http-request.md index 45a20ef6a48d0746a1c82a0e1b577d7354e8938d..1bb784cf96fb1d74dcbafed54498435f505814b6 100644 --- a/en/application-dev/connectivity/http-request.md +++ b/en/application-dev/connectivity/http-request.md @@ -78,6 +78,8 @@ httpRequest.request( // data.header carries the HTTP response header. Parse the content based on service requirements. console.info('header:' + JSON.stringify(data.header)); console.info('cookies:' + JSON.stringify(data.cookies)); // 8+ + // Call the destroy() method to release resources after HttpRequest is complete. + httpRequest.destroy(); } else { console.info('error:' + JSON.stringify(err)); // Unsubscribe from HTTP Response Header events. @@ -158,4 +160,11 @@ httpRequest.request2( httpRequest.destroy(); } ); -``` \ No newline at end of file +``` + +## Samples + +The following sample is provided to help you better understand how to develop the HTTP data request feature: + +- [`Http`: Data Request (ArkTS) (API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Http) +- [HTTP Communication (ArkTS) (API9)](https://gitee.com/openharmony/codelabs/tree/master/NetworkManagement/SmartChatEtsOH) diff --git a/en/application-dev/device-usage-statistics/device-usage-statistics-use-guide.md b/en/application-dev/device-usage-statistics/device-usage-statistics-use-guide.md index 82027e91a9c15b1fd1b62a8c5ef4cddc2f9c0ef3..067f372d7e27e568d3208f651b57132ecc3edd72 100644 --- a/en/application-dev/device-usage-statistics/device-usage-statistics-use-guide.md +++ b/en/application-dev/device-usage-statistics/device-usage-statistics-use-guide.md @@ -1,4 +1,4 @@ -# Device Usage Statistics Development (API Version 9) +# Device Usage Statistics Development ## When to Use @@ -38,7 +38,7 @@ import usageStatistics from '@ohos.resourceschedule.usageStatistics'; ## How to Develop 1. Before obtaining the device usage statistics, check whether the **ohos.permission.BUNDLE_ACTIVE_INFO** permission is configured. For details about how to configure a permission, see [Declaring Permissions](../security/accesstoken-guidelines.md). - + 2. Query events of all applications based on the specified start time and end time. This requires the **ohos.permission.BUNDLE_ACTIVE_INFO** permission to be configured. ```js diff --git a/en/application-dev/dfx/hitracemeter-guidelines.md b/en/application-dev/dfx/hitracemeter-guidelines.md index 3adf91286aaf410d7862c60320878e57acb359e8..3244aa9356bbcd3748594061a3752fad8aa3d3f3 100644 --- a/en/application-dev/dfx/hitracemeter-guidelines.md +++ b/en/application-dev/dfx/hitracemeter-guidelines.md @@ -21,7 +21,7 @@ Due to the asynchronous I/O feature of JS, the hiTraceMeter module provides only ## Available APIs -The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference]( ../reference/apis/js-apis-hitracemeter.md). +The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference](../reference/apis/js-apis-hitracemeter.md). **APIs for performance tracing** diff --git a/en/application-dev/faqs/faqs-dfx.md b/en/application-dev/faqs/faqs-dfx.md index 51945bd8d0b9742703696d19fd2cc1f52add112d..9a4f4dc610e282afe74d7b73c8cfb7579db0a728 100644 --- a/en/application-dev/faqs/faqs-dfx.md +++ b/en/application-dev/faqs/faqs-dfx.md @@ -4,17 +4,13 @@ Applicable to: OpenHarmony 3.2 Beta (API version 9) -**Symptom** - -How do I flush HiLog information to disks? - **Solution** Run the **hilog -w start -f ckTest -l 1M -n 5 -m zlib -j 11** command. The log file is saved in the **/data/log/hilog/** directory. -Parameter description: +**Parameters:** ``` -**-w**: Starts a log flushing task. **start** means to start the task, and **stop** means to stop the task. @@ -25,3 +21,129 @@ Parameter description: -**-j**: Specifies the task ID. The value ranges from **10** to **0xffffffffff**. For more details about parameters, run the **hilog --help** command. ``` + +## How do I print only HiLog information of the current application? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Solution** + +Use the hilog command line tool to filter the logs of the current application. + +**hilog -T xxx**: filtering logs by tag. + +**hilog –D xxx**: filtering logs by domain. + +**hilog -e**: matching log content based on the tag, domain, and pid by using regular expressions. Multi-layered filtering, combination filtering, and reverse filtering are supported. + +## How do I locate the fault when the application crashes? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Solution** + +Method 1: Locate the crash-related code based on the service log. + +Method 2: View the error information in the crash file. The crash file is located at **/data/log/faultlog/faultlogger/**. + +## Is HiLog or console recommended for log printing? How do I set the domain if HiLog is used? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +The console encapsulates the HiLog system with the default parameter configuration. It is mainly used in the application development and debugging phase. + +HiLog is recommended because it supports log classification and processing in a unified manner. For details, see [@ohos.hilog (HiLog)](../reference/apis/js-apis-hilog.md#hilogisloggable). + +The value of the **domain** parameter in the HiLog API ranges from **0x0** to **0xFFFF**. You are advised to customize the value as required. + +## What is the maximum length of a log record when HiLog is used? Is it configurable? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +The maximum length of a log record is 1,024 characters, and it is not changeable. + +## What is the purpose of using private in printing of formatted logs? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Symptom** + +**private** is displayed in HiLog information when format parameters are of the %d or %s type in C++. + +**Solution** + +When format parameters such as **%d** and **%s** are directly used, the standard system uses **private** to replace the actual data for printing by default to prevent data leakage. To print the actual data, replace **%d** with **%{public}d** or replace **%s** with **%{public}s**. + +## What should I do if the hilog.debug log cannot be printed? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Solution** + +Run **hdc std shell hilog -b D** to turn on the debugging switch. + +## Can I separate multiple strings by spaces in the tag parameter of the HiLog API? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +Yes. + +## How does HiLog print the log information marked with the \{private\} tag? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Solution** + +To print the log information marked with the \{private\} tag, run the command to disable the privacy mode: hdc shell hilog -p off + +## What are the cash log collection and performance troubleshooting functions provided by the HiLog system? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Symptom** + +What are the cash log collection and performance troubleshooting functions provided by the HiLog system? + +**Solution** + +FaultLogger: collects crash logs. For details, see [FaultLogger](../reference/apis/js-apis-faultLogger.md). + +HiChecker: detects potential faults. For details, see [HiChecker](../reference/apis/js-apis-hichecker.md). + +hiTraceMeter: implements performance tracing. For details, see [hiTraceMeter](../reference/apis/js-apis-hitracemeter.md). + +## How do I control log output? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Symptom** + +The output log varies according to environment requirements. + +**Solution** + +You can run the following command to adjust the log level to print the desired logs: + +hdc shell hilog -L + +## Is there a limit on the tag length of HiLog? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +The length of the entire tag is 32. + +## How do I view the appfreeze information in the logs? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +Try the following procedure: + +1. Check the reason for the event. Fault location methods and examples are provided specifically to different reasons. + +2. Check the MSG information. + +3. Check the application stack information in OpenStacktraceCatcher as well as the HiLog information for the operation that leads to the event. + +4. Check the PeerBinderCatcher process to see if the current process is suspended by the peer binder. If there is a synchronous wait related to the current process, the corresponding PeerBinder Stacktrace information will be logged. It contains the stack information of the peer process that leads to suspension of the current process. + +5. Check the CPU usage of system processes and the memory usage of the current process. diff --git a/en/application-dev/faqs/faqs-globalization.md b/en/application-dev/faqs/faqs-globalization.md index b4d06ab98cbb1b24f4f0384ed893126c334ff383..c8d310a70c90338ffb5f63513508ea0100ad5192 100644 --- a/en/application-dev/faqs/faqs-globalization.md +++ b/en/application-dev/faqs/faqs-globalization.md @@ -2,13 +2,13 @@ ## How do I read an XML file in rawfile and convert the data in it to the string type? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **Solution** Call **getRawFileContent** of the **ResourceManager** module to obtain the data in the XML file, and then use **String.fromCharCode** to convert the data to the string type. -**Sample Code** +**Example** ``` resourceManager.getRawFileContent('test.xml', (error, value) => { @@ -21,7 +21,7 @@ resourceManager.getRawFileContent('test.xml', (error, value) => { }); ``` -**Reference** +**Reference Link** [Resource Manager](../reference/apis/js-apis-resource-manager.md) @@ -33,7 +33,7 @@ Applicable to: OpenHarmony 3.1 Beta 5 (API version 9) The stage model allows an application to obtain a **ResourceManager** object based on **context** and call its resource management APIs without first importing the required bundle. This mode does not apply to the FA model. -**Sample Code** +**Example** ``` const context = getContext(this) as any @@ -63,13 +63,13 @@ To obtain the path of the **resource** directory, try either of the following wa 2. Use **ResourceManager** for access. This method applies to dynamic access, during which the **resource** directory dynamically changes when the application is running. -**Reference** +**Reference Link** [Resource Categories and Access](../quick-start/resource-categories-and-access.md) and [Resource Manager](../reference/apis/js-apis-resource-manager.md) ## Why does getPluralString return an incorrect value? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **Symptom** @@ -81,19 +81,19 @@ The **getPluralString** API is effective only when the system language is Englis ## How do I obtain the customized string fields in the resources directory? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **Solution** Use **getStringValue** of the **ResourceManager** module. -**Reference** +**Reference Link** [Resource Manager](../reference/apis/js-apis-resource-manager.md#getstringvalue9) ## How do I reference resources such as images and text in AppScope? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **Solution** @@ -101,18 +101,50 @@ Reference resources in the **\$r\('app.type.name'\)** format. Wherein, **type** ## How do I convert resources to strings? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **Solution** For a qualifier directory, use **this.context.resourceManager.getStringSync\(\$r\('app.string.test'\).id\)** to covert resources to strings synchronously. Note that the **\$r\('app.string.test', 2\)** mode is not supported. -**Reference** +**Reference Link** [Resource Manager](../reference/apis/js-apis-resource-manager.md#getstringsync9) ## Can $ be used to reference constants in the form\_config.json file? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **\$** cannot be used to reference constants in the **form\_config.json** file. + +## How does ArkTS parse XML files? + +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) + +**Solution** + +1. Create the following XML file in the **rawfile** directory: + + ``` + + + Jacky + 18 + + ``` + +2. Use **resourceManager.getRawFileContent** to obtain the byte arrays of the XML file. + + ``` + import resourceManager from '@ohos.resourceManager'; + resourceManager.getRawFileContent("test.xml", (error, value) => { + if (error != null) { + console.log("error is " + error); + return + } + let arrayBuffer = value.buffer; // unit8Array + var xmpParser = new xml.XmlPullParser(arrayBuffer); + var tagName = "" + //do something + } + ``` diff --git a/en/application-dev/faqs/faqs-window-manager.md b/en/application-dev/faqs/faqs-window-manager.md index cc3cb1074bd8ae828ae38925a74594311b0f6c35..b8e2bbd78963fd25031da5b4b29c17e849f8b7ba 100644 --- a/en/application-dev/faqs/faqs-window-manager.md +++ b/en/application-dev/faqs/faqs-window-manager.md @@ -114,7 +114,7 @@ In effect, the **isStatusBarLightIcon** and **isNavigationBarLightIcon** attribu **Reference** -[window.SystemBarProperties](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-window.md#systembarproperties) +[window.SystemBarProperties](../reference/apis/js-apis-window.md#systembarproperties) ## How do I keep the screen always on? diff --git a/en/application-dev/file-management/Readme-EN.md b/en/application-dev/file-management/Readme-EN.md index bdc1bc7c1b00195bc24c71396f4fed78b93de15a..e96bf81837a170a61796100c3f1e0080687f39ec 100644 --- a/en/application-dev/file-management/Readme-EN.md +++ b/en/application-dev/file-management/Readme-EN.md @@ -15,8 +15,8 @@ - Selecting and Saving User Files (FilePicker) - [Selecting User Files](select-user-file.md) - [Saving User Files](save-user-file.md) - - [Developing a FileManager Application (Available Only for System Applications)](dev-user-file-manager.md) - - [Managing External Storage Devices (Available Only for System Applications)](manage-external-storage.md) + - [Developing a FileManager Application (for System Applications Only)](dev-user-file-manager.md) + - [Managing External Storage Devices (for System Applications Only)](manage-external-storage.md) - Distributed File System - [Distributed File System Overview](distributed-fs-overview.md) - [Setting the Security Level of a Distributed File](set-security-label.md) diff --git a/en/application-dev/file-management/dev-user-file-manager.md b/en/application-dev/file-management/dev-user-file-manager.md index e048ad7fefa3cf5ddf26ad3764403231cc3045dd..26181bb321310d1261ce2b87138b7fd2aa118552 100644 --- a/en/application-dev/file-management/dev-user-file-manager.md +++ b/en/application-dev/file-management/dev-user-file-manager.md @@ -1,4 +1,4 @@ -# Developing a FileManager Application (Available Only for System Applications) +# Developing a FileManager Application (for System Applications Only) OpenHarmony is prebuilt with the **FileManager** application. You can also develop your own **FileManager** as required. diff --git a/en/application-dev/file-management/manage-external-storage.md b/en/application-dev/file-management/manage-external-storage.md index 9889b4f8f0f6caaf49f0801c6d92ffe2f8bfc11f..bd5c01712cb48d6b8ac151b67a5b747967882870 100644 --- a/en/application-dev/file-management/manage-external-storage.md +++ b/en/application-dev/file-management/manage-external-storage.md @@ -1,4 +1,4 @@ -# Managing External Storage Devices (Available Only for System Applications) +# Managing External Storage Devices (for System Applications Only) External storage devices are pluggable. OpenHarmony provides the functions of listening for the device insertion and removal events and mounting/unmounting an external storage device. @@ -28,13 +28,13 @@ The following table describes the broadcast related parameters. **Table 1** Broadcast parameters -| Broadcast| Parameter| +| Broadcast| Parameter| | -------- | -------- | -| usual.event.data.VOLUME_REMOVED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.| -| usual.event.data.VOLUME_UNMOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.| -| usual.event.data.VOLUME_MOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.
**fsUuid**: universally unique identifier (UUID) of the volume.
**path**: path where the volume is mounted.| -| usual.event.data.VOLUME_BAD_REMOVAL | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.| -| usual.event.data.VOLUME_EJECT | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.| +| usual.event.data.VOLUME_REMOVED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.| +| usual.event.data.VOLUME_UNMOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.| +| usual.event.data.VOLUME_MOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.
**fsUuid**: universally unique identifier (UUID) of the volume.
**path**: path where the volume is mounted.| +| usual.event.data.VOLUME_BAD_REMOVAL | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.| +| usual.event.data.VOLUME_EJECT | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.| ## How to Develop diff --git a/en/application-dev/media/Readme-EN.md b/en/application-dev/media/Readme-EN.md index efc78832291fda395506dc0864af4fae0f068621..a9fe35694fd7458fe31cf6a5d2473f5d93757bd1 100755 --- a/en/application-dev/media/Readme-EN.md +++ b/en/application-dev/media/Readme-EN.md @@ -28,7 +28,7 @@ - [Developing Audio Call](audio-call-development.md) - [Video Playback](video-playback.md) - [Video Recording](video-recording.md) -- AVSession (for System Applications Only) +- AVSession - [AVSession Overview](avsession-overview.md) - Local AVSession - [Local AVSession Overview](local-avsession-overview.md) @@ -37,7 +37,7 @@ - Distributed AVSession - [Distributed AVSession Overview](distributed-avsession-overview.md) - [Using Distributed AVSession](using-distributed-avsession.md) -- Camera (for System Applications Only) +- Camera - [Camera Overview](camera-overview.md) - Camera Development - [Camera Development Preparations](camera-preparation.md) diff --git a/en/application-dev/media/using-avsession-controller.md b/en/application-dev/media/using-avsession-controller.md index 958661d90cec031cbbca1bb7c11ccb80e4dc0e66..d1569d6dc055a5d604c54e0f8970e779cddfb721 100644 --- a/en/application-dev/media/using-avsession-controller.md +++ b/en/application-dev/media/using-avsession-controller.md @@ -26,11 +26,7 @@ For details, see [AVSession Management](../reference/apis/js-apis-avsession.md). | -------- | -------- | | getAllSessionDescriptors(callback: AsyncCallback<Array<Readonly<AVSessionDescriptor>>>): void | Obtains the descriptors of all AVSessions in the system.| | createController(sessionId: string, callback: AsyncCallback<AVSessionController>): void | Creates an AVSessionController.| -| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void | Obtains valid commands supported by the AVSession.
Playback control commands listened by an audio and video application when it accesses the AVSession are considered as valid commands supported by the AVSession. For details, see [Provider of AVSession](using-avsession-developer.md).| -| getLaunchAbility(callback: AsyncCallback<WantAgent>): void | Obtains the UIAbility that is configured in the AVSession and can be started.
The UIAbility configured here is started when a user operates the UI of the controller, for example, clicking a widget in Media Controller.| -| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | Sends a key event to an AVSession through the AVSessionController object.| | sendSystemAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | Sends a key event to the top session.| -| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | Sends a playback control command to an AVSession through the AVSessionController object.| | sendSystemControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | Sends a playback control command to the top session.| | getHistoricalSessionDescriptors(maxSize: number, callback: AsyncCallback\>>): void10+ | Obtains the descriptors of historical sessions.| @@ -38,15 +34,15 @@ For details, see [AVSession Management](../reference/apis/js-apis-avsession.md). | API| Description| | -------- | -------- | -| getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void | Obtains the information related to the playback state.| -| getAVMetadata(callback: AsyncCallback<AVMetadata>): void | Obtains the session metadata.| -| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void | Obtains the output device information.| -| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | Sends a key event to the session corresponding to this controller.| -| getLaunchAbility(callback: AsyncCallback<WantAgent>): void | Obtains the **WantAgent** object saved by the application in the session.| -| isActive(callback: AsyncCallback<boolean>): void | Checks whether the session is activated.| -| destroy(callback: AsyncCallback<void>): void | Destroys this controller. A controller can no longer be used after being destroyed.| -| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void | Obtains valid commands supported by the session.| -| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | Sends a playback control command to the session through the controller.| +| getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void10+ | Obtains the information related to the playback state.| +| getAVMetadata(callback: AsyncCallback<AVMetadata>): void10+ | Obtains the session metadata.| +| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void10+ | Obtains the output device information.| +| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void10+ | Sends a key event to the session corresponding to this controller.| +| getLaunchAbility(callback: AsyncCallback<WantAgent>): void10+ | Obtains the **WantAgent** object saved by the application in the session.| +| isActive(callback: AsyncCallback<boolean>): void10+ | Checks whether the session is activated.| +| destroy(callback: AsyncCallback<void>): void10+ | Destroys this controller. A controller can no longer be used after being destroyed.| +| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void10+ | Obtains valid commands supported by the session.| +| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void10+ | Sends a playback control command to the session through the controller.| | sendCommonCommand(command: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void10+ | Sends a custom playback control command to the session through the controller.| | getAVQueueItems(callback: AsyncCallback<Array<AVQueueItem>>): void10+ | Obtains the information related to the items in the playlist.| | getAVQueueTitle(callback: AsyncCallback<string>): void10+ | Obtains the name of the playlist.| diff --git a/en/application-dev/media/using-avsession-developer.md b/en/application-dev/media/using-avsession-developer.md index bf0b914647b9c364bea0ac86a30def88fe3c0f52..eef132d493091f6041450b7d3a42249fc081ce05 100644 --- a/en/application-dev/media/using-avsession-developer.md +++ b/en/application-dev/media/using-avsession-developer.md @@ -16,15 +16,15 @@ For details, see [AVSession Management](../reference/apis/js-apis-avsession.md). | API| Description| | -------- | -------- | -| createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback<AVSession>): void | Creates an AVSession.
Only one AVSession can be created for a UIAbility.| -| setAVMetadata(data: AVMetadata, callback: AsyncCallback<void>): void | Sets AVSession metadata.| -| setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback<void>): void | Sets the AVSession playback state.| -| setLaunchAbility(ability: WantAgent, callback: AsyncCallback<void>): void | Starts a UIAbility.| -| getController(callback: AsyncCallback<AVSessionController>): void | Obtains the controller of the AVSession.| -| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void | Obtains the output device information.| -| activate(callback: AsyncCallback<void>): void | Activates the AVSession.| -| deactivate(callback: AsyncCallback<void>): void | Deactivates this session.| -| destroy(callback: AsyncCallback<void>): void | Destroys the AVSession.| +| createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback<AVSession>): void10+ | Creates an AVSession.
Only one AVSession can be created for a UIAbility.| +| setAVMetadata(data: AVMetadata, callback: AsyncCallback<void>): void10+ | Sets AVSession metadata.| +| setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback<void>): void10+ | Sets the AVSession playback state.| +| setLaunchAbility(ability: WantAgent, callback: AsyncCallback<void>): void10+ | Starts a UIAbility.| +| getController(callback: AsyncCallback<AVSessionController>): void10+ | Obtains the controller of the AVSession.| +| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void10+ | Obtains the output device information.| +| activate(callback: AsyncCallback<void>): void10+ | Activates the AVSession.| +| deactivate(callback: AsyncCallback<void>): void10+ | Deactivates this session.| +| destroy(callback: AsyncCallback<void>): void10+ | Destroys the AVSession.| | setAVQueueItems(items: Array<AVQueueItem>, callback: AsyncCallback<void>): void 10+ | Sets a playlist.| | setAVQueueTitle(title: string, callback: AsyncCallback<void>): void10+ | Sets a name for the playlist.| | dispatchSessionEvent(event: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void10+ | Dispatches a custom session event.| @@ -343,21 +343,20 @@ To enable an audio and video application to access the AVSession service as a pr session.off('commonCommand'); } ``` - - + The code snippet below is used for destroying the AVSession object: - ```ts + ```ts async destroySession() { - // It is assumed that an AVSession object has been created. For details about how to create an AVSession object, see the node snippet in step 1. - let session: AVSessionManager.AVSession = ALREADY_CREATE_A_SESSION; - // Destroy the AVSession object. - session.destroy(function (err) { - if (err) { - console.error(`Failed to destroy session. Code: ${err.code}, message: ${err.message}`); - } else { - console.info(`Destroy : SUCCESS `); - } - }); + // It is assumed that an AVSession object has been created. For details about how to create an AVSession object, see the node snippet in step 1. + let session: AVSessionManager.AVSession = ALREADY_CREATE_A_SESSION; + // Destroy the AVSession object. + session.destroy(function (err) { + if (err) { + console.error(`Failed to destroy session. Code: ${err.code}, message: ${err.message}`); + } else { + console.info(`Destroy : SUCCESS `); + } + }); } - ``` \ No newline at end of file + ``` diff --git a/en/application-dev/napi/Readme-EN.md b/en/application-dev/napi/Readme-EN.md index 1295e0798c8a2e98beace89c016828eac79d5a5a..2b1f8639a152589b76f44af97f9812a1a5711d23 100644 --- a/en/application-dev/napi/Readme-EN.md +++ b/en/application-dev/napi/Readme-EN.md @@ -1,7 +1,7 @@ # Native APIs - [Introduction to Native APIs](introduction.md) -- [Using N-APIs in Application Projects](napi-guidelines.md) +- [Using Native APIs in Application Projects](napi-guidelines.md) - [Drawing Development](drawing-guidelines.md) - [Raw File Development](rawfile-guidelines.md) - [Native Window Development](native-window-guidelines.md) diff --git a/en/application-dev/napi/drawing-guidelines.md b/en/application-dev/napi/drawing-guidelines.md index 22d85aec0fe405e47cd92abeafa94ba5e7b7ed5f..c341703ff86d6d0e3c6a34e8270e934b33a15d3a 100644 --- a/en/application-dev/napi/drawing-guidelines.md +++ b/en/application-dev/napi/drawing-guidelines.md @@ -128,10 +128,7 @@ The following steps describe how to use the canvas and brush of the Native Drawi ```c++ // Obtain the pixel address after drawing. The memory to which the address points contains the pixel data of the drawing on the canvas. void* bitmapAddr = OH_Drawing_BitmapGetPixels(cBitmap); - auto ret = memcpy_s(addr, addrSize, bitmapAddr, addrSize); - if (ret != EOK) { - LOGI("memcpy_s failed"); - } + std::copy(addr, addr + addrSize, static_cast(bitmapAddr)); // Destroy the canvas object. OH_Drawing_CanvasDestroy(cCanvas); // Destroy the bitmap object. diff --git a/en/application-dev/napi/napi-guidelines.md b/en/application-dev/napi/napi-guidelines.md index a12e23d9f48492911dff8476a1e5301736704d85..54ebab553f18ecaf21aae4e52b5a95e4bdfe1192 100644 --- a/en/application-dev/napi/napi-guidelines.md +++ b/en/application-dev/napi/napi-guidelines.md @@ -1,4 +1,4 @@ -# Using N-APIs in Application Projects +# Using Native APIs in Application Projects In OpenHarmony, you can use the N-APIs in C APIs to implement interaction between ArkTS/TS/JS and C/C++. The N-API names are the same as those in the third-party **Node.js**. Currently, OpenHarmony supports some N-APIs. For details about the APIs supported, see [arkui_napi](https://gitee.com/openharmony/arkui_napi/blob/master/libnapi.ndk.json). diff --git a/en/application-dev/notification/Readme-EN.md b/en/application-dev/notification/Readme-EN.md index f7b76df0e99484508bcb073462fd65f0ab3d03cb..47c6303ebec771590779b7cb9e5c3acaf6eaf31c 100644 --- a/en/application-dev/notification/Readme-EN.md +++ b/en/application-dev/notification/Readme-EN.md @@ -1,9 +1,9 @@ # Notification - [Notification Overview](notification-overview.md) -- [Notification Subscription (for System Applications Only)](notification-subscription.md) +- [Subscribing to Notifications (for System Applications Only)](notification-subscription.md) - [Enabling Notification](notification-enable.md) -- [Notification Badge](notification-badge.md) +- [Managing the Notification Badge](notification-badge.md) - Publishing a Notification - [Publishing a Basic Notification](text-notification.md) - [Publishing a Progress Notification](progress-bar-notification.md) diff --git a/en/application-dev/notification/notification-badge.md b/en/application-dev/notification/notification-badge.md index 66d29e659d03ac147a9aa7acc0e1af24b60980c3..5cf38e460c8db944f8608869760e3dfc63c648a7 100644 --- a/en/application-dev/notification/notification-badge.md +++ b/en/application-dev/notification/notification-badge.md @@ -1,4 +1,4 @@ -# Notification Badge +# Managing the Notification Badge OpenHarmony provides APIs for setting the notification badge, which is displayed in the upper right corner of the application icon on the home screen to notify the user of the count of unread notifications. @@ -11,11 +11,11 @@ After a notification is read, the count on the badge is decremented by 1. If the 1. The notification service provides two methods to increase the count on the notification badge: - - When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-notificationManager.md#notificationrequest). After the notification is received, the count on the badge is incremented. + - When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-inner-notification-notificationRequest.md#notificationrequest). After the notification is received, the count on the badge is incremented. - - Call the [setBadgeNumber](../reference/apis/js-apis-notificationManager.md#setbadgenumber) API to set the count on the badge. + - Call the [setBadgeNumber()](../reference/apis/js-apis-notificationManager.md#notificationmanagersetbadgenumber10) API to set the count on the badge. -2. To decrease the count on the badge, call the **setBadgeNumber** API. +2. To decrease the count on the badge, call the [setBadgeNumber()](../reference/apis/js-apis-notificationManager.md#notificationmanagersetbadgenumber10) API. | API| Description| | -------- | -------- | @@ -32,37 +32,37 @@ After a notification is read, the count on the badge is decremented by 1. If the 2. Increase the count on the badge. - When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-notificationManager.md#notificationrequest). For details, see [Publishing a Basic Notification](text-notification.md). + When publishing a notification, pass the **badgeNumber** parameter in [NotificationRequest](../reference/apis/js-apis-inner-notification-notificationRequest.md#notificationrequest). For details, see [Publishing a Basic Notification](text-notification.md). In this example, the **setBadgeNumber** API is called to add a badge. This API is called after a new notification is published. ```ts function setBadgeNumberCallback(err) { - if (err) { - console.info(`Set badge failed code is ${err.code}, message is ${err.message}`); - } else { - console.info(`Set badge success`); - } + if (err) { + console.error(`Failed to set badge number. Code is ${err.code}, message is ${err.message}`); + return; + } + console.info(`Succeeded in seting badge number.`); } - let badgeNumber = 10 + let badgeNumber = 10; notificationManager.setBadgeNumber(badgeNumber, setBadgeNumberCallback); ``` -3. Reduce the count on the badge. +3. Decrease the count on the badge. After a notification is read, the application needs to call the API to set the number of remaining unread notifications. The badge is then updated. ```ts function setBadgeNumberCallback(err) { - if (err) { - console.info(`Set badge failed code is ${err.code}, message is ${err.message}`); - } else { - console.info(`Set badge success`); - } + if (err) { + console.error(`Failed to set badge number. Code is ${err.code}, message is ${err.message}`); + return; + } + console.info(`Succeeded in seting badge number.`); } - let badgeNumber = 9 + let badgeNumber = 9; notificationManager.setBadgeNumber(badgeNumber, setBadgeNumberCallback); ``` diff --git a/en/application-dev/notification/notification-subscription.md b/en/application-dev/notification/notification-subscription.md index 45e75f1f64606cfa89cae2cfae91b89a13faaa5c..68bc11450b9302d66c05b3388ca8096e5c33088f 100644 --- a/en/application-dev/notification/notification-subscription.md +++ b/en/application-dev/notification/notification-subscription.md @@ -1,4 +1,4 @@ -# Notification Subscription (for System Applications Only) +# Subscribing to Notifications (for System Applications Only) To receive notifications, an application must subscribe to notifications first. The notification subsystem provides two types of subscription APIs, allowing applications to subscribe to notifications from all applications or notifications from a specific application. @@ -13,14 +13,14 @@ The major APIs for notification subscription are described as follows. For detai **Table 1** Major APIs for notification subscription -| Name | Description| +| API| Description| | -------- | -------- | | subscribe(subscriber: NotificationSubscriber, info: NotificationSubscribeInfo, callback: AsyncCallback<void>): void | Subscribes to notifications from a specific application.| | subscribe(subscriber: NotificationSubscriber, callback: AsyncCallback<void>): void | Subscribes to notifications from all applications. | **Table 2** Callbacks for notification subscription -| Name | Description| +| API| Description| | -------- | -------- | | onConsume?:(data: SubscribeCallbackData) => void | Callback for receiving notifications. | | onCancel?:(data: SubscribeCallbackData) => void | Callback for canceling notifications. | diff --git a/en/application-dev/notification/notification-with-wantagent.md b/en/application-dev/notification/notification-with-wantagent.md index 638f53ef2f6f6fce1637468ba4c900496727f23d..3864db71c96b59827bdf4603f48199f27345a2a3 100644 --- a/en/application-dev/notification/notification-with-wantagent.md +++ b/en/application-dev/notification/notification-with-wantagent.md @@ -13,7 +13,7 @@ Below you can see the process of adding a **WantAgent** object to a notification For details about the APIs, see [@ohos.app.ability.wantAgent](../reference/apis/js-apis-app-ability-wantAgent.md). -| Name| Description| +| API | Description| | -------- | -------- | | getWantAgent(info: WantAgentInfo, callback: AsyncCallback<WantAgent>): void | Creates a **WantAgent** object.| | trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: Callback<CompleteData>): void | Triggers a **WantAgent** object.| diff --git a/en/application-dev/quick-start/Readme-EN.md b/en/application-dev/quick-start/Readme-EN.md index 631a5334c3fb783f84c4ca253f058fc386b6bc8d..3e8812f2a7ecfee12b8314572b563ce323a4ad1b 100644 --- a/en/application-dev/quick-start/Readme-EN.md +++ b/en/application-dev/quick-start/Readme-EN.md @@ -24,7 +24,7 @@ - [HAR](har-package.md) - HSP - [In-Application HSP Development](in-app-hsp.md) - - [Inter-Application HSP Development (for System Applications Only)](cross-app-hsp.md) + - [Inter-Application HSP Development](cross-app-hsp.md) - Atomic Service - [Atomic Service Development](atomicService.md) - [Atomic Service Space Management (for System Applications Only)](atomicService-aging.md) diff --git a/en/application-dev/quick-start/application-package-structure-stage.md b/en/application-dev/quick-start/application-package-structure-stage.md index 0736157fd42b4b6b6a2549e9262a7d25313aa452..2962c70242ad3bd558619fbbbbe755a86dae35c9 100644 --- a/en/application-dev/quick-start/application-package-structure-stage.md +++ b/en/application-dev/quick-start/application-package-structure-stage.md @@ -4,7 +4,7 @@ To develop an application based on the [stage model](application-configuration-file-overview-stage.md), it will be helpful if you have a basic understanding of the structure of the application package created after the application is built and packaged, as well as the related basic concepts. -- In development, an application contains one or more modules. You can [create modules](https://developer.harmonyos.com/en/docs/documentation/doc-guides-V3/ohos-adding-deleting-module-0000001218760594-V3) in the application project in [DevEco Studio](https://developer.harmonyos.com/en/develop/deveco-studio/). As a basic functional unit of an OpenHarmony application/service, a module contains source code, resource files, third-party libraries, and application/service configuration files, and can be built and run independently. Modules can be classified as Ability or Library. A module of the Ability type is built into a Harmony Ability Package (HAP) file, and a module of the Library type is built into a [Harmony Archive (HAR)](har-package.md) file or a [Harmony Shared Package (HSP)](shared-guide.md). +- In development, an application contains one or more modules. You can [create modules](https://developer.harmonyos.com/en/docs/documentation/doc-guides-V3/add_new_module-0000001053223741-V3) in the application project in [DevEco Studio](https://developer.harmonyos.com/en/develop/deveco-studio/). As a basic functional unit of an OpenHarmony application/service, a module contains source code, resource files, third-party libraries, and application/service configuration files, and can be built and run independently. Modules can be classified as Ability or Library. A module of the Ability type is built into a Harmony Ability Package (HAP) file, and a module of the Library type is built into a [Harmony Archive (HAR)](har-package.md) file or a [Harmony Shared Package (HSP)](shared-guide.md). A module can contain one or more [UIAbility](../application-models/uiability-overview.md) components, as shown in the figure below. **Figure 1** Relationship between modules and UIAbility components diff --git a/en/application-dev/quick-start/arkts-two-way-sync.md b/en/application-dev/quick-start/arkts-two-way-sync.md index ee6f1a6be51054893ed11686cb92a192b850c730..25acb5741b55ed121950726455f9b3bfce183d29 100644 --- a/en/application-dev/quick-start/arkts-two-way-sync.md +++ b/en/application-dev/quick-start/arkts-two-way-sync.md @@ -1,4 +1,4 @@ -# $ Syntax: Two-Way Synchronization of Built-in Components +# $$ Syntax: Two-Way Synchronization of Built-in Components The $$ operator provides a TS variable by-reference to a built-in component so that the variable value and the internal state of that component are kept in sync. diff --git a/en/application-dev/quick-start/module-configuration-file.md b/en/application-dev/quick-start/module-configuration-file.md index ac141ad75d108f68d25007491a15062ae958563e..f9a2bae37b168a476bc6729db3565eb0c10756a9 100644 --- a/en/application-dev/quick-start/module-configuration-file.md +++ b/en/application-dev/quick-start/module-configuration-file.md @@ -226,7 +226,7 @@ The **metadata** tag represents the custom metadata of the HAP file. The tag val ## abilities -UIAbility configuration of the module, which is valid only for the current UIAbility component. +The **abilities** tag represents the UIAbility configuration of the module, which is valid only for the current UIAbility component. **By default, application icons cannot be hidden from the home screen in OpenHarmony.** @@ -242,7 +242,7 @@ This requirement on application icons is intended to prevent malicious applicati **Setting the application icon to be displayed on the home screen**: -Set **icon**, **label**, and **skills** under **abilities** in the **module.json5** file. In addition, make sure the **skills** configuration contains **ohos.want.action.home** and **entity.system.home**. +Set **icon**, **label**, and **skills** under **abilities** in the **module.json5** file. Make sure the **skills** configuration contains **ohos.want.action.home** and **entity.system.home**. ``` { diff --git a/en/application-dev/quick-start/module-structure.md b/en/application-dev/quick-start/module-structure.md index 2959e6a942a6236a1717d9f2ead60dc7f814e479..b155d24ed6d4d22307c37a3374542b8283d1f352 100644 --- a/en/application-dev/quick-start/module-structure.md +++ b/en/application-dev/quick-start/module-structure.md @@ -205,7 +205,7 @@ This requirement on application icons is intended to prevent malicious applicati **Setting the application icon to be displayed on the home screen**: -Set **icon**, **label**, and **skills** under **abilities** in the **config.json** file. In addition, make sure the **skills** configuration contains **ohos.want.action.home** and **entity.system.home**. +Set **icon**, **label**, and **skills** under **abilities** in the **config.json** file. Make sure the **skills** configuration contains **ohos.want.action.home** and **entity.system.home**. ``` { diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md index f9a6af9e1de4ac19c1623914fcd7e6a62c41a3fd..8b122dde9179dc70c4caba012a1c23b5cc8d3919 100644 --- a/en/application-dev/reference/apis/Readme-EN.md +++ b/en/application-dev/reference/apis/Readme-EN.md @@ -210,6 +210,9 @@ - [@ohos.multimedia.camera (Camera Management)](js-apis-camera.md) - [@ohos.multimedia.image (Image Processing)](js-apis-image.md) - [@ohos.multimedia.media (Media)](js-apis-media.md) + - [@ohos.multimedia.systemSoundManager (System Sound Management)](js-apis-systemSoundManager.md) + - multimedia + - [ringtonePlayer (Ringtone Player)](js-apis-inner-multimedia-ringtonePlayer.md) - Resource Manager - [@ohos.i18n (Internationalization)](js-apis-i18n.md) @@ -238,6 +241,7 @@ - [PermissionRequestResult](js-apis-permissionrequestresult.md) - Data Management + - [@ohos.data.cloudData (Device-Cloud Synergy)](js-apis-data-cloudData.md) - [@ohos.data.dataAbility (DataAbility Predicates)](js-apis-data-ability.md) - [@ohos.data.dataShare (DataShare)](js-apis-data-dataShare.md) - [@ohos.data.dataSharePredicates (DataShare Predicates)](js-apis-data-dataSharePredicates.md) @@ -319,6 +323,7 @@ - [@ohos.InputMethodExtensionAbility (InputMethodExtensionAbility)](js-apis-inputmethod-extension-ability.md) - [@ohos.InputMethodExtensionContext (InputMethodExtensionContext)](js-apis-inputmethod-extension-context.md) - [@ohos.InputMethodSubtype (Input Method Subtype)](js-apis-inputmethod-subtype.md) + - [@ohos.logLibrary (Log Library)](js-apis-loglibrary.md) - [@ohos.pasteboard (Pasteboard)](js-apis-pasteboard.md) - [@ohos.screenLock (Screenlock)](js-apis-screen-lock.md) - [@ohos.systemDateTime (System Time and Time Zone)](js-apis-system-date-time.md) diff --git a/en/application-dev/reference/apis/common_event/Readme-EN.md b/en/application-dev/reference/apis/common_event/Readme-EN.md index 9c61482c2e615aa50161c5482c8c46bb91027d1a..adae88f06be7be491c51e03e795a22031b170e33 100644 --- a/en/application-dev/reference/apis/common_event/Readme-EN.md +++ b/en/application-dev/reference/apis/common_event/Readme-EN.md @@ -3,6 +3,7 @@ - [Common Events of the Ability Subsystem](commonEvent-ability.md) - [Common Events of the Bundle Management Subsystem](commonEvent-bundleManager.md) - [Common Events of the Notification Service](commonEvent-ans.md) -- [Common Events of the Resource Scheduling Subsystem](commonEvent-resourceschedule.md) +- [Common Events of the Resource Scheduler Subsystem](commonEvent-resourceschedule.md) - [Common Events of the Telephony Subsystem](commonEvent-telephony.md) - [Common Events of the USB Subsystem](commonEvent-usb.md) + diff --git a/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md b/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md index 41e7e2adae16d45e83fc527010939bdb5cfe119c..191c38c2d5896caccbd688e43db37a0301ed0c3c 100644 --- a/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md +++ b/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md @@ -1,5 +1,5 @@ -# Common Events of the Resource Scheduling Subsystem -This document lists the common system events provided by the resource scheduling subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. +# Common Events of the Resource Scheduler Subsystem +This document lists the common system events provided by the resource scheduler subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. ## COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED Indicates that the system idle mode has changed. diff --git a/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md b/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md index 86b80960d6de170eb7def9e9bfcc88aa8913c7ad..ffedb677c4743434e3c860a6d56b7af5d19be500 100644 --- a/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md +++ b/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md @@ -64,7 +64,7 @@ For details about the error codes, see [Application Access Control Error Codes]( | ID| Error Message| | -------- | -------- | -| 12100001 | The parameter is invalid. The tokenID is 0 or the permissionName exceeds 256 bytes. | +| 12100001 | The parameter is invalid. The tokenID is 0, or the permissionName exceeds 256 bytes. | **Example** @@ -74,7 +74,7 @@ import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. try { - atManager.checkAccessToken(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS").then((data) => { + atManager.checkAccessToken(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS').then((data) => { console.log(`checkAccessToken success, data->${JSON.stringify(data)}`); }).catch((err) => { console.log(`checkAccessToken fail, err->${JSON.stringify(err)}`); @@ -111,14 +111,14 @@ For details about the error codes, see [Application Access Control Error Codes]( | ID| Error Message| | -------- | -------- | -| 12100001 | The parameter is invalid. The tokenID is 0 or the permissionName exceeds 256 bytes. | +| 12100001 | The parameter is invalid. The tokenID is 0, or the permissionName exceeds 256 bytes. | **Example** ```js let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. -let data = atManager.verifyAccessTokenSync(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS"); +let data = atManager.verifyAccessTokenSync(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS'); console.log(`data->${JSON.stringify(data)}`); ``` @@ -154,7 +154,7 @@ For details about the error codes, see [Application Access Control Error Codes]( | ID| Error Message| | -------- | -------- | -| 12100001 | The parameter is invalid. The tokenID is 0, the permissionName is greater than 256 bytes, or the flags value is invalid. | +| 12100001 | The parameter is invalid. The tokenID is 0, the permissionName exceeds 256 bytes, or the flags value is invalid. | | 12100002 | The specified tokenID does not exist. | | 12100003 | The specified permission does not exist. | | 12100006 | The application specified by the tokenID is not allowed to be granted with the specified permission. Either the application is a sandbox or the tokenID is from a remote device. | @@ -169,7 +169,7 @@ let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. let permissionFlags = 1; try { - atManager.grantUserGrantedPermission(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", permissionFlags).then(() => { + atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS', permissionFlags).then(() => { console.log('grantUserGrantedPermission success'); }).catch((err) => { console.log(`grantUserGrantedPermission fail, err->${JSON.stringify(err)}`); @@ -221,7 +221,7 @@ let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. let permissionFlags = 1; try { - atManager.grantUserGrantedPermission(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", permissionFlags, (err, data) => { + atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS', permissionFlags, (err, data) => { if (err) { console.log(`grantUserGrantedPermission fail, err->${JSON.stringify(err)}`); } else { @@ -280,7 +280,7 @@ let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. let permissionFlags = 1; try { - atManager.revokeUserGrantedPermission(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", permissionFlags).then(() => { + atManager.revokeUserGrantedPermission(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS', permissionFlags).then(() => { console.log('revokeUserGrantedPermission success'); }).catch((err) => { console.log(`revokeUserGrantedPermission fail, err->${JSON.stringify(err)}`); @@ -332,7 +332,7 @@ let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. let permissionFlags = 1; try { - atManager.revokeUserGrantedPermission(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", permissionFlags, (err, data) => { + atManager.revokeUserGrantedPermission(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS', permissionFlags, (err, data) => { if (err) { console.log(`revokeUserGrantedPermission fail, err->${JSON.stringify(err)}`); } else { @@ -375,7 +375,7 @@ For details about the error codes, see [Application Access Control Error Codes]( | ID| Error Message| | -------- | -------- | -| 12100001 | The parameter is invalid. The tokenID is 0 or the permissionName exceeds 256 bytes. | +| 12100001 | The parameter is invalid. The tokenID is 0, or the permissionName exceeds 256 bytes. | | 12100002 | The specified tokenID does not exist. | | 12100003 | The specified permission does not exist. | | 12100006 | The operation is not allowed. Either the application is a sandbox or the tokenID is from a remote device. | @@ -389,7 +389,7 @@ import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. try { - atManager.getPermissionFlags(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS").then((data) => { + atManager.getPermissionFlags(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS').then((data) => { console.log(`getPermissionFlags success, data->${JSON.stringify(data)}`); }).catch((err) => { console.log(`getPermissionFlags fail, err->${JSON.stringify(err)}`); @@ -443,7 +443,7 @@ Subscribes to permission state changes of the specified applications and permiss | ------------------ | --------------------- | ---- | ------------------------------------------------------------ | | type | string | Yes | Event type to subscribe to. The value is **'permissionStateChange'**, which indicates the permission grant state change. | | tokenIDList | Array<number> | Yes | Token IDs of the applications to observe. If this parameter is left empty, the permission grant state changes of all applications are observed. | -| permissionList | Array<Permissions> | Yes | Permissions to observe. If this parameter is left empty, the grant state changes of all permissions are observed. | +| permissionList | Array<Permissions> | Yes | List of permission names. If this parameter is left empty, the grant state changes of all permissions are subscribed to. | | callback | Callback<[PermissionStateChangeInfo](#permissionstatechangeinfo9)> | Yes| Callback invoked to return the permission grant state change.| **Error codes** @@ -452,7 +452,7 @@ For details about the error codes, see [Application Access Control Error Codes]( | ID| Error Message| | -------- | -------- | -| 12100001 | The parameter is invalid. The tokenID is 0 or the permissionName exceeds 256 bytes. | +| 12100001 | The parameter is invalid. The tokenID is 0, or the permissionName exceeds 256 bytes. | | 12100004 | The interface is called repeatedly with the same input. | | 12100005 | The registration time has exceeded the limitation. | | 12100007 | Service is abnormal. | @@ -461,16 +461,16 @@ For details about the error codes, see [Application Access Control Error Codes]( **Example** ```js -import abilityAccessCtrl, {Permissions} from '@ohos.abilityAccessCtrl'; +import {Permissions} from '@ohos.abilityAccessCtrl'; import bundleManager from '@ohos.bundle.bundleManager'; let atManager = abilityAccessCtrl.createAtManager(); let appInfo = bundleManager.getApplicationInfoSync('com.example.myapplication', 0, 100); let tokenIDList: Array = [appInfo.accessTokenId]; -let permissionList: Array = ["ohos.permission.DISTRIBUTED_DATASYNC"]; +let permissionList: Array = ['ohos.permission.DISTRIBUTED_DATASYNC']; try { atManager.on('permissionStateChange', tokenIDList, permissionList, (data) => { - console.debug("receive permission state change, data:" + JSON.stringify(data)); + console.debug('receive permission state change, data:' + JSON.stringify(data)); }); } catch(err) { console.log(`catch err->${JSON.stringify(err)}`); @@ -505,20 +505,20 @@ For details about the error codes, see [Application Access Control Error Codes]( | ID| Error Message| | -------- | -------- | | 12100001 | The parameter is invalid. The tokenIDs or permissionNames in the list are all invalid. | -| 12100004 | The interface is not used together with "on". | +| 12100004 | The interface is not used together with 'on'. | | 12100007 | Service is abnormal. | | 12100008 | Out of memory. | **Example** ```js -import abilityAccessCtrl, {Permissions} from '@ohos.abilityAccessCtrl'; +import {Permissions} from '@ohos.abilityAccessCtrl'; import bundleManager from '@ohos.bundle.bundleManager'; let atManager = abilityAccessCtrl.createAtManager(); let appInfo = bundleManager.getApplicationInfoSync('com.example.myapplication', 0, 100); let tokenIDList: Array = [appInfo.accessTokenId]; -let permissionList: Array = ["ohos.permission.DISTRIBUTED_DATASYNC"]; +let permissionList: Array = ['ohos.permission.DISTRIBUTED_DATASYNC']; try { atManager.off('permissionStateChange', tokenIDList, permissionList); } catch(err) { @@ -558,7 +558,7 @@ import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. -let promise = atManager.verifyAccessToken(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS"); +let promise = atManager.verifyAccessToken(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS'); promise.then(data => { console.log(`promise: data->${JSON.stringify(data)}`); }); @@ -599,10 +599,10 @@ For details about the error codes, see [Application Access Control Error Codes]( import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; let atManager = abilityAccessCtrl.createAtManager(); try { - atManager.requestPermissionsFromUser(this.context, ["ohos.permission.CAMERA"], (err, data)=>{ - console.info("data:" + JSON.stringify(data)); - console.info("data permissions:" + data.permissions); - console.info("data authResults:" + data.authResults); + atManager.requestPermissionsFromUser(this.context, ['ohos.permission.CAMERA'], (err, data)=>{ + console.info('data:' + JSON.stringify(data)); + console.info('data permissions:' + data.permissions); + console.info('data authResults:' + data.authResults); }); } catch(err) { console.log(`catch err->${JSON.stringify(err)}`); @@ -650,12 +650,12 @@ For details about the error codes, see [Application Access Control Error Codes]( import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; let atManager = abilityAccessCtrl.createAtManager(); try { - atManager.requestPermissionsFromUser(this.context, ["ohos.permission.CAMERA"]).then((data) => { - console.info("data:" + JSON.stringify(data)); - console.info("data permissions:" + data.permissions); - console.info("data authResults:" + data.authResults); + atManager.requestPermissionsFromUser(this.context, ['ohos.permission.CAMERA']).then((data) => { + console.info('data:' + JSON.stringify(data)); + console.info('data permissions:' + data.permissions); + console.info('data authResults:' + data.authResults); }).catch((err) => { - console.info("data:" + JSON.stringify(err)); + console.info('data:' + JSON.stringify(err)); }) } catch(err) { console.log(`catch err->${JSON.stringify(err)}`); @@ -694,7 +694,7 @@ import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. -let promise = atManager.verifyAccessToken(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS"); +let promise = atManager.verifyAccessToken(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS'); promise.then(data => { console.log(`promise: data->${JSON.stringify(data)}`); }); @@ -727,14 +727,14 @@ For details about the error codes, see [Application Access Control Error Codes]( | ID| Error Message| | -------- | -------- | -| 12100001 | The parameter is invalid. The tokenID is 0 or the permissionName exceeds 256 bytes. | +| 12100001 | The parameter is invalid. The tokenID is 0, or the permissionName exceeds 256 bytes. | **Example** ```js let atManager = abilityAccessCtrl.createAtManager(); let tokenID = 0; // Use bundleManager.getApplicationInfo() to obtain the token ID for a system application, and use bundleManager.getBundleInfoForSelf() to obtain the token ID for a non-system application. -let data = atManager.checkAccessTokenSync(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS"); +let data = atManager.checkAccessTokenSync(tokenID, 'ohos.permission.GRANT_SENSITIVE_PERMISSIONS'); console.log(`data->${JSON.stringify(data)}`); ``` diff --git a/en/application-dev/reference/apis/js-apis-accessibility-config.md b/en/application-dev/reference/apis/js-apis-accessibility-config.md index 673d820d17407a35991da01b0b25ee48cd51c7eb..09fb6c49bf265b0a4ef22ddd38dc46370097304d 100644 --- a/en/application-dev/reference/apis/js-apis-accessibility-config.md +++ b/en/application-dev/reference/apis/js-apis-accessibility-config.md @@ -247,7 +247,7 @@ Cancels the listener for changes in the list of enabled accessibility extension | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | type | string | Yes| Listening type. The value is fixed at **'enabledAccessibilityExtensionListChange'**, indicating listening for changes in the list of enabled accessibility extension abilities.| -| callback | Callback<void> | No| Callback invoked when the list of enabled accessibility extension abilities changes.| +| callback | Callback<void> | No| Callback for the event.| **Example** @@ -425,7 +425,7 @@ Cancels the listener for attribute changes. This API uses an asynchronous callba | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| callback | Callback<T> | No| Callback invoked when the list of enabled accessibility extension abilities changes.| +| callback | Callback<T> | No| Callback for the event.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-accessibility.md b/en/application-dev/reference/apis/js-apis-accessibility.md index 0b00bbfdf4c7c50ae3ffbd0d0fd1cc6effdb2f7d..2f92eaaf3052bd34f76baefc6a04de7a8d59b4a4 100644 --- a/en/application-dev/reference/apis/js-apis-accessibility.md +++ b/en/application-dev/reference/apis/js-apis-accessibility.md @@ -18,9 +18,9 @@ Enumerates the states of an accessibility application. **System capability**: SystemCapability.BarrierFree.Accessibility.Core -| Name| Description| -| -------- | -------- | -| enable | The accessibility application is enabled.| +| Name | Description | +| ------- | -------- | +| enable | The accessibility application is enabled.| | disable | The accessibility application is disabled.| | install | The accessibility application has been installed.| @@ -30,13 +30,13 @@ Enumerates the types of accessibility applications. **System capability**: SystemCapability.BarrierFree.Accessibility.Core -| Name| Description| -| -------- | -------- | -| audible | The accessibility application provides audible feedback.| -| generic | The accessibility application provides generic feedback.| -| haptic | The accessibility application provides haptic feedback.| -| spoken | The accessibility application provides spoken feedback.| -| visual | The accessibility application provides visual feedback.| +| Name | Description | +| ---------------- | --------- | +| audible | The accessibility application provides audible feedback.| +| generic | The accessibility application provides generic feedback.| +| haptic | The accessibility application provides haptic feedback.| +| spoken | The accessibility application provides spoken feedback.| +| visual | The accessibility application provides visual feedback.| | all9+ | All the preceding types.| ## AccessibilityAbilityInfo @@ -47,16 +47,16 @@ Provides information about an accessibility application. ### Attributes -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| id | string | Yes| No| Ability ID.| -| name | string | Yes| No| Ability name.| -| bundleName | string | Yes| No| Bundle name.| -| targetBundleNames9+ | Array<string> | Yes| No| Name of the target bundle.| -| abilityTypes | Array<[AbilityType](#abilitytype)> | Yes| No| Accessibility application type.| -| capabilities | Array<[Capability](#capability)> | Yes| No| Capabilities list of the accessibility application.| -| description | string | Yes| No| Description of the accessibility application.| -| eventTypes | Array<[EventType](#eventtype)> | Yes| No| List of events that the accessibility application focuses on.| +| Name | Type | Readable | Writable | Description | +| ------------------------------ | ---------------------------------------- | ---- | ---- | ---------------- | +| id | string | Yes | No | Ability ID.| +| name | string | Yes | No | Ability name. | +| bundleName | string | Yes | No | Bundle name. | +| targetBundleNames9+ | Array<string> | Yes | No | Name of the target bundle. | +| abilityTypes | Array<[AbilityType](#abilitytype)> | Yes | No | Accessibility application type. | +| capabilities | Array<[Capability](#capability)> | Yes | No | Capabilities list of the accessibility application. | +| description | string | Yes | No | Description of the accessibility application. | +| eventTypes | Array<[EventType](#eventtype)> | Yes | No | List of events that the accessibility application focuses on. | ## Action @@ -64,24 +64,24 @@ Describes the target action supported by an accessibility application. **System capability**: SystemCapability.BarrierFree.Accessibility.Core -| Name| Description| -| -------- | -------- | -| click | Clicking.| -| longClick | Long pressing.| -| scrollForward | Scrolling forward. Not supported currently. | -| scrollBackward | Scrolling backward. Not supported currently. | -| focus | Obtaining focus. Not supported currently. | -| clearFocus | Clearing focus. Not supported currently. | -| clearSelection | Clearing selection. Not supported currently. | -| accessibilityFocus | Obtaining the accessibility focus. | -| clearAccessibilityFocus | Clearing the accessibility focus. | -| cut | Cut. Not supported currently. | -| copy | Copy. Not supported currently. | -| paste | Paste. Not supported currently. | -| select | Select. Not supported currently. | -| setText | Setting the text. Not supported currently. | -| delete | Delete. Not supported currently. | -| setSelection | Setting the selection. Not supported currently. | +| Name | Description | +| ----------------------- | ------------------ | +| click | Clicking. | +| longClick | Long pressing. | +| scrollForward | Scrolling forward. Not supported currently.| +| scrollBackward | Scrolling backward. Not supported currently.| +| focus | Obtaining focus. Not supported currently.| +| clearFocus | Clearing focus. Not supported currently.| +| clearSelection | Clearing selection. Not supported currently.| +| accessibilityFocus | Obtaining the accessibility focus. | +| clearAccessibilityFocus | Clearing the accessibility focus. | +| cut | Cut. Not supported currently. | +| copy | Copy. Not supported currently. | +| paste | Paste. Not supported currently. | +| select | Select. Not supported currently. | +| setText | Setting the text. Not supported currently.| +| delete | Delete. Not supported currently. | +| setSelection | Setting the selection. Not supported currently. | ## Capability @@ -89,13 +89,13 @@ Enumerates the capabilities of an accessibility application. **System capability**: SystemCapability.BarrierFree.Accessibility.Core -| Name| Description| -| -------- | -------- | -| retrieve | Capability to retrieve the window content.| -| touchGuide | Capability of touch guide mode.| -| keyEventObserver | Capability to filter key events.| -| zoom | Capability to control the display zoom level. Not supported currently. | -| gesture | Capability to perform gesture actions.| +| Name | Description | +| ---------------- | --------------------- | +| retrieve | Capability to retrieve the window content. | +| touchGuide | Capability of touch guide mode. | +| keyEventObserver | Capability to filter key events. | +| zoom | Capability to control the display zoom level. Not supported currently.| +| gesture | Capability to perform gesture actions. | ## CaptionsFontEdgeType8+ @@ -103,12 +103,12 @@ Enumerates the font edge types of captions. **System capability**: SystemCapability.BarrierFree.Accessibility.Hearing -| Name| Description| -| -------- | -------- | -| none | No effect.| -| raised | Raised effect.| -| depressed | Depressed effect.| -| uniform | Uniform effect.| +| Name | Description | +| ---------- | ----- | +| none | No effect. | +| raised | Raised effect.| +| depressed | Depressed effect.| +| uniform | Uniform effect.| | dropShadow | Drop shadow effect.| ## CaptionsFontFamily8+ @@ -117,16 +117,16 @@ Enumerates the font families of captions. **System capability**: SystemCapability.BarrierFree.Accessibility.Hearing -| Name| Description| -| -------- | -------- | -| default | Default font family.| -| monospacedSerif | Monospaced Serif fonts, which use the same width for each character.| -| serif | Serif fonts.| +| Name | Description | +| ------------------- | ----------------- | +| default | Default font family. | +| monospacedSerif | Monospaced Serif fonts, which use the same width for each character. | +| serif | Serif fonts. | | monospacedSansSerif | Monospaced Sans Serif fonts, which use the same width for each character.| -| sansSerif | Sans Serif fonts.| -| casual | Casual fonts.| -| cursive | Cursive fonts.| -| smallCapitals | Small caps fonts.| +| sansSerif | Sans Serif fonts. | +| casual | Casual fonts. | +| cursive | Cursive fonts. | +| smallCapitals | Small caps fonts. | ## CaptionsStyle8+ @@ -134,14 +134,14 @@ Describes the style of captions. **System capability**: SystemCapability.BarrierFree.Accessibility.Hearing -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes| No| Font family of captions.| -| fontScale | number | Yes| No| Font scale of captions.| -| fontColor | number \| string | Yes| No| Font color of captions.| -| fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes| No| Font edge type of captions.| -| backgroundColor | number \| string | Yes| No| Background color of captions.| -| windowColor | number \| string | Yes| No| Window color of captions.| +| Name | Type | Readable | Writable | Description | +| --------------- | ---------------------------------------- | ---- | ---- | ----------- | +| fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes | No | Font family of captions. | +| fontScale | number | Yes | No | Font scale of captions.| +| fontColor | number \| string | Yes | No | Font color of captions. | +| fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes | No | Font edge type of captions. | +| backgroundColor | number \| string | Yes | No | Background color of captions. | +| windowColor | number \| string | Yes | No | Window color of captions. | ## CaptionsManager8+ @@ -151,10 +151,10 @@ Implements configuration management for captions. Before calling any API of **Ca ### Attributes -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| enabled | boolean | Yes| No| Whether to enable captions configuration.| -| style | [CaptionsStyle](#captionsstyle8) | Yes| No| Style of captions.| +| Name | Type | Readable | Writable | Description | +| ------- | -------------------------------- | ---- | ---- | ----------- | +| enabled | boolean | Yes | No | Whether to enable captions configuration.| +| style | [CaptionsStyle](#captionsstyle8) | Yes | No | Style of captions. | ### on('enableChange') @@ -164,10 +164,10 @@ Enables listening for the enabled status changes of captions configuration. This **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Type of the event to listen for, which is set to **'enableChange'** in this API.| -| callback | Callback<boolean> | Yes| Callback invoked when the enabled status of captions configuration changes.| +| Name | Type | Mandatory | Description | +| -------- | ----------------------- | ---- | --------------------------------------- | +| type | string | Yes | Type of the event to listen for, which is set to **'enableChange'** in this API.| +| callback | Callback<boolean> | Yes | Callback invoked when the enabled status of captions configuration changes. | **Example** @@ -190,10 +190,10 @@ Enables listening for captions style changes. This API uses an asynchronous call **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Type of the event to listen for, which is set to **'styleChange'** in this API.| -| callback | Callback<[CaptionsStyle](#captionsstyle8)> | Yes| Callback invoked when the style of captions changes.| +| Name | Type | Mandatory | Description | +| -------- | ---------------------------------------- | ---- | ---------------------------------- | +| type | string | Yes | Type of the event to listen for, which is set to **'styleChange'** in this API.| +| callback | Callback<[CaptionsStyle](#captionsstyle8)> | Yes | Callback invoked when the style of captions changes. | **Example** @@ -218,10 +218,10 @@ Disables listening for the enabled status changes of captions configuration. Thi **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Type of the event to listen for, which is set to **'enableChange'** in this API.| -| callback | Callback<boolean> | No| Callback invoked when the enabled status of captions configuration changes.| +| Name | Type | Mandatory | Description | +| -------- | ----------------------- | ---- | ---------------------------------------- | +| type | string | Yes | Type of the event to listen for, which is set to **'enableChange'** in this API.| +| callback | Callback<boolean> | No | Callback for the event. | **Example** @@ -244,10 +244,10 @@ Disables listening for captions style changes. This API uses an asynchronous cal **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Type of the event to listen for, which is set to **'styleChange'** in this API.| -| callback | Callback<[CaptionsStyle](#captionsstyle8)> | No| Callback invoked when the style of captions changes.| +| Name | Type | Mandatory | Description | +| -------- | ---------------------------------------- | ---- | ------------------------------------ | +| type | string | Yes | Type of the event to listen for, which is set to **'styleChange'** in this API.| +| callback | Callback<[CaptionsStyle](#captionsstyle8)> | No | Callback for the event. | **Example** @@ -272,22 +272,22 @@ Describes a GUI change event. ### Attributes -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| type | [EventType](#eventtype) | Yes| Yes| Accessibility event type.| -| windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes| Yes| Window update type.| -| bundleName | string | Yes| Yes| Target application name.| -| componentType | string | Yes| Yes| Type of the event source component, for example, button or chart.| -| pageId | number | Yes| Yes| Page ID of the event source.| -| description | string | Yes| Yes| Event description. Not supported currently. | -| triggerAction | [Action](#action) | Yes| Yes| Action that triggers the event.| -| textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes| Yes| Text movement unit. Not supported currently. | -| contents | Array<string> | Yes| Yes| Array of contents.| -| lastContent | string | Yes| Yes| Latest content.| -| beginIndex | number | Yes| Yes| Sequence number of the first item displayed on the page. Not supported currently. | -| currentIndex | number | Yes| Yes| Sequence number of the current item. Not supported currently. | -| endIndex | number | Yes| Yes| Sequence number of the last item displayed on the page. Not supported currently. | -| itemCount | number | Yes| Yes| Total number of items. Not supported currently. | +| Name | Type | Readable | Writable | Description | +| ---------------- | ------------------------------------- | ---- | ---- | --------------------- | +| type | [EventType](#eventtype) | Yes | Yes | Accessibility event type. | +| windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes | Yes | Window update type. | +| bundleName | string | Yes | Yes | Target application name. | +| componentType | string | Yes | Yes | Type of the event source component, for example, button or chart. | +| pageId | number | Yes | Yes | Page ID of the event source. | +| description | string | Yes | Yes | Event description. Not supported currently. | +| triggerAction | [Action](#action) | Yes | Yes | Action that triggers the event. | +| textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes | Yes | Text movement unit. Not supported currently. | +| contents | Array<string> | Yes | Yes | Array of contents. | +| lastContent | string | Yes | Yes | Latest content. | +| beginIndex | number | Yes | Yes | Sequence number of the first item displayed on the page. Not supported currently.| +| currentIndex | number | Yes | Yes | Sequence number of the current item. Not supported currently. | +| endIndex | number | Yes | Yes | Sequence number of the last item displayed on the page. Not supported currently.| +| itemCount | number | Yes | Yes | Total number of items. Not supported currently. | ### constructor @@ -299,9 +299,9 @@ Implements a constructor. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| jsonObject | string | Yes| JSON string required for creating an object.| +| Name | Type | Mandatory | Description | +| ---------- | ------ | ---- | -------------------- | +| jsonObject | string | Yes | JSON string required for creating an object.| **Example** @@ -319,19 +319,19 @@ Enumerates accessibility event types. **System capability**: SystemCapability.BarrierFree.Accessibility.Core -| Name| Description| -| -------- | -------- | -| click | Event of clicking a component.| -| longClick | Event of long-pressing a component.| -| select | Event of selecting a component. Not supported currently. | -| focus | Event indicating that the component obtains the focus. Not supported currently. | -| textUpdate | Event indicating that the component text has been updated. Not supported currently. | -| hoverEnter | Event indicating that the hover enters a component. Not supported currently. | -| hoverExit | Event indicating that the hover exits a component. Not supported currently. | -| scroll | Event of the scroll view. Not supported currently. | -| textSelectionUpdate | Event indicating that the selected text has been updated. Not supported currently. | -| accessibilityFocus | Event indicating that the accessibility focus has been obtained.| -| accessibilityFocusClear | Event indicating that the accessibility focus has been cleared.| +| Name | Description | +| ----------------------- | ---------------------- | +| click | Event of clicking a component. | +| longClick | Event of long-pressing a component. | +| select | Event of selecting a component. Not supported currently. | +| focus | Event indicating that the component obtains the focus. Not supported currently. | +| textUpdate | Event indicating that the component text has been updated. Not supported currently.| +| hoverEnter | Event indicating that the hover enters a component. Not supported currently. | +| hoverExit | Event indicating that the hover exits a component. Not supported currently. | +| scroll | Event of the scroll view. Not supported currently. | +| textSelectionUpdate | Event indicating that the selected text has been updated. Not supported currently.| +| accessibilityFocus | Event indicating that the accessibility focus has been obtained. | +| accessibilityFocusClear | Event indicating that the accessibility focus has been cleared. | ## TextMoveUnit @@ -339,12 +339,12 @@ Enumerates the movement units for traversing the node text. **System capability**: SystemCapability.BarrierFree.Accessibility.Core -| Name| Description| -| -------- | -------- | -| char | The movement unit for traversing the node text is by character.| -| word | The movement unit for traversing the node text is by word.| -| line | The movement unit for traversing the node text is by line.| -| page | The movement unit for traversing the node text is by page.| +| Name | Description | +| --------- | --------------- | +| char | The movement unit for traversing the node text is by character.| +| word | The movement unit for traversing the node text is by word. | +| line | The movement unit for traversing the node text is by line. | +| page | The movement unit for traversing the node text is by page. | | paragraph | The movement unit for traversing the node text is by paragraph.| ## WindowUpdateType @@ -353,13 +353,13 @@ Enumerates window update types. **System capability**: SystemCapability.BarrierFree.Accessibility.Core -| Name| Description| -| -------- | -------- | -| add | Window adding.| -| remove | Window deletion.| -| bounds | Window boundary change.| +| Name | Description | +| ------ | ------------------ | +| add | Window adding. | +| remove | Window deletion. | +| bounds | Window boundary change. | | active | Window activity change.| -| focus | Window focus change.| +| focus | Window focus change. | ## accessibility.getAbilityLists(deprecated) @@ -370,21 +370,21 @@ Obtains the accessibility application list. This API uses a promise to return th > **NOTE** > > This API is supported since API version 7 and deprecated since API version 9. -> You are advised to use [getAccessibilityExtensionList()](#accessibilitygetaccessibilityextensionlist9). +> You are advised to use[getAccessibilityExtensionList()](#accessibilitygetaccessibilityextensionlist9). **System capability**: SystemCapability.BarrierFree.Accessibility.Core **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| -| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| +| Name | Type | Mandatory | Description | +| ----------- | ----------------------------- | ---- | -------- | +| abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type.| +| stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status.| **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| ---------------------------------------- | --------------------- | | Promise<Array<[AccessibilityAbilityInfo](#accessibilityabilityinfo)>> | Promise used to return the accessibility application list.| **Example** @@ -426,11 +426,11 @@ Obtains the accessibility application list. This API uses an asynchronous callba **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| -| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| -| callback | AsyncCallback<Array<[AccessibilityAbilityInfo](#accessibilityabilityinfo)>> | Yes| Callback used to return the accessibility application list.| +| Name | Type | Mandatory | Description | +| ----------- | ---------------------------------------- | ---- | ---------------- | +| abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. | +| stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. | +| callback | AsyncCallback<Array<[AccessibilityAbilityInfo](#accessibilityabilityinfo)>> | Yes | Callback used to return the accessibility application list.| **Example** @@ -470,15 +470,15 @@ Obtains the accessibility application list. This API uses a promise to return th **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| -| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| +| Name | Type | Mandatory | Description | +| ----------- | ----------------------------- | ---- | -------- | +| abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type.| +| stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status.| **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| ---------------------------------------- | --------------------- | | Promise<Array<[AccessibilityAbilityInfo](#accessibilityabilityinfo)>> | Promise used to return the accessibility application list.| **Example** @@ -515,11 +515,11 @@ Obtains the accessibility application list. This API uses an asynchronous callba **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| -| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| -| callback | AsyncCallback<Array<[AccessibilityAbilityInfo](#accessibilityabilityinfo)>> | Yes| Callback used to return the accessibility application list.| +| Name | Type | Mandatory | Description | +| ----------- | ---------------------------------------- | ---- | ---------------- | +| abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. | +| stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. | +| callback | AsyncCallback<Array<[AccessibilityAbilityInfo](#accessibilityabilityinfo)>> | Yes | Callback used to return the accessibility application list.| **Example** @@ -557,8 +557,8 @@ Obtains a **CaptionsManager** instance. **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| ------------------------------------ | ---------- | | [CaptionsManager](#captionsmanager8) | Captions configuration.| **Example** @@ -577,10 +577,10 @@ Enables listening for the enabled status changes of the accessibility applicatio **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Type of the event to listen for, which is set to **'accessibilityStateChange'** in this API.| -| callback | Callback<boolean> | Yes| Callback used to return the result.| +| Name | Type | Mandatory | Description | +| -------- | ----------------------- | ---- | ---------------------------------------- | +| type | string | Yes | Type of the event to listen for, which is set to **'accessibilityStateChange'** in this API.| +| callback | Callback<boolean> | Yes | Callback used to return the result. | **Example** @@ -604,10 +604,10 @@ Enables listening for the enabled status changes of the touch guide mode. This A **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Type of the event to listen for, which is set to **'touchGuideStateChange'** in this API.| -| callback | Callback<boolean> | Yes| Callback used to return the result.| +| Name | Type | Mandatory | Description | +| -------- | ----------------------- | ---- | ---------------------------------------- | +| type | string | Yes | Type of the event to listen for, which is set to **'touchGuideStateChange'** in this API.| +| callback | Callback<boolean> | Yes | Callback used to return the result. | **Example** @@ -631,10 +631,10 @@ Disables listening for the enabled status changes of the accessibility applicati **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | No| Type of the event to listen for, which is set to **'accessibilityStateChange'** in this API.| -| callback | Callback<boolean> | No| Callback used to return the result.| +| Name | Type | Mandatory | Description | +| -------- | ----------------------- | ---- | ---------------------------------------- | +| type | string | No | Type of the event to listen for, which is set to **'accessibilityStateChange'** in this API.| +| callback | Callback<boolean> | No | Callback for the event. | **Example** @@ -658,10 +658,10 @@ Disables listening for the enabled status changes of the touch guide mode. This **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | No| Type of the event to listen for, which is set to **'touchGuideStateChange'** in this API.| -| callback | Callback<boolean> | No| Callback used to return the result.| +| Name | Type | Mandatory | Description | +| -------- | ----------------------- | ---- | ---------------------------------------- | +| type | string | No | Type of the event to listen for, which is set to **'touchGuideStateChange'** in this API.| +| callback | Callback<boolean> | No | Callback for the event. | **Example** @@ -685,8 +685,8 @@ Checks whether accessibility is enabled. This API uses a promise to return the r **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| ---------------------- | ---------------------------------------- | | Promise<boolean> | Promise used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise.| **Example** @@ -709,9 +709,9 @@ Checks whether accessibility is enabled. This API uses an asynchronous callback **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | AsyncCallback<boolean> | Yes| Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise.| +| Name | Type | Mandatory | Description | +| -------- | ---------------------------- | ---- | ----------------------------------- | +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise.| **Example** @@ -735,8 +735,8 @@ Checks whether touch guide mode is enabled. This API uses a promise to return th **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| ---------------------- | ---------------------------------------- | | Promise<boolean> | Promise used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise.| **Example** @@ -759,9 +759,9 @@ Checks whether touch guide mode is enabled. This API uses an asynchronous callba **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | AsyncCallback<boolean> | Yes| Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise.| +| Name | Type | Mandatory | Description | +| -------- | ---------------------------- | ---- | ------------------------------------- | +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise.| **Example** @@ -790,14 +790,14 @@ Sends an accessibility event. This API uses a promise to return the result. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| +| Name | Type | Mandatory | Description | +| ----- | ----------------------- | ---- | -------- | +| event | [EventInfo](#eventinfo) | Yes | Accessibility event.| **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| ------------------- | ---------------- | | Promise<void> | Promise that returns no value.| **Example** @@ -830,10 +830,10 @@ Sends an accessibility event. This API uses an asynchronous callback to return t **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result. If the operation fails, **error** that contains data is returned. | +| Name | Type | Mandatory | Description | +| -------- | ------------------------- | ---- | ---------------------------------------- | +| event | [EventInfo](#eventinfo) | Yes | Accessibility event. | +| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation fails, **error** that contains data is returned.| **Example** @@ -862,14 +862,14 @@ Sends an accessibility event. This API uses a promise to return the result. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| +| Name | Type | Mandatory | Description | +| ----- | ----------------------- | ---- | -------- | +| event | [EventInfo](#eventinfo) | Yes | Accessibility event.| **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| ------------------- | ---------------- | | Promise<void> | Promise that returns no value.| **Example** @@ -901,10 +901,10 @@ Sends an accessibility event. This API uses an asynchronous callback to return t **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result. If the operation fails, **error** that contains data is returned. | +| Name | Type | Mandatory | Description | +| -------- | ------------------------- | ---- | ---------------------------------------- | +| event | [EventInfo](#eventinfo) | Yes | Accessibility event. | +| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation fails, **error** that contains data is returned.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-app-ability-appManager.md b/en/application-dev/reference/apis/js-apis-app-ability-appManager.md index 6be97f26f89b5bf8750a30555200d518990c709f..9fa26885cc9f8ab20b8c5a1dc17ee4be054195ad 100644 --- a/en/application-dev/reference/apis/js-apis-app-ability-appManager.md +++ b/en/application-dev/reference/apis/js-apis-app-ability-appManager.md @@ -22,9 +22,9 @@ Checks whether this application is undergoing a stability test. This API uses an **Parameters** -| Type| Description| -| -------- | -------- | -|AsyncCallback<boolean> |Callback used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is undergoing a stability test, and **false** means the opposite.| + | Type| Description| + | -------- | -------- | + |AsyncCallback<boolean> |Callback used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is undergoing a stability test, and **false** means the opposite.| **Error codes** @@ -59,9 +59,9 @@ Checks whether this application is undergoing a stability test. This API uses a **Return value** -| Type| Description| -| -------- | -------- | -| Promise<boolean> | Promise used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is undergoing a stability test, and **false** means the opposite.| + | Type| Description| + | -------- | -------- | + | Promise<boolean> | Promise used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is undergoing a stability test, and **false** means the opposite.| **Error codes** @@ -94,9 +94,9 @@ Checks whether this application is running on a RAM constrained device. This API **Return value** -| Type| Description| -| -------- | -------- | -| Promise<boolean> | Promise used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is running on a RAM constrained device, and **false** means the opposite.| + | Type| Description| + | -------- | -------- | + | Promise<boolean> | Promise used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is running on a RAM constrained device, and **false** means the opposite.| **Error codes** @@ -128,9 +128,9 @@ Checks whether this application is running on a RAM constrained device. This API **Parameters** -| Type| Description| -| -------- | -------- | -| AsyncCallback<boolean> |Callback used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is running on a RAM constrained device, and **false** means the opposite.| + | Type| Description| + | -------- | -------- | + | AsyncCallback<boolean> |Callback used to return the API call result and the result **true** or **false**. You can perform error handling or custom processing in this callback. The value **true** means that the application is running on a RAM constrained device, and **false** means the opposite.| **Error codes** @@ -164,9 +164,9 @@ Obtains the memory size of this application. This API uses a promise to return t **Return value** -| Type| Description| -| -------- | -------- | -| Promise<number> | Promise used to return the API call result and the memory size. You can perform error handling or custom processing in this callback.| + | Type| Description| + | -------- | -------- | + | Promise<number> | Promise used to return the API call result and the memory size. You can perform error handling or custom processing in this callback.| **Error codes** @@ -198,9 +198,9 @@ Obtains the memory size of this application. This API uses an asynchronous callb **Parameters** -| Type| Description| -| -------- | -------- | -|AsyncCallback<number> |Callback used to return the API call result and the memory size. You can perform error handling or custom processing in this callback.| + | Type| Description| + | -------- | -------- | + |AsyncCallback<number> |Callback used to return the API call result and the memory size. You can perform error handling or custom processing in this callback.| **Error codes** @@ -298,6 +298,82 @@ appManager.getRunningProcessInformation((err, data) => { }); ``` +## appManager.isSharedBundleRunning + +isSharedBundleRunning(bundleName: string, versionCode: number): Promise\; + +Checks whether the shared library is in use. This API uses a promise to return the result. + +**Required permissions**: ohos.permission.GET_RUNNING_INFO + +**System capability**: SystemCapability.Ability.AbilityRuntime.Core + +**System API**: This is a system API. + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | ---------------------------------------- | ---- | -------------- | +| bundleName | string | Yes | Bundle name of the shared library.| +| versionCode | number | Yes | Version number of the shared library. | + +**Return value** + +| Type| Description| +| -------- | -------- | +| Promise\ | Promise used to return the result. The value **true** means that the shared library is in use, and **false** means the opposite.| + +**Example** + +```ts +import appManager from '@ohos.app.ability.appManager'; + +appManager.isSharedBundleRunning(bundleName, versionCode).then((data) => { + console.log('The shared bundle running is: ${JSON.stringify(data)}'); +}).catch((error) => { + console.error('error: ${JSON.stringify(error)}'); +}); +``` + +## appManager.isSharedBundleRunning + +isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCallback\): void; + +Checks whether the shared library is in use. This API uses an asynchronous callback to return the result. + +**Required permissions**: ohos.permission.GET_RUNNING_INFO + +**System capability**: SystemCapability.Ability.AbilityRuntime.Core + +**System API**: This is a system API. + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | ---------------------------------------- | ---- | -------------- | +| bundleName | string | Yes | Bundle name of the shared library.| +| versionCode | number | Yes | Version number of the shared library. | + +**Return value** + +| Type| Description| +| -------- | -------- | +|AsyncCallback\> | Callback used to return the result. The value **true** means that the shared library is in use, and **false** means the opposite.| + +**Example** + +```ts +import appManager from '@ohos.app.ability.appManager'; + +appManager.isSharedBundleRunning(bundleName, versionCode, (err, data) => { + if (err) { + console.error('err: ${JSON.stringify(err)}'); + } else { + console.log('The shared bundle running is: ${JSON.stringify(data)}'); + } +}); +``` + ## appManager.on on(type: 'applicationState', observer: ApplicationStateObserver): number; @@ -641,7 +717,7 @@ Obtains applications that are running in the foreground. This API uses a promise | Type| Description| | -------- | -------- | -| Promise\> | Promise used to return an array holding the application state data. | +| Promise\> | Promise used to return an array holding the application state data.| **Error codes** @@ -731,11 +807,11 @@ Kills a process by bundle name and account ID. This API uses an asynchronous cal **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| bundleName | string | Yes| Bundle name.| -| accountId | number | Yes| ID of a system account. For details, see [getCreatedOsAccountsCount](js-apis-osAccount.md#getosaccountlocalidfromprocess).| -| callback | AsyncCallback\ | Yes| Callback used to return the API call result. You can perform error handling or custom processing in this callback.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | bundleName | string | Yes| Bundle name.| + | accountId | number | Yes| ID of a system account. For details, see [getCreatedOsAccountsCount](js-apis-osAccount.md#getosaccountlocalidfromprocess).| + | callback | AsyncCallback\ | Yes| Callback used to return the API call result. You can perform error handling or custom processing in this callback.| **Error codes** diff --git a/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md b/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md index 0e8d9ef45d1ab0b7fbaf0573aff13112b5dfe02b..cfd08c64b6cd10f74516ad9bac10b8d0febd0b97 100644 --- a/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md +++ b/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md @@ -315,7 +315,7 @@ class MyUIAbility extends UIAbility { onShare(wantParam:{ [key: string]: Object }): void; -Called when an ability shares data. +Called when this UIAbility sets data to share. **ohos.extra.param.key.contentTitle** indicates the title of the content to share in the sharing box, and **ohos.extra.param.key.shareAbstract** provides an abstract description of the content, **ohos.extra.param.key.shareUrl** indicates the online address of the service. You need to set these three items as objects, with the key set to **title**, **abstract**, and **url**, respectively. **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore @@ -332,9 +332,9 @@ import AbilityConstant from '@ohos.app.ability.AbilityConstant'; class MyUIAbility extends UIAbility { onShare(wantParams) { console.log('onShare'); - wantParams['ohos.extra.param.key.contentTitle'] = {title: "W3"}; - wantParams['ohos.extra.param.key.shareAbstract'] = {abstract: "communication for huawei employee"}; - wantParams['ohos.extra.param.key.shareUrl'] = {url: "w3.huawei.com"}; + wantParams['ohos.extra.param.key.contentTitle'] = {title: "OA"}; + wantParams['ohos.extra.param.key.shareAbstract'] = {abstract: "communication for company employee"}; + wantParams['ohos.extra.param.key.shareUrl'] = {url: "oa.example.com"}; } } ``` diff --git a/en/application-dev/reference/apis/js-apis-appAccount.md b/en/application-dev/reference/apis/js-apis-appAccount.md index 307b991bc1f5725cd7dffd73bc93ced1541ab004..6bb26ca37ab1d320d904cdaa17c5a100291f322c 100644 --- a/en/application-dev/reference/apis/js-apis-appAccount.md +++ b/en/application-dev/reference/apis/js-apis-appAccount.md @@ -65,11 +65,11 @@ Creates an app account. This API uses an asynchronous callback to return the res ```js try { - appAccountManager.createAccount("WangWu", (err) => { - console.log("createAccount err: " + JSON.stringify(err)); + appAccountManager.createAccount('WangWu', (err) => { + console.log('createAccount err: ' + JSON.stringify(err)); }); } catch (err) { - console.log("createAccount err: " + JSON.stringify(err)); + console.log('createAccount err: ' + JSON.stringify(err)); } ``` @@ -103,19 +103,19 @@ Creates an app account with custom data. This API uses an asynchronous callback ```js let options = { customData: { - "age": "10" + 'age': '10' } } try { - appAccountManager.createAccount("LiSi", options, (err) => { + appAccountManager.createAccount('LiSi', options, (err) => { if (err) { - console.log("createAccount failed, error: " + JSON.stringify(err)); + console.log('createAccount failed, error: ' + JSON.stringify(err)); } else { - console.log("createAccount successfully"); + console.log('createAccount successfully'); } }); } catch(err) { - console.log("createAccount exception: " + JSON.stringify(err)); + console.log('createAccount exception: ' + JSON.stringify(err)); } ``` @@ -132,7 +132,7 @@ Creates an app account with custom data. This API uses a promise to return the r | Name | Type | Mandatory | Description | | --------- | ------ | ---- | ---------------------------------------- | | name | string | Yes | Name of the app account to create. | -| options | [CreateAccountOptions](#createaccountoptions9) | No | Options for creating the app account. You can customize data based on service requirements, but do not add sensitive data (such as passwords and tokens). This parameter can be left empty.| +| options | [CreateAccountOptions](#createaccountoptions9) | No | Options for creating the app account. You can customize data based on service requirements, but do not add sensitive data (such as passwords and tokens).
By default, no value is passed, which means no additional information needs to be added for the account.| **Return value** @@ -154,17 +154,17 @@ Creates an app account with custom data. This API uses a promise to return the r ```js let options = { customData: { - "age": "10" + 'age': '10' } } try { - appAccountManager.createAccount("LiSi", options).then(() => { - console.log("createAccount successfully"); + appAccountManager.createAccount('LiSi', options).then(() => { + console.log('createAccount successfully'); }).catch((err) => { - console.log("createAccount failed, error: " + JSON.stringify(err)); + console.log('createAccount failed, error: ' + JSON.stringify(err)); }); } catch(err) { - console.log("createAccount exception: " + JSON.stringify(err)); + console.log('createAccount exception: ' + JSON.stringify(err)); } ``` @@ -198,8 +198,8 @@ Creates an app account implicitly based on the specified account owner. This API ```js function onResultCallback(code, result) { - console.log("resultCode: " + code); - console.log("result: " + JSON.stringify(result)); + console.log('resultCode: ' + code); + console.log('result: ' + JSON.stringify(result)); } function onRequestRedirectedCallback(request) { @@ -210,19 +210,19 @@ Creates an app account implicitly based on the specified account owner. This API entities: ['entity.system.default'], } this.context.startAbility(wantInfo).then(() => { - console.log("startAbility successfully"); + console.log('startAbility successfully'); }).catch((err) => { - console.log("startAbility err: " + JSON.stringify(err)); + console.log('startAbility err: ' + JSON.stringify(err)); }) } try { - appAccountManager.createAccountImplicitly("com.example.accountjsdemo", { + appAccountManager.createAccountImplicitly('com.example.accountjsdemo', { onResult: onResultCallback, onRequestRedirected: onRequestRedirectedCallback }); } catch (err) { - console.log("createAccountImplicitly exception: " + JSON.stringify(err)); + console.log('createAccountImplicitly exception: ' + JSON.stringify(err)); } ``` @@ -257,8 +257,8 @@ Creates an app account implicitly based on the specified account owner and optio ```js function onResultCallback(code, result) { - console.log("resultCode: " + code); - console.log("result: " + JSON.stringify(result)); + console.log('resultCode: ' + code); + console.log('result: ' + JSON.stringify(result)); } function onRequestRedirectedCallback(request) { @@ -269,23 +269,23 @@ Creates an app account implicitly based on the specified account owner and optio entities: ['entity.system.default'], } this.context.startAbility(wantInfo).then(() => { - console.log("startAbility successfully"); + console.log('startAbility successfully'); }).catch((err) => { - console.log("startAbility err: " + JSON.stringify(err)); + console.log('startAbility err: ' + JSON.stringify(err)); }) } let options = { - authType: "getSocialData", - requiredLabels: [ "student" ] + authType: 'getSocialData', + requiredLabels: [ 'student' ] }; try { - appAccountManager.createAccountImplicitly("com.example.accountjsdemo", options, { + appAccountManager.createAccountImplicitly('com.example.accountjsdemo', options, { onResult: onResultCallback, onRequestRedirected: onRequestRedirectedCallback }); } catch (err) { - console.log("createAccountImplicitly exception: " + JSON.stringify(err)); + console.log('createAccountImplicitly exception: ' + JSON.stringify(err)); } ``` @@ -316,15 +316,15 @@ Removes an app account. This API uses an asynchronous callback to return the res ```js try { - appAccountManager.removeAccount("ZhaoLiu", (err) => { + appAccountManager.removeAccount('ZhaoLiu', (err) => { if (err) { - console.log("removeAccount failed, error: " + JSON.stringify(err)); + console.log('removeAccount failed, error: ' + JSON.stringify(err)); } else { - console.log("removeAccount successfully"); + console.log('removeAccount successfully'); } }); } catch(err) { - console.log("removeAccount exception: " + JSON.stringify(err)); + console.log('removeAccount exception: ' + JSON.stringify(err)); } ``` @@ -360,13 +360,13 @@ Removes an app account. This API uses a promise to return the result. ```js try { - appAccountManager.removeAccount("Lisi").then(() => { - console.log("removeAccount successfully"); + appAccountManager.removeAccount('Lisi').then(() => { + console.log('removeAccount successfully'); }).catch((err) => { - console.log("removeAccount failed, error: " + JSON.stringify(err)); + console.log('removeAccount failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("removeAccount exception: " + JSON.stringify(err)); + console.log('removeAccount exception: ' + JSON.stringify(err)); } ``` @@ -400,15 +400,15 @@ Sets the access to the data of an account for an app. This API uses an asynchron ```js try { - appAccountManager.setAppAccess("ZhangSan", "com.example.accountjsdemo", true, (err) => { + appAccountManager.setAppAccess('ZhangSan', 'com.example.accountjsdemo', true, (err) => { if (err) { - console.log("setAppAccess failed: " + JSON.stringify(err)); + console.log('setAppAccess failed: ' + JSON.stringify(err)); } else { - console.log("setAppAccess successfully"); + console.log('setAppAccess successfully'); } }); } catch (err) { - console.log("setAppAccess exception: " + JSON.stringify(err)); + console.log('setAppAccess exception: ' + JSON.stringify(err)); } ``` @@ -447,13 +447,13 @@ Sets the access to the data of an account for an app. This API uses a promise to ```js try { - appAccountManager.setAppAccess("ZhangSan", "com.example.accountjsdemo", true).then(() => { - console.log("setAppAccess successfully"); + appAccountManager.setAppAccess('ZhangSan', 'com.example.accountjsdemo', true).then(() => { + console.log('setAppAccess successfully'); }).catch((err) => { - console.log("setAppAccess failed: " + JSON.stringify(err)); + console.log('setAppAccess failed: ' + JSON.stringify(err)); }); } catch (err) { - console.log("setAppAccess exception: " + JSON.stringify(err)); + console.log('setAppAccess exception: ' + JSON.stringify(err)); } ``` @@ -485,15 +485,15 @@ Checks whether an app can access the data of an account. This API uses an asynch ```js try { - appAccountManager.checkAppAccess("ZhangSan", "com.example.accountjsdemo", (err, isAccessible) => { + appAccountManager.checkAppAccess('ZhangSan', 'com.example.accountjsdemo', (err, isAccessible) => { if (err) { - console.log("checkAppAccess failed, error: " + JSON.stringify(err)); + console.log('checkAppAccess failed, error: ' + JSON.stringify(err)); } else { - console.log("checkAppAccess successfully"); + console.log('checkAppAccess successfully'); } }); } catch (err) { - console.log("checkAppAccess exception: " + JSON.stringify(err)); + console.log('checkAppAccess exception: ' + JSON.stringify(err)); } ``` @@ -530,13 +530,13 @@ Checks whether an app can access the data of an account. This API uses a promise ```js try { - appAccountManager.checkAppAccess("ZhangSan", "com.example.accountjsdemo").then((isAccessible) => { - console.log("checkAppAccess successfully, isAccessible: " + isAccessible); + appAccountManager.checkAppAccess('ZhangSan', 'com.example.accountjsdemo').then((isAccessible) => { + console.log('checkAppAccess successfully, isAccessible: ' + isAccessible); }).catch((err) => { - console.log("checkAppAccess failed, error: " + JSON.stringify(err)); + console.log('checkAppAccess failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("checkAppAccess exception: " + JSON.stringify(err)); + console.log('checkAppAccess exception: ' + JSON.stringify(err)); } ``` @@ -570,11 +570,11 @@ Sets data synchronization for an app account. This API uses an asynchronous call ```js try { - appAccountManager.setDataSyncEnabled("ZhangSan", true, (err) => { - console.log("setDataSyncEnabled err: " + JSON.stringify(err)); + appAccountManager.setDataSyncEnabled('ZhangSan', true, (err) => { + console.log('setDataSyncEnabled err: ' + JSON.stringify(err)); }); } catch (err) { - console.log("setDataSyncEnabled err: " + JSON.stringify(err)); + console.log('setDataSyncEnabled err: ' + JSON.stringify(err)); } ``` @@ -613,13 +613,13 @@ Sets data synchronization for an app account. This API uses a promise to return ```js try { - appAccountManager .setDataSyncEnabled("ZhangSan", true).then(() => { + appAccountManager .setDataSyncEnabled('ZhangSan', true).then(() => { console.log('setDataSyncEnabled Success'); }).catch((err) => { - console.log("setDataSyncEnabled err: " + JSON.stringify(err)); + console.log('setDataSyncEnabled err: ' + JSON.stringify(err)); }); } catch (err) { - console.log("setDataSyncEnabled err: " + JSON.stringify(err)); + console.log('setDataSyncEnabled err: ' + JSON.stringify(err)); } ``` @@ -652,15 +652,15 @@ Checks whether data synchronization is enabled for an app account. This API uses ```js try { - appAccountManager.checkDataSyncEnabled("ZhangSan", (err, isEnabled) => { + appAccountManager.checkDataSyncEnabled('ZhangSan', (err, isEnabled) => { if (err) { - console.log("checkDataSyncEnabled failed, err: " + JSON.stringify(err)); + console.log('checkDataSyncEnabled failed, err: ' + JSON.stringify(err)); } else { console.log('checkDataSyncEnabled successfully, isEnabled: ' + isEnabled); } }); } catch (err) { - console.log("checkDataSyncEnabled err: " + JSON.stringify(err)); + console.log('checkDataSyncEnabled err: ' + JSON.stringify(err)); } ``` @@ -698,13 +698,13 @@ Checks whether data synchronization is enabled for an app account. This API uses ```js try { - appAccountManager.checkDataSyncEnabled("ZhangSan").then((isEnabled) => { - console.log("checkDataSyncEnabled successfully, isEnabled: " + isEnabled); + appAccountManager.checkDataSyncEnabled('ZhangSan').then((isEnabled) => { + console.log('checkDataSyncEnabled successfully, isEnabled: ' + isEnabled); }).catch((err) => { - console.log("checkDataSyncEnabled failed, err: " + JSON.stringify(err)); + console.log('checkDataSyncEnabled failed, err: ' + JSON.stringify(err)); }); } catch (err) { - console.log("checkDataSyncEnabled err: " + JSON.stringify(err)); + console.log('checkDataSyncEnabled err: ' + JSON.stringify(err)); } ``` @@ -737,15 +737,15 @@ Sets a credential for an app account. This API uses an asynchronous callback to ```js try { - appAccountManager.setCredential("ZhangSan", "PIN_SIX", "xxxxxx", (err) => { + appAccountManager.setCredential('ZhangSan', 'PIN_SIX', 'xxxxxx', (err) => { if (err) { - console.log("setCredential failed, error: " + JSON.stringify(err)); + console.log('setCredential failed, error: ' + JSON.stringify(err)); } else { - console.log("setCredential successfully"); + console.log('setCredential successfully'); } }); } catch (err) { - console.log("setCredential exception: " + JSON.stringify(err)); + console.log('setCredential exception: ' + JSON.stringify(err)); } ``` @@ -783,13 +783,13 @@ Sets a credential for an app account. This API uses a promise to return the resu ```js try { - appAccountManager.setCredential("ZhangSan", "PIN_SIX", "xxxxxx").then(() => { - console.log("setCredential successfully"); + appAccountManager.setCredential('ZhangSan', 'PIN_SIX', 'xxxxxx').then(() => { + console.log('setCredential successfully'); }).catch((err) => { - console.log("setCredential failed, error: " + JSON.stringify(err)); + console.log('setCredential failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("setCredential exception: " + JSON.stringify(err)); + console.log('setCredential exception: ' + JSON.stringify(err)); } ``` @@ -822,15 +822,15 @@ Obtains the credential of an app account. This API uses an asynchronous callback ```js try { - appAccountManager.getCredential("ZhangSan", "PIN_SIX", (err, result) => { + appAccountManager.getCredential('ZhangSan', 'PIN_SIX', (err, result) => { if (err) { - console.log("getCredential failed, error: " + JSON.stringify(err)); + console.log('getCredential failed, error: ' + JSON.stringify(err)); } else { console.log('getCredential successfully, result: ' + result); } }); } catch (err) { - console.log("getCredential err: " + JSON.stringify(err)); + console.log('getCredential err: ' + JSON.stringify(err)); } ``` @@ -868,13 +868,13 @@ Obtains the credential of an app account. This API uses a promise to return the ```js try { - appAccountManager.getCredential("ZhangSan", "PIN_SIX").then((credential) => { - console.log("getCredential successfully, credential: " + credential); + appAccountManager.getCredential('ZhangSan', 'PIN_SIX').then((credential) => { + console.log('getCredential successfully, credential: ' + credential); }).catch((err) => { - console.log("getCredential failed, error: " + JSON.stringify(err)); + console.log('getCredential failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("getCredential exception: " + JSON.stringify(err)); + console.log('getCredential exception: ' + JSON.stringify(err)); } ``` @@ -908,15 +908,15 @@ Sets custom data for an app account. This API uses an asynchronous callback to r ```js try { - appAccountManager.setCustomData("ZhangSan", "age", "12", (err) => { + appAccountManager.setCustomData('ZhangSan', 'age', '12', (err) => { if (err) { - console.log("setCustomData failed, error: " + JSON.stringify(err)); + console.log('setCustomData failed, error: ' + JSON.stringify(err)); } else { - console.log("setCustomData successfully"); + console.log('setCustomData successfully'); } }); } catch (err) { - console.log("setCustomData exception: " + JSON.stringify(err)); + console.log('setCustomData exception: ' + JSON.stringify(err)); } ``` @@ -955,13 +955,13 @@ Sets custom data for an app account. This API uses a promise to return the resul ```js try { - appAccountManager.setCustomData("ZhangSan", "age", "12").then(() => { - console.log("setCustomData successfully"); + appAccountManager.setCustomData('ZhangSan', 'age', '12').then(() => { + console.log('setCustomData successfully'); }).catch((err) => { - console.log("setCustomData failed, error: " + JSON.stringify(err)); + console.log('setCustomData failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("setCustomData exception: " + JSON.stringify(err)); + console.log('setCustomData exception: ' + JSON.stringify(err)); } ``` @@ -994,15 +994,15 @@ Obtains the custom data of an app account based on the specified key. This API u ```js try { - appAccountManager.getCustomData("ZhangSan", "age", (err, data) => { + appAccountManager.getCustomData('ZhangSan', 'age', (err, data) => { if (err) { console.log('getCustomData failed, error: ' + err); } else { - console.log("getCustomData successfully, data: " + data); + console.log('getCustomData successfully, data: ' + data); } }); } catch (err) { - console.log("getCustomData exception: " + JSON.stringify(err)); + console.log('getCustomData exception: ' + JSON.stringify(err)); } ``` @@ -1040,13 +1040,13 @@ Obtains the custom data of an app account based on the specified key. This API u ```js try { - appAccountManager.getCustomData("ZhangSan", "age").then((data) => { - console.log("getCustomData successfully, data: " + data); + appAccountManager.getCustomData('ZhangSan', 'age').then((data) => { + console.log('getCustomData successfully, data: ' + data); }).catch((err) => { - console.log("getCustomData failed, error: " + JSON.stringify(err)); + console.log('getCustomData failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("getCustomData exception: " + JSON.stringify(err)); + console.log('getCustomData exception: ' + JSON.stringify(err)); } ``` @@ -1084,10 +1084,10 @@ Obtains the custom data of an app account based on the specified key. The API re ```js try { - let value = appAccountManager.getCustomDataSync("ZhangSan", "age"); - console.info("getCustomDataSync successfully, vaue:" + value); + let value = appAccountManager.getCustomDataSync('ZhangSan', 'age'); + console.info('getCustomDataSync successfully, vaue: ' + value); } catch (err) { - console.error("getCustomDataSync failed, error: " + JSON.stringify(err)); + console.error('getCustomDataSync failed, error: ' + JSON.stringify(err)); } ``` @@ -1117,13 +1117,13 @@ Obtains information about all accessible app accounts. This API uses an asynchro try { appAccountManager.getAllAccounts((err, data) => { if (err) { - console.debug("getAllAccounts failed, error:" + JSON.stringify(err)); + console.debug('getAllAccounts failed, error: ' + JSON.stringify(err)); } else { - console.debug("getAllAccounts successfully"); + console.debug('getAllAccounts successfully'); } }); } catch (err) { - console.debug("getAllAccounts exception: " + JSON.stringify(err)); + console.debug('getAllAccounts exception: ' + JSON.stringify(err)); } ``` @@ -1152,12 +1152,12 @@ Obtains information about all accessible app accounts. This API uses a promise t ```js try { appAccountManager.getAllAccounts().then((data) => { - console.debug("getAllAccounts successfully"); + console.debug('getAllAccounts successfully'); }).catch((err) => { - console.debug("getAllAccounts failed, error:" + JSON.stringify(err)); + console.debug('getAllAccounts failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.debug("getAllAccounts exception: " + JSON.stringify(err)); + console.debug('getAllAccounts exception: ' + JSON.stringify(err)); } ``` @@ -1188,15 +1188,15 @@ Obtains the app accounts that can be accessed by the invoker based on the app ac ```js try { - appAccountManager.getAccountsByOwner("com.example.accountjsdemo2", (err, data) => { + appAccountManager.getAccountsByOwner('com.example.accountjsdemo2', (err, data) => { if (err) { - console.debug("getAccountsByOwner failed, error:" + JSON.stringify(err)); + console.debug('getAccountsByOwner failed, error:' + JSON.stringify(err)); } else { - console.debug("getAccountsByOwner successfully, data:" + JSON.stringify(data)); + console.debug('getAccountsByOwner successfully, data:' + JSON.stringify(data)); } }); } catch (err) { - console.debug("getAccountsByOwner exception:" + JSON.stringify(err)); + console.debug('getAccountsByOwner exception:' + JSON.stringify(err)); } ``` @@ -1232,13 +1232,13 @@ Obtains the app accounts that can be accessed by the invoker based on the app ac ```js try { - appAccountManager.getAccountsByOwner("com.example.accountjsdemo2").then((data) => { - console.debug("getAccountsByOwner successfully, data:" + JSON.stringify(data)); + appAccountManager.getAccountsByOwner('com.example.accountjsdemo2').then((data) => { + console.debug('getAccountsByOwner successfully, data: ' + JSON.stringify(data)); }).catch((err) => { - console.debug("getAccountsByOwner failed, error:" + JSON.stringify(err)); + console.debug('getAccountsByOwner failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.debug("getAccountsByOwner exception:" + JSON.stringify(err)); + console.debug('getAccountsByOwner exception: ' + JSON.stringify(err)); } ``` @@ -1256,7 +1256,7 @@ Subscribes to account information changes of apps. | -------- | ---------------------------------------- | ---- | ------------------------------ | | type | 'accountChange' | Yes | Event type to subscribe to. The value is **'accountChange'**. An event will be reported when the account information of the target app changes.| | owners | Array<string> | Yes | App bundle names of the account. | -| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | Yes | Callback invoked to return a list of app accounts whose information is changed. | +| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | Yes | Callback registered to return the list of changed app accounts. | **Error codes** @@ -1270,12 +1270,12 @@ Subscribes to account information changes of apps. ```js function changeOnCallback(data){ - console.log("receive change data:" + JSON.stringify(data)); + console.log('receive change data:' + JSON.stringify(data)); } try{ - appAccountManager.on("accountChange", ["com.example.actsaccounttest"], changeOnCallback); + appAccountManager.on('accountChange', ['com.example.actsaccounttest'], changeOnCallback); } catch(err) { - console.error("on accountChange failed, error:" + JSON.stringify(err)); + console.error('on accountChange failed, error:' + JSON.stringify(err)); } ``` @@ -1292,7 +1292,7 @@ Unsubscribes from account information changes. | Name | Type | Mandatory | Description | | -------- | -------------------------------- | ---- | ------------ | | type | 'accountChange' | Yes | Event type to unsubscribe from. The value is **'accountChange'**. | -| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | No | Callback to unregister.| +| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | No | Callback to unregister. By default, no value is passed, which means to unregister all callbacks for the specified event.| **Error codes** @@ -1305,18 +1305,18 @@ Unsubscribes from account information changes. ```js function changeOnCallback(data) { - console.log("receive change data:" + JSON.stringify(data)); + console.log('receive change data:' + JSON.stringify(data)); } try{ - appAccountManager.on("accountChange", ["com.example.actsaccounttest"], changeOnCallback); + appAccountManager.on('accountChange', ['com.example.actsaccounttest'], changeOnCallback); } catch(err) { - console.error("on accountChange failed, error:" + JSON.stringify(err)); + console.error('on accountChange failed, error:' + JSON.stringify(err)); } try{ appAccountManager.off('accountChange', changeOnCallback); } catch(err){ - console.error("off accountChange failed, error:" + JSON.stringify(err)); + console.error('off accountChange failed, error:' + JSON.stringify(err)); } ``` @@ -1354,8 +1354,8 @@ Authenticates an app account. This API uses an asynchronous callback to return t function onResultCallback(code, authResult) { - console.log("resultCode: " + code); - console.log("authResult: " + JSON.stringify(authResult)); + console.log('resultCode: ' + code); + console.log('authResult: ' + JSON.stringify(authResult)); } function onRequestRedirectedCallback(request) { @@ -1366,19 +1366,19 @@ Authenticates an app account. This API uses an asynchronous callback to return t entities: ['entity.system.default'], } this.context.startAbility(wantInfo).then(() => { - console.log("startAbility successfully"); + console.log('startAbility successfully'); }).catch((err) => { - console.log("startAbility err: " + JSON.stringify(err)); + console.log('startAbility err: ' + JSON.stringify(err)); }) } try { - appAccountManager.auth("LiSi", "com.example.accountjsdemo", "getSocialData", { + appAccountManager.auth('LiSi', 'com.example.accountjsdemo', 'getSocialData', { onResult: onResultCallback, onRequestRedirected: onRequestRedirectedCallback }); } catch (err) { - console.log("auth exception: " + JSON.stringify(err)); + console.log('auth exception: ' + JSON.stringify(err)); } ``` @@ -1417,8 +1417,8 @@ Authenticates an app account with customized options. This API uses an asynchron function onResultCallback(code, authResult) { - console.log("resultCode: " + code); - console.log("authResult: " + JSON.stringify(authResult)); + console.log('resultCode: ' + code); + console.log('authResult: ' + JSON.stringify(authResult)); } function onRequestRedirectedCallback(request) { @@ -1429,22 +1429,22 @@ Authenticates an app account with customized options. This API uses an asynchron entities: ['entity.system.default'], } this.context.startAbility(wantInfo).then(() => { - console.log("startAbility successfully"); + console.log('startAbility successfully'); }).catch((err) => { - console.log("startAbility err: " + JSON.stringify(err)); + console.log('startAbility err: ' + JSON.stringify(err)); }) } let options = { - "password": "xxxx", + 'password': 'xxxx', }; try { - appAccountManager.auth("LiSi", "com.example.accountjsdemo", "getSocialData", options, { + appAccountManager.auth('LiSi', 'com.example.accountjsdemo', 'getSocialData', options, { onResult: onResultCallback, onRequestRedirected: onRequestRedirectedCallback }); } catch (err) { - console.log("auth exception: " + JSON.stringify(err)); + console.log('auth exception: ' + JSON.stringify(err)); } ``` @@ -1478,15 +1478,15 @@ Obtains the authorization token of the specified authentication type for an app ```js try { - appAccountManager.getAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData", (err, token) => { + appAccountManager.getAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData', (err, token) => { if (err) { - console.log("getAuthToken failed, error: " + JSON.stringify(err)); + console.log('getAuthToken failed, error: ' + JSON.stringify(err)); } else { - console.log("getAuthToken successfully, token: " + token); + console.log('getAuthToken successfully, token: ' + token); } }); } catch (err) { - console.log("getAuthToken exception: " + JSON.stringify(err)); + console.log('getAuthToken exception: ' + JSON.stringify(err)); } ``` @@ -1525,13 +1525,13 @@ Obtains the authorization token of the specified authentication type for an app ```js try { - appAccountManager.getAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData").then((token) => { - console.log("getAuthToken successfully, token: " + token); + appAccountManager.getAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData').then((token) => { + console.log('getAuthToken successfully, token: ' + token); }).catch((err) => { - console.log("getAuthToken failed, error: " + JSON.stringify(err)); + console.log('getAuthToken failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("getAuthToken exception: " + JSON.stringify(err)); + console.log('getAuthToken exception: ' + JSON.stringify(err)); } ``` @@ -1565,11 +1565,11 @@ Sets an authorization token of the specific authentication type for an app accou ```js try { - appAccountManager.setAuthToken("LiSi", "getSocialData", "xxxx", (err) => { + appAccountManager.setAuthToken('LiSi', 'getSocialData', 'xxxx', (err) => { if (err) { - console.log("setAuthToken failed, error: " + JSON.stringify(err)); + console.log('setAuthToken failed, error: ' + JSON.stringify(err)); } else { - console.log("setAuthToken successfully"); + console.log('setAuthToken successfully'); } }); } catch (err) { @@ -1612,13 +1612,13 @@ Sets an authorization token of the specific authentication type for an app accou ```js try { - appAccountManager.setAuthToken("LiSi", "getSocialData", "xxxx").then(() => { - console.log("setAuthToken successfully"); + appAccountManager.setAuthToken('LiSi', 'getSocialData', 'xxxx').then(() => { + console.log('setAuthToken successfully'); }).catch((err) => { - console.log("setAuthToken failed, error: " + JSON.stringify(err)); + console.log('setAuthToken failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("setAuthToken exception: " + JSON.stringify(err)); + console.log('setAuthToken exception: ' + JSON.stringify(err)); } ``` @@ -1653,11 +1653,11 @@ Deletes the authorization token of the specified authentication type for an app ```js try { - appAccountManager.deleteAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData", "xxxxx", (err) => { + appAccountManager.deleteAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData', 'xxxxx', (err) => { if (err) { console.log('deleteAuthToken failed, error: ' + JSON.stringify(err)); } else { - console.log("deleteAuthToken successfully"); + console.log('deleteAuthToken successfully'); } }); } catch (err) { @@ -1701,8 +1701,8 @@ Deletes the authorization token of the specified authentication type for an app ```js try { - appAccountManager.deleteAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData", "xxxxx").then(() => { - console.log("deleteAuthToken successfully"); + appAccountManager.deleteAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData', 'xxxxx').then(() => { + console.log('deleteAuthToken successfully'); }).catch((err) => { console.log('deleteAuthToken failed, error: ' + JSON.stringify(err)); }); @@ -1744,15 +1744,15 @@ Sets the visibility of an authorization token to an app. This API uses an asynch ```js try { - appAccountManager.setAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo", true, (err) => { + appAccountManager.setAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo', true, (err) => { if (err) { - console.log("setAuthTokenVisibility failed, error: " + JSON.stringify(err)); + console.log('setAuthTokenVisibility failed, error: ' + JSON.stringify(err)); } else { - console.log("setAuthTokenVisibility successfully"); + console.log('setAuthTokenVisibility successfully'); } }); } catch (err) { - console.log("setAuthTokenVisibility exception: " + JSON.stringify(err)); + console.log('setAuthTokenVisibility exception: ' + JSON.stringify(err)); } ``` @@ -1794,13 +1794,13 @@ Sets the visibility of an authorization token to an app. This API uses a promise ```js try { - appAccountManager.setAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo", true).then(() => { - console.log("setAuthTokenVisibility successfully"); + appAccountManager.setAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo', true).then(() => { + console.log('setAuthTokenVisibility successfully'); }).catch((err) => { - console.log("setAuthTokenVisibility failed, error: " + JSON.stringify(err)); + console.log('setAuthTokenVisibility failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("setAuthTokenVisibility exception: " + JSON.stringify(err)); + console.log('setAuthTokenVisibility exception: ' + JSON.stringify(err)); } ``` @@ -1834,15 +1834,15 @@ Checks the visibility of an authorization token of the specified authentication ```js try { - appAccountManager.checkAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo", (err, isVisible) => { + appAccountManager.checkAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo', (err, isVisible) => { if (err) { - console.log("checkAuthTokenVisibility failed, error: " + JSON.stringify(err)); + console.log('checkAuthTokenVisibility failed, error: ' + JSON.stringify(err)); } else { - console.log("checkAuthTokenVisibility successfully, isVisible: " + isVisible); + console.log('checkAuthTokenVisibility successfully, isVisible: ' + isVisible); } }); } catch (err) { - console.log("checkAuthTokenVisibility exception: " + JSON.stringify(err)); + console.log('checkAuthTokenVisibility exception: ' + JSON.stringify(err)); } ``` @@ -1881,13 +1881,13 @@ Checks the visibility of an authorization token of the specified authentication ```js try { - appAccountManager.checkAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo").then((isVisible) => { - console.log("checkAuthTokenVisibility successfully, isVisible: " + isVisible); + appAccountManager.checkAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo').then((isVisible) => { + console.log('checkAuthTokenVisibility successfully, isVisible: ' + isVisible); }).catch((err) => { - console.log("checkAuthTokenVisibility failed, error: " + JSON.stringify(err)); + console.log('checkAuthTokenVisibility failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("checkAuthTokenVisibility exception: " + JSON.stringify(err)); + console.log('checkAuthTokenVisibility exception: ' + JSON.stringify(err)); } ``` @@ -1919,15 +1919,15 @@ Obtains all tokens visible to the invoker for an app account. This API uses an a ```js try { - appAccountManager.getAllAuthTokens("LiSi", "com.example.accountjsdemo", (err, tokenArr) => { + appAccountManager.getAllAuthTokens('LiSi', 'com.example.accountjsdemo', (err, tokenArr) => { if (err) { - console.log("getAllAuthTokens failed, error: " + JSON.stringify(err)); + console.log('getAllAuthTokens failed, error: ' + JSON.stringify(err)); } else { console.log('getAllAuthTokens successfully, tokenArr: ' + tokenArr); } }); } catch (err) { - console.log("getAllAuthTokens exception: " + JSON.stringify(err)); + console.log('getAllAuthTokens exception: ' + JSON.stringify(err)); } ``` @@ -1964,13 +1964,13 @@ Obtains all tokens visible to the invoker for an app account. This API uses a pr ```js try { - appAccountManager.getAllAuthTokens("LiSi", "com.example.accountjsdemo").then((tokenArr) => { + appAccountManager.getAllAuthTokens('LiSi', 'com.example.accountjsdemo').then((tokenArr) => { console.log('getAllAuthTokens successfully, tokenArr: ' + JSON.stringify(tokenArr)); }).catch((err) => { - console.log("getAllAuthTokens failed, error: " + JSON.stringify(err)); + console.log('getAllAuthTokens failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("getAllAuthTokens exception: " + JSON.stringify(err)); + console.log('getAllAuthTokens exception: ' + JSON.stringify(err)); } ``` @@ -2003,11 +2003,11 @@ Obtains the authorization list of the specified authentication type for an app a ```js try { - appAccountManager.getAuthList("com.example.accountjsdemo", "getSocialData", (err, authList) => { + appAccountManager.getAuthList('LiSi', 'getSocialData', (err, authList) => { if (err) { - console.log("getAuthList failed, error: " + JSON.stringify(err)); + console.log('getAuthList failed, error: ' + JSON.stringify(err)); } else { - console.log("getAuthList successfully, authList: " + authList); + console.log('getAuthList successfully, authList: ' + authList); } }); } catch (err) { @@ -2049,13 +2049,13 @@ Obtains the authorization list of the specified authentication type for an app a ```js try { - appAccountManager.getAuthList("com.example.accountjsdemo", "getSocialData").then((authList) => { - console.log("getAuthList successfully, authList: " + authList); + appAccountManager.getAuthList('LiSi', 'getSocialData').then((authList) => { + console.log('getAuthList successfully, authList: ' + authList); }).catch((err) => { - console.log("getAuthList failed, error: " + JSON.stringify(err)); + console.log('getAuthList failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("getAuthList exception: " + JSON.stringify(err)); + console.log('getAuthList exception: ' + JSON.stringify(err)); } ``` @@ -2063,7 +2063,7 @@ Obtains the authorization list of the specified authentication type for an app a getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>): void -Obtains the authenticator callback for the authentication session. This API uses an asynchronous callback to return the result. +Obtains the authenticator callback for an authentication session. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Account.AppAccount @@ -2093,23 +2093,23 @@ Obtains the authenticator callback for the authentication session. This API uses try { appAccountManager.getAuthCallback(sessionId, (err, callback) => { if (err != null) { - console.log("getAuthCallback err: " + JSON.stringify(err)); + console.log('getAuthCallback err: ' + JSON.stringify(err)); return; } var result = { accountInfo: { - name: "Lisi", - owner: "com.example.accountjsdemo", + name: 'Lisi', + owner: 'com.example.accountjsdemo', }, tokenInfo: { - token: "xxxxxx", - authType: "getSocialData" + token: 'xxxxxx', + authType: 'getSocialData' } }; callback.onResult(0, result); }); } catch (err) { - console.log("getAuthCallback exception: " + JSON.stringify(err)); + console.log('getAuthCallback exception: ' + JSON.stringify(err)); } } } @@ -2119,7 +2119,7 @@ Obtains the authenticator callback for the authentication session. This API uses getAuthCallback(sessionId: string): Promise<AuthCallback> -Obtains the authenticator callback for the authentication session. This API uses a promise to return the result. +Obtains the authenticator callback for an authentication session. This API uses a promise to return the result. **System capability**: SystemCapability.Account.AppAccount @@ -2155,20 +2155,20 @@ Obtains the authenticator callback for the authentication session. This API uses appAccountManager.getAuthCallback(sessionId).then((callback) => { var result = { accountInfo: { - name: "Lisi", - owner: "com.example.accountjsdemo", + name: 'Lisi', + owner: 'com.example.accountjsdemo', }, tokenInfo: { - token: "xxxxxx", - authType: "getSocialData" + token: 'xxxxxx', + authType: 'getSocialData' } }; callback.onResult(0, result); }).catch((err) => { - console.log("getAuthCallback err: " + JSON.stringify(err)); + console.log('getAuthCallback err: ' + JSON.stringify(err)); }); } catch (err) { - console.log("getAuthCallback exception: " + JSON.stringify(err)); + console.log('getAuthCallback exception: ' + JSON.stringify(err)); } } } @@ -2201,15 +2201,15 @@ Obtains the authenticator information of an app. This API uses an asynchronous c ```js try { - appAccountManager.queryAuthenticatorInfo("com.example.accountjsdemo", (err, info) => { + appAccountManager.queryAuthenticatorInfo('com.example.accountjsdemo', (err, info) => { if (err) { - console.log("queryAuthenticatorInfo failed, error: " + JSON.stringify(err)); + console.log('queryAuthenticatorInfo failed, error: ' + JSON.stringify(err)); } else { console.log('queryAuthenticatorInfo successfully, info: ' + JSON.stringify(info)); } }); } catch (err) { - console.log("queryAuthenticatorInfo exception: " + JSON.stringify(err)); + console.log('queryAuthenticatorInfo exception: ' + JSON.stringify(err)); } ``` @@ -2245,13 +2245,13 @@ Obtains the authenticator information of an app. This API uses a promise to retu ```js try { - appAccountManager.queryAuthenticatorInfo("com.example.accountjsdemo").then((info) => { - console.log("queryAuthenticatorInfo successfully, info: " + JSON.stringify(info)); + appAccountManager.queryAuthenticatorInfo('com.example.accountjsdemo').then((info) => { + console.log('queryAuthenticatorInfo successfully, info: ' + JSON.stringify(info)); }).catch((err) => { - console.log("queryAuthenticatorInfo failed, error: " + JSON.stringify(err)); + console.log('queryAuthenticatorInfo failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("queryAuthenticatorInfo exception: " + JSON.stringify(err)); + console.log('queryAuthenticatorInfo exception: ' + JSON.stringify(err)); } ``` @@ -2286,17 +2286,17 @@ Checks whether an app account has specific labels. This API uses an asynchronous **Example** ```js - let labels = ["student"]; + let labels = ['student']; try { - appAccountManager.checkAccountLabels("zhangsan", "com.example.accountjsdemo", labels, (err, hasAllLabels) => { + appAccountManager.checkAccountLabels('zhangsan', 'com.example.accountjsdemo', labels, (err, hasAllLabels) => { if (err) { - console.log("checkAccountLabels failed, error: " + JSON.stringify(err)); + console.log('checkAccountLabels failed, error: ' + JSON.stringify(err)); } else { - console.log("checkAccountLabels successfully, hasAllLabels: " + hasAllLabels); + console.log('checkAccountLabels successfully, hasAllLabels: ' + hasAllLabels); } }); } catch (err) { - console.log("checkAccountLabels exception: " + JSON.stringify(err)); + console.log('checkAccountLabels exception: ' + JSON.stringify(err)); } ``` @@ -2336,15 +2336,15 @@ Checks whether an app account has specific labels. This API uses a promise to re **Example** ```js - let labels = ["student"]; + let labels = ['student']; try { - appAccountManager.checkAccountLabels("zhangsan", "com.example.accountjsdemo", labels).then((hasAllLabels) => { + appAccountManager.checkAccountLabels('zhangsan', 'com.example.accountjsdemo', labels).then((hasAllLabels) => { console.log('checkAccountLabels successfully: ' + hasAllLabels); }).catch((err) => { - console.log("checkAccountLabels failed, error: " + JSON.stringify(err)); + console.log('checkAccountLabels failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("checkAccountLabels exception: " + JSON.stringify(err)); + console.log('checkAccountLabels exception: ' + JSON.stringify(err)); } ``` @@ -2377,15 +2377,15 @@ Deletes the credential of the specified type from an app account. This API uses ```js try { - appAccountManager.deleteCredential("zhangsan", "PIN_SIX", (err) => { + appAccountManager.deleteCredential('zhangsan', 'PIN_SIX', (err) => { if (err) { - console.log("deleteCredential failed, error: " + JSON.stringify(err)); + console.log('deleteCredential failed, error: ' + JSON.stringify(err)); } else { - console.log("deleteCredential successfully"); + console.log('deleteCredential successfully'); } }); } catch (err) { - console.log("deleteCredential exception: " + JSON.stringify(err)); + console.log('deleteCredential exception: ' + JSON.stringify(err)); } ``` @@ -2423,13 +2423,13 @@ Deletes the credential of the specified type from an app account. This API uses ```js try { - appAccountManager.deleteCredential("zhangsan", "PIN_SIX").then(() => { - console.log("deleteCredential successfully"); + appAccountManager.deleteCredential('zhangsan', 'PIN_SIX').then(() => { + console.log('deleteCredential successfully'); }).catch((err) => { - console.log("deleteCredential failed, error: " + JSON.stringify(err)); + console.log('deleteCredential failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("deleteCredential exception: " + JSON.stringify(err)); + console.log('deleteCredential exception: ' + JSON.stringify(err)); } ``` @@ -2461,19 +2461,19 @@ Selects the accounts that can be accessed by the invoker based on the options. T ```js let options = { - allowedOwners: [ "com.example.accountjsdemo" ], - requiredLabels: [ "student" ] + allowedOwners: [ 'com.example.accountjsdemo' ], + requiredLabels: [ 'student' ] }; try { appAccountManager.selectAccountsByOptions(options, (err, accountArr) => { if (err) { - console.log("selectAccountsByOptions failed, error: " + JSON.stringify(err)); + console.log('selectAccountsByOptions failed, error: ' + JSON.stringify(err)); } else { - console.log("selectAccountsByOptions successfully, accountArr: " + JSON.stringify(accountArr)); + console.log('selectAccountsByOptions successfully, accountArr: ' + JSON.stringify(accountArr)); } }); } catch (err) { - console.log("selectAccountsByOptions exception: " + JSON.stringify(err)); + console.log('selectAccountsByOptions exception: ' + JSON.stringify(err)); } ``` @@ -2510,16 +2510,16 @@ Selects the accounts that can be accessed by the invoker based on the options. T ```js let options = { - allowedOwners: ["com.example.accountjsdemo"] + allowedOwners: ['com.example.accountjsdemo'] }; try { appAccountManager.selectAccountsByOptions(options).then((accountArr) => { - console.log("selectAccountsByOptions successfully, accountArr: " + JSON.stringify(accountArr)); + console.log('selectAccountsByOptions successfully, accountArr: ' + JSON.stringify(accountArr)); }).catch((err) => { - console.log("selectAccountsByOptions failed, error: " + JSON.stringify(err)); + console.log('selectAccountsByOptions failed, error: ' + JSON.stringify(err)); }); } catch (err) { - console.log("selectAccountsByOptions exception: " + JSON.stringify(err)); + console.log('selectAccountsByOptions exception: ' + JSON.stringify(err)); } ``` @@ -2554,17 +2554,17 @@ Verifies the credential of an app account. This API uses an asynchronous callbac ```js try { - appAccountManager.verifyCredential("zhangsan", "com.example.accountjsdemo", { + appAccountManager.verifyCredential('zhangsan', 'com.example.accountjsdemo', { onResult: (resultCode, result) => { - console.log("verifyCredential onResult, resultCode:" + JSON.stringify(resultCode)); - console.log("verifyCredential onResult, result:" + JSON.stringify(result)); + console.log('verifyCredential onResult, resultCode: ' + JSON.stringify(resultCode)); + console.log('verifyCredential onResult, result: ' + JSON.stringify(result)); }, onRequestRedirected: (request) => { - console.log("verifyCredential onRequestRedirected, request:" + JSON.stringify(request)); + console.log('verifyCredential onRequestRedirected, request: ' + JSON.stringify(request)); } }); } catch (err) { - console.log("verifyCredential err: " + JSON.stringify(err)); + console.log('verifyCredential err: ' + JSON.stringify(err)); } ``` @@ -2600,21 +2600,21 @@ Verifies the user credential. This API uses an asynchronous callback to return t ```js let options = { - credentialType: "pin", - credential: "123456" + credentialType: 'pin', + credential: '123456' }; try { - appAccountManager.verifyCredential("zhangsan", "com.example.accountjsdemo", options, { + appAccountManager.verifyCredential('zhangsan', 'com.example.accountjsdemo', options, { onResult: (resultCode, result) => { - console.log("verifyCredential onResult, resultCode:" + JSON.stringify(resultCode)); - console.log("verifyCredential onResult, result:" + JSON.stringify(result)); + console.log('verifyCredential onResult, resultCode: ' + JSON.stringify(resultCode)); + console.log('verifyCredential onResult, result: ' + JSON.stringify(result)); }, onRequestRedirected: (request) => { - console.log("verifyCredential onRequestRedirected, request:" + JSON.stringify(request)); + console.log('verifyCredential onRequestRedirected, request: ' + JSON.stringify(request)); } }); } catch (err) { - console.log("verifyCredential err: " + JSON.stringify(err)); + console.log('verifyCredential err: ' + JSON.stringify(err)); } ``` @@ -2647,17 +2647,17 @@ Sets the authenticator attributes of an app. This API uses an asynchronous callb ```js try { - appAccountManager.setAuthenticatorProperties("com.example.accountjsdemo", { + appAccountManager.setAuthenticatorProperties('com.example.accountjsdemo', { onResult: (resultCode, result) => { - console.log("setAuthenticatorProperties onResult, resultCode:" + JSON.stringify(resultCode)); - console.log("setAuthenticatorProperties onResult, result:" + JSON.stringify(result)); + console.log('setAuthenticatorProperties onResult, resultCode: ' + JSON.stringify(resultCode)); + console.log('setAuthenticatorProperties onResult, result: ' + JSON.stringify(result)); }, onRequestRedirected: (request) => { - console.log("setAuthenticatorProperties onRequestRedirected, request:" + JSON.stringify(request)); + console.log('setAuthenticatorProperties onRequestRedirected, request: ' + JSON.stringify(request)); } }); } catch (err) { - console.log("setAuthenticatorProperties err: " + JSON.stringify(err)); + console.log('setAuthenticatorProperties err: ' + JSON.stringify(err)); } ``` @@ -2691,20 +2691,20 @@ Set authenticator properties. This API uses an asynchronous callback to return t ```js let options = { - properties: {"prop1": "value1"} + properties: {'prop1': 'value1'} }; try { - appAccountManager.setAuthenticatorProperties("com.example.accountjsdemo", options, { + appAccountManager.setAuthenticatorProperties('com.example.accountjsdemo', options, { onResult: (resultCode, result) => { - console.log("setAuthenticatorProperties onResult, resultCode:" + JSON.stringify(resultCode)); - console.log("setAuthenticatorProperties onResult, result:" + JSON.stringify(result)); + console.log('setAuthenticatorProperties onResult, resultCode: ' + JSON.stringify(resultCode)); + console.log('setAuthenticatorProperties onResult, result: ' + JSON.stringify(result)); }, onRequestRedirected: (request) => { - console.log("setAuthenticatorProperties onRequestRedirected, request:" + JSON.stringify(request)); + console.log('setAuthenticatorProperties onRequestRedirected, request: ' + JSON.stringify(request)); } }); } catch (err) { - console.log("setAuthenticatorProperties err: " + JSON.stringify(err)); + console.log('setAuthenticatorProperties err: ' + JSON.stringify(err)); } ``` @@ -2732,8 +2732,8 @@ Adds an app account. This API uses an asynchronous callback to return the result **Example** ```js - appAccountManager.addAccount("WangWu", (err) => { - console.log("addAccount err: " + JSON.stringify(err)); + appAccountManager.addAccount('WangWu', (err) => { + console.log('addAccount err: ' + JSON.stringify(err)); }); ``` @@ -2744,7 +2744,6 @@ addAccount(name: string, extraInfo: string, callback: AsyncCallback<void>) Adds an app account name and additional information. This API uses an asynchronous callback to return the result. > **NOTE** -> > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createAccount](#createaccount9-1). **System capability**: SystemCapability.Account.AppAccount @@ -2760,8 +2759,8 @@ Adds an app account name and additional information. This API uses an asynchrono **Example** ```js - appAccountManager.addAccount("LiSi", "token101", (err) => { - console.log("addAccount err: " + JSON.stringify(err)); + appAccountManager.addAccount('LiSi', 'token101', (err) => { + console.log('addAccount err: ' + JSON.stringify(err)); }); ``` @@ -2771,8 +2770,7 @@ addAccount(name: string, extraInfo?: string): Promise<void> Adds an app account name and additional information. This API uses an asynchronous callback to return the result. This API uses a promise to return the result. -> **NOTE** -> +> **NOTE** > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createAccount](#createaccount9-2). **System capability**: SystemCapability.Account.AppAccount @@ -2782,7 +2780,7 @@ Adds an app account name and additional information. This API uses an asynchrono | Name | Type | Mandatory | Description | | --------- | ------ | ---- | ---------------------------------------- | | name | string | Yes | Name of the target app account. | -| extraInfo | string | No | Additional information (information that can be converted to the string type). It cannot contain sensitive information, such as the app account password and token.| +| extraInfo | string | No | Additional information (information that can be converted to the string type).
The additional information cannot be sensitive information (such as the password and token) of the app account.
By default, no value is passed, which means no additional information needs to be added for the account.| **Return value** @@ -2793,10 +2791,10 @@ Adds an app account name and additional information. This API uses an asynchrono **Example** ```js - appAccountManager.addAccount("LiSi", "token101").then(()=> { + appAccountManager.addAccount('LiSi', 'token101').then(()=> { console.log('addAccount Success'); }).catch((err) => { - console.log("addAccount err: " + JSON.stringify(err)); + console.log('addAccount err: ' + JSON.stringify(err)); }); ``` @@ -2827,8 +2825,8 @@ Adds an app account implicitly based on the specified owner. This API uses an as function onResultCallback(code, result) { - console.log("resultCode: " + code); - console.log("result: " + JSON.stringify(result)); + console.log('resultCode: ' + code); + console.log('result: ' + JSON.stringify(result)); } function onRequestRedirectedCallback(request) { @@ -2839,13 +2837,13 @@ Adds an app account implicitly based on the specified owner. This API uses an as entities: ['entity.system.default'], } this.context.startAbility(wantInfo).then(() => { - console.log("startAbility successfully"); + console.log('startAbility successfully'); }).catch((err) => { - console.log("startAbility err: " + JSON.stringify(err)); + console.log('startAbility err: ' + JSON.stringify(err)); }) } - appAccountManager.addAccountImplicitly("com.example.accountjsdemo", "getSocialData", {}, { + appAccountManager.addAccountImplicitly('com.example.accountjsdemo', 'getSocialData', {}, { onResult: onResultCallback, onRequestRedirected: onRequestRedirectedCallback }); @@ -2873,8 +2871,8 @@ Deletes an app account. This API uses an asynchronous callback to return the res **Example** ```js - appAccountManager.deleteAccount("ZhaoLiu", (err) => { - console.log("deleteAccount err: " + JSON.stringify(err)); + appAccountManager.deleteAccount('ZhaoLiu', (err) => { + console.log('deleteAccount err: ' + JSON.stringify(err)); }); ``` @@ -2905,10 +2903,10 @@ Deletes an app account. This API uses a promise to return the result. **Example** ```js - appAccountManager.deleteAccount("ZhaoLiu").then(() => { + appAccountManager.deleteAccount('ZhaoLiu').then(() => { console.log('deleteAccount Success'); }).catch((err) => { - console.log("deleteAccount err: " + JSON.stringify(err)); + console.log('deleteAccount err: ' + JSON.stringify(err)); }); ``` ### disableAppAccess(deprecated) @@ -2934,8 +2932,8 @@ Disables an app account from accessing an app. This API uses an asynchronous cal **Example** ```js - appAccountManager.disableAppAccess("ZhangSan", "com.example.accountjsdemo", (err) => { - console.log("disableAppAccess err: " + JSON.stringify(err)); + appAccountManager.disableAppAccess('ZhangSan', 'com.example.accountjsdemo', (err) => { + console.log('disableAppAccess err: ' + JSON.stringify(err)); }); ``` @@ -2967,10 +2965,10 @@ Disables an app account from accessing an app. This API uses a promise to return **Example** ```js - appAccountManager.disableAppAccess("ZhangSan", "com.example.accountjsdemo").then(() => { + appAccountManager.disableAppAccess('ZhangSan', 'com.example.accountjsdemo').then(() => { console.log('disableAppAccess Success'); }).catch((err) => { - console.log("disableAppAccess err: " + JSON.stringify(err)); + console.log('disableAppAccess err: ' + JSON.stringify(err)); }); ``` @@ -2997,8 +2995,8 @@ Enables an app account to access an app. This API uses an asynchronous callback **Example** ```js - appAccountManager.enableAppAccess("ZhangSan", "com.example.accountjsdemo", (err) => { - console.log("enableAppAccess: " + JSON.stringify(err)); + appAccountManager.enableAppAccess('ZhangSan', 'com.example.accountjsdemo', (err) => { + console.log('enableAppAccess: ' + JSON.stringify(err)); }); ``` @@ -3030,10 +3028,10 @@ Enables an app account to access an app. This API uses a promise to return the r **Example** ```js - appAccountManager.enableAppAccess("ZhangSan", "com.example.accountjsdemo").then(() => { + appAccountManager.enableAppAccess('ZhangSan', 'com.example.accountjsdemo').then(() => { console.log('enableAppAccess Success'); }).catch((err) => { - console.log("enableAppAccess err: " + JSON.stringify(err)); + console.log('enableAppAccess err: ' + JSON.stringify(err)); }); ``` @@ -3061,8 +3059,8 @@ Checks whether data synchronization is enabled for an app account. This API uses **Example** ```js - appAccountManager.checkAppAccountSyncEnable("ZhangSan", (err, result) => { - console.log("checkAppAccountSyncEnable err: " + JSON.stringify(err)); + appAccountManager.checkAppAccountSyncEnable('ZhangSan', (err, result) => { + console.log('checkAppAccountSyncEnable err: ' + JSON.stringify(err)); console.log('checkAppAccountSyncEnable result: ' + result); }); ``` @@ -3096,10 +3094,10 @@ Checks whether data synchronization is enabled for an app account. This API uses **Example** ```js - appAccountManager.checkAppAccountSyncEnable("ZhangSan").then((data) => { + appAccountManager.checkAppAccountSyncEnable('ZhangSan').then((data) => { console.log('checkAppAccountSyncEnable, result: ' + data); }).catch((err) => { - console.log("checkAppAccountSyncEnable err: " + JSON.stringify(err)); + console.log('checkAppAccountSyncEnable err: ' + JSON.stringify(err)); }); ``` @@ -3127,8 +3125,8 @@ Set credentials for an app account. This API uses an asynchronous callback to re **Example** ```js - appAccountManager.setAccountCredential("ZhangSan", "credentialType001", "credential001", (err) => { - console.log("setAccountCredential err: " + JSON.stringify(err)); + appAccountManager.setAccountCredential('ZhangSan', 'credentialType001', 'credential001', (err) => { + console.log('setAccountCredential err: ' + JSON.stringify(err)); }); ``` @@ -3161,10 +3159,10 @@ Set credentials for an app account. This API uses a promise to return the result **Example** ```js - appAccountManager.setAccountCredential("ZhangSan", "credentialType001", "credential001").then(() => { + appAccountManager.setAccountCredential('ZhangSan', 'credentialType001', 'credential001').then(() => { console.log('setAccountCredential Success'); }).catch((err) => { - console.log("setAccountCredential err: " + JSON.stringify(err)); + console.log('setAccountCredential err: ' + JSON.stringify(err)); }); ``` @@ -3192,8 +3190,8 @@ Sets additional information for an app account. This API uses an asynchronous ca **Example** ```js - appAccountManager.setAccountExtraInfo("ZhangSan", "Tk002", (err) => { - console.log("setAccountExtraInfo err: " + JSON.stringify(err)); + appAccountManager.setAccountExtraInfo('ZhangSan', 'Tk002', (err) => { + console.log('setAccountExtraInfo err: ' + JSON.stringify(err)); }); ``` @@ -3226,10 +3224,10 @@ Sets additional information for an app account. This API uses a promise to retur **Example** ```js - appAccountManager.setAccountExtraInfo("ZhangSan", "Tk002").then(() => { + appAccountManager.setAccountExtraInfo('ZhangSan', 'Tk002').then(() => { console.log('setAccountExtraInfo Success'); }).catch((err) => { - console.log("setAccountExtraInfo err: " + JSON.stringify(err)); + console.log('setAccountExtraInfo err: ' + JSON.stringify(err)); }); ``` @@ -3258,8 +3256,8 @@ Sets data synchronization for an app account. This API uses an asynchronous call **Example** ```js - appAccountManager.setAppAccountSyncEnable("ZhangSan", true, (err) => { - console.log("setAppAccountSyncEnable err: " + JSON.stringify(err)); + appAccountManager.setAppAccountSyncEnable('ZhangSan', true, (err) => { + console.log('setAppAccountSyncEnable err: ' + JSON.stringify(err)); }); ``` @@ -3293,10 +3291,10 @@ Sets data synchronization for an app account. This API uses a promise to return **Example** ```js - appAccountManager .setAppAccountSyncEnable("ZhangSan", true).then(() => { + appAccountManager .setAppAccountSyncEnable('ZhangSan', true).then(() => { console.log('setAppAccountSyncEnable Success'); }).catch((err) => { - console.log("setAppAccountSyncEnable err: " + JSON.stringify(err)); + console.log('setAppAccountSyncEnable err: ' + JSON.stringify(err)); }); ``` @@ -3325,8 +3323,8 @@ Sets data to be associated with an app account. This API uses an asynchronous ca **Example** ```js - appAccountManager.setAssociatedData("ZhangSan", "k001", "v001", (err) => { - console.log("setAssociatedData err: " + JSON.stringify(err)); + appAccountManager.setAssociatedData('ZhangSan', 'k001', 'v001', (err) => { + console.log('setAssociatedData err: ' + JSON.stringify(err)); }); ``` @@ -3360,10 +3358,10 @@ Sets data to be associated with an app account. This API uses a promise to retur **Example** ```js - appAccountManager.setAssociatedData("ZhangSan", "k001", "v001").then(() => { + appAccountManager.setAssociatedData('ZhangSan', 'k001', 'v001').then(() => { console.log('setAssociatedData Success'); }).catch((err) => { - console.log("setAssociatedData err: " + JSON.stringify(err)); + console.log('setAssociatedData err: ' + JSON.stringify(err)); }); ``` @@ -3391,8 +3389,8 @@ Obtains information about all accessible app accounts. This API uses an asynchro ```js appAccountManager.getAllAccessibleAccounts((err, data)=>{ - console.debug("getAllAccessibleAccounts err:" + JSON.stringify(err)); - console.debug("getAllAccessibleAccounts data:" + JSON.stringify(data)); + console.debug('getAllAccessibleAccounts err: ' + JSON.stringify(err)); + console.debug('getAllAccessibleAccounts data: ' + JSON.stringify(data)); }); ``` @@ -3422,7 +3420,7 @@ Obtains information about all accessible app accounts. This API uses a promise t appAccountManager.getAllAccessibleAccounts().then((data) => { console.log('getAllAccessibleAccounts: ' + data); }).catch((err) => { - console.log("getAllAccessibleAccounts err: " + JSON.stringify(err)); + console.log('getAllAccessibleAccounts err: ' + JSON.stringify(err)); }); ``` @@ -3450,10 +3448,10 @@ Obtains the app accounts that can be accessed by the invoker based on the app ac **Example** ```js - const selfBundle = "com.example.actsgetallaaccounts"; + const selfBundle = 'com.example.actsgetallaaccounts'; appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ - console.debug("getAllAccounts err:" + JSON.stringify(err)); - console.debug("getAllAccounts data:" + JSON.stringify(data)); + console.debug('getAllAccounts err: ' + JSON.stringify(err)); + console.debug('getAllAccounts data:' + JSON.stringify(data)); }); ``` @@ -3486,11 +3484,11 @@ Obtains the app accounts that can be accessed by the invoker based on the app ac **Example** ```js - const selfBundle = "com.example.actsgetallaaccounts"; + const selfBundle = 'com.example.actsgetallaaccounts'; appAccountManager.getAllAccounts(selfBundle).then((data) => { console.log('getAllAccounts: ' + data); }).catch((err) => { - console.log("getAllAccounts err: " + JSON.stringify(err)); + console.log('getAllAccounts err: ' + JSON.stringify(err)); }); ``` @@ -3517,8 +3515,8 @@ Obtains the credential of an app account. This API uses an asynchronous callback **Example** ```js - appAccountManager.getAccountCredential("ZhangSan", "credentialType001", (err, result) => { - console.log("getAccountCredential err: " + JSON.stringify(err)); + appAccountManager.getAccountCredential('ZhangSan', 'credentialType001', (err, result) => { + console.log('getAccountCredential err: ' + JSON.stringify(err)); console.log('getAccountCredential result: ' + result); }); ``` @@ -3551,10 +3549,10 @@ Obtains the credential of an app account. This API uses a promise to return the **Example** ```js - appAccountManager.getAccountCredential("ZhangSan", "credentialType001").then((data) => { + appAccountManager.getAccountCredential('ZhangSan', 'credentialType001').then((data) => { console.log('getAccountCredential, result: ' + data); }).catch((err) => { - console.log("getAccountCredential err: " + JSON.stringify(err)); + console.log('getAccountCredential err: ' + JSON.stringify(err)); }); ``` @@ -3580,8 +3578,8 @@ Obtains additional information of an app account. Additional information refers **Example** ```js - appAccountManager.getAccountExtraInfo("ZhangSan", (err, result) => { - console.log("getAccountExtraInfo err: " + JSON.stringify(err)); + appAccountManager.getAccountExtraInfo('ZhangSan', (err, result) => { + console.log('getAccountExtraInfo err: ' + JSON.stringify(err)); console.log('getAccountExtraInfo result: ' + result); }); ``` @@ -3613,10 +3611,10 @@ Obtains additional information of an app account. Additional information refers **Example** ```js - appAccountManager.getAccountExtraInfo("ZhangSan").then((data) => { + appAccountManager.getAccountExtraInfo('ZhangSan').then((data) => { console.log('getAccountExtraInfo, result: ' + data); }).catch((err) => { - console.log("getAccountExtraInfo err: " + JSON.stringify(err)); + console.log('getAccountExtraInfo err: ' + JSON.stringify(err)); }); ``` @@ -3643,8 +3641,8 @@ Obtains data associated with an app account. This API uses an asynchronous callb **Example** ```js - appAccountManager.getAssociatedData("ZhangSan", "k001", (err, result) => { - console.log("getAssociatedData err: " + JSON.stringify(err)); + appAccountManager.getAssociatedData('ZhangSan', 'k001', (err, result) => { + console.log('getAssociatedData err: ' + JSON.stringify(err)); console.log('getAssociatedData result: ' + result); }); ``` @@ -3677,10 +3675,10 @@ Obtains data associated with an app account. This API uses a promise to return t **Example** ```js - appAccountManager.getAssociatedData("ZhangSan", "k001").then((data) => { + appAccountManager.getAssociatedData('ZhangSan', 'k001').then((data) => { console.log('getAssociatedData: ' + data); }).catch((err) => { - console.log("getAssociatedData err: " + JSON.stringify(err)); + console.log('getAssociatedData err: ' + JSON.stringify(err)); }); ``` @@ -3702,19 +3700,19 @@ Subscribes to account information changes of apps. | -------- | ---------------------------------------- | ---- | ------------------------------ | | type | 'change' | Yes | Event type to subscribe to. The value is **'change'**. An event will be reported when the account information changes.| | owners | Array<string> | Yes | App bundle names of the account. | -| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | Yes | Callback invoked to return the account changes. | +| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | Yes | Callback registered to return the list of changed app accounts. | **Example** ```js function changeOnCallback(data){ - console.debug("receive change data:" + JSON.stringify(data)); + console.debug('receive change data:' + JSON.stringify(data)); } try{ - appAccountManager.on('change', ["com.example.actsaccounttest"], changeOnCallback); + appAccountManager.on('change', ['com.example.actsaccounttest'], changeOnCallback); } catch(err){ - console.error("on accountOnOffDemo err:" + JSON.stringify(err)); + console.error('on accountOnOffDemo err:' + JSON.stringify(err)); } ``` @@ -3735,22 +3733,22 @@ Unsubscribes from account information changes. | Name | Type | Mandatory | Description | | -------- | -------------------------------- | ---- | ------------ | | type | 'change' | Yes | Event type to unsubscribe from. The value is **'change'**, which indicates the account change event. | -| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | No | Callback to unregister.| +| callback | Callback<Array<[AppAccountInfo](#appaccountinfo)>> | No | Callback to unregister. By default, no value is passed, which means to unregister all callbacks for the specified event.| **Example** ```js function changeOnCallback(data){ - console.debug("receive change data:" + JSON.stringify(data)); + console.debug('receive change data: ' + JSON.stringify(data)); appAccountManager.off('change', function(){ - console.debug("off finish"); + console.debug('off finish'); }) } try{ - appAccountManager.on('change', ["com.example.actsaccounttest"], changeOnCallback); + appAccountManager.on('change', ['com.example.actsaccounttest'], changeOnCallback); } catch(err){ - console.error("on accountOnOffDemo err:" + JSON.stringify(err)); + console.error('on accountOnOffDemo err: ' + JSON.stringify(err)); } ``` @@ -3780,8 +3778,8 @@ Authenticates an app account with customized options. This API uses an asynchron ```js function onResultCallback(code, result) { - console.log("resultCode: " + code); - console.log("result: " + JSON.stringify(result)); + console.log('resultCode: ' + code); + console.log('result: ' + JSON.stringify(result)); } function onRequestRedirectedCallback(request) { @@ -3792,13 +3790,13 @@ Authenticates an app account with customized options. This API uses an asynchron entities: ['entity.system.default'], } this.context.startAbility(wantInfo).then(() => { - console.log("startAbility successfully"); + console.log('startAbility successfully'); }).catch((err) => { - console.log("startAbility err: " + JSON.stringify(err)); + console.log('startAbility err: ' + JSON.stringify(err)); }) } - appAccountManager.authenticate("LiSi", "com.example.accountjsdemo", "getSocialData", {}, { + appAccountManager.authenticate('LiSi', 'com.example.accountjsdemo', 'getSocialData', {}, { onResult: onResultCallback, onRequestRedirected: onRequestRedirectedCallback }); @@ -3828,7 +3826,7 @@ Obtains the authorization token of the specified authentication type for an app **Example** ```js - appAccountManager.getOAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData", (err, data) => { + appAccountManager.getOAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData', (err, data) => { console.log('getOAuthToken err: ' + JSON.stringify(err)); console.log('getOAuthToken token: ' + data); }); @@ -3863,10 +3861,10 @@ Obtains the authorization token of the specified authentication type for an app **Example** ```js - appAccountManager.getOAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData").then((data) => { + appAccountManager.getOAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData').then((data) => { console.log('getOAuthToken token: ' + data); }).catch((err) => { - console.log("getOAuthToken err: " + JSON.stringify(err)); + console.log('getOAuthToken err: ' + JSON.stringify(err)); }); ``` @@ -3894,7 +3892,7 @@ Sets an authorization token of the specific authentication type for an app accou **Example** ```js - appAccountManager.setOAuthToken("LiSi", "getSocialData", "xxxx", (err) => { + appAccountManager.setOAuthToken('LiSi', 'getSocialData', 'xxxx', (err) => { console.log('setOAuthToken err: ' + JSON.stringify(err)); }); ``` @@ -3928,7 +3926,7 @@ Sets an authorization token of the specific authentication type for an app accou **Example** ```js - appAccountManager.setOAuthToken("LiSi", "getSocialData", "xxxx").then(() => { + appAccountManager.setOAuthToken('LiSi', 'getSocialData', 'xxxx').then(() => { console.log('setOAuthToken successfully'); }).catch((err) => { console.log('setOAuthToken err: ' + JSON.stringify(err)); @@ -3960,7 +3958,7 @@ Deletes the authorization token of the specified authentication type for an app **Example** ```js - appAccountManager.deleteOAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData", "xxxxx", (err) => { + appAccountManager.deleteOAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData', 'xxxxx', (err) => { console.log('deleteOAuthToken err: ' + JSON.stringify(err)); }); ``` @@ -3995,10 +3993,10 @@ Deletes the authorization token of the specified authentication type for an app **Example** ```js - appAccountManager.deleteOAuthToken("LiSi", "com.example.accountjsdemo", "getSocialData", "xxxxx").then(() => { + appAccountManager.deleteOAuthToken('LiSi', 'com.example.accountjsdemo', 'getSocialData', 'xxxxx').then(() => { console.log('deleteOAuthToken successfully'); }).catch((err) => { - console.log("deleteOAuthToken err: " + JSON.stringify(err)); + console.log('deleteOAuthToken err: ' + JSON.stringify(err)); }); ``` @@ -4027,7 +4025,7 @@ Sets the visibility of an authorization token to an app. This API uses an asynch **Example** ```js - appAccountManager.setOAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo", true, (err) => { + appAccountManager.setOAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo', true, (err) => { console.log('setOAuthTokenVisibility err: ' + JSON.stringify(err)); }); ``` @@ -4062,7 +4060,7 @@ Sets the visibility of an authorization token to an app. This API uses a promise **Example** ```js - appAccountManager.setOAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo", true).then(() => { + appAccountManager.setOAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo', true).then(() => { console.log('setOAuthTokenVisibility successfully'); }).catch((err) => { console.log('setOAuthTokenVisibility err: ' + JSON.stringify(err)); @@ -4093,7 +4091,7 @@ Checks the visibility of an authorization token of the specified authentication **Example** ```js - appAccountManager.checkOAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo", (err, data) => { + appAccountManager.checkOAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo', (err, data) => { console.log('checkOAuthTokenVisibility err: ' + JSON.stringify(err)); console.log('checkOAuthTokenVisibility isVisible: ' + data); }); @@ -4128,7 +4126,7 @@ Checks the visibility of an authorization token of the specified authentication **Example** ```js - appAccountManager.checkOAuthTokenVisibility("LiSi", "getSocialData", "com.example.accountjsdemo").then((data) => { + appAccountManager.checkOAuthTokenVisibility('LiSi', 'getSocialData', 'com.example.accountjsdemo').then((data) => { console.log('checkOAuthTokenVisibility isVisible: ' + data); }).catch((err) => { console.log('checkOAuthTokenVisibility err: ' + JSON.stringify(err)); @@ -4158,8 +4156,8 @@ Obtains all tokens visible to the invoker for an app account. This API uses an a **Example** ```js - appAccountManager.getAllOAuthTokens("LiSi", "com.example.accountjsdemo", (err, data) => { - console.log("getAllOAuthTokens err: " + JSON.stringify(err)); + appAccountManager.getAllOAuthTokens('LiSi', 'com.example.accountjsdemo', (err, data) => { + console.log('getAllOAuthTokens err: ' + JSON.stringify(err)); console.log('getAllOAuthTokens data: ' + JSON.stringify(data)); }); ``` @@ -4192,10 +4190,10 @@ Obtains all tokens visible to the invoker for an app account. This API uses a pr **Example** ```js - appAccountManager.getAllOAuthTokens("LiSi", "com.example.accountjsdemo").then((data) => { + appAccountManager.getAllOAuthTokens('LiSi', 'com.example.accountjsdemo').then((data) => { console.log('getAllOAuthTokens data: ' + JSON.stringify(data)); }).catch((err) => { - console.log("getAllOAuthTokens err: " + JSON.stringify(err)); + console.log('getAllOAuthTokens err: ' + JSON.stringify(err)); }); ``` @@ -4222,7 +4220,7 @@ Obtains the authorization list of the specified authentication type for an app a **Example** ```js - appAccountManager.getOAuthList("com.example.accountjsdemo", "getSocialData", (err, data) => { + appAccountManager.getOAuthList('LiSi', 'getSocialData', (err, data) => { console.log('getOAuthList err: ' + JSON.stringify(err)); console.log('getOAuthList data: ' + JSON.stringify(data)); }); @@ -4256,10 +4254,10 @@ Obtains the authorization list of the specified authentication type for an app a **Example** ```js - appAccountManager.getOAuthList("com.example.accountjsdemo", "getSocialData").then((data) => { + appAccountManager.getOAuthList('LiSi', 'getSocialData').then((data) => { console.log('getOAuthList data: ' + JSON.stringify(data)); }).catch((err) => { - console.log("getOAuthList err: " + JSON.stringify(err)); + console.log('getOAuthList err: ' + JSON.stringify(err)); }); ``` @@ -4292,13 +4290,13 @@ Obtains the authenticator callback for an authentication session. This API uses var sessionId = want.parameters[account_appAccount.Constants.KEY_SESSION_ID]; appAccountManager.getAuthenticatorCallback(sessionId, (err, callback) => { if (err.code != account_appAccount.ResultCode.SUCCESS) { - console.log("getAuthenticatorCallback err: " + JSON.stringify(err)); + console.log('getAuthenticatorCallback err: ' + JSON.stringify(err)); return; } - var result = {[account_appAccount.Constants.KEY_NAME]: "LiSi", - [account_appAccount.Constants.KEY_OWNER]: "com.example.accountjsdemo", - [account_appAccount.Constants.KEY_AUTH_TYPE]: "getSocialData", - [account_appAccount.Constants.KEY_TOKEN]: "xxxxxx"}; + var result = {[account_appAccount.Constants.KEY_NAME]: 'LiSi', + [account_appAccount.Constants.KEY_OWNER]: 'com.example.accountjsdemo', + [account_appAccount.Constants.KEY_AUTH_TYPE]: 'getSocialData', + [account_appAccount.Constants.KEY_TOKEN]: 'xxxxxx'}; callback.onResult(account_appAccount.ResultCode.SUCCESS, result); }); } @@ -4338,13 +4336,13 @@ Obtains the authenticator callback for an authentication session. This API uses onCreate(want, param) { var sessionId = want.parameters[account_appAccount.Constants.KEY_SESSION_ID]; appAccountManager.getAuthenticatorCallback(sessionId).then((callback) => { - var result = {[account_appAccount.Constants.KEY_NAME]: "LiSi", - [account_appAccount.Constants.KEY_OWNER]: "com.example.accountjsdemo", - [account_appAccount.Constants.KEY_AUTH_TYPE]: "getSocialData", - [account_appAccount.Constants.KEY_TOKEN]: "xxxxxx"}; + var result = {[account_appAccount.Constants.KEY_NAME]: 'LiSi', + [account_appAccount.Constants.KEY_OWNER]: 'com.example.accountjsdemo', + [account_appAccount.Constants.KEY_AUTH_TYPE]: 'getSocialData', + [account_appAccount.Constants.KEY_TOKEN]: 'xxxxxx'}; callback.onResult(account_appAccount.ResultCode.SUCCESS, result); }).catch((err) => { - console.log("getAuthenticatorCallback err: " + JSON.stringify(err)); + console.log('getAuthenticatorCallback err: ' + JSON.stringify(err)); }); } } @@ -4372,8 +4370,8 @@ Obtains the authenticator information of an app. This API uses an asynchronous c **Example** ```js - appAccountManager.getAuthenticatorInfo("com.example.accountjsdemo", (err, data) => { - console.log("getAuthenticatorInfo err: " + JSON.stringify(err)); + appAccountManager.getAuthenticatorInfo('com.example.accountjsdemo', (err, data) => { + console.log('getAuthenticatorInfo err: ' + JSON.stringify(err)); console.log('getAuthenticatorInfo data: ' + JSON.stringify(data)); }); ``` @@ -4405,10 +4403,10 @@ Obtains the authenticator information of an app. This API uses a promise to retu **Example** ```js - appAccountManager.getAuthenticatorInfo("com.example.accountjsdemo").then((data) => { + appAccountManager.getAuthenticatorInfo('com.example.accountjsdemo').then((data) => { console.log('getAuthenticatorInfo: ' + JSON.stringify(data)); }).catch((err) => { - console.log("getAuthenticatorInfo err: " + JSON.stringify(err)); + console.log('getAuthenticatorInfo err: ' + JSON.stringify(err)); }); ``` @@ -4433,7 +4431,7 @@ Defines authorization token information. | -------------------- | -------------- | ----- | ---------------- | | authType9+ | string | Yes | Authentication type. | | token9+ | string | Yes | Value of the authorization token. | -| account9+ | [AppAccountInfo](#appaccountinfo) | No | Account information of the authorization token.| +| account9+ | [AppAccountInfo](#appaccountinfo) | No | Information about the account to which the token belongs. By default, no value is passed.| ## OAuthTokenInfo(deprecated) @@ -4449,7 +4447,7 @@ Defines authorization token information. | -------------------- | -------------- | ----- | ---------------- | | authType | string | Yes | Authentication type. | | token | string | Yes | Value of the authorization token. | -| account9+ | [AppAccountInfo](#appaccountinfo) | No | Account information of the authorization token.| +| account9+ | [AppAccountInfo](#appaccountinfo) | No | Information about the account to which the token belongs. By default, no value is passed.| ## AuthenticatorInfo8+ @@ -4471,8 +4469,8 @@ Defines the authentication result. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ---------- | -| account | [AppAccountInfo](#appaccountinfo) | No | Account information of the authorization token.| -| tokenInfo | [AuthTokenInfo](#authtokeninfo9) | No | Token information. | +| account | [AppAccountInfo](#appaccountinfo) | No | Information about the account to which the token belongs. By default, no value is passed.| +| tokenInfo | [AuthTokenInfo](#authtokeninfo9) | No | Token information. By default, no value is passed. | ## CreateAccountOptions9+ @@ -4482,7 +4480,7 @@ Defines the options for creating an app account. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ---------- | -| customData | {[key: string]: string} | No | Custom data.| +| customData | {[key: string]: string} | No | Custom data. By default, no value is passed.| ## CreateAccountImplicitlyOptions9+ @@ -4492,9 +4490,9 @@ Defines the options for implicitly creating an app account. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ---------- | -| requiredLabels | Array<string> | No | Labels required.| -| authType | string | No | Authentication type.| -| parameters | {[key: string]: Object} | No | Customized parameters.| +| requiredLabels | Array<string> | No | Required labels. By default, no value is passed.| +| authType | string | No | Authentication type. By default, no value is passed.| +| parameters | {[key: string]: Object} | No | Custom parameter object. By default, no value is passed.| ## SelectAccountsOptions9+ Defines the options for selecting accounts. @@ -4503,9 +4501,9 @@ Defines the options for selecting accounts. | Name | Type | Mandatory | Description | | --------------- | --------------------------- | ----- | ------------------- | -| allowedAccounts | Array<[AppAccountInfo](#appaccountinfo)> | No | Allowed accounts. | -| allowedOwners | Array<string> | No | Allowed account owners.| -| requiredLabels | Array<string> | No | Labels required for the authenticator. | +| allowedAccounts | Array<[AppAccountInfo](#appaccountinfo)> | No | Array of allowed accounts. By default, no value is passed. | +| allowedOwners | Array<string> | No | Array of the owners of the allowed accounts. By default, no value is passed.| +| requiredLabels | Array<string> | No | Labels of the authenticator. By default, no value is passed. | ## VerifyCredentialOptions9+ @@ -4515,9 +4513,9 @@ Represents the options for verifying the user credential. | Name | Type | Mandatory | Description | | -------------- | ---------------------- | ----- | -------------- | -| credentialType | string | No | Type of the credential to verify. | -| credential | string | No | Credential value. | -| parameters | {[key: string]: Object} | No | Customized parameters.| +| credentialType | string | No | Credential type. By default, no value is passed. | +| credential | string | No | Credential value. By default, no value is passed. | +| parameters | {[key: string]: Object} | No | Custom parameter object. By default, no value is passed.| ## SetPropertiesOptions9+ @@ -4528,8 +4526,8 @@ Represents the options for setting authenticator properties. | Name | Type | Mandatory | Description | | ---------- | ---------------------- | ----- | -------------- | -| properties | {[key: string]: Object} | No | Authenticator properties. | -| parameters | {[key: string]: Object} | No | Customized parameters.| +| properties | {[key: string]: Object} | No | Property object. By default, no value is passed. | +| parameters | {[key: string]: Object} | No | Custom parameter object. By default, no value is passed.| ## Constants8+ @@ -4539,23 +4537,23 @@ Enumerates the constants. | Name | Value | Description | | -------------------------------- | ---------------------- | ----------------------- | -| ACTION_ADD_ACCOUNT_IMPLICITLY(deprecated) | "addAccountImplicitly" | Operation of adding an account implicitly. | -| ACTION_AUTHENTICATE(deprecated) | "authenticate" | Authentication operation. | -| ACTION_CREATE_ACCOUNT_IMPLICITLY9+ | "createAccountImplicitly" | Operation of creating an account implicitly. | -| ACTION_AUTH9+ | "auth" | Authentication operation. | -| ACTION_VERIFY_CREDENTIAL9+ | "verifyCredential" | Operation of verifying credentials. | -| ACTION_SET_AUTHENTICATOR_PROPERTIES9+ | "setAuthenticatorProperties" | Operation of setting authenticator properties. | -| KEY_NAME | "name" | Name of the app account. | -| KEY_OWNER | "owner" | Owner of the app account.| -| KEY_TOKEN | "token" | Token. | -| KEY_ACTION | "action" | Operation. | -| KEY_AUTH_TYPE | "authType" | Authentication type. | -| KEY_SESSION_ID | "sessionId" | Session ID. | -| KEY_CALLER_PID | "callerPid" | PID of the caller. | -| KEY_CALLER_UID | "callerUid" | UID of the caller. | -| KEY_CALLER_BUNDLE_NAME | "callerBundleName" | Bundle name of the caller. | -| KEY_REQUIRED_LABELS9+ | "requiredLabels" | Required labels. | -| KEY_BOOLEAN_RESULT9+ | "booleanResult" | Return value of the Boolean type. | +| ACTION_ADD_ACCOUNT_IMPLICITLY(deprecated) | 'addAccountImplicitly' | Operation of adding an account implicitly. | +| ACTION_AUTHENTICATE(deprecated) | 'authenticate' | Authentication operation. | +| ACTION_CREATE_ACCOUNT_IMPLICITLY9+ | 'createAccountImplicitly' | Operation of creating an account implicitly. | +| ACTION_AUTH9+ | 'auth' | Authentication operation. | +| ACTION_VERIFY_CREDENTIAL9+ | 'verifyCredential' | Operation of verifying credentials. | +| ACTION_SET_AUTHENTICATOR_PROPERTIES9+ | 'setAuthenticatorProperties' | Operation of setting authenticator properties. | +| KEY_NAME | 'name' | Name of the app account. | +| KEY_OWNER | 'owner' | Owner of the app account.| +| KEY_TOKEN | 'token' | Token. | +| KEY_ACTION | 'action' | Operation. | +| KEY_AUTH_TYPE | 'authType' | Authentication type. | +| KEY_SESSION_ID | 'sessionId' | Session ID. | +| KEY_CALLER_PID | 'callerPid' | PID of the caller. | +| KEY_CALLER_UID | 'callerUid' | UID of the caller. | +| KEY_CALLER_BUNDLE_NAME | 'callerBundleName' | Bundle name of the caller. | +| KEY_REQUIRED_LABELS9+ | 'requiredLabels' | Required labels. | +| KEY_BOOLEAN_RESULT9+ | 'booleanResult' | Return value of the Boolean type. | ## ResultCode(deprecated) @@ -4606,27 +4604,27 @@ Called to return the result of an authentication request. | Name | Type | Mandatory | Description | | ------ | -------------------- | ---- | ------ | | code | number | Yes | Authentication result code.| -| result | [AuthResult](#authresult9) | No | Authentication result. | +| result | [AuthResult](#authresult9) | No | Authentication result. By default, no value is passed, which means the authentication result is not received. | **Example** ```js let appAccountManager = account_appAccount.createAppAccountManager(); - var sessionId = "1234"; + var sessionId = '1234'; appAccountManager.getAuthCallback(sessionId).then((callback) => { var result = { accountInfo: { - name: "Lisi", - owner: "com.example.accountjsdemo", + name: 'Lisi', + owner: 'com.example.accountjsdemo', }, tokenInfo: { - token: "xxxxxx", - authType: "getSocialData" + token: 'xxxxxx', + authType: 'getSocialData' } }; callback.onResult(account_appAccount.ResultCode.SUCCESS, result); }).catch((err) => { - console.log("getAuthCallback err: " + JSON.stringify(err)); + console.log('getAuthCallback err: ' + JSON.stringify(err)); }); ``` @@ -4650,20 +4648,20 @@ Called to redirect a request. class MyAuthenticator extends account_appAccount.Authenticator { createAccountImplicitly(options, callback) { callback.onRequestRedirected({ - bundleName: "com.example.accountjsdemo", - abilityName: "com.example.accountjsdemo.LoginAbility", + bundleName: 'com.example.accountjsdemo', + abilityName: 'com.example.accountjsdemo.LoginAbility', }); } auth(name, authType, options, callback) { var result = { accountInfo: { - name: "Lisi", - owner: "com.example.accountjsdemo", + name: 'Lisi', + owner: 'com.example.accountjsdemo', }, tokenInfo: { - token: "xxxxxx", - authType: "getSocialData" + token: 'xxxxxx', + authType: 'getSocialData' } }; callback.onResult(account_appAccount.ResultCode.SUCCESS, result); @@ -4683,11 +4681,11 @@ Called to continue to process the request. ```js let appAccountManager = account_appAccount.createAppAccountManager(); - var sessionId = "1234"; + var sessionId = '1234'; appAccountManager.getAuthCallback(sessionId).then((callback) => { callback.onRequestContinued(); }).catch((err) => { - console.log("getAuthCallback err: " + JSON.stringify(err)); + console.log('getAuthCallback err: ' + JSON.stringify(err)); }); ``` @@ -4718,15 +4716,15 @@ Called to return the result of an authentication request. ```js let appAccountManager = account_appAccount.createAppAccountManager(); - var sessionId = "1234"; + var sessionId = '1234'; appAccountManager.getAuthenticatorCallback(sessionId).then((callback) => { - var result = {[account_appAccount.Constants.KEY_NAME]: "LiSi", - [account_appAccount.Constants.KEY_OWNER]: "com.example.accountjsdemo", - [account_appAccount.Constants.KEY_AUTH_TYPE]: "getSocialData", - [account_appAccount.Constants.KEY_TOKEN]: "xxxxxx"}; + var result = {[account_appAccount.Constants.KEY_NAME]: 'LiSi', + [account_appAccount.Constants.KEY_OWNER]: 'com.example.accountjsdemo', + [account_appAccount.Constants.KEY_AUTH_TYPE]: 'getSocialData', + [account_appAccount.Constants.KEY_TOKEN]: 'xxxxxx'}; callback.onResult(account_appAccount.ResultCode.SUCCESS, result); }).catch((err) => { - console.log("getAuthenticatorCallback err: " + JSON.stringify(err)); + console.log('getAuthenticatorCallback err: ' + JSON.stringify(err)); }); ``` @@ -4750,15 +4748,15 @@ Called to redirect a request. class MyAuthenticator extends account_appAccount.Authenticator { addAccountImplicitly(authType, callerBundleName, options, callback) { callback.onRequestRedirected({ - bundleName: "com.example.accountjsdemo", - abilityName: "com.example.accountjsdemo.LoginAbility", + bundleName: 'com.example.accountjsdemo', + abilityName: 'com.example.accountjsdemo.LoginAbility', }); } authenticate(name, authType, callerBundleName, options, callback) { var result = {[account_appAccount.Constants.KEY_NAME]: name, [account_appAccount.Constants.KEY_AUTH_TYPE]: authType, - [account_appAccount.Constants.KEY_TOKEN]: "xxxxxx"}; + [account_appAccount.Constants.KEY_TOKEN]: 'xxxxxx'}; callback.onResult(account_appAccount.ResultCode.SUCCESS, result); } } @@ -4776,11 +4774,11 @@ Called to continue to process the request. ```js let appAccountManager = account_appAccount.createAppAccountManager(); - var sessionId = "1234"; + var sessionId = '1234'; appAccountManager.getAuthenticatorCallback(sessionId).then((callback) => { callback.onRequestContinued(); }).catch((err) => { - console.log("getAuthenticatorCallback err: " + JSON.stringify(err)); + console.log('getAuthenticatorCallback err: ' + JSON.stringify(err)); }); ``` @@ -4940,22 +4938,22 @@ Obtains the remote object of an authenticator. This API cannot be overloaded. class MyAuthenticator extends account_appAccount.Authenticator { addAccountImplicitly(authType, callerBundleName, options, callback) { callback.onRequestRedirected({ - bundleName: "com.example.accountjsdemo", - abilityName: "com.example.accountjsdemo.LoginAbility", + bundleName: 'com.example.accountjsdemo', + abilityName: 'com.example.accountjsdemo.LoginAbility', }); } authenticate(name, authType, callerBundleName, options, callback) { var result = {[account_appAccount.Constants.KEY_NAME]: name, [account_appAccount.Constants.KEY_AUTH_TYPE]: authType, - [account_appAccount.Constants.KEY_TOKEN]: "xxxxxx"}; + [account_appAccount.Constants.KEY_TOKEN]: 'xxxxxx'}; callback.onResult(account_appAccount.ResultCode.SUCCESS, result); } verifyCredential(name, options, callback) { callback.onRequestRedirected({ - bundleName: "com.example.accountjsdemo", - abilityName: "com.example.accountjsdemo.VerifyAbility", + bundleName: 'com.example.accountjsdemo', + abilityName: 'com.example.accountjsdemo.VerifyAbility', parameters: { name: name } diff --git a/en/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md b/en/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md index f8bbe2212f0b6b9ae41183bfce2ae7c03a726d99..b6a2b41d6c9b9ed05603c68f94d8f53426570414 100644 --- a/en/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md +++ b/en/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md @@ -116,8 +116,8 @@ struct SnapshotExample { Image(this.pixmap) .width(300).height(300) // ...Component - // ...Components - // ...Components + // ...Component + // ...Component Button("click to generate UI snapshot") .onClick(() => { componentSnapshot.get("root") diff --git a/en/application-dev/reference/apis/js-apis-avsession.md b/en/application-dev/reference/apis/js-apis-avsession.md index d9a98b7c17e79f588e60b199f8bf4530e781ce83..d70b0712fa9df71eb1ca31a3a03970a714c03f91 100644 --- a/en/application-dev/reference/apis/js-apis-avsession.md +++ b/en/application-dev/reference/apis/js-apis-avsession.md @@ -4,14 +4,12 @@ The **avSession** module provides APIs for media playback control so that applic This module provides the following typical features related to media sessions: -- [AVSession](#avsession): used to set session metadata, playback state information, and more. -- [AVSessionController](#avsessioncontroller): used to obtain session IDs, send commands and events to sessions, and obtain the session metadata and playback state information. +- [AVSession](#avsession10): used to set session metadata, playback state information, and more. +- [AVSessionController](#avsessioncontroller10): used to obtain session IDs, send commands and events to sessions, and obtain the session metadata and playback state information. > **NOTE** > > The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. -> -> All the APIs provided by this module are system APIs. ## Modules to Import @@ -19,7 +17,7 @@ This module provides the following typical features related to media sessions: import avSession from '@ohos.multimedia.avsession'; ``` -## avSession.createAVSession +## avSession.createAVSession10+ createAVSession(context: Context, tag: string, type: AVSessionType): Promise\ @@ -27,22 +25,19 @@ Creates a media session. This API uses a promise to return the result. An abilit **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name| Type | Mandatory| Description | | ------ | ------------------------------- | ---- | ------------------------------ | | context| [Context](js-apis-inner-app-context.md) | Yes| Application context, which provides application environment information.| | tag | string | Yes | Custom session name. | -| type | [AVSessionType](#avsessiontype) | Yes | Session type, which can be audio or video.| - +| type | [AVSessionType](#avsessiontype10) | Yes | Session type, which can be audio or video.| **Return value** | Type | Description | | --------------------------------- | ------------------------------------------------------------ | -| Promise<[AVSession](#avsession)\> | Promise used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.| +| Promise<[AVSession](#avsession10)\> | Promise used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.| **Error codes** @@ -69,7 +64,7 @@ await avSession.createAVSession(context, tag, "audio").then((data) => { }); ``` -## avSession.createAVSession +## avSession.createAVSession10+ createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void @@ -77,16 +72,14 @@ Creates a media session. This API uses an asynchronous callback to return the re **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | --------------------------------------- | ---- | ------------------------------------------------------------ | | context| [Context](js-apis-inner-app-context.md) | Yes| Application context, which provides application environment information. | | tag | string | Yes | Custom session name. | -| type | [AVSessionType](#avsessiontype) | Yes | Session type, which can be audio or video. | -| callback | AsyncCallback<[AVSession](#avsession)\> | Yes | Callback used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.| +| type | [AVSessionType](#avsessiontype10) | Yes | Session type, which can be audio or video. | +| callback | AsyncCallback<[AVSession](#avsession10)\> | Yes | Callback used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.| **Error codes** @@ -316,7 +309,7 @@ Creates a session controller based on the session ID. Multiple session controlle | Type | Description | | ----------------------------------------------------- | ------------------------------------------------------------ | -| Promise<[AVSessionController](#avsessioncontroller)\> | Promise used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.| +| Promise<[AVSessionController](#avsessioncontroller10)\> | Promise used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.| **Error codes** @@ -369,7 +362,7 @@ Creates a session controller based on the session ID. Multiple session controlle | Name | Type | Mandatory| Description | | --------- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ | | sessionId | string | Yes | Session ID. | -| callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.| +| callback | AsyncCallback<[AVSessionController](#avsessioncontroller10)\> | Yes | Callback used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.| **Error codes** @@ -777,7 +770,7 @@ Sends a system control command to the top session. This API uses a promise to re | Name | Type | Mandatory| Description | | ------- | ------------------------------------- | ---- | ----------------------------------- | -| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send.| +| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send.| **Return value** @@ -837,7 +830,7 @@ Sends a system control command to the top session. This API uses an asynchronous | Name | Type | Mandatory| Description | | -------- | ------------------------------------- | ---- | ------------------------------------- | -| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send. | +| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send. | | callback | AsyncCallback\ | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object.| **Error codes** @@ -878,17 +871,14 @@ avSession.sendSystemControlCommand(avcommand, function (err) { }); ``` -## AVSession +## AVSession10+ -An **AVSession** object is created by calling [avSession.createAVSession](#avsessioncreateavsession). The object enables you to obtain the session ID and set the metadata and playback state. +An **AVSession** object is created by calling [avSession.createAVSession](#avsessioncreateavsession10). The object enables you to obtain the session ID and set the metadata and playback state. ### Attributes **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - - | Name | Type | Readable| Writable| Description | | :-------- | :----- | :--- | :--- | :---------------------------- | | sessionId | string | Yes | No | Unique session ID of the **AVSession** object.| @@ -899,7 +889,7 @@ An **AVSession** object is created by calling [avSession.createAVSession](#avses let sessionId = session.sessionId; ``` -### setAVMetadata +### setAVMetadata10+ setAVMetadata(data: AVMetadata): Promise\ @@ -907,13 +897,11 @@ Sets session metadata. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name| Type | Mandatory| Description | | ------ | ------------------------- | ---- | ------------ | -| data | [AVMetadata](#avmetadata) | Yes | Session metadata.| +| data | [AVMetadata](#avmetadata10) | Yes | Session metadata.| **Return value** @@ -956,7 +944,7 @@ session.setAVMetadata(metadata).then(() => { }); ``` -### setAVMetadata +### setAVMetadata10+ setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void @@ -964,13 +952,11 @@ Sets session metadata. This API uses an asynchronous callback to return the resu **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------- | ---- | ------------------------------------- | -| data | [AVMetadata](#avmetadata) | Yes | Session metadata. | +| data | [AVMetadata](#avmetadata10) | Yes | Session metadata. | | callback | AsyncCallback\ | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object.| **Error codes** @@ -1010,7 +996,7 @@ session.setAVMetadata(metadata, function (err) { }); ``` -### setAVPlaybackState +### setAVPlaybackState10+ setAVPlaybackState(state: AVPlaybackState): Promise\ @@ -1018,13 +1004,11 @@ Sets information related to the session playback state. This API uses a promise **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name| Type | Mandatory| Description | | ------ | ----------------------------------- | ---- | ---------------------------------------------- | -| data | [AVPlaybackState](#avplaybackstate) | Yes | Information related to the session playback state.| +| data | [AVPlaybackState](#avplaybackstate10) | Yes | Information related to the session playback state.| **Return value** @@ -1033,6 +1017,7 @@ Sets information related to the session playback state. This API uses a promise | Promise\ | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.| **Error codes** + For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). | ID| Error Message| @@ -1058,7 +1043,7 @@ session.setAVPlaybackState(playbackState).then(() => { }); ``` -### setAVPlaybackState +### setAVPlaybackState10+ setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void @@ -1066,13 +1051,11 @@ Sets information related to the session playback state. This API uses an asynchr **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------- | ---- | ---------------------------------------------- | -| data | [AVPlaybackState](#avplaybackstate) | Yes | Information related to the session playback state.| +| data | [AVPlaybackState](#avplaybackstate10) | Yes | Information related to the session playback state.| | callback | AsyncCallback\ | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object. | **Error codes** @@ -1112,8 +1095,6 @@ Sets a playlist. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1182,8 +1163,6 @@ Sets a playlist. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1249,8 +1228,6 @@ Sets a name for the playlist. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1291,8 +1268,6 @@ Sets a name for the playlist. This API uses an asynchronous callback to return t **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1322,7 +1297,7 @@ session.setAVQueueTitle(queueTitle, function (err) { }); ``` -### setLaunchAbility +### setLaunchAbility10+ setLaunchAbility(ability: WantAgent): Promise\ @@ -1330,8 +1305,6 @@ Sets a launcher ability. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1395,7 +1368,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((agent) => { }); ``` -### setLaunchAbility +### setLaunchAbility10+ setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void @@ -1403,8 +1376,6 @@ Sets a launcher ability. This API uses an asynchronous callback to return the re **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1473,8 +1444,6 @@ Dispatches a custom event in the session, including the event name and event con **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1521,8 +1490,6 @@ Dispatches a custom event in the session, including the event name and event con **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1566,8 +1533,6 @@ Sets a custom media packet in the form of key-value pairs. This API uses a promi **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1645,7 +1610,7 @@ await session.setExtras(extras, (err) => { }) ``` -### getController +### getController10+ getController(): Promise\ @@ -1653,13 +1618,11 @@ Obtains the controller corresponding to this session. This API uses a promise to **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | | ---------------------------------------------------- | ----------------------------- | -| Promise<[AVSessionController](#avsessioncontroller)> | Promise used to return the session controller.| +| Promise<[AVSessionController](#avsessioncontroller10)> | Promise used to return the session controller.| **Error codes** @@ -1682,7 +1645,7 @@ session.getController().then((avcontroller) => { }); ``` -### getController +### getController10+ getController(callback: AsyncCallback\): void @@ -1690,13 +1653,11 @@ Obtains the controller corresponding to this session. This API uses an asynchron **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------------------- | ---- | -------------------------- | -| callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller.| +| callback | AsyncCallback<[AVSessionController](#avsessioncontroller10)\> | Yes | Callback used to return the session controller.| **Error codes** @@ -1721,7 +1682,7 @@ session.getController(function (err, avcontroller) { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(): Promise\ @@ -1729,13 +1690,11 @@ Obtains information about the output device for this session. This API uses a pr **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | | ---------------------------------------------- | --------------------------------- | -| Promise<[OutputDeviceInfo](#outputdeviceinfo)> | Promise used to return the output device information.| +| Promise<[OutputDeviceInfo](#outputdeviceinfo10)> | Promise used to return the output device information.| **Error codes** @@ -1756,7 +1715,7 @@ session.getOutputDevice().then((outputDeviceInfo) => { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(callback: AsyncCallback\): void @@ -1764,13 +1723,11 @@ Obtains information about the output device for this session. This API uses an a **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------------- | ---- | ------------------------------ | -| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.| +| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo10)\> | Yes | Callback used to return the information obtained.| **Error codes** @@ -1793,7 +1750,7 @@ session.getOutputDevice(function (err, outputDeviceInfo) { }); ``` -### activate +### activate10+ activate(): Promise\ @@ -1801,8 +1758,6 @@ Activates this session. A session can be used only after being activated. This A **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -1828,7 +1783,7 @@ session.activate().then(() => { }); ``` -### activate +### activate10+ activate(callback: AsyncCallback\): void @@ -1836,8 +1791,6 @@ Activates this session. A session can be used only after being activated. This A **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1865,16 +1818,14 @@ session.activate(function (err) { }); ``` -### deactivate +### deactivate10+ deactivate(): Promise\ -Deactivates this session. You can use [activate](#activate) to activate the session again. This API uses a promise to return the result. +Deactivates this session. You can use [activate](#activate10) to activate the session again. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -1900,18 +1851,16 @@ session.deactivate().then(() => { }); ``` -### deactivate +### deactivate10+ deactivate(callback: AsyncCallback\): void Deactivates this session. This API uses an asynchronous callback to return the result. -Deactivates this session. You can use [activate](#activate) to activate the session again. +Deactivates this session. You can use [activate](#activate10) to activate the session again. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -1939,7 +1888,7 @@ session.deactivate(function (err) { }); ``` -### destroy +### destroy10+ destroy(): Promise\ @@ -1947,8 +1896,6 @@ Destroys this session. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -1974,7 +1921,7 @@ session.destroy().then(() => { }); ``` -### destroy +### destroy10+ destroy(callback: AsyncCallback\): void @@ -1982,8 +1929,6 @@ Destroys this session. This API uses an asynchronous callback to return the resu **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2011,7 +1956,7 @@ session.destroy(function (err) { }); ``` -### on('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind') +### on('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')10+ on(type: 'play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind', callback: () => void): void @@ -2019,8 +1964,6 @@ Subscribes to playback command events. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2063,7 +2006,7 @@ session.on('rewind', () => { }); ``` -### on('seek') +### on('seek')10+ on(type: 'seek', callback: (time: number) => void): void @@ -2071,8 +2014,6 @@ Subscribes to the seek event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2097,7 +2038,7 @@ session.on('seek', (time) => { }); ``` -### on('setSpeed') +### on('setSpeed')10+ on(type: 'setSpeed', callback: (speed: number) => void): void @@ -2105,8 +2046,6 @@ Subscribes to the event for setting the playback speed. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2131,7 +2070,7 @@ session.on('setSpeed', (speed) => { }); ``` -### on('setLoopMode') +### on('setLoopMode')10+ on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void @@ -2139,14 +2078,12 @@ Subscribes to the event for setting the loop mode. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------- | ---- | ---- | | type | string | Yes | Event type. The event **'setLoopMode'** is reported when the command for setting the loop mode is sent to the session.| -| callback | (mode: [LoopMode](#loopmode)) => void | Yes | Callback used for subscription. The **mode** parameter in the callback indicates the loop mode. | +| callback | (mode: [LoopMode](#loopmode10)) => void | Yes | Callback used for subscription. The **mode** parameter in the callback indicates the loop mode. | **Error codes** @@ -2165,7 +2102,7 @@ session.on('setLoopMode', (mode) => { }); ``` -### on('toggleFavorite') +### on('toggleFavorite')10+ on(type: 'toggleFavorite', callback: (assetId: string) => void): void @@ -2173,8 +2110,6 @@ Subscribes to the event for favoriting a media asset. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2207,8 +2142,6 @@ Subscribes to the event that indicates an item in the playlist is selected. The **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2233,7 +2166,7 @@ session.on('skipToQueueItem', (itemId) => { }); ``` -### on('handleKeyEvent') +### on('handleKeyEvent')10+ on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void @@ -2241,8 +2174,6 @@ Subscribes to the key event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2267,7 +2198,7 @@ session.on('handleKeyEvent', (event) => { }); ``` -### on('outputDeviceChange') +### on('outputDeviceChange')10+ on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void @@ -2275,14 +2206,12 @@ Subscribes to output device changes. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ | | type | string | Yes | Event type. The event **'outputDeviceChange'** is reported when the output device changes.| -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. | **Error codes** @@ -2309,8 +2238,6 @@ Subscribes to custom control command changes. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2335,7 +2262,7 @@ session.on('commonCommand', (commonCommand, args) => { }); ``` -### off('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind') +### off('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')10+ off(type: 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind', callback?: () => void): void @@ -2343,8 +2270,6 @@ Unsubscribes from playback command events. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2373,7 +2298,7 @@ session.off('fastForward'); session.off('rewind'); ``` -### off('seek') +### off('seek')10+ off(type: 'seek', callback?: (time: number) => void): void @@ -2381,8 +2306,6 @@ Unsubscribes from the seek event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2405,7 +2328,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err session.off('seek'); ``` -### off('setSpeed') +### off('setSpeed')10+ off(type: 'setSpeed', callback?: (speed: number) => void): void @@ -2413,8 +2336,6 @@ Unsubscribes from the event for setting the playback speed. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2437,7 +2358,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err session.off('setSpeed'); ``` -### off('setLoopMode') +### off('setLoopMode')10+ off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void @@ -2445,14 +2366,12 @@ Unsubscribes from the event for setting loop mode. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------- | ---- | ----- | | type | string | Yes | Event type. The value is fixed at **'setLoopMode'**.| -| callback | (mode: [LoopMode](#loopmode)) => void | No | Callback used for unsubscription. The **mode** parameter in the callback indicates the loop mode.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session.| +| callback | (mode: [LoopMode](#loopmode10)) => void | No | Callback used for unsubscription. The **mode** parameter in the callback indicates the loop mode.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session.| **Error codes** @@ -2469,7 +2388,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err session.off('setLoopMode'); ``` -### off('toggleFavorite') +### off('toggleFavorite')10+ off(type: 'toggleFavorite', callback?: (assetId: string) => void): void @@ -2477,8 +2396,6 @@ Unsubscribes from the event for favoriting a media asset. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2509,8 +2426,6 @@ Unsubscribes from the event that indicates an item in the playlist is selected. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2533,7 +2448,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err session.off('skipToQueueItem'); ``` -### off('handleKeyEvent') +### off('handleKeyEvent')10+ off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void @@ -2541,8 +2456,6 @@ Unsubscribes from the key event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2565,7 +2478,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err session.off('handleKeyEvent'); ``` -### off('outputDeviceChange') +### off('outputDeviceChange')10+ off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void @@ -2573,14 +2486,12 @@ Unsubscribes from playback device changes. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------ | | type | string | Yes | Event type. The value is fixed at **'outputDeviceChange'**. | -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | **Error codes** @@ -2606,8 +2517,6 @@ Unsubscribes from custom control command changes. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2631,7 +2540,7 @@ session.off('commonCommand'); -## AVSessionController +## AVSessionController10+ An AV session controller is created by calling [avSession.createController](#avsessioncreatecontroller). Through the AV session controller, you can query the session ID, send commands and events to a session, and obtain session metadata and playback state information. @@ -2639,9 +2548,6 @@ An AV session controller is created by calling [avSession.createController](#avs **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - - | Name | Type | Readable| Writable| Description | | :-------- | :----- | :--- | :--- | :-------------------------------------- | | sessionId | string | Yes | No | Unique session ID of the **AVSessionController** object.| @@ -2657,7 +2563,7 @@ await avSession.createController(session.sessionId).then((controller) => { }); ``` -### getAVPlaybackState +### getAVPlaybackState10+ getAVPlaybackState(): Promise\ @@ -2665,13 +2571,11 @@ Obtains the information related to the playback state. This API uses a promise t **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | | --------------------------------------------- | --------------------------- | -| Promise<[AVPlaybackState](#avplaybackstate)\> | Promise used to return the **AVPlaybackState** object.| +| Promise<[AVPlaybackState](#avplaybackstate10)\> | Promise used to return the **AVPlaybackState** object.| **Error codes** @@ -2692,7 +2596,7 @@ controller.getAVPlaybackState().then((playbackState) => { }); ``` -### getAVPlaybackState +### getAVPlaybackState10+ getAVPlaybackState(callback: AsyncCallback\): void @@ -2700,13 +2604,11 @@ Obtains the information related to the playback state. This API uses an asynchro **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | --------------------------------------------------- | ---- | ---------------------------- | -| callback | AsyncCallback<[AVPlaybackState](#avplaybackstate)\> | Yes | Callback used to return the **AVPlaybackState** object.| +| callback | AsyncCallback<[AVPlaybackState](#avplaybackstate10)\> | Yes | Callback used to return the **AVPlaybackState** object.| **Error codes** @@ -2737,8 +2639,6 @@ Obtains the information related to the items in the queue. This API uses a promi **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -2772,8 +2672,6 @@ Obtains the information related to the items in the playlist. This API uses an a **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2809,8 +2707,6 @@ Obtains the name of the playlist. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -2844,8 +2740,6 @@ Obtains the name of the playlist. This API uses an asynchronous callback to retu **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2881,8 +2775,6 @@ Sends the ID of an item in the playlist to the session for processing. The sessi **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2923,8 +2815,6 @@ Sends the ID of an item in the playlist to the session for processing. The sessi **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -2954,7 +2844,7 @@ controller.skipToQueueItem(queueItemId, function (err) { }); ``` -### getAVMetadata +### getAVMetadata10+ getAVMetadata(): Promise\ @@ -2962,13 +2852,11 @@ Obtains the session metadata. This API uses a promise to return the result. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | | ----------------------------------- | ----------------------------- | -| Promise<[AVMetadata](#avmetadata)\> | Promise used to return the metadata obtained.| +| Promise<[AVMetadata](#avmetadata10)\> | Promise used to return the metadata obtained.| **Error codes** @@ -2989,7 +2877,7 @@ controller.getAVMetadata().then((metadata) => { }); ``` -### getAVMetadata +### getAVMetadata10+ getAVMetadata(callback: AsyncCallback\): void @@ -2997,13 +2885,11 @@ Obtains the session metadata. This API uses an asynchronous callback to return t **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------------- | ---- | -------------------------- | -| callback | AsyncCallback<[AVMetadata](#avmetadata)\> | Yes | Callback used to return the metadata obtained.| +| callback | AsyncCallback<[AVMetadata](#avmetadata10)\> | Yes | Callback used to return the metadata obtained.| **Error codes** @@ -3026,7 +2912,7 @@ controller.getAVMetadata(function (err, metadata) { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(): Promise\ @@ -3034,13 +2920,11 @@ Obtains the output device information. This API uses a promise to return the res **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | | ----------------------------------------------- | --------------------------------- | -| Promise<[OutputDeviceInfo](#outputdeviceinfo)\> | Promise used to return the information obtained.| +| Promise<[OutputDeviceInfo](#outputdeviceinfo10)\> | Promise used to return the information obtained.| **Error codes** @@ -3060,7 +2944,7 @@ controller.getOutputDevice().then((deviceInfo) => { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(callback: AsyncCallback\): void @@ -3068,13 +2952,11 @@ Obtains the output device information. This API uses an asynchronous callback to **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------------- | ---- | ------------------------------ | -| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.| +| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo10)\> | Yes | Callback used to return the information obtained.| **Error codes** @@ -3105,8 +2987,6 @@ Obtains the custom media packet set by the provider. This API uses a promise to **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -3138,8 +3018,6 @@ Obtains the custom media packet set by the provider. This API uses an asynchrono **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3183,7 +3061,7 @@ controller.getExtras(function (err, extras) { }); ``` -### sendAVKeyEvent +### sendAVKeyEvent10+ sendAVKeyEvent(event: KeyEvent): Promise\ @@ -3191,8 +3069,6 @@ Sends a key event to the session corresponding to this controller. This API uses **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name| Type | Mandatory| Description | @@ -3230,7 +3106,7 @@ controller.sendAVKeyEvent(event).then(() => { }); ``` -### sendAVKeyEvent +### sendAVKeyEvent10+ sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void @@ -3238,8 +3114,6 @@ Sends a key event to the session corresponding to this controller. This API uses **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3274,7 +3148,7 @@ controller.sendAVKeyEvent(event, function (err) { }); ``` -### getLaunchAbility +### getLaunchAbility10+ getLaunchAbility(): Promise\ @@ -3282,13 +3156,11 @@ Obtains the **WantAgent** object saved by the application in the session. This A **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | | ------------------------------------------------------- | ------------------------------------------------------------ | -| Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.| +| Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise used to return the object saved by calling [setLaunchAbility](#setlaunchability10). The object includes the application attribute, such as the bundle name, ability name, and device ID.| **Error codes** @@ -3312,7 +3184,7 @@ controller.getLaunchAbility().then((agent) => { }); ``` -### getLaunchAbility +### getLaunchAbility10+ getLaunchAbility(callback: AsyncCallback\): void @@ -3320,13 +3192,11 @@ Obtains the **WantAgent** object saved by the application in the session. This A **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Yes | Callback used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.| +| callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Yes | Callback used to return the object saved by calling [setLaunchAbility](#setlaunchability10). The object includes the application attribute, such as the bundle name, ability name, and device ID.| **Error codes** @@ -3352,7 +3222,7 @@ controller.getLaunchAbility(function (err, agent) { }); ``` -### getRealPlaybackPositionSync +### getRealPlaybackPositionSync10+ getRealPlaybackPositionSync(): number @@ -3360,8 +3230,6 @@ Obtains the playback position. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -3383,7 +3251,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err let time = controller.getRealPlaybackPositionSync(); ``` -### isActive +### isActive10+ isActive(): Promise\ @@ -3391,8 +3259,6 @@ Checks whether the session is activated. This API uses a promise to return the r **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -3419,7 +3285,7 @@ controller.isActive().then((isActive) => { }); ``` -### isActive +### isActive10+ isActive(callback: AsyncCallback\): void @@ -3427,8 +3293,6 @@ Checks whether the session is activated. This API uses an asynchronous callback **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3457,7 +3321,7 @@ controller.isActive(function (err, isActive) { }); ``` -### destroy +### destroy10+ destroy(): Promise\ @@ -3465,8 +3329,6 @@ Destroys this controller. A controller can no longer be used after being destroy **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | @@ -3492,7 +3354,7 @@ controller.destroy().then(() => { }); ``` -### destroy +### destroy10+ destroy(callback: AsyncCallback\): void @@ -3500,8 +3362,6 @@ Destroys this controller. A controller can no longer be used after being destroy **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3529,7 +3389,7 @@ controller.destroy(function (err) { }); ``` -### getValidCommands +### getValidCommands10+ getValidCommands(): Promise\> @@ -3537,13 +3397,11 @@ Obtains valid commands supported by the session. This API uses a promise to retu **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Return value** | Type | Description | | ------------------------------------------------------------ | --------------------------------- | -| Promise\> | Promise used to return a set of valid commands.| +| Promise\> | Promise used to return a set of valid commands.| **Error codes** @@ -3565,7 +3423,7 @@ controller.getValidCommands.then((validCommands) => { }); ``` -### getValidCommands +### getValidCommands10+ getValidCommands(callback: AsyncCallback\>): void @@ -3573,13 +3431,11 @@ Obtains valid commands supported by the session. This API uses an asynchronous c **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------------ | -| callback | AsyncCallback\\> | Yes | Callback used to return a set of valid commands.| +| callback | AsyncCallback\\> | Yes | Callback used to return a set of valid commands.| **Error codes** @@ -3603,7 +3459,7 @@ controller.getValidCommands(function (err, validCommands) { }); ``` -### sendControlCommand +### sendControlCommand10+ sendControlCommand(command: AVControlCommand): Promise\ @@ -3611,17 +3467,15 @@ Sends a control command to the session through the controller. This API uses a p > **NOTE** > -> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind). +> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind10). **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | ------- | ------------------------------------- | ---- | ------------------------------ | -| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send.| +| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send.| **Return value** @@ -3663,7 +3517,7 @@ controller.sendControlCommand(avCommand).then(() => { }); ``` -### sendControlCommand +### sendControlCommand10+ sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void @@ -3671,17 +3525,15 @@ Sends a control command to the session through the controller. This API uses an > **NOTE** > -> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind). +> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind10). **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------- | ---- | ------------------------------ | -| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send.| +| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send.| | callback | AsyncCallback\ | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object. | **Error codes** @@ -3728,8 +3580,6 @@ Sends a custom control command to the session through the controller. This API u **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3780,8 +3630,6 @@ Sends a custom control command to the session through the controller. This API u **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3795,6 +3643,7 @@ Sends a custom control command to the session through the controller. This API u > The **args** parameter supports the following data types: string, number, Boolean, object, array, and file descriptor. For details, see [@ohos.app.ability.Want(Want)](./js-apis-app-ability-want.md). **Error codes** + For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). | ID| Error Message| @@ -3820,7 +3669,7 @@ controller.sendCommonCommand(commandName, args, (err) => { }) ``` -### on('metadataChange') +### on('metadataChange')10+ on(type: 'metadataChange', filter: Array\ | 'all', callback: (data: AVMetadata) => void) @@ -3828,15 +3677,13 @@ Subscribes to the metadata change event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | type | string | Yes | Event type. The event **'metadataChange'** is reported when the session metadata changes.| -| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any metadata field change will trigger the event, and **Array** indicates that only changes to the listed metadata field will trigger the event.| -| callback | (data: [AVMetadata](#avmetadata)) => void | Yes | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata. | +| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any metadata field change will trigger the event, and **Array** indicates that only changes to the listed metadata field will trigger the event.| +| callback | (data: [AVMetadata](#avmetadata10)) => void | Yes | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata. | **Error codes** @@ -3860,7 +3707,7 @@ controller.on('metadataChange', metaFilter, (metadata) => { }); ``` -### on('playbackStateChange') +### on('playbackStateChange')10+ on(type: 'playbackStateChange', filter: Array\ | 'all', callback: (state: AVPlaybackState) => void) @@ -3868,15 +3715,13 @@ Subscribes to the playback state change event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | type | string | Yes | Event type. The event **'playbackStateChange'** is reported when the playback state changes.| -| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any playback state field change will trigger the event, and **Array** indicates that only changes to the listed playback state field will trigger the event.| -| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | Yes | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state. | +| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any playback state field change will trigger the event, and **Array** indicates that only changes to the listed playback state field will trigger the event.| +| callback | (state: [AVPlaybackState](#avplaybackstate10)) => void | Yes | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state. | **Error codes** @@ -3908,8 +3753,6 @@ Subscribes to session event changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3942,8 +3785,6 @@ Subscribes to playlist item changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -3976,8 +3817,6 @@ Subscribes to playlist name changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4010,8 +3849,6 @@ Subscribes to custom media packet changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4037,7 +3874,7 @@ controller.on('extrasChange', (extras) => { }); ``` -### on('sessionDestroy') +### on('sessionDestroy')10+ on(type: 'sessionDestroy', callback: () => void) @@ -4045,8 +3882,6 @@ Subscribes to the session destruction event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4071,7 +3906,7 @@ controller.on('sessionDestroy', () => { }); ``` -### on('activeStateChange') +### on('activeStateChange')10+ on(type: 'activeStateChange', callback: (isActive: boolean) => void) @@ -4079,8 +3914,6 @@ Subscribes to the session activation state change event. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4105,7 +3938,7 @@ controller.on('activeStateChange', (isActive) => { }); ``` -### on('validCommandChange') +### on('validCommandChange')10+ on(type: 'validCommandChange', callback: (commands: Array\) => void) @@ -4113,14 +3946,12 @@ Subscribes to valid command changes. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | type | string | Yes | Event type. The event **'validCommandChange'** is reported when the valid commands supported by the session changes.| -| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | Yes | Callback used for subscription. The **commands** parameter in the callback is a set of valid commands. | +| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype10)\>) => void | Yes | Callback used for subscription. The **commands** parameter in the callback is a set of valid commands. | **Error codes** @@ -4140,7 +3971,7 @@ controller.on('validCommandChange', (validCommands) => { }); ``` -### on('outputDeviceChange') +### on('outputDeviceChange')10+ on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void @@ -4148,14 +3979,12 @@ Subscribes to output device changes. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ | | type | string | Yes | Event type. The event **'outputDeviceChange'** is reported when the output device changes.| -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. | **Error codes** @@ -4174,7 +4003,7 @@ controller.on('outputDeviceChange', (device) => { }); ``` -### off('metadataChange') +### off('metadataChange')10+ off(type: 'metadataChange', callback?: (data: AVMetadata) => void) @@ -4182,14 +4011,12 @@ Unsubscribes from metadata changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------ | ---- | ------------------------------------------------------ | | type | string | Yes | Event type. The event **'metadataChange'** is reported when the session metadata changes. | -| callback | (data: [AVMetadata](#avmetadata)) => void | No | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | +| callback | (data: [AVMetadata](#avmetadata10)) => void | No | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | **Error codes** @@ -4205,7 +4032,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err controller.off('metadataChange'); ``` -### off('playbackStateChange') +### off('playbackStateChange')10+ off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void) @@ -4213,14 +4040,12 @@ Unsubscribes from playback state changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- | | type | string | Yes | Event type. The event **'playbackStateChange'** is reported when the playback state changes. | -| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | No | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | +| callback | (state: [AVPlaybackState](#avplaybackstate10)) => void | No | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | **Error codes** @@ -4244,8 +4069,6 @@ Unsubscribes from session event changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4275,8 +4098,6 @@ Unsubscribes from playback item changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4306,8 +4127,6 @@ Unsubscribes from playlist name changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4337,8 +4156,6 @@ Unsubscribes from custom media packet changes. This API is called by the control **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4362,7 +4179,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err controller.off('extrasChange'); ``` -### off('sessionDestroy') +### off('sessionDestroy')10+ off(type: 'sessionDestroy', callback?: () => void) @@ -4370,8 +4187,6 @@ Unsubscribes from the session destruction event. This API is called by the contr **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4393,7 +4208,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err controller.off('sessionDestroy'); ``` -### off('activeStateChange') +### off('activeStateChange')10+ off(type: 'activeStateChange', callback?: (isActive: boolean) => void) @@ -4401,8 +4216,6 @@ Unsubscribes from session activation state changes. This API is called by the co **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | @@ -4424,7 +4237,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err controller.off('activeStateChange'); ``` -### off('validCommandChange') +### off('validCommandChange')10+ off(type: 'validCommandChange', callback?: (commands: Array\) => void) @@ -4432,14 +4245,12 @@ Unsubscribes from valid command changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | -------------------------------------------------------- | | type | string | Yes | Event type. The event **'validCommandChange'** is reported when the supported commands change. | -| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | No | Callback used for unsubscription. The **commands** parameter in the callback is a set of valid commands.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | +| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype10)\>) => void | No | Callback used for unsubscription. The **commands** parameter in the callback is a set of valid commands.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | **Error codes** @@ -4455,7 +4266,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err controller.off('validCommandChange'); ``` -### off('outputDeviceChange') +### off('outputDeviceChange')10+ off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void @@ -4463,14 +4274,12 @@ Unsubscribes from output device changes. This API is called by the controller. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------ | | type | string | Yes | Event type. The event **'outputDeviceChange'** is reported when the output device changes. | -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. | **Error codes** @@ -4502,13 +4311,11 @@ Describes the information about a session token. | pid | number | Yes | Process ID of the session.| | uid | number | Yes | User ID. | -## AVSessionType +## AVSessionType10+ Enumerates the session types supported by the session. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Type | Description| | ----- | ------ | ---- | | audio | string | Audio session.| @@ -4525,21 +4332,19 @@ Declares the session descriptor. | Name | Type | Readable| Writable| Description | | ------------ | ------------------------------------------------------------ | ---- | --------------------------------------------------- | --------------------------------------------------- | | sessionId | string | Yes | No| Session ID. | -| type | [AVSessionType](#avsessiontype) | Yes | No | Session type. | +| type | [AVSessionType](#avsessiontype10) | Yes | No | Session type. | | sessionTag | string | Yes | No | Custom session name. | | elementName | [ElementName](js-apis-bundle-ElementName.md) | Yes | No | Information about the application to which the session belongs, including the bundle name and ability name.| | isActive | boolean | Yes | No | Whether the session is activated. | | isTopSession | boolean | Yes | No | Whether the session is the top session. | -| outputDevice | [OutputDeviceInfo](#outputdeviceinfo) | Yes | No | Information about the output device. | +| outputDevice | [OutputDeviceInfo](#outputdeviceinfo10) | Yes | No | Information about the output device. | -## AVControlCommandType +## AVControlCommandType10+ Enumerates the commands that can be sent to a session. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Type | Description | | -------------- | ------ | ------------ | | play | string | Play the media. | @@ -4554,27 +4359,23 @@ Enumerates the commands that can be sent to a session. | setLoopMode | string | Set the loop mode.| | toggleFavorite | string | Favorite the media asset. | -## AVControlCommand +## AVControlCommand10+ Describes the command that can be sent to the session. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Type | Mandatory| Description | | --------- | ------------------------------------------------- | ---- | -------------- | -| command | [AVControlCommandType](#avcontrolcommandtype) | Yes | Command. | -| parameter | [LoopMode](#loopmode) | string | number | No | Parameters carried in the command.| +| command | [AVControlCommandType](#avcontrolcommandtype10) | Yes | Command. | +| parameter | [LoopMode](#loopmode10) | string | number | No | Parameters carried in the command.| -## AVMetadata +## AVMetadata10+ Describes the media metadata. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Type | Mandatory| Description | | --------------- |-------------------------| ---- |---------------------------------------------------------------------| | assetId | string | Yes | Media ID. | @@ -4621,60 +4422,52 @@ Describes the attributes of an item in the playlist. | itemId | number | Yes | ID of an item in the playlist. | | description | [AVMediaDescription](#avmediadescription10) | Yes | Media metadata of the item in the playlist. | -## AVPlaybackState +## AVPlaybackState10+ Describes the information related to the media playback state. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Type | Mandatory| Description | | ------------ | ------------------------------------- | ---- | ------- | | state | [PlaybackState](#playbackstate) | No | Playback state.| | speed | number | No | Playback speed.| | position | [PlaybackPosition](#playbackposition) | No | Playback position.| | bufferedTime | number | No | Buffered time.| -| loopMode | [LoopMode](#loopmode) | No | Loop mode.| +| loopMode | [LoopMode](#loopmode10) | No | Loop mode.| | isFavorite | boolean | No | Whether the media asset is favorited.| | activeItemId10+ | number | No | ID of the item that is being played.| | extras10+ | {[key: string]: Object} | No | Custom media data.| -## PlaybackPosition +## PlaybackPosition10+ Describes the information related to the playback position. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Type | Mandatory| Description | | ----------- | ------ | ---- | ------------------ | | elapsedTime | number | Yes | Elapsed time, in ms.| | updateTime | number | Yes | Updated time, in ms.| -## OutputDeviceInfo +## OutputDeviceInfo10+ Describes the information related to the output device. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Type | Mandatory| Description | | ---------- | -------------- | ---- | ---------------------- | | isRemote | boolean | Yes | Whether the device is connected. | | audioDeviceId | Array | Yes | IDs of output devices. | | deviceName | Array | Yes | Names of output devices. | -## PlaybackState +## PlaybackState10+ Enumerates the media playback states. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Value | Description | | --------------------------- | ---- | ----------- | | PLAYBACK_STATE_INITIAL | 0 | Initial. | @@ -4686,14 +4479,12 @@ Enumerates the media playback states. | PLAYBACK_STATE_STOP | 6 | Stopped. | -## LoopMode +## LoopMode10+ Enumerates the loop modes of media playback. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Value | Description | | ------------------ | ---- | -------- | | LOOP_MODE_SEQUENCE | 0 | Sequential playback.| @@ -4701,14 +4492,12 @@ Enumerates the loop modes of media playback. | LOOP_MODE_LIST | 2 | Playlist loop.| | LOOP_MODE_SHUFFLE | 3 | Shuffle.| -## AVSessionErrorCode +## AVSessionErrorCode10+ Enumerates the error codes used in the media session. **System capability**: SystemCapability.Multimedia.AVSession.Core -**System API**: This is a system API. - | Name | Value | Description | | ------------------------------ | ------- | ------------------------------- | | ERR_CODE_SERVICE_EXCEPTION | 6600101 | Session service exception. | @@ -4719,4 +4508,4 @@ Enumerates the error codes used in the media session. | ERR_CODE_SESSION_INACTIVE | 6600106 | The session is not activated. | | ERR_CODE_MESSAGE_OVERLOAD | 6600107 | Too many commands or events. | - \ No newline at end of file + diff --git a/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md b/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md index ac9aa9841ec9efd561198dd56f98a10f7331de1e..ec3b9fa9e3b5fb8ef8107276e889c62e4bc2c278 100644 --- a/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md +++ b/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md @@ -9,7 +9,6 @@ The **ApplicationInfo** module defines the application information. A system app ## ApplicationInfo **System capability**: SystemCapability.BundleManager.BundleFramework.Core - | Name | Type | Readable| Writable| Description | | -------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ | | name | string | Yes | No | Application name. | @@ -27,9 +26,9 @@ The **ApplicationInfo** module defines the application information. A system app | removable | boolean | Yes | No | Whether the application is removable. | | accessTokenId | number | Yes | No | Access token ID of the application. | | uid | number | Yes | No | UID of the application. | -| iconResource | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application icon. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) to obtain the resource details. | -| labelResource | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application label. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) to obtain the resource details. | -| descriptionResource | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application description. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) to obtain the resource details.| +| iconResource | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application icon. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](js-apis-resource-manager.md#getmediacontent9) to obtain the resource details. | +| labelResource | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application label. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](js-apis-resource-manager.md#getmediacontent9) to obtain the resource details. | +| descriptionResource | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application description. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](js-apis-resource-manager.md#getmediacontent9) to obtain the resource details.| | appDistributionType | string | Yes | No | Distribution type of the application signing certificate. The options are **app_gallery**, **enterprise**, **os_integration**, and **crowdtesting**. | | appProvisionType | string | Yes | No | Type of the application signing certificate file. The options are **debug** and **release**. | | systemApp | boolean | Yes | No | Whether the application is a system application. | diff --git a/en/application-dev/reference/apis/js-apis-camera.md b/en/application-dev/reference/apis/js-apis-camera.md index b8d4e4b54a0d34826962b8d3d66b5e7f1b30be13..c86b21c5f8c541e29b38eeb38cb25edfc13bfc14 100644 --- a/en/application-dev/reference/apis/js-apis-camera.md +++ b/en/application-dev/reference/apis/js-apis-camera.md @@ -2,8 +2,7 @@ > **NOTE** > -> - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. -> - The APIs provided by this module are system APIs. +> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -110,17 +109,18 @@ Enumerates the camera error codes, which are returned when an API call is incorr **System capability**: SystemCapability.Multimedia.Camera.Core -| Name | Value | Description | -| ------------------------- | ---- | ------------ | -| INVALID_ARGUMENT | 7400101 | A parameter is missing or the parameter type is incorrect. | -| OPERATION_NOT_ALLOWED | 7400102 | The operation is not allowed. | -| SESSION_NOT_CONFIG | 7400103 | The session is not configured. | -| SESSION_NOT_RUNNING | 7400104 | The session is not running. | -| SESSION_CONFIG_LOCKED | 7400105 | The session configuration is locked. | -| DEVICE_SETTING_LOCKED | 7400106 | The device setting is locked. | -| CONFILICT_CAMERA | 7400107 | The device is already started. | -| DEVICE_DISABLED | 7400108 | The camera is disabled for security reasons. | -| SERVICE_FATAL_ERROR | 7400201 | An error occurs in the camera service. | +| Name | Value | Description | +| ------------------------- | ---- | ------------ | +| INVALID_ARGUMENT | 7400101 | A parameter is missing or the parameter type is incorrect. | +| OPERATION_NOT_ALLOWED | 7400102 | The operation is not allowed. | +| SESSION_NOT_CONFIG | 7400103 | The session is not configured. | +| SESSION_NOT_RUNNING | 7400104 | The session is not running. | +| SESSION_CONFIG_LOCKED | 7400105 | The session configuration is locked. | +| DEVICE_SETTING_LOCKED | 7400106 | The device setting is locked. | +| CONFLICT_CAMERA | 7400107 | The device is already started. | +| DEVICE_DISABLED | 7400108 | The camera is disabled for security reasons. | +| DEVICE_PREEMPTED | 7400109 | The camera is preempted. | +| SERVICE_FATAL_ERROR | 7400201 | An error occurs in the camera service. | ## CameraManager @@ -203,7 +203,7 @@ isCameraMuteSupported(): boolean Checks whether the camera can be muted. -This is a system API. +**System API**: This is a system API. **System capability**: SystemCapability.Multimedia.Camera.Core @@ -225,7 +225,7 @@ muteCamera(mute: boolean): void Mutes or unmutes the camera. -This is a system API. +**System API**: This is a system API. **System capability**: SystemCapability.Multimedia.Camera.Core @@ -562,7 +562,7 @@ on(type: 'cameraMute', callback: AsyncCallback\): void Listens for camera mute status changes. This API uses an asynchronous callback to return the result. -This is a system API. +**System API**: This is a system API. **System capability**: SystemCapability.Multimedia.Camera.Core @@ -630,6 +630,20 @@ Enumerates the camera connection types. | CAMERA_CONNECTION_USB_PLUGIN | 1 | Camera connected using USB.| | CAMERA_CONNECTION_REMOTE | 2 | Remote camera.| +## HostDeviceType + +Enumerates the remote camera types. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.Camera.Core + +| Name | Value | Description | +| ---------------------------- | ---- | ------------- | +| UNKNOWN_TYPE | 0 | Unknown type. | +| PHONE | 0x0E | Camera of a smartphone.| +| TABLET | 0x11 | Camera of a tablet.| + ## CameraDevice Defines the camera device information. @@ -642,6 +656,8 @@ Defines the camera device information. | cameraPosition | [CameraPosition](#cameraposition) | Yes | Camera position. | | cameraType | [CameraType](#cameratype) | Yes | Camera type. | | connectionType | [ConnectionType](#connectiontype) | Yes | Camera connection type.| +| hostDeviceName | string | Yes | Name of the remote device.
**System API**: This is a system API.| +| hostDeviceType | [hostDeviceType](#hostdevicetype) | Yes | Type of the remote device.
**System API**: This is a system API.| ## Size @@ -1754,7 +1770,7 @@ Before the setting, you are advised to use **[getExposureBiasRange](#getexposure | Name | Type | Mandatory| Description | | -------- | -------------------------------| ---- | ------------------- | -| exposureBias | number | Yes | EV. The supported EV range can be obtained by calling **getExposureBiasRange**. If calling the API fails, an error code defined in [CameraErrorCode](#cameraerrorcode) will be returned. If the value passed is not within the supported range, the nearest critical point is used.| +| exposureBias | number | Yes | EV. The supported EV range can be obtained by calling **getExposureBiasRange**. If the value passed is not within the supported range, the nearest critical point is used. There is a step for EV. For example, if the step is 0.5 and this parameter is set to 1.2, the EV that takes effect is 1.0. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned. | **Error codes** @@ -1788,7 +1804,7 @@ Obtains the exposure value in use. | Type | Description | | ---------- | ----------------------------- | -| number | Exposure value obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.| +| number | Exposure value obtained. There is a step for EV. For example, if the step is 0.5 and this parameter is set to 1.2, the EV that takes effect is 1.0. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned. | **Error codes** diff --git a/en/application-dev/reference/apis/js-apis-data-cloudData.md b/en/application-dev/reference/apis/js-apis-data-cloudData.md new file mode 100644 index 0000000000000000000000000000000000000000..38c6d65e42ea6c2665f33812d94b7093432af401 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-data-cloudData.md @@ -0,0 +1,348 @@ +# @ohos.data.cloudData (Device-Cloud Synergy) + +The **cloudData** module provides the capability of synchronizing the structured data (in RDB stores) between the device and cloud. The cloud serves as the central node of data. The devices synchronize data with the data in the cloud to implement cloud data backup and data consistency between the devices with the same account. + +This module provides the following common functions: + +- [Config](#config): provides methods for configuring device-cloud synergy, including enabling and disabling cloud synchronization, clearing data, and notifying data changes. + +> **NOTE** +> +> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. + +## Modules to Import + +```js +import cloudData from '@ohos.data.cloudData'; +``` + +## Action + +Enumerates the actions for clearing the cloud information about the local data. + +**System API**: This is a system API. + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Config + +| Name | Description | +| --------- | ---------------------------- | +| CLEAR_CLOUD_INFO | Clear the cloud ID information.| +| CLEAR_CLOUD_DATA_AND_INFO |Clear all cloud data, including cloud ID information and data downloaded from the cloud (excluding the data modified or generated locally). | + +## Config + +Provides methods for configuring device-cloud synergy, including enabling and disabling cloud synchronization, clearing data, and notifying data changes. + +### enableCloud + +static enableCloud(accountId: string, switches: {[bundleName: string]: boolean}, callback: AsyncCallback<void>):void + +Enables device-cloud synergy. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Config + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------------- | ---- | ------------------------------------------------------------ | +| accountId | string | Yes | ID of the target cloud. | +| switches | {[bundleName: string]: boolean} | Yes | Device-cloud synergy switches for applications. The value **true** means to enable the device-cloud synergy; the value **false** means the opposite.| +| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. | + +**Example** + +```js +let account = 'test_id'; +let switches = { 'test_bundleName1': true, 'test_bundleName2': false }; +try { + cloudData.Config.enableCloud(account, switches, function (err) { + if (err === undefined) { + console.info('Succeeded in enabling cloud'); + } else { + console.error(`Failed to enable.Code: ${err.code}, message: ${err.message}`); + } + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` + +### enableCloud + +static enableCloud(accountId: string, switches: {[bundleName: string]: boolean}): Promise<void> + +Enables device-cloud synergy. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Config + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------------- | ---- | ------------------------------------------------------------ | +| accountId | string | Yes | ID of the target cloud. | +| switches | {[bundleName: string]: boolean} | Yes | Device-cloud synergy switches for applications. The value **true** means to enable the device-cloud synergy; the value **false** means the opposite.| + +**Return value** + +| Type | Description | +| ------------------- | ------------------------- | +| Promise<void> | Promise that returns no value.| + +**Example** + +```js +let account = 'test_id'; +let switches = { 'test_bundleName1': true, 'test_bundleName2': false }; +try { + cloudData.Config.enableCloud(account, switches).then(() => { + console.info('Succeeded in enabling cloud'); + }).catch((err) => { + console.error(`Failed to enable.Code: ${err.code}, message: ${err.message}`); + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` + +### disableCloud + +static disableCloud(accountId: string, callback: AsyncCallback<void>):void + +Disables device-cloud synergy. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Config + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------- | ---- | ---------------- | +| accountId | string | Yes | ID of the target cloud.| +| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. | + +**Example** + +```js +let account = 'test_id'; +try { + cloudData.Config.disableCloud(account, function (err) { + if (err === undefined) { + console.info('Succeeded in disabling cloud'); + } else { + console.error(`Failed to disableCloud. Code: ${err.code}, message: ${err.message}`); + } + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` + +### disableCloud + +static disableCloud(accountId: string): Promise<void> + +Disables device-cloud synergy. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Config + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------ | ---- | ---------------- | +| accountId | string | Yes | ID of the target cloud.| + +**Return value** + +| Type | Description | +| ------------------- | ------------------------- | +| Promise<void> | Promise that returns no value.| + +**Example** + +```js +let account = 'test_id'; +try { + cloudData.Config.disableCloud(account).then(() => { + console.info('Succeeded in disabling cloud'); + }).catch((err) => { + console.error(`Failed to disableCloud. Code: ${err.code}, message: ${err.message}`); + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` + +### changeAppCloudSwitch + +static changeAppCloudSwitch(accountId: string,bundleName:string,status:boolean, callback: AsyncCallback<void>):void + +Changes the device-cloud synergy switch for an application. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Config + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------------- | ---- | ---------------------------- | +| accountId | string | Yes | ID of the target cloud.| +| bundleName| string | Yes | Name of the target application.| +| status | boolean | Yes | Setting of the device-cloud synergy switch for the application. The value **true** means to enable the device-cloud synergy; the value **false** means the opposite.| +| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. | + +**Example** + +```js +let account = 'test_id'; +let bundleName = 'test_bundleName'; +try { + cloudData.Config.changeAppCloudSwitch(account, bundleName, true, function (err) { + if (err === undefined) { + console.info('Succeeded in changing App cloud switch'); + } else { + console.error(`Failed to change App cloud switch. Code: ${err.code}, message: ${err.message}`); + } + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` + +### changeAppCloudSwitch + +static changeAppCloudSwitch(accountId: string,bundleName:string,status:boolean): Promise<void> + +Changes the device-cloud synergy switch for an application. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Config + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------------- | ---- | ---------------------------- | +| accountId | string | Yes | ID of the target cloud.| +| bundleName| string | Yes | Name of the target application.| +| status | boolean | Yes | Setting of the device-cloud synergy switch for the application. The value **true** means to enable the device-cloud synergy; the value **false** means the opposite.| + +**Return value** + +| Type | Description | +| ------------------- | ------------------------- | +| Promise<void> | Promise that returns no value.| + +**Example** + +```js +let account = 'test_id'; +let bundleName = 'test_bundleName'; +try { + cloudData.Config.changeAppCloudSwitch(account, bundleName, true).then(() => { + console.info('Succeeded in changing App cloud switch'); + }).catch((err) => { + console.error(`Failed to change App cloud switch. Code is ${err.code}, message is ${err.message}`); + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` + +### notifyDataChange + +static notifyDataChange(accountId: string,bundleName:string, callback: AsyncCallback<void>):void + +Notifies the data changes in the cloud. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Server + +**Parameters** + +| Name | Type | Mandatory| Description | +| ---------- | ------------------------- | ---- | ---------------- | +| accountId | string | Yes | ID of the target cloud.| +| bundleName | string | Yes | Name of the target application. | +| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. | + +**Example** + +```js +let account = 'test_id'; +let bundleName = 'test_bundleName'; +try { + cloudData.Config.notifyDataChange(account, bundleName, function (err) { + if (err === undefined) { + console.info('Succeeded in notifying the change of data'); + } else { + console.error(`Failed to notify the change of data. Code: ${err.code}, message: ${err.message}`); + } + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` + +### notifyDataChange + +static notifyDataChange(accountId: string,bundleName:string): Promise<void> + +Notifies the data changes in the cloud. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.CLOUDDATA_CONFIG + +**System capability**: SystemCapability.DistributedDataManager.CloudSync.Server + +**Parameters** + +| Name | Type | Mandatory| Description | +| ---------- | ------ | ---- | ---------------- | +| accountId | string | Yes | ID of the target cloud.| +| bundleName | string | Yes | Name of the target application. | + +**Return value** + +| Type | Description | +| ------------------- | ------------------------- | +| Promise<void> | Promise that returns no value.| + +**Example** + +```js +let account = 'test_id'; +let bundleName = 'test_bundleName'; +try { + cloudData.Config.notifyDataChange(account, bundleName).then(() => { + console.info('Succeeded in notifying the change of data'); + }).catch((err) => { + console.error(`Failed to notify the change of data. Code: ${err.code}, message: ${err.message}`); + }); +} catch (error) { + console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`); +} +``` diff --git a/en/application-dev/reference/apis/js-apis-data-dataSharePredicates.md b/en/application-dev/reference/apis/js-apis-data-dataSharePredicates.md index 78d896c54a2f1c1674825ddaff66088634129596..6f63bb98574f0499ea47acb1f9ff0e04fff65f34 100644 --- a/en/application-dev/reference/apis/js-apis-data-dataSharePredicates.md +++ b/en/application-dev/reference/apis/js-apis-data-dataSharePredicates.md @@ -1,4 +1,4 @@ -# @ohos.data.dataSharePredicates (DataShare Predicates) +# @ohos.data.dataSharePredicates (Data Share Predicates) You can use **DataSharePredicates** to specify conditions for [updating](js-apis-data-dataShare.md#update), [deleting](js-apis-data-dataShare.md#delete), and [querying](js-apis-data-dataShare.md#query) data when **DataShare** is used to manage data. @@ -18,13 +18,13 @@ import dataSharePredicates from '@ohos.data.dataSharePredicates'; ``` ## DataSharePredicates -Provides methods for setting different **DataSharePredicates** objects. +Provides methods for setting different **DataSharePredicates** objects. This type is not multi-thread safe. If a **DataSharePredicates** instance is operated by multiple threads at the same time in an application, use a lock for the instance. ### equalTo equalTo(field: string, value: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is equal to the specified value. +Sets a **DataSharePredicates** object to match the data that is equal to the specified value. Currently, only the relational database (RDB) and key-value database (KVDB, schema) support this **DataSharePredicates** object. @@ -54,10 +54,11 @@ predicates.equalTo("NAME", "Rose") notEqualTo(field: string, value: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is not equal to the specified value. +Sets a **DataSharePredicates** object to match the data that is not equal to the specified value. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -88,6 +89,7 @@ Adds a left parenthesis to this **DataSharePredicates**. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Return value** @@ -116,6 +118,7 @@ Adds a right parenthesis to this **DataSharePredicates** object. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Return value** @@ -144,6 +147,7 @@ Adds the OR condition to this **DataSharePredicates** object. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Return value** @@ -190,10 +194,11 @@ predicates.equalTo("NAME", "lisi") contains(field: string, value: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that contains the specified value. +Sets a **DataSharePredicates** object to match the data that contains the specified value. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -220,10 +225,11 @@ predicates.contains("NAME", "os") beginsWith(field: string, value: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that begins with the specified value. +Sets a **DataSharePredicates** object to match the data that begins with the specified value. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -250,10 +256,11 @@ predicates.beginsWith("NAME", "os") endsWith(field: string, value: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that ends with the specified value. +Sets a **DataSharePredicates** object to match the data that ends with the specified value. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -280,10 +287,11 @@ predicates.endsWith("NAME", "os") isNull(field: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data whose value is null. +Sets a **DataSharePredicates** object to match the data whose value is null. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -309,10 +317,11 @@ predicates.isNull("NAME") isNotNull(field: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data whose value is not null. +Sets a **DataSharePredicates** object to match the data whose value is not null. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -338,10 +347,11 @@ predicates.isNotNull("NAME") like(field: string, value: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that matches the specified wildcard expression. +Sets a **DataSharePredicates** object to match the data that matches the specified wildcard expression. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -368,10 +378,11 @@ predicates.like("NAME", "%os%") unlike(field: string, value: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that does not match the specified wildcard expression. +Sets a **DataSharePredicates** object to match the data that does not match the specified wildcard expression. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -398,10 +409,11 @@ predicates.unlike("NAME", "%os%") glob(field: string, value: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that matches the specified wildcard expression. +Sets a **DataSharePredicates** object to match the data that matches the specified wildcard expression. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -428,10 +440,11 @@ predicates.glob("NAME", "?h*g") between(field: string, low: ValueType, high: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is within the specified range, including the start and end values. +Sets a **DataSharePredicates** object to match the data that is within the specified range, including the start and end values. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -459,10 +472,11 @@ predicates.between("AGE", 10, 50) notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is out of the specified range, excluding the start and end values. +Sets a **DataSharePredicates** object to match the data that is out of the specified range, excluding the start and end values. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -490,10 +504,11 @@ predicates.notBetween("AGE", 10, 50) greaterThan(field: string, value: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is greater than the specified value. +Sets a **DataSharePredicates** object to match the data that is greater than the specified value. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -520,10 +535,11 @@ predicates.greaterThan("AGE", 10) lessThan(field: string, value: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is less than the specified value. +Sets a **DataSharePredicates** object to match the data that is less than the specified value. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -550,10 +566,11 @@ predicates.lessThan("AGE", 50) greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is greater than or equal to the specified value. +Sets a **DataSharePredicates** object to match the data that is greater than or equal to the specified value. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -580,10 +597,11 @@ predicates.greaterThanOrEqualTo("AGE", 10) lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is less than or equal to the specified value. +Sets a **DataSharePredicates** object to match the data that is less than or equal to the specified value. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -672,6 +690,7 @@ Sets a **DataSharePredicates** object to filter out duplicate data records. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Return value** @@ -725,6 +744,7 @@ Sets a **DataSharePredicates** object group the records according to the specifi Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -754,6 +774,7 @@ Sets a **DataSharePredicates** object to list data by the specified index. Currently, only the RDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -779,7 +800,7 @@ predicates.indexedBy("SALARY_INDEX") in(field: string, value: Array<ValueType>): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is within the specified value. +Sets a **DataSharePredicates** object to match the data that is within the specified value. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. @@ -809,10 +830,11 @@ predicates.in("AGE", [18, 20]) notIn(field: string, value: Array<ValueType>): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data that is not in the specified value. +Sets a **DataSharePredicates** object to match the data that is not in the specified value. Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -839,10 +861,11 @@ predicates.notIn("NAME", ["Lisa", "Rose"]) prefixKey(prefix: string): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data with the specified key prefix. +Sets a **DataSharePredicates** object to match the data with the specified key prefix. Currently, only the KVDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** @@ -868,10 +891,11 @@ predicates.prefixKey("NAME") inKeys(keys: Array<string>): DataSharePredicates -Sets a **DataSharePredicates** object to search for the data whose keys are within the given range. +Sets a **DataSharePredicates** object to match the data whose keys are within the given range. Currently, only the KVDB supports this **DataSharePredicates** object. +**System API**: This is a system API. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core **Parameters** diff --git a/en/application-dev/reference/apis/js-apis-data-distributedobject.md b/en/application-dev/reference/apis/js-apis-data-distributedobject.md index 978cbffcf74444d9c902a91d72017d316f5ae5e8..8892f9ff2538ad00cebda30ba7b80fa3abf31641 100644 --- a/en/application-dev/reference/apis/js-apis-data-distributedobject.md +++ b/en/application-dev/reference/apis/js-apis-data-distributedobject.md @@ -23,10 +23,10 @@ Creates a distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| context | Context | Yes| Application context.
For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).
For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md).| -| source | object | Yes| Attributes of the distributed data object.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | context | Context | Yes| Application context.
For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).
For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md).| + | source | object | Yes| Attributes of the distributed data object.| **Return value** @@ -75,9 +75,9 @@ Creates a random session ID. **Return value** -| Type| Description| -| -------- | -------- | -| string | Session ID created.| + | Type| Description| + | -------- | -------- | + | string | Session ID created.| **Example** @@ -124,18 +124,18 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| sessionId | string | Yes| ID of a distributed data object on a trusted network.| -| callback | AsyncCallback<void> | Yes| Asynchronous callback invoked when the session ID is successfully set.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | sessionId | string | Yes| ID of a distributed data object on a trusted network.| + | callback | AsyncCallback<void> | Yes| Asynchronous callback invoked when the session ID is successfully set.| **Error codes** For details about the error codes, see [Distributed Data Object Error Codes](../errorcodes/errorcode-distributed-dataObject.md). -| ID| Error Message| -| -------- | -------- | -| 15400001 | Failed to create the in-memory database.| + | ID| Error Message| + | -------- | -------- | + | 15400001 | Create table failed.| **Example** @@ -158,17 +158,17 @@ Exits all joined sessions. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | AsyncCallback<void> | Yes| Asynchronous callback invoked when the distributed data object exits all joined sessions.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | callback | AsyncCallback<void> | Yes| Asynchronous callback invoked when the distributed data object exits all joined sessions.| **Error codes** For details about the error codes, see [Distributed Data Object Error Codes](../errorcodes/errorcode-distributed-dataObject.md). -| ID| Error Message| -| -------- | -------- | -| 15400001 | Failed to create the in-memory database.| + | ID| Error Message| + | -------- | -------- | + | 15400001 | Create table failed.| **Example** @@ -195,9 +195,9 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| sessionId | string | No| ID of a distributed data object on a trusted network. To remove a distributed data object from the network, set this parameter to "" or leave it empty.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | sessionId | string | No| ID of a distributed data object on a trusted network. To remove a distributed data object from the network, set this parameter to "" or leave it empty.| **Return value** @@ -209,9 +209,9 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo For details about the error codes, see [Distributed Data Object Error Codes](../errorcodes/errorcode-distributed-dataObject.md). -| ID| Error Message| -| -------- | -------- | -| 15400001 | Failed to create the in-memory database.| + | ID| Error Message| + | -------- | -------- | + | 15400001 | Create table failed.| **Example** @@ -240,10 +240,10 @@ Subscribes to data changes of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data changes.| -| callback | Callback<{ sessionId: string, fields: Array<string> }> | Yes| Callback invoked to return the changes of the distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data changes.| + | callback | Callback<{ sessionId: string, fields: Array<string> }> | Yes| Callback invoked to return the changes of the distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| **Example** @@ -269,10 +269,10 @@ Unsubscribes from the data changes of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | | type | string | Yes| Event type to unsubscribe from. The value is **change**, which indicates data changes.| -| callback | Callback<{ sessionId: string, fields: Array<string> }> | No| Callback for data changes. If this parameter is not specified, all data change callbacks of this distributed data object will be unregistered.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| + | callback | Callback<{ sessionId: string, fields: Array<string> }> | No| Callback for data changes. If this parameter is not specified, all data change callbacks of this distributed data object will be unregistered.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| **Example** @@ -294,10 +294,10 @@ Subscribes to status changes of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Event type to subscribe to. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| -| callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback invoked to return the status change.
**sessionId** indicates the session ID of the distributed data object.
**networkId** indicates the object device ID, that is, **deviceId**.
**status** indicates the object status, which can be online or offline.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | type | string | Yes| Event type to subscribe to. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| + | callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback invoked to return the status change.
**sessionId** indicates the session ID of the distributed data object.
**networkId** indicates the object device ID, that is, **deviceId**.
**status** indicates the object status, which can be online or offline.| **Example** @@ -318,10 +318,10 @@ Unsubscribes from the status change of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | | type | string | Yes| Event type to unsubscribe from. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| -| callback | Callback<{ sessionId: string, deviceId: string, status: 'online' \| 'offline' }> | No| Callback for status changes. If this parameter is not specified, all status change callbacks of this distributed data object will be unsubscribed from.
**sessionId** indicates the session ID of the distributed data object.
**deviceId** indicates the device ID of the distributed data object.
**status** indicates the object status, which can be online or offline.| + | callback | Callback<{ sessionId: string, deviceId: string, status: 'online' \| 'offline' }> | No| Callback for status changes. If this parameter is not specified, all status change callbacks of this distributed data object will be unsubscribed from.
**sessionId** indicates the session ID of the distributed data object.
**deviceId** indicates the device ID of the distributed data object.
**status** indicates the object status, which can be online or offline.| **Example** @@ -354,10 +354,10 @@ The saved data will be released in the following cases: **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| ID of the device where data is stored. The value **local** indicates the local device.| -| callback | AsyncCallback<[SaveSuccessResponse](#savesuccessresponse9)> | Yes| Callback invoked to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| ID of the device where data is stored. The value **local** indicates the local device.| + | callback | AsyncCallback<[SaveSuccessResponse](#savesuccessresponse9)> | Yes| Callback invoked to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.| **Example** @@ -394,15 +394,15 @@ The saved data will be released in the following cases: **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| ID of the device where the data is saved. The default value is **local**, which indicates the local device. | + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| ID of the device where the data is saved. The default value is **local**, which indicates the local device. | **Return value** -| Type| Description| -| -------- | -------- | -| Promise<[SaveSuccessResponse](#savesuccessresponse9)> | Promise used to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.| + | Type| Description| + | -------- | -------- | + | Promise<[SaveSuccessResponse](#savesuccessresponse9)> | Promise used to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.| **Example** @@ -423,7 +423,7 @@ g_object.save("local").then((result) => { revokeSave(callback: AsyncCallback<RevokeSaveSuccessResponse>): void -Revokes the saving operation of this distributed data object. This API uses an asynchronous callback to return the result. +Revokes the data of this distributed data object saved. This API uses an asynchronous callback to return the result. If the object is saved on the local device, the data saved on all trusted devices will be deleted. If the object is stored on another device, the data on the local device will be deleted. @@ -432,9 +432,9 @@ If the object is stored on another device, the data on the local device will be **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | AsyncCallback<[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)> | Yes| Callback invoked to return **RevokeSaveSuccessResponse**, which contains the session ID.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | callback | AsyncCallback<[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)> | Yes| Callback invoked to return **RevokeSaveSuccessResponse**, which contains the session ID.| **Example** @@ -468,7 +468,7 @@ g_object.revokeSave((err, result) => { revokeSave(): Promise<RevokeSaveSuccessResponse> -Revokes the saving operation of this distributed data object. This API uses a promise to return the result. +Revokes the data of this distributed data object saved. This API uses a promise to return the result. If the object is saved on the local device, the data saved on all trusted devices will be deleted. If the object is stored on another device, the data on the local device will be deleted. @@ -477,9 +477,9 @@ If the object is stored on another device, the data on the local device will be **Return value** -| Type| Description| -| -------- | -------- | -| Promise<[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)> | Promise used to return **RevokeSaveSuccessResponse**, which contains the session ID.| + | Type| Description| + | -------- | -------- | + | Promise<[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)> | Promise used to return **RevokeSaveSuccessResponse**, which contains the session ID.| **Example** @@ -520,9 +520,9 @@ Creates a distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| source | object | Yes| Attributes of the distributed data object.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | source | object | Yes| Attributes of the distributed data object.| **Return value** @@ -558,15 +558,15 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| sessionId | string | No| ID of a distributed data object on a trusted network. To remove a distributed data object from the network, set this parameter to "" or leave it empty.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | sessionId | string | No| ID of a distributed data object on a trusted network. To remove a distributed data object from the network, set this parameter to "" or leave it empty.| **Return value** -| Type| Description| -| -------- | -------- | -| boolean | Returns **true** if the session ID is set successfully;
returns **false** otherwise. | + | Type| Description| + | -------- | -------- | + | boolean | Returns **true** if the session ID is set successfully;
returns **false** otherwise. | **Example** @@ -593,10 +593,10 @@ Subscribes to data changes of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data changes.| -| callback | Callback<{ sessionId: string, fields: Array<string> }> | Yes| Callback invoked to return the changes of the distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data changes.| + | callback | Callback<{ sessionId: string, fields: Array<string> }> | Yes| Callback invoked to return the changes of the distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| **Example** @@ -628,10 +628,10 @@ Unsubscribes from the data changes of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | | type | string | Yes| Event type to unsubscribe from. The value is **change**, which indicates data changes.| -| callback | Callback<{ sessionId: string, fields: Array<string> }> | No| Callback for data changes. If this parameter is not specified, all data change callbacks of this distributed data object will be unregistered.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| + | callback | Callback<{ sessionId: string, fields: Array<string> }> | No| Callback for data changes. If this parameter is not specified, all data change callbacks of this distributed data object will be unregistered.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.| **Example** @@ -659,10 +659,10 @@ Subscribes to status changes of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | Yes| Event type to subscribe to. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| -| callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback invoked to return the status change.
**sessionId** indicates the session ID of the distributed data object.
**networkId** indicates the object device ID, that is, **deviceId**.
**status** indicates the object status, which can be online or offline.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | type | string | Yes| Event type to subscribe to. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| + | callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback invoked to return the status change.
**sessionId** indicates the session ID of the distributed data object.
**networkId** indicates the object device ID, that is, **deviceId**.
**status** indicates the object status, which can be online or offline.| **Example** @@ -689,8 +689,8 @@ Unsubscribes from the status change of this distributed data object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | | type | string | Yes| Event type to unsubscribe from. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| | callback | Callback<{ sessionId: string, deviceId: string, status: 'online' \| 'offline' }> | No| Callback for status changes. If this parameter is not specified, all status change callbacks of this distributed data object will be unregistered.
**sessionId** indicates the session ID of the distributed data object.
**deviceId** indicates the device ID of the distributed data object.
**status** indicates the object status, which can be online or offline.| diff --git a/en/application-dev/reference/apis/js-apis-data-preferences.md b/en/application-dev/reference/apis/js-apis-data-preferences.md index 156078c63ad8f33a7747e493948f59d511a1c791..7ee96b8c97e6d294255a541fce2c392b04fc310f 100644 --- a/en/application-dev/reference/apis/js-apis-data-preferences.md +++ b/en/application-dev/reference/apis/js-apis-data-preferences.md @@ -185,7 +185,7 @@ For details about the error codes, see [User Preference Error Codes](../errorcod | ID| Error Message | | -------- | ------------------------------| -| 15500010 | Failed to delete the preferences. | +| 15500010 | Failed to delete preferences file. | **Example** @@ -197,7 +197,7 @@ import featureAbility from '@ohos.ability.featureAbility'; let context = featureAbility.getContext(); try { - data_preferences.deletePreferences(context, 'mystore', function (err, val) { + data_preferences.deletePreferences(context, 'mystore', function (err) { if (err) { console.info("Failed to delete the preferences. code =" + err.code + ", message =" + err.message); return; @@ -217,7 +217,7 @@ import UIAbility from '@ohos.app.ability.UIAbility'; class EntryAbility extends UIAbility { onWindowStageCreate(windowStage) { try { - data_preferences.deletePreferences(this.context, 'mystore', function (err, val) { + data_preferences.deletePreferences(this.context, 'mystore', function (err) { if (err) { console.info("Failed to delete the preferences. code =" + err.code + ", message =" + err.message); return; @@ -262,7 +262,7 @@ For details about the error codes, see [User Preference Error Codes](../errorcod | ID| Error Message | | -------- | ------------------------------| -| 15500010 | Failed to delete the preferences. | +| 15500010 | Failed to delete preferences file. | **Example** @@ -334,7 +334,7 @@ import featureAbility from '@ohos.ability.featureAbility'; let context = featureAbility.getContext(); try { - data_preferences.removePreferencesFromCache(context, 'mystore', function (err, val) { + data_preferences.removePreferencesFromCache(context, 'mystore', function (err) { if (err) { console.info("Failed to remove the preferences. code =" + err.code + ", message =" + err.message); return; @@ -354,7 +354,7 @@ import UIAbility from '@ohos.app.ability.UIAbility'; class EntryAbility extends UIAbility { onWindowStageCreate(windowStage) { try { - data_preferences.removePreferencesFromCache(this.context, 'mystore', function (err, val) { + data_preferences.removePreferencesFromCache(this.context, 'mystore', function (err) { if (err) { console.info("Failed to remove the preferences. code =" + err.code + ", message =" + err.message); return; diff --git a/en/application-dev/reference/apis/js-apis-data-relationalStore.md b/en/application-dev/reference/apis/js-apis-data-relationalStore.md index 3e7e078f595f8468bf78cc953f5267c5515360a2..126dff90c4a6d06dfe675668409cf4d4d9573fa6 100644 --- a/en/application-dev/reference/apis/js-apis-data-relationalStore.md +++ b/en/application-dev/reference/apis/js-apis-data-relationalStore.md @@ -38,10 +38,11 @@ Obtains an RDB store. This API uses an asynchronous callback to return the resul For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800010 | If failed delete database by invalid database name. | -| 14800011 | If failed open database by database corrupted. | +| **ID**| **Error Message** | +| ------------ | ----------------------------------------------------------- | +| 14800010 | Failed to open or delete database by invalid database path. | +| 14800011 | Failed to open database by database corrupted. | +| 14800000 | Inner error. | **Example** @@ -64,7 +65,7 @@ const STORE_CONFIG = { relationalStore.getRdbStore(context, STORE_CONFIG, function (err, rdbStore) { store = rdbStore; if (err) { - console.error(`Get RdbStore failed, err: ${err}`); + console.error(`Get RdbStore failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Get RdbStore successfully.`); @@ -87,7 +88,7 @@ class EntryAbility extends UIAbility { relationalStore.getRdbStore(this.context, STORE_CONFIG, function (err, rdbStore) { store = rdbStore; if (err) { - console.error(`Get RdbStore failed, err: ${err}`); + console.error(`Get RdbStore failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Get RdbStore successfully.`); @@ -121,10 +122,11 @@ Obtains an RDB store. This API uses a promise to return the result. You can set For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800010 | If failed delete database by invalid database name. | -| 14800011 | If failed open database by database corrupted. | +| **ID**| **Error Message** | +| ------------ | ----------------------------------------------------------- | +| 14800010 | Failed to open or delete database by invalid database path. | +| 14800011 | Failed to open database by database corrupted. | +| 14800000 | Inner error. | **Example** @@ -148,7 +150,7 @@ promise.then(async (rdbStore) => { store = rdbStore; console.info(`Get RdbStore successfully.`); }).catch((err) => { - console.error(`Get RdbStore failed, err: ${err}`); + console.error(`Get RdbStore failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -170,7 +172,7 @@ class EntryAbility extends UIAbility { store = rdbStore; console.info(`Get RdbStore successfully.`) }).catch((err) => { - console.error(`Get RdbStore failed, err: ${err}`); + console.error(`Get RdbStore failed, code is ${err.code},message is ${err.message}`); }) } } @@ -196,9 +198,10 @@ Deletes an RDB store. This API uses an asynchronous callback to return the resul For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800010 | If failed delete database by invalid database name. | +| **ID**| **Error Message** | +| ------------ | ----------------------------------------------------------- | +| 14800010 | Failed to open or delete database by invalid database path. | +| 14800000 | Inner error. | **Example** @@ -212,7 +215,7 @@ let context = featureAbility.getContext() relationalStore.deleteRdbStore(context, "RdbTest.db", function (err) { if (err) { - console.error(`Delete RdbStore failed, err: ${err}`); + console.error(`Delete RdbStore failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Delete RdbStore successfully.`); @@ -228,7 +231,7 @@ class EntryAbility extends UIAbility { onWindowStageCreate(windowStage){ relationalStore.deleteRdbStore(this.context, "RdbTest.db", function (err) { if (err) { - console.error(`Delete RdbStore failed, err: ${err}`); + console.error(`Delete RdbStore failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Delete RdbStore successfully.`); @@ -262,9 +265,10 @@ Deletes an RDB store. This API uses a promise to return the result. For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800010 | If failed delete database by invalid database name. | +| **ID**| **Error Message** | +| ------------ | ----------------------------------------------------------- | +| 14800010 | Failed to open or delete database by invalid database path. | +| 14800000 | Inner error. | **Example** @@ -280,7 +284,7 @@ let promise = relationalStore.deleteRdbStore(context, "RdbTest.db"); promise.then(()=>{ console.info(`Delete RdbStore successfully.`); }).catch((err) => { - console.error(`Delete RdbStore failed, err: ${err}`); + console.error(`Delete RdbStore failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -295,7 +299,7 @@ class EntryAbility extends UIAbility { promise.then(()=>{ console.info(`Delete RdbStore successfully.`); }).catch((err) => { - console.error(`Delete RdbStore failed, err: ${err}`); + console.error(`Delete RdbStore failed, code is ${err.code},message is ${err.message}`); }) } } @@ -311,7 +315,7 @@ Defines the RDB store configuration. | ------------- | ------------- | ---- | --------------------------------------------------------- | | name | string | Yes | Database file name. | | securityLevel | [SecurityLevel](#securitylevel) | Yes | Security level of the RDB store. | -| encrypt | boolean | No | Whether to encrypt the RDB store.
The value **true** means to encrypt the RDB store;
the value **false** means the opposite.| +| encrypt | boolean | No | Whether to encrypt the RDB store.
The value **true** means to encrypt the RDB store;
the value **false** (default) means the opposite.| ## SecurityLevel @@ -319,7 +323,7 @@ Enumerates the RDB store security levels. > **NOTE** > -> To perform data synchronization operations, the RDB store security level must be lower than or equal to that of the peer device. For details, see the [Cross-Device Data Synchronization Mechanism](../../database/sync-app-data-across-devices-overview.md#cross-device-data-synchronization-mechanism). +> To perform data synchronization operations, the RDB store security level must be lower than or equal to that of the peer device. For details, see the [Cross-Device Data Synchronization Mechanism]( ../../database/sync-app-data-across-devices-overview.md#cross-device-data-synchronization-mechanism). **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core @@ -344,7 +348,7 @@ Defines the data types allowed. ## ValuesBucket -Defines the types of the key and value in a KV pair. +Defines the types of the key and value in a KV pair. This type is not multi-thread safe. If a **ValuesBucket** instance is operated by multiple threads at the same time in an application, use a lock for the instance. **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core @@ -374,6 +378,7 @@ Defines the subscription type. | Name | Value | Description | | --------------------- | ---- | ------------------ | | SUBSCRIBE_TYPE_REMOTE | 0 | Subscribe to remote data changes.| +| SUBSCRIBE_TYPE_CLOUD10+ | 1 | Subscribe to cloud data changes.| ## ConflictResolution10+ @@ -392,7 +397,7 @@ Defines the resolution to use when **insert()** and **update()** conflict. ## RdbPredicates -Defines the predicates for an RDB store. This class determines whether the conditional expression for the RDB store is true or false. +Defines the predicates for an RDB store. This class determines whether the conditional expression for the RDB store is true or false. This type is not multi-thread safe. If an **RdbPredicates** instance is operated by multiple threads at the same time in an application, use a lock for the instance. ### constructor @@ -1289,9 +1294,10 @@ Inserts a row of data into a table. This API uses an asynchronous callback to re For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1304,7 +1310,7 @@ const valueBucket = { }; store.insert("EMPLOYEE", valueBucket, function (err, rowId) { if (err) { - console.error(`Insert is failed, err: ${err}`); + console.error(`Insert is failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Insert is successful, rowId = ${rowId}`); @@ -1332,9 +1338,10 @@ Inserts a row of data into a table. This API uses an asynchronous callback to re For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1347,7 +1354,7 @@ const valueBucket = { }; store.insert("EMPLOYEE", valueBucket, relationalStore.ConflictResolution.ON_CONFLICT_REPLACE, function (err, rowId) { if (err) { - console.error(`Insert is failed, err: ${err}`); + console.error(`Insert is failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Insert is successful, rowId = ${rowId}`); @@ -1379,9 +1386,10 @@ Inserts a row of data into a table. This API uses a promise to return the result For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1396,7 +1404,7 @@ let promise = store.insert("EMPLOYEE", valueBucket); promise.then((rowId) => { console.info(`Insert is successful, rowId = ${rowId}`); }).catch((err) => { - console.error(`Insert is failed, err: ${err}`); + console.error(`Insert is failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -1426,9 +1434,10 @@ Inserts a row of data into a table. This API uses a promise to return the result For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1443,7 +1452,7 @@ let promise = store.insert("EMPLOYEE", valueBucket, relationalStore.ConflictReso promise.then((rowId) => { console.info(`Insert is successful, rowId = ${rowId}`); }).catch((err) => { - console.error(`Insert is failed, err: ${err}`); + console.error(`Insert is failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -1467,9 +1476,10 @@ Batch inserts data into a table. This API uses an asynchronous callback to retur For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1496,7 +1506,7 @@ const valueBucket3 = { let valueBuckets = new Array(valueBucket1, valueBucket2, valueBucket3); store.batchInsert("EMPLOYEE", valueBuckets, function(err, insertNum) { if (err) { - console.error(`batchInsert is failed, err: ${err}`); + console.error(`batchInsert is failed, code is ${err.code},message is ${err.message}`); return; } console.info(`batchInsert is successful, the number of values that were inserted = ${insertNum}`); @@ -1528,9 +1538,10 @@ Batch inserts data into a table. This API uses a promise to return the result. For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1559,7 +1570,7 @@ let promise = store.batchInsert("EMPLOYEE", valueBuckets); promise.then((insertNum) => { console.info(`batchInsert is successful, the number of values that were inserted = ${insertNum}`); }).catch((err) => { - console.error(`batchInsert is failed, err: ${err}`); + console.error(`batchInsert is failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -1583,9 +1594,10 @@ Updates data in the RDB store based on the specified **RdbPredicates** object. T For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1600,7 +1612,7 @@ let predicates = new relationalStore.RdbPredicates("EMPLOYEE"); predicates.equalTo("NAME", "Lisa"); store.update(valueBucket, predicates, function (err, rows) { if (err) { - console.error(`Updated failed, err: ${err}`); + console.error(`Updated failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Updated row count: ${rows}`); @@ -1628,9 +1640,10 @@ Updates data in the RDB store based on the specified **RdbPredicates** object. T For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1645,7 +1658,7 @@ let predicates = new relationalStore.RdbPredicates("EMPLOYEE"); predicates.equalTo("NAME", "Lisa"); store.update(valueBucket, predicates, relationalStore.ConflictResolution.ON_CONFLICT_REPLACE, function (err, rows) { if (err) { - console.error(`Updated failed, err: ${err}`); + console.error(`Updated failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Updated row count: ${rows}`); @@ -1677,9 +1690,10 @@ Updates data based on the specified **RdbPredicates** object. This API uses a pr For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1696,7 +1710,7 @@ let promise = store.update(valueBucket, predicates); promise.then(async (rows) => { console.info(`Updated row count: ${rows}`); }).catch((err) => { - console.error(`Updated failed, err: ${err}`); + console.error(`Updated failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -1726,9 +1740,10 @@ Updates data based on the specified **RdbPredicates** object. This API uses a pr For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1745,7 +1760,7 @@ let promise = store.update(valueBucket, predicates, relationalStore.ConflictReso promise.then(async (rows) => { console.info(`Updated row count: ${rows}`); }).catch((err) => { - console.error(`Updated failed, err: ${err}`); + console.error(`Updated failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -1757,6 +1772,8 @@ Updates data based on the specified **DataSharePredicates** object. This API use **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core +**Model restriction**: This API can be used only in the stage model. + **System API**: This is a system API. **Parameters** @@ -1772,9 +1789,10 @@ Updates data based on the specified **DataSharePredicates** object. This API use For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1790,7 +1808,7 @@ let predicates = new dataSharePredicates.DataSharePredicates(); predicates.equalTo("NAME", "Lisa"); store.update("EMPLOYEE", valueBucket, predicates, function (err, rows) { if (err) { - console.error(`Updated failed, err: ${err}`); + console.error(`Updated failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Updated row count: ${rows}`); @@ -1805,6 +1823,8 @@ Updates data based on the specified **DataSharePredicates** object. This API use **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core +**Model restriction**: This API can be used only in the stage model. + **System API**: This is a system API. **Parameters** @@ -1825,9 +1845,10 @@ Updates data based on the specified **DataSharePredicates** object. This API use For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1845,7 +1866,7 @@ let promise = store.update("EMPLOYEE", valueBucket, predicates); promise.then(async (rows) => { console.info(`Updated row count: ${rows}`); }).catch((err) => { - console.error(`Updated failed, err: ${err}`); + console.error(`Updated failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -1868,9 +1889,10 @@ Deletes data from the RDB store based on the specified **RdbPredicates** object. For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1879,7 +1901,7 @@ let predicates = new relationalStore.RdbPredicates("EMPLOYEE"); predicates.equalTo("NAME", "Lisa"); store.delete(predicates, function (err, rows) { if (err) { - console.error(`Delete failed, err: ${err}`); + console.error(`Delete failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Delete rows: ${rows}`); @@ -1910,9 +1932,10 @@ Deletes data from the RDB store based on the specified **RdbPredicates** object. For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1923,7 +1946,7 @@ let promise = store.delete(predicates); promise.then((rows) => { console.info(`Delete rows: ${rows}`); }).catch((err) => { - console.error(`Delete failed, err: ${err}`); + console.error(`Delete failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -1935,6 +1958,8 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core +**Model restriction**: This API can be used only in the stage model. + **System API**: This is a system API. **Parameters** @@ -1949,9 +1974,10 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -1961,7 +1987,7 @@ let predicates = new dataSharePredicates.DataSharePredicates(); predicates.equalTo("NAME", "Lisa"); store.delete("EMPLOYEE", predicates, function (err, rows) { if (err) { - console.error(`Delete failed, err: ${err}`); + console.error(`Delete failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Delete rows: ${rows}`); @@ -1976,6 +2002,8 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core +**Model restriction**: This API can be used only in the stage model. + **System API**: This is a system API. **Parameters** @@ -1995,9 +2023,10 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -2009,7 +2038,7 @@ let promise = store.delete("EMPLOYEE", predicates); promise.then((rows) => { console.info(`Delete rows: ${rows}`); }).catch((err) => { - console.error(`Delete failed, err: ${err}`); + console.error(`Delete failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2029,6 +2058,14 @@ Queries data from the RDB store based on specified conditions. This API uses an | columns | Array<string> | Yes | Columns to query. If this parameter is not specified, the query applies to all columns. | | callback | AsyncCallback<[ResultSet](#resultset)> | Yes | Callback invoked to return the result. If the operation is successful, a **ResultSet** object will be returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2036,7 +2073,7 @@ let predicates = new relationalStore.RdbPredicates("EMPLOYEE"); predicates.equalTo("NAME", "Rose"); store.query(predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"], function (err, resultSet) { if (err) { - console.error(`Query failed, err: ${err}`); + console.error(`Query failed, code is ${err.code},message is ${err.message}`); return; } console.info(`ResultSet column names: ${resultSet.columnNames}`); @@ -2059,6 +2096,14 @@ Queries data from the RDB store based on specified conditions. This API uses a p | predicates | [RdbPredicates](#rdbpredicates) | Yes | Query conditions specified by the **RdbPredicates** object. | | columns | Array<string> | No | Columns to query. If this parameter is not specified, the query applies to all columns.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Return value** | Type | Description | @@ -2075,7 +2120,7 @@ promise.then((resultSet) => { console.info(`ResultSet column names: ${resultSet.columnNames}`); console.info(`ResultSet column count: ${resultSet.columnCount}`); }).catch((err) => { - console.error(`Query failed, err: ${err}`); + console.error(`Query failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2087,6 +2132,8 @@ Queries data from the RDB store based on specified conditions. This API uses an **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core +**Model restriction**: This API can be used only in the stage model. + **System API**: This is a system API. **Parameters** @@ -2098,6 +2145,14 @@ Queries data from the RDB store based on specified conditions. This API uses an | columns | Array<string> | Yes | Columns to query. If this parameter is not specified, the query applies to all columns. | | callback | AsyncCallback<[ResultSet](#resultset)> | Yes | Callback invoked to return the result. If the operation is successful, a **ResultSet** object will be returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2106,7 +2161,7 @@ let predicates = new dataSharePredicates.DataSharePredicates(); predicates.equalTo("NAME", "Rose"); store.query("EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"], function (err, resultSet) { if (err) { - console.error(`Query failed, err: ${err}`); + console.error(`Query failed, code is ${err.code},message is ${err.message}`); return; } console.info(`ResultSet column names: ${resultSet.columnNames}`); @@ -2122,6 +2177,8 @@ Queries data from the RDB store based on specified conditions. This API uses a p **System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core +**Model restriction**: This API can be used only in the stage model. + **System API**: This is a system API. **Parameters** @@ -2138,6 +2195,14 @@ Queries data from the RDB store based on specified conditions. This API uses a p | ------------------------------------------------------- | -------------------------------------------------- | | Promise<[ResultSet](#resultset)> | Promise used to return the result. If the operation is successful, a **ResultSet** object will be returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2149,7 +2214,7 @@ promise.then((resultSet) => { console.info(`ResultSet column names: ${resultSet.columnNames}`); console.info(`ResultSet column count: ${resultSet.columnCount}`); }).catch((err) => { - console.error(`Query failed, err: ${err}`); + console.error(`Query failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2175,6 +2240,14 @@ Queries data from the RDB store of a remote device based on specified conditions | columns | Array<string> | Yes | Columns to query. If this parameter is not specified, the query applies to all columns. | | callback | AsyncCallback<[ResultSet](#resultset)> | Yes | Callback invoked to return the result. If the operation is successful, a **ResultSet** object will be returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2197,7 +2270,7 @@ predicates.greaterThan("id", 0); store.remoteQuery(deviceId, "EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"], function(err, resultSet) { if (err) { - console.error(`Failed to remoteQuery, err: ${err}`); + console.error(`Failed to remoteQuery, code is ${err.code},message is ${err.message}`); return; } console.info(`ResultSet column names: ${resultSet.columnNames}`); @@ -2233,6 +2306,14 @@ Queries data from the RDB store of a remote device based on specified conditions | ------------------------------------------------------------ | -------------------------------------------------- | | Promise<[ResultSet](#resultset)> | Promise used to return the result. If the operation is successful, a **ResultSet** object will be returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2257,7 +2338,7 @@ promise.then((resultSet) => { console.info(`ResultSet column names: ${resultSet.columnNames}`); console.info(`ResultSet column count: ${resultSet.columnCount}`); }).catch((err) => { - console.error(`Failed to remoteQuery, err: ${err}`); + console.error(`Failed to remoteQuery, code is ${err.code},message is ${err.message}`); }) ``` @@ -2277,12 +2358,20 @@ Queries data using the specified SQL statement. This API uses an asynchronous ca | bindArgs | Array<[ValueType](#valuetype)> | Yes | Arguments in the SQL statement. The value corresponds to the placeholders in the SQL parameter statement. If the SQL parameter statement is complete, the value of this parameter must be an empty array.| | callback | AsyncCallback<[ResultSet](#resultset)> | Yes | Callback invoked to return the result. If the operation is successful, a **ResultSet** object will be returned. | +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js store.querySql("SELECT * FROM EMPLOYEE CROSS JOIN BOOK WHERE BOOK.NAME = ?", ['sanguo'], function (err, resultSet) { if (err) { - console.error(`Query failed, err: ${err}`); + console.error(`Query failed, code is ${err.code},message is ${err.message}`); return; } console.info(`ResultSet column names: ${resultSet.columnNames}`); @@ -2311,6 +2400,14 @@ Queries data using the specified SQL statement. This API uses a promise to retur | ------------------------------------------------------- | -------------------------------------------------- | | Promise<[ResultSet](#resultset)> | Promise used to return the result. If the operation is successful, a **ResultSet** object will be returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2319,7 +2416,7 @@ promise.then((resultSet) => { console.info(`ResultSet column names: ${resultSet.columnNames}`); console.info(`ResultSet column count: ${resultSet.columnCount}`); }).catch((err) => { - console.error(`Query failed, err: ${err}`); + console.error(`Query failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2343,9 +2440,10 @@ Executes an SQL statement that contains specified arguments but returns no value For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -2353,7 +2451,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode const SQL_DELETE_TABLE = "DELETE FROM test WHERE name = ?" store.executeSql(SQL_DELETE_TABLE, ['zhangsan'], function(err) { if (err) { - console.error(`ExecuteSql failed, err: ${err}`); + console.error(`ExecuteSql failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Delete table done.`); @@ -2385,9 +2483,10 @@ Executes an SQL statement that contains specified arguments but returns no value For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -2397,7 +2496,7 @@ let promise = store.executeSql(SQL_DELETE_TABLE); promise.then(() => { console.info(`Delete table done.`); }).catch((err) => { - console.error(`ExecuteSql failed, err: ${err}`); + console.error(`ExecuteSql failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2413,9 +2512,10 @@ Starts the transaction before executing an SQL statement. For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). -| **ID**| **Error Message** | -| ------------ | ----------------------- | -| 14800047 | The WAL file size exceeds the default limit.| +| **ID**| **Error Message** | +| ------------ | -------------------------------------------- | +| 14800047 | The WAL file size exceeds the default limit. | +| 14800000 | Inner error. | **Example** @@ -2428,7 +2528,7 @@ const STORE_CONFIG = { }; relationalStore.getRdbStore(context, STORE_CONFIG, async function (err, store) { if (err) { - console.error(`GetRdbStore failed, err: ${err}`); + console.error(`GetRdbStore failed, code is ${err.code},message is ${err.message}`); return; } store.beginTransaction(); @@ -2462,7 +2562,7 @@ const STORE_CONFIG = { }; relationalStore.getRdbStore(context, STORE_CONFIG, async function (err, store) { if (err) { - console.error(`GetRdbStore failed, err: ${err}`); + console.error(`GetRdbStore failed, code is ${err.code},message is ${err.message}`); return; } store.beginTransaction(); @@ -2496,7 +2596,7 @@ const STORE_CONFIG = { }; relationalStore.getRdbStore(context, STORE_CONFIG, async function (err, store) { if (err) { - console.error(`GetRdbStore failed, err: ${err}`); + console.error(`GetRdbStore failed, code is ${err.code},message is ${err.message}`); return; } try { @@ -2511,7 +2611,7 @@ relationalStore.getRdbStore(context, STORE_CONFIG, async function (err, store) { await store.insert("test", valueBucket); store.commit(); } catch (err) { - console.error(`Transaction failed, err: ${err}`); + console.error(`Transaction failed, code is ${err.code},message is ${err.message}`); store.rollBack(); } }) @@ -2532,12 +2632,20 @@ Backs up an RDB store. This API uses an asynchronous callback to return the resu | destName | string | Yes | Name of the RDB store backup file.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. | +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js store.backup("dbBackup.db", function(err) { if (err) { - console.error(`Backup failed, err: ${err}`); + console.error(`Backup failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Backup success.`); @@ -2564,6 +2672,14 @@ Backs up an RDB store. This API uses a promise to return the result. | ------------------- | ------------------------- | | Promise<void> | Promise that returns no value.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2571,7 +2687,7 @@ let promiseBackup = store.backup("dbBackup.db"); promiseBackup.then(()=>{ console.info(`Backup success.`); }).catch((err)=>{ - console.error(`Backup failed, err: ${err}`); + console.error(`Backup failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2590,12 +2706,20 @@ Restores an RDB store from a backup file. This API uses an asynchronous callback | srcName | string | Yes | Name of the RDB store backup file.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. | +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js store.restore("dbBackup.db", function(err) { if (err) { - console.error(`Restore failed, err: ${err}`); + console.error(`Restore failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Restore success.`); @@ -2622,6 +2746,14 @@ Restores an RDB store from a backup file. This API uses a promise to return the | ------------------- | ------------------------- | | Promise<void> | Promise that returns no value.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2629,7 +2761,7 @@ let promiseRestore = store.restore("dbBackup.db"); promiseRestore.then(()=>{ console.info(`Restore success.`); }).catch((err)=>{ - console.error(`Restore failed, err: ${err}`); + console.error(`Restore failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2650,12 +2782,20 @@ Sets distributed tables. This API uses an asynchronous callback to return the re | tables | Array<string> | Yes | Names of the distributed tables to set.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js store.setDistributedTables(["EMPLOYEE"], function (err) { if (err) { - console.error(`SetDistributedTables failed, err: ${err}`); + console.error(`SetDistributedTables failed, code is ${err.code},message is ${err.message}`); return; } console.info(`SetDistributedTables successfully.`); @@ -2684,6 +2824,14 @@ Sets distributed tables. This API uses a promise to return the result. | ------------------- | ------------------------- | | Promise<void> | Promise that returns no value.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2691,7 +2839,7 @@ let promise = store.setDistributedTables(["EMPLOYEE"]); promise.then(() => { console.info(`SetDistributedTables successfully.`); }).catch((err) => { - console.error(`SetDistributedTables failed, err: ${err}`); + console.error(`SetDistributedTables failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2717,6 +2865,14 @@ Obtains the distributed table name of a remote device based on the local table n | table | string | Yes | Local table name of the remote device. | | callback | AsyncCallback<string> | Yes | Callback invoked to return the result. If the operation succeeds, the distributed table name of the remote device is returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2736,7 +2892,7 @@ deviceManager.createDeviceManager("com.example.appdatamgrverify", (err, manager) store.obtainDistributedTableName(deviceId, "EMPLOYEE", function (err, tableName) { if (err) { - console.error(`ObtainDistributedTableName failed, err: ${err}`); + console.error(`ObtainDistributedTableName failed, code is ${err.code},message is ${err.message}`); return; } console.info(`ObtainDistributedTableName successfully, tableName= ${tableName}`); @@ -2770,6 +2926,14 @@ Obtains the distributed table name of a remote device based on the local table n | --------------------- | ----------------------------------------------------- | | Promise<string> | Promise used to return the result. If the operation succeeds, the distributed table name of the remote device is returned.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2791,7 +2955,7 @@ let promise = store.obtainDistributedTableName(deviceId, "EMPLOYEE"); promise.then((tableName) => { console.info(`ObtainDistributedTableName successfully, tableName= ${tableName}`); }).catch((err) => { - console.error(`ObtainDistributedTableName failed, err: ${err}`); + console.error(`ObtainDistributedTableName failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2813,6 +2977,14 @@ Synchronizes data between devices. This API uses an asynchronous callback to ret | predicates | [RdbPredicates](#rdbpredicates) | Yes | **RdbPredicates** object that specifies the data and devices to synchronize. | | callback | AsyncCallback<Array<[string, number]>> | Yes | Callback invoked to send the synchronization result to the caller.
**string** indicates the device ID.
**number** indicates the synchronization status of that device. The value **0** indicates a successful synchronization. Other values indicate a synchronization failure. | +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2836,7 +3008,7 @@ let predicates = new relationalStore.RdbPredicates('EMPLOYEE'); predicates.inDevices(deviceIds); store.sync(relationalStore.SyncMode.SYNC_MODE_PUSH, predicates, function (err, result) { if (err) { - console.error(`Sync failed, err: ${err}`); + console.error(`Sync failed, code is ${err.code},message is ${err.message}`); return; } console.info(`Sync done.`); @@ -2869,6 +3041,14 @@ Synchronizes data between devices. This API uses a promise to return the result. | -------------------------------------------- | ------------------------------------------------------------ | | Promise<Array<[string, number]>> | Promise used to send the synchronization result.
**string** indicates the device ID.
**number** indicates the synchronization status of that device. The value **0** indicates a successful synchronization. Other values indicate a synchronization failure. | +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ---------------------------- | +| 14800000 | Inner error. | + **Example** ```js @@ -2897,7 +3077,7 @@ promise.then((result) =>{ console.info(`device= ${result[i][0]}, status= ${result[i][1]}`); } }).catch((err) => { - console.error(`Sync failed, err: ${err}`); + console.error(`Sync failed, code is ${err.code},message is ${err.message}`); }) ``` @@ -2915,7 +3095,7 @@ Registers an observer for this RDB store. When the data in the RDB store changes | -------- | ----------------------------------- | ---- | ------------------------------------------- | | event | string | Yes | Event to observe. The value is **dataChange**, which indicates a data change event. | | type | [SubscribeType](#subscribetype) | Yes | Subscription type to register.| -| observer | Callback<Array<string>> | Yes | Callback invoked to return the data change event. | +| observer | Callback<Array<string>> | Yes | Callback invoked to return the data change event. **Array** indicates the IDs of the peer devices whose data in the database is changed.| **Example** @@ -2928,7 +3108,7 @@ function storeObserver(devices) { try { store.on('dataChange', relationalStore.SubscribeType.SUBSCRIBE_TYPE_REMOTE, storeObserver); } catch (err) { - console.error(`Register observer failed, err: ${err}`); + console.error(`Register observer failed, code is ${err.code},message is ${err.message}`); } ``` @@ -2944,9 +3124,9 @@ Unregisters the observer of the specified type from the RDB store. This API uses | Name | Type | Mandatory| Description | | -------- | ---------------------------------- | ---- | ------------------------------------------ | -| event | string | Yes | Event type. The value is **dataChange**, which indicates a data change event. | -| type | [SubscribeType](#subscribetype) | Yes | Subscription type to unregister. | -| observer | Callback<Array<string>> | Yes | Callback for the data change event. | +| event | string | Yes | Event type. The value is **dataChange**, which indicates a data change event. | +| type | [SubscribeType](#subscribetype) | Yes | Subscription type to unregister. | +| observer | Callback<Array<string>> | Yes | Callback for the data change event. **Array** indicates the IDs of the peer devices whose data in the database is changed.| **Example** @@ -2959,7 +3139,7 @@ function storeObserver(devices) { try { store.off('dataChange', relationalStore.SubscribeType.SUBSCRIBE_TYPE_REMOTE, storeObserver); } catch (err) { - console.error(`Unregister observer failed, err: ${err}`); + console.error(`Unregister observer failed, code is ${err.code},message is ${err.message}`); } ``` @@ -3099,7 +3279,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode | **ID**| **Error Message** | | ------------ | ------------------------------------------------------------ | -| 14800012 | The result set is empty or the specified location is invalid. | +| 14800012 | The result set is empty or the specified location is invalid. | **Example** @@ -3110,7 +3290,7 @@ promise.then((resultSet) => { resultSet.goTo(1); resultSet.close(); }).catch((err) => { - console.error(`query failed, err: ${err}`); + console.error(`query failed, code is ${err.code},message is ${err.message}`); }); ``` @@ -3140,7 +3320,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode | **ID**| **Error Message** | | ------------ | ------------------------------------------------------------ | -| 14800012 | The result set is empty or the specified location is invalid. | +| 14800012 | The result set is empty or the specified location is invalid. | **Example** @@ -3151,7 +3331,7 @@ promise.then((resultSet) => { resultSet.goToRow(5); resultSet.close(); }).catch((err) => { - console.error(`query failed, err: ${err}`); + console.error(`query failed, code is ${err.code},message is ${err.message}`); }); ``` @@ -3176,7 +3356,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode | **ID**| **Error Message** | | ------------ | ------------------------------------------------------------ | -| 14800012 | The result set is empty or the specified location is invalid. | +| 14800012 | The result set is empty or the specified location is invalid. | **Example** @@ -3187,7 +3367,7 @@ promise.then((resultSet) => { resultSet.goToFirstRow(); resultSet.close(); }).catch((err) => { - console.error(`query failed, err: ${err}`); + console.error(`query failed, code is ${err.code},message is ${err.message}`); }); ``` @@ -3211,7 +3391,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode | **ID**| **Error Message** | | ------------ | ------------------------------------------------------------ | -| 14800012 | The result set is empty or the specified location is invalid. | +| 14800012 | The result set is empty or the specified location is invalid. | **Example** @@ -3222,7 +3402,7 @@ promise.then((resultSet) => { resultSet.goToLastRow(); resultSet.close(); }).catch((err) => { - console.error(`query failed, err: ${err}`); + console.error(`query failed, code is ${err.code},message is ${err.message}`); }); ``` @@ -3246,7 +3426,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode | **ID**| **Error Message** | | ------------ | ------------------------------------------------------------ | -| 14800012 | The result set is empty or the specified location is invalid. | +| 14800012 | The result set is empty or the specified location is invalid. | **Example** @@ -3257,7 +3437,7 @@ promise.then((resultSet) => { resultSet.goToNextRow(); resultSet.close(); }).catch((err) => { - console.error(`query failed, err: ${err}`); + console.error(`query failed, code is ${err.code},message is ${err.message}`); }); ``` @@ -3281,7 +3461,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode | **ID**| **Error Message** | | ------------ | ------------------------------------------------------------ | -| 14800012 | The result set is empty or the specified location is invalid. | +| 14800012 | The result set is empty or the specified location is invalid. | **Example** @@ -3292,7 +3472,7 @@ promise.then((resultSet) => { resultSet.goToPreviousRow(); resultSet.close(); }).catch((err) => { - console.error(`query failed, err: ${err}`); + console.error(`query failed, code is ${err.code},message is ${err.message}`); }); ``` @@ -3316,6 +3496,14 @@ Obtains the value in the form of a byte array based on the specified column and | ---------- | -------------------------------- | | Uint8Array | Value obtained.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ------------------------------------------------------------ | +| 14800013 | The column value is null or the column type is incompatible. | + **Example** ```js @@ -3342,6 +3530,14 @@ Obtains the value in the form of a string based on the specified column and the | ------ | ---------------------------- | | string | String obtained.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ------------------------------------------------------------ | +| 14800013 | The column value is null or the column type is incompatible. | + **Example** ```js @@ -3366,7 +3562,15 @@ Obtains the value of the Long type based on the specified column and the current | Type | Description | | ------ | ------------------------------------------------------------ | -| number | Value obtained.
The value range supported by this API is **Number.MIN_SAFE_INTEGER** to **Number.MAX_SAFE_INTEGER**. If the value is out of this range, use [getDouble](#getdouble).| +| number | Value obtained.
The value range supported by API is **Number.MIN_SAFE_INTEGER** to **Number.MAX_SAFE_INTEGER**. If the value is out of this range, use [getDouble](#getdouble).| + +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ------------------------------------------------------------ | +| 14800013 | The column value is null or the column type is incompatible. | **Example** @@ -3394,6 +3598,14 @@ Obtains the value of the double type based on the specified column and the curre | ------ | ---------------------------- | | number | Value obtained.| +**Error codes** + +For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode-data-rdb.md). + +| **ID**| **Error Message** | +| ------------ | ------------------------------------------------------------ | +| 14800013 | The column value is null or the column type is incompatible. | + **Example** ```js @@ -3450,7 +3662,7 @@ let promiseClose = store.query(predicatesClose, ["ID", "NAME", "AGE", "SALARY", promiseClose.then((resultSet) => { resultSet.close(); }).catch((err) => { - console.error(`resultset close failed, err: ${err}`); + console.error(`resultset close failed, code is ${err.code},message is ${err.message}`); }); ``` @@ -3460,6 +3672,4 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode | **ID**| **Error Message** | | ------------ | ------------------------------------------------------------ | -| 14800012 | The result set is empty or the specified location is invalid. | - - +| 14800012 | The result set is empty or the specified location is invalid. | diff --git a/en/application-dev/reference/apis/js-apis-data-valuesBucket.md b/en/application-dev/reference/apis/js-apis-data-valuesBucket.md index 009ff71b091c7d91a92d92364450316e3aeecfa2..ee21647ac71dacf7afa8240d2aa93e2ea65967f4 100644 --- a/en/application-dev/reference/apis/js-apis-data-valuesBucket.md +++ b/en/application-dev/reference/apis/js-apis-data-valuesBucket.md @@ -1,4 +1,4 @@ -# @ohos.data.ValuesBucket (Value Bucket) +# @ohos.data.ValuesBucket (Data Set) The **ValueBucket** module holds data in key-value (KV) pairs. You can use it to insert data into a database. @@ -6,7 +6,6 @@ The **ValueBucket** module holds data in key-value (KV) pairs. You can use it to > > The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. > -> The APIs provided by this module are system APIs. ## Modules to Import @@ -30,7 +29,7 @@ Enumerates the value types allowed by the database. ## ValuesBucket -Defines the types of the key and value in a KV pair. +Defines the types of the key and value in a KV pair. This type is not multi-thread safe. If a **ValuesBucket** instance is operated by multiple threads at the same time in an application, use a lock for the instance. **System capability**: SystemCapability.DistributedDataManager.DataShare.Core diff --git a/en/application-dev/reference/apis/js-apis-device-manager.md b/en/application-dev/reference/apis/js-apis-device-manager.md index 16ec1aec98084c7e3551e4a77406930b17cde50f..8528ceff015caa6e24cbec8ed4acd87098a67da1 100644 --- a/en/application-dev/reference/apis/js-apis-device-manager.md +++ b/en/application-dev/reference/apis/js-apis-device-manager.md @@ -39,15 +39,6 @@ Creates a **DeviceManager** instance. | bundleName | string | Yes | Bundle name of the application. | | callback | AsyncCallback<[DeviceManager](#devicemanager)> | Yes | Callback used to return the **DeviceManager** instance created.| -**Error codes** - -For details about the error codes, see [Device Management Error Codes](../errorcodes/errorcode-device-manager.md). - -| ID| Error Message | -| -------- | --------------------------------------------------------------- | -| 11600101 | Failed to execute the function. | -| 11600102 | Failed to obtain the service. | - **Example** ```js @@ -199,7 +190,7 @@ Defines the authentication parameters. | Name | Type | Mandatory | Description | | --------- | -------------------- | ---- | ---------- | | authType | number | Yes | Authentication type. | -| extraInfo | {[key:string] : any} | No | Extended field.| +| extraInfo | {[key:string] : any} | No | Extended field. Optional. The default value is **undefined**.| ## AuthInfo @@ -211,7 +202,7 @@ Defines authentication information. | --------- | -------------------- | ---- | ---------- | | authType | number | Yes | Authentication type. | | token | number | Yes | Authentication token. | -| extraInfo | {[key:string] : any} | No | Extended field.| +| extraInfo | {[key:string] : any} | No | Extended field. Optional. The default value is **undefined**.| ## PublishInfo9+ @@ -302,14 +293,6 @@ Obtains all trusted devices. This API uses an asynchronous callback to return th | -------- | ---------------------------------------- | ---- | --------------------- | | callback | AsyncCallback<Array<[DeviceInfo](#deviceinfo)>> | Yes | Callback used to return the list of trusted devices.| -**Error codes** - -For details about the error codes, see [Device Management Error Codes](../errorcodes/errorcode-device-manager.md). - -| ID| Error Message | -| -------- | --------------------------------------------------------------- | -| 11600101 | Failed to execute the function. | - **Example** ```js @@ -338,7 +321,7 @@ Obtains all trusted devices. This API uses a promise to return the result. | Type | Description | | ---------------------------------------- | --------------------- | - | Promise<Array<[DeviceInfo](#deviceinfo)>> | Promise used to return the list of trusted devices.| + | Promise<Array<[DeviceInfo](#deviceinfo)>> | Promise used to return the result.| **Error codes** @@ -404,14 +387,6 @@ Obtains local device information. This API uses an asynchronous callback to retu | -------- | ---------------------------------------- | ---- | --------- | | callback | AsyncCallback<[DeviceInfo](#deviceinfo)> | Yes | Callback used to return the local device information.| -**Error codes** - -For details about the error codes, see [Device Management Error Codes](../errorcodes/errorcode-device-manager.md). - -| ID| Error Message | -| -------- | --------------------------------------------------------------- | -| 11600101 | Failed to execute the function. | - **Example** ```js @@ -440,7 +415,7 @@ Obtains local device information. This API uses a promise to return the result. | Type | Description | | ---------------------------------------- | --------------------- | - | Promise<[DeviceInfo](#deviceinfo)> | Promise used to return the local device information.| + | Promise<[DeviceInfo](#deviceinfo)> | Promise used to return the result.| **Error codes** @@ -475,18 +450,12 @@ Obtains the information about a specific device based on the network ID. This AP | networkId| string | Yes | Network ID of the device.| | callback | AsyncCallback<[DeviceInfo](#deviceinfo)> | Yes | Callback used to return the information about the specified device.| -**Error codes** - -For details about the error codes, see [Device Management Error Codes](../errorcodes/errorcode-device-manager.md). - -| ID| Error Message | -| -------- | --------------------------------------------------------------- | -| 11600101 | Failed to execute the function. | - **Example** ```js try { + // Network ID of the device, which can be obtained from the trusted device list + let networkId = "xxxxxxx" dmInstance.getDeviceInfo(networkId, (err, data) => { if (err) { console.error("getDeviceInfo errCode:" + err.code + ",errMessage:" + err.message); @@ -519,17 +488,11 @@ Obtains the information about a specific device based on the network ID. This AP | ---------------------------------------- | --------------------- | | Promise<[DeviceInfo](#deviceinfo)> | Promise used to return the result.| -**Error codes** - -For details about the error codes, see [Device Management Error Codes](../errorcodes/errorcode-device-manager.md). - -| ID| Error Message | -| ------- | --------------------------------------------------------------- | -| 11600101| Failed to execute the function. | - **Example** ```js + // Network ID of the device, which can be obtained from the trusted device list + let networkId = "xxxxxxx" dmInstance.getDeviceInfo(networkId).then((data) => { console.log('get device info: ' + JSON.stringify(data)); }).catch((err) => { @@ -541,7 +504,7 @@ For details about the error codes, see [Device Management Error Codes](../errorc startDeviceDiscovery(subscribeInfo: SubscribeInfo): void -Starts to discover peripheral devices. +Starts to discover peripheral devices. The discovery process automatically stops when 2 minutes have elapsed. A maximum of 99 devices can be discovered. **System capability**: SystemCapability.DistributedHardware.DeviceManager @@ -575,7 +538,7 @@ For details about the error codes, see [Device Management Error Codes](../errorc "capability": 1 }; try { - dmInstance.startDeviceDiscovery(subscribeInfo); // The deviceFound callback is invoked to notify the application when a device is discovered. + dmInstance.startDeviceDiscovery(subscribeInfo); // The deviceFound callback is called to notify the application when a device is discovered. } catch (err) { console.error("startDeviceDiscovery errCode:" + err.code + ",errMessage:" + err.message); } @@ -585,7 +548,7 @@ For details about the error codes, see [Device Management Error Codes](../errorc startDeviceDiscovery(subscribeInfo: SubscribeInfo, filterOptions?: string): void -Starts to discover peripheral devices and filters discovered devices. +Starts to discover peripheral devices and filters discovered devices. The discovery process automatically stops when 2 minutes have elapsed. A maximum of 99 devices can be discovered. **System capability**: SystemCapability.DistributedHardware.DeviceManager @@ -594,7 +557,7 @@ Starts to discover peripheral devices and filters discovered devices. | Name | Type | Mandatory | Description | | ------------- | ------------------------------- | ---- | ----- | | subscribeInfo | [SubscribeInfo](#subscribeinfo) | Yes | Subscription information.| - | filterOptions | string | No | Options for filtering discovered devices.| + | filterOptions | string | No | Options for filtering discovered devices. Optional. The default value is **undefined**, indicating that discovery of offline devices.| **Error codes** @@ -673,7 +636,7 @@ For details about the error codes, see [Device Management Error Codes](../errorc publishDeviceDiscovery(publishInfo: PublishInfo): void -Publishes device information for discovery purposes. +Publishes device information for discovery purposes. The publish process automatically stops when 2 minutes have elapsed. **System capability**: SystemCapability.DistributedHardware.DeviceManager @@ -760,15 +723,6 @@ Authenticates a device. | authParam | [AuthParam](#authparam) | Yes | Authentication parameter. | | callback | AsyncCallback<{deviceId: string, pinToken ?: number}> | Yes | Callback used to return the authentication result.| -**Error codes** - -For details about the error codes, see [Device Management Error Codes](../errorcodes/errorcode-device-manager.md). - -| ID| Error Message | -| -------- | --------------------------------------------------------------- | -| 11600101 | Failed to execute the function. | -| 11600103 | Authentication invalid. | - **Example** ```js @@ -858,14 +812,6 @@ Verifies authentication information. | authInfo | [AuthInfo](#authinfo) | Yes | Authentication information. | | callback | AsyncCallback<{deviceId: string, level: number}> | Yes | Callback used to return the verification result.| -**Error codes** - -For details about the error codes, see [Device Management Error Codes](../errorcodes/errorcode-device-manager.md). - -| ID| Error Message | -| -------- | --------------------------------------------------------------- | -| 11600101 | Failed to execute the function. | - **Example** ```js @@ -944,11 +890,11 @@ Obtains the registration information of the credential. "userId" : "123" } try { - dmClass.requestCredentialRegisterInfo(credentialInfo, (data) => { + dmInstance.requestCredentialRegisterInfo(credentialInfo, (data) => { if (data) { console.info("requestCredentialRegisterInfo result:" + JSON.stringify(data)); } else { - console.info.push("requestCredentialRegisterInfo result: data is null"); + console.info("requestCredentialRegisterInfo result: data is null"); } }); } catch (err) { @@ -995,11 +941,11 @@ Imports credential information. ] } try { - dmClass.importCredential(credentialInfo, (data) => { + dmInstance.importCredential(credentialInfo, (data) => { if (data) { console.info("importCredential result:" + JSON.stringify(data)); } else { - console.info.push("importCredential result: data is null"); + console.info("importCredential result: data is null"); } }); } catch (err) { @@ -1031,11 +977,11 @@ Deletes credential information. "userId" : "123" } try { - dmClass.deleteCredential(queryInfo, (data) => { + dmInstance.deleteCredential(queryInfo, (data) => { if (data) { console.info("deleteCredential result:" + JSON.stringify(data)); } else { - console.info.push("deleteCredential result: data is null"); + console.info("deleteCredential result: data is null"); } }); } catch (err) { diff --git a/en/application-dev/reference/apis/js-apis-distributed-account.md b/en/application-dev/reference/apis/js-apis-distributed-account.md index 0ec67bc229c124cdf36a289e7321acaa9c2fcd43..5ea4792ec68bf59975274abd5cb7e0a58f8c1188 100644 --- a/en/application-dev/reference/apis/js-apis-distributed-account.md +++ b/en/application-dev/reference/apis/js-apis-distributed-account.md @@ -62,12 +62,14 @@ Obtains distributed account information. This API uses an asynchronous callback const accountAbility = account_distributedAccount.getDistributedAccountAbility(); try { accountAbility.getOsAccountDistributedInfo((err, data) => { - console.log("getOsAccountDistributedInfo err: " + JSON.stringify(err)); - console.log('Query account info name: ' + data.name); - console.log('Query account info id: ' + data.id); + if (err) { + console.log('getOsAccountDistributedInfo exception: ' + JSON.stringify(err)); + } else { + console.log('distributed information: ' + JSON.stringify(data)); + } }); - } catch (e) { - console.log("getOsAccountDistributedInfo exception: " + JSON.stringify(e)); + } catch (err) { + console.log('getOsAccountDistributedInfo exception: ' + JSON.stringify(err)); } ``` @@ -98,15 +100,96 @@ Obtains distributed account information. This API uses a promise to return the r const accountAbility = account_distributedAccount.getDistributedAccountAbility(); try { accountAbility.getOsAccountDistributedInfo().then((data) => { - console.log('Query account info name: ' + data.name); - console.log('Query account info id: ' + data.id); + console.log('distributed information: ' + JSON.stringify(data)); }).catch((err) => { - console.log("getOsAccountDistributedInfo err: " + JSON.stringify(err)); + console.log('getOsAccountDistributedInfo exception: ' + JSON.stringify(err)); }); - } catch (e) { - console.log("getOsAccountDistributedInfo exception: " + JSON.stringify(e)); + } catch (err) { + console.log('getOsAccountDistributedInfo exception: ' + JSON.stringify(err)); } ``` + +### getOsAccountDistributedInfoByLocalId10+ + +getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback<DistributedInfo>): void + +Obtains distributed information about an OS account. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Account.OsAccount + +**Required permissions**: ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + +**Parameters** + + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | localId | number | Yes| ID of the target OS account.| + | callback | AsyncCallback<[DistributedInfo](#distributedinfo)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the distributed account information obtained. Otherwise, **err** is an error object.| + +**Error codes** + +| ID| Error Message| +| -------- | ------------------- | +| 12300001 | System service exception. | +| 12300003 | Account not found. | + +**Example** + ```js + const accountAbility = account_distributedAccount.getDistributedAccountAbility(); + try { + accountAbility.getOsAccountDistributedInfoByLocalId(100, (err, data) => { + if (err) { + console.log('getOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + } else { + console.log('distributed information: ' + JSON.stringify(data)); + } + }); + } catch (err) { + console.log('getOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + } + ``` + +### getOsAccountDistributedInfoByLocalId10+ + +getOsAccountDistributedInfoByLocalId(localId: number): Promise<DistributedInfo> + +Obtains distributed information about an OS account. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Account.OsAccount + +**Required permissions**: ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + +**Return value** + + | Type| Description| + | -------- | -------- | + | Promise<[DistributedInfo](#distributedinfo)> | Promise used to return the distributed account information obtained.| + +**Error codes** + +| ID| Error Message| +| -------- | ------------------- | +| 12300001 | System service exception. | +| 12300003 | Account not found. | + +**Example** + ```js + const accountAbility = account_distributedAccount.getDistributedAccountAbility(); + try { + accountAbility.getOsAccountDistributedInfoByLocalId(100).then((data) => { + console.log('distributed information: ' + JSON.stringify(data)); + }).catch((err) => { + console.log('getOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + }); + } catch (err) { + console.log('getOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + } + ``` + ### queryOsAccountDistributedInfo(deprecated) queryOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): void @@ -130,9 +213,11 @@ Obtains distributed account information. This API uses an asynchronous callback ```js const accountAbility = account_distributedAccount.getDistributedAccountAbility(); accountAbility.queryOsAccountDistributedInfo((err, data) => { - console.log("queryOsAccountDistributedInfo err: " + JSON.stringify(err)); - console.log('Query account info name: ' + data.name); - console.log('Query account info id: ' + data.id); + if (err) { + console.log('queryOsAccountDistributedInfo exception: ' + JSON.stringify(err)); + } else { + console.log('distributed information: ' + JSON.stringify(data)); + } }); ``` @@ -160,10 +245,9 @@ Obtains distributed account information. This API uses a promise to return the r ```js const accountAbility = account_distributedAccount.getDistributedAccountAbility(); accountAbility.queryOsAccountDistributedInfo().then((data) => { - console.log('Query account info name: ' + data.name); - console.log('Query account info id: ' + data.id); + console.log('distributed information: ' + JSON.stringify(data)); }).catch((err) => { - console.log("queryOsAccountDistributedInfoerr: " + JSON.stringify(err)); + console.log('queryOsAccountDistributedInfo exception: ' + JSON.stringify(err)); }); ``` @@ -198,10 +282,14 @@ Sets the distributed account information. This API uses an asynchronous callback let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; try { accountAbility.setOsAccountDistributedInfo(accountInfo, (err) => { - console.log("setOsAccountDistributedInfo err: " + JSON.stringify(err)); + if (err) { + console.log('setOsAccountDistributedInfo exception: ' + JSON.stringify(err)); + } else { + console.log('setOsAccountDistributedInfo successfully'); + } }); - } catch (e) { - console.log("setOsAccountDistributedInfo exception: " + JSON.stringify(e)); + } catch (err) { + console.log('setOsAccountDistributedInfo exception: ' + JSON.stringify(err)); } ``` @@ -241,14 +329,109 @@ Sets the distributed account information. This API uses a promise to return the let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; try { accountAbility.setOsAccountDistributedInfo(accountInfo).then(() => { - console.log('setOsAccountDistributedInfo Success'); + console.log('setOsAccountDistributedInfo successfully'); }).catch((err) => { - console.log("setOsAccountDistributedInfo err: " + JSON.stringify(err)); + console.log('setOsAccountDistributedInfo exception: ' + JSON.stringify(err)); }); - } catch (e) { - console.log("setOsAccountDistributedInfo exception: " + JSON.stringify(e)); + } catch (err) { + console.log('setOsAccountDistributedInfo exception: ' + JSON.stringify(err)); } ``` +### setOsAccountDistributedInfoByLocalId10+ + +setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: DistributedInfo, callback: AsyncCallback<void>): void + +Sets the distributed information for an OS account. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Account.OsAccount + +**Required permissions**: ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS + +**Parameters** + + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | localId | number | Yes| ID of the target OS account.| + | accountInfo | [DistributedInfo](#distributedinfo) | Yes| Distributed account information to set.| + | callback | AsyncCallback<void> | Yes| Callback invoked to return the result. If the distributed information is set successfully, **err** is **undefined**. Otherwise, **err** is an error object.| + +**Error codes** + +| ID| Error Message| +| -------- | ------------------- | +| 12300001 | System service exception. | +| 12300002 | Invalid distributedInfo. | +| 12300003 | Account identified by localId or by distributedInfo not found. | +| 12300008 | Restricted OS account. | + +**Example** + ```js + const accountAbility = account_distributedAccount.getDistributedAccountAbility(); + let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; + try { + accountAbility.setOsAccountDistributedInfoByLocalId(100, accountInfo, (err) => { + if (err) { + console.log('setOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + } else { + console.log('setOsAccountDistributedInfoByLocalId successfully'); + } + }); + } catch (err) { + console.log('setOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + } + ``` + +### setOsAccountDistributedInfoByLocalId10+ + +setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: DistributedInfo): Promise<void> + +Sets the distributed information for an OS account. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Account.OsAccount + +**Required permissions**: ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS + +**Parameters** + + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | localId | number | Yes| ID of the target OS account.| + | distributedInfo | [DistributedInfo](#distributedinfo) | Yes| Distributed account information to set.| + +**Return value** + + | Type| Description| + | -------- | -------- | + | Promise<void> | Promise that returns no value.| + +**Error codes** + +| ID| Error Message| +| -------- | ------------------- | +| 12300001 | System service exception. | +| 12300002 | Invalid distributedInfo. | +| 12300003 | Account identified by localId or by distributedInfo not found. | +| 12300008 | Restricted OS account. | + +**Example** + ```js + const accountAbility = account_distributedAccount.getDistributedAccountAbility(); + let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; + try { + accountAbility.setOsAccountDistributedInfoByLocalId(100, accountInfo).then(() => { + console.log('setOsAccountDistributedInfoByLocalId successfully'); + }).catch((err) => { + console.log('setOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + }); + } catch (err) { + console.log('setOsAccountDistributedInfoByLocalId exception: ' + JSON.stringify(err)); + } + ``` + ### updateOsAccountDistributedInfo(deprecated) updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback<void>): void @@ -275,7 +458,11 @@ Updates the distributed account information. This API uses an asynchronous callb const accountAbility = account_distributedAccount.getDistributedAccountAbility(); let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; accountAbility.updateOsAccountDistributedInfo(accountInfo, (err) => { - console.log("queryOsAccountDistributedInfo err: " + JSON.stringify(err)); + if (err) { + console.log('queryOsAccountDistributedInfo exception: ' + JSON.stringify(err)); + } else { + console.log('queryOsAccountDistributedInfo successfully'); + } }); ``` @@ -308,22 +495,34 @@ Updates the distributed account information. This API uses a promise to return t const accountAbility = account_distributedAccount.getDistributedAccountAbility(); let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; accountAbility.updateOsAccountDistributedInfo(accountInfo).then(() => { - console.log('updateOsAccountDistributedInfo Success'); + console.log('updateOsAccountDistributedInfo successfully'); }).catch((err) => { - console.log("updateOsAccountDistributedInfo err: " + JSON.stringify(err)); + console.log('updateOsAccountDistributedInfo exception: ' + JSON.stringify(err)); }); ``` ## DistributedInfo -Defines distributed OS account information. +Defines the distributed information about an OS account. + +**System capability**: SystemCapability.Account.OsAccount + +| Name| Type| Read-only| Mandatory| Description| +| -------- | -------- | -------- |-------- | -------- | +| name | string | No|Yes| Name of the distributed account. It must be a non-null string.| +| id | string | No|Yes| UID of the distributed account. It must be a non-null string.| +| event | string | No|Yes| Login state of the distributed account. The state can be login, logout, token invalid, or logoff, which correspond to the following strings respectively:
- Ohos.account.event.LOGIN
- Ohos.account.event.LOGOUT
- Ohos.account.event.TOKEN_INVALID
- Ohos.account.event.LOGOFF | +| nickname9+ | string | No|No| Nickname of the distributed account. By default, no value is passed.| +| avatar9+ | string | No|No| Avatar of the distributed account. By default, no value is passed.| +| status10+ | [DistributedAccountStatus](#distributedaccountstatus10) | Yes|No| Status of the distributed account. The value is of the enumerated type. The default status is unlogged.| +| scalableData8+ | object | No|No| Extended information about the distributed account, passed in key-value (KV) pairs based on service requirements. By default, no value is passed.| + +## DistributedAccountStatus10+ + +Enumerates the statuses of a distributed account. **System capability**: SystemCapability.Account.OsAccount -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| name | string | Yes| Name of the distributed account. It must be a non-null string.| -| id | string | Yes| UID of the distributed account. It must be a non-null string.| -| event | string | Yes| Login state of the distributed account. The state can be login, logout, token invalid, or logoff, which correspond to the following strings respectively:
- Ohos.account.event.LOGIN
- Ohos.account.event.LOGOUT
- Ohos.account.event.TOKEN_INVALID
- Ohos.account.event.LOGOFF | -| nickname9+ | string | No| Nickname of the distributed account. It must be a non-null string.| -| avatar9+ | string | No| Avatar of the distributed account. It must be a non-null string.| -| scalableData8+ | object | No| Extended information about the distributed account, passed in key-value (KV) pairs.
**NOTE**
This parameter is reserved and not used in the setters and getters.| +| Name | Value| Description | +| ---- | ------ | ----------- | +| NOT_LOGGED_IN | 0 | The account has not logged in.| +| LOGGED_IN | 1 | The account has logged in.| diff --git a/en/application-dev/reference/apis/js-apis-distributed-data.md b/en/application-dev/reference/apis/js-apis-distributed-data.md index cd25c298b90c6f59cba4e2d86f79650991eb7ab8..51c73ee6de1bf48c0417819f6bc9cdd8222981f4 100644 --- a/en/application-dev/reference/apis/js-apis-distributed-data.md +++ b/en/application-dev/reference/apis/js-apis-distributed-data.md @@ -3768,7 +3768,7 @@ sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void Synchronizes the KV store manually. > **NOTE** > -> The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. +> **deviceIds** is the **networkId** in [DeviceInfo](js-apis-device-manager.md#deviceinfo), which is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. **Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC @@ -3778,9 +3778,9 @@ Synchronizes the KV store manually. | Name | Type | Mandatory| Description | | --------- | --------------------- | ---- | ---------------------------------------------- | -| deviceIds | string[] | Yes | List of IDs of the devices in the same networking environment to be synchronized.| +| deviceIds | string[] | Yes | List of **networkId**s of the devices in the same networking environment to be synchronized.| | mode | [SyncMode](#syncmode) | Yes | Synchronization mode. | -| delayMs | number | No | Allowed synchronization delay time, in ms. | +| delayMs | number | No | Delay time allowed, in milliseconds. The default value is **0**. | **Example** @@ -3799,7 +3799,7 @@ deviceManager.createDeviceManager('bundleName', (err, value) => { if (devManager != null) { var devices = devManager.getTrustedDeviceListSync(); for (var i = 0; i < devices.length; i++) { - deviceIds[i] = devices[i].deviceId; + deviceIds[i] = devices[i].networkId; } } try { @@ -5246,7 +5246,7 @@ Synchronizes the KV store manually. > **NOTE** > -> The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. +> **deviceIds** is the **networkId** in [DeviceInfo](js-apis-device-manager.md#deviceinfo), which is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. **Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC @@ -5256,7 +5256,7 @@ Synchronizes the KV store manually. | Name | Type| Mandatory | Description | | ----- | ------ | ---- | ----------------------- | -| deviceIds |string[] | Yes |IDs of the devices to be synchronized.| +| deviceIds |string[] | Yes |**networkId**s of the devices to be synchronized.| | mode |[SyncMode](#syncmode) | Yes |Synchronization mode. | | delayMs |number | No |Allowed synchronization delay time, in ms. The default value is **0**. | @@ -5277,7 +5277,7 @@ deviceManager.createDeviceManager('bundleName', (err, value) => { if (devManager != null) { var devices = devManager.getTrustedDeviceListSync(); for (var i = 0; i < devices.length; i++) { - deviceIds[i] = devices[i].deviceId; + deviceIds[i] = devices[i].networkId; } } try { diff --git a/en/application-dev/reference/apis/js-apis-distributedKVStore.md b/en/application-dev/reference/apis/js-apis-distributedKVStore.md index 117afe8d4f70bb034add259da1a09d3b58b680ba..3d2441aa70b66ffb01e9bc19eb0f38156f912e50 100644 --- a/en/application-dev/reference/apis/js-apis-distributedKVStore.md +++ b/en/application-dev/reference/apis/js-apis-distributedKVStore.md @@ -127,7 +127,7 @@ Enumerates the distributed KV store types. | Name | Description | | -------------------- | ------------------------------------------------------------ | -| DEVICE_COLLABORATION | Device KV store.
The device KV store manages data by device, which eliminates conflicts. Data can be queried by device.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore | +| DEVICE_COLLABORATION | Device KV store.
The device KV store manages data by device, which eliminates conflicts. Data can be queried by device.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore| | SINGLE_VERSION | Single KV store.
The single KV store does not differentiate data by device. If entries with the same key are modified on different devices, the value will be overwritten.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | ## SecurityLevel @@ -457,7 +457,7 @@ try { kvStore = store; kvStore = null; store = null; - kvManager.closeKVStore('appId', 'storeId', function (err, data) { + kvManager.closeKVStore('appId', 'storeId', function (err) { if (err != undefined) { console.error(`Failed to close KVStore.code is ${err.code},message is ${err.message}`); return; @@ -568,7 +568,7 @@ try { kvStore = store; kvStore = null; store = null; - kvManager.deleteKVStore('appId', 'storeId', function (err, data) { + kvManager.deleteKVStore('appId', 'storeId', function (err) { if (err != undefined) { console.error(`Failed to delete KVStore.code is ${err.code},message is ${err.message}`); return; @@ -2128,7 +2128,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -2182,8 +2182,8 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting.data=${data}`); + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); }).catch((err) => { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); }); @@ -2239,7 +2239,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; @@ -2311,7 +2311,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (entries) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); kvStore.getEntries('batch_test_string_key').then((entries) => { console.info('Succeeded in getting Entries'); @@ -2372,7 +2372,7 @@ try { v8Arr.push(vb1); v8Arr.push(vb2); v8Arr.push(vb3); - kvStore.putBatch(v8Arr, async function (err, data) { + kvStore.putBatch(v8Arr, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -2434,7 +2434,7 @@ try { v8Arr.push(vb1); v8Arr.push(vb2); v8Arr.push(vb3); - kvStore.putBatch(v8Arr).then(async (data) => { + kvStore.putBatch(v8Arr).then(async () => { console.info(`Succeeded in putting patch`); }).catch((err) => { console.error(`putBatch fail.code is ${err.code},message is ${err.message}`); @@ -2480,13 +2480,13 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; } console.info('Succeeded in putting'); - kvStore.delete(KEY_TEST_STRING_ELEMENT, function (err, data) { + kvStore.delete(KEY_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to delete.code is ${err.code},message is ${err.message}`); return; @@ -2540,9 +2540,9 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting: ${data}`); - kvStore.delete(KEY_TEST_STRING_ELEMENT).then((data) => { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); + kvStore.delete(KEY_TEST_STRING_ELEMENT).then(() => { console.info('Succeeded in deleting'); }).catch((err) => { console.error(`Failed to delete.code is ${err.code},message is ${err.message}`); @@ -2595,13 +2595,13 @@ try { let predicates = new dataSharePredicates.DataSharePredicates(); let arr = ["name"]; predicates.inKeys(arr); - kvStore.put("name", "bob", function (err, data) { + kvStore.put("name", "bob", function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; } console.info("Succeeded in putting"); - kvStore.delete(predicates, function (err, data) { + kvStore.delete(predicates, function (err) { if (err == undefined) { console.info('Succeeded in deleting'); } else { @@ -2660,9 +2660,9 @@ try { let predicates = new dataSharePredicates.DataSharePredicates(); let arr = ["name"]; predicates.inKeys(arr); - kvStore.put("name", "bob").then((data) => { - console.info(`Succeeded in putting: ${data}`); - kvStore.delete(predicates).then((data) => { + kvStore.put("name", "bob").then(() => { + console.info(`Succeeded in putting data`); + kvStore.delete(predicates).then(() => { console.info('Succeeded in deleting'); }).catch((err) => { console.error(`Failed to delete.code is ${err.code},message is ${err.message}`); @@ -2724,13 +2724,13 @@ try { keys.push(key + i); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; } console.info('Succeeded in putting Batch'); - kvStore.deleteBatch(keys, async function (err, data) { + kvStore.deleteBatch(keys, async function (err) { if (err != undefined) { console.error(`Failed to delete Batch.code is ${err.code},message is ${err.message}`); return; @@ -2797,9 +2797,9 @@ try { keys.push(key + i); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (data) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); - kvStore.deleteBatch(keys).then((err) => { + kvStore.deleteBatch(keys).then(() => { console.info('Succeeded in deleting Batch'); }).catch((err) => { console.error(`Failed to delete Batch.code is ${err.code},message is ${err.message}`); @@ -2845,10 +2845,10 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-002'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err) { console.info('Succeeded in putting data'); const deviceid = 'no_exist_device_id'; - kvStore.removeDeviceData(deviceid, async function (err, data) { + kvStore.removeDeviceData(deviceid, async function (err) { if (err == undefined) { console.info('succeeded in removing device data'); } else { @@ -2902,13 +2902,13 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-001'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((err) => { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { console.info('Succeeded in putting data'); }).catch((err) => { console.error(`Failed to put data.code is ${err.code},message is ${err.message} `); }); const deviceid = 'no_exist_device_id'; - kvStore.removeDeviceData(deviceid).then((err) => { + kvStore.removeDeviceData(deviceid).then(() => { console.info('succeeded in removing device data'); }).catch((err) => { console.error(`Failed to remove device data.code is ${err.code},message is ${err.message} `); @@ -2954,7 +2954,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -3009,8 +3009,8 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting data.data=${data}`); + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); kvStore.get(KEY_TEST_STRING_ELEMENT).then((data) => { console.info(`Succeeded in getting data.data=${data}`); }).catch((err) => { @@ -3065,7 +3065,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; @@ -3132,7 +3132,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (entries) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); kvStore.getEntries('batch_test_string_key').then((entries) => { console.info('Succeeded in getting Entries'); @@ -3190,7 +3190,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -3256,7 +3256,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -3317,7 +3317,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -3330,7 +3330,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -3391,7 +3391,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -3402,7 +3402,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -3454,7 +3454,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -3522,7 +3522,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -3583,7 +3583,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -3643,7 +3643,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -3673,7 +3673,7 @@ Closes the **KVStoreResultSet** object returned by [SingleKvStore.getResultSet]( ```js try { let resultSet = null; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err == undefined) { console.info('Succeeded in closing result set'); } else { @@ -3760,7 +3760,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -3822,7 +3822,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -3867,11 +3867,11 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js let file = "BK001"; try { - kvStore.backup(file, (err, data) => { + kvStore.backup(file, function(err) => { if (err) { console.error(`Failed to backup.code is ${err.code},message is ${err.message} `); } else { - console.info(`Succeeded in backupping data.data=${data}`); + console.info(`Succeeded in backupping data`); } }); } catch (e) { @@ -3912,8 +3912,8 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js let file = "BK001"; try { - kvStore.backup(file).then((data) => { - console.info(`Succeeded in backupping data.data=${data}`); + kvStore.backup(file).then(() => { + console.info(`Succeeded in backupping data`); }).catch((err) => { console.error(`Failed to backup.code is ${err.code},message is ${err.message}`); }); @@ -3950,11 +3950,11 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js let file = "BK001"; try { - kvStore.restore(file, (err, data) => { + kvStore.restore(file, (err) => { if (err) { console.error(`Failed to restore.code is ${err.code},message is ${err.message}`); } else { - console.info(`Succeeded in restoring data.data=${data}`); + console.info(`Succeeded in restoring data`); } }); } catch (e) { @@ -3995,8 +3995,8 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js let file = "BK001"; try { - kvStore.restore(file).then((data) => { - console.info(`Succeeded in restoring data.data=${data}`); + kvStore.restore(file).then(() => { + console.info(`Succeeded in restoring data`); }).catch((err) => { console.error(`Failed to restore.code is ${err.code},message is ${err.message}`); }); @@ -4124,7 +4124,7 @@ try { console.info(`startTransaction 0 ${data}`); count++; }); - kvStore.startTransaction(async function (err, data) { + kvStore.startTransaction(async function (err) { if (err != undefined) { console.error(`Failed to start Transaction.code is ${err.code},message is ${err.message}`); return; @@ -4132,7 +4132,7 @@ try { console.info('Succeeded in starting Transaction'); let entries = putBatchString(10, 'batch_test_string_key'); console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -4182,7 +4182,7 @@ try { console.info(`startTransaction 0 ${data}`); count++; }); - kvStore.startTransaction().then(async (err) => { + kvStore.startTransaction().then(async () => { console.info('Succeeded in starting Transaction'); }).catch((err) => { console.error(`Failed to start Transaction.code is ${err.code},message is ${err.message}`); @@ -4218,7 +4218,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js try { - kvStore.commit(function (err, data) { + kvStore.commit(function (err) { if (err == undefined) { console.info('Succeeded in committing'); } else { @@ -4256,7 +4256,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js try { - kvStore.commit().then(async (err) => { + kvStore.commit().then(async () => { console.info('Succeeded in committing'); }).catch((err) => { console.error(`Failed to commit.code is ${err.code},message is ${err.message}`); @@ -4292,7 +4292,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js try { - kvStore.rollback(function (err,data) { + kvStore.rollback(function (err) { if (err == undefined) { console.info('Succeeded in rolling back'); } else { @@ -4330,7 +4330,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err ```js try { - kvStore.rollback().then(async (err) => { + kvStore.rollback().then(async () => { console.info('Succeeded in rolling back'); }).catch((err) => { console.error(`Failed to rollback.code is ${err.code},message is ${err.message}`); @@ -4359,7 +4359,7 @@ Sets data synchronization, which can be enabled or disabled. This API uses an as ```js try { - kvStore.enableSync(true, function (err, data) { + kvStore.enableSync(true, function (err) { if (err == undefined) { console.info('Succeeded in enabling sync'); } else { @@ -4395,7 +4395,7 @@ Sets data synchronization, which can be enabled or disabled. This API uses a pro ```js try { - kvStore.enableSync(true).then((err) => { + kvStore.enableSync(true).then(() => { console.info('Succeeded in enabling sync'); }).catch((err) => { console.error(`Failed to enable sync.code is ${err.code},message is ${err.message}`); @@ -4427,7 +4427,7 @@ Sets the data synchronization range. This API uses an asynchronous callback to r try { const localLabels = ['A', 'B']; const remoteSupportLabels = ['C', 'D']; - kvStore.setSyncRange(localLabels, remoteSupportLabels, function (err, data) { + kvStore.setSyncRange(localLabels, remoteSupportLabels, function (err) { if (err != undefined) { console.error(`Failed to set syncRange.code is ${err.code},message is ${err.message}`); return; @@ -4466,7 +4466,7 @@ Sets the data synchronization range. This API uses a promise to return the resul try { const localLabels = ['A', 'B']; const remoteSupportLabels = ['C', 'D']; - kvStore.setSyncRange(localLabels, remoteSupportLabels).then((err) => { + kvStore.setSyncRange(localLabels, remoteSupportLabels).then(() => { console.info('Succeeded in setting syncRange'); }).catch((err) => { console.error(`Failed to set syncRange.code is ${err.code},message is ${err.message}`); @@ -4496,7 +4496,7 @@ Sets the default delay allowed for KV store synchronization. This API uses an as ```js try { const defaultAllowedDelayMs = 500; - kvStore.setSyncParam(defaultAllowedDelayMs, function (err, data) { + kvStore.setSyncParam(defaultAllowedDelayMs, function (err) { if (err != undefined) { console.error(`Failed to set syncParam.code is ${err.code},message is ${err.message}`); return; @@ -4533,7 +4533,7 @@ Sets the default delay allowed for KV store synchronization. This API uses a pro ```js try { const defaultAllowedDelayMs = 500; - kvStore.setSyncParam(defaultAllowedDelayMs).then((err) => { + kvStore.setSyncParam(defaultAllowedDelayMs).then(() => { console.info('Succeeded in setting syncParam'); }).catch((err) => { console.error(`Failed to set syncParam.code is ${err.code},message is ${err.message}`); @@ -4550,7 +4550,7 @@ sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void Synchronizes the KV store manually. For details about the synchronization modes of KV stores, see [Cross-Device Synchronization of KV Stores](../../database/data-sync-of-kv-store.md). > **NOTE** > -> The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. +> **deviceIds** is the **networkId** in [DeviceInfo](js-apis-device-manager.md#deviceinfo), which is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. **Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC @@ -4560,7 +4560,7 @@ Synchronizes the KV store manually. For details about the synchronization modes | Name | Type | Mandatory| Description | | --------- | --------------------- | ---- | ---------------------------------------------- | -| deviceIds | string[] | Yes | List of IDs of the devices in the same networking environment to be synchronized.| +| deviceIds | string[] | Yes | List of **networkId**s of the devices in the same networking environment to be synchronized.| | mode | [SyncMode](#syncmode) | Yes | Synchronization mode. | | delayMs | number | No | Allowed synchronization delay time, in ms. The default value is **0**. | @@ -4589,14 +4589,14 @@ deviceManager.createDeviceManager('bundleName', (err, value) => { if (devManager != null) { var devices = devManager.getTrustedDeviceListSync(); for (var i = 0; i < devices.length; i++) { - deviceIds[i] = devices[i].deviceId; + deviceIds[i] = devices[i].networkId; } } try { kvStore.on('syncComplete', function (data) { console.info('Sync dataChange'); }); - kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to sync.code is ${err.code},message is ${err.message}`); return; @@ -4619,7 +4619,7 @@ sync(deviceIds: string[], query: Query, mode: SyncMode, delayMs?: number): void Synchronizes the KV store manually. This API returns the result synchronously. For details about the synchronization modes of KV stores, see [Cross-Device Synchronization of KV Stores](../../database/data-sync-of-kv-store.md). > **NOTE** > -> The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. +> **deviceIds** is the **networkId** in [DeviceInfo](js-apis-device-manager.md#deviceinfo), which is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. **Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC @@ -4629,7 +4629,7 @@ Synchronizes the KV store manually. This API returns the result synchronously. F | Name | Type | Mandatory| Description | | --------- | --------------------- | ---- | ---------------------------------------------- | -| deviceIds | string[] | Yes | List of IDs of the devices in the same networking environment to be synchronized.| +| deviceIds | string[] | Yes | List of **networkId**s of the devices in the same networking environment to be synchronized.| | mode | [SyncMode](#syncmode) | Yes | Synchronization mode. | | query | [Query](#query) | Yes | **Query** object to match. | | delayMs | number | No | Allowed synchronization delay time, in ms. The default value is **0**.| @@ -4659,14 +4659,14 @@ deviceManager.createDeviceManager('bundleName', (err, value) => { if (devManager != null) { var devices = devManager.getTrustedDeviceListSync(); for (var i = 0; i < devices.length; i++) { - deviceIds[i] = devices[i].deviceId; + deviceIds[i] = devices[i].networkId; } } try { kvStore.on('syncComplete', function (data) { console.info('Sync dataChange'); }); - kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to sync.code is ${err.code},message is ${err.message}`); return; @@ -4735,7 +4735,7 @@ Subscribes to synchronization complete events. | Name | Type | Mandatory| Description | | ------------ | --------------------------------------------- | ---- | ------------------------------------------------------ | | event | string | Yes | Event to subscribe to. The value is **syncComplete**, which indicates a synchronization complete event.| -| syncCallback | Callback<Array<[string, number]>> | Yes | Callback invoked to return the synchronization complete event.| +| syncCallback | Callback<Array<[string, number]>> | Yes | Callback invoked to return the synchronization complete event. | **Example** @@ -4746,7 +4746,7 @@ try { kvStore.on('syncComplete', function (data) { console.info(`syncComplete ${data}`); }); - kvStore.put(KEY_TEST_FLOAT_ELEMENT, VALUE_TEST_FLOAT_ELEMENT).then((data) => { + kvStore.put(KEY_TEST_FLOAT_ELEMENT, VALUE_TEST_FLOAT_ELEMENT).then(() => { console.info('succeeded in putting'); }).catch((err) => { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); @@ -4969,7 +4969,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -5024,8 +5024,8 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting data.data=${data}`); + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); kvStore.get(KEY_TEST_STRING_ELEMENT).then((data) => { console.info(`Succeeded in getting data.data=${data}`); }).catch((err) => { @@ -5075,7 +5075,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-002'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -5135,7 +5135,7 @@ For details about the error codes, see [Distributed KV Store Error Codes](../err const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-002'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(async (data) => { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(async () => { console.info('Succeeded in putting'); kvStore.get('localDeviceId', KEY_TEST_STRING_ELEMENT).then((data) => { console.info('Succeeded in getting'); @@ -5191,7 +5191,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; @@ -5258,7 +5258,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (entries) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); kvStore.getEntries('batch_test_string_key').then((entries) => { console.info('Succeeded in getting Entries'); @@ -5320,7 +5320,7 @@ try { entries.push(entry); } console.info(`entries : ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5392,7 +5392,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); kvStore.getEntries('localDeviceId', 'batch_test_string_key').then((entries) => { console.info('Succeeded in getting entries'); @@ -5453,7 +5453,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -5519,7 +5519,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -5584,7 +5584,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5661,7 +5661,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); var query = new distributedKVStore.Query(); query.deviceId('localDeviceId'); @@ -5722,7 +5722,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5735,7 +5735,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -5796,7 +5796,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -5807,7 +5807,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -5859,7 +5859,7 @@ try { } console.info('Succeeded in getting resultSet'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); return; @@ -5918,7 +5918,7 @@ try { }).catch((err) => { console.error(`Failed to get resultSet.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing resultSet'); }).catch((err) => { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); @@ -5975,7 +5975,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5990,7 +5990,7 @@ try { } console.info('Succeeded in getting resultSet'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); return; @@ -6056,7 +6056,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -6071,7 +6071,7 @@ try { }); query.deviceId('localDeviceId'); console.info("GetResultSet " + query.getSqlLike()); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing resultSet'); }).catch((err) => { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); @@ -6129,7 +6129,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -6194,7 +6194,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -6209,7 +6209,7 @@ try { } console.info('Succeeded in getting resultSet'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); return; @@ -6266,7 +6266,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -6326,7 +6326,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -6384,7 +6384,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -6449,7 +6449,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -6499,7 +6499,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -6561,7 +6561,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -6623,7 +6623,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -6695,7 +6695,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); diff --git a/en/application-dev/reference/apis/js-apis-hisysevent.md b/en/application-dev/reference/apis/js-apis-hisysevent.md index b61207a81a9be58f9b8b405535e118757218529e..a22ad94185be68c527e40162d8409d2623b4cd8a 100644 --- a/en/application-dev/reference/apis/js-apis-hisysevent.md +++ b/en/application-dev/reference/apis/js-apis-hisysevent.md @@ -3,6 +3,7 @@ The **hiSysEvent** module provides the system event logging functions, such as configuring trace points, subscribing to system events, and querying system events written to the event file. > **NOTE** +> > - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. > - The APIs provided by this module are system APIs. @@ -312,6 +313,8 @@ Defines arguments for an event query. | beginTime | number | Yes| Start time (13-digit timestamp) for the event query.| | endTime | number | Yes| End time (13-digit timestamp) for the event query.| | maxEvents | number | Yes| Maximum number of events that can be queried.| +| fromSeq10+ | number | No | Start SN of the events to be queried. The default value is **-1**.| +| toSeq10+ | number | No | End SN of the system events to be queried. The default value is **-1**.| ## QueryRule @@ -323,6 +326,7 @@ Defines event query rules. | -------- | -------- | -------- | -------- | | domain | string | Yes| Event domain.| | names | string[] | Yes| Array of event names. A **QueryRule** object contains multiple system event names.| +| condition10+ | string | No| Additional event conditions. The value of this parameter is in the format of {"version":"V1","condition":{"and":[{"param":"*Parameter*","op":"*Operator*","value":"*Comparison value*"}]}}.| ## Querier @@ -403,3 +407,197 @@ try { console.error(`error code: ${error.code}, error msg: ${error.message}`); } ``` + +## hiSysEvent.exportSysEvents10+ + +exportSysEvents(queryArg: QueryArg, rules: QueryRule[]): number + +Exports system events in batches and writes them as a file to the fixed directory of the application sandbox (that is, **/data/storage/el2/base/cache/hiview/event/**). + +**Required permission**: ohos.permission.READ_DFX_SYSEVENT + +**System capability**: SystemCapability.HiviewDFX.HiSysEvent + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------------------------- | ---- | ------------------------------------------ | +| queryArg | [QueryArg](#queryarg) | Yes | Event query parameters for the export. | +| rules | [QueryRule](#queryrule)[] | Yes | Array of event query rules for the export.| + +**Return value** + +| Type | Description | +| ------ | ---------------- | +| number | API call timestamp.| + +**Error codes** + +For details about the error codes, see [HiSysEvent Error Codes](../errorcodes/errorcode-hisysevent.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 11200301 | Count of query rules is over limit. | +| 11200302 | Invalid query rule. | +| 11200304 | Export frequency is over limit. | + +**Example** + +``` +import hiSysEvent from '@ohos.hiSysEvent'; +import fs from '@ohos.file.fs'; + +try { + hiSysEvent.write({ + domain: "RELIABILITY", + name: "STACK", + eventType: hiSysEvent.EventType.FAULT, + params: { + PID: 487, + UID: 103, + PACKAGE_NAME: "com.ohos.hisysevent.test", + PROCESS_NAME: "syseventservice", + MSG: "no msg." + } + }, (err, val) => { + // do something here. + }) + + let time = hiSysEvent.exportSysEvents({ + beginTime: -1, + endTime: -1, + maxEvents: 1, + }, [{ + domain: "RELIABILITY", + names: ["STACK"], + }]) + console.log(`receive export task time is : ${time}`); + + // Postpone reading of exported events. + setTimeout(function() { + let eventDir = '/data/storage/el2/base/cache/hiview/event'; + let filenames = fs.listFileSync(eventDir); + for (let i = 0; i < filenames.length; i++) { + if (filenames[i].indexOf(time.toString()) != -1) { + let res = fs.readTextSync(eventDir + '/' + filenames[i]); + let events = JSON.parse('[' + res.slice(0, res.length - 1) + ']'); + console.log("read file end, events is :" + JSON.stringify(events)); + } + } + }, 10000) +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## hiSysEvent.subscribe10+ + +subscribe(rules: QueryRule[]): number + +Subscribes to real-time system events that occur occasionally or occur in a low frequency. These events are written as a file to the fixed directory of the application sandbox (that is, **/data/storage/el2/base/cache/hiview/event/**). + +**Required permission**: ohos.permission.READ_DFX_SYSEVENT + +**System capability**: SystemCapability.HiviewDFX.HiSysEvent + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ------------------------- | ---- | ------------------------------------------ | +| rules | [QueryRule](#queryrule)[] | Yes | Array of event query rules for the subscription.| + +**Return value** + +| Type | Description | +| ------ | ---------------- | +| number | API call timestamp.| + +**Error codes** + +For details about the error codes, see [HiSysEvent Error Codes](../errorcodes/errorcode-hisysevent.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 11200301 | Count of query rules is over limit. | +| 11200302 | Invalid query rule. | + +**Example** + +``` +import hiSysEvent from '@ohos.hiSysEvent'; +import fs from '@ohos.file.fs'; + +try { + hiSysEvent.subscribe([{ + domain: "RELIABILITY", + names: ["STACK"], + },{ + domain: "BUNDLE_MANAGER", + names: ["BUNDLE_UNINSTALL"], + }]) + hiSysEvent.write({ + domain: "RELIABILITY", + name: "STACK", + eventType: hiSysEvent.EventType.FAULT, + params: { + PID: 487, + UID: 103, + PACKAGE_NAME: "com.ohos.hisysevent.test", + PROCESS_NAME: "syseventservice", + MSG: "no msg." + } + }, (err, val) => { + // do something here. + }) + + // Postpone reading of subscribed events. + setTimeout(function() { + let eventDir = '/data/storage/el2/base/cache/hiview/event'; + let filenames = fs.listFileSync(eventDir); + for (let i = 0; i < filenames.length; i++) { + let res = fs.readTextSync(eventDir + '/' + filenames[i]); + let events = JSON.parse('[' + res.slice(0, res.length - 1) + ']'); + console.log("read file end, events is :" + JSON.stringify(events)); + } + }, 10000) +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## hiSysEvent.unsubscribe10+ + +unsubscribe(): void + +Unsubscribes from system events. + +**Required permission**: ohos.permission.READ_DFX_SYSEVENT + +**System capability**: SystemCapability.HiviewDFX.HiSysEvent + +**Error codes** + +For details about the error codes, see [HiSysEvent Error Codes](../errorcodes/errorcode-hisysevent.md). + +| ID| Error Message | +| -------- | ------------------- | +| 11200305 | Unsubscribe failed. | + +**Example** + +``` +import hiSysEvent from '@ohos.hiSysEvent'; + +try { + hiSysEvent.subscribe([{ + domain: "RELIABILITY", + names: ["STACK"], + },{ + domain: "BUNDLE_MANAGER", + names: ["BUNDLE_UNINSTALL","BUNDLE_INSTALL"], + }]) + hiSysEvent.unsubscribe(); +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` diff --git a/en/application-dev/reference/apis/js-apis-http.md b/en/application-dev/reference/apis/js-apis-http.md index 9f49f9bb61eda42dfc3232ac545f6d080aa3758e..43c785c8741fae614d2d77b6c88829f4b62c58ab 100644 --- a/en/application-dev/reference/apis/js-apis-http.md +++ b/en/application-dev/reference/apis/js-apis-http.md @@ -16,7 +16,7 @@ import http from '@ohos.net.http'; ## Examples ```js -// Import the http namespace. +// Import the HTTP namespace. import http from '@ohos.net.http'; // Each httpRequest corresponds to an HTTP request task and cannot be reused. @@ -35,17 +35,17 @@ httpRequest.request( header: { 'Content-Type': 'application/json' }, - // This parameter is used to transfer data when the POST request is used. + // This field is used to transfer data when the POST request is used. extraData: { "data": "data to send", }, - expectDataType: http.HttpDataType.STRING, // Optional. This parameter specifies the type of the return data. + expectDataType: http.HttpDataType.STRING, // Optional. This field specifies the type of the return data. usingCache: true, // Optional. The default value is true. priority: 1, // Optional. The default value is 1. connectTimeout: 60000 // Optional. The default value is 60000, in ms. readTimeout: 60000, // Optional. The default value is 60000, in ms. usingProtocol: http.HttpProtocol.HTTP1_1, // Optional. The default protocol type is automatically specified by the system. - usingProxy: false, // Optional. By default, network proxy is not used. This field is supported since API version 10. + usingProxy: false, // Optional. By default, network proxy is not used. This field is supported since API 10. caPath: "", // Optional. The preset CA certificate is used by default. This field is supported since API version 10. }, (err, data) => { if (!err) { @@ -55,6 +55,8 @@ httpRequest.request( // data.header carries the HTTP response header. Parse the content based on service requirements. console.info('header:' + JSON.stringify(data.header)); console.info('cookies:' + JSON.stringify(data.cookies)); // 8+ + // Call the destroy() method to release resources after HttpRequest is complete. + httpRequest.destroy(); } else { console.info('error:' + JSON.stringify(err)); // Unsubscribe from HTTP Response Header events. @@ -73,7 +75,7 @@ httpRequest.request( createHttp(): HttpRequest -Creates an HTTP request. You can use this API to initiate or destroy an HTTP request, or enable or disable listening for HTTP Response Header events. An **HttpRequest** object corresponds to an HTTP request. To initiate multiple HTTP requests, you must create an **HttpRequest** object for each HTTP request. +Creates an HTTP request. You can use this API to initiate or destroy an HTTP request, or enable or disable listening for HTTP Response Header events. An HttpRequest object corresponds to an HTTP request. To initiate multiple HTTP requests, you must create an **HttpRequest** object for each HTTP request. **System capability**: SystemCapability.Communication.NetStack @@ -432,7 +434,7 @@ httpRequest.request2("EXAMPLE_URL", (err, data) => { request2(url: string, options: HttpRequestOptions, callback: AsyncCallback\): void -Initiates an HTTP request containing specified options to a given URL. This API uses an asynchronous callback to return the result, which is a streaming response. +Initiates an HTTP request to a given URL. This API uses an asynchronous callback to return the result, which is a streaming response. **Required permissions**: ohos.permission.INTERNET @@ -567,7 +569,7 @@ Initiates an HTTP request containing specified options to a given URL. This API > **NOTE** > For details about the error codes, see [HTTP Error Codes](../errorcodes/errorcode-net-http.md). -> The HTTP error code mapping is in the format of 2300000 + Curl error code. For more common error codes, see [Curl Error Codes](https://curl.se/libcurl/c/libcurl-errors.html). +> The HTTP error code mapping is in the format of 2300000 + Curl error code. For more common error codes, see: **Example** @@ -594,7 +596,7 @@ on(type: 'headerReceive', callback: AsyncCallback\): void Registers an observer for HTTP Response Header events. > **NOTE** -> This API has been deprecated. You are advised to use [on('headersReceive')8+](#onheadersreceive8). +> This API has been deprecated. You are advised to use [on('headersReceive')8+](#onheadersreceive8) instead. **System capability**: SystemCapability.Communication.NetStack @@ -621,7 +623,7 @@ Unregisters the observer for HTTP Response Header events. > **NOTE** > ->1. This API has been deprecated. You are advised to use [off('headersReceive')8+](#offheadersreceive8). +>1. This API has been deprecated. You are advised to use [off('headersReceive')8+](#offheadersreceive8) instead. > >2. You can pass the callback of the **on** function if you want to cancel listening for a certain type of event. If you do not pass the callback, you will cancel listening for all events. @@ -817,7 +819,7 @@ Registers an observer for events indicating progress of receiving HTTP streaming | Name | Type | Mandatory| Description | | -------- | ----------------------- | ---- | --------------------------------- | | type | string | Yes | Event type. The value is **dataProgress**.| -| callback | AsyncCallback\<{ receiveSize: number, totalSize: number }\> | Yes | Callback used to return the result.
- **receiveSize**: number of received bytes.
- **totalSize**: total number of bytes to be received.| +| callback | AsyncCallback\<{ receiveSize: number, totalSize: number }\> | Yes | Callback used to return the result.
**receiveSize**: number of received bytes.
**totalSize**: total number of bytes to be received.| **Example** @@ -860,7 +862,7 @@ Specifies the type and value range of the optional parameters in the HTTP reques | Name | Type | Mandatory| Description | | -------------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | | method | [RequestMethod](#requestmethod) | No | Request method. The default value is **GET**. | -| extraData | string6+ \| Object6+ \| ArrayBuffer8+ | No | Additional data for sending a request. This parameter is not used by default.
- If the HTTP request uses a POST or PUT method, this parameter serves as the content of the HTTP request and is encoded in UTF-8 format. If **'Content-Type'** is **'application/x-www-form-urlencoded'**, the data in the request body must be encoded in the format of **key1=value1&key2=value2&key3=value3** after URL transcoding.6+
- If the HTTP request uses the GET, OPTIONS, DELETE, TRACE, or CONNECT method, this parameter serves as a supplement to HTTP request parameters. Parameters of the string type need to be encoded before being passed to the HTTP request. Parameters of the object type do not need to be precoded and will be directly concatenated to the URL. Parameters of the ArrayBuffer type will not be concatenated to the URL.6+ | +| extraData | string6+ \| Object6+ \| ArrayBuffer8+ | No | Additional data for sending a request. This parameter is not used by default.
- If the HTTP request uses a POST or PUT method, this parameter serves as the content of the HTTP request and is encoded in UTF-8 format. If **'Content-Type'** is **'application/x-www-form-urlencoded'**, the data in the request body must be encoded in the format of **key1=value1&key2=value2&key3=value3** after URL transcoding.
- If the HTTP request uses the GET, OPTIONS, DELETE, TRACE, or CONNECT method, this parameter serves as a supplement to HTTP request parameters. Parameters of the string type need to be encoded before being passed to the HTTP request. Parameters of the object type do not need to be precoded and will be directly concatenated to the URL. Parameters of the ArrayBuffer type will not be concatenated to the URL.| | expectDataType9+ | [HttpDataType](#httpdatatype9) | No | Type of the returned data. This parameter is not used by default. If this parameter is set, the system returns the specified type of data preferentially.| | usingCache9+ | boolean | No | Whether to use the cache. The default value is **true**. | | priority9+ | number | No | Priority. The value range is [1,1000]. The default value is **1**. | @@ -896,7 +898,7 @@ Enumerates the response codes for an HTTP request. | Name | Value | Description | | ----------------- | ---- | ------------------------------------------------------------ | -| OK | 200 | The request is successful. The request has been processed successfully. This return code is generally used for GET and POST requests. | +| OK | 200 | "OK." The request has been processed successfully. This return code is generally used for GET and POST requests. | | CREATED | 201 | "Created." The request has been successfully sent and a new resource is created. | | ACCEPTED | 202 | "Accepted." The request has been accepted, but the processing has not been completed. | | NOT_AUTHORITATIVE | 203 | "Non-Authoritative Information." The request is successful. | diff --git a/en/application-dev/reference/apis/js-apis-huks.md b/en/application-dev/reference/apis/js-apis-huks.md index 085a1da52c3b233db29b04738eeea3bb8e532594..11c2f8d4ea97dbc0149b68b6eea7b873ba8eeefb 100644 --- a/en/application-dev/reference/apis/js-apis-huks.md +++ b/en/application-dev/reference/apis/js-apis-huks.md @@ -77,6 +77,25 @@ Generates a key. This API uses an asynchronous callback to return the result. | options | [HuksOptions](#huksoptions) | Yes | Tags required for generating the key. The algorithm, key purpose, and key length are mandatory.| | callback | AsyncCallback\ | Yes | Callback invoked to return the result. If no error is captured, the key is successfully generated. In this case, the API does not return the key content because the key is always protected in a TEE. If an error is captured, an exception occurs in the generation process.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000012 | external error. | +| 12000013 | queried credential does not exist. | +| 12000014 | memory is insufficient. | +| 12000015 | call service failed. | + **Example** ```js @@ -132,6 +151,25 @@ Generates a key. This API uses a promise to return the result. Because the key i | keyAlias | string | Yes | Alias of the key. | | options | [HuksOptions](#huksoptions) | Yes | Tags required for generating the key. The algorithm, key purpose, and key length are mandatory.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000012 | external error. | +| 12000013 | queried credential does not exist. | +| 12000014 | memory is insufficient. | +| 12000015 | call service failed. | + **Example** ```js @@ -188,6 +226,20 @@ Deletes a key. This API uses an asynchronous callback to return the result. | options | [HuksOptions](#huksoptions) | Yes | Empty object (leave this parameter empty). | | callback | AsyncCallback\ | Yes | Callback invoked to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -224,6 +276,20 @@ Deletes a key. This API uses a promise to return the result. | keyAlias | string | Yes | Key alias passed in when the key was generated.| | options | [HuksOptions](#huksoptions) | Yes | Empty object (leave this parameter empty). | +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -291,6 +357,26 @@ Imports a key in plaintext. This API uses an asynchronous callback to return the | options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and key to import. The algorithm, key purpose, and key length are mandatory.| | callback | AsyncCallback\ | Yes | Callback invoked to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000013 | queried credential does not exist. | +| 12000014 | memory is insufficient. | +| 12000015 | call service failed. | + **Example** ```js @@ -358,6 +444,26 @@ Imports a key in plaintext. This API uses a promise to return the result. | keyAlias | string | Yes | Alias of the key. | | options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and key to import. The algorithm, key purpose, and key length are mandatory.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000013 | queried credential does not exist. | +| 12000014 | memory is insufficient. | +| 12000015 | call service failed. | + **Example** ```js @@ -428,6 +534,25 @@ Obtains the certificate used to verify a key. This API uses an asynchronous call | options | [HuksOptions](#huksoptions) | Yes | Parameters and data required for obtaining the certificate. | | callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 201 | check permission failed. | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -555,6 +680,25 @@ Obtains the certificate used to verify a key. This API uses a promise to return | ---------------------------------------------- | --------------------------------------------- | | Promise<[HuksReturnResult](#huksreturnresult9)> | Promise used to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 201 | check permission failed. | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -678,6 +822,26 @@ Imports a wrapped key. This API uses an asynchronous callback to return the resu | options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and the wrapped key to import. The algorithm, key purpose, and key length are mandatory.| | callback | AsyncCallback\ | Yes | Callback invoked to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000013 | queried credential does not exist. | +| 12000014 | memory is insufficient. | +| 12000015 | call service failed. | + **Example** ```js @@ -893,6 +1057,26 @@ Imports a wrapped key. This API uses a promise to return the result. | wrappingKeyAlias | string | Yes | Alias of the data used to unwrap the key imported. | | options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and the wrapped key to import. The algorithm, key purpose, and key length are mandatory.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000013 | queried credential does not exist. | +| 12000014 | memory is insufficient. | +| 12000015 | call service failed. | + **Example** ```js @@ -928,6 +1112,24 @@ Exports a key. This API uses an asynchronous callback to return the result. | options | [HuksOptions](#huksoptions) | Yes | Empty object (leave this parameter empty). | | callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned. **outData** contains the public key exported.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -970,6 +1172,24 @@ Exports a key. This API uses a promise to return the result. | ---------------------------------------------- | ------------------------------------------------------------ | | Promise<[HuksReturnResult](#huksreturnresult9)> | Promise used to return the result. If the operation is successful, no **err** value is returned and **outData** contains the public key exported. If the operation fails, an error code is returned. | +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -1007,6 +1227,24 @@ Obtains key properties. This API uses an asynchronous callback to return the res | options | [HuksOptions](#huksoptions) | Yes | Empty object (leave this parameter empty). | | callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the result. If the operation is successful, no **err** value is returned and **properties** contains the parameters required for generating the key. If the operation fails, an error code is returned. | +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -1049,6 +1287,24 @@ Obtains key properties. This API uses a promise to return the result. | ----------------------------------------------- | ------------------------------------------------------------ | | Promise\<[HuksReturnResult](#huksreturnresult9)> | Promise used to return the result. If the operation is successful, no **err** value is returned and **properties** contains the parameters required for generating the key. If the operation fails, an error code is returned. | +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -1086,9 +1342,28 @@ Checks whether a key exists. This API uses an asynchronous callback to return th | options | [HuksOptions](#huksoptions) | Yes | Empty object (leave this parameter empty). | | callback | AsyncCallback\ | Yes | Callback invoked to return the result. If the key exists, **data** is **true**. If the key does not exist, **error** is the error code.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js +import huks from '@ohos.security.huks'; +import promptAction from '@ohos.promptAction'; + /* Set options to emptyOptions. */ let keyAlias = 'keyAlias'; let emptyOptions = { @@ -1130,9 +1405,28 @@ Checks whether a key exists. This API uses a promise to return the result. | ----------------- | --------------------------------------- | | Promise\ | Promise used to return the result. If the key exists, then() performs subsequent operations. If the key does not exist, error() performs the related service operations.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js +import huks from '@ohos.security.huks'; +import promptAction from '@ohos.promptAction'; + /* Set options to emptyOptions. */ let keyAlias = 'keyAlias'; let emptyOptions = { @@ -1167,6 +1461,25 @@ Initializes the data for a key operation. This API uses an asynchronous callback | options | [HuksOptions](#huksoptions) | Yes | Parameter set used for the **initSession** operation. | | callback | AsyncCallback\<[HuksSessionHandle](#hukssessionhandle9)> | Yes | Callback invoked to return a session handle for subsequent operations.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000010 | the number of sessions has reached limit. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + ## huks.initSession9+ initSession(keyAlias: string, options: HuksOptions) : Promise\ @@ -1188,6 +1501,25 @@ Initializes the data for a key operation. This API uses a promise to return the | ----------------------------------- | -------------------------------------------------- | | Promise\<[HuksSessionHandle](#hukssessionhandle9)> | Promise used to return a session handle for subsequent operations.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000010 | the number of sessions has reached limit. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + ## huks.updateSession9+ updateSession(handle: number, options: HuksOptions, callback: AsyncCallback\) : void @@ -1204,6 +1536,26 @@ Updates the key operation by segment. This API uses an asynchronous callback to | options | [HuksOptions](#huksoptions) | Yes | Parameter set used for the **updateSession** operation. | | callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the **updateSession** operation result.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000007 | this credential is already invalidated permanently. | +| 12000008 | verify authtoken failed. | +| 12000009 | authtoken is already timeout. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | ## huks.updateSession9+ @@ -1222,6 +1574,27 @@ Updates the key operation by segment. This API uses an asynchronous callback to | token | Uint8Array | Yes | Token of the **updateSession** operation. | | callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the **updateSession** operation result.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000007 | this credential is already invalidated permanently. | +| 12000008 | verify authtoken failed. | +| 12000009 | authtoken is already timeout. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + ## huks.updateSession9+ updateSession(handle: number, options: HuksOptions, token?: Uint8Array) : Promise\ @@ -1244,6 +1617,27 @@ Updates the key operation by segment. This API uses a promise to return the resu | ----------------------------------- | -------------------------------------------------- | | Promise<[HuksReturnResult](#huksreturnresult9)> | Promise used to return the **updateSession** operation result.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000007 | this credential is already invalidated permanently. | +| 12000008 | verify authtoken failed. | +| 12000009 | authtoken is already timeout. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + ## huks.finishSession9+ finishSession(handle: number, options: HuksOptions, callback: AsyncCallback\) : void @@ -1261,6 +1655,27 @@ Completes the key operation and releases resources. This API uses an asynchronou | token | Uint8Array | Yes | Token of the **finishSession** operation. | | callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the **finishSession** operation result.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000007 | this credential is already invalidated permanently. | +| 12000008 | verify authtoken failed. | +| 12000009 | authtoken is already timeout. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + ## huks.finishSession9+ finishSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback\) : void @@ -1278,6 +1693,27 @@ Completes the key operation and releases resources. This API uses an asynchronou | token | Uint8Array | Yes | Token of the **finishSession** operation. | | callback | AsyncCallback\<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the **finishSession** operation result.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000007 | this credential is already invalidated permanently. | +| 12000008 | verify authtoken failed. | +| 12000009 | authtoken is already timeout. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + ## huks.finishSession9+ finishSession(handle: number, options: HuksOptions, token?: Uint8Array) : Promise\ @@ -1300,6 +1736,27 @@ Completes the key operation and releases resources. This API uses a promise to r | ----------------------------------- | -------------------------------------------------- | | Promise\<[HuksReturnResult](#huksreturnresult9)> | Promise used to return the result.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000001 | algorithm mode is not supported. | +| 12000002 | algorithm param is missing. | +| 12000003 | algorithm param is invalid. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000007 | this credential is already invalidated permanently. | +| 12000008 | verify authtoken failed. | +| 12000009 | authtoken is already timeout. | +| 12000011 | queried entity does not exist. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + ## huks.abortSession9+ abortSession(handle: number, options: HuksOptions, callback: AsyncCallback\) : void @@ -1316,6 +1773,20 @@ Aborts a key operation. This API uses an asynchronous callback to return the res | options | [HuksOptions](#huksoptions) | Yes | Parameter set used for the **abortSession** operation. | | callback | AsyncCallback\ | Yes | Callback that returns no value. | +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -1466,6 +1937,20 @@ Aborts a key operation. This API uses a promise to return the result. | ----------------------------------- | -------------------------------------------------- | | Promise\ | Promise used to return the **abortSession** operation result.| +**Error codes** + +For details about the error codes, see [HUKS Error Codes](../errorcodes/errorcode-huks.md). + +| ID| Error Message | +| -------- | ------------- | +| 401 | argument is invalid. | +| 801 | api is not supported. | +| 12000004 | operating file failed. | +| 12000005 | IPC communication failed. | +| 12000006 | error occured in crypto engine. | +| 12000012 | external error. | +| 12000014 | memory is insufficient. | + **Example** ```js @@ -1773,10 +2258,12 @@ Enumerates the key storage modes. **System capability**: SystemCapability.Security.Huks -| Name | Value | Description | -| ----------------------- | ---- | ------------------------------ | -| HUKS_STORAGE_TEMP | 0 | The key is managed locally. | -| HUKS_STORAGE_PERSISTENT | 1 | The key is managed by the HUKS service.| +| Name | Value | Description | +| -------------------------------------------- | ---- | ------------------------------ | +| HUKS_STORAGE_TEMP | 0 | The key is managed locally. | +| HUKS_STORAGE_PERSISTENT | 1 | The key is managed by the HUKS service.| +| HUKS_STORAGE_ONLY_USED_IN_HUKS10+ | 2 | The key is stored only in the HUKS. | +| HUKS_STORAGE_KEY_EXPORT_ALLOWED10+ | 3 | The key is exported from the HUKS and is not stored.| ## HuksSendType @@ -1812,6 +2299,17 @@ Enumerates the types of keys to import. By default, a public key is imported. Th | HUKS_KEY_TYPE_PRIVATE_KEY | 1 | Private key | | HUKS_KEY_TYPE_KEY_PAIR | 2 | Public and private key pair| +## HuksRsaPssSaltLenType10+ + +Enumerates the **salt_len** types to set when PSS padding is used in RSA signing or signature verification. + +**System capability**: SystemCapability.Security.Huks + +| Name | Value | Description | +| ------------------------------------------ | ---- | ---------------------------- | +| HUKS_RSA_PSS_SALT_LEN_DIGEST10+ | 0 | **salt_len** is set to the digest length.| +| HUKS_RSA_PSS_SALT_LEN_MAX10+ | 1 | **salt_len** is set to the maximum length.| + ## HuksUserAuthType9+ Enumerates the user authentication types. @@ -1920,6 +2418,8 @@ Enumerates the tags used to invoke parameters. | HUKS_TAG_DERIVE_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 24 | Size of the derived key. | | HUKS_TAG_IMPORT_KEY_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 25 | Type of the imported key. | | HUKS_TAG_UNWRAP_ALGORITHM_SUITE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 26 | Algorithm suite required for encrypted imports. | +| HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|29 | Storage type of the derived key or agreed key.| +| HUKS_TAG_RSA_PSS_SALT_LEN_TYPE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|30 | Type of the **rsa_pss_salt_length**.| | HUKS_TAG_ACTIVE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 201 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module. | | HUKS_TAG_ORIGINATION_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 202 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module. | | HUKS_TAG_USAGE_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 203 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module. | @@ -1934,6 +2434,7 @@ Enumerates the tags used to invoke parameters. | HUKS_TAG_KEY_SECURE_SIGN_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 308 | Signature type of the key generated or imported.| | HUKS_TAG_CHALLENGE_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 309 | Type of the challenge generated for a key. For details, see [HuksChallengeType](#hukschallengetype9).| | HUKS_TAG_CHALLENGE_POS9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 310 | Position of the 8-byte valid value in a custom challenge. For details, see [HuksChallengePosition](#hukschallengeposition9).| +| HUKS_TAG_KEY_AUTH_PURPOSE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|311 | Key authentication purpose.| | HUKS_TAG_ATTESTATION_CHALLENGE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 501 | Challenge value used in the attestation. | | HUKS_TAG_ATTESTATION_APPLICATION_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 502 | Application ID used in the attestation. | | HUKS_TAG_ATTESTATION_ID_BRAND | HuksTagType.HUKS_TAG_TYPE_BYTES \| 503 | Brand of the device. | diff --git a/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md b/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md index a3e98a1cebd86dc45ac0e09f17ca505543d52935..4f94686f60f8964beac0159a44a476c13904ce52 100644 --- a/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md +++ b/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md @@ -433,7 +433,7 @@ try { getWindows(callback: AsyncCallback\>): void; -Obtains the list of windows on a display. This API uses an asynchronous callback to return the result. +Obtains the list of windows on this display. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.BarrierFree.Accessibility.Core @@ -610,7 +610,7 @@ Defines the accessibilityelement. Before calling APIs of **AccessibilityElement* **System capability**: SystemCapability.BarrierFree.Accessibility.Core -## attributeNames +### attributeNames attributeNames\(): Promise\>; @@ -636,7 +636,7 @@ rootElement.attributeNames().then((data) => { console.log('failed to get attribute names, because ${JSON.stringify(err)}'); }); ``` -## attributeNames +### attributeNames attributeNames\(callback: AsyncCallback\>): void; @@ -664,7 +664,7 @@ rootElement.attributeNames((err, data) => { console.info('get attribute names success'); }); ``` -## AccessibilityElement.attributeValue +### attributeValue attributeValue\(attributeName: T): Promise\; @@ -709,7 +709,7 @@ try { console.error('failed to get attribute value, because ${JSON.stringify(exception)}'); } ``` -## AccessibilityElement.attributeValue +### attributeValue attributeValue\(attributeName: T, callback: AsyncCallback\): void; @@ -752,7 +752,7 @@ try { console.error('failed to get attribute value, because ${JSON.stringify(exception)}'); } ``` -## actionNames +### actionNames actionNames(): Promise\>; @@ -778,7 +778,7 @@ rootElement.actionNames().then((data) => { console.error('failed to get action names because ${JSON.stringify(err)}'); }); ``` -## actionNames +### actionNames actionNames(callback: AsyncCallback\>): void; @@ -806,7 +806,7 @@ rootElement.actionNames((err, data) => { console.info('get action names success'); }); ``` -## performAction +### performAction performAction(actionName: string, parameters?: object): Promise\; @@ -818,8 +818,8 @@ Performs an action based on the specified action name. This API uses a promise t | Name | Type | Mandatory | Description | | ----------- | ---------------------------------------- | ---- | -------------- | -| actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). | -| parameters | object | No | Parameters required for performing the target action. Not supported currently. | +| actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). +| parameters | object | No | Parameters required for performing the target action. Empty by default. Not supported currently. | **Return value** @@ -849,7 +849,7 @@ try { console.error('failed to perform action, because ${JSON.stringify(exception)}'); } ``` -## performAction +### performAction performAction(actionName: string, callback: AsyncCallback\): void; @@ -861,7 +861,7 @@ Performs an action based on the specified action name. This API uses an asynchro | Name | Type | Mandatory | Description | | ----------- | ---------------------------------------- | ---- | -------------- | -| actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). | +| actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). | callback | AsyncCallback<void> | Yes | Callback used to return the result.| **Error codes** @@ -888,7 +888,7 @@ try { console.error('failed to perform action, because ${JSON.stringify(exception)}'); } ``` -## performAction +### performAction performAction(actionName: string, parameters: object, callback: AsyncCallback\): void; @@ -901,7 +901,7 @@ Performs an action based on the specified action name. This API uses an asynchro | Name | Type | Mandatory | Description | | ---------- | ------------------------- | ---- | ---------------------------------------- | | actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action).| -| parameters | object | Yes | Parameters required for performing the target action. Not supported currently. | +| parameters | object | Yes | Parameters required for performing the target action. Empty by default. Not supported currently. | | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -932,7 +932,7 @@ try { console.error('failed to perform action, because ${JSON.stringify(exception)}'); } ``` -## findElement('content') +### findElement('content') findElement(type: 'content', condition: string): Promise\>; @@ -971,7 +971,7 @@ try { console.error('failed to find element, because ${JSON.stringify(exception)}'); } ``` -## findElement('content') +### findElement('content') findElement(type: 'content', condition: string, callback: AsyncCallback\>): void; @@ -1007,7 +1007,7 @@ try { console.error('failed to find element, because ${JSON.stringify(exception)}'); } ``` -## findElement('focusType') +### findElement('focusType') findElement(type: 'focusType', condition: FocusType): Promise\; @@ -1046,7 +1046,7 @@ try { console.error('failed to find element, because ${JSON.stringify(exception)}'); } ``` -## findElement('focusType') +### findElement('focusType') findElement(type: 'focusType', condition: FocusType, callback: AsyncCallback\): void; @@ -1082,7 +1082,7 @@ try { console.error('failed to find element, because ${JSON.stringify(exception)}'); } ``` -## findElement('focusDirection') +### findElement('focusDirection') findElement(type: 'focusDirection', condition: FocusDirection): Promise\; @@ -1121,7 +1121,7 @@ try { console.error('failed to find element, because ${JSON.stringify(exception)}'); } ``` -## findElement('focusDirection') +### findElement('focusDirection') findElement(type: 'focusDirection', condition: FocusDirection, callback: AsyncCallback\): void; diff --git a/en/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md b/en/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md index 1e12c17c771021d8bd6dc8f0a38bde2de6d079fc..a36b30aa6ebeff234d11c1f928bbb688664e06bd 100644 --- a/en/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md +++ b/en/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md @@ -43,5 +43,5 @@ let applicationStateObserver = { console.log('onProcessStateChanged onProcessStateChanged: ${JSON.stringify(processData)}'); } }; -let observerCode = appManager.registerApplicationStateObserver(applicationStateObserver); +let observerCode = appManager.on('applicationState', applicationStateObserver); ``` diff --git a/en/application-dev/reference/apis/js-apis-inner-multimedia-ringtonePlayer.md b/en/application-dev/reference/apis/js-apis-inner-multimedia-ringtonePlayer.md new file mode 100644 index 0000000000000000000000000000000000000000..66aa7fbf4972c578b1dd544c18618defed8dedeb --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-inner-multimedia-ringtonePlayer.md @@ -0,0 +1,471 @@ +# ringtonePlayer (Ringtone Player) + +The **ringtonePlayer** module provides APIs for playing, configuring, and obtaining system ringtones. + +This module must work with [@ohos.multimedia.systemSoundManager](js-apis-systemSoundManager.md) to manage system ringtones. + +> **NOTE** +> +> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> +> The APIs provided by this module are system APIs. + +## Modules to Import + +```js +import systemSoundManager from '@ohos.multimedia.systemSoundManager'; +``` + +## RingtoneOptions + +Enumerates the ringtone parameters. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +| Name | Type |Mandatory | Description | +| --------- | -------------- | ---- | --------------------------------- | +| volume | number | Yes | Relative volume. The value ranges from 0.00 to 1.00. The value **1.00** indicates the maximum volume (100%).| +| loop | boolean | Yes | Whether to enable loop playback. The value **true** means to enable loop playback, and **false** means the opposite.| + +## RingtonePlayer + +Provides APIs for setting and obtaining system ringtone parameters as well as playing and stopping system ringtones. Before calling any API in **RingtonePlayer**, you must use [getSystemRingtonePlayer](js-apis-systemSoundManager.md#getsystemringtoneplayer) to create a **RingtonePlayer** instance. + +### Attributes + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +| Name | Type | Readable| Writable| Description | +| ----- | -------------------------- | ---- | ---- | ------------------ | +| state | [media.AVPlayerState](js-apis-media.md#avplayerstate9) | Yes | No | Audio renderer state.| + +**Example** + +```js +let state = systemRingtonePlayer.state; +``` + +### getTitle + +getTitle(callback: AsyncCallback<string>): void + +Obtains the title of a system ringtone. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | ------------------------- | +| callback | AsyncCallback<string> | Yes | Callback used to return the ringtone title obtained. | + +**Example** + +```js +systemRingtonePlayer.getTitle((err, value) => { + if (err) { + console.error(`Failed to get system ringtone title. ${err}`); + return; + } + console.info(`Callback invoked to indicate the value of the system ringtone title is obtained ${value}.`); +}); +``` + +### getTitle + +getTitle(): Promise<string> + +Obtains the title of a system ringtone. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Return value** + +| Type | Description | +| --------------------- | -------------------------------- | +| Promise<string> | Promise used to return the ringtone title obtained.| + +**Example** + +```js +systemRingtonePlayer.getTitle().then((value) => { + console.info(`Promise returned to indicate that the value of the system ringtone title is obtained ${value}.`); +}).catch ((err) => { + console.error(`Failed to get the system ringtone title ${err}`); +}); +``` + +### getAudioRendererInfo + +getAudioRendererInfo(callback: AsyncCallback<audio.AudioRendererInfo>): void + +Obtains the information about the audio renderer used by the ringtone. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | ------------------------- | +| callback | AsyncCallback<[audio.AudioRendererInfo](js-apis-audio.md#audiorendererinfo8)> | Yes| Callback used to return the audio renderer information obtained.| + +**Example** + +```js +import audio from '@ohos.multimedia.audio'; + +let audioRendererInfo: audio.AudioRendererInfo = null; + +systemRingtonePlayer.getAudioRendererInfo((err, value) => { + if (err) { + console.error(`Failed to get ringtone AudioRendererInfo. ${err}`); + return; + } + console.info(`Callback invoked to indicate the value of the ringtone AudioRendererInfo is obtained.`); + audioRendererInfo = value; +}); +``` + +### getAudioRendererInfo + +getAudioRendererInfo(): Promise<audio.AudioRendererInfo> + +Obtains the information about the audio renderer used by the ringtone. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------- | +| Promise<[audio.AudioRendererInfo](js-apis-audio.md#audiorendererinfo8)> | Promise used to return the audio renderer information obtained.| + +**Example** + +```js +import audio from '@ohos.multimedia.audio'; + +let audioRendererInfo: audio.AudioRendererInfo = null; + +systemRingtonePlayer.getAudioRendererInfo().then((value) => { + console.info(`Promise returned to indicate that the value of the ringtone AudioRendererInfo is obtained ${value}.`); + audioRendererInfo = value; +}).catch ((err) => { + console.error(`Failed to get the ringtone AudioRendererInfo ${err}`); +}); +``` + +### configure + +configure(options: RingtoneOptions, callback: AsyncCallback<void>): void + +Sets ringtone parameters. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | ------------------------- | +| options | [RingtoneOptions](#ringtoneoptions) | Yes | Ringtone parameters. | +| callback | AsyncCallback<void> | Yes | Callback used to return the result.| + +**Example** + +```js +let ringtoneOptions = {volume: 0.5, loop: true}; + +systemRingtonePlayer.configure(ringtoneOptions, (err) => { + if (err) { + console.error(`Failed to configure ringtone options. ${err}`); + return; + } + console.info(`Callback invoked to indicate a successful setting of ringtone options.`); +}); +``` + +### configure + +configure(options: RingtoneOptions): Promise<void> + +Sets ringtone parameters. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | ------------------------- | +| options | [RingtoneOptions](#ringtoneoptions) | Yes | Ringtone parameters. | + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------- | +| Promise<void> | Promise used to return the result.| + +**Example** + +```js +let ringtoneOptions = {volume: 0.5, loop: true}; + +systemRingtonePlayer.configure(ringtoneOptions).then(() => { + console.info(`Promise returned to indicate a successful setting of ringtone options.`); +}).catch ((err) => { + console.error(`Failed to configure ringtone options. ${err}`); +}); +``` + +### start + +start(callback: AsyncCallback<void>): void + +Starts playing the ringtone. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | ------------------------- | +| callback | AsyncCallback<void> | Yes | Callback used to return the result.| + +**Example** + +```js +systemRingtonePlayer.start((err) => { + if (err) { + console.error(`Failed to start playing ringtone. ${err}`); + return; + } + console.info(`Callback invoked to indicate a successful starting of ringtone.`); +}); +``` + +### start + +start(): Promise<void> + +Starts playing the ringtone. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Return value** + +| Type | Description | +| ------------------- | -------------------------------- | +| Promise<void> | Promise used to return the result.| + +**Example** + +```js +systemRingtonePlayer.start().then(() => { + console.info(`Promise returned to indicate a successful starting of ringtone.`); +}).catch ((err) => { + console.error(`Failed to start playing ringtone. ${err}`); +}); +``` + +### stop + +stop(callback: AsyncCallback<void>): void + +Stops playing the ringtone. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | ------------------------- | +| callback | AsyncCallback<void> | Yes | Callback used to return the result.| + +**Example** + +```js +systemRingtonePlayer.stop((err) => { + if (err) { + console.error(`Failed to stop playing ringtone. ${err}`); + return; + } + console.info(`Callback invoked to indicate a successful stopping of ringtone.`); +}); +``` + +### stop + +stop(): Promise<void> + +Stops playing the ringtone. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Return value** + +| Type | Description | +| ------------------- | -------------------------------- | +| Promise<void> | Promise used to return the result.| + +**Example** + +```js +systemRingtonePlayer.stop().then(() => { + console.info(`Promise returned to indicate a successful stopping of ringtone.`); +}).catch ((err) => { + console.error(`Failed to stop playing ringtone. ${err}`); +}); +``` + +### release + +release(callback: AsyncCallback<void>): void + +Releases the ringtone player. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | ------------------------- | +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | + +**Example** + +```js +systemRingtonePlayer.release((err) => { + if (err) { + console.error(`Failed to release ringtone player. ${err}`); + return; + } + console.info(`Callback invoked to indicate a successful releasing of ringtone player.`); +}); +``` + +### release + +release(): Promise<void> + +Releases the ringtone player. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------- | +| Promise<void> | Promise used to return the result. | + +**Example** + +```js +systemRingtonePlayer.release().then(() => { + console.info(`Promise returned to indicate a successful releasing of ringtone player.`); +}).catch ((err) => { + console.error(`Failed to release ringtone player. ${err}`); +}); +``` + +### on('audioInterrupt') + +on(type: 'audioInterrupt', callback: Callback<audio.InterruptEvent>): void + +Subscribes to audio interruption events. This API uses a callback to obtain interrupt events. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ----------------------- | ---- | -------------------------------------------------------------------------- | +| type | string | Yes | Event type. The value **'audioInterrupt'** means the audio interruption event, which is triggered when audio rendering is interrupted.| +| callback | Callback<[audio.InterruptEvent](js-apis-audio.md#interruptevent9)> | Yes | Callback used to return the audio interruption event. | + +**Error codes** + +For details about the error codes, see [Audio Error Codes](../errorcodes/errorcode-audio.md). + +| ID| Error Message| +| ------- | --------------------------------------------| +| 401 | if input parameter type or number mismatch | +| 6800101 | if input parameter value error | + +**Example** + +```js +import audio from '@ohos.multimedia.audio'; + +let isPlaying; // An identifier specifying whether rendering is in progress. +let isDucked; // An identifier specifying whether the audio volume is reduced. + +systemRingtonePlayer.on('audioInterrupt', async(interruptEvent) => { +if (interruptEvent.forceType == audio.InterruptForceType.INTERRUPT_FORCE) { + // The system forcibly interrupts audio rendering. The application must update the status and displayed content accordingly. + switch (interruptEvent.hintType) { + case audio.InterruptHint.INTERRUPT_HINT_PAUSE: + // The audio stream has been paused and temporarily loses the focus. It will receive the interruptEvent corresponding to resume when it is able to regain the focus. + console.info('Force paused. Update playing status and stop writing'); + isPlaying = false; // A simplified processing indicating several operations for switching the application to the paused state. + break; + case audio.InterruptHint.INTERRUPT_HINT_STOP: + // The audio stream has been stopped and permanently loses the focus. The user must manually trigger the operation to resume rendering. + console.info('Force stopped. Update playing status and stop writing'); + isPlaying = false; // A simplified processing indicating several operations for switching the application to the paused state. + break; + case audio.InterruptHint.INTERRUPT_HINT_DUCK: + // The audio stream is rendered at a reduced volume. + console.info('Force ducked. Update volume status'); + isDucked = true; // A simplified processing indicating several operations for updating the volume status. + break; + case audio.InterruptHint.INTERRUPT_HINT_UNDUCK: + // The audio stream is rendered at the normal volume. + console.info('Force ducked. Update volume status'); + isDucked = false; // A simplified processing indicating several operations for updating the volume status. + break; + default: + break; + } +} else if (interruptEvent.forceType == audio.InterruptForceType.INTERRUPT_SHARE) { + // The application can choose to take action or ignore. + switch (interruptEvent.hintType) { + case audio.InterruptHint.INTERRUPT_HINT_RESUME: + // It is recommended that the application continue rendering. (The audio stream has been forcibly paused and temporarily lost the focus. It can resume rendering now.) + console.info('Resume force paused renderer or ignore'); + // To continue rendering, the application must perform the required operations. + break; + default: + break; + } +} +}); +``` diff --git a/en/application-dev/reference/apis/js-apis-inputmethodengine.md b/en/application-dev/reference/apis/js-apis-inputmethodengine.md index 43b396fca5c68edbdda3b6146c9a42192421e1d0..1ab9aa0e1bae22a05750f20051029cf979db2ad1 100644 --- a/en/application-dev/reference/apis/js-apis-inputmethodengine.md +++ b/en/application-dev/reference/apis/js-apis-inputmethodengine.md @@ -57,7 +57,9 @@ Provides the constant values of function keys, edit boxes, and the cursor. getInputMethodAbility(): InputMethodAbility Obtains an [InputMethodAbility](#inputmethodability) instance for the input method. + This API can be called only by an input method. + The input method can use the obtained instance to subscribe to a soft keyboard display/hide request event, create/destroy an input method panel, and the like. **System capability**: SystemCapability.MiscServices.InputMethodFramework @@ -494,7 +496,7 @@ This API can be called only by an input method. Only one SOFT_KEYBOARD panel and | Name | Type | Mandatory| Description | | ------- | ----------- | ---- | ------------------------ | -| ctx | [BaseContext](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-inner-application-baseContext.md) | Yes | Context of the current input method.| +| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes | Context of the current input method.| | info | [PanelInfo](#panelinfo10) | Yes | Information about the input method panel.| | callback | AsyncCallback\<[Panel](#panel10)> | Yes | Callback used to return the result. If the operation is successful, the created input method panel is returned. | @@ -538,7 +540,7 @@ This API can be called only by an input method. Only one SOFT_KEYBOARD panel and | Name | Type | Mandatory| Description | | ------- | ----------- | ---- | ------------------------ | -| ctx | [BaseContext](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-inner-application-baseContext.md) | Yes | Context of the current input method.| +| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes | Context of the current input method.| | info | [PanelInfo](#panelinfo10) | Yes | Information about the input method panel.| **Return value** @@ -953,7 +955,7 @@ Loads content from a page linked to LocalStorage to this panel. This API uses an | Name | Type | Mandatory| Description | | -------- | ---------------------- | ---- | -------- | | path | string | Yes | Path of the page from which the content will be loaded.| -| storage | [LocalStorage](../../quick-start/arkts-localstorage.md) | Yes | Storage unit that provides storage for mutable and immutable state variables in the application.| +| storage | [LocalStorage](../arkui-ts/ts-state-management.md#localstorage9) | Yes | Storage unit that provides storage for mutable and immutable state variables in the application.| | callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error object.| **Example** @@ -987,7 +989,7 @@ Loads content from a page linked to LocalStorage to this panel. This API uses a | Name | Type | Mandatory| Description | | -------- | ---------------------- | ---- | -------- | | path | string | Yes | Path of the page from which the content will be loaded.| -| storage | [LocalStorage](../../quick-start/arkts-localstorage.md) | Yes | Storage unit that provides storage for mutable and immutable state variables in the application.| +| storage | [LocalStorage](../arkui-ts/ts-state-management.md#localstorage9) | Yes | Storage unit that provides storage for mutable and immutable state variables in the application.| **Return value** @@ -1067,7 +1069,7 @@ The panel width cannot exceed the screen width, and the panel height cannot be h | Type | Description | | ------- | ------------------------------ | -| Promise | Promise that returns no value. | +| Promise\ | Promise that returns no value. | **Example** @@ -1139,7 +1141,7 @@ This API does not work on panels in the FLG_FIXED state. | Type | Description | | ------- | ------------------------------ | -| Promise | Promise that returns no value. | +| Promise\ | Promise that returns no value. | **Example** @@ -1558,7 +1560,7 @@ Sends the function key. This API uses a promise to return the result. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| action | number | Yes| Action of the function key.
**0**: invalid key.
**1**: confirm key (Enter key).| +| action | number | Yes| Action of the function key.
- **0**: invalid key.
- **1**: confirm key (Enter key).| **Return value** @@ -2521,8 +2523,8 @@ Describes the attribute of a key. | Name | Type| Readable| Writable| Description | | --------- | -------- | ---- | ---- | ------------ | -| keyCode | number | Yes | No | Key value.| -| keyAction | number | Yes | No | Key status.| +| keyCode | number | Yes | No | Key value. For detail, see [KeyCode](js-apis-keycode.md#keycode).| +| keyAction | number | Yes | No | Key event type.
- **2**: keydown event.
- **3**: keyup event.| ## PanelFlag10+ diff --git a/en/application-dev/reference/apis/js-apis-installer.md b/en/application-dev/reference/apis/js-apis-installer.md index 146996b85330695f1f3a9392a62fff3136e8387e..a10b567a9c0b4bbfebbbc6fc08514f6831db4906 100644 --- a/en/application-dev/reference/apis/js-apis-installer.md +++ b/en/application-dev/reference/apis/js-apis-installer.md @@ -17,6 +17,7 @@ import installer from '@ohos.bundle.installer'; | Permission | Permission Level | Description | | ------------------------------ | ----------- | ---------------- | | ohos.permission.INSTALL_BUNDLE | system_core | Permission to install or uninstall bundles.| +| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | Permission to query information about all bundles.| For details, see [Permission Levels](../../security/accesstoken-overview.md#permission-levels). @@ -747,6 +748,98 @@ try { console.error('getBundleInstaller failed. Cause: ' + error.message); } ``` + +## BundleInstaller.getSpecifiedDistributionType10+ +getSpecifiedDistributionType(bundleName: string): string; + +Obtains the distribution type of a bundle in synchronous mode. The return value is the **specifiedDistributionType** field value in **InstallParam** passed when **install** is called. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + +**System capability**: SystemCapability.BundleManager.BundleFramework.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------------- | ----------------------------------- | ---- | ---------------------------- | +| bundleName | string | Yes | Bundle name.| + +**Return value** + +| Type | Description | +| ------------- | -------------------------------------- | +| string | Distribution type of the bundle.| + +**Error codes** + +For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md). + +| ID| Error Message | +| -------- | ------------------------------------------------------------ | +| 17700001 | The specified bundleName is not found. | + +**Example** +```ts +import installer from '@ohos.bundle.installer'; +let bundleName = "com.example.myapplication"; + +try { + let type = installer.getSpecifiedDistributionType(bundleName); + console.info('getSpecifiedDistributionType successfully, type:' + type); +} catch (error) { + console.error('getSpecifiedDistributionType failed. Cause: ' + error.message); +} +``` + + +## BundleInstaller.getAdditionalInfo10+ + +getAdditionalInfo(bundleName: string): string; + +Obtains additional information about a bundle in synchronous mode. The return value is the **additionalInfo** field value in **InstallParam** passed when **install** is called. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + +**System capability**: SystemCapability.BundleManager.BundleFramework.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------------- | ----------------------------------- | ---- | ---------------------------- | +| bundleName | string | Yes | Bundle name.| + +**Return value** + +| Type | Description | +| ------------- | -------------------------------------- | +| string | Additional information about the bundle.| + +**Error codes** + +For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md). + +| ID| Error Message | +| -------- | ------------------------------------------------------------ | +| 17700001 | The specified bundleName is not found. | + +**Example** + +```ts +import installer from '@ohos.bundle.installer'; +let bundleName = "com.example.myapplication"; + +try { + let info = installer.getAdditionalInfo(bundleName); + console.info('getAdditionalInfo successfully, additionInfo:' + info); +} catch (error) { + console.error('getAdditionalInfo failed. Cause: ' + error.message); +} +``` + ## HashParam Defines the hash parameters for bundle installation and uninstall. @@ -774,8 +867,10 @@ Defines the parameters that need to be specified for bundle installation, uninst | installFlag | number | No | Installation flag. The value **0** means initial installation and **1** means overwrite installation. The default value is **0**.| | isKeepData | boolean | No | Whether to retain the data directory during bundle uninstall. The default value is **false**.| | hashParams | Array<[HashParam](#hashparam)> | No| Hash parameters. By default, no value is passed. | -| crowdtestDeadline| number | No |End date of crowdtesting. The default value is **-1**.| +| crowdtestDeadline| number | No | End date of crowdtesting. The default value is **-1**, indicating that no end date is specified for crowdtesting.| | sharedBundleDirPaths10+ | Array\ | No|Paths of the shared bundle files. By default, no value is passed.| +| specifiedDistributionType10+ | string | No|Distribution type specified during application installation. By default, no value is passed. The maximum length is 128 bytes. This field is usually specified by the application market of the operating system operator.| +| additionalInfo10+ | string | No|Additional information during application installation (usually an enterprise application). By default, no value is passed. The maximum length is 3,000 bytes. This field is usually specified by the application market of the operating system operator.| ## UninstallParam10+ diff --git a/en/application-dev/reference/apis/js-apis-logs.md b/en/application-dev/reference/apis/js-apis-logs.md index fa73f169b26bec6240b6205c2970af08f5def1f8..03603b5d20d4e22414d7891d910a00311dd7990c 100644 --- a/en/application-dev/reference/apis/js-apis-logs.md +++ b/en/application-dev/reference/apis/js-apis-logs.md @@ -19,9 +19,10 @@ Prints debugging information in formatted output mode. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | | message | string | Yes | Text to be printed.| -| arguments | any | No | Arguments in the message or other information to be printed.| +| arguments | any[] | No | Arguments in the message or other information to be printed.| **Example** + ```js const number = 5; console.debug('count: %d', number); // Print the debugging information with arguments in the message replaced. @@ -45,9 +46,10 @@ Prints log information in formatted output mode. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | | message | string | Yes | Text to be printed.| -| arguments | any | No |Arguments in the message or other information to be printed.| +| arguments | any[] | No |Arguments in the message or other information to be printed.| **Example** + ```js const number = 5; console.log('count: %d', number); // Print the log information with arguments in the message replaced. @@ -71,9 +73,10 @@ Prints log information in formatted output mode. This API is the alias of **cons | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | | message | string | Yes | Text to be printed.| -| arguments | any | No | Arguments in the message or other information to be printed.| +| arguments | any[] | No | Arguments in the message or other information to be printed.| **Example** + ```js const number = 5; console.info('count: %d', number); // Print the log information with arguments in the message replaced. @@ -97,9 +100,10 @@ Prints warning information in formatted output mode. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | | message | string | Yes | Warning information to be printed.| -| arguments | any | No | Arguments in the message or other information to be printed.| +| arguments | any[] | No | Arguments in the message or other information to be printed.| **Example** + ```js const str = "name should be string"; console.warn('warn: %d', str); // Print the warning information with arguments in the message replaced. @@ -123,10 +127,11 @@ Prints error information in formatted output mode. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | | message | string | Yes | Error information to be printed.| -| arguments | any | No | Arguments in the message or other information to be printed.| +| arguments | any[] | No | Arguments in the message or other information to be printed.| **Example** + ```js const str = "value is not defined"; console.error('error: %d', str); // Print the error information with arguments in the message replaced. @@ -153,6 +158,7 @@ Prints assertion information. | arguments | Object | No | Other information to be printed when **value** is **false**. If this parameter is left blank, other information is not printed.| **Example** + ```js console.assert(true, 'does nothing'); // Do not print error information as value is true. console.assert(2% 1 == 0,'does nothing'); // Do not print error information as value is true. @@ -180,6 +186,7 @@ Maintains an internal counter. When this counter is invoked, its label name and **Example** + ```js console.count() // default: 1 @@ -210,6 +217,7 @@ Resets a counter based on the specified label name. | label | string | No | Counter label name. The default value is **default**.| **Example** + ```js console.count('abc'); // abc: 1 @@ -234,6 +242,7 @@ Prints content of the specified object. **Example** + ```js let a = { foo: { bar: { baz: true } }}; console.dir(a); @@ -258,6 +267,7 @@ Displays an interactive tree of the descendant elements of the specified XML ele | arguments | Object | Yes | Information to be printed.| **Example** + ```js const number = 5; console.dirxml('count: %d', number); @@ -284,6 +294,7 @@ If the information to be printed is provided, the information is printed without | arguments | Object | No | Information to be printed.| **Example** + ```js console.log("outter"); // outter @@ -313,6 +324,7 @@ Creates a new inline group in collapsed mode. The usage and function of this API **Example** + ```js console.groupCollapsed("outter"); // outter @@ -335,6 +347,7 @@ Reduces the indentation of subsequent lines by two spaces. **Example** + ```js console.log("outter"); // outter @@ -362,6 +375,7 @@ Prints data in a table. | tableData | Object | No | Data to be printed in a table. If this parameter is left blank, no information is printed.| **Example** + ```js console.table([1, 2, 3]); // ┌─────────┬────────┐ @@ -382,6 +396,7 @@ console.table({ a: [1, 2, 3, 4, 5], b: 5, c: { e: 5 } }); // │ c │ │ │ │ │ │ 5 │ │ // └─────────┴───┴───┴───┴───┴───┴───┴────────┘ ``` + ## console.time10+ time(label?: string): void @@ -397,6 +412,7 @@ Starts a timer to track the duration of an operation. You can use **console.time | label | string | No | Timer label. The default value is **default**.| **Example** + ```js console.time('abc'); ``` @@ -416,6 +432,7 @@ Stops the timer started by calling **console.time()** and prints the elapsed tim | label | string | No | Timer label. The default value is **default**.| **Example** + ```js console.time('abc'); console.timeEnd('abc'); @@ -438,6 +455,7 @@ Prints the elapsed time and other data parameters for the timer started by **con | arguments | Object | No | Logs to be printed.| **Example** + ```js console.time('timer1'); console.timeLog('timer1', 17); @@ -461,6 +479,7 @@ Creates a stack trace. | arguments | Object | No | Logs to be printed. If this parameter is left blank, only stack information is printed.| **Example** + ```js console.trace(); // Trace: diff --git a/en/application-dev/reference/apis/js-apis-media.md b/en/application-dev/reference/apis/js-apis-media.md index 52178a666aa9ef29b878cd2b1978c3ab3ca3d163..7616a34520de90becc362cb12b6ba27ee8be0b49 100644 --- a/en/application-dev/reference/apis/js-apis-media.md +++ b/en/application-dev/reference/apis/js-apis-media.md @@ -310,18 +310,19 @@ Enumerates the media description keys. **System capability**: SystemCapability.Multimedia.Media.Core -| Name | Value | Description | -| ------------------------ | --------------- | ------------------------------------------------------------ | -| MD_KEY_TRACK_INDEX | 'track_index' | Track index, which is a number. | -| MD_KEY_TRACK_TYPE | 'track_type' | Track type, which is a number. For details, see [MediaType](#mediatype8).| -| MD_KEY_CODEC_MIME | 'codec_mime' | Codec MIME type, which is a string. | -| MD_KEY_DURATION | 'duration' | Media duration, which is a number, in units of ms. | -| MD_KEY_BITRATE | 'bitrate' | Bit rate, which is a number, in units of bit/s. | -| MD_KEY_WIDTH | 'width' | Video width, which is a number, in units of pixel. | -| MD_KEY_HEIGHT | 'height' | Video height, which is a number, in units of pixel. | -| MD_KEY_FRAME_RATE | 'frame_rate' | Video frame rate, which is a number, in units of 100 fps.| -| MD_KEY_AUD_CHANNEL_COUNT | 'channel_count' | Number of audio channels, which is a number. | -| MD_KEY_AUD_SAMPLE_RATE | 'sample_rate' | Sampling rate, which is a number, in units of Hz. | +| Name | Value | Description | +| ----------------------------- | --------------- | ------------------------------------------------------------ | +| MD_KEY_TRACK_INDEX | 'track_index' | Track index, which is a number. | +| MD_KEY_TRACK_TYPE | 'track_type' | Track type, which is a number. For details, see [MediaType](#mediatype8).| +| MD_KEY_CODEC_MIME | 'codec_mime' | Codec MIME type, which is a string. | +| MD_KEY_DURATION | 'duration' | Media duration, which is a number, in units of ms. | +| MD_KEY_BITRATE | 'bitrate' | Bit rate, which is a number, in units of bit/s. | +| MD_KEY_WIDTH | 'width' | Video width, which is a number, in units of pixel. | +| MD_KEY_HEIGHT | 'height' | Video height, which is a number, in units of pixel. | +| MD_KEY_FRAME_RATE | 'frame_rate' | Video frame rate, which is a number, in units of 100 fps.| +| MD_KEY_AUD_CHANNEL_COUNT | 'channel_count' | Number of audio channels, which is a number. | +| MD_KEY_AUD_SAMPLE_RATE | 'sample_rate' | Sampling rate, which is a number, in units of Hz. | +| MD_KEY_LANGUAGE10+ | "language" | Language, which is a string. | ## BufferingInfoType8+ @@ -359,17 +360,17 @@ For details about the audio and video playback demo, see [Audio Playback](../../ | Name | Type | Readable| Writable| Description | | --------------------------------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ | -| url9+ | string | Yes | Yes | URL of the media asset. It is a static attribute and can be set only when the AVPlayer is in the idle state.
The video formats MP4, MPEG-TS, WebM, and MKV are supported.
The audio formats M4A, AAC, MP3, OGG, and WAV are supported.
**Examples of supported URLs**:
1. FD: fd://xx
![](figures/en-us_image_url.png)
2. HTTP: http://xx
3. HTTPS: https://xx
4. HLS: http://xx or https://xx| -| fdSrc9+ | [AVFileDescriptor](#avfiledescriptor9) | Yes | Yes | FD of the media asset. It is a static attribute and can be set only when the AVPlayer is in the idle state.
This attribute is required when media assets of an application are continuously stored in a file.
The video formats MP4, MPEG-TS, WebM, and MKV are supported.
The audio formats M4A, AAC, MP3, OGG, and WAV are supported.
**Example:**
Assume that a media file that stores continuous assets consists of the following:
Video 1 (address offset: 0, byte length: 100)
Video 2 (address offset: 101; byte length: 50)
Video 3 (address offset: 151, byte length: 150)
1. To play video 1: AVFileDescriptor {fd = resource handle; offset = 0; length = 100; }
2. To play video 2: AVFileDescriptor {fd = resource handle; offset = 101; length = 50; }
3. To play video 3: AVFileDescriptor {fd = resource handle; offset = 151; length = 150; }
To play an independent media file, use **src=fd://xx**.| -| dataSrc10+ | [AVDataSrcDescriptor](#avdatasrcdescriptor10) | Yes | Yes | Descriptor of a streaming media asset. It is a static attribute and can be set only when the AVPlayer is in the idle state.
Use scenario: An application starts playing a media file while the file is still being downloaded from the remote to the local host.
The video formats MP4, MPEG-TS, WebM, and MKV are supported.
The audio formats M4A, AAC, MP3, OGG, and WAV are supported.
**Example:**
A user is obtaining an audio and video file from a remote server and wants to play the downloaded file content. To implement this scenario, do as follows:
1. Obtain the total file size, in bytes. If the total size cannot be obtained, set **fileSize** to **-1**.
2. Implement the **func** callback to fill in data. If **fileSize** is **-1**, the format of **func** is **func(buffer: ArrayBuffer, length: number)**, and the AVPlayer obtains data in sequence; otherwise, the format is **func(buffer: ArrayBuffer, length: number, pos: number)**, and the AVPlayer seeks and obtains data in the required positions.
3. Set **AVDataSrcDescriptor {fileSize = size, callback = func}**.
**Notes:**
If the media file to play is in MP4/M4A format, ensure that the **moov** field (specifying the media information) is before the **mdat** field (specifying the media data) or the fields before the **moov** field is less than 10 MB. Otherwise, the parsing fails and the media file cannot be played.| +| url9+ | string | Yes | Yes | URL of the media asset. It is a static attribute and can be set only when the AVPlayer is in the idle state.
The video formats MP4, MPEG-TS, WebM, and MKV are supported.
The audio formats M4A, AAC, MP3, OGG, WAV, and FLAC are supported.
**Example of supported URLs**:
1. FD: fd://xx
![](figures/en-us_image_url.png)
2. HTTP: http://xx
3. HTTPS: https://xx
4. HLS: http://xx or https://xx| +| fdSrc9+ | [AVFileDescriptor](#avfiledescriptor9) | Yes | Yes | FD of the media asset. It is a static attribute and can be set only when the AVPlayer is in the idle state.
This attribute is required when media assets of an application are continuously stored in a file.
The video formats MP4, MPEG-TS, WebM, and MKV are supported.
The audio formats M4A, AAC, MP3, OGG, WAV, and FLAC are supported.
**Example:**
Assume that a media file that stores continuous assets consists of the following:
Video 1 (address offset: 0, byte length: 100)
Video 2 (address offset: 101; byte length: 50)
Video 3 (address offset: 151, byte length: 150)
1. To play video 1: AVFileDescriptor {fd = resource handle; offset = 0; length = 100; }
2. To play video 2: AVFileDescriptor {fd = resource handle; offset = 101; length = 50; }
3. To play video 3: AVFileDescriptor {fd = resource handle; offset = 151; length = 150; }
To play an independent media file, use **src=fd://xx**.| +| dataSrc10+ | [AVDataSrcDescriptor](#avdatasrcdescriptor10) | Yes | Yes | Descriptor of a streaming media asset. It is a static attribute and can be set only when the AVPlayer is in the idle state.
Use scenario: An application starts playing a media file while the file is still being downloaded from the remote to the local host.
The video formats MP4, MPEG-TS, WebM, and MKV are supported.
The audio formats M4A, AAC, MP3, OGG, WAV, and FLAC are supported.
**Example:**
A user is obtaining an audio and video file from a remote server and wants to play the downloaded file content. To implement this scenario, do as follows:
1. Obtain the total file size, in bytes. If the total size cannot be obtained, set **fileSize** to **-1**.
2. Implement the **func** callback to fill in data. If **fileSize** is **-1**, the format of **func** is **func(buffer: ArrayBuffer, length: number)**, and the AVPlayer obtains data in sequence; otherwise, the format is **func(buffer: ArrayBuffer, length: number, pos: number)**, and the AVPlayer seeks and obtains data in the required positions.
3. Set **AVDataSrcDescriptor {fileSize = size, callback = func}**.
**Notes:**
If the media file to play is in MP4/M4A format, ensure that the **moov** field (specifying the media information) is before the **mdat** field (specifying the media data) or the fields before the **moov** field is less than 10 MB. Otherwise, the parsing fails and the media file cannot be played.| | surfaceId9+ | string | Yes | Yes | Video window ID. By default, there is no video window. It is a static attribute and can be set only when the AVPlayer is in the initialized state.
It is used to render the window for video playback and therefore is not required in audio-only playback scenarios.
**Example:**
[Create a surface ID through XComponent](../arkui-ts/ts-basic-components-xcomponent.md#getxcomponentsurfaceid).| -| loop9+ | boolean | Yes | Yes | Whether to loop playback. The value **true** means to loop playback, and **false** (default) means the opposite. It is a dynamic attribute
and can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.
This setting is not supported in the live mode.| +| loop9+ | boolean | Yes | Yes | Whether to loop playback. The value **true** means to loop playback, and **false** (default) means the opposite. It is a dynamic attribute
and can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.
This setting is not supported in live mode.| | videoScaleType9+ | [VideoScaleType](#videoscaletype9) | Yes | Yes | Video scaling type. The default value is **VIDEO_SCALE_TYPE_FIT_CROP**. It is a dynamic attribute
and can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.| | audioInterruptMode9+ | [audio.InterruptMode](js-apis-audio.md#interruptmode9) | Yes | Yes | Audio interruption mode. The default value is **SHARE_MODE**. It is a dynamic attribute
and can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.| | audioRendererInfo10+ | [audio.AudioRendererInfo](js-apis-audio.md#audiorendererinfo8) | Yes | Yes | Audio renderer information. The default value of **contentType** is **CONTENT_TYPE_MUSIC**, and the default value of **streamUsage** is **STREAM_USAGE_MEDIA**.
It can be set only when the AVPlayer is in the initialized state.| | state9+ | [AVPlayerState](#avplayerstate9) | Yes | No | AVPlayer state. It can be used as a query parameter when the AVPlayer is in any state. | -| currentTime9+ | number | Yes | No | Current video playback position, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **-1** indicates an invalid value.
In the live mode, **-1** is returned by default.| -| duration9+ | number | Yes | No | Video duration, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **-1** indicates an invalid value.
In live streaming scenarios, **-1** is returned by default.| +| currentTime9+ | number | Yes | No | Current video playback position, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **-1** indicates an invalid value.
In live mode, **-1** is returned by default.| +| duration9+ | number | Yes | No | Video duration, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **-1** indicates an invalid value.
In live mode, **-1** is returned by default.| | width9+ | number | Yes | No | Video width, in pixels. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **0** indicates an invalid value.| | height9+ | number | Yes | No | Video height, in pixels. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **0** indicates an invalid value.| @@ -907,7 +908,7 @@ avPlayer.release().then(() => { }) ``` -### getTrackDescription9+ +### getTrackDescription9+ getTrackDescription(callback: AsyncCallback\>): void @@ -999,12 +1000,130 @@ for (let i = 0; i < arrayDescription.length; i++) { } ``` +### selectTrack10+ + +selectTrack(index: number): void + +Selects an audio track. This API can be called only when the AVPlayer is in the prepared state. You can listen for the [trackChange event](#trackchange_on) to determine whether the API calling takes effect. + +**System capability**: SystemCapability.Multimedia.Media.AVPlayer + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ------ | ---- | ------------------------------------------------------------ | +| index | number | Yes | Track ID, which can be obtained by calling [getTrackDescription](#avplayer_gettrackdescription).| + +**Example** + +```js +let index = 2 +avPlayer.setBitrate(index) +``` + +### deselectTrack10+ + +deselectTrack(index: number): void + +Deselects an audio track. The default audio track will be used after the audio track is deselected. This API can be called only when the AVPlayer is in the prepared state. You can listen for the [trackChange event](#trackchange_on) to determine whether the API calling takes effect. + +**System capability**: SystemCapability.Multimedia.Media.AVPlayer + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ------ | ---- | ------------------------------------------------------------ | +| index | number | Yes | Track ID. You can obtain the ID of the current track by calling [getCurrentTrack](#avplayer_getcurrenttrack).| + +**Example** + +```js +let index = 2 +avPlayer.deselectTrack(index) +``` + +### getCurrentTrack10+ + +getCurrentTrack(trackType: MediaType, callback: AsyncCallback\): void + +Obtains the ID of the current track. This API uses an asynchronous callback to return the result. It can be called only when the AVPlayer is in the prepared, playing, paused, or completed state. + +**System capability**: SystemCapability.Multimedia.Media.AVPlayer + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ----------------------- | ---- | ------------------------------------------------------------ | +| trackType | [MediaType](#mediatype) | Yes | Enumerates the media types. | +| callback | AsyncCallback\ | Yes | Callback used to return the current track. If **-1** is returned, no track for the specified media type exists.| + +**Error codes** + +For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). + +| ID| Error Message | +| -------- | ------------------------------------------ | +| 5400102 | Operation not allowed. Return by callback. | + +**Example** + +```js +let mediaType = media.MediaType.MEDIA_TYPE_AUD; +let trackIndex = null; + +avPlayer.getCurrentTrack(mediaType (err, index) => { + if (err == null) { + console.info('getCurrentTrack success'); + trackIndex = index; + } else { + console.error('getCurrentTrack failed and error is ' + err.message); + } +}); +``` + +### getCurrentTrack10+ + +getCurrentTrack(trackType: MediaType): Promise\ + +Obtains the ID of the current track. This API uses a promise to return the result. It can be called only when the AVPlayer is in the prepared, playing, paused, or completed state. + +**System capability**: SystemCapability.Multimedia.Media.AVPlayer + +**Return value** + +| Type | Description | +| ---------------- | ------------------------------------------------------------ | +| trackType | [MediaType](#mediatype) | +| Promise\| Promise used to return the current track. If **-1** is returned, no track for the specified media type exists.| + +**Error codes** + +For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). + +| ID| Error Message | +| -------- | ----------------------------------------- | +| 5400102 | Operation not allowed. Return by promise. | + +**Example** + +```js +let mediaType = media.MediaType.MEDIA_TYPE_AUD; +let trackIndex = null; + +avPlayer.getCurrentTrack(mediaType).then((index) => { + console.info('getCurrentTrack success'); + trackIndex = index; +}).catch((err) => { + console.error('getCurrentTrack failed and catch error is ' + err.message); +}); +``` + ### seek9+ seek(timeMs: number, mode?:SeekMode): void Seeks to the specified playback position. This API can be called only when the AVPlayer is in the prepared, playing, paused, or completed state. You can check whether the seek operation takes effect by subscribing to the [seekDone](#seekDone_on) event. -This API is not supported in the live mode. +This API is not supported in live mode. **System capability**: SystemCapability.Multimedia.Media.AVPlayer @@ -1070,7 +1189,7 @@ avPlayer.off('seekDone') setSpeed(speed: PlaybackSpeed): void Sets the playback speed. This API can be called only when the AVPlayer is in the prepared, playing, paused, or completed state. You can check whether the setting takes effect by subscribing to the [speedDone](#speedDone_on) event. -This API is not supported in the live mode. +This API is not supported in live mode. **System capability**: SystemCapability.Multimedia.Media.AVPlayer @@ -1348,7 +1467,7 @@ avPlayer.off('endOfStream') on(type: 'timeUpdate', callback: Callback\): void Subscribes to playback position changes. It is used to refresh the current position of the progress bar. By default, this event is reported every 1 second. However, it is reported immediately upon a successful seek operation. -The **'timeUpdate'** event is not supported in the live mode. +The **'timeUpdate'** event is not supported in live mode. **System capability**: SystemCapability.Multimedia.Media.AVPlayer @@ -1392,7 +1511,7 @@ avPlayer.off('timeUpdate') on(type: 'durationUpdate', callback: Callback\): void Subscribes to media asset duration changes. It is used to refresh the length of the progress bar. By default, this event is reported once when the AVPlayer switches to the prepared state. However, it can be repeatedly reported for special streams that trigger duration changes. -The **'durationUpdate'** event is not supported in the live mode. +The **'durationUpdate'** event is not supported in live mode. **System capability**: SystemCapability.Multimedia.Media.AVPlayer @@ -1605,6 +1724,49 @@ Unsubscribes from the audio interruption event. avPlayer.off('audioInterrupt') ``` +### on('trackChange')10+ + +on(type: 'trackChange', callback: (index: number, isSelect: boolean) => void): void; + +Subscribes to track changes, which are triggered by calling **selectTrack** or **deselectTrack**. + +**System capability**: SystemCapability.Multimedia.Media.AVPlayer + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -------- | ---- | ----------------------------------------------------- | +| type | string | Yes | Event type, which is **'trackChange'** in this case.| +| callback | function | Yes | Callback invoked when the event is triggered. | + +**Example** + +```js +avPlayer.on('trackChange', (index: number, isSelect: boolean) => { + console.info('trackChange success, and index is:' + index + ', isSelect is :' + isSelect) +}) +``` + +### off('trackChange')10+ + +off(type: 'trackChange'): void + +Unsubscribes from track changes + +**System capability**: SystemCapability.Multimedia.Media.AVPlayer + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ------ | ---- | --------------------------------------------------------- | +| type | string | Yes | Event type, which is **'trackChange'** in this case.| + +**Example** + +```js +avPlayer.off('trackChange') +``` + ## AVPlayerState9+ Enumerates the states of the [AVPlayer](#avplayer9). Your application can proactively obtain the AVPlayer state through the **state** attribute or obtain the reported AVPlayer state by subscribing to the [stateChange](#stateChange_on) event. For details about the rules for state transition, see [Audio Playback](../../media/using-avplayer-for-playback.md). @@ -3497,7 +3659,7 @@ Only one **AudioRecorder** instance can be created per device. | Type | Description | | ------------------------------- | ------------------------------------------------------------ | -| [AudioRecorder](#audiorecorderdeprecated) | If the operation is successful, the **AudioRecorder** instance is returned; otherwise, **null** is returned. The instance can be used to record audio.| +| [AudioRecorder](#audiorecorderdeprecated) | If the operation is successful, an **AudioRecorder** instance is returned; otherwise, **null** is returned. The instance can be used to record audio.| **Example** @@ -3542,7 +3704,7 @@ Provides APIs to manage and play audio. Before calling any API in **AudioPlayer* | Name | Type | Readable| Writable| Description | | ------------------------------- | ------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ | -| src | string | Yes | Yes | Audio file URI. The mainstream audio formats (M4A, AAC, MP3, OGG, and WAV) are supported.
**Examples of supported URLs**:
1. FD: fd://xx
![](figures/en-us_image_url.png)
2. HTTP: http://xx
3. HTTPS: https://xx
4. HLS: http://xx or https://xx
**Required permissions**: ohos.permission.READ_MEDIA or ohos.permission.INTERNET| +| src | string | Yes | Yes | Audio file URI. The mainstream audio formats (M4A, AAC, MP3, OGG, and WAV) are supported.
**Example of supported URLs**:
1. FD: fd://xx
![](figures/en-us_image_url.png)
2. HTTP: http://xx
3. HTTPS: https://xx
4. HLS: http://xx or https://xx
**Required permissions**: ohos.permission.READ_MEDIA or ohos.permission.INTERNET| | fdSrc9+ | [AVFileDescriptor](#avfiledescriptor9) | Yes | Yes | Description of the audio file. This attribute is required when audio assets of an application are continuously stored in a file.
**Example:**
Assume that a music file that stores continuous music assets consists of the following:
Music 1 (address offset: 0, byte length: 100)
Music 2 (address offset: 101; byte length: 50)
Music 3 (address offset: 151, byte length: 150)
1. To play music 1: AVFileDescriptor {fd = resource handle; offset = 0; length = 100; }
2. To play music 2: AVFileDescriptor {fd = resource handle; offset = 101; length = 50; }
3. To play music 3: AVFileDescriptor {fd = resource handle; offset = 151; length = 150; }
To play an independent music file, use **src=fd://xx**.
| | loop | boolean | Yes | Yes | Whether to loop audio playback. The value **true** means to loop audio playback, and **false** means the opposite. | | audioInterruptMode9+ | [audio.InterruptMode](js-apis-audio.md#interruptmode9) | Yes | Yes | Audio interruption mode. | diff --git a/en/application-dev/reference/apis/js-apis-medialibrary.md b/en/application-dev/reference/apis/js-apis-medialibrary.md index c90acd7d15a4fa31f489f952569a1f4511eb77c7..4d7cc790180ad3d088633aed44e094611ec1f27e 100644 --- a/en/application-dev/reference/apis/js-apis-medialibrary.md +++ b/en/application-dev/reference/apis/js-apis-medialibrary.md @@ -77,7 +77,6 @@ let media = mediaLibrary.getMediaLibrary(); ### getFileAssets7+ - getFileAssets(options: MediaFetchOptions, callback: AsyncCallback<FetchFileResult>): void Obtains file assets (also called files). This API uses an asynchronous callback to return the result. @@ -105,7 +104,7 @@ async function example() { selectionArgs: [imageType.toString()], }; // Obtain the files in asynchronous callback mode. - media.getFileAssets(imagesFetchOp, (error, fetchFileResult) => { + media.getFileAssets(imagesFetchOp, async (error, fetchFileResult) => { // Check whether the result set of the obtained files is undefined. If yes, the API call fails. if (fetchFileResult == undefined) { console.error('get fetchFileResult failed with error: ' + error); @@ -124,8 +123,8 @@ async function example() { return; } console.info('Get fetchFileResult successfully, count: ' + count); - // Obtain the first file in the result set in asynchronous callback mode. - fetchFileResult.getFirstObject((error, fileAsset) => { + // Obtain the first file in the result set in asynchronous callback mode. If there are a large number of files, use getAllObject instead. + fetchFileResult.getFirstObject(async (error, fileAsset) => { // Check whether the first file is undefined. If yes, the API call fails. if (fileAsset == undefined) { console.error('get first object failed with error: ' + error); @@ -178,7 +177,7 @@ async function example() { selectionArgs: [imageType.toString()], }; // Obtain the files in promise mode. - media.getFileAssets(imagesFetchOp).then((fetchFileResult) => { + media.getFileAssets(imagesFetchOp).then(async (fetchFileResult) => { // Obtain the total number of files in the result set. const count = fetchFileResult.getCount(); // Check whether the number is less than 0. If yes, the API call fails. @@ -192,8 +191,8 @@ async function example() { return; } console.info('Get fetchFileResult successfully, count: ' + count); - // Obtain the first file in the result set in promise mode. - fetchFileResult.getFirstObject().then((fileAsset) => { + // Obtain the first file in the result set in promise mode. If there are a large number of files, use getAllObject instead. + fetchFileResult.getFirstObject().then(async (fileAsset) => { console.info('fileAsset.displayName ' + '0 : ' + fileAsset.displayName); // Call getNextObject to obtain the next file until the last one. for (let i = 1; i < count; i++) { @@ -514,17 +513,18 @@ Obtains the albums. This API uses an asynchronous callback to return the result. ```js async function example() { - let AlbumNoArgsfetchOp = { - selections: '', - selectionArgs: [], - }; - media.getAlbums(AlbumNoArgsfetchOp, (error, albumList) => { - if (albumList != undefined) { - console.info('getAlbums successfully: ' + JSON.stringify(albumList)); - } else { - console.error('getAlbums failed with error: ' + error); - } - }) + // To obtain the file assets in an album, you must preset the album and resources. The sample code below presets 'New Album 1'. + let AlbumNoArgsfetchOp = { + selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', + selectionArgs:['New Album 1'], + }; + media.getAlbums(AlbumNoArgsfetchOp, (error, albumList) => { + if (albumList != undefined) { + console.info('getAlbums successfully: ' + JSON.stringify(albumList)); + } else { + console.error('getAlbums failed with error: ' + error); + } + }) } ``` @@ -554,15 +554,16 @@ Obtains the albums. This API uses a promise to return the result. ```js async function example() { - let AlbumNoArgsfetchOp = { - selections: '', - selectionArgs: [], - }; - media.getAlbums(AlbumNoArgsfetchOp).then((albumList) => { - console.info('getAlbums successfully: ' + JSON.stringify(albumList)); - }).catch((error) => { - console.error('getAlbums failed with error: ' + error); - }); + // To obtain the file assets in an album, you must preset the album and resources. The sample code below presets 'New Album 1'. + let AlbumNoArgsfetchOp = { + selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', + selectionArgs:['New Album 1'], + }; + media.getAlbums(AlbumNoArgsfetchOp).then((albumList) => { + console.info('getAlbums successfully: ' + JSON.stringify(albumList)); + }).catch((error) => { + console.error('getAlbums failed with error: ' + error); + }); } ``` @@ -2021,7 +2022,7 @@ async function example() { ### getNextObject7+ - getNextObject(callback: AsyncCallback<FileAsset>): void +getNextObject(callback: AsyncCallback<FileAsset>): void Obtains the next file asset in the result set. This API uses an asynchronous callback to return the result. > **NOTE** @@ -2049,7 +2050,8 @@ async function example() { }; let fetchFileResult = await media.getFileAssets(getImageOp); let fileAsset = await fetchFileResult.getFirstObject(); - if (!fileAsset.isAfterLast) { + console.log('fetchFileResult getFirstObject successfully, displayName: ' + fileAsset.displayName); + if (!fetchFileResult.isAfterLast()) { fetchFileResult.getNextObject((error, fileAsset) => { if (error) { console.error('fetchFileResult getNextObject failed with error: ' + error); @@ -2065,7 +2067,7 @@ async function example() { ### getNextObject7+ - getNextObject(): Promise<FileAsset> +getNextObject(): Promise<FileAsset> Obtains the next file asset in the result set. This API uses a promise to return the result. > **NOTE** @@ -2093,7 +2095,8 @@ async function example() { }; let fetchFileResult = await media.getFileAssets(getImageOp); let fileAsset = await fetchFileResult.getFirstObject(); - if (!fileAsset.isAfterLast) { + console.log('fetchFileResult getFirstObject successfully, displayName: ' + fileAsset.displayName); + if (!fetchFileResult.isAfterLast()) { fetchFileResult.getNextObject().then((fileAsset) => { console.info('fetchFileResult getNextObject successfully, displayName: ' + fileAsset.displayName); fetchFileResult.close(); @@ -2369,20 +2372,21 @@ Commits the modification in the album attributes to the database. This API uses ```js async function example() { - let AlbumNoArgsfetchOp = { - selections: '', - selectionArgs: [], - }; - const albumList = await media.getAlbums(AlbumNoArgsfetchOp); - const album = albumList[0]; - album.albumName = 'hello'; - album.commitModify((error) => { - if (error) { - console.error('commitModify failed with error: ' + error); - return; - } - console.info('commitModify successful.'); - }) + // To obtain the file assets in an album, you must preset the album and resources. The sample code below presets 'New Album 1'. + let AlbumNoArgsfetchOp = { + selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', + selectionArgs:['New Album 1'], + }; + const albumList = await media.getAlbums(AlbumNoArgsfetchOp); + const album = albumList[0]; + album.albumName = 'hello'; + album.commitModify((error) => { + if (error) { + console.error('commitModify failed with error: ' + error); + return; + } + console.info('commitModify successful.'); + }) } ``` @@ -2406,18 +2410,60 @@ Commits the modification in the album attributes to the database. This API uses ```js async function example() { - let AlbumNoArgsfetchOp = { - selections: '', - selectionArgs: [], - }; - const albumList = await media.getAlbums(AlbumNoArgsfetchOp); - const album = albumList[0]; - album.albumName = 'hello'; - album.commitModify().then(() => { - console.info('commitModify successfully'); - }).catch((error) => { - console.error('commitModify failed with error: ' + error); - }); + // To obtain the file assets in an album, you must preset the album and resources. The sample code below presets 'New Album 1'. + let AlbumNoArgsfetchOp = { + selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', + selectionArgs:['New Album 1'], + }; + const albumList = await media.getAlbums(AlbumNoArgsfetchOp); + const album = albumList[0]; + album.albumName = 'hello'; + album.commitModify().then(() => { + console.info('commitModify successfully'); + }).catch((error) => { + console.error('commitModify failed with error: ' + error); + }); +} +``` + +### getFileAssets7+ + +getFileAssets(callback: AsyncCallback<FetchFileResult>): void + +Obtains the file assets in this album. This API uses an asynchronous callback to return the result. + +**Required permissions**: ohos.permission.READ_MEDIA + +**System capability**: SystemCapability.Multimedia.MediaLibrary.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | --------------------------------------------------- | ---- | ----------------------------------- | +| callback | AsyncCallback<[FetchFileResult](#fetchfileresult7)> | Yes | Callback used to return the file assets.| + +**Example** + +```js +async function example() { + // To obtain the file assets in an album, you must preset the album and resources. The sample code below presets 'New Album 1'. + let AlbumNoArgsfetchOp = { + selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', + selectionArgs:['New Album 1'], + }; + // Obtain the albums that meet the retrieval options and return the album list. + const albumList = await media.getAlbums(AlbumNoArgsfetchOp); + const album = albumList[0]; + // Obtain an album from the album list and obtain all media assets that meet the retrieval options in the album. + album.getFileAssets((error, fetchFileResult) => { + if (error) { + console.error('album getFileAssets failed with error: ' + error); + return; + } + let count = fetchFileResult.getCount(); + console.info('album getFileAssets successfully, count: ' + count); + fetchFileResult.close(); + }); } ``` @@ -2442,27 +2488,28 @@ Obtains the file assets in this album. This API uses an asynchronous callback to ```js async function example() { - let AlbumNoArgsfetchOp = { - selections: '', - selectionArgs: [], - }; - let fileNoArgsfetchOp = { - selections: '', - selectionArgs: [], + // To obtain the file assets in an album, you must preset the album and resources. The sample code below presets 'New Album 1'. + let AlbumNoArgsfetchOp = { + selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', + selectionArgs:['New Album 1'], + }; + let fileNoArgsfetchOp = { + selections: '', + selectionArgs: [], + } + // Obtain the albums that meet the retrieval options and return the album list. + const albumList = await media.getAlbums(AlbumNoArgsfetchOp); + const album = albumList[0]; + // Obtain an album from the album list and obtain all media assets that meet the retrieval options in the album. + album.getFileAssets(fileNoArgsfetchOp, (error, fetchFileResult) => { + if (error) { + console.error('album getFileAssets failed with error: ' + error); + return; } - // Obtain the albums that meet the retrieval options and return the album list. - const albumList = await media.getAlbums(AlbumNoArgsfetchOp); - const album = albumList[0]; - // Obtain an album from the album list and obtain all media assets that meet the retrieval options in the album. - album.getFileAssets(fileNoArgsfetchOp, (error, fetchFileResult) => { - if (error) { - console.error('album getFileAssets failed with error: ' + error); - return; - } - let count = fetchFileResult.getCount(); - console.info('album getFileAssets successfully, count: ' + count); - fetchFileResult.close(); - }); + let count = fetchFileResult.getCount(); + console.info('album getFileAssets successfully, count: ' + count); + fetchFileResult.close(); + }); } ``` @@ -2492,25 +2539,26 @@ Obtains the file assets in this album. This API uses a promise to return the res ```js async function example() { - let AlbumNoArgsfetchOp = { - selections: '', - selectionArgs: [], - }; - let fileNoArgsfetchOp = { - selections: '', - selectionArgs: [], - }; - // Obtain the albums that meet the retrieval options and return the album list. - const albumList = await media.getAlbums(AlbumNoArgsfetchOp); - const album = albumList[0]; - // Obtain an album from the album list and obtain all media assets that meet the retrieval options in the album. - album.getFileAssets(fileNoArgsfetchOp).then((fetchFileResult) => { - let count = fetchFileResult.getCount(); - console.info('album getFileAssets successfully, count: ' + count); - fetchFileResult.close(); - }).catch((error) => { - console.error('album getFileAssets failed with error: ' + error); - }); + // To obtain the file assets in an album, you must preset the album and resources. The sample code below presets 'New Album 1'. + let AlbumNoArgsfetchOp = { + selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', + selectionArgs:['New Album 1'], + }; + let fileNoArgsfetchOp = { + selections: '', + selectionArgs: [], + }; + // Obtain the albums that meet the retrieval options and return the album list. + const albumList = await media.getAlbums(AlbumNoArgsfetchOp); + const album = albumList[0]; + // Obtain an album from the album list and obtain all media assets that meet the retrieval options in the album. + album.getFileAssets(fileNoArgsfetchOp).then((fetchFileResult) => { + let count = fetchFileResult.getCount(); + console.info('album getFileAssets successfully, count: ' + count); + fetchFileResult.close(); + }).catch((error) => { + console.error('album getFileAssets failed with error: ' + error); + }); } ``` diff --git a/en/application-dev/reference/apis/js-apis-osAccount.md b/en/application-dev/reference/apis/js-apis-osAccount.md index ff49d8d1d84f03186de36aca3665b5729486bafe..ed266a44339d9af7e1cdb351dd305cf225a0b7d1 100644 --- a/en/application-dev/reference/apis/js-apis-osAccount.md +++ b/en/application-dev/reference/apis/js-apis-osAccount.md @@ -2433,7 +2433,7 @@ Unsubscribes from the OS account activation states, including the states of the | -------- | -------------------------- | ---- | ------------------------------------------------------------ | | type | 'activate' \| 'activating' | Yes | Type of the event to unsubscribe from. The value **activate** means an event indicating that an OS account is activated, and **activating** means an event indicating that an OS account is being activated.| | name | string | Yes | Subscription name, which can be customized. The value cannot be empty or exceed 1024 bytes, and must be the same as the value passed by **on()**.| -| callback | Callback<number> | No | Callback to unregister. By default, **0** is returned. | +| callback | Callback<number> | No | Callback for the OS account activation state events. By default, no value is passed, which unsubscribes from all the callbacks for the OS account activation state events. | **Error codes** @@ -5649,7 +5649,7 @@ Obtains authentication information of the specified type. This API uses a promis | Name | Type | Mandatory| Description | | -------- | ----------------------------------- | ---- | -------- | -| authType | [AuthType](#authtype8) | No | Authentication credential type.| +| authType | [AuthType](#authtype8) | No | Authentication type. By default, no value is passed, which means to obtain information about all authentication types.| **Return value** @@ -5929,12 +5929,14 @@ Defines the executor property. **System capability**: SystemCapability.Account.OsAccount -| Name | Type | Mandatory | Description | -| ------------ | ---------------------------------------- | ----- | ----------------- | -| result | number | Yes | Result. | -| authSubType | [AuthSubType](#authsubtype8) | Yes | Authentication credential subtype.| -| remainTimes | number | No | Number of remaining authentication times. | -| freezingTime | number | No | Freezing time. | +| Name | Type | Readable| Writable| Description | +| ------------ | ---------------------------- | ----- | -----|----------------- | +| result | number | Yes | Yes | Result. | +| authSubType | [AuthSubType](#authsubtype8) | Yes | Yes | Authentication credential subtype.| +| remainTimes | number | Yes | Yes | Number of remaining authentication times. | +| freezingTime | number | Yes | Yes | Freezing time. | +| enrollmentProgress10+ | string | Yes | Yes | Enrollment progress. By default, no value is passed.| +| sensorInfo10+ | string | Yes | Yes | Sensor information. By default, no value is passed.| ## AuthResult8+ @@ -5946,9 +5948,9 @@ Defines the authentication result information. | Name | Type | Mandatory | Description | | ------------ | ----------- | ----- | ----------------- | -| token | Uint8Array | No | Authentication token. | -| remainTimes | number | No | Number of remaining authentication times. | -| freezingTime | number | No | Freezing time. | +| token | Uint8Array | No | Authentication token. By default, no value is passed. | +| remainTimes | number | No | Number of remaining authentication times. By default, no value is passed. | +| freezingTime | number | No | Freezing time. By default, no value is passed. | ## CredentialInfo8+ @@ -5974,7 +5976,7 @@ Defines the request result information. | Name | Type | Mandatory | Description | | ------------ | ----------- | ----- | ----------------- | -| credentialId | Uint8Array | No | Credential ID. | +| credentialId | Uint8Array | No | Credential ID. By default, no value is passed. | ## EnrolledCredInfo8+ @@ -6004,6 +6006,8 @@ Enumerates the types of properties to obtain. | AUTH_SUB_TYPE | 1 | Authentication credential subtype.| | REMAIN_TIMES | 2 | Remaining time. | | FREEZING_TIME | 3 | Freezing time. | +| ENROLLMENT_PROGRESS10+ | 4 | Enrollment progress. | +| SENSOR_INFO10+ | 5 | Sensor information. | ## SetPropertyType8+ @@ -6047,6 +6051,9 @@ Enumerates the authentication credential subtypes. | PIN_MIXED | 10002 | Custom mixed credentials.| | FACE_2D | 20000 | 2D face credential. | | FACE_3D | 20001 | 3D face credential. | +| FINGERPRINT_CAPACITIVE10+ | 30000 | Capacitive fingerprint. | +| FINGERPRINT_OPTICAL10+ | 30001 | Optical fingerprint. | +| FINGERPRINT_ULTRASONIC10+ | 30002 | Ultrasonic fingerprint. | | DOMAIN_MIXED9+ | 10240001 | Mixed domain authentication credentials. | ## AuthTrustLevel8+ @@ -6136,6 +6143,8 @@ Enumerates the tip codes for fingerprint authentication. | FINGERPRINT_TIP_PARTIAL | 3 | Only part of the fingerprint image is detected. | | FINGERPRINT_TIP_TOO_FAST | 4 | The fingerprint image is incomplete due to quick motion. | | FINGERPRINT_TIP_TOO_SLOW | 5 | Failed to read the fingerprint image due to lack of motion. | +| FINGERPRINT_TIP_FINGER_DOWN10+ | 6 | Press your finger. | +| FINGERPRINT_TIP_FINGER_UP10+ | 7 | Lift your finger. | ## OsAccountInfo @@ -6148,16 +6157,16 @@ Defines the OS account information. | localId | number | Yes | ID of the target OS account. | | localName | string | Yes | OS account name. | | type | [OsAccountType](#osaccounttype) | Yes | OS account type. | -| constraints | Array<string> | No | [Constraints](#constraints) on the OS account.| +| constraints | Array<string> | No | OS account [Constraints](#constraints). By default, no value is passed.| | isVerified8+ | boolean | Yes | Whether to verify the OS account. | -| photo8+ | string | No | Profile photo of the OS account. | +| photo8+ | string | No | OS account avatar. By default, no value is passed. | | createTime8+ | number | Yes | Time when the OS account was created. | -| lastLoginTime8+ | number | No | Last login time of the OS account. | +| lastLoginTime8+ | number | No | Last login time of the OS account. By default, no value is passed. | | serialNumber8+ | number | Yes | SN of the OS account. | | isActived8+ | boolean | Yes | Whether the OS account is activated. | | isCreateCompleted8+ | boolean | Yes | Whether the OS account information is complete. | -| distributedInfo | [distributedAccount.DistributedInfo](js-apis-distributed-account.md) | No | Distributed account information. | -| domainInfo8+ | [DomainAccountInfo](#domainaccountinfo8) | No | Domain account information. | +| distributedInfo | [distributedAccount.DistributedInfo](js-apis-distributed-account.md) | No | Distributed account information. By default, no value is passed. | +| domainInfo8+ | [DomainAccountInfo](#domainaccountinfo8) | No | Domain account information. By default, no value is passed. | ## DomainAccountInfo8+ @@ -6169,7 +6178,7 @@ Defines the domain account information. | ----------- | ------ | ---- | ---------- | | domain | string | Yes | Domain name. | | accountName | string | Yes | Domain account name.| -| accountId10+ | string | No | Domain account ID.
**System API**: This is a system API.| +| accountId10+ | string | No | Domain account ID.
**System API**: It is a system API and is left blank by default.| ## Constraints diff --git a/en/application-dev/reference/apis/js-apis-pasteboard.md b/en/application-dev/reference/apis/js-apis-pasteboard.md index 600b027b296840203ff028c08d73a9e221a4c193..fc32728b9b20dc6cb88c8b3fb6bdaaefaf871df4 100644 --- a/en/application-dev/reference/apis/js-apis-pasteboard.md +++ b/en/application-dev/reference/apis/js-apis-pasteboard.md @@ -372,16 +372,18 @@ let record = pasteboard.createUriRecord('dataability:///com.example.myapplicatio Defines the properties of all data records on the pasteboard, including the timestamp, data type, and additional data. +The defined properties can be applied to the pasteboard only with the [setProperty](#setproperty9) API. + **System capability**: SystemCapability.MiscServices.Pasteboard -| Name| Type| Readable| Writable| Description | -| -------- | -------- | -------- | -------- |--------------------------------------------------------------------------------------------| -| additions7+ | {[key:string]:object} | Yes| Yes| Additional data. | -| mimeTypes7+ | Array<string> | Yes| No| Non-repeating data types of the data records on the pasteboard. | -| tag7+ | string | Yes| Yes| Custom tag. | -| timestamp7+ | number | Yes| No| Timestamp when data is written to the pasteboard (unit: ms). | -| localOnly7+ | boolean | Yes| Yes| Whether the pasteboard content is for local access only. The default value is **false**. This attribute is not supported currently. You are advised to use **shareOption** instead.
- **true**: The pasteboard content is set for local access only.
- **false**: The pasteboard content can be shared between devices.| -| shareOption9+ | [ShareOption](#shareoption9) | Yes| Yes| Where the pasteboard content can be pasted. If this attribute is set incorrectly or not set, the default value **CROSSDEVICE** is used. | +| Name| Type| Readable| Writable| Description | +| -------- | -------- | -------- | -------- |----------------| +| additions7+ | {[key:string]:object} | Yes| Yes| Additional data. | +| mimeTypes7+ | Array<string> | Yes| No| Non-repeating data types of the data records on the pasteboard. | +| tag7+ | string | Yes| Yes| Custom tag. | +| timestamp7+ | number | Yes| No| Timestamp when data is written to the pasteboard (unit: ms). | +| localOnly7+ | boolean | Yes| Yes| Whether the pasteboard content is for local access only. The default value is **false**. The value will be overwritten by the value of the **shareOption** attribute. You are advised to use the **shareOption** attribute instead. **ShareOption.INAPP** and **ShareOption.LOCALDEVICE** set **localOnly** to **true**, and **ShareOption.CROSSDEVICE** sets **localOnly** to false.
- **true**: The pasteboard content is set for local access only.
- **false**: The pasteboard content can be shared between devices.| +| shareOption9+ | [ShareOption](#shareoption9) | Yes| Yes| Where the pasteboard content can be pasted. If this attribute is set incorrectly or not set, the default value **CROSSDEVICE** is used.| ## PasteDataRecord7+ @@ -483,9 +485,9 @@ record.convertToText().then((data) => { ## PasteData -Provides **PasteData** APIs. +Implements a **PasteData** object. Paste data contains one or more data records ([PasteDataRecord](#pastedatarecord7)) and property description objects ([PasteDataProperty](#pastedataproperty7)). -Before calling any **PasteData** API, you must obtain a **PasteData** object. +Before calling any API in **PasteData**, you must use **[createData()](#pasteboardcreatedata9)** or **[getData()](#getdata9)** to create a **PasteData** object. **System capability**: SystemCapability.MiscServices.Pasteboard @@ -737,7 +739,7 @@ let property = pasteData.getProperty(); setProperty(property: PasteDataProperty): void -Sets the property (attributes) for the pasteboard data. Currently, only the **shareOption** attribute is supported. +Sets a [PasteDataProperty](#pastedataproperty7) object. **System capability**: SystemCapability.MiscServices.Pasteboard @@ -753,7 +755,28 @@ Sets the property (attributes) for the pasteboard data. Currently, only the **sh let pasteData = pasteboard.createData(pasteboard.MIMETYPE_TEXT_HTML, 'application/xml'); let prop = pasteData.getProperty(); prop.shareOption = pasteboard.ShareOption.INAPP; +prop.additions['TestOne'] = 123; +prop.additions['TestTwo'] = {'Test' : 'additions'}; +prop.tag = 'TestTag'; +pasteData.setProperty(prop); +``` +The **localOnly** and **shareOption** attributes of [PasteDataProperty](#pastedataproperty7) are mutually exclusive. The **shareOption** attribute prevails, and its value affect the value of **localOnly**. +```js +prop.shareOption = pasteboard.ShareOption.INAPP; +prop.localOnly = false; pasteData.setProperty(prop); +pasteData.localOnly //true + +prop.shareOption = pasteboard.ShareOption.LOCALDEVICE; +prop.localOnly = false; +pasteData.setProperty(prop); +pasteData.localOnly //true + +prop.shareOption = pasteboard.ShareOption.CROSSDEVICE; +prop.localOnly = true; +pasteData.setProperty(prop); +pasteData.localOnly //false + ``` ### getRecord9+ diff --git a/en/application-dev/reference/apis/js-apis-privacyManager.md b/en/application-dev/reference/apis/js-apis-privacyManager.md index 403d9a6db944073b19a80d1b086e4adc98d8f4dd..505ae1ec5d4c8eaa9f301f1adeaace7adb2173a0 100644 --- a/en/application-dev/reference/apis/js-apis-privacyManager.md +++ b/en/application-dev/reference/apis/js-apis-privacyManager.md @@ -59,7 +59,7 @@ import privacyManager from '@ohos.privacyManager'; let tokenID = 0; // You can use getApplicationInfo to obtain the access token ID. try { - privacyManager.addPermissionUsedRecord(tokenID, "ohos.permission.PERMISSION_USED_STATS", 1, 0).then(() => { + privacyManager.addPermissionUsedRecord(tokenID, 'ohos.permission.PERMISSION_USED_STATS', 1, 0).then(() => { console.log('addPermissionUsedRecord success'); }).catch((err) => { console.log(`addPermissionUsedRecord fail, err->${JSON.stringify(err)}`); @@ -88,7 +88,7 @@ The permission usage record includes the application identity (token ID) of the | permissionName | Permissions | Yes | Name of the permission.| | successCount | number | Yes | Number of successful accesses.| | failCount | number | Yes | Number of failed accesses.| -| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If a usage record is added successfully, **err** is **undefine**. Otherwise, **err** is an error object.| +| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If a usage record is added successfully, **err** is **undefined**. Otherwise, **err** is an error object.| **Error codes** @@ -109,7 +109,7 @@ import privacyManager from '@ohos.privacyManager'; let tokenID = 0; // You can use getApplicationInfo to obtain the access token ID. try { - privacyManager.addPermissionUsedRecord(tokenID, "ohos.permission.PERMISSION_USED_STATS", 1, 0, (err, data) => { + privacyManager.addPermissionUsedRecord(tokenID, 'ohos.permission.PERMISSION_USED_STATS', 1, 0, (err, data) => { if (err) { console.log(`addPermissionUsedRecord fail, err->${JSON.stringify(err)}`); } else { @@ -161,14 +161,14 @@ For details about the error codes, see [Ability Access Control Error Codes](../e import privacyManager from '@ohos.privacyManager'; let request = { - "tokenId": 1, - "isRemote": false, - "deviceId": "device", - "bundleName": "bundle", - "permissionNames": [], - "beginTime": 0, - "endTime": 1, - "flag":privacyManager.PermissionUsageFlag.FLAG_PERMISSION_USAGE_DETAIL, + 'tokenId': 1, + 'isRemote': false, + 'deviceId': 'device', + 'bundleName': 'bundle', + 'permissionNames': [], + 'beginTime': 0, + 'endTime': 1, + 'flag':privacyManager.PermissionUsageFlag.FLAG_PERMISSION_USAGE_DETAIL, }; try { privacyManager.getPermissionUsedRecord(request).then((data) => { @@ -196,7 +196,7 @@ Obtains historical permission usage records. This API uses an asynchronous callb | Name | Type | Mandatory| Description | | -------- | ------------------- | ---- | ------------------------------------------ | | request | [PermissionUsedRequest](#permissionusedrequest) | Yes| Request for querying permission usage records.| -| callback | AsyncCallback<[PermissionUsedResponse](#permissionusedresponse)> | Yes| Callback invoked to return the result. If the query is successful, **err** is **undefine** and **data** is the permission usage record. Otherwise, **err** is an error object.| +| callback | AsyncCallback<[PermissionUsedResponse](#permissionusedresponse)> | Yes| Callback invoked to return the result. If the query is successful, **err** is **undefined** and **data** is the permission usage record. Otherwise, **err** is an error object.| **Error codes** @@ -216,14 +216,14 @@ For details about the error codes, see [Ability Access Control Error Codes](../e import privacyManager from '@ohos.privacyManager'; let request = { - "tokenId": 1, - "isRemote": false, - "deviceId": "device", - "bundleName": "bundle", - "permissionNames": [], - "beginTime": 0, - "endTime": 1, - "flag":privacyManager.PermissionUsageFlag.FLAG_PERMISSION_USAGE_DETAIL, + 'tokenId': 1, + 'isRemote': false, + 'deviceId': 'device', + 'bundleName': 'bundle', + 'permissionNames': [], + 'beginTime': 0, + 'endTime': 1, + 'flag':privacyManager.PermissionUsageFlag.FLAG_PERMISSION_USAGE_DETAIL, }; try { privacyManager.getPermissionUsedRecord(request, (err, data) => { @@ -281,7 +281,7 @@ import privacyManager from '@ohos.privacyManager'; let tokenID = 0; // You can use getApplicationInfo to obtain the access token ID. try { - privacyManager.startUsingPermission(tokenID, "ohos.permission.PERMISSION_USED_STATS").then(() => { + privacyManager.startUsingPermission(tokenID, 'ohos.permission.PERMISSION_USED_STATS').then(() => { console.log('startUsingPermission success'); }).catch((err) => { console.log(`startUsingPermission fail, err->${JSON.stringify(err)}`); @@ -307,7 +307,7 @@ Starts to use a permission and flushes the permission usage record. This API is | -------------- | --------------------- | ---- | ------------------------------------ | | tokenID | number | Yes | Application token ID of the invoker. The value can be obtained from [ApplicationInfo](js-apis-bundle-ApplicationInfo.md).| | permissionName | Permissions | Yes | Permission to use. | -| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the permission is successfully used, **err** is **undefine**. Otherwise, **err** is an error object.| +| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the permission is successfully used, **err** is **undefined**. Otherwise, **err** is an error object.| **Error codes** @@ -329,7 +329,7 @@ import privacyManager from '@ohos.privacyManager'; let tokenID = 0; // You can use getApplicationInfo to obtain the access token ID. try { - privacyManager.startUsingPermission(tokenID, "ohos.permission.PERMISSION_USED_STATS", (err, data) => { + privacyManager.startUsingPermission(tokenID, 'ohos.permission.PERMISSION_USED_STATS', (err, data) => { if (err) { console.log(`startUsingPermission fail, err->${JSON.stringify(err)}`); } else { @@ -384,7 +384,7 @@ import privacyManager from '@ohos.privacyManager'; let tokenID = 0; // You can use getApplicationInfo to obtain the access token ID. try { - privacyManager.stopUsingPermission(tokenID, "ohos.permission.PERMISSION_USED_STATS").then(() => { + privacyManager.stopUsingPermission(tokenID, 'ohos.permission.PERMISSION_USED_STATS').then(() => { console.log('stopUsingPermission success'); }).catch((err) => { console.log(`stopUsingPermission fail, err->${JSON.stringify(err)}`); @@ -410,7 +410,7 @@ Stops using a permission. This API is called by a system application and uses a | -------------- | --------------------- | ---- | ------------------------------------ | | tokenID | number | Yes | Application token ID of the invoker. The value can be obtained from [ApplicationInfo](js-apis-bundle-ApplicationInfo.md).| | permissionName | Permissions | Yes | Permission to use. | -| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefine**. Otherwise, **err** is an error object.| +| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error object.| **Error codes** @@ -432,7 +432,7 @@ import privacyManager from '@ohos.privacyManager'; let tokenID = 0; // You can use getApplicationInfo to obtain the access token ID. try { - privacyManager.stopUsingPermission(tokenID, "ohos.permission.PERMISSION_USED_STATS", (err, data) => { + privacyManager.stopUsingPermission(tokenID, 'ohos.permission.PERMISSION_USED_STATS', (err, data) => { if (err) { console.log(`stopUsingPermission fail, err->${JSON.stringify(err)}`); } else { @@ -482,7 +482,7 @@ import privacyManager from '@ohos.privacyManager'; let permissionList = []; try { privacyManager.on('activeStateChange', permissionList, (data) => { - console.debug("receive permission state change, data:" + JSON.stringify(data)); + console.debug('receive permission state change, data:' + JSON.stringify(data)); }); } catch(err) { console.log(`catch err->${JSON.stringify(err)}`); @@ -514,7 +514,7 @@ For details about the error codes, see [Ability Access Control Error Codes](../e | ID| Error Message| | -------- | -------- | | 12100001 | The permissionNames in the list are all invalid, or the list size exceeds 1024 bytes. | -| 12100004 | The interface is not used together with "on()".| +| 12100004 | The interface is not used together with 'on'.| | 12100007 | Service is abnormal. | | 12100008 | Out of memory. | @@ -550,14 +550,14 @@ Represents the request for querying permission usage records. | Name | Type | Mandatory | Description | | -------- | -------------- | ---- | ---------------------------------------- | -| tokenId | number | No | Token ID of the application (invoker). | -| isRemote | boolean | No | Whether the token ID belongs to the application on a remote device. The default value is **false**.| -| deviceId | string | No | ID of the device hosting the target application. | -| bundleName | string | No | Bundle name of the target application.| -| permissionNames | Array<Permissions> | No | Permissions to query. | -| beginTime | number | No | Start time of the query, in ms. The default value is **0**, indicating that no start time is set.| -| endTime | number | No | End time of the query, in ms. The default value is **0**, indicating that no end time is set.| -| flag | [PermissionUsageFlag](#permissionusageflag) | Yes | Query mode. The default value is **FLAG_PERMISSION_USAGE_SUMMARY**.| +| tokenId | number | No | Token ID of the application (invoker).
By default, all applications are queried. | +| isRemote | boolean | No | Whether to query the permission usage records of the remote device.
The default value is **false**, which means the permission usage records of the local device are queried by default.| +| deviceId | string | No | ID of the device hosting the target application.
The default value is the local device ID. | +| bundleName | string | No | Bundle name of the target application.
By default, all applications are queried.| +| permissionNames | Array<Permissions> | No | Permissions to query.
By default, the usage records of all permissions are queried. | +| beginTime | number | No | Start time of the query, in ms.
The default value is **0**, which means the start time is not set.| +| endTime | number | No | End time of the query, in ms.
The default value is **0**, which means the end time is not set.| +| flag | [PermissionUsageFlag](#permissionusageflag) | Yes | Query mode.| ## PermissionUsedResponse @@ -567,9 +567,9 @@ Represents the permission usage records of all applications. | Name | Type | Mandatory | Description | | -------- | -------------- | ---- | ---------------------------------------- | -| beginTime | number | No | Start time of the query, in ms.| -| endTime | number | No | End time of the query, in ms.| -| bundleRecords | Array<[BundleUsedRecord](#bundleusedrecord)> | No | Permission usage records. | +| beginTime | number | Yes | Start time of the query, in ms.| +| endTime | number | Yes | End time of the query, in ms.| +| bundleRecords | Array<[BundleUsedRecord](#bundleusedrecord)> | Yes | Permission usage records. | ## BundleUsedRecord @@ -579,11 +579,11 @@ Represents the permission access records of an application. | Name | Type | Mandatory | Description | | -------- | -------------- | ---- | ---------------------------------------- | -| tokenId | number | No | Token ID of the application (invoker). | -| isRemote | boolean | No | Whether the token ID belongs to the application on a remote device. The default value is **false**.| -| deviceId | string | No | ID of the device hosting the target application. | -| bundleName | string | No | Bundle name of the target application.| -| permissionRecords | Array<[PermissionUsedRecord](#permissionusedrecord)> | No | Permission usage records of the target application. | +| tokenId | number | Yes | Token ID of the application (invoker). | +| isRemote | boolean | Yes | Whether the token ID belongs to the application on a remote device. The default value is **false**.| +| deviceId | string | Yes | ID of the device hosting the target application. | +| bundleName | string | Yes | Bundle name of the target application.| +| permissionRecords | Array<[PermissionUsedRecord](#permissionusedrecord)> | Yes | Permission usage records of the target application. | ## PermissionUsedRecord @@ -593,14 +593,14 @@ Represents the usage records of a permission. | Name | Type | Mandatory | Description | | -------- | -------------- | ---- | ---------------------------------------- | -| permissionName | Permissions | No | Name of the permission. | -| accessCount | number | No | Total number of times that the permission is accessed.| -| rejectCount | number | No | Total number of times that the access to the permission is rejected.| -| lastAccessTime | number | No | Last time when the permission was accessed, accurate to ms.| -| lastRejectTime | number | No | Last time when the access to the permission was rejected, accurate to ms.| -| lastAccessDuration | number | No | Last access duration, in ms.| -| accessRecords | Array<[UsedRecordDetail](#usedrecorddetail)> | No | Successful access records. This parameter is valid only when **flag** is **FLAG_PERMISSION_USAGE_SUMMARY**. By default, 10 records are provided. | -| rejectRecords | Array<[UsedRecordDetail](#usedrecorddetail)> | No | Rejected access records. This parameter is valid only when **flag** is **FLAG_PERMISSION_USAGE_SUMMARY**. By default, 10 records are provided. | +| permissionName | Permissions | Yes | Name of the permission. | +| accessCount | number | Yes | Total number of times that the permission is accessed.| +| rejectCount | number | Yes | Total number of times that the access to the permission is rejected.| +| lastAccessTime | number | Yes | Last time when the permission was accessed, accurate to ms.| +| lastRejectTime | number | Yes | Last time when the access to the permission was rejected, accurate to ms.| +| lastAccessDuration | number | Yes | Last access duration, in ms.| +| accessRecords | Array<[UsedRecordDetail](#usedrecorddetail)> | Yes | Successful access records. This parameter is valid only when **flag** is **FLAG_PERMISSION_USAGE_SUMMARY**. By default, 10 records are provided. | +| rejectRecords | Array<[UsedRecordDetail](#usedrecorddetail)> | Yes | Rejected access records. This parameter is valid only when **flag** is **FLAG_PERMISSION_USAGE_SUMMARY**. By default, 10 records are provided. | ## UsedRecordDetail @@ -610,9 +610,9 @@ Represents the details of a single access record. | Name | Type | Mandatory | Description | | -------- | -------------- | ---- | ---------------------------------------- | -| status | number | No | Access status. | -| timestamp | number | No | Access timestamp, in ms.| -| accessDuration | number | No | Access duration, in ms. | +| status | number | Yes | Access status. | +| timestamp | number | Yes | Access timestamp, in ms.| +| accessDuration | number | Yes | Access duration, in ms. | ## PermissionActiveStatus diff --git a/en/application-dev/reference/apis/js-apis-reminderAgent.md b/en/application-dev/reference/apis/js-apis-reminderAgent.md index dc0a33ab0c33f9978b1985e5962067c2f2097cc2..0c7fa19432c45e801f82b2892d47fa9ed384ea4e 100644 --- a/en/application-dev/reference/apis/js-apis-reminderAgent.md +++ b/en/application-dev/reference/apis/js-apis-reminderAgent.md @@ -20,9 +20,7 @@ import reminderAgent from'@ohos.reminderAgent'; ## reminderAgent.publishReminder(deprecated) -```ts publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback\): void -``` Publishes a reminder through the reminder agent. This API uses an asynchronous callback to return the result. It can be called only when notification is enabled for the application through [Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8). @@ -39,7 +37,7 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.| - | callback | AsyncCallback\ | Yes| Callback used to return the published reminder's ID.| + | callback | AsyncCallback\ | Yes| Callback used to return the published reminder's ID.| **Example** ```ts @@ -56,9 +54,7 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c ## reminderAgent.publishReminder(deprecated) -```ts publishReminder(reminderReq: ReminderRequest): Promise\ -``` Publishes a reminder through the reminder agent. This API uses a promise to return the result. It can be called only when notification is enabled for the application through [Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8). @@ -78,7 +74,7 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu **Return value** | Type| Description| | -------- | -------- | - | Promise\ | Promise used to return the published reminder's ID.| + | Promise\ | Promise used to return the published reminder's ID.| **Example** ```ts @@ -95,9 +91,7 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu ## reminderAgent.cancelReminder(deprecated) -```ts cancelReminder(reminderId: number, callback: AsyncCallback\): void -``` Cancels the reminder with the specified ID. This API uses an asynchronous callback to return the cancellation result. @@ -112,7 +106,7 @@ Cancels the reminder with the specified ID. This API uses an asynchronous callba | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | reminderId | number | Yes| ID of the reminder to cancel. The value is obtained by calling [publishReminder](#reminderagentpublishreminder).| -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| callback | AsyncCallback\ | Yes| Callback used to return the result.| **Example** @@ -125,9 +119,7 @@ reminderAgent.cancelReminder(1, (err, data) => { ## reminderAgent.cancelReminder(deprecated) -```ts cancelReminder(reminderId: number): Promise\ -``` Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result. @@ -147,7 +139,7 @@ Cancels the reminder with the specified ID. This API uses a promise to return th | Type| Description| | -------- | -------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise used to return the result.| **Example** @@ -159,9 +151,7 @@ reminderAgent.cancelReminder(1).then(() => { ## reminderAgent.getValidReminders(deprecated) -```ts getValidReminders(callback: AsyncCallback\>): void -``` Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the reminders. @@ -175,7 +165,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| callback | AsyncCallback\\> | Yes| Callback used to return an array of all valid reminders set by the current application.| +| callback | AsyncCallback\> | Yes| Callback used to return an array of all valid reminders set by the current application.| **Example** @@ -209,9 +199,7 @@ reminderAgent.getValidReminders((err, reminders) => { ## reminderAgent.getValidReminders(deprecated) -```ts getValidReminders(): Promise\> -``` Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the reminders. @@ -225,7 +213,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th | Type| Description| | -------- | -------- | -| Promise\\> | Promise used to return an array of all valid reminders set by the current application.| +| Promise\> | Promise used to return an array of all valid reminders set by the current application.| **Example** @@ -259,9 +247,7 @@ reminderAgent.getValidReminders().then((reminders) => { ## reminderAgent.cancelAllReminders(deprecated) -```ts cancelAllReminders(callback: AsyncCallback\): void -``` Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result. @@ -275,7 +261,7 @@ Cancels all reminders set by the current application. This API uses an asynchron | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| callback | AsyncCallback\ | Yes| Callback used to return the result.| **Example** @@ -288,9 +274,7 @@ reminderAgent.cancelAllReminders((err, data) =>{ ## reminderAgent.cancelAllReminders(deprecated) -```ts cancelAllReminders(): Promise\ -``` Cancels all reminders set by the current application. This API uses a promise to return the cancellation result. @@ -304,7 +288,7 @@ Cancels all reminders set by the current application. This API uses a promise to | Type| Description| | -------- | -------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise used to return the result.| **Example** @@ -316,9 +300,7 @@ reminderAgent.cancelAllReminders().then(() => { ## reminderAgent.addNotificationSlot(deprecated) -```ts addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback\): void -``` Adds a notification slot. This API uses an asynchronous callback to return the result. @@ -333,7 +315,7 @@ Adds a notification slot. This API uses an asynchronous callback to return the r | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Notification slot, whose type can be set.| -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| callback | AsyncCallback\ | Yes| Callback used to return the result.| **Example** @@ -351,9 +333,7 @@ reminderAgent.addNotificationSlot(mySlot, (err, data) => { ## reminderAgent.addNotificationSlot(deprecated) -```ts addNotificationSlot(slot: NotificationSlot): Promise\ -``` Adds a notification slot. This API uses a promise to return the result. @@ -373,7 +353,7 @@ Adds a notification slot. This API uses a promise to return the result. | Type| Description| | -------- | -------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise used to return the result.| **Example** @@ -391,9 +371,7 @@ reminderAgent.addNotificationSlot(mySlot).then(() => { ## reminderAgent.removeNotificationSlot(deprecated) -```ts removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback): void -``` Removes a notification slot of a specified type. This API uses an asynchronous callback to return the result. @@ -408,7 +386,7 @@ Removes a notification slot of a specified type. This API uses an asynchronous c | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the reminder notification slot to remove.| -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| callback | AsyncCallback\ | Yes| Callback used to return the result.| **Example** @@ -423,9 +401,7 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, ## reminderAgent.removeNotificationSlot(deprecated) -```ts removeNotificationSlot(slotType: notification.SlotType): Promise -``` Removes a notification slot of a specified type. This API uses a promise to return the result. @@ -445,7 +421,7 @@ Removes a notification slot of a specified type. This API uses a promise to retu | Type| Description| | -------- | -------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise used to return the result.| **Example** @@ -568,7 +544,6 @@ Defines the reminder to publish. ## ReminderRequestCalendar(deprecated) -ReminderRequestCalendar extends ReminderRequest Defines a reminder for a calendar event. @@ -581,13 +556,12 @@ Defines a reminder for a calendar event. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.| -| repeatMonths | Array\ | No| Month in which the reminder repeats.| -| repeatDays | Array\ | No| Date on which the reminder repeats.| +| repeatMonths | Array\ | No| Month in which the reminder repeats.| +| repeatDays | Array\ | No| Date on which the reminder repeats.| ## ReminderRequestAlarm(deprecated) -ReminderRequestAlarm extends ReminderRequest Defines a reminder for an alarm. @@ -601,13 +575,11 @@ Defines a reminder for an alarm. | -------- | -------- | -------- | -------- | | hour | number | Yes| Hour portion of the reminder time.| | minute | number | Yes| Minute portion of the reminder time.| -| daysOfWeek | Array\ | No| Days of a week when the reminder repeats. The value ranges from 1 to 7, corresponding to the data from Monday to Sunday.| +| daysOfWeek | Array\ | No| Days of a week when the reminder repeats. The value ranges from 1 to 7, corresponding to the data from Monday to Sunday.| ## ReminderRequestTimer(deprecated) -ReminderRequestTimer extends ReminderRequest - Defines a reminder for a scheduled timer. > **NOTE** diff --git a/en/application-dev/reference/apis/js-apis-reminderAgentManager.md b/en/application-dev/reference/apis/js-apis-reminderAgentManager.md index 7ec9eeb2c2070acee07603811e0bbd6417590555..87a8ea3167b1cc125eb8e2bf5e30b4cfe54cc5a3 100644 --- a/en/application-dev/reference/apis/js-apis-reminderAgentManager.md +++ b/en/application-dev/reference/apis/js-apis-reminderAgentManager.md @@ -170,7 +170,7 @@ Cancels the reminder with the specified ID. This API uses a promise to return th | Type| Description| | -------- | -------- | -| PPromise\ | Promise used to return the result.| +| Promise\ | Promise used to return the result.| **Error codes** @@ -611,7 +611,7 @@ Defines the reminder to publish. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | reminderType | [ReminderType](#remindertype) | Yes| Type of the reminder.| -| actionButton10+ | [ActionButton](#actionbutton) | No| Button displayed for the reminder in the notification panel. For common applications, a maximum of two buttons are supported. For system applications, a maximum of two buttons are supported in API version 9, and a maximum of three buttons are supported in API version 10 and later versions. | +| actionButton10+ | [ActionButton](#actionbutton) | No| Button displayed for the reminder in the notification panel. For common applications, a maximum of two buttons are supported. For system applications, a maximum of two buttons are supported in API version 9, and a maximum of three buttons are supported in API version 10 and later versions.| | wantAgent | [WantAgent](#wantagent) | No| Information about the ability that is redirected to when the reminder is clicked.| | maxScreenWantAgent | [MaxScreenWantAgent](#maxscreenwantagent) | No| Information about the ability that is automatically started when the reminder arrives. If the device is in use, a notification will be displayed.| | ringDuration | number | No| Ringing duration, in seconds. The default value is **1**.| diff --git a/en/application-dev/reference/apis/js-apis-system-device.md b/en/application-dev/reference/apis/js-apis-system-device.md index ea1eadb9ab116dc938190e3356e1c4c73d5ce821..5ba2b2cfd48f7b4479af1e01c45fff968618bdc5 100644 --- a/en/application-dev/reference/apis/js-apis-system-device.md +++ b/en/application-dev/reference/apis/js-apis-system-device.md @@ -63,7 +63,6 @@ Provides the device information. | screenDensity4+ | number | Screen density.| | screenShape4+ | string | Screen shape. The options are as follows:
- **rect**: rectangular screen
- **circle**: round screen| | apiVersion4+ | number | API version.| -| releaseType4+ | string | Release type. The value includes both the release type and the API version, for example, Beta1.
Available release types are as follows:
- **Canary**: Releases of this type are compatible with each other under the same API version, but not with those of the **beta** and **release** type.
- **Beta**: Releases of this type are compatible with each other under the same API version, but not with those of the **release** type.
- **Release**: Releases of this type are compatible with the latest five API versions.| | deviceType4+ | string | Device type.| diff --git a/en/application-dev/reference/apis/js-apis-systemSoundManager.md b/en/application-dev/reference/apis/js-apis-systemSoundManager.md new file mode 100644 index 0000000000000000000000000000000000000000..3689684d5d4d547c4ca5b5e8c60f94d7c80cc833 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-systemSoundManager.md @@ -0,0 +1,268 @@ +# @ohos.multimedia.systemSoundManager (System Sound Management) + +The **systemSoundManager** module provides basic capabilities for managing system sounds, including setting and obtaining system ringtones and obtaining a player to play the system ringtone. + +> **NOTE** +> +> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> +> The APIs provided by this module are system APIs. + +## Modules to Import + +```js +import systemSoundManager from '@ohos.multimedia.systemSoundManager'; +``` + +## RingtoneType + +Enumerates the ringtone types. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +| Name | Value | Description | +| ------------------------------- | ------ | -------------------------------------------- | +| RINGTONE_TYPE_DEFAULT | 0 | Default ringtone type. | +| RINGTONE_TYPE_MULTISIM | 1 | Multi-SIM ringtone type. | + +## systemSoundManager.getSystemSoundManager + +getSystemSoundManager(): SystemSoundManager + +Obtains a system sound manager. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Return value** + +| Type | Description | +| ----------------------------- | ------------ | +| [SystemSoundManager](#systemsoundmanager) | System sound manager obtained.| + +**Example** +```js +let systemSoundManagerInstance = systemSoundManager.getSystemSoundManager(); +``` + +## SystemSoundManager + +Provides APIs to manage system sounds. Before calling any API in **SystemSoundManager**, you must use [getSystemSoundManager](#systemsoundmanagergetsystemsoundmanager) to create a **SystemSoundManager** instance. + +### setSystemRingtoneUri + +setSystemRingtoneUri(context: Context, uri: string, type: RingtoneType, callback: AsyncCallback<void>): void + +Sets a URI for the system ringtone. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ---------------------------------------- | ---- | ------------------------ | +| context | Context | Yes | Application context. | +| uri | string | Yes | URI of the system ringtone. For details, see [media.AVPlayer](js-apis-media.md#avplayer9).| +| type | [RingtoneType](#ringtonetype) | Yes | Type of the system ringtone. | +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | + +**Example** + +```js +let context = this.context; +let uri = 'file://data/test.wav'; // Set the URI of the target ringtone file. +let type = systemSoundManager.RingtoneType.RINGTONE_TYPE_DEFAULT; + +systemSoundManagerInstance.setSystemRingtoneUri(context, uri, type, (err) => { + if (err) { + console.error(`Failed to set system ringtone uri. ${err}`); + return; + } + console.info(`Callback invoked to indicate a successful setting of the system ringtone uri.`); +}); +``` + +### setSystemRingtoneUri + +setSystemRingtoneUri(context: Context, uri: string, type: RingtoneType): Promise<void> + +Sets a URI for the system ringtone. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ---------------------------------------- | ---- | ------------------------ | +| context | Context | Yes | Application context. | +| uri | string | Yes | URI of the system ringtone. For details, see [media.AVPlayer](js-apis-media.md#avplayer9).| +| type | [RingtoneType](#ringtonetype) | Yes | Type of the system ringtone. | + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------- | +| Promise<void> | Promise used to return the result. | + +**Example** + +```js +let context = this.context; +let uri = 'file://data/test.wav'; // Set the URI of the target ringtone file. +let type = systemSoundManager.RingtoneType.RINGTONE_TYPE_DEFAULT; + +systemSoundManagerInstance.setSystemRingtoneUri(context, uri, type).then(() => { + console.info(`Promise returned to indicate a successful setting of the system ringtone uri.`); +}).catch ((err) => { + console.error(`Failed to set the system ringtone uri ${err}`); +}); +``` + +### getSystemRingtoneUri + +getSystemRingtoneUri(context: Context, type: RingtoneType, callback: AsyncCallback<string>): void + +Obtains the URI of a system ringtone. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ---------------------------------------- | ---- | ------------------------ | +| context | Context | Yes | Application context. | +| type | [RingtoneType](#ringtonetype) | Yes | Type of the system ringtone. | +| callback | AsyncCallback<string> | Yes | Callback used to return the ringtone URI obtained.| + +**Example** + +```js +let context = this.context; +let type = systemSoundManager.RingtoneType.RINGTONE_TYPE_DEFAULT; + +systemSoundManagerInstance.getSystemRingtoneUri(context, type, (err, value) => { + if (err) { + console.error(`Failed to get system ringtone uri. ${err}`); + return; + } + console.info(`Callback invoked to indicate the value of the system ringtone uri is obtained ${value}.`); +}); +``` + +### getSystemRingtoneUri + +getSystemRingtoneUri(context: Context, type: RingtoneType): Promise<string> + +Obtains the URI of a system ringtone. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ---------------------------------------- | ---- | ------------------------ | +| context | Context | Yes | Application context. | +| type | [RingtoneType](#ringtonetype) | Yes | Type of the system ringtone. | + +**Return value** + +| Type | Description | +| ------------------- | ---------------------------------- | +| Promise<string> | Promise used to return the ringtone URI obtained.| + +**Example** + +```js +let context = this.context; +let type = systemSoundManager.RingtoneType.RINGTONE_TYPE_DEFAULT; + +systemSoundManagerInstance.getSystemRingtoneUri(context, type).then((value) => { + console.info(`Promise returned to indicate that the value of the system ringtone uri is obtained ${value}.`); +}).catch ((err) => { + console.error(`Failed to get the system ringtone uri ${err}`); +}); +``` + +### getSystemRingtonePlayer + +getSystemRingtonePlayer(context: Context, type: RingtoneType, callback: AsyncCallback<RingtonePlayer>): void + +Obtains a player to play the system ringtone. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | --------------------------- | +| context | Context | Yes | Application context. | +| type | [RingtoneType](#ringtonetype) | Yes | Type of the system ringtone.| +| callback | AsyncCallback<[RingtonePlayer](js-apis-inner-multimedia-ringtonePlayer.md#ringtoneplayer)> | Yes| Callback used to return the ringtone player obtained.| + +**Example** + +```js +let context = this.context; +let type = systemSoundManager.RingtoneType.RINGTONE_TYPE_DEFAULT; +let systemRingtonePlayer = null; + +systemSoundManagerInstance.getSystemRingtonePlayer(context, type, (err, value) => { + if (err) { + console.error(`Failed to get system ringtone player. ${err}`); + return; + } + console.info(`Callback invoked to indicate the value of the system ringtone player is obtained.`); + systemRingtonePlayer = value; +}); +``` + +### getSystemRingtonePlayer + +getSystemRingtonePlayer(context: Context, type: RingtoneType): Promise<RingtonePlayer> + +Obtains a player to play the system ringtone. This API uses a promise to return the result. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Multimedia.SystemSound.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | -----------------------------------------| ---- | --------------------------- | +| context | Context | Yes | Application context. | +| type | [RingtoneType](#ringtonetype) | Yes | Type of the system ringtone.| + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------- | +| Promise<[RingtonePlayer](js-apis-inner-multimedia-ringtonePlayer.md#ringtoneplayer)> | Promise used to return the ringtone player obtained.| + +**Example** + +```js +let context = this.context; +let type = systemSoundManager.RingtoneType.RINGTONE_TYPE_DEFAULT; +let systemRingtonePlayer = null; + +systemSoundManagerInstance.getSystemRingtonePlayer(context, type).then((value) => { + console.info(`Promise returned to indicate that the value of the system ringtone player is obtained.`); + systemRingtonePlayer = value; +}).catch ((err) => { + console.error(`Failed to get the system ringtone player ${err}`); +}); +``` diff --git a/en/application-dev/reference/apis/js-apis-taskpool.md b/en/application-dev/reference/apis/js-apis-taskpool.md index 4eb81b7153748544ead741b01fb8d3cdb334ea93..6de1a67d7af88229266bbdac7a4adb853479bb03 100644 --- a/en/application-dev/reference/apis/js-apis-taskpool.md +++ b/en/application-dev/reference/apis/js-apis-taskpool.md @@ -1,10 +1,10 @@ -# @ohos.taskpool (Using the Task Pool) +# @ohos.taskpool (Starting the Task Pool) The task pool provides a multi-thread running environment for applications. It helps reduce resource consumption and improve system performance. It also frees you from caring about the lifecycle of thread instances. You can use the **TaskPool** APIs to create background tasks and perform operations on them, for example, executing or canceling a task. Theoretically, you can create an unlimited number of tasks, but this is not recommended for memory considerations. In addition, you are not advised performing blocking operations in a task, especially indefinite blocking. Long-time blocking operations occupy worker threads and may block other task scheduling, adversely affecting your application performance. -You can determine the execution sequence of tasks with the same priority. They are executed in the same sequence as you call the task execution APIs. The default task priority is **MEDIUM**. (The task priority mechanism is not supported yet.) +You can determine the execution sequence of tasks with the same priority. They are executed in the same sequence as you call the task execution APIs. The default task priority is **MEDIUM**. -If the number of tasks to be executed is greater than the number of worker threads in the task pool, the task pool scales out based on load balancing to minimize the waiting duration. Similarly, when the number of tasks to be executed falls below the number of worker threads, the task pool scales in to reduce the number of worker threads. (The load balancing mechanism is not supported yet.) +If the number of tasks to be executed is greater than the number of worker threads in the task pool, the task pool scales out based on load balancing to minimize the waiting duration. Similarly, when the number of tasks to be executed falls below the number of worker threads, the task pool scales in to reduce the number of worker threads. The **TaskPool** APIs return error codes in numeric format. For details about the error codes, see [Utils Error Codes](../errorcodes/errorcode-utils.md). @@ -32,13 +32,13 @@ Enumerates the priorities available for created tasks. **Example** ```ts -function func(args) { - "use concurrent"; - console.log("func: " + args); +@Concurrent +function printArgs(args) { + console.log("printArgs: " + args); return args; } -async function taskpoolTest() { - let task = new taskpool.Task(func, 100); +async function taskpoolPriority() { + let task = new taskpool.Task(printArgs, 100); let highCount = 0; let mediumCount = 0; @@ -65,7 +65,7 @@ async function taskpoolTest() { }) } } -taskpoolTest(); +taskpoolPriority(); ``` ## Task @@ -99,12 +99,12 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ```ts @Concurrent -function func(args) { - console.log("func: " + args); +function printArgs(args) { + console.log("printArgs: " + args); return args; } -let task = new taskpool.Task(func, "this is my first Task"); +let task = new taskpool.Task(printArgs, "this is my first Task"); ``` ### Attributes @@ -151,17 +151,17 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ```ts @Concurrent -function func(args) { - console.log("func: " + args); +function printArgs(args) { + console.log("printArgs: " + args); return args; } -async function taskpoolTest() { - let value = await taskpool.execute(func, 100); +async function taskpoolExecute() { + let value = await taskpool.execute(printArgs, 100); console.log("taskpool result: " + value); } -taskpoolTest(); +taskpoolExecute(); ``` ## taskpool.execute @@ -199,18 +199,18 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ```ts @Concurrent -function func(args) { - console.log("func: " + args); +function printArgs(args) { + console.log("printArgs: " + args); return args; } -async function taskpoolTest() { - let task = new taskpool.Task(func, 100); +async function taskpoolExecute() { + let task = new taskpool.Task(printArgs, 100); let value = await taskpool.execute(task); console.log("taskpool result: " + value); } -taskpoolTest(); +taskpoolExecute(); ``` ## taskpool.cancel @@ -239,14 +239,14 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco **Example of successful task cancellation** ```ts -function func(args) { - "use concurrent"; - console.log("func: " + args); +@Concurrent +function printArgs(args) { + console.log("printArgs: " + args); return args; } -async function taskpoolTest() { - let task = new taskpool.Task(func, 100); +async function taskpoolCancel() { + let task = new taskpool.Task(printArgs, 100); taskpool.execute(task); try { taskpool.cancel(task); @@ -255,20 +255,20 @@ async function taskpoolTest() { } } -taskpoolTest(); +taskpoolCancel(); ``` **Example of a failure to cancel a task that has been executed** ```ts -function func(args) { - "use concurrent"; - console.log("func: " + args); +@Concurrent +function printArgs(args) { + console.log("printArgs: " + args); return args; } -async function taskpoolTest() { - let task = new taskpool.Task(func, 100); +async function taskpoolCancel() { + let task = new taskpool.Task(printArgs, 100); let value = taskpool.execute(task); let start = new Date().getTime(); while (new Date().getTime() - start < 1000) {// Wait for 1s to ensure that the task has been executed. @@ -282,25 +282,25 @@ async function taskpoolTest() { } } -taskpoolTest(); +taskpoolCancel(); ``` **Example of a failure to cancel an ongoing task** ```ts -function func(args) { - "use concurrent"; - console.log("func: " + args); +@Concurrent +function printArgs(args) { + console.log("printArgs: " + args); return args; } -async function taskpoolTest() { - let task1 = new taskpool.Task(func, 100); - let task2 = new taskpool.Task(func, 200); - let task3 = new taskpool.Task(func, 300); - let task4 = new taskpool.Task(func, 400); - let task5 = new taskpool.Task(func, 500); - let task6 = new taskpool.Task(func, 600); +async function taskpoolCancel() { + let task1 = new taskpool.Task(printArgs, 100); + let task2 = new taskpool.Task(printArgs, 200); + let task3 = new taskpool.Task(printArgs, 300); + let task4 = new taskpool.Task(printArgs, 400); + let task5 = new taskpool.Task(printArgs, 500); + let task6 = new taskpool.Task(printArgs, 600); let res1 = taskpool.execute(task1); let res2 = taskpool.execute(task2); @@ -315,7 +315,7 @@ async function taskpoolTest() { } } -taskpoolTest(); +taskpoolCancel(); ``` ## Additional Information @@ -327,7 +327,7 @@ The following sequenceable data types are supported: All Primitive Type (excludi - The task pool APIs can be used only in the module with **compileMode** set to **esmodule** in the stage model. To check the **compileMode** setting of a module, open the **build-profile.json5** file of the module and check for **"compileMode": "esmodule"** under **buildOption**. - A task in the task pool can reference only variables passed in by input parameters or imported variables, rather than closure variables. The decorator **@Concurrent** is used to intercept unsupported variables. - A task in the task pool supports only common functions or async functions, rather than class member functions or anonymous functions. The decorator **@Concurrent** is used to intercept unsupported functions. -- The decorator **@Concurrent** can be used only in the .ets file. To create a task in the task pool in the .ts file, use the statement **use concurrent**. +- The decorator **@Concurrent** can be used only in .ets files. ### Using the Task Pool in Simple Mode @@ -336,23 +336,23 @@ The following sequenceable data types are supported: All Primitive Type (excludi ```ts // Common functions are supported, and variables passed in by input parameters are also supported. @Concurrent -function func(args) { +function printArgs(args) { console.log("func: " + args); return args; } -async function taskpoolTest() { +async function taskpoolExecute() { // taskpool.execute(task) - let task = new taskpool.Task(func, "create task, then execute"); + let task = new taskpool.Task(printArgs, "create task, then execute"); let val1 = await taskpool.execute(task); console.log("taskpool.execute(task) result: " + val1); // taskpool.execute(function) - let val2 = await taskpool.execute(func, "execute task by func"); + let val2 = await taskpool.execute(printArgs, "execute task by func"); console.log("taskpool.execute(function) result: " + val2); } -taskpoolTest(); +taskpoolExecute(); ``` **Example 2** @@ -367,24 +367,24 @@ export var c = 2000; import { c } from "./b"; @Concurrent -function test(a) { +function printArgs(a) { console.log(a); console.log(c); return a; } -async function taskpoolTest() { +async function taskpoolExecute() { // taskpool.execute(task) - let task = new taskpool.Task(test, "create task, then execute"); + let task = new taskpool.Task(printArgs, "create task, then execute"); let val1 = await taskpool.execute(task); console.log("taskpool.execute(task) result: " + val1); // taskpool.execute(function) - let val2 = await taskpool.execute(test, "execute task by func"); + let val2 = await taskpool.execute(printArgs, "execute task by func"); console.log("taskpool.execute(function) result: " + val2); } -taskpoolTest(); +taskpoolExecute(); ``` **Example 3** @@ -392,57 +392,52 @@ taskpoolTest(); ```ts // The async functions are supported. @Concurrent -async function task() { +async function delayExcute() { let ret = await Promise.all([ new Promise(resolve => setTimeout(resolve, 1000, "resolved")) ]); return ret; } -async function taskpoolTest() { - taskpool.execute(task).then((result) => { +async function taskpoolExecute() { + taskpool.execute(delayExcute).then((result) => { console.log("TaskPoolTest task result: " + result); }); } -taskpoolTest(); +taskpoolExecute(); ``` **Example 4** ```ts -// Use use concurrent to create a task in the task pool in the .ts file. -// c.ts -function test1(n) { - "use concurrent" - return n; +// c.ets +@Concurrent +function strSort(inPutArr) { + let newArr = inPutArr.sort(); + return newArr; } -export async function taskpoolTest1() { - console.log("taskpoolTest1 start"); - var task = new taskpool.Task(test1, 100); +export async function func1() { + console.log("taskpoolTest start"); + let strArray = ['c test string', 'b test string', 'a test string']; + var task = new taskpool.Task(strSort, strArray); var result = await taskpool.execute(task); - console.log("taskpoolTest1 result:" + result); + console.log("func1 result:" + result); } -async function test2() { - "use concurrent" - var ret = await Promise.all([ - new Promise(resolve => setTimeout(resolve, 1000, "resolved")) - ]); - return ret; -} -export async function taskpoolTest2() { +export async function func2() { console.log("taskpoolTest2 start"); - taskpool.execute(test2).then((result) => { - console.log("TaskPoolTest2 result: " + result); + let strArray = ['c test string', 'b test string', 'a test string']; + taskpool.execute(strSort, strArray).then((result) => { + console.log("func2 result: " + result); }); } ``` ```ts -/ / a.ets (in the same directory as c.ts) +/ / a.ets (in the same directory as c.ets) import { taskpoolTest1, taskpoolTest2 } from "./c"; -taskpoolTest1(); -taskpoolTest2(); +func1(); +func2(); ``` diff --git a/en/application-dev/reference/apis/js-apis-timer.md b/en/application-dev/reference/apis/js-apis-timer.md index f1fabcf335ead87b35304549ac60efd765f9ff42..eb501dd5dcac48ca8fb5ea17c2c69226b36ef424 100644 --- a/en/application-dev/reference/apis/js-apis-timer.md +++ b/en/application-dev/reference/apis/js-apis-timer.md @@ -18,9 +18,9 @@ Sets a timer for the system to call a function after the timer goes off. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| handler | Function \| string | Yes| Function to be called after the timer goes off.| +| handler | Function \| string | Yes| Function to be called after the timer goes off. If the type is string, error information is printed and no other processing is performed.| | delay | number | No| Number of milliseconds delayed before the execution. If this parameter is left empty, the default value **0** is used, which means that the execution starts immediately or as soon as possible.| -| ...arguments | Array<any> | No| Additional parameters to pass to the handler after the timer goes off.| +| ...arguments | any[] | No| Additional parameters to pass to the handler after the timer goes off.| **Return value** @@ -31,19 +31,15 @@ Sets a timer for the system to call a function after the timer goes off. **Example** ```js - export default { - setTimeOut() { - var timeoutID = setTimeout(function() { - console.log('delay 1s'); - }, 1000); - } - } + setTimeout(function() { + console.log('delay 1s'); + }, 1000); ``` ## clearTimeout -clearTimeout(timeoutID: number): void +clearTimeout(timeoutID?: number): void Cancels the timer created via **setTimeout()**. @@ -53,19 +49,15 @@ Cancels the timer created via **setTimeout()**. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| timeoutID | number | Yes| ID of the timer to cancel, which is returned by **setTimeout()**| +| timeoutID | number | No| ID of the timer to cancel, which is returned by **setTimeout()** If this parameter is omitted, no timer is canceled.| **Example** - ```js - export default { - clearTimeOut() { - var timeoutID = setTimeout(function() { - console.log('do after 1s delay.'); - }, 1000); - clearTimeout(timeoutID); - } - } + ```js + let timeoutID = setTimeout(function() { + console.log('do after 1s delay.'); + }, 1000); + clearTimeout(timeoutID); ``` @@ -81,32 +73,28 @@ Sets a repeating timer for the system to repeatedly call a function at a fixed i | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| handler | Function \| string | Yes| Function to be called repeatedly.| +| handler | Function \| string | Yes| Function to be called repeatedly. If the type is string, error information is printed and no other processing is performed.| | delay | number | Yes| Number of milliseconds delayed before the execution.| -| ...arguments | Array<any> | No| Additional parameters to pass to the handler after the timer goes off.| +| ...arguments | any[] | No| Additional parameters to pass to the handler after the timer goes off.| **Return value** | Type| Description| | -------- | -------- | -| number | ID of the repeating timer.| +| number | Timer ID.| **Example** ```js - export default { - setInterval() { - var intervalID = setInterval(function() { - console.log('do very 1s.'); - }, 1000); - } - } + setInterval(function() { + console.log('do every 1s.'); + }, 1000); ``` ## clearInterval -clearInterval(intervalID: number): void +clearInterval(intervalID?: number): void Cancels the repeating timer set via **setInterval()**. @@ -116,17 +104,13 @@ Cancels the repeating timer set via **setInterval()**. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| intervalID | number | Yes| ID of the repeating timer to cancel, which is returned by **setInterval()**.| +| intervalID | number | No| ID of the repeating timer to cancel, which is returned by **setInterval()**. If this parameter is omitted, no timer is canceled.| **Example** - ```js - export default { - clearInterval() { - var intervalID = setInterval(function() { - console.log('do very 1s.'); - }, 1000); - clearInterval(intervalID); - } - } + ```js + let intervalID = setInterval(function() { + console.log('do every 1s.'); + }, 1000); + clearInterval(intervalID); ``` diff --git a/en/application-dev/reference/apis/js-apis-wifi.md b/en/application-dev/reference/apis/js-apis-wifi.md index 9eb6f28a9880ada20a1a5c6bce2bac006a6efd5f..76f27aa775302ff5d313d17f664401b6364e25b9 100644 --- a/en/application-dev/reference/apis/js-apis-wifi.md +++ b/en/application-dev/reference/apis/js-apis-wifi.md @@ -31,6 +31,17 @@ Enables WLAN. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** + +```js +import wifi from '@ohos.wifi'; + +try { + wifi.enableWifi(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.disableWifi @@ -50,6 +61,18 @@ Disables WLAN. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** + +```js +import wifi from '@ohos.wifi'; + +try { + wifi.disableWifi(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} + +``` ## wifi.isWifiActive @@ -67,6 +90,18 @@ Checks whether WLAN is enabled. | -------- | -------- | | boolean | Returns **true** if WLAN is enabled; returns **false** otherwise.| +**Example** + +```js +import wifi from '@ohos.wifi'; + +try { + let isActivate = wifi.isActivate(); + console.info("isActivate:" + isActivate); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.scan @@ -84,6 +119,17 @@ Starts a scan for WLAN. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** + +```js +import wifi from '@ohos.wifi'; + +try { + wifi.scan(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.getScanInfos @@ -119,46 +165,47 @@ Obtains the scan result. This API uses an asynchronous callback to return the re | callback | AsyncCallback< Array<[WifiScanInfo](#wifiscaninfo)>> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the detected hotspots. Otherwise, **err** is a non-zero value and **data** is empty.| **Example** - ```js - import wifi from '@ohos.wifi'; - - wifi.getScanInfos((err, result) => { - if (err) { - console.error("get scan info error"); - return; - } - - var len = Object.keys(result).length; - console.log("wifi received scan info: " + len); - for (var i = 0; i < len; ++i) { - console.info("ssid: " + result[i].ssid); - console.info("bssid: " + result[i].bssid); - console.info("capabilities: " + result[i].capabilities); - console.info("securityType: " + result[i].securityType); - console.info("rssi: " + result[i].rssi); - console.info("band: " + result[i].band); - console.info("frequency: " + result[i].frequency); - console.info("channelWidth: " + result[i].channelWidth); - console.info("timestamp: " + result[i].timestamp); - } - }); - - wifi.getScanInfos().then(result => { - var len = Object.keys(result).length; - console.log("wifi received scan info: " + len); - for (var i = 0; i < len; ++i) { - console.info("ssid: " + result[i].ssid); - console.info("bssid: " + result[i].bssid); - console.info("capabilities: " + result[i].capabilities); - console.info("securityType: " + result[i].securityType); - console.info("rssi: " + result[i].rssi); - console.info("band: " + result[i].band); - console.info("frequency: " + result[i].frequency); - console.info("channelWidth: " + result[i].channelWidth); - console.info("timestamp: " + result[i].timestamp); - } - }); - ``` + +```js +import wifi from '@ohos.wifi'; + +wifi.getScanInfos((err, result) => { + if (err) { + console.error("get scan info error"); + return; + } + + var len = Object.keys(result).length; + console.log("wifi received scan info: " + len); + for (var i = 0; i < len; ++i) { + console.info("ssid: " + result[i].ssid); + console.info("bssid: " + result[i].bssid); + console.info("capabilities: " + result[i].capabilities); + console.info("securityType: " + result[i].securityType); + console.info("rssi: " + result[i].rssi); + console.info("band: " + result[i].band); + console.info("frequency: " + result[i].frequency); + console.info("channelWidth: " + result[i].channelWidth); + console.info("timestamp: " + result[i].timestamp); + } +}); + +wifi.getScanInfos().then(result => { + var len = Object.keys(result).length; + console.log("wifi received scan info: " + len); + for (var i = 0; i < len; ++i) { + console.info("ssid: " + result[i].ssid); + console.info("bssid: " + result[i].bssid); + console.info("capabilities: " + result[i].capabilities); + console.info("securityType: " + result[i].securityType); + console.info("rssi: " + result[i].rssi); + console.info("band: " + result[i].band); + console.info("frequency: " + result[i].frequency); + console.info("channelWidth: " + result[i].channelWidth); + console.info("timestamp: " + result[i].timestamp); + } +}); +``` ## WifiScanInfo @@ -238,6 +285,25 @@ Adds network configuration. This API uses a promise to return the result. | -------- | -------- | | Promise<number> | Promise used to return the WLAN configuration ID. If **-1** is returned, the network configuration fails to be added.| + **Example** + +```js +import wifi from '@ohos.wifi'; + +try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifi.addDeviceConfig(config).then(result => { + console.info("result:" + JSON.stringify(result)); + }); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` + ## WifiDeviceConfig Represents the WLAN configuration. @@ -252,13 +318,13 @@ Represents the WLAN configuration. | preSharedKey | string | Yes| No| PSK of the hotspot.| | isHiddenSsid | boolean | Yes| No| Whether the network is hidden.| | securityType | [WifiSecurityType](#wifisecuritytype) | Yes| No| Security type.| -| creatorUid | number | Yes| No| ID of the creator.
**System API**: This is a system API.| -| disableReason | number | Yes| No| Reason for disabling WLAN.
**System API**: This is a system API.| -| netId | number | Yes| No| Network ID.
**System API**: This is a system API.| -| randomMacType | number | Yes| No| Random MAC type.
**System API**: This is a system API.| -| randomMacAddr | string | Yes| No| Random MAC address.
**System API**: This is a system API.| -| ipType | [IpType](#iptype7) | Yes| No| IP address type.
**System API**: This is a system API.| -| staticIp | [IpConfig](#ipconfig7) | Yes| No| Static IP address configuration.
**System API**: This is a system API.| +| creatorUid | number | Yes| No| ID of the creator.
**System API**: This is a system API.| +| disableReason | number | Yes| No| Reason for disabling WLAN.
**System API**: This is a system API.| +| netId | number | Yes| No| Network ID.
**System API**: This is a system API.| +| randomMacType | number | Yes| No| Random MAC type.
**System API**: This is a system API.| +| randomMacAddr | string | Yes| No| Random MAC address.
**System API**: This is a system API.| +| ipType | [IpType](#iptype7) | Yes| No| IP address type.
**System API**: This is a system API.| +| staticIp | [IpConfig](#ipconfig7) | Yes| No| Static IP address configuration.
**System API**: This is a system API.| ## IpType7+ @@ -312,7 +378,24 @@ Adds network configuration. This API uses an asynchronous callback to return the | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| | callback | AsyncCallback<number> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the network configuration ID. If **data** is **-1**, the operation has failed. If **err** is not **0**, an error has occurred.| +**Example** + +```js +import wifi from '@ohos.wifi'; +try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifi.addDeviceConfig(config,(error,result) => { + console.info("result:" + JSON.stringify(result)); + }); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.addUntrustedConfig7+ addUntrustedConfig(config: WifiDeviceConfig): Promise<boolean> @@ -335,6 +418,23 @@ Adds the configuration of an untrusted network. This API uses a promise to retur | -------- | -------- | | Promise<boolean> | Promise used to return the result. If the operation is successful, **true** is returned; otherwise, **false** is returned.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifi.addUntrustedConfig(config).then(result => { + console.info("result:" + JSON.stringify(result)); + }); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.addUntrustedConfig7+ @@ -353,6 +453,23 @@ Adds the configuration of an untrusted network. This API uses an asynchronous ca | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| | callback | AsyncCallback<boolean> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is **true**. If the operation fails, **data** is **false**. If **err** is not **0**, an error has occurred.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifi.addUntrustedConfig(config,(error,result) => { + console.info("result:" + JSON.stringify(result)); + }); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.removeUntrustedConfig7+ @@ -376,6 +493,21 @@ Removes the configuration of an untrusted network. This API uses a promise to re | -------- | -------- | | Promise<boolean> | Promise used to return the result. If the operation is successful, **true** is returned; otherwise, **false** is returned.| +**Example** + +```js +import wifi from '@ohos.wifi'; + +try { + let networkId = 0; + wifi.removeUntrustedConfig(networkId).then(result => { + console.info("result:" + JSON.stringify(result)); + }); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` + ## wifi.removeUntrustedConfig7+ @@ -394,6 +526,19 @@ Removes the configuration of an untrusted network. This API uses an asynchronous | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to remove.| | callback | AsyncCallback<boolean> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is **true**. If the operation fails, **data** is **false**. If **err** is not **0**, an error has occurred.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let networkId = 0; + wifi.removeUntrustedConfig(networkId,(error,result) => { + console.info("result:" + JSON.stringify(result)); + }); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.connectToNetwork @@ -419,6 +564,18 @@ Connects to the specified network. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** + +```js +import wifi from '@ohos.wifi'; + +try { + let networkId = 0; + wifi.connectToNetwork(networkId); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.connectToDevice @@ -445,6 +602,22 @@ Connects to the specified network. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 3 + } + wifi.connectToDevice(config); + +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.disconnect @@ -465,6 +638,16 @@ Disconnects the network. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.disconnect(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.getSignalLevel @@ -489,6 +672,20 @@ Obtains the WLAN signal level. | -------- | -------- | | number | Signal level obtained. The value range is [0, 4].| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let rssi = 0; + let band = 0; + let level = wifi.getSignalLevel(rssi,band); + console.info("lelvel:" + JSON.stringify(lelvel)); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} + +``` ## wifi.getLinkedInfo @@ -524,23 +721,23 @@ Obtains WLAN connection information. This API uses an asynchronous callback to r | callback | AsyncCallback<[WifiLinkedInfo](#wifilinkedinfo)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the WLAN connection information obtained. If **err** is not **0**, an error has occurred.| **Example** - ```js - import wifi from '@ohos.wifi'; - - wifi.getLinkedInfo((err, data) => { - if (err) { - console.error("get linked info error"); - return; - } - console.info("get wifi linked info: " + JSON.stringify(data)); - }); - - wifi.getLinkedInfo().then(data => { - console.info("get wifi linked info: " + JSON.stringify(data)); - }).catch(error => { - console.info("get linked info error"); - }); - ``` +```js +import wifi from '@ohos.wifi'; + +wifi.getLinkedInfo((err, data) => { + if (err) { + console.error("get linked info error"); + return; + } + console.info("get wifi linked info: " + JSON.stringify(data)); +}); + +wifi.getLinkedInfo().then(data => { + console.info("get wifi linked info: " + JSON.stringify(data)); +}).catch(error => { + console.info("get linked info error"); +}); +``` ## WifiLinkedInfo @@ -553,18 +750,18 @@ Represents the WLAN connection information. | -------- | -------- | -------- | -------- | -------- | | ssid | string | Yes| No| SSID of the hotspot, in UTF-8 format.| | bssid | string | Yes| No| BSSID of the hotspot.| -| networkId | number | Yes| No| Network configuration ID.
**System API**: This is a system API.| +| networkId | number | Yes| No| Network configuration ID.
**System API**: This is a system API.| | rssi | number | Yes| No| RSSI of the hotspot, in dBm.| | band | number | Yes| No| Frequency band of the WLAN AP.| | linkSpeed | number | Yes| No| Speed of the WLAN AP.| | frequency | number | Yes| No| Frequency of the WLAN AP.| | isHidden | boolean | Yes| No| Whether to hide the WLAN AP.| | isRestricted | boolean | Yes| No| Whether to restrict data volume at the WLAN AP.| -| chload | number | Yes| No| Channel load. A larger value indicates a higher load.
**System API**: This is a system API.| -| snr | number | Yes| No| Signal-to-noise ratio (SNR).
**System API**: This is a system API.| +| chload | number | Yes| No| Channel load. A larger value indicates a higher load.
**System API**: This is a system API.| +| snr | number | Yes| No| Signal-to-noise ratio (SNR).
**System API**: This is a system API.| | macAddress | string | Yes| No| MAC address of the device.| | ipAddress | number | Yes| No| IP address of the device that sets up the WLAN connection.| -| suppState | [SuppState](#suppstate) | Yes| No| Supplicant state.
**System API**: This is a system API.| +| suppState | [SuppState](#suppstate) | Yes| No| Supplicant state.
**System API**: This is a system API.| | connState | [ConnState](#connstate) | Yes| No| WLAN connection state.| @@ -684,6 +881,19 @@ Checks whether the device supports the specified WLAN feature. | -------- | -------- | | boolean | Returns **true** if the feature is supported; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let featureId = 0; + let ret = wifi.isFeatureSupported(featureId); + console.info("isFeatureSupported:" + ret); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} + +``` ## wifi.getDeviceMacAddress7+ @@ -703,6 +913,18 @@ Obtains the device MAC address. | -------- | -------- | | string[] | MAC address obtained.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let ret = wifi.getDeviceMacAddress(); + console.info("deviceMacAddress:" + JSON.stringify(ret)); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} + +``` ## wifi.getIpInfo7+ @@ -720,6 +942,17 @@ Obtains IP information. | -------- | -------- | | [IpInfo](#ipinfo7) | IP information obtained.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let info = wifi.getIpInfo(); + console.info("info:" + JSON.stringify(info)); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## IpInfo7+ @@ -754,6 +987,17 @@ Obtains the country code. | -------- | -------- | | string | Country code obtained.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let code = wifi.getCountryCode(); + console.info("code:" + code); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.reassociate7+ @@ -773,6 +1017,16 @@ Re-associates with the network. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.reassociate(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.reconnect7+ @@ -792,6 +1046,16 @@ Reconnects to the network. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.reconnect(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.getDeviceConfigs7+ @@ -811,6 +1075,17 @@ Obtains network configuration. | -------- | -------- | |  Array<[WifiDeviceConfig](#wifideviceconfig)> | Array of network configuration obtained.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let configs = wifi.getDeviceConfigs(); + console.info("configs:" + JSON.stringify(configs)); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.updateNetwork7+ @@ -836,6 +1111,22 @@ Updates network configuration. | -------- | -------- | | number | ID of the updated network configuration. The value **-1** indicates that the operation has failed.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 3 + } + let ret = wifi.updateNetwork(config); + console.error("ret:" + ret); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.disableNetwork7+ @@ -861,6 +1152,17 @@ Disables network configuration. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let netId = 0; + wifi.disableNetwork(netId); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.removeAllNetwork7+ @@ -880,6 +1182,16 @@ Removes the configuration of all networks. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.removeAllNetwork(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.removeDevice7+ @@ -905,6 +1217,17 @@ Removes the specified network configuration. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let id = 0; + wifi.removeDevice(id); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.enableHotspot7+ @@ -924,6 +1247,16 @@ Enables this hotspot. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.enableHotspot(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.disableHotspot7+ @@ -943,6 +1276,16 @@ Disables this hotspot. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifiManager'; + +try { + wifiManager.disableHotspot(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.isHotspotDualBandSupported7+ @@ -962,6 +1305,17 @@ Checks whether the hotspot supports dual band. | -------- | -------- | | boolean | Returns **true** if the feature is supported; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let ret = wifi.isHotspotDualBandSupported(); + console.info("result:" + ret); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.isHotspotActive7+ @@ -981,6 +1335,17 @@ Checks whether this hotspot is active. | -------- | -------- | | boolean | Returns **true** if the hotspot is active; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let ret = wifi.isHotspotActive(); + console.info("result:" + ret); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.setHotspotConfig7+ @@ -1006,6 +1371,25 @@ Sets hotspot configuration. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let config = { + ssid: "****", + securityType: 3, + band: 0, + channel: 0, + preSharedKey: "****", + maxConn: 0 + } + let ret = wifi.setHotspotConfig(); + console.info("result:" + ret); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## HotspotConfig7+ @@ -1042,6 +1426,17 @@ obtains hotspot configuration. | -------- | -------- | | [HotspotConfig](#hotspotconfig7) | Hotspot configuration obtained.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let config = wifi.getHotspotConfig(); + console.info("result:" + JSON.stringify(config)); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.getStations7+ @@ -1061,6 +1456,17 @@ Obtains information about the connected stations. | -------- | -------- | |  Array<[StationInfo](#stationinfo7)> | Connected stations obtained.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let stations = wifi.getStations(); + console.info("result:" + JSON.stringify(stations)); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## StationInfo7+ @@ -1136,6 +1542,22 @@ Obtains P2P link information. This API uses an asynchronous callback to return t | -------- | -------- | -------- | -------- | | callback | AsyncCallback<[WifiP2pLinkedInfo](#wifip2plinkedinfo8)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the P2P link information. If **err** is not **0**, an error has occurred.| +**Example** +```js +import wifi from '@ohos.wifi'; + +wifi.getP2pLinkedInfo((err, data) => { + if (err) { + console.error("get p2p linked info error"); + return; + } + console.info("get wifi p2p linked info: " + JSON.stringify(data)); +}); + +wifi.getP2pLinkedInfo().then(data => { + console.info("get wifi p2p linked info: " + JSON.stringify(data)); +}); +``` ## wifi.getCurrentGroup8+ @@ -1170,6 +1592,22 @@ Obtains the current P2P group information. This API uses an asynchronous callbac | -------- | -------- | -------- | -------- | | callback | AsyncCallback<[WifiP2pGroupInfo](#wifip2pgroupinfo8)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the group information obtained. If **err** is not **0**, an error has occurred.| +**Example** +```js +import wifi from '@ohos.wifi'; + +wifi.getCurrentGroup((err, data) => { + if (err) { + console.error("get current P2P group error"); + return; + } + console.info("get current P2P group: " + JSON.stringify(data)); +}); + +wifi.getCurrentGroup().then(data => { + console.info("get current P2P group: " + JSON.stringify(data)); +}); +``` ## wifi.getP2pPeerDevices8+ @@ -1204,6 +1642,22 @@ Obtains the peer device list in the P2P connection. This API uses an asynchronou | -------- | -------- | -------- | -------- | | callback | AsyncCallback<[WifiP2pDevice[]](#wifip2pdevice8)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the peer device list obtained. If **err** is not **0**, an error has occurred.| +**Example** +```js +import wifi from '@ohos.wifiManager'; + +wifi.getP2pPeerDevices((err, data) => { + if (err) { + console.error("get P2P peer devices error"); + return; + } + console.info("get P2P peer devices: " + JSON.stringify(data)); +}); + +wifi.getP2pPeerDevices().then(data => { + console.info("get P2P peer devices: " + JSON.stringify(data)); +}); +``` ## WifiP2pDevice8+ @@ -1257,6 +1711,24 @@ Creates a P2P group. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let config = { + deviceAddress: "****", + netId: 0, + passphrase: "*****", + groupName: "****", + goBand: 0 + } + wifi.createGroup(config); + +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## WifiP2PConfig8+ @@ -1302,6 +1774,16 @@ Removes this P2P group. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.removeGroup(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.p2pConnect8+ @@ -1328,71 +1810,71 @@ Sets up a P2P connection. **Example** - ```js - import wifi from '@ohos.wifi'; - - var recvP2pConnectionChangeFunc = result => { - console.info("p2p connection change receive event: " + JSON.stringify(result)); - wifi.getP2pLinkedInfo((err, data) => { - if (err) { - console.error('failed to get getP2pLinkedInfo: ' + JSON.stringify(err)); - return; - } - console.info("get getP2pLinkedInfo: " + JSON.stringify(data)); - }); - } - wifi.on("p2pConnectionChange", recvP2pConnectionChangeFunc); - - var recvP2pDeviceChangeFunc = result => { - console.info("p2p device change receive event: " + JSON.stringify(result)); - } - wifi.on("p2pDeviceChange", recvP2pDeviceChangeFunc); - - var recvP2pPeerDeviceChangeFunc = result => { - console.info("p2p peer device change receive event: " + JSON.stringify(result)); - wifi.getP2pPeerDevices((err, data) => { - if (err) { - console.error('failed to get peer devices: ' + JSON.stringify(err)); - return; - } - console.info("get peer devices: " + JSON.stringify(data)); - var len = Object.keys(data).length; - for (var i = 0; i < len; ++i) { - if (data[i].deviceName === "my_test_device") { - console.info("p2p connect to test device: " + data[i].deviceAddress); - var config = { - "deviceAddress":data[i].deviceAddress, - "netId":-2, - "passphrase":"", - "groupName":"", - "goBand":0, - } - wifi.p2pConnect(config); - } - } - }); - } - wifi.on("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc); - - var recvP2pPersistentGroupChangeFunc = () => { - console.info("p2p persistent group change receive event"); - - wifi.getCurrentGroup((err, data) => { - if (err) { - console.error('failed to get current group: ' + JSON.stringify(err)); - return; - } - console.info("get current group: " + JSON.stringify(data)); - }); - } - wifi.on("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc); - - setTimeout(function() {wifi.off("p2pConnectionChange", recvP2pConnectionChangeFunc);}, 125 * 1000); - setTimeout(function() {wifi.off("p2pDeviceChange", recvP2pDeviceChangeFunc);}, 125 * 1000); - setTimeout(function() {wifi.off("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc);}, 125 * 1000); - setTimeout(function() {wifi.off("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc);}, 125 * 1000); - console.info("start discover devices -> " + wifi.startDiscoverDevices()); - ``` +```js +import wifi from '@ohos.wifi'; + +var recvP2pConnectionChangeFunc = result => { + console.info("p2p connection change receive event: " + JSON.stringify(result)); + wifi.getP2pLinkedInfo((err, data) => { + if (err) { + console.error('failed to get getP2pLinkedInfo: ' + JSON.stringify(err)); + return; + } + console.info("get getP2pLinkedInfo: " + JSON.stringify(data)); + }); +} +wifi.on("p2pConnectionChange", recvP2pConnectionChangeFunc); + +var recvP2pDeviceChangeFunc = result => { + console.info("p2p device change receive event: " + JSON.stringify(result)); +} +wifi.on("p2pDeviceChange", recvP2pDeviceChangeFunc); + +var recvP2pPeerDeviceChangeFunc = result => { + console.info("p2p peer device change receive event: " + JSON.stringify(result)); + wifi.getP2pPeerDevices((err, data) => { + if (err) { + console.error('failed to get peer devices: ' + JSON.stringify(err)); + return; + } + console.info("get peer devices: " + JSON.stringify(data)); + var len = Object.keys(data).length; + for (var i = 0; i < len; ++i) { + if (data[i].deviceName === "my_test_device") { + console.info("p2p connect to test device: " + data[i].deviceAddress); + var config = { + "deviceAddress":data[i].deviceAddress, + "netId":-2, + "passphrase":"", + "groupName":"", + "goBand":0, + } + wifi.p2pConnect(config); + } + } + }); +} +wifi.on("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc); + +var recvP2pPersistentGroupChangeFunc = () => { + console.info("p2p persistent group change receive event"); + + wifi.getCurrentGroup((err, data) => { + if (err) { + console.error('failed to get current group: ' + JSON.stringify(err)); + return; + } + console.info("get current group: " + JSON.stringify(data)); + }); +} +wifi.on("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc); + +setTimeout(function() {wifi.off("p2pConnectionChange", recvP2pConnectionChangeFunc);}, 125 * 1000); +setTimeout(function() {wifi.off("p2pDeviceChange", recvP2pDeviceChangeFunc);}, 125 * 1000); +setTimeout(function() {wifi.off("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc);}, 125 * 1000); +setTimeout(function() {wifi.off("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc);}, 125 * 1000); +console.info("start discover devices -> " + wifi.startDiscoverDevices()); +``` ## wifi.p2pCancelConnect8+ @@ -1410,6 +1892,16 @@ Cancels this P2P connection. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.p2pCancelConnect(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.startDiscoverDevices8+ @@ -1427,6 +1919,16 @@ Starts to discover devices. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.startDiscoverDevices(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.stopDiscoverDevices8+ @@ -1444,6 +1946,16 @@ Stops discovering devices. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + wifi.stopDiscoverDevices(); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.deletePersistentGroup8+ @@ -1470,6 +1982,17 @@ Deletes a persistent group. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let netId = 0; + wifi.deletePersistentGroup(netId); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## WifiP2pGroupInfo8+ @@ -1514,6 +2037,17 @@ Sets the device name. | -------- | -------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +**Example** +```js +import wifi from '@ohos.wifi'; + +try { + let name = "****"; + wifi.setDeviceName(netId); +}catch(error){ + console.error("failed:" + JSON.stringify(error)); +} +``` ## wifi.on('wifiStateChange')7+ @@ -1560,19 +2094,19 @@ Unregisters the WLAN state change events. | callback | Callback<number> | No| Callback for the WLAN state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Example** - ```js - import wifi from '@ohos.wifi'; - - var recvPowerNotifyFunc = result => { - console.info("Receive power state change event: " + result); - } - - // Register an event. - wifi.on("wifiStateChange", recvPowerNotifyFunc); - - // Unregister an event. - wifi.off("wifiStateChange", recvPowerNotifyFunc); - ``` +```js +import wifi from '@ohos.wifi'; + +var recvPowerNotifyFunc = result => { + console.info("Receive power state change event: " + result); +} + +// Register an event. +wifi.on("wifiStateChange", recvPowerNotifyFunc); + +// Unregister an event. +wifi.off("wifiStateChange", recvPowerNotifyFunc); +``` ## wifi.on('wifiConnectionChange')7+ @@ -1617,6 +2151,20 @@ Unregisters the WLAN connection state change events. | type | string | Yes| Event type. The value is **wifiConnectionChange**.| | callback | Callback<number> | No| Callback for the WLAN connection state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvWifiConnectionChangeFunc = result => { + console.info("Receive wifi connection change event: " + result); +} + +// Register an event. +wifi.on("wifiConnectionChange", recvWifiConnectionChangeFunc); + +// Unregister an event. +wifi.off("wifiConnectionChange", recvWifiConnectionChangeFunc); +``` ## wifi.on('wifiScanStateChange')7+ @@ -1660,6 +2208,20 @@ Unregisters the WLAN scan state change events. | type | string | Yes| Event type. The value is **wifiScanStateChange**.| | callback | Callback<number> | No| Callback for the WLAN scan state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvWifiScanStateChangeFunc = result => { + console.info("Receive Wifi scan state change event: " + result); +} + +// Register an event. +wifi.on("wifiScanStateChange", recvWifiScanStateChangeFunc); + +// Unregister an event. +wifi.off("wifiScanStateChange", recvWifiScanStateChangeFunc); +``` ## wifi.on('wifiRssiChange')7+ @@ -1696,7 +2258,20 @@ Unregisters the RSSI change events. | type | string | Yes| Event type. The value is **wifiRssiChange**.| | callback | Callback<number> | No| Callback for the RSSI. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvWifiRssiChangeFunc = result => { + console.info("Receive wifi rssi change event: " + result); +} + +// Register an event. +wifi.on("wifiRssiChange", recvWifiRssiChangeFunc); +// Unregister an event. +wifi.off("wifiRssiChange", recvWifiRssiChangeFunc); +``` ## wifi.on('hotspotStateChange')7+ on(type: "hotspotStateChange", callback: Callback<number>): void @@ -1723,6 +2298,20 @@ Registers the hotspot state change events. | 2 | Activating| | 3 | Deactivating| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvHotspotStateChangeFunc = result => { + console.info("Receive hotspot state change event: " + result); +} + +// Register an event. +wifi.on("hotspotStateChange", recvHotspotStateChangeFunc); + +// Unregister an event. +wifi.off("hotspotStateChange", recvHotspotStateChangeFunc); +``` ## wifi.off('hotspotStateChange')7+ @@ -1786,6 +2375,20 @@ Unregisters the P2P state change events. | type | string | Yes| Event type. The value is **p2pStateChange**.| | callback | Callback<number> | No| Callback for the P2P state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvP2pStateChangeFunc = result => { + console.info("Receive p2p state change event: " + result); +} + +// Register an event. +wifi.on("p2pStateChange", recvP2pStateChangeFunc); + +// Unregister an event. +wifi.off("p2pStateChange", recvP2pStateChangeFunc); +``` ## wifi.on('p2pConnectionChange')8+ @@ -1822,6 +2425,20 @@ Unregisters the P2P connection state change events. | type | string | Yes| Event type. The value is **p2pConnectionChange**.| | callback | Callback<[WifiP2pLinkedInfo](#wifip2plinkedinfo8)> | No| Callback for the P2P connection state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvP2pConnectionChangeFunc = result => { + console.info("Receive p2p connection change event: " + result); +} + +// Register an event. +wifi.on("p2pConnectionChange", recvP2pConnectionChangeFunc); + +// Unregister an event. +wifi.off("p2pConnectionChange", recvP2pConnectionChangeFunc); +``` ## wifi.on('p2pDeviceChange')8+ @@ -1858,6 +2475,20 @@ Unregisters the P2P device state change events. | type | string | Yes| Event type. The value is **p2pDeviceChange**.| | callback | Callback<[WifiP2pDevice](#wifip2pdevice8)> | No| Callback for the P2P device state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvP2pDeviceChangeFunc = result => { + console.info("Receive recv p2p device change event: " + result); +} + +// Register an event. +wifi.on("p2pDeviceChange", recvP2pDeviceChangeFunc); + +// Unregister an event. +wifi.off("p2pDeviceChange", recvP2pDeviceChangeFunc); +``` ## wifi.on('p2pPeerDeviceChange')8+ @@ -1894,6 +2525,20 @@ Unregisters the P2P peer device state change events. | type | string | Yes| Event type. The value is **p2pPeerDeviceChange**.| | callback | Callback<[WifiP2pDevice[]](#wifip2pdevice8)> | No| Callback for the peer device state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvP2pPeerDeviceChangeFunc = result => { + console.info("Receive recv p2p peer device change event: " + result); +} + +// Register an event. +wifi.on("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc); + +// Unregister an event. +wifi.off("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc); +``` ## wifi.on('p2pPersistentGroupChange')8+ @@ -1930,6 +2575,21 @@ Unregisters the P2P persistent group state change events. | type | string | Yes| Event type. The value is **p2pPersistentGroupChange**.| | callback | Callback<void> | No| Callback for the P2P persistent group state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvP2pPersistentGroupChangeFunc = result => { + console.info("Receive recv p2p persistent group change event: " + result); +} + +// Register an event. +wifi.on("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc); + +// Unregister an event. +wifi.off("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc); + +``` ## wifi.on('p2pDiscoveryChange')8+ @@ -1972,3 +2632,18 @@ Unregisters the P2P device discovery state change events. | -------- | -------- | -------- | -------- | | type | string | Yes| Event type. The value is **p2pDiscoveryChange**.| | callback | Callback<number> | No| Callback for the P2P device discovery state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| + +**Example** +```js +import wifi from '@ohos.wifi'; + +var recvP2pDiscoveryChangeFunc = result => { + console.info("Receive recv p2p discovery change event: " + result); +} + +// Register an event. +wifi.on("p2pDiscoveryChange", recvP2pDiscoveryChangeFunc); + +// Unregister an event. +wifi.off("p2pDiscoveryChange", recvP2pDiscoveryChangeFunc); +``` diff --git a/en/application-dev/reference/apis/js-apis-wifiManager.md b/en/application-dev/reference/apis/js-apis-wifiManager.md index dc9beb94d7fcc13d6c82e805bf8855d537e907bd..6d560d345805826369d8b83cfdcbee53a47b00f5 100644 --- a/en/application-dev/reference/apis/js-apis-wifiManager.md +++ b/en/application-dev/reference/apis/js-apis-wifiManager.md @@ -26,18 +26,29 @@ Enables WLAN. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if the operation is successful; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.enableWifi(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` ## wifi.disableWifi9+ @@ -53,18 +64,30 @@ Disables WLAN. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if the operation is successful; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.disableWifi(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.isWifiActive9+ isWifiActive(): boolean @@ -77,132 +100,119 @@ Checks whether WLAN is enabled. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if WLAN is enabled; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if WLAN is enabled; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + +``` + import wifi from '@ohos.wifiManager'; + + try { + let isActivate = wifiManager.isActivate(); + console.info("isActivate:" + isActivate); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.scan9+ scan(): void Starts a scan for WLAN. -**Required permissions**: **ohos.permission.SET_WIFI_INFO** and **ohos.permission.LOCATION** +**Required permissions**: ohos.permission.SET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.STA **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if the operation is successful; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| -## wifi.getScanResults9+ - -getScanResults(): Promise<Array<WifiScanInfo>> - -Obtains the scan result. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.GET_WIFI_PEERS_MAC (or ohos.permission.LOCATION) - -**System capability**: SystemCapability.Communication.WiFi.STA - -**Return value** - - | **Type**| **Description**| - | -------- | -------- | - | Promise< Array<[WifiScanInfo](#wifiscaninfo)> > | Promise used to return the hotspots detected.| - -**Error codes** +**Example** -For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). +``` + import wifi from '@ohos.wifiManager'; -| **Type**| **Description**| - | -------- | -------- | -| 2501000 | Operation failed.| + try { + wifiManager.scan(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` -## wifi.getScanResults9+ +## wifi.getScanInfoList9+ -getScanResults(callback: AsyncCallback<Array<WifiScanInfo>>): void +getScanInfoList(): Array<WifiScanInfo>; -Obtains the scan result. This API uses an asynchronous callback to return the result. +Obtains the scan result. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.GET_WIFI_PEERS_MAC (or ohos.permission.LOCATION) +**Required permissions**: ohos.permission.GET_WIFI_INFO and (ohos.permission.GET_WIFI_PEERS_MAC or (ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION)) **System capability**: SystemCapability.Communication.WiFi.STA -**Parameters** +**Return value** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | callback | AsyncCallback< Array<[WifiScanInfo](#wifiscaninfo)>> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the detected hotspots. Otherwise, **err** is a non-zero value and **data** is empty.| +| **Type**| **Description**| +| -------- | -------- | +| Array<[WifiScanInfo](#wifiscaninfo)> | Returns the hotspots detected.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| **Example** - ```js - import wifi from '@ohos.wifi'; - - wifi.getScanInfos((err, result) => { - if (err) { - console.error("get scan info error"); - return; - } - - var len = Object.keys(result).length; - console.log("wifi received scan info: " + len); - for (var i = 0; i < len; ++i) { - console.info("ssid: " + result[i].ssid); - console.info("bssid: " + result[i].bssid); - console.info("capabilities: " + result[i].capabilities); - console.info("securityType: " + result[i].securityType); - console.info("rssi: " + result[i].rssi); - console.info("band: " + result[i].band); - console.info("frequency: " + result[i].frequency); - console.info("channelWidth: " + result[i].channelWidth); - console.info("timestamp: " + result[i].timestamp); - } - }); - - wifi.getScanInfos().then(result => { - var len = Object.keys(result).length; - console.log("wifi received scan info: " + len); - for (var i = 0; i < len; ++i) { - console.info("ssid: " + result[i].ssid); - console.info("bssid: " + result[i].bssid); - console.info("capabilities: " + result[i].capabilities); - console.info("securityType: " + result[i].securityType); - console.info("rssi: " + result[i].rssi); - console.info("band: " + result[i].band); - console.info("frequency: " + result[i].frequency); - console.info("channelWidth: " + result[i].channelWidth); - console.info("timestamp: " + result[i].timestamp); - } - }); - ``` +``` + import wifi from '@ohos.wifiManager'; + + try { + let scanInfoList = wifiManager.getScanInfoList(); + console.info("scanInfoList:" + JSON.stringify(scanInfoList)); + let len = Object.keys(result).length; + console.log("wifi received scan info: " + len); + if(len > 0){ + for (var i = 0; i < len; ++i) { + console.info("ssid: " + scanInfoList[i].ssid); + console.info("bssid: " + scanInfoList[i].bssid); + console.info("capabilities: " + scanInfoList[i].capabilities); + console.info("securityType: " + scanInfoList[i].securityType); + console.info("rssi: " + scanInfoList[i].rssi); + console.info("band: " + scanInfoList[i].band); + console.info("frequency: " + scanInfoList[i].frequency); + console.info("channelWidth: " + scanInfoList[i].channelWidth); + console.info("timestamp: " + scanInfoList[i].timestamp); + } + } + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +``` ## WifiScanInfo9+ @@ -248,59 +258,65 @@ Enumerates the WLAN security types. | WIFI_SEC_TYPE_WAPI_PSK9+ | 9 | WAPI-PSK.| -## WifiInfoElem9+ +## WifiBandType10+ -Represents a WLAN information element. +Enumerates the Wi-Fi band types. **System capability**: SystemCapability.Communication.WiFi.STA +| **Name**| **Value**| **Description**| +| -------- | -------- | -------- | +| WIFI_BAND_NONE | 0 | Invalid band type| +| WIFI_BAND_2G | 1 | 2.4 GHz| +| WIFI_BAND_5G | 2 | 5 GHz| +| WIFI_BAND_6G | 3 | 6 GHz| +| WIFI_BAND_60G | 4 | 60 GHz| -| **Name**| **Type**| **Readable**| **Writable**| **Description**| -| -------- | -------- | -------- | -------- | -------- | -| eid | number | Yes| No| ID of the information element.| -| content | Uint8Array | Yes| No| Content of the information element.| - - -## WifiChannelWidth9+ +## WifiStandard10+ -Enumerates the WLAN channel widths. +Enumerates the Wi-Fi standards. **System capability**: SystemCapability.Communication.WiFi.STA - | **Name**| **Value**| **Description**| | -------- | -------- | -------- | -| WIDTH_20MHZ | 0 | 20 MHz.| -| WIDTH_40MHZ | 1 | 40 MHz.| -| WIDTH_80MHZ | 2 | 80 MHz.| -| WIDTH_160MHZ | 3 | 160 MHz.| -| WIDTH_80MHZ_PLUS | 4 | 80 MHz+.| -| WIDTH_INVALID | 5 | Invalid value.| +| WIFI_STANDARD_UNDEFINED | 0 | Invalid Wi-Fi standard| +| WIFI_STANDARD_11A | 1 | 802.11a| +| WIFI_STANDARD_11B | 2 | 802.11b| +| WIFI_STANDARD_11G | 3 | 802.11g| +| WIFI_STANDARD_11N | 4 | 802.11n| +| WIFI_STANDARD_11AC | 5 | 802.11ac| +| WIFI_STANDARD_11AX | 6 | 802.11ax| +| WIFI_STANDARD_11AD | 7 | 802.11ad| +## WifiInfoElem9+ -## wifi.getScanResultsSync9+ +Represents a WLAN information element. -getScanResultsSync():  Array<[WifiScanInfo](#wifiscaninfo)> +**System capability**: SystemCapability.Communication.WiFi.STA -Obtains the scan result. This API returns the result synchronously. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.GET_WIFI_PEERS_MAC (or ohos.permission.LOCATION) +| **Name**| **Type**| **Readable**| **Writable**| **Description**| +| -------- | -------- | -------- | -------- | -------- | +| eid | number | Yes| No| ID of the information element.| +| content | Uint8Array | Yes| No| Content of the information element.| -**System capability**: SystemCapability.Communication.WiFi.STA -**Return value** +## WifiChannelWidth9+ - | **Type**| **Description**| - | -------- | -------- | - |  Array<[WifiScanInfo](#wifiscaninfo)> | Scan result obtained.| +Enumerates the WLAN channel widths. -**Error codes** +**System capability**: SystemCapability.Communication.WiFi.STA -For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | -| 2501000 | Operation failed.| +| **Name**| **Value**| **Description**| +| -------- | -------- | -------- | +| WIDTH_20MHZ | 0 | 20 MHz| +| WIDTH_40MHZ | 1 | 40 MHz| +| WIDTH_80MHZ | 2 | 80 MHz| +| WIDTH_160MHZ | 3 | 160 MHz| +| WIDTH_80MHZ_PLUS | 4 | 80 MHz+| +| WIDTH_INVALID | 5 | Invalid value| ## wifi.addDeviceConfig9+ @@ -316,24 +332,43 @@ Adds network configuration. This API uses a promise to return the result. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| **Return value** - | **Type**| **Description**| - | -------- | -------- | - | Promise<number> | Promise used to return the ID of the added network configuration. If **-1** is returned, the network configuration fails to be added.| +| **Type**| **Description**| +| -------- | -------- | +| Promise<number> | Promise used to return the ID of the added network configuration. If **-1** is returned, the network configuration fails to be added.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + +``` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifiManager.addDeviceConfig(config).then(result => { + console.info("result:" + JSON.stringify(result)); + }); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## WifiDeviceConfig9+ Represents the WLAN configuration. @@ -348,14 +383,14 @@ Represents the WLAN configuration. | preSharedKey | string | Yes| No| PSK of the hotspot.| | isHiddenSsid | boolean | Yes| No| Whether the network is hidden.| | securityType | [WifiSecurityType](#wifisecuritytype) | Yes| No| Security type.| -| creatorUid | number | Yes| No| ID of the creator.
**System API**: This is a system API.| -| disableReason | number | Yes| No| Reason for disabling WLAN.
**System API**: This is a system API.| -| netId | number | Yes| No| Network ID.
**System API**: This is a system API.| -| randomMacType | number | Yes| No| Random MAC type.
**System API**: This is a system API.| -| randomMacAddr | string | Yes| No| Random MAC address.
**System API**: This is a system API.| -| ipType | [IpType](#iptype9) | Yes| No| IP address type.
**System API**: This is a system API.| -| staticIp | [IpConfig](#ipconfig9) | Yes| No| Static IP address configuration.
**System API**: This is a system API.| -| eapConfig9+ | [WifiEapConfig](#wifieapconfig9) | Yes| No| EAP configuration.
**System API**: This is a system API.| +| creatorUid | number | Yes| No| ID of the creator.
**System API**: This is a system API.| +| disableReason | number | Yes| No| Reason for disabling WLAN.
**System API**: This is a system API.| +| netId | number | Yes| No| Network ID.
**System API**: This is a system API.| +| randomMacType | number | Yes| No| Random MAC type.
**System API**: This is a system API.| +| randomMacAddr | string | Yes| No| Random MAC address.
**System API**: This is a system API.| +| ipType | [IpType](#iptype9) | Yes| No| IP address type.
**System API**: This is a system API.| +| staticIp | [IpConfig](#ipconfig9) | Yes| No| Static IP address configuration.
**System API**: This is a system API.| +| eapConfig9+ | [WifiEapConfig](#wifieapconfig9) | Yes| No| EAP configuration.
**System API**: This is a system API.| ## IpType9+ @@ -473,19 +508,38 @@ Adds network configuration. This API uses an asynchronous callback to return the **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| - | callback | AsyncCallback<number> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the network configuration ID. If **data** is **-1**, the operation has failed. If **err** is not **0**, an error has occurred.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| +| callback | AsyncCallback<number> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the network configuration ID. If **data** is **-1**, the operation has failed. If **err** is not **0**, an error has occurred.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + +``` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifiManager.addDeviceConfig(config,(error,result) => { + console.info("result:" + JSON.stringify(result)); + }); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.addCandidateConfig9+ addCandidateConfig(config: WifiDeviceConfig): Promise<number> @@ -498,24 +552,42 @@ Adds the configuration of a candidate network. This API uses a promise to return **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| **Return value** - | **Type**| **Description**| - | -------- | -------- | - | Promise<number> | Promise used to return the network configuration ID.| +| **Type**| **Description**| +| -------- | -------- | +| Promise<number> | Promise used to return the network configuration ID.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +````` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifiManager.addCandidateConfig(config).then(result => { + console.info("result:" + JSON.stringify(result)); + }); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +````` + ## wifi.addCandidateConfig9+ addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback<number>): void @@ -528,19 +600,37 @@ Adds the configuration of a candidate network. This API uses an asynchronous cal **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| - | callback | AsyncCallback<number> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the network configuration ID. If **data** is **-1**, the operation has failed. If **err** is not **0**, an error has occurred.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration to add.| +| callback | AsyncCallback<number> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the network configuration ID. If **data** is **-1**, the operation has failed. If **err** is not **0**, an error has occurred.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +````` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 0 + } + wifiManager.addCandidateConfig(config,(error,result) => { + console.info("result:" + JSON.stringify(result)); + }); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +````` + ## wifi.removeCandidateConfig9+ removeCandidateConfig(networkId: number): Promise<void> @@ -553,24 +643,39 @@ Removes the configuration of a candidate network. This API uses a promise to ret **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | networkId | number | Yes| ID of the network configuration to remove.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| networkId | number | Yes| ID of the network configuration to remove.| **Return value** - | **Type**| **Description**| - | -------- | -------- | - | Promise<void> | Promise used to return the result.| +| **Type**| **Description**| +| -------- | -------- | +| Promise<void> | Promise used to return the result.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + +``` + import wifi from '@ohos.wifiManager'; + + try { + let networkId = 0; + wifiManager.removeCandidateConfig(networkId).then(result => { + console.info("result:" + JSON.stringify(result)); + }); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.removeCandidateConfig9+ removeCandidateConfig(networkId: number, callback: AsyncCallback<void>): void @@ -583,48 +688,84 @@ Removes the configuration of a candidate network. This API uses an asynchronous **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | networkId | number | Yes| ID of the network configuration to remove.| - | callback | AsyncCallback<void> | Yes| Callback invoked to return the result. If the operation is successful, the value of **err** is **0**. If **err** is not **0**, an error has occurred.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| networkId | number | Yes| ID of the network configuration to remove.| +| callback | AsyncCallback<void> | Yes| Callback invoked to return the result. If the operation is successful, the value of **err** is **0**. If **err** is not **0**, an error has occurred.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let networkId = 0; + wifiManager.removeCandidateConfig(networkId,(error,result) => { + console.info("result:" + JSON.stringify(result)); + }); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.getCandidateConfigs9+ getCandidateConfigs():  Array<[WifiDeviceConfig](#wifideviceconfig)> Obtains candidate network configuration. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.STA **Return value** - | **Type**| **Description**| - | -------- | -------- | - |  Array<[WifiDeviceConfig](#wifideviceconfig)> | Candidate network configuration obtained.| +| **Type**| **Description**| +| -------- | -------- | +|  Array<[WifiDeviceConfig](#wifideviceconfig)> | Candidate network configuration obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + +````` + import wifi from '@ohos.wifiManager'; + + try { + let configs = wifiManager.getCandidateConfigs(); + console.info("configs:" + JSON.stringify(configs)); + let len = Object.keys(configs).length; + console.log("result len: " + len); + if(len > 0){ + for (var i = 0; i < len; ++i) { + console.info("ssid: " + configs[i].ssid); + console.info("bssid: " + configs[i].bssid); + } + } + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +````` + ## wifi.connectToCandidateConfig9+ connectToCandidateConfig(networkId: number): void -Connects to a candidate network. +Connects to a candidate network added by the application. If the device is already connected to a hotspot, disconnect it from the hotspot first. **Required permissions**: ohos.permission.SET_WIFI_INFO @@ -632,24 +773,38 @@ Connects to a candidate network. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | networkId | number | Yes| ID of the candidate network configuration.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| networkId | number | Yes| ID of the candidate network configuration.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| | 2501001 | Wifi is closed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let networkId = 0; + let ret = wifiManager.connectToCandidateConfig(networkId); + console.info("result:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +``` + ## wifi.connectToNetwork9+ connectToNetwork(networkId: number): void -Connects to the specified network. +Connects to the specified network. If the device is already connected to a hotspot, use **disconnect()** to disconnect it from the hotspot first. **System API**: This is a system API. @@ -659,24 +814,37 @@ Connects to the specified network. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | networkId | number | Yes| Network configuration ID.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| networkId | number | Yes| Network configuration ID.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| | 2501001 | Wifi is closed.| +**Example** + +``` + import wifi from '@ohos.wifiManager'; + + try { + let networkId = 0; + wifiManager.connectToNetwork(networkId); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.connectToDevice9+ connectToDevice(config: WifiDeviceConfig): void -Connects to the specified network. +Connects to the specified network. If the device is already connected to a hotspot, use **disconnect()** to disconnect it from the hotspot first. **System API**: This is a system API. @@ -687,19 +855,36 @@ Connects to the specified network. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| WLAN configuration.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiDeviceConfig](#wifideviceconfig) | Yes| Configuration of the WLAN to connect. | **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| | 2501001 | Wifi is closed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 3 + } + wifiManager.connectToDevice(config); + + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.disconnect9+ disconnect(): void @@ -717,10 +902,21 @@ Disconnects the network. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.disconnect(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.getSignalLevel9+ getSignalLevel(rssi: number, band: number): number @@ -733,25 +929,40 @@ Obtains the WLAN signal level. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | rssi | number | Yes| RSSI of the hotspot, in dBm.| - | band | number | Yes| Frequency band of the WLAN AP.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| rssi | number | Yes| RSSI of the hotspot, in dBm.| +| band | number | Yes| Frequency band of the WLAN AP.| **Return value** - | **Type**| **Description**| - | -------- | -------- | - | number | Signal level obtained. The value range is [0, 4].| +| **Type**| **Description**| +| -------- | -------- | +| number | Signal level obtained. The value range is [0, 4].| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let rssi = 0; + let band = 0; + let level = wifiManager.getSignalLevel(rssi,band); + console.info("lelvel:" + JSON.stringify(lelvel)); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +``` + ## wifi.getLinkedInfo9+ getLinkedInfo(): Promise<WifiLinkedInfo> @@ -764,16 +975,16 @@ Obtains WLAN connection information. This API uses a promise to return the resul **Return value** - | Type| Description| - | -------- | -------- | - | Promise<[WifiLinkedInfo](#wifilinkedinfo)> | Promise used to return the WLAN connection information obtained.| +| Type| Description| +| -------- | -------- | +| Promise<[WifiLinkedInfo](#wifilinkedinfo)> | Promise used to return the WLAN connection information obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| | 2501001 | Wifi is closed.| @@ -789,22 +1000,22 @@ Obtains WLAN connection information. This API uses an asynchronous callback to r **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | callback | AsyncCallback<[WifiLinkedInfo](#wifilinkedinfo)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the WLAN connection information obtained. If **err** is not **0**, an error has occurred.| +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| callback | AsyncCallback<[WifiLinkedInfo](#wifilinkedinfo)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the WLAN connection information obtained. If **err** is not **0**, an error has occurred.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| | 2501001 | Wifi is closed.| **Example** ```js - import wifi from '@ohos.wifi'; + import wifi from '@ohos.wifiManager'; wifi.getLinkedInfo((err, data) => { if (err) { @@ -832,21 +1043,25 @@ Represents the WLAN connection information. | -------- | -------- | -------- | -------- | -------- | | ssid | string | Yes| No| SSID of the hotspot, in UTF-8 format.| | bssid | string | Yes| No| BSSID of the hotspot.| -| networkId | number | Yes| No| Network configuration ID.
**System API**: This is a system API.| +| networkId | number | Yes| No| Network configuration ID.
**System API**: This is a system API.| | rssi | number | Yes| No| RSSI of the hotspot, in dBm.| -| band | number | Yes| No| Frequency band of the WLAN AP.| -| linkSpeed | number | Yes| No| Speed of the WLAN AP.| +| band | number | Yes| No| Band of the WLAN AP.| +| linkSpeed | number | Yes| No| Uplink speed of the WLAN AP.| +| rxLinkSpeed10+ | number | Yes| No| Downlink speed of the WLAN AP.| +| maxSupportedTxLinkSpeed10+ | number | Yes| No| Maximum uplink speed supported.| +| maxSupportedRxLinkSpeed10+ | number | Yes| No| Maximum uplink speed supported.| | frequency | number | Yes| No| Frequency of the WLAN AP.| | isHidden | boolean | Yes| No| Whether to hide the WLAN AP.| | isRestricted | boolean | Yes| No| Whether to restrict data volume at the WLAN AP.| -| chload | number | Yes| No| Channel load. A larger value indicates a higher load.
**System API**: This is a system API.| -| snr | number | Yes| No| Signal-to-noise ratio (SNR).
**System API**: This is a system API.| -| macType9+ | number | Yes| No| MAC address type.| +| chload | number | Yes| No| Channel load. A larger value indicates a higher load.
**System API**: This is a system API.| +| snr | number | Yes| No| Signal-to-noise ratio (SNR).
**System API**: This is a system API.| +| macType | number | Yes| No| MAC address type.| | macAddress | string | Yes| No| MAC address of the device.| | ipAddress | number | Yes| No| IP address of the device that sets up the WLAN connection.| -| suppState | [SuppState](#suppstate) | Yes| No| Supplicant state.
**System API**: This is a system API.| +| suppState | [SuppState](#suppstate) | Yes| No| Supplicant state.
**System API**: This is a system API.| | connState | [ConnState](#connstate) | Yes| No| WLAN connection state.| - +| channelWidth10+ | [WifiChannelWidth](#wifichannelwidth) | Yes| No| Channel bandwidth of the connected hotspot.| +| wifiStandard10+ | [WifiStandard](#wifistandard) | Yes| No| Wi-Fi standard used by the connected hotspot.| ## ConnState9+ @@ -889,6 +1104,23 @@ Enumerates the supplicant states. | UNINITIALIZED | 10 | The supplicant failed to set up the connection.| | INVALID | 11 | Invalid value.| +## SuppState10+ + +Enumerates the Wi-Fi standards. + +**System capability**: SystemCapability.Communication.WiFi.STA + +| Name| Value| Description| +| -------- | -------- | -------- | +| WIFI_STANDARD_UNDEFINED | 0 | Undefined| +| WIFI_STANDARD_11A | 1 | 802.11a| +| WIFI_STANDARD_11B | 2 | 802.11b| +| WIFI_STANDARD_11G | 3 | 802.11g| +| WIFI_STANDARD_11N | 4 | 802.11n| +| WIFI_STANDARD_11AC | 5 | 802.11ac| +| WIFI_STANDARD_11AX | 6 | 802.11ax| +| WIFI_STANDARD_11AD | 7 | 802.11ad| + ## wifi.isConnected9+ @@ -902,18 +1134,31 @@ Checks whether the WLAN is connected. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if the WLAN is connected; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if the WLAN is connected; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let ret = wifiManager.isConnected(); + console.info("isConnected:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +``` + ## wifi.getSupportedFeatures9+ getSupportedFeatures(): number @@ -928,9 +1173,9 @@ Obtains the features supported by this device. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | number | Feature value. | +| **Type**| **Description**| +| -------- | -------- | +| number | Feature value. | **Feature IDs** @@ -951,10 +1196,23 @@ Obtains the features supported by this device. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2401000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let ret = wifiManager.getSupportedFeatures(); + console.info("supportedFeatures:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +``` + ## wifi.isFeatureSupported9+ isFeatureSupported(featureId: number): boolean @@ -968,24 +1226,38 @@ Checks whether the device supports the specified WLAN feature. **Parameters** - | **Name**| **Type**| Mandatory| **Description**| - | -------- | -------- | -------- | -------- | - | featureId | number | Yes| Feature ID.| +| **Name**| **Type**| Mandatory| **Description**| +| -------- | -------- | -------- | -------- | +| featureId | number | Yes| Feature ID.| **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if the feature is supported; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if the feature is supported; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2401000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let featureId = 0; + let ret = wifiManager.isFeatureSupported(featureId); + console.info("isFeatureSupported:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +``` + ## wifi.getDeviceMacAddress9+ getDeviceMacAddress(): string[] @@ -1000,18 +1272,31 @@ Obtains the device MAC address. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | string[] | MAC address obtained.| +| **Type**| **Description**| +| -------- | -------- | +| string[] | MAC address obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let ret = wifiManager.getDeviceMacAddress(); + console.info("deviceMacAddress:" + JSON.stringify(ret)); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } + +``` + ## wifi.getIpInfo9+ getIpInfo(): IpInfo @@ -1024,18 +1309,30 @@ Obtains IP information. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | [IpInfo](#ipinfo9) | IP information obtained.| +| **Type**| **Description**| +| -------- | -------- | +| [IpInfo](#ipinfo9) | IP information obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let info = wifiManager.getIpInfo(); + console.info("info:" + JSON.stringify(info)); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## IpInfo9+ Represents IP information. @@ -1065,18 +1362,30 @@ Obtains the country code. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | string | Country code obtained.| +| **Type**| **Description**| +| -------- | -------- | +| string | Country code obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2401000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let code = wifiManager.getCountryCode(); + console.info("code:" + code); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.reassociate9+ reassociate(): void @@ -1093,11 +1402,22 @@ Re-associates with the network. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| | 2501001 | Wifi is closed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.reassociate(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.reconnect9+ reconnect(): void @@ -1114,11 +1434,22 @@ Reconnects to the network. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| | 2501001 | Wifi is closed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.reconnect(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.getDeviceConfigs9+ getDeviceConfigs():  Array<[WifiDeviceConfig](#wifideviceconfig)> @@ -1127,27 +1458,39 @@ Obtains network configuration. **System API**: This is a system API. -**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.GET_WIFI_CONFIG +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, ohos.permission.APPROXIMATELY_LOCATION, and ohos.permission.GET_WIFI_CONFIG **System capability**: SystemCapability.Communication.WiFi.STA **Return value** - | **Type**| **Description**| - | -------- | -------- | - |  Array<[WifiDeviceConfig](#wifideviceconfig)> | Array of network configuration obtained.| +| **Type**| **Description**| +| -------- | -------- | +|  Array<[WifiDeviceConfig](#wifideviceconfig)> | Array of network configuration obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| -## wifi.updateNetwork9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let configs = wifiManager.getDeviceConfigs(); + console.info("configs:" + JSON.stringify(configs)); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` -updateNetwork(config: WifiDeviceConfig): number +## wifi.updateDeviceConfig9+ + +updateDeviceConfig(config: WifiDeviceConfig): number Updates network configuration. @@ -1159,27 +1502,44 @@ Updates network configuration. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiDeviceConfig](#wifideviceconfig) | Yes| New WLAN configuration.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiDeviceConfig](#wifideviceconfig) | Yes| New WLAN configuration.| **Return value** - | **Type**| **Description**| - | -------- | -------- | - | number | ID of the updated network configuration. The value **-1** indicates that the operation has failed.| +| **Type**| **Description**| +| -------- | -------- | +| number | ID of the updated network configuration. The value **-1** indicates that the operation has failed.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| -## wifi.disableNetwork9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + ssid : "****", + preSharedKey : "****", + securityType : 3 + } + let ret = wifiManager.updateDeviceConfig(config); + console.error("ret:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.disableDeviceConfig9+ -disableNetwork(netId: number): void +disableDeviceConfig(networkId: number): void Disables network configuration. @@ -1191,21 +1551,33 @@ Disables network configuration. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | netId | number | Yes| ID of the network configuration to disable.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| netId | number | Yes| ID of the network configuration to disable.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| -## wifi.removeAllNetwork9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let netId = 0; + wifiManager.disableDeviceConfig(netId); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.removeAllDeviceConfigs9+ -removeAllNetwork(): void +removeAllDeviceConfigs(): void Removes the configuration of all networks. @@ -1219,13 +1591,24 @@ Removes the configuration of all networks. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| -## wifi.removeDevice9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.removeAllDeviceConfigs(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.removeDeviceConfig9+ -removeDevice(id: number): void +removeDeviceConfig(networkId: number): void Removes the specified network configuration. @@ -1237,18 +1620,114 @@ Removes the specified network configuration. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | id | number | Yes| ID of the network configuration to remove.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| networkId | number | Yes| ID of the network configuration to remove.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | +| 2501000 | Operation failed.| + +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let id = 0; + wifiManager.removeDeviceConfig(id); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.isBandTypeSupported10+ + +isBandTypeSupported(bandType: WifiBandType): boolean + +Checks whether the current frequency band is supported. + +**Required permissions**: ohos.permission.GET_WIFI_INFO + +**System capability**: SystemCapability.Communication.WiFi.STA + +**Parameters** + +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| bandType | WifiBandType | Yes| Wi-Fi band type.| + +**Error codes** + +For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). + +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let type = 0; + boolean isBandTypeSupported = wifiManager.isBandTypeSupported(type); + console.info("isBandTypeSupported:" + isBandTypeSupported); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## WifiBandType 10+ + +Enumerates the Wi-Fi band types. + +**System capability**: SystemCapability.Communication.WiFi.STA + +| Name| Value| Description| +| -------- | -------- | -------- | +| WIFI_BAND_NONE | 0 | Undefined| +| WIFI_BAND_2G | 1 | 2 GHz| +| WIFI_BAND_5G | 2 | 5 GHz| +| WIFI_BAND_6G | 3 | 6 GHz| +| WIFI_BAND_60G | 4 | 60 GHz| + + +## wifi.get5GChannelList10+ + +get5GChannelList(): Array<number> + +Obtains the list of 5 GHz channels supported by this device. + +**System API**: This is a system API. + +**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.GET_WIFI_CONFIG + +**System capability**: SystemCapability.Communication.WiFi.STA + +**Error codes** + +For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). + +| **ID**| **Error Message**| +| -------- | -------- | +| 2501000 | Operation failed.| + +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let channelList = wifiManager.get5GChannelList(); + console.info("channelList:" + JSON.stringify(channelList)); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.enableHotspot9+ enableHotspot(): void @@ -1265,10 +1744,21 @@ Enables this hotspot. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.enableHotspot(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.disableHotspot9+ disableHotspot(): void @@ -1285,10 +1775,21 @@ Disables this hotspot. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.disableHotspot(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.isHotspotDualBandSupported9+ isHotspotDualBandSupported(): boolean @@ -1303,18 +1804,30 @@ Checks whether the hotspot supports dual band. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if the hotspot supports dual band; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if the hotspot supports dual band; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let ret = wifiManager.isHotspotDualBandSupported(); + console.info("result:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.isHotspotActive9+ isHotspotActive(): boolean @@ -1329,18 +1842,30 @@ Checks whether this hotspot is active. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | boolean | Returns **true** if the hotspot is active; returns **false** otherwise.| +| **Type**| **Description**| +| -------- | -------- | +| boolean | Returns **true** if the hotspot is active; returns **false** otherwise.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let ret = wifiManager.isHotspotActive(); + console.info("result:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.setHotspotConfig9+ setHotspotConfig(config: HotspotConfig): void @@ -1355,18 +1880,38 @@ Sets hotspot configuration. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | config | [HotspotConfig](#hotspotconfig9) | Yes| Hotspot configuration to set.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| config | [HotspotConfig](#hotspotconfig9) | Yes| Hotspot configuration to set.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + ssid: "****", + securityType: 3, + band: 0, + channel: 0, + preSharedKey: "****", + maxConn: 0 + } + let ret = wifiManager.setHotspotConfig(); + console.info("result:" + ret); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## HotspotConfig9+ Represents the hotspot configuration. @@ -1377,12 +1922,12 @@ Represents the hotspot configuration. | **Name**| **Type**| **Readable**| **Writable**| **Description**| | -------- | -------- | -------- | -------- | -------- | -| ssid | string | Yes| No| SSID of the hotspot, in UTF-8 format.| -| securityType | [WifiSecurityType](#wifisecuritytype) | Yes| No| Security type.| -| band | number | Yes| No| Hotspot band. The value **1** stands for 2.4 GHz, the value **2** for 5 GHz, and the value **3** for dual band.| -| preSharedKey | string | Yes| No| PSK of the hotspot.| -| maxConn | number | Yes| No| Maximum number of connections allowed.| - +| ssid | string | Yes| Yes| SSID of the hotspot, in UTF-8 format.| +| securityType | [WifiSecurityType](#wifisecuritytype) | Yes| Yes| Security type.| +| band | number | Yes| Yes| Hotspot band. The value **1** stands for 2.4 GHz, the value **2** for 5 GHz, and the value **3** for dual band.| +| channel10+ | number | Yes| Yes| Hotspot channel (2.4 GHz: 1 to 14; 5 GHz: 7 to 196; Dual-band: not supported currently) | +| preSharedKey | string | Yes| Yes| PSK of the hotspot.| +| maxConn | number | Yes| Yes| Maximum number of connections allowed.| ## wifi.getHotspotConfig9+ @@ -1398,44 +1943,68 @@ Obtains hotspot configuration. **Return value** - | **Type**| **Description**| - | -------- | -------- | - | [HotspotConfig](#hotspotconfig9) | Hotspot configuration obtained.| +| **Type**| **Description**| +| -------- | -------- | +| [HotspotConfig](#hotspotconfig9) | Hotspot configuration obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| -## wifi.getStations9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let config = wifiManager.getHotspotConfig(); + console.info("result:" + JSON.stringify(config)); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.getHotspotStations9+ -getStations():  Array<[StationInfo](#stationinfo9)> +getHotspotStations():  Array<[StationInfo](#stationinfo9)> Obtains information about the connected stations. **System API**: This is a system API. -**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.MANAGE_WIFI_HOTSPOT (available only to system applications) +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, ohos.permission.APPROXIMATELY_LOCATION, and ohos.permission.MANAGE_WIFI_HOTSPOT (available only to system applications) **System capability**: SystemCapability.Communication.WiFi.AP.Core **Return value** - | **Type**| **Description**| - | -------- | -------- | - |  Array<[StationInfo](#stationinfo9)> | Connected stations obtained.| +| **Type**| **Description**| +| -------- | -------- | +|  Array<[StationInfo](#stationinfo9)> | Connected stations obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let stations = wifiManager.getHotspotStations(); + console.info("result:" + JSON.stringify(stations)); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## StationInfo9+ Represents the station information. @@ -1463,18 +2032,36 @@ Obtains P2P link information. This API uses a promise to return the result. **Return value** - | Type| Description| - | -------- | -------- | - | Promise<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | Promise used to return the P2P link information obtained.| +| Type| Description| +| -------- | -------- | +| Promise<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | Promise used to return the P2P link information obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + wifi.getP2pLinkedInfo((err, data) => { + if (err) { + console.error("get p2p linked info error"); + return; + } + console.info("get wifi p2p linked info: " + JSON.stringify(data)); + }); + + wifi.getP2pLinkedInfo().then(data => { + console.info("get wifi p2p linked info: " + JSON.stringify(data)); + }); +``` + + ## WifiP2pLinkedInfo9+ Represents the P2P link information. @@ -1512,81 +2099,98 @@ Obtains P2P link information. This API uses an asynchronous callback to return t **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | callback | AsyncCallback<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the P2P link information. If **err** is not **0**, an error has occurred.| +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| callback | AsyncCallback<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the P2P link information. If **err** is not **0**, an error has occurred.| -## wifi.getCurrentGroup9+ +## wifi.getCurrentP2pGroup9+ -getCurrentGroup(): Promise<WifiP2pGroupInfo> +getCurrentP2pGroup(): Promise<WifiP2pGroupInfo> Obtains the current P2P group information. This API uses a promise to return the result. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Return value** - | Type| Description| - | -------- | -------- | - | Promise<[WifiP2pGroupInfo](#wifip2pgroupinfo9)> | Promise used to return the P2P group information obtained.| +| Type| Description| +| -------- | -------- | +| Promise<[WifiP2pGroupInfo](#wifip2pgroupinfo9)> | Promise used to return the P2P group information obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| -## wifi.getCurrentGroup9+ +## wifi.getCurrentP2pGroup9+ -getCurrentGroup(callback: AsyncCallback<WifiP2pGroupInfo>): void +getCurrentP2pGroup(callback: AsyncCallback<WifiP2pGroupInfo>): void Obtains the current P2P group information. This API uses an asynchronous callback to return the result. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | callback | AsyncCallback<[WifiP2pGroupInfo](#wifip2pgroupinfo9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the group information obtained. If **err** is not **0**, an error has occurred.| +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| callback | AsyncCallback<[WifiP2pGroupInfo](#wifip2pgroupinfo9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the group information obtained. If **err** is not **0**, an error has occurred.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + wifi.getCurrentP2pGroup((err, data) => { + if (err) { + console.error("get current P2P group error"); + return; + } + console.info("get current P2P group: " + JSON.stringify(data)); + }); + + wifi.getCurrentP2pGroup().then(data => { + console.info("get current P2P group: " + JSON.stringify(data)); + }); +``` + ## wifi.getP2pPeerDevices9+ getP2pPeerDevices(): Promise<WifiP2pDevice[]> Obtains the peer device list in the P2P connection. This API uses a promise to return the result. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Return value** - | Type| Description| - | -------- | -------- | - | Promise<[WifiP2pDevice[]](#wifip2pdevice9)> | Promise used to return the peer device list.| +| Type| Description| +| -------- | -------- | +| Promise<[WifiP2pDevice[]](#wifip2pdevice9)> | Promise used to return the peer device list.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.getP2pPeerDevices9+ @@ -1595,24 +2199,41 @@ getP2pPeerDevices(callback: AsyncCallback<WifiP2pDevice[]>): void Obtains the peer device list in the P2P connection. This API uses an asynchronous callback to return the result. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | callback | AsyncCallback<[WifiP2pDevice[]](#wifip2pdevice9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the peer device list obtained. If **err** is not **0**, an error has occurred.| +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| callback | AsyncCallback<[WifiP2pDevice[]](#wifip2pdevice9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the peer device list obtained. If **err** is not **0**, an error has occurred.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + wifi.getP2pPeerDevices((err, data) => { + if (err) { + console.error("get P2P peer devices error"); + return; + } + console.info("get P2P peer devices: " + JSON.stringify(data)); + }); + + wifi.getP2pPeerDevices().then(data => { + console.info("get P2P peer devices: " + JSON.stringify(data)); + }); +``` + ## WifiP2pDevice9+ Represents the P2P device information. @@ -1655,16 +2276,16 @@ Obtains the local device information in the P2P connection. This API uses a prom **Return value** - | Type| Description| - | -------- | -------- | - | Promise<[WifiP2pDevice](#wifip2pdevice9)> | Promise used to return the local device information obtained.| +| Type| Description| +| -------- | -------- | +| Promise<[WifiP2pDevice](#wifip2pdevice9)> | Promise used to return the local device information obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.getP2pLocalDevice9+ @@ -1679,14 +2300,34 @@ Obtains the local device information in the P2P connection. This API uses an asy **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | callback | AsyncCallback<[WifiP2pDevice](#wifip2pdevice9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the local device information obtained. If **err** is not **0**, an error has occurred.| +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| callback | AsyncCallback<[WifiP2pDevice](#wifip2pdevice9)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the local device information obtained. If **err** is not **0**, an error has occurred.| + +| **ID**| **Error Message**| +| -------- | -------- | +| 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + wifiManager.getP2pLocalDevice((err, data) => { + if (err) { + console.error("get P2P local device error"); + return; + } + console.info("get P2P local device: " + JSON.stringify(data)); + }); + + wifi.getP2pLocalDevice().then(data => { + console.info("get P2P local device: " + JSON.stringify(data)); + }); +``` -## wifi.createGroup9+ +## wifi.createP2pGroup9+ -createGroup(config: WifiP2PConfig): void +createP2pGroup(config: WifiP2PConfig): void Creates a P2P group. @@ -1696,18 +2337,37 @@ Creates a P2P group. **Parameters** - | **Name**| **Type**| Mandatory| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiP2PConfig](#wifip2pconfig9) | Yes| Group configuration.| +| **Name**| **Type**| Mandatory| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiP2PConfig](#wifip2pconfig9) | Yes| Group configuration.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let config = { + deviceAddress: "****", + netId: 0, + passphrase: "*****", + groupName: "****", + goBand: 0 + } + wifiManager.createP2pGroup(config); + + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## WifiP2PConfig9+ Represents P2P group configuration. @@ -1736,9 +2396,9 @@ Enumerates the P2P group frequency bands. | GO_BAND_5GHZ | 2 | 5 GHz.| -## wifi.removeGroup9+ +## wifi.removeP2pGroup9+ -removeGroup(): void +removeP2pGroup(): void Removes this P2P group. @@ -1750,33 +2410,43 @@ Removes this P2P group. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.removeP2pGroup(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.p2pConnect9+ p2pConnect(config: WifiP2PConfig): void Sets up a P2P connection. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - - | **Name**| **Type**| Mandatory| **Description**| - | -------- | -------- | -------- | -------- | - | config | [WifiP2PConfig](#wifip2pconfig9) | Yes| P2P group configuration.| +| **Name**| **Type**| Mandatory| **Description**| +| -------- | -------- | -------- | -------- | +| config | [WifiP2PConfig](#wifip2pconfig9) | Yes| P2P group configuration.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| **Example** @@ -1843,7 +2513,7 @@ For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorco setTimeout(function() {wifi.off("p2pDeviceChange", recvP2pDeviceChangeFunc);}, 125 * 1000); setTimeout(function() {wifi.off("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc);}, 125 * 1000); setTimeout(function() {wifi.off("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc);}, 125 * 1000); - console.info("start discover devices -> " + wifi.startDiscoverDevices()); + console.info("start discover devices -> " + wifi.startP2pDiscoverDevices()); ``` ## wifi.p2pCancelConnect9+ @@ -1860,17 +2530,28 @@ Cancels this P2P connection. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| -## wifi.startDiscoverDevices9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.p2pCancelConnect(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.startDiscoverP2pDevices9+ -startDiscoverDevices(): void +startDiscoverP2pDevices(): void Starts to discover devices. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P @@ -1878,13 +2559,24 @@ Starts to discover devices. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| -## wifi.stopDiscoverDevices9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.startDiscoverP2pDevices(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.stopDiscoverP2pDevices9+ -stopDiscoverDevices(): void +stopDiscoverP2pDevices(): void Stops discovering devices. @@ -1896,13 +2588,24 @@ Stops discovering devices. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| -## wifi.deletePersistentGroup9+ +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + wifiManager.stopDiscoverP2pDevices(); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + +## wifi.deletePersistentP2pGroup9+ -deletePersistentGroup(netId: number): void +deletePersistentP2pGroup(netId: number): void Deletes a persistent group. @@ -1915,18 +2618,30 @@ Deletes a persistent group. **Parameters** - | **Name**| **Type**| Mandatory| **Description**| - | -------- | -------- | -------- | -------- | - | netId | number | Yes| ID of the group to delete.| +| **Name**| **Type**| Mandatory| **Description**| +| -------- | -------- | -------- | -------- | +| netId | number | Yes| ID of the group to delete.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let netId = 0; + wifiManager.deletePersistentP2pGroup(netId); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.getP2pGroups9+ getP2pGroups(): Promise<Array<WifiP2pGroupInfo>> @@ -1935,24 +2650,42 @@ Obtains information about all P2P groups. This API uses a promise to return the **System API**: This is a system API. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Return value** - | Type| Description| - | -------- | -------- | - | Promise< Array<[WifiP2pGroupInfo](#wifip2pgroupinfo9)> > | Promise used to return the group information obtained.| +| Type| Description| +| -------- | -------- | +| Promise< Array<[WifiP2pGroupInfo](#wifip2pgroupinfo9)> > | Promise used to return the group information obtained.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + wifiManager.getP2pGroups((err, data) => { + if (err) { + console.error("get P2P groups error"); + return; + } + console.info("get P2P groups: " + JSON.stringify(data)); + }); + + wifi.getP2pGroups().then(data => { + console.info("get P2P groups: " + JSON.stringify(data)); + }); + +``` + ## WifiP2pGroupInfo9+ Represents the P2P group information. @@ -1980,27 +2713,27 @@ Obtains information about all P2P groups. This API uses an asynchronous callback **System API**: This is a system API. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | callback | AsyncCallback< Array<[WifiP2pGroupInfo](#wifip2pgroupinfo9)>> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the group information obtained. If **err** is not **0**, an error has occurred.| +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| callback | AsyncCallback< Array<[WifiP2pGroupInfo](#wifip2pgroupinfo9)>> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the group information obtained. If **err** is not **0**, an error has occurred.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| -## wifi.setDeviceName9+ +## wifi.setP2pDeviceName9+ -setDeviceName(devName: string): void +setP2pDeviceName(devName: string): void Sets the device name. @@ -2012,18 +2745,30 @@ Sets the device name. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | devName | string | Yes| Device name to set.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| devName | string | Yes| Device name to set.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** +``` + import wifi from '@ohos.wifiManager'; + + try { + let name = "****"; + wifiManager.setP2pDeviceName(netId); + }catch(error){ + console.error("failed:" + JSON.stringify(error)); + } +``` + ## wifi.on('wifiStateChange')9+ on(type: "wifiStateChange", callback: Callback<number>): void @@ -2036,17 +2781,17 @@ Registers the WLAN state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **wifiStateChange**.| - | callback | Callback<number> | Yes| Callback invoked to return the WLAN state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **wifiStateChange**.| +| callback | Callback<number> | Yes| Callback invoked to return the WLAN state.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| **WLAN states** @@ -2071,17 +2816,17 @@ Unregisters the WLAN state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **wifiStateChange**.| - | callback | Callback<number> | No| Callback for the WLAN state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **wifiStateChange**.| +| callback | Callback<number> | No| Callback for the WLAN state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| **Example** @@ -2112,10 +2857,10 @@ Registers the WLAN connection state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **wifiConnectionChange**.| - | callback | Callback<number> | Yes| Callback invoked to return the WLAN connection state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **wifiConnectionChange**.| +| callback | Callback<number> | Yes| Callback invoked to return the WLAN connection state.| **WLAN connection states** @@ -2128,8 +2873,8 @@ Registers the WLAN connection state change events. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| ## wifi.off('wifiConnectionChange')9+ @@ -2144,19 +2889,34 @@ Unregisters the WLAN connection state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **wifiConnectionChange**.| - | callback | Callback<number> | No| Callback for the WLAN connection state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **wifiConnectionChange**.| +| callback | Callback<number> | No| Callback for the WLAN connection state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifi'; + + var recvWifiConnectionChangeFunc = result => { + console.info("Receive wifi connection change event: " + result); + } + + // Register an event. + wifi.on("wifiConnectionChange", recvWifiConnectionChangeFunc); + + // Unregister an event. + wifi.off("wifiConnectionChange", recvWifiConnectionChangeFunc); + ``` + ## wifi.on('wifiScanStateChange')9+ on(type: "wifiScanStateChange", callback: Callback<number>): void @@ -2169,10 +2929,10 @@ Registers the WLAN scan state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **wifiScanStateChange**.| - | callback | Callback<number> | Yes| Callback invoked to return the WLAN scan state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **wifiScanStateChange**.| +| callback | Callback<number> | Yes| Callback invoked to return the WLAN scan state.| **WLAN scan states** @@ -2185,8 +2945,8 @@ Registers the WLAN scan state change events. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| ## wifi.off('wifiScanStateChange')9+ @@ -2210,10 +2970,25 @@ Unregisters the WLAN scan state change events. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifi'; + + var recvWifiScanStateChangeFunc = result => { + console.info("Receive Wifi scan state change event: " + result); + } + + // Register an event. + wifi.on("wifiScanStateChange", recvWifiScanStateChangeFunc); + + // Unregister an event. + wifi.off("wifiScanStateChange", recvWifiScanStateChangeFunc); + ``` + ## wifi.on('wifiRssiChange')9+ on(type: "wifiRssiChange", callback: Callback<number>): void @@ -2226,17 +3001,17 @@ Registers the RSSI change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **wifiRssiChange**.| - | callback | Callback<number> | Yes| Callback invoked to return the RSSI, in dBm.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **wifiRssiChange**.| +| callback | Callback<number> | Yes| Callback invoked to return the RSSI, in dBm.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| ## wifi.off('wifiRssiChange')9+ @@ -2251,19 +3026,34 @@ Unregisters the RSSI change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **wifiRssiChange**.| - | callback | Callback<number> | No| Callback for the RSSI change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **wifiRssiChange**.| +| callback | Callback<number> | No| Callback for the RSSI change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2501000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvWifiRssiChangeFunc = result => { + console.info("Receive wifi rssi change event: " + result); + } + + // Register an event. + wifiManager.on("wifiRssiChange", recvWifiRssiChangeFunc); + + // Unregister an event. + wifiManager.off("wifiRssiChange", recvWifiRssiChangeFunc); + ``` + ## wifi.on('hotspotStateChange')9+ on(type: "hotspotStateChange", callback: Callback<number>): void @@ -2276,10 +3066,10 @@ Registers the hotspot state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **hotspotStateChange**.| - | callback | Callback<number> | Yes| Callback invoked to return the hotspot state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **hotspotStateChange**.| +| callback | Callback<number> | Yes| Callback invoked to return the hotspot state.| **Hotspot states** @@ -2294,8 +3084,8 @@ Registers the hotspot state change events. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| ## wifi.off('hotspotStateChange')9+ @@ -2310,19 +3100,34 @@ Unregisters the hotspot state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **hotspotStateChange**.| - | callback | Callback<number> | No| Callback for the hotspot state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **hotspotStateChange**.| +| callback | Callback<number> | No| Callback for the hotspot state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2601000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvHotspotStateChangeFunc = result => { + console.info("Receive hotspot state change event: " + result); + } + + // Register an event. + wifiManager.on("hotspotStateChange", recvHotspotStateChangeFunc); + + // Unregister an event. + wifiManager.off("hotspotStateChange", recvHotspotStateChangeFunc); + ``` + ## wifi.on('p2pStateChange')9+ on(type: "p2pStateChange", callback: Callback<number>): void @@ -2335,10 +3140,10 @@ Registers the P2P state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pStateChange**.| - | callback | Callback<number> | Yes| Callback invoked to return the P2P state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pStateChange**.| +| callback | Callback<number> | Yes| Callback invoked to return the P2P state.| **P2P states** @@ -2354,8 +3159,8 @@ Registers the P2P state change events. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.off('p2pStateChange')9+ @@ -2370,19 +3175,34 @@ Unregisters the P2P state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pStateChange**.| - | callback | Callback<number> | No| Callback for the P2P state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pStateChange**.| +| callback | Callback<number> | No| Callback for the P2P state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvP2pStateChangeFunc = result => { + console.info("Receive p2p state change event: " + result); + } + + // Register an event. + wifiManager.on("p2pStateChange", recvP2pStateChangeFunc); + + // Unregister an event. + wifiManager.off("p2pStateChange", recvP2pStateChangeFunc); + ``` + ## wifi.on('p2pConnectionChange')9+ on(type: "p2pConnectionChange", callback: Callback<WifiP2pLinkedInfo>): void @@ -2395,17 +3215,17 @@ Registers the P2P connection state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pConnectionChange**.| - | callback | Callback<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | Yes| Callback invoked to return the P2P connection state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pConnectionChange**.| +| callback | Callback<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | Yes| Callback invoked to return the P2P connection state.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.off('p2pConnectionChange')9+ @@ -2420,42 +3240,57 @@ Unregisters the P2P connection state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pConnectionChange**.| - | callback | Callback<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | No| Callback for the P2P connection state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pConnectionChange**.| +| callback | Callback<[WifiP2pLinkedInfo](#wifip2plinkedinfo9)> | No| Callback for the P2P connection state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvP2pConnectionChangeFunc = result => { + console.info("Receive p2p connection change event: " + result); + } + + // Register an event. + wifiManager.on("p2pConnectionChange", recvP2pConnectionChangeFunc); + + // Unregister an event. + wifiManager.off("p2pConnectionChange", recvP2pConnectionChangeFunc); + ``` + ## wifi.on('p2pDeviceChange')9+ on(type: "p2pDeviceChange", callback: Callback<WifiP2pDevice>): void Registers the P2P device state change events. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pDeviceChange**.| - | callback | Callback<[WifiP2pDevice](#wifip2pdevice9)> | Yes| Callback invoked to return the P2P device state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pDeviceChange**.| +| callback | Callback<[WifiP2pDevice](#wifip2pdevice9)> | Yes| Callback invoked to return the P2P device state.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.off('p2pDeviceChange')9+ @@ -2464,48 +3299,63 @@ off(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void Unregisters the P2P device state change events. -**Required permissions**: ohos.permission.LOCATION +**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pDeviceChange**.| - | callback | Callback<[WifiP2pDevice](#wifip2pdevice9)> | No| Callback for the P2P device state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pDeviceChange**.| +| callback | Callback<[WifiP2pDevice](#wifip2pdevice9)> | No| Callback for the P2P device state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvP2pDeviceChangeFunc = result => { + console.info("Receive recv p2p device change event: " + result); + } + + // Register an event. + wifiManager.on("p2pDeviceChange", recvP2pDeviceChangeFunc); + + // Unregister an event. + wifiManager.off("p2pDeviceChange", recvP2pDeviceChangeFunc); + ``` + ## wifi.on('p2pPeerDeviceChange')9+ on(type: "p2pPeerDeviceChange", callback: Callback<WifiP2pDevice[]>): void Registers the P2P peer device state change events. -**Required permissions**: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION +**Required permissions**: ohos.permission.GET_WIFI_INFO, ohos.permission.LOCATION, and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pPeerDeviceChange**.| - | callback | Callback<[WifiP2pDevice[]](#wifip2pdevice9)> | Yes| Callback invoked to return the P2P peer device state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pPeerDeviceChange**.| +| callback | Callback<[WifiP2pDevice[]](#wifip2pdevice9)> | Yes| Callback invoked to return the P2P peer device state.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.off('p2pPeerDeviceChange')9+ @@ -2514,25 +3364,40 @@ off(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): vo Unregisters the P2P peer device state change events. -**Required permissions**: ohos.permission.LOCATION +**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION **System capability**: SystemCapability.Communication.WiFi.P2P **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pPeerDeviceChange**.| - | callback | Callback<[WifiP2pDevice[]](#wifip2pdevice9)> | No| Callback for the P2P peer device state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pPeerDeviceChange**.| +| callback | Callback<[WifiP2pDevice[]](#wifip2pdevice9)> | No| Callback for the P2P peer device state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvP2pPeerDeviceChangeFunc = result => { + console.info("Receive recv p2p peer device change event: " + result); + } + + // Register an event. + wifiManager.on("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc); + + // Unregister an event. + wifiManager.off("p2pPeerDeviceChange", recvP2pPeerDeviceChangeFunc); + ``` + ## wifi.on('p2pPersistentGroupChange')9+ on(type: "p2pPersistentGroupChange", callback: Callback<void>): void @@ -2545,17 +3410,17 @@ Registers the P2P persistent group state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pPersistentGroupChange**.| - | callback | Callback<void> | Yes| Callback invoked to return the P2P persistent group state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pPersistentGroupChange**.| +| callback | Callback<void> | Yes| Callback invoked to return the P2P persistent group state.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.off('p2pPersistentGroupChange')9+ @@ -2570,19 +3435,34 @@ Unregisters the P2P persistent group state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pPersistentGroupChange**.| - | callback | Callback<void> | No| Callback for the P2P persistent group state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pPersistentGroupChange**.| +| callback | Callback<void> | No| Callback for the P2P persistent group state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvP2pPersistentGroupChangeFunc = result => { + console.info("Receive recv p2p persistent group change event: " + result); + } + + // Register an event. + wifiManager.on("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc); + + // Unregister an event. + wifiManager.off("p2pPersistentGroupChange", recvP2pPersistentGroupChangeFunc); + ``` + ## wifi.on('p2pDiscoveryChange')9+ on(type: "p2pDiscoveryChange", callback: Callback<number>): void @@ -2595,10 +3475,10 @@ Registers the P2P device discovery state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pDiscoveryChange**.| - | callback | Callback<number> | Yes| Callback invoked to return the P2P device discovery state.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pDiscoveryChange**.| +| callback | Callback<number> | Yes| Callback invoked to return the P2P device discovery state.| **P2P discovered device states** @@ -2611,8 +3491,8 @@ Registers the P2P device discovery state change events. For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| ## wifi.off('p2pDiscoveryChange')9+ @@ -2627,15 +3507,30 @@ Unregisters the P2P device discovery state change events. **Parameters** - | **Name**| **Type**| **Mandatory**| **Description**| - | -------- | -------- | -------- | -------- | - | type | string | Yes| Event type. The value is **p2pDiscoveryChange**.| - | callback | Callback<number> | No| Callback for the P2P device discovery state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| +| **Name**| **Type**| **Mandatory**| **Description**| +| -------- | -------- | -------- | -------- | +| type | string | Yes| Event type. The value is **p2pDiscoveryChange**.| +| callback | Callback<number> | No| Callback for the P2P device discovery state change. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.| **Error codes** For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md). -| **Type**| **Description**| - | -------- | -------- | +| **ID**| **Error Message**| +| -------- | -------- | | 2801000 | Operation failed.| + +**Example** + ```js + import wifi from '@ohos.wifiManager'; + + var recvP2pDiscoveryChangeFunc = result => { + console.info("Receive recv p2p discovery change event: " + result); + } + + // Register an event. + wifiManager.on("p2pDiscoveryChange", recvP2pDiscoveryChangeFunc); + + // Unregister an event. + wifiManager.off("p2pDiscoveryChange", recvP2pDiscoveryChangeFunc); + ``` diff --git a/en/application-dev/reference/apis/js-apis-worker.md b/en/application-dev/reference/apis/js-apis-worker.md index 490e283c3689bbcf602bbe0c826ffc579523b426..7c74cdefcec7c61d2d2731ab64eae2f092a340ec 100644 --- a/en/application-dev/reference/apis/js-apis-worker.md +++ b/en/application-dev/reference/apis/js-apis-worker.md @@ -83,9 +83,9 @@ import worker from '@ohos.worker'; // Create a Worker instance. // In the FA model, the workers directory is at the same level as the pages directory in the entry module. -const workerFAModel01 = new worker.ThreadWorker("workers/worker.js", {name:"first worker in FA model"}); +const workerFAModel01 = new worker.ThreadWorker("workers/worker.ts", {name:"first worker in FA model"}); // In the FA model, the workers directory is at the same level as the parent directory of the pages directory in the entry module. -const workerFAModel02 = new worker.ThreadWorker("../workers/worker.js"); +const workerFAModel02 = new worker.ThreadWorker("../workers/worker.ts"); // In the stage model, the workers directory is at the same level as the pages directory in the entry module. const workerStageModel01 = new worker.ThreadWorker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"}); @@ -872,13 +872,13 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts"); workerInstance.postMessage("hello world"); workerInstance.onmessage = function(e) { // let data = e.data; - console.log("receive data from worker.js"); + console.log("receive data from worker.ts"); } ``` @@ -920,13 +920,13 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts"); workerInstance.postMessage("hello world"); workerInstance.onmessage = function(e) { // let data = e.data; - console.log("receive data from worker.js"); + console.log("receive data from worker.ts"); } ``` @@ -936,7 +936,7 @@ import worker from '@ohos.worker'; const workerPort = worker.workerPort; workerPort.onmessage = function(e){ // let data = e.data; - workerPort.postMessage("receive data from main.js"); + workerPort.postMessage("receive data from main thread"); } ``` @@ -960,7 +960,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts"); ``` @@ -1002,7 +1002,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts"); workerInstance.postMessage("hello world"); @@ -1013,7 +1013,7 @@ workerInstance.postMessage("hello world"); import worker from '@ohos.worker'; const workerPort = worker.workerPort; workerPort.onmessage = function(e) { - console.log("receive main.js message"); + console.log("receive main thread message"); } ``` @@ -1045,7 +1045,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts"); ``` @@ -1055,7 +1055,7 @@ const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts"); import worker from '@ohos.worker'; const parentPort = worker.workerPort; parentPort.onmessageerror = function(e) { - console.log("worker.js onmessageerror") + console.log("worker.ts onmessageerror") } ``` @@ -1130,7 +1130,7 @@ Defines the event handler to be called when an exception occurs during worker ex **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts") ``` @@ -1140,7 +1140,7 @@ const workerInstance = new worker.ThreadWorker("entry/ets/workers/worker.ts") import worker from '@ohos.worker'; const workerPort = worker.workerPort workerPort.onerror = function(e){ - console.log("worker.js onerror") + console.log("worker.ts onerror") } ``` @@ -1193,9 +1193,9 @@ import worker from '@ohos.worker'; // Create a Worker instance. // In the FA model, the workers directory is at the same level as the pages directory. -const workerFAModel01 = new worker.Worker("workers/worker.js", {name:"first worker in FA model"}); +const workerFAModel01 = new worker.Worker("workers/worker.ts", {name:"first worker in FA model"}); // In the FA model, the workers directory is at the same level as the parent directory of the pages directory. -const workerFAModel02 = new worker.Worker("../workers/worker.js"); +const workerFAModel02 = new worker.Worker("../workers/worker.ts"); // In the stage model, the workers directory is at the same level as the pages directory. const workerStageModel01 = new worker.Worker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"}); @@ -1275,7 +1275,7 @@ Sends a message to the worker thread. The data type of the message must be seque **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); var buffer = new ArrayBuffer(8); workerInstance.postMessage(buffer, [buffer]); @@ -1302,7 +1302,7 @@ Sends a message to the worker thread. The data type of the message must be seque **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.postMessage("hello world"); @@ -1332,7 +1332,7 @@ Adds an event listener for the worker thread. This API provides the same functio **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.on("alert", (e)=>{ console.log("alert listener callback"); }) @@ -1360,7 +1360,7 @@ Adds an event listener for the worker thread and removes the event listener afte **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.once("alert", (e)=>{ console.log("alert listener callback"); }) @@ -1388,7 +1388,7 @@ Removes an event listener for the worker thread. This API provides the same func **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); // Use on, once, or addEventListener to add a listener for the "alert" event, and use off to remove the listener. workerInstance.off("alert"); ``` @@ -1408,7 +1408,7 @@ Terminates the worker thread to stop it from receiving messages. **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.terminate(); ``` @@ -1433,7 +1433,7 @@ Defines the event handler to be called when the worker thread exits. The handler **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.onexit = function(e) { console.log("onexit"); } @@ -1467,7 +1467,7 @@ Defines the event handler to be called when an exception occurs during worker ex **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.onerror = function(e) { console.log("onerror"); } @@ -1489,12 +1489,12 @@ Defines the event handler to be called when the host thread receives a message s | Name| Type | Mandatory| Description | | ------ | ------------------------------ | ---- | ---------------------- | -| event | [MessageEvent](#messageeventt) | Yes | Message received.| +| event | [MessageEvent](#messageeventt)| Yes | Message received.| **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.onmessage = function(e) { // e: MessageEvent. The usage is as follows: // let data = e.data; @@ -1518,12 +1518,12 @@ Defines the event handler to be called when the worker thread receives a message | Name| Type | Mandatory| Description | | ------ | ------------------------------ | ---- | ---------- | -| event | [MessageEvent](#messageeventt) | Yes | Error data.| +| event | [MessageEvent](#messageeventt)| Yes | Error data.| **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.onmessageerror= function(e) { console.log("onmessageerror"); } @@ -1555,7 +1555,7 @@ Adds an event listener for the worker thread. This API provides the same functio **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.addEventListener("alert", (e)=>{ console.log("alert listener callback"); }) @@ -1583,7 +1583,7 @@ Removes an event listener for the worker thread. This API provides the same func **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.addEventListener("alert", (e)=>{ console.log("alert listener callback"); }) @@ -1617,7 +1617,7 @@ Dispatches the event defined for the worker thread. **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.dispatchEvent({type:"eventType", timeStamp:0}); // timeStamp is not supported yet. ``` @@ -1625,7 +1625,7 @@ workerInstance.dispatchEvent({type:"eventType", timeStamp:0}); // timeStamp is n The **dispatchEvent** API can be used together with the **on**, **once**, and **addEventListener** APIs. The sample code is as follows: ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); // Usage 1: workerInstance.on("alert_on", (e)=>{ @@ -1677,7 +1677,7 @@ Removes all event listeners for the worker thread. **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.addEventListener("alert", (e)=>{ console.log("alert listener callback"); }) @@ -1732,17 +1732,17 @@ Sends a message to the host thread from the worker thread. **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.postMessage("hello world"); workerInstance.onmessage = function(e) { // let data = e.data; - console.log("receive data from worker.js"); + console.log("receive data from worker.ts"); } ``` ```js -// worker.js +// worker.ts import worker from '@ohos.worker'; const parentPort = worker.parentPort; parentPort.onmessage = function(e){ @@ -1773,22 +1773,22 @@ Sends a message to the host thread from the worker thread. **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.postMessage("hello world"); workerInstance.onmessage = function(e) { // let data = e.data; - console.log("receive data from worker.js"); + console.log("receive data from worker.ts"); } ``` ```js -// worker.js +// worker.ts import worker from '@ohos.worker'; const parentPort = worker.parentPort; parentPort.onmessage = function(e){ // let data = e.data; - parentPort.postMessage("receive data from main.js"); + parentPort.postMessage("receive data from main thread"); } ``` @@ -1806,12 +1806,12 @@ Terminates the worker thread to stop it from receiving messages. **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); ``` ```js -// worker.js +// worker.ts import worker from '@ohos.worker'; const parentPort = worker.parentPort; parentPort.onmessage = function(e) { @@ -1836,22 +1836,22 @@ Defines the event handler to be called when the worker thread receives a message | Name| Type | Mandatory| Description | | ------ | ------------------------------------------------------------ | ---- | ------------------------ | | this | [DedicatedWorkerGlobalScope](#dedicatedworkerglobalscopedeprecated) | Yes | Caller. | -| ev | [MessageEvent](#messageeventt) | Yes | Message received.| +| ev | [MessageEvent](#messageeventt) | Yes | Message received.| **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.postMessage("hello world"); ``` ```js -// worker.js +// worker.ts import worker from '@ohos.worker'; const parentPort = worker.parentPort; parentPort.onmessage = function(e) { - console.log("receive main.js message"); + console.log("receive main thread message"); } ``` @@ -1872,21 +1872,21 @@ Defines the event handler to be called when the worker thread receives a message | Name| Type | Mandatory| Description | | ------ | ------------------------------ | ---- | ---------- | | this | [DedicatedWorkerGlobalScope](#dedicatedworkerglobalscopedeprecated) | Yes | Caller.| -| ev | [MessageEvent](#messageeventt) | Yes | Error data.| +| ev | [MessageEvent](#messageeventt)| Yes | Error data.| **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); ``` ```js -// worker.js +// worker.ts import worker from '@ohos.worker'; const parentPort = worker.parentPort; parentPort.onmessageerror = function(e) { - console.log("worker.js onmessageerror") + console.log("worker.ts onmessageerror") } ``` @@ -1940,7 +1940,7 @@ Implements event listening. **Example** ```js -const workerInstance = new worker.Worker("workers/worker.js"); +const workerInstance = new worker.Worker("workers/worker.ts"); workerInstance.addEventListener("alert", (e)=>{ console.log("alert listener callback"); }) @@ -2010,16 +2010,16 @@ Defines the event handler to be called when an exception occurs during worker ex **Example** ```js -// main.js +// Main thread import worker from '@ohos.worker'; -const workerInstance = new worker.Worker("workers/worker.js") +const workerInstance = new worker.Worker("workers/worker.ts") ``` ```js -// worker.js +// worker.ts import worker from '@ohos.worker'; const parentPort = worker.parentPort parentPort.onerror = function(e){ - console.log("worker.js onerror") + console.log("worker.ts onerror") } ``` @@ -2045,17 +2045,17 @@ Exception: When an object created through a custom class is passed, no serializa > An FA project of API version 9 is used as an example. ```js -// main.js +// Main thread import worker from '@ohos.worker'; -const workerInstance = new worker.ThreadWorker("workers/worker.js"); -workerInstance.postMessage("message from main to worker"); +const workerInstance = new worker.ThreadWorker("workers/worker.ts"); +workerInstance.postMessage("message from main thread to worker"); workerInstance.onmessage = function(d) { // When the worker thread passes obj2, data contains obj2, excluding the Init or SetName method. let data = d.data; } ``` ```js -// worker.js +// worker.ts import worker from '@ohos.worker'; const workerPort = worker.workerPort; class MyModel { @@ -2065,7 +2065,7 @@ class MyModel { } } workerPort.onmessage = function(d) { - console.log("worker.js onmessage"); + console.log("worker.ts onmessage"); let data = d.data; let func1 = function() { console.log("post message is function"); @@ -2083,10 +2083,10 @@ workerPort.onmessage = function(d) { workerPort.postMessage(obj2); // No serialization error occurs when passing obj2. } workerPort.onmessageerror = function(e) { - console.log("worker.js onmessageerror"); + console.log("worker.ts onmessageerror"); } workerPort.onerror = function(e) { - console.log("worker.js onerror"); + console.log("worker.ts onerror"); } ``` @@ -2111,15 +2111,10 @@ Each actor concurrently processes tasks of the main thread. For each actor, ther ### FA Model ```js -// main.js (The following assumes that the workers directory and pages directory are at the same level.) +// Main thread (The following assumes that the workers directory and pages directory are at the same level.) import worker from '@ohos.worker'; // Create a Worker instance in the main thread. const workerInstance = new worker.ThreadWorker("workers/worker.ts"); -// Create either a .json or .ts file. -// const workerInstance = new worker.ThreadWorker("workers/worker.js"); - -// In versions earlier than API version 9, use the following to create a Worker instance in the main thread. -// const workerInstance = new worker.Worker("workers/worker.js"); // The main thread transfers information to the worker thread. workerInstance.postMessage("123"); @@ -2128,7 +2123,7 @@ workerInstance.postMessage("123"); workerInstance.onmessage = function(e) { // data carries the information sent by the worker thread. let data = e.data; - console.log("main.js onmessage"); + console.log("main thread onmessage"); // Terminate the Worker instance. workerInstance.terminate(); @@ -2136,7 +2131,7 @@ workerInstance.onmessage = function(e) { // Call onexit(). workerInstance.onexit = function() { - console.log("main.js terminate"); + console.log("main thread terminate"); } ``` ```js @@ -2146,9 +2141,6 @@ import worker from '@ohos.worker'; // Create an object in the worker thread for communicating with the main thread. const workerPort = worker.workerPort -// In versions earlier than API version 9, use the following to create an object in the worker thread for communicating with the main thread. -// const parentPort = worker.parentPort - // The worker thread receives information from the main thread. workerPort.onmessage = function(e) { // data carries the information sent by the main thread. @@ -2176,13 +2168,11 @@ Configuration of the **build-profile.json5** file: ``` ### Stage Model ```js -// main.js (The following assumes that the workers directory and pages directory are at different levels.) +// Main thread (The following assumes that the workers directory and pages directory are at different levels.) import worker from '@ohos.worker'; // Create a Worker instance in the main thread. const workerInstance = new worker.ThreadWorker("entry/ets/pages/workers/worker.ts"); -// Create either a .json or .ts file. -// const workerInstance = new worker.ThreadWorker("entry/ets/pages/workers/worker.js"); // The main thread transfers information to the worker thread. workerInstance.postMessage("123"); @@ -2191,14 +2181,14 @@ workerInstance.postMessage("123"); workerInstance.onmessage = function(e) { // data carries the information sent by the worker thread. let data = e.data; - console.log("main.js onmessage"); + console.log("main thread onmessage"); // Terminate the Worker instance. workerInstance.terminate(); } // Call onexit(). workerInstance.onexit = function() { - console.log("main.js terminate"); + console.log("main thread terminate"); } ``` ```js diff --git a/en/application-dev/reference/apis/js-apis-zlib.md b/en/application-dev/reference/apis/js-apis-zlib.md index 05a99a8f76cf5195fed45d270945b9dc0aa8f25a..29a08b65aba9d945cfcdf2bbdf897a4527e40c38 100644 --- a/en/application-dev/reference/apis/js-apis-zlib.md +++ b/en/application-dev/reference/apis/js-apis-zlib.md @@ -248,6 +248,7 @@ For details about the error codes, see [zlib Error Codes](../errorcodes/errorcod | -------- | --------------------------------------| | 900001 | The input source file is invalid. | | 900002 | The input destination file is invalid. | +| 900003 | The input source file is not ZIP format or damaged. | **Example** @@ -298,6 +299,7 @@ For details about the error codes, see [zlib Error Codes](../errorcodes/errorcod | ------ | ------------------------------------- | | 900001 | The input source file is invalid. | | 900002 | The input destination file is invalid. | +| 900003 | The input source file is not ZIP format or damaged. | ```typescript // Decompress a file. diff --git a/en/application-dev/reference/arkui-ts/Readme-EN.md b/en/application-dev/reference/arkui-ts/Readme-EN.md index 7d723dc4082fd6f1aa65fe7ff181fc3fcd268621..d937a73a45b5f54e51e2b46952c860c9e69cd95e 100644 --- a/en/application-dev/reference/arkui-ts/Readme-EN.md +++ b/en/application-dev/reference/arkui-ts/Readme-EN.md @@ -12,6 +12,7 @@ - [Mouse Event](ts-universal-mouse-key.md) - [Component Area Change Event](ts-universal-component-area-change-event.md) - [Visible Area Change Event](ts-universal-component-visible-area-change-event.md) + - [Custom Keyboard Shortcuts](ts-universal-events-keyboardshortcut.md) - Universal Attributes - [Size](ts-universal-attributes-size.md) - [Location](ts-universal-attributes-location.md) @@ -42,6 +43,9 @@ - [Background Blur](ts-universal-attributes-backgroundBlurStyle.md) - [restoreId](ts-universal-attributes-restoreId.md) - [Foreground Color](ts-universal-attributes-foreground-color.md) + - [Spherical Effect](ts-universal-attributes-sphericalEffect.md) + - [Light Up Effect](ts-universal-attributes-lightUpEffect.md) + - [Pixel Stretch Effect](ts-universal-attributes-pixelStretchEffect.md) - [Universal Text Attributes](ts-universal-attributes-text-style.md) - Gesture Handling - [Gesture Binding Methods](ts-gesture-settings.md) @@ -62,10 +66,11 @@ - [DataPanel](ts-basic-components-datapanel.md) - [DatePicker](ts-basic-components-datepicker.md) - [Divider](ts-basic-components-divider.md) - - [Formcomponent](ts-basic-components-formcomponent.md) + - [FormComponent](ts-basic-components-formcomponent.md) - [Gauge](ts-basic-components-gauge.md) - [Image](ts-basic-components-image.md) - [ImageAnimator](ts-basic-components-imageanimator.md) + - [ImageSpan](ts-basic-components-imagespan.md) - [LoadingProgress](ts-basic-components-loadingprogress.md) - [Marquee](ts-basic-components-marquee.md) - [Menu](ts-basic-components-menu.md) @@ -140,8 +145,8 @@ - [Shape](ts-drawing-components-shape.md) - Canvas Components - [Canvas](ts-components-canvas-canvas.md) - - [CanvasRenderingContext2D](ts-canvasrenderingcontext2d.md) - [CanvasGradient](ts-components-canvas-canvasgradient.md) + - [CanvasRenderingContext2D](ts-canvasrenderingcontext2d.md) - [ImageBitmap](ts-components-canvas-imagebitmap.md) - [ImageData](ts-components-canvas-imagedata.md) - [OffscreenCanvasRenderingContext2D](ts-offscreencanvasrenderingcontext2d.md) @@ -164,6 +169,7 @@ - [Time Picker Dialog Box](ts-methods-timepicker-dialog.md) - [Text Picker Dialog Box](ts-methods-textpicker-dialog.md) - [Menu](ts-methods-menu.md) +- [Custom Component Lifecycle](ts-custom-component-lifecycle.md) - [State Management with Application-level Variables](ts-state-management.md) - [Pixel Units](ts-pixel-units.md) - [Enums](ts-appendix-enums.md) diff --git a/en/application-dev/reference/arkui-ts/figures/LoadingProgress.gif b/en/application-dev/reference/arkui-ts/figures/LoadingProgress.gif index 90d9c7bba27ef616fb6bfdea407358df25ac6f91..60d551dd3f1de3a5443bc594c5080b5692704fd0 100644 Binary files a/en/application-dev/reference/arkui-ts/figures/LoadingProgress.gif and b/en/application-dev/reference/arkui-ts/figures/LoadingProgress.gif differ diff --git a/en/application-dev/reference/arkui-ts/figures/colorFilter.gif b/en/application-dev/reference/arkui-ts/figures/colorFilter.gif new file mode 100644 index 0000000000000000000000000000000000000000..e326b328a292ca96b3c2b687128d51cce1106d27 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/colorFilter.gif differ diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md b/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md index 12e26b39a1c19111f5e6feaa868d16a18d7b11ac..7ddaa3e007c8403fbd7e3e8f0df85af0ed2bc8a2 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md @@ -1,6 +1,6 @@ # Blank -The **\** component is able to automatically fill the empty spaces in the container along the main axis. It is valid only when the parent container is **\** or **\**. +The **\** component is able to automatically fill the empty spaces in the container along the main axis. It works only when the parent component is **\**, **\**, or **\**. > **NOTE** > @@ -30,7 +30,7 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | Name| Type| Description| | -------- | -------- | -------- | -| color | [ResourceColor](ts-types.md#resourcecolor) | Color to fill the empty spaces.
Default value: **Color.Transparent**
Since API version 9, this API is supported in ArkTS widgets. | +| color | [ResourceColor](ts-types.md#resourcecolor) | Color to fill the empty spaces.
Default value: **Color.Transparent**
Since API version 9, this API is supported in ArkTS widgets.| ## Events @@ -50,7 +50,7 @@ struct BlankExample { Row() { Text('Bluetooth').fontSize(18) Blank() - Toggle({ type: ToggleType.Switch }) + Toggle({ type: ToggleType.Switch }).margin({ top: 14, bottom: 14, left: 6, right: 6 }) }.width('100%').backgroundColor(0xFFFFFF).borderRadius(15).padding({ left: 12 }) }.backgroundColor(0xEFEFEF).padding(20) } @@ -80,16 +80,16 @@ struct BlankExample { Row() { Text('Bluetooth').fontSize(18) Blank().color(Color.Yellow) - Toggle({ type: ToggleType.Switch }) + Toggle({ type: ToggleType.Switch }).margin({ top: 14, bottom: 14, left: 6, right: 6 }) }.backgroundColor(0xFFFFFF).borderRadius(15).padding({ left: 12 }) Row() { Text('Bluetooth').fontSize(18) // Set the minimum width to 160. Blank('160').color(Color.Yellow) - Toggle({ type: ToggleType.Switch }) + Toggle({ type: ToggleType.Switch }).margin({ top: 14, bottom: 14, left: 6, right: 6 }) }.backgroundColor(0xFFFFFF).borderRadius(15).padding({ left: 12 }) - + }.backgroundColor(0xEFEFEF).padding(20).width('100%') } } diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-image.md b/en/application-dev/reference/arkui-ts/ts-basic-components-image.md index c14914b75ae50d9a2c78ee01514261e60aecfcef..ad23abd051a1cae666be7b4038e86fba30147fcc 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-image.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-image.md @@ -29,7 +29,7 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Type | Mandatory | Description | | ---- | ---------------------------------------- | ---- | ---------------------------------------- | -| src | [PixelMap](../apis/js-apis-image.md#pixelmap7) \|ResourceStr\| [DrawableDescriptor](../apis/js-apis-arkui-drawableDescriptor.md#drawabledescriptor) | Yes | Image source. Both local and online images are supported.
When using an image referenced using a relative path, for example, **Image("common/test.jpg")**, the **\** component cannot be called across bundles or modules. Therefore, you are advised to use **\$r** to reference image resources that need to be used globally.
- The following image formats are supported: PNG, JPG, BMP, SVG, GIF.
\- Base64 strings are supported. The value format is data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data], where [base64 data] is a Base64 string.
\- Strings with the **datashare://** path prefix are supported, which are used to access the image path provided by a Data ability.
\- Strings with the **file:///data/storage** prefix are supported, which are used to read image resources in the **files** folder in the installation directory of the application. Ensure that the application has the read permission to the files in the specified path.
\- [DrawableDescriptor](../apis/js-apis-arkui-drawableDescriptor.md#drawabledescriptor) objects are supported.
**NOTE**
- ArkTS widgets support GIF images, but the images are played only once when they are displayed.
- ArkTS widgets do not support the **http://**, **datashare://**, or **file://data/storage** path prefixes.
- ArkTS widgets do not support the [PixelMap](../apis/js-apis-image.md#pixelmap7) type.| +| src | [PixelMap](../apis/js-apis-image.md#pixelmap7) \| ResourceStr\| [DrawableDescriptor](../apis/js-apis-arkui-drawableDescriptor.md#drawabledescriptor) | Yes | Image source. Both local and online images are supported.
When using an image referenced using a relative path, for example, **Image("common/test.jpg")**, the **\** component cannot be called across bundles or modules. Therefore, you are advised to use **\$r** to reference image resources that need to be used globally.
- The following image formats are supported: PNG, JPG, BMP, SVG, GIF.
\- Base64 strings are supported. The value format is data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data], where [base64 data] is a Base64 string.
\- Strings with the **datashare://** prefix are supported, which are used to access the image path provided by a Data ability.
\- Strings with the **file:///data/storage** prefix are supported, which are used to read image resources in the **files** folder in the installation directory of the current application. Ensure that the application has the read permission to the files in the specified path.
\- [DrawableDescriptor](../apis/js-apis-arkui-drawableDescriptor.md#drawabledescriptor) objects are supported.
- For details, see [Displaying Images](../../ui/arkts-graphics-display.md).
**NOTE**
- ArkTS widgets support GIF animations, but the animations only play once on display.
- ArkTS widgets do not support the strings with the **http://**, **datashare://**, or **file:///data/storage** prefix.
- ArkTS widgets do not support the [PixelMap](../apis/js-apis-image.md#pixelmap7) type.| ## Attributes @@ -56,7 +56,7 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the > > To use shortcut keys to copy the image, the image must be in focus. To enable the image to gain focus, set both the **focusable** and **focusOnTouch** attributes to **true**. > -> For SVG images, only the following tags are included in the supported list: **svg**, **rect**, **circle**, **ellipse**, **path**, **line**, **polyline**, **polygon**, and **animate**. +> For SVG images, only the following tags are included in the supported list: **svg**, **rect**, **circle**, **ellipse**, **path**, **line**, **polyline**, and **polygon**. ### ImageInterpolation @@ -94,6 +94,8 @@ In addition to the [universal events](ts-universal-events-click.md), the followi Load and display different types of images and set the scale mode of the images. +The **overlay** attribute sets the mask text of an image. For details, see [Overlay](ts-universal-attributes-overlay.md). + ```ts @Entry @Component @@ -225,7 +227,7 @@ struct Index { ``` > **NOTE** -> +> > For details about the request mode, timeout, and additional request parameters for loading online images, see [request()](../../reference/apis/js-apis-http.md) in the HTTP module. ### Setting Attributes @@ -416,4 +418,86 @@ struct LoadImageExample { } } ``` - \ No newline at end of file + +### Applying a Filter to an Image + +```ts +// xxx.ets +@Entry +@Component +struct colorFilterExample { + @State colorFilterR: number = 0 + @State colorFilterG: number = 0 + @State colorFilterB: number = 0 + @State colorFilterA: number = 0 + + build() { + Row() { + Column() { + Image($r('app.media.sky')) + .width(200) + .height(200) + Image($r('app.media.sky')) + .width(200) + .height(200) + .colorFilter([ + this.colorFilterR, 0, this.colorFilterR, 0, 0, + 0, this.colorFilterG, this.colorFilterG, 0, 0, + this.colorFilterB, 0, this.colorFilterB, 0, 0, + 0, 0, this.colorFilterA, 0, 0 + ]) + + Row() { + Text('R') + Slider({ + min: 0, + max: 1, + step: 0.01 + }) + .onChange((valueR) => { + this.colorFilterR = valueR + }) + } + + Row() { + Text('G') + Slider({ + min: 0, + max: 1, + step: 0.01 + }) + .onChange((valueG) => { + this.colorFilterG = valueG + }) + } + + Row() { + Text('B') + Slider({ + min: 0, + max: 1, + step: 0.01 + }) + .onChange((valueB) => { + this.colorFilterB = valueB + }) + } + + Row() { + Text('A') + Slider({ + min: 0, + max: 1, + step: 0.01 + }) + .onChange((valueA) => { + this.colorFilterA = valueA + }) + } + }.width('90%').alignItems(HorizontalAlign.Center) + }.height('100%').width('100%').justifyContent(FlexAlign.Center) + } +} +``` + +![colorFilter](figures/colorFilter.gif) diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md b/en/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md index 90705e2c5a20844a2346e45dee5835c128054aec..bc6f5ef081cf9c51067f4e15c63cf2f12482ce6e 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md @@ -24,7 +24,7 @@ Since API version 9, this API is supported in ArkTS widgets. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| value | string | Yes| Content of the QR code. A maximum of 256 characters are supported. If the number of characters exceeds 256, the first 256 characters are used.| +| value | string | Yes| Content of the QR code. A maximum of 256 characters are supported. If the number of characters exceeds 256, the first 256 characters are used.
**NOTE**
The string cannot be **null**, **undefined**, or empty.| ## Attributes diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md b/en/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md index b0d69a921883805f7a4686af464214869ff46578..a625379fe64cf6189ae3c1202a69a8def52f822c 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md @@ -20,9 +20,9 @@ Creates a **\** through a window animation object. **Parameters** -| Name| Type| Mandatory| Default Value| Description| -| -------- | -------- | -------- | -------- | -------- | -| target | [WindowAnimationTarget](#windowanimationtarget) | Yes| - | Description of the animation window to control.| +| Name| Type| Mandatory | Description| +| -------- | -------- | --------------- | -------- | +| target | [WindowAnimationTarget](#windowanimationtarget) | Yes | Description of the animation window to control.| ## WindowAnimationTarget @@ -56,20 +56,120 @@ The [universal attributes](ts-universal-attributes-size.md) are supported. The [universal events](ts-universal-events-click.md) are supported. ## Example +The **\** component needs to receive the **WindowAnimationTarget** object passed from the **WindowAnimationController** object set through [windowAnimationManager](../apis/js-apis-windowAnimationManager.md). You can create a **RemoteWindowExample.ets** file and encapsulate the **RemoteWindowExample** component and the passed **WindowAnimationTarget** object. +The **\** component can be used only in the system application Launcher. Therefore, you can place the **RemoteWindowExample** component in the **build** function of the **EntryView.ets** page of Launcher, compile Launcher, and push the Launcher installation package to the device system. ```ts -// xxx.ets +// WindowAnimationControllerImpl.ets file +import windowAnimationManager from '@ohos.animation.windowAnimationManager'; + +export default class WindowAnimationControllerImpl implements windowAnimationManager.WindowAnimationController { + onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, + finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback): void + { + console.log(`remote window animaion onStartAppFromLauncher`); + finishedCallback.onAnimationFinish(); + } + + onStartAppFromRecent(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, + finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { + console.log(`remote window animaion onStartAppFromRecent`); + finishedCallback.onAnimationFinish(); + } + + onStartAppFromOther(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, + finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { + console.log(`remote window animaion onStartAppFromOther`); + finishedCallback.onAnimationFinish(); + } + + onAppTransition(fromWindowTarget: windowAnimationManager.WindowAnimationTarget, + toWindowTarget: windowAnimationManager.WindowAnimationTarget, + finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback): void{ + console.log(`remote window animaion onAppTransition`); + finishedCallback.onAnimationFinish(); + } + + onMinimizeWindow(minimizingWindowTarget: windowAnimationManager.WindowAnimationTarget, + finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { + console.log(`remote window animaion onMinimizeWindow`); + finishedCallback.onAnimationFinish(); + } + + onCloseWindow(closingWindowTarget: windowAnimationManager.WindowAnimationTarget, + finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { + console.log(`remote window animaion onCloseWindow`); + finishedCallback.onAnimationFinish(); + } + + onScreenUnlock(finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { + console.log(`remote window animaion onScreenUnlock`); + finishedCallback.onAnimationFinish(); + } + + onWindowAnimationTargetsUpdate(fullScreenWindowTarget: windowAnimationManager.WindowAnimationTarget, + floatingWindowTargets: Array): void { + console.log('onWindowAnimationTargetsUpdate, the fullScreenWindowTarget is: ' + fullScreenWindowTarget); + console.log('onWindowAnimationTargetsUpdate, the floatingWindowTargets are: ' + floatingWindowTargets); + } +} +``` + +```ts +// RemoteWindowExample.ets file +import windowAnimationManager from '@ohos.animation.windowAnimationManager'; +import WindowAnimationControllerImpl from '../animation/remoteanimation/WindowAnimationControllerImpl'; + @Entry @Component -struct RemoteWindowExample { - @State target: WindowAnimationTarget = undefined // Obtained through windowAnimationManager +export default struct RemoteWindowExample { + @State target: WindowAnimationTarget = undefined // Obtained through windowAnimationManager. + + aboutToAppear(): void { + let controller = new WindowAnimationControllerImpl(); + windowAnimationManager.setController(controller); + + controller.onStartAppFromLauncher = (startingWindowTarget, finishedCallback) => { + console.log(`RemoteWindowExample: remote window animaion onStartAppFromLauncher`); + this.target = startingWindowTarget; + finishedCallback.onAnimationFinish(); + } + + controller.onStartAppFromRecent = (startingWindowTarget, finishedCallback) => { + console.log(`RemoteWindowExample: remote window animaion onStartAppFromRecent`); + this.target = startingWindowTarget; + finishedCallback.onAnimationFinish(); + } + + controller.onStartAppFromOther = (startingWindowTarget, finishedCallback) => { + console.log(`RemoteWindowExample: remote window animaion onStartAppFromOther`); + this.target = startingWindowTarget; + finishedCallback.onAnimationFinish(); + } + + controller.onAppTransition = (fromWindowTarget, toWindowTarget, finishedCallback) => { + console.log(`RemoteWindowExample: remote window animaion onAppTransition`); + this.target = toWindowTarget; + finishedCallback.onAnimationFinish(); + } + + controller.onMinimizeWindow = (minimizingWindowTarget, finishedCallback) => { + console.log(`RemoteWindowExample: remote window animaion onMinimizeWindow`); + this.target = minimizingWindowTarget; + finishedCallback.onAnimationFinish(); + } + + controller.onCloseWindow = (closingWindowTarget, finishedCallback) => { + console.log(`RemoteWindowExample: remote window animaion onCloseWindow`); + this.target = closingWindowTarget; + finishedCallback.onAnimationFinish(); + } + } build() { Column() { RemoteWindow(this.target) - .translate({ x: 100, y: 200 }) - .scale({ x: 0.5, y: 0.5 }) - .opacity(0.8) + .scale({ x: 0.5, y: 0.5}) // Used for demonstration purposes only. .In general cases, scale({ x: 1, y: 1 }) is required. .position({ x: px2vp(this.target?.windowBounds.left), y: px2vp(this.target?.windowBounds.top) }) .width(px2vp(this.target?.windowBounds.width)) .height(px2vp(this.target?.windowBounds.height)) diff --git a/en/application-dev/reference/arkui-ts/ts-container-waterflow.md b/en/application-dev/reference/arkui-ts/ts-container-waterflow.md index 39c86b3cee5726a774379f039c0a450518dcbe02..44d2eeda5df735e9f81dbb9713b899cbd66037be 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-waterflow.md +++ b/en/application-dev/reference/arkui-ts/ts-container-waterflow.md @@ -260,9 +260,11 @@ struct WaterflowDemo { Text("N" + item).fontSize(12).height('16') Image('res/waterFlowTest(' + item % 5 + ').jpg') .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) } } - .width(this.itemWidthArray[item]) + .width('100%') .height(this.itemHeightArray[item]) .backgroundColor(this.colors[item % 5]) }, item => item) diff --git a/en/application-dev/reference/arkui-ts/ts-types.md b/en/application-dev/reference/arkui-ts/ts-types.md index 7638ad39fbdd96608cd042a60d6ffad5372716f0..4e1fc19f2d00bd889a0f7e787b7fcf9dc37addac 100644 --- a/en/application-dev/reference/arkui-ts/ts-types.md +++ b/en/application-dev/reference/arkui-ts/ts-types.md @@ -1,5 +1,9 @@ # Types +>**NOTE** +> +>The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + ## Resource The **Resource** type is used to reference resources for setting component attributes. @@ -10,7 +14,7 @@ You can use `$r` or `$rawfile` to create a **Resource** object, but its attribut **belonging**: group to which the resource belongs, which can be **'sys'** or **'app'**. - **type**: resource type, which can be **'color'**, **'float'**, **'string'**, or **'media'**. + **type**: resource type, which can be '**boolean'**, **'color'**, **'float'**, **'intarray'**, **'integer'**, **'pattern'**, '**plural'**, **'strarray'**, **'string'**, or **'media'**. **name**: resource name, which is determined during resource definition. @@ -18,57 +22,55 @@ You can use `$r` or `$rawfile` to create a **Resource** object, but its attribut **filename**: name of the file in the **resources/rawfile** directory of the project. - > **NOTE** - > - > When referencing resources of the **Resource** type, make sure the data type is the same as that of the attribute method. For example, if an attribute method supports the **string | Resource** types, the data type of the **Resource** type must be string. + **NOTE**
When referencing resources of the **Resource** type, make sure the data type is the same as that of the attribute method. For example, if an attribute method supports the **string | Resource** types, the data type of the **Resource** type must be string. ## Length The **Length** type is used to represent a size unit. -| Type | Description | -| -------- | -------------------------------------- | -| string | String type. Specify the length unit explicitly, for example, **'10px'**, or provide the length in percentage, for example, **'100%'**.| -| number | Number type. The default unit is vp. | -| [Resource](#resource) | Size referenced from system or application resources. | +| Type | Description | +| --------------------- | -------------------------------------- | +| string | String type. Specify the length unit explicitly, for example, **'10px'**, or provide the length in percentage, for example, **'100%'**.| +| number | Number type. The default unit is vp. | +| [Resource](#resource) | Size referenced from system or application resources. | ## ResourceStr The **ResourceStr** type is used to represent the types that can be used by input parameters of the string type. -| Type | Description | -| -------- | ---------------------------- | -| string | String type. | +| Type | Description | +| --------------------- | ------------------------- | +| string | String type. | | [Resource](#resource) | String referenced from system or application resources.| ## Padding The **Padding** type is used to describe the paddings in different directions of a component. -| Name | Type | Mandatory | Description | -| ------ | ------ | ---- | --------------- | -| top | [Length](#length) | No | Height of the padding on the top of the component. | -| right | [Length](#length) | No | Width of the padding on the right of the component.| -| bottom | [Length](#length) | No | Height of the padding at the bottom of the component. | -| left | [Length](#length) | No | Width of the padding on the left of the component.| +| Name | Type | Mandatory | Description | +| ------ | ----------------- | ---- | -------------------- | +| top | [Length](#length) | No | Height of the padding on the top of the component. | +| right | [Length](#length) | No | Width of the padding on the right of the component.| +| bottom | [Length](#length) | No | Height of the padding at the bottom of the component. | +| left | [Length](#length) | No | Width of the padding on the left of the component.| ## Margin The **Margin** type is used to describe the margins in different directions of a component. -| Name | Type | Mandatory | Description | -| ------ | ------ | ---- | --------------- | -| top | [Length](#length) | No | Height of the margin above the component. | -| right | [Length](#length) | No | Width of the margin on the right of the component.| -| bottom | [Length](#length) | No | Height of the margin below the component. | -| left | [Length](#length) | No | Width of the margin on the left of the component.| +| Name | Type | Mandatory | Description | +| ------ | ----------------- | ---- | -------------------- | +| top | [Length](#length) | No | Height of the margin above the component. | +| right | [Length](#length) | No | Width of the margin on the right of the component.| +| bottom | [Length](#length) | No | Height of the margin below the component. | +| left | [Length](#length) | No | Width of the margin on the left of the component.| ## EdgeWidths9+ The **EdgeWidths** type is used to describe the edge widths in different directions of a component. -| Name | Type | Mandatory | Description | -| ------ | ------ | ---- | -------- | +| Name | Type | Mandatory | Description | +| ------ | ----------------- | ---- | -------- | | top | [Length](#length) | No | Width of the top edge of the component.| | right | [Length](#length) | No | Width of the right edge of the component.| | bottom | [Length](#length) | No | Width of the bottom edge of the component.| @@ -78,8 +80,8 @@ The **EdgeWidths** type is used to describe the edge widths in different directi The **BorderRadiuses** type is used to describe the radius of the rounded corners of a component. -| Name | Type | Mandatory | Description | -| ----------- | ------ | ---- | ---------- | +| Name | Type | Mandatory | Description | +| ----------- | ----------------- | ---- | ---------- | | topLeft | [Length](#length) | No | Radius of the top left rounded corner of the component.| | topRight | [Length](#length) | No | Radius of the top right rounded corner of the component.| | bottomLeft | [Length](#length) | No | Radius of the bottom left rounded corner of the component.| @@ -89,8 +91,8 @@ The **BorderRadiuses** type is used to describe the radius of the rounded corner The **EdgeColors** type is used to describe the edge colors of a component. -| Name | Type | Mandatory | Description | -| ------ | ------------- | ---- | -------- | +| Name | Type | Mandatory | Description | +| ------ | ------------------------------- | ---- | -------- | | top | [ResourceColor](#resourcecolor) | No | Color of the top edge of the component.| | right | [ResourceColor](#resourcecolor) | No | Color of the right edge of the component.| | bottom | [ResourceColor](#resourcecolor) | No | Color of the bottom edge of the component.| @@ -100,8 +102,8 @@ The **EdgeColors** type is used to describe the edge colors of a component. The **EdgeStyles** type is used to describe the edge styles of a component. -| Name | Type | Mandatory | Description | -| ------ | ----------- | ---- | -------- | +| Name | Type | Mandatory | Description | +| ------ | ---------------------------------------- | ---- | -------- | | top | [BorderStyle](ts-appendix-enums.md#borderstyle) | No | Style of the top edge of the component.| | right | [BorderStyle](ts-appendix-enums.md#borderstyle) | No | Style of the right edge of the component.| | bottom | [BorderStyle](ts-appendix-enums.md#borderstyle) | No | Style of the bottom edge of the component.| @@ -112,8 +114,8 @@ The **EdgeStyles** type is used to describe the edge styles of a component. The **Offset** type is used to describe the offset coordinates of a component in the layout. -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | -------- | +| Name | Type | Mandatory | Description | +| ---- | ----------------- | ---- | -------- | | dx | [Length](#length) | Yes | X coordinate of the offset.| | dy | [Length](#length) | Yes | Y coordinate of the offset.| @@ -121,27 +123,27 @@ The **Offset** type is used to describe the offset coordinates of a component in The **ResourceColor** type is used to describe the color types of resources. -| Type | Description | -| ---------------------------------------- | ------------------------------------------------- | -| [Color](ts-appendix-enums.md#color) | Color enums. | -| number | Color in hexadecimal notation. RGB is supported. Example: **0xffffff** | -| string | Color in RGB or ARGB notation. Example: **'#ffffff', '#ff000000', 'rgb(255, 100, 255)', 'rgba(255, 100, 255, 0.5)'** | -| [Resource](#resource) | Color referenced from system or application resources.| +| Type | Description | +| ----------------------------------- | ---------------------------------------- | +| [Color](ts-appendix-enums.md#color) | Color enums. | +| number | Color in hexadecimal notation. RGB is supported. Example: **0xffffff** | +| string | Color in RGB or ARGB notation. Example: **'#ffffff', '#ff000000', 'rgb(255, 100, 255)', 'rgba(255, 100, 255, 0.5)'**| +| [Resource](#resource) | Color referenced from system or application resources. | ## ColoringStrategy The **ColoringStrategy** type is used to describe the foreground colors. -| Name | Description | -| --------- | ------- | -| INVERT | Inverse of the component background color.| +| Name | Description | +| ------ | --------------- | +| INVERT | Inverse of the component background color.| ## LengthConstrain The **LengthConstrain** type is used to describe the maximum and minimum lengths of a component. -| Name | Type | Mandatory | Description | -| --------- | ------ | ---- | ------- | +| Name | Type | Mandatory | Description | +| --------- | ----------------- | ---- | ------- | | minLength | [Length](#length) | Yes | Minimum length of the component.| | maxLength | [Length](#length) | Yes | Maximum length of the component.| @@ -150,12 +152,12 @@ The **LengthConstrain** type is used to describe the maximum and minimum lengths The **Font** type is used to set the text style. -| Name | Type | Mandatory| Description | -| ------ | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| size | [Length](#length) | No | Font size. If the value is of the number type, the unit fp is used. The value cannot be a percentage.| -| weight | [FontWeight](ts-appendix-enums.md#fontweight) \| number \| string | No | Font weight. For the number type, the value ranges from 100 to 900, at an interval of 100. The default value is **400**. A larger value indicates a larger font weight.| -| family | string \| [Resource](#resource) | No | Font family of the text. Use commas (,) to separate multiple fonts. The priority of the fonts is the sequence in which they are placed. An example value is **'Arial, sans-serif'**. Currently, only the **'sans-serif'** font is supported.| -| style | [FontStyle](ts-appendix-enums.md#fontstyle) | No | Font style. | +| Name | Type | Mandatory | Description | +| ------ | ---------------------------------------- | ---- | ---------------------------------------- | +| size | [Length](#length) | No | Font size. If the value is of the number type, the unit fp is used. The value cannot be a percentage.| +| weight | [FontWeight](ts-appendix-enums.md#fontweight) \| number \| string | No | Font weight. For the number type, the value ranges from 100 to 900, at an interval of 100. The default value is **400**. A larger value indicates a larger font weight.| +| family | string \| [Resource](#resource) | No | Font family of the text. Use commas (,) to separate multiple fonts. The priority of the fonts is the sequence in which they are placed. An example value is **'Arial, sans-serif'**. Currently, only the **'sans-serif'** font is supported.| +| style | [FontStyle](ts-appendix-enums.md#fontstyle) | No | Font style. | ## Area8+ @@ -172,8 +174,8 @@ The **Area** type is used to describe the area information of a component. The **Position** type is used to represent coordinates of a point. -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | --------------------------- | +| Name | Type | Mandatory | Description | +| ---- | ----------------- | ---- | --------------------------- | | x | [Length](#length) | No | X coordinate. The value is of the number type in vp when used as the return value.| | y | [Length](#length) | No | Y coordinate. The value is of the number type in vp when used as the return value.| @@ -181,8 +183,8 @@ The **Position** type is used to represent coordinates of a point. The **ConstraintSizeOptions** type is used to set the size constraints of a component during component layout. -| Name | Type | Mandatory | Description | -| --------- | ------ | ---- | ------- | +| Name | Type | Mandatory | Description | +| --------- | ----------------- | ---- | ------- | | minWidth | [Length](#length) | No | Minimum width of the component.| | maxWidth | [Length](#length) | No | Maximum width of the component.| | minHeight | [Length](#length) | No | Minimum height of the component.| @@ -192,8 +194,8 @@ The **ConstraintSizeOptions** type is used to set the size constraints of a comp The **SizeOptions** type is used to set the width and height. -| Name | Type | Mandatory | Description | -| ------ | ------ | ---- | ----- | +| Name | Type | Mandatory | Description | +| ------ | ----------------- | ---- | ----- | | width | [Length](#length) | No | Width of the component.| | height | [Length](#length) | No | Height of the component.| @@ -204,9 +206,9 @@ The **BorderOptions** type is used to provide border information. | Name | Type | Mandatory | Description | | ------ | ---------------------------------------- | ---- | ------- | -| width | [Length](#length) \| [EdgeWidths](#edgewidths9)9+ | No | Border width. | +| width | [Length](#length) \| [EdgeWidths](#edgewidths9)9+ | No | Border width. | | color | [ResourceColor](#resourcecolor) \| [EdgeColors](#edgecolors9)9+ | No | Border color. | -| radius | [Length](#length) \| [BorderRadiuses](#borderradiuses9)9+ | No | Radius of the rounded corner border.| +| radius | [Length](#length) \| [BorderRadiuses](#borderradiuses9)9+ | No | Radius of the rounded corner border.| | style | [BorderStyle](ts-appendix-enums.md#borderstyle) \| EdgeStyles9+ | No | Border style. | ## ColorFilter9+ @@ -230,9 +232,19 @@ The **CustomBuilder** type is used to define custom UI descriptions in component Describes the pixel stretch effect options. -| Name | Type | Mandatory | Description | -| ----------- | ------ | ---- | ---------- | -| left | [Length](#length) | No | Length by which a pixel is stretched towards the left edge of the image.| -| right | [Length](#length) | No | Length by which a pixel is stretched towards the right edge of the image.| -| top | [Length](#length) | No | Length by which a pixel is stretched towards the top edge of the image.| +| Name | Type | Mandatory | Description | +| ------ | ----------------- | ---- | -------------- | +| left | [Length](#length) | No | Length by which a pixel is stretched towards the left edge of the image. | +| right | [Length](#length) | No | Length by which a pixel is stretched towards the right edge of the image.| +| top | [Length](#length) | No | Length by which a pixel is stretched towards the top edge of the image.| | bottom | [Length](#length) | No | Length by which a pixel is stretched towards the bottom edge of the image.| + +## ModalTransition10+ + +The **ModalTransition** type is used to set the transition type for a full-screen modal. + +| Name | Description | +| ------- | ------------ | +| None | No transition animation for the full-screen modal. | +| Default | Slide-up and slide-down animation for the full-screen modal. | +| Alpha | Opacity animation for the full-screen modal.| diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md index 875a75dd8059e56227fd9559368a073487c74c47..87fd75b9dfa56bf3ad799ce9d491f278b505623a 100644 --- a/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md +++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md @@ -10,17 +10,25 @@ The size attributes set the width, height, and margin of a component. ## Attributes -| Name | Type | Description | -| -------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| width | [Length](ts-types.md#length) | Width of the component. By default, the width required to fully hold the component content is used. If the width of the component is greater than that of the parent container, the range of the parent container is drawn.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| -| height | [Length](ts-types.md#length) | Height of the component. By default, the height required to fully hold the component content is used. If the height of the component is greater than that of the parent container, the range of the parent container is drawn.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| +| Name | Type | Description | +| -------------- | ---------------------------------------- | ---------------------------------------- | +| width | [Length](ts-types.md#length) | Width of the component. By default, the width required to fully hold the component content is used. If the width of the component is greater than that of the parent container, the range of the parent container is drawn.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| +| height | [Length](ts-types.md#length) | Height of the component. By default, the height required to fully hold the component content is used. If the height of the component is greater than that of the parent container, the range of the parent container is drawn.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| | size | {
width?: [Length](ts-types.md#length),
height?: [Length](ts-types.md#length)
} | Size of the component.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| | padding | [Padding](ts-types.md#padding) \| [Length](ts-types.md#length) | Padding of the component.
When the parameter is of the **Length** type, the four paddings take effect.
Default value: **0**
When **padding** is set to a percentage, the width of the parent container is used as the basic value.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| | margin | [Margin](ts-types.md#margin) \| [Length](ts-types.md#length) | Margin of the component.
When the parameter is of the **Length** type, the four margins take effect.
Default value: **0**
When **margin** is set to a percentage, the width of the parent container is used as the basic value.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| -| constraintSize | {
minWidth?: [Length](ts-types.md#length),
maxWidth?: [Length](ts-types.md#length),
minHeight?: [Length](ts-types.md#length),
maxHeight?: [Length](ts-types.md#length)
} | Constraint size of the component, which is used to limit the size range during component layout. **constraintSize** takes precedence over **width** and **height**. If the value of **minWidth** is greater than that of **maxWidth**, only the value of **minWidth** takes effect. The same rule applies to **minHeight** and **maxHeight**.
Default value:
{
minWidth: 0,
maxWidth: Infinity,
minHeight: 0,
maxHeight: Infinity
}
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| -| layoutWeight | number \| string | Weight of the component during layout. When the container size is determined, the container space is allocated along the main axis among the component and sibling components based on the layout weight, and the component size setting is ignored.
Default value: **0**
Since API version 9, this API is supported in ArkTS widgets.
**NOTE**
This attribute is valid only for the **\**, **\**, and **\** layouts.
The value can be a number greater than or equal to 0 or a string that can be converted to a number.| +| constraintSize | {
minWidth?: [Length](ts-types.md#length),
maxWidth?: [Length](ts-types.md#length),
minHeight?: [Length](ts-types.md#length),
maxHeight?: [Length](ts-types.md#length)
} | Constraint size of the component, which is used to limit the size range during component layout. **constraintSize** takes precedence over **width** and **height**. Learn [how the value of this attribute affects the width and height](#impact-of-constraintsize-on-widthheight).
Default value:
{
minWidth: 0,
maxWidth: Infinity,
minHeight: 0,
maxHeight: Infinity
}
Since API version 9, this API is supported in ArkTS widgets.
Since API version 10, this API supports the calc calculation feature.| +## Impact of constraintSize on width/height +| Size Arrangement | Result | +| ---------------------------------------- | ------------------ | +| minWidth/minHeight < width/height< maxWidth/maxHeight | width/height | +| minWidth/minHeight < maxWidth/maxHeight < width/height | maxWidth/maxHeight | +| maxWidth/maxHeight < minWidth/minHeight < width/height | minWidth/minHeight | +| maxWidth/maxHeight < width/height< minWidth/minHeight | minWidth/minHeight | +| width/height < maxWidth/maxHeight < minWidth/minHeight | minWidth/minHeight | +| width/height < minWidth/minHeight < maxWidth/maxHeight | minWidth/minHeight | ## Example ```ts diff --git a/en/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md b/en/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md index 3bdc9a96c4a4960cba8418ab6a6d02f693f29bb3..891a32648e566f5c2bb4de1aa0ea231ab86d6c18 100644 --- a/en/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md +++ b/en/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md @@ -6,15 +6,23 @@ A drag event is triggered when a component is dragged. > > The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. +## Attributes + +In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported. +| Name| Type| Description| +| -------- | -------- | -------- | +| allowDrop10+ | Array\ | Type of data that can be dropped to the component.
Default value: empty
| +| draggable10+ | boolean | Whether the widget is draggable.
Default value: **false**
| ## Events | Name | Bubbling Supported| Description | | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | -| onDragStart(event: (event?: [DragEvent](#dragevent), extraParams?: string) => [CustomBuilder](ts-types.md#custombuilder8) \| [DragItemInfo](#dragiteminfo)) | No | Triggered when the component bound to the event is dragged for the first time.
- **event**: information about the drag event, including the coordinates of the item that is being dragged.
- **extraParams**: additional information about the drag event. For details, see **[extraParams](#extraparams)**.
Return value: object being dragged, which is used for prompts displayed when the object is dragged.
A drag event can be triggered by a 500 ms long press. If the duration of a long-press gesture is set to less than or equal to 500 ms, the callback for the long-press gesture takes precedence. Otherwise, the callback for the drag event takes precedence.| +| onDragStart(event: (event?: [DragEvent](#dragevent), extraParams?: string) => [CustomBuilder](ts-types.md#custombuilder8) \| [DragItemInfo](#dragiteminfo)) | No | Triggered when the component bound to the event is dragged for the first time.
- **event**: information about the drag event, including the coordinates of the item that is being dragged.
- **extraParams**: additional information about the drag event. For details, see **[extraParams](#extraparams)**.
Return value: object being dragged, which is used for prompts displayed when the object is dragged.
A drag event can be triggered by a 500 ms long press. If the duration of a long press gesture is set to less than or equal to 500 ms, the callback for the long press gesture takes precedence. Otherwise, the callback for the drag event takes precedence.| | onDragEnter(event: (event?: [DragEvent](#dragevent), extraParams?: string) => void) | No | Triggered when the dragged item enters a valid drop target.
- **event**: information about the drag event, including the coordinates of the item that is being dragged.
- **extraParams**: additional information about the drag event. For details, see **[extraParams](#extraparams)**.
This event is valid only when a listener for the **onDrop** event is enabled.| | onDragMove(event: (event?: [DragEvent](#dragevent), extraParams?: string) => void) | No | Triggered when the dragged item moves in a valid drop target.
- **event**: information about the drag event, including the coordinates of the item that is being dragged.
- **extraParams**: additional information about the drag event. For details, see **[extraParams](#extraparams)**.
This event is valid only when a listener for the **onDrop** event is enabled.| | onDragLeave(event: (event?: [DragEvent](#dragevent), extraParams?: string) => void) | No | Triggered when the dragged item leaves a valid drop target.
- **event**: information about the drag event, including the coordinates of the item that is being dragged.
- **extraParams**: additional information about the drag event. For details, see **[extraParams](#extraparams)**.
This event is valid only when a listener for the **onDrop** event is enabled.| | onDrop(event: (event?: [DragEvent](#dragevent), extraParams?: string) => void) | No | Triggered when the dragged item is dropped on a valid drop target.
- **event**: information about the drag event, including the coordinates of the item that is being dragged.
- **extraParams**: additional information about the drag event. For details, see **[extraParams](#extraparams)**.| +| onDragEnd(event: (event?: [DragEvent](#dragevent), extraParams?: string) => void)10+ | No | Triggered when the dragging of the component bound to the event ends.
- **event**: information about the drag event, including the coordinates of the item that is being dragged.
- **extraParams**: additional information about the drag event. For details, see **[extraParams](#extraparams)**.| ## DragItemInfo @@ -42,6 +50,31 @@ A drag event is triggered when a component is dragged. | ------ | ------ | ---------------- | | getX() | number | X-coordinate of the drag position relative to the upper left corner of the screen, in vp.| | getY() | number | Y-coordinate of the drag position relative to the upper left corner of the screen, in vp.| +| useCustomDropAnimation10+ | boolean | Whether to use the default drop animation when the dragging ends.| +| dragBehavior10+ | [DragBehavior](#dragbehavior10) | Component tree behavior corresponding to the drga event.| +| setData(unifiedData: UnifiedData)10+ | void | Sets drag-related data in the drag event.| +| getData()10+ | UnifiedData | Obtains drag-related data from the drag event.| +| getSummary()10+ | Summary | Obtains the summary of drag-related data from the drag event.| +| setResult(dragRect: [DragRet](#dragret10))10+| void | Sets the drag and drop result in the drag event.| +| getResult()10+ | [DragRet](#dragret10)| Obtains the drag and drop result from the drag event.| +| getPrviewRect()10+ | [Rectangle](ts-universal-attributes-touch-target.md#rectangle) | Obtains the rectangle where the preview image is located.| + +## DragBehavior10+ + +| Name| Description| +| ------ | ------ | +| COPY | In the component tree, copy the component that initiates the dragging and copy the copy result to the position where the dragging ends.| +| MOVE | In the component tree, cut the component that initiates the dragging and move it to the position where the dragging ends.| + +## DragRet10+ + +| Name| Description| +| ----- | ----------------- | +| DRAG_SUCCESS | The drag and drop operation succeeded.| +| DRAG_FAILED | The drag and drop operation failed.| +| DRAG_CANCELED | The drag and drop operation was canceled.| +| DROP_ENABLED | The component allows for a drop operation.| +| DROP_DISABLED | The component does not allow for a drop operation.| ## Example diff --git a/en/application-dev/reference/errorcodes/errorcode-data-rdb.md b/en/application-dev/reference/errorcodes/errorcode-data-rdb.md index d0e4a40e4ce19f10f5470b6a4b83caaa72707611..823fb7b65b6cc277f64ba7b43b7314baa25d5971 100644 --- a/en/application-dev/reference/errorcodes/errorcode-data-rdb.md +++ b/en/application-dev/reference/errorcodes/errorcode-data-rdb.md @@ -4,11 +4,29 @@ > > This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md). +## 14800000 Internal Error + +**Error Message** + +Inner error. + +**Description** + +An error occurs at the underlying database. + +**Possible Causes** + +Invalid SQL statement is passed in. + +**Solution** + +Determine the cause of the error based on the log information. + ## 14800010 Invalid RDB Name **Error Message** -Invalid database name. +Failed to open or delete database by invalid database path. **Description** @@ -16,17 +34,17 @@ The RDB store name is invalid. **Possible Causes** -The RDB store name is empty or exceeds 1024 bytes. +The RDB store path is invalid. **Solution** -Check that the RDB store name is not empty and does not exceed 1024 bytes. +Check the RDB store path. ## 14800011 Database File Corrupted **Error Message** -Database corrupted. +Failed to open database by database corrupted. **Description** diff --git a/en/application-dev/reference/errorcodes/errorcode-datashare.md b/en/application-dev/reference/errorcodes/errorcode-datashare.md index d97e4218f2132e0e9fc211450df1e7faebff0fef..566ff62cb6d3d07038e930a472e19ffea8b2b3ef 100644 --- a/en/application-dev/reference/errorcodes/errorcode-datashare.md +++ b/en/application-dev/reference/errorcodes/errorcode-datashare.md @@ -8,7 +8,7 @@ **Error Message** -The dataShareHelper is not initialized successfully. +The DataShareHelper is not initialized successfully. **Description** @@ -23,3 +23,40 @@ The **DataShareHelper** class fails to be created. 1. Obtain the correct URI. 2. Check that the context of the stage model is used. + +## 15700011 Failed to Add or Delete a Template + +**Error Message** + +The uri is not exist. + +**Description** + +This error code is returned when a template fails to be added or deleted. + +**Possible Causes** + +1. The input parameter **uri** of **addTemplate()** is incorrect. +2. The input parameter **uri** of **delTemplate()** is incorrect. + +**Solution** + +Obtain the correct URI. + +## 15700012 Data Area Not Exist + +**Error Message** + +The data area is not exist. + +**Description** + +This error code is returned when a data update fails. + +**Possible Causes** + +The input parameter **bundleName** of **publish()** is incorrect. + +**Solution** + +Obtain the correct **bundleName** value from the DataShare server provider. diff --git a/en/application-dev/reference/errorcodes/errorcode-preferences.md b/en/application-dev/reference/errorcodes/errorcode-preferences.md index 67cd7ab9760d36627b0c29e0b4d3715bb3e9824a..d736c4fecfc1a2c6cc14f55c04dd927db761bde5 100644 --- a/en/application-dev/reference/errorcodes/errorcode-preferences.md +++ b/en/application-dev/reference/errorcodes/errorcode-preferences.md @@ -7,7 +7,7 @@ ## 15500010 Failed to Delete the User Preference Persistence File **Error Message** -Failed to delete preferences. +Failed to delete preferences file. **Description** diff --git a/en/application-dev/reference/errorcodes/errorcode-zlib.md b/en/application-dev/reference/errorcodes/errorcode-zlib.md index 0a5aa80a0fc249c9613412a5111e7ea7e266e4e7..a2197400315b4e60a905121f3a665d5ac127c7f3 100644 --- a/en/application-dev/reference/errorcodes/errorcode-zlib.md +++ b/en/application-dev/reference/errorcodes/errorcode-zlib.md @@ -42,3 +42,24 @@ This error code is reported when the destination file passed in the **compressFi 1. Check whether the destination file path is correct. If not, enter the correct sandbox path. 2. Check whether the destination folder exists. If not, create the folder. + +## 900003 Source File in Incorrect Format or Damaged + +**Error Message** + +The input source file is not ZIP format or damaged. + +**Description** + +This error code is reported when the format of the source file is incorrect or the source file is damaged when the **decompressFile** API is called. + + +**Possible Causes** + +1. When the **decompressFile** API is called, the format of the source file is incorrect. +2. When the **decompressFile** API is called, the source file is incomplete or damaged. + +**Solution** + +1. Check whether the source file format is ZIP. +2. Check whether the source file is complete. If the file is downloaded from the network, ensure that the file download is complete before calling the **decompressFile** API. diff --git a/en/application-dev/reference/js-service-widget-ui/Readme-EN.md b/en/application-dev/reference/js-service-widget-ui/Readme-EN.md index 58b90a13761930910434b5d4bc95252119a3fced..5721c8f7621c88c2daccc20710f7cb8333261f82 100644 --- a/en/application-dev/reference/js-service-widget-ui/Readme-EN.md +++ b/en/application-dev/reference/js-service-widget-ui/Readme-EN.md @@ -1,6 +1,6 @@ # JS Service Widget UI Components -- JS Service Widget UI Framework +- Framework Overview - [File Organization](js-service-widget-file.md) - Syntax - [HML](js-service-widget-syntax-hml.md) @@ -8,8 +8,7 @@ - [Multi-Language Capability](js-service-widget-multiple-languages.md) - [Version Compatibility Adaptation](js-service-widget-version-compatibility.md) - [Theme Configuration](js-service-widget-theme.md) -- Components - - Universal +- Universal Component Information - [Universal Attributes](js-service-widget-common-attributes.md) - [Universal Styles](js-service-widget-common-styles.md) - [Universal Events](js-service-widget-common-events.md) diff --git a/en/application-dev/reference/native-apis/_audio_decoder.md b/en/application-dev/reference/native-apis/_audio_decoder.md index 2e9139ac64dd9cdc27f2099b43be1d680551be0a..73487fa40d3fb0eb8490b71bda87d3dde1986497 100644 --- a/en/application-dev/reference/native-apis/_audio_decoder.md +++ b/en/application-dev/reference/native-apis/_audio_decoder.md @@ -3,42 +3,41 @@ ## Overview -Provides the functions for audio decoding. +Provides the functions for audio decoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder -**Since:** +**Since** 9 - ## Summary ### Files -| Name | Description | + | Name| Description| | -------- | -------- | -| [native_avcodec_audiodecoder.h](native__avcodec__audiodecoder_8h.md) | Declares the native APIs used for audio decoding.
File to Include: | +| [native_avcodec_audiodecoder.h](native__avcodec__audiodecoder_8h.md) | Declares the native APIs used for audio decoding.
File to include: | ### Functions -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_AudioDecoder_CreateByMime](#oh_audiodecoder_createbymime) (const char \*mime) | Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | -| [OH_AudioDecoder_CreateByName](#oh_audiodecoder_createbyname) (const char \*name) | Creates an audio decoder instance based on an audio decoder name. To use this API, you must know the exact name of the audio decoder. | -| [OH_AudioDecoder_Destroy](#oh_audiodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio decoder and destroys the audio decoder instance. | -| [OH_AudioDecoder_SetCallback](#oh_audiodecoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio decoder. This API must be called prior to **Prepare**. | -| [OH_AudioDecoder_Configure](#oh_audiodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the audio track that can be decoded. This API must be called prior to **Prepare**. | -| [OH_AudioDecoder_Prepare](#oh_audiodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio decoder. This API must be called after **Configure**. | -| [OH_AudioDecoder_Start](#oh_audiodecoder_start) (OH_AVCodec \*codec) | Starts an audio decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | -| [OH_AudioDecoder_Stop](#oh_audiodecoder_stop) (OH_AVCodec \*codec) | Stops an audio decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again. | -| [OH_AudioDecoder_Flush](#oh_audiodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | -| [OH_AudioDecoder_Reset](#oh_audiodecoder_reset) (OH_AVCodec \*codec) | Resets an audio decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again. | -| [OH_AudioDecoder_GetOutputDescription](#oh_audiodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of an audio decoder. The caller must manually release the **OH_AVFormat** instance in the return value. | -| [OH_AudioDecoder_SetParameter](#oh_audiodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure. | -| [OH_AudioDecoder_PushInputData](#oh_audiodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to an audio decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data to initialize the decoding process. | -| [OH_AudioDecoder_FreeOutputData](#oh_audiodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio decoder. | +| [OH_AudioDecoder_CreateByMime](#oh_audiodecoder_createbymime) (const char \*mime) | Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | +| [OH_AudioDecoder_CreateByName](#oh_audiodecoder_createbyname) (const char \*name) | Creates an audio decoder instance based on an audio decoder name. To use this API, you must know the exact name of the audio decoder. | +| [OH_AudioDecoder_Destroy](#oh_audiodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio decoder and destroys the audio decoder instance. | +| [OH_AudioDecoder_SetCallback](#oh_audiodecoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio decoder. This API must be called prior to **Prepare**. | +| [OH_AudioDecoder_Configure](#oh_audiodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the audio track that can be decoded. This API must be called prior to **Prepare**. | +| [OH_AudioDecoder_Prepare](#oh_audiodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio decoder. This API must be called after **Configure**. | +| [OH_AudioDecoder_Start](#oh_audiodecoder_start) (OH_AVCodec \*codec) | Starts an audio decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | +| [OH_AudioDecoder_Stop](#oh_audiodecoder_stop) (OH_AVCodec \*codec) | Stops an audio decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again. | +| [OH_AudioDecoder_Flush](#oh_audiodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | +| [OH_AudioDecoder_Reset](#oh_audiodecoder_reset) (OH_AVCodec \*codec) | Resets an audio decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again. | +| [OH_AudioDecoder_GetOutputDescription](#oh_audiodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of an audio decoder. The caller must manually release the **OH_AVFormat** instance in the return value. | +| [OH_AudioDecoder_SetParameter](#oh_audiodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure. | +| [OH_AudioDecoder_PushInputData](#oh_audiodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to an audio decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data to initialize the decoding process. | +| [OH_AudioDecoder_FreeOutputData](#oh_audiodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio decoder. | ## Function Description @@ -53,14 +52,14 @@ OH_AVErrCode OH_AudioDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format **Description**
Configures an audio decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the audio track that can be decoded. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the audio track to be decoded. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the audio track to be decoded. | **Returns** @@ -76,15 +75,15 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op OH_AVCodec* OH_AudioDecoder_CreateByMime (const char * mime) ``` **Description**
-Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. +Creates an audio decoder instance based on a MIME type. This API is recommended in most cases. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac). | +| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac).| **Returns** @@ -100,13 +99,13 @@ OH_AVCodec* OH_AudioDecoder_CreateByName (const char * name) **Description**
Creates an audio decoder instance based on an audio decoder name. To use this API, you must know the exact name of the audio decoder. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| name | Indicates the pointer to an audio decoder name. | +| name | Indicates the pointer to an audio decoder name. | **Returns** @@ -122,13 +121,13 @@ OH_AVErrCode OH_AudioDecoder_Destroy (OH_AVCodec * codec) **Description**
Clears the internal resources of an audio decoder and destroys the audio decoder instance. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -146,13 +145,13 @@ OH_AVErrCode OH_AudioDecoder_Flush (OH_AVCodec * codec) **Description**
Clears the input and output data in the internal buffer of an audio decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -170,14 +169,14 @@ OH_AVErrCode OH_AudioDecoder_FreeOutputData (OH_AVCodec * codec, uint32_t index **Description**
Frees an output buffer of an audio decoder. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an output buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an output buffer. | **Returns** @@ -195,13 +194,13 @@ OH_AVFormat* OH_AudioDecoder_GetOutputDescription (OH_AVCodec * codec) **Description**
Obtains the attributes of the output data of an audio decoder. The caller must manually release the **OH_AVFormat** instance in the return value. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -217,13 +216,13 @@ OH_AVErrCode OH_AudioDecoder_Prepare (OH_AVCodec * codec) **Description**
Prepares internal resources for an audio decoder. This API must be called after **Configure**. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -241,15 +240,15 @@ OH_AVErrCode OH_AudioDecoder_PushInputData (OH_AVCodec * codec, uint32_t index, **Description**
Pushes the input buffer filled with data to an audio decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data to initialize the decoding process. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an input buffer. | -| attr | Indicates the attributes of the data contained in the buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an input buffer. | +| attr | Indicates the attributes of the data contained in the buffer. | **Returns** @@ -267,13 +266,13 @@ OH_AVErrCode OH_AudioDecoder_Reset (OH_AVCodec * codec) **Description**
Resets an audio decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -291,15 +290,15 @@ OH_AVErrCode OH_AudioDecoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal **Description**
Sets an asynchronous callback so that your application can respond to events generated by an audio decoder. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). | -| userData | Indicates the pointer to user-specific data. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).| +| userData | Indicates the pointer to user-specific data. | **Returns** @@ -317,14 +316,14 @@ OH_AVErrCode OH_AudioDecoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for **Description**
Sets dynamic parameters for an audio decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to an **OH_AVFormat** instance. | **Returns** @@ -342,13 +341,13 @@ OH_AVErrCode OH_AudioDecoder_Start (OH_AVCodec * codec) **Description**
Starts an audio decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -366,13 +365,13 @@ OH_AVErrCode OH_AudioDecoder_Stop (OH_AVCodec * codec) **Description**
Stops an audio decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again. -\@syscap SystemCapability.Multimedia.Media.AudioDecoder +@syscap SystemCapability.Multimedia.Media.AudioDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** diff --git a/en/application-dev/reference/native-apis/_audio_encoder.md b/en/application-dev/reference/native-apis/_audio_encoder.md index 07a727f5b55f808004864c7212b6fd6768da30ea..cf621c755cd5b145b8661a5c78d3297142f883a0 100644 --- a/en/application-dev/reference/native-apis/_audio_encoder.md +++ b/en/application-dev/reference/native-apis/_audio_encoder.md @@ -3,42 +3,41 @@ ## Overview -Provides the functions for audio encoding. +Provides the functions for audio encoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder -**Since:** +**Since** 9 - ## Summary ### Files -| Name | Description | + | Name| Description| | -------- | -------- | -| [native_avcodec_audioencoder.h](native__avcodec__audioencoder_8h.md) | Declares the native APIs used for audio encoding.
File to Include: | +| [native_avcodec_audioencoder.h](native__avcodec__audioencoder_8h.md) | Declares the native APIs used for audio encoding.
File to include: | ### Functions -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_AudioEncoder_CreateByMime](#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | -| [OH_AudioEncoder_CreateByName](#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an audio encoder name. To use this API, you must know the exact name of the audio encoder. | -| [OH_AudioEncoder_Destroy](#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the audio encoder instance. | -| [OH_AudioEncoder_SetCallback](#oh_audioencoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. This API must be called prior to **Prepare**. | -| [OH_AudioEncoder_Configure](#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the attributes of the audio track that can be encoded. This API must be called prior to **Prepare**. | -| [OH_AudioEncoder_Prepare](#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This API must be called after **Configure**. | -| [OH_AudioEncoder_Start](#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | -| [OH_AudioEncoder_Stop](#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder. After the encoder is stopped, you can call **Start** to start it again. | -| [OH_AudioEncoder_Flush](#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | -| [OH_AudioEncoder_Reset](#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. | -| [OH_AudioEncoder_GetOutputDescription](#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of an audio encoder. The caller must manually release the **OH_AVFormat** instance in the return value. | -| [OH_AudioEncoder_SetParameter](#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. | -| [OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. | -| [OH_AudioEncoder_FreeOutputData](#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder. | +| [OH_AudioEncoder_CreateByMime](#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | +| [OH_AudioEncoder_CreateByName](#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an audio encoder name. To use this API, you must know the exact name of the audio encoder. | +| [OH_AudioEncoder_Destroy](#oh_audioencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of an audio encoder and destroys the audio encoder instance. | +| [OH_AudioEncoder_SetCallback](#oh_audioencoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. This API must be called prior to **Prepare**. | +| [OH_AudioEncoder_Configure](#oh_audioencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures an audio encoder. Typically, you need to configure the attributes of the audio track that can be encoded. This API must be called prior to **Prepare**. | +| [OH_AudioEncoder_Prepare](#oh_audioencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for an audio encoder. This API must be called after **Configure**. | +| [OH_AudioEncoder_Start](#oh_audioencoder_start) (OH_AVCodec \*codec) | Starts an audio encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | +| [OH_AudioEncoder_Stop](#oh_audioencoder_stop) (OH_AVCodec \*codec) | Stops an audio encoder. After the encoder is stopped, you can call **Start** to start it again. | +| [OH_AudioEncoder_Flush](#oh_audioencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of an audio encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | +| [OH_AudioEncoder_Reset](#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. | +| [OH_AudioEncoder_GetOutputDescription](#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of an audio encoder. The caller must manually release the **OH_AVFormat** instance in the return value. | +| [OH_AudioEncoder_SetParameter](#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. | +| [OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the encoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. | +| [OH_AudioEncoder_FreeOutputData](#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder. | ## Function Description @@ -53,14 +52,14 @@ OH_AVErrCode OH_AudioEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format **Description**
Configures an audio encoder. Typically, you need to configure the attributes of the audio track that can be encoded. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to an **OH_AVFormat** instance. | **Returns** @@ -76,15 +75,15 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op OH_AVCodec* OH_AudioEncoder_CreateByMime (const char * mime) ``` **Description**
-Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. +Creates an audio encoder instance based on a MIME type. This API is recommended in most cases. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac). | +| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac).| **Returns** @@ -100,13 +99,13 @@ OH_AVCodec* OH_AudioEncoder_CreateByName (const char * name) **Description**
Creates an audio encoder instance based on an audio encoder name. To use this API, you must know the exact name of the audio encoder. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| name | Indicates the pointer to an audio encoder name. | +| name | Indicates the pointer to an audio encoder name. | **Returns** @@ -122,13 +121,13 @@ OH_AVErrCode OH_AudioEncoder_Destroy (OH_AVCodec * codec) **Description**
Clears the internal resources of an audio encoder and destroys the audio encoder instance. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -146,13 +145,13 @@ OH_AVErrCode OH_AudioEncoder_Flush (OH_AVCodec * codec) **Description**
Clears the input and output data in the internal buffer of an audio encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -170,14 +169,14 @@ OH_AVErrCode OH_AudioEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index **Description**
Frees an output buffer of an audio encoder. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an output buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an output buffer. | **Returns** @@ -195,13 +194,13 @@ OH_AVFormat* OH_AudioEncoder_GetOutputDescription (OH_AVCodec * codec) **Description**
Obtains the attributes of the output data of an audio encoder. The caller must manually release the **OH_AVFormat** instance in the return value. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -217,13 +216,13 @@ OH_AVErrCode OH_AudioEncoder_Prepare (OH_AVCodec * codec) **Description**
Prepares internal resources for an audio encoder. This API must be called after **Configure**. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -239,17 +238,17 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op OH_AVErrCode OH_AudioEncoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr ) ``` **Description**
-Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. +Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the encoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an input buffer. | -| attr | Indicates the attributes of the data contained in the buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an input buffer. | +| attr | Indicates the attributes of the data contained in the buffer. | **Returns** @@ -267,13 +266,13 @@ OH_AVErrCode OH_AudioEncoder_Reset (OH_AVCodec * codec) **Description**
Resets an audio encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -291,15 +290,15 @@ OH_AVErrCode OH_AudioEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal **Description**
Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). | -| userData | Indicates the pointer to user-specific data. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).| +| userData | Indicates the pointer to user-specific data. | **Returns** @@ -317,14 +316,14 @@ OH_AVErrCode OH_AudioEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for **Description**
Sets dynamic parameters for an audio encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to an **OH_AVFormat** instance. | **Returns** @@ -342,13 +341,13 @@ OH_AVErrCode OH_AudioEncoder_Start (OH_AVCodec * codec) **Description**
Starts an audio encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -366,13 +365,13 @@ OH_AVErrCode OH_AudioEncoder_Stop (OH_AVCodec * codec) **Description**
Stops an audio encoder. After the encoder is stopped, you can call **Start** to start it again. -\@syscap SystemCapability.Multimedia.Media.AudioEncoder +@syscap SystemCapability.Multimedia.Media.AudioEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** diff --git a/en/application-dev/reference/native-apis/_codec_base.md b/en/application-dev/reference/native-apis/_codec_base.md index c908c604e4cb448ddf2bef4f071c5d588a0cbb89..a1f4f21a702369a61492f8e7a8e25b69f0718dec 100644 --- a/en/application-dev/reference/native-apis/_codec_base.md +++ b/en/application-dev/reference/native-apis/_codec_base.md @@ -3,86 +3,85 @@ ## Overview -Provides the common structs, character constants, and enums for running **OH_AVCodec** instances. +Provides the common structs, character constants, and enums for running **OH_AVCodec** instances. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase -**Since:** +**Since** 9 - ## Summary ### Files -| Name | Description | + | Name| Description| | -------- | -------- | -| [native_avcodec_base.h](native__avcodec__base_8h.md) | Declares the common structs, character constants, and enums for running **OH_AVCodec** instances.
File to Include: | +| [native_avcodec_base.h](native__avcodec__base_8h.md) | Declares the common structs, character constants, and enums for running OH_AVCodec instances.
File to include: | ### Structs -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) | Defines the buffer attributes of an **OH_AVCodec** instance. | -| [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) | Defines a collection of asynchronous callback functions for an **OH_AVCodec** instance. You must register this struct instance for an **OH_AVCodec** instance and process the information reported through these callbacks to ensure the normal running of the instance. | +| [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) | Defines the buffer attributes of an **OH_AVCodec** instance. | +| [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) | Defines a collection of asynchronous callback functions for an **OH_AVCodec** instance. You must register this struct instance for an **OH_AVCodec** instance and process the information reported through these callbacks to ensure the normal running of the instance. | ### Types -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) | Enumerates the buffer flags of an **OH_AVCodec** instance. | -| [OH_AVCodecBufferAttr](#oh_avcodecbufferattr) | Defines the buffer attributes of an **OH_AVCodec** instance. | -| [OH_AVCodecOnError](#oh_avcodeconerror)) (OH_AVCodec \*codec, int32_t errorCode, void \*userData) | Defines the function pointer that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance. | -| [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged)) (OH_AVCodec \*codec, OH_AVFormat \*format, void \*userData) | Defines the function pointer that is called to report the attributes of the new stream when the output stream changes. Note that the lifecycle of the pointer to the **OH_AVFormat** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called. | -| [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, void \*userData) | Defines the function pointer that is called, with a new buffer to fill in new input data, when new input data is required during the running of an **OH_AVCodec** instance. | -| [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) \*attr, void \*userData) | Defines the function pointer that is called, with a buffer containing new output data, when the new output data is generated during the running of an **OH_AVCodec** instance. Note that the lifecycle of the pointer to the **[OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md)** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called. | -| [OH_AVCodecAsyncCallback](#oh_avcodecasynccallback) | Defines a collection of asynchronous callback functions for an **OH_AVCodec** instance. You must register this struct instance for an **OH_AVCodec** instance and process the information reported through these callbacks to ensure the normal running of the instance. | -| [OH_MediaType](#oh_mediatype) | Enumerates the media types. | -| [OH_AVCProfile](#oh_avcprofile) | Enumerates the AVC profiles. | -| [OH_AACProfile](#oh_aacprofile) | Enumerates the AAC profiles. | +| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) | Enumerates the buffer flags of an **OH_AVCodec** instance. | +| [OH_AVCodecBufferAttr](#oh_avcodecbufferattr) | Defines the buffer attributes of an **OH_AVCodec** instance. | +| (\*[OH_AVCodecOnError](#oh_avcodeconerror)) (OH_AVCodec \*codec, int32_t errorCode, void \*userData) | Defines the function pointer that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance. | +| (\*[OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged)) (OH_AVCodec \*codec, OH_AVFormat \*format, void \*userData) | Defines the function pointer that is called to report the attributes of the new stream when the output stream changes. Note that the lifecycle of the pointer to the **OH_AVFormat** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called. | +| (\*[OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, void \*userData) | Defines the function pointer that is called, with a new buffer to fill in new input data, when new input data is required during the running of an **OH_AVCodec** instance. | +| (\*[OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata)) (OH_AVCodec \*codec, uint32_t index, OH_AVMemory \*data, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) \*attr, void \*userData) | Defines the function pointer that is called, with a buffer containing new output data, when the new output data is generated during the running of an **OH_AVCodec** instance. Note that the lifecycle of the pointer to the **OH_AVCodecBufferAttr** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called. | +| [OH_AVCodecAsyncCallback](#oh_avcodecasynccallback) | Defines a collection of asynchronous callback functions for an **OH_AVCodec** instance. You must register this struct instance for an **OH_AVCodec** instance and process the information reported through these callbacks to ensure the normal running of the instance. | +| [OH_MediaType](#oh_mediatype) | Enumerates the media types. | +| [OH_AVCProfile](#oh_avcprofile) | Enumerates the AVC profiles. | +| [OH_AACProfile](#oh_aacprofile) | Enumerates the AAC profiles. | ### Enums -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) {
**AVCODEC_BUFFER_FLAGS_NONE** = 0, AVCODEC_BUFFER_FLAGS_EOS = 1 << 0, AVCODEC_BUFFER_FLAGS_SYNC_FRAME = 1 << 1, AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME = 1 << 2,
AVCODEC_BUFFER_FLAGS_CODEC_DATA = 1 << 3
} | Enumerates the buffer flags of an **OH_AVCodec** instance. | -| [OH_MediaType](#oh_mediatype) { MEDIA_TYPE_AUD = 0, MEDIA_TYPE_VID = 1 } | Enumerates the media types. | -| [OH_AVCProfile](#oh_avcprofile) { **AVC_PROFILE_BASELINE** = 0, **AVC_PROFILE_HIGH** = 4, **AVC_PROFILE_MAIN** = 8 } | Enumerates the AVC profiles. | -| [OH_AACProfile](#oh_aacprofile) { **AAC_PROFILE_LC** = 0 } | Enumerates the AAC profiles. | +| [OH_AVCodecBufferFlags](#oh_avcodecbufferflags) {
**AVCODEC_BUFFER_FLAGS_NONE** = 0, **AVCODEC_BUFFER_FLAGS_EOS** = 1 << 0, **AVCODEC_BUFFER_FLAGS_SYNC_FRAME** = 1 << 1, **AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME** = 1 << 2, **AVCODEC_BUFFER_FLAGS_CODEC_DATA**= 1 << 3
} | Enumerates the buffer flags of an **OH_AVCodec** instance. | +| [OH_MediaType](#oh_mediatype) { **MEDIA_TYPE_AUD** = 0, **MEDIA_TYPE_VID** = 1 } | Enumerates the media types. | +| [OH_AVCProfile](#oh_avcprofile) { **AVC_PROFILE_BASELINE** = 0, **AVC_PROFILE_HIGH** = 4, **AVC_PROFILE_MAIN** = 8 } | Enumerates the Advanced Video Coding (AVC) profiles. | +| [OH_AACProfile](#oh_aacprofile) { **AAC_PROFILE_LC** = 0 } | Enumerates the Advanced Audio Coding (AAC) profiles. | ### Variables -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_AVCodecBufferAttr::pts](#pts) | Presentation timestamp of the buffer, in microseconds. | -| [OH_AVCodecBufferAttr::size](#size) | Size of the data contained in the buffer, in bytes. | -| [OH_AVCodecBufferAttr::offset](#offset) | Start offset of valid data in the buffer. | -| [OH_AVCodecBufferAttr::flags](#flags) | Buffer flag, which is a combination of multiple [OH_AVCodecBufferFlags](#oh_avcodecbufferflags). | -| [OH_AVCODEC_MIMETYPE_VIDEO_AVC](#oh_avcodec_mimetype_video_avc) | Defines the Multipurpose Internet Mail Extension (MIME) type for Advanced Video Coding (AVC). | -| [OH_AVCODEC_MIMETYPE_AUDIO_AAC](#oh_avcodec_mimetype_audio_aac) | Defines the MIME type for Advanced Audio Coding (AAC). | -| [OH_ED_KEY_TIME_STAMP](#oh_ed_key_time_stamp) | Provides unified character descriptors for the auxiliary data of the surface buffer. | -| [OH_ED_KEY_EOS](#oh_ed_key_eos) | Character descriptor of the end-of-stream in the surface auxiliary data. The value type is bool. | -| [OH_MD_KEY_TRACK_TYPE](#oh_md_key_track_type) | Provides unified character descriptors for the media playback framework. | -| [OH_MD_KEY_CODEC_MIME](#oh_md_key_codec_mime) | Character descriptor of the MIME type. The value type is string. | -| [OH_MD_KEY_DURATION](#oh_md_key_duration) | Character descriptor of duration. The value type is int64_t. | -| [OH_MD_KEY_BITRATE](#oh_md_key_bitrate) | Character descriptor of the bit rate. The value type is uint32_t. | -| [OH_MD_KEY_MAX_INPUT_SIZE](#oh_md_key_max_input_size) | Character descriptor of the maximum input size. The value type is uint32_t. | -| [OH_MD_KEY_WIDTH](#oh_md_key_width) | Character descriptor of the video width. The value type is uint32_t. | -| [OH_MD_KEY_HEIGHT](#oh_md_key_height) | Character descriptor of the video height. The value type is uint32_t. | -| [OH_MD_KEY_PIXEL_FORMAT](#oh_md_key_pixel_format) | Character descriptor of the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat). | -| [OH_MD_KEY_AUDIO_SAMPLE_FORMAT](#oh_md_key_audio_sample_format) | Character descriptor of the audio sample format. The value type is uint32_t. | -| [OH_MD_KEY_FRAME_RATE](#oh_md_key_frame_rate) | Character descriptor of the video frame rate. The value type is double. | -| [OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](#oh_md_key_video_encode_bitrate_mode) | Character descriptor of the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode). | -| [OH_MD_KEY_PROFILE](#oh_md_key_profile) | Character descriptor of the audio/video encoding capability. The value type is int32_t. For details, see [OH_AVCProfile](#oh_avcprofile) or [OH_AACProfile](#oh_aacprofile). | -| [OH_MD_KEY_AUD_CHANNEL_COUNT](#oh_md_key_aud_channel_count) | Character descriptor of the number of audio channels. The value type is uint32_t. | -| [OH_MD_KEY_AUD_SAMPLE_RATE](#oh_md_key_aud_sample_rate) | Character descriptor of the audio sampling rate. The value type is uint32_t. | -| [OH_MD_KEY_I_FRAME_INTERVAL](#oh_md_key_i_frame_interval) | Character descriptor of the I-frame interval. The value type is int32_t, and the unit is ms. | -| [OH_MD_KEY_ROTATION](#oh_md_key_rotation) | Character descriptor of the surface rotation angle. The value type is int32_t. The value range is {0, 90, 180, 270}. The default value is 0. | +| [OH_AVCodecBufferAttr::pts](#pts) | Defines the presentation timestamp of the buffer, in microseconds. | +| [OH_AVCodecBufferAttr::size](#size) | Defines the size of the data contained in the buffer, in bytes. | +| [OH_AVCodecBufferAttr::offset](#offset) | Defines the start offset of valid data in the buffer. | +| [OH_AVCodecBufferAttr::flags](#flags) | Defines a buffer flag, which is a combination of multiple [OH_AVCodecBufferFlags](#oh_avcodecbufferflags). | +| [OH_AVCODEC_MIMETYPE_VIDEO_AVC](#oh_avcodec_mimetype_video_avc) | Defines the Multipurpose Internet Mail Extension (MIME) type for AVC. | +| [OH_AVCODEC_MIMETYPE_AUDIO_AAC](#oh_avcodec_mimetype_audio_aac) | Defines the MIME type for AAC. | +| [OH_ED_KEY_TIME_STAMP](#oh_ed_key_time_stamp) | Defines the unified character descriptors for the auxiliary data of the surface buffer. | +| [OH_ED_KEY_EOS](#oh_ed_key_eos) | Defines the character descriptor of the end-of-stream in the surface auxiliary data. The value type is bool. | +| [OH_MD_KEY_TRACK_TYPE](#oh_md_key_track_type) | Defines the unified character descriptors for the media playback framework. | +| [OH_MD_KEY_CODEC_MIME](#oh_md_key_codec_mime) | Defines the character descriptor of the MIME type. The value type is string. | +| [OH_MD_KEY_DURATION](#oh_md_key_duration) | Defines the character descriptor of duration. The value type is int64_t. | +| [OH_MD_KEY_BITRATE](#oh_md_key_bitrate) | Defines the character descriptor of the bit rate. The value type is uint32_t. | +| [OH_MD_KEY_MAX_INPUT_SIZE](#oh_md_key_max_input_size) | Defines the character descriptor of the maximum input size. The value type is uint32_t. | +| [OH_MD_KEY_WIDTH](#oh_md_key_width) | Defines the character descriptor of the video width. The value type is uint32_t. | +| [OH_MD_KEY_HEIGHT](#oh_md_key_height) | Defines the character descriptor of the video height. The value type is uint32_t. | +| [OH_MD_KEY_PIXEL_FORMAT](#oh_md_key_pixel_format) | Defines the character descriptor of the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).| +| [OH_MD_KEY_AUDIO_SAMPLE_FORMAT](#oh_md_key_audio_sample_format) | Defines the character descriptor of the audio sample format. The value type is uint32_t. | +| [OH_MD_KEY_FRAME_RATE](#oh_md_key_frame_rate) | Defines the character descriptor of the video frame rate. The value type is double. | +| [OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](#oh_md_key_video_encode_bitrate_mode) | Defines the character descriptor of the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode).| +| [OH_MD_KEY_PROFILE](#oh_md_key_profile) | Defines the character descriptor of the audio/video encoding capability. The value type is int32_t. For details, see [OH_AVCProfile](#oh_avcprofile) or [OH_AACProfile](#oh_aacprofile).| +| [OH_MD_KEY_AUD_CHANNEL_COUNT](#oh_md_key_aud_channel_count) | Defines the character descriptor of the number of audio channels. The value type is uint32_t. | +| [OH_MD_KEY_AUD_SAMPLE_RATE](#oh_md_key_aud_sample_rate) | Defines the character descriptor of the audio sampling rate. The value type is uint32_t. | +| [OH_MD_KEY_I_FRAME_INTERVAL](#oh_md_key_i_frame_interval) | Defines the character descriptor of the I-frame interval. The value type is int32_t, and the unit is ms. | +| [OH_MD_KEY_ROTATION](#oh_md_key_rotation) | Defines the character descriptor of the surface rotation angle. The value type is int32_t. The value range is {0, 90, 180, 270}. The default value is 0. | ## Type Description @@ -97,7 +96,7 @@ typedef enum OH_AACProfileOH_AACProfile **Description**
Enumerates the AAC profiles. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_AVCodecAsyncCallback @@ -109,16 +108,16 @@ typedef struct OH_AVCodecAsyncCallbackOH_AVCodecAsyncCallback **Description**
Defines a collection of asynchronous callback functions for an **OH_AVCodec** instance. You must register this struct instance for an **OH_AVCodec** instance and process the information reported through these callbacks to ensure the normal running of the instance. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| onError | Indicates the callback used to report errors occurred during the running of the instance. For details, see [OH_AVCodecOnError](#oh_avcodeconerror). | -| onStreamChanged | Indicates the callback used to report stream information. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged). | -| onNeedInputData | Indicates the callback used to report input data needed. For details, see [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata). | -| onNeedInputData | Indicates the callback used to report output data needed. For details, see [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata). | +| onError | Indicates the callback used to report errors occurred during the running of the instance. For details, see [OH_AVCodecOnError](#oh_avcodeconerror).| +| onStreamChanged | Indicates the callback used to report stream information. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).| +| onNeedInputData | Indicates the callback used to report input data needed. For details, see [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata).| +| onNeedInputData | Indicates the callback used to report output data needed. For details, see [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata).| ### OH_AVCodecBufferAttr @@ -130,7 +129,7 @@ typedef struct OH_AVCodecBufferAttrOH_AVCodecBufferAttr **Description**
Defines the buffer attributes of an **OH_AVCodec** instance. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_AVCodecBufferFlags @@ -142,7 +141,7 @@ typedef enum OH_AVCodecBufferFlagsOH_AVCodecBufferFlags **Description**
Enumerates the buffer flags of an **OH_AVCodec** instance. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_AVCodecOnError @@ -154,15 +153,15 @@ typedef void(* OH_AVCodecOnError) (OH_AVCodec *codec, int32_t errorCode, void *u **Description**
Defines the function pointer that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| errorCode | Indicates an error code. | -| userData | Indicates the pointer to user-specific data. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| errorCode | Indicates an error code. | +| userData | Indicates the pointer to user-specific data. | ### OH_AVCodecOnNeedInputData @@ -174,16 +173,16 @@ typedef void(* OH_AVCodecOnNeedInputData) (OH_AVCodec *codec, uint32_t index, OH **Description**
Defines the function pointer that is called, with a new buffer to fill in new input data, when new input data is required during the running of an **OH_AVCodec** instance. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an input buffer. | -| data | Indicates the pointer to the new input data. | -| userData | Indicates the pointer to user-specific data. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an input buffer. | +| data | Indicates the pointer to the new input data. | +| userData | Indicates the pointer to user-specific data. | ### OH_AVCodecOnNewOutputData @@ -193,20 +192,19 @@ Defines the function pointer that is called, with a new buffer to fill in new in typedef void(* OH_AVCodecOnNewOutputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, OH_AVCodecBufferAttr *attr, void *userData) ``` **Description**
-Defines the function pointer that is called, with a buffer containing new output data, when the new output data is generated during the running of an **OH_AVCodec** instance. Note that the lifecycle of the pointer to the **[OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md)** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called. +Defines the function pointer that is called, with a buffer containing new output data, when the new output data is generated during the running of an **OH_AVCodec** instance. Note that the lifecycle of the pointer to the **OH_AVCodecBufferAttr** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of a new output buffer. | -| data | Indicates the pointer to the new output data. | -| attr | Indicates the pointer to the attributes of the new output buffer. For details, see [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md). | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of a new output buffer. | +| data | Indicates the pointer to the new output data. | +| attr | Indicates the pointer to the attributes of the new output buffer. For details, see [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md).| | userData | Indicates the pointer to user-specific data. | -| userData | specified data | ### OH_AVCodecOnStreamChanged @@ -218,15 +216,15 @@ typedef void(* OH_AVCodecOnStreamChanged) (OH_AVCodec *codec, OH_AVFormat *forma **Description**
Defines the function pointer that is called to report the attributes of the new stream when the output stream changes. Note that the lifecycle of the pointer to the **OH_AVFormat** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to the attributes of the new output stream. | -| userData | Indicates the pointer to user-specific data. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to the attributes of the new output stream. | +| userData | Indicates the pointer to user-specific data. | ### OH_AVCProfile @@ -238,7 +236,7 @@ typedef enum OH_AVCProfileOH_AVCProfile **Description**
Enumerates the AVC profiles. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_MediaType @@ -250,7 +248,7 @@ typedef enum OH_MediaTypeOH_MediaType **Description**
Enumerates the media types. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ## Enum Description @@ -265,7 +263,7 @@ enum OH_AACProfile **Description**
Enumerates the AAC profiles. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_AVCodecBufferFlags @@ -277,14 +275,14 @@ enum OH_AVCodecBufferFlags **Description**
Enumerates the buffer flags of an **OH_AVCodec** instance. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase -| Name | Description | + | Value| Description| | -------- | -------- | -| AVCODEC_BUFFER_FLAGS_EOS | The buffer contains an end-of-stream frame. | -| AVCODEC_BUFFER_FLAGS_SYNC_FRAME | The buffer contains a sync frame. | -| AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME | The buffer contains part of a frame. | -| AVCODEC_BUFFER_FLAGS_CODEC_DATA | The buffer contains codec-specific data. | +| AVCODEC_BUFFER_FLAGS_EOS | The buffer contains an end-of-stream frame.| +| AVCODEC_BUFFER_FLAGS_SYNC_FRAME | The buffer contains a sync frame.| +| AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME | The buffer contains part of a frame.| +| AVCODEC_BUFFER_FLAGS_CODEC_DATA | The buffer contains codec-specific data.| ### OH_AVCProfile @@ -296,7 +294,7 @@ enum OH_AVCProfile **Description**
Enumerates the AVC profiles. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_MediaType @@ -308,12 +306,12 @@ enum OH_MediaType **Description**
Enumerates the media types. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase -| Name | Description | + | Value| Description| | -------- | -------- | -| MEDIA_TYPE_AUD | Audio track. | -| MEDIA_TYPE_VID | Video track. | +| MEDIA_TYPE_AUD | Audio track.| +| MEDIA_TYPE_VID | Video track.| ## Variable Description @@ -326,7 +324,7 @@ Enumerates the media types. uint32_t OH_AVCodecBufferAttr::flags ``` **Description**
-Buffer flag, which is a combination of multiple [OH_AVCodecBufferFlags](#oh_avcodecbufferflags). +Defines a buffer flag, which is a combination of multiple [OH_AVCodecBufferFlags](#oh_avcodecbufferflags). ### offset @@ -346,9 +344,9 @@ Start offset of valid data in the buffer. const char* OH_AVCODEC_MIMETYPE_AUDIO_AAC ``` **Description**
-Defines the MIME type for Advanced Audio Coding (AAC). +Defines the MIME type for AAC. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_AVCODEC_MIMETYPE_VIDEO_AVC @@ -358,9 +356,9 @@ Defines the MIME type for Advanced Audio Coding (AAC). const char* OH_AVCODEC_MIMETYPE_VIDEO_AVC ``` **Description**
-Defines the Multipurpose Internet Mail Extension (MIME) type for Advanced Video Coding (AVC). +Defines the MIME type for AVC. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_ED_KEY_EOS @@ -370,7 +368,7 @@ Defines the Multipurpose Internet Mail Extension (MIME) type for Advanced Video const char* OH_ED_KEY_EOS ``` **Description**
-Character descriptor of the end-of-stream in the surface auxiliary data. The value type is bool. +Defines the character descriptor of the end-of-stream in the surface auxiliary data. The value type is bool. ### OH_ED_KEY_TIME_STAMP @@ -380,9 +378,9 @@ Character descriptor of the end-of-stream in the surface auxiliary data. The val const char* OH_ED_KEY_TIME_STAMP ``` **Description**
-Provides unified character descriptors for the auxiliary data of the surface buffer. +Defines the unified character descriptors for the auxiliary data of the surface buffer. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_MD_KEY_AUD_CHANNEL_COUNT @@ -392,7 +390,7 @@ Provides unified character descriptors for the auxiliary data of the surface buf const char* OH_MD_KEY_AUD_CHANNEL_COUNT ``` **Description**
-Character descriptor of the number of audio channels. The value type is uint32_t. +Defines the character descriptor of the number of audio channels. The value type is uint32_t. ### OH_MD_KEY_AUD_SAMPLE_RATE @@ -402,7 +400,7 @@ Character descriptor of the number of audio channels. The value type is uint32_t const char* OH_MD_KEY_AUD_SAMPLE_RATE ``` **Description**
-Character descriptor of the audio sampling rate. The value type is uint32_t. +Defines the character descriptor of the audio sampling rate. The value type is uint32_t. ### OH_MD_KEY_AUDIO_SAMPLE_FORMAT @@ -412,7 +410,7 @@ Character descriptor of the audio sampling rate. The value type is uint32_t. const char* OH_MD_KEY_AUDIO_SAMPLE_FORMAT ``` **Description**
-Character descriptor of the audio sample format. The value type is uint32_t. +Defines the character descriptor of the audio sample format. The value type is uint32_t. ### OH_MD_KEY_BITRATE @@ -422,7 +420,7 @@ Character descriptor of the audio sample format. The value type is uint32_t. const char* OH_MD_KEY_BITRATE ``` **Description**
-Character descriptor of the bit rate. The value type is uint32_t. +Defines the character descriptor of the bit rate. The value type is uint32_t. ### OH_MD_KEY_CODEC_MIME @@ -432,7 +430,7 @@ Character descriptor of the bit rate. The value type is uint32_t. const char* OH_MD_KEY_CODEC_MIME ``` **Description**
-Character descriptor of the MIME type. The value type is string. +Defines the character descriptor of the MIME type. The value type is string. ### OH_MD_KEY_DURATION @@ -442,7 +440,7 @@ Character descriptor of the MIME type. The value type is string. const char* OH_MD_KEY_DURATION ``` **Description**
-Character descriptor of duration. The value type is int64_t. +Defines the character descriptor of duration. The value type is int64_t. ### OH_MD_KEY_FRAME_RATE @@ -452,7 +450,7 @@ Character descriptor of duration. The value type is int64_t. const char* OH_MD_KEY_FRAME_RATE ``` **Description**
-Character descriptor of the video frame rate. The value type is double. +Defines the character descriptor of the video frame rate. The value type is double. ### OH_MD_KEY_HEIGHT @@ -462,7 +460,7 @@ Character descriptor of the video frame rate. The value type is double. const char* OH_MD_KEY_HEIGHT ``` **Description**
-Character descriptor of the video height. The value type is uint32_t. +Defines the character descriptor of the video height. The value type is uint32_t. ### OH_MD_KEY_I_FRAME_INTERVAL @@ -472,7 +470,7 @@ Character descriptor of the video height. The value type is uint32_t. const char* OH_MD_KEY_I_FRAME_INTERVAL ``` **Description**
-Character descriptor of the I-frame interval. The value type is int32_t, and the unit is ms. +Defines the character descriptor of the I-frame interval. The value type is int32_t, and the unit is ms. ### OH_MD_KEY_MAX_INPUT_SIZE @@ -482,7 +480,7 @@ Character descriptor of the I-frame interval. The value type is int32_t, and the const char* OH_MD_KEY_MAX_INPUT_SIZE ``` **Description**
-Character descriptor of the maximum input size. The value type is uint32_t. +Defines the character descriptor of the maximum input size. The value type is uint32_t. ### OH_MD_KEY_PIXEL_FORMAT @@ -492,7 +490,7 @@ Character descriptor of the maximum input size. The value type is uint32_t. const char* OH_MD_KEY_PIXEL_FORMAT ``` **Description**
-Character descriptor of the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat). +Defines the character descriptor of the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat). ### OH_MD_KEY_PROFILE @@ -502,7 +500,7 @@ Character descriptor of the video pixel format. The value type is int32_t. For d const char* OH_MD_KEY_PROFILE ``` **Description**
-Character descriptor of the audio/video encoding capability. The value type is int32_t. For details, see [OH_AVCProfile](#oh_avcprofile) or [OH_AACProfile](#oh_aacprofile). +Defines the character descriptor of the audio/video encoding capability. The value type is int32_t. For details, see [OH_AVCProfile](#oh_avcprofile) or [OH_AACProfile](#oh_aacprofile). ### OH_MD_KEY_ROTATION @@ -512,7 +510,7 @@ Character descriptor of the audio/video encoding capability. The value type is i const char* OH_MD_KEY_ROTATION ``` **Description**
-Character descriptor of the surface rotation angle. The value type is int32_t. The value range is {0, 90, 180, 270}. The default value is 0. +Defines the character descriptor of the surface rotation angle. The value type is int32_t. The value range is {0, 90, 180, 270}. The default value is 0. ### OH_MD_KEY_TRACK_TYPE @@ -522,9 +520,9 @@ Character descriptor of the surface rotation angle. The value type is int32_t. T const char* OH_MD_KEY_TRACK_TYPE ``` **Description**
-Provides unified character descriptors for the media playback framework. +Defines the unified character descriptors for the media playback framework. -\@syscap SystemCapability.Multimedia.Media.CodecBase +@syscap SystemCapability.Multimedia.Media.CodecBase ### OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE @@ -534,7 +532,7 @@ Provides unified character descriptors for the media playback framework. const char* OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE ``` **Description**
-Character descriptor of the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode). +Defines the character descriptor of the video encoding bit rate mode. The value type is int32_t. For details, see [OH_VideoEncodeBitrateMode](_video_encoder.md#oh_videoencodebitratemode). ### OH_MD_KEY_WIDTH @@ -544,7 +542,7 @@ Character descriptor of the video encoding bit rate mode. The value type is int3 const char* OH_MD_KEY_WIDTH ``` **Description**
-Character descriptor of the video width. The value type is uint32_t. +Defines the character descriptor of the video width. The value type is uint32_t. ### pts @@ -554,7 +552,7 @@ Character descriptor of the video width. The value type is uint32_t. int64_t OH_AVCodecBufferAttr::pts ``` **Description**
-Presentation timestamp of the buffer, in microseconds. +Defines the presentation timestamp of the buffer, in microseconds. ### size @@ -564,4 +562,4 @@ Presentation timestamp of the buffer, in microseconds. int32_t OH_AVCodecBufferAttr::size ``` **Description**
-Size of the data contained in the buffer, in bytes. +Defines the size of the data contained in the buffer, in bytes. diff --git a/en/application-dev/reference/native-apis/_video_decoder.md b/en/application-dev/reference/native-apis/_video_decoder.md index 23fcefb0c633bbe7682b6b5ceb4a835e2b5b6f32..c56dd9bfcbb30ce7b42d4b76cb96ed71e1bd7238 100644 --- a/en/application-dev/reference/native-apis/_video_decoder.md +++ b/en/application-dev/reference/native-apis/_video_decoder.md @@ -3,11 +3,11 @@ ## Overview -Provides the functions for video decoding. +Provides the functions for video decoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder -**Since:** +**Since** 9 @@ -16,31 +16,31 @@ Provides the functions for video decoding. ### Files -| Name | Description | + | Name| Description| | -------- | -------- | -| [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding.
File to Include: | +| [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding.
File to include: | ### Functions -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_VideoDecoder_CreateByMime](#oh_videodecoder_createbymime) (const char \*mime) | Creates a video decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | -| [OH_VideoDecoder_CreateByName](#oh_videodecoder_createbyname) (const char \*name) | Creates a video decoder instance based on a video decoder name. To use this API, you must know the exact name of the video decoder. | -| [OH_VideoDecoder_Destroy](#oh_videodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of a video decoder and destroys the video decoder instance. | -| [OH_VideoDecoder_SetCallback](#oh_videodecoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by a video decoder. This API must be called prior to **Prepare**. | -| [OH_VideoDecoder_SetSurface](#oh_videodecoder_setsurface) (OH_AVCodec \*codec, [OHNativeWindow](_native_window.md) \*window) | Sets an output surface for a video decoder. This API must be called prior to **Prepare**. | -| [OH_VideoDecoder_Configure](#oh_videodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures a video decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the video track that can be decoded. This API must be called prior to **Prepare**. | -| [OH_VideoDecoder_Prepare](#oh_videodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for a video decoder. This API must be called after **Configure**. | -| [OH_VideoDecoder_Start](#oh_videodecoder_start) (OH_AVCodec \*codec) | Starts a video decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | -| [OH_VideoDecoder_Stop](#oh_videodecoder_stop) (OH_AVCodec \*codec) | Stops a video decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again. | -| [OH_VideoDecoder_Flush](#oh_videodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of a video decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | -| [OH_VideoDecoder_Reset](#oh_videodecoder_reset) (OH_AVCodec \*codec) | Resets a video decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again. | -| [OH_VideoDecoder_GetOutputDescription](#oh_videodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of a video decoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed. | -| [OH_VideoDecoder_SetParameter](#oh_videodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure. | -| [OH_VideoDecoder_PushInputData](#oh_videodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to a video decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data, such as PPS/SPS data in H.264 format, to initialize the decoding process. | -| [OH_VideoDecoder_RenderOutputData](#oh_videodecoder_renderoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video decoder and instructs the decoder to render the decoded data in the buffer on the output surface. If no output surface is configured, calling this API only frees the output buffer. | -| [OH_VideoDecoder_FreeOutputData](#oh_videodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video decoder. | +| [OH_VideoDecoder_CreateByMime](#oh_videodecoder_createbymime) (const char \*mime) | Creates a video decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | +| [OH_VideoDecoder_CreateByName](#oh_videodecoder_createbyname) (const char \*name) | Creates a video decoder instance based on a video decoder name. To use this API, you must know the exact name of the video decoder. | +| [OH_VideoDecoder_Destroy](#oh_videodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of a video decoder and destroys the video decoder instance. | +| [OH_VideoDecoder_SetCallback](#oh_videodecoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by a video decoder. This API must be called prior to **Prepare**. | +| [OH_VideoDecoder_SetSurface](#oh_videodecoder_setsurface) (OH_AVCodec \*codec, OHNativeWindow \*window) | Sets an output surface for a video decoder. This API must be called prior to **Prepare**. | +| [OH_VideoDecoder_Configure](#oh_videodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures a video decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the video track that can be decoded. This API must be called prior to **Prepare**. | +| [OH_VideoDecoder_Prepare](#oh_videodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for a video decoder. This API must be called after **Configure**. | +| [OH_VideoDecoder_Start](#oh_videodecoder_start) (OH_AVCodec \*codec) | Starts a video decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | +| [OH_VideoDecoder_Stop](#oh_videodecoder_stop) (OH_AVCodec \*codec) | Stops a video decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again. | +| [OH_VideoDecoder_Flush](#oh_videodecoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of a video decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | +| [OH_VideoDecoder_Reset](#oh_videodecoder_reset) (OH_AVCodec \*codec) | Resets a video decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again. | +| [OH_VideoDecoder_GetOutputDescription](#oh_videodecoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of a video decoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed. | +| [OH_VideoDecoder_SetParameter](#oh_videodecoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure. | +| [OH_VideoDecoder_PushInputData](#oh_videodecoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to a video decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data, such as PPS/SPS data in H.264 format, to initialize the decoding process. | +| [OH_VideoDecoder_RenderOutputData](#oh_videodecoder_renderoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video decoder and instructs the decoder to render the decoded data in the buffer on the output surface. If no output surface is configured, calling this API only frees the output buffer. | +| [OH_VideoDecoder_FreeOutputData](#oh_videodecoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video decoder. | ## Function Description @@ -55,14 +55,14 @@ OH_AVErrCode OH_VideoDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format **Description**
Configures a video decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the video track that can be decoded. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the video track to be decoded. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the video track to be decoded. | **Returns** @@ -80,13 +80,13 @@ OH_AVCodec* OH_VideoDecoder_CreateByMime (const char * mime) **Description**
Creates a video decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc). | +| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc).| **Returns** @@ -102,13 +102,13 @@ OH_AVCodec* OH_VideoDecoder_CreateByName (const char * name) **Description**
Creates a video decoder instance based on a video decoder name. To use this API, you must know the exact name of the video decoder. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| name | Indicates the pointer to a video decoder name. | +| name | Indicates the pointer to a video decoder name. | **Returns** @@ -124,13 +124,13 @@ OH_AVErrCode OH_VideoDecoder_Destroy (OH_AVCodec * codec) **Description**
Clears the internal resources of a video decoder and destroys the video decoder instance. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -148,13 +148,13 @@ OH_AVErrCode OH_VideoDecoder_Flush (OH_AVCodec * codec) **Description**
Clears the input and output data in the internal buffer of a video decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -172,14 +172,14 @@ OH_AVErrCode OH_VideoDecoder_FreeOutputData (OH_AVCodec * codec, uint32_t index **Description**
Frees an output buffer of a video decoder. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an output buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an output buffer. | **Returns** @@ -197,13 +197,13 @@ OH_AVFormat* OH_VideoDecoder_GetOutputDescription (OH_AVCodec * codec) **Description**
Obtains the attributes of the output data of a video decoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -219,13 +219,13 @@ OH_AVErrCode OH_VideoDecoder_Prepare (OH_AVCodec * codec) **Description**
Prepares internal resources for a video decoder. This API must be called after **Configure**. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -243,15 +243,15 @@ OH_AVErrCode OH_VideoDecoder_PushInputData (OH_AVCodec * codec, uint32_t index, **Description**
Pushes the input buffer filled with data to a video decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data, such as PPS/SPS data in H.264 format, to initialize the decoding process. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an input buffer. | -| attr | Indicates the attributes of the data contained in the buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an input buffer. | +| attr | Indicates the attributes of the data contained in the buffer. | **Returns** @@ -269,14 +269,14 @@ OH_AVErrCode OH_VideoDecoder_RenderOutputData (OH_AVCodec * codec, uint32_t inde **Description**
Frees an output buffer of a video decoder and instructs the decoder to render the decoded data in the buffer on the output surface. If no output surface is configured, calling this API only frees the output buffer. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an output buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an output buffer. | **Returns** @@ -294,13 +294,13 @@ OH_AVErrCode OH_VideoDecoder_Reset (OH_AVCodec * codec) **Description**
Resets a video decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -318,15 +318,15 @@ OH_AVErrCode OH_VideoDecoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal **Description**
Sets an asynchronous callback so that your application can respond to events generated by a video decoder. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). | -| userData | Indicates the pointer to user-specific data. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).| +| userData | Indicates the pointer to user-specific data. | **Returns** @@ -344,14 +344,14 @@ OH_AVErrCode OH_VideoDecoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for **Description**
Sets dynamic parameters for a video decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the pointer to an **OH_AVFormat** instance. | **Returns** @@ -369,14 +369,14 @@ OH_AVErrCode OH_VideoDecoder_SetSurface (OH_AVCodec * codec, OHNativeWindow * wi **Description**
Sets an output surface for a video decoder. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| window | Indicates the pointer to an **OHNativeWindow** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| window | Indicates the pointer to an **OHNativeWindow** instance. | **Returns** @@ -394,13 +394,13 @@ OH_AVErrCode OH_VideoDecoder_Start (OH_AVCodec * codec) **Description**
Starts a video decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -418,13 +418,13 @@ OH_AVErrCode OH_VideoDecoder_Stop (OH_AVCodec * codec) **Description**
Stops a video decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again. -\@syscap SystemCapability.Multimedia.Media.VideoDecoder +@syscap SystemCapability.Multimedia.Media.VideoDecoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** diff --git a/en/application-dev/reference/native-apis/_video_encoder.md b/en/application-dev/reference/native-apis/_video_encoder.md index c28d758c417106607997feec3f8d5f75a0ea6099..736adcdf7e73b40beb4d35250fec0e19cd794d57 100644 --- a/en/application-dev/reference/native-apis/_video_encoder.md +++ b/en/application-dev/reference/native-apis/_video_encoder.md @@ -3,57 +3,56 @@ ## Overview -Provides the functions and enums for video encoding. +Provides the functions and enums for video encoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder -**Since:** +**Since** 9 - ## Summary ### Files -| Name | Description | + | Name| Description| | -------- | -------- | -| [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding.
File to Include: | +| [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding.
File to include: | ### Types -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) | Enumerates the bit rate modes of video encoding. | +| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) | Enumerates the bit rate modes of video encoding. | ### Enums -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) { CBR = 0, VBR = 1, CQ = 2 } | Enumerates the bit rate modes of video encoding. | +| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) { **CBR** = 0, **VBR** = 1, **CQ** = 2 } | Enumerates the bit rate modes of video encoding. | ### Functions -| Name | Description | + | Name| Description| | -------- | -------- | -| [OH_VideoEncoder_CreateByMime](#oh_videoencoder_createbymime) (const char \*mime) | Creates a video encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | -| [OH_VideoEncoder_CreateByName](#oh_videoencoder_createbyname) (const char \*name) | Creates a video encoder instance based on a video encoder name. To use this API, you must know the exact name of the video encoder. | -| [OH_VideoEncoder_Destroy](#oh_videoencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of a video encoder and destroys the video encoder instance. | -| [OH_VideoEncoder_SetCallback](#oh_videoencoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by a video encoder. This API must be called prior to **Prepare**. | -| [OH_VideoEncoder_Configure](#oh_videoencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures a video encoder. Typically, you need to configure the attributes of the video track that can be encoded. This API must be called prior to **Prepare**. | -| [OH_VideoEncoder_Prepare](#oh_videoencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for a video encoder. This API must be called after **Configure**. | -| [OH_VideoEncoder_Start](#oh_videoencoder_start) (OH_AVCodec \*codec) | Starts a video encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | -| [OH_VideoEncoder_Stop](#oh_videoencoder_stop) (OH_AVCodec \*codec) | Stops a video encoder. After the encoder is stopped, you can call **Start** to start it again. | -| [OH_VideoEncoder_Flush](#oh_videoencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of a video encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | -| [OH_VideoEncoder_Reset](#oh_videoencoder_reset) (OH_AVCodec \*codec) | Resets a video encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. | -| [OH_VideoEncoder_GetOutputDescription](#oh_videoencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of a video encoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed. | -| [OH_VideoEncoder_SetParameter](#oh_videoencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. | -| [OH_VideoEncoder_GetSurface](#oh_videoencoder_getsurface) (OH_AVCodec \*codec, [OHNativeWindow](_native_window.md) \*\*window) | Obtains an input surface from a video encoder. This API must be called prior to **Prepare**. | -| [OH_VideoEncoder_FreeOutputData](#oh_videoencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video encoder. | -| [OH_VideoEncoder_NotifyEndOfStream](#oh_videoencoder_notifyendofstream) (OH_AVCodec \*codec) | Notifies a video encoder that input streams end. This API is recommended in surface mode. | +| [OH_VideoEncoder_CreateByMime](#oh_videoencoder_createbymime) (const char \*mime) | Creates a video encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. | +| [OH_VideoEncoder_CreateByName](#oh_videoencoder_createbyname) (const char \*name) | Creates a video encoder instance based on a video encoder name. To use this API, you must know the exact name of the video encoder. | +| [OH_VideoEncoder_Destroy](#oh_videoencoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of a video encoder and destroys the video encoder instance. | +| [OH_VideoEncoder_SetCallback](#oh_videoencoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by a video encoder. This API must be called prior to **Prepare**. | +| [OH_VideoEncoder_Configure](#oh_videoencoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures a video encoder. Typically, you need to configure the attributes of the video track that can be encoded. This API must be called prior to **Prepare**. | +| [OH_VideoEncoder_Prepare](#oh_videoencoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for a video encoder. This API must be called after **Configure**. | +| [OH_VideoEncoder_Start](#oh_videoencoder_start) (OH_AVCodec \*codec) | Starts a video encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. | +| [OH_VideoEncoder_Stop](#oh_videoencoder_stop) (OH_AVCodec \*codec) | Stops a video encoder. After the encoder is stopped, you can call **Start** to start it again. | +| [OH_VideoEncoder_Flush](#oh_videoencoder_flush) (OH_AVCodec \*codec) | Clears the input and output data in the internal buffer of a video encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. | +| [OH_VideoEncoder_Reset](#oh_videoencoder_reset) (OH_AVCodec \*codec) | Resets a video encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. | +| [OH_VideoEncoder_GetOutputDescription](#oh_videoencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of a video encoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed. | +| [OH_VideoEncoder_SetParameter](#oh_videoencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. | +| [OH_VideoEncoder_GetSurface](#oh_videoencoder_getsurface) (OH_AVCodec \*codec, OHNativeWindow \*\*window) | Obtains an input surface from a video encoder. This API must be called prior to **Prepare**. | +| [OH_VideoEncoder_FreeOutputData](#oh_videoencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video encoder. | +| [OH_VideoEncoder_NotifyEndOfStream](#oh_videoencoder_notifyendofstream) (OH_AVCodec \*codec) | Notifies a video encoder that input streams end. This API is recommended in surface mode. | ## Type Description @@ -68,7 +67,7 @@ typedef enum OH_VideoEncodeBitrateModeOH_VideoEncodeBitrateMode **Description**
Enumerates the bit rate modes of video encoding. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder ## Enum Description @@ -83,13 +82,13 @@ enum OH_VideoEncodeBitrateMode **Description**
Enumerates the bit rate modes of video encoding. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder -| Name | Description | + | Value| Description| | -------- | -------- | -| CBR | Constant bit rate. | -| VBR | Variable bit rate. | -| CQ | Constant quality. | +| CBR | Constant bit rate.| +| VBR | Variable bit rate.| +| CQ | Constant quality.| ## Function Description @@ -104,14 +103,14 @@ OH_AVErrCode OH_VideoEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format **Description**
Configures a video encoder. Typically, you need to configure the attributes of the video track that can be encoded. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the video track to be encoded. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the video track to be encoded. | **Returns** @@ -127,15 +126,15 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op OH_AVCodec* OH_VideoEncoder_CreateByMime (const char * mime) ``` **Description**
-Creates a video encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. +Creates a video encoder instance based on a MIME type. This API is recommended in most cases. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc). | +| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc).| **Returns** @@ -151,13 +150,13 @@ OH_AVCodec* OH_VideoEncoder_CreateByName (const char * name) **Description**
Creates a video encoder instance based on a video encoder name. To use this API, you must know the exact name of the video encoder. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| name | Indicates the pointer to a video encoder name. | +| name | Indicates the pointer to a video encoder name. | **Returns** @@ -173,13 +172,13 @@ OH_AVErrCode OH_VideoEncoder_Destroy (OH_AVCodec * codec) **Description**
Clears the internal resources of a video encoder and destroys the video encoder instance. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -197,13 +196,13 @@ OH_AVErrCode OH_VideoEncoder_Flush (OH_AVCodec * codec) **Description**
Clears the input and output data in the internal buffer of a video encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -221,14 +220,14 @@ OH_AVErrCode OH_VideoEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index **Description**
Frees an output buffer of a video encoder. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| index | Indicates the index of an output buffer. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| index | Indicates the index of an output buffer. | **Returns** @@ -246,13 +245,13 @@ OH_AVFormat* OH_VideoEncoder_GetOutputDescription (OH_AVCodec * codec) **Description**
Obtains the attributes of the output data of a video encoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -268,14 +267,14 @@ OH_AVErrCode OH_VideoEncoder_GetSurface (OH_AVCodec * codec, OHNativeWindow ** w **Description**
Obtains an input surface from a video encoder. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| window | Indicates the double pointer to an **OHNativeWindow** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| window | Indicates the double pointer to an **OHNativeWindow** instance. | **Returns** @@ -293,13 +292,13 @@ OH_AVErrCode OH_VideoEncoder_NotifyEndOfStream (OH_AVCodec * codec) **Description**
Notifies a video encoder that input streams end. This API is recommended in surface mode. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -317,13 +316,13 @@ OH_AVErrCode OH_VideoEncoder_Prepare (OH_AVCodec * codec) **Description**
Prepares internal resources for a video encoder. This API must be called after **Configure**. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -341,13 +340,13 @@ OH_AVErrCode OH_VideoEncoder_Reset (OH_AVCodec * codec) **Description**
Resets a video encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -365,15 +364,15 @@ OH_AVErrCode OH_VideoEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal **Description**
Sets an asynchronous callback so that your application can respond to events generated by a video encoder. This API must be called prior to **Prepare**. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). | -| userData | Indicates the pointer to user-specific data. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).| +| userData | Indicates the pointer to user-specific data. | **Returns** @@ -391,14 +390,14 @@ OH_AVErrCode OH_VideoEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for **Description**
Sets dynamic parameters for a video encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | -| format | Indicates the handle to an **OH_AVFormat** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| format | Indicates the handle to an **OH_AVFormat** instance. | **Returns** @@ -416,13 +415,13 @@ OH_AVErrCode OH_VideoEncoder_Start (OH_AVCodec * codec) **Description**
Starts a video encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** @@ -440,13 +439,13 @@ OH_AVErrCode OH_VideoEncoder_Stop (OH_AVCodec * codec) **Description**
Stops a video encoder. After the encoder is stopped, you can call **Start** to start it again. -\@syscap SystemCapability.Multimedia.Media.VideoEncoder +@syscap SystemCapability.Multimedia.Media.VideoEncoder - **Parameters** +**Parameters** -| Name | Description | + | Name| Description| | -------- | -------- | -| codec | Indicates the pointer to an **OH_AVCodec** instance. | +| codec | Indicates the pointer to an **OH_AVCodec** instance. | **Returns** diff --git a/en/application-dev/reference/native-lib/Readme-EN.md b/en/application-dev/reference/native-lib/Readme-EN.md index d0ac26033d50f5bf9b3a2f94bf90d141d6db86be..9b0fbca08e15c7b7e0e5e500d3532019bb56eb87 100644 --- a/en/application-dev/reference/native-lib/Readme-EN.md +++ b/en/application-dev/reference/native-lib/Readme-EN.md @@ -1,7 +1,8 @@ # Standard Libraries Supported by Native APIs -- [Node_API](third_party_napi/napi.md) +- [libc](third_party_libc/musl.md) +- [Node-API](third_party_napi/napi.md) - [libuv](third_party_libuv/libuv.md) -- [Native Standard Libraries Supported by Openharmony](third_party_libc/musl.md) +- [OpenSL ES](third_party_opensles/opensles.md) - Appendix - [Native API Symbols Not Exported](third_party_libc/musl-peculiar-symbol.md) - [Native API Symbols That May Fail to Be Invoked Due to Permission Control](third_party_libc/musl-permission-control-symbol.md) diff --git a/en/application-dev/security/huks-guidelines.md b/en/application-dev/security/huks-guidelines.md index c23e9146f3f9e1a10206a003001339efa63f7444..60839bf7b35ee9043fa8fb70c140459e51d6356f 100644 --- a/en/application-dev/security/huks-guidelines.md +++ b/en/application-dev/security/huks-guidelines.md @@ -3,25 +3,22 @@ ## Key Generation -The HUKS provides the capability of randomly generating keys for services. For a key generated by the HUKS, the plaintext will never be exposed outside throughout the lifecycle. No one can access the plaintext of the key. Even the service, for which the key is generated, can call APIs provided by the HUKS to perform operations on the key and obtain the operation result, but not access the key. +The OpenHarmony Universal KeyStore (HUKS) provides key management and cryptography operations for services. For a key generated by the HUKS, the plaintext will never be exposed outside throughout the lifecycle. No one can obtain the key in plaintext. Even the service itself can call APIs provided by the HUKS to perform operations on the key and obtain the operation result, but cannot access the key. -**How to Develop** +**How to Develop** Use [huks.generateKeyItem(keyAlias,options,callback)](../reference/apis/js-apis-huks.md#huksgeneratekeyitem9) to generate a key. You need to pass in the key alias in **keyAlias**, key property set in **options**, and **callback** to return the result asynchronously. For details about the APIs, see [HUKS](../reference/apis/js-apis-huks.md). **Procedure** - -1. Determine the key alias. +1. Set the key alias. 2. Initialize the key property set.
Use [HuksParam](../reference/apis/js-apis-huks.md#huksparam) to encapsulate key properties and use a **HuksParam** array to assign values to the **properties** field of [HuksOptions](../reference/apis/js-apis-huks.md#huksoptions). The parameters [HuksKeyAlg](../reference/apis/js-apis-huks.md#hukskeyalg), [HuksKeySize](../reference/apis/js-apis-huks.md#hukskeysize), and [HuksKeyPurpose](../reference/apis/js-apis-huks.md#hukskeypurpose) are mandatory. 3. Pass in the key alias and key parameter set to generate a key. - - > **NOTE** > > The key alias cannot exceed 64 bytes. -**Sample Code** +**Sample code** ```ts /* @@ -30,7 +27,7 @@ Use [huks.generateKeyItem(keyAlias,options,callback)](../reference/apis/js-apis- import huks from '@ohos.security.huks'; /* - * Determine the key alias and encapsulate the key properties. + * Set the key alias and encapsulate the key properties. */ let keyAlias = 'dh_key'; let properties = new Array(); @@ -96,25 +93,20 @@ async function TestGenKey() { ``` ## Key Import -A key generated outside the HUKS (for example, generated through key agreement or by a server) can be imported to the HUKS for management. The HUKS supports import of keys in plaintext. However, if a key is imported in plaintext, the key is exposed in the REE memory. This operation applies to lightweight devices or security-insensitive services. For security-sensitive services, use the secure import provided by the HUKS. Secure import allows the keys generated for services to be transferred to the HUKS through an end-to-end encrypted transmission channel. - -Once a key is imported to the HUKS, its plaintext will not be exposed outside the HUKS throughout the lifecycle of the key. +A key generated outside the HUKS (for example, generated through key agreement or by a server) can be imported to the HUKS for management. The HUKS supports import of keys in plaintext. However, if a key is imported in plaintext, the key is exposed in the Rich Execution Environment (REE) memory. This type of import applies to lightweight devices or security-insensitive services. For security-sensitive services, use the secure import feature provided by the HUKS. Secure import allows the keys generated for services to be transferred to the HUKS through an end-to-end encrypted transmission channel. +Once a key is imported to the HUKS, its plaintext will never be exposed outside the HUKS throughout the lifecycle of the key. ### Importing a Key in Plaintext - Use [huks.importKeyItem(keyAlias,options,callback)](../reference/apis/js-apis-huks.md#huksimportkeyitem9) to import a key in plaintext. You need to pass in the key alias in **keyAlias**, key material and property set in **options**, and **callback** to return the result asynchronously. For details about the APIs, see [HUKS](../reference/apis/js-apis-huks.md). - -1. Determine the key alias. +1. Set the key alias. 2. Encapsulate the key material and key property set.
The key material must comply with [HUKS key material formats](./huks-appendix.md#key-material-formats). The **inData** value of [HuksOptions](../reference/apis/js-apis-huks.md#huksoptions) must be in the Uint8Array format. Encapsulate key properties in [HuksParam](../reference/apis/js-apis-huks.md#huksparam), and use a **HuksParam** array to assign values to the **properties** field. The key properties must contain [HuksKeyAlg](../reference/apis/js-apis-huks.md#hukskeyalg), [HuksKeySize](../reference/apis/js-apis-huks.md#hukskeysize), and [HuksKeyPurpose](../reference/apis/js-apis-huks.md#hukskeypurpose). 3. Import the key. - - -**Sample Code** +**Sample code** ```ts /* @@ -128,7 +120,7 @@ let plainTextSize32 = new Uint8Array([ ]); /* - * Determine the key alias. + * Set the key alias. */ let keyAlias = 'AES256Alias_sample'; @@ -174,7 +166,7 @@ try { Check whether the key exists. If yes, the key is imported successfully. -**Sample Code** +**Sample code** ```ts import huks from '@ohos.security.huks'; @@ -209,26 +201,28 @@ try { ### Importing a Key Securely -Compared with import of plaintext, secure import involves complex key material and operations. The following figure illustrates the basic development process of secure import. +Compared with import of a key in plaintext, secure import involves more complex key material and operations. The following figure illustrates the basic development process of secure import. -**Figure 1** Secure import process +**Figure 1** Development process of secure import ![huks_import_wrapped_key](figures/huks_import_wrapped_key.png) +**Available APIs** +You need to use the APIs listed in the following table in sequence. +**Table 1** APIs for importing a key securely -**Available APIs** - -You need to use the APIs for generating a key, exporting a public key, importing a wrapped key, and deleting a key in sequence. | API | Description | | -------------------------------------- | ----------------------------| |generateKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\) : void| Generates a key.| -|exportKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback) : void| Exports the public key of a key pair.| -|importWrappedKeyItem(keyAlias: string, wrappingKeyAlias: string, options: HuksOptions, callback: AsyncCallback) : void|Imports a wrapped key.| -|deleteKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback) : void|Deletes a key.| +|exportKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\) : void| Exports the public key of a key pair.| +|importWrappedKeyItem(keyAlias: string, wrappingKeyAlias: string, options: HuksOptions, callback: AsyncCallback\) : void|Imports a encrypted key.| +|deleteKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\) : void|Deletes a key.| ->**NOTE**
The public key plaintext material returned by **exportKeyItem()** is encapsulated in X.509 format, and the key material to be imported by **importWrappedKeyItem()** must be encapsulated in **LengthData-Data** format. Specifically, the application needs to request a Uint8Array and encapsulate the Uint8Array in the sequence listed in the following table. +>**NOTE** +> +>The public key plaintext material returned by **exportKeyItem()** is encapsulated in X.509 format, and the key material to be imported by **importWrappedKeyItem()** must be encapsulated in **LengthData-Data** format. Specifically, the application needs to request a Uint8Array and encapsulate the Uint8Array in the sequence listed in the following table. **Table 2** Format of the wrapped key material @@ -245,6 +239,7 @@ You need to use the APIs for generating a key, exporting a public key, importing **How to Develop** The following example presents the development involving HUKS APIs (using the ECDH key agreement suite). The operations performed by the service are not included. + 1. Convert the key material into the HUKS format. 2. Generate a key for secure import. 3. Export the public key material. @@ -261,7 +256,7 @@ The following example presents the development involving HUKS APIs (using the EC import huks from '@ohos.security.huks'; /* - * Determine the key alias. + * Set the key alias. */ let importAlias = "importAlias"; let wrapAlias = "wrappingKeyAlias"; @@ -591,13 +586,13 @@ async function ImportWrappedKeyNormalTest() { Check whether the key exists. If yes, the key is imported successfully. -**Sample Code** +**Sample code** ```ts import huks from '@ohos.security.huks'; /* - * Determine the key alias and encapsulate the key properties. + * Set the key alias and encapsulate the key properties. */ let keyAlias = 'importAlias'; let isKeyExist; @@ -627,7 +622,6 @@ try { } ``` - ## Common Key Operations **When to Use** @@ -637,11 +631,19 @@ To ensure data confidentiality and integrity, you may need to encrypt or decrypt **General Development Process** The HUKS operates data based on key sessions. The general process is as follows: -1. (Mandatory) Use [huks.initSession()](../reference/apis/js-apis-huks.md#huksinitsession9) to initialize a key session.
You need to pass in the key alias and key operation parameters to initialize a key session, and obtain the session handle. The key operation parameters must contain the parameters required by the cipher algorithm, including the cipher algorithm, key size, key purpose, working mode, padding mode, hash mode, IV, nonce, and AAD. If access control is set for the key, other parameters are required. For details, see [Key Access Control](#key-access-control). This step is mandatory. -2. (Optional) Use [huks.updateSession()](../reference/apis/js-apis-huks.md#huksupdatesession9) to pass in data by segment. Perform this step only if the data exceeds 100 KB or the cryptographic algorithm requires operations by data segment. Otherwise, skip this step. This step is optional. -3. (Mandatory) Use [huks.finishSession()](../reference/apis/js-apis-huks.md#huksfinishsession9) to finalize the key session operation.
Pass in the last data segment and perform the key session operation. If an error occurs during the process or the data passed in is not required, use [huks.abortSession()](../reference/apis/js-apis-huks.md#huksabortsession9) to abort the session. This step is mandatory. + +1. (Mandatory) Use [huks.initSession()](../reference/apis/js-apis-huks.md#huksinitsession9) to initialize a key session. + + You need to pass in the key alias and key operation parameters to initialize a key session, and obtain the session handle. The key operation parameters must contain the parameters required by the cipher algorithm, including the cipher algorithm, key size, key purpose, working mode, padding mode, hash mode, IV, nonce, and AAD. If access control is set for the key, other parameters are required. For details, see [Key Access Control](#key-access-control). + +2. (Optional) Use [huks.updateSession()](../reference/apis/js-apis-huks.md#huksupdatesession9) to pass in data by segment. Perform this step only if the data exceeds 100 KB or the cryptographic algorithm requires operations by data segment. Otherwise, skip this step. + +3. (Mandatory) Use [huks.finishSession()](../reference/apis/js-apis-huks.md#huksfinishsession9) to complete the key session operation. + + Pass in the last data segment and complete the key session operation. If an error occurs during the process or the data passed in is not required, use [huks.abortSession()](../reference/apis/js-apis-huks.md#huksabortsession9) to abort the session. ### Encryption and Decryption + ```ts /* * The following uses an AES 128-bit key and callback-based APIs as an example. @@ -958,6 +960,9 @@ struct Index { ``` ### Key Agreement + +You are advised to pass in [HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype) to specify the storage type in key agreement. From API version 10, only **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED** can be used for key agreement. If **HuksKeyStorageType** is not passed in, the key can be stored and exported by default, which poses security risks. + ```ts /* * Perform key agreement using an X25519 256-bit TEMP key and return the result in a callback. @@ -965,7 +970,7 @@ struct Index { import huks from '@ohos.security.huks'; /* - * Determine the key alias and encapsulate the key properties. + * Set the key alias and encapsulate the key properties. */ let srcKeyAliasFirst = "AgreeX25519KeyFirstAlias"; let srcKeyAliasSecond = "AgreeX25519KeySecondAlias"; @@ -1002,6 +1007,10 @@ properties[5] = { tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, value: huks.HuksCipherMode.HUKS_MODE_CBC, } +properties[6] = { + tag: huks.HuksTag.HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG, + value: huks.HuksKeyStorageType.HUKS_STORAGE_ONLY_USED_IN_HUKS, +} let HuksOptions = { properties: properties, inData: new Uint8Array(new Array()) @@ -1010,8 +1019,8 @@ let HuksOptions = { /* Configure parameters for the first key agreement. */ let finishProperties = new Array(); finishProperties[0] = { - tag: huks.HuksTag.HUKS_TAG_KEY_STORAGE_FLAG, - value: huks.HuksKeyStorageType.HUKS_STORAGE_TEMP, + tag: huks.HuksTag.HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG, + value: huks.HuksKeyStorageType.HUKS_STORAGE_ONLY_USED_IN_HUKS, } finishProperties[1] = { tag: huks.HuksTag.HUKS_TAG_IS_KEY_ALIAS, @@ -1322,6 +1331,9 @@ async function testAgree() { ``` ### Key Derivation + +You are advised to pass in [HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype) for key derivation. From API version 10, only **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED** can be used for key derivation. If **HuksKeyStorageType** is not passed in, the key can be stored and exported by default, which poses security risks. + ```ts /* * The following uses an HKDF256 key and promise-based APIs as an example. @@ -1329,7 +1341,7 @@ async function testAgree() { import huks from '@ohos.security.huks'; /* - * Determine the key alias and encapsulate the key properties. + * Set the key alias and encapsulate the key properties. */ let srcKeyAlias = "hkdf_Key"; let deriveHkdfInData = "deriveHkdfTestIndata"; @@ -1355,6 +1367,10 @@ properties[3] = { tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, value: huks.HuksKeySize.HUKS_AES_KEY_SIZE_128, } +properties[4] = { + tag: huks.HuksTag.HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG, + value: huks.HuksKeyStorageType.HUKS_STORAGE_ONLY_USED_IN_HUKS, +} let huksOptions = { properties: properties, inData: new Uint8Array(new Array()) @@ -1386,8 +1402,8 @@ let initOptions = { /* Configure the parameter set used for finish(). */ let finishProperties = new Array(); finishProperties[0] = { - tag: huks.HuksTag.HUKS_TAG_KEY_STORAGE_FLAG, - value: huks.HuksKeyStorageType.HUKS_STORAGE_PERSISTENT, + tag: huks.HuksTag.HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG, + value: huks.HuksKeyStorageType.HUKS_STORAGE_ONLY_USED_IN_HUKS, } finishProperties[1] = { tag: huks.HuksTag.HUKS_TAG_IS_KEY_ALIAS, @@ -1646,12 +1662,13 @@ Services can access only their own keys, that is, the keys generated or imported In addition, the HUKS supports user identity authentication for security-sensitive services. Users can use the service keys only after the authentication (PIN or biometric authentication) is successful. The HUKS also restricts the key usage. For example, the AES keys can only be used for encryption and decryption, and the RSA keys can only be used for signing and signature verification. -**User Identity Authentication** +### User Identity Authentication -When generating or importing a key, you can enable user identity authentication for the key use. You can specify a subset of credentials (lock screen password, fingerprint, and face) for user identity authentication. After a key is generated or imported, unauthorized key access can be prevented even if the application process is attacked. Key access control applies to security-sensitive scenarios, such as password-free login, password-free payment, and automatic password filling. +During the key generation or import process, user identity authentication can be enabled to allow the use of the key only after the authentication is successful. You can specify a subset of credentials (lock screen password, fingerprint, and face) for user identity authentication. After a key is generated or imported, unauthorized key access can be prevented even if the application process is attacked. Key access control applies to security-sensitive scenarios, such as password-free login, password-free payment, and automatic password filling. In addition to user identity authentication, the HUKS provides the following modes for automatically invalidating a key: -- Invalidate the key when the screen lock password is cleared.
This mode takes effect only when a screen lock password has been set. If the screen lock password is cleared, the key becomes invalid permanently. The key will not be invalidated if the screen lock password is modified. This mode applies to user-related data protection and access based on screen lock passwords. + +- Invalidate the key when the screen lock password is cleared.
This mode takes effect only when a screen lock password has been set. If the screen lock password is cleared, the key becomes invalid permanently. The key will not be invalidated if the screen lock password is modified. This mode applies to user-related data protection or access based on screen lock passwords. - Invalidate the key when new biometric enrollments are added.
This mode takes effect only when at least one biometric feature (such as fingerprint) has been enrolled. The key becomes invalid permanently once a new biometric feature is enrolled. The key will not be invalidated if the biometric feature is deleted. This mode applies to scenarios, such as password-free login or payment. To ensure the validity of the user authentication result, the HUKS supports challenge verification. Before user identity authentication, obtain the challenge (in [HuksSessionHandle](../reference/apis/js-apis-huks.md#hukssessionhandle9) returned by [huks.initSession()](../reference/apis/js-apis-huks.md#huksinitsession9)) from the HUKS and pass in the challenge in [userIAM_userAuth.getAuthInstance](../reference/apis/js-apis-useriam-userauth.md#authinstance9). The challenge of the authentication token is then verified during key operations. @@ -1668,33 +1685,33 @@ When a key is generated or imported, [HuksUserAuthType](../reference/apis/js-api **Table 3** User authentication types -| Name | Value | Description | -| ------------------------------- |---|------------------------ | -| HUKS_USER_AUTH_TYPE_FINGERPRINT |0x0001 | Fingerprint authentication.
Fingerprint authentication, facial authentication, and PIN authentication can be enabled at the same time. | -| HUKS_USER_AUTH_TYPE_FACE |0x0002 | Facial authentication.
Fingerprint authentication, facial authentication, and PIN authentication can be enabled at the same time.| -| HUKS_USER_AUTH_TYPE_PIN |0x0004 | PIN authentication.
Fingerprint authentication, facial authentication, and PIN authentication can be enabled at the same time.| +| Name | Value | Description | +| ------------------------------- | ------ | ------------------------------------------------------------ | +| HUKS_USER_AUTH_TYPE_FINGERPRINT | 0x0001 | Fingerprint authentication, which can be enabled with facial authentication and PIN authentication at the same time. | +| HUKS_USER_AUTH_TYPE_FACE | 0x0002 | Facial authentication, whch can be enabled with fingerprint authentication and PIN authentication at the same time. | +| HUKS_USER_AUTH_TYPE_PIN | 0x0004 | PIN authentication, which can be enabled with fingerprint authentication and facial authenticationat the same time. | **Table 4** Secure access types -| Name | Value | Description | -| --------------------------------------- | ---- | ------------------------------------------------ | -| HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD | 1 | Invalidate the key after the screen lock password is cleared. | -| HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL | 2 | Invalidate the key after a biometric enrollment is added. The user authentication types must include the biometric authentication.| + +| Name | Value | Description | +| --------------------------------------- | ----- | ------------------------------------------------------------ | +| HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD | 1 | Invalidate the key after the screen lock password is cleared. | +| HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL | 2 | Invalidate the key after a biometric enrollment is added. The user authentication types must include the biometric authentication. | **Table 5** Challenge types -| Name | Value | Description | -| ------------------------------- | ---- | ------------------------------ | -| HUKS_CHALLENGE_TYPE_NORMAL | 0 | Normal challenge, which requires an independent user authentication for each use of the key.| -| HUKS_CHALLENGE_TYPE_CUSTOM | 1 | Custom challenge, which supports only one user authentication for multiple keys.| -| HUKS_CHALLENGE_TYPE_NONE | 2 | No challenge is required during user authentication.| + +| Name | Value | Description | +| -------------------------- | ----- | ------------------------------------------------------------ | +| HUKS_CHALLENGE_TYPE_NORMAL | 0 | Normal challenge, which requires an independent user authentication for each use of the key. | +| HUKS_CHALLENGE_TYPE_CUSTOM | 1 | Custom challenge, which supports only one user authentication for multiple keys. | +| HUKS_CHALLENGE_TYPE_NONE | 2 | No challenge is required during user authentication. | > **NOTICE** > > - The three challenge types are mutually exclusive. > - If the challenge type is **HUKS_CHALLENGE_TYPE_NONE**, no challenge is required. However, the key can be accessed within a specified time period (set by **HUKS_TAG_AUTH_TIMEOUT**) after a successful authentication. The maximum value of **HUKS_TAG_AUTH_TIMEOUT** is 60 seconds. - -To use a key, initialize the key session, and determine whether a challenge is required based on the challenge type specified when the key is generated or imported. - +To use a key, initialize the key session, and determine whether a challenge is required based on the challenge type specified when the key is generated or imported. **Table 6** APIs for using a key @@ -1702,390 +1719,836 @@ To use a key, initialize the key session, and determine whether a challenge is r | -------------------------------------- | ----------------------------| |initSession(keyAlias: string, options: HuksOptions, callback: AsyncCallback\) : void| Initializes the key session and obtains the challenge.| |updateSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback\) : void| Operates data by segment and passes the authentication token.| -|finishSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback\) : void| Finalizes the key session operation. | +|finishSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback\) : void| Completes the key session operation.| + +**How to Develop** + +1. Generate a key and specify user authentication properties. + + ```ts + import huks from '@ohos.security.huks'; + + /* + * Set the key alias and encapsulate the key properties. + */ + let keyAlias = 'dh_key_fingerprint_access'; + let properties = new Array(); + properties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_SM4, + } + properties[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT | huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT, + } + properties[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, + } + properties[3] = { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC, + } + properties[4] = { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_NONE, + } + // Enable fingerprint authentication. + properties[5] = { + tag: huks.HuksTag.HUKS_TAG_USER_AUTH_TYPE, + value: huks.HuksUserAuthType.HUKS_USER_AUTH_TYPE_FINGERPRINT + } + // Set the key expiration type. Invalidate the key when a new biometric feature (fingerprint) is enrolled. + properties[6] = { + tag: huks.HuksTag.HUKS_TAG_KEY_AUTH_ACCESS_TYPE, + value: huks.HuksAuthAccessType.HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL + } + // Use the default challenge type. + properties[7] = { + tag: huks.HuksTag.HUKS_TAG_CHALLENGE_TYPE, + value: huks.HuksChallengeType.HUKS_CHALLENGE_TYPE_NORMAL + } + let huksOptions = { + properties: properties, + inData: new Uint8Array(new Array()) + } + /* + * Generate a key. + */ + function generateKeyItem(keyAlias:string, huksOptions:huks.HuksOptions, throwObject) { + return new Promise((resolve, reject) => { + try { + huks.generateKeyItem(keyAlias, huksOptions, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } + async function publicGenKeyFunc(keyAlias:string, huksOptions:huks.HuksOptions) { + console.info(`enter callback generateKeyItem`); + let throwObject = {isThrow: false}; + try { + await generateKeyItem(keyAlias, huksOptions, throwObject) + .then((data) => { + console.info(`callback: generateKeyItem success, data = ${JSON.stringify(data)}`); + }) + .catch(error => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: generateKeyItem failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: generateKeyItem input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } + + async function TestGenKeyForFingerprintAccessControl() { + await publicGenKeyFunc(keyAlias, huksOptions); + } + ``` + +2. Initialize the key session to obtain a challenge, and initiate fingerprint authentication to obtain an authentication token. + + ```ts + import huks from '@ohos.security.huks'; + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + /* + * Set the key alias and encapsulate the key properties. + */ + let srcKeyAlias = 'sm4_key_fingerprint_access'; + let handle; + let challenge; + let fingerAuthToken; + let authType = userIAM_userAuth.UserAuthType.FINGERPRINT; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + + /* Configure the key generation parameter set and key encryption parameter set. */ + let properties = new Array(); + properties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_SM4, + } + properties[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT | huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT, + } + properties[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, + } + properties[3] = { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC, + } + properties[4] = { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_NONE, + } + let huksOptions = { + properties: properties, + inData: new Uint8Array(new Array()) + } + + function initSession(keyAlias:string, huksOptions:huks.HuksOptions, throwObject) : Promise { + return new Promise((resolve, reject) => { + try { + huks.initSession(keyAlias, huksOptions, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } + + async function publicInitFunc(keyAlias:string, huksOptions:huks.HuksOptions) { + console.info(`enter callback doInit`); + let throwObject = {isThrow: false}; + try { + await initSession(keyAlias, huksOptions, throwObject) + .then ((data) => { + console.info(`callback: doInit success, data = ${JSON.stringify(data)}`); + handle = data.handle; + challenge = data.challenge; + }) + .catch((error) => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: doInit failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: doInit input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } + + function userIAMAuthFinger(huksChallenge:Uint8Array) { + // Obtain an authentication object. + let auth; + try { + auth = userIAM_userAuth.getAuthInstance(huksChallenge, authType, authTrustLevel); + console.log("get auth instance success"); + } catch (error) { + console.log("get auth instance failed" + error); + } + + // Subscribe to the authentication result. + try { + auth.on("result", { + callback: (result: userIAM_userAuth.AuthResultInfo) => { + /* The authentication is successful, and the authentication token is obtained. */ + fingerAuthToken = result.token; + } + }); + console.log("subscribe authentication event success"); + } catch (error) { + console.log("subscribe authentication event failed " + error); + } + + // Start user authentication. + try { + auth.start(); + console.info("authV9 start auth success"); + } catch (error) { + console.info("authV9 start auth failed, error = " + error); + } + } + + async function testInitAndAuthFinger() { + /* Initialize the key session to obtain a challenge. */ + await publicInitFunc(srcKeyAlias, huksOptions); + /* Invoke userIAM to perform user identity authentication. */ + userIAMAuthFinger(challenge); + } + ``` + +3. Pass in the authentication token to perform data operations. + + ```ts + /* + *The following uses an SM4 128-bit key and callback-based APIs as an example. + */ + import huks from '@ohos.security.huks'; + + /* + *Set the key alias and encapsulate the key properties. + */ + let srcKeyAlias = 'sm4_key_fingerprint_access'; + let IV = '1234567890123456'; + let cipherInData = 'Hks_SM4_Cipher_Test_101010101010101010110_string'; + let handle; + let fingerAuthToken; + let updateResult = new Array(); + let finishOutData; + + /* Configure the key generation parameter set and key encryption parameter set. */ + let propertiesEncrypt = new Array(); + propertiesEncrypt[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_SM4, + } + propertiesEncrypt[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT, + } + propertiesEncrypt[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, + } + propertiesEncrypt[3] = { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_NONE, + } + propertiesEncrypt[4] = { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC, + } + propertiesEncrypt[5] = { + tag: huks.HuksTag.HUKS_TAG_IV, + value: StringToUint8Array(IV), + } + let encryptOptions = { + properties: propertiesEncrypt, + inData: new Uint8Array(new Array()) + } + + function StringToUint8Array(str) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + return new Uint8Array(arr); + } + + function updateSession(handle:number, huksOptions:huks.HuksOptions, token:Uint8Array, throwObject) : Promise { + return new Promise((resolve, reject) => { + try { + huks.updateSession(handle, huksOptions, token, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } + + async function publicUpdateFunc(handle:number, token:Uint8Array, huksOptions:huks.HuksOptions) { + console.info(`enter callback doUpdate`); + let throwObject = {isThrow: false}; + try { + await updateSession(handle, huksOptions, token, throwObject) + .then ((data) => { + console.info(`callback: doUpdate success, data = ${JSON.stringify(data)}`); + }) + .catch(error => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: doUpdate failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: doUpdate input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } + + function finishSession(handle:number, huksOptions:huks.HuksOptions, token:Uint8Array, throwObject) : Promise { + return new Promise((resolve, reject) => { + try { + huks.finishSession(handle, huksOptions, token, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } + + async function publicFinishFunc(handle:number, token:Uint8Array, huksOptions:huks.HuksOptions) { + console.info(`enter callback doFinish`); + let throwObject = {isThrow: false}; + try { + await finishSession(handle, huksOptions, token, throwObject) + .then ((data) => { + finishOutData = data.outData; + console.info(`callback: doFinish success, data = ${JSON.stringify(data)}`); + }) + .catch(error => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: doFinish failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: doFinish input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } + + async function testSm4Cipher() { + encryptOptions.inData = StringToUint8Array(cipherInData); + /* Pass in the authentication token. */ + await publicUpdateFunc(handle, fingerAuthToken, encryptOptions); + encryptUpdateResult = updateResult; + + encryptOptions.inData = new Uint8Array(new Array()); + /* Pass in the authentication token. */ + await publicFinishFunc(handle, fingerAuthToken, encryptOptions); + if (finishOutData === cipherInData) { + console.info('test finish encrypt err '); + } else { + console.info('test finish encrypt success'); + } + } + ``` + + +### Fine-grained User Identity Authentication + +As an extension of the [Key Access Control](#key-access-control), the fine-grained access control allows secondary user identity authentication (biometric authentication and lock screen password) to be performed for key access in one or more scenarios, such as encryption, decryption, signing, signature verification, key agreement, and key derivation. For example, a service needs to use a HUKS key to encrypt the account password information. In this scenario, identity authentication is not required in encryption but required in decryption. To achieve this purpose, you can use the fine-grained user identity authentication feature provided by the HUKS. **How to Develop** -1. Generate a key and specify user authentication properties. -```ts -import huks from '@ohos.security.huks'; +1. Specify [**HUKS_TAG_KEY_AUTH_PURPOSE**](../reference/apis/js-apis-huks.md#hukstag) for key generation to allow user identity authentication to be performed when a specific algorithm is used. +2. The **HUKS_TAG_KEY_AUTH_PURPOSE** does not need to be specified for the key usage process. The development process is the same as that of the user identity authentication process. -/* - * Determine the key alias and encapsulate the key properties. - */ -let keyAlias = 'dh_key_fingerprint_access'; -let properties = new Array(); -properties[0] = { - tag: huks.HuksTag.HUKS_TAG_ALGORITHM, - value: huks.HuksKeyAlg.HUKS_ALG_SM4, -} -properties[1] = { - tag: huks.HuksTag.HUKS_TAG_PURPOSE, - value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT | huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT, -} -properties[2] = { - tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, - value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, -} -properties[3] = { - tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, - value: huks.HuksCipherMode.HUKS_MODE_CBC, -} -properties[4] = { - tag: huks.HuksTag.HUKS_TAG_PADDING, - value: huks.HuksKeyPadding.HUKS_PADDING_NONE, -} -// Enable fingerprint authentication. -properties[5] = { - tag: huks.HuksTag.HUKS_TAG_USER_AUTH_TYPE, - value: huks.HuksUserAuthType.HUKS_USER_AUTH_TYPE_FINGERPRINT -} -// Set the key expiration type. Invalidate the key when a new biometric feature (fingerprint) is enrolled. -properties[6] = { - tag: huks.HuksTag.HUKS_TAG_KEY_AUTH_ACCESS_TYPE, - value: huks.HuksAuthAccessType.HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL -} -// Use the default challenge type. -properties[7] = { - tag: huks.HuksTag.HUKS_TAG_CHALLENGE_TYPE, - value: huks.HuksChallengeType.HUKS_CHALLENGE_TYPE_NORMAL -} -let huksOptions = { - properties: properties, - inData: new Uint8Array(new Array()) -} +**Available APIs** -/* - * Generate a key. - */ -function generateKeyItem(keyAlias:string, huksOptions:huks.HuksOptions, throwObject) { - return new Promise((resolve, reject) => { - try { - huks.generateKeyItem(keyAlias, huksOptions, function (error, data) { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - } catch (error) { - throwObject.isThrow = true; - throw(error); - } - }); -} +You can use the [**HUKS_TAG_KEY_AUTH_PURPOSE**](../reference/apis/js-apis-huks.md#hukstag) tag to specify the scenario, for which the fine-grained user identity authentication is performed. The value range of this tag is [HuksKeyAlg](../reference/apis/js-apis-huks.md#hukskeyalg). -async function publicGenKeyFunc(keyAlias:string, huksOptions:huks.HuksOptions) { - console.info(`enter callback generateKeyItem`); - let throwObject = {isThrow: false}; - try { - await generateKeyItem(keyAlias, huksOptions, throwObject) - .then((data) => { - console.info(`callback: generateKeyItem success, data = ${JSON.stringify(data)}`); - }) - .catch(error => { - if (throwObject.isThrow) { - throw(error); - } else { - console.error(`callback: generateKeyItem failed, code: ${error.code}, msg: ${error.message}`); - } - }); - } catch (error) { - console.error(`callback: generateKeyItem input arg invalid, code: ${error.code}, msg: ${error.message}`); - } -} +**Table 7** HUKS_TAG_KEY_AUTH_PURPOSE +| Name | Description | +| -------------------------------------- | ----------------------------| +|HUKS_TAG_KEY_AUTH_PURPOSE| Purpose of the user identity authentication, that is, perform the user identity authentication when a specific algorithm is used.| -async function TestGenKeyForFingerprintAccessControl() { - await publicGenKeyFunc(keyAlias, huksOptions); -} -``` +> **NOTE** +> +> - If [**HuksUserAuthType**](../reference/apis/js-apis-huks.md#huksuserauthtype9) is not specified, no user identity authentication is performed by default. In this case, the setting of **HUKS_TAG_KEY_AUTH_PURPOSE** is invalid by default. If **HuksUserAuthType** is specified and **HUKS_TAG_KEY_AUTH_PURPOSE** is not specified, user identity authentication will still be performed by default before the key is used with the algorithm that is specified in the key generation process. +> - If the AES or SM4 symmetric algorithm is used for encryption and decryption, only the CBC mode supports fine-grained user identity authentication. +**How to Develop** -2. Initialize the key session to obtain a challenge, and initiate fingerprint authentication to obtain an authentication token. -```ts -import huks from '@ohos.security.huks'; -import userIAM_userAuth from '@ohos.userIAM.userAuth'; +Scenario: When generating keys for encryption and decryption, enable user identity authentication only for decryption. Enable user identity authentication for decryption but not for encryption. -/* - * Determine the key alias and encapsulate the key properties. - */ -let srcKeyAlias = 'sm4_key_fingerprint_access'; -let handle; -let challenge; -let fingerAuthToken; -let authType = userIAM_userAuth.UserAuthType.FINGERPRINT; -let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; +1. Generate a key, set fingerprint authentication for key access control and related properties, and set **HUKS_TAG_KEY_AUTH_PURPOSE**. -/* Configure the key generation parameter set and key encryption parameter set. */ -let properties = new Array(); -properties[0] = { - tag: huks.HuksTag.HUKS_TAG_ALGORITHM, - value: huks.HuksKeyAlg.HUKS_ALG_SM4, -} -properties[1] = { - tag: huks.HuksTag.HUKS_TAG_PURPOSE, - value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT | huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT, -} -properties[2] = { - tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, - value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, -} -properties[3] = { - tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, - value: huks.HuksCipherMode.HUKS_MODE_CBC, -} -properties[4] = { - tag: huks.HuksTag.HUKS_TAG_PADDING, - value: huks.HuksKeyPadding.HUKS_PADDING_NONE, -} -let huksOptions = { - properties: properties, - inData: new Uint8Array(new Array()) -} + ```ts + import huks from '@ohos.security.huks'; -function initSession(keyAlias:string, huksOptions:huks.HuksOptions, throwObject) : Promise { - return new Promise((resolve, reject) => { - try { - huks.initSession(keyAlias, huksOptions, function (error, data) { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - } catch (error) { - throwObject.isThrow = true; - throw(error); - } - }); -} + /* + * Set the key alias and encapsulate the key properties. + */ + let keyAlias = 'dh_key_fingerprint_access'; + let properties = new Array(); + properties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_SM4, + } + properties[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT | huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT, + } + properties[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, + } + properties[3] = { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC, + } + properties[4] = { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_NONE, + } + // Enable fingerprint authentication. + properties[5] = { + tag: huks.HuksTag.HUKS_TAG_USER_AUTH_TYPE, + value: huks.HuksUserAuthType.HUKS_USER_AUTH_TYPE_FINGERPRINT + } + // Set the key expiration type. Invalidate the key when a new biometric feature (fingerprint) is enrolled. + properties[6] = { + tag: huks.HuksTag.HUKS_TAG_KEY_AUTH_ACCESS_TYPE, + value: huks.HuksAuthAccessType.HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL + } + // Use the default challenge type. + properties[7] = { + tag: huks.HuksTag.HUKS_TAG_CHALLENGE_TYPE, + value: huks.HuksChallengeType.HUKS_CHALLENGE_TYPE_NORMAL + } + // Perform user identity authentication when the key is used for decryption. + properties[8] = { + tag: huks.HuksTag.HUKS_TAG_KEY_AUTH_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT + } + let huksOptions = { + properties: properties, + inData: new Uint8Array(new Array()) + } -async function publicInitFunc(keyAlias:string, huksOptions:huks.HuksOptions) { - console.info(`enter callback doInit`); - let throwObject = {isThrow: false}; - try { - await initSession(keyAlias, huksOptions, throwObject) - .then ((data) => { - console.info(`callback: doInit success, data = ${JSON.stringify(data)}`); - handle = data.handle; - challenge = data.challenge; - }) - .catch((error) => { - if (throwObject.isThrow) { - throw(error); - } else { - console.error(`callback: doInit failed, code: ${error.code}, msg: ${error.message}`); - } - }); - } catch (error) { - console.error(`callback: doInit input arg invalid, code: ${error.code}, msg: ${error.message}`); - } -} + /* + * Generate a key. + */ + async function generateKeyItem(keyAlias:string, huksOptions:huks.HuksOptions, throwObject) { + return new Promise((resolve, reject) => { + try { + huks.generateKeyItem(keyAlias, huksOptions, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } -function userIAMAuthFinger(huksChallenge:Uint8Array) { - // Obtain an authentication object. - let auth; - try { - auth = userIAM_userAuth.getAuthInstance(huksChallenge, authType, authTrustLevel); - console.log("get auth instance success"); - } catch (error) { - console.log("get auth instance failed" + error); - } + async function publicGenKeyFunc(keyAlias:string, huksOptions:huks.HuksOptions) { + console.info(`enter callback generateKeyItem`); + let throwObject = {isThrow: false}; + try { + await generateKeyItem(keyAlias, huksOptions, throwObject) + .then((data) => { + console.info(`callback: generateKeyItem success, data = ${JSON.stringify(data)}`); + }) + .catch(error => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: generateKeyItem failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: generateKeyItem input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } - // Subscribe to the authentication result. - try { - auth.on("result", { - callback: (result: userIAM_userAuth.AuthResultInfo) => { - /* The authentication is successful, and the authentication token is obtained. */ - fingerAuthToken = result.token; - } - }); - console.log("subscribe authentication event success"); - } catch (error) { - console.log("subscribe authentication event failed " + error); - } + async function TestGenKeyForFingerprintAccessControl() { + await publicGenKeyFunc(keyAlias, huksOptions); + } + ``` + +2. Disable user identity authentication when the key is used for encryption. + + ```ts + import huks from '@ohos.security.huks'; + + /* + * Set the key alias and encapsulate the key properties. + */ + let srcKeyAlias = 'sm4_key_fingerprint_access'; + let cipherInData = 'Hks_SM4_Cipher_Test_101010101010101010110_string'; // Plaintext + let IV = '1234567890123456'; + let handle; + let cipherText; // Ciphertext after encryption. + + function StringToUint8Array(str) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + return new Uint8Array(arr); + } - // Start user authentication. - try { - auth.start(); - console.info("authV9 start auth success"); - } catch (error) { - console.info("authV9 start auth failed, error = " + error); - } -} + /* Configure the key generation parameter set and key encryption parameter set. */ + let propertiesEncrypt = new Array(); + propertiesEncrypt[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_SM4, + } + propertiesEncrypt[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT, + } + propertiesEncrypt[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, + } + propertiesEncrypt[3] = { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_NONE, + } + propertiesEncrypt[4] = { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC, + } + propertiesEncrypt[5] = { + tag: huks.HuksTag.HUKS_TAG_IV, + value: StringToUint8Array(IV), + } + let encryptOptions = { + properties: propertiesEncrypt, + inData: new Uint8Array(new Array()) + } -async function testInitAndAuthFinger() { - /* Initialize the key session to obtain a challenge. */ - await publicInitFunc(srcKeyAlias, huksOptions); - /* Invoke userIAM to perform user identity authentication. */ - userIAMAuthFinger(challenge); -} -``` + function initSession(keyAlias:string, huksOptions:huks.HuksOptions, throwObject) : Promise { + return new Promise((resolve, reject) => { + try { + huks.initSession(keyAlias, huksOptions, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } -3. Pass in the authentication token to perform data operations. -```ts -/* - * The following uses an SM4 128-bit key and callback-based APIs as an example. - */ -import huks from '@ohos.security.huks'; + async function publicInitFunc(keyAlias:string, huksOptions:huks.HuksOptions) { + console.info(`enter callback doInit`); + let throwObject = {isThrow: false}; + try { + await initSession(keyAlias, huksOptions, throwObject) + .then ((data) => { + console.info(`callback: doInit success, data = ${JSON.stringify(data)}`); + handle = data.handle; + }) + .catch((error) => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: doInit failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: doInit input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } -/* - * Determine the key alias and encapsulate the key properties. - */ -let srcKeyAlias = 'sm4_key_fingerprint_access'; -let IV = '1234567890123456'; -let cipherInData = 'Hks_SM4_Cipher_Test_101010101010101010110_string'; -let handle; -let fingerAuthToken; -let updateResult = new Array(); -let finishOutData; + function finishSession(handle:number, huksOptions:huks.HuksOptions, throwObject) : Promise { + return new Promise((resolve, reject) => { + try { + huks.finishSession(handle, huksOptions, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } -/* Configure the key generation parameter set and key encryption parameter set. */ -let propertiesEncrypt = new Array(); -propertiesEncrypt[0] = { - tag: huks.HuksTag.HUKS_TAG_ALGORITHM, - value: huks.HuksKeyAlg.HUKS_ALG_SM4, -} -propertiesEncrypt[1] = { - tag: huks.HuksTag.HUKS_TAG_PURPOSE, - value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT, -} -propertiesEncrypt[2] = { - tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, - value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, -} -propertiesEncrypt[3] = { - tag: huks.HuksTag.HUKS_TAG_PADDING, - value: huks.HuksKeyPadding.HUKS_PADDING_NONE, -} -propertiesEncrypt[4] = { - tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, - value: huks.HuksCipherMode.HUKS_MODE_CBC, -} -propertiesEncrypt[5] = { - tag: huks.HuksTag.HUKS_TAG_IV, - value: StringToUint8Array(IV), -} -let encryptOptions = { - properties: propertiesEncrypt, - inData: new Uint8Array(new Array()) -} + async function publicFinishFunc(handle:number, huksOptions:huks.HuksOptions) { + console.info(`enter callback doFinish`); + let throwObject = {isThrow: false}; + try { + await finishSession(handle, huksOptions, throwObject) + .then ((data) => { + cipherText = data.outData; + console.info(`callback: doFinish success, data = ${JSON.stringify(data)}`); + }) + .catch(error => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: doFinish failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: doFinish input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } -function StringToUint8Array(str) { - let arr = []; - for (let i = 0, j = str.length; i < j; ++i) { - arr.push(str.charCodeAt(i)); - } - return new Uint8Array(arr); -} + async function testSm4Cipher() { + /* Initialize the key session to obtain a challenge. */ + await publicInitFunc(srcKeyAlias, encryptOptions); -function updateSession(handle:number, huksOptions:huks.HuksOptions, token:Uint8Array, throwObject) : Promise { - return new Promise((resolve, reject) => { - try { - huks.updateSession(handle, huksOptions, token, function (error, data) { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - } catch (error) { - throwObject.isThrow = true; - throw(error); - } - }); -} + /** Encryption */ + encryptOptions.inData = StringToUint8Array(cipherInData); + await publicFinishFunc(handle, encryptOptions); + } + ``` + +3. Enable user identity authentication when the key is used for decryption. + + ```ts + import huks from '@ohos.security.huks'; + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + /* + * Set the key alias and encapsulate the key properties. + */ + let srcKeyAlias = 'sm4_key_fingerprint_access'; + let cipherText = 'r56ywtTJUQC6JFJ2VV2kZw=='; // Ciphertext obtained, which may vary in actual situation. + let IV = '1234567890123456'; + let handle; + let finishOutData; // Plaintext after decryption. + let fingerAuthToken; + let authType = userIAM_userAuth.UserAuthType.FINGERPRINT; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + + function StringToUint8Array(str) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + return new Uint8Array(arr); + } -async function publicUpdateFunc(handle:number, token:Uint8Array, huksOptions:huks.HuksOptions) { - console.info(`enter callback doUpdate`); - let throwObject = {isThrow: false}; - try { - await updateSession(handle, huksOptions, token, throwObject) - .then ((data) => { - console.info(`callback: doUpdate success, data = ${JSON.stringify(data)}`); - }) - .catch(error => { - if (throwObject.isThrow) { - throw(error); - } else { - console.error(`callback: doUpdate failed, code: ${error.code}, msg: ${error.message}`); - } - }); - } catch (error) { - console.error(`callback: doUpdate input arg invalid, code: ${error.code}, msg: ${error.message}`); - } -} + /* Configure the key generation parameter set and key encryption parameter set. */ + let propertiesDecrypt = new Array(); + propertiesDecrypt[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_SM4, + } + propertiesDecrypt[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT, + } + propertiesDecrypt[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_SM4_KEY_SIZE_128, + } + propertiesDecrypt[3] = { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_NONE, + } + propertiesDecrypt[4] = { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC, + } + propertiesDecrypt[5] = { + tag: huks.HuksTag.HUKS_TAG_IV, + value: StringToUint8Array(IV), + } + let decryptOptions = { + properties: propertiesDecrypt, + inData: new Uint8Array(new Array()) + } -function finishSession(handle:number, huksOptions:huks.HuksOptions, token:Uint8Array, throwObject) : Promise { - return new Promise((resolve, reject) => { - try { - huks.finishSession(handle, huksOptions, token, function (error, data) { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - } catch (error) { - throwObject.isThrow = true; - throw(error); - } - }); -} + function initSession(keyAlias:string, huksOptions:huks.HuksOptions, throwObject) : Promise { + return new Promise((resolve, reject) => { + try { + huks.initSession(keyAlias, huksOptions, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } -async function publicFinishFunc(handle:number, token:Uint8Array, huksOptions:huks.HuksOptions) { - console.info(`enter callback doFinish`); - let throwObject = {isThrow: false}; - try { - await finishSession(handle, huksOptions, token, throwObject) - .then ((data) => { - finishOutData = data.outData; - console.info(`callback: doFinish success, data = ${JSON.stringify(data)}`); - }) - .catch(error => { - if (throwObject.isThrow) { - throw(error); - } else { - console.error(`callback: doFinish failed, code: ${error.code}, msg: ${error.message}`); - } - }); - } catch (error) { - console.error(`callback: doFinish input arg invalid, code: ${error.code}, msg: ${error.message}`); - } -} + async function publicInitFunc(keyAlias:string, huksOptions:huks.HuksOptions) { + console.info(`enter callback doInit`); + let throwObject = {isThrow: false}; + try { + await initSession(keyAlias, huksOptions, throwObject) + .then ((data) => { + console.info(`callback: doInit success, data = ${JSON.stringify(data)}`); + handle = data.handle; + challenge = data.challenge; + }) + .catch((error) => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: doInit failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: doInit input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } -async function testSm4Cipher() { - encryptOptions.inData = StringToUint8Array(cipherInData); - /* Pass in the authentication token. */ - await publicUpdateFunc(handle, fingerAuthToken, encryptOptions); - encryptUpdateResult = updateResult; + function userIAMAuthFinger(huksChallenge:Uint8Array) { + // Obtain an authentication object. + let auth; + try { + auth = userIAM_userAuth.getAuthInstance(huksChallenge, authType, authTrustLevel); + console.log("get auth instance success"); + } catch (error) { + console.log("get auth instance failed" + error); + } + + // Subscribe to the authentication result. + try { + auth.on("result", { + callback: (result: userIAM_userAuth.AuthResultInfo) => { + /* The authentication is successful, and the authentication token is obtained. */ + fingerAuthToken = result.token; + } + }); + console.log("subscribe authentication event success"); + } catch (error) { + console.log("subscribe authentication event failed " + error); + } + + // Start user authentication. + try { + auth.start(); + console.info("authV9 start auth success"); + } catch (error) { + console.info("authV9 start auth failed, error = " + error); + } + } - encryptOptions.inData = new Uint8Array(new Array()); - /* Pass in the authentication token. */ - await publicFinishFunc(handle, fingerAuthToken, encryptOptions); - if (finishOutData === cipherInData) { - console.info('test finish encrypt err '); - } else { - console.info('test finish encrypt success'); - } -} -``` + function finishSession(handle:number, huksOptions:huks.HuksOptions, token:Uint8Array, throwObject) : Promise { + return new Promise((resolve, reject) => { + try { + huks.finishSession(handle, huksOptions, token, function (error, data) { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } catch (error) { + throwObject.isThrow = true; + throw(error); + } + }); + } + + async function publicFinishFunc(handle:number, token:Uint8Array, huksOptions:huks.HuksOptions) { + console.info(`enter callback doFinish`); + let throwObject = {isThrow: false}; + try { + await finishSession(handle, huksOptions, token, throwObject) + .then ((data) => { + finishOutData = data.outData; + console.info(`callback: doFinish success, data = ${JSON.stringify(data)}`); + }) + .catch(error => { + if (throwObject.isThrow) { + throw(error); + } else { + console.error(`callback: doFinish failed, code: ${error.code}, msg: ${error.message}`); + } + }); + } catch (error) { + console.error(`callback: doFinish input arg invalid, code: ${error.code}, msg: ${error.message}`); + } + } + + async function testSm4Cipher() { + /* Initialize the key session to obtain a challenge. */ + await publicInitFunc(srcKeyAlias, decryptOptions); + + /* Invoke userIAM to perform user identity authentication. */ + userIAMAuthFinger(challenge); + + /* Perform decryption after the authentication is successful. The **authToken** value obtained by Auth needs to be passed in. */ + decryptOptions.inData = StringToUint8Array(cipherText); + await publicFinishFunc(handle, fingerAuthToken, decryptOptions); + } + ``` ## Key Attestation The HUKS provides attestation for the public keys of asymmetric key pairs. The HUKS can issue a certificate for the public key of an asymmetric key pair stored in the HUKS using the public key infrastructure (PKI) certificate chain technology. The certificate can prove the validity of the public key. The service can use the root CA certificate provided by the OpenHarmony to verify the key certificate issued by the HUKS level by level to ensure that the public key and private key in the certificate are from a trusted hardware device and stored in the HUKS. **How to Develop** + 1. Pass in the key alias and the property tag of the key to be attested. 2. Call a HUKS API to generate an X.509 certificate chain, which consists of the root CA certificate, device CA certificate, device certificate, and key certificate in sequence, for the application. 3. Send the certificate chain to a trusted server. The server parses and verifies the validity of the certificate chain and whether a single certificate is revoked. **Available APIs** -**Table 7** API for key attestation - +**Table 8** API for key attestation | API | Description | | -------------------------------------- | ----------------------------| |attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\) : void| Attests a key.| @@ -2099,7 +2562,7 @@ The HUKS provides attestation for the public keys of asymmetric key pairs. The H import huks from '@ohos.security.huks'; /* - * Determine the key alias and encapsulate the key properties. + * Set the key alias and encapsulate the key properties. */ let keyAliasString = "key attest"; let aliasString = keyAliasString; @@ -2268,4 +2731,4 @@ async function AttestKeyTest() { ### Property 'finishSession' does not exist on type 'typeof huks'. Did you mean 'finish'? -**finishSession()** is supported from API version 9. Update the SDK version or use the latest **security.huks.d.ts** file. \ No newline at end of file + **finishSession()** is supported from API version 9. Update the SDK version or use the latest **security.huks.d.ts** file. diff --git a/en/application-dev/ui/arkts-common-components-button.md b/en/application-dev/ui/arkts-common-components-button.md index 82c893d33aa0049e5b2e815ae6a31b7d13a1775a..8abc45a87a9cc0ed6d0b40eaf907c2afb5692299 100644 --- a/en/application-dev/ui/arkts-common-components-button.md +++ b/en/application-dev/ui/arkts-common-components-button.md @@ -258,4 +258,4 @@ Button('Ok', { type: ButtonType.Normal, stateEffect: true }) } ``` - ![GIF](figures/GIF.gif) + ![floating_button](figures/floating_button.gif) diff --git a/en/application-dev/ui/arkts-navigation-tabs.md b/en/application-dev/ui/arkts-navigation-tabs.md index f16a5e5df1868c9500ea571deb09e74396f8f77c..28b4c68b55c447c7de9870772ff652c82d837e98 100644 --- a/en/application-dev/ui/arkts-navigation-tabs.md +++ b/en/application-dev/ui/arkts-navigation-tabs.md @@ -333,7 +333,7 @@ For non-custom navigation bars, tabs and tab content are linked by default. For **Figure 11** Lack of linkage between tabs and tab content -![lack-of-linkage](figures /lack-of-linkage.gif) +![lack-of-linkage](figures/lack-of-linkage.gif) To manually switch between the tabs, use the **onChange** API provided by the **\** component to listen for the index change and pass the index of the active tab to **currentIndex**. diff --git a/en/application-dev/ui/arkui-overview.md b/en/application-dev/ui/arkui-overview.md index 4ce38f8259fa449e522a94f7b578e76ceb4fb30f..d89564480f73b4b640d44d7b5d212a8e9f56f85e 100644 --- a/en/application-dev/ui/arkui-overview.md +++ b/en/application-dev/ui/arkui-overview.md @@ -1,58 +1,46 @@ # ArkUI Overview -ArkUI is a UI development framework for building OpenHarmony applications. It provides effortlessly natural UI syntax and UI development infrastructure including UI components, animation mechanisms, and event interaction, to meet the visualized GUI development requirements of application developers. -## Basic Concepts +ArkUI provides a comprehensive infrastructure for UI development of OpenHarmony applications, including simple UI syntax, a diverse array of UI features (components, layouts, animations, and interaction events), and a powerful previewer. -- **Component**: the smallest unit for UI building and display. You build a UI that meets your needs through flexible combinations of components. -- **Page**: the smallest unit for ArkUI application scheduling. You can design multiple pages for your application, manage their files on a per-page basis, and schedule page redirection through [page routing](../reference/apis/js-apis-router.md) APIs, so as to implement decoupling of application functions. +## Basic Concepts -## Key Features +- **UI**: user interface. You can design multiple pages for your application, manage their files on a per-page basis, and schedule page redirection through [routing](arkts-routing.md) APIs, so as to implement decoupling of application functions. -- **UI components**: ArkUI comes with a diverse array of built-in polymorphic components, including basic components (such as text, image, and button), container components with one or more child components, drawing components allowing for customization, and media components that provide video playback capabilities. By being polymorphic, a component provides variant forms to adapt to different types of devices and platforms. +- **Component**: the smallest unit for UI building and display, for example, a list, grid, button, radio button, progress indicator, and text. You build a UI that meets your needs through flexible combinations of components. -- **Flexible layouts**: Creating a responsive UI in ArkUI is easy, with the carefully-designed layout approaches: Besides the basic linear and flexible layouts, you also have access to the advanced list, grid, and column grid layouts as well as the atomic layouts that auto-adapt to screen resolutions. -- **Animation**: Apart from animations embedded in components, ArkUI offers additional animation features: attribute animation, transition animation, and custom animation. +## Two Development Paradigms -- **Drawing**: ArkUI offers advanced drawing capabilities that allow you to draw custom shapes with a range of editors, from images to fill colors and texts. +ArkUI comes with two development paradigms: [ArkTS-based declarative development paradigm](arkts-ui-development-overview.md) (declarative development paradigm for short) and [JS-compatible web-like development paradigm](../ui/ui-js-overview.md) (web-like development paradigm for short). You can choose whichever development paradigm that aligns with your practice. -- **Interaction**: ArkUI allows users to interact with your application UI properly, regardless of the system platform and input device. By default, the UI accepts input from touch gestures, remote controls, keyboards, and mouse devices, with support for event callbacks where you can define interaction logic of your own. +- **Declarative development paradigm**: uses [ArkTS](../quick-start/arkts-get-started.md) – a superset of TypeScript with declarative UI syntax, providing UI drawing capabilities from three dimensions: component, animation, and state management. -- **Platform API channel**: ArkUI provides an API extension mechanism through which platform capabilities are encapsulated to produce JavaScript (JS) APIs in a unified style. +- **Web-like development paradigm**: uses the classical three-stage programming model, in which OpenHarmony Markup Language (HML) is used for building layouts, CSS for defining styles, and JS for adding processing logic. This development paradigm has a low learning curve for frontend web developers, allowing them to quickly transform existing web applications into ArkUI applications. -- **Two development paradigms**: ArkUI comes with two development paradigms: [ArkTS-based declarative development paradigm](./ui-ts-overview.md) (declarative development paradigm for short) and [JS-compatible web-like development paradigm](./ui-js-overview.md) (web-like development paradigm for short). You can choose whichever development paradigm that aligns with your practice. +The declarative development paradigm is a better choice for building new application UIs for the following reasons: - | Development Paradigm | Description | Applicable To | Target Audience | - | -------- | ---------------------------------------- | ---------------- | ------------------- | - | Declarative development paradigm | Uses [ArkTS](../quick-start/arkts-get-started.md) – a superset of TypeScript with declarative UI syntax, providing UI drawing capabilities from three dimensions: component, animation, and status management. The programming mode used is closer to natural semantics. You can intuitively describe the UI without caring about how the framework implements UI drawing and rendering, leading to simplified and efficient development.| Applications involving technological sophistication and teamwork| Mobile application and system application developers| - | Web-like development paradigm| Uses the classical three-stage programming model, in which OpenHarmony Markup Language (HML) is used for building layouts, CSS for defining styles, and JS for adding processing logic. UI components are associated with data through one-way data-binding. This means that when data changes, the UI automatically refreshes with the new data. This development paradigm has a low learning curve for frontend web developers, allowing them to quickly transform existing web applications into ArkUI applications.| Small- and medium-sized applications and service widgets with simple UIs | Frontend web developers | +- **Higher development efficiency**: In the declarative development paradigm, the programming mode used is closer to natural semantics. You can intuitively describe the UI without caring about how the framework implements UI drawing and rendering, leading to simplified and efficient development. -## Framework Structure +- **Higher application performance**: As shown below, the two development paradigms share the UI backend engine and language runtime. However, the declarative development paradigm does not require the JS framework for managing the page DOM. As such, it has more streamlined rendering and update links and less memory usage. -![en-us_image_0000001267647869](figures/en-us_image_0000001267647869.png) +- **Future proof**: The declarative development paradigm will continue to develop as the preferred development paradigm in OpenHarmony, providing increasingly more diverse and powerful capabilities. -As shown above, the two development paradigms share the UI backend engine and language runtime. The UI backend engine implements the six basic capabilities of ArkUI. The declarative development paradigm does not require the JS Framework for managing the page DOM. As such, it has more streamlined rendering and update links and less memory usage. This makes the declarative development paradigm a better choice for building application UIs. + **Figure 1** ArkUI framework -## Relationship Between UI and Ability Framework + ![arkui-framework](figures/arkui-framework.png) -OpenHarmony provides two [application models](../application-models/application-model-description.md): FA model and stage model. The table below describes the relationship between these two models and the two development paradigms of ArkUI. - **FA Model** +## Development Paradigm Support by Application Type -| Type | UI Development Paradigm | Description | -| ---- | -------- | ---------------------------------------- | -| Application | Web-like development paradigm| UI development: HML, CSS, and JS
Service entries: files with fixed file names, which are **app.ets** (Page ability), **service.ts** (Service ability), and **data.ts** (Data ability)
Service logic: JS and TS| -| | Declarative development paradigm | UI development: ArkTS
Service entries: files with fixed file names, which are **app.ets** (Page ability), **service.ts** (Service ability), and **data.ts** (Data ability)
Service logic: JS and TS| -| Service widget| Web-like development paradigm| UI development: HML, CSS, and JSON (action)
Service entry: **form.ts**
Service logic: JS and TS| -| | Declarative development paradigm | Not supported | +The support for development paradigms varies according to the OpenHarmony [application model](../application-models/application-model-composition.md) and page form. For details, see the following table. - **Stage Model** + **Table 1** Supported development paradigms -| Type | UI Development Paradigm | Description | -| -------- | -------------- | ------------------------------------------------------------ | -| Application | Web-like development paradigm | Not supported | -| | Declarative development paradigm| UI development: ArkTS
Service entries: derived from **ohos.app.ability.UIAbility**/**ExtensionAbility**
Service logic: TS| -| Service widget| Web-like development paradigm | UI development: HML, CSS, and JSON (action)
Service entries: derived from **FormExtensionAbility**
Service logic: TS| -| | Declarative development paradigm| Not supported | +| Application Model | Page Form | Supported Development Paradigm | +| ----------- | -------- | ------------------------ | +| Stage model (recommended)| Application or service page| Declarative development paradigm (recommended) | +| | Widget | Declarative development paradigm (recommended)
Web-like development paradigm| +| FA model | Application or service page| Declarative development paradigm
Web-like development paradigm | +| | Widget | Web-like development paradigm | diff --git a/en/application-dev/ui/figures/arkui-framework.png b/en/application-dev/ui/figures/arkui-framework.png new file mode 100644 index 0000000000000000000000000000000000000000..f49cdd8727a88945e1b5082d0ae81001bee3a2ce Binary files /dev/null and b/en/application-dev/ui/figures/arkui-framework.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001267647869.png b/en/application-dev/ui/figures/en-us_image_0000001267647869.png deleted file mode 100644 index 91179e770c418c02c3751111b14bbea637b48b1c..0000000000000000000000000000000000000000 Binary files a/en/application-dev/ui/figures/en-us_image_0000001267647869.png and /dev/null differ diff --git a/en/application-dev/ui/figures/GIF.gif b/en/application-dev/ui/figures/floating_button.gif similarity index 100% rename from en/application-dev/ui/figures/GIF.gif rename to en/application-dev/ui/figures/floating_button.gif diff --git a/en/application-dev/ui/figures/lack-of-linkage.gif b/en/application-dev/ui/figures/lack-of-linkage.gif new file mode 100644 index 0000000000000000000000000000000000000000..c0dde5b1ef76e44606de04a979c5e62cf4464438 Binary files /dev/null and b/en/application-dev/ui/figures/lack-of-linkage.gif differ diff --git a/en/application-dev/website.md b/en/application-dev/website.md index 61c9a6794e0102a128d62b06daaf35ac42f353ef..09e9f806d9b4808477b7db7b281ae7d3e1668b36 100644 --- a/en/application-dev/website.md +++ b/en/application-dev/website.md @@ -26,7 +26,7 @@ - [HAR](quick-start/har-package.md) - HSP - [In-Application HSP Development](quick-start/in-app-hsp.md) - - [Inter-Application HSP Development (for System Applications Only)](quick-start/cross-app-hsp.md) + - [Inter-Application HSP Development](quick-start/cross-app-hsp.md) - Quick Fix - [Quick Fix Overview](quick-start/quickfix-principles.md) - [CLI-based Quick Fix Development](quick-start/quickfix-debug.md) @@ -98,7 +98,7 @@ - [AccessibilityExtensionAbility](application-models/accessibilityextensionability.md) - [EnterpriseAdminExtensionAbility](application-models/enterprise-extensionAbility.md) - [InputMethodExtensionAbility](application-models/inputmethodextentionability.md) - - [WindowExtensionAbility](application-models/windowextensionability.md) + - [WindowExtensionAbility (for System Applications Only)](application-models/windowextensionability.md) - Service Widget Development in Stage Model - [Service Widget Overview](application-models/service-widget-overview.md) - Developing an ArkTS Widget @@ -150,7 +150,7 @@ - [Subscribing to Common Events in Static Mode (for System Applications Only)](application-models/common-event-static-subscription.md) - [Unsubscribing from Common Events](application-models/common-event-unsubscription.md) - [Publishing Common Events](application-models/common-event-publish.md) - - [Removing Sticky Common Events](application-models/common-event-remove-sticky.md) + - [Removing Sticky Common Events (for System Applications Only)](application-models/common-event-remove-sticky.md) - [Background Services](application-models/background-services.md) - Thread Model - [Thread Model Overview](application-models/thread-model-stage.md) @@ -434,7 +434,7 @@ - [Developing Audio Call](media/audio-call-development.md) - [Video Playback](media/video-playback.md) - [Video Recording](media/video-recording.md) - - AVSession (for System Applications Only) + - AVSession - [AVSession Overview](media/avsession-overview.md) - Local AVSession - [Local AVSession Overview](media/local-avsession-overview.md) @@ -443,7 +443,7 @@ - Distributed AVSession - [Distributed AVSession Overview](media/distributed-avsession-overview.md) - [Using Distributed AVSession](media/using-distributed-avsession.md) - - Camera (for System Applications Only) + - Camera - [Camera Overview](media/camera-overview.md) - Camera Development - [Camera Development Preparations](media/camera-preparation.md) @@ -542,8 +542,8 @@ - Selecting and Saving User Files (FilePicker) - [Selecting User Files](file-management/select-user-file.md) - [Saving User Files](file-management/save-user-file.md) - - [Developing a FileManager Application (Available Only for System Applications)](file-management/dev-user-file-manager.md) - - [Managing External Storage Devices (Available Only for System Applications)](file-management/manage-external-storage.md) + - [Developing a FileManager Application (for System Applications Only)](file-management/dev-user-file-manager.md) + - [Managing External Storage Devices (for System Applications Only)](file-management/manage-external-storage.md) - Distributed File System - [Distributed File System Overview](file-management/distributed-fs-overview.md) - [Setting the Security Level of a Distributed File](file-management/set-security-label.md) @@ -603,7 +603,6 @@ - [wukong User Guide](application-test/wukong-guidelines.md) - [OpenHarmony IDL Specifications and User Guide](IDL/idl-guidelines.md) - Native APIs - - [Introduction to Native APIs](napi/introduction.md) - [Using Native APIs in Application Projects](napi/napi-guidelines.md) - [Drawing Development](napi/drawing-guidelines.md) - [Raw File Development](napi/rawfile-guidelines.md) @@ -669,12 +668,8 @@ - [Touch Target](reference/arkui-ts/ts-universal-attributes-touch-target.md) - [Polymorphic Style](reference/arkui-ts/ts-universal-attributes-polymorphic-style.md) - [Hit Test Control](reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md) - - [Background Blur](reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md) - [restoreId](reference/arkui-ts/ts-universal-attributes-restoreId.md) - [Foreground Color](reference/arkui-ts/ts-universal-attributes-foreground-color.md) - - [Spherical Effect](reference/arkui-ts/ts-universal-attributes-sphericalEffect.md) - - [Light Up Effect](reference/arkui-ts/ts-universal-attributes-lightUpEffect.md) - - [Pixel Stretch Effect](reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md) - [Text Style](reference/arkui-ts/ts-universal-attributes-text-style.md) - Gesture Processing - [Gesture Binding Methods](reference/arkui-ts/ts-gesture-settings.md) @@ -774,13 +769,12 @@ - [Shape](reference/arkui-ts/ts-drawing-components-shape.md) - Canvas Components - [Canvas](reference/arkui-ts/ts-components-canvas-canvas.md) - - [CanvasRenderingContext2D](reference/arkui-ts/ts-canvasrenderingcontext2d.md) - [CanvasGradient](reference/arkui-ts/ts-components-canvas-canvasgradient.md) + - [CanvasRenderingContext2D](reference/arkui-ts/ts-canvasrenderingcontext2d.md) - [ImageBitmap](reference/arkui-ts/ts-components-canvas-imagebitmap.md) - [ImageData](reference/arkui-ts/ts-components-canvas-imagedata.md) - [OffscreenCanvasRenderingConxt2D](reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md) - [Path2D](reference/arkui-ts/ts-components-canvas-path2d.md) - - [Lottie](reference/arkui-ts/ts-components-canvas-lottie.md) - Animation - [AnimatorProperty](reference/arkui-ts/ts-animatorproperty.md) - [Explicit Animation](reference/arkui-ts/ts-explicit-animation.md) @@ -1123,9 +1117,12 @@ - [NotificationTemplate](reference/apis/js-apis-inner-notification-notificationTemplate.md) - [NotificationUserInput](reference/apis/js-apis-inner-notification-notificationUserInput.md) - Common Events + - [Common Events of the Ability Subsystem](reference/apis/common_event/commonEvent-ability.md) - [Common Events of the Bundle Management Subsystem](reference/apis/common_event/commonEvent-bundleManager.md) - [Common Events of the Notification Service](reference/apis/common_event/commonEvent-ans.md) + - [Common Events of the Resource Scheduler Subsystem](reference/apis/common_event/commonEvent-resourceschedule.md) - [Common Events of the Telephony Subsystem](reference/apis/common_event/commonEvent-telephony.md) + - [Common Events of the USB Subsystem](reference/apis/common_event/commonEvent-usb.md) - Bundle Management - [@ohos.bundle.appControl(appControl)](reference/apis/js-apis-appControl.md) - [@ohos.bundle.bundleManager (bundleManager)](reference/apis/js-apis-bundleManager.md) @@ -1185,6 +1182,9 @@ - [@ohos.multimedia.camera (Camera Management)](reference/apis/js-apis-camera.md) - [@ohos.multimedia.image (Image Processing)](reference/apis/js-apis-image.md) - [@ohos.multimedia.media (Media)](reference/apis/js-apis-media.md) + - [@ohos.multimedia.systemSoundManager (System Sound Management)](reference/apis/js-apis-systemSoundManager.md) + - multimedia + - [ringtonePlayer (Ringtone Player)](reference/apis/js-apis-inner-multimedia-ringtonePlayer.md) - Resource Manager - [@ohos.i18n (Internationalization)](reference/apis/js-apis-i18n.md) - [@ohos.intl (Internationalization)](reference/apis/js-apis-intl.md) @@ -1209,6 +1209,7 @@ - security - [PermissionRequestResult](reference/apis/js-apis-permissionrequestresult.md) - Data Management + - [@ohos.data.cloudData (Device-Cloud Synergy)](reference/apis/js-apis-data-cloudData.md) - [@ohos.data.dataAbility (DataAbility Predicates)](reference/apis/js-apis-data-ability.md) - [@ohos.data.dataShare (DataShare)](reference/apis/js-apis-data-dataShare.md) - [@ohos.data.dataSharePredicates (DataShare Predicates)](reference/apis/js-apis-data-dataSharePredicates.md) @@ -1285,6 +1286,7 @@ - [@ohos.InputMethodExtensionAbility (InputMethodExtensionAbility)](reference/apis/js-apis-inputmethod-extension-ability.md) - [@ohos.InputMethodExtensionContext (InputMethodExtensionContext)](reference/apis/js-apis-inputmethod-extension-context.md) - [@ohos.InputMethodSubtype (Input Method Subtype)](reference/apis/js-apis-inputmethod-subtype.md) + - [@ohos.logLibrary (Log Library)](reference/apis/js-apis-loglibrary.md) - [@ohos.pasteboard (Pasteboard)](reference/apis/js-apis-pasteboard.md) - [@ohos.screenLock (Screenlock)](reference/apis/js-apis-screen-lock.md) - [@ohos.systemDateTime (System Time and Time Zone)](reference/apis/js-apis-system-date-time.md) @@ -1315,6 +1317,7 @@ - [@ohos.multimodalInput.mouseEvent (Mouse Event)](reference/apis/js-apis-mouseevent.md) - [@ohos.multimodalInput.pointer (Mouse Pointer)](reference/apis/js-apis-pointer.md) - [@ohos.multimodalInput.touchEvent (Touch Event)](reference/apis/js-apis-touchevent.md) + - [@ohos.multimodalInput.shortKey (Shortcut Key)](reference/apis/js-apis-shortKey.md) - [@ohos.power (System Power Management)](reference/apis/js-apis-power.md) - [@ohos.runningLock (Runninglock)](reference/apis/js-apis-runninglock.md) - [@ohos.sensor (Sensor)](reference/apis/js-apis-sensor.md) @@ -1494,6 +1497,7 @@ - [Application Event Logging Error Codes](reference/errorcodes/errorcode-hiappevent.md) - [HiSysEvent Error Codes](reference/errorcodes/errorcode-hisysevent.md) - [HiDebug Error Codes](reference/errorcodes/errorcode-hiviewdfx-hidebug.md) + - [Log Library Error Codes](reference/errorcodes/errorcode-loglibrary.md) - [Input Method Framework Error Codes](reference/errorcodes/errorcode-inputmethod-framework.md) - [Pasteboard Error Codes](reference/errorcodes/errorcode-pasteboard.md) - [Screen Lock Management Error Codes](reference/errorcodes/errorcode-screenlock.md) @@ -1615,7 +1619,7 @@ - [OH_Huks_PubKeyInfo](reference/native-apis/_o_h___huks___pub_key_info.md) - [OH_Huks_Result](reference/native-apis/_o_h___huks___result.md) - Standard Libraries Supported by Native APIs - - [Node_API](reference/native-lib/third_party_napi/napi.md) + - [Node-API](reference/native-lib/third_party_napi/napi.md) - [libuv](reference/native-lib/third_party_libuv/libuv.md) - [Native Standard Libraries Supported by Openharmony](reference/native-lib/third_party_libc/musl.md) - Appendix @@ -1649,4 +1653,3 @@ - [SDK Usage](faqs/faqs-sdk.md) - [Usage of Third- and Fourth-Party Libraries](faqs/faqs-third-fourth-party-library.md) - \ No newline at end of file diff --git a/en/contribute/OpenHarmony-hdf-coding-guide.md b/en/contribute/OpenHarmony-hdf-coding-guide.md index 2349d0148c5b4c2bd3128afbe5e4b5f026ae5222..7d38d9f19295f81dfd288ea44bf4b16439a8ad50 100644 --- a/en/contribute/OpenHarmony-hdf-coding-guide.md +++ b/en/contribute/OpenHarmony-hdf-coding-guide.md @@ -190,7 +190,7 @@ root { [Description] The HDF places the same type of devices in the same host. You can develop and deploy the driver functionalities of the host by layer, so that one driver has multiple nodes. The following figure shows the HDF driver model. -![hdf-driver-model.png]( ../device-dev/driver/figures/hdf-driver-model.png) +![hdf-driver-model.png](figures/hdf-driver-model.png) Place devices of the same type in the same host. When adding a device, check whether the host of the same type already exists. If such a host already exists, configure the device in the host. Do not configure the same host again. A device belongs to only one driver. Therefore, do not configure the same device in different hosts. diff --git a/en/contribute/figures/hdf-driver-model.png b/en/contribute/figures/hdf-driver-model.png new file mode 100644 index 0000000000000000000000000000000000000000..e524ecca84ab2afd674c73abd76ae2ebcc50cb9a Binary files /dev/null and b/en/contribute/figures/hdf-driver-model.png differ diff --git a/en/contribute/template/js-template.md b/en/contribute/template/js-template.md index 61920523f6db478aa3caf5c09d22a700a5474db2..9f7cedd5b58e0a7f8c2a9582ce1adabe26f76879 100644 --- a/en/contribute/template/js-template.md +++ b/en/contribute/template/js-template.md @@ -12,14 +12,14 @@ | 2 | Upload path | Upload markdown files to **docs/en/application-dev/reference/apis**.
Upload images to **docs/en/application-dev/reference/apis/figures**. In addition, reference the image path in the markdown file as follows: **![](figures/exampleImage.jpg)**, **![](figures/exampleImage.png)**, or **![](figures/exampleImage.gif)**.| | 3 | File name | Provide one JS API reference document for each d.ts file. Name the file in the format of **js-apis-exampleModule.md**, where **exampleModule** is a variable and must be the same as the actual module name.
Examples:
For @ohos.multimedia.audio in the Multimedia subsystem, the JS API file name is **js-apis-audio.md**.
For @ohos.telephony.sms in the Telephony subsystem, the JS API file name is **js-apis-sms.md**.| | 4 | Directory update | After uploading an API reference document, update the **Readme-EN.md** file in **docs/en/application-dev/reference/apis**.
The directories are automatically arranged in alphabetical order.| -| 5 | Document structure | - Module description
- Initial version description
- Modules to Import/Usage description
- API description (attributes, constants, methods, enums, and custom types)
The order in which APIs are described in the document must be consistent with that in which they appear in the code. If some APIs have a logical sequence, pay attention to their sequence in the API reference document. | -| 6 | Initial version description | 1. Use the greater-than sign (**>**) followed by a space to indent the description about the initial version of the module. Unless otherwise marked, all APIs in the module have the same initial version.
2. When introducing an API to an existing module, use the **** tag to mark its earliest version. The format is **versionNumber+**, for example, **7+**.
If an attribute is added to an existing module, suffix the **** tag to the new attribute name, for example, **newAttribute7+**.
If a method is added to an existing module, suffix the **** tag to the method name, for example, **sim.getSimIccId7+**. The same rule applies to new interfaces, classes, and enums. | +| 5 | Document structure | - Module description
- Initial version description
- Modules to Import/Usage description
- API description (attributes, constants, methods, enums, and custom types)
The order in which APIs are described in the document must be consistent with that in which they appear in the code. If some APIs have a logical sequence, pay attention to their sequence in the API reference document.| +| 6 | Initial version description | 1. Use the greater-than sign (**>**) followed by a space to indent the description about the initial version of the module. Unless otherwise marked, all APIs in the module have the same initial version.
2. When introducing an API to an existing module, use the **** tag to mark its earliest version. The format is **versionNumber+**, for example, **7+**.
If an attribute is added to an existing module, suffix the **** tag to the new attribute name, for example, **newAttribute7+**.
If a method is added to an existing module, suffix the **** tag to the method name, for example, **sim.getSimIccId7+**. The same rule applies to new interfaces, classes, and enums.| | 7 | Deprecated API description | Do not delete the deprecated content from the document. Instead, suffix **deprecated** as a superscript to the content, and use the greater-than sign (**>**) to introduce the initial version and deprecated version.
Example: abandonmentMethod(deprecated)
> This API is supported since API version 4 and deprecated since API version 7. You are advised to use [newMethod]\(#newmethod) instead.| -| 8 | Permission description | Provide the same permission description as that defined in the code for each method, enum, and attribute.
1. If a specific permission required for using the API can be requested only by system applications, provide the description in the following format:
**Required permissions**: ohos.permission.examplePermission (available only to system applications)
2. If a specific permission required for using the API can be requested by all applications, provide the description in the following format:
**Required permissions**: ohos.permission.examplePermission
3. If multiple permissions are required for using the API, provide the permissions with **and** or **or** in the following format:
**Required permissions**: ohos.permission.examplePermissionA and ohos.permission.examplePermissionB
**Required permissions**: ohos.permission.examplePermissionA or ohos.permission.examplePermissionB | -| 9 | @syscap | 1. Provide a description for every API in the following format, wherein *A.B* indicates a specific system capability.
**System capability**: SystemCapability.*A.B*
2. There are two cases for adding system capability information to a table (of attributes, enums, constants, or variables).
1) If all the items in a table require the same system capability, add the following information to the front of the table:
**System capability**: SystemCapability.*A.B*
2) If the items in a table require different system capabilities, list the system capability for each item in the table. | +| 8 | Permission description | Provide the same permission description as that defined in the code for each method, enum, and attribute.
1. If only one permission is required for using the API, use the following format:
**Required permissions**: ohos.permission.examplePermission
2. If multiple permissions are required for using the API, provide the permissions with **and** or **or** in the following format:
**Required permissions**: ohos.permission.examplePermissionA and ohos.permission.examplePermissionB
**Required permissions**: ohos.permission.examplePermissionA or ohos.permission.examplePermissionB | +| 9 | @syscap | 1. Provide a description for every API in the following format, wherein *A.B* indicates a specific system capability.
**System capability**: SystemCapability.*A.B*
2. There are two cases for adding system capability information to a table (of attributes, enums, constants, or variables).
1) If all the items in a table require the same system capability, add the following information to the front of the table:
**System capability**: SystemCapability.*A.B*
2) If the items in a table require different system capabilities, list the system capability for each item in the table.| | 10 | @system api | 1. If all APIs of the module are system APIs, add the following sentence to the next line of the initial version description:
The APIs provided by this module are system APIs.
2. If an API is a system API that can be used only by original equipment manufacturers (OEMs), add the following sentence to the API description:
**System API**: This is a system API.| | 11 | @FAModelOnly
@StageModelOnly | 1. If a module is implemented only for a specific ability model, add the following sentence to the next line of the initial version description:
The APIs of this module can be used only in the FA model.
Or
The APIs of this module can be used only in the stage model.
2. If an API is implemented only for a specific ability model, add the following sentence to the API description:
**Model restriction**: This API can be used only in the FA model.
Or
**Model restriction**: This API can be used only in the stage model.| -| 12 | Asynchronous methods (callback and promise)| Use the following sentences for callback methods.
Method introduction: *Describe the method.* This API uses an asynchronous callback to return the result.
Parameter description:
**callback\**: Callback used to return the result. The value **true** indicates *something*, and **false** indicates the opposite.
**callback\**: Callback used to return *something*. Example: Callback used to return the **AudioCapturer** object.
**AsyncCallback\**: Callback used to return the result. If the operation (or a specific operation description) is successful, **err** is **undefined**; otherwise, **err** is an error object.
**AsyncCallback\**: Callback used to return the result. If the operation (or a specific operation description) is successful, **err** is **undefined** and **data** is the *x* object obtained; otherwise, **err** is an error object.
Use the following sentences for promise methods.
Method introduction: *Describe the method.* This API uses a promise to return the result.
Parameter description:
**Promise\**: Promise used to return the result. The value **true** indicates *something*, and **false** indicates the opposite.
**Promise\**: Promise used to return *something*. Example: Promise used to return the **AudioCapturer** object.
**Promise\**: Promise that returns no value. | +| 12 | Asynchronous methods (callback and promise)| Use the following sentences for callback methods.
Method introduction: *Describe the method.* This API uses an asynchronous callback to return the result.
Parameter description:
**callback\**: Callback used to return the result. The value **true** indicates *something*, and **false** indicates the opposite.
**callback\**: Callback used to return *something*. Example: Callback used to return the **AudioCapturer** object.
**AsyncCallback\**: Callback used to return the result. If the operation (or a specific operation description) is successful, **err** is **undefined**; otherwise, **err** is an error object.
**AsyncCallback\**: Callback used to return the result. If the operation (or a specific operation description) is successful, **err** is **undefined** and **data** is the *x* object obtained; otherwise, **err** is an error object.
Use the following sentences for promise methods.
Method introduction: *Describe the method.* This API uses a promise to return the result.
Parameter description:
**Promise\**: Promise used to return the result. The value **true** indicates *something*, and **false** indicates the opposite.
**Promise\**: Promise used to return *something*. Example: Promise used to return the **AudioCapturer** object.
**Promise\**: Promise that returns no value.| | 13 | Sample code programming language | Use code blocks to provide sample code and mark the programming language.
Use **js** as the mark if both JS and eTS can be used, and use **ts** if only eTS can be used.| | 14 | Link | Link format: [Link text]\(Link content)
Cross-folder link format: [markdown file name]\(\.\./../xxx/xxx.md). One **../** indicates one upper-level folder.
Intra-topic link format: [Interface A7+]\(#xxxa7). The text in the intra-topic link must be the same as the title to be linked. In the link, all letters must be in lowercase, and no special character (except the hyphen) or tag is included.| @@ -146,7 +146,7 @@ Describe the method. For details, see the fourth and fifth points in "Writing In **System API**: This is a system API. (Delete this part if it is not involved.) -**Required permissions**: ohos.permission.examplePermission (Delete this part if no permission is involved. If a system permission is required, specify it.) +**Required permissions**: ohos.permission.examplePermission (Delete this part if no permission is involved.) **System capability**: SystemCapability.*A.B* (This part is mandatory.) @@ -161,7 +161,7 @@ Describe the method. For details, see the fourth and fifth points in "Writing In | Type | Description | | ------------------------------------------ | ----------------------------------------------- | -| string | Describe the return value, for example, what can be done after the return value is obtained.| +| string | Describe the return value from the following aspects:
1. What can be done after the return value is obtained.
2. If the return values can be enumerated, describe the meaning of the return values.
3. If the return value is a specific value or format, keeyp the value or format consistent with the actual implementation. | | Promise\> | Describe the return value. For details about how to write promise methods, see item 14 in "General Writing Instructions."| **Error codes** (This part is optional. Delete it if no error code is thrown.) @@ -211,7 +211,7 @@ Describe the method. For details, see the fourth and fifth points in "Writing In **System API**: This is a system API. (Delete this part if it is not involved.) -**Required permissions**: ohos.permission.examplePermission (Delete this part if no permission is involved. If a system permission is required, specify it.) +**Required permissions**: ohos.permission.examplePermission (Delete this part if no permission is involved.) **System capability**: SystemCapability.*A.B* (This part is mandatory.) @@ -219,7 +219,7 @@ Describe the method. For details, see the fourth and fifth points in "Writing In | Name | Type | Mandatory| Description | | -------- | ------------------------------------ | ---- | ------------------------------------------------------------ | -| type | string | Yes | Describe the event and when or how it will be triggered. If a method involves multiple events, describe them separately.
**Example 1 (single event):**
Type of the event. The **'play'** event is triggered when the **play()** API is called and audio playback starts.
Example 2 (multiple events):
Type of the event. The following events are supported:
- **'play'**: triggered when the **play()** API is called and audio playback starts.
- **'dataLoad'**: triggered when the audio data is loaded, that is, when the **src** attribute is configured.
- **'finish'**: triggered when the audio playback is finished. | +| type | string | Yes | Describe the event and when or how it will be triggered. If a method involves multiple events, describe them separately.
**Example 1 (single event):**
Type of the event. The **'play'** event is triggered when the **play()** API is called and audio playback starts.
Example 2 (multiple events):
Type of the event. The following events are supported:
- **'play'**: triggered when the **play()** API is called and audio playback starts.
- **'dataLoad'**: triggered when the audio data is loaded, that is, when the **src** attribute is configured.
- **'finish'**: triggered when the audio playback is finished.| | callback | Callback\<[CustomType](#classinterface)> | No | Describe the parameter. The instructions are the same as those provided under [Methods](#methods). | **Return value** (This part is optional. Delete it if there is no return value.) @@ -262,7 +262,7 @@ Describe the class or interface. If there are usage restrictions, describe them > *Writing Instructions* > -> Except that level-3 headings are used, other requirements are the same as those in [Attribute](#attributes). +> Except that level-3 headings are used, other requirements are the same as those in [Attributes](#attributes). ### Methods in Classes/Interfaces diff --git a/en/device-dev/quick-start/figures/3516_button.png b/en/device-dev/quick-start/figures/3516_button.png new file mode 100644 index 0000000000000000000000000000000000000000..436e365174b5f9804f70384e1b58e8d732657e4a Binary files /dev/null and b/en/device-dev/quick-start/figures/3516_button.png differ diff --git a/en/device-dev/quick-start/figures/3516_false.png b/en/device-dev/quick-start/figures/3516_false.png new file mode 100644 index 0000000000000000000000000000000000000000..a5a526e44fbb97d1615d44c33a3606afea06cdab Binary files /dev/null and b/en/device-dev/quick-start/figures/3516_false.png differ diff --git a/en/device-dev/quick-start/figures/3516_standard_false.png b/en/device-dev/quick-start/figures/3516_standard_false.png new file mode 100644 index 0000000000000000000000000000000000000000..1e10563479ea63bfc793113290452264dce9ea2d Binary files /dev/null and b/en/device-dev/quick-start/figures/3516_standard_false.png differ diff --git a/en/device-dev/quick-start/figures/3861_false.png b/en/device-dev/quick-start/figures/3861_false.png new file mode 100644 index 0000000000000000000000000000000000000000..e3e9ab5af271a3d9c3c6c78102711335ecba9b9f Binary files /dev/null and b/en/device-dev/quick-start/figures/3861_false.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001274745038.png b/en/device-dev/quick-start/figures/en-us_image_0000001274745038.png index 1fef79a0d9ab7d7862be1e108ae947cec5eb16d2..04f2a1ed7212eb09777eba7087c46fc4c235d8fc 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001274745038.png and b/en/device-dev/quick-start/figures/en-us_image_0000001274745038.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001275483042.png b/en/device-dev/quick-start/figures/en-us_image_0000001275483042.png index 1fef79a0d9ab7d7862be1e108ae947cec5eb16d2..04f2a1ed7212eb09777eba7087c46fc4c235d8fc 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001275483042.png and b/en/device-dev/quick-start/figures/en-us_image_0000001275483042.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001275752808.png b/en/device-dev/quick-start/figures/en-us_image_0000001275752808.png index 1fef79a0d9ab7d7862be1e108ae947cec5eb16d2..04f2a1ed7212eb09777eba7087c46fc4c235d8fc 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001275752808.png and b/en/device-dev/quick-start/figures/en-us_image_0000001275752808.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001307480750.png b/en/device-dev/quick-start/figures/en-us_image_0000001307480750.png index faa03a87ca4210e264ff09b85ec3dfc626d9d0df..a5a526e44fbb97d1615d44c33a3606afea06cdab 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001307480750.png and b/en/device-dev/quick-start/figures/en-us_image_0000001307480750.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001327669509.png b/en/device-dev/quick-start/figures/en-us_image_0000001327669509.png index 1fef79a0d9ab7d7862be1e108ae947cec5eb16d2..04f2a1ed7212eb09777eba7087c46fc4c235d8fc 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001327669509.png and b/en/device-dev/quick-start/figures/en-us_image_0000001327669509.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001330777737.png b/en/device-dev/quick-start/figures/en-us_image_0000001330777737.png index 1fef79a0d9ab7d7862be1e108ae947cec5eb16d2..04f2a1ed7212eb09777eba7087c46fc4c235d8fc 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001330777737.png and b/en/device-dev/quick-start/figures/en-us_image_0000001330777737.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001333256741.png b/en/device-dev/quick-start/figures/en-us_image_0000001333256741.png index 1ccaa6d5225520181903e86a88907a53a89094d2..e3e9ab5af271a3d9c3c6c78102711335ecba9b9f 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001333256741.png and b/en/device-dev/quick-start/figures/en-us_image_0000001333256741.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001333802045.png b/en/device-dev/quick-start/figures/en-us_image_0000001333802045.png index 1fef79a0d9ab7d7862be1e108ae947cec5eb16d2..04f2a1ed7212eb09777eba7087c46fc4c235d8fc 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001333802045.png and b/en/device-dev/quick-start/figures/en-us_image_0000001333802045.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001338012765.png b/en/device-dev/quick-start/figures/en-us_image_0000001338012765.png index c9553f714d09d1dae9559eb86bbb801d32d08141..c34cb4609b65bb5450ada58f3d7ac4e2292a607c 100644 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001338012765.png and b/en/device-dev/quick-start/figures/en-us_image_0000001338012765.png differ diff --git a/en/device-dev/quick-start/figures/rk3568_false.png b/en/device-dev/quick-start/figures/rk3568_false.png new file mode 100644 index 0000000000000000000000000000000000000000..051eee0b27088ef738a1d59aeb0aeb315fb2397a Binary files /dev/null and b/en/device-dev/quick-start/figures/rk3568_false.png differ diff --git a/en/device-dev/quick-start/figures/status_install.png b/en/device-dev/quick-start/figures/status_install.png new file mode 100644 index 0000000000000000000000000000000000000000..98930e0ec86d237c8397efc99120a8f62402d477 Binary files /dev/null and b/en/device-dev/quick-start/figures/status_install.png differ diff --git a/en/device-dev/quick-start/figures/status_uninstall.png b/en/device-dev/quick-start/figures/status_uninstall.png new file mode 100644 index 0000000000000000000000000000000000000000..2981784137a94f07deb495cea4e7cad77d5915c5 Binary files /dev/null and b/en/device-dev/quick-start/figures/status_uninstall.png differ diff --git a/en/device-dev/subsystems/subsys-arkcompiler-guide.md b/en/device-dev/subsystems/subsys-arkcompiler-guide.md index 44633a8b7eab098dc9d31bb948051cc82b4313b8..8030bf6036b6183a4c3da2e7d9f49dece25a4718 100644 --- a/en/device-dev/subsystems/subsys-arkcompiler-guide.md +++ b/en/device-dev/subsystems/subsys-arkcompiler-guide.md @@ -32,26 +32,26 @@ Ubuntu 18.04 or later is recommended. ## How to Develop -1. Create the build products **ark_js_vm** and **ts2panda**. +1. Create the build products **ark_js_vm** and **es2panda**. ```shell python ark.py x64.release ``` - **ark_js_vm**: executable program for running .abc files. - - **ts2panda**: tool that converts ArkTS files into ArkCompiler bytecode files. + - **es2panda**: tool that converts ArkTS files into ArkCompiler bytecode files. -2. Use **ts2panda** to convert a TypeScript file to an .abc file. +2. Use **es2panda** to convert a TypeScript file to an .abc file. ```shell - prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node --expose-gc out/x64.release/clang_x64/obj/arkcompiler/ets_frontend/ts2panda/build/src/index.js helloworld.ts --opt-level 0 + out/x64.release/arkcompiler/ets_frontend/es2abc helloworld.ts ``` Code snippet of the TypeScript case file **helloworld.ts**: ```JavaScript - declare function print(arg:any):string; - print("Hello world!"); + declare function print(arg:string):string; + print('Hello world!'); ``` 3. Run the generated .abc file. ```shell - out/x64.release/clang_x64/arkcompiler/ets_runtime/ark_js_vm helloworld.abc + out/x64.release/arkcompiler/ets_runtime/ark_js_vm helloworld.abc ``` .abc file: ArkCompiler bytecode file. diff --git a/en/device-dev/subsystems/subsys-boot-init-seccomp.md b/en/device-dev/subsystems/subsys-boot-init-seccomp.md index 9ba6a0ed8a5ce8d3f84515e32de5d7b4fb043141..fc34fbbea699609406487fa7ab6690fcd6e76b61 100644 --- a/en/device-dev/subsystems/subsys-boot-init-seccomp.md +++ b/en/device-dev/subsystems/subsys-boot-init-seccomp.md @@ -1,9 +1,13 @@ # Seccomp Policy Development + ## Overview + ### Introduction + Secure computing mode (Seccomp) is a security mechanism provided by the Linux kernel. In the Linux system, a large number of system calls can be opened to user-mode programs without any restrictions. However, not all of these system calls are necessarily needed for user-mode programs. In this case, abuse of system calls can lead to system threats. For example, if a process has a security vulnerability, an attacker can run a shellcode segment to trigger system calls that are not triggered during normal execution, resulting in privilege escalation or private information leakage. To prevent such security risks, Seccomp limits the scope of system calls that can be used by programs, so as to reduce system exposure and improve security. ### Operating Mechanism + 1. Basic mechanism Seccomp policies exist in the form of policy files. During compilation and building, a policy file is parsed to generate a source file that contains the BPF instruction policies, and then the source file is compiled into a dynamic policy library. During startup of a user-mode process, Seccomp system calls are invoked to load the BPF instruction policies into the kernel through the dynamic policy library. @@ -15,6 +19,7 @@ Secure computing mode (Seccomp) is a security mechanism provided by the Linux ke ### Constraints + - System restrictions
The system used must be a standard system, and the options listed below must be enabled in the kernel. You can find the kernel option configuration file of the product in **//kernel/linux/config/{linux_version}/arch/{target_cpu}/configs/**. ```shell CONFIG_HAVE_ARCH_SECCOMP=y @@ -31,9 +36,13 @@ Secure computing mode (Seccomp) is a security mechanism provided by the Linux ke - Personalized Seccomp policies can be enabled for the native service processes incubated by the init process. ## Enabling Seccomp + ### When to Use + To meet product security requirements, you can enable Seccomp to limit the scope of system calls that can be invoked by processes. The development procedure below describes how to enable the basic functions and policies of Seccomp. Note that the basic functions must meet the feature restrictions described in [Constraints](#constraints). For details about the basic policy file, see [Policy File Overview](#policy-file-overview). + ### How to Develop + 1. Add the following field to **vendor/Product vendor/Product name/config.json**: ```c "build_seccomp": true @@ -68,6 +77,7 @@ To meet product security requirements, you can enable Seccomp to limit the scope 3. Burn the image into the device. ### Debugging and Verification + Check whether Seccomp is enabled for application processes and system service processes. 1. Run the shell command to obtain the process ID (that is, **target pid**) of the target process. ``` @@ -95,9 +105,13 @@ Check whether Seccomp is enabled for application processes and system service pr | Seccomp_filters | Number of Seccomp policies set for a process. | ## Customizing Seccomp Policies for a Process + ### When to Use + If the basic Seccomp policy has been enabled for a product, you can customize Seccomp policies for native service processes incubated by the init process to adapt to diversified security requirements. In this case, the Seccomp policies of other native service processes remain unchanged. + ### How to Develop + 1. Collect statistics on the system calls required by the 32-bit and 64-bit systems by using the static analysis and Strace statistics methods described in [System Call Statistic Methods](#system-call-statistic-methods). In this way, you will obtain the initial Seccomp policy. 2. Write a policy file. For details, see [How to Write a Common Policy File](#how-to-write-a-common-policy-file). 3. Write and build the **BUILD.gn** file. @@ -166,12 +180,15 @@ If the basic Seccomp policy has been enabled for a product, you can customize Se 6. Use the [audit statistics](#audit-statistics) method to check and supplement the Seccomp policies. Repeat steps 4 to 6 until the process can run properly. ### Debugging and Verification + 1. If Seccomp is not enabled for the target process, [check the Seccomp status](#debugging-and-verification) of the target process. 2. If the process is terminated and audit log information is present in the kernel logs, the Seccomp policy is enabled but the policy list is incomplete. You can find an example audit log in [Audit Statistics](#audit-statistics). 3. If the process is not terminated, comment out the system calls (for example, **setuid**) related to the specified uid in the Seccomp policy file. Rebuild the dynamic policy library, push the library to the image, and restart the process. Then, check whether the process is terminated by Seccomp. If the process is terminated, Seccomp has been enabled. ## FAQs + ### How do I determine whether a process termination is caused by Seccomp? + **Symptom** If a process is terminated under certain conditions, how do I determine whether the issue is caused by Seccomp? @@ -207,6 +224,7 @@ Use either of the following methods: ``` ## Reference + ### Seccomp source code directory ``` base/startup/init/services/modules/seccomp @@ -229,6 +247,7 @@ base/startup/init/services/modules/seccomp ``` ### Policy File Overview + - Location
Basic policy files are stored in **//base/startup/init/services/modules/seccomp/seccomp_policy**. - Basic policy files @@ -244,6 +263,7 @@ base/startup/init/services/modules/seccomp | privileged_process.seccomp.policy | Privileged process policy file. If certain processes need to use the system calls on the baseline blocklist, you need to declare the corresponding process identifiers and baseline blocklists in this file.| ### How to Write a Common Policy File + - To declare a configuration item, write **@** followed by the configuration item, for example, **@returnValue**. - Add the content of a configuration item from the next line of this configuration item to the beginning of the next configuration item. - To comment out a line, add a pound sign (#) at the beginning of this line. @@ -298,6 +318,7 @@ swapon;all ``` ### How to Write a Privileged Process Policy File + - To declare a configuration item, write **@** followed by the configuration item, for example, **@allowBlockList**. - Add the content of a configuration item from the next line of this configuration item to the beginning of the next configuration item. - To comment out a line, add a pound sign (#) at the beginning of this line. @@ -326,6 +347,7 @@ swapon;all ``` ### System Call Statistic Methods + **Table 6** Comparison of statistic methods | Statistic Method | Description | Advantage | Disadvantage | | --- | --- | --- | --- | @@ -334,6 +356,7 @@ swapon;all | Audit statistics | After the Seccomp policy is enabled for a process, Seccomp intercepts invalid system calls and records audit log information containing the system call numbers into kernel logs. Collect the logs after the trace is complete, and use a script to parse the logs and generate a Seccomp policy file.| This method can be used as a supplement to the preceding methods. | Logs may be lost.
System calls can be completely collected only when all code branches are traversed. | #### Static Analysis + 1. Prepare the environment. 1. Prepare a Linux environment. 2. Download the cross compilers arm-linux-musleabi and aarch64-linux-musl. @@ -433,10 +456,13 @@ swapon;all ``` #### Strace Statistics + 1. Use the cross compilers arm-linux-musleabi and aarch64-linux-musl to build the Strace tool for the 32-bit and 64-bit architectures, respectively. 2. [Trace the service process](#tracing-the-service-process) to obtain the Strace logs. 3. [Parse Strace logs](#parsing-strace-logs) by using scripts to obtain the Seccomp policy file. + ##### Tracing the Service Process + 1. Modify the embedded code in the init repository. Specifically, add the following content to **//base/startup/init/services/init/init_common_service.c** before executing the **SetSystemseccompPolicy** function to set the Seccomp policy. If the line starts with a plus sign (+), the line is added; if the line starts with a hyphen (-), the line is deleted. **xxxx** must be the same as the value of **Services name** in the [boot configuration file](subsys-boot-init-cfg.md) of the process. ```c --- a/services/init/init_common_service.c @@ -485,6 +511,7 @@ swapon;all ``` ##### Parsing Strace Logs + 1. Copy the dependency files to the Strace log folder for later use. The dependency files are those generated in step 2 in [Static Analysis](#static-analysis). ```shell cp out/*product name* /gen/base/startup/init/services/modules/seccomp/gen_system_filter/libsyscall_to_nr_arm* base/startup/init/services/modules/seccomp/scripts/tools/strace/ @@ -521,6 +548,7 @@ swapon;all ``` #### Audit Statistics + 1. Enable the initial Seccomp policy. For details, see [Customizing Seccomp Policies for a Process](#customizing-seccomp-policies-for-a-process). 2. Obtain logs. 1. Create a folder for storing logs. @@ -586,6 +614,7 @@ swapon;all ``` ### Combining Multiple Policy Files + During [colltatistics on system calls](#system-call-statistic-methods), multiple policy files may be generated. In these policy files, system calls may be repeated or disordered. To solve these problems, you can combine policy files to sort system calls by arm64/arm and by system call number in ascending order. **Table 11** Parameters in the merge_policy.py script file diff --git a/en/device-dev/subsystems/subsys-dfx-hitracemeter.md b/en/device-dev/subsystems/subsys-dfx-hitracemeter.md index 12daba15d92b97ce4cc0a79a85ce461950dfaa8f..85b0798e1061332be67b83fdf8a9ce274a0ed3bf 100644 --- a/en/device-dev/subsystems/subsys-dfx-hitracemeter.md +++ b/en/device-dev/subsystems/subsys-dfx-hitracemeter.md @@ -1,4 +1,4 @@ -# HiTraceMeter Development +# HiTraceMeter ## Introduction @@ -279,6 +279,7 @@ The hitrace CLI tool is an executable binary program. On an OpenHarmony-powered | --trace_begin | Starts capturing trace data. | | --trace_dump | Dumps trace data to the specified position. The default position is the console. | | --trace_finish | Stops capturing trace data and dumps trace data to the specified position. The default position is the console. | +| --trace_finish_nodump | Stops capturing trace packets and dumping trace data. | | -l, --list_categories | Lists the trace categories supported by the device. | | --overwrite | Sets the action to take when the buffer is full. If this option is used, the latest trace data is discarded. If this option is not used, the earliest trace data is discarded (default). | | -o *filename*, --output *filename*| Outputs trace data to the specified file. | diff --git a/en/readme/common-event-notification.md b/en/readme/common-event-notification.md index 745ea06735002601ca57b2fe7ab620ae0162a2af..6242a81042f831a35a4faee004a2fb3bb990f269 100644 --- a/en/readme/common-event-notification.md +++ b/en/readme/common-event-notification.md @@ -14,7 +14,7 @@ Each application can subscribe to common events as required. After your applicat ### Architecture -![]( figures/cesfwk_architecture_diagram.png "CES Architecture") +![](figures/cesfwk_architecture_diagram.png "CES Architecture") ## Directory Structure diff --git a/en/release-notes/OpenHarmony-v3.1-beta.md b/en/release-notes/OpenHarmony-v3.1-beta.md index f166a0b1693e3ee8b9e4c0ea1e62c03ec4138067..08a5dbfcdfe4008dbff693fbc69e6ca4e2579ec6 100644 --- a/en/release-notes/OpenHarmony-v3.1-beta.md +++ b/en/release-notes/OpenHarmony-v3.1-beta.md @@ -181,12 +181,9 @@ For details about the adaptation status, see [SIG_DevBoard](https://gitee.com/op | [Synced Sketchpad (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts)| This codelab shows how to implement synchronous writing and interaction between multiple devices based on the distributed feature.| ArkTS | | [Distributed Database](https://gitee.com/openharmony/codelabs/tree/master/Data/JsDistributedData)| This codelab shows how to use the Distributed Data Service APIs to facilitate consistent data access between devices.| JS | | [Relational Database](https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData)| This codelab shows how to quickly develop database-related application services based on the relational database and data management capability.| JS | -| [Simplified Declarative UI Paradigm (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/SimpleGalleryEts) | This codelab shows how to implement a gallery app based on OpenHarmony ArkUI components. | ArkTS | -| [One-Time Development for Multi-device Deployment (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/Multi_device) | This codelab shows how to implement one-time layout development for multi-device deployment based on OpenHarmony ArkTS UI components. | ArkTS | | [Shopping (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/ShoppingEts) | This codelab shows how to implement a shopping app based on OpenHarmony ArkTS UI components. | ArkTS | | [Transition Animation (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/TransitionAnimation) | This codelab shows how to implement page transition, component transition, and transition of shared elements based on OpenHarmony ArkUI components. | ArkTS | | [slider Usage (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/SliderExample) | This codelab shows how to use the OpenHarmony ArkUI component **\** to implement the animation effect when users adjust the size and speed of the windmill. | ArkTS | -| [Liquid Layout (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/FlowLayoutEts) | This codelab shows how to implement the liquid layout based on the OpenHarmony ArkTS UI components. | ArkTS | | [Dialog Box (ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/CustomDialogEts) | This codelab shows how to implement an alert dialog box and custom dialog box based on OpenHarmony ArkTS UI components. | ArkTS | diff --git a/en/release-notes/OpenHarmony-v3.1-release.md b/en/release-notes/OpenHarmony-v3.1-release.md index bba0edfaf38f2a6a90e35e5d4a0dc96cd0fe5785..d69445c2144c0c3f2cb9aa0473ebca9f0fe94ac1 100644 --- a/en/release-notes/OpenHarmony-v3.1-release.md +++ b/en/release-notes/OpenHarmony-v3.1-release.md @@ -237,7 +237,6 @@ For more information, visit [Samples](https://gitee.com/openharmony/app_samples) | [Audio Recording](https://gitee.com/openharmony/codelabs/tree/master/Media/Audio_OH_ETS)| This codelab shows how to use **AudioRecorder** to record an audio file and use **AudioPlayer** to play the recorded audio.| ArkTS | | [Notepad](https://gitee.com/openharmony/codelabs/tree/master/Data/NotePad_OH_ETS)| This codelab shows how to develop a notepad in ArkTS. You can create, delete, and favorite notes, and use the lightweight database to store data persistently. | ArkTS | | [Distributed Mail Editing](https://gitee.com/openharmony/codelabs/tree/master/Distributed/OHMailETS)| This codelab shows how to develop the distributed email editing function. By leveraging the distributed capabilities, a remote device in the same LAN and with the same login account can be started, and email editing can be continued on the remote device.| ArkTS | -| [Third-party Library](https://gitee.com/openharmony/codelabs/tree/master/ThirdPartyComponents/VCardDemo)| This codelab shows how to use vcard, a third-party library used in OpenHarmony to write and read contact data in a specified format (file with the extension name **vcard**).| ArkTS | ## Resolved Issues diff --git a/en/release-notes/api-diff/v4.0-beta1/Readme-EN.md b/en/release-notes/api-diff/v4.0-beta1/Readme-EN.md new file mode 100644 index 0000000000000000000000000000000000000000..0f5a6c6ea413caf34f952ae846ed76740b14cb57 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/Readme-EN.md @@ -0,0 +1,31 @@ +# Readme + +- [Ability framework](js-apidiff-ability.md) +- [Accessibility subsystem](js-apidiff-accessibility.md) +- [Account subsystem](js-apidiff-account.md) +- [ArkUI development framework](js-apidiff-arkui.md) +- [Power management subsystem](js-apidiff-battery.md) +- [Bundle management framework](js-apidiff-bundle.md) +- [Communication subsystem](js-apidiff-communication.md) +- [Compiler and runtime subsystem](js-apidiff-compiler-and-runtime.md) +- [Customization subsystem](js-apidiff-customization.md) +- [Distributed data management subsystem](js-apidiff-distributed-data.md) +- [Distributed hardware subsystem](js-apidiff-distributed-hardware.md) +- [File management subsystem](js-apidiff-file-management.md) +- [Location subsystem](js-apidiff-geolocation.md) +- [Globalization subsystem](js-apidiff-global.md) +- [Graphic subsystem](js-apidiff-graphic.md) +- [Misc services subsystem](js-apidiff-misc.md) +- [MSDP subsystem](js-apidiff-msdp.md) +- [Multimodal input subsystem](js-apidiff-multi-modal-input.md) +- [Multimedia subsystem](js-apidiff-multimedia.md) +- [Common event and notification subsystem](js-apidiff-notification.md) +- [Resource scheduler subsystem](js-apidiff-resource-scheduler.md) +- [Security subsystem](js-apidiff-security.md) +- [Pan-sensor subsystem](js-apidiff-sensor.md) +- [Telephony subsystem](js-apidiff-telephony.md) +- [Test subsystem](js-apidiff-unitest.md) +- [Update subsystem](js-apidiff-update.md) +- [User IAM subsystem](js-apidiff-user-iam.md) +- [Web subsystem](js-apidiff-web.md) +- [Window manager subsystem](js-apidiff-window.md) \ No newline at end of file diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-ability.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..7cceb740c72c5bfd1ef136f886c03a49c610e951 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-ability.md @@ -0,0 +1,71 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: LaunchReason
Method or attribute name: SHARE = 5|@ohos.app.ability.AbilityConstant.d.ts| +|Added|NA|Module name: ohos.app.ability.abilityManager
Class name: abilityManager
Method or attribute name: function acquireShareData(missionId: number, callback: AsyncCallback\<{ [key: string]: Object }>): void;|@ohos.app.ability.abilityManager.d.ts| +|Added|NA|Module name: ohos.app.ability.abilityManager
Class name: abilityManager
Method or attribute name: function acquireShareData(missionId: number): Promise\<{ [key: string]: Object }>;|@ohos.app.ability.abilityManager.d.ts| +|Added|NA|Module name: ohos.app.ability.appManager
Class name: appManager
Method or attribute name: function isSharedBundleRunning(bundleName: string, versionCode: number): Promise\;|@ohos.app.ability.appManager.d.ts| +|Added|NA|Module name: ohos.app.ability.appManager
Class name: appManager
Method or attribute name: function isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCallback\): void;|@ohos.app.ability.appManager.d.ts| +|Added|NA|Class name: appRecovery
Method or attribute name: function setRestartWant(want: Want): void;|@ohos.app.ability.appRecovery.d.ts| +|Added|NA|Class name: appRecovery
Method or attribute name: function saveAppState(context?: UIAbilityContext): boolean;|@ohos.app.ability.appRecovery.d.ts| +|Added|NA|Module name: ohos.app.ability.quickFixManager
Class name: quickFixManager
Method or attribute name: function revokeQuickFix(bundleName: string, callback: AsyncCallback\): void;|@ohos.app.ability.quickFixManager.d.ts| +|Added|NA|Module name: ohos.app.ability.quickFixManager
Class name: quickFixManager
Method or attribute name: function revokeQuickFix(bundleName: string): Promise\;|@ohos.app.ability.quickFixManager.d.ts| +|Added|NA|Module name: ohos.app.ability.UIAbility
Class name: OnRemoteStateChangeCallback|@ohos.app.ability.UIAbility.d.ts| +|Added|NA|Module name: ohos.app.ability.UIAbility
Class name: OnRemoteStateChangeCallback
Method or attribute name: (msg: string): void;|@ohos.app.ability.UIAbility.d.ts| +|Added|NA|Module name: ohos.app.ability.UIAbility
Class name: Caller
Method or attribute name: onRemoteStateChange(callback: OnRemoteStateChangeCallback): void;|@ohos.app.ability.UIAbility.d.ts| +|Added|NA|Class name: UIAbility
Method or attribute name: onShare(wantParam: { [key: string]: Object }): void;|@ohos.app.ability.UIAbility.d.ts| +|Added|NA|Module name: ohos.app.ability.wantConstant
Class name: Params
Method or attribute name: ABILITY_RECOVERY_RESTART = "ohos.ability.params.abilityRecoveryRestart"|@ohos.app.ability.wantConstant.d.ts| +|Added|NA|Module name: ohos.app.ability.wantConstant
Class name: Params
Method or attribute name: CONTENT_TITLE_KEY = 'ohos.extra.param.key.contentTitle'|@ohos.app.ability.wantConstant.d.ts| +|Added|NA|Module name: ohos.app.ability.wantConstant
Class name: Params
Method or attribute name: SHARE_ABSTRACT_KEY = 'ohos.extra.param.key.shareAbstract'|@ohos.app.ability.wantConstant.d.ts| +|Added|NA|Module name: ohos.app.ability.wantConstant
Class name: Params
Method or attribute name: SHARE_URL_KEY = 'ohos.extra.param.key.shareUrl'|@ohos.app.ability.wantConstant.d.ts| +|Added|NA|Module name: ohos.app.form.FormExtensionAbility
Class name: FormExtensionAbility
Method or attribute name: onAcquireFormData?(formId: string): { [key: string]: Object };|@ohos.app.form.FormExtensionAbility.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function getRunningFormInfos(callback: AsyncCallback\>, hostBundleName?: string): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function getRunningFormInfos(hostBundleName?: string): Promise\>;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function on(type: "formAdd", observerCallback: Callback\, bundleName?: string): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function off(type: "formAdd", observerCallback?: Callback\, bundleName?: string): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function on(type: "formRemove", observerCallback: Callback\, bundleName?: string): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function off(type: "formRemove", observerCallback?: Callback\, bundleName?: string): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function acquireFormData(formId: string, callback: AsyncCallback\<{[key: string]: Object}>): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function acquireFormData(formId: string): Promise\<{[key: string]: Object}>;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function getRunningFormInfosByFilter(formProviderFilter: formInfo.FormProviderFilter): Promise\>;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function getRunningFormInfosByFilter(formProviderFilter: formInfo.FormProviderFilter, callback: AsyncCallback\>): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function getRunningFormInfoById(formId: string): Promise\;|@ohos.app.form.formHost.d.ts| +|Added|NA|Module name: ohos.app.form.formHost
Class name: formHost
Method or attribute name: function getRunningFormInfoById(formId: string, callback: AsyncCallback\): void;|@ohos.app.form.formHost.d.ts| +|Added|NA|Class name: FormInfo
Method or attribute name: descriptionId: number;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: FormParam
Method or attribute name: LAUNCH_REASON_KEY = "ohos.extra.param.key.form_launch_reason"|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: FormParam
Method or attribute name: PARAM_FORM_CUSTOMIZE_KEY = "ohos.extra.param.key.form_customize"|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: VisibilityType
Method or attribute name: UNKNOWN = 0|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: LaunchReason|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: LaunchReason
Method or attribute name: FORM_DEFAULT = 1|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: LaunchReason
Method or attribute name: FORM_SHARE|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: FormProviderFilter|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: FormProviderFilter
Method or attribute name: bundleName: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: FormProviderFilter
Method or attribute name: formName ?: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: FormProviderFilter
Method or attribute name: moduleName ?: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: FormProviderFilter
Method or attribute name: abilityName ?: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly formId: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly bundleName: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly hostBundleName: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly visibilityType: VisibilityType;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly moduleName: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly abilityName: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly formName: string;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.app.form.formInfo
Class name: RunningFormInfo
Method or attribute name: readonly dimension: number;|@ohos.app.form.formInfo.d.ts| +|Added|NA|Module name: ohos.application.StaticSubscriberExtensionAbility
Class name: StaticSubscriberExtensionAbility
Method or attribute name: context: StaticSubscriberExtensionContext;|@ohos.application.StaticSubscriberExtensionAbility.d.ts| +|Added|NA|Module name: ohos.application.StaticSubscriberExtensionContext
Class name: StaticSubscriberExtensionContext|@ohos.application.StaticSubscriberExtensionContext.d.ts| +|Added|NA|Module name: ohos.application.StaticSubscriberExtensionContext
Class name: StaticSubscriberExtensionContext
Method or attribute name: startAbility(want: Want, callback: AsyncCallback\): void;|@ohos.application.StaticSubscriberExtensionContext.d.ts| +|Added|NA|Module name: ohos.application.StaticSubscriberExtensionContext
Class name: StaticSubscriberExtensionContext
Method or attribute name: startAbility(want: Want): Promise\;|@ohos.application.StaticSubscriberExtensionContext.d.ts| +|Added|NA|Module name: ohos.application.uriPermissionManager
Class name: uriPermissionManager|@ohos.application.uriPermissionManager.d.ts| +|Added|NA|Module name: ohos.application.uriPermissionManager
Class name: uriPermissionManager
Method or attribute name: function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string, callback: AsyncCallback\): void;|@ohos.application.uriPermissionManager.d.ts| +|Added|NA|Module name: ohos.application.uriPermissionManager
Class name: uriPermissionManager
Method or attribute name: function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string): Promise\;|@ohos.application.uriPermissionManager.d.ts| +|Added|NA|Module name: ohos.application.uriPermissionManager
Class name: uriPermissionManager
Method or attribute name: function revokeUriPermission(uri: string, targetBundleName: string, callback: AsyncCallback\): void;|@ohos.application.uriPermissionManager.d.ts| +|Added|NA|Module name: ohos.application.uriPermissionManager
Class name: uriPermissionManager
Method or attribute name: function revokeUriPermission(uri: string, targetBundleName: string): Promise\;|@ohos.application.uriPermissionManager.d.ts| +|Added|NA|Module name: ErrorObserver
Class name: ErrorObserver
Method or attribute name: onException?(errObject: Error): void;|ErrorObserver.d.ts| +|Added|NA|Class name: ServiceExtensionContext
Method or attribute name: startAbilityByCallWithAccount(want: Want, accountId: number): Promise\;|ServiceExtensionContext.d.ts| +|Added|NA|Class name: UIAbilityContext
Method or attribute name: startAbilityByCallWithAccount(want: Want, accountId: number): Promise\;|UIAbilityContext.d.ts| +|Permission added|Class name: ServiceExtensionContext
Method or attribute name: startServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
Permission: N/A|Class name: ServiceExtensionContext
Method or attribute name: startServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
Permission: ohos.permission.START_INVISIBLE_ABILITY|ServiceExtensionContext.d.ts| +|Permission added|Class name: ServiceExtensionContext
Method or attribute name: startServiceExtensionAbility(want: Want): Promise\;
Permission: N/A|Class name: ServiceExtensionContext
Method or attribute name: startServiceExtensionAbility(want: Want): Promise\;
Permission: ohos.permission.START_INVISIBLE_ABILITY|ServiceExtensionContext.d.ts| +|Permission added|Class name: ServiceExtensionContext
Method or attribute name: connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
Permission: N/A|Class name: ServiceExtensionContext
Method or attribute name: connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
Permission: ohos.permission.ABILITY_BACKGROUND_COMMUNICATION|ServiceExtensionContext.d.ts| +|Permission added|Class name: UIAbilityContext
Method or attribute name: startServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
Permission: N/A|Class name: UIAbilityContext
Method or attribute name: startServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
Permission: ohos.permission.START_INVISIBLE_ABILITY|UIAbilityContext.d.ts| +|Permission added|Class name: UIAbilityContext
Method or attribute name: startServiceExtensionAbility(want: Want): Promise\;
Permission: N/A|Class name: UIAbilityContext
Method or attribute name: startServiceExtensionAbility(want: Want): Promise\;
Permission: ohos.permission.ABILITY_BACKGROUND_COMMUNICATION|UIAbilityContext.d.ts| +|Permission added|Class name: UIAbilityContext
Method or attribute name: connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
Permission: N/A|Class name: UIAbilityContext
Method or attribute name: connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
Permission: ohos.permission.ABILITY_BACKGROUND_COMMUNICATION|UIAbilityContext.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md new file mode 100644 index 0000000000000000000000000000000000000000..ba323a27a99d881c40da0c2dc785c6b0cb3815b5 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md @@ -0,0 +1,5 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Error code added|NA|Class name: Config
Method or attribute name: get(): Promise\;
Error code: 201, 202|@ohos.accessibility.config.d.ts| +|Error code added|NA|Class name: Config
Method or attribute name: get(callback: AsyncCallback\): void;
Error code: 201, 202|@ohos.accessibility.config.d.ts| +|Error code added|NA|Class name: Config
Method or attribute name: off(callback?: Callback\): void;
Error code: 202|@ohos.accessibility.config.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md new file mode 100644 index 0000000000000000000000000000000000000000..7f7198c58038d50463ce773e152f5bd31afa6655 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md @@ -0,0 +1,158 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: Constants
Method or attribute name: ACTION_ADD_ACCOUNT_IMPLICITLY = 'addAccountImplicitly'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: ACTION_AUTHENTICATE = 'authenticate'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: ACTION_CREATE_ACCOUNT_IMPLICITLY = 'createAccountImplicitly'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: ACTION_AUTH = 'auth'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: ACTION_VERIFY_CREDENTIAL = 'verifyCredential'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: ACTION_SET_AUTHENTICATOR_PROPERTIES = 'setAuthenticatorProperties'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_NAME = 'name'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_OWNER = 'owner'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_TOKEN = 'token'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_ACTION = 'action'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_AUTH_TYPE = 'authType'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_SESSION_ID = 'sessionId'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_CALLER_PID = 'callerPid'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_CALLER_UID = 'callerUid'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_CALLER_BUNDLE_NAME = 'callerBundleName'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_REQUIRED_LABELS = 'requiredLabels'|@ohos.account.appAccount.d.ts| +|Added|NA|Class name: Constants
Method or attribute name: KEY_BOOLEAN_RESULT = 'booleanResult'|@ohos.account.appAccount.d.ts| +|Added|NA|Module name: ohos.account.distributedAccount
Class name: DistributedAccountAbility
Method or attribute name: getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback\): void;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedAccountAbility
Method or attribute name: getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback\): void;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Module name: ohos.account.distributedAccount
Class name: DistributedAccountAbility
Method or attribute name: getOsAccountDistributedInfoByLocalId(localId: number): Promise\;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedAccountAbility
Method or attribute name: getOsAccountDistributedInfoByLocalId(localId: number): Promise\;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Module name: ohos.account.distributedAccount
Class name: DistributedAccountAbility
Method or attribute name: setOsAccountDistributedInfoByLocalId(
localId: number,
distributedInfo: DistributedInfo,
callback: AsyncCallback\
): void;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedAccountAbility
Method or attribute name: setOsAccountDistributedInfoByLocalId(
localId: number,
distributedInfo: DistributedInfo,
callback: AsyncCallback\
): void;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Module name: ohos.account.distributedAccount
Class name: DistributedAccountAbility
Method or attribute name: setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: DistributedInfo): Promise\;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedAccountAbility
Method or attribute name: setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: DistributedInfo): Promise\;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Module name: ohos.account.distributedAccount
Class name: DistributedAccountStatus|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedAccountStatus
Method or attribute name: |@ohos.account.distributedAccount.d.ts| +|Added|NA|Module name: ohos.account.distributedAccount
Class name: DistributedAccountStatus
Method or attribute name: NOT_LOGGED_IN = 0|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedAccountStatus
Method or attribute name: NOT_LOGGED_IN = 0|@ohos.account.distributedAccount.d.ts| +|Added|NA|Module name: ohos.account.distributedAccount
Class name: DistributedAccountStatus
Method or attribute name: LOGGED_IN = 1|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedAccountStatus
Method or attribute name: LOGGED_IN = 1|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DistributedInfo
Method or attribute name: readonly status?: DistributedAccountStatus;|@ohos.account.distributedAccount.d.ts| +|Added|NA|Class name: DomainAccountInfo
Method or attribute name: accountId?: string;|@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: AuthStatusInfo|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: AuthStatusInfo
Method or attribute name: |@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: AuthStatusInfo
Method or attribute name: remainTimes: number;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: AuthStatusInfo
Method or attribute name: remainTimes: number;|@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: AuthStatusInfo
Method or attribute name: freezingTime: number;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: AuthStatusInfo
Method or attribute name: freezingTime: number;|@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: GetDomainAccessTokenOptions|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: GetDomainAccessTokenOptions
Method or attribute name: |@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: GetDomainAccessTokenOptions
Method or attribute name: domainAccountInfo: DomainAccountInfo;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: GetDomainAccessTokenOptions
Method or attribute name: domainAccountInfo: DomainAccountInfo;|@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: GetDomainAccessTokenOptions
Method or attribute name: domainAccountToken: Uint8Array;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: GetDomainAccessTokenOptions
Method or attribute name: domainAccountToken: Uint8Array;|@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: GetDomainAccessTokenOptions
Method or attribute name: businessParams: { [key: string]: object };|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: GetDomainAccessTokenOptions
Method or attribute name: businessParams: { [key: string]: object };|@ohos.account.osAccount.d.ts| +|Added|NA|Module name: ohos.account.osAccount
Class name: GetDomainAccessTokenOptions
Method or attribute name: callerUid: number;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: GetDomainAccessTokenOptions
Method or attribute name: callerUid: number;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: authWithPopup(domainAccountInfo: DomainAccountInfo, callback: IUserAuthCallback): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback: IUserAuthCallback): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: getAccountInfo(domain: string, accountName: string, callback: AsyncCallback\): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback\): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: AsyncCallback\): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback\): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: isAccountTokenValid(
domainAccountInfo: DomainAccountInfo,
token: Uint8Array,
callback: AsyncCallback\
): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainPlugin
Method or attribute name: getAccessToken(options: GetDomainAccessTokenOptions, callback: AsyncCallback\): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainAccountManager
Method or attribute name: static auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUserAuthCallback): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainAccountManager
Method or attribute name: static authWithPopup(callback: IUserAuthCallback): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainAccountManager
Method or attribute name: static authWithPopup(localId: number, callback: IUserAuthCallback): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainAccountManager
Method or attribute name: static hasAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback\): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainAccountManager
Method or attribute name: static hasAccount(domainAccountInfo: DomainAccountInfo): Promise\;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainAccountManager
Method or attribute name: static updateAccountToken(
domainAccountInfo: DomainAccountInfo,
token: Uint8Array,
callback: AsyncCallback\
): void;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: DomainAccountManager
Method or attribute name: static updateAccountToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array): Promise\;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: ExecutorProperty
Method or attribute name: enrollmentProgress?: string;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: ExecutorProperty
Method or attribute name: sensorInfo?: string;|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: GetPropertyType
Method or attribute name: ENROLLMENT_PROGRESS = 4|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: GetPropertyType
Method or attribute name: SENSOR_INFO = 5|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: AuthType
Method or attribute name: FINGERPRINT = 4|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: AuthSubType
Method or attribute name: FINGERPRINT_CAPACITIVE = 30000|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: AuthSubType
Method or attribute name: FINGERPRINT_OPTICAL = 30001|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: AuthSubType
Method or attribute name: FINGERPRINT_ULTRASONIC = 30002|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_FINGER_DOWN = 6|@ohos.account.osAccount.d.ts| +|Added|NA|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_FINGER_UP = 7|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: UserAuth
Access level: public API|Class name: UserAuth
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: PINAuth
Access level: public API|Class name: PINAuth
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: InputerManager
Access level: public API|Class name: InputerManager
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: DomainPlugin
Access level: public API|Class name: DomainPlugin
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: DomainAccountManager
Access level: public API|Class name: DomainAccountManager
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: UserIdentityManager
Access level: public API|Class name: UserIdentityManager
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: GetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: public API|Class name: GetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: GetPropertyRequest
Method or attribute name: keys: Array\;
Access level: public API|Class name: GetPropertyRequest
Method or attribute name: keys: Array\;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: SetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: public API|Class name: SetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: SetPropertyRequest
Method or attribute name: key: SetPropertyType;
Access level: public API|Class name: SetPropertyRequest
Method or attribute name: key: SetPropertyType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: SetPropertyRequest
Method or attribute name: setInfo: Uint8Array;
Access level: public API|Class name: SetPropertyRequest
Method or attribute name: setInfo: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ExecutorProperty
Method or attribute name: result: number;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: result: number;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ExecutorProperty
Method or attribute name: authSubType: AuthSubType;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: authSubType: AuthSubType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ExecutorProperty
Method or attribute name: remainTimes?: number;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: remainTimes?: number;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ExecutorProperty
Method or attribute name: freezingTime?: number;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: freezingTime?: number;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthResult
Method or attribute name: token?: Uint8Array;
Access level: public API|Class name: AuthResult
Method or attribute name: token?: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthResult
Method or attribute name: remainTimes?: number;
Access level: public API|Class name: AuthResult
Method or attribute name: remainTimes?: number;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthResult
Method or attribute name: freezingTime?: number;
Access level: public API|Class name: AuthResult
Method or attribute name: freezingTime?: number;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: CredentialInfo
Method or attribute name: credType: AuthType;
Access level: public API|Class name: CredentialInfo
Method or attribute name: credType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: CredentialInfo
Method or attribute name: credSubType: AuthSubType;
Access level: public API|Class name: CredentialInfo
Method or attribute name: credSubType: AuthSubType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: CredentialInfo
Method or attribute name: token: Uint8Array;
Access level: public API|Class name: CredentialInfo
Method or attribute name: token: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: RequestResult
Method or attribute name: credentialId?: Uint8Array;
Access level: public API|Class name: RequestResult
Method or attribute name: credentialId?: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: credentialId: Uint8Array;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: credentialId: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: authType: AuthType;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: authType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: authSubType: AuthSubType;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: authSubType: AuthSubType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: templateId: Uint8Array;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: templateId: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: GetPropertyType
Method or attribute name: AUTH_SUB_TYPE = 1
Access level: public API|Class name: GetPropertyType
Method or attribute name: AUTH_SUB_TYPE = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: GetPropertyType
Method or attribute name: REMAIN_TIMES = 2
Access level: public API|Class name: GetPropertyType
Method or attribute name: REMAIN_TIMES = 2
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: GetPropertyType
Method or attribute name: FREEZING_TIME = 3
Access level: public API|Class name: GetPropertyType
Method or attribute name: FREEZING_TIME = 3
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: SetPropertyType
Method or attribute name: INIT_ALGORITHM = 1
Access level: public API|Class name: SetPropertyType
Method or attribute name: INIT_ALGORITHM = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthType
Method or attribute name: PIN = 1
Access level: public API|Class name: AuthType
Method or attribute name: PIN = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthType
Method or attribute name: FACE = 2
Access level: public API|Class name: AuthType
Method or attribute name: FACE = 2
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthType
Method or attribute name: DOMAIN = 1024
Access level: public API|Class name: AuthType
Method or attribute name: DOMAIN = 1024
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthSubType
Method or attribute name: PIN_SIX = 10000
Access level: public API|Class name: AuthSubType
Method or attribute name: PIN_SIX = 10000
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthSubType
Method or attribute name: PIN_NUMBER = 10001
Access level: public API|Class name: AuthSubType
Method or attribute name: PIN_NUMBER = 10001
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthSubType
Method or attribute name: PIN_MIXED = 10002
Access level: public API|Class name: AuthSubType
Method or attribute name: PIN_MIXED = 10002
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthSubType
Method or attribute name: FACE_2D = 20000
Access level: public API|Class name: AuthSubType
Method or attribute name: FACE_2D = 20000
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthSubType
Method or attribute name: FACE_3D = 20001
Access level: public API|Class name: AuthSubType
Method or attribute name: FACE_3D = 20001
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthSubType
Method or attribute name: DOMAIN_MIXED = 10240001
Access level: public API|Class name: AuthSubType
Method or attribute name: DOMAIN_MIXED = 10240001
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL1 = 10000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL1 = 10000
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL2 = 20000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL2 = 20000
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL3 = 30000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL3 = 30000
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL4 = 40000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL4 = 40000
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: Module
Method or attribute name: FACE_AUTH = 1
Access level: public API|Class name: Module
Method or attribute name: FACE_AUTH = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: SUCCESS = 0
Access level: public API|Class name: ResultCode
Method or attribute name: SUCCESS = 0
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: FAIL = 1
Access level: public API|Class name: ResultCode
Method or attribute name: FAIL = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: GENERAL_ERROR = 2
Access level: public API|Class name: ResultCode
Method or attribute name: GENERAL_ERROR = 2
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: CANCELED = 3
Access level: public API|Class name: ResultCode
Method or attribute name: CANCELED = 3
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: TIMEOUT = 4
Access level: public API|Class name: ResultCode
Method or attribute name: TIMEOUT = 4
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: TYPE_NOT_SUPPORT = 5
Access level: public API|Class name: ResultCode
Method or attribute name: TYPE_NOT_SUPPORT = 5
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: TRUST_LEVEL_NOT_SUPPORT = 6
Access level: public API|Class name: ResultCode
Method or attribute name: TRUST_LEVEL_NOT_SUPPORT = 6
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: BUSY = 7
Access level: public API|Class name: ResultCode
Method or attribute name: BUSY = 7
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: INVALID_PARAMETERS = 8
Access level: public API|Class name: ResultCode
Method or attribute name: INVALID_PARAMETERS = 8
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: LOCKED = 9
Access level: public API|Class name: ResultCode
Method or attribute name: LOCKED = 9
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ResultCode
Method or attribute name: NOT_ENROLLED = 10
Access level: public API|Class name: ResultCode
Method or attribute name: NOT_ENROLLED = 10
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_BRIGHT = 1
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_BRIGHT = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_DARK = 2
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_DARK = 2
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_CLOSE = 3
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_CLOSE = 3
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_FAR = 4
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_FAR = 4
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_HIGH = 5
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_HIGH = 5
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LOW = 6
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LOW = 6
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_RIGHT = 7
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_RIGHT = 7
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LEFT = 8
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LEFT = 8
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_MUCH_MOTION = 9
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_MUCH_MOTION = 9
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_POOR_GAZE = 10
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_POOR_GAZE = 10
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_NOT_DETECTED = 11
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_NOT_DETECTED = 11
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_GOOD = 0
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_GOOD = 0
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_IMAGER_DIRTY = 1
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_IMAGER_DIRTY = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_INSUFFICIENT = 2
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_INSUFFICIENT = 2
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_PARTIAL = 3
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_PARTIAL = 3
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_FAST = 4
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_FAST = 4
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_SLOW = 5
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_SLOW = 5
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_NOT_EXIST = 0
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_NOT_EXIST = 0
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_BASE = 1
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_BASE = 1
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_DEVICE_OWNER = 2
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_DEVICE_OWNER = 2
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_PROFILE_OWNER = 3
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_PROFILE_OWNER = 3
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ConstraintSourceTypeInfo
Method or attribute name: localId: number;
Access level: public API|Class name: ConstraintSourceTypeInfo
Method or attribute name: localId: number;
Access level: system API|@ohos.account.osAccount.d.ts| +|Access level changed|Class name: ConstraintSourceTypeInfo
Method or attribute name: type: ConstraintSourceType;
Access level: public API|Class name: ConstraintSourceTypeInfo
Method or attribute name: type: ConstraintSourceType;
Access level: system API|@ohos.account.osAccount.d.ts| +|Error code added|NA|Class name: UserAuth
Method or attribute name: constructor();
Error code: 202|@ohos.account.osAccount.d.ts| +|Error code added|NA|Class name: UserAuth
Method or attribute name: getVersion(): number;
Error code: 202|@ohos.account.osAccount.d.ts| +|Error code added|NA|Class name: PINAuth
Method or attribute name: constructor();
Error code: 202|@ohos.account.osAccount.d.ts| +|Error code added|NA|Class name: UserIdentityManager
Method or attribute name: constructor();
Error code: 202|@ohos.account.osAccount.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..f5c76f0c7e1cb7015ade9bc4fafeb5fc2930786e --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md @@ -0,0 +1,2058 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.arkui.componentSnapshot
Class name: componentSnapshot|@ohos.arkui.componentSnapshot.d.ts| +|Added|NA|Module name: ohos.arkui.componentSnapshot
Class name: componentSnapshot
Method or attribute name: function get(id: string, callback: AsyncCallback\): void;|@ohos.arkui.componentSnapshot.d.ts| +|Added|NA|Module name: ohos.arkui.componentSnapshot
Class name: componentSnapshot
Method or attribute name: function get(id: string): Promise\;|@ohos.arkui.componentSnapshot.d.ts| +|Added|NA|Module name: ohos.arkui.componentSnapshot
Class name: componentSnapshot
Method or attribute name: function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback\): void;|@ohos.arkui.componentSnapshot.d.ts| +|Added|NA|Module name: ohos.arkui.componentSnapshot
Class name: componentSnapshot
Method or attribute name: function createFromBuilder(builder: CustomBuilder): Promise\;|@ohos.arkui.componentSnapshot.d.ts| +|Added|NA|Module name: ohos.arkui.drawableDescriptor
Class name: DrawableDescriptor|@ohos.arkui.drawableDescriptor.d.ts| +|Added|NA|Module name: ohos.arkui.drawableDescriptor
Class name: DrawableDescriptor
Method or attribute name: constructor();|@ohos.arkui.drawableDescriptor.d.ts| +|Added|NA|Module name: ohos.arkui.drawableDescriptor
Class name: DrawableDescriptor
Method or attribute name: getPixelMap(): image.PixelMap;|@ohos.arkui.drawableDescriptor.d.ts| +|Added|NA|Module name: ohos.arkui.drawableDescriptor
Class name: LayeredDrawableDescriptor|@ohos.arkui.drawableDescriptor.d.ts| +|Added|NA|Module name: ohos.arkui.drawableDescriptor
Class name: LayeredDrawableDescriptor
Method or attribute name: getForeground(): DrawableDescriptor;|@ohos.arkui.drawableDescriptor.d.ts| +|Added|NA|Module name: ohos.arkui.drawableDescriptor
Class name: LayeredDrawableDescriptor
Method or attribute name: getBackground(): DrawableDescriptor;|@ohos.arkui.drawableDescriptor.d.ts| +|Added|NA|Module name: ohos.arkui.drawableDescriptor
Class name: LayeredDrawableDescriptor
Method or attribute name: getMask(): DrawableDescriptor;|@ohos.arkui.drawableDescriptor.d.ts| +|Added|NA|Class name: curves
Method or attribute name: function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve;|@ohos.curves.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: textContent: string \| Resource;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: constraintWidth?: number \| string \| Resource;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: textAlign?: number \| TextAlign;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: overflow?: number \| TextOverflow;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: maxLines?: number;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: lineHeight?: number \| string \| Resource;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: baselineOffset?: number \| string;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureOptions
Method or attribute name: textCase?: number \| TextCase;|@ohos.measure.d.ts| +|Added|NA|Module name: ohos.measure
Class name: MeasureText
Method or attribute name: static measureTextSize(options: MeasureOptions): SizeOptions;|@ohos.measure.d.ts| +|Added|NA|Class name: MeasureText
Method or attribute name: static measureTextSize(options: MeasureOptions): SizeOptions;|@ohos.measure.d.ts| +|Added|NA|Module name: ohos.uiAppearance
Class name: uiAppearance|@ohos.uiAppearance.d.ts| +|Added|NA|Module name: ohos.uiAppearance
Class name: DarkMode|@ohos.uiAppearance.d.ts| +|Added|NA|Module name: ohos.uiAppearance
Class name: DarkMode
Method or attribute name: ALWAYS_DARK = 0|@ohos.uiAppearance.d.ts| +|Added|NA|Module name: ohos.uiAppearance
Class name: DarkMode
Method or attribute name: ALWAYS_LIGHT = 1|@ohos.uiAppearance.d.ts| +|Added|NA|Module name: ohos.uiAppearance
Class name: uiAppearance
Method or attribute name: function setDarkMode(mode: DarkMode, callback: AsyncCallback\): void;|@ohos.uiAppearance.d.ts| +|Added|NA|Module name: ohos.uiAppearance
Class name: uiAppearance
Method or attribute name: function setDarkMode(mode: DarkMode): Promise\;|@ohos.uiAppearance.d.ts| +|Added|NA|Module name: ohos.uiAppearance
Class name: uiAppearance
Method or attribute name: function getDarkMode(): DarkMode;|@ohos.uiAppearance.d.ts| +|Added|NA|Class name: AlertDialogParamWithConfirm
Method or attribute name: confirm?: {
/**
* Text content of the confirmation button.
* @since 7
*/
/**
* Text content of the confirmation button.
* @crossplatform
* @since 10
*/
value: ResourceStr;

/**
* Text color of the confirmation button.
* @since 7
*/
/**
* Text color of the confirmation button.
* @crossplatform
* @since 10
*/
fontColor?: ResourceColor;

/**
* Background color of the confirmation button.
* @since 7
*/
/**
* Background color of the confirmation button.
* @crossplatform
* @since 10
*/
backgroundColor?: ResourceColor;

/**
* Method executed by the callback.
* @since 7
*/
/**
* Method executed by the callback.
* @crossplatform
* @since 10
*/
action: () => void;
};|alert_dialog.d.ts| +|Added|NA|Class name: AlertDialogParamWithButtons
Method or attribute name: primaryButton: {
/**
* Text content of the confirmation button.
* @since 7
*/
/**
* Text content of the confirmation button.
* @crossplatform
* @since 10
*/
value: ResourceStr;

/**
* Text color of the confirmation button.
* @since 7
*/
/**
* Text color of the confirmation button.
* @crossplatform
* @since 10
*/
fontColor?: ResourceColor;

/**
* Background color of the confirmation button.
* @since 7
*/
/**
* Background color of the confirmation button.
* @crossplatform
* @since 10
*/
backgroundColor?: ResourceColor;

/**
* Method executed by the callback.
* @since 7
*/
/**
* Method executed by the callback.
* @crossplatform
* @since 10
*/
action: () => void;
};|alert_dialog.d.ts| +|Added|NA|Class name: AlertDialogParamWithButtons
Method or attribute name: secondaryButton: {
/**
* Text content of the confirmation button.
* @since 7
*/
/**
* Text content of the confirmation button.
* @crossplatform
* @since 10
*/
value: ResourceStr;

/**
* Text color of the confirmation button.
* @since 7
*/
/**
* Text color of the confirmation button.
* @crossplatform
* @since 10
*/
fontColor?: ResourceColor;

/**
* Background color of the confirmation button.
* @since 7
*/
/**
* Background color of the confirmation button.
* @crossplatform
* @since 10
*/
backgroundColor?: ResourceColor;

/**
* Method executed by the callback.
* @since 7
*/
/**
* Method executed by the callback.
* @crossplatform
* @since 10
*/
action: () => void;
};|alert_dialog.d.ts| +|Added|NA|Class name: AlphabetIndexerAttribute
Method or attribute name: popupSelectedColor(value: ResourceColor): AlphabetIndexerAttribute;|alphabet_indexer.d.ts| +|Added|NA|Class name: AlphabetIndexerAttribute
Method or attribute name: popupUnselectedColor(value: ResourceColor): AlphabetIndexerAttribute;|alphabet_indexer.d.ts| +|Added|NA|Class name: AlphabetIndexerAttribute
Method or attribute name: popupItemBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute;|alphabet_indexer.d.ts| +|Added|NA|Class name: AlphabetIndexerAttribute
Method or attribute name: popupItemFont(value: Font): AlphabetIndexerAttribute;|alphabet_indexer.d.ts| +|Added|NA|Module name: badge
Class name: BadgeStyle
Method or attribute name: borderColor?: ResourceColor;|badge.d.ts| +|Added|NA|Module name: badge
Class name: BadgeStyle
Method or attribute name: borderWidth?: Length;|badge.d.ts| +|Added|NA|Module name: badge
Class name: BadgeStyle
Method or attribute name: fontWeight?: number \| FontWeight \| string;|badge.d.ts| +|Added|NA|Module name: button
Class name: LabelStyle|button.d.ts| +|Added|NA|Module name: button
Class name: LabelStyle
Method or attribute name: overflow?: TextOverflow;|button.d.ts| +|Added|NA|Module name: button
Class name: LabelStyle
Method or attribute name: maxLines?: number;|button.d.ts| +|Added|NA|Module name: button
Class name: LabelStyle
Method or attribute name: minFontSize?: number \| ResourceStr;|button.d.ts| +|Added|NA|Module name: button
Class name: LabelStyle
Method or attribute name: maxFontSize?: number \| ResourceStr;|button.d.ts| +|Added|NA|Module name: button
Class name: LabelStyle
Method or attribute name: heightAdaptivePolicy?: TextHeightAdaptivePolicy;|button.d.ts| +|Added|NA|Module name: button
Class name: LabelStyle
Method or attribute name: font?: Font;|button.d.ts| +|Added|NA|Module name: button
Class name: ButtonAttribute
Method or attribute name: labelStyle(value: LabelStyle): ButtonAttribute;|button.d.ts| +|Added|NA|Module name: canvas
Class name: CanvasPattern|canvas.d.ts| +|Added|NA|Module name: canvas
Class name: CanvasPattern
Method or attribute name: setTransform(transform?: Matrix2D): void;|canvas.d.ts| +|Added|NA|Class name: CanvasRenderer
Method or attribute name: fillStyle: string \| number \| CanvasGradient \| CanvasPattern;|canvas.d.ts| +|Added|NA|Class name: CanvasRenderer
Method or attribute name: strokeStyle: string \| number \| CanvasGradient \| CanvasPattern;|canvas.d.ts| +|Added|NA|Class name: CanvasRenderer
Method or attribute name: createConicGradient(
startAngle: number,
x: number,
y: number
): CanvasGradient;|canvas.d.ts| +|Added|NA|Class name: CanvasRenderer
Method or attribute name: putImageData(imagedata: ImageData, dx: number \| string, dy: number \| string): void;|canvas.d.ts| +|Added|NA|Class name: CanvasRenderer
Method or attribute name: putImageData(
imagedata: ImageData,
dx: number \| string,
dy: number \| string,
dirtyX: number \| string,
dirtyY: number \| string,
dirtyWidth: number \| string,
dirtyHeight: number \| string
): void;|canvas.d.ts| +|Added|NA|Module name: canvas
Class name: OffscreenCanvas
Method or attribute name: getContext(contextType: "2d", option?: RenderingContextSettings): OffscreenCanvasRenderingContext2D;|canvas.d.ts| +|Added|NA|Class name: OffscreenCanvas
Method or attribute name: getContext(contextType: "2d", option?: RenderingContextSettings): OffscreenCanvasRenderingContext2D;|canvas.d.ts| +|Added|NA|Module name: checkbox
Class name: CheckboxAttribute
Method or attribute name: unselectedColor(value: ResourceColor): CheckboxAttribute;|checkbox.d.ts| +|Added|NA|Module name: checkbox
Class name: CheckboxAttribute
Method or attribute name: mark(value: MarkStyle): CheckboxAttribute;|checkbox.d.ts| +|Added|NA|Module name: checkboxgroup
Class name: CheckboxGroupAttribute
Method or attribute name: unselectedColor(value: ResourceColor): CheckboxGroupAttribute;|checkboxgroup.d.ts| +|Added|NA|Module name: checkboxgroup
Class name: CheckboxGroupAttribute
Method or attribute name: mark(value: MarkStyle): CheckboxGroupAttribute;|checkboxgroup.d.ts| +|Added|NA|Class name: global
Method or attribute name: declare const AnimatableExtend: MethodDecorator & ((value: Object) => MethodDecorator);|common.d.ts| +|Added|NA|Module name: common
Class name: AnimatableArithmetic|common.d.ts| +|Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: plus(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| +|Added|NA|Class name: AnimatableArithmetic
Method or attribute name: plus(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| +|Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: subtract(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| +|Added|NA|Class name: AnimatableArithmetic
Method or attribute name: subtract(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| +|Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: multiply(scale: number): AnimatableArithmetic\;|common.d.ts| +|Added|NA|Class name: AnimatableArithmetic
Method or attribute name: multiply(scale: number): AnimatableArithmetic\;|common.d.ts| +|Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: equals(rhs: AnimatableArithmetic\): boolean;|common.d.ts| +|Added|NA|Class name: AnimatableArithmetic
Method or attribute name: equals(rhs: AnimatableArithmetic\): boolean;|common.d.ts| +|Added|NA|Class name: global
Method or attribute name: declare const Recycle: ClassDecorator;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEdge|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEdge
Method or attribute name: TOP|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEdge
Method or attribute name: BOTTOM|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEdge
Method or attribute name: START|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEdge
Method or attribute name: END|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static readonly IDENTITY: TransitionEffect\<"identity">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static readonly OPACITY: TransitionEffect\<"opacity">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static readonly SLIDE: TransitionEffect\<
"asymmetric",
{
appear: TransitionEffect\<"move", TransitionEdge>;
disappear: TransitionEffect\<"move", TransitionEdge>;
}
>;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static readonly SLIDE_SWITCH: TransitionEffect\<"slideSwitch">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static translate(options: TranslateOptions): TransitionEffect\<"translate">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static rotate(options: RotateOptions): TransitionEffect\<"rotate">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static scale(options: ScaleOptions): TransitionEffect\<"scale">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static opacity(alpha: number): TransitionEffect\<"opacity">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static move(edge: TransitionEdge): TransitionEffect\<"move">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: static asymmetric(
appear: TransitionEffect,
disappear: TransitionEffect
): TransitionEffect\<"asymmetric">;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: constructor(type: Type, effect: Effect);|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: animation(value: AnimateParam): TransitionEffect;|common.d.ts| +|Added|NA|Module name: common
Class name: TransitionEffect
Method or attribute name: combine(transitionEffect: TransitionEffect): TransitionEffect;|common.d.ts| +|Added|NA|Class name: SourceTool
Method or attribute name: Finger|common.d.ts| +|Added|NA|Class name: SourceTool
Method or attribute name: Pen|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BackgroundThin|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BackgroundRegular|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BackgroundThick|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BackgroundUltraThick|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BACKGROUND_THIN|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BACKGROUND_REGULAR|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BACKGROUND_THICK|common.d.ts| +|Added|NA|Class name: BlurStyle
Method or attribute name: BACKGROUND_ULTRA_THICK|common.d.ts| +|Added|NA|Module name: common
Class name: ThemeColorMode|common.d.ts| +|Added|NA|Module name: common
Class name: ThemeColorMode
Method or attribute name: System|common.d.ts| +|Added|NA|Module name: common
Class name: ThemeColorMode
Method or attribute name: Light|common.d.ts| +|Added|NA|Module name: common
Class name: ThemeColorMode
Method or attribute name: Dark|common.d.ts| +|Added|NA|Module name: common
Class name: ThemeColorMode
Method or attribute name: SYSTEM|common.d.ts| +|Added|NA|Module name: common
Class name: ThemeColorMode
Method or attribute name: LIGHT|common.d.ts| +|Added|NA|Module name: common
Class name: ThemeColorMode
Method or attribute name: DARK|common.d.ts| +|Added|NA|Module name: common
Class name: AdaptiveColor|common.d.ts| +|Added|NA|Module name: common
Class name: AdaptiveColor
Method or attribute name: Default|common.d.ts| +|Added|NA|Module name: common
Class name: AdaptiveColor
Method or attribute name: Average|common.d.ts| +|Added|NA|Module name: common
Class name: AdaptiveColor
Method or attribute name: DEFAULT|common.d.ts| +|Added|NA|Module name: common
Class name: AdaptiveColor
Method or attribute name: AVERAGE|common.d.ts| +|Added|NA|Module name: common
Class name: ModalTransition|common.d.ts| +|Added|NA|Module name: common
Class name: ModalTransition
Method or attribute name: Default|common.d.ts| +|Added|NA|Module name: common
Class name: ModalTransition
Method or attribute name: None|common.d.ts| +|Added|NA|Module name: common
Class name: ModalTransition
Method or attribute name: Alpha|common.d.ts| +|Added|NA|Module name: common
Class name: ModalTransition
Method or attribute name: DEFAULT|common.d.ts| +|Added|NA|Module name: common
Class name: ModalTransition
Method or attribute name: NONE|common.d.ts| +|Added|NA|Module name: common
Class name: ModalTransition
Method or attribute name: ALPHA|common.d.ts| +|Added|NA|Module name: common
Class name: BackgroundBlurStyleOptions|common.d.ts| +|Added|NA|Module name: common
Class name: BackgroundBlurStyleOptions
Method or attribute name: colorMode?: ThemeColorMode;|common.d.ts| +|Added|NA|Class name: BackgroundBlurStyleOptions
Method or attribute name: colorMode?: ThemeColorMode;|common.d.ts| +|Added|NA|Module name: common
Class name: BackgroundBlurStyleOptions
Method or attribute name: adaptiveColor?: AdaptiveColor;|common.d.ts| +|Added|NA|Class name: BackgroundBlurStyleOptions
Method or attribute name: adaptiveColor?: AdaptiveColor;|common.d.ts| +|Added|NA|Module name: common
Class name: BackgroundBlurStyleOptions
Method or attribute name: scale?: number;|common.d.ts| +|Added|NA|Class name: BackgroundBlurStyleOptions
Method or attribute name: scale?: number;|common.d.ts| +|Added|NA|Module name: common
Class name: PickerTextStyle|common.d.ts| +|Added|NA|Class name: PickerTextStyle
Method or attribute name: |common.d.ts| +|Added|NA|Module name: common
Class name: PickerTextStyle
Method or attribute name: color?: ResourceColor;|common.d.ts| +|Added|NA|Module name: common
Class name: PickerTextStyle
Method or attribute name: font?: Font;|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowType|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowType
Method or attribute name: COLOR|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowType
Method or attribute name: BLUR|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowOptions|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowOptions
Method or attribute name: radius: number \| Resource;|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowOptions
Method or attribute name: type?: ShadowType;|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowOptions
Method or attribute name: color?: Color \| string \| Resource;|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowOptions
Method or attribute name: offsetX?: number \| Resource;|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowOptions
Method or attribute name: offsetY?: number \| Resource;|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OuterDefaultXS|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OuterDefaultSM|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OuterDefaultMD|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OuterDefaultLG|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OuterFloatingSM|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OuterFloatingMD|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OUTER_DEFAULT_XS|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OUTER_DEFAULT_SM|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OUTER_DEFAULT_MD|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OUTER_DEFAULT_LG|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OUTER_FLOATING_SM|common.d.ts| +|Added|NA|Module name: common
Class name: ShadowStyle
Method or attribute name: OUTER_FLOATING_MD|common.d.ts| +|Added|NA|Module name: common
Class name: SheetSize|common.d.ts| +|Added|NA|Module name: common
Class name: SheetSize
Method or attribute name: MEDIUM|common.d.ts| +|Added|NA|Module name: common
Class name: SheetSize
Method or attribute name: LARGE|common.d.ts| +|Added|NA|Module name: common
Class name: DragBehavior|common.d.ts| +|Added|NA|Module name: common
Class name: DragBehavior
Method or attribute name: COPY|common.d.ts| +|Added|NA|Module name: common
Class name: DragBehavior
Method or attribute name: MOVE|common.d.ts| +|Added|NA|Module name: common
Class name: DragRet|common.d.ts| +|Added|NA|Module name: common
Class name: DragRet
Method or attribute name: DRAG_SUCCESS|common.d.ts| +|Added|NA|Module name: common
Class name: DragRet
Method or attribute name: DRAG_FAILED|common.d.ts| +|Added|NA|Module name: common
Class name: DragRet
Method or attribute name: DRAG_CANCELED|common.d.ts| +|Added|NA|Module name: common
Class name: DragRet
Method or attribute name: DROP_ENABLED|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: dragBehavior: DragBehavior;|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: useCustomDropAnimation: boolean;|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: setData(unifiedData: UnifiedData): void;|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: getData(): UnifiedData;|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: getSummary(): Summary;|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: setResult(dragRet: DragRet): void;|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: getResult(): DragRet;|common.d.ts| +|Added|NA|Class name: DragEvent
Method or attribute name: getPreviewRect(): Rectangle;|common.d.ts| +|Added|NA|Module name: common
Class name: SheetStyle|common.d.ts| +|Added|NA|Module name: common
Class name: SheetStyle
Method or attribute name: height?: SheetSize \| Length;|common.d.ts| +|Added|NA|Module name: common
Class name: SheetStyle
Method or attribute name: dragBar?: boolean;|common.d.ts| +|Added|NA|Module name: common
Class name: PopupMessageOptions|common.d.ts| +|Added|NA|Module name: common
Class name: PopupMessageOptions
Method or attribute name: textColor?: ResourceColor;|common.d.ts| +|Added|NA|Module name: common
Class name: PopupMessageOptions
Method or attribute name: font?: Font;|common.d.ts| +|Added|NA|Class name: PopupOptions
Method or attribute name: placement?: Placement;|common.d.ts| +|Added|NA|Class name: PopupOptions
Method or attribute name: primaryButton?: {
/**
* Button text value
* @since 7
*/
/**
* Button text value
* @crossplatform
* @since 10
*/
value: string;

/**
* action
* @since 7
*/
/**
* action
* @crossplatform
* @since 10
*/
action: () => void;
};|common.d.ts| +|Added|NA|Class name: PopupOptions
Method or attribute name: secondaryButton?: {
/**
* Button text value
* @since 7
*/
/**
* Button text value
* @crossplatform
* @since 10
*/
value: string;

/**
* action
* @since 7
*/
/**
* action
* @crossplatform
* @since 10
*/
action: () => void;
};|common.d.ts| +|Added|NA|Class name: PopupOptions
Method or attribute name: mask?: boolean \| { color: ResourceColor };|common.d.ts| +|Added|NA|Class name: PopupOptions
Method or attribute name: messageOptions?: PopupMessageOptions|common.d.ts| +|Added|NA|Class name: PopupOptions
Method or attribute name: targetSpace?: Length|common.d.ts| +|Added|NA|Class name: CustomPopupOptions
Method or attribute name: mask?: boolean \| { color: ResourceColor };|common.d.ts| +|Added|NA|Class name: CustomPopupOptions
Method or attribute name: targetSpace?: Length|common.d.ts| +|Added|NA|Module name: common
Class name: ContextMenuOptions|common.d.ts| +|Added|NA|Module name: common
Class name: ContextMenuOptions
Method or attribute name: offset?: Position;|common.d.ts| +|Added|NA|Module name: common
Class name: ContextMenuOptions
Method or attribute name: placement?: Placement;|common.d.ts| +|Added|NA|Module name: common
Class name: ContextMenuOptions
Method or attribute name: onAppear?: () => void;|common.d.ts| +|Added|NA|Module name: common
Class name: ContextMenuOptions
Method or attribute name: onDisappear?: () => void;|common.d.ts| +|Added|NA|Module name: common
Class name: MenuOptions|common.d.ts| +|Added|NA|Module name: common
Class name: MenuOptions
Method or attribute name: title?: ResourceStr;|common.d.ts| +|Added|NA|Module name: common
Class name: ProgressMask|common.d.ts| +|Added|NA|Module name: common
Class name: ProgressMask
Method or attribute name: constructor(value: number, total: number, color: ResourceColor);|common.d.ts| +|Added|NA|Module name: common
Class name: ProgressMask
Method or attribute name: updateProgress(value: number): void;|common.d.ts| +|Added|NA|Module name: common
Class name: ProgressMask
Method or attribute name: updateColor(value: ResourceColor): void;|common.d.ts| +|Added|NA|Module name: common
Class name: PixelStretchEffectOptions|common.d.ts| +|Added|NA|Module name: common
Class name: PixelStretchEffectOptions
Method or attribute name: top?: Length;|common.d.ts| +|Added|NA|Module name: common
Class name: PixelStretchEffectOptions
Method or attribute name: bottom?: Length;|common.d.ts| +|Added|NA|Module name: common
Class name: PixelStretchEffectOptions
Method or attribute name: left?: Length;|common.d.ts| +|Added|NA|Module name: common
Class name: PixelStretchEffectOptions
Method or attribute name: right?: Length;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: foregroundColor(value: ResourceColor \| ColoringStrategy): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: onDragEnd(event: (event: DragEvent, extraParams?: string) => void): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: allowDrop(value: Array\): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: draggable(value: boolean): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: bindContentCover(isShow: boolean, builder: CustomBuilder, type?: ModalTransition): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: bindSheet(isShow: boolean, builder: CustomBuilder, style?: SheetStyle): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: sphericalEffect(value: number): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: lightUpEffect(value: number): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: pixelStretchEffect(options: PixelStretchEffectOptions): T;|common.d.ts| +|Added|NA|Class name: CommonMethod
Method or attribute name: keyboardShortcut(value: string \| FunctionKey, keys: Array\, action?: () => void): T;|common.d.ts| +|Added|NA|Class name: CustomComponent
Method or attribute name: onRecycle?(params: { [key: string]: unknown }): void;|common.d.ts| +|Added|NA|Class name: SubscribedAbstractProperty
Method or attribute name: abstract aboutToBeDeleted(): void;|common_ts_ets_api.d.ts| +|Added|NA|Module name: counter
Class name: CounterAttribute
Method or attribute name: enableDec(value: boolean): CounterAttribute;|counter.d.ts| +|Added|NA|Module name: counter
Class name: CounterAttribute
Method or attribute name: enableInc(value: boolean): CounterAttribute;|counter.d.ts| +|Added|NA|Class name: CustomDialogControllerOptions
Method or attribute name: maskColor?: ResourceColor;|custom_dialog_controller.d.ts| +|Added|NA|Class name: CustomDialogControllerOptions
Method or attribute name: openAnimation?: AnimateParam;|custom_dialog_controller.d.ts| +|Added|NA|Class name: CustomDialogControllerOptions
Method or attribute name: closeAnimation?: AnimateParam;|custom_dialog_controller.d.ts| +|Added|NA|Class name: CustomDialogControllerOptions
Method or attribute name: showInSubWindow?: boolean;|custom_dialog_controller.d.ts| +|Added|NA|Module name: data_panel
Class name: LinearGradient|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: LinearGradient
Method or attribute name: constructor(colorStops: ColorStop[]);|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelShadowOption|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelShadowOption
Method or attribute name: radius?: number \| Resource;|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelShadowOption
Method or attribute name: colors?: Array\;|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelShadowOption
Method or attribute name: offsetX?: number \| Resource;|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelShadowOption
Method or attribute name: offsetY?: number \| Resource;|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelAttribute
Method or attribute name: valueColors(value: Array\): DataPanelAttribute;|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelAttribute
Method or attribute name: trackBackgroundColor(value: ResourceColor): DataPanelAttribute;|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelAttribute
Method or attribute name: strokeWidth(value: Length): DataPanelAttribute;|data_panel.d.ts| +|Added|NA|Module name: data_panel
Class name: DataPanelAttribute
Method or attribute name: trackShadow(value: DataPanelShadowOption): DataPanelAttribute;|data_panel.d.ts| +|Added|NA|Class name: DatePickerAttribute
Method or attribute name: disappearTextStyle(value: PickerTextStyle): DatePickerAttribute;|date_picker.d.ts| +|Added|NA|Class name: DatePickerAttribute
Method or attribute name: textStyle(value: PickerTextStyle): DatePickerAttribute;|date_picker.d.ts| +|Added|NA|Class name: DatePickerAttribute
Method or attribute name: selectedTextStyle(value: PickerTextStyle): DatePickerAttribute;|date_picker.d.ts| +|Added|NA|Class name: DatePickerDialogOptions
Method or attribute name: showTime?: boolean;|date_picker.d.ts| +|Added|NA|Class name: DatePickerDialogOptions
Method or attribute name: useMilitaryTime?: boolean;|date_picker.d.ts| +|Added|NA|Class name: DatePickerDialogOptions
Method or attribute name: disappearTextStyle?: PickerTextStyle;|date_picker.d.ts| +|Added|NA|Class name: DatePickerDialogOptions
Method or attribute name: textStyle?: PickerTextStyle;|date_picker.d.ts| +|Added|NA|Class name: DatePickerDialogOptions
Method or attribute name: selectedTextStyle?: PickerTextStyle;|date_picker.d.ts| +|Added|NA|Module name: enums
Class name: ColoringStrategy|enums.d.ts| +|Added|NA|Module name: enums
Class name: ColoringStrategy
Method or attribute name: INVERT = "invert"|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextAlign
Method or attribute name: Justify|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextAlign
Method or attribute name: JUSTIFY|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextOverflow
Method or attribute name: Marquee|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextOverflow
Method or attribute name: MARQUEE|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextHeightAdaptivePolicy|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextHeightAdaptivePolicy
Method or attribute name: MAX_LINES_FIRST|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextHeightAdaptivePolicy
Method or attribute name: MIN_FONT_SIZE_FIRST|enums.d.ts| +|Added|NA|Module name: enums
Class name: TextHeightAdaptivePolicy
Method or attribute name: LAYOUT_CONSTRAINT_FIRST|enums.d.ts| +|Added|NA|Module name: enums
Class name: ModifierKey|enums.d.ts| +|Added|NA|Module name: enums
Class name: ModifierKey
Method or attribute name: CTRL|enums.d.ts| +|Added|NA|Module name: enums
Class name: ModifierKey
Method or attribute name: SHIFT|enums.d.ts| +|Added|NA|Module name: enums
Class name: ModifierKey
Method or attribute name: ALT|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: ESC|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F1|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F2|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F3|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F4|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F5|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F6|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F7|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F8|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F9|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F10|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F11|enums.d.ts| +|Added|NA|Module name: enums
Class name: FunctionKey
Method or attribute name: F12|enums.d.ts| +|Added|NA|Module name: enums
Class name: ImageSpanAlignment|enums.d.ts| +|Added|NA|Module name: enums
Class name: ImageSpanAlignment
Method or attribute name: BASELINE|enums.d.ts| +|Added|NA|Module name: enums
Class name: ImageSpanAlignment
Method or attribute name: BOTTOM|enums.d.ts| +|Added|NA|Module name: enums
Class name: ImageSpanAlignment
Method or attribute name: CENTER|enums.d.ts| +|Added|NA|Module name: enums
Class name: ImageSpanAlignment
Method or attribute name: TOP|enums.d.ts| +|Added|NA|Module name: form_component
Class name: FormComponentAttribute
Method or attribute name: onLoad(callback: () => void): FormComponentAttribute;|form_component.d.ts| +|Added|NA|Class name: GridAttribute
Method or attribute name: edgeEffect(value: EdgeEffect): GridAttribute;|grid.d.ts| +|Added|NA|Class name: GridRowAttribute
Method or attribute name: alignItems(value: ItemAlign): GridRowAttribute;|grid_row.d.ts| +|Added|NA|Class name: ImageAttribute
Method or attribute name: onError(callback: (event?: {
/**
* Component width.
* @form
* @crossplatform
* @since 10
*/
componentWidth: number;

/**
* Component height.
* @form
* @crossplatform
* @since 10
*/
componentHeight: number
}) => void): ImageAttribute;|image.d.ts| +|Added|NA|Class name: ImageAttribute
Method or attribute name: onError(callback: (event?: {
/**
* Component width.
* @form
* @crossplatform
* @since 10
*/
componentWidth: number;

/**
* Component height.
* @form
* @crossplatform
* @since 10
*/
componentHeight: number;

/**
* Message.
* @form
* @crossplatform
* @since 10
*/
message: string
}) => void): ImageAttribute;|image.d.ts| +|Added|NA|Module name: image_span
Class name: ImageSpanInterface|image_span.d.ts| +|Added|NA|Module name: image_span
Class name: ImageSpanInterface
Method or attribute name: (value: ResourceStr \| PixelMap): ImageSpanAttribute;|image_span.d.ts| +|Added|NA|Module name: image_span
Class name: ImageSpanAttribute|image_span.d.ts| +|Added|NA|Module name: image_span
Class name: ImageSpanAttribute
Method or attribute name: verticalAlign(value: ImageSpanAlignment): ImageSpanAttribute;|image_span.d.ts| +|Added|NA|Module name: image_span
Class name: ImageSpanAttribute
Method or attribute name: objectFit(value: ImageFit): ImageSpanAttribute;|image_span.d.ts| +|Added|NA|Module name: image_span
Class name: global
Method or attribute name: declare const ImageSpan: ImageSpanInterface;|image_span.d.ts| +|Added|NA|Module name: image_span
Class name: global
Method or attribute name: declare const ImageSpanInstance: ImageSpanAttribute;|image_span.d.ts| +|Added|NA|Module name: list
Class name: ChainEdgeEffect|list.d.ts| +|Added|NA|Module name: list
Class name: ChainEdgeEffect
Method or attribute name: DEFAULT|list.d.ts| +|Added|NA|Module name: list
Class name: ChainEdgeEffect
Method or attribute name: STRETCH|list.d.ts| +|Added|NA|Module name: list
Class name: ChainAnimationOptions|list.d.ts| +|Added|NA|Module name: list
Class name: ChainAnimationOptions
Method or attribute name: minSpace: Length;|list.d.ts| +|Added|NA|Module name: list
Class name: ChainAnimationOptions
Method or attribute name: maxSpace: Length;|list.d.ts| +|Added|NA|Module name: list
Class name: ChainAnimationOptions
Method or attribute name: conductivity?: number;|list.d.ts| +|Added|NA|Module name: list
Class name: ChainAnimationOptions
Method or attribute name: intensity?: number;|list.d.ts| +|Added|NA|Module name: list
Class name: ChainAnimationOptions
Method or attribute name: edgeEffect?: ChainEdgeEffect;|list.d.ts| +|Added|NA|Class name: ListAttribute
Method or attribute name: chainAnimationOptions(value: ChainAnimationOptions): ListAttribute;|list.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: scaleX?: number;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: rotateY?: number;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: rotateX?: number;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: scaleY?: number;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: translateX?: number;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: translateY?: number;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: identity(): Matrix2D;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: invert(): Matrix2D;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: multiply(other?: Matrix2D): Matrix2D;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: rotate(rx?: number, ry?: number): Matrix2D;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: rotate(degree: number, rx?: number, ry?: number): Matrix2D;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: translate(tx?: number, ty?: number): Matrix2D;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: scale(sx?: number, sy?: number): Matrix2D;|matrix2d.d.ts| +|Added|NA|Module name: matrix2d
Class name: Matrix2D
Method or attribute name: constructor();|matrix2d.d.ts| +|Added|NA|Class name: MenuAttribute
Method or attribute name: font(value: Font): MenuAttribute;|menu.d.ts| +|Added|NA|Class name: MenuAttribute
Method or attribute name: fontColor(value: ResourceColor): MenuAttribute;|menu.d.ts| +|Added|NA|Class name: MenuItemAttribute
Method or attribute name: contentFont(value: Font): MenuItemAttribute;|menu_item.d.ts| +|Added|NA|Class name: MenuItemAttribute
Method or attribute name: contentFontColor(value: ResourceColor): MenuItemAttribute;|menu_item.d.ts| +|Added|NA|Class name: MenuItemAttribute
Method or attribute name: labelFont(value: Font): MenuItemAttribute;|menu_item.d.ts| +|Added|NA|Class name: MenuItemAttribute
Method or attribute name: labelFontColor(value: ResourceColor): MenuItemAttribute;|menu_item.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathInfo|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathInfo
Method or attribute name: constructor(name: string, param: unknown);|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathInfo
Method or attribute name: name: string;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathInfo
Method or attribute name: param?: unknown;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: constructor();|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: push(info: NavPathInfo): void;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: pushName(name: string, param: unknown): void;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: pop(): NavPathInfo \| undefined;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: popTo(name: string): number;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: popToIndex(index: number): void;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: moveToTop(name: string): number;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: moveIndexToTop(index: number): void;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: clear(): void;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: getAllPathName(): Array\;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: getParamByIndex(index: number): unknown \| undefined;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: getParamByName(name: string): Array\;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: getIndexByName(name: string): Array\;|navigation.d.ts| +|Added|NA|Module name: navigation
Class name: NavPathStack
Method or attribute name: size(): number;|navigation.d.ts| +|Added|NA|Class name: NavigationInterface
Method or attribute name: (pathInfos: NavPathStack): NavigationAttribute;|navigation.d.ts| +|Added|NA|Class name: NavigationAttribute
Method or attribute name: navDestination(builder: (name: string, param: unknown) => void): NavigationAttribute;|navigation.d.ts| +|Added|NA|Class name: NavDestinationAttribute
Method or attribute name: onShown(callback: (param: unknown) => void): NavDestinationAttribute;|nav_destination.d.ts| +|Added|NA|Class name: NavDestinationAttribute
Method or attribute name: onHidden(callback: () => void): NavDestinationAttribute;|nav_destination.d.ts| +|Added|NA|Class name: NavDestinationAttribute
Method or attribute name: onBackPressed(callback: () => boolean): NavDestinationAttribute;|nav_destination.d.ts| +|Added|NA|Module name: nav_router
Class name: RouteInfo|nav_router.d.ts| +|Added|NA|Module name: nav_router
Class name: RouteInfo
Method or attribute name: name: string;|nav_router.d.ts| +|Added|NA|Module name: nav_router
Class name: RouteInfo
Method or attribute name: param?: unknown;|nav_router.d.ts| +|Added|NA|Class name: NavRouterInterface
Method or attribute name: (value: RouteInfo): NavRouterAttribute;|nav_router.d.ts| +|Added|NA|Module name: nav_router
Class name: NavRouteMode|nav_router.d.ts| +|Added|NA|Module name: nav_router
Class name: NavRouteMode
Method or attribute name: PUSH_WITH_RECREATE|nav_router.d.ts| +|Added|NA|Module name: nav_router
Class name: NavRouteMode
Method or attribute name: PUSH|nav_router.d.ts| +|Added|NA|Module name: nav_router
Class name: NavRouteMode
Method or attribute name: REPLACE|nav_router.d.ts| +|Added|NA|Class name: NavRouterAttribute
Method or attribute name: mode(mode: NavRouteMode): NavRouterAttribute;|nav_router.d.ts| +|Added|NA|Module name: radio
Class name: RadioStyle|radio.d.ts| +|Added|NA|Module name: radio
Class name: RadioStyle
Method or attribute name: checkedBackgroundColor?: ResourceColor;|radio.d.ts| +|Added|NA|Module name: radio
Class name: RadioStyle
Method or attribute name: uncheckedBorderColor?: ResourceColor;|radio.d.ts| +|Added|NA|Module name: radio
Class name: RadioStyle
Method or attribute name: indicatorColor?: ResourceColor;|radio.d.ts| +|Added|NA|Module name: radio
Class name: RadioAttribute
Method or attribute name: radioStyle(value?: RadioStyle): RadioAttribute;|radio.d.ts| +|Added|NA|Module name: refresh
Class name: RefreshOptions|refresh.d.ts| +|Added|NA|Module name: refresh
Class name: RefreshOptions
Method or attribute name: refreshing: boolean;|refresh.d.ts| +|Added|NA|Module name: refresh
Class name: RefreshOptions
Method or attribute name: offset?: number \| string;|refresh.d.ts| +|Added|NA|Module name: refresh
Class name: RefreshOptions
Method or attribute name: friction?: number \| string;|refresh.d.ts| +|Added|NA|Module name: refresh
Class name: RefreshOptions
Method or attribute name: builder?: CustomBuilder;|refresh.d.ts| +|Added|NA|Module name: search
Class name: CancelButtonStyle|search.d.ts| +|Added|NA|Module name: search
Class name: CancelButtonStyle
Method or attribute name: CONSTANT|search.d.ts| +|Added|NA|Module name: search
Class name: CancelButtonStyle
Method or attribute name: INVISIBLE|search.d.ts| +|Added|NA|Module name: search
Class name: CancelButtonStyle
Method or attribute name: INPUT|search.d.ts| +|Added|NA|Module name: search
Class name: IconOptions|search.d.ts| +|Added|NA|Module name: search
Class name: IconOptions
Method or attribute name: size?: Length;|search.d.ts| +|Added|NA|Module name: search
Class name: IconOptions
Method or attribute name: color?: ResourceColor;|search.d.ts| +|Added|NA|Module name: search
Class name: IconOptions
Method or attribute name: src?: ResourceStr;|search.d.ts| +|Added|NA|Module name: search
Class name: CaretStyle|search.d.ts| +|Added|NA|Module name: search
Class name: CaretStyle
Method or attribute name: width?: Length,|search.d.ts| +|Added|NA|Module name: search
Class name: CaretStyle
Method or attribute name: color?: ResourceColor,|search.d.ts| +|Added|NA|Module name: search
Class name: SearchButtonOption|search.d.ts| +|Added|NA|Module name: search
Class name: SearchButtonOption
Method or attribute name: fontSize?: Length;|search.d.ts| +|Added|NA|Module name: search
Class name: SearchButtonOption
Method or attribute name: fontColor?: ResourceColor;|search.d.ts| +|Added|NA|Class name: SearchAttribute
Method or attribute name: fontColor(value: ResourceColor): SearchAttribute;|search.d.ts| +|Added|NA|Class name: SearchAttribute
Method or attribute name: searchIcon(value: IconOptions): SearchAttribute;|search.d.ts| +|Added|NA|Class name: SearchAttribute
Method or attribute name: cancelButton(value: { style?: CancelButtonStyle, icon?: IconOptions }): SearchAttribute;|search.d.ts| +|Added|NA|Class name: SearchAttribute
Method or attribute name: caretStyle(value: CaretStyle): SearchAttribute;|search.d.ts| +|Added|NA|Class name: SearchAttribute
Method or attribute name: enableKeyboardOnFocus(value: boolean): SearchAttribute;|search.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonLayoutDirection|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonLayoutDirection
Method or attribute name: HORIZONTAL = 0|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonLayoutDirection
Method or attribute name: VERTICAL = 1|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonLayoutOrder|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonLayoutOrder
Method or attribute name: ICON_FIRST = 0|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonLayoutOrder
Method or attribute name: TEXT_FIRST = 1|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationIconStyle|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationIconStyle
Method or attribute name: FULL_FILLED = 0|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationIconStyle
Method or attribute name: LINES = 1|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: CURRENT_LOCATION = 0|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: ADD_LOCATION = 1|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: SELECT_LOCATION = 2|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: SHARE_LOCATION = 3|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: SEND_LOCATION = 4|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: LOCATING = 5|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: LOCATION = 6|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: SEND_CURRENT_LOCATION = 7|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: RELOCATION = 8|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: PUNCH_IN = 9|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: LocationDescription
Method or attribute name: CURRENT_POSITION = 10|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: BackgroundButtonType|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: BackgroundButtonType
Method or attribute name: CAPSULE_BACKGROUND = 0|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: BackgroundButtonType
Method or attribute name: CIRCLE_BACKGROUND = 1|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: BackgroundButtonType
Method or attribute name: NORMAL_BACKGROUND = 2|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonOptions|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonOptions
Method or attribute name: icon?: LocationIconStyle;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonOptions
Method or attribute name: text?: LocationDescription;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonOptions
Method or attribute name: background?: BackgroundButtonType;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonOnClickResult|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonOnClickResult
Method or attribute name: LOCATION_BUTTON_CLICK_SUCCESS = 0|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonOnClickResult
Method or attribute name: LOCATION_BUTTON_CLICK_GRANT_FAILED = 1|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonInterface|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonInterface
Method or attribute name: (): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonInterface
Method or attribute name: (option: SecLocationButtonOptions): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: iconSize(value: Length): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: layoutDirection(value: SecLocationButtonLayoutDirection): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: layoutOrder(value: SecLocationButtonLayoutOrder): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: position(value: Position): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: markAnchor(value: Position): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: offset(value: Position): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: fontSize(value: Length): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: fontStyle(value: FontStyle): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: fontFamily(value: string \| Resource): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: fontColor(value: ResourceColor): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: iconColor(value: ResourceColor): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: backgroundColor(value: ResourceColor): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: borderStyle(value: BorderStyle): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: borderWidth(value: Length): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: borderColor(value: ResourceColor): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: borderRadius(value: Length): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: backgroundPadding(value: Padding \| Length): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: textIconPadding(value: Length): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: SecLocationButtonAttribute
Method or attribute name: onClick(event: (result: SecLocationButtonOnClickResult, event?: ClickEvent) => void): SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: global
Method or attribute name: declare const SecLocationButton: SecLocationButtonInterface;|sec_location_button.d.ts| +|Added|NA|Module name: sec_location_button
Class name: global
Method or attribute name: declare const SecLocationButtonInstance: SecLocationButtonAttribute;|sec_location_button.d.ts| +|Added|NA|Module name: select
Class name: ArrowPosition|select.d.ts| +|Added|NA|Module name: select
Class name: ArrowPosition
Method or attribute name: END = 0|select.d.ts| +|Added|NA|Module name: select
Class name: ArrowPosition
Method or attribute name: START = 1|select.d.ts| +|Added|NA|Class name: SelectAttribute
Method or attribute name: space(value: Length): SelectAttribute;|select.d.ts| +|Added|NA|Class name: SelectAttribute
Method or attribute name: arrowPosition(value: ArrowPosition): SelectAttribute;|select.d.ts| +|Added|NA|Module name: sidebar
Class name: DividerStyle|sidebar.d.ts| +|Added|NA|Module name: sidebar
Class name: DividerStyle
Method or attribute name: strokeWidth: Length;|sidebar.d.ts| +|Added|NA|Module name: sidebar
Class name: DividerStyle
Method or attribute name: color?: ResourceColor;|sidebar.d.ts| +|Added|NA|Module name: sidebar
Class name: DividerStyle
Method or attribute name: startMargin?: Length;|sidebar.d.ts| +|Added|NA|Module name: sidebar
Class name: DividerStyle
Method or attribute name: endMargin?: Length;|sidebar.d.ts| +|Added|NA|Class name: SideBarContainerAttribute
Method or attribute name: divider(value: DividerStyle \| null): SideBarContainerAttribute;|sidebar.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockType|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockType
Method or attribute name: DEFAULT|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockType
Method or attribute name: IMAGE|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockType
Method or attribute name: SHAPE|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockStyle|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockStyle
Method or attribute name: type: SliderBlockType;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockStyle
Method or attribute name: image?: ResourceStr;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderBlockStyle
Method or attribute name: shape?: CircleAttribute \| EllipseAttribute \| PathAttribute \| RectAttribute;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderAttribute
Method or attribute name: blockBorderColor(value: ResourceColor): SliderAttribute;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderAttribute
Method or attribute name: blockBorderWidth(value: Length): SliderAttribute;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderAttribute
Method or attribute name: stepColor(value: ResourceColor): SliderAttribute;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderAttribute
Method or attribute name: trackBorderRadius(value: Length): SliderAttribute;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderAttribute
Method or attribute name: blockSize(value: SizeOptions): SliderAttribute;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderAttribute
Method or attribute name: blockStyle(value: SliderBlockStyle): SliderAttribute;|slider.d.ts| +|Added|NA|Module name: slider
Class name: SliderAttribute
Method or attribute name: stepSize(value: Length): SliderAttribute;|slider.d.ts| +|Added|NA|Module name: swiper
Class name: Indicator|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: Indicator
Method or attribute name: left(value: Length): T;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: Indicator
Method or attribute name: top(value: Length): T;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: Indicator
Method or attribute name: right(value: Length): T;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: Indicator
Method or attribute name: bottom(value: Length): T;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: Indicator
Method or attribute name: static dot(): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: Indicator
Method or attribute name: static digit(): DigitIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: constructor();|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: itemWidth(value: Length): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: itemHeight(value: Length): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: selectedItemWidth(value: Length): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: selectedItemHeight(value: Length): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: mask(value: boolean): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: color(value: ResourceColor): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DotIndicator
Method or attribute name: selectedColor(value: ResourceColor): DotIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DigitIndicator|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DigitIndicator
Method or attribute name: constructor();|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DigitIndicator
Method or attribute name: fontColor(value: ResourceColor): DigitIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DigitIndicator
Method or attribute name: selectedFontColor(value: ResourceColor): DigitIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DigitIndicator
Method or attribute name: digitFont(value: Font): DigitIndicator;|swiper.d.ts| +|Added|NA|Module name: swiper
Class name: DigitIndicator
Method or attribute name: selectedDigitFont(value: Font): DigitIndicator;|swiper.d.ts| +|Added|NA|Class name: SwiperDisplayMode
Method or attribute name: STRETCH|swiper.d.ts| +|Added|NA|Class name: SwiperDisplayMode
Method or attribute name: AUTO_LINEAR|swiper.d.ts| +|Added|NA|Class name: SwiperAttribute
Method or attribute name: prevMargin(value: Length): SwiperAttribute;|swiper.d.ts| +|Added|NA|Class name: SwiperAttribute
Method or attribute name: nextMargin(value: Length): SwiperAttribute;|swiper.d.ts| +|Added|NA|Module name: tabs
Class name: DividerStyle|tabs.d.ts| +|Added|NA|Module name: tabs
Class name: DividerStyle
Method or attribute name: strokeWidth: Length;|tabs.d.ts| +|Added|NA|Module name: tabs
Class name: DividerStyle
Method or attribute name: color?: ResourceColor;|tabs.d.ts| +|Added|NA|Module name: tabs
Class name: DividerStyle
Method or attribute name: startMargin?: Length;|tabs.d.ts| +|Added|NA|Module name: tabs
Class name: DividerStyle
Method or attribute name: endMargin?: Length;|tabs.d.ts| +|Added|NA|Class name: TabsAttribute
Method or attribute name: fadingEdge(value: boolean): TabsAttribute;|tabs.d.ts| +|Added|NA|Class name: TabsAttribute
Method or attribute name: divider(value: DividerStyle \| null): TabsAttribute;|tabs.d.ts| +|Added|NA|Module name: tab_content
Class name: SelectedMode|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: SelectedMode
Method or attribute name: INDICATOR|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: SelectedMode
Method or attribute name: BOARD|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: IndicatorStyle|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: IndicatorStyle
Method or attribute name: color?: ResourceColor;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: IndicatorStyle
Method or attribute name: height?: Length;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: IndicatorStyle
Method or attribute name: width?: Length;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: IndicatorStyle
Method or attribute name: borderRadius?: Length;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: IndicatorStyle
Method or attribute name: marginTop?: Length;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: BoardStyle|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: BoardStyle
Method or attribute name: borderRadius?: Length;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: LabelStyle|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: LabelStyle
Method or attribute name: overflow?: TextOverflow;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: LabelStyle
Method or attribute name: maxLines?: number;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: LabelStyle
Method or attribute name: minFontSize?: number \| ResourceStr;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: LabelStyle
Method or attribute name: maxFontSize?: number \| ResourceStr;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: LabelStyle
Method or attribute name: heightAdaptivePolicy?: TextHeightAdaptivePolicy;|tab_content.d.ts| +|Added|NA|Module name: tab_content
Class name: LabelStyle
Method or attribute name: font?: Font;|tab_content.d.ts| +|Added|NA|Class name: SubTabBarStyle
Method or attribute name: static of(content: ResourceStr): SubTabBarStyle;|tab_content.d.ts| +|Added|NA|Class name: SubTabBarStyle
Method or attribute name: selectedMode(value: SelectedMode): SubTabBarStyle;|tab_content.d.ts| +|Added|NA|Class name: SubTabBarStyle
Method or attribute name: board(value: BoardStyle): SubTabBarStyle;|tab_content.d.ts| +|Added|NA|Class name: SubTabBarStyle
Method or attribute name: labelStyle(value: LabelStyle): SubTabBarStyle;|tab_content.d.ts| +|Added|NA|Class name: BottomTabBarStyle
Method or attribute name: static of(icon: ResourceStr, text: ResourceStr): BottomTabBarStyle;|tab_content.d.ts| +|Added|NA|Class name: TextAttribute
Method or attribute name: draggable(value: boolean): TextAttribute;|text.d.ts| +|Added|NA|Class name: TextAttribute
Method or attribute name: textShadow(value: ShadowOptions): TextAttribute;|text.d.ts| +|Added|NA|Class name: TextAttribute
Method or attribute name: heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAttribute;|text.d.ts| +|Added|NA|Class name: TextAttribute
Method or attribute name: textIndent(value: Length): TextAttribute;|text.d.ts| +|Added|NA|Class name: TextAreaController
Method or attribute name: setTextSelection(selectionStart: number, selectionEnd: number): void;|text_area.d.ts| +|Added|NA|Class name: TextAreaAttribute
Method or attribute name: onEditChange(callback: (isEditing: boolean) => void): TextAreaAttribute;|text_area.d.ts| +|Added|NA|Class name: TextAreaAttribute
Method or attribute name: enableKeyboardOnFocus(value: boolean): TextAreaInterface;|text_area.d.ts| +|Added|NA|Class name: TextInputController
Method or attribute name: setTextSelection(selectionStart: number, selectionEnd: number): void;|text_input.d.ts| +|Added|NA|Module name: text_input
Class name: CaretStyle|text_input.d.ts| +|Added|NA|Module name: text_input
Class name: CaretStyle
Method or attribute name: width?: Length;|text_input.d.ts| +|Added|NA|Class name: TextInputAttribute
Method or attribute name: caretStyle(value: CaretStyle): TextInputAttribute;|text_input.d.ts| +|Added|NA|Class name: TextInputAttribute
Method or attribute name: selectedBackgroundColor(value: ResourceColor): TextInputAttribute;|text_input.d.ts| +|Added|NA|Class name: TextInputAttribute
Method or attribute name: caretPosition(value: number): TextInputAttribute;|text_input.d.ts| +|Added|NA|Class name: TextInputAttribute
Method or attribute name: enableKeyboardOnFocus(value: boolean): TextInputAttribute;|text_input.d.ts| +|Added|NA|Module name: text_picker
Class name: TextPickerRangeContent|text_picker.d.ts| +|Added|NA|Module name: text_picker
Class name: TextPickerRangeContent
Method or attribute name: icon: string \| Resource;|text_picker.d.ts| +|Added|NA|Module name: text_picker
Class name: TextPickerRangeContent
Method or attribute name: text?: string \| Resource;|text_picker.d.ts| +|Added|NA|Class name: TextPickerOptions
Method or attribute name: range: string[] \| Resource \| TextPickerRangeContent[];|text_picker.d.ts| +|Added|NA|Class name: TextPickerAttribute
Method or attribute name: disappearTextStyle(value: PickerTextStyle): TextPickerAttribute;|text_picker.d.ts| +|Added|NA|Class name: TextPickerAttribute
Method or attribute name: textStyle(value: PickerTextStyle): TextPickerAttribute;|text_picker.d.ts| +|Added|NA|Class name: TextPickerAttribute
Method or attribute name: selectedTextStyle(value: PickerTextStyle): TextPickerAttribute;|text_picker.d.ts| +|Added|NA|Class name: TextPickerDialogOptions
Method or attribute name: disappearTextStyle?: PickerTextStyle;|text_picker.d.ts| +|Added|NA|Class name: TextPickerDialogOptions
Method or attribute name: textStyle?: PickerTextStyle;|text_picker.d.ts| +|Added|NA|Class name: TextPickerDialogOptions
Method or attribute name: selectedTextStyle?: PickerTextStyle;|text_picker.d.ts| +|Added|NA|Class name: TimePickerAttribute
Method or attribute name: disappearTextStyle(value: PickerTextStyle): TimePickerAttribute;|time_picker.d.ts| +|Added|NA|Class name: TimePickerAttribute
Method or attribute name: textStyle(value: PickerTextStyle): TimePickerAttribute;|time_picker.d.ts| +|Added|NA|Class name: TimePickerAttribute
Method or attribute name: selectedTextStyle(value: PickerTextStyle): TimePickerAttribute;|time_picker.d.ts| +|Added|NA|Class name: TimePickerDialogOptions
Method or attribute name: disappearTextStyle?: PickerTextStyle;|time_picker.d.ts| +|Added|NA|Class name: TimePickerDialogOptions
Method or attribute name: textStyle?: PickerTextStyle;|time_picker.d.ts| +|Added|NA|Class name: TimePickerDialogOptions
Method or attribute name: selectedTextStyle?: PickerTextStyle;|time_picker.d.ts| +|Added|NA|Module name: units
Class name: MarkStyle|units.d.ts| +|Added|NA|Module name: units
Class name: MarkStyle
Method or attribute name: strokeColor?: ResourceColor;|units.d.ts| +|Added|NA|Module name: units
Class name: MarkStyle
Method or attribute name: size?: Length;|units.d.ts| +|Added|NA|Module name: units
Class name: MarkStyle
Method or attribute name: strokeWidth?: Length;|units.d.ts| +|Added|NA|Module name: web
Class name: WebMediaOptions|web.d.ts| +|Added|NA|Module name: web
Class name: WebMediaOptions
Method or attribute name: resumeInterval?: number;|web.d.ts| +|Added|NA|Module name: web
Class name: WebMediaOptions
Method or attribute name: audioExclusive?: boolean;|web.d.ts| +|Added|NA|Class name: ClientAuthenticationHandler
Method or attribute name: confirm(authUri: string): void;|web.d.ts| +|Added|NA|Class name: WebAttribute
Method or attribute name: mediaOptions(options: WebMediaOptions): WebAttribute;|web.d.ts| +|Added|NA|Class name: WebAttribute
Method or attribute name: allowWindowOpenMethod(flag: boolean): WebAttribute;|web.d.ts| +|Added|NA|Class name: WebAttribute
Method or attribute name: onAudioStateChanged(callback: (event: { playing: boolean }) => void): WebAttribute;|web.d.ts| +|Added|NA|Class name: WebAttribute
Method or attribute name: onFirstContentfulPaint(callback: (event?: { navigationStartTick: number,
firstContentfulPaintMs: number }) => void): WebAttribute;|web.d.ts| +|Added|NA|Class name: WebAttribute
Method or attribute name: onLoadIntercept(callback: (event: { data: WebResourceRequest }) => boolean): WebAttribute;|web.d.ts| +|Deleted|Module name: common
Class name: SourceTool
Method or attribute name: FINGER|NA|common.d.ts| +|Deleted|Module name: common
Class name: SourceTool
Method or attribute name: PEN|NA|common.d.ts| +|Access level changed|Class name: BlurStyle
Access level: system API|Class name: BlurStyle
Access level: public API|common.d.ts| +|Access level changed|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Access level: system API|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Access level: public API|common_ts_ets_api.d.ts| +|Deprecated version changed|Class name: ShowToastOptions
Deprecated version: N/A|Class name: ShowToastOptions
Deprecated version: 8
Substitute API: ohos.prompt |@system.prompt.d.ts| +|Deprecated version changed|Class name: TransitionOptions
Deprecated version: N/A|Class name: TransitionOptions
Deprecated version: 10
Substitute API: TransitionEffect |common.d.ts| +|Deprecated version changed|Class name: PopupOptions
Method or attribute name: placementOnTop?: boolean;
Deprecated version: N/A|Class name: PopupOptions
Method or attribute name: placementOnTop?: boolean;
Deprecated version: 10
Substitute API: PopupOptions|common.d.ts| +|Deprecated version changed|Class name: CustomPopupOptions
Method or attribute name: maskColor?: Color \| string \| Resource \| number;
Deprecated version: N/A|Class name: CustomPopupOptions
Method or attribute name: maskColor?: Color \| string \| Resource \| number;
Deprecated version: 10
Substitute API: CustomPopupOptions|common.d.ts| +|Deprecated version changed|Class name: CommonMethod
Method or attribute name: useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
Deprecated version: N/A|Class name: CommonMethod
Method or attribute name: useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
Deprecated version: 9
Substitute API: grid_col/|common.d.ts| +|Deprecated version changed|Class name: SizeType
Deprecated version: N/A|Class name: SizeType
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerOptions
Deprecated version: N/A|Class name: GridContainerOptions
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: columns?: number \| "auto";
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: columns?: number \| "auto";
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: sizeType?: SizeType;
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: sizeType?: SizeType;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: gutter?: number \| string;
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: gutter?: number \| string;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: margin?: number \| string;
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: margin?: number \| string;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerInterface
Deprecated version: N/A|Class name: GridContainerInterface
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerInterface
Method or attribute name: (value?: GridContainerOptions): GridContainerAttribute;
Deprecated version: N/A|Class name: GridContainerInterface
Method or attribute name: (value?: GridContainerOptions): GridContainerAttribute;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerAttribute
Deprecated version: N/A|Class name: GridContainerAttribute
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| +|Deprecated version changed|Class name: ImageAttribute
Method or attribute name: draggable(value: boolean): ImageAttribute;
Deprecated version: N/A|Class name: ImageAttribute
Method or attribute name: draggable(value: boolean): ImageAttribute;
Deprecated version: 10
Substitute API: common.CommonMethod|image.d.ts| +|Deprecated version changed|Class name: Sticky
Deprecated version: N/A|Class name: Sticky
Deprecated version: 9
Substitute API: list/StickyStyle |list_item.d.ts| +|Deprecated version changed|Class name: ListItemAttribute
Method or attribute name: sticky(value: Sticky): ListItemAttribute;
Deprecated version: N/A|Class name: ListItemAttribute
Method or attribute name: sticky(value: Sticky): ListItemAttribute;
Deprecated version: 9
Substitute API: list/List|list_item.d.ts| +|Deprecated version changed|Class name: MenuAttribute
Method or attribute name: fontSize(value: Length): MenuAttribute;
Deprecated version: N/A|Class name: MenuAttribute
Method or attribute name: fontSize(value: Length): MenuAttribute;
Deprecated version: 10
Substitute API: font |menu.d.ts| +|Deprecated version changed|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Deprecated version: N/A|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Deprecated version: 10
Substitute API: SwiperDisplayMode|swiper.d.ts| +|Deprecated version changed|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Deprecated version: N/A|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Deprecated version: 10
Substitute API: SwiperDisplayMode|swiper.d.ts| +|Deprecated version changed|Class name: IndicatorStyle
Deprecated version: N/A|Class name: IndicatorStyle
Deprecated version: 10
Substitute API: N/A|swiper.d.ts| +|Deprecated version changed|Class name: SwiperAttribute
Method or attribute name: indicatorStyle(value?: IndicatorStyle): SwiperAttribute;
Deprecated version: N/A|Class name: SwiperAttribute
Method or attribute name: indicatorStyle(value?: IndicatorStyle): SwiperAttribute;
Deprecated version: 10
Substitute API: N/A|swiper.d.ts| +|Deprecated version changed|Class name: TextPickerAttribute
Method or attribute name: onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
Deprecated version: N/A|Class name: TextPickerAttribute
Method or attribute name: onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
Deprecated version: 10
Substitute API: N/A|text_picker.d.ts| +|Deprecated version changed|Class name: TextPickerAttribute
Method or attribute name: onCancel(callback: () => void): TextPickerAttribute;
Deprecated version: N/A|Class name: TextPickerAttribute
Method or attribute name: onCancel(callback: () => void): TextPickerAttribute;
Deprecated version: 10
Substitute API: N/A|text_picker.d.ts| +|Deprecated version changed|Class name: WebAttribute
Method or attribute name: onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
Deprecated version: N/A|Class name: WebAttribute
Method or attribute name: onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
Deprecated version: 10
Substitute API: ohos.web.WebAttribute|web.d.ts| +|Initial version changed|Class name:
Method or attribute name: function setInterval(handler: Function \| string, delay: number, ...arguments: any[]): number;
Initial version: 7|Class name:
Method or attribute name: function setInterval(handler: Function \| string, delay: number, ...arguments: any[]): number;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function setTimeout(handler: Function \| string, delay?: number, ...arguments: any[]): number;
Initial version: 7|Class name:
Method or attribute name: function setTimeout(handler: Function \| string, delay?: number, ...arguments: any[]): number;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function clearInterval(intervalID?: number): void;
Initial version: 7|Class name:
Method or attribute name: function clearInterval(intervalID?: number): void;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function clearTimeout(timeoutID?: number): void;
Initial version: 7|Class name:
Method or attribute name: function clearTimeout(timeoutID?: number): void;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function canIUse(syscap: string): boolean;
Initial version: 8|Class name:
Method or attribute name: function canIUse(syscap: string): boolean;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function getInspectorByKey(id: string): string;
Initial version: 9|Class name:
Method or attribute name: function getInspectorByKey(id: string): string;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function getInspectorTree(): Object;
Initial version: 9|Class name:
Method or attribute name: function getInspectorTree(): Object;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function sendEventByKey(id: string, action: number, params: string): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendEventByKey(id: string, action: number, params: string): boolean;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function sendTouchEvent(event: TouchObject): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendTouchEvent(event: TouchObject): boolean;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function sendKeyEvent(event: KeyEvent): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendKeyEvent(event: KeyEvent): boolean;
Initial version: 10|global.d.ts| +|Initial version changed|Class name:
Method or attribute name: function sendMouseEvent(event: MouseEvent): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendMouseEvent(event: MouseEvent): boolean;
Initial version: 10|global.d.ts| +|Initial version changed|Class name: AnimatorOptions
Initial version: 6|Class name: AnimatorOptions
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: duration: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: duration: number;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: easing: string;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: easing: string;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: delay: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: delay: number;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: fill: "none" \| "forwards" \| "backwards" \| "both";
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: fill: "none" \| "forwards" \| "backwards" \| "both";
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: direction: "normal" \| "reverse" \| "alternate" \| "alternate-reverse";
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: direction: "normal" \| "reverse" \| "alternate" \| "alternate-reverse";
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: iterations: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: iterations: number;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: begin: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: begin: number;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorOptions
Method or attribute name: end: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: end: number;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Initial version: 6|Class name: AnimatorResult
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: reset(options: AnimatorOptions): void;
Initial version: 9|Class name: AnimatorResult
Method or attribute name: reset(options: AnimatorOptions): void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: play(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: play(): void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: finish(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: finish(): void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: pause(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: pause(): void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: cancel(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: cancel(): void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: reverse(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: reverse(): void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: onframe: (progress: number) => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: onframe: (progress: number) => void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: onfinish: () => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: onfinish: () => void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: oncancel: () => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: oncancel: () => void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: AnimatorResult
Method or attribute name: onrepeat: () => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: onrepeat: () => void;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: Animator
Initial version: 6|Class name: Animator
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: Animator
Method or attribute name: static create(options: AnimatorOptions): AnimatorResult;
Initial version: 9|Class name: Animator
Method or attribute name: static create(options: AnimatorOptions): AnimatorResult;
Initial version: 10|@ohos.animator.d.ts| +|Initial version changed|Class name: curves
Initial version: 7|Class name: curves
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: Curve
Initial version: 7|Class name: Curve
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: ICurve
Initial version: 9|Class name: ICurve
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: curves
Method or attribute name: function initCurve(curve?: Curve): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function initCurve(curve?: Curve): ICurve;
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: curves
Method or attribute name: function stepsCurve(count: number, end: boolean): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function stepsCurve(count: number, end: boolean): ICurve;
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: curves
Method or attribute name: function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: curves
Method or attribute name: function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: curves
Method or attribute name: function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: curves
Method or attribute name: function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| +|Initial version changed|Class name: matrix4
Initial version: 7|Class name: matrix4
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: TranslateOption
Initial version: 7|Class name: TranslateOption
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: TranslateOption
Method or attribute name: x?: number;
Initial version: 7|Class name: TranslateOption
Method or attribute name: x?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: TranslateOption
Method or attribute name: y?: number;
Initial version: 7|Class name: TranslateOption
Method or attribute name: y?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: TranslateOption
Method or attribute name: z?: number;
Initial version: 7|Class name: TranslateOption
Method or attribute name: z?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: ScaleOption
Initial version: 7|Class name: ScaleOption
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: ScaleOption
Method or attribute name: x?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: x?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: ScaleOption
Method or attribute name: y?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: y?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: ScaleOption
Method or attribute name: z?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: z?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: ScaleOption
Method or attribute name: centerX?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: centerX?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: ScaleOption
Method or attribute name: centerY?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: centerY?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: RotateOption
Initial version: 7|Class name: RotateOption
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: RotateOption
Method or attribute name: x?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: x?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: RotateOption
Method or attribute name: y?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: y?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: RotateOption
Method or attribute name: z?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: z?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: RotateOption
Method or attribute name: centerX?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: centerX?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: RotateOption
Method or attribute name: centerY?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: centerY?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: RotateOption
Method or attribute name: angle?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: angle?: number;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Initial version: 7|Class name: Matrix4Transit
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Method or attribute name: copy(): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: copy(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Method or attribute name: invert(): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: invert(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Method or attribute name: combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Method or attribute name: translate(options: TranslateOption): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: translate(options: TranslateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Method or attribute name: scale(options: ScaleOption): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: scale(options: ScaleOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Method or attribute name: rotate(options: RotateOption): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: rotate(options: RotateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: Matrix4Transit
Method or attribute name: transformPoint(options: [number, number]): [number, number];
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: transformPoint(options: [number, number]): [number, number];
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function identity(): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function identity(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function copy(): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function copy(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function invert(): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function invert(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function translate(options: TranslateOption): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function translate(options: TranslateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function scale(options: ScaleOption): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function scale(options: ScaleOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function rotate(options: RotateOption): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function rotate(options: RotateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: matrix4
Method or attribute name: function transformPoint(options: [number, number]): [number, number];
Initial version: 7|Class name: matrix4
Method or attribute name: function transformPoint(options: [number, number]): [number, number];
Initial version: 10|@ohos.matrix4.d.ts| +|Initial version changed|Class name: mediaquery
Initial version: 7|Class name: mediaquery
Initial version: 10|@ohos.mediaquery.d.ts| +|Initial version changed|Class name: MediaQueryResult
Method or attribute name: readonly matches: boolean;
Initial version: 7|Class name: MediaQueryResult
Method or attribute name: readonly matches: boolean;
Initial version: 10|@ohos.mediaquery.d.ts| +|Initial version changed|Class name: MediaQueryResult
Method or attribute name: readonly media: string;
Initial version: 7|Class name: MediaQueryResult
Method or attribute name: readonly media: string;
Initial version: 10|@ohos.mediaquery.d.ts| +|Initial version changed|Class name: MediaQueryListener
Method or attribute name: on(type: 'change', callback: Callback\): void;
Initial version: 7|Class name: MediaQueryListener
Method or attribute name: on(type: 'change', callback: Callback\): void;
Initial version: 10|@ohos.mediaquery.d.ts| +|Initial version changed|Class name: MediaQueryListener
Method or attribute name: off(type: 'change', callback?: Callback\): void;
Initial version: 7|Class name: MediaQueryListener
Method or attribute name: off(type: 'change', callback?: Callback\): void;
Initial version: 10|@ohos.mediaquery.d.ts| +|Initial version changed|Class name: mediaquery
Method or attribute name: function matchMediaSync(condition: string): MediaQueryListener;
Initial version: 7|Class name: mediaquery
Method or attribute name: function matchMediaSync(condition: string): MediaQueryListener;
Initial version: 10|@ohos.mediaquery.d.ts| +|Initial version changed|Class name: promptAction
Initial version: 9|Class name: promptAction
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowToastOptions
Initial version: 9|Class name: ShowToastOptions
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowToastOptions
Method or attribute name: message: string \| Resource;
Initial version: 9|Class name: ShowToastOptions
Method or attribute name: message: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowToastOptions
Method or attribute name: duration?: number;
Initial version: 9|Class name: ShowToastOptions
Method or attribute name: duration?: number;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowToastOptions
Method or attribute name: bottom?: string \| number;
Initial version: 9|Class name: ShowToastOptions
Method or attribute name: bottom?: string \| number;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: Button
Initial version: 9|Class name: Button
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: Button
Method or attribute name: text: string \| Resource;
Initial version: 9|Class name: Button
Method or attribute name: text: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: Button
Method or attribute name: color: string \| Resource;
Initial version: 9|Class name: Button
Method or attribute name: color: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowDialogSuccessResponse
Initial version: 9|Class name: ShowDialogSuccessResponse
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowDialogSuccessResponse
Method or attribute name: index: number;
Initial version: 9|Class name: ShowDialogSuccessResponse
Method or attribute name: index: number;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowDialogOptions
Initial version: 9|Class name: ShowDialogOptions
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowDialogOptions
Method or attribute name: title?: string \| Resource;
Initial version: 9|Class name: ShowDialogOptions
Method or attribute name: title?: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowDialogOptions
Method or attribute name: message?: string \| Resource;
Initial version: 9|Class name: ShowDialogOptions
Method or attribute name: message?: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ShowDialogOptions
Method or attribute name: buttons?: [Button, Button?, Button?];
Initial version: 9|Class name: ShowDialogOptions
Method or attribute name: buttons?: [Button, Button?, Button?];
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ActionMenuSuccessResponse
Initial version: 9|Class name: ActionMenuSuccessResponse
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ActionMenuSuccessResponse
Method or attribute name: index: number;
Initial version: 9|Class name: ActionMenuSuccessResponse
Method or attribute name: index: number;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ActionMenuOptions
Initial version: 9|Class name: ActionMenuOptions
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ActionMenuOptions
Method or attribute name: title?: string \| Resource;
Initial version: 9|Class name: ActionMenuOptions
Method or attribute name: title?: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: ActionMenuOptions
Method or attribute name: buttons: [Button, Button?, Button?, Button?, Button?, Button?];
Initial version: 9|Class name: ActionMenuOptions
Method or attribute name: buttons: [Button, Button?, Button?, Button?, Button?, Button?];
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: promptAction
Method or attribute name: function showDialog(options: ShowDialogOptions): Promise\;
Initial version: 9|Class name: promptAction
Method or attribute name: function showDialog(options: ShowDialogOptions): Promise\;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: promptAction
Method or attribute name: function showActionMenu(options: ActionMenuOptions): Promise\;
Initial version: 9|Class name: promptAction
Method or attribute name: function showActionMenu(options: ActionMenuOptions): Promise\;
Initial version: 10|@ohos.promptAction.d.ts| +|Initial version changed|Class name: SheetInfo
Initial version: 8|Class name: SheetInfo
Initial version: 10|action_sheet.d.ts| +|Initial version changed|Class name: SheetInfo
Method or attribute name: title: string \| Resource;
Initial version: 8|Class name: SheetInfo
Method or attribute name: title: string \| Resource;
Initial version: 10|action_sheet.d.ts| +|Initial version changed|Class name: SheetInfo
Method or attribute name: icon?: string \| Resource;
Initial version: 8|Class name: SheetInfo
Method or attribute name: icon?: string \| Resource;
Initial version: 10|action_sheet.d.ts| +|Initial version changed|Class name: SheetInfo
Method or attribute name: action: () => void;
Initial version: 8|Class name: SheetInfo
Method or attribute name: action: () => void;
Initial version: 10|action_sheet.d.ts| +|Initial version changed|Class name: ActionSheet
Initial version: 8|Class name: ActionSheet
Initial version: 10|action_sheet.d.ts| +|Initial version changed|Class name: DialogAlignment
Initial version: 7|Class name: DialogAlignment
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: Top
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Top
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: Center
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Center
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: Bottom
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Bottom
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: Default
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Default
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: TopStart
Initial version: 8|Class name: DialogAlignment
Method or attribute name: TopStart
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: TopEnd
Initial version: 8|Class name: DialogAlignment
Method or attribute name: TopEnd
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: CenterStart
Initial version: 8|Class name: DialogAlignment
Method or attribute name: CenterStart
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: CenterEnd
Initial version: 8|Class name: DialogAlignment
Method or attribute name: CenterEnd
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: BottomStart
Initial version: 8|Class name: DialogAlignment
Method or attribute name: BottomStart
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: DialogAlignment
Method or attribute name: BottomEnd
Initial version: 8|Class name: DialogAlignment
Method or attribute name: BottomEnd
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Initial version: 7|Class name: AlertDialogParam
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Method or attribute name: title?: ResourceStr;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: title?: ResourceStr;
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Method or attribute name: message: ResourceStr;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: message: ResourceStr;
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Method or attribute name: autoCancel?: boolean;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: autoCancel?: boolean;
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Method or attribute name: cancel?: () => void;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: cancel?: () => void;
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Method or attribute name: alignment?: DialogAlignment;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: alignment?: DialogAlignment;
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Method or attribute name: offset?: Offset;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: offset?: Offset;
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParam
Method or attribute name: gridCount?: number;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: gridCount?: number;
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParamWithConfirm
Initial version: 7|Class name: AlertDialogParamWithConfirm
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialogParamWithButtons
Initial version: 7|Class name: AlertDialogParamWithButtons
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialog
Initial version: 7|Class name: AlertDialog
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: AlertDialog
Method or attribute name: static show(value: AlertDialogParamWithConfirm \| AlertDialogParamWithButtons);
Initial version: 7|Class name: AlertDialog
Method or attribute name: static show(value: AlertDialogParamWithConfirm \| AlertDialogParamWithButtons);
Initial version: 10|alert_dialog.d.ts| +|Initial version changed|Class name: IndexerAlign
Initial version: 7|Class name: IndexerAlign
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: IndexerAlign
Method or attribute name: Left
Initial version: 7|Class name: IndexerAlign
Method or attribute name: Left
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: IndexerAlign
Method or attribute name: Right
Initial version: 7|Class name: IndexerAlign
Method or attribute name: Right
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerInterface
Initial version: 7|Class name: AlphabetIndexerInterface
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerInterface
Method or attribute name: (value: { arrayValue: Array\; selected: number }): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerInterface
Method or attribute name: (value: { arrayValue: Array\; selected: number }): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Initial version: 7|Class name: AlphabetIndexerAttribute
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: color(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: color(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: popupColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupBackground(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: popupBackground(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: usingPopup(value: boolean): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: usingPopup(value: boolean): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedFont(value: Font): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedFont(value: Font): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupFont(value: Font): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: popupFont(value: Font): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: itemSize(value: string \| number): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: itemSize(value: string \| number): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: font(value: Font): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: font(value: Font): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: onSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: onSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: onRequestPopupData(callback: (index: number) => Array\): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: onRequestPopupData(callback: (index: number) => Array\): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selected(index: number): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: selected(index: number): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupPosition(value: Position): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: popupPosition(value: Position): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const AlphabetIndexer: AlphabetIndexerInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const AlphabetIndexer: AlphabetIndexerInterface;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const AlphabetIndexerInstance: AlphabetIndexerAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const AlphabetIndexerInstance: AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const AnimatorInstance: AnimatorAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const AnimatorInstance: AnimatorAttribute;
Initial version: 9|animator.d.ts| +|Initial version changed|Class name: CalendarDay
Initial version: 7|Class name: CalendarDay
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: index: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: index: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: lunarMonth: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: lunarMonth: string;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: lunarDay: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: lunarDay: string;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: dayMark: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: dayMark: string;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: dayMarkValue: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: dayMarkValue: string;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: year: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: year: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: month: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: month: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: day: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: day: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: isFirstOfLunar: boolean;
Initial version: 7|Class name: CalendarDay
Method or attribute name: isFirstOfLunar: boolean;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: hasSchedule: boolean;
Initial version: 7|Class name: CalendarDay
Method or attribute name: hasSchedule: boolean;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarDay
Method or attribute name: markLunarDay: boolean;
Initial version: 7|Class name: CalendarDay
Method or attribute name: markLunarDay: boolean;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: MonthData
Initial version: 7|Class name: MonthData
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: MonthData
Method or attribute name: year: number;
Initial version: 7|Class name: MonthData
Method or attribute name: year: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: MonthData
Method or attribute name: month: number;
Initial version: 7|Class name: MonthData
Method or attribute name: month: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: MonthData
Method or attribute name: data: CalendarDay[];
Initial version: 7|Class name: MonthData
Method or attribute name: data: CalendarDay[];
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Initial version: 7|Class name: CurrentDayStyle
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayColor?: ResourceColor;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarColor?: ResourceColor;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: markLunarColor?: ResourceColor;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: markLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayFontSize?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayFontSize?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarDayFontSize?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarDayFontSize?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayHeight?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayHeight?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayWidth?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayWidth?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: gregorianCalendarHeight?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: gregorianCalendarHeight?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayYAxisOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarDayYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarDayYAxisOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreXAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreXAxisOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreYAxisOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerXAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerXAxisOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerYAxisOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: colSpace?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: colSpace?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dailyFiveRowSpace?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dailyFiveRowSpace?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dailySixRowSpace?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dailySixRowSpace?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarHeight?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarHeight?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreWidth?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreWidth?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreLength?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreLength?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerRadius?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerRadius?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: boundaryRowOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: boundaryRowOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: boundaryColOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: boundaryColOffset?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: NonCurrentDayStyle
Initial version: 7|Class name: NonCurrentDayStyle
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthDayColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthDayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthLunarColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthWorkDayMarkColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthWorkDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthOffDayMarkColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthOffDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: TodayStyle
Initial version: 7|Class name: TodayStyle
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedDayColor?: ResourceColor;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedDayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedLunarColor?: ResourceColor;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedAreaBackgroundColor?: ResourceColor;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedAreaBackgroundColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedAreaRadius?: number;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedAreaRadius?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Initial version: 7|Class name: WeekStyle
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Method or attribute name: weekColor?: ResourceColor;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Method or attribute name: weekendDayColor?: ResourceColor;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekendDayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Method or attribute name: weekendLunarColor?: ResourceColor;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekendLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Method or attribute name: weekFontSize?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekFontSize?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Method or attribute name: weekHeight?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekHeight?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Method or attribute name: weekWidth?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekWidth?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WeekStyle
Method or attribute name: weekAndDayRowSpace?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekAndDayRowSpace?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Initial version: 7|Class name: WorkStateStyle
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workDayMarkColor?: ResourceColor;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Method or attribute name: offDayMarkColor?: ResourceColor;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: offDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workDayMarkSize?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workDayMarkSize?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Method or attribute name: offDayMarkSize?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: offDayMarkSize?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workStateWidth?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workStateWidth?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workStateHorizontalMovingDistance?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workStateHorizontalMovingDistance?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workStateVerticalMovingDistance?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workStateVerticalMovingDistance?: number;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarController
Initial version: 7|Class name: CalendarController
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarController
Method or attribute name: constructor();
Initial version: 7|Class name: CalendarController
Method or attribute name: constructor();
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarController
Method or attribute name: backToToday();
Initial version: 7|Class name: CalendarController
Method or attribute name: backToToday();
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarController
Method or attribute name: goTo(value: { year: number; month: number; day: number });
Initial version: 7|Class name: CalendarController
Method or attribute name: goTo(value: { year: number; month: number; day: number });
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarInterface
Initial version: 7|Class name: CalendarInterface
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarInterface
Method or attribute name: (value: {
date: { year: number; month: number; day: number };
currentData: MonthData;
preData: MonthData;
nextData: MonthData;
controller?: CalendarController;
}): CalendarAttribute;
Initial version: 7|Class name: CalendarInterface
Method or attribute name: (value: {
date: { year: number; month: number; day: number };
currentData: MonthData;
preData: MonthData;
nextData: MonthData;
controller?: CalendarController;
}): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Initial version: 7|Class name: CalendarAttribute
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: showLunar(value: boolean): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: showLunar(value: boolean): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: showHoliday(value: boolean): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: showHoliday(value: boolean): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: needSlide(value: boolean): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: needSlide(value: boolean): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: startOfWeek(value: number): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: startOfWeek(value: number): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: offDays(value: number): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: offDays(value: number): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: direction(value: Axis): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: direction(value: Axis): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: currentDayStyle(value: CurrentDayStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: currentDayStyle(value: CurrentDayStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: todayStyle(value: TodayStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: todayStyle(value: TodayStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: weekStyle(value: WeekStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: weekStyle(value: WeekStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: workStateStyle(value: WorkStateStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: workStateStyle(value: WorkStateStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: CalendarAttribute
Method or attribute name: onRequestData(
event: (event: {
year: number;
month: number;
currentYear: number;
currentMonth: number;
monthState: number;
}) => void,
): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: onRequestData(
event: (event: {
year: number;
month: number;
currentYear: number;
currentMonth: number;
monthState: number;
}) => void,
): CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Calendar: CalendarInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Calendar: CalendarInterface;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const CalendarInstance: CalendarAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const CalendarInstance: CalendarAttribute;
Initial version: 10|calendar.d.ts| +|Initial version changed|Class name: ImageBitmap
Method or attribute name: constructor(data: PixelMap);
Initial version: 8|Class name: ImageBitmap
Method or attribute name: constructor(data: PixelMap);
Initial version: 10|canvas.d.ts| +|Initial version changed|Class name: CanvasRenderer
Method or attribute name: getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap;
Initial version: 8|Class name: CanvasRenderer
Method or attribute name: getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap;
Initial version: 10|canvas.d.ts| +|Initial version changed|Class name: CanvasRenderer
Method or attribute name: setPixelMap(value?: PixelMap): void;
Initial version: 8|Class name: CanvasRenderer
Method or attribute name: setPixelMap(value?: PixelMap): void;
Initial version: 10|canvas.d.ts| +|Initial version changed|Class name: ColumnSplitInterface
Initial version: 7|Class name: ColumnSplitInterface
Initial version: 10|column_split.d.ts| +|Initial version changed|Class name: ColumnSplitInterface
Method or attribute name: (): ColumnSplitAttribute;
Initial version: 7|Class name: ColumnSplitInterface
Method or attribute name: (): ColumnSplitAttribute;
Initial version: 10|column_split.d.ts| +|Initial version changed|Class name: ColumnSplitAttribute
Initial version: 7|Class name: ColumnSplitAttribute
Initial version: 10|column_split.d.ts| +|Initial version changed|Class name: ColumnSplitAttribute
Method or attribute name: resizeable(value: boolean): ColumnSplitAttribute;
Initial version: 7|Class name: ColumnSplitAttribute
Method or attribute name: resizeable(value: boolean): ColumnSplitAttribute;
Initial version: 10|column_split.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ColumnSplitInstance: ColumnSplitAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const ColumnSplitInstance: ColumnSplitAttribute;
Initial version: 10|column_split.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ColumnSplit: ColumnSplitInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const ColumnSplit: ColumnSplitInterface;
Initial version: 10|column_split.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const StorageProp: (value: string) => PropertyDecorator;
Initial version: 7|Class name: global
Method or attribute name: declare const StorageProp: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const StorageLink: (value: string) => PropertyDecorator;
Initial version: 7|Class name: global
Method or attribute name: declare const StorageLink: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Concurrent: MethodDecorator;
Initial version: 9|Class name: global
Method or attribute name: declare const Concurrent: MethodDecorator;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const CustomDialog: ClassDecorator;
Initial version: 7|Class name: global
Method or attribute name: declare const CustomDialog: ClassDecorator;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const LocalStorageLink: (value: string) => PropertyDecorator;
Initial version: 9|Class name: global
Method or attribute name: declare const LocalStorageLink: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const LocalStorageProp: (value: string) => PropertyDecorator;
Initial version: 9|Class name: global
Method or attribute name: declare const LocalStorageProp: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| +|Initial version changed|Class name:
Method or attribute name: function getContext(component?: Object): Context;
Initial version: 9|Class name:
Method or attribute name: function getContext(component?: Object): Context;
Initial version: 10|common.d.ts| +|Initial version changed|Class name:
Method or attribute name: function postCardAction(component: Object, action: Object): void;
Initial version: 9|Class name:
Method or attribute name: function postCardAction(component: Object, action: Object): void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AnimateParam
Method or attribute name: tempo?: number;
Initial version: 7|Class name: AnimateParam
Method or attribute name: tempo?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AnimateParam
Method or attribute name: delay?: number;
Initial version: 7|Class name: AnimateParam
Method or attribute name: delay?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AnimateParam
Method or attribute name: iterations?: number;
Initial version: 7|Class name: AnimateParam
Method or attribute name: iterations?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: ICurve
Initial version: 9|Class name: ICurve
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MotionPathOptions
Initial version: 7|Class name: MotionPathOptions
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MotionPathOptions
Method or attribute name: path: string;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: path: string;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MotionPathOptions
Method or attribute name: from?: number;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: from?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MotionPathOptions
Method or attribute name: to?: number;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: to?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MotionPathOptions
Method or attribute name: rotatable?: boolean;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: rotatable?: boolean;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: sharedTransitionOptions
Initial version: 7|Class name: sharedTransitionOptions
Initial version: 10|common.d.ts| +|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: duration?: number;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: duration?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: curve?: Curve \| string;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: curve?: Curve \| string;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: delay?: number;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: delay?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: motionPath?: MotionPathOptions;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: motionPath?: MotionPathOptions;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: zIndex?: number;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: zIndex?: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: type?: SharedTransitionEffectType;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: type?: SharedTransitionEffectType;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AlignRuleOption
Initial version: 9|Class name: AlignRuleOption
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AlignRuleOption
Method or attribute name: left?: { anchor: string, align: HorizontalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: left?: { anchor: string, align: HorizontalAlign };
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AlignRuleOption
Method or attribute name: right?: { anchor: string, align: HorizontalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: right?: { anchor: string, align: HorizontalAlign };
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AlignRuleOption
Method or attribute name: middle?: { anchor: string, align: HorizontalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: middle?: { anchor: string, align: HorizontalAlign };
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AlignRuleOption
Method or attribute name: top?: { anchor: string, align: VerticalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: top?: { anchor: string, align: VerticalAlign };
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AlignRuleOption
Method or attribute name: bottom?: { anchor: string, align: VerticalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: bottom?: { anchor: string, align: VerticalAlign };
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AlignRuleOption
Method or attribute name: center?: { anchor: string, align: VerticalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: center?: { anchor: string, align: VerticalAlign };
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TransitionOptions
Initial version: 9|Class name: TransitionOptions
Initial version: 7|common.d.ts| +|Initial version changed|Class name: TransitionOptions
Method or attribute name: type?: TransitionType;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: type?: TransitionType;
Initial version: 7|common.d.ts| +|Initial version changed|Class name: TransitionOptions
Method or attribute name: opacity?: number;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: opacity?: number;
Initial version: 7|common.d.ts| +|Initial version changed|Class name: TransitionOptions
Method or attribute name: translate?: TranslateOptions;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: translate?: TranslateOptions;
Initial version: 7|common.d.ts| +|Initial version changed|Class name: TransitionOptions
Method or attribute name: scale?: ScaleOptions;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: scale?: ScaleOptions;
Initial version: 7|common.d.ts| +|Initial version changed|Class name: TransitionOptions
Method or attribute name: rotate?: RotateOptions;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: rotate?: RotateOptions;
Initial version: 7|common.d.ts| +|Initial version changed|Class name: ItemDragInfo
Initial version: 8|Class name: ItemDragInfo
Initial version: 10|common.d.ts| +|Initial version changed|Class name: ItemDragInfo
Method or attribute name: x: number;
Initial version: 8|Class name: ItemDragInfo
Method or attribute name: x: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: ItemDragInfo
Method or attribute name: y: number;
Initial version: 8|Class name: ItemDragInfo
Method or attribute name: y: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: DragItemInfo
Initial version: 8|Class name: DragItemInfo
Initial version: 10|common.d.ts| +|Initial version changed|Class name: DragItemInfo
Method or attribute name: pixelMap?: PixelMap;
Initial version: 8|Class name: DragItemInfo
Method or attribute name: pixelMap?: PixelMap;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: DragItemInfo
Method or attribute name: builder?: CustomBuilder;
Initial version: 8|Class name: DragItemInfo
Method or attribute name: builder?: CustomBuilder;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: DragItemInfo
Method or attribute name: extraInfo?: string;
Initial version: 8|Class name: DragItemInfo
Method or attribute name: extraInfo?: string;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: focusControl
Method or attribute name: function requestFocus(value: string): boolean;
Initial version: 9|Class name: focusControl
Method or attribute name: function requestFocus(value: string): boolean;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: SourceType
Initial version: 8|Class name: SourceType
Initial version: 10|common.d.ts| +|Initial version changed|Class name: SourceType
Method or attribute name: Unknown
Initial version: 8|Class name: SourceType
Method or attribute name: Unknown
Initial version: 10|common.d.ts| +|Initial version changed|Class name: SourceType
Method or attribute name: Mouse
Initial version: 8|Class name: SourceType
Method or attribute name: Mouse
Initial version: 10|common.d.ts| +|Initial version changed|Class name: SourceType
Method or attribute name: TouchScreen
Initial version: 8|Class name: SourceType
Method or attribute name: TouchScreen
Initial version: 10|common.d.ts| +|Initial version changed|Class name: SourceTool
Initial version: 9|Class name: SourceTool
Initial version: 10|common.d.ts| +|Initial version changed|Class name: SourceTool
Method or attribute name: Unknown
Initial version: 9|Class name: SourceTool
Method or attribute name: Unknown
Initial version: 10|common.d.ts| +|Initial version changed|Class name: RepeatMode
Initial version: 9|Class name: RepeatMode
Initial version: 10|common.d.ts| +|Initial version changed|Class name: RepeatMode
Method or attribute name: Repeat
Initial version: 9|Class name: RepeatMode
Method or attribute name: Repeat
Initial version: 10|common.d.ts| +|Initial version changed|Class name: RepeatMode
Method or attribute name: Stretch
Initial version: 9|Class name: RepeatMode
Method or attribute name: Stretch
Initial version: 10|common.d.ts| +|Initial version changed|Class name: RepeatMode
Method or attribute name: Round
Initial version: 9|Class name: RepeatMode
Method or attribute name: Round
Initial version: 10|common.d.ts| +|Initial version changed|Class name: RepeatMode
Method or attribute name: Space
Initial version: 9|Class name: RepeatMode
Method or attribute name: Space
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BlurStyle
Initial version: 9|Class name: BlurStyle
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BlurStyle
Method or attribute name: Thin
Initial version: 9|Class name: BlurStyle
Method or attribute name: Thin
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BlurStyle
Method or attribute name: Regular
Initial version: 9|Class name: BlurStyle
Method or attribute name: Regular
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BlurStyle
Method or attribute name: Thick
Initial version: 9|Class name: BlurStyle
Method or attribute name: Thick
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BaseEvent
Method or attribute name: pressure: number;
Initial version: 9|Class name: BaseEvent
Method or attribute name: pressure: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BaseEvent
Method or attribute name: tiltX: number;
Initial version: 9|Class name: BaseEvent
Method or attribute name: tiltX: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BaseEvent
Method or attribute name: tiltY: number;
Initial version: 9|Class name: BaseEvent
Method or attribute name: tiltY: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BaseEvent
Method or attribute name: sourceTool: SourceTool;
Initial version: 9|Class name: BaseEvent
Method or attribute name: sourceTool: SourceTool;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BorderImageOption
Initial version: 9|Class name: BorderImageOption
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BorderImageOption
Method or attribute name: slice?: Length \| EdgeWidths,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: slice?: Length \| EdgeWidths,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BorderImageOption
Method or attribute name: repeat?: RepeatMode,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: repeat?: RepeatMode,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BorderImageOption
Method or attribute name: source?: string \| Resource \| LinearGradient,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: source?: string \| Resource \| LinearGradient,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BorderImageOption
Method or attribute name: width?: Length \| EdgeWidths,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: width?: Length \| EdgeWidths,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BorderImageOption
Method or attribute name: outset?: Length \| EdgeWidths,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: outset?: Length \| EdgeWidths,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: BorderImageOption
Method or attribute name: fill?: boolean
Initial version: 9|Class name: BorderImageOption
Method or attribute name: fill?: boolean
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Initial version: 8|Class name: MouseEvent
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Method or attribute name: button: MouseButton;
Initial version: 8|Class name: MouseEvent
Method or attribute name: button: MouseButton;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Method or attribute name: action: MouseAction;
Initial version: 8|Class name: MouseEvent
Method or attribute name: action: MouseAction;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Method or attribute name: screenX: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: screenX: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Method or attribute name: screenY: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: screenY: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Method or attribute name: x: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: x: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Method or attribute name: y: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: y: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: MouseEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 8|Class name: MouseEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchObject
Initial version: 7|Class name: TouchObject
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchObject
Method or attribute name: type: TouchType;
Initial version: 7|Class name: TouchObject
Method or attribute name: type: TouchType;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchObject
Method or attribute name: id: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: id: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchObject
Method or attribute name: screenX: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: screenX: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchObject
Method or attribute name: screenY: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: screenY: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchObject
Method or attribute name: x: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: x: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchObject
Method or attribute name: y: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: y: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchEvent
Initial version: 7|Class name: TouchEvent
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchEvent
Method or attribute name: type: TouchType;
Initial version: 7|Class name: TouchEvent
Method or attribute name: type: TouchType;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchEvent
Method or attribute name: touches: TouchObject[];
Initial version: 7|Class name: TouchEvent
Method or attribute name: touches: TouchObject[];
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchEvent
Method or attribute name: changedTouches: TouchObject[];
Initial version: 7|Class name: TouchEvent
Method or attribute name: changedTouches: TouchObject[];
Initial version: 10|common.d.ts| +|Initial version changed|Class name: TouchEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 7|Class name: TouchEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: DragEvent
Initial version: 7|Class name: DragEvent
Initial version: 10|common.d.ts| +|Initial version changed|Class name: DragEvent
Method or attribute name: getX(): number;
Initial version: 7|Class name: DragEvent
Method or attribute name: getX(): number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: DragEvent
Method or attribute name: getY(): number;
Initial version: 7|Class name: DragEvent
Method or attribute name: getY(): number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Initial version: 7|Class name: KeyEvent
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: type: KeyType;
Initial version: 7|Class name: KeyEvent
Method or attribute name: type: KeyType;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: keyCode: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: keyCode: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: keyText: string;
Initial version: 7|Class name: KeyEvent
Method or attribute name: keyText: string;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: keySource: KeySource;
Initial version: 7|Class name: KeyEvent
Method or attribute name: keySource: KeySource;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: deviceId: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: deviceId: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: metaKey: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: metaKey: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: timestamp: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: timestamp: number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: KeyEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 7|Class name: KeyEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: PopupOptions
Initial version: 7|Class name: PopupOptions
Initial version: 10|common.d.ts| +|Initial version changed|Class name: PopupOptions
Method or attribute name: message: string;
Initial version: 7|Class name: PopupOptions
Method or attribute name: message: string;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: PopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 9|Class name: PopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: PopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 9|Class name: PopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Initial version: 8|Class name: CustomPopupOptions
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: builder: CustomBuilder;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: builder: CustomBuilder;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: placement?: Placement;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: placement?: Placement;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: popupColor?: Color \| string \| Resource \| number;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: popupColor?: Color \| string \| Resource \| number;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: enableArrow?: boolean;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: enableArrow?: boolean;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 9|Class name: CustomPopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 9|Class name: CustomPopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: hitTestBehavior(value: HitTestMode): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: hitTestBehavior(value: HitTestMode): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: borderImage(value: BorderImageOption): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: borderImage(value: BorderImageOption): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onHover(event: (isHover?: boolean) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onHover(event: (isHover?: boolean) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: hoverEffect(value: HoverEffect): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: hoverEffect(value: HoverEffect): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onMouse(event: (event?: MouseEvent) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onMouse(event: (event?: MouseEvent) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onTouch(event: (event?: TouchEvent) => void): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: onTouch(event: (event?: TouchEvent) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onKeyEvent(event: (event?: KeyEvent) => void): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: onKeyEvent(event: (event?: KeyEvent) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: focusable(value: boolean): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: focusable(value: boolean): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onFocus(event: () => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onFocus(event: () => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onBlur(event: () => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onBlur(event: () => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: tabIndex(index: number): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: tabIndex(index: number): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: defaultFocus(value: boolean): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: defaultFocus(value: boolean): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: groupDefaultFocus(value: boolean): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: groupDefaultFocus(value: boolean): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: focusOnTouch(value: boolean): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: focusOnTouch(value: boolean): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: gesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: gesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: priorityGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: priorityGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: parallelGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: parallelGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: gridSpan(value: number): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: gridSpan(value: number): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: gridOffset(value: number): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: gridOffset(value: number): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: transform(value: object): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: transform(value: object): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onAreaChange(event: (oldValue: Area, newValue: Area) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onAreaChange(event: (oldValue: Area, newValue: Area) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: sharedTransition(id: string, options?: sharedTransitionOptions): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: sharedTransition(id: string, options?: sharedTransitionOptions): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: alignRules(value: AlignRuleOption): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: alignRules(value: AlignRuleOption): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder \| DragItemInfo): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder \| DragItemInfo): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: motionPath(value: MotionPathOptions): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: motionPath(value: MotionPathOptions): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: geometryTransition(id: string): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: geometryTransition(id: string): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CommonMethod
Method or attribute name: onVisibleAreaChange(ratios: Array\, event: (isVisible: boolean, currentRatio: number) => void): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: onVisibleAreaChange(ratios: Array\, event: (isVisible: boolean, currentRatio: number) => void): T;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LinearGradient
Initial version: 9|Class name: LinearGradient
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutBorderInfo
Initial version: 9|Class name: LayoutBorderInfo
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutBorderInfo
Method or attribute name: borderWidth: EdgeWidths,
Initial version: 9|Class name: LayoutBorderInfo
Method or attribute name: borderWidth: EdgeWidths,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutBorderInfo
Method or attribute name: margin: Margin,
Initial version: 9|Class name: LayoutBorderInfo
Method or attribute name: margin: Margin,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutBorderInfo
Method or attribute name: padding: Padding,
Initial version: 9|Class name: LayoutBorderInfo
Method or attribute name: padding: Padding,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutInfo
Initial version: 9|Class name: LayoutInfo
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutInfo
Method or attribute name: position: Position,
Initial version: 9|Class name: LayoutInfo
Method or attribute name: position: Position,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutInfo
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 9|Class name: LayoutInfo
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Initial version: 9|Class name: LayoutChild
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Method or attribute name: name: string,
Initial version: 9|Class name: LayoutChild
Method or attribute name: name: string,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Method or attribute name: id: string,
Initial version: 9|Class name: LayoutChild
Method or attribute name: id: string,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 9|Class name: LayoutChild
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Method or attribute name: borderInfo: LayoutBorderInfo,
Initial version: 9|Class name: LayoutChild
Method or attribute name: borderInfo: LayoutBorderInfo,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Method or attribute name: position: Position,
Initial version: 9|Class name: LayoutChild
Method or attribute name: position: Position,
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Method or attribute name: measure(childConstraint: ConstraintSizeOptions),
Initial version: 9|Class name: LayoutChild
Method or attribute name: measure(childConstraint: ConstraintSizeOptions),
Initial version: 10|common.d.ts| +|Initial version changed|Class name: LayoutChild
Method or attribute name: layout(childLayoutInfo: LayoutInfo)
Initial version: 9|Class name: LayoutChild
Method or attribute name: layout(childLayoutInfo: LayoutInfo)
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomComponent
Method or attribute name: onLayout?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 9|Class name: CustomComponent
Method or attribute name: onLayout?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomComponent
Method or attribute name: onMeasure?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 9|Class name: CustomComponent
Method or attribute name: onMeasure?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomComponent
Method or attribute name: onPageShow?(): void;
Initial version: 7|Class name: CustomComponent
Method or attribute name: onPageShow?(): void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomComponent
Method or attribute name: onPageHide?(): void;
Initial version: 7|Class name: CustomComponent
Method or attribute name: onPageHide?(): void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomComponent
Method or attribute name: onBackPress?(): void;
Initial version: 7|Class name: CustomComponent
Method or attribute name: onBackPress?(): void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: CustomComponent
Method or attribute name: pageTransition?(): void;
Initial version: 9|Class name: CustomComponent
Method or attribute name: pageTransition?(): void;
Initial version: 10|common.d.ts| +|Initial version changed|Class name: AppStorage
Initial version: 7|Class name: AppStorage
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Link(propName: string): any;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Link(propName: string): any;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static SetAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 7|Class name: AppStorage
Method or attribute name: static SetAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Prop(propName: string): any;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Prop(propName: string): any;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static SetAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 7|Class name: AppStorage
Method or attribute name: static SetAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Has(propName: string): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Has(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Get\(propName: string): T \| undefined;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Get\(propName: string): T \| undefined;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Set\(propName: string, newValue: T): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Set\(propName: string, newValue: T): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static SetOrCreate\(propName: string, newValue: T): void;
Initial version: 7|Class name: AppStorage
Method or attribute name: static SetOrCreate\(propName: string, newValue: T): void;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Delete(propName: string): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Delete(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Keys(): IterableIterator\;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Keys(): IterableIterator\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Clear(): boolean;
Initial version: 9|Class name: AppStorage
Method or attribute name: static Clear(): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static IsMutable(propName: string): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static IsMutable(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: AppStorage
Method or attribute name: static Size(): number;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Size(): number;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Initial version: 7|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: SubscribedAbstractProperty
Method or attribute name: abstract get(): T;
Initial version: 9|Class name: SubscribedAbstractProperty
Method or attribute name: abstract get(): T;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: SubscribedAbstractProperty
Method or attribute name: abstract set(newValue: T): void;
Initial version: 9|Class name: SubscribedAbstractProperty
Method or attribute name: abstract set(newValue: T): void;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: Environment
Initial version: 7|Class name: Environment
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: Environment
Method or attribute name: static EnvProp\(key: string, value: S): boolean;
Initial version: 7|Class name: Environment
Method or attribute name: static EnvProp\(key: string, value: S): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: Environment
Method or attribute name: static EnvProps(
props: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 7|Class name: Environment
Method or attribute name: static EnvProps(
props: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: Environment
Method or attribute name: static Keys(): Array\;
Initial version: 7|Class name: Environment
Method or attribute name: static Keys(): Array\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: PersistentStorage
Initial version: 7|Class name: PersistentStorage
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: PersistentStorage
Method or attribute name: static PersistProp\(key: string, defaultValue: T): void;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static PersistProp\(key: string, defaultValue: T): void;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: PersistentStorage
Method or attribute name: static DeleteProp(key: string): void;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static DeleteProp(key: string): void;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: PersistentStorage
Method or attribute name: static PersistProps(
properties: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static PersistProps(
properties: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: PersistentStorage
Method or attribute name: static Keys(): Array\;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static Keys(): Array\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Initial version: 9|Class name: LocalStorage
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: constructor(initializingProperties?: Object);
Initial version: 9|Class name: LocalStorage
Method or attribute name: constructor(initializingProperties?: Object);
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: static GetShared(): LocalStorage;
Initial version: 9|Class name: LocalStorage
Method or attribute name: static GetShared(): LocalStorage;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: has(propName: string): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: has(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: keys(): IterableIterator\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: keys(): IterableIterator\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: size(): number;
Initial version: 9|Class name: LocalStorage
Method or attribute name: size(): number;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: get\(propName: string): T \| undefined;
Initial version: 9|Class name: LocalStorage
Method or attribute name: get\(propName: string): T \| undefined;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: set\(propName: string, newValue: T): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: set\(propName: string, newValue: T): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: setOrCreate\(propName: string, newValue: T): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: setOrCreate\(propName: string, newValue: T): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: link\(propName: string): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: link\(propName: string): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: setAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: setAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: prop\(propName: string): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: prop\(propName: string): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: setAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: setAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: delete(propName: string): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: delete(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: LocalStorage
Method or attribute name: clear(): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: clear(): boolean;
Initial version: 10|common_ts_ets_api.d.ts| +|Initial version changed|Class name: ContextMenu
Initial version: 8|Class name: ContextMenu
Initial version: 10|context_menu.d.ts| +|Initial version changed|Class name: ContextMenu
Method or attribute name: static close();
Initial version: 8|Class name: ContextMenu
Method or attribute name: static close();
Initial version: 10|context_menu.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Initial version: 7|Class name: CustomDialogControllerOptions
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: builder: any;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: builder: any;
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: cancel?: () => void;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: cancel?: () => void;
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: alignment?: DialogAlignment;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: alignment?: DialogAlignment;
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: offset?: Offset;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: offset?: Offset;
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: customStyle?: boolean;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: customStyle?: boolean;
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: gridCount?: number;
Initial version: 8|Class name: CustomDialogControllerOptions
Method or attribute name: gridCount?: number;
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogController
Initial version: 7|Class name: CustomDialogController
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogController
Method or attribute name: constructor(value: CustomDialogControllerOptions);
Initial version: 7|Class name: CustomDialogController
Method or attribute name: constructor(value: CustomDialogControllerOptions);
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogController
Method or attribute name: open();
Initial version: 7|Class name: CustomDialogController
Method or attribute name: open();
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: CustomDialogController
Method or attribute name: close();
Initial version: 7|Class name: CustomDialogController
Method or attribute name: close();
Initial version: 10|custom_dialog_controller.d.ts| +|Initial version changed|Class name: DatePickerResult
Initial version: 8|Class name: DatePickerResult
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerResult
Method or attribute name: year?: number;
Initial version: 8|Class name: DatePickerResult
Method or attribute name: year?: number;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerResult
Method or attribute name: month?: number;
Initial version: 8|Class name: DatePickerResult
Method or attribute name: month?: number;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerResult
Method or attribute name: day?: number;
Initial version: 8|Class name: DatePickerResult
Method or attribute name: day?: number;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerOptions
Initial version: 8|Class name: DatePickerOptions
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerOptions
Method or attribute name: start?: Date;
Initial version: 8|Class name: DatePickerOptions
Method or attribute name: start?: Date;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerOptions
Method or attribute name: end?: Date;
Initial version: 8|Class name: DatePickerOptions
Method or attribute name: end?: Date;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerOptions
Method or attribute name: selected?: Date;
Initial version: 8|Class name: DatePickerOptions
Method or attribute name: selected?: Date;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerInterface
Initial version: 8|Class name: DatePickerInterface
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerInterface
Method or attribute name: (options?: DatePickerOptions): DatePickerAttribute;
Initial version: 8|Class name: DatePickerInterface
Method or attribute name: (options?: DatePickerOptions): DatePickerAttribute;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerAttribute
Initial version: 8|Class name: DatePickerAttribute
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerAttribute
Method or attribute name: lunar(value: boolean): DatePickerAttribute;
Initial version: 8|Class name: DatePickerAttribute
Method or attribute name: lunar(value: boolean): DatePickerAttribute;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerAttribute
Method or attribute name: onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute;
Initial version: 8|Class name: DatePickerAttribute
Method or attribute name: onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerDialogOptions
Initial version: 8|Class name: DatePickerDialogOptions
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: lunar?: boolean;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: lunar?: boolean;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: onAccept?: (value: DatePickerResult) => void;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: onAccept?: (value: DatePickerResult) => void;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: onChange?: (value: DatePickerResult) => void;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: onChange?: (value: DatePickerResult) => void;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerDialog
Initial version: 8|Class name: DatePickerDialog
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: DatePickerDialog
Method or attribute name: static show(options?: DatePickerDialogOptions);
Initial version: 8|Class name: DatePickerDialog
Method or attribute name: static show(options?: DatePickerDialogOptions);
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const DatePicker: DatePickerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const DatePicker: DatePickerInterface;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const DatePickerInstance: DatePickerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const DatePickerInstance: DatePickerAttribute;
Initial version: 10|date_picker.d.ts| +|Initial version changed|Class name: Color
Method or attribute name: Transparent
Initial version: 9|Class name: Color
Method or attribute name: Transparent
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TouchType
Initial version: 7|Class name: TouchType
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TouchType
Method or attribute name: Down
Initial version: 7|Class name: TouchType
Method or attribute name: Down
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TouchType
Method or attribute name: Up
Initial version: 7|Class name: TouchType
Method or attribute name: Up
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TouchType
Method or attribute name: Move
Initial version: 7|Class name: TouchType
Method or attribute name: Move
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TouchType
Method or attribute name: Cancel
Initial version: 7|Class name: TouchType
Method or attribute name: Cancel
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseButton
Initial version: 8|Class name: MouseButton
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseButton
Method or attribute name: Left
Initial version: 8|Class name: MouseButton
Method or attribute name: Left
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseButton
Method or attribute name: Right
Initial version: 8|Class name: MouseButton
Method or attribute name: Right
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseButton
Method or attribute name: Middle
Initial version: 8|Class name: MouseButton
Method or attribute name: Middle
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseButton
Method or attribute name: Back
Initial version: 8|Class name: MouseButton
Method or attribute name: Back
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseButton
Method or attribute name: Forward
Initial version: 8|Class name: MouseButton
Method or attribute name: Forward
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseButton
Method or attribute name: None
Initial version: 8|Class name: MouseButton
Method or attribute name: None
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseAction
Initial version: 8|Class name: MouseAction
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseAction
Method or attribute name: Press
Initial version: 8|Class name: MouseAction
Method or attribute name: Press
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseAction
Method or attribute name: Release
Initial version: 8|Class name: MouseAction
Method or attribute name: Release
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseAction
Method or attribute name: Move
Initial version: 8|Class name: MouseAction
Method or attribute name: Move
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: MouseAction
Method or attribute name: Hover
Initial version: 8|Class name: MouseAction
Method or attribute name: Hover
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: AnimationStatus
Initial version: 7|Class name: AnimationStatus
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: AnimationStatus
Method or attribute name: Initial
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Initial
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: AnimationStatus
Method or attribute name: Running
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Running
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: AnimationStatus
Method or attribute name: Paused
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Paused
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: AnimationStatus
Method or attribute name: Stopped
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Stopped
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: FillMode
Initial version: 7|Class name: FillMode
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: FillMode
Method or attribute name: None
Initial version: 7|Class name: FillMode
Method or attribute name: None
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: FillMode
Method or attribute name: Forwards
Initial version: 7|Class name: FillMode
Method or attribute name: Forwards
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: FillMode
Method or attribute name: Backwards
Initial version: 7|Class name: FillMode
Method or attribute name: Backwards
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: FillMode
Method or attribute name: Both
Initial version: 7|Class name: FillMode
Method or attribute name: Both
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: KeyType
Initial version: 7|Class name: KeyType
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: KeyType
Method or attribute name: Down
Initial version: 7|Class name: KeyType
Method or attribute name: Down
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: KeyType
Method or attribute name: Up
Initial version: 7|Class name: KeyType
Method or attribute name: Up
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: KeySource
Initial version: 7|Class name: KeySource
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: KeySource
Method or attribute name: Unknown
Initial version: 7|Class name: KeySource
Method or attribute name: Unknown
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: KeySource
Method or attribute name: Keyboard
Initial version: 7|Class name: KeySource
Method or attribute name: Keyboard
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Edge
Initial version: 7|Class name: Edge
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Edge
Method or attribute name: Top
Initial version: 7|Class name: Edge
Method or attribute name: Top
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Edge
Method or attribute name: Bottom
Initial version: 7|Class name: Edge
Method or attribute name: Bottom
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Edge
Method or attribute name: Start
Initial version: 7|Class name: Edge
Method or attribute name: Start
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Edge
Method or attribute name: End
Initial version: 7|Class name: Edge
Method or attribute name: End
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Initial version: 7|Class name: Week
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Method or attribute name: Mon
Initial version: 7|Class name: Week
Method or attribute name: Mon
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Method or attribute name: Tue
Initial version: 7|Class name: Week
Method or attribute name: Tue
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Method or attribute name: Wed
Initial version: 7|Class name: Week
Method or attribute name: Wed
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Method or attribute name: Thur
Initial version: 7|Class name: Week
Method or attribute name: Thur
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Method or attribute name: Fri
Initial version: 7|Class name: Week
Method or attribute name: Fri
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Method or attribute name: Sat
Initial version: 7|Class name: Week
Method or attribute name: Sat
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Week
Method or attribute name: Sun
Initial version: 7|Class name: Week
Method or attribute name: Sun
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: RelateType
Initial version: 7|Class name: RelateType
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: RelateType
Method or attribute name: FILL
Initial version: 7|Class name: RelateType
Method or attribute name: FILL
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: RelateType
Method or attribute name: FIT
Initial version: 7|Class name: RelateType
Method or attribute name: FIT
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: SharedTransitionEffectType
Initial version: 7|Class name: SharedTransitionEffectType
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: SharedTransitionEffectType
Method or attribute name: Static
Initial version: 7|Class name: SharedTransitionEffectType
Method or attribute name: Static
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: SharedTransitionEffectType
Method or attribute name: Exchange
Initial version: 7|Class name: SharedTransitionEffectType
Method or attribute name: Exchange
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: ResponseType
Initial version: 8|Class name: ResponseType
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: ResponseType
Method or attribute name: RightClick
Initial version: 8|Class name: ResponseType
Method or attribute name: RightClick
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: ResponseType
Method or attribute name: LongPress
Initial version: 8|Class name: ResponseType
Method or attribute name: LongPress
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HoverEffect
Initial version: 8|Class name: HoverEffect
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HoverEffect
Method or attribute name: Auto
Initial version: 8|Class name: HoverEffect
Method or attribute name: Auto
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HoverEffect
Method or attribute name: Scale
Initial version: 8|Class name: HoverEffect
Method or attribute name: Scale
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HoverEffect
Method or attribute name: Highlight
Initial version: 8|Class name: HoverEffect
Method or attribute name: Highlight
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HoverEffect
Method or attribute name: None
Initial version: 8|Class name: HoverEffect
Method or attribute name: None
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Initial version: 8|Class name: Placement
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: Left
Initial version: 8|Class name: Placement
Method or attribute name: Left
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: Right
Initial version: 8|Class name: Placement
Method or attribute name: Right
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: Top
Initial version: 8|Class name: Placement
Method or attribute name: Top
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: Bottom
Initial version: 8|Class name: Placement
Method or attribute name: Bottom
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: TopLeft
Initial version: 8|Class name: Placement
Method or attribute name: TopLeft
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: TopRight
Initial version: 8|Class name: Placement
Method or attribute name: TopRight
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: BottomLeft
Initial version: 8|Class name: Placement
Method or attribute name: BottomLeft
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: BottomRight
Initial version: 8|Class name: Placement
Method or attribute name: BottomRight
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: LeftTop
Initial version: 9|Class name: Placement
Method or attribute name: LeftTop
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: LeftBottom
Initial version: 9|Class name: Placement
Method or attribute name: LeftBottom
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: RightTop
Initial version: 9|Class name: Placement
Method or attribute name: RightTop
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: Placement
Method or attribute name: RightBottom
Initial version: 9|Class name: Placement
Method or attribute name: RightBottom
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: CopyOptions
Initial version: 9|Class name: CopyOptions
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: CopyOptions
Method or attribute name: None = 0
Initial version: 9|Class name: CopyOptions
Method or attribute name: None = 0
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: CopyOptions
Method or attribute name: InApp = 1
Initial version: 9|Class name: CopyOptions
Method or attribute name: InApp = 1
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: CopyOptions
Method or attribute name: LocalDevice = 2
Initial version: 9|Class name: CopyOptions
Method or attribute name: LocalDevice = 2
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HitTestMode
Initial version: 9|Class name: HitTestMode
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HitTestMode
Method or attribute name: Default
Initial version: 9|Class name: HitTestMode
Method or attribute name: Default
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HitTestMode
Method or attribute name: Block
Initial version: 9|Class name: HitTestMode
Method or attribute name: Block
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HitTestMode
Method or attribute name: Transparent
Initial version: 9|Class name: HitTestMode
Method or attribute name: Transparent
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: HitTestMode
Method or attribute name: None
Initial version: 9|Class name: HitTestMode
Method or attribute name: None
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TitleHeight
Initial version: 9|Class name: TitleHeight
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TitleHeight
Method or attribute name: MainOnly
Initial version: 9|Class name: TitleHeight
Method or attribute name: MainOnly
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: TitleHeight
Method or attribute name: MainWithSub
Initial version: 9|Class name: TitleHeight
Method or attribute name: MainWithSub
Initial version: 10|enums.d.ts| +|Initial version changed|Class name: FlowItemInterface
Initial version: 9|Class name: FlowItemInterface
Initial version: 10|flow_item.d.ts| +|Initial version changed|Class name: FlowItemInterface
Method or attribute name: (): FlowItemAttribute;
Initial version: 9|Class name: FlowItemInterface
Method or attribute name: (): FlowItemAttribute;
Initial version: 10|flow_item.d.ts| +|Initial version changed|Class name: FlowItemAttribute
Initial version: 9|Class name: FlowItemAttribute
Initial version: 10|flow_item.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const FlowItem: FlowItemInterface
Initial version: 9|Class name: global
Method or attribute name: declare const FlowItem: FlowItemInterface
Initial version: 10|flow_item.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const FlowItemInstance: FlowItemAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const FlowItemInstance: FlowItemAttribute;
Initial version: 10|flow_item.d.ts| +|Initial version changed|Class name: PanDirection
Initial version: 7|Class name: PanDirection
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: None
Initial version: 7|Class name: PanDirection
Method or attribute name: None
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: Horizontal
Initial version: 7|Class name: PanDirection
Method or attribute name: Horizontal
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: Left
Initial version: 7|Class name: PanDirection
Method or attribute name: Left
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: Right
Initial version: 7|Class name: PanDirection
Method or attribute name: Right
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: Vertical
Initial version: 7|Class name: PanDirection
Method or attribute name: Vertical
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: Up
Initial version: 7|Class name: PanDirection
Method or attribute name: Up
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: Down
Initial version: 7|Class name: PanDirection
Method or attribute name: Down
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanDirection
Method or attribute name: All
Initial version: 7|Class name: PanDirection
Method or attribute name: All
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeDirection
Initial version: 8|Class name: SwipeDirection
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeDirection
Method or attribute name: None
Initial version: 8|Class name: SwipeDirection
Method or attribute name: None
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeDirection
Method or attribute name: Horizontal
Initial version: 8|Class name: SwipeDirection
Method or attribute name: Horizontal
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeDirection
Method or attribute name: Vertical
Initial version: 8|Class name: SwipeDirection
Method or attribute name: Vertical
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeDirection
Method or attribute name: All
Initial version: 8|Class name: SwipeDirection
Method or attribute name: All
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureMode
Initial version: 7|Class name: GestureMode
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureMode
Method or attribute name: Sequence
Initial version: 7|Class name: GestureMode
Method or attribute name: Sequence
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureMode
Method or attribute name: Parallel
Initial version: 7|Class name: GestureMode
Method or attribute name: Parallel
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureMode
Method or attribute name: Exclusive
Initial version: 7|Class name: GestureMode
Method or attribute name: Exclusive
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureMask
Initial version: 7|Class name: GestureMask
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureMask
Method or attribute name: Normal
Initial version: 7|Class name: GestureMask
Method or attribute name: Normal
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureMask
Method or attribute name: IgnoreInternal
Initial version: 7|Class name: GestureMask
Method or attribute name: IgnoreInternal
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: FingerInfo
Initial version: 8|Class name: FingerInfo
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: FingerInfo
Method or attribute name: id: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: id: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: FingerInfo
Method or attribute name: globalX: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: globalX: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: FingerInfo
Method or attribute name: globalY: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: globalY: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: FingerInfo
Method or attribute name: localX: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: localX: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: FingerInfo
Method or attribute name: localY: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: localY: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Initial version: 7|Class name: GestureEvent
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: repeat: boolean;
Initial version: 7|Class name: GestureEvent
Method or attribute name: repeat: boolean;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: fingerList: FingerInfo[];
Initial version: 8|Class name: GestureEvent
Method or attribute name: fingerList: FingerInfo[];
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: offsetX: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: offsetX: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: offsetY: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: offsetY: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: angle: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: angle: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: speed: number;
Initial version: 8|Class name: GestureEvent
Method or attribute name: speed: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: scale: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: scale: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: pinchCenterX: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: pinchCenterX: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureEvent
Method or attribute name: pinchCenterY: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: pinchCenterY: number;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: TapGestureInterface
Initial version: 7|Class name: TapGestureInterface
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: TapGestureInterface
Method or attribute name: (value?: { count?: number; fingers?: number }): TapGestureInterface;
Initial version: 7|Class name: TapGestureInterface
Method or attribute name: (value?: { count?: number; fingers?: number }): TapGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: TapGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): TapGestureInterface;
Initial version: 7|Class name: TapGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): TapGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: LongPressGestureInterface
Initial version: 7|Class name: LongPressGestureInterface
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: (value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: (value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: onActionCancel(event: () => void): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: onActionCancel(event: () => void): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureOptions
Initial version: 7|Class name: PanGestureOptions
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureOptions
Method or attribute name: constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number });
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number });
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureOptions
Method or attribute name: setDirection(value: PanDirection);
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: setDirection(value: PanDirection);
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureOptions
Method or attribute name: setDistance(value: number);
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: setDistance(value: number);
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureOptions
Method or attribute name: setFingers(value: number);
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: setFingers(value: number);
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureInterface
Initial version: 7|Class name: PanGestureInterface
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: PanDirection; distance?: number } \| PanGestureOptions): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: PanDirection; distance?: number } \| PanGestureOptions): PanGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionCancel(event: () => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionCancel(event: () => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeGestureInterface
Initial version: 8|Class name: SwipeGestureInterface
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
Initial version: 8|Class name: SwipeGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: SwipeGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): SwipeGestureInterface;
Initial version: 8|Class name: SwipeGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): SwipeGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PinchGestureInterface
Initial version: 7|Class name: PinchGestureInterface
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: (value?: { fingers?: number; distance?: number }): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: (value?: { fingers?: number; distance?: number }): PinchGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionCancel(event: () => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionCancel(event: () => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: RotationGestureInterface
Initial version: 7|Class name: RotationGestureInterface
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: (value?: { fingers?: number; angle?: number }): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: (value?: { fingers?: number; angle?: number }): RotationGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionCancel(event: () => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionCancel(event: () => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureGroupInterface
Initial version: 7|Class name: GestureGroupInterface
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureGroupInterface
Method or attribute name: (mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
Initial version: 7|Class name: GestureGroupInterface
Method or attribute name: (mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GestureGroupInterface
Method or attribute name: onCancel(event: () => void): GestureGroupInterface;
Initial version: 7|Class name: GestureGroupInterface
Method or attribute name: onCancel(event: () => void): GestureGroupInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TapGesture: TapGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TapGesture: TapGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const LongPressGesture: LongPressGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const LongPressGesture: LongPressGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const PanGesture: PanGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PanGesture: PanGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const SwipeGesture: SwipeGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const SwipeGesture: SwipeGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const PinchGesture: PinchGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PinchGesture: PinchGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const RotationGesture: RotationGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const RotationGesture: RotationGestureInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GestureGroup: GestureGroupInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const GestureGroup: GestureGroupInterface;
Initial version: 10|gesture.d.ts| +|Initial version changed|Class name: GridInterface
Initial version: 7|Class name: GridInterface
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridInterface
Method or attribute name: (scroller?: Scroller): GridAttribute;
Initial version: 7|Class name: GridInterface
Method or attribute name: (scroller?: Scroller): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridDirection
Initial version: 8|Class name: GridDirection
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridDirection
Method or attribute name: Row
Initial version: 8|Class name: GridDirection
Method or attribute name: Row
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridDirection
Method or attribute name: Column
Initial version: 8|Class name: GridDirection
Method or attribute name: Column
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridDirection
Method or attribute name: RowReverse
Initial version: 8|Class name: GridDirection
Method or attribute name: RowReverse
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridDirection
Method or attribute name: ColumnReverse
Initial version: 8|Class name: GridDirection
Method or attribute name: ColumnReverse
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Initial version: 7|Class name: GridAttribute
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: columnsTemplate(value: string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: columnsTemplate(value: string): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: rowsTemplate(value: string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: rowsTemplate(value: string): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: columnsGap(value: Length): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: columnsGap(value: Length): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: rowsGap(value: Length): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: rowsGap(value: Length): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: scrollBarWidth(value: number \| string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: scrollBarWidth(value: number \| string): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: scrollBarColor(value: Color \| number \| string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: scrollBarColor(value: Color \| number \| string): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: scrollBar(value: BarState): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: scrollBar(value: BarState): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: onScrollIndex(event: (first: number) => void): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: onScrollIndex(event: (first: number) => void): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: cachedCount(value: number): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: cachedCount(value: number): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: editMode(value: boolean): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: editMode(value: boolean): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: multiSelectable(value: boolean): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: multiSelectable(value: boolean): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: maxCount(value: number): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: maxCount(value: number): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: minCount(value: number): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: minCount(value: number): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: cellLength(value: number): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: cellLength(value: number): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: layoutDirection(value: GridDirection): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: layoutDirection(value: GridDirection): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: supportAnimation(value: boolean): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: supportAnimation(value: boolean): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) \| void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) \| void): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDrop(
event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDrop(
event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Grid: GridInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Grid: GridInterface;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GridInstance: GridAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const GridInstance: GridAttribute;
Initial version: 10|grid.d.ts| +|Initial version changed|Class name: GridItemInterface
Initial version: 7|Class name: GridItemInterface
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemInterface
Method or attribute name: (): GridItemAttribute;
Initial version: 7|Class name: GridItemInterface
Method or attribute name: (): GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemAttribute
Initial version: 7|Class name: GridItemAttribute
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemAttribute
Method or attribute name: rowStart(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: rowStart(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemAttribute
Method or attribute name: rowEnd(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: rowEnd(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemAttribute
Method or attribute name: columnStart(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: columnStart(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemAttribute
Method or attribute name: columnEnd(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: columnEnd(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemAttribute
Method or attribute name: selectable(value: boolean): GridItemAttribute;
Initial version: 8|Class name: GridItemAttribute
Method or attribute name: selectable(value: boolean): GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridItemAttribute
Method or attribute name: onSelect(event: (isSelected: boolean) => void): GridItemAttribute;
Initial version: 8|Class name: GridItemAttribute
Method or attribute name: onSelect(event: (isSelected: boolean) => void): GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GridItem: GridItemInterface
Initial version: 7|Class name: global
Method or attribute name: declare const GridItem: GridItemInterface
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GridItemInstance: GridItemAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const GridItemInstance: GridItemAttribute;
Initial version: 10|gridItem.d.ts| +|Initial version changed|Class name: GridColColumnOption
Initial version: 9|Class name: GridColColumnOption
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColColumnOption
Method or attribute name: xs?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: xs?: number,
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColColumnOption
Method or attribute name: sm?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: sm?: number,
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColColumnOption
Method or attribute name: md?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: md?: number,
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColColumnOption
Method or attribute name: lg?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: lg?: number,
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColColumnOption
Method or attribute name: xl?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: xl?: number,
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColColumnOption
Method or attribute name: xxl?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: xxl?: number,
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColOptions
Initial version: 9|Class name: GridColOptions
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColOptions
Method or attribute name: span?: number \| GridColColumnOption;
Initial version: 9|Class name: GridColOptions
Method or attribute name: span?: number \| GridColColumnOption;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColOptions
Method or attribute name: offset?: number \| GridColColumnOption;
Initial version: 9|Class name: GridColOptions
Method or attribute name: offset?: number \| GridColColumnOption;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColOptions
Method or attribute name: order?: number \| GridColColumnOption;
Initial version: 9|Class name: GridColOptions
Method or attribute name: order?: number \| GridColColumnOption;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColInterface
Initial version: 9|Class name: GridColInterface
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColInterface
Method or attribute name: (option?: GridColOptions): GridColAttribute;
Initial version: 9|Class name: GridColInterface
Method or attribute name: (option?: GridColOptions): GridColAttribute;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColAttribute
Method or attribute name: span(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 9|Class name: GridColAttribute
Method or attribute name: span(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColAttribute
Method or attribute name: gridColOffset(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 9|Class name: GridColAttribute
Method or attribute name: gridColOffset(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridColAttribute
Method or attribute name: order(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 9|Class name: GridColAttribute
Method or attribute name: order(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GridCol: GridColInterface
Initial version: 9|Class name: global
Method or attribute name: declare const GridCol: GridColInterface
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GridColInstance: GridColAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const GridColInstance: GridColAttribute;
Initial version: 10|grid_col.d.ts| +|Initial version changed|Class name: GridRowSizeOption
Initial version: 9|Class name: GridRowSizeOption
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: xs?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: xs?: Length,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: sm?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: sm?: Length,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: md?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: md?: Length,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: lg?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: lg?: Length,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: xl?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: xl?: Length,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: xxl?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: xxl?: Length,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowColumnOption
Initial version: 9|Class name: GridRowColumnOption
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: xs?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: xs?: number,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: sm?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: sm?: number,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: md?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: md?: number,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: lg?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: lg?: number,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: xl?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: xl?: number,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: xxl?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: xxl?: number,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GutterOption
Initial version: 9|Class name: GutterOption
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GutterOption
Method or attribute name: x?: Length \| GridRowSizeOption,
Initial version: 9|Class name: GutterOption
Method or attribute name: x?: Length \| GridRowSizeOption,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GutterOption
Method or attribute name: y?: Length \| GridRowSizeOption
Initial version: 9|Class name: GutterOption
Method or attribute name: y?: Length \| GridRowSizeOption
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: BreakpointsReference
Initial version: 9|Class name: BreakpointsReference
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: BreakpointsReference
Method or attribute name: WindowSize
Initial version: 9|Class name: BreakpointsReference
Method or attribute name: WindowSize
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: BreakpointsReference
Method or attribute name: ComponentSize
Initial version: 9|Class name: BreakpointsReference
Method or attribute name: ComponentSize
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowDirection
Initial version: 9|Class name: GridRowDirection
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowDirection
Method or attribute name: Row
Initial version: 9|Class name: GridRowDirection
Method or attribute name: Row
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowDirection
Method or attribute name: RowReverse
Initial version: 9|Class name: GridRowDirection
Method or attribute name: RowReverse
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: BreakPoints
Initial version: 9|Class name: BreakPoints
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: BreakPoints
Method or attribute name: value?: Array\,
Initial version: 9|Class name: BreakPoints
Method or attribute name: value?: Array\,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: BreakPoints
Method or attribute name: reference?: BreakpointsReference,
Initial version: 9|Class name: BreakPoints
Method or attribute name: reference?: BreakpointsReference,
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowOptions
Initial version: 9|Class name: GridRowOptions
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowOptions
Method or attribute name: gutter?: Length \| GutterOption;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: gutter?: Length \| GutterOption;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowOptions
Method or attribute name: columns?: number \| GridRowColumnOption;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: columns?: number \| GridRowColumnOption;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowOptions
Method or attribute name: breakpoints?: BreakPoints;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: breakpoints?: BreakPoints;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowOptions
Method or attribute name: direction?: GridRowDirection;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: direction?: GridRowDirection;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowInterface
Initial version: 9|Class name: GridRowInterface
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowInterface
Method or attribute name: (option?: GridRowOptions): GridRowAttribute;
Initial version: 9|Class name: GridRowInterface
Method or attribute name: (option?: GridRowOptions): GridRowAttribute;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: GridRowAttribute
Method or attribute name: onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute;
Initial version: 9|Class name: GridRowAttribute
Method or attribute name: onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GridRow: GridRowInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const GridRow: GridRowInterface;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const GridRowInstance: GridRowAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const GridRowInstance: GridRowAttribute;
Initial version: 10|grid_row.d.ts| +|Initial version changed|Class name: ImageAttribute
Method or attribute name: colorFilter(value: ColorFilter): ImageAttribute;
Initial version: 9|Class name: ImageAttribute
Method or attribute name: colorFilter(value: ColorFilter): ImageAttribute;
Initial version: 10|image.d.ts| +|Initial version changed|Class name: ImageAttribute
Method or attribute name: copyOption(value: CopyOptions): ImageAttribute;
Initial version: 9|Class name: ImageAttribute
Method or attribute name: copyOption(value: CopyOptions): ImageAttribute;
Initial version: 10|image.d.ts| +|Initial version changed|Class name: ImageAnimatorInterface
Initial version: 7|Class name: ImageAnimatorInterface
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorInterface
Method or attribute name: (): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorInterface
Method or attribute name: (): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageFrameInfo
Initial version: 7|Class name: ImageFrameInfo
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: width?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: width?: number \| string;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: height?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: height?: number \| string;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: top?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: top?: number \| string;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: left?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: left?: number \| string;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: duration?: number;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: duration?: number;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Initial version: 7|Class name: ImageAnimatorAttribute
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: images(value: Array\): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: images(value: Array\): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: state(value: AnimationStatus): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: state(value: AnimationStatus): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: duration(value: number): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: duration(value: number): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: reverse(value: boolean): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: reverse(value: boolean): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: fixedSize(value: boolean): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: fixedSize(value: boolean): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: fillMode(value: FillMode): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: fillMode(value: FillMode): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: iterations(value: number): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: iterations(value: number): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onStart(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onStart(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onPause(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onPause(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onRepeat(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onRepeat(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onCancel(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onCancel(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onFinish(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onFinish(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ImageAnimator: ImageAnimatorInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const ImageAnimator: ImageAnimatorInterface;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ImageAnimatorInstance: ImageAnimatorAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const ImageAnimatorInstance: ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| +|Initial version changed|Class name: DataChangeListener
Initial version: 7|Class name: DataChangeListener
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataReloaded(): void;
Initial version: 7|Class name: DataChangeListener
Method or attribute name: onDataReloaded(): void;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataAdd(index: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataAdd(index: number): void;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataMove(from: number, to: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataMove(from: number, to: number): void;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataDelete(index: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataDelete(index: number): void;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataChange(index: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataChange(index: number): void;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: IDataSource
Initial version: 7|Class name: IDataSource
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: IDataSource
Method or attribute name: totalCount(): number;
Initial version: 7|Class name: IDataSource
Method or attribute name: totalCount(): number;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: IDataSource
Method or attribute name: getData(index: number): any;
Initial version: 7|Class name: IDataSource
Method or attribute name: getData(index: number): any;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: IDataSource
Method or attribute name: registerDataChangeListener(listener: DataChangeListener): void;
Initial version: 7|Class name: IDataSource
Method or attribute name: registerDataChangeListener(listener: DataChangeListener): void;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: IDataSource
Method or attribute name: unregisterDataChangeListener(listener: DataChangeListener): void;
Initial version: 7|Class name: IDataSource
Method or attribute name: unregisterDataChangeListener(listener: DataChangeListener): void;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: LazyForEachInterface
Initial version: 7|Class name: LazyForEachInterface
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: LazyForEachInterface
Method or attribute name: (
dataSource: IDataSource,
itemGenerator: (item: any, index?: number) => void,
keyGenerator?: (item: any, index?: number) => string,
): LazyForEachInterface;
Initial version: 7|Class name: LazyForEachInterface
Method or attribute name: (
dataSource: IDataSource,
itemGenerator: (item: any, index?: number) => void,
keyGenerator?: (item: any, index?: number) => string,
): LazyForEachInterface;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const LazyForEach: LazyForEachInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const LazyForEach: LazyForEachInterface;
Initial version: 10|lazy_for_each.d.ts| +|Initial version changed|Class name: ListItemAlign
Initial version: 9|Class name: ListItemAlign
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListItemAlign
Method or attribute name: Start
Initial version: 9|Class name: ListItemAlign
Method or attribute name: Start
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListItemAlign
Method or attribute name: Center
Initial version: 9|Class name: ListItemAlign
Method or attribute name: Center
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListItemAlign
Method or attribute name: End
Initial version: 9|Class name: ListItemAlign
Method or attribute name: End
Initial version: 10|list.d.ts| +|Initial version changed|Class name: StickyStyle
Initial version: 9|Class name: StickyStyle
Initial version: 10|list.d.ts| +|Initial version changed|Class name: StickyStyle
Method or attribute name: None = 0
Initial version: 9|Class name: StickyStyle
Method or attribute name: None = 0
Initial version: 10|list.d.ts| +|Initial version changed|Class name: StickyStyle
Method or attribute name: Header = 1
Initial version: 9|Class name: StickyStyle
Method or attribute name: Header = 1
Initial version: 10|list.d.ts| +|Initial version changed|Class name: StickyStyle
Method or attribute name: Footer = 2
Initial version: 9|Class name: StickyStyle
Method or attribute name: Footer = 2
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: lanes(value: number \| LengthConstrain): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: lanes(value: number \| LengthConstrain): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: alignListItem(value: ListItemAlign): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: alignListItem(value: ListItemAlign): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: sticky(value: StickyStyle): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: sticky(value: StickyStyle): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onScrollStart(event: () => void): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: onScrollStart(event: () => void): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemMove(event: (from: number, to: number) => boolean): ListAttribute;
Initial version: 7|Class name: ListAttribute
Method or attribute name: onItemMove(event: (from: number, to: number) => boolean): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) \| void)): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) \| void)): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: ListAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute;
Initial version: 10|list.d.ts| +|Initial version changed|Class name: SwipeEdgeEffect
Initial version: 9|Class name: SwipeEdgeEffect
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: SwipeEdgeEffect
Method or attribute name: Spring
Initial version: 9|Class name: SwipeEdgeEffect
Method or attribute name: Spring
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: SwipeEdgeEffect
Method or attribute name: None
Initial version: 9|Class name: SwipeEdgeEffect
Method or attribute name: None
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: SwipeActionOptions
Initial version: 9|Class name: SwipeActionOptions
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: SwipeActionOptions
Method or attribute name: start?: CustomBuilder;
Initial version: 9|Class name: SwipeActionOptions
Method or attribute name: start?: CustomBuilder;
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: SwipeActionOptions
Method or attribute name: end?: CustomBuilder;
Initial version: 9|Class name: SwipeActionOptions
Method or attribute name: end?: CustomBuilder;
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: SwipeActionOptions
Method or attribute name: edgeEffect?: SwipeEdgeEffect;
Initial version: 9|Class name: SwipeActionOptions
Method or attribute name: edgeEffect?: SwipeEdgeEffect;
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: ListItemAttribute
Method or attribute name: selectable(value: boolean): ListItemAttribute;
Initial version: 8|Class name: ListItemAttribute
Method or attribute name: selectable(value: boolean): ListItemAttribute;
Initial version: 9|list_item.d.ts| +|Initial version changed|Class name: ListItemAttribute
Method or attribute name: swipeAction(value: SwipeActionOptions): ListItemAttribute;
Initial version: 9|Class name: ListItemAttribute
Method or attribute name: swipeAction(value: SwipeActionOptions): ListItemAttribute;
Initial version: 10|list_item.d.ts| +|Initial version changed|Class name: ListItemGroupOptions
Initial version: 9|Class name: ListItemGroupOptions
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: ListItemGroupOptions
Method or attribute name: header?: CustomBuilder;
Initial version: 9|Class name: ListItemGroupOptions
Method or attribute name: header?: CustomBuilder;
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: ListItemGroupOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 9|Class name: ListItemGroupOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: ListItemGroupOptions
Method or attribute name: space?: number \| string;
Initial version: 9|Class name: ListItemGroupOptions
Method or attribute name: space?: number \| string;
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: ListItemGroupInterface
Initial version: 9|Class name: ListItemGroupInterface
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: ListItemGroupInterface
Method or attribute name: (options?: ListItemGroupOptions): ListItemGroupAttribute;
Initial version: 9|Class name: ListItemGroupInterface
Method or attribute name: (options?: ListItemGroupOptions): ListItemGroupAttribute;
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: ListItemGroupAttribute
Initial version: 9|Class name: ListItemGroupAttribute
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: ListItemGroupAttribute
Method or attribute name: divider(
value: {
strokeWidth: Length;
color?: ResourceColor;
startMargin?: Length;
endMargin?: Length;
} \| null,
): ListItemGroupAttribute;
Initial version: 9|Class name: ListItemGroupAttribute
Method or attribute name: divider(
value: {
strokeWidth: Length;
color?: ResourceColor;
startMargin?: Length;
endMargin?: Length;
} \| null,
): ListItemGroupAttribute;
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ListItemGroupInstance: ListItemGroupAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const ListItemGroupInstance: ListItemGroupAttribute;
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ListItemGroup: ListItemGroupInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const ListItemGroup: ListItemGroupInterface;
Initial version: 10|list_item_group.d.ts| +|Initial version changed|Class name: MenuInterface
Initial version: 9|Class name: MenuInterface
Initial version: 10|menu.d.ts| +|Initial version changed|Class name: MenuInterface
Method or attribute name: (): MenuAttribute;
Initial version: 9|Class name: MenuInterface
Method or attribute name: (): MenuAttribute;
Initial version: 10|menu.d.ts| +|Initial version changed|Class name: MenuAttribute
Initial version: 9|Class name: MenuAttribute
Initial version: 10|menu.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Menu: MenuInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const Menu: MenuInterface;
Initial version: 10|menu.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const MenuInstance: MenuAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuInstance: MenuAttribute;
Initial version: 10|menu.d.ts| +|Initial version changed|Class name: MenuItemOptions
Initial version: 9|Class name: MenuItemOptions
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemOptions
Method or attribute name: startIcon?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: startIcon?: ResourceStr;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemOptions
Method or attribute name: content?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: content?: ResourceStr;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemOptions
Method or attribute name: endIcon?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: endIcon?: ResourceStr;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemOptions
Method or attribute name: labelInfo?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: labelInfo?: ResourceStr;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemOptions
Method or attribute name: builder?: CustomBuilder;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: builder?: CustomBuilder;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemInterface
Initial version: 9|Class name: MenuItemInterface
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemInterface
Method or attribute name: (value?: MenuItemOptions \| CustomBuilder): MenuItemAttribute;
Initial version: 9|Class name: MenuItemInterface
Method or attribute name: (value?: MenuItemOptions \| CustomBuilder): MenuItemAttribute;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemAttribute
Initial version: 9|Class name: MenuItemAttribute
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemAttribute
Method or attribute name: selected(value: boolean): MenuItemAttribute;
Initial version: 9|Class name: MenuItemAttribute
Method or attribute name: selected(value: boolean): MenuItemAttribute;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemAttribute
Method or attribute name: onChange(callback: (selected: boolean) => void): MenuItemAttribute;
Initial version: 9|Class name: MenuItemAttribute
Method or attribute name: onChange(callback: (selected: boolean) => void): MenuItemAttribute;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const MenuItem: MenuItemInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItem: MenuItemInterface;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const MenuItemInstance: MenuItemAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItemInstance: MenuItemAttribute;
Initial version: 10|menu_item.d.ts| +|Initial version changed|Class name: MenuItemGroupOptions
Initial version: 9|Class name: MenuItemGroupOptions
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: MenuItemGroupOptions
Method or attribute name: header?: ResourceStr \| CustomBuilder;
Initial version: 9|Class name: MenuItemGroupOptions
Method or attribute name: header?: ResourceStr \| CustomBuilder;
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: MenuItemGroupOptions
Method or attribute name: footer?: ResourceStr \| CustomBuilder;
Initial version: 9|Class name: MenuItemGroupOptions
Method or attribute name: footer?: ResourceStr \| CustomBuilder;
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: MenuItemGroupInterface
Initial version: 9|Class name: MenuItemGroupInterface
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: MenuItemGroupInterface
Method or attribute name: (value?: MenuItemGroupOptions): MenuItemGroupAttribute;
Initial version: 9|Class name: MenuItemGroupInterface
Method or attribute name: (value?: MenuItemGroupOptions): MenuItemGroupAttribute;
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: MenuItemGroupAttribute
Initial version: 9|Class name: MenuItemGroupAttribute
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const MenuItemGroup: MenuItemGroupInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItemGroup: MenuItemGroupInterface;
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const MenuItemGroupInstance: MenuItemGroupAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItemGroupInstance: MenuItemGroupAttribute;
Initial version: 10|menu_item_group.d.ts| +|Initial version changed|Class name: NavigationCommonTitle
Initial version: 9|Class name: NavigationCommonTitle
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationCommonTitle
Method or attribute name: main: string;
Initial version: 9|Class name: NavigationCommonTitle
Method or attribute name: main: string;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationCommonTitle
Method or attribute name: sub: string;
Initial version: 9|Class name: NavigationCommonTitle
Method or attribute name: sub: string;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationCustomTitle
Initial version: 9|Class name: NavigationCustomTitle
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 9|Class name: NavigationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 9|Class name: NavigationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationMode
Initial version: 9|Class name: NavigationMode
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationMode
Method or attribute name: Stack
Initial version: 9|Class name: NavigationMode
Method or attribute name: Stack
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationMode
Method or attribute name: Split
Initial version: 9|Class name: NavigationMode
Method or attribute name: Split
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationMode
Method or attribute name: Auto
Initial version: 9|Class name: NavigationMode
Method or attribute name: Auto
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavBarPosition
Initial version: 9|Class name: NavBarPosition
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavBarPosition
Method or attribute name: Start
Initial version: 9|Class name: NavBarPosition
Method or attribute name: Start
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavBarPosition
Method or attribute name: End
Initial version: 9|Class name: NavBarPosition
Method or attribute name: End
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationTitleMode
Initial version: 8|Class name: NavigationTitleMode
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationTitleMode
Method or attribute name: Free = 0
Initial version: 8|Class name: NavigationTitleMode
Method or attribute name: Free = 0
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationTitleMode
Method or attribute name: Full
Initial version: 8|Class name: NavigationTitleMode
Method or attribute name: Full
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationTitleMode
Method or attribute name: Mini
Initial version: 8|Class name: NavigationTitleMode
Method or attribute name: Mini
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationMenuItem
Method or attribute name: value: string;
Initial version: 8|Class name: NavigationMenuItem
Method or attribute name: value: string;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationMenuItem
Method or attribute name: icon?: string;
Initial version: 8|Class name: NavigationMenuItem
Method or attribute name: icon?: string;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationMenuItem
Method or attribute name: action?: () => void;
Initial version: 8|Class name: NavigationMenuItem
Method or attribute name: action?: () => void;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationInterface
Initial version: 8|Class name: NavigationInterface
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationInterface
Method or attribute name: (): NavigationAttribute;
Initial version: 8|Class name: NavigationInterface
Method or attribute name: (): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Initial version: 8|Class name: NavigationAttribute
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: navBarWidth(value: Length): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: navBarWidth(value: Length): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: navBarPosition(value: NavBarPosition): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: navBarPosition(value: NavBarPosition): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: mode(value: NavigationMode): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: mode(value: NavigationMode): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: backButtonIcon(value: string \| PixelMap \| Resource): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: backButtonIcon(value: string \| PixelMap \| Resource): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideNavBar(value: boolean): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: hideNavBar(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideBackButton(value: boolean): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: hideBackButton(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: titleMode(value: NavigationTitleMode): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: titleMode(value: NavigationTitleMode): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: menus(value: Array\ \| CustomBuilder): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: menus(value: Array\ \| CustomBuilder): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: toolBar(value: object \| CustomBuilder): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: toolBar(value: object \| CustomBuilder): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideToolBar(value: boolean): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: hideToolBar(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationAttribute
Method or attribute name: onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Navigation: NavigationInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Navigation: NavigationInterface;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const NavigationInstance: NavigationAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const NavigationInstance: NavigationAttribute;
Initial version: 10|navigation.d.ts| +|Initial version changed|Class name: NavigationType
Initial version: 7|Class name: NavigationType
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigationType
Method or attribute name: Push
Initial version: 7|Class name: NavigationType
Method or attribute name: Push
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigationType
Method or attribute name: Back
Initial version: 7|Class name: NavigationType
Method or attribute name: Back
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigationType
Method or attribute name: Replace
Initial version: 7|Class name: NavigationType
Method or attribute name: Replace
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorInterface
Initial version: 7|Class name: NavigatorInterface
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorInterface
Method or attribute name: (value?: { target: string; type?: NavigationType }): NavigatorAttribute;
Initial version: 7|Class name: NavigatorInterface
Method or attribute name: (value?: { target: string; type?: NavigationType }): NavigatorAttribute;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorInterface
Method or attribute name: (): NavigatorAttribute;
Initial version: 7|Class name: NavigatorInterface
Method or attribute name: (): NavigatorAttribute;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorAttribute
Initial version: 7|Class name: NavigatorAttribute
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: active(value: boolean): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: active(value: boolean): NavigatorAttribute;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: type(value: NavigationType): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: type(value: NavigationType): NavigatorAttribute;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: target(value: string): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: target(value: string): NavigatorAttribute;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: params(value: object): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: params(value: object): NavigatorAttribute;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Navigator: NavigatorInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Navigator: NavigatorInterface;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const NavigatorInstance: NavigatorAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const NavigatorInstance: NavigatorAttribute;
Initial version: 10|navigator.d.ts| +|Initial version changed|Class name: NavDestinationCommonTitle
Initial version: 9|Class name: NavDestinationCommonTitle
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationCommonTitle
Method or attribute name: main: string;
Initial version: 9|Class name: NavDestinationCommonTitle
Method or attribute name: main: string;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationCommonTitle
Method or attribute name: sub: string;
Initial version: 9|Class name: NavDestinationCommonTitle
Method or attribute name: sub: string;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationCustomTitle
Initial version: 9|Class name: NavDestinationCustomTitle
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 9|Class name: NavDestinationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 9|Class name: NavDestinationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationInterface
Initial version: 9|Class name: NavDestinationInterface
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationInterface
Method or attribute name: (): NavDestinationAttribute;
Initial version: 9|Class name: NavDestinationInterface
Method or attribute name: (): NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationAttribute
Initial version: 9|Class name: NavDestinationAttribute
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationAttribute
Method or attribute name: title(value: string \| CustomBuilder \| NavDestinationCommonTitle \| NavDestinationCustomTitle): NavDestinationAttribute;
Initial version: 9|Class name: NavDestinationAttribute
Method or attribute name: title(value: string \| CustomBuilder \| NavDestinationCommonTitle \| NavDestinationCustomTitle): NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavDestinationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavDestinationAttribute;
Initial version: 9|Class name: NavDestinationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const NavDestination: NavDestinationInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const NavDestination: NavDestinationInterface;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const NavDestinationInstance: NavDestinationAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const NavDestinationInstance: NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| +|Initial version changed|Class name: NavRouterInterface
Initial version: 9|Class name: NavRouterInterface
Initial version: 10|nav_router.d.ts| +|Initial version changed|Class name: NavRouterInterface
Method or attribute name: (): NavRouterAttribute;
Initial version: 9|Class name: NavRouterInterface
Method or attribute name: (): NavRouterAttribute;
Initial version: 10|nav_router.d.ts| +|Initial version changed|Class name: NavRouterAttribute
Initial version: 9|Class name: NavRouterAttribute
Initial version: 10|nav_router.d.ts| +|Initial version changed|Class name: NavRouterAttribute
Method or attribute name: onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute;
Initial version: 9|Class name: NavRouterAttribute
Method or attribute name: onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute;
Initial version: 10|nav_router.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const NavRouter: NavRouterInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const NavRouter: NavRouterInterface;
Initial version: 10|nav_router.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const NavRouterInstance: NavRouterAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const NavRouterInstance: NavRouterAttribute;
Initial version: 10|nav_router.d.ts| +|Initial version changed|Class name: RouteType
Initial version: 7|Class name: RouteType
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: RouteType
Method or attribute name: None
Initial version: 7|Class name: RouteType
Method or attribute name: None
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: RouteType
Method or attribute name: Push
Initial version: 7|Class name: RouteType
Method or attribute name: Push
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: RouteType
Method or attribute name: Pop
Initial version: 7|Class name: RouteType
Method or attribute name: Pop
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: SlideEffect
Initial version: 7|Class name: SlideEffect
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: SlideEffect
Method or attribute name: Left
Initial version: 7|Class name: SlideEffect
Method or attribute name: Left
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: SlideEffect
Method or attribute name: Right
Initial version: 7|Class name: SlideEffect
Method or attribute name: Right
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: SlideEffect
Method or attribute name: Top
Initial version: 7|Class name: SlideEffect
Method or attribute name: Top
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: SlideEffect
Method or attribute name: Bottom
Initial version: 7|Class name: SlideEffect
Method or attribute name: Bottom
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: CommonTransition
Initial version: 7|Class name: CommonTransition
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: CommonTransition
Method or attribute name: constructor();
Initial version: 7|Class name: CommonTransition
Method or attribute name: constructor();
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: CommonTransition
Method or attribute name: slide(value: SlideEffect): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: slide(value: SlideEffect): T;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: CommonTransition
Method or attribute name: translate(value: { x?: number \| string; y?: number \| string; z?: number \| string }): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: translate(value: { x?: number \| string; y?: number \| string; z?: number \| string }): T;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: CommonTransition
Method or attribute name: scale(value: { x?: number; y?: number; z?: number; centerX?: number \| string; centerY?: number \| string }): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: scale(value: { x?: number; y?: number; z?: number; centerX?: number \| string; centerY?: number \| string }): T;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: CommonTransition
Method or attribute name: opacity(value: number): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: opacity(value: number): T;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: PageTransitionEnterInterface
Initial version: 7|Class name: PageTransitionEnterInterface
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: PageTransitionEnterInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionEnterInterface;
Initial version: 7|Class name: PageTransitionEnterInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionEnterInterface;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: PageTransitionEnterInterface
Method or attribute name: onEnter(event: (type?: RouteType, progress?: number) => void): PageTransitionEnterInterface;
Initial version: 7|Class name: PageTransitionEnterInterface
Method or attribute name: onEnter(event: (type?: RouteType, progress?: number) => void): PageTransitionEnterInterface;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: PageTransitionExitInterface
Initial version: 7|Class name: PageTransitionExitInterface
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: PageTransitionExitInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionExitInterface;
Initial version: 7|Class name: PageTransitionExitInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionExitInterface;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: PageTransitionExitInterface
Method or attribute name: onExit(event: (type?: RouteType, progress?: number) => void): PageTransitionExitInterface;
Initial version: 7|Class name: PageTransitionExitInterface
Method or attribute name: onExit(event: (type?: RouteType, progress?: number) => void): PageTransitionExitInterface;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const PageTransitionEnter: PageTransitionEnterInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PageTransitionEnter: PageTransitionEnterInterface;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const PageTransitionExit: PageTransitionExitInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PageTransitionExit: PageTransitionExitInterface;
Initial version: 10|page_transition.d.ts| +|Initial version changed|Class name: PanelMode
Initial version: 7|Class name: PanelMode
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelMode
Method or attribute name: Mini
Initial version: 7|Class name: PanelMode
Method or attribute name: Mini
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelMode
Method or attribute name: Half
Initial version: 7|Class name: PanelMode
Method or attribute name: Half
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelMode
Method or attribute name: Full
Initial version: 7|Class name: PanelMode
Method or attribute name: Full
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelType
Initial version: 7|Class name: PanelType
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelType
Method or attribute name: Minibar
Initial version: 7|Class name: PanelType
Method or attribute name: Minibar
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelType
Method or attribute name: Foldable
Initial version: 7|Class name: PanelType
Method or attribute name: Foldable
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelType
Method or attribute name: Temporary
Initial version: 7|Class name: PanelType
Method or attribute name: Temporary
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelInterface
Initial version: 7|Class name: PanelInterface
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelInterface
Method or attribute name: (show: boolean): PanelAttribute;
Initial version: 7|Class name: PanelInterface
Method or attribute name: (show: boolean): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Initial version: 7|Class name: PanelAttribute
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: mode(value: PanelMode): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: mode(value: PanelMode): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: type(value: PanelType): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: type(value: PanelType): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: dragBar(value: boolean): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: dragBar(value: boolean): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: fullHeight(value: number \| string): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: fullHeight(value: number \| string): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: halfHeight(value: number \| string): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: halfHeight(value: number \| string): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: miniHeight(value: number \| string): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: miniHeight(value: number \| string): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: show(value: boolean): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: show(value: boolean): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: backgroundMask(color: ResourceColor): PanelAttribute;
Initial version: 9|Class name: PanelAttribute
Method or attribute name: backgroundMask(color: ResourceColor): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: onChange(
event: (
/**
* Width of content area.
* @since 7
*/
width: number,

/**
* Height of content area.
* @since 7
*/
height: number,

/**
* Initial state.
* @since 7
*/
mode: PanelMode,
) => void,
): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: onChange(
event: (
/**
* Width of content area.
* @since 7
*/
width: number,

/**
* Height of content area.
* @since 7
*/
height: number,

/**
* Initial state.
* @since 7
*/
mode: PanelMode,
) => void,
): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PanelAttribute
Method or attribute name: onHeightChange(callback: (value: number) => void): PanelAttribute;
Initial version: 9|Class name: PanelAttribute
Method or attribute name: onHeightChange(callback: (value: number) => void): PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Panel: PanelInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Panel: PanelInterface;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const PanelInstance: PanelAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const PanelInstance: PanelAttribute;
Initial version: 10|panel.d.ts| +|Initial version changed|Class name: PatternLockController
Initial version: 9|Class name: PatternLockController
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockController
Method or attribute name: constructor();
Initial version: N/A|Class name: PatternLockController
Method or attribute name: constructor();
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockController
Method or attribute name: reset();
Initial version: N/A|Class name: PatternLockController
Method or attribute name: reset();
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockInterface
Initial version: 9|Class name: PatternLockInterface
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Initial version: 9|Class name: PatternLockAttribute
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: sideLength(value: Length): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: sideLength(value: Length): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: circleRadius(value: Length): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: circleRadius(value: Length): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: backgroundColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: backgroundColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: regularColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: regularColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: selectedColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: selectedColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: activeColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: activeColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: pathColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: pathColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: pathStrokeWidth(value: number \| string): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: pathStrokeWidth(value: number \| string): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: onPatternComplete(callback: (input: Array\) => void): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: onPatternComplete(callback: (input: Array\) => void): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: autoReset(value: boolean): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: autoReset(value: boolean): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const PatternLock: PatternLockInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const PatternLock: PatternLockInterface;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const PatternLockInstance: PatternLockAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const PatternLockInstance: PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Rect: RectInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const Rect: RectInterface;
Initial version: 10|rect.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const RectInstance: RectAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const RectInstance: RectAttribute;
Initial version: 10|rect.d.ts| +|Initial version changed|Class name: RefreshStatus
Initial version: 8|Class name: RefreshStatus
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshStatus
Method or attribute name: Inactive
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Inactive
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshStatus
Method or attribute name: Drag
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Drag
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshStatus
Method or attribute name: OverDrag
Initial version: 8|Class name: RefreshStatus
Method or attribute name: OverDrag
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshStatus
Method or attribute name: Refresh
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Refresh
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshStatus
Method or attribute name: Done
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Done
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshInterface
Initial version: 8|Class name: RefreshInterface
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshAttribute
Initial version: 8|Class name: RefreshAttribute
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshAttribute
Method or attribute name: onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute;
Initial version: 8|Class name: RefreshAttribute
Method or attribute name: onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute;
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RefreshAttribute
Method or attribute name: onRefreshing(callback: () => void): RefreshAttribute;
Initial version: 8|Class name: RefreshAttribute
Method or attribute name: onRefreshing(callback: () => void): RefreshAttribute;
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Refresh: RefreshInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Refresh: RefreshInterface;
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const RefreshInstance: RefreshAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const RefreshInstance: RefreshAttribute;
Initial version: 10|refresh.d.ts| +|Initial version changed|Class name: RelativeContainerInterface
Initial version: 9|Class name: RelativeContainerInterface
Initial version: 10|relative_container.d.ts| +|Initial version changed|Class name: RelativeContainerAttribute
Initial version: 9|Class name: RelativeContainerAttribute
Initial version: 10|relative_container.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const RelativeContainerInstance: RelativeContainerAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const RelativeContainerInstance: RelativeContainerAttribute;
Initial version: 10|relative_container.d.ts| +|Initial version changed|Class name: RowSplitInterface
Initial version: 7|Class name: RowSplitInterface
Initial version: 10|row_split.d.ts| +|Initial version changed|Class name: RowSplitInterface
Method or attribute name: (): RowSplitAttribute;
Initial version: 7|Class name: RowSplitInterface
Method or attribute name: (): RowSplitAttribute;
Initial version: 10|row_split.d.ts| +|Initial version changed|Class name: RowSplitAttribute
Initial version: 7|Class name: RowSplitAttribute
Initial version: 10|row_split.d.ts| +|Initial version changed|Class name: RowSplitAttribute
Method or attribute name: resizeable(value: boolean): RowSplitAttribute;
Initial version: 7|Class name: RowSplitAttribute
Method or attribute name: resizeable(value: boolean): RowSplitAttribute;
Initial version: 10|row_split.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const RowSplit: RowSplitInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const RowSplit: RowSplitInterface;
Initial version: 10|row_split.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const RowSplitInstance: RowSplitAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const RowSplitInstance: RowSplitAttribute;
Initial version: 10|row_split.d.ts| +|Initial version changed|Class name: ScrollDirection
Initial version: 7|Class name: ScrollDirection
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollDirection
Method or attribute name: Vertical
Initial version: 7|Class name: ScrollDirection
Method or attribute name: Vertical
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollDirection
Method or attribute name: Horizontal
Initial version: 7|Class name: ScrollDirection
Method or attribute name: Horizontal
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollDirection
Method or attribute name: None
Initial version: 7|Class name: ScrollDirection
Method or attribute name: None
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: Scroller
Initial version: 7|Class name: Scroller
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: Scroller
Method or attribute name: constructor();
Initial version: 7|Class name: Scroller
Method or attribute name: constructor();
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: Scroller
Method or attribute name: scrollEdge(value: Edge);
Initial version: 7|Class name: Scroller
Method or attribute name: scrollEdge(value: Edge);
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: Scroller
Method or attribute name: scrollPage(value: { next: boolean });
Initial version: 9|Class name: Scroller
Method or attribute name: scrollPage(value: { next: boolean });
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: Scroller
Method or attribute name: currentOffset();
Initial version: 7|Class name: Scroller
Method or attribute name: currentOffset();
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: Scroller
Method or attribute name: scrollBy(dx: Length, dy: Length);
Initial version: 9|Class name: Scroller
Method or attribute name: scrollBy(dx: Length, dy: Length);
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollInterface
Initial version: 7|Class name: ScrollInterface
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollInterface
Method or attribute name: (scroller?: Scroller): ScrollAttribute;
Initial version: 7|Class name: ScrollInterface
Method or attribute name: (scroller?: Scroller): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Initial version: 7|Class name: ScrollAttribute
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollable(value: ScrollDirection): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollable(value: ScrollDirection): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollEdge(event: (side: Edge) => void): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: onScrollEdge(event: (side: Edge) => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollStart(event: () => void): ScrollAttribute;
Initial version: 9|Class name: ScrollAttribute
Method or attribute name: onScrollStart(event: () => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollStop(event: () => void): ScrollAttribute;
Initial version: 9|Class name: ScrollAttribute
Method or attribute name: onScrollStop(event: () => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollBar(barState: BarState): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollBar(barState: BarState): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollBarColor(color: Color \| number \| string): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollBarColor(color: Color \| number \| string): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollBarWidth(value: number \| string): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollBarWidth(value: number \| string): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ScrollAttribute;
Initial version: 9|Class name: ScrollAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Scroll: ScrollInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Scroll: ScrollInterface;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ScrollInstance: ScrollAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const ScrollInstance: ScrollAttribute;
Initial version: 10|scroll.d.ts| +|Initial version changed|Class name: ScrollBarDirection
Initial version: 8|Class name: ScrollBarDirection
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarDirection
Method or attribute name: Vertical
Initial version: 8|Class name: ScrollBarDirection
Method or attribute name: Vertical
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarDirection
Method or attribute name: Horizontal
Initial version: 8|Class name: ScrollBarDirection
Method or attribute name: Horizontal
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarOptions
Initial version: 8|Class name: ScrollBarOptions
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarOptions
Method or attribute name: scroller: Scroller;
Initial version: 8|Class name: ScrollBarOptions
Method or attribute name: scroller: Scroller;
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarOptions
Method or attribute name: direction?: ScrollBarDirection;
Initial version: 8|Class name: ScrollBarOptions
Method or attribute name: direction?: ScrollBarDirection;
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarOptions
Method or attribute name: state?: BarState;
Initial version: 8|Class name: ScrollBarOptions
Method or attribute name: state?: BarState;
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarInterface
Initial version: 8|Class name: ScrollBarInterface
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarInterface
Method or attribute name: (value: ScrollBarOptions): ScrollBarAttribute;
Initial version: 8|Class name: ScrollBarInterface
Method or attribute name: (value: ScrollBarOptions): ScrollBarAttribute;
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: ScrollBarAttribute
Initial version: 8|Class name: ScrollBarAttribute
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ScrollBar: ScrollBarInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const ScrollBar: ScrollBarInterface;
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const ScrollBarInstance: ScrollBarAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const ScrollBarInstance: ScrollBarAttribute;
Initial version: 10|scroll_bar.d.ts| +|Initial version changed|Class name: SearchController
Initial version: 8|Class name: SearchController
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchController
Method or attribute name: constructor();
Initial version: 8|Class name: SearchController
Method or attribute name: constructor();
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchController
Method or attribute name: caretPosition(value: number): void;
Initial version: 8|Class name: SearchController
Method or attribute name: caretPosition(value: number): void;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchInterface
Initial version: 8|Class name: SearchInterface
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Initial version: 8|Class name: SearchAttribute
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: placeholderColor(value: ResourceColor): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: placeholderColor(value: ResourceColor): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: placeholderFont(value?: Font): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: placeholderFont(value?: Font): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: textFont(value?: Font): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: textFont(value?: Font): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: onSubmit(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onSubmit(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: onChange(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onChange(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: onCopy(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onCopy(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: onCut(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onCut(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: onPaste(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onPaste(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: copyOption(value: CopyOptions): SearchAttribute;
Initial version: 9|Class name: SearchAttribute
Method or attribute name: copyOption(value: CopyOptions): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SearchAttribute
Method or attribute name: textAlign(value: TextAlign): SearchAttribute;
Initial version: 9|Class name: SearchAttribute
Method or attribute name: textAlign(value: TextAlign): SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Search: SearchInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Search: SearchInterface;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const SearchInstance: SearchAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const SearchInstance: SearchAttribute;
Initial version: 10|search.d.ts| +|Initial version changed|Class name: SelectOption
Initial version: 8|Class name: SelectOption
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectOption
Method or attribute name: value: ResourceStr;
Initial version: 8|Class name: SelectOption
Method or attribute name: value: ResourceStr;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectOption
Method or attribute name: icon?: ResourceStr;
Initial version: 8|Class name: SelectOption
Method or attribute name: icon?: ResourceStr;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectInterface
Initial version: 8|Class name: SelectInterface
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectInterface
Method or attribute name: (options: Array\): SelectAttribute;
Initial version: 8|Class name: SelectInterface
Method or attribute name: (options: Array\): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Initial version: 8|Class name: SelectAttribute
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: selected(value: number): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selected(value: number): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: value(value: string): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: value(value: string): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: font(value: Font): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: font(value: Font): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: fontColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: fontColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: selectedOptionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selectedOptionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: selectedOptionFont(value: Font): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selectedOptionFont(value: Font): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: selectedOptionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selectedOptionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: optionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: optionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: optionFont(value: Font): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: optionFont(value: Font): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: optionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: optionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: SelectAttribute
Method or attribute name: onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Select: SelectInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Select: SelectInterface;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const SelectInstance: SelectAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const SelectInstance: SelectAttribute;
Initial version: 10|select.d.ts| +|Initial version changed|Class name: ShapeInterface
Method or attribute name: new (value?: PixelMap): ShapeAttribute;
Initial version: 7|Class name: ShapeInterface
Method or attribute name: new (value?: PixelMap): ShapeAttribute;
Initial version: 10|shape.d.ts| +|Initial version changed|Class name: ShapeInterface
Method or attribute name: (value: PixelMap): ShapeAttribute;
Initial version: 7|Class name: ShapeInterface
Method or attribute name: (value: PixelMap): ShapeAttribute;
Initial version: 10|shape.d.ts| +|Initial version changed|Class name: SideBarContainerType
Initial version: 8|Class name: SideBarContainerType
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerType
Method or attribute name: Embed
Initial version: 8|Class name: SideBarContainerType
Method or attribute name: Embed
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerType
Method or attribute name: Overlay
Initial version: 8|Class name: SideBarContainerType
Method or attribute name: Overlay
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarPosition
Initial version: 9|Class name: SideBarPosition
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarPosition
Method or attribute name: Start
Initial version: 9|Class name: SideBarPosition
Method or attribute name: Start
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarPosition
Method or attribute name: End
Initial version: 9|Class name: SideBarPosition
Method or attribute name: End
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: ButtonStyle
Initial version: 8|Class name: ButtonStyle
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: ButtonStyle
Method or attribute name: left?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: left?: number;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: ButtonStyle
Method or attribute name: top?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: top?: number;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: ButtonStyle
Method or attribute name: width?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: width?: number;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: ButtonStyle
Method or attribute name: height?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: height?: number;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerInterface
Initial version: 8|Class name: SideBarContainerInterface
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerInterface
Method or attribute name: (type?: SideBarContainerType): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerInterface
Method or attribute name: (type?: SideBarContainerType): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Initial version: 8|Class name: SideBarContainerAttribute
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: showSideBar(value: boolean): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: showSideBar(value: boolean): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: controlButton(value: ButtonStyle): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: controlButton(value: ButtonStyle): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: showControlButton(value: boolean): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: showControlButton(value: boolean): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: onChange(callback: (value: boolean) => void): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: onChange(callback: (value: boolean) => void): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: autoHide(value: boolean): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: autoHide(value: boolean): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: sideBarPosition(value: SideBarPosition): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: sideBarPosition(value: SideBarPosition): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const SideBarContainer: SideBarContainerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const SideBarContainer: SideBarContainerInterface;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const SideBarContainerInstance: SideBarContainerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const SideBarContainerInstance: SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| +|Initial version changed|Class name: ColorMode
Initial version: 7|Class name: ColorMode
Initial version: 10|state_management.d.ts| +|Initial version changed|Class name: ColorMode
Method or attribute name: LIGHT = 0
Initial version: 7|Class name: ColorMode
Method or attribute name: LIGHT = 0
Initial version: 10|state_management.d.ts| +|Initial version changed|Class name: ColorMode
Method or attribute name: DARK
Initial version: 7|Class name: ColorMode
Method or attribute name: DARK
Initial version: 10|state_management.d.ts| +|Initial version changed|Class name: LayoutDirection
Initial version: 7|Class name: LayoutDirection
Initial version: 10|state_management.d.ts| +|Initial version changed|Class name: LayoutDirection
Method or attribute name: LTR
Initial version: 7|Class name: LayoutDirection
Method or attribute name: LTR
Initial version: 10|state_management.d.ts| +|Initial version changed|Class name: LayoutDirection
Method or attribute name: RTL
Initial version: 7|Class name: LayoutDirection
Method or attribute name: RTL
Initial version: 10|state_management.d.ts| +|Initial version changed|Class name: LayoutDirection
Method or attribute name: Auto
Initial version: 8|Class name: LayoutDirection
Method or attribute name: Auto
Initial version: 10|state_management.d.ts| +|Initial version changed|Class name: StepperInterface
Initial version: 8|Class name: StepperInterface
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: StepperInterface
Method or attribute name: (value?: { index?: number }): StepperAttribute;
Initial version: 8|Class name: StepperInterface
Method or attribute name: (value?: { index?: number }): StepperAttribute;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: StepperAttribute
Initial version: 8|Class name: StepperAttribute
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: StepperAttribute
Method or attribute name: onFinish(callback: () => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onFinish(callback: () => void): StepperAttribute;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: StepperAttribute
Method or attribute name: onSkip(callback: () => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onSkip(callback: () => void): StepperAttribute;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: StepperAttribute
Method or attribute name: onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: StepperAttribute
Method or attribute name: onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: StepperAttribute
Method or attribute name: onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Stepper: StepperInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Stepper: StepperInterface;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const StepperInstance: StepperAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const StepperInstance: StepperAttribute;
Initial version: 10|stepper.d.ts| +|Initial version changed|Class name: ItemState
Initial version: 8|Class name: ItemState
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: ItemState
Method or attribute name: Normal
Initial version: 8|Class name: ItemState
Method or attribute name: Normal
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: ItemState
Method or attribute name: Disabled
Initial version: 8|Class name: ItemState
Method or attribute name: Disabled
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: ItemState
Method or attribute name: Waiting
Initial version: 8|Class name: ItemState
Method or attribute name: Waiting
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: ItemState
Method or attribute name: Skip
Initial version: 8|Class name: ItemState
Method or attribute name: Skip
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: StepperItemInterface
Initial version: 8|Class name: StepperItemInterface
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: StepperItemInterface
Method or attribute name: (): StepperItemAttribute;
Initial version: 8|Class name: StepperItemInterface
Method or attribute name: (): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: StepperItemAttribute
Initial version: 8|Class name: StepperItemAttribute
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: StepperItemAttribute
Method or attribute name: prevLabel(value: string): StepperItemAttribute;
Initial version: 8|Class name: StepperItemAttribute
Method or attribute name: prevLabel(value: string): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: StepperItemAttribute
Method or attribute name: nextLabel(value: string): StepperItemAttribute;
Initial version: 8|Class name: StepperItemAttribute
Method or attribute name: nextLabel(value: string): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: StepperItemAttribute
Method or attribute name: status(value?: ItemState): StepperItemAttribute;
Initial version: 8|Class name: StepperItemAttribute
Method or attribute name: status(value?: ItemState): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const StepperItemInstance: StepperItemAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const StepperItemInstance: StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const StepperItem: StepperItemInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const StepperItem: StepperItemInterface;
Initial version: 10|stepper_item.d.ts| +|Initial version changed|Class name: SwiperController
Initial version: 7|Class name: SwiperController
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperController
Method or attribute name: constructor();
Initial version: 7|Class name: SwiperController
Method or attribute name: constructor();
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperController
Method or attribute name: showNext();
Initial version: 7|Class name: SwiperController
Method or attribute name: showNext();
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperController
Method or attribute name: showPrevious();
Initial version: 7|Class name: SwiperController
Method or attribute name: showPrevious();
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperController
Method or attribute name: finishAnimation(callback?: () => void);
Initial version: 7|Class name: SwiperController
Method or attribute name: finishAnimation(callback?: () => void);
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperDisplayMode
Initial version: 7|Class name: SwiperDisplayMode
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Initial version: 7|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Initial version: 7|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperInterface
Initial version: 7|Class name: SwiperInterface
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperInterface
Method or attribute name: (controller?: SwiperController): SwiperAttribute;
Initial version: 7|Class name: SwiperInterface
Method or attribute name: (controller?: SwiperController): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Initial version: 7|Class name: SwiperAttribute
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: index(value: number): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: index(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: autoPlay(value: boolean): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: autoPlay(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: interval(value: number): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: interval(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: loop(value: boolean): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: loop(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: duration(value: number): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: duration(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: vertical(value: boolean): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: vertical(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: itemSpace(value: number \| string): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: itemSpace(value: number \| string): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: displayMode(value: SwiperDisplayMode): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: displayMode(value: SwiperDisplayMode): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: cachedCount(value: number): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: cachedCount(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: displayCount(value: number \| string): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: displayCount(value: number \| string): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: effectMode(value: EdgeEffect): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: effectMode(value: EdgeEffect): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: disableSwipe(value: boolean): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: disableSwipe(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: onChange(event: (index: number) => void): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: onChange(event: (index: number) => void): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: onAnimationStart(event: (index: number) => void): SwiperAttribute;
Initial version: 9|Class name: SwiperAttribute
Method or attribute name: onAnimationStart(event: (index: number) => void): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: SwiperAttribute
Method or attribute name: onAnimationEnd(event: (index: number) => void): SwiperAttribute;
Initial version: 9|Class name: SwiperAttribute
Method or attribute name: onAnimationEnd(event: (index: number) => void): SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Swiper: SwiperInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Swiper: SwiperInterface;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const SwiperInstance: SwiperAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const SwiperInstance: SwiperAttribute;
Initial version: 10|swiper.d.ts| +|Initial version changed|Class name: BarMode
Initial version: 7|Class name: BarMode
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: BarMode
Method or attribute name: Scrollable
Initial version: 7|Class name: BarMode
Method or attribute name: Scrollable
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: BarMode
Method or attribute name: Fixed
Initial version: 7|Class name: BarMode
Method or attribute name: Fixed
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: BarPosition
Initial version: 7|Class name: BarPosition
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: BarPosition
Method or attribute name: Start
Initial version: 7|Class name: BarPosition
Method or attribute name: Start
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: BarPosition
Method or attribute name: End
Initial version: 7|Class name: BarPosition
Method or attribute name: End
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsController
Initial version: 7|Class name: TabsController
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsController
Method or attribute name: constructor();
Initial version: 7|Class name: TabsController
Method or attribute name: constructor();
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsController
Method or attribute name: changeIndex(value: number): void;
Initial version: 7|Class name: TabsController
Method or attribute name: changeIndex(value: number): void;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsInterface
Initial version: 7|Class name: TabsInterface
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsInterface
Method or attribute name: (value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
Initial version: 7|Class name: TabsInterface
Method or attribute name: (value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Initial version: 7|Class name: TabsAttribute
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: vertical(value: boolean): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: vertical(value: boolean): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: barPosition(value: BarPosition): TabsAttribute;
Initial version: 9|Class name: TabsAttribute
Method or attribute name: barPosition(value: BarPosition): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: scrollable(value: boolean): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: scrollable(value: boolean): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: barMode(value: BarMode): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: barMode(value: BarMode): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: barWidth(value: Length): TabsAttribute;
Initial version: 8|Class name: TabsAttribute
Method or attribute name: barWidth(value: Length): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: barHeight(value: Length): TabsAttribute;
Initial version: 8|Class name: TabsAttribute
Method or attribute name: barHeight(value: Length): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: animationDuration(value: number): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: animationDuration(value: number): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: TabsAttribute
Method or attribute name: onChange(event: (index: number) => void): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: onChange(event: (index: number) => void): TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Tabs: TabsInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Tabs: TabsInterface;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TabsInstance: TabsAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TabsInstance: TabsAttribute;
Initial version: 10|tabs.d.ts| +|Initial version changed|Class name: SubTabBarStyle
Initial version: 9|Class name: SubTabBarStyle
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: BottomTabBarStyle
Initial version: 9|Class name: BottomTabBarStyle
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: TabContentInterface
Initial version: 7|Class name: TabContentInterface
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: TabContentInterface
Method or attribute name: (): TabContentAttribute;
Initial version: 7|Class name: TabContentInterface
Method or attribute name: (): TabContentAttribute;
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: TabContentAttribute
Initial version: 7|Class name: TabContentAttribute
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: TabContentAttribute
Method or attribute name: tabBar(value: SubTabBarStyle \| BottomTabBarStyle): TabContentAttribute;
Initial version: 9|Class name: TabContentAttribute
Method or attribute name: tabBar(value: SubTabBarStyle \| BottomTabBarStyle): TabContentAttribute;
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TabContent: TabContentInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TabContent: TabContentInterface;
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TabContentInstance: TabContentAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TabContentInstance: TabContentAttribute;
Initial version: 10|tab_content.d.ts| +|Initial version changed|Class name: TextAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAttribute;
Initial version: 9|Class name: TextAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAttribute;
Initial version: 10|text.d.ts| +|Initial version changed|Class name: TextAreaController
Initial version: 8|Class name: TextAreaController
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaController
Method or attribute name: constructor();
Initial version: 8|Class name: TextAreaController
Method or attribute name: constructor();
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaController
Method or attribute name: caretPosition(value: number): void;
Initial version: 8|Class name: TextAreaController
Method or attribute name: caretPosition(value: number): void;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaOptions
Initial version: 7|Class name: TextAreaOptions
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 7|Class name: TextAreaOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaOptions
Method or attribute name: text?: ResourceStr;
Initial version: 7|Class name: TextAreaOptions
Method or attribute name: text?: ResourceStr;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaOptions
Method or attribute name: controller?: TextAreaController;
Initial version: 8|Class name: TextAreaOptions
Method or attribute name: controller?: TextAreaController;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaInterface
Initial version: 7|Class name: TextAreaInterface
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaInterface
Method or attribute name: (value?: TextAreaOptions): TextAreaAttribute;
Initial version: 7|Class name: TextAreaInterface
Method or attribute name: (value?: TextAreaOptions): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Initial version: 7|Class name: TextAreaAttribute
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: placeholderFont(value: Font): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: placeholderFont(value: Font): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: textAlign(value: TextAlign): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: textAlign(value: TextAlign): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: caretColor(value: ResourceColor): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: caretColor(value: ResourceColor): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontColor(value: ResourceColor): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontColor(value: ResourceColor): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontSize(value: Length): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontSize(value: Length): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontStyle(value: FontStyle): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontStyle(value: FontStyle): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute;
Initial version: 8|Class name: TextAreaAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAreaAttribute;
Initial version: 9|Class name: TextAreaAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextArea: TextAreaInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TextArea: TextAreaInterface;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextAreaInstance: TextAreaAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TextAreaInstance: TextAreaAttribute;
Initial version: 10|text_area.d.ts| +|Initial version changed|Class name: TextClockController
Initial version: 8|Class name: TextClockController
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockController
Method or attribute name: constructor();
Initial version: 8|Class name: TextClockController
Method or attribute name: constructor();
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockController
Method or attribute name: start();
Initial version: 8|Class name: TextClockController
Method or attribute name: start();
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockController
Method or attribute name: stop();
Initial version: 8|Class name: TextClockController
Method or attribute name: stop();
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockInterface
Initial version: 8|Class name: TextClockInterface
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockInterface
Method or attribute name: (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
Initial version: 8|Class name: TextClockInterface
Method or attribute name: (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockAttribute
Method or attribute name: format(value: string): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: format(value: string): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockAttribute
Method or attribute name: onDateChange(event: (value: number) => void): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: onDateChange(event: (value: number) => void): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontColor(value: ResourceColor): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontColor(value: ResourceColor): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontSize(value: Length): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontSize(value: Length): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontStyle(value: FontStyle): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontStyle(value: FontStyle): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextClock: TextClockInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TextClock: TextClockInterface;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextClockInstance: TextClockAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TextClockInstance: TextClockAttribute;
Initial version: 10|text_clock.d.ts| +|Initial version changed|Class name: InputType
Initial version: 7|Class name: InputType
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: InputType
Method or attribute name: Normal
Initial version: 7|Class name: InputType
Method or attribute name: Normal
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: InputType
Method or attribute name: Number
Initial version: 7|Class name: InputType
Method or attribute name: Number
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: InputType
Method or attribute name: PhoneNumber
Initial version: 9|Class name: InputType
Method or attribute name: PhoneNumber
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: InputType
Method or attribute name: Email
Initial version: 7|Class name: InputType
Method or attribute name: Email
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: InputType
Method or attribute name: Password
Initial version: 7|Class name: InputType
Method or attribute name: Password
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: EnterKeyType
Initial version: 7|Class name: EnterKeyType
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: EnterKeyType
Method or attribute name: Go
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Go
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: EnterKeyType
Method or attribute name: Search
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Search
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: EnterKeyType
Method or attribute name: Send
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Send
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: EnterKeyType
Method or attribute name: Next
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Next
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: EnterKeyType
Method or attribute name: Done
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Done
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputController
Initial version: 8|Class name: TextInputController
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputController
Method or attribute name: constructor();
Initial version: 8|Class name: TextInputController
Method or attribute name: constructor();
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputController
Method or attribute name: caretPosition(value: number): void;
Initial version: 8|Class name: TextInputController
Method or attribute name: caretPosition(value: number): void;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputOptions
Initial version: 7|Class name: TextInputOptions
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 7|Class name: TextInputOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputOptions
Method or attribute name: text?: ResourceStr;
Initial version: 7|Class name: TextInputOptions
Method or attribute name: text?: ResourceStr;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputOptions
Method or attribute name: controller?: TextInputController;
Initial version: 8|Class name: TextInputOptions
Method or attribute name: controller?: TextInputController;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputStyle
Initial version: 9|Class name: TextInputStyle
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputStyle
Method or attribute name: Default
Initial version: 9|Class name: TextInputStyle
Method or attribute name: Default
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputStyle
Method or attribute name: Inline
Initial version: 9|Class name: TextInputStyle
Method or attribute name: Inline
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputInterface
Initial version: 7|Class name: TextInputInterface
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputInterface
Method or attribute name: (value?: TextInputOptions): TextInputAttribute;
Initial version: 7|Class name: TextInputInterface
Method or attribute name: (value?: TextInputOptions): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Initial version: 7|Class name: TextInputAttribute
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: type(value: InputType): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: type(value: InputType): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: placeholderFont(value?: Font): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: placeholderFont(value?: Font): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: enterKeyType(value: EnterKeyType): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: enterKeyType(value: EnterKeyType): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: caretColor(value: ResourceColor): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: caretColor(value: ResourceColor): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: maxLength(value: number): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: maxLength(value: number): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontColor(value: ResourceColor): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontColor(value: ResourceColor): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontSize(value: Length): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontSize(value: Length): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontStyle(value: FontStyle): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontStyle(value: FontStyle): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: copyOption(value: CopyOptions): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: copyOption(value: CopyOptions): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: showPasswordIcon(value: boolean): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: showPasswordIcon(value: boolean): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: textAlign(value: TextAlign): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: textAlign(value: TextAlign): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextInputAttribute
Method or attribute name: style(value: TextInputStyle): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: style(value: TextInputStyle): TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextInput: TextInputInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TextInput: TextInputInterface;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextInputInstance: TextInputAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TextInputInstance: TextInputAttribute;
Initial version: 10|text_input.d.ts| +|Initial version changed|Class name: TextPickerOptions
Initial version: 8|Class name: TextPickerOptions
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerOptions
Method or attribute name: value?: string;
Initial version: N/A|Class name: TextPickerOptions
Method or attribute name: value?: string;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerOptions
Method or attribute name: selected?: number;
Initial version: N/A|Class name: TextPickerOptions
Method or attribute name: selected?: number;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerInterface
Initial version: 8|Class name: TextPickerInterface
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerInterface
Method or attribute name: (options?: TextPickerOptions): TextPickerAttribute;
Initial version: 8|Class name: TextPickerInterface
Method or attribute name: (options?: TextPickerOptions): TextPickerAttribute;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerAttribute
Initial version: 8|Class name: TextPickerAttribute
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerAttribute
Method or attribute name: defaultPickerItemHeight(value: number \| string): TextPickerAttribute;
Initial version: 8|Class name: TextPickerAttribute
Method or attribute name: defaultPickerItemHeight(value: number \| string): TextPickerAttribute;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerAttribute
Method or attribute name: onChange(callback: (value: string, index: number) => void): TextPickerAttribute;
Initial version: 8|Class name: TextPickerAttribute
Method or attribute name: onChange(callback: (value: string, index: number) => void): TextPickerAttribute;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerResult
Initial version: 8|Class name: TextPickerResult
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerResult
Method or attribute name: value: string;
Initial version: 8|Class name: TextPickerResult
Method or attribute name: value: string;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerResult
Method or attribute name: index: number;
Initial version: 8|Class name: TextPickerResult
Method or attribute name: index: number;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerDialogOptions
Initial version: 8|Class name: TextPickerDialogOptions
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: defaultPickerItemHeight?: number \| string;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: defaultPickerItemHeight?: number \| string;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: onAccept?: (value: TextPickerResult) => void;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: onAccept?: (value: TextPickerResult) => void;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: onChange?: (value: TextPickerResult) => void;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: onChange?: (value: TextPickerResult) => void;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerDialog
Initial version: 8|Class name: TextPickerDialog
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextPickerDialog
Method or attribute name: static show(options?: TextPickerDialogOptions);
Initial version: 8|Class name: TextPickerDialog
Method or attribute name: static show(options?: TextPickerDialogOptions);
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextPicker: TextPickerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TextPicker: TextPickerInterface;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextPickerInstance: TextPickerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TextPickerInstance: TextPickerAttribute;
Initial version: 10|text_picker.d.ts| +|Initial version changed|Class name: TextTimerController
Initial version: 8|Class name: TextTimerController
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerController
Method or attribute name: constructor();
Initial version: 8|Class name: TextTimerController
Method or attribute name: constructor();
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerController
Method or attribute name: start();
Initial version: 8|Class name: TextTimerController
Method or attribute name: start();
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerController
Method or attribute name: pause();
Initial version: 8|Class name: TextTimerController
Method or attribute name: pause();
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerController
Method or attribute name: reset();
Initial version: 8|Class name: TextTimerController
Method or attribute name: reset();
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerOptions
Initial version: 8|Class name: TextTimerOptions
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerOptions
Method or attribute name: isCountDown?: boolean;
Initial version: 8|Class name: TextTimerOptions
Method or attribute name: isCountDown?: boolean;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerOptions
Method or attribute name: count?: number;
Initial version: 8|Class name: TextTimerOptions
Method or attribute name: count?: number;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerOptions
Method or attribute name: controller?: TextTimerController;
Initial version: 8|Class name: TextTimerOptions
Method or attribute name: controller?: TextTimerController;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerInterface
Initial version: 8|Class name: TextTimerInterface
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerInterface
Method or attribute name: (options?: TextTimerOptions): TextTimerAttribute;
Initial version: 8|Class name: TextTimerInterface
Method or attribute name: (options?: TextTimerOptions): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Initial version: 8|Class name: TextTimerAttribute
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: format(value: string): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: format(value: string): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontColor(value: ResourceColor): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontColor(value: ResourceColor): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontSize(value: Length): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontSize(value: Length): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontStyle(value: FontStyle): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontStyle(value: FontStyle): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextTimer: TextTimerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TextTimer: TextTimerInterface;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TextTimerInstance: TextTimerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TextTimerInstance: TextTimerAttribute;
Initial version: 10|text_timer.d.ts| +|Initial version changed|Class name: TimePickerResult
Initial version: 8|Class name: TimePickerResult
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerResult
Method or attribute name: hour?: number;
Initial version: 8|Class name: TimePickerResult
Method or attribute name: hour?: number;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerResult
Method or attribute name: minute?: number;
Initial version: 8|Class name: TimePickerResult
Method or attribute name: minute?: number;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerOptions
Initial version: 8|Class name: TimePickerOptions
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerOptions
Method or attribute name: selected?: Date;
Initial version: N/A|Class name: TimePickerOptions
Method or attribute name: selected?: Date;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerInterface
Initial version: 8|Class name: TimePickerInterface
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerInterface
Method or attribute name: (options?: TimePickerOptions): TimePickerAttribute;
Initial version: 8|Class name: TimePickerInterface
Method or attribute name: (options?: TimePickerOptions): TimePickerAttribute;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerAttribute
Initial version: 8|Class name: TimePickerAttribute
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerAttribute
Method or attribute name: useMilitaryTime(value: boolean): TimePickerAttribute;
Initial version: 8|Class name: TimePickerAttribute
Method or attribute name: useMilitaryTime(value: boolean): TimePickerAttribute;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerAttribute
Method or attribute name: onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
Initial version: 8|Class name: TimePickerAttribute
Method or attribute name: onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerDialogOptions
Initial version: 8|Class name: TimePickerDialogOptions
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: useMilitaryTime?: boolean;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: useMilitaryTime?: boolean;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: onAccept?: (value: TimePickerResult) => void;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: onAccept?: (value: TimePickerResult) => void;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: onChange?: (value: TimePickerResult) => void;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: onChange?: (value: TimePickerResult) => void;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerDialog
Initial version: 8|Class name: TimePickerDialog
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: TimePickerDialog
Method or attribute name: static show(options?: TimePickerDialogOptions);
Initial version: 8|Class name: TimePickerDialog
Method or attribute name: static show(options?: TimePickerDialogOptions);
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TimePicker: TimePickerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TimePicker: TimePickerInterface;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const TimePickerInstance: TimePickerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TimePickerInstance: TimePickerAttribute;
Initial version: 10|time_picker.d.ts| +|Initial version changed|Class name: Resource
Method or attribute name: readonly bundleName: string;
Initial version: 9|Class name: Resource
Method or attribute name: readonly bundleName: string;
Initial version: 10|units.d.ts| +|Initial version changed|Class name: Resource
Method or attribute name: readonly moduleName: string;
Initial version: 9|Class name: Resource
Method or attribute name: readonly moduleName: string;
Initial version: 10|units.d.ts| +|Initial version changed|Class name: Font
Initial version: 7|Class name: Font
Initial version: 10|units.d.ts| +|Initial version changed|Class name: Font
Method or attribute name: size?: Length;
Initial version: N/A|Class name: Font
Method or attribute name: size?: Length;
Initial version: 10|units.d.ts| +|Initial version changed|Class name: Font
Method or attribute name: weight?: FontWeight \| number \| string;
Initial version: N/A|Class name: Font
Method or attribute name: weight?: FontWeight \| number \| string;
Initial version: 10|units.d.ts| +|Initial version changed|Class name: Font
Method or attribute name: family?: string \| Resource;
Initial version: N/A|Class name: Font
Method or attribute name: family?: string \| Resource;
Initial version: 10|units.d.ts| +|Initial version changed|Class name: Font
Method or attribute name: style?: FontStyle;
Initial version: N/A|Class name: Font
Method or attribute name: style?: FontStyle;
Initial version: 10|units.d.ts| +|Initial version changed|Class name: ColorFilter
Initial version: 9|Class name: ColorFilter
Initial version: 10|units.d.ts| +|Initial version changed|Class name: ColorFilter
Method or attribute name: constructor(value: number[]);
Initial version: 9|Class name: ColorFilter
Method or attribute name: constructor(value: number[]);
Initial version: 10|units.d.ts| +|Initial version changed|Class name: SeekMode
Initial version: 8|Class name: SeekMode
Initial version: 10|video.d.ts| +|Initial version changed|Class name: SeekMode
Method or attribute name: PreviousKeyframe
Initial version: 8|Class name: SeekMode
Method or attribute name: PreviousKeyframe
Initial version: 10|video.d.ts| +|Initial version changed|Class name: SeekMode
Method or attribute name: NextKeyframe
Initial version: 8|Class name: SeekMode
Method or attribute name: NextKeyframe
Initial version: 10|video.d.ts| +|Initial version changed|Class name: SeekMode
Method or attribute name: ClosestKeyframe
Initial version: 8|Class name: SeekMode
Method or attribute name: ClosestKeyframe
Initial version: 10|video.d.ts| +|Initial version changed|Class name: SeekMode
Method or attribute name: Accurate
Initial version: 8|Class name: SeekMode
Method or attribute name: Accurate
Initial version: 10|video.d.ts| +|Initial version changed|Class name: PlaybackSpeed
Initial version: 8|Class name: PlaybackSpeed
Initial version: 10|video.d.ts| +|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_0_75_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_0_75_X
Initial version: 10|video.d.ts| +|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_00_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_00_X
Initial version: 10|video.d.ts| +|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_25_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_25_X
Initial version: 10|video.d.ts| +|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_75_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_75_X
Initial version: 10|video.d.ts| +|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_2_00_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_2_00_X
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoOptions
Initial version: 7|Class name: VideoOptions
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoOptions
Method or attribute name: src?: string \| Resource;
Initial version: 7|Class name: VideoOptions
Method or attribute name: src?: string \| Resource;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoOptions
Method or attribute name: currentProgressRate?: number \| string \| PlaybackSpeed;
Initial version: 7|Class name: VideoOptions
Method or attribute name: currentProgressRate?: number \| string \| PlaybackSpeed;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoOptions
Method or attribute name: previewUri?: string \| PixelMap \| Resource;
Initial version: 7|Class name: VideoOptions
Method or attribute name: previewUri?: string \| PixelMap \| Resource;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoOptions
Method or attribute name: controller?: VideoController;
Initial version: 7|Class name: VideoOptions
Method or attribute name: controller?: VideoController;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Initial version: 7|Class name: VideoController
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: constructor();
Initial version: 7|Class name: VideoController
Method or attribute name: constructor();
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: start();
Initial version: 7|Class name: VideoController
Method or attribute name: start();
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: pause();
Initial version: 7|Class name: VideoController
Method or attribute name: pause();
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: stop();
Initial version: 7|Class name: VideoController
Method or attribute name: stop();
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: setCurrentTime(value: number);
Initial version: 7|Class name: VideoController
Method or attribute name: setCurrentTime(value: number);
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: requestFullscreen(value: boolean);
Initial version: 7|Class name: VideoController
Method or attribute name: requestFullscreen(value: boolean);
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: exitFullscreen();
Initial version: 7|Class name: VideoController
Method or attribute name: exitFullscreen();
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoController
Method or attribute name: setCurrentTime(value: number, seekMode: SeekMode);
Initial version: 8|Class name: VideoController
Method or attribute name: setCurrentTime(value: number, seekMode: SeekMode);
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoInterface
Initial version: 7|Class name: VideoInterface
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoInterface
Method or attribute name: (value: VideoOptions): VideoAttribute;
Initial version: 7|Class name: VideoInterface
Method or attribute name: (value: VideoOptions): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Initial version: 7|Class name: VideoAttribute
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: muted(value: boolean): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: muted(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: autoPlay(value: boolean): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: autoPlay(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: controls(value: boolean): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: controls(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: loop(value: boolean): VideoAttribute;
Initial version: 6|Class name: VideoAttribute
Method or attribute name: loop(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: objectFit(value: ImageFit): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: objectFit(value: ImageFit): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: onStart(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onStart(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: onPause(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onPause(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: onFinish(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onFinish(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: VideoAttribute
Method or attribute name: onError(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onError(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const Video: VideoInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Video: VideoInterface;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const VideoInstance: VideoAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const VideoInstance: VideoAttribute;
Initial version: 10|video.d.ts| +|Initial version changed|Class name: WaterFlowOptions
Initial version: 9|Class name: WaterFlowOptions
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 9|Class name: WaterFlowOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowOptions
Method or attribute name: scroller?: Scroller;
Initial version: 9|Class name: WaterFlowOptions
Method or attribute name: scroller?: Scroller;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowInterface
Initial version: 9|Class name: WaterFlowInterface
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowInterface
Method or attribute name: (options?: WaterFlowOptions): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowInterface
Method or attribute name: (options?: WaterFlowOptions): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Initial version: 9|Class name: WaterFlowAttribute
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: columnsTemplate(value: string): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: columnsTemplate(value: string): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: itemConstraintSize(value: ConstraintSizeOptions): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: itemConstraintSize(value: ConstraintSizeOptions): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: rowsTemplate(value: string): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: rowsTemplate(value: string): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: columnsGap(value: Length): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: columnsGap(value: Length): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: rowsGap(value: Length): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: rowsGap(value: Length): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: layoutDirection(value: FlexDirection): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: layoutDirection(value: FlexDirection): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: onReachStart(event: () => void): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: onReachStart(event: () => void): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: onReachEnd(event: () => void): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: onReachEnd(event: () => void): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const WaterFlow: WaterFlowInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const WaterFlow: WaterFlowInterface;
Initial version: 10|water_flow.d.ts| +|Initial version changed|Class name: global
Method or attribute name: declare const WaterFlowInstance: WaterFlowAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const WaterFlowInstance: WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| +|Function changed|Class name: ActionSheet
Method or attribute name: static show(value: {

/**

* Title Properties

* @since 8

*/

title: string \| Resource;



/**

* message Properties

* @since 8

*/

message: string \| Resource;



/**

* Invoke the commit function.

* @since 8

*/

confirm?: {

/**

* Text content of the confirmation button.

* @since 8

*/

value: string \| Resource;



/**

* Method executed by the callback.

* @since 8

*/

action: () => void;

};



/**

* Execute Cancel Function.

* @since 8

*/

cancel?: () => void;



/**

* The Array of sheets

* @since 8

*/

sheets: Array\;



/**

* Allows users to click the mask layer to exit.

* @since 8

*/

autoCancel?: boolean;



/**

* Alignment in the vertical direction.

* @since 8

*/

alignment?: DialogAlignment;



/**

* Offset of the pop-up window relative to the alignment position.

* @since 8

*/

offset?: { dx: number \| string \| Resource; dy: number \| string \| Resource };

});
|Class name: ActionSheet
Method or attribute name: static show(value: {
/**
* Title Properties
* @since 8
*/
/**
* Title Properties
* @crossplatform
* @since 10
*/
title: string \| Resource;

/**
* message Properties
* @since 8
*/
/**
* message Properties
* @crossplatform
* @since 10
*/
message: string \| Resource;

/**
* Invoke the commit function.
* @since 8
*/
/**
* Invoke the commit function.
* @crossplatform
* @since 10
*/
confirm?: {
/**
* Text content of the confirmation button.
* @since 8
*/
/**
* Text content of the confirmation button.
* @crossplatform
* @since 10
*/
value: string \| Resource;

/**
* Method executed by the callback.
* @since 8
*/
/**
* Method executed by the callback.
* @crossplatform
* @since 10
*/
action: () => void;
};

/**
* Execute Cancel Function.
* @since 8
*/
/**
* Execute Cancel Function.
* @crossplatform
* @since 10
*/
cancel?: () => void;

/**
* The Array of sheets
* @since 8
*/
/**
* The Array of sheets
* @crossplatform
* @since 10
*/
sheets: Array\;

/**
* Allows users to click the mask layer to exit.
* @since 8
*/
/**
* Allows users to click the mask layer to exit.
* @crossplatform
* @since 10
*/
autoCancel?: boolean;

/**
* Alignment in the vertical direction.
* @since 8
*/
/**
* Alignment in the vertical direction.
* @crossplatform
* @since 10
*/
alignment?: DialogAlignment;

/**
* Offset of the pop-up window relative to the alignment position.
* @since 8
*/
/**
* Offset of the pop-up window relative to the alignment position.
* @crossplatform
* @since 10
*/
offset?: { dx: number \| string \| Resource; dy: number \| string \| Resource };
});
|action_sheet.d.ts| +|Function changed|Class name: AlphabetIndexerAttribute
Method or attribute name: alignStyle(value: IndexerAlign): AlphabetIndexerAttribute;
|Class name: AlphabetIndexerAttribute
Method or attribute name: alignStyle(value: IndexerAlign, offset?: Length): AlphabetIndexerAttribute;
|alphabet_indexer.d.ts| +|Function changed|Class name: PopupOptions
Method or attribute name: onStateChange?: (event: { isVisible: boolean }) => void;
|Class name: PopupOptions
Method or attribute name: onStateChange?: (event: {
/**
* is Visible.
* @crossplatform
* @since 10
*/
isVisible: boolean
}) => void;
|common.d.ts| +|Function changed|Class name: CustomPopupOptions
Method or attribute name: onStateChange?: (event: { isVisible: boolean }) => void;
|Class name: CustomPopupOptions
Method or attribute name: onStateChange?: (event: {
/**
* is Visible.
* @crossplatform
* @since 10
*/
isVisible: boolean
}) => void;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: backgroundBlurStyle(value: BlurStyle): T;
|Class name: CommonMethod
Method or attribute name: backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderStyle(value: BorderStyle): T;
|Class name: CommonMethod
Method or attribute name: borderStyle(value: BorderStyle \| EdgeStyles): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderStyle(value: EdgeStyles): T;
|Class name: CommonMethod
Method or attribute name: borderStyle(value: BorderStyle \| EdgeStyles): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderWidth(value: Length): T;
|Class name: CommonMethod
Method or attribute name: borderWidth(value: Length \| EdgeWidths): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderWidth(value: EdgeWidths): T;
|Class name: CommonMethod
Method or attribute name: borderWidth(value: Length \| EdgeWidths): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderColor(value: ResourceColor): T;
|Class name: CommonMethod
Method or attribute name: borderColor(value: ResourceColor \| EdgeColors): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderColor(value: EdgeColors): T;
|Class name: CommonMethod
Method or attribute name: borderColor(value: ResourceColor \| EdgeColors): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderRadius(value: Length): T;
|Class name: CommonMethod
Method or attribute name: borderRadius(value: Length \| BorderRadiuses): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: borderRadius(value: BorderRadiuses): T;
|Class name: CommonMethod
Method or attribute name: borderRadius(value: Length \| BorderRadiuses): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: transition(value: TransitionOptions): T;
|Class name: CommonMethod
Method or attribute name: transition(value: TransitionOptions \| TransitionEffect): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: shadow(value: {
radius: number \| Resource;
color?: Color \| string \| Resource;
offsetX?: number \| Resource;
offsetY?: number \| Resource;
}): T;
|Class name: CommonMethod
Method or attribute name: shadow(value: ShadowOptions \| ShadowStyle): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: mask(value: CircleAttribute \| EllipseAttribute \| PathAttribute \| RectAttribute): T;
|Class name: CommonMethod
Method or attribute name: mask(value: CircleAttribute \| EllipseAttribute \| PathAttribute \| RectAttribute \| ProgressMask): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: bindMenu(content: { value: string; action: () => void }[] \| CustomBuilder): T;
|Class name: CommonMethod
Method or attribute name: bindMenu(content: { value: ResourceStr; icon?: ResourceStr; action: () => void }[] \| CustomBuilder, options?: MenuOptions): T;
|common.d.ts| +|Function changed|Class name: CommonMethod
Method or attribute name: bindContextMenu(content: CustomBuilder, responseType: ResponseType): T;
|Class name: CommonMethod
Method or attribute name: bindContextMenu(content: CustomBuilder, responseType: ResponseType, options?: ContextMenuOptions): T;
|common.d.ts| +|Function changed|Class name: ImageInterface
Method or attribute name: (src: string \| PixelMap \| Resource): ImageAttribute;
|Class name: ImageInterface
Method or attribute name: (src: PixelMap \| ResourceStr \| DrawableDescriptor): ImageAttribute;
|image.d.ts| +|Function changed|Class name: MenuItemAttribute
Method or attribute name: selectIcon(value: boolean): MenuItemAttribute;
|Class name: MenuItemAttribute
Method or attribute name: selectIcon(value: boolean \| ResourceStr): MenuItemAttribute;
|menu_item.d.ts| +|Function changed|Class name: NavigationAttribute
Method or attribute name: title(value: string \| CustomBuilder \| NavigationCommonTitle \| NavigationCustomTitle): NavigationAttribute;
|Class name: NavigationAttribute
Method or attribute name: title(value: ResourceStr \| CustomBuilder \| NavigationCommonTitle \| NavigationCustomTitle): NavigationAttribute;
|navigation.d.ts| +|Function changed|Class name: RefreshInterface
Method or attribute name: (value: { refreshing: boolean; offset?: number \| string; friction?: number \| string }): RefreshAttribute;
|Class name: RefreshInterface
Method or attribute name: (value: RefreshOptions): RefreshAttribute;
|refresh.d.ts| +|Function changed|Class name: Scroller
Method or attribute name: scrollTo(value: {
xOffset: number \| string;
yOffset: number \| string;
animation?: { duration: number; curve: Curve };
});
|Class name: Scroller
Method or attribute name: scrollTo(value: {
/**
* The X-axis offset.
* @crossplatform
* @since 10
*/
xOffset: number \| string;

/**
* The Y-axis offset.
* @crossplatform
* @since 10
*/
yOffset: number \| string;

/**
* Descriptive animation.
* @crossplatform
* @since 10
*/
animation?: { duration: number; curve: Curve };
});
|scroll.d.ts| +|Function changed|Class name: Scroller
Method or attribute name: scrollToIndex(value: number);
|Class name: Scroller
Method or attribute name: scrollToIndex(value: number, smooth?:boolean);
|scroll.d.ts| +|Function changed|Class name: SearchInterface
Method or attribute name: (options?: { value?: string;
placeholder?: string;
icon?: string;
controller?: SearchController
}): SearchAttribute;
|Class name: SearchInterface
Method or attribute name: (options?: {
/**
* Text input in the search text box
* @type { string }
* @since 8
*/
value?: string;

/**
* Text displayed when there is no input
* @type { string }
* @since 8
*/
/**
* Text displayed when there is no input
* @type { ResourceStr }
* @since 10
*/
placeholder?: ResourceStr;

/**
* Path to the search icon
* @type { string }
* @since 8
*/
icon?: string;

/**
* Controller of the \ component
* @type { SearchController }
* @since 8
*/
controller?: SearchController
}): SearchAttribute;
|search.d.ts| +|Function changed|Class name: SearchAttribute
Method or attribute name: searchButton(value: string): SearchAttribute;
|Class name: SearchAttribute
Method or attribute name: searchButton(value: string, option?: SearchButtonOption): SearchAttribute;
|search.d.ts| +|Function changed|Class name: SwiperAttribute
Method or attribute name: indicator(value: boolean): SwiperAttribute;
|Class name: SwiperAttribute
Method or attribute name: indicator(value: DotIndicator \| DigitIndicator \| boolean): SwiperAttribute;
|swiper.d.ts| +|Function changed|Class name: SwiperAttribute
Method or attribute name: curve(value: Curve \| string): SwiperAttribute;
|Class name: SwiperAttribute
Method or attribute name: curve(value: Curve \| string \| ICurve): SwiperAttribute;
|swiper.d.ts| +|Function changed|Class name: SubTabBarStyle
Method or attribute name: constructor(content: string \| Resource);
|Class name: SubTabBarStyle
Method or attribute name: constructor(content: ResourceStr);
|tab_content.d.ts| +|Function changed|Class name: BottomTabBarStyle
Method or attribute name: constructor(icon: string \| Resource, text: string \| Resource);
|Class name: BottomTabBarStyle
Method or attribute name: constructor(icon: ResourceStr, text: ResourceStr);
|tab_content.d.ts| +|Function changed|Class name: VideoAttribute
Method or attribute name: onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onFullscreenChange(callback: (event?: {
/**
* Play the flag in full screen.
* @crossplatform
* @since 10
*/
fullscreen: boolean
}) => void): VideoAttribute;
|video.d.ts| +|Function changed|Class name: VideoAttribute
Method or attribute name: onPrepared(callback: (event?: { duration: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onPrepared(callback: (event?: {
/**
* Playback duration.
* @crossplatform
* @since 10
*/
duration: number
}) => void): VideoAttribute;
|video.d.ts| +|Function changed|Class name: VideoAttribute
Method or attribute name: onSeeking(callback: (event?: { time: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onSeeking(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| +|Function changed|Class name: VideoAttribute
Method or attribute name: onSeeked(callback: (event?: { time: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onSeeked(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| +|Function changed|Class name: VideoAttribute
Method or attribute name: onUpdate(callback: (event?: { time: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onUpdate(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-battery.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-battery.md new file mode 100644 index 0000000000000000000000000000000000000000..c9ce5f72e18cc62d5fd8407ac10da4021a53037d --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-battery.md @@ -0,0 +1,22 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_SOC = 'soc'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_CHARGE_STATE = 'chargeState'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_HEALTH_STATE = 'healthState'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_PLUGGED_TYPE = 'pluggedType'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_VOLTAGE = 'voltage'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_TECHNOLOGY = 'technology'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_TEMPERATURE = 'temperature'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_PRESENT = 'present'|@ohos.batteryInfo.d.ts| +|Added|NA|Class name: CommonEventBatteryChangedKey
Method or attribute name: EXTRA_CAPACITY_LEVEL = 'capacityLevel'|@ohos.batteryInfo.d.ts| +|Added|NA|Module name: ohos.charger
Class name: charger|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType
Method or attribute name: NONE|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType
Method or attribute name: WIRED_NORMAL|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType
Method or attribute name: WIRED_QUICK|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType
Method or attribute name: WIRED_SUPER_QUICK|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType
Method or attribute name: WIRELESS_NORMAL|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType
Method or attribute name: WIRELESS_QUICK|@ohos.charger.d.ts| +|Added|NA|Module name: ohos.charger
Class name: ChargeType
Method or attribute name: WIRELESS_SUPER_QUICK|@ohos.charger.d.ts| +|Deprecated version changed|Class name: RunningLockType
Method or attribute name: BACKGROUND = 1
Deprecated version: N/A|Class name: RunningLockType
Method or attribute name: BACKGROUND = 1
Deprecated version: 10
Substitute API: N/A|@ohos.runningLock.d.ts| +|Error code added|NA|Class name: batteryStats
Method or attribute name: function getBatteryStats(): Promise\>;
Error code: 202, 4600101|@ohos.batteryStatistics.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-bundle.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-bundle.md new file mode 100644 index 0000000000000000000000000000000000000000..6656a0110cc37ee179b6e026b56baf044eecd2e7 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-bundle.md @@ -0,0 +1,94 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: businessAbilityRouter|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: BusinessType|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: BusinessType
Method or attribute name: SHARE = 0|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: BusinessType
Method or attribute name: UNSPECIFIED = 255|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: BusinessAbilityFilter|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: BusinessAbilityFilter
Method or attribute name: businessType: BusinessType;|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: BusinessAbilityFilter
Method or attribute name: mimeType?: string;|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: BusinessAbilityFilter
Method or attribute name: uri?: string;|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: businessAbilityRouter
Method or attribute name: function queryBusinessAbilityInfo(filter: BusinessAbilityFilter,

callback: AsyncCallback\>): void;|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.app.businessAbilityRouter
Class name: businessAbilityRouter
Method or attribute name: function queryBusinessAbilityInfo(filter: BusinessAbilityFilter): Promise\>;|@ohos.app.businessAbilityRouter.d.ts| +|Added|NA|Module name: ohos.bundle.bundleManager
Class name: ExtensionAbilityType
Method or attribute name: PRINT = 15|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: ExtensionAbilityType
Method or attribute name: PRINT = 15|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Module name: ohos.bundle.bundleManager
Class name: ExtensionAbilityType
Method or attribute name: DRIVER = 18|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: ExtensionAbilityType
Method or attribute name: DRIVER = 18|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Module name: ohos.bundle.bundleManager
Class name: CompatiblePolicy|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Module name: ohos.bundle.bundleManager
Class name: CompatiblePolicy
Method or attribute name: BACKWARD_COMPATIBILITY = 1|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: bundleManager
Method or attribute name: function getAllSharedBundleInfo(callback: AsyncCallback\>): void;|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: bundleManager
Method or attribute name: function getAllSharedBundleInfo(): Promise\>;|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: bundleManager
Method or attribute name: function getSharedBundleInfo(bundleName: string, moduleName: string, callback: AsyncCallback\>): void;|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: bundleManager
Method or attribute name: function getSharedBundleInfo(bundleName: string, moduleName: string): Promise\>;|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: bundleManager
Method or attribute name: function getAppProvisionInfo(bundleName: string, callback: AsyncCallback\): void;|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: bundleManager
Method or attribute name: function getAppProvisionInfo(bundleName: string, userId: number, callback: AsyncCallback\): void;|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: bundleManager
Method or attribute name: function getAppProvisionInfo(bundleName: string, userId?: number): Promise\;|@ohos.bundle.bundleManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: BROWSER = 'Web Browser'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: IMAGE = 'Image Gallery'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: AUDIO = 'Audio Player'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: VIDEO = 'Video Player'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: PDF = 'PDF Viewer'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: WORD = 'Word Viewer'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: EXCEL = 'Excel Viewer'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: ApplicationType
Method or attribute name: PPT = 'PPT Viewer'|@ohos.bundle.defaultAppManager.d.ts| +|Added|NA|Class name: InstallParam
Method or attribute name: sharedBundleDirPaths?: Array\;|@ohos.bundle.installer.d.ts| +|Added|NA|Module name: ohos.bundle.installer
Class name: UninstallParam|@ohos.bundle.installer.d.ts| +|Added|NA|Module name: ohos.bundle.installer
Class name: UninstallParam
Method or attribute name: bundleName: string;|@ohos.bundle.installer.d.ts| +|Added|NA|Module name: ohos.bundle.installer
Class name: UninstallParam
Method or attribute name: versionCode?: number;|@ohos.bundle.installer.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function setOverlayEnabled(moduleName: string, isEnabled: boolean, callback: AsyncCallback\): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function setOverlayEnabled(moduleName: string, isEnabled: boolean): Promise\;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function setOverlayEnabledByBundleName(bundleName: string,

moduleName: string, isEnabled: boolean, callback: AsyncCallback\): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function setOverlayEnabledByBundleName(bundleName: string, moduleName: string, isEnabled: boolean): Promise\;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getOverlayModuleInfo(moduleName: string, callback: AsyncCallback\): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getOverlayModuleInfo(moduleName: string): Promise\;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getTargetOverlayModuleInfos(targetModuleName: string,

callback: AsyncCallback\>): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getTargetOverlayModuleInfos(targetModuleName: string): Promise\>;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getOverlayModuleInfoByBundleName(bundleName: string,

callback: AsyncCallback\>): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getOverlayModuleInfoByBundleName(bundleName: string,

moduleName: string, callback: AsyncCallback\>): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getOverlayModuleInfoByBundleName(bundleName: string,

moduleName?: string): Promise\>;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getTargetOverlayModuleInfosByBundleName(targetBundleName: string,

callback: AsyncCallback\>): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getTargetOverlayModuleInfosByBundleName(targetBundleName: string,

moduleName: string, callback: AsyncCallback\>): void;|@ohos.bundle.overlay.d.ts| +|Added|NA|Module name: ohos.bundle.overlay
Class name: overlay
Method or attribute name: function getTargetOverlayModuleInfosByBundleName(targetBundleName: string,

moduleName?: string): Promise\>;|@ohos.bundle.overlay.d.ts| +|Added|NA|Class name: ApplicationInfo
Method or attribute name: readonly debug: boolean;|ApplicationInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly versionCode: number;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly versionName: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly uuid: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly type: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly appDistributionType: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly validity: Validity;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly developerId: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly certificate: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly apl: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: AppProvisionInfo
Method or attribute name: readonly issuer: string;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: Validity|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: Validity
Method or attribute name: readonly notBefore: number;|AppProvisionInfo.d.ts| +|Added|NA|Module name: AppProvisionInfo
Class name: Validity
Method or attribute name: readonly notAfter: number;|AppProvisionInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly bundleName: string;|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly moduleName: string;|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly name: string;|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly labelId: number;|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly descriptionId: number;|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly iconId: number;|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly businessType: businessAbilityRouter.BusinessType;|BusinessAbilityInfo.d.ts| +|Added|NA|Module name: BusinessAbilityInfo
Class name: BusinessAbilityInfo
Method or attribute name: readonly applicationInfo: ApplicationInfo;|BusinessAbilityInfo.d.ts| +|Added|NA|Class name: Dependency
Method or attribute name: readonly bundleName: string;|HapModuleInfo.d.ts| +|Added|NA|Class name: Dependency
Method or attribute name: readonly versionCode: number;|HapModuleInfo.d.ts| +|Added|NA|Module name: OverlayModuleInfo
Class name: OverlayModuleInfo|OverlayModuleInfo.d.ts| +|Added|NA|Module name: OverlayModuleInfo
Class name: OverlayModuleInfo
Method or attribute name: readonly bundleName: string;|OverlayModuleInfo.d.ts| +|Added|NA|Module name: OverlayModuleInfo
Class name: OverlayModuleInfo
Method or attribute name: readonly moduleName: string;|OverlayModuleInfo.d.ts| +|Added|NA|Module name: OverlayModuleInfo
Class name: OverlayModuleInfo
Method or attribute name: readonly targetModuleName: string;|OverlayModuleInfo.d.ts| +|Added|NA|Module name: OverlayModuleInfo
Class name: OverlayModuleInfo
Method or attribute name: readonly priority: number;|OverlayModuleInfo.d.ts| +|Added|NA|Module name: OverlayModuleInfo
Class name: OverlayModuleInfo
Method or attribute name: readonly state: number;|OverlayModuleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedBundleInfo|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedBundleInfo
Method or attribute name: readonly name: string;|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedBundleInfo
Method or attribute name: readonly compatiblePolicy: bundleManager.CompatiblePolicy;|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedBundleInfo
Method or attribute name: readonly sharedModuleInfo: Array\;|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedModuleInfo|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedModuleInfo
Method or attribute name: readonly name: string;|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedModuleInfo
Method or attribute name: readonly versionCode: number;|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedModuleInfo
Method or attribute name: readonly versionName: string;|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedModuleInfo
Method or attribute name: readonly description: string;|SharedBundleInfo.d.ts| +|Added|NA|Module name: SharedBundleInfo
Class name: SharedModuleInfo
Method or attribute name: readonly descriptionId: number;|SharedBundleInfo.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-communication.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-communication.md new file mode 100644 index 0000000000000000000000000000000000000000..c60d77d038dfa5ba5ca2075805d7c2f9451fbda4 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-communication.md @@ -0,0 +1,175 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.bluetoothManager
Class name: bluetoothManager
Method or attribute name: function setDevicePinCode(device: string, code: string, callback: AsyncCallback\): void;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: bluetoothManager
Method or attribute name: function setDevicePinCode(device: string, code: string): Promise\;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: BLECharacteristic
Method or attribute name: properties?: GattProperties;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: ScanResult
Method or attribute name: deviceName: string;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinRequiredParam
Method or attribute name: pinType: PinType;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: GattProperties|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: GattProperties
Method or attribute name: write?: boolean;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: GattProperties
Method or attribute name: writeNoResponse?: boolean;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: GattProperties
Method or attribute name: read?: boolean;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: GattProperties
Method or attribute name: notify?: boolean;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: GattProperties
Method or attribute name: indicate?: boolean;|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_ENTER_PIN_CODE = 0|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_ENTER_PASSKEY = 1|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_CONFIRM_PASSKEY = 2|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_NO_PASSKEY_CONSENT = 3|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_NOTIFY_PASSKEY = 4|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_DISPLAY_PIN_CODE = 5|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_OOB_CONSENT = 6|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.bluetoothManager
Class name: PinType
Method or attribute name: PIN_TYPE_PIN_16_DIGITS = 7|@ohos.bluetoothManager.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: connection
Method or attribute name: function getGlobalHttpProxy(callback: AsyncCallback\): void;|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: connection
Method or attribute name: function getGlobalHttpProxy(): Promise\;|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: connection
Method or attribute name: function setGlobalHttpProxy(httpProxy: HttpProxy, callback: AsyncCallback\): void;|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: connection
Method or attribute name: function setGlobalHttpProxy(httpProxy: HttpProxy): Promise\;|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: HttpProxy|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: HttpProxy
Method or attribute name: host: string;|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: HttpProxy
Method or attribute name: port: number;|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.connection
Class name: HttpProxy
Method or attribute name: exclusionList: Array\;|@ohos.net.connection.d.ts| +|Added|NA|Module name: ohos.net.ethernet
Class name: ethernet
Method or attribute name: function on(type: 'interfaceStateChange', callback: Callback\<{ iface: string, active: boolean }>): void;|@ohos.net.ethernet.d.ts| +|Added|NA|Module name: ohos.net.ethernet
Class name: ethernet
Method or attribute name: function off(type: 'interfaceStateChange', callback?: Callback\<{ iface: string, active: boolean }>): void;|@ohos.net.ethernet.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequestOptions
Method or attribute name: usingProxy?: boolean \| HttpProxy;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequestOptions
Method or attribute name: caPath?: string;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: request2(url: string, callback: AsyncCallback\): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: request2(url: string, options: HttpRequestOptions, callback: AsyncCallback\): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: request2(url: string, options?: HttpRequestOptions): Promise\;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: on(type: "dataReceive", callback: Callback\): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: off(type: "dataReceive", callback?: Callback\): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: on(type: "dataEnd", callback: Callback\): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: off(type: "dataEnd", callback?: Callback\): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: on(type: "dataProgress", callback: Callback\<{ receiveSize: number, totalSize: number }>): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.http
Class name: HttpRequest
Method or attribute name: off(type: "dataProgress", callback?: Callback\<{ receiveSize: number, totalSize: number }>): void;|@ohos.net.http.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns
Method or attribute name: function addLocalService(context: Context, serviceInfo: LocalServiceInfo,
callback: AsyncCallback\): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns
Method or attribute name: function addLocalService(context: Context, serviceInfo: LocalServiceInfo): Promise\;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns
Method or attribute name: function removeLocalService(context: Context, serviceInfo: LocalServiceInfo,
callback: AsyncCallback\): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns
Method or attribute name: function removeLocalService(context: Context, serviceInfo: LocalServiceInfo): Promise\;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns
Method or attribute name: function createDiscoveryService(context: Context, serviceType: string): DiscoveryService;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns
Method or attribute name: function resolveLocalService(context: Context, serviceInfo: LocalServiceInfo,
callback: AsyncCallback\): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: mdns
Method or attribute name: function resolveLocalService(context: Context, serviceInfo: LocalServiceInfo): Promise\;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: DiscoveryService|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: DiscoveryService
Method or attribute name: on(type: 'discoveryStart',
callback: Callback\<{ serviceInfo: LocalServiceInfo, errorCode?: MdnsError }>): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: DiscoveryService
Method or attribute name: on(type: 'discoveryStop',
callback: Callback\<{ serviceInfo: LocalServiceInfo, errorCode?: MdnsError }>): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: DiscoveryService
Method or attribute name: on(type: 'serviceFound', callback: Callback\): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: DiscoveryService
Method or attribute name: on(type: 'serviceLost', callback: Callback\): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: DiscoveryService
Method or attribute name: startSearchingMDNS(): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: DiscoveryService
Method or attribute name: stopSearchingMDNS(): void;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: LocalServiceInfo|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: LocalServiceInfo
Method or attribute name: serviceType: string;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: LocalServiceInfo
Method or attribute name: serviceName: string;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: LocalServiceInfo
Method or attribute name: port?: number;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: LocalServiceInfo
Method or attribute name: host?: NetAddress;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: LocalServiceInfo
Method or attribute name: serviceAttribute?: Array\;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: ServiceAttribute|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: ServiceAttribute
Method or attribute name: key: string;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: ServiceAttribute
Method or attribute name: value: Array\;|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: MdnsError|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: MdnsError
Method or attribute name: INTERNAL_ERROR = 0|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: MdnsError
Method or attribute name: ALREADY_ACTIVE = 1|@ohos.net.mdns.d.ts| +|Added|NA|Module name: ohos.net.mdns
Class name: MdnsError
Method or attribute name: MAX_LIMIT = 2|@ohos.net.mdns.d.ts| +|Added|NA|Class name: tag
Method or attribute name: function registerForegroundDispatch(elementName: ElementName, discTech: number[], callback: AsyncCallback\): void;|@ohos.nfc.tag.d.ts| +|Added|NA|Class name: tag
Method or attribute name: function unregisterForegroundDispatch(elementName: ElementName): void;|@ohos.nfc.tag.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: omapi|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: omapi
Method or attribute name: function newSEService(type: 'serviceState', callback: Callback\): SEService;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: SEService|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: SEService
Method or attribute name: getReaders(): Reader[];|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: SEService
Method or attribute name: isConnected(): boolean;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: SEService
Method or attribute name: shutdown(): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: SEService
Method or attribute name: getVersion(): string;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Reader|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Reader
Method or attribute name: getName(): string;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Reader
Method or attribute name: isSecureElementPresent(): boolean;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Reader
Method or attribute name: openSession(): Session;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Reader
Method or attribute name: closeSessions(): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: getReader(): Reader;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: getATR(): number[];|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: close(): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: isClosed(): boolean;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: closeChannels(): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openBasicChannel(aid: number[]): Promise\;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openBasicChannel(aid: number[], callback: AsyncCallback\): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openBasicChannel(aid: number[], p2: number): Promise\;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openBasicChannel(aid: number[], p2: number, callback: AsyncCallback\): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openLogicalChannel(aid: number[]): Promise\;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openLogicalChannel(aid: number[], callback: AsyncCallback\): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openLogicalChannel(aid: number[], p2: number): Promise\;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Session
Method or attribute name: openLogicalChannel(aid: number[], p2: number, callback: AsyncCallback\): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel
Method or attribute name: getSession(): Session;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel
Method or attribute name: close(): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel
Method or attribute name: isBasicChannel(): boolean;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel
Method or attribute name: isClosed(): boolean;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel
Method or attribute name: getSelectResponse(): number[];|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel
Method or attribute name: transmit(command: number[]): Promise\;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: Channel
Method or attribute name: transmit(command: number[], callback: AsyncCallback\): void;|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: ServiceState|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: ServiceState
Method or attribute name: DISCONNECTED = 0|@ohos.secureElement.d.ts| +|Added|NA|Module name: ohos.secureElement
Class name: ServiceState
Method or attribute name: CONNECTED = 1|@ohos.secureElement.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function getScanInfoList(): Array\;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function updateDeviceConfig(config: WifiDeviceConfig): number;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function disableDeviceConfig(networkId: number): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function removeAllDeviceConfigs(): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function removeDeviceConfig(networkId: number): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function isBandTypeSupported(bandType: WifiBandType): boolean;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function get5GChannelList(): Array\;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function getHotspotStations(): Array\;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function getCurrentP2pGroup(): Promise\;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function getCurrentP2pGroup(callback: AsyncCallback\): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function createP2pGroup(config: WifiP2PConfig): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function removeP2pGroup(): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function startDiscoverP2pDevices(): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function stopDiscoverP2pDevices(): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function deletePersistentP2pGroup(netId: number): void;|@ohos.wifiManager.d.ts| +|Added|NA|Class name: wifiManager
Method or attribute name: function setP2pDeviceName(devName: string): void;|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiBandType|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiBandType
Method or attribute name: WIFI_BAND_NONE|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiBandType
Method or attribute name: WIFI_BAND_2G|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiBandType
Method or attribute name: WIFI_BAND_5G|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiBandType
Method or attribute name: WIFI_BAND_6G|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiBandType
Method or attribute name: WIFI_BAND_60G|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_UNDEFINED|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_11A|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_11B|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_11G|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_11N|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_11AC|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_11AX|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiStandard
Method or attribute name: WIFI_STANDARD_11AD|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiLinkedInfo
Method or attribute name: rxLinkSpeed: number;|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiLinkedInfo
Method or attribute name: maxSupportedTxLinkSpeed: number;|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiLinkedInfo
Method or attribute name: maxSupportedRxLinkSpeed: number;|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiLinkedInfo
Method or attribute name: channelWidth: WifiChannelWidth;|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: WifiLinkedInfo
Method or attribute name: wifiStandard: WifiStandard;|@ohos.wifiManager.d.ts| +|Added|NA|Module name: ohos.wifiManager
Class name: HotspotConfig
Method or attribute name: channel: number;|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function getScanResults(): Promise\>;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function getScanResults(callback: AsyncCallback\>): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function getScanResultsSync(): Array\;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function updateNetwork(config: WifiDeviceConfig): number;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function disableNetwork(netId: number): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function removeAllNetwork(): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function removeDevice(id: number): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function getStations(): Array\;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function getCurrentGroup(): Promise\;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function getCurrentGroup(callback: AsyncCallback\): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function createGroup(config: WifiP2PConfig): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function removeGroup(): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function startDiscoverDevices(): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function stopDiscoverDevices(): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function deletePersistentGroup(netId: number): void;|NA|@ohos.wifiManager.d.ts| +|Deleted|Module name: ohos.wifiManager
Class name: wifiManager
Method or attribute name: function setDeviceName(devName: string): void;|NA|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function scan(): void;
Permission: ohos.permission.SET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function scan(): void;
Permission: ohos.permission.SET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function getCandidateConfigs(): Array\;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function getCandidateConfigs(): Array\;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function getDeviceConfigs(): Array\;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.GET_WIFI_CONFIG|Class name: wifiManager
Method or attribute name: function getDeviceConfigs(): Array\;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION and ohos.permission.GET_WIFI_CONFIG|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function getP2pPeerDevices(): Promise\;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function getP2pPeerDevices(): Promise\;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function getP2pPeerDevices(callback: AsyncCallback\): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function getP2pPeerDevices(callback: AsyncCallback\): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function p2pConnect(config: WifiP2PConfig): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function p2pConnect(config: WifiP2PConfig): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function getP2pGroups(): Promise\>;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function getP2pGroups(): Promise\>;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function getP2pGroups(callback: AsyncCallback\>): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function getP2pGroups(callback: AsyncCallback\>): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function on(type: "p2pDeviceChange", callback: Callback\): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function on(type: "p2pDeviceChange", callback: Callback\): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function off(type: "p2pDeviceChange", callback?: Callback\): void;
Permission: ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function off(type: "p2pDeviceChange", callback?: Callback\): void;
Permission: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function on(type: "p2pPeerDeviceChange", callback: Callback\): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function on(type: "p2pPeerDeviceChange", callback: Callback\): void;
Permission: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| +|Permission changed|Class name: wifiManager
Method or attribute name: function off(type: "p2pPeerDeviceChange", callback?: Callback\): void;
Permission: ohos.permission.LOCATION|Class name: wifiManager
Method or attribute name: function off(type: "p2pPeerDeviceChange", callback?: Callback\): void;
Permission: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION|@ohos.wifiManager.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md new file mode 100644 index 0000000000000000000000000000000000000000..031938e0a7081cdc0c1b4dc2876412750e128467 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md @@ -0,0 +1,42 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: global
Class name: console
Method or attribute name: static assert(value?: Object, ...arguments: Object[]): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static assert(value?: Object, ...arguments: Object[]): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static count(label?: string): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static count(label?: string): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static countReset(label?: string): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static countReset(label?: string): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static dir(dir?: Object): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static dir(dir?: Object): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static dirxml(...arguments: Object[]): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static dirxml(...arguments: Object[]): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static group(...arguments: Object[]): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static group(...arguments: Object[]): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static groupCollapsed(...arguments: Object[]): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static groupCollapsed(...arguments: Object[]): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static groupEnd(): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static groupEnd(): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static table(tableData?: Object): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static table(tableData?: Object): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static time(label?: string): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static time(label?: string): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static timeEnd(label?: string): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static timeEnd(label?: string): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static timeLog(label?: string, ...arguments: Object[]): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static timeLog(label?: string, ...arguments: Object[]): void;|global.d.ts| +|Added|NA|Module name: global
Class name: console
Method or attribute name: static trace(...arguments: Object[]): void;|global.d.ts| +|Added|NA|Class name: console
Method or attribute name: static trace(...arguments: Object[]): void;|global.d.ts| +|Initial version changed|Class name: LRUCache
Method or attribute name: keys(): K[];
Initial version: N/A|Class name: LRUCache
Method or attribute name: keys(): K[];
Initial version: 9|@ohos.util.d.ts| +|Initial version changed|Class name: WorkerEventListener
Method or attribute name: (event: Event): void \| Promise\;
Initial version: 9|Class name: WorkerEventListener
Method or attribute name: (event: Event): void \| Promise\;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: WorkerEventTarget
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: WorkerEventTarget
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessage?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessage?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessageerror?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessageerror?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: onexit?: (code: number) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onexit?: (code: number) => void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: onerror?: (err: ErrorEvent) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onerror?: (err: ErrorEvent) => void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: onmessage?: (event: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onmessage?: (event: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: onmessageerror?: (event: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onmessageerror?: (event: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: on(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: on(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: once(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: once(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: off(type: string, listener?: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: off(type: string, listener?: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| +|Initial version changed|Class name: ThreadWorker
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| +|Function changed|Class name: RationalNumber
Method or attribute name: static createRationalFromString(rationalString: string): RationalNumber​;
|Class name: RationalNumber
Method or attribute name: static createRationalFromString(rationalString: string): RationalNumber;
|@ohos.util.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-customization.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-customization.md new file mode 100644 index 0000000000000000000000000000000000000000..a434411d2f769d22d582823f548bb5c801351426 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-customization.md @@ -0,0 +1,138 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.enterprise.accountManager
Class name: accountManager|@ohos.enterprise.accountManager.d.ts| +|Added|NA|Module name: ohos.enterprise.accountManager
Class name: accountManager
Method or attribute name: function disallowAddLocalAccount(admin: Want, disallow: boolean, callback: AsyncCallback\): void;|@ohos.enterprise.accountManager.d.ts| +|Added|NA|Module name: ohos.enterprise.accountManager
Class name: accountManager
Method or attribute name: function disallowAddLocalAccount(admin: Want, disallow: boolean): Promise\;|@ohos.enterprise.accountManager.d.ts| +|Added|NA|Class name: ManagedEvent
Method or attribute name: MANAGED_EVENT_APP_START = 2|@ohos.enterprise.adminManager.d.ts| +|Added|NA|Class name: ManagedEvent
Method or attribute name: MANAGED_EVENT_APP_STOP = 3|@ohos.enterprise.adminManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function addDisallowedRunningBundles(admin: Want, appIds: Array\, callback: AsyncCallback\): void;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function addDisallowedRunningBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback\): void;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function addDisallowedRunningBundles(admin: Want, appIds: Array\, userId?: number): Promise\;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function removeDisallowedRunningBundles(admin: Want, appIds: Array\, callback: AsyncCallback\): void;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function removeDisallowedRunningBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback\): void;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function removeDisallowedRunningBundles(admin: Want, appIds: Array\, userId?: number): Promise\;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function getDisallowedRunningBundles(admin: Want, callback: AsyncCallback\>): void;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function getDisallowedRunningBundles(admin: Want, userId: number, callback: AsyncCallback\>): void;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.applicationManager
Class name: applicationManager
Method or attribute name: function getDisallowedRunningBundles(admin: Want, userId?: number): Promise\>;|@ohos.enterprise.applicationManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function addAllowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function addAllowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function addAllowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise\;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function removeAllowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function removeAllowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function removeAllowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise\;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function getAllowedInstallBundles(admin: Want, callback: AsyncCallback\>): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function getAllowedInstallBundles(admin: Want, userId: number, callback: AsyncCallback\>): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function getAllowedInstallBundles(admin: Want, userId?: number): Promise\>;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function addDisallowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function addDisallowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function addDisallowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise\;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function removeDisallowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function removeDisallowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback\): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function removeDisallowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise\;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function getDisallowedInstallBundles(admin: Want, callback: AsyncCallback\>): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function getDisallowedInstallBundles(admin: Want, userId: number, callback: AsyncCallback\>): void;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Module name: ohos.enterprise.bundleManager
Class name: bundleManager
Method or attribute name: function getDisallowedInstallBundles(admin: Want, userId?: number): Promise\>;|@ohos.enterprise.bundleManager.d.ts| +|Added|NA|Class name: dateTimeManager
Method or attribute name: function disallowModifyDateTime(admin: Want, disallow: boolean, callback: AsyncCallback\): void;|@ohos.enterprise.dateTimeManager.d.ts| +|Added|NA|Class name: dateTimeManager
Method or attribute name: function disallowModifyDateTime(admin: Want, disallow: boolean): Promise\;|@ohos.enterprise.dateTimeManager.d.ts| +|Added|NA|Class name: dateTimeManager
Method or attribute name: function isModifyDateTimeDisallowed(admin: Want, callback: AsyncCallback\): void;|@ohos.enterprise.dateTimeManager.d.ts| +|Added|NA|Class name: dateTimeManager
Method or attribute name: function isModifyDateTimeDisallowed(admin: Want): Promise\;|@ohos.enterprise.dateTimeManager.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceControl
Class name: deviceControl|@ohos.enterprise.deviceControl.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceControl
Class name: deviceControl
Method or attribute name: function resetFactory(admin: Want, callback: AsyncCallback\): void;|@ohos.enterprise.deviceControl.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceControl
Class name: deviceControl
Method or attribute name: function resetFactory(admin: Want): Promise\;|@ohos.enterprise.deviceControl.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceInfo
Class name: deviceInfo|@ohos.enterprise.deviceInfo.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceInfo
Class name: deviceInfo
Method or attribute name: function getDeviceSerial(admin: Want, callback: AsyncCallback\): void;|@ohos.enterprise.deviceInfo.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceInfo
Class name: deviceInfo
Method or attribute name: function getDeviceSerial(admin: Want): Promise\;|@ohos.enterprise.deviceInfo.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceInfo
Class name: deviceInfo
Method or attribute name: function getDisplayVersion(admin: Want, callback: AsyncCallback\): void;|@ohos.enterprise.deviceInfo.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceInfo
Class name: deviceInfo
Method or attribute name: function getDisplayVersion(admin: Want): Promise\;|@ohos.enterprise.deviceInfo.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceInfo
Class name: deviceInfo
Method or attribute name: function getDeviceName(admin: Want, callback: AsyncCallback\): void;|@ohos.enterprise.deviceInfo.d.ts| +|Added|NA|Module name: ohos.enterprise.deviceInfo
Class name: deviceInfo
Method or attribute name: function getDeviceName(admin: Want): Promise\;|@ohos.enterprise.deviceInfo.d.ts| +|Added|NA|Module name: ohos.enterprise.EnterpriseAdminExtensionAbility
Class name: EnterpriseAdminExtensionAbility
Method or attribute name: onAppStart(bundleName: string): void;|@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts| +|Added|NA|Module name: ohos.enterprise.EnterpriseAdminExtensionAbility
Class name: EnterpriseAdminExtensionAbility
Method or attribute name: onAppStop(bundleName: string): void;|@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function getAllNetworkInterfaces(admin: Want, callback: AsyncCallback\>): void;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function getAllNetworkInterfaces(admin: Want): Promise\>;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function getIpAddress(admin: Want, networkInterface: string, callback: AsyncCallback\): void;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function getIpAddress(admin: Want, networkInterface: string): Promise\;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function getMac(admin: Want, networkInterface: string, callback: AsyncCallback\): void;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function getMac(admin: Want, networkInterface: string): Promise\;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function isNetworkInterfaceDisabled(admin: Want, networkInterface: string, callback: AsyncCallback\): void;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function isNetworkInterfaceDisabled(admin: Want, networkInterface: string): Promise\;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function setNetworkInterfaceDisabled(admin: Want, networkInterface: string, isDisabled: boolean, callback: AsyncCallback\): void;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.networkManager
Class name: networkManager
Method or attribute name: function setNetworkInterfaceDisabled(admin: Want, networkInterface: string, isDisabled: boolean): Promise\;|@ohos.enterprise.networkManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: wifiManager|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_INVALID = 0|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_OPEN = 1|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_WEP = 2|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_PSK = 3|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_SAE = 4|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_EAP = 5|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_EAP_SUITE_B = 6|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_OWE = 7|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_WAPI_CERT = 8|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiSecurityType
Method or attribute name: WIFI_SEC_TYPE_WAPI_PSK = 9|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpType|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpType
Method or attribute name: STATIC|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpType
Method or attribute name: DHCP|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpType
Method or attribute name: UNKNOWN|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpProfile|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpProfile
Method or attribute name: ipAddress: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpProfile
Method or attribute name: gateway: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpProfile
Method or attribute name: prefixLength: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpProfile
Method or attribute name: dnsServers: number[];|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: IpProfile
Method or attribute name: domains: Array\;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_NONE|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_PEAP|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_TLS|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_TTLS|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_PWD|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_SIM|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_AKA|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_AKA_PRIME|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: EapMethod
Method or attribute name: EAP_UNAUTH_TLS|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_NONE|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_PAP|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_MSCHAP|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_MSCHAPV2|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_GTC|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_SIM|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_AKA|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: Phase2Method
Method or attribute name: PHASE2_AKA_PRIME|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: eapMethod: EapMethod;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: phase2Method: Phase2Method;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: identity: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: anonymousIdentity: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: password: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: caCertAliases: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: caPath: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: clientCertAliases: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: certEntry: Uint8Array;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: certPassword: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: altSubjectMatch: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: domainSuffixMatch: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: realm: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: plmn: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiEapProfile
Method or attribute name: eapSubId: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: ssid: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: bssid?: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: preSharedKey: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: isHiddenSsid?: boolean;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: securityType: WifiSecurityType;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: creatorUid?: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: disableReason?: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: netId?: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: randomMacType?: number;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: randomMacAddr?: string;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: ipType?: IpType;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: staticIp?: IpProfile;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: WifiProfile
Method or attribute name: eapProfile?: WifiEapProfile;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: wifiManager
Method or attribute name: function isWifiActive(admin: Want, callback: AsyncCallback\): void;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: wifiManager
Method or attribute name: function isWifiActive(admin: Want): Promise\;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: wifiManager
Method or attribute name: function setWifiProfile(admin: Want, profile: WifiProfile, callback: AsyncCallback\): void;|@ohos.enterprise.wifiManager.d.ts| +|Added|NA|Module name: ohos.enterprise.wifiManager
Class name: wifiManager
Method or attribute name: function setWifiProfile(admin: Want, profile: WifiProfile): Promise\;|@ohos.enterprise.wifiManager.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md new file mode 100644 index 0000000000000000000000000000000000000000..0c262dfd4cf8d9fca897f7f0b3e0625e63d82f57 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md @@ -0,0 +1,293 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.data.cloudData
Class name: cloudData|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Action|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Action
Method or attribute name: CLEAR_CLOUD_INFO|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Action
Method or attribute name: CLEAR_CLOUD_DATA_AND_INFO|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static enableCloud(
accountId: string,
switches: { [bundleName: string]: boolean },
callback: AsyncCallback\
): void;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static enableCloud(accountId: string, switches: { [bundleName: string]: boolean }): Promise\;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static disableCloud(accountId: string, callback: AsyncCallback\): void;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static disableCloud(accountId: string): Promise\;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static changeAppCloudSwitch(
accountId: string,
bundleName: string,
status: boolean,
callback: AsyncCallback\
): void;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Promise\;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static notifyDataChange(accountId: string, bundleName: string, callback: AsyncCallback\): void;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.cloudData
Class name: Config
Method or attribute name: static notifyDataChange(accountId: string, bundleName: string): Promise\;|@ohos.data.cloudData.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: DataShareHelperOption|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelperOption
Method or attribute name: |@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: DataShareHelperOption
Method or attribute name: isProxy?: boolean;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelperOption
Method or attribute name: isProxy?: boolean;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: dataShare
Method or attribute name: function createDataShareHelper(
context: Context,
uri: string,
option: DataShareHelperOption,
callback: AsyncCallback\
): void;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: TemplateId|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: TemplateId
Method or attribute name: |@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: TemplateId
Method or attribute name: subscriberId: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: TemplateId
Method or attribute name: subscriberId: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: TemplateId
Method or attribute name: bundleNameOfOwner: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: TemplateId
Method or attribute name: bundleNameOfOwner: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: PublishedItem|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: PublishedItem
Method or attribute name: key: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: PublishedItem
Method or attribute name: data: string \| Ashmem;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: PublishedItem
Method or attribute name: subscriberId: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: RdbDataChangeNode|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: RdbDataChangeNode
Method or attribute name: uri: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: RdbDataChangeNode
Method or attribute name: templateId: TemplateId;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: RdbDataChangeNode
Method or attribute name: data: Array\;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: PublishedDataChangeNode|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: PublishedDataChangeNode
Method or attribute name: bundleName: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: PublishedDataChangeNode
Method or attribute name: data: Array\;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: Template|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: Template
Method or attribute name: predicates: { [key: string]: string };|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: Template
Method or attribute name: scheduler: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: OperationResult|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: OperationResult
Method or attribute name: key: string;|@ohos.data.dataShare.d.ts| +|Added|NA|Module name: ohos.data.dataShare
Class name: OperationResult
Method or attribute name: result: number;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: addTemplate(uri: string, subscriberId: string, template: Template): void;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: on(
type: 'rdbDataChange',
uris: Array\,
templateId: TemplateId,
callback: AsyncCallback\
): Array\;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: off(
type: 'rdbDataChange',
uris: Array\,
templateId: TemplateId,
callback?: AsyncCallback\
): Array\;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: on(
type: 'publishedDataChange',
uris: Array\,
subscriberId: string,
callback: AsyncCallback\
): Array\;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: off(
type: 'publishedDataChange',
uris: Array\,
subscriberId: string,
callback?: AsyncCallback\
): Array\;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: publish(
data: Array\,
bundleName: string,
version: number,
callback: AsyncCallback\>
): void;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: publish(
data: Array\,
bundleName: string,
callback: AsyncCallback\>
): void;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: publish(data: Array\, bundleName: string, version?: number): Promise\>;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: getPublishedData(bundleName: string, callback: AsyncCallback\>): void;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: DataShareHelper
Method or attribute name: getPublishedData(bundleName: string): Promise\>;|@ohos.data.dataShare.d.ts| +|Added|NA|Class name: KVManagerConfig
Method or attribute name: context: BaseContext;|@ohos.data.distributedKVStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ValueType
Method or attribute name: type ValueType = null \| number \| string \| boolean \| Uint8Array;|@ohos.data.relationalStore.d.ts| +|Added|NA|Class name: ValueType
Method or attribute name: type ValueType = null \| number \| string \| boolean \| Uint8Array;|@ohos.data.relationalStore.d.ts| +|Added|NA|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_CLOUD|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ConflictResolution|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ConflictResolution
Method or attribute name: ON_CONFLICT_NONE = 0|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ConflictResolution
Method or attribute name: ON_CONFLICT_ROLLBACK = 1|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ConflictResolution
Method or attribute name: ON_CONFLICT_ABORT = 2|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ConflictResolution
Method or attribute name: ON_CONFLICT_FAIL = 3|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ConflictResolution
Method or attribute name: ON_CONFLICT_IGNORE = 4|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.relationalStore
Class name: ConflictResolution
Method or attribute name: ON_CONFLICT_REPLACE = 5|@ohos.data.relationalStore.d.ts| +|Added|NA|Class name: RdbStore
Method or attribute name: version: number;|@ohos.data.relationalStore.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UDMF|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: TEXT = 'Text'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: PLAIN_TEXT = 'Text.PlainText'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: HYPERLINK = 'Text.Hyperlink'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: HTML = 'Text.HTML'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: FILE = 'File'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: IMAGE = 'File.Media.Image'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: VIDEO = 'File.Media.Video'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: FOLDER = 'File.Folder'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: SYSTEM_DEFINED_RECORD = 'SystemDefinedType'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: SYSTEM_DEFINED_FORM = 'SystemDefinedType.Form'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: SYSTEM_DEFINED_APP_ITEM = 'SystemDefinedType.AppItem'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: SYSTEM_DEFINED_PIXEL_MAP = 'SystemDefinedType.PixelMap'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedDataType
Method or attribute name: APPLICATION_DEFINED_RECORD = 'ApplicationDefinedType'|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedData|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedData
Method or attribute name: constructor(record: UnifiedRecord);|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedData
Method or attribute name: addRecord(record: UnifiedRecord): void;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedData
Method or attribute name: getRecords(): Array\;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Summary|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Summary
Method or attribute name: summary: { [key: string]: number };|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Summary
Method or attribute name: totalSize: number;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedRecord|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: UnifiedRecord
Method or attribute name: getType(): string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Text|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Text
Method or attribute name: details?: { [key: string]: string };|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: PlainText|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: PlainText
Method or attribute name: textContent: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: PlainText
Method or attribute name: abstract?: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Hyperlink|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Hyperlink
Method or attribute name: url: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Hyperlink
Method or attribute name: description?: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: HTML|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: HTML
Method or attribute name: htmlContent: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: HTML
Method or attribute name: plainContent?: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: File|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: File
Method or attribute name: details?: { [key: string]: string };|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: File
Method or attribute name: uri: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Image|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Image
Method or attribute name: imageUri: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Video|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Video
Method or attribute name: videoUri: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Folder|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: Folder
Method or attribute name: folderUri: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedRecord|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedRecord
Method or attribute name: details?: { [key: string]: number \| string \| Uint8Array };|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedForm|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedForm
Method or attribute name: formId: number;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedForm
Method or attribute name: formName: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedForm
Method or attribute name: bundleName: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedForm
Method or attribute name: abilityName: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedForm
Method or attribute name: module: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedAppItem|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedAppItem
Method or attribute name: appId: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedAppItem
Method or attribute name: appName: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedAppItem
Method or attribute name: appIconId: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedAppItem
Method or attribute name: appLabelId: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedAppItem
Method or attribute name: bundleName: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedAppItem
Method or attribute name: abilityName: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedPixelMap|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: SystemDefinedPixelMap
Method or attribute name: rawData: Uint8Array;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: ApplicationDefinedRecord|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: ApplicationDefinedRecord
Method or attribute name: applicationDefinedType: string;|@ohos.data.UDMF.d.ts| +|Added|NA|Module name: ohos.data.UDMF
Class name: ApplicationDefinedRecord
Method or attribute name: rawData: Uint8Array;|@ohos.data.UDMF.d.ts| +|Deleted|Module name: ohos.data.relationalStore
Class name: relationalStore
Method or attribute name: type ValuesBucket = { [key:string]: ValueType \| Uint8Array \| null;}|NA|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[], callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[], callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[]): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[]): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(key: string): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(key: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\);
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\);
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[], callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[], callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[]): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[]): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: startTransaction(callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: startTransaction(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: startTransaction(): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: startTransaction(): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: SingleKVStore
Method or attribute name: on(event: 'dataChange', type: SubscribeType, listener: Callback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: on(event: 'dataChange', type: SubscribeType, listener: Callback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| +|Initial version changed|Class name: preferences
Initial version: 9|Class name: preferences
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: const MAX_KEY_LENGTH: 80;
Initial version: N/A|Class name: preferences
Method or attribute name: const MAX_KEY_LENGTH: 80;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: const MAX_VALUE_LENGTH: 8192;
Initial version: N/A|Class name: preferences
Method or attribute name: const MAX_VALUE_LENGTH: 8192;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string): Promise\;
Initial version: 9|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string): Promise\;
Initial version: 9|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string): Promise\;
Initial version: 9|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Initial version: 9|Class name: Preferences
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: getAll(callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: getAll(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: getAll(): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: getAll(): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: has(key: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: has(key: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: has(key: string): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: has(key: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: delete(key: string): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: delete(key: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: clear(callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: clear(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: clear(): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: clear(): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: flush(callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: flush(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: flush(): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: flush(): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: on(type: 'change', callback: Callback\<{ key: string }>): void;
Initial version: 9|Class name: Preferences
Method or attribute name: on(type: 'change', callback: Callback\<{ key: string }>): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: Preferences
Method or attribute name: off(type: 'change', callback?: Callback\<{ key: string }>): void;
Initial version: 9|Class name: Preferences
Method or attribute name: off(type: 'change', callback?: Callback\<{ key: string }>): void;
Initial version: 10|@ohos.data.preferences.d.ts| +|Initial version changed|Class name: relationalStore
Initial version: 9|Class name: relationalStore
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: StoreConfig
Initial version: 9|Class name: StoreConfig
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: StoreConfig
Method or attribute name: name: string;
Initial version: 9|Class name: StoreConfig
Method or attribute name: name: string;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: SyncMode
Initial version: 9|Class name: SyncMode
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: SyncMode
Method or attribute name: SYNC_MODE_PUSH = 0
Initial version: 9|Class name: SyncMode
Method or attribute name: SYNC_MODE_PUSH = 0
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: SyncMode
Method or attribute name: SYNC_MODE_PULL = 1
Initial version: 9|Class name: SyncMode
Method or attribute name: SYNC_MODE_PULL = 1
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Initial version: 9|Class name: RdbPredicates
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: equalTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: equalTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: notEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: notEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: beginWrap(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: beginWrap(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: endWrap(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: endWrap(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: or(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: or(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: and(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: and(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: contains(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: contains(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: beginsWith(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: beginsWith(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: endsWith(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: endsWith(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: isNull(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: isNull(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: isNotNull(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: isNotNull(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: like(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: like(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: glob(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: glob(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: between(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: between(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: greaterThan(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: greaterThan(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: lessThan(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: lessThan(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: orderByAsc(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: orderByAsc(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: orderByDesc(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: orderByDesc(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: distinct(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: distinct(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: limitAs(value: number): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: limitAs(value: number): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: offsetAs(rowOffset: number): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: offsetAs(rowOffset: number): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: groupBy(fields: Array\): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: groupBy(fields: Array\): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: indexedBy(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: indexedBy(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: in(field: string, value: Array\): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: in(field: string, value: Array\): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbPredicates
Method or attribute name: notIn(field: string, value: Array\): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: notIn(field: string, value: Array\): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Initial version: 9|Class name: ResultSet
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: columnNames: Array\;
Initial version: 9|Class name: ResultSet
Method or attribute name: columnNames: Array\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: columnCount: number;
Initial version: 9|Class name: ResultSet
Method or attribute name: columnCount: number;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: rowCount: number;
Initial version: 9|Class name: ResultSet
Method or attribute name: rowCount: number;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: rowIndex: number;
Initial version: 9|Class name: ResultSet
Method or attribute name: rowIndex: number;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: isAtFirstRow: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isAtFirstRow: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: isAtLastRow: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isAtLastRow: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: isEnded: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isEnded: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: isStarted: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isStarted: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: isClosed: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isClosed: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: getColumnIndex(columnName: string): number;
Initial version: 9|Class name: ResultSet
Method or attribute name: getColumnIndex(columnName: string): number;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: getColumnName(columnIndex: number): string;
Initial version: 9|Class name: ResultSet
Method or attribute name: getColumnName(columnIndex: number): string;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: goTo(offset: number): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goTo(offset: number): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: goToRow(position: number): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToRow(position: number): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: goToFirstRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToFirstRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: goToLastRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToLastRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: goToNextRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToNextRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: goToPreviousRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToPreviousRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: getBlob(columnIndex: number): Uint8Array;
Initial version: 9|Class name: ResultSet
Method or attribute name: getBlob(columnIndex: number): Uint8Array;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: getString(columnIndex: number): string;
Initial version: 9|Class name: ResultSet
Method or attribute name: getString(columnIndex: number): string;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: getLong(columnIndex: number): number;
Initial version: 9|Class name: ResultSet
Method or attribute name: getLong(columnIndex: number): number;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: getDouble(columnIndex: number): number;
Initial version: 9|Class name: ResultSet
Method or attribute name: getDouble(columnIndex: number): number;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: isColumnNull(columnIndex: number): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isColumnNull(columnIndex: number): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: ResultSet
Method or attribute name: close(): void;
Initial version: 9|Class name: ResultSet
Method or attribute name: close(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Initial version: 9|Class name: RdbStore
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: beginTransaction(): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: beginTransaction(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: commit(): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: commit(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: rollBack(): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: rollBack(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: backup(destName: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: backup(destName: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: backup(destName: string): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: backup(destName: string): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: restore(srcName: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: restore(srcName: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: RdbStore
Method or attribute name: restore(srcName: string): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: restore(srcName: string): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback\): void;
Initial version: 9|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig): Promise\;
Initial version: 9|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Initial version changed|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string): Promise\;
Initial version: 9|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| +|Permission added|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: N/A|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: ohos.permission.DISTRIBUTED_DATASYNC|@ohos.data.rdb.d.ts| +|Permission added|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: N/A|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: ohos.permission.DISTRIBUTED_DATASYNC|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: dataShare
Method or attribute name: function createDataShareHelper(context: Context, uri: string): Promise\;
|Class name: dataShare
Method or attribute name: function createDataShareHelper(
context: Context,
uri: string,
option?: DataShareHelperOption
): Promise\;
|@ohos.data.dataShare.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: query(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: querySql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: executeSql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-hardware.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-hardware.md new file mode 100644 index 0000000000000000000000000000000000000000..307cbeb4546e60632970275ba6d7ba3ef98bf895 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-hardware.md @@ -0,0 +1,14 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.distributedHardware.deviceManager
Class name: DeviceInfo
Method or attribute name: authForm: AuthForm;|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Class name: DeviceInfo
Method or attribute name: authForm: AuthForm;|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Module name: ohos.distributedHardware.deviceManager
Class name: AuthForm|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Module name: ohos.distributedHardware.deviceManager
Class name: AuthForm
Method or attribute name: INVALID_TYPE = -1|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Module name: ohos.distributedHardware.deviceManager
Class name: AuthForm
Method or attribute name: PEER_TO_PEER = 0|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Module name: ohos.distributedHardware.deviceManager
Class name: AuthForm
Method or attribute name: IDENTICAL_ACCOUNT = 1|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Module name: ohos.distributedHardware.deviceManager
Class name: AuthForm
Method or attribute name: ACROSS_ACCOUNT = 2|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Class name: DeviceManager
Method or attribute name: getDeviceInfo(networkId: string, callback: AsyncCallback\): void;|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Class name: DeviceManager
Method or attribute name: getDeviceInfo(networkId: string): Promise\;|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Class name: DeviceManager
Method or attribute name: requestCredentialRegisterInfo(requestInfo: string, callback: AsyncCallback\<{ registerInfo: string }>): void;|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Class name: DeviceManager
Method or attribute name: importCredential(credentialInfo: string, callback: AsyncCallback\<{ resultInfo: string }>): void;|@ohos.distributedHardware.deviceManager.d.ts| +|Added|NA|Class name: DeviceManager
Method or attribute name: deleteCredential(queryInfo: string, callback: AsyncCallback\<{ resultInfo: string }>): void;|@ohos.distributedHardware.deviceManager.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-file-management.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-file-management.md new file mode 100644 index 0000000000000000000000000000000000000000..5852f0c639db8be296ef4c9a925695fdc9541fc2 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-file-management.md @@ -0,0 +1,180 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.file.backup
Class name: backup|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: FileMeta|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: FileMeta
Method or attribute name: bundleName: string;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: FileMeta
Method or attribute name: uri: string;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: FileData|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: FileData
Method or attribute name: fd: number;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: File|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: backup
Method or attribute name: function getLocalCapabilities(): Promise\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: backup
Method or attribute name: function getLocalCapabilities(callback: AsyncCallback\): void;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: GeneralCallbacks|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: GeneralCallbacks
Method or attribute name: onFileReady: AsyncCallback\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: GeneralCallbacks
Method or attribute name: onBundleBegin: AsyncCallback\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: GeneralCallbacks
Method or attribute name: onBundleEnd: AsyncCallback\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: GeneralCallbacks
Method or attribute name: onAllBundlesEnd: AsyncCallback\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: GeneralCallbacks
Method or attribute name: onBackupServiceDied: Callback\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionBackup|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionBackup
Method or attribute name: constructor(callbacks: GeneralCallbacks);|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionBackup
Method or attribute name: appendBundles(bundlesToBackup: string[]): Promise\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionBackup
Method or attribute name: appendBundles(bundlesToBackup: string[], callback: AsyncCallback\): void;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore
Method or attribute name: constructor(callbacks: GeneralCallbacks);|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore
Method or attribute name: appendBundles(remoteCapabilitiesFd: number, bundlesToBackup: string[]): Promise\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore
Method or attribute name: appendBundles(remoteCapabilitiesFd: number, bundlesToBackup: string[], callback: AsyncCallback\): void;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore
Method or attribute name: publishFile(fileMeta: FileMeta): Promise\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore
Method or attribute name: publishFile(fileMeta: FileMeta, callback: AsyncCallback\): void;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore
Method or attribute name: getFileHandle(fileMeta: FileMeta): Promise\;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.backup
Class name: SessionRestore
Method or attribute name: getFileHandle(fileMeta: FileMeta, callback: AsyncCallback\): void;|@ohos.file.backup.d.ts| +|Added|NA|Module name: ohos.file.cloudSyncManager
Class name: cloudSyncManager|@ohos.file.cloudSyncManager.d.ts| +|Added|NA|Module name: ohos.file.cloudSyncManager
Class name: cloudSyncManager
Method or attribute name: function changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Promise\;|@ohos.file.cloudSyncManager.d.ts| +|Added|NA|Module name: ohos.file.cloudSyncManager
Class name: cloudSyncManager
Method or attribute name: function changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean, callback: AsyncCallback\): void;|@ohos.file.cloudSyncManager.d.ts| +|Added|NA|Module name: ohos.file.cloudSyncManager
Class name: cloudSyncManager
Method or attribute name: function notifyDataChange(accountId: string, bundleName: string): Promise\;|@ohos.file.cloudSyncManager.d.ts| +|Added|NA|Module name: ohos.file.cloudSyncManager
Class name: cloudSyncManager
Method or attribute name: function notifyDataChange(accountId: string, bundleName: string, callback: AsyncCallback\): void;|@ohos.file.cloudSyncManager.d.ts| +|Added|NA|Class name: FileInfo
Method or attribute name: relativePath: string;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: RootInfo
Method or attribute name: relativePath: string;|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: CopyResult|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: CopyResult
Method or attribute name: sourceUri: string;|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: CopyResult
Method or attribute name: destUri: string;|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: CopyResult
Method or attribute name: errCode: number;|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: CopyResult
Method or attribute name: errMsg: string;|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: DISPLAY_NAME = 'display_name'|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: DATE_ADDED = 'date_added'|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: DATE_MODIFIED = 'date_modified'|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: RELATIVE_PATH = 'relative_path'|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: FILE_SIZE = 'size'|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: WIDTH = 'width'|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: HEIGHT = 'height'|@ohos.file.fileAccess.d.ts| +|Added|NA|Module name: ohos.file.fileAccess
Class name: FileKey
Method or attribute name: DURATION = 'duration'|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: copy(sourceUri: string, destUri: string, force?: boolean): Promise\>;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: copy(sourceUri: string, destUri: string, callback: AsyncCallback\>): void;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: copy(sourceUri: string, destUri: string, force: boolean, callback: AsyncCallback\>): void;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: query(uri: string, metaJson: string): Promise\;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: query(uri: string, metaJson: string, callback: AsyncCallback\): void;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: getFileInfoFromUri(uri: string): Promise\;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: getFileInfoFromUri(uri: string, callback: AsyncCallback\): void;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: getFileInfoFromRelativePath(relativePath: string): Promise\;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: getFileInfoFromRelativePath(relativePath: string, callback: AsyncCallback\): void;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: getThumbnail(uri: string, size: image.Size): Promise\;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: FileAccessHelper
Method or attribute name: getThumbnail(uri: string, size: image.Size, callback: AsyncCallback\): void;|@ohos.file.fileAccess.d.ts| +|Added|NA|Class name: fileIo
Method or attribute name: function copyDir(src: string, dest: string, mode?: number): Promise\;|@ohos.file.fs.d.ts| +|Added|NA|Class name: fileIo
Method or attribute name: function copyDir(src: string, dest: string, callback: AsyncCallback\): void;|@ohos.file.fs.d.ts| +|Added|NA|Class name: fileIo
Method or attribute name: function copyDir(src: string, dest: string, mode: number, callback: AsyncCallback\): void;|@ohos.file.fs.d.ts| +|Added|NA|Class name: fileIo
Method or attribute name: function createWatcher(path: string, events: number, listener: WatchEventListener): Watcher;|@ohos.file.fs.d.ts| +|Added|NA|Class name: fileIo
Method or attribute name: function moveDir(src: string, dest: string, mode?: number): Promise\;|@ohos.file.fs.d.ts| +|Added|NA|Class name: fileIo
Method or attribute name: function moveDir(src: string, dest: string, callback: AsyncCallback\): void;|@ohos.file.fs.d.ts| +|Added|NA|Class name: fileIo
Method or attribute name: function moveDir(src: string, dest: string, mode: number, callback: AsyncCallback\): void;|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: WatchEventListener|@ohos.file.fs.d.ts| +|Added|NA|Class name: WatchEventListener
Method or attribute name: |@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: WatchEventListener
Method or attribute name: (event: WatchEvent): void;|@ohos.file.fs.d.ts| +|Added|NA|Class name: WatchEventListener
Method or attribute name: (event: WatchEvent): void;|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: WatchEvent|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: WatchEvent
Method or attribute name: readonly fileName: string;|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: WatchEvent
Method or attribute name: readonly event: number;|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: WatchEvent
Method or attribute name: readonly cookie: number;|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: Watcher|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: Watcher
Method or attribute name: start(): void;|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.file.fs
Class name: Watcher
Method or attribute name: stop(): void;|@ohos.file.fs.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PhotoSubType|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PhotoSubType
Method or attribute name: DEFAULT|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PhotoSubType
Method or attribute name: SCREENSHOT|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PhotoSubType
Method or attribute name: CAMERA|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PositionType|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PositionType
Method or attribute name: LOCAL = 1|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PositionType
Method or attribute name: CLOUD|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PositionType
Method or attribute name: BOTH|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: FileAsset
Method or attribute name: setHidden(hiddenState: boolean, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: FileAsset
Method or attribute name: setHidden(hiddenState: boolean): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: ImageVideoKey
Method or attribute name: POSITION|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: ImageVideoKey
Method or attribute name: DATE_TRASHED|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: ImageVideoKey
Method or attribute name: HIDDEN|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PhotoCreateOptions|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: PhotoCreateOptions
Method or attribute name: subType?: PhotoSubType;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: FetchResult
Method or attribute name: getAllObject(callback: AsyncCallback\>): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: FetchResult
Method or attribute name: getAllObject(): Promise\>;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumType|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumType
Method or attribute name: USER = 0|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumType
Method or attribute name: SYSTEM = 1024|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: USER_GENERIC = 1|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: FAVORITE = 1025|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: VIDEO|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: HIDDEN|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: TRASH|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: SCREENSHOT|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: CAMERA|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: AlbumSubType
Method or attribute name: ANY = 2147483647|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: AbsAlbum
Method or attribute name: readonly albumType: AlbumType;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: AbsAlbum
Method or attribute name: readonly albumSubType: AlbumSubType;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: AbsAlbum
Method or attribute name: coverUri: string;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: addPhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: addPhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: addPhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: addPhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: removePhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: removePhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: removePhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: removePhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: recoverPhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: recoverPhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: recoverPhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: recoverPhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: deletePhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: deletePhotoAssets(assets: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: Album
Method or attribute name: deletePhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: Album
Method or attribute name: deletePhotoAssets(assets: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: createPhotoAsset(displayName: string, createOption: PhotoCreateOptions): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: createPhotoAsset(displayName: string, createOption: PhotoCreateOptions): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: createPhotoAsset(displayName: string, createOption: PhotoCreateOptions, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: createPhotoAsset(displayName: string, createOption: PhotoCreateOptions, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: createAudioAsset(displayName: string, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: createAudioAsset(displayName: string, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: createAudioAsset(displayName: string): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: createAudioAsset(displayName: string): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: createAlbum(name: string, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: createAlbum(name: string, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: createAlbum(name: string): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: createAlbum(name: string): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: deleteAlbums(albums: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: deleteAlbums(albums: Array\, callback: AsyncCallback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: deleteAlbums(albums: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: deleteAlbums(albums: Array\): Promise\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: getAlbums(
type: AlbumType,
subType: AlbumSubType,
options: FetchOptions,
callback: AsyncCallback\>
): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: getAlbums(
type: AlbumType,
subType: AlbumSubType,
options: FetchOptions,
callback: AsyncCallback\>
): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: getAlbums(type: AlbumType, subType: AlbumSubType, callback: AsyncCallback\>): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: getAlbums(type: AlbumType, subType: AlbumSubType, callback: AsyncCallback\>): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: getAlbums(type: AlbumType, subType: AlbumSubType, options?: FetchOptions): Promise\>;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: getAlbums(type: AlbumType, subType: AlbumSubType, options?: FetchOptions): Promise\>;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: on(uri: string, forSubUri: boolean, callback: Callback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: on(uri: string, forSubUri: boolean, callback: Callback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: UserFileManager
Method or attribute name: off(uri: string, callback?: Callback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Class name: UserFileManager
Method or attribute name: off(uri: string, callback?: Callback\): void;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: NotifyType|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: NotifyType
Method or attribute name: NOTIFY_ADD|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: NotifyType
Method or attribute name: NOTIFY_UPDATE|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: NotifyType
Method or attribute name: NOTIFY_REMOVE|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: NotifyType
Method or attribute name: NOTIFY_ALBUM_ADD_ASSET|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: NotifyType
Method or attribute name: NOTIFY_ALBUM_REMOVE_ASSET|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: DefaultChangeUri|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: DefaultChangeUri
Method or attribute name: DEFAULT_PHOTO_URI|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: DefaultChangeUri
Method or attribute name: DEFAULT_ALBUM_URI|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: DefaultChangeUri
Method or attribute name: DEFAULT_AUDIO_URI|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: ChangeData|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: ChangeData
Method or attribute name: type: NotifyType;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: ChangeData
Method or attribute name: uris: Array\;|@ohos.filemanagement.userFileManager.d.ts| +|Added|NA|Module name: ohos.filemanagement.userFileManager
Class name: ChangeData
Method or attribute name: subUris: Array\;|@ohos.filemanagement.userFileManager.d.ts| +|Model changed|Class name: FileAccessHelper
Model: @StageModelOnly|Class name: FileAccessHelper
Model: N/A|@ohos.file.fileAccess.d.ts| +|Model changed|Class name: FileAccessHelper
Method or attribute name: getRoots(): Promise\;
Model: @StageModelOnly|Class name: FileAccessHelper
Method or attribute name: getRoots(): Promise\;
Model: N/A|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: FileInfo
Method or attribute name: uri: string;
Permission: N/A|Class name: FileInfo
Method or attribute name: uri: string;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: FileInfo
Method or attribute name: fileName: string;
Permission: N/A|Class name: FileInfo
Method or attribute name: fileName: string;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: FileInfo
Method or attribute name: mode: number;
Permission: N/A|Class name: FileInfo
Method or attribute name: mode: number;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: FileInfo
Method or attribute name: size: number;
Permission: N/A|Class name: FileInfo
Method or attribute name: size: number;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: FileInfo
Method or attribute name: mtime: number;
Permission: N/A|Class name: FileInfo
Method or attribute name: mtime: number;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: FileInfo
Method or attribute name: mimeType: string;
Permission: N/A|Class name: FileInfo
Method or attribute name: mimeType: string;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: RootInfo
Method or attribute name: deviceType: number;
Permission: N/A|Class name: RootInfo
Method or attribute name: deviceType: number;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: RootInfo
Method or attribute name: uri: string;
Permission: N/A|Class name: RootInfo
Method or attribute name: uri: string;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: RootInfo
Method or attribute name: displayName: string;
Permission: N/A|Class name: RootInfo
Method or attribute name: displayName: string;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Permission added|Class name: RootInfo
Method or attribute name: deviceFlags: number;
Permission: N/A|Class name: RootInfo
Method or attribute name: deviceFlags: number;
Permission: ohos.permission.FILE_ACCESS_MANAGER|@ohos.file.fileAccess.d.ts| +|Function changed|Class name: fileIo
Method or attribute name: function closeSync(fd: number \| File): void;
|Class name: fileIo
Method or attribute name: function closeSync(file: number \| File): void;
|@ohos.file.fs.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..abef9b2304985df358222b1c9b3f9db197bf6847 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md @@ -0,0 +1,37 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Permission added|Class name: GeoAddress
Method or attribute name: latitude?: number;
Permission: N/A|Class name: GeoAddress
Method or attribute name: latitude?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: longitude?: number;
Permission: N/A|Class name: GeoAddress
Method or attribute name: longitude?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: locale?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: locale?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: placeName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: placeName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: countryCode?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: countryCode?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: countryName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: countryName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: administrativeArea?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: administrativeArea?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: subAdministrativeArea?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: subAdministrativeArea?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: locality?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: locality?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: subLocality?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: subLocality?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: roadName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: roadName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: subRoadName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: subRoadName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: premises?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: premises?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: postalCode?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: postalCode?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: phoneNumber?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: phoneNumber?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: addressUrl?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: addressUrl?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: descriptions?: Array\;
Permission: N/A|Class name: GeoAddress
Method or attribute name: descriptions?: Array\;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoAddress
Method or attribute name: descriptionsSize?: number;
Permission: N/A|Class name: GeoAddress
Method or attribute name: descriptionsSize?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: latitude: number;
Permission: N/A|Class name: Location
Method or attribute name: latitude: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: longitude: number;
Permission: N/A|Class name: Location
Method or attribute name: longitude: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: altitude: number;
Permission: N/A|Class name: Location
Method or attribute name: altitude: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: accuracy: number;
Permission: N/A|Class name: Location
Method or attribute name: accuracy: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: speed: number;
Permission: N/A|Class name: Location
Method or attribute name: speed: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: timeStamp: number;
Permission: N/A|Class name: Location
Method or attribute name: timeStamp: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: direction: number;
Permission: N/A|Class name: Location
Method or attribute name: direction: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: timeSinceBoot: number;
Permission: N/A|Class name: Location
Method or attribute name: timeSinceBoot: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: additions?: Array\;
Permission: N/A|Class name: Location
Method or attribute name: additions?: Array\;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: Location
Method or attribute name: additionSize?: number;
Permission: N/A|Class name: Location
Method or attribute name: additionSize?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: INPUT_PARAMS_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: INPUT_PARAMS_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: REVERSE_GEOCODE_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: REVERSE_GEOCODE_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: GEOCODE_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: GEOCODE_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LOCATOR_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LOCATOR_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_SWITCH_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_SWITCH_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LAST_KNOWN_LOCATION_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LAST_KNOWN_LOCATION_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| +|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_REQUEST_TIMEOUT_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_REQUEST_TIMEOUT_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md new file mode 100644 index 0000000000000000000000000000000000000000..818e229db84b9f5cc91515153df12bd2da815058 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md @@ -0,0 +1,172 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: TimeZone
Method or attribute name: static getTimezonesByLocation(longitude: number, latitude: number): Array\;|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: NormalizerMode|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: NormalizerMode
Method or attribute name: NFC = 1|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: NormalizerMode
Method or attribute name: NFD = 2|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: NormalizerMode
Method or attribute name: NFKC = 3|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: NormalizerMode
Method or attribute name: NFKD = 4|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: Normalizer|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: Normalizer
Method or attribute name: static getInstance(mode: NormalizerMode): Normalizer;|@ohos.i18n.d.ts| +|Added|NA|Module name: ohos.i18n
Class name: Normalizer
Method or attribute name: normalize(text: string): string;|@ohos.i18n.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getStringSync(resId: number, ...args: Array\): string;|@ohos.resourceManager.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getStringSync(resource: Resource, ...args: Array\): string;|@ohos.resourceManager.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getStringByNameSync(resName: string, ...args: Array\): string;|@ohos.resourceManager.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getDrawableDescriptor(resId: number, density?: number): DrawableDescriptor;|@ohos.resourceManager.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getDrawableDescriptorByName(resName: string, density?: number): DrawableDescriptor;|@ohos.resourceManager.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getDrawableDescriptor(resource: Resource, density?: number): DrawableDescriptor;|@ohos.resourceManager.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getRawFileList(path: string, callback: _AsyncCallback\>): void;|@ohos.resourceManager.d.ts| +|Added|NA|Class name: ResourceManager
Method or attribute name: getRawFileList(path: string): Promise\>;|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: System
Initial version: 9|Class name: System
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: System
Method or attribute name: static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string;
Initial version: 9|Class name: System
Method or attribute name: static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: System
Method or attribute name: static getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string;
Initial version: 9|Class name: System
Method or attribute name: static getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: System
Method or attribute name: static getSystemLanguage(): string;
Initial version: 9|Class name: System
Method or attribute name: static getSystemLanguage(): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: System
Method or attribute name: static setSystemLanguage(language: string): void;
Initial version: N/A|Class name: System
Method or attribute name: static setSystemLanguage(language: string): void;
Initial version: 9|@ohos.i18n.d.ts| +|Initial version changed|Class name: System
Method or attribute name: static getSystemRegion(): string;
Initial version: 9|Class name: System
Method or attribute name: static getSystemRegion(): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: System
Method or attribute name: static getSystemLocale(): string;
Initial version: 9|Class name: System
Method or attribute name: static getSystemLocale(): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: System
Method or attribute name: static is24HourClock(): boolean;
Initial version: 9|Class name: System
Method or attribute name: static is24HourClock(): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: I18NUtil
Initial version: 9|Class name: I18NUtil
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: I18NUtil
Method or attribute name: static getDateOrder(locale: string): string;
Initial version: 9|Class name: I18NUtil
Method or attribute name: static getDateOrder(locale: string): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: i18n
Method or attribute name: function getCalendar(locale: string, type?: string): Calendar;
Initial version: 8|Class name: i18n
Method or attribute name: function getCalendar(locale: string, type?: string): Calendar;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: setTime(date: Date): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setTime(date: Date): void;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: setTime(time: number): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setTime(time: number): void;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: setTimeZone(timezone: string): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setTimeZone(timezone: string): void;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: getTimeZone(): string;
Initial version: 8|Class name: Calendar
Method or attribute name: getTimeZone(): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: getFirstDayOfWeek(): number;
Initial version: 8|Class name: Calendar
Method or attribute name: getFirstDayOfWeek(): number;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: setFirstDayOfWeek(value: number): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setFirstDayOfWeek(value: number): void;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: getMinimalDaysInFirstWeek(): number;
Initial version: 8|Class name: Calendar
Method or attribute name: getMinimalDaysInFirstWeek(): number;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: setMinimalDaysInFirstWeek(value: number): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setMinimalDaysInFirstWeek(value: number): void;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: get(field: string): number;
Initial version: 8|Class name: Calendar
Method or attribute name: get(field: string): number;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Calendar
Method or attribute name: isWeekend(date?: Date): boolean;
Initial version: 8|Class name: Calendar
Method or attribute name: isWeekend(date?: Date): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: i18n
Method or attribute name: function isRTL(locale: string): boolean;
Initial version: 7|Class name: i18n
Method or attribute name: function isRTL(locale: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Initial version: 9|Class name: Unicode
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isDigit(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isDigit(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isSpaceChar(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isSpaceChar(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isWhitespace(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isWhitespace(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isRTL(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isRTL(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isIdeograph(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isIdeograph(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isLetter(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isLetter(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isLowerCase(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isLowerCase(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static isUpperCase(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isUpperCase(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: Unicode
Method or attribute name: static getType(char: string): string;
Initial version: 9|Class name: Unicode
Method or attribute name: static getType(char: string): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: i18n
Method or attribute name: function getTimeZone(zoneID?: string): TimeZone;
Initial version: 7|Class name: i18n
Method or attribute name: function getTimeZone(zoneID?: string): TimeZone;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: TimeZone
Initial version: 7|Class name: TimeZone
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: TimeZone
Method or attribute name: getID(): string;
Initial version: 7|Class name: TimeZone
Method or attribute name: getID(): string;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: TimeZone
Method or attribute name: getRawOffset(): number;
Initial version: 7|Class name: TimeZone
Method or attribute name: getRawOffset(): number;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: TimeZone
Method or attribute name: getOffset(date?: number): number;
Initial version: 7|Class name: TimeZone
Method or attribute name: getOffset(date?: number): number;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: TimeZone
Method or attribute name: static getAvailableIDs(): Array\;
Initial version: 9|Class name: TimeZone
Method or attribute name: static getAvailableIDs(): Array\;
Initial version: 10|@ohos.i18n.d.ts| +|Initial version changed|Class name: intl
Initial version: 6|Class name: intl
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: LocaleOptions
Initial version: 6|Class name: LocaleOptions
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Locale
Initial version: 6|Class name: Locale
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Locale
Method or attribute name: constructor();
Initial version: 8|Class name: Locale
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Locale
Method or attribute name: constructor(locale: string, options?: LocaleOptions);
Initial version: 6|Class name: Locale
Method or attribute name: constructor(locale: string, options?: LocaleOptions);
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Locale
Method or attribute name: toString(): string;
Initial version: 6|Class name: Locale
Method or attribute name: toString(): string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Locale
Method or attribute name: maximize(): Locale;
Initial version: 6|Class name: Locale
Method or attribute name: maximize(): Locale;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Locale
Method or attribute name: minimize(): Locale;
Initial version: 6|Class name: Locale
Method or attribute name: minimize(): Locale;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: DateTimeOptions
Initial version: 6|Class name: DateTimeOptions
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: DateTimeFormat
Initial version: 6|Class name: DateTimeFormat
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: DateTimeFormat
Method or attribute name: constructor();
Initial version: 8|Class name: DateTimeFormat
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: DateTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: DateTimeOptions);
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: DateTimeOptions);
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: DateTimeFormat
Method or attribute name: format(date: Date): string;
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: format(date: Date): string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: DateTimeFormat
Method or attribute name: formatRange(startDate: Date, endDate: Date): string;
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: formatRange(startDate: Date, endDate: Date): string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: DateTimeFormat
Method or attribute name: resolvedOptions(): DateTimeOptions;
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: resolvedOptions(): DateTimeOptions;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: NumberOptions
Initial version: 6|Class name: NumberOptions
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: NumberFormat
Initial version: 6|Class name: NumberFormat
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: NumberFormat
Method or attribute name: constructor();
Initial version: 8|Class name: NumberFormat
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: NumberFormat
Method or attribute name: constructor(locale: string \| Array\, options?: NumberOptions);
Initial version: 6|Class name: NumberFormat
Method or attribute name: constructor(locale: string \| Array\, options?: NumberOptions);
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: NumberFormat
Method or attribute name: format(number: number): string;
Initial version: 6|Class name: NumberFormat
Method or attribute name: format(number: number): string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: NumberFormat
Method or attribute name: resolvedOptions(): NumberOptions;
Initial version: 6|Class name: NumberFormat
Method or attribute name: resolvedOptions(): NumberOptions;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: CollatorOptions
Initial version: 8|Class name: CollatorOptions
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Collator
Initial version: 8|Class name: Collator
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Collator
Method or attribute name: constructor();
Initial version: 8|Class name: Collator
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Collator
Method or attribute name: constructor(locale: string \| Array\, options?: CollatorOptions);
Initial version: 8|Class name: Collator
Method or attribute name: constructor(locale: string \| Array\, options?: CollatorOptions);
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Collator
Method or attribute name: compare(first: string, second: string): number;
Initial version: 8|Class name: Collator
Method or attribute name: compare(first: string, second: string): number;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: Collator
Method or attribute name: resolvedOptions(): CollatorOptions;
Initial version: 8|Class name: Collator
Method or attribute name: resolvedOptions(): CollatorOptions;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: PluralRulesOptions
Initial version: 8|Class name: PluralRulesOptions
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: PluralRules
Initial version: 8|Class name: PluralRules
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: PluralRules
Method or attribute name: constructor();
Initial version: 8|Class name: PluralRules
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: PluralRules
Method or attribute name: constructor(locale: string \| Array\, options?: PluralRulesOptions);
Initial version: 8|Class name: PluralRules
Method or attribute name: constructor(locale: string \| Array\, options?: PluralRulesOptions);
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: PluralRules
Method or attribute name: select(n: number): string;
Initial version: 8|Class name: PluralRules
Method or attribute name: select(n: number): string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormatInputOptions
Initial version: 8|Class name: RelativeTimeFormatInputOptions
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: locale: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: locale: string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: style: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: style: string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numeric: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numeric: string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numberingSystem: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numberingSystem: string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormat
Initial version: 8|Class name: RelativeTimeFormat
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: constructor();
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: RelativeTimeFormatInputOptions);
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: RelativeTimeFormatInputOptions);
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: format(value: number, unit: string): string;
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: format(value: number, unit: string): string;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: formatToParts(value: number, unit: string): Array\;
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: formatToParts(value: number, unit: string): Array\;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: resolvedOptions(): RelativeTimeFormatResolvedOptions;
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: resolvedOptions(): RelativeTimeFormatResolvedOptions;
Initial version: 10|@ohos.intl.d.ts| +|Initial version changed|Class name: resourceManager
Initial version: 6|Class name: resourceManager
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: Direction
Initial version: 6|Class name: Direction
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: Direction
Method or attribute name: DIRECTION_VERTICAL = 0
Initial version: 6|Class name: Direction
Method or attribute name: DIRECTION_VERTICAL = 0
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: Direction
Method or attribute name: DIRECTION_HORIZONTAL = 1
Initial version: 6|Class name: Direction
Method or attribute name: DIRECTION_HORIZONTAL = 1
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceType
Initial version: 6|Class name: DeviceType
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PHONE = 0x00
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PHONE = 0x00
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TABLET = 0x01
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TABLET = 0x01
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_CAR = 0x02
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_CAR = 0x02
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PC = 0x03
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PC = 0x03
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TV = 0x04
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TV = 0x04
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_WEARABLE = 0x06
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_WEARABLE = 0x06
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ScreenDensity
Initial version: 6|Class name: ScreenDensity
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_SDPI = 120
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_SDPI = 120
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_MDPI = 160
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_MDPI = 160
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_LDPI = 240
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_LDPI = 240
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_XLDPI = 320
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_XLDPI = 320
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_XXLDPI = 480
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_XXLDPI = 480
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_XXXLDPI = 640
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_XXXLDPI = 640
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: Configuration
Initial version: 6|Class name: Configuration
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: DeviceCapability
Initial version: 6|Class name: DeviceCapability
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Initial version: 6|Class name: ResourceManager
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource, callback: _AsyncCallback\>): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource, callback: _AsyncCallback\>): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource): Promise\>;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource): Promise\>;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getDeviceCapability(callback: _AsyncCallback\): void;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getDeviceCapability(callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getDeviceCapability(): Promise\;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getDeviceCapability(): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getConfiguration(callback: _AsyncCallback\): void;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getConfiguration(callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getConfiguration(): Promise\;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getConfiguration(): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string, callback: _AsyncCallback\>): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string, callback: _AsyncCallback\>): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string): Promise\>;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string): Promise\>;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringSync(resId: number): string;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringSync(resId: number): string;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringSync(resource: Resource): string;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringSync(resource: Resource): string;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringByNameSync(resName: string): string;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringByNameSync(resName: string): string;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getBoolean(resId: number): boolean;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getBoolean(resId: number): boolean;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getBoolean(resource: Resource): boolean;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getBoolean(resource: Resource): boolean;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getBooleanByName(resName: string): boolean;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getBooleanByName(resName: string): boolean;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getNumber(resId: number): number;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getNumber(resId: number): number;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getNumber(resource: Resource): number;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getNumber(resource: Resource): number;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getNumberByName(resName: string): number;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getNumberByName(resName: string): number;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: release();
Initial version: 7|Class name: ResourceManager
Method or attribute name: release();
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number, callback: _AsyncCallback\>): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number, callback: _AsyncCallback\>): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number): Promise\>;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number): Promise\>;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFd(path: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFd(path: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| +|Initial version changed|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-graphic.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-graphic.md new file mode 100644 index 0000000000000000000000000000000000000000..41b00724c2e0a5f2be32b3552dd1f183c2a0e957 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-graphic.md @@ -0,0 +1,867 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Deleted|Module name: webgl
Class name: WebGLContextAttributes|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: alpha?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: depth?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: stencil?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: antialias?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: premultipliedAlpha?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: preserveDrawingBuffer?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: powerPreference?: WebGLPowerPreference;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: failIfMajorPerformanceCaveat?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLContextAttributes
Method or attribute name: desynchronized?: boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLBuffer|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLFramebuffer|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLProgram|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderbuffer|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLShader|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLTexture|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLUniformLocation|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLActiveInfo|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLActiveInfo
Method or attribute name: readonly size: GLint;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLActiveInfo
Method or attribute name: readonly type: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLActiveInfo
Method or attribute name: readonly name: string;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLShaderPrecisionFormat|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLShaderPrecisionFormat
Method or attribute name: readonly rangeMin: GLint;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLShaderPrecisionFormat
Method or attribute name: readonly rangeMax: GLint;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLShaderPrecisionFormat
Method or attribute name: readonly precision: GLint;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_BUFFER_BIT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BUFFER_BIT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly COLOR_BUFFER_BIT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly POINTS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINES: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINE_LOOP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINE_STRIP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TRIANGLES: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TRIANGLE_STRIP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TRIANGLE_FAN: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ZERO: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ONE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SRC_COLOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ONE_MINUS_SRC_COLOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SRC_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ONE_MINUS_SRC_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DST_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ONE_MINUS_DST_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DST_COLOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ONE_MINUS_DST_COLOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SRC_ALPHA_SATURATE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FUNC_ADD: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_EQUATION: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_EQUATION_RGB: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_EQUATION_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FUNC_SUBTRACT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FUNC_REVERSE_SUBTRACT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_DST_RGB: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_SRC_RGB: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_DST_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_SRC_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CONSTANT_COLOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ONE_MINUS_CONSTANT_COLOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CONSTANT_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND_COLOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ARRAY_BUFFER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ELEMENT_ARRAY_BUFFER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ARRAY_BUFFER_BINDING: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STREAM_DRAW: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STATIC_DRAW: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DYNAMIC_DRAW: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BUFFER_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BUFFER_USAGE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CURRENT_VERTEX_ATTRIB: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRONT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BACK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRONT_AND_BACK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CULL_FACE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLEND: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DITHER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_TEST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_TEST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SCISSOR_TEST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly POLYGON_OFFSET_FILL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLE_COVERAGE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NO_ERROR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INVALID_ENUM: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INVALID_VALUE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INVALID_OPERATION: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly OUT_OF_MEMORY: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CW: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CCW: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINE_WIDTH: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ALIASED_POINT_SIZE_RANGE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ALIASED_LINE_WIDTH_RANGE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CULL_FACE_MODE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRONT_FACE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_RANGE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_WRITEMASK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_CLEAR_VALUE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_FUNC: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_CLEAR_VALUE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_FUNC: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_FAIL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_PASS_DEPTH_FAIL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_PASS_DEPTH_PASS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_REF: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_VALUE_MASK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_WRITEMASK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BACK_FUNC: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BACK_FAIL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BACK_REF: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BACK_VALUE_MASK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BACK_WRITEMASK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VIEWPORT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SCISSOR_BOX: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly COLOR_CLEAR_VALUE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly COLOR_WRITEMASK: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNPACK_ALIGNMENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly PACK_ALIGNMENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_TEXTURE_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_VIEWPORT_DIMS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SUBPIXEL_BITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RED_BITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly GREEN_BITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BLUE_BITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ALPHA_BITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_BITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_BITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly POLYGON_OFFSET_UNITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly POLYGON_OFFSET_FACTOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_BINDING_2D: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLE_BUFFERS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLES: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLE_COVERAGE_VALUE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLE_COVERAGE_INVERT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly COMPRESSED_TEXTURE_FORMATS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DONT_CARE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FASTEST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NICEST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly GENERATE_MIPMAP_HINT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BYTE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNSIGNED_BYTE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SHORT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNSIGNED_SHORT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNSIGNED_INT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FLOAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_COMPONENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RGB: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RGBA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LUMINANCE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LUMINANCE_ALPHA: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNSIGNED_SHORT_4_4_4_4: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNSIGNED_SHORT_5_5_5_1: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNSIGNED_SHORT_5_6_5: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAGMENT_SHADER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_SHADER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_VERTEX_ATTRIBS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_VARYING_VECTORS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SHADER_TYPE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DELETE_STATUS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINK_STATUS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VALIDATE_STATUS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ATTACHED_SHADERS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ACTIVE_UNIFORMS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ACTIVE_ATTRIBUTES: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SHADING_LANGUAGE_VERSION: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CURRENT_PROGRAM: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NEVER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LESS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly EQUAL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LEQUAL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly GREATER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NOTEQUAL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly GEQUAL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ALWAYS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly KEEP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly REPLACE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INCR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DECR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INVERT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INCR_WRAP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DECR_WRAP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VENDOR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERSION: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NEAREST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINEAR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NEAREST_MIPMAP_NEAREST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINEAR_MIPMAP_NEAREST: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NEAREST_MIPMAP_LINEAR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LINEAR_MIPMAP_LINEAR: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_MAG_FILTER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_MIN_FILTER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_WRAP_S: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_WRAP_T: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_2D: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_CUBE_MAP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_BINDING_CUBE_MAP: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE0: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE1: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE2: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE3: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE4: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE5: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE6: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE7: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE8: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE9: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE10: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE11: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE12: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE13: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE14: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE15: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE16: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE17: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE18: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE19: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE20: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE21: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE22: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE23: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE24: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE25: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE26: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE27: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE28: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE29: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE30: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly TEXTURE31: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly ACTIVE_TEXTURE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly REPEAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CLAMP_TO_EDGE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MIRRORED_REPEAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FLOAT_VEC2: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FLOAT_VEC3: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FLOAT_VEC4: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INT_VEC2: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INT_VEC3: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INT_VEC4: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BOOL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BOOL_VEC2: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BOOL_VEC3: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BOOL_VEC4: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FLOAT_MAT2: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FLOAT_MAT3: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FLOAT_MAT4: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLER_2D: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly SAMPLER_CUBE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly COMPILE_STATUS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LOW_FLOAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MEDIUM_FLOAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly HIGH_FLOAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly LOW_INT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MEDIUM_INT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly HIGH_INT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RGBA4: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RGB5_A1: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RGB565: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_COMPONENT16: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_INDEX8: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_STENCIL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_WIDTH: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_HEIGHT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_RED_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_GREEN_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_BLUE_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_ALPHA_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_DEPTH_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_STENCIL_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT0: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_ATTACHMENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly STENCIL_ATTACHMENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly DEPTH_STENCIL_ATTACHMENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly NONE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_COMPLETE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_UNSUPPORTED: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_BINDING: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly RENDERBUFFER_BINDING: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly MAX_RENDERBUFFER_SIZE: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNPACK_FLIP_Y_WEBGL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly CONTEXT_LOST_WEBGL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly BROWSER_DEFAULT_WEBGL: GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly canvas: HTMLCanvasElement \| OffscreenCanvas;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly drawingBufferWidth: GLsizei;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: readonly drawingBufferHeight: GLsizei;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getContextAttributes(): WebGLContextAttributes \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isContextLost(): boolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getSupportedExtensions(): string[] \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getExtension(name: string): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: activeTexture(texture: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: attachShader(program: WebGLProgram, shader: WebGLShader): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: bindBuffer(target: GLenum, buffer: WebGLBuffer \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: bindTexture(target: GLenum, texture: WebGLTexture \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: blendEquation(mode: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: blendFunc(sfactor: GLenum, dfactor: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: checkFramebufferStatus(target: GLenum): GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: clear(mask: GLbitfield): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: clearDepth(depth: GLclampf): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: clearStencil(s: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: compileShader(shader: WebGLShader): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: createBuffer(): WebGLBuffer \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: createFramebuffer(): WebGLFramebuffer \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: createProgram(): WebGLProgram \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: createRenderbuffer(): WebGLRenderbuffer \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: createShader(type: GLenum): WebGLShader \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: createTexture(): WebGLTexture \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: cullFace(mode: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: deleteBuffer(buffer: WebGLBuffer \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: deleteFramebuffer(framebuffer: WebGLFramebuffer \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: deleteProgram(program: WebGLProgram \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: deleteRenderbuffer(renderbuffer: WebGLRenderbuffer \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: deleteShader(shader: WebGLShader \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: deleteTexture(texture: WebGLTexture \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: depthFunc(func: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: depthMask(flag: GLboolean): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: depthRange(zNear: GLclampf, zFar: GLclampf): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: detachShader(program: WebGLProgram, shader: WebGLShader): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: disable(cap: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: disableVertexAttribArray(index: GLuint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: enable(cap: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: enableVertexAttribArray(index: GLuint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: finish(): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: flush(): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture \| null, level: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: frontFace(mode: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: generateMipmap(target: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getAttachedShaders(program: WebGLProgram): WebGLShader[] \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getAttribLocation(program: WebGLProgram, name: string): GLint;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getBufferParameter(target: GLenum, pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getParameter(pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getError(): GLenum;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getProgramParameter(program: WebGLProgram, pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getProgramInfoLog(program: WebGLProgram): string \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getRenderbufferParameter(target: GLenum, pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getShaderParameter(shader: WebGLShader, pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getShaderInfoLog(shader: WebGLShader): string \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getShaderSource(shader: WebGLShader): string \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getTexParameter(target: GLenum, pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation \| null;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getVertexAttrib(index: GLuint, pname: GLenum): any;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: hint(target: GLenum, mode: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isBuffer(buffer: WebGLBuffer \| null): GLboolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isEnabled(cap: GLenum): GLboolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isFramebuffer(framebuffer: WebGLFramebuffer \| null): GLboolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isProgram(program: WebGLProgram \| null): GLboolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isRenderbuffer(renderbuffer: WebGLRenderbuffer \| null): GLboolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isShader(shader: WebGLShader \| null): GLboolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: isTexture(texture: WebGLTexture \| null): GLboolean;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: lineWidth(width: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: linkProgram(program: WebGLProgram): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: pixelStorei(pname: GLenum, param: GLint \| GLboolean): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: polygonOffset(factor: GLfloat, units: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: sampleCoverage(value: GLclampf, invert: GLboolean): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: shaderSource(shader: WebGLShader, source: string): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: stencilMask(mask: GLuint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: stencilMaskSeparate(face: GLenum, mask: GLuint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: texParameteri(target: GLenum, pname: GLenum, param: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform1f(location: WebGLUniformLocation \| null, x: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform2f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform3f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat, z: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform4f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform1i(location: WebGLUniformLocation \| null, x: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform2i(location: WebGLUniformLocation \| null, x: GLint, y: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform3i(location: WebGLUniformLocation \| null, x: GLint, y: GLint, z: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: uniform4i(location: WebGLUniformLocation \| null, x: GLint, y: GLint, z: GLint, w: GLint): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: useProgram(program: WebGLProgram \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: validateProgram(program: WebGLProgram): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib1f(index: GLuint, x: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib1fv(index: GLuint, values: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib2fv(index: GLuint, values: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib3fv(index: GLuint, values: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttrib4fv(index: GLuint, values: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextBase
Method or attribute name: viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: bufferData(target: GLenum, data: BufferSource \| null, usage: GLenum): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform1fv(location: WebGLUniformLocation \| null, v: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform2fv(location: WebGLUniformLocation \| null, v: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform3fv(location: WebGLUniformLocation \| null, v: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform4fv(location: WebGLUniformLocation \| null, v: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform1iv(location: WebGLUniformLocation \| null, v: Int32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform2iv(location: WebGLUniformLocation \| null, v: Int32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform3iv(location: WebGLUniformLocation \| null, v: Int32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniform4iv(location: WebGLUniformLocation \| null, v: Int32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniformMatrix2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniformMatrix3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContextOverloads
Method or attribute name: uniformMatrix4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List): void;|NA|webgl.d.ts| +|Deleted|Module name: webgl
Class name: WebGLRenderingContext|NA|webgl.d.ts| +|Deleted|Module name: webgl2
Class name: WebGLQuery|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGLSampler|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGLSync|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGLTransformFeedback|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGLVertexArrayObject|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly READ_BUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNPACK_ROW_LENGTH: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNPACK_SKIP_ROWS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNPACK_SKIP_PIXELS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly PACK_ROW_LENGTH: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly PACK_SKIP_ROWS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly PACK_SKIP_PIXELS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DEPTH: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly STENCIL: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB10_A2: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_BINDING_3D: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNPACK_SKIP_IMAGES: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNPACK_IMAGE_HEIGHT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_3D: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_WRAP_R: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_3D_TEXTURE_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_2_10_10_10_REV: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_ELEMENTS_VERTICES: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_ELEMENTS_INDICES: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_MIN_LOD: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_MAX_LOD: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_BASE_LEVEL: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_MAX_LEVEL: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MIN: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DEPTH_COMPONENT24: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_TEXTURE_LOD_BIAS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_COMPARE_MODE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_COMPARE_FUNC: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly CURRENT_QUERY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly QUERY_RESULT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly QUERY_RESULT_AVAILABLE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly STREAM_READ: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly STREAM_COPY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly STATIC_READ: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly STATIC_COPY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DYNAMIC_READ: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DYNAMIC_COPY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_DRAW_BUFFERS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER0: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER1: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER2: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER3: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER4: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER5: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER6: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER7: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER9: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER10: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER11: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER12: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER13: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER14: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_BUFFER15: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_VERTEX_UNIFORM_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SAMPLER_3D: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SAMPLER_2D_SHADOW: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAGMENT_SHADER_DERIVATIVE_HINT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly PIXEL_PACK_BUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly PIXEL_UNPACK_BUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly PIXEL_PACK_BUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly PIXEL_UNPACK_BUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FLOAT_MAT2x3: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FLOAT_MAT2x4: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FLOAT_MAT3x2: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FLOAT_MAT3x4: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FLOAT_MAT4x2: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FLOAT_MAT4x3: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SRGB: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SRGB8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SRGB8_ALPHA8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COMPARE_REF_TO_TEXTURE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA32F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB32F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA16F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB16F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_INTEGER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_ARRAY_TEXTURE_LAYERS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MIN_PROGRAM_TEXEL_OFFSET: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_PROGRAM_TEXEL_OFFSET: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_VARYING_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_2D_ARRAY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_BINDING_2D_ARRAY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R11F_G11F_B10F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_10F_11F_11F_REV: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB9_E5: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_5_9_9_9_REV: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_BUFFER_MODE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_VARYINGS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_BUFFER_START: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RASTERIZER_DISCARD: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly INTERLEAVED_ATTRIBS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SEPARATE_ATTRIBS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_BUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA32UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB32UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA16UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB16UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA8UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB8UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA32I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB32I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA16I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB16I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA8I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB8I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RED_INTEGER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB_INTEGER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA_INTEGER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SAMPLER_2D_ARRAY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SAMPLER_2D_ARRAY_SHADOW: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SAMPLER_CUBE_SHADOW: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_VEC2: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_VEC3: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_VEC4: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly INT_SAMPLER_2D: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly INT_SAMPLER_3D: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly INT_SAMPLER_CUBE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly INT_SAMPLER_2D_ARRAY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_SAMPLER_2D: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_SAMPLER_3D: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_SAMPLER_CUBE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DEPTH_COMPONENT32F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DEPTH32F_STENCIL8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FLOAT_32_UNSIGNED_INT_24_8_REV: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_DEFAULT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_INT_24_8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DEPTH24_STENCIL8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNED_NORMALIZED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_FRAMEBUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly READ_FRAMEBUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly DRAW_FRAMEBUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly READ_FRAMEBUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RENDERBUFFER_SAMPLES: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_COLOR_ATTACHMENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT1: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT2: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT3: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT4: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT5: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT6: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT7: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT9: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT10: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT11: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT12: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT13: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT14: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COLOR_ATTACHMENT15: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_SAMPLES: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly HALF_FLOAT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG_INTEGER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG8: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R16F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R32F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG16F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG32F: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R8I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R8UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R16I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R16UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R32I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R32UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG8I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG8UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG16I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG16UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG32I: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG32UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly VERTEX_ARRAY_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly R8_SNORM: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RG8_SNORM: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB8_SNORM: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGBA8_SNORM: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SIGNED_NORMALIZED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COPY_READ_BUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COPY_WRITE_BUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COPY_READ_BUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly COPY_WRITE_BUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BUFFER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BUFFER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BUFFER_START: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BUFFER_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_VERTEX_UNIFORM_BLOCKS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_FRAGMENT_UNIFORM_BLOCKS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_COMBINED_UNIFORM_BLOCKS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_UNIFORM_BUFFER_BINDINGS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_UNIFORM_BLOCK_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly ACTIVE_UNIFORM_BLOCKS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_TYPE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BLOCK_INDEX: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_OFFSET: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_ARRAY_STRIDE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_MATRIX_STRIDE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_IS_ROW_MAJOR: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BLOCK_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BLOCK_DATA_SIZE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly INVALID_INDEX: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_VERTEX_OUTPUT_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_FRAGMENT_INPUT_COMPONENTS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_SERVER_WAIT_TIMEOUT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly OBJECT_TYPE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SYNC_CONDITION: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SYNC_STATUS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SYNC_FLAGS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SYNC_FENCE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SYNC_GPU_COMMANDS_COMPLETE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly UNSIGNALED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SIGNALED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly ALREADY_SIGNALED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TIMEOUT_EXPIRED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly CONDITION_SATISFIED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly WAIT_FAILED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SYNC_FLUSH_COMMANDS_BIT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly VERTEX_ATTRIB_ARRAY_DIVISOR: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly ANY_SAMPLES_PASSED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly ANY_SAMPLES_PASSED_CONSERVATIVE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly SAMPLER_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly RGB10_A2UI: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly INT_2_10_10_10_REV: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_PAUSED: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_ACTIVE: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TRANSFORM_FEEDBACK_BINDING: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_IMMUTABLE_FORMAT: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_ELEMENT_INDEX: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TEXTURE_IMMUTABLE_LEVELS: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly TIMEOUT_IGNORED: GLint64;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: copyBufferSubData(readTarget: webgl.GLenum, writeTarget: webgl.GLenum, readOffset: webgl.GLintptr, writeOffset: webgl.GLintptr, size: webgl.GLsizeiptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getBufferSubData(target: webgl.GLenum, srcByteOffset: webgl.GLintptr, dstBuffer: ArrayBufferView, dstOffset?: webgl.GLuint, length?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: blitFramebuffer(srcX0: webgl.GLint, srcY0: webgl.GLint, srcX1: webgl.GLint, srcY1: webgl.GLint, dstX0: webgl.GLint, dstY0: webgl.GLint, dstX1: webgl.GLint, dstY1: webgl.GLint, mask: webgl.GLbitfield, filter: webgl.GLenum): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: framebufferTextureLayer(target: webgl.GLenum, attachment: webgl.GLenum, texture: webgl.WebGLTexture \| null, level: webgl.GLint, layer: webgl.GLint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: invalidateFramebuffer(target: webgl.GLenum, attachments: webgl.GLenum[]): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: invalidateSubFramebuffer(target: webgl.GLenum, attachments: webgl.GLenum[], x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: readBuffer(src: webgl.GLenum): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getInternalformatParameter(target: webgl.GLenum, internalformat: webgl.GLenum, pname: webgl.GLenum): any;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: renderbufferStorageMultisample(target: webgl.GLenum, samples: webgl.GLsizei, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texStorage2D(target: webgl.GLenum, levels: webgl.GLsizei, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texStorage3D(target: webgl.GLenum, levels: webgl.GLsizei, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView, srcOffset: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: texSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView \| null, srcOffset?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: copyTexSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: compressedTexImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: compressedTexImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: compressedTexSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: compressedTexSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getFragDataLocation(program: webgl.WebGLProgram, name: string): webgl.GLint;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform1ui(location: webgl.WebGLUniformLocation \| null, v0: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform2ui(location: webgl.WebGLUniformLocation \| null, v0: webgl.GLuint, v1: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform3ui(location: webgl.WebGLUniformLocation \| null, v0: webgl.GLuint, v1: webgl.GLuint, v2: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform4ui(location: webgl.WebGLUniformLocation \| null, v0: webgl.GLuint, v1: webgl.GLuint, v2: webgl.GLuint, v3: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform1uiv(location: webgl.WebGLUniformLocation \| null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform2uiv(location: webgl.WebGLUniformLocation \| null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform3uiv(location: webgl.WebGLUniformLocation \| null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniform4uiv(location: webgl.WebGLUniformLocation \| null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniformMatrix3x2fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniformMatrix4x2fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniformMatrix2x3fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniformMatrix4x3fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniformMatrix2x4fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniformMatrix3x4fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: vertexAttribI4i(index: webgl.GLuint, x: webgl.GLint, y: webgl.GLint, z: webgl.GLint, w: webgl.GLint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: vertexAttribI4iv(index: webgl.GLuint, values: webgl.Int32List): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: vertexAttribI4ui(index: webgl.GLuint, x: webgl.GLuint, y: webgl.GLuint, z: webgl.GLuint, w: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: vertexAttribI4uiv(index: webgl.GLuint, values: Uint32List): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: vertexAttribIPointer(index: webgl.GLuint, size: webgl.GLint, type: webgl.GLenum, stride: webgl.GLsizei, offset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: vertexAttribDivisor(index: webgl.GLuint, divisor: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: drawArraysInstanced(mode: webgl.GLenum, first: webgl.GLint, count: webgl.GLsizei, instanceCount: webgl.GLsizei): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: drawElementsInstanced(mode: webgl.GLenum, count: webgl.GLsizei, type: webgl.GLenum, offset: webgl.GLintptr, instanceCount: webgl.GLsizei): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: drawRangeElements(mode: webgl.GLenum, start: webgl.GLuint, end: webgl.GLuint, count: webgl.GLsizei, type: webgl.GLenum, offset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: drawBuffers(buffers: webgl.GLenum[]): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: clearBufferfv(buffer: webgl.GLenum, drawbuffer: webgl.GLint, values: webgl.Float32List, srcOffset?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: clearBufferiv(buffer: webgl.GLenum, drawbuffer: webgl.GLint, values: webgl.Int32List, srcOffset?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: clearBufferuiv(buffer: webgl.GLenum, drawbuffer: webgl.GLint, values: Uint32List, srcOffset?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: clearBufferfi(buffer: webgl.GLenum, drawbuffer: webgl.GLint, depth: webgl.GLfloat, stencil: webgl.GLint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: createQuery(): WebGLQuery \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: deleteQuery(query: WebGLQuery \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: isQuery(query: WebGLQuery \| null): webgl.GLboolean;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: beginQuery(target: webgl.GLenum, query: WebGLQuery): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: endQuery(target: webgl.GLenum): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getQuery(target: webgl.GLenum, pname: webgl.GLenum): WebGLQuery \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getQueryParameter(query: WebGLQuery, pname: webgl.GLenum): any;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: createSampler(): WebGLSampler \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: deleteSampler(sampler: WebGLSampler \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: isSampler(sampler: WebGLSampler \| null): webgl.GLboolean;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: bindSampler(unit: webgl.GLuint, sampler: WebGLSampler \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: samplerParameteri(sampler: WebGLSampler, pname: webgl.GLenum, param: webgl.GLint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: samplerParameterf(sampler: WebGLSampler, pname: webgl.GLenum, param: webgl.GLfloat): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getSamplerParameter(sampler: WebGLSampler, pname: webgl.GLenum): any;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: fenceSync(condition: webgl.GLenum, flags: webgl.GLbitfield): WebGLSync \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: isSync(sync: WebGLSync \| null): webgl.GLboolean;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: deleteSync(sync: WebGLSync \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: clientWaitSync(sync: WebGLSync, flags: webgl.GLbitfield, timeout: GLuint64 ): webgl.GLenum;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: waitSync(sync: WebGLSync, flags: webgl.GLbitfield, timeout: GLint64): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getSyncParameter(sync: WebGLSync, pname: webgl.GLenum): any;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: createTransformFeedback(): WebGLTransformFeedback \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: deleteTransformFeedback(tf: WebGLTransformFeedback \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: isTransformFeedback(tf: WebGLTransformFeedback \| null): webgl.GLboolean;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: bindTransformFeedback(target: webgl.GLenum, tf: WebGLTransformFeedback \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: beginTransformFeedback(primitiveMode: webgl.GLenum): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: endTransformFeedback(): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: transformFeedbackVaryings(program: webgl.WebGLProgram, varyings: string[], bufferMode: webgl.GLenum): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getTransformFeedbackVarying(program: webgl.WebGLProgram, index: webgl.GLuint): webgl.WebGLActiveInfo \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: pauseTransformFeedback(): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: resumeTransformFeedback(): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: bindBufferBase(target: webgl.GLenum, index: webgl.GLuint, buffer: webgl.WebGLBuffer \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: bindBufferRange(target: webgl.GLenum, index: webgl.GLuint, buffer: webgl.WebGLBuffer \| null, offset: webgl.GLintptr, size: webgl.GLsizeiptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getIndexedParameter(target: webgl.GLenum, index: webgl.GLuint): any;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getUniformIndices(program: webgl.WebGLProgram, uniformNames: string[]): webgl.GLuint[] \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getActiveUniforms(program: webgl.WebGLProgram, uniformIndices: webgl.GLuint[], pname: webgl.GLenum): any;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getUniformBlockIndex(program: webgl.WebGLProgram, uniformBlockName: string): webgl.GLuint;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getActiveUniformBlockParameter(program: webgl.WebGLProgram, uniformBlockIndex: webgl.GLuint, pname: webgl.GLenum): any;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: getActiveUniformBlockName(program: webgl.WebGLProgram, uniformBlockIndex: webgl.GLuint): string \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: uniformBlockBinding(program: webgl.WebGLProgram, uniformBlockIndex: webgl.GLuint, uniformBlockBinding: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: createVertexArray(): WebGLVertexArrayObject \| null;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: deleteVertexArray(vertexArray: WebGLVertexArrayObject \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: isVertexArray(vertexArray: WebGLVertexArrayObject \| null): webgl.GLboolean;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextBase
Method or attribute name: bindVertexArray(array: WebGLVertexArrayObject \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: bufferData(target: webgl.GLenum, size: webgl.GLsizeiptr, usage: webgl.GLenum): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: bufferData(target: webgl.GLenum, srcData: BufferSource \| null, usage: webgl.GLenum): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: bufferSubData(target: webgl.GLenum, dstByteOffset: webgl.GLintptr, srcData: BufferSource): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: bufferData(target: webgl.GLenum, srcData: ArrayBufferView, usage: webgl.GLenum, srcOffset: webgl.GLuint, length?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: bufferSubData(target: webgl.GLenum, dstByteOffset: webgl.GLintptr, srcData: ArrayBufferView, srcOffset: webgl.GLuint, length?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, pixels: ArrayBufferView \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, pixels: ArrayBufferView \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView, srcOffset: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView, srcOffset: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: compressedTexImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: compressedTexImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: compressedTexSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: compressedTexSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform1fv(location: webgl.WebGLUniformLocation \| null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform2fv(location: webgl.WebGLUniformLocation \| null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform3fv(location: webgl.WebGLUniformLocation \| null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform4fv(location: webgl.WebGLUniformLocation \| null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform1iv(location: webgl.WebGLUniformLocation \| null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform2iv(location: webgl.WebGLUniformLocation \| null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform3iv(location: webgl.WebGLUniformLocation \| null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniform4iv(location: webgl.WebGLUniformLocation \| null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniformMatrix2fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniformMatrix3fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: uniformMatrix4fv(location: webgl.WebGLUniformLocation \| null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: readPixels(x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, dstData: ArrayBufferView \| null): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: readPixels(x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, offset: webgl.GLintptr): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContextOverloads
Method or attribute name: readPixels(x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, dstData: ArrayBufferView, dstOffset: webgl.GLuint): void;|NA|webgl2.d.ts| +|Deleted|Module name: webgl2
Class name: WebGL2RenderingContext|NA|webgl2.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md new file mode 100644 index 0000000000000000000000000000000000000000..078d2293f3f9b892525569bfc40f9431f9033f1c --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md @@ -0,0 +1,282 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: InputMethodSetting
Method or attribute name: on(type: 'imeShow' \| 'imeHide', callback: (info: Array\) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodSetting
Method or attribute name: off(type: 'imeShow' \| 'imeHide', callback?: (info: Array\) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: attach(showKeyboard: boolean, textConfig: TextConfig, callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: attach(showKeyboard: boolean, textConfig: TextConfig): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: showTextInput(callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: showTextInput(): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: hideTextInput(callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: hideTextInput(): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: detach(callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: detach(): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: setCallingWindow(windowId: number, callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: setCallingWindow(windowId: number): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: updateCursor(cursorInfo: CursorInfo, callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: updateCursor(cursorInfo: CursorInfo): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: changeSelection(text: string, start: number, end: number, callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: changeSelection(text: string, start: number, end: number): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: updateAttribute(attribute: InputAttribute, callback: AsyncCallback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: updateAttribute(attribute: InputAttribute): Promise\;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'selectByRange', callback: Callback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'selectByMovement', callback: Callback\): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'selectByRange'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'selectByMovement'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'insertText', callback: (text: string) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'insertText'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'deleteLeft' \| 'deleteRight', callback: (length: number) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'deleteLeft' \| 'deleteRight'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'sendKeyboardStatus', callback: (keyBoardStatus: KeyboardStatus) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'sendKeyboardStatus'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'sendFunctionKey', callback: (functionKey: FunctionKey) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'sendFunctionKey'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'moveCursor', callback: (direction: Direction) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'moveCursor'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: on(type: 'handleExtendAction', callback: (action: ExtendAction) => void): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodController
Method or attribute name: off(type: 'handleExtendAction'): void;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodProperty
Method or attribute name: readonly labelId?: number;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodProperty
Method or attribute name: extra?: object;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Direction|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Direction
Method or attribute name: CURSOR_UP = 1|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Direction
Method or attribute name: CURSOR_DOWN|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Direction
Method or attribute name: CURSOR_LEFT|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Direction
Method or attribute name: CURSOR_RIGHT|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Range|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Range
Method or attribute name: start: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Range
Method or attribute name: end: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Movement|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: Movement
Method or attribute name: direction: Direction;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: NONE = -1|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: TEXT = 0|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: MULTILINE|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: NUMBER|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: PHONE|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: DATETIME|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: EMAIL_ADDRESS|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: URL|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextInputType
Method or attribute name: VISIBLE_PASSWORD|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: UNSPECIFIED = 0|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: NONE|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: GO|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: SEARCH|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: SEND|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: NEXT|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: DONE|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: EnterKeyType
Method or attribute name: PREVIOUS|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: KeyboardStatus|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: KeyboardStatus
Method or attribute name: NONE = 0|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: KeyboardStatus
Method or attribute name: HIDE = 1|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: KeyboardStatus
Method or attribute name: SHOW = 2|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputAttribute|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputAttribute
Method or attribute name: textInputType: TextInputType;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputAttribute
Method or attribute name: enterKeyType: EnterKeyType;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: FunctionKey|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: FunctionKey
Method or attribute name: enterKeyType: EnterKeyType;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: CursorInfo|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: CursorInfo
Method or attribute name: left: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: CursorInfo
Method or attribute name: top: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: CursorInfo
Method or attribute name: width: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: CursorInfo
Method or attribute name: height: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextConfig|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: TextConfig
Method or attribute name: inputAttribute: InputAttribute;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: ExtendAction|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: ExtendAction
Method or attribute name: SELECT_ALL = 0|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: ExtendAction
Method or attribute name: CUT = 3|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: ExtendAction
Method or attribute name: COPY = 4|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: ExtendAction
Method or attribute name: PASTE = 5|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputWindowInfo|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputWindowInfo
Method or attribute name: name: string;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputWindowInfo
Method or attribute name: left: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputWindowInfo
Method or attribute name: top: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputWindowInfo
Method or attribute name: width: number;|@ohos.inputMethod.d.ts| +|Added|NA|Module name: ohos.inputMethod
Class name: InputWindowInfo
Method or attribute name: height: number;|@ohos.inputMethod.d.ts| +|Added|NA|Class name: InputMethodAbility
Method or attribute name: createPanel(ctx: BaseContext, info: PanelInfo, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Class name: InputMethodAbility
Method or attribute name: createPanel(ctx: BaseContext, info: PanelInfo): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Class name: InputMethodAbility
Method or attribute name: destroyPanel(panel: Panel, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Class name: InputMethodAbility
Method or attribute name: destroyPanel(panel: Panel): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: selectByRange(range: Range, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: selectByRange(range: Range): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: selectByMovement(movement: Movement, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: selectByMovement(movement: Movement): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: getTextIndexAtCursor(callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: getTextIndexAtCursor(): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: sendExtendAction(action: ExtendAction, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: InputClient
Method or attribute name: sendExtendAction(action: ExtendAction): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: setUiContent(path: string, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: setUiContent(path: string): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: setUiContent(path: string, storage: LocalStorage, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: setUiContent(path: string, storage: LocalStorage): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: resize(width: number, height: number, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: resize(width: number, height: number): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: moveTo(x: number, y: number, callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: moveTo(x: number, y: number): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: show(callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: show(): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: hide(callback: AsyncCallback\): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: hide(): Promise\;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: on(type: 'show' \| 'hide', callback: () => void): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: on(type: 'show' \| 'hide', callback: () => void): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: off(type: 'show' \| 'hide', callback?: () => void): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: off(type: 'show' \| 'hide', callback?: () => void): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Panel
Method or attribute name: changeFlag(flag: PanelFlag): void;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelFlag|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelFlag
Method or attribute name: FLG_FIXED = 0|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelFlag
Method or attribute name: FLG_FLOATING|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelType|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelType
Method or attribute name: SOFT_KEYBOARD = 0|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelType
Method or attribute name: STATUS_BAR|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelInfo|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelInfo
Method or attribute name: type: PanelType;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: PanelInfo
Method or attribute name: flag?: PanelFlag;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Direction|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Direction
Method or attribute name: CURSOR_UP = 1|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Direction
Method or attribute name: CURSOR_DOWN|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Direction
Method or attribute name: CURSOR_LEFT|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Direction
Method or attribute name: CURSOR_RIGHT|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Range|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Range
Method or attribute name: start: number;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Range
Method or attribute name: end: number;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Movement|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: Movement
Method or attribute name: direction: Direction;|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: ExtendAction|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: ExtendAction
Method or attribute name: SELECT_ALL = 0|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: ExtendAction
Method or attribute name: CUT = 3|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: ExtendAction
Method or attribute name: COPY = 4|@ohos.inputMethodEngine.d.ts| +|Added|NA|Module name: ohos.inputMethodEngine
Class name: ExtendAction
Method or attribute name: PASTE = 5|@ohos.inputMethodEngine.d.ts| +|Added|NA|Class name: InputMethodSubtype
Method or attribute name: readonly labelId?: number;|@ohos.InputMethodSubtype.d.ts| +|Added|NA|Class name: InputMethodSubtype
Method or attribute name: extra?: object;|@ohos.InputMethodSubtype.d.ts| +|Added|NA|Module name: ohos.wallpaper
Class name: WallpaperResourceType|@ohos.wallpaper.d.ts| +|Added|NA|Module name: ohos.wallpaper
Class name: WallpaperResourceType
Method or attribute name: DEFAULT|@ohos.wallpaper.d.ts| +|Added|NA|Module name: ohos.wallpaper
Class name: WallpaperResourceType
Method or attribute name: PICTURE|@ohos.wallpaper.d.ts| +|Added|NA|Module name: ohos.wallpaper
Class name: WallpaperResourceType
Method or attribute name: VIDEO|@ohos.wallpaper.d.ts| +|Added|NA|Module name: ohos.wallpaper
Class name: WallpaperResourceType
Method or attribute name: PACKAGE|@ohos.wallpaper.d.ts| +|Added|NA|Class name: wallpaper
Method or attribute name: function setVideo(source: string, wallpaperType: WallpaperType, callback: AsyncCallback\): void;|@ohos.wallpaper.d.ts| +|Added|NA|Class name: wallpaper
Method or attribute name: function setVideo(source: string, wallpaperType: WallpaperType): Promise\;|@ohos.wallpaper.d.ts| +|Added|NA|Class name: wallpaper
Method or attribute name: function on(

type: 'wallpaperChange',

callback: (wallpaperType: WallpaperType, resourceType: WallpaperResourceType) => void

): void;|@ohos.wallpaper.d.ts| +|Added|NA|Class name: wallpaper
Method or attribute name: function off(

type: 'wallpaperChange',

callback?: (wallpaperType: WallpaperType, resourceType: WallpaperResourceType) => void

): void;|@ohos.wallpaper.d.ts| +|Initial version changed|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback\): void;
Initial version: 9|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback\): void;
Initial version: 10|@ohos.inputMethod.d.ts| +|Initial version changed|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise\;
Initial version: 9|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise\;
Initial version: 10|@ohos.inputMethod.d.ts| +|Initial version changed|Class name: request
Initial version: N/A|Class name: request
Initial version: 6|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const NETWORK_MOBILE: number;
Initial version: 6|Class name: request
Method or attribute name: const NETWORK_MOBILE: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const NETWORK_WIFI: number;
Initial version: 6|Class name: request
Method or attribute name: const NETWORK_WIFI: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_CANNOT_RESUME: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_CANNOT_RESUME: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_DEVICE_NOT_FOUND: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_DEVICE_NOT_FOUND: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_FILE_ALREADY_EXISTS: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_FILE_ALREADY_EXISTS: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_FILE_ERROR: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_FILE_ERROR: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_HTTP_DATA_ERROR: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_HTTP_DATA_ERROR: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_INSUFFICIENT_SPACE: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_INSUFFICIENT_SPACE: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_TOO_MANY_REDIRECTS: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_TOO_MANY_REDIRECTS: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_UNHANDLED_HTTP_CODE: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_UNHANDLED_HTTP_CODE: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_UNKNOWN: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_UNKNOWN: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_OFFLINE: number;
Initial version: 9|Class name: request
Method or attribute name: const ERROR_OFFLINE: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const ERROR_UNSUPPORTED_NETWORK_TYPE: number;
Initial version: 9|Class name: request
Method or attribute name: const ERROR_UNSUPPORTED_NETWORK_TYPE: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const PAUSED_QUEUED_FOR_WIFI: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_QUEUED_FOR_WIFI: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const PAUSED_WAITING_FOR_NETWORK: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_WAITING_FOR_NETWORK: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const PAUSED_WAITING_TO_RETRY: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_WAITING_TO_RETRY: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const PAUSED_BY_USER: number;
Initial version: 9|Class name: request
Method or attribute name: const PAUSED_BY_USER: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const PAUSED_UNKNOWN: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_UNKNOWN: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const SESSION_SUCCESSFUL: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_SUCCESSFUL: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const SESSION_RUNNING: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_RUNNING: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const SESSION_PENDING: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_PENDING: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const SESSION_PAUSED: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_PAUSED: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: const SESSION_FAILED: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_FAILED: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void;
Initial version: 9|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig): Promise\;
Initial version: 9|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void;
Initial version: 9|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig): Promise\;
Initial version: 9|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Initial version: 6|Class name: DownloadConfig
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: url: string;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: url: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: header?: Object;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: header?: Object;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: enableMetered?: boolean;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: enableMetered?: boolean;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: enableRoaming?: boolean;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: enableRoaming?: boolean;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: description?: string;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: description?: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: networkType?: number;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: networkType?: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: filePath?: string;
Initial version: 7|Class name: DownloadConfig
Method or attribute name: filePath?: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: title?: string;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: title?: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Initial version: 9|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Initial version: 7|Class name: DownloadInfo
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: description: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: description: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadedBytes: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadedBytes: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadId: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadId: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: failedReason: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: failedReason: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: fileName: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: fileName: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: filePath: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: filePath: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: pausedReason: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: pausedReason: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: status: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: status: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: targetURI: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: targetURI: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadTitle: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadTitle: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadTotalBytes: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadTotalBytes: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Initial version: 6|Class name: DownloadTask
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'progress', callback: (receivedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: DownloadTask
Method or attribute name: on(type: 'progress', callback: (receivedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: DownloadTask
Method or attribute name: off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: off(type: 'complete' \| 'pause' \| 'remove', callback?: () => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: off(type: 'complete' \| 'pause' \| 'remove', callback?: () => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'fail', callback: (err: number) => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: on(type: 'fail', callback: (err: number) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: off(type: 'fail', callback?: (err: number) => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: off(type: 'fail', callback?: (err: number) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: delete(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: delete(): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: suspend(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: suspend(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: suspend(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: suspend(): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: restore(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: restore(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: restore(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: restore(): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskInfo(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskInfo(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskInfo(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskInfo(): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskMimeType(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskMimeType(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskMimeType(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskMimeType(): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: File
Initial version: 6|Class name: File
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: File
Method or attribute name: filename: string;
Initial version: 6|Class name: File
Method or attribute name: filename: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: File
Method or attribute name: name: string;
Initial version: 6|Class name: File
Method or attribute name: name: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: File
Method or attribute name: uri: string;
Initial version: 6|Class name: File
Method or attribute name: uri: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: File
Method or attribute name: type: string;
Initial version: 6|Class name: File
Method or attribute name: type: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: RequestData
Initial version: 6|Class name: RequestData
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: RequestData
Method or attribute name: name: string;
Initial version: 6|Class name: RequestData
Method or attribute name: name: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: RequestData
Method or attribute name: value: string;
Initial version: 6|Class name: RequestData
Method or attribute name: value: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadConfig
Initial version: 6|Class name: UploadConfig
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadConfig
Method or attribute name: url: string;
Initial version: 6|Class name: UploadConfig
Method or attribute name: url: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadConfig
Method or attribute name: header: Object;
Initial version: 6|Class name: UploadConfig
Method or attribute name: header: Object;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadConfig
Method or attribute name: method: string;
Initial version: 6|Class name: UploadConfig
Method or attribute name: method: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadConfig
Method or attribute name: files: Array\;
Initial version: 6|Class name: UploadConfig
Method or attribute name: files: Array\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadConfig
Method or attribute name: data: Array\;
Initial version: 6|Class name: UploadConfig
Method or attribute name: data: Array\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: TaskState
Initial version: 9|Class name: TaskState
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: TaskState
Method or attribute name: path: string;
Initial version: 9|Class name: TaskState
Method or attribute name: path: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: TaskState
Method or attribute name: responseCode: number;
Initial version: 9|Class name: TaskState
Method or attribute name: responseCode: number;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: TaskState
Method or attribute name: message: string;
Initial version: 9|Class name: TaskState
Method or attribute name: message: string;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadTask
Initial version: 6|Class name: UploadTask
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadTask
Method or attribute name: on(type: 'progress', callback: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: UploadTask
Method or attribute name: on(type: 'progress', callback: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadTask
Method or attribute name: off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: UploadTask
Method or attribute name: off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadTask
Method or attribute name: on(type: 'headerReceive', callback: (header: object) => void): void;
Initial version: 7|Class name: UploadTask
Method or attribute name: on(type: 'headerReceive', callback: (header: object) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadTask
Method or attribute name: off(type: 'headerReceive', callback?: (header: object) => void): void;
Initial version: 7|Class name: UploadTask
Method or attribute name: off(type: 'headerReceive', callback?: (header: object) => void): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 9|Class name: UploadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadTask
Method or attribute name: delete(): Promise\;
Initial version: 9|Class name: UploadTask
Method or attribute name: delete(): Promise\;
Initial version: 10|@ohos.request.d.ts| +|Initial version changed|Class name: UploadResponse
Initial version: N/A|Class name: UploadResponse
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: DownloadResponse
Initial version: N/A|Class name: DownloadResponse
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: OnDownloadCompleteResponse
Initial version: N/A|Class name: OnDownloadCompleteResponse
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: RequestFile
Initial version: N/A|Class name: RequestFile
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: RequestData
Initial version: N/A|Class name: RequestData
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: UploadRequestOptions
Initial version: N/A|Class name: UploadRequestOptions
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: DownloadRequestOptions
Initial version: N/A|Class name: DownloadRequestOptions
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: OnDownloadCompleteOptions
Initial version: N/A|Class name: OnDownloadCompleteOptions
Initial version: 3|@system.request.d.ts| +|Initial version changed|Class name: Request
Initial version: N/A|Class name: Request
Initial version: 3|@system.request.d.ts| +|Permission added|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Permission: N/A|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| +|Permission added|Class name: screenLock
Method or attribute name: function lock(callback: AsyncCallback\): void;
Permission: N/A|Class name: screenLock
Method or attribute name: function lock(callback: AsyncCallback\): void;
Permission: ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| +|Permission added|Class name: screenLock
Method or attribute name: function onSystemEvent(callback: Callback\): boolean;
Permission: N/A|Class name: screenLock
Method or attribute name: function onSystemEvent(callback: Callback\): boolean;
Permission: ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| +|Permission added|Class name: screenLock
Method or attribute name: function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback\): void;
Permission: N/A|Class name: screenLock
Method or attribute name: function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback\): void;
Permission: ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| +|Permission added|Class name: screenLock
Method or attribute name: function sendScreenLockEvent(event: String, parameter: number): Promise\;
Permission: N/A|Class name: screenLock
Method or attribute name: function sendScreenLockEvent(event: String, parameter: number): Promise\;
Permission: ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-msdp.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-msdp.md new file mode 100644 index 0000000000000000000000000000000000000000..bd3a69ae9ec5e6e0e776bd9799f6bbb6e6dce292 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-msdp.md @@ -0,0 +1,23 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.cooperate
Class name: cooperate|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg
Method or attribute name: COOPERATE_PREPARE|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg
Method or attribute name: COOPERATE_UNPREPARE|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg
Method or attribute name: COOPERATE_ACTIVATE|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg
Method or attribute name: COOPERATE_ACTIVATE_SUCCESS|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg
Method or attribute name: COOPERATE_ACTIVATE_FAIL|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg
Method or attribute name: COOPERATE_DEACTIVATE_SUCCESS|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: CooperateMsg
Method or attribute name: COOPERATE_DEACTIVATE_FAIL|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function prepare(callback: AsyncCallback\): void;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function prepare(): Promise\;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function unprepare(callback: AsyncCallback\): void;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function unprepare(): Promise\;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function activate(targetNetworkId: string, inputDeviceId: number, callback: AsyncCallback\): void;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function activate(targetNetworkId: string, inputDeviceId: number): Promise\;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function deactivate(isUnchained: boolean, callback: AsyncCallback\): void;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function deactivate(isUnchained: boolean): Promise\;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function getCrossingSwitchState(networkId: string, callback: AsyncCallback\): void;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function getCrossingSwitchState(networkId: string): Promise\;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function on(type: 'cooperate', callback: Callback\<{ networkId: string, msg: CooperateMsg }>): void;|@ohos.cooperate.d.ts| +|Added|NA|Module name: ohos.cooperate
Class name: cooperate
Method or attribute name: function off(type: 'cooperate', callback?: Callback\): void;|@ohos.cooperate.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md new file mode 100644 index 0000000000000000000000000000000000000000..1eadca1eaec0dc0e7e6ba10b2291c0e9b230d389 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md @@ -0,0 +1,30 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: AxisType
Method or attribute name: type AxisType =

'touchmajor'

\| 'touchminor'

\| 'orientation'

\| 'x'

\| 'y'

\| 'pressure'

\| 'toolminor'

\| 'toolmajor'

\| 'null';|@ohos.multimodalInput.inputDevice.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: PrimaryButton|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Class name: PrimaryButton
Method or attribute name: |@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: PrimaryButton
Method or attribute name: LEFT = 0|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: PrimaryButton
Method or attribute name: RIGHT = 1|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function setMousePrimaryButton(primary: PrimaryButton, callback: AsyncCallback\): void;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function setMousePrimaryButton(primary: PrimaryButton): Promise\;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function getMousePrimaryButton(callback: AsyncCallback\): void;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function getMousePrimaryButton(): Promise\;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function setHoverScrollState(state: boolean, callback: AsyncCallback\): void;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function setHoverScrollState(state: boolean): Promise\;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function getHoverScrollState(callback: AsyncCallback\): void;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function getHoverScrollState(): Promise\;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function setMouseScrollRows(rows: number, callback: AsyncCallback\): void;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function setMouseScrollRows(rows: number): Promise\;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function getMouseScrollRows(callback: AsyncCallback\): void;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.pointer
Class name: pointer
Method or attribute name: function getMouseScrollRows(): Promise\;|@ohos.multimodalInput.pointer.d.ts| +|Added|NA|Module name: ohos.multimodalInput.shortKey
Class name: shortKey|@ohos.multimodalInput.shortKey.d.ts| +|Added|NA|Module name: ohos.multimodalInput.shortKey
Class name: shortKey
Method or attribute name: function setKeyDownDuration(businessKey: string, delay: number, callback: AsyncCallback\): void;|@ohos.multimodalInput.shortKey.d.ts| +|Added|NA|Module name: ohos.multimodalInput.shortKey
Class name: shortKey
Method or attribute name: function setKeyDownDuration(businessKey: string, delay: number): Promise\;|@ohos.multimodalInput.shortKey.d.ts| +|Deleted|Module name: ohos.multimodalInput.inputDevice
Class name: AxisType
Method or attribute name: type AxisType = 'touchMajor' \| 'touchMinor' \| 'orientation' \| 'x' \| 'y' \| 'pressure' \| 'toolMinor' \| 'toolMajor' \| 'NULL';|NA|@ohos.multimodalInput.inputDevice.d.ts| +|Initial version changed|Class name: KeyOptions
Initial version: N/A|Class name: KeyOptions
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| +|Initial version changed|Class name: KeyOptions
Method or attribute name: preKeys: Array\;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: preKeys: Array\;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| +|Initial version changed|Class name: KeyOptions
Method or attribute name: finalKey: number;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: finalKey: number;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| +|Initial version changed|Class name: KeyOptions
Method or attribute name: isFinalKeyDown: boolean;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: isFinalKeyDown: boolean;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| +|Initial version changed|Class name: KeyOptions
Method or attribute name: finalKeyDownDuration: number;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: finalKeyDownDuration: number;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| +|Permission added|Class name: TouchEventReceiver
Permission: N/A|Class name: TouchEventReceiver
Permission: ohos.permission.INPUT_MONITORING|@ohos.multimodalInput.inputMonitor.d.ts| +|SysCap changed|Class name: inputDeviceCooperate
SysCap:N/A|Class name: inputDeviceCooperate
SysCap:SystemCapability.MultimodalInput.Input.Cooperator|@ohos.multimodalInput.inputDeviceCooperate.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..1754623d3d8b252f0f98e706dfb3f97458c3fd02 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md @@ -0,0 +1,336 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.effectKit
Class name: ColorPicker
Method or attribute name: getLargestProportionColor(): Color;|@ohos.effectKit.d.ts| +|Added|NA|Class name: ColorPicker
Method or attribute name: getLargestProportionColor(): Color;|@ohos.effectKit.d.ts| +|Added|NA|Module name: ohos.effectKit
Class name: ColorPicker
Method or attribute name: getHighestSaturationColor(): Color;|@ohos.effectKit.d.ts| +|Added|NA|Class name: ColorPicker
Method or attribute name: getHighestSaturationColor(): Color;|@ohos.effectKit.d.ts| +|Added|NA|Module name: ohos.effectKit
Class name: ColorPicker
Method or attribute name: getAverageColor(): Color;|@ohos.effectKit.d.ts| +|Added|NA|Class name: ColorPicker
Method or attribute name: getAverageColor(): Color;|@ohos.effectKit.d.ts| +|Added|NA|Module name: ohos.effectKit
Class name: ColorPicker
Method or attribute name: isBlackOrWhiteOrGrayColor(color: number): boolean;|@ohos.effectKit.d.ts| +|Added|NA|Class name: ColorPicker
Method or attribute name: isBlackOrWhiteOrGrayColor(color: number): boolean;|@ohos.effectKit.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioVolumeType
Method or attribute name: ALARM = 4|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioVolumeType
Method or attribute name: ACCESSIBILITY = 5|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioVolumeType
Method or attribute name: ULTRASONIC = 10|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: ContentType
Method or attribute name: CONTENT_TYPE_ULTRASONIC = 9|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: StreamUsage
Method or attribute name: STREAM_USAGE_ALARM = 4|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: StreamUsage
Method or attribute name: STREAM_USAGE_ACCESSIBILITY = 8|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: StreamUsage
Method or attribute name: STREAM_USAGE_SYSTEM = 9|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: AudioRendererFilter
Method or attribute name: uid?: number;|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioRoutingManager
Method or attribute name: getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: AudioRoutingManager
Method or attribute name: getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioRoutingManager
Method or attribute name: getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise\;|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: AudioRoutingManager
Method or attribute name: getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise\;|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioRoutingManager
Method or attribute name: on(type: 'preferOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, callback: Callback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: AudioRoutingManager
Method or attribute name: on(type: 'preferOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, callback: Callback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioRoutingManager
Method or attribute name: off(type: 'preferOutputDeviceChangeForRendererInfo', callback?: Callback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: AudioRoutingManager
Method or attribute name: off(type: 'preferOutputDeviceChangeForRendererInfo', callback?: Callback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioDeviceDescriptor
Method or attribute name: readonly displayName: string;|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: AudioDeviceDescriptor
Method or attribute name: readonly displayName: string;|@ohos.multimedia.audio.d.ts| +|Added|NA|Module name: ohos.multimedia.audio
Class name: AudioCapturer
Method or attribute name: on(type: 'audioInterrupt', callback: Callback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: AudioCapturer
Method or attribute name: on(type: 'audioInterrupt', callback: Callback\): void;|@ohos.multimedia.audio.d.ts| +|Added|NA|Class name: avSession
Method or attribute name: function getHistoricalSessionDescriptors(maxSize: number, callback: AsyncCallback\>>): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: avSession
Method or attribute name: function getHistoricalSessionDescriptors(maxSize?: number): Promise\>>;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: dispatchSessionEvent(event: string, args: { [key: string]: Object }, callback: AsyncCallback\): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: dispatchSessionEvent(event: string, args: { [key: string]: Object }): Promise\;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: setAVQueueItems(items: Array\, callback: AsyncCallback\): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: setAVQueueItems(items: Array\): Promise\;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: setAVQueueTitle(title: string, callback: AsyncCallback\): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: setAVQueueTitle(title: string): Promise\;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: setExtras(extras: {[key: string]: Object}, callback: AsyncCallback\): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: setExtras(extras: {[key: string]: Object}): Promise\;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: on(type: 'commonCommand', callback: (command: string, args: { [key: string]: Object }) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: off(type: 'commonCommand', callback?: (command: string, args: { [key: string]: Object }) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: on(type: 'skipToQueueItem', callback: (itemId: number) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSession
Method or attribute name: off(type: 'skipToQueueItem', callback?: (itemId: number) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: mediaId: string;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: title?: string;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: subtitle?: string;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: description?: string;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: icon?: image.PixelMap \| string;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: iconUri?: string;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: extras?: { [key: string]: Object };|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVMediaDescription
Method or attribute name: mediaUri?: string;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVQueueItem|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVQueueItem
Method or attribute name: itemId: number;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Module name: ohos.multimedia.avsession
Class name: AVQueueItem
Method or attribute name: description?: AVMediaDescription;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVPlaybackState
Method or attribute name: activeItemId?: number;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVPlaybackState
Method or attribute name: extras?: {[key: string]: Object};|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: getAVQueueTitle(callback: AsyncCallback\): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: getAVQueueTitle(): Promise\;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: getAVQueueItems(callback: AsyncCallback\>): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: getAVQueueItems(): Promise\>;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: skipToQueueItem(itemId: number, callback: AsyncCallback\): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: skipToQueueItem(itemId: number): Promise\;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: sendCommonCommand(command: string, args: { [key: string]: Object }, callback: AsyncCallback\): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: sendCommonCommand(command: string, args: { [key: string]: Object }): Promise\;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: getExtras(callback: AsyncCallback\<{[key: string]: Object}>): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: getExtras(): Promise\<{[key: string]: Object}>;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: on(type: 'sessionEvent', callback: (sessionEvent: string, args: { [key: string]: Object }) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: off(type: 'sessionEvent', callback?: (sessionEvent: string, args: { [key: string]: Object }) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: on(type: 'queueItemsChange', callback: (items: Array\) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: off(type: 'queueItemsChange', callback?: (items: Array\) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: on(type: 'queueTitleChange', callback: (title: string) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: off(type: 'queueTitleChange', callback?: (title: string) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: on(type: 'extrasChange', callback: (extras: {[key: string]: Object}) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: AVSessionController
Method or attribute name: off(type: 'extrasChange', callback?: (extras: {[key: string]: Object}) => void): void;|@ohos.multimedia.avsession.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: BITS_PER_SAMPLE = 'BitsPerSample'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: ORIENTATION = 'Orientation'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: IMAGE_LENGTH = 'ImageLength'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: IMAGE_WIDTH = 'ImageWidth'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: GPS_LATITUDE = 'GPSLatitude'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: GPS_LONGITUDE = 'GPSLongitude'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: GPS_LATITUDE_REF = 'GPSLatitudeRef'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: GPS_LONGITUDE_REF = 'GPSLongitudeRef'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: DATE_TIME_ORIGINAL = 'DateTimeOriginal'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: EXPOSURE_TIME = 'ExposureTime'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: SCENE_TYPE = 'SceneType'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: ISO_SPEED_RATINGS = 'ISOSpeedRatings'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: PropertyKey
Method or attribute name: F_NUMBER = 'FNumber'|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: ImageSource
Method or attribute name: createPixelMapList(options?: DecodingOptions): Promise\>;|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: ImageSource
Method or attribute name: createPixelMapList(callback: AsyncCallback\>): void;|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: ImageSource
Method or attribute name: createPixelMapList(options: DecodingOptions, callback: AsyncCallback\>): void;|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: ImageSource
Method or attribute name: getDelayTime(): Promise\>;|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: ImageSource
Method or attribute name: getDelayTime(callback: AsyncCallback\>): void;|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: ImageSource
Method or attribute name: getFrameCount(): Promise\;|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: ImageSource
Method or attribute name: getFrameCount(callback: AsyncCallback\): void;|@ohos.multimedia.image.d.ts| +|Added|NA|Class name: AVPlayer
Method or attribute name: dataSrc?: AVDataSrcDescriptor;|@ohos.multimedia.media.d.ts| +|Added|NA|Class name: AVPlayer
Method or attribute name: audioRendererInfo?: audio.AudioRendererInfo;|@ohos.multimedia.media.d.ts| +|Added|NA|Module name: ohos.multimedia.media
Class name: AVDataSrcDescriptor|@ohos.multimedia.media.d.ts| +|Added|NA|Module name: ohos.multimedia.media
Class name: AVDataSrcDescriptor
Method or attribute name: fileSize: number;|@ohos.multimedia.media.d.ts| +|Added|NA|Module name: ohos.multimedia.media
Class name: AVDataSrcDescriptor
Method or attribute name: callback: (buffer: ArrayBuffer, length: number, pos?: number) => number;|@ohos.multimedia.media.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: systemSoundManager|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: RingtoneType|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: RingtoneType
Method or attribute name: RINGTONE_TYPE_DEFAULT = 0|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: RingtoneType
Method or attribute name: RINGTONE_TYPE_MULTISIM = 1|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: systemSoundManager
Method or attribute name: function getSystemSoundManager(): SystemSoundManager;|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: SystemSoundManager|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: SystemSoundManager
Method or attribute name: setSystemRingtoneUri(context: Context, uri: string, type: RingtoneType, callback: AsyncCallback\): void;|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: SystemSoundManager
Method or attribute name: setSystemRingtoneUri(context: Context, uri: string, type: RingtoneType): Promise\;|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: SystemSoundManager
Method or attribute name: getSystemRingtoneUri(context: Context, type: RingtoneType, callback: AsyncCallback\): void;|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: SystemSoundManager
Method or attribute name: getSystemRingtoneUri(context: Context, type: RingtoneType): Promise\;|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: SystemSoundManager
Method or attribute name: getSystemRingtonePlayer(context: Context, type: RingtoneType, callback: AsyncCallback\): void;|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ohos.multimedia.systemSoundManager
Class name: SystemSoundManager
Method or attribute name: getSystemRingtonePlayer(context: Context, type: RingtoneType): Promise\;|@ohos.multimedia.systemSoundManager.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtoneOptions|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtoneOptions
Method or attribute name: volume: number;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtoneOptions
Method or attribute name: loop: boolean;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: readonly state: media.AVPlayerState;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: getTitle(callback: AsyncCallback\): void;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: getTitle(): Promise\;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: getAudioRendererInfo(callback: AsyncCallback\): void;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: getAudioRendererInfo(): Promise\;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: configure(options: RingtoneOptions, callback: AsyncCallback\): void;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: configure(options: RingtoneOptions): Promise\;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: start(callback: AsyncCallback\): void;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: start(): Promise\;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: stop(callback: AsyncCallback\): void;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: stop(): Promise\;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: release(callback: AsyncCallback\): void;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: release(): Promise\;|ringtonePlayer.d.ts| +|Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: on(type: 'audioInterrupt', callback: Callback\): void;|ringtonePlayer.d.ts| +|Access level changed|Class name: VolumeEvent
Access level: public API|Class name: VolumeEvent
Access level: system API|@ohos.multimedia.audio.d.ts| +|Access level changed|Class name: VolumeEvent
Method or attribute name: volumeGroupId: number;
Access level: system API|Class name: VolumeEvent
Method or attribute name: volumeGroupId: number;
Access level: public API|@ohos.multimedia.audio.d.ts| +|Access level changed|Class name: VolumeEvent
Method or attribute name: networkId: string;
Access level: system API|Class name: VolumeEvent
Method or attribute name: networkId: string;
Access level: public API|@ohos.multimedia.audio.d.ts| +|Access level changed|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Access level: system API|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Access level: system API|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Access level: system API|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Access level: system API|Class name: AVSession
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: readonly sessionId: string;
Access level: system API|Class name: AVSession
Method or attribute name: readonly sessionId: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: getController(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: getController(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: getController(): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: getController(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: getOutputDevice(): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: getOutputDevice(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: on(type: 'seek', callback: (time: number) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: on(type: 'seek', callback: (time: number) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: on(type: 'setSpeed', callback: (speed: number) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: on(type: 'setSpeed', callback: (speed: number) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: off(type: 'setSpeed', callback?: (speed: number) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: off(type: 'setSpeed', callback?: (speed: number) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Access level: system API|Class name: AVSession
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: activate(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: activate(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: activate(): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: activate(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: deactivate(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: deactivate(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: deactivate(): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: deactivate(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Access level: system API|Class name: AVMetadata
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVPlaybackState
Access level: system API|Class name: AVPlaybackState
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackPosition
Access level: system API|Class name: PlaybackPosition
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: OutputDeviceInfo
Access level: system API|Class name: OutputDeviceInfo
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: LoopMode
Access level: system API|Class name: LoopMode
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Access level: system API|Class name: PlaybackState
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Access level: system API|Class name: AVSessionController
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Access level: system API|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getAVMetadata(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: getAVMetadata(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getAVMetadata(): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: getAVMetadata(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getOutputDevice(): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: getOutputDevice(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getLaunchAbility(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: getLaunchAbility(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getLaunchAbility(): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: getLaunchAbility(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getRealPlaybackPositionSync(): number;
Access level: system API|Class name: AVSessionController
Method or attribute name: getRealPlaybackPositionSync(): number;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: isActive(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: isActive(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: isActive(): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: isActive(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: destroy(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: destroy(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: destroy(): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: destroy(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getValidCommands(callback: AsyncCallback\>): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: getValidCommands(callback: AsyncCallback\>): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: getValidCommands(): Promise\>;
Access level: system API|Class name: AVSessionController
Method or attribute name: getValidCommands(): Promise\>;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand): Promise\;
Access level: system API|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: on(type: 'sessionDestroy', callback: () => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: on(type: 'sessionDestroy', callback: () => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: off(type: 'sessionDestroy', callback?: () => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: off(type: 'sessionDestroy', callback?: () => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: on(type: 'activeStateChange', callback: (isActive: boolean) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: on(type: 'activeStateChange', callback: (isActive: boolean) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: on(type: 'validCommandChange', callback: (commands: Array\) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: on(type: 'validCommandChange', callback: (commands: Array\) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: off(type: 'validCommandChange', callback?: (commands: Array\) => void);
Access level: system API|Class name: AVSessionController
Method or attribute name: off(type: 'validCommandChange', callback?: (commands: Array\) => void);
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVControlCommand
Access level: system API|Class name: AVControlCommand
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionErrorCode
Access level: system API|Class name: AVSessionErrorCode
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AudioManager
Method or attribute name: on(type: 'volumeChange', callback: Callback\): void;
Initial version: 9|Class name: AudioManager
Method or attribute name: on(type: 'volumeChange', callback: Callback\): void;
Initial version: 8|@ohos.multimedia.audio.d.ts| +|Initial version changed|Class name: VolumeEvent
Initial version: 9|Class name: VolumeEvent
Initial version: 8|@ohos.multimedia.audio.d.ts| +|Initial version changed|Class name: VolumeEvent
Method or attribute name: volumeType: AudioVolumeType;
Initial version: 9|Class name: VolumeEvent
Method or attribute name: volumeType: AudioVolumeType;
Initial version: 8|@ohos.multimedia.audio.d.ts| +|Initial version changed|Class name: VolumeEvent
Method or attribute name: volume: number;
Initial version: 9|Class name: VolumeEvent
Method or attribute name: volume: number;
Initial version: 8|@ohos.multimedia.audio.d.ts| +|Initial version changed|Class name: VolumeEvent
Method or attribute name: updateUi: boolean;
Initial version: 9|Class name: VolumeEvent
Method or attribute name: updateUi: boolean;
Initial version: 8|@ohos.multimedia.audio.d.ts| +|Initial version changed|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Initial version: 9|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Initial version: 9|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Initial version: 9|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Initial version: 9|Class name: AVSession
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: readonly sessionId: string;
Initial version: 9|Class name: AVSession
Method or attribute name: readonly sessionId: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: getController(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: getController(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: getController(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: getController(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'seek', callback: (time: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'seek', callback: (time: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'seek', callback?: (time: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'seek', callback?: (time: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'setSpeed', callback: (speed: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'setSpeed', callback: (speed: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'setSpeed', callback?: (speed: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'setSpeed', callback?: (speed: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: activate(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: activate(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: activate(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: activate(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: deactivate(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: deactivate(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: deactivate(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: deactivate(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Initial version: 9|Class name: AVMetadata
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: assetId: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: assetId: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: title?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: title?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: artist?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: artist?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: author?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: author?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: album?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: album?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: writer?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: writer?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: composer?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: composer?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: duration?: number;
Initial version: 9|Class name: AVMetadata
Method or attribute name: duration?: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: mediaImage?: image.PixelMap \| string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: mediaImage?: image.PixelMap \| string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: publishDate?: Date;
Initial version: 9|Class name: AVMetadata
Method or attribute name: publishDate?: Date;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: subtitle?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: subtitle?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: description?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: description?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: lyric?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: lyric?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: previousAssetId?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: previousAssetId?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVMetadata
Method or attribute name: nextAssetId?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: nextAssetId?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVPlaybackState
Initial version: 9|Class name: AVPlaybackState
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVPlaybackState
Method or attribute name: state?: PlaybackState;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: state?: PlaybackState;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVPlaybackState
Method or attribute name: speed?: number;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: speed?: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVPlaybackState
Method or attribute name: position?: PlaybackPosition;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: position?: PlaybackPosition;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVPlaybackState
Method or attribute name: bufferedTime?: number;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: bufferedTime?: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVPlaybackState
Method or attribute name: loopMode?: LoopMode;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: loopMode?: LoopMode;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVPlaybackState
Method or attribute name: isFavorite?: boolean;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: isFavorite?: boolean;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackPosition
Initial version: 9|Class name: PlaybackPosition
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackPosition
Method or attribute name: elapsedTime: number;
Initial version: 9|Class name: PlaybackPosition
Method or attribute name: elapsedTime: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackPosition
Method or attribute name: updateTime: number;
Initial version: 9|Class name: PlaybackPosition
Method or attribute name: updateTime: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: OutputDeviceInfo
Initial version: 9|Class name: OutputDeviceInfo
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: OutputDeviceInfo
Method or attribute name: isRemote: boolean;
Initial version: 9|Class name: OutputDeviceInfo
Method or attribute name: isRemote: boolean;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: OutputDeviceInfo
Method or attribute name: audioDeviceId: Array\;
Initial version: 9|Class name: OutputDeviceInfo
Method or attribute name: audioDeviceId: Array\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: OutputDeviceInfo
Method or attribute name: deviceName: Array\;
Initial version: 9|Class name: OutputDeviceInfo
Method or attribute name: deviceName: Array\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: LoopMode
Initial version: 9|Class name: LoopMode
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SEQUENCE = 0
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_SEQUENCE = 0
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SINGLE = 1
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_SINGLE = 1
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_LIST = 2
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_LIST = 2
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SHUFFLE = 3
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_SHUFFLE = 3
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Initial version: 9|Class name: PlaybackState
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_INITIAL = 0
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_INITIAL = 0
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PREPARE = 1
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PREPARE = 1
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PLAY = 2
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PLAY = 2
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PAUSE = 3
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PAUSE = 3
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_FAST_FORWARD = 4
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_FAST_FORWARD = 4
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_REWIND = 5
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_REWIND = 5
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_STOP = 6
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_STOP = 6
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Initial version: 9|Class name: AVSessionController
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Initial version: 9|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVMetadata(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVMetadata(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVMetadata(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVMetadata(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getLaunchAbility(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getLaunchAbility(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getLaunchAbility(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getLaunchAbility(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getRealPlaybackPositionSync(): number;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getRealPlaybackPositionSync(): number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: isActive(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: isActive(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: isActive(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: isActive(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: destroy(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: destroy(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getValidCommands(callback: AsyncCallback\>): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getValidCommands(callback: AsyncCallback\>): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: getValidCommands(): Promise\>;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getValidCommands(): Promise\>;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'sessionDestroy', callback: () => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'sessionDestroy', callback: () => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'sessionDestroy', callback?: () => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'sessionDestroy', callback?: () => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'activeStateChange', callback: (isActive: boolean) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'activeStateChange', callback: (isActive: boolean) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'validCommandChange', callback: (commands: Array\) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'validCommandChange', callback: (commands: Array\) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'validCommandChange', callback?: (commands: Array\) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'validCommandChange', callback?: (commands: Array\) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVControlCommand
Initial version: 9|Class name: AVControlCommand
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVControlCommand
Method or attribute name: command: AVControlCommandType;
Initial version: 9|Class name: AVControlCommand
Method or attribute name: command: AVControlCommandType;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVControlCommand
Method or attribute name: parameter?: LoopMode \| string \| number;
Initial version: 9|Class name: AVControlCommand
Method or attribute name: parameter?: LoopMode \| string \| number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Initial version: 9|Class name: AVSessionErrorCode
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SERVICE_EXCEPTION = 6600101
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SERVICE_EXCEPTION = 6600101
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_COMMAND_INVALID = 6600105
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_COMMAND_INVALID = 6600105
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_INACTIVE = 6600106
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_INACTIVE = 6600106
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_MESSAGE_OVERLOAD = 6600107
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_MESSAGE_OVERLOAD = 6600107
Initial version: 10|@ohos.multimedia.avsession.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-notification.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-notification.md new file mode 100644 index 0000000000000000000000000000000000000000..846257aced18aa319ef311c1fcd92170d2bb6e62 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-notification.md @@ -0,0 +1,56 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: commonEventManager
Method or attribute name: function removeStickyCommonEvent(event: string, callback: AsyncCallback\): void;|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: commonEventManager
Method or attribute name: function removeStickyCommonEvent(event: string): Promise\;|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: commonEventManager
Method or attribute name: function setStaticSubscriberState(enable: boolean, callback: AsyncCallback\): void;|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: commonEventManager
Method or attribute name: function setStaticSubscriberState(enable: boolean): Promise\;|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_CHARGE_TYPE_CHANGED = "usual.event.CHARGE_TYPE_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED = "usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_QUICK_FIX_REVOKE_RESULT = "usual.event.QUICK_FIX_REVOKE_RESULT"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_HTTP_PROXY_CHANGE = "usual.event.HTTP_PROXY_CHANGE"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SIM_STATE_CHANGED = "usual.event.SIM_STATE_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SMS_RECEIVE_COMPLETED = "usual.event.SMS_RECEIVE_COMPLETED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED = "usual.event.SMS_EMERGENCY_CB_RECEIVE_COMPLETED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED = "usual.event.SMS_CB_RECEIVE_COMPLETED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_STK_COMMAND = "usual.event.STK_COMMAND"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_STK_SESSION_END = "usual.event.STK_SESSION_END"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_STK_CARD_STATE_CHANGED = "usual.event.STK_CARD_STATE_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_STK_ALPHA_IDENTIFIER = "usual.event.STK_ALPHA_IDENTIFIER"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED = "usual.event.SMS_WAPPUSH_RECEIVE_COMPLETED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_OPERATOR_CONFIG_CHANGED = "usual.event.OPERATOR_CONFIG_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED = "usual.event.SIM.DEFAULT_SMS_SUBSCRIPTION_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED = "usual.event.SIM.DEFAULT_DATA_SUBSCRIPTION_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED = "usual.event.SIM.DEFAULT_MAIN_SUBSCRIPTION_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED = "usual.event.SIM.DEFAULT_VOICE_SUBSCRIPTION_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_CALL_STATE_CHANGED = "usual.event.CALL_STATE_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED = "usual.event.CELLULAR_DATA_STATE_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_NETWORK_STATE_CHANGED = "usual.event.NETWORK_STATE_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SIGNAL_INFO_CHANGED = "usual.event.SIGNAL_INFO_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_INCOMING_CALL_MISSED = "usual.event.INCOMING_CALL_MISSED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_RADIO_STATE_CHANGE = "usual.event.RADIO_STATE_CHANGE"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED = "usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SCREEN_UNLOCKED = "usual.event.SCREEN_UNLOCKED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: Support
Method or attribute name: COMMON_EVENT_SCREEN_LOCKED = "usual.event.SCREEN_LOCKED"|@ohos.commonEventManager.d.ts| +|Added|NA|Class name: notificationManager
Method or attribute name: function setBadgeNumber(badgeNumber: number, callback: AsyncCallback\): void;|@ohos.notificationManager.d.ts| +|Added|NA|Class name: notificationManager
Method or attribute name: function setBadgeNumber(badgeNumber: number): Promise\;|@ohos.notificationManager.d.ts| +|Added|NA|Class name: notificationManager
Method or attribute name: function on(type: 'checkNotification', callback: (checkInfo: NotificationCheckInfo) => NotificationCheckResult): void;|@ohos.notificationManager.d.ts| +|Added|NA|Class name: notificationManager
Method or attribute name: function off(type: 'checkNotification', callback?: (checkInfo: NotificationCheckInfo) => NotificationCheckResult): void;|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.notificationManager
Class name: NotificationCheckInfo|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.notificationManager
Class name: NotificationCheckInfo
Method or attribute name: bundleName: string;|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.notificationManager
Class name: NotificationCheckInfo
Method or attribute name: notificationId: number;|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.notificationManager
Class name: NotificationCheckInfo
Method or attribute name: contentType: ContentType;|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.notificationManager
Class name: NotificationCheckResult|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.notificationManager
Class name: NotificationCheckResult
Method or attribute name: code: number;|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.notificationManager
Class name: NotificationCheckResult
Method or attribute name: message: string;|@ohos.notificationManager.d.ts| +|Added|NA|Module name: ohos.reminderAgentManager
Class name: ActionButtonType
Method or attribute name: ACTION_BUTTON_TYPE_CUSTOM = 2|@ohos.reminderAgentManager.d.ts| +|Added|NA|Module name: ohos.reminderAgentManager
Class name: ActionButton
Method or attribute name: wantAgent?: WantAgent;|@ohos.reminderAgentManager.d.ts| +|Added|NA|Module name: ohos.reminderAgentManager
Class name: WantAgent
Method or attribute name: uri?: string;|@ohos.reminderAgentManager.d.ts| +|Added|NA|Class name: ReminderRequest
Method or attribute name: actionButton?: [ActionButton?, ActionButton?, ActionButton?];|@ohos.reminderAgentManager.d.ts| +|Added|NA|Class name: ReminderRequest
Method or attribute name: tapDismissed?: boolean;|@ohos.reminderAgentManager.d.ts| +|Added|NA|Class name: ReminderRequest
Method or attribute name: autoDeletedTime?: number;|@ohos.reminderAgentManager.d.ts| +|Added|NA|Class name: NotificationSubscriber
Method or attribute name: onBadgeChanged?: (data: BadgeNumberCallbackData) => void;|notificationSubscriber.d.ts| +|Added|NA|Module name: notificationSubscriber
Class name: BadgeNumberCallbackData|notificationSubscriber.d.ts| +|Added|NA|Module name: notificationSubscriber
Class name: BadgeNumberCallbackData
Method or attribute name: readonly bundle: string;|notificationSubscriber.d.ts| +|Added|NA|Module name: notificationSubscriber
Class name: BadgeNumberCallbackData
Method or attribute name: readonly uid: number;|notificationSubscriber.d.ts| +|Added|NA|Module name: notificationSubscriber
Class name: BadgeNumberCallbackData
Method or attribute name: readonly badgeNumber: number;|notificationSubscriber.d.ts| +|Deprecated version changed|Class name: Support
Method or attribute name: COMMON_EVENT_USER_PRESENT = "usual.event.USER_PRESENT"
Deprecated version: N/A|Class name: Support
Method or attribute name: COMMON_EVENT_USER_PRESENT = "usual.event.USER_PRESENT"
Deprecated version: 10
Substitute API: N/A|@ohos.commonEventManager.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-resource-scheduler.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-resource-scheduler.md new file mode 100644 index 0000000000000000000000000000000000000000..2e952d4d35cfef053d8701d734e410dceb72cc1f --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-resource-scheduler.md @@ -0,0 +1,4 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.WorkSchedulerExtensionAbility
Class name: WorkSchedulerExtensionAbility
Method or attribute name: context: WorkSchedulerExtensionContext;|@ohos.WorkSchedulerExtensionAbility.d.ts| +|Added|NA|Module name: WorkSchedulerExtensionContext
Class name: WorkSchedulerExtensionContext|WorkSchedulerExtensionContext.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md new file mode 100644 index 0000000000000000000000000000000000000000..b7638558713b2daa36bc50371abfaf6f9274076f --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md @@ -0,0 +1,28 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: AtManager
Method or attribute name: checkAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus;|@ohos.abilityAccessCtrl.d.ts| +|Added|NA|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_ONLY_USED_IN_HUKS = 2|@ohos.security.huks.d.ts| +|Added|NA|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_KEY_EXPORT_ALLOWED = 3|@ohos.security.huks.d.ts| +|Added|NA|Module name: ohos.security.huks
Class name: HuksRsaPssSaltLenType|@ohos.security.huks.d.ts| +|Added|NA|Module name: ohos.security.huks
Class name: HuksRsaPssSaltLenType
Method or attribute name: HUKS_RSA_PSS_SALT_LEN_DIGEST = 0|@ohos.security.huks.d.ts| +|Added|NA|Module name: ohos.security.huks
Class name: HuksRsaPssSaltLenType
Method or attribute name: HUKS_RSA_PSS_SALT_LEN_MAX = 1|@ohos.security.huks.d.ts| +|Added|NA|Module name: ohos.security.huks
Class name: HuksTag
Method or attribute name: HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG = HuksTagType.HUKS_TAG_TYPE_UINT \| 29|@ohos.security.huks.d.ts| +|Added|NA|Module name: ohos.security.huks
Class name: HuksTag
Method or attribute name: HUKS_TAG_RSA_PSS_SALT_LEN_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT \| 30|@ohos.security.huks.d.ts| +|Added|NA|Module name: ohos.security.huks
Class name: HuksTag
Method or attribute name: HUKS_TAG_KEY_AUTH_PURPOSE = HuksTagType.HUKS_TAG_TYPE_UINT \| 311|@ohos.security.huks.d.ts| +|Deprecated version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Deprecated version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Deprecated version: 10
Substitute API: N/A|@ohos.security.huks.d.ts| +|Deprecated version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Deprecated version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Deprecated version: 10
Substitute API: N/A|@ohos.security.huks.d.ts| +|Initial version changed|Class name: abilityAccessCtrl
Initial version: N/A|Class name: abilityAccessCtrl
Initial version: 8|@ohos.abilityAccessCtrl.d.ts| +|Initial version changed|Class name: abilityAccessCtrl
Method or attribute name: function createAtManager(): AtManager;
Initial version: 8|Class name: abilityAccessCtrl
Method or attribute name: function createAtManager(): AtManager;
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| +|Initial version changed|Class name: AtManager
Initial version: N/A|Class name: AtManager
Initial version: 8|@ohos.abilityAccessCtrl.d.ts| +|Initial version changed|Class name: AtManager
Method or attribute name: checkAccessToken(tokenID: number, permissionName: Permissions): Promise\;
Initial version: 9|Class name: AtManager
Method or attribute name: checkAccessToken(tokenID: number, permissionName: Permissions): Promise\;
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| +|Initial version changed|Class name: GrantStatus
Initial version: 8|Class name: GrantStatus
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| +|Initial version changed|Class name: GrantStatus
Method or attribute name: PERMISSION_DENIED = -1
Initial version: N/A|Class name: GrantStatus
Method or attribute name: PERMISSION_DENIED = -1
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| +|Initial version changed|Class name: GrantStatus
Method or attribute name: PERMISSION_GRANTED = 0
Initial version: N/A|Class name: GrantStatus
Method or attribute name: PERMISSION_GRANTED = 0
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| +|Initial version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Initial version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Initial version: 8|@ohos.security.huks.d.ts| +|Initial version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Initial version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Initial version: 8|@ohos.security.huks.d.ts| +|Initial version changed|Class name: Cipher
Method or attribute name: static rsa(options: CipherRsaOptions): void;
Initial version: N/A|Class name: Cipher
Method or attribute name: static rsa(options: CipherRsaOptions): void;
Initial version: 3|@system.cipher.d.ts| +|Initial version changed|Class name: Cipher
Method or attribute name: static aes(options: CipherAesOptions): void;
Initial version: N/A|Class name: Cipher
Method or attribute name: static aes(options: CipherAesOptions): void;
Initial version: 3|@system.cipher.d.ts| +|Initial version changed|Class name: PermissionRequestResult
Initial version: 9|Class name: PermissionRequestResult
Initial version: 10|PermissionRequestResult.d.ts| +|Initial version changed|Class name: PermissionRequestResult
Method or attribute name: permissions: Array\;
Initial version: 9|Class name: PermissionRequestResult
Method or attribute name: permissions: Array\;
Initial version: 10|PermissionRequestResult.d.ts| +|Initial version changed|Class name: PermissionRequestResult
Method or attribute name: authResults: Array\;
Initial version: 9|Class name: PermissionRequestResult
Method or attribute name: authResults: Array\;
Initial version: 10|PermissionRequestResult.d.ts| +|Error code added|NA|Class name: AtManager
Method or attribute name: getVersion(): Promise\;
Error code: 202|@ohos.abilityAccessCtrl.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md new file mode 100644 index 0000000000000000000000000000000000000000..60dd3d2f9dc8543e3ee14d48296c90bbd2a77ddd --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md @@ -0,0 +1,28 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.vibrator
Class name: vibrator
Method or attribute name: function stopVibration(callback: AsyncCallback\): void;|@ohos.vibrator.d.ts| +|Added|NA|Class name: vibrator
Method or attribute name: function stopVibration(callback: AsyncCallback\): void;|@ohos.vibrator.d.ts| +|Added|NA|Module name: ohos.vibrator
Class name: vibrator
Method or attribute name: function stopVibration(): Promise\;|@ohos.vibrator.d.ts| +|Added|NA|Class name: vibrator
Method or attribute name: function stopVibration(): Promise\;|@ohos.vibrator.d.ts| +|Added|NA|Module name: ohos.vibrator
Class name: vibrator
Method or attribute name: function isSupportEffect(effectId: string, callback: AsyncCallback\): void;|@ohos.vibrator.d.ts| +|Added|NA|Class name: vibrator
Method or attribute name: function isSupportEffect(effectId: string, callback: AsyncCallback\): void;|@ohos.vibrator.d.ts| +|Added|NA|Module name: ohos.vibrator
Class name: vibrator
Method or attribute name: function isSupportEffect(effectId: string): Promise\;|@ohos.vibrator.d.ts| +|Added|NA|Class name: vibrator
Method or attribute name: function isSupportEffect(effectId: string): Promise\;|@ohos.vibrator.d.ts| +|Permission added|Class name: AccelerometerResponse
Method or attribute name: x: number;
Permission: N/A|Class name: AccelerometerResponse
Method or attribute name: x: number;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| +|Permission added|Class name: AccelerometerResponse
Method or attribute name: y: number;
Permission: N/A|Class name: AccelerometerResponse
Method or attribute name: y: number;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| +|Permission added|Class name: AccelerometerResponse
Method or attribute name: z: number;
Permission: N/A|Class name: AccelerometerResponse
Method or attribute name: z: number;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| +|Permission added|Class name: subscribeAccelerometerOptions
Method or attribute name: interval: string;
Permission: N/A|Class name: subscribeAccelerometerOptions
Method or attribute name: interval: string;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| +|Permission added|Class name: subscribeAccelerometerOptions
Method or attribute name: success: (data: AccelerometerResponse) => void;
Permission: N/A|Class name: subscribeAccelerometerOptions
Method or attribute name: success: (data: AccelerometerResponse) => void;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| +|Permission added|Class name: subscribeAccelerometerOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: subscribeAccelerometerOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| +|Permission added|Class name: StepCounterResponse
Method or attribute name: steps: number;
Permission: N/A|Class name: StepCounterResponse
Method or attribute name: steps: number;
Permission: ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| +|Permission added|Class name: SubscribeStepCounterOptions
Method or attribute name: success: (data: StepCounterResponse) => void;
Permission: N/A|Class name: SubscribeStepCounterOptions
Method or attribute name: success: (data: StepCounterResponse) => void;
Permission: ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| +|Permission added|Class name: SubscribeStepCounterOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: SubscribeStepCounterOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| +|Permission added|Class name: HeartRateResponse
Method or attribute name: heartRate: number;
Permission: N/A|Class name: HeartRateResponse
Method or attribute name: heartRate: number;
Permission: ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| +|Permission added|Class name: SubscribeHeartRateOptions
Method or attribute name: success: (data: HeartRateResponse) => void;
Permission: N/A|Class name: SubscribeHeartRateOptions
Method or attribute name: success: (data: HeartRateResponse) => void;
Permission: ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| +|Permission added|Class name: SubscribeHeartRateOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: SubscribeHeartRateOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| +|Permission added|Class name: GyroscopeResponse
Method or attribute name: x: number;
Permission: N/A|Class name: GyroscopeResponse
Method or attribute name: x: number;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| +|Permission added|Class name: GyroscopeResponse
Method or attribute name: y: number;
Permission: N/A|Class name: GyroscopeResponse
Method or attribute name: y: number;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| +|Permission added|Class name: GyroscopeResponse
Method or attribute name: z: number;
Permission: N/A|Class name: GyroscopeResponse
Method or attribute name: z: number;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| +|Permission added|Class name: SubscribeGyroscopeOptions
Method or attribute name: interval: string;
Permission: N/A|Class name: SubscribeGyroscopeOptions
Method or attribute name: interval: string;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| +|Permission added|Class name: SubscribeGyroscopeOptions
Method or attribute name: success: (data: GyroscopeResponse) => void;
Permission: N/A|Class name: SubscribeGyroscopeOptions
Method or attribute name: success: (data: GyroscopeResponse) => void;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| +|Permission added|Class name: SubscribeGyroscopeOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: SubscribeGyroscopeOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-telephony.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-telephony.md new file mode 100644 index 0000000000000000000000000000000000000000..600b528fefe7bed06fc7c17dde92721e6f0709a8 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-telephony.md @@ -0,0 +1,28 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function on(type: 'audioDeviceChange', callback: Callback\): void;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function off(type: 'audioDeviceChange', callback?: Callback\): void;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function setAudioDevice(device: AudioDevice): Promise\;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function closeUnfinishedUssd(slotId: number, callback: AsyncCallback\): void;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function closeUnfinishedUssd(slotId: number): Promise\;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function setVoNRState(slotId: number, state: VoNRState, callback: AsyncCallback\): void;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function setVoNRState(slotId: number, state: VoNRState): Promise\;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function getVoNRState(slotId: number, callback: AsyncCallback\): void;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function getVoNRState(slotId: number): Promise\;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function canSetCallTransferTime(slotId: number, callback: AsyncCallback\): void;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function canSetCallTransferTime(slotId: number): Promise\;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function inputDialerSpecialCode(inputCode: string, callback: AsyncCallback\): void;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: call
Method or attribute name: function inputDialerSpecialCode(inputCode: string): Promise\;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: VoNRState|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: VoNRState
Method or attribute name: VONR_STATE_ON = 0|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceType|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceType
Method or attribute name: DEVICE_EARPIECE|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceType
Method or attribute name: DEVICE_SPEAKER|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceType
Method or attribute name: DEVICE_WIRED_HEADSET|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceType
Method or attribute name: DEVICE_BLUETOOTH_SCO|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceInfo|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceInfo
Method or attribute name: audioDeviceList: Array\;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceInfo
Method or attribute name: currentAudioDevice: AudioDevice;|@ohos.telephony.call.d.ts| +|Added|NA|Module name: ohos.telephony.call
Class name: AudioDeviceInfo
Method or attribute name: isMuted: boolean;|@ohos.telephony.call.d.ts| +|Added|NA|Class name: radio
Method or attribute name: function getBasebandVersion(slotId: number, callback: AsyncCallback\): void;|@ohos.telephony.radio.d.ts| +|Added|NA|Class name: radio
Method or attribute name: function getBasebandVersion(slotId: number): Promise\;|@ohos.telephony.radio.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-unitest.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-unitest.md new file mode 100644 index 0000000000000000000000000000000000000000..0f7c4c12dd80d9974e8009f0111b3aeb2ffc7a1d --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-unitest.md @@ -0,0 +1,22 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.UiTest
Class name: UiDirection|@ohos.UiTest.d.ts| +|Added|NA|Class name: UiDirection
Method or attribute name: |@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: UiDirection
Method or attribute name: LEFT = 0|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: UiDirection
Method or attribute name: RIGHT = 1|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: UiDirection
Method or attribute name: UP = 2|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: UiDirection
Method or attribute name: DOWN = 3|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: MouseButton|@ohos.UiTest.d.ts| +|Added|NA|Class name: MouseButton
Method or attribute name: |@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: MouseButton
Method or attribute name: MOUSE_BUTTON_LEFT = 0|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: MouseButton
Method or attribute name: MOUSE_BUTTON_RIGHT = 1|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: MouseButton
Method or attribute name: MOUSE_BUTTON_MIDDLE = 2|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: On
Method or attribute name: within(on: On): On;|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: On
Method or attribute name: inWindow(bundleName: string): On;|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: Driver
Method or attribute name: fling(direction: UiDirection, speed: number): Promise\;|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: Driver
Method or attribute name: mouseClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise\;|@ohos.UiTest.d.ts| +|Added|NA|Class name: Driver
Method or attribute name: mouseClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise\;|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: Driver
Method or attribute name: mouseMoveTo(p: Point): Promise\;|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: Driver
Method or attribute name: mouseScroll(p: Point, down: boolean, d: number, key1?: number, key2?: number): Promise\;|@ohos.UiTest.d.ts| +|Added|NA|Module name: ohos.UiTest
Class name: Driver
Method or attribute name: screenCapture(savePath: string, rect?: Rect): Promise\;|@ohos.UiTest.d.ts| +|Error code added|NA|Class name: UiDriver
Method or attribute name: assertComponentExist(by: By): Promise\;
Error code: 401, 17000002, 17000003|@ohos.UiTest.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md new file mode 100644 index 0000000000000000000000000000000000000000..7618e4b4a0d3c29c8d5131a82804c6718337ddbc --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md @@ -0,0 +1,143 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: BusinessVendor
Method or attribute name: PUBLIC = 'public'|@ohos.update.d.ts| +|Added|NA|Class name: UpgradeAction
Method or attribute name: UPGRADE = 'upgrade'|@ohos.update.d.ts| +|Added|NA|Class name: UpgradeAction
Method or attribute name: RECOVERY = 'recovery'|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeInfo
Access level: public API|Class name: UpgradeInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeInfo
Method or attribute name: upgradeApp: string;
Access level: public API|Class name: UpgradeInfo
Method or attribute name: upgradeApp: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeInfo
Method or attribute name: businessType: BusinessType;
Access level: public API|Class name: UpgradeInfo
Method or attribute name: businessType: BusinessType;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: BusinessType
Access level: public API|Class name: BusinessType
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: BusinessType
Method or attribute name: vendor: BusinessVendor;
Access level: public API|Class name: BusinessType
Method or attribute name: vendor: BusinessVendor;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: BusinessType
Method or attribute name: subType: BusinessSubType;
Access level: public API|Class name: BusinessType
Method or attribute name: subType: BusinessSubType;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: CheckResult
Access level: public API|Class name: CheckResult
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: CheckResult
Method or attribute name: isExistNewVersion: boolean;
Access level: public API|Class name: CheckResult
Method or attribute name: isExistNewVersion: boolean;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: CheckResult
Method or attribute name: newVersionInfo: NewVersionInfo;
Access level: public API|Class name: CheckResult
Method or attribute name: newVersionInfo: NewVersionInfo;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NewVersionInfo
Access level: public API|Class name: NewVersionInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NewVersionInfo
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: public API|Class name: NewVersionInfo
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NewVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: public API|Class name: NewVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionDigestInfo
Access level: public API|Class name: VersionDigestInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionDigestInfo
Method or attribute name: versionDigest: string;
Access level: public API|Class name: VersionDigestInfo
Method or attribute name: versionDigest: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Access level: public API|Class name: VersionComponent
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: componentId: string;
Access level: public API|Class name: VersionComponent
Method or attribute name: componentId: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: componentType: ComponentType;
Access level: public API|Class name: VersionComponent
Method or attribute name: componentType: ComponentType;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: upgradeAction: UpgradeAction;
Access level: public API|Class name: VersionComponent
Method or attribute name: upgradeAction: UpgradeAction;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: displayVersion: string;
Access level: public API|Class name: VersionComponent
Method or attribute name: displayVersion: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: innerVersion: string;
Access level: public API|Class name: VersionComponent
Method or attribute name: innerVersion: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: size: number;
Access level: public API|Class name: VersionComponent
Method or attribute name: size: number;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: effectiveMode: EffectiveMode;
Access level: public API|Class name: VersionComponent
Method or attribute name: effectiveMode: EffectiveMode;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: VersionComponent
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: public API|Class name: VersionComponent
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionOptions
Access level: public API|Class name: DescriptionOptions
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionOptions
Method or attribute name: format: DescriptionFormat;
Access level: public API|Class name: DescriptionOptions
Method or attribute name: format: DescriptionFormat;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionOptions
Method or attribute name: language: string;
Access level: public API|Class name: DescriptionOptions
Method or attribute name: language: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ComponentDescription
Access level: public API|Class name: ComponentDescription
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ComponentDescription
Method or attribute name: componentId: string;
Access level: public API|Class name: ComponentDescription
Method or attribute name: componentId: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ComponentDescription
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: public API|Class name: ComponentDescription
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionInfo
Access level: public API|Class name: DescriptionInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionInfo
Method or attribute name: descriptionType: DescriptionType;
Access level: public API|Class name: DescriptionInfo
Method or attribute name: descriptionType: DescriptionType;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionInfo
Method or attribute name: content: string;
Access level: public API|Class name: DescriptionInfo
Method or attribute name: content: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: CurrentVersionInfo
Access level: public API|Class name: CurrentVersionInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: CurrentVersionInfo
Method or attribute name: osVersion: string;
Access level: public API|Class name: CurrentVersionInfo
Method or attribute name: osVersion: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: CurrentVersionInfo
Method or attribute name: deviceName: string;
Access level: public API|Class name: CurrentVersionInfo
Method or attribute name: deviceName: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: CurrentVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: public API|Class name: CurrentVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DownloadOptions
Access level: public API|Class name: DownloadOptions
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: public API|Class name: DownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DownloadOptions
Method or attribute name: order: Order;
Access level: public API|Class name: DownloadOptions
Method or attribute name: order: Order;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ResumeDownloadOptions
Access level: public API|Class name: ResumeDownloadOptions
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ResumeDownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: public API|Class name: ResumeDownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: PauseDownloadOptions
Access level: public API|Class name: PauseDownloadOptions
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: PauseDownloadOptions
Method or attribute name: isAllowAutoResume: boolean;
Access level: public API|Class name: PauseDownloadOptions
Method or attribute name: isAllowAutoResume: boolean;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeOptions
Access level: public API|Class name: UpgradeOptions
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeOptions
Method or attribute name: order: Order;
Access level: public API|Class name: UpgradeOptions
Method or attribute name: order: Order;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ClearOptions
Access level: public API|Class name: ClearOptions
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ClearOptions
Method or attribute name: status: UpgradeStatus;
Access level: public API|Class name: ClearOptions
Method or attribute name: status: UpgradeStatus;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradePolicy
Access level: public API|Class name: UpgradePolicy
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradePolicy
Method or attribute name: downloadStrategy: boolean;
Access level: public API|Class name: UpgradePolicy
Method or attribute name: downloadStrategy: boolean;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradePolicy
Method or attribute name: autoUpgradeStrategy: boolean;
Access level: public API|Class name: UpgradePolicy
Method or attribute name: autoUpgradeStrategy: boolean;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradePolicy
Method or attribute name: autoUpgradePeriods: Array\;
Access level: public API|Class name: UpgradePolicy
Method or attribute name: autoUpgradePeriods: Array\;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradePeriod
Access level: public API|Class name: UpgradePeriod
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradePeriod
Method or attribute name: start: number;
Access level: public API|Class name: UpgradePeriod
Method or attribute name: start: number;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradePeriod
Method or attribute name: end: number;
Access level: public API|Class name: UpgradePeriod
Method or attribute name: end: number;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskInfo
Access level: public API|Class name: TaskInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskInfo
Method or attribute name: existTask: boolean;
Access level: public API|Class name: TaskInfo
Method or attribute name: existTask: boolean;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskInfo
Method or attribute name: taskBody: TaskBody;
Access level: public API|Class name: TaskInfo
Method or attribute name: taskBody: TaskBody;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventInfo
Access level: public API|Class name: EventInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventInfo
Method or attribute name: eventId: EventId;
Access level: public API|Class name: EventInfo
Method or attribute name: eventId: EventId;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventInfo
Method or attribute name: taskBody: TaskBody;
Access level: public API|Class name: EventInfo
Method or attribute name: taskBody: TaskBody;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Access level: public API|Class name: TaskBody
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: public API|Class name: TaskBody
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Method or attribute name: status: UpgradeStatus;
Access level: public API|Class name: TaskBody
Method or attribute name: status: UpgradeStatus;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Method or attribute name: subStatus: number;
Access level: public API|Class name: TaskBody
Method or attribute name: subStatus: number;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Method or attribute name: progress: number;
Access level: public API|Class name: TaskBody
Method or attribute name: progress: number;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Method or attribute name: installMode: number;
Access level: public API|Class name: TaskBody
Method or attribute name: installMode: number;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Method or attribute name: errorMessages: Array\;
Access level: public API|Class name: TaskBody
Method or attribute name: errorMessages: Array\;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: TaskBody
Method or attribute name: versionComponents: Array\;
Access level: public API|Class name: TaskBody
Method or attribute name: versionComponents: Array\;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ErrorMessage
Access level: public API|Class name: ErrorMessage
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ErrorMessage
Method or attribute name: errorCode: number;
Access level: public API|Class name: ErrorMessage
Method or attribute name: errorCode: number;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ErrorMessage
Method or attribute name: errorMessage: string;
Access level: public API|Class name: ErrorMessage
Method or attribute name: errorMessage: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventClassifyInfo
Access level: public API|Class name: EventClassifyInfo
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventClassifyInfo
Method or attribute name: eventClassify: EventClassify;
Access level: public API|Class name: EventClassifyInfo
Method or attribute name: eventClassify: EventClassify;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventClassifyInfo
Method or attribute name: extraInfo: string;
Access level: public API|Class name: EventClassifyInfo
Method or attribute name: extraInfo: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeFile
Access level: public API|Class name: UpgradeFile
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeFile
Method or attribute name: fileType: ComponentType;
Access level: public API|Class name: UpgradeFile
Method or attribute name: fileType: ComponentType;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeFile
Method or attribute name: filePath: string;
Access level: public API|Class name: UpgradeFile
Method or attribute name: filePath: string;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeTaskCallback
Access level: public API|Class name: UpgradeTaskCallback
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeTaskCallback
Method or attribute name: (eventInfo: EventInfo): void;
Access level: public API|Class name: UpgradeTaskCallback
Method or attribute name: (eventInfo: EventInfo): void;
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: BusinessVendor
Access level: public API|Class name: BusinessVendor
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: BusinessSubType
Access level: public API|Class name: BusinessSubType
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: BusinessSubType
Method or attribute name: FIRMWARE = 1
Access level: public API|Class name: BusinessSubType
Method or attribute name: FIRMWARE = 1
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ComponentType
Access level: public API|Class name: ComponentType
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: ComponentType
Method or attribute name: OTA = 1
Access level: public API|Class name: ComponentType
Method or attribute name: OTA = 1
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeAction
Access level: public API|Class name: UpgradeAction
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EffectiveMode
Access level: public API|Class name: EffectiveMode
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EffectiveMode
Method or attribute name: COLD = 1
Access level: public API|Class name: EffectiveMode
Method or attribute name: COLD = 1
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EffectiveMode
Method or attribute name: LIVE = 2
Access level: public API|Class name: EffectiveMode
Method or attribute name: LIVE = 2
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EffectiveMode
Method or attribute name: LIVE_AND_COLD = 3
Access level: public API|Class name: EffectiveMode
Method or attribute name: LIVE_AND_COLD = 3
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionType
Access level: public API|Class name: DescriptionType
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionType
Method or attribute name: CONTENT = 0
Access level: public API|Class name: DescriptionType
Method or attribute name: CONTENT = 0
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionType
Method or attribute name: URI = 1
Access level: public API|Class name: DescriptionType
Method or attribute name: URI = 1
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionFormat
Access level: public API|Class name: DescriptionFormat
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionFormat
Method or attribute name: STANDARD = 0
Access level: public API|Class name: DescriptionFormat
Method or attribute name: STANDARD = 0
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: DescriptionFormat
Method or attribute name: SIMPLIFIED = 1
Access level: public API|Class name: DescriptionFormat
Method or attribute name: SIMPLIFIED = 1
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NetType
Access level: public API|Class name: NetType
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NetType
Method or attribute name: CELLULAR = 1
Access level: public API|Class name: NetType
Method or attribute name: CELLULAR = 1
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NetType
Method or attribute name: METERED_WIFI = 2
Access level: public API|Class name: NetType
Method or attribute name: METERED_WIFI = 2
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NetType
Method or attribute name: NOT_METERED_WIFI = 4
Access level: public API|Class name: NetType
Method or attribute name: NOT_METERED_WIFI = 4
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NetType
Method or attribute name: WIFI = 6
Access level: public API|Class name: NetType
Method or attribute name: WIFI = 6
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: NetType
Method or attribute name: CELLULAR_AND_WIFI = 7
Access level: public API|Class name: NetType
Method or attribute name: CELLULAR_AND_WIFI = 7
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: Order
Access level: public API|Class name: Order
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: Order
Method or attribute name: DOWNLOAD = 1
Access level: public API|Class name: Order
Method or attribute name: DOWNLOAD = 1
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: Order
Method or attribute name: INSTALL = 2
Access level: public API|Class name: Order
Method or attribute name: INSTALL = 2
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: Order
Method or attribute name: DOWNLOAD_AND_INSTALL = 3
Access level: public API|Class name: Order
Method or attribute name: DOWNLOAD_AND_INSTALL = 3
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: Order
Method or attribute name: APPLY = 4
Access level: public API|Class name: Order
Method or attribute name: APPLY = 4
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: Order
Method or attribute name: INSTALL_AND_APPLY = 6
Access level: public API|Class name: Order
Method or attribute name: INSTALL_AND_APPLY = 6
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Access level: public API|Class name: UpgradeStatus
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: WAITING_DOWNLOAD = 20
Access level: public API|Class name: UpgradeStatus
Method or attribute name: WAITING_DOWNLOAD = 20
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: DOWNLOADING = 21
Access level: public API|Class name: UpgradeStatus
Method or attribute name: DOWNLOADING = 21
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_PAUSED = 22
Access level: public API|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_PAUSED = 22
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_FAIL = 23
Access level: public API|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_FAIL = 23
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: WAITING_INSTALL = 30
Access level: public API|Class name: UpgradeStatus
Method or attribute name: WAITING_INSTALL = 30
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: UPDATING = 31
Access level: public API|Class name: UpgradeStatus
Method or attribute name: UPDATING = 31
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: WAITING_APPLY = 40
Access level: public API|Class name: UpgradeStatus
Method or attribute name: WAITING_APPLY = 40
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: APPLYING = 41
Access level: public API|Class name: UpgradeStatus
Method or attribute name: APPLYING = 41
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: UPGRADE_SUCCESS = 50
Access level: public API|Class name: UpgradeStatus
Method or attribute name: UPGRADE_SUCCESS = 50
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: UpgradeStatus
Method or attribute name: UPGRADE_FAIL = 51
Access level: public API|Class name: UpgradeStatus
Method or attribute name: UPGRADE_FAIL = 51
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventClassify
Access level: public API|Class name: EventClassify
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventClassify
Method or attribute name: TASK = 0x01000000
Access level: public API|Class name: EventClassify
Method or attribute name: TASK = 0x01000000
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Access level: public API|Class name: EventId
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_TASK_BASE = EventClassify.TASK
Access level: public API|Class name: EventId
Method or attribute name: EVENT_TASK_BASE = EventClassify.TASK
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_TASK_RECEIVE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_TASK_RECEIVE
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_TASK_CANCEL
Access level: public API|Class name: EventId
Method or attribute name: EVENT_TASK_CANCEL
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_WAIT
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_WAIT
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_START
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_START
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_UPDATE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_UPDATE
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_PAUSE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_PAUSE
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_RESUME
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_RESUME
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_SUCCESS
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_SUCCESS
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_FAIL
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_FAIL
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_WAIT
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_WAIT
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_START
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_START
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_UPDATE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_UPDATE
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_APPLY_WAIT
Access level: public API|Class name: EventId
Method or attribute name: EVENT_APPLY_WAIT
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_APPLY_START
Access level: public API|Class name: EventId
Method or attribute name: EVENT_APPLY_START
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_SUCCESS
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_SUCCESS
Access level: system API|@ohos.update.d.ts| +|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_FAIL
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_FAIL
Access level: system API|@ohos.update.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-user-iam.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-user-iam.md new file mode 100644 index 0000000000000000000000000000000000000000..681104ebbcb423e3091aeff7644baa9223b427fb --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-user-iam.md @@ -0,0 +1,5 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Class name: AuthType
Method or attribute name: type AuthType = 'ALL' \| 'FACE_ONLY';|@ohos.userIAM.userAuth.d.ts| +|Added|NA|Class name: SecureLevel
Method or attribute name: type SecureLevel = 'S1' \| 'S2' \| 'S3' \| 'S4';|@ohos.userIAM.userAuth.d.ts| +|Added|NA|Class name: AuthEventKey
Method or attribute name: type AuthEventKey = 'result' \| 'tip';|@ohos.userIAM.userAuth.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-web.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-web.md new file mode 100644 index 0000000000000000000000000000000000000000..fb3586a30de7f35ae4761fd22df4ea92f840a420 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-web.md @@ -0,0 +1,56 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.web.webview
Class name: SecureDnsMode|@ohos.web.webview.d.ts| +|Added|NA|Class name: SecureDnsMode
Method or attribute name: |@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: SecureDnsMode
Method or attribute name: Off = 0|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: SecureDnsMode
Method or attribute name: Auto = 1|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: SecureDnsMode
Method or attribute name: SecureOnly = 2|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType|@ohos.web.webview.d.ts| +|Added|NA|Class name: WebMessageType|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType
Method or attribute name: NOT_SUPPORT|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType
Method or attribute name: STRING|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType
Method or attribute name: NUMBER|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType
Method or attribute name: BOOLEAN|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType
Method or attribute name: ARRAY_BUFFER|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType
Method or attribute name: ARRAY|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageType
Method or attribute name: ERROR|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: getType(): WebMessageType;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: getString(): string;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: getNumber(): number;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: getBoolean(): boolean;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: getArrayBuffer(): ArrayBuffer;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: getArray(): Array\;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: getError(): Error;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: setType(type: WebMessageType): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: setString(message: string): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: setNumber(message: number): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: setBoolean(message: boolean): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: setArrayBuffer(message: ArrayBuffer): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: setArray(message: Array\): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessageExt
Method or attribute name: setError(message: Error): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessagePort
Method or attribute name: isExtentionType?: boolean;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessagePort
Method or attribute name: postMessageEventExt(message: WebMessageExt): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: WebMessagePort
Method or attribute name: onMessageEventExt(callback: (result: WebMessageExt) => void): void;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageType|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageType
Method or attribute name: NOT_SUPPORT|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageType
Method or attribute name: STRING|@ohos.web.webview.d.ts| +|Added|NA|Class name: JsMessageType
Method or attribute name: NUMBER|@ohos.web.webview.d.ts| +|Added|NA|Class name: JsMessageType
Method or attribute name: BOOLEAN|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageType
Method or attribute name: ARRAY_BUFFER|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageType
Method or attribute name: ARRAY|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageExt|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageExt
Method or attribute name: getType(): JsMessageType;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageExt
Method or attribute name: getString(): string;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageExt
Method or attribute name: getNumber(): number;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageExt
Method or attribute name: getBoolean(): boolean;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageExt
Method or attribute name: getArrayBuffer(): ArrayBuffer;|@ohos.web.webview.d.ts| +|Added|NA|Module name: ohos.web.webview
Class name: JsMessageExt
Method or attribute name: getArray(): Array\;|@ohos.web.webview.d.ts| +|Added|NA|Class name: WebviewController
Method or attribute name: static setHttpDns(secureDnsMode: SecureDnsMode, secureDnsConfig: string): void;|@ohos.web.webview.d.ts| +|Added|NA|Class name: WebviewController
Method or attribute name: runJavaScriptExt(script: string): Promise\;|@ohos.web.webview.d.ts| +|Added|NA|Class name: WebviewController
Method or attribute name: runJavaScriptExt(script: string, callback: AsyncCallback\): void;|@ohos.web.webview.d.ts| +|Added|NA|Class name: WebviewController
Method or attribute name: getCertificate(): Promise\>;|@ohos.web.webview.d.ts| +|Added|NA|Class name: WebviewController
Method or attribute name: getCertificate(callback: AsyncCallback\>): void;|@ohos.web.webview.d.ts| +|Added|NA|Class name: WebviewController
Method or attribute name: setAudioMuted(mute: boolean): void;|@ohos.web.webview.d.ts| +|Function changed|Class name: WebviewController
Method or attribute name: createWebMessagePorts(): Array\;
|Class name: WebviewController
Method or attribute name: createWebMessagePorts(isExtentionType?: boolean): Array\;
|@ohos.web.webview.d.ts| +|Function changed|Class name: WebResourceResponse
Method or attribute name: setResponseData(data: string \| number);
|Class name: WebResourceResponse
Method or attribute name: setResponseData(data: string \| number \| Resource);
|web.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-window.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-window.md new file mode 100644 index 0000000000000000000000000000000000000000..86f6e97b2758f5f678289b7eb753d4ccd7c87bd8 --- /dev/null +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-window.md @@ -0,0 +1,44 @@ +| Change Type | Old Version | New Version | d.ts File | +| ---- | ------ | ------ | -------- | +|Added|NA|Module name: ohos.display
Class name: display
Method or attribute name: function on(type: 'privateModeChange', callback: Callback\): void;|@ohos.display.d.ts| +|Added|NA|Class name: display
Method or attribute name: function on(type: 'privateModeChange', callback: Callback\): void;|@ohos.display.d.ts| +|Added|NA|Module name: ohos.display
Class name: display
Method or attribute name: function off(type: 'privateModeChange', callback?: Callback\): void;|@ohos.display.d.ts| +|Added|NA|Module name: ohos.display
Class name: Orientation|@ohos.display.d.ts| +|Added|NA|Module name: ohos.display
Class name: Orientation
Method or attribute name: PORTRAIT = 0|@ohos.display.d.ts| +|Added|NA|Module name: ohos.display
Class name: Orientation
Method or attribute name: LANDSCAPE = 1|@ohos.display.d.ts| +|Added|NA|Module name: ohos.display
Class name: Orientation
Method or attribute name: PORTRAIT_INVERTED = 2|@ohos.display.d.ts| +|Added|NA|Module name: ohos.display
Class name: Orientation
Method or attribute name: LANDSCAPE_INVERTED = 3|@ohos.display.d.ts| +|Added|NA|Class name: Display
Method or attribute name: orientation: Orientation;|@ohos.display.d.ts| +|Added|NA|Class name: screen
Method or attribute name: function stopExpand(expandScreen: Array\, callback: AsyncCallback\): void;|@ohos.screen.d.ts| +|Added|NA|Class name: screen
Method or attribute name: function stopExpand(expandScreen: Array\): Promise\;|@ohos.screen.d.ts| +|Added|NA|Class name: screen
Method or attribute name: function stopMirror(mirrorScreen: Array\, callback: AsyncCallback\): void;|@ohos.screen.d.ts| +|Added|NA|Class name: screen
Method or attribute name: function stopMirror(mirrorScreen: Array\): Promise\;|@ohos.screen.d.ts| +|Added|NA|Module name: ohos.screen
Class name: ScreenSourceMode|@ohos.screen.d.ts| +|Added|NA|Class name: ScreenSourceMode
Method or attribute name: |@ohos.screen.d.ts| +|Added|NA|Module name: ohos.screen
Class name: ScreenSourceMode
Method or attribute name: SCREEN_MAIN = 0|@ohos.screen.d.ts| +|Added|NA|Module name: ohos.screen
Class name: ScreenSourceMode
Method or attribute name: SCREEN_MIRROR = 1|@ohos.screen.d.ts| +|Added|NA|Module name: ohos.screen
Class name: ScreenSourceMode
Method or attribute name: SCREEN_EXTEND = 2|@ohos.screen.d.ts| +|Added|NA|Module name: ohos.screen
Class name: ScreenSourceMode
Method or attribute name: SCREEN_ALONE = 3|@ohos.screen.d.ts| +|Added|NA|Module name: ohos.screen
Class name: Screen
Method or attribute name: readonly sourceMode: ScreenSourceMode;|@ohos.screen.d.ts| +|Added|NA|Class name: window
Method or attribute name: function setGestureNavigationEnabled(enable: boolean, callback: AsyncCallback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: window
Method or attribute name: function setGestureNavigationEnabled(enable: boolean): Promise\;|@ohos.window.d.ts| +|Added|NA|Class name: window
Method or attribute name: function on(type: 'gestureNavigationEnabledChange', callback: Callback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: window
Method or attribute name: function off(type: 'gestureNavigationEnabledChange', callback?: Callback\): void;|@ohos.window.d.ts| +|Added|NA|Module name: ohos.window
Class name: WindowEventType|@ohos.window.d.ts| +|Added|NA|Class name: WindowEventType
Method or attribute name: |@ohos.window.d.ts| +|Added|NA|Module name: ohos.window
Class name: WindowEventType
Method or attribute name: WINDOW_SHOWN = 1|@ohos.window.d.ts| +|Added|NA|Module name: ohos.window
Class name: WindowEventType
Method or attribute name: WINDOW_ACTIVE = 2|@ohos.window.d.ts| +|Added|NA|Module name: ohos.window
Class name: WindowEventType
Method or attribute name: WINDOW_INACTIVE = 3|@ohos.window.d.ts| +|Added|NA|Module name: ohos.window
Class name: WindowEventType
Method or attribute name: WINDOW_HIDDEN = 4|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: on(type: 'dialogTargetTouch', callback: Callback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: off(type: 'dialogTargetTouch', callback?: Callback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: on(type: 'windowEvent', callback: Callback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: off(type: 'windowEvent', callback: Callback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: raiseToAppTop(callback: AsyncCallback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: raiseToAppTop(): Promise\;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: setAspectRatio(ratio: number, callback: AsyncCallback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: setAspectRatio(ratio: number): Promise\;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: resetAspectRatio(callback: AsyncCallback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: resetAspectRatio(): Promise\;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: setWaterMarkFlag(enable: boolean, callback: AsyncCallback\): void;|@ohos.window.d.ts| +|Added|NA|Class name: Window
Method or attribute name: setWaterMarkFlag(enable: boolean): Promise\;|@ohos.window.d.ts| diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.7.1/changelog-huks.md b/en/release-notes/changelogs/OpenHarmony_4.0.7.1/changelog-huks.md new file mode 100644 index 0000000000000000000000000000000000000000..7399cead068359b4b99337704f1dc42f7e77172a --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_4.0.7.1/changelog-huks.md @@ -0,0 +1,98 @@ +# HUKS Changelog + +## cl.huks.1 HUKS Supports RsaPssSaltLengthType + +Before the change, the HUKS uses **RSA_PSS_SALT_LEN_MAX** for signing or signature verification by default. + +After the change, the type defined by **HuksRsaPssSaltLenType** is passed in for signature or signature verification. If **HuksRsaPssSaltLenType** is not passed in, **RSA_PSS_SALT_LEN_MAX** is used by default. + +**Change Impact** + +Behaviors of released JavaScript APIs have been changed. + +**Key API/Component Changes** + +Released JavaScript APIs remain unchanged, but the parameter set passed to the APIs are changed. + +**Adaptation Guide** + +The following uses RSA signing as an example. + +```js +import huks from '@ohos.security.huks'; + +let keyAlias = 'rsa_Key'; +let inData = new Uint8Array( + 0x4B, 0x1E, 0x22, 0x64, 0xA9, 0x89, 0x60, 0x1D, 0xEC, 0x78, 0xC0, 0x5D, 0xBE, 0x46, 0xAD, 0xCF, + 0x1C, 0x35, 0x16, 0x11, 0x34, 0x01, 0x4E, 0x9B, 0x7C, 0x00, 0x66, 0x0E, 0xCA, 0x09, 0xC0, 0xF3, +); +/* Parameters for signing */ +let signProperties = new Array(); +signProperties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_RSA, +} +signProperties[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_SIGN +} +signProperties[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_RSA_KEY_SIZE_2048, +} +signProperties[3] = { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_PSS, +} +signProperties[4] = { + tag: huks.HuksTag.HUKS_TAG_DIGEST, + value: huks.HuksKeyDigest.HUKS_DIGEST_SHA1, +} +signProperties[5] = { + tag: huks.HuksTag.HUKS_TAG_RSA_PSS_SALT_LEN_TYPE, + value: huks.HuksRsaPssSaltLenType.HUKS_RSA_PSS_SALT_LEN_MAX, +} +let signOptions = { + properties: signProperties, + inData: inData +} + +huks.initSession(keyAlias, signOptions); +``` + +For more information, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). + +## cl.huks.2 Resolved the Issues in Storage or Export of Derived or Agreed Keys + +Before the change, the HUKS supports storage and export of derived keys and agreed keys, which poses security risks. + +After the change, the application needs to pass in **HuksKeyStorageType** for key derivation or key agreement. Only storage or export is allowed at a time. If this parameter is not passed in, both storage and export are supported by default, which poses security risks and is not recommended. + +**Change Impact** + +Behaviors of released JavaScript APIs have been changed. + +**Key API/Component Changes** + +Released JavaScript APIs remain unchanged, but the parameter set passed to the APIs are changed. + +**Adaptation Guide** + +For more information, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). + +## cl.huks.3 Adding Tags for Fine-grained User Identity Access Control + +Added **HUKS_TAG_KEY_AUTH_PURPOSE** to **HuksTag** for fine-grained user identity access control. This tag specifies the user identity authentication used for specific algorithm. + +**Change Impact** + +The new HuksTag does not affect existing APIs. + +**Key API/Component Changes** + +**HuksTag** is added with **HUKS_TAG_KEY_AUTH_PURPOSE** to support fine-grained user identity access control. + +**Adaptation Guide** + +For more information, see [Fine-grained User Identity Authentication](../../../application-dev/security/huks-guidelines.md#fine-grained-user-identity-authentication) and [HuksTag](../../../application-dev/reference/apis/js-apis-huks.md#hukstag). diff --git a/zh-cn/application-dev/ai/Readme-CN.md b/zh-cn/application-dev/ai/Readme-CN.md new file mode 100644 index 0000000000000000000000000000000000000000..0ff55cec35e1532fb791f531e02f0717d8f3e7f0 --- /dev/null +++ b/zh-cn/application-dev/ai/Readme-CN.md @@ -0,0 +1,3 @@ +# AI + +- [使用MindSpore Lite引擎进行模型推理](mindspore-lite-js-guidelines.md) diff --git a/zh-cn/application-dev/ai/mindspore-lite-js-guidelines.md b/zh-cn/application-dev/ai/mindspore-lite-js-guidelines.md new file mode 100644 index 0000000000000000000000000000000000000000..2500313e7d0b8b2ade7b46d8741f35e8fe8d190d --- /dev/null +++ b/zh-cn/application-dev/ai/mindspore-lite-js-guidelines.md @@ -0,0 +1,120 @@ +# 使用MindSpore Lite引擎进行模型推理 + +## 场景介绍 + +MindSpore Lite是一款AI引擎,它提供了面向不同硬件设备AI模型推理的功能,目前已经在图像分类、目标识别、人脸识别、文字识别等应用中广泛使用。 + +本文介绍使用MindSpore Lite推理引擎实现模型推理的通用开发流程。对于使用Native接口实现模型推理,具体指导请见:[使用MindSpore Lite引擎进行模型推理 ](../napi/mindspore-lite-guidelines.md)。 + +## 基本概念 + +在进行开发前,请先了解以下概念。 + +**张量**:它与数组和矩阵非常相似,是MindSpore Lite网络运算中的基本数据结构。 + +**Float16推理模式**: Float16又称半精度,它使用16比特表示一个数。Float16推理模式表示推理的时候用半精度进行推理。 + +## 接口说明 +这里给出MindSpore Lite推理的通用开发流程中涉及的一些接口,具体请见下列表格。更多接口及详细内容,请见[@ohos.ai.mindSporeLite (推理能力)](../reference/apis/js-apis-mindSporeLite.md)。 + +| 接口名 | 描述 | +| ------------------ | ----------------- | +|loadModelFromFile(model: string, options: Context): Promise<Model>|从路径加载模型。| +|getInputs(): MSTensor[]|获取模型的输入。| +|predict(inputs: MSTensor[]): Promise<MSTensor>|推理模型。| +| getData(): ArrayBuffer | 获取张量的数据。 | +| setData(inputArray: ArrayBuffer): void | 设置张量的数据。 | + +## 开发步骤 + +主要流程包括模型的准备、读取、编译、推理和释放,具体开发过程及细节请见下文的开发步骤及示例。 + +1. 模型准备。需要的模型可以直接下载,也可以通过模型转换工具获得。需要的数据从bin文件读取。 + + - 下载模型的格式若为`.ms`,则可以直接使用。本文以mnet.caffemodel.ms为例。 + - 如果是第三方框架的模型,比如 TensorFlow、TensorFlow Lite、Caffe、ONNX等,可以使用[模型转换工具](https://www.mindspore.cn/lite/docs/zh-CN/r2.0/use/downloads.html#1-8-1)转换为`.ms`格式的模型文件。 +2. 创建上下文,设置线程数、设备类型等参数。 +3. 加载模型。本文从路径读入模型。 +4. 加载数据。模型执行之前需要先获取输入,再向输入的张量中填充数据。 +5. 执行推理并打印输出。使用predict接口进行模型推理。 +```js +@State inputName: string = 'mnet_caffemodel_nhwc.bin'; +@State T_model_predict: string = 'Test_MSLiteModel_predict' +inputBuffer: any = null; +build() { + Row() { + Column() { + Text(this.T_model_predict) + .focusable(true) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick(async () => { + //1.模型准备 + let context = globalThis.context; + context.resourceManager.getRawFileContent(this.inputName).then((error,buffer) => { + this.inputBuffer = buffer; + console.log('=========input bin byte length: ' + this.inputBuffer.byteLength) + }).catch(error) { + console.error('Failed to get buffer, error code: ${error.code},message:${error.message}.'); + } + //2.创建上下文 + let options = {'target': ['cpu']} + options.cpu.threadNum = 1; + options.cpu.threadAffinityMode = 0; + options.cpu.precisionMode = 'enforce_fp32'; + //3.加载模型 + let modelFile = '/data/storage/el2/base/haps/entry/files/mnet.caffemodel.ms'; + let msLiteModel = await mindSporeLite.loadModelFromFile(modelFile); + //4.加载数据 + const modelInputs = msLiteModel.getInputs(); + modelInputs[0].setData(this.inputBuffer.buffer); + //5.执行推理并打印输出 + console.log('=========MSLITE predict start=====') + msLiteModel.predict(modelInputs).then((modelOutputs) => { + let output0 = new Float32Array(modelOutputs[0].getData()); + for (let i = 0; i < output0.length; i++) { + console.log(output0[i].toString()); + } + }) + console.log('=========MSLITE predict success=====') + }) + } + .width('100%') + } + .height('100%') +} +``` + +## 调测验证 + +1. 在DevEco Studio 中连接rk3568开发板,点击Run entry,编译自己的hap,有如下显示: + + ```shell + Launching com.example.myapptfjs + $ hdc uninstall com.example.myapptfjs + $ hdc install -r "D:\TVOS\JSAPI\MyAppTfjs\entry\build\default\outputs\default\entry-default-signed.hap" + $ hdc shell aa start -a EntryAbility -b com.example.myapptfjs + ``` + +2. 使用hdc连接rk3568开发板,并将mnet.caffemodel.ms推送到设备中的沙盒目录。mnet_caffemodel_nhwc.bin在本地项目中的rawfile目录下。 + + ```shell + hdc -t 7001005458323933328a00bcdf423800 file send .\mnet.caffemodel.ms /data/app/el2/100/base/com.example.myapptfjs/haps/entry/files/ + ``` +3. 在rk3568屏幕中点击Test_MSLiteModel_predict触发用例,在HiLog打印结果中得到如下结果: + + ```shell + 08-27 23:25:50.278 31782-31782/? I C03d00/JSAPP: =========MSLITE predict start===== + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: 0.10046602040529252 + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: 0.07535600662231445 + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: 0.06326554715633392 + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: 0.0015114173293113708 + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: -0.026745859533548355 + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: -0.055590517818927765 + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: -0.05325715243816376 + 08-27 23:25:51.487 31782-31782/? I C03d00/JSAPP: -0.04629542678594589 + ... + 08-27 23:25:52.881 31782-31782/? I C03d00/JSAPP: 0.23317644000053404 + 08-27 23:25:52.881 31782-31782/? I C03d00/JSAPP: 0.17999525368213654 + 08-27 23:25:50.372 31782-31782/? I C03d00/JSAPP: =========MSLITE predict success===== + ``` diff --git a/zh-cn/application-dev/application-models/accessibilityextensionability.md b/zh-cn/application-dev/application-models/accessibilityextensionability.md index 088262861fe48b0d92ef3b5eef2f35395b0eae57..eac0c553dc83e1c1bc35afb437916033a6cbaa62 100644 --- a/zh-cn/application-dev/application-models/accessibilityextensionability.md +++ b/zh-cn/application-dev/application-models/accessibilityextensionability.md @@ -10,15 +10,6 @@ AccessibilityExtensionAbility基于ExtensionAbility框架,提供无障碍扩 > > Model: Stage -本文档将从以下场景来介绍AccessibilityExtensionAbility的基本开发: - -- [AccessibilityExtensionAbility概述](#accessibilityextensionability概述) -- [如何创建一个无障碍扩展服务](#如何创建一个无障碍扩展服务) -- [如何处理一个无障碍事件](#如何处理一个无障碍事件) -- [如何声明无障碍扩展服务具备的能力](#如何声明无障碍扩展服务具备的能力) -- [如何开启自定义的无障碍扩展服务](#如何开启自定义的无障碍扩展服务) -- [相关示例](#相关示例) - ## AccessibilityExtensionAbility概述 “信息无障碍”译自“Accessibility”,是指任何人在任何情况下都能平等、方便地获取信息并利用信息。其目的是缩小全社会不同阶层、不同地区、不同年龄、不同健康状况的人群在信息理解、信息交互、信息利用方面的数字鸿沟,使其更加方便地参与社会生活,享受数字发展带来的便利。 @@ -133,9 +124,9 @@ onAccessibilityEvent(accessibilityEvent) { 若开启或关闭成功,则会打印`enable ability successfully`或`disable ability successfully`。 -## 相关示例 +## 相关实例 -针对AccessibilityExtensionAbility开发,有以下相关示例可供参考: +针对AccessibilityExtensionAbility开发,有以下相关实例可供参考: [AccessibilityExtAbility的创建和使用(ArkTS)(API 9)(Full SDK)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/ApplicationModels/AccessibilityExtAbility) diff --git a/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md b/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md index cedc34b23bb67788c98024bea7b4ad303075f175..0289fc67984d9cce33aed0ddc3d537fa3a7c7a40 100644 --- a/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md +++ b/zh-cn/application-dev/application-models/arkts-ui-widget-event-call.md @@ -60,7 +60,7 @@ } function FunBCall(data) { - console.info('FunACall param:' + JSON.stringify(data.readString())); + console.info('FunBCall param:' + JSON.stringify(data.readString())); return null; } @@ -71,11 +71,13 @@ // 监听call事件所需的方法 this.callee.on('funA', FunACall); this.callee.on('funB', FunBCall); - } catch (error) { + } catch (err) { console.error(`Failed to register callee on. Cause: ${JSON.stringify(err)}`); } } + ... + // 进程退出时,解除监听 onDestroy() { try { diff --git a/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md b/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md index 1e984be68a6921e90853dd064ebc040308689d2a..67845df50f758ec6b99f4bcd69ce7421d5fc2d14 100644 --- a/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md +++ b/zh-cn/application-dev/application-models/arkts-ui-widget-event-overview.md @@ -55,7 +55,7 @@ Button('拉至后台') 'abilityName': 'EntryAbility', 'params': { 'method': 'fun', // 自定义调用的方法名,必填 - 'message': 'testForcall' // 自定义要发送的message + 'message': 'testForCall' // 自定义要发送的message } }); }) diff --git a/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md b/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md index 009683ed2d6a21fc29d2a0c0fce0e2d43e126f4e..857c403ab6aeeb7025bb694885273c0f0ed75aa1 100644 --- a/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md +++ b/zh-cn/application-dev/application-models/arkts-ui-widget-event-uiability.md @@ -148,7 +148,6 @@ import UIAbility from '@ohos.app.ability.UIAbility'; import formBindingData from '@ohos.app.form.formBindingData'; import formProvider from '@ohos.app.form.formProvider'; - import formInfo from '@ohos.app.form.formInfo'; const MSG_SEND_METHOD: string = 'funA'; diff --git a/zh-cn/application-dev/application-models/process-model-stage.md b/zh-cn/application-dev/application-models/process-model-stage.md index cf030e0ba0931f75a7ebd64757d8a355b8df36a1..57ab8441035cfb72c8d829540342a7a51c343544 100644 --- a/zh-cn/application-dev/application-models/process-model-stage.md +++ b/zh-cn/application-dev/application-models/process-model-stage.md @@ -4,10 +4,8 @@ OpenHarmony的进程模型如下图所示。 -- 应用中(同一Bundle名称)的所有UIAbility、ServiceExtensionAbility、DataShareExtensionAbility运行在同一个独立进程中,如下图中绿色部分的“Main Process”。 - -- 应用中(同一Bundle名称)的同一类型ExtensionAbility(除ServiceExtensionAbility和DataShareExtensionAbility外)运行在一个独立进程中,如下图中蓝色部分的“FormExtensionAbility Process”、“InputMethodExtensionAbility Process”、其他ExtensionAbility Process。 - +- 应用中(同一Bundle名称)的所有UIAbility、ServiceExtensionAbility和DataShareExtensionAbility均是运行在同一个独立进程(主进程)中,如下图中绿色部分的“Main Process”。 +- 应用中(同一Bundle名称)的所有同一类型ExtensionAbility(除ServiceExtensionAbility和DataShareExtensionAbility外)均是运行在一个独立进程中,如下图中蓝色部分的“FormExtensionAbility Process”、“InputMethodExtensionAbility Process”、其他ExtensionAbility Process。 - WebView拥有独立的渲染进程,如下图中黄色部分的“Render Process”。 diff --git a/zh-cn/application-dev/application-models/serviceextensionability.md b/zh-cn/application-dev/application-models/serviceextensionability.md index 53910c106c132262c4ad4ecdfdf1a26ae24cc09b..779781ed7aa83d3c9e8289ccb5bf833a68ed3d9e 100644 --- a/zh-cn/application-dev/application-models/serviceextensionability.md +++ b/zh-cn/application-dev/application-models/serviceextensionability.md @@ -449,9 +449,9 @@ ServiceExtensionAbility服务组件在[onConnect()](../reference/apis/js-apis-ap } ``` -## 相关示例 +## 相关实例 -针对ServiceExtensionAbility开发,有以下相关示例可供参考: +针对ServiceExtensionAbility开发,有以下相关实例可供参考: - [`AbilityConnectServiceExtension`:Ability与ServiceExtensionAbility通信(ArkTS)(API9)(Full SDK)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/IDL/AbilityConnectServiceExtension) - [`StageModel`:Stage模型(ArkTS)(API9)(Full SDK)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/ApplicationModels/StageModel) diff --git a/zh-cn/application-dev/application-models/thread-model-stage.md b/zh-cn/application-dev/application-models/thread-model-stage.md index 57ac44d934cee35e9b57e1a67bd8dd8047fa239a..ffa97516d3ca0adc7ded6460344f84d93741e835 100644 --- a/zh-cn/application-dev/application-models/thread-model-stage.md +++ b/zh-cn/application-dev/application-models/thread-model-stage.md @@ -4,7 +4,7 @@ 1. 执行UI绘制。 2. 管理主线程的ArkTS引擎实例,使多个UIAbility组件能够运行在其之上。 -3. 管理其他线程(例如Worker线程)的ArkTS引擎实例,例如启动和终止其他线程。 +3. 管理其他线程的ArkTS引擎实例,例如启动和终止Worker线程。 4. 分发交互事件。 5. 处理应用代码的回调,包括事件处理和生命周期管理。 6. 接收Worker线程发送的消息。 diff --git a/zh-cn/application-dev/application-models/uiability-launch-type.md b/zh-cn/application-dev/application-models/uiability-launch-type.md index 263dc70696a7ab8e0058516203d76b5692d18b34..724e5b5ee637d20b912c7fba6daf9229f01c1440 100644 --- a/zh-cn/application-dev/application-models/uiability-launch-type.md +++ b/zh-cn/application-dev/application-models/uiability-launch-type.md @@ -90,7 +90,7 @@ specified启动模式为指定实例模式,针对一些特殊场景使用( } ``` -2. 在创建UIAbility实例之前,开发者可以为该实例指定一个唯一的字符串Key,这样在调用[`startAbility()`](.../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法时,应用就可以根据指定的Key来识别响应请求的UIAbility实例。在EntryAbility中,调用[`startAbility()`](.../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法时,可以在`want`参数中增加一个自定义参数,例如`instanceKey`,以此来区分不同的UIAbility实例。 +2. 在创建UIAbility实例之前,开发者可以为该实例指定一个唯一的字符串Key,这样在调用[`startAbility()`](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法时,应用就可以根据指定的Key来识别响应请求的UIAbility实例。在EntryAbility中,调用[`startAbility()`](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法时,可以在`want`参数中增加一个自定义参数,例如`instanceKey`,以此来区分不同的UIAbility实例。 ```ts // 在启动指定实例模式的UIAbility时,给每一个UIAbility实例配置一个独立的Key标识 diff --git a/zh-cn/application-dev/application-test/arkxtest-guidelines.md b/zh-cn/application-dev/application-test/arkxtest-guidelines.md index a7853c68efae3a1f75847e79aae5da8612156282..a69b92d96334cfd31e36bcf97d289707250fd78e 100644 --- a/zh-cn/application-dev/application-test/arkxtest-guidelines.md +++ b/zh-cn/application-dev/application-test/arkxtest-guidelines.md @@ -3,42 +3,38 @@ ## 概述 -为支撑OpenHarmony操作系统的自动化测试活动开展,我们提供了支持JS/TS语言的单元及UI测试框架,支持开发者针对应用接口或系统接口进行单元测试,并且可基于UI操作进行UI自动化脚本的编写。 +OpenHarmony的自动化测试框架arkxtest,作为工具集的重要组成部分,支持JS/TS语言的单元测试框架(JsUnit)及UI测试框架(UiTest)。
JsUnit提供单元测试用例执行能力,提供用例编写基础接口,生成对应报告,用于测试系统或应用接口。
UiTest通过简洁易用的API提供查找和操作界面控件能力,支持用户开发基于界面操作的自动化测试脚本。本指南介绍了测试框架的主要功能、实现原理、环境准备,以及测试脚本编写和执行等内容。 -本指南重点介绍自动化测试框架的主要功能,同时介绍编写单元/UI自动化测试脚本的方法以及执行过程。 +## 实现原理 -### 简介 +测试框架分为单元测试框架和UI测试框架。
单元测试框架是测试框架的基础底座,提供了最基本的用例识别、调度、执行及结果汇总的能力。
UI测试框架主要对外提供了UiTest API供开发人员在对应测试场景调用,而其脚本的运行基础仍是单元测试框架。 -OpenHarmony自动化测试框架arkxtest,作为OpenHarmony工具集的重要组成部分,提供了OpenHarmony自动化脚本编写和运行的基础能力。编写方面提供了一系列支持测试脚本编写的API,包括了基础流程API、断言API以及UI操作相关的API,运行方面提供了识别测试脚本、调度执行测试脚本以及汇总测试脚本执行结果的能力。 +### 单元测试框架 - -### 实现原理 - -框架重要分为两大部分:单元测试框架和UI测试框架。 - -- 单元测试框架 - - 单元测试框架是测试框架的基础底座,提供了最基本的用例识别、调度、执行及结果汇总的能力。主要功能如下图所示: + 图1.单元测试框架主要功能 ![](figures/UnitTest.PNG) - 单元测试脚本的基础运行流程如下图所示,依赖aa test命令作为执行入口。 - + 图2.脚本基础流程运行图 + ![](figures/TestFlow.PNG) -- UI测试框架 +> **说明:** +> +> 单元测试框架中的函数具体含义请参考[函数定义](https://gitee.com/openharmony/testfwk_arkxtest/blob/master/README_zh.md#%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E)。 - UI测试框架主要对外提供了[UiTest API](../reference/apis/js-apis-uitest.md)供开发人员在对应测试场景调用,而其脚本的运行基础还是上面提到的单元测试框架。 +### UI测试框架 - UI测试框架的主要功能如下图所示: + 图3.UI测试框架主要功能 ![](figures/Uitest.PNG) -### 约束与限制 +## 约束与限制 - UI测试框架的能力在OpenHarmony 3.1 release版本之后方可使用,历史版本不支持使用。 + - 单元测试框架的部分能力与其版本有关,具体能力与版本匹配信息可见代码仓中的[文档介绍](https://gitee.com/openharmony/testfwk_arkxtest/blob/master/README_zh.md)。 @@ -62,6 +58,18 @@ DevEco Studio可参考其官网介绍进行[下载](https://developer.harmonyos. ## 编写单元测试脚本 +本章节主要描述单元测试框架支持能力,以及能力的使用方法。 + +在单元测试框架,测试脚本需要包含如下基本元素: + +1、依赖导包,以便使用依赖的测试接口。 + +2、测试代码编写,主要编写测试代码的相关逻辑,如接口调用等。 + +3、断言接口调用,设置测试代码中的检查点,如无检查点,则不可认为一个完整的测试脚本。 + +如下示例代码实现的场景是:启动测试页面,检查设备当前显示的页面是否为预期页面。 + ```TS import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import abilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; @@ -93,25 +101,17 @@ export default function abilityTest() { } ``` -单元测试脚本需要包含如下基本元素: - -1、依赖导包,以便使用依赖的测试接口。 - -2、测试代码编写,主要编写测试代码的相关逻辑,如接口调用等。 - -3、断言接口调用,设置测试代码中的检查点,如无检查点,则不可认为一个完整的测试脚本。 - ## 编写UI测试脚本 -UI测试脚本是在单元测试框架的基础上编写,主要就是增加了UI测试框架提供的接口调用,实现对应的测试逻辑。 +本章节主要介绍UI测试框架支持能力,以及对应能力API的使用方法。
UI测试基于单元测试,UI测试脚本在单元测试脚本上增加了对UiTest接口(提供链接)调用,进而完成对应的测试活动。
如下的示例代码是在上面的单元测试脚本基础上增量编写,实现的是在启动的应用页面上进行点击操作,然后检测当前页面变化是否为预期变化。 -下面的示例代码是在上面的测试脚本基础上增量编写,首先需要增加依赖导包,如下示例代码所示: +1.增加依赖导包。 ```js import {Driver,ON,Component,MatchPattern} from '@ohos.uitest' ``` -然后是具体测试代码编写,场景较为简单,就是在启动的应用页面上进行点击操作,然后增加检查点检查用例。 +2.编写具体测试代码。 ```js export default function abilityTest() { @@ -158,11 +158,11 @@ export default function abilityTest() { 通过点击按钮执行,当前支持以下执行方式: -1、测试包级别执行即执行测试包内的全部用例。 +1、测试包级别执行,即执行测试包内的全部用例。 -2、测试套级别执行即执行describe方法中定义的全部测试用例。 +2、测试套级别执行,即执行describe方法中定义的全部测试用例。 -3、测试方法级别执行即执行指定it方法也就是单条测试用例。 +3、测试方法级别执行,即执行指定it方法也就是单条测试用例。 ![](figures/Execute.PNG) @@ -172,9 +172,17 @@ export default function abilityTest() { ![](figures/TestResult.PNG) +**查看测试用例覆盖率** + +执行完测试用例后可以查看测试用例覆盖率,具体操作请参考[OpenHarmony Test代码覆盖率统计](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/harmonyos_jnit_jsunit-0000001092459608-V3?catalogVersion=V3#section1989615417457) + ### CMD执行 -通过在cmd窗口中输入aa命令执行触发用例执行,并通过设置执行参数触发不同功能。 +将应用测试包安装到测试设备上,在cmd窗口中执行aa命令,完成对用例测试。 + +> **说明:** +> +> 使用cmd的方式,需要配置好hdc相关的环境变量。 **aa test命令执行配置参数** @@ -201,74 +209,72 @@ export default function abilityTest() { | size | 指定要执行用例的用例规模 | small,medium,large | -s size small | stress | 指定要执行用例的执行次数 | 正整数 | -s stress 1000 | -**通过在cmd窗口直接执行命令。** - -> 使用cmd的方式,需要配置好hdc相关的环境变量 +**cmd窗口执行test命令** - 打开cmd窗口 - 执行 aa test 命令 -**示例代码1**:执行所有测试用例。 +示例代码1:执行所有测试用例。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner ``` -**示例代码2**:执行指定的describe测试套用例,指定多个需用逗号隔开。 +示例代码2:执行指定的describe测试套用例,指定多个需用逗号隔开。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s class s1,s2 ``` -**示例代码3**:执行指定测试套中指定的用例,指定多个需用逗号隔开。 +示例代码3:执行指定测试套中指定的用例,指定多个需用逗号隔开。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s class testStop#stop_1,testStop1#stop_0 ``` -**示例代码4**:执行指定除配置以外的所有的用例,设置不执行多个测试套需用逗号隔开。 +示例代码4:执行指定除配置以外的所有的用例,设置不执行多个测试套需用逗号隔开。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s notClass testStop ``` -**示例代码5**:执行指定it名称的所有用例,指定多个需用逗号隔开。 +示例代码5:执行指定it名称的所有用例,指定多个需用逗号隔开。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s itName stop_0 ``` -**示例代码6**:用例执行超时时长配置。 +示例代码6:用例执行超时时长配置。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s timeout 15000 ``` -**示例代码7**:用例以breakOnError模式执行用例。 +示例代码7:用例以breakOnError模式执行用例。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s breakOnError true ``` -**示例代码8**:执行测试类型匹配的测试用例。 +示例代码8:执行测试类型匹配的测试用例。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s testType function ``` -**示例代码9**:执行测试级别匹配的测试用例。 +示例代码9:执行测试级别匹配的测试用例。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s level 0 ``` -**示例代码10**:执行测试规模匹配的测试用例。 +示例代码10:执行测试规模匹配的测试用例。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s size small ``` -**示例代码11**:执行测试用例指定次数。 +示例代码11:执行测试用例指定次数。 ```shell hdc shell aa test -b xxx -p xxx -s unittest OpenHarmonyTestRunner -s stress 1000 @@ -299,14 +305,14 @@ OHOS_REPORT_STATUS: consuming=4 | 日志输出字段 | 日志输出字段含义 | | ------- | -------------------------| -| OHOS_REPORT_SUM | 当前测试套用例总数 | -| OHOS_REPORT_STATUS: class | 当前执行用例测试套名称| -| OHOS_REPORT_STATUS: id | 用例执行语言,默认JS | -| OHOS_REPORT_STATUS: numtests | 测试包中测试用例总数 | -| OHOS_REPORT_STATUS: stream | 当前用例发生错误时,记录错误信息 | -| OHOS_REPORT_STATUS: test| 当前用例执行的it name | -| OHOS_REPORT_STATUS_CODE | 当前用例执行结果状态 0 (pass) 1(error) 2(fail) | -| OHOS_REPORT_STATUS: consuming | 当前用例执行消耗的时长 | +| OHOS_REPORT_SUM | 当前测试套用例总数。 | +| OHOS_REPORT_STATUS: class | 当前执行用例测试套名称。| +| OHOS_REPORT_STATUS: id | 用例执行语言,默认JS。 | +| OHOS_REPORT_STATUS: numtests | 测试包中测试用例总数 。| +| OHOS_REPORT_STATUS: stream | 当前用例发生错误时,记录错误信息。 | +| OHOS_REPORT_STATUS: test| 当前用例执行的it name。 | +| OHOS_REPORT_STATUS_CODE | 当前用例执行结果状态。0表示通过,1表示错误,2表示失败。| +| OHOS_REPORT_STATUS: consuming | 当前用例执行消耗的时长(ms)。 | - cmd执行完成后,会打印如下相关日志信息。 @@ -320,14 +326,70 @@ OHOS_REPORT_STATUS: taskconsuming=16029 ``` | 日志输出字段 | 日志输出字段含义 | | ------------------| -------------------------| -| run | 当前测试包用例总数 | -| Failure | 当前测试失败用例个数 | -| Error | 当前执行用例发生错误用例个数 | -| Pass | 当前执行用例通过用例个数 | -| Ignore | 当前未执行用例个数 | -| taskconsuming| 执行当前测试用例总耗时 | +| run | 当前测试包用例总数。 | +| Failure | 当前测试失败用例个数。 | +| Error | 当前执行用例发生错误用例个数。 | +| Pass | 当前执行用例通过用例个数 。| +| Ignore | 当前未执行用例个数。 | +| taskconsuming| 执行当前测试用例总耗时(ms)。 | + +> 当处于breakOnError模式,用例发生错误时,注意查看Ignore以及中断说明。 + +## 相关实例 + +### 单元测试脚本实例 + +#### 单元测试断言功能使用实例 +介绍单元测试框架中支持的断言能力如何使用,具体代码请查看[断言能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/jsunit/entry/src/ohosTest/ets/test/assertExampleTest/assertExample.test.ets) + +#### 单元测试测试套定义使用实例 +介绍单元测试框架测试套嵌如何定义,包括嵌套定义能力,具体代码请参考[测试套嵌套示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/jsunit/entry/src/ohosTest/ets/test/coverExampleTest/coverExample.test.ets) + +#### 单元测试测试应用自定义函数使用实例 +介绍针对应用内自定义函数如何使用框架能力进行测试,具体代码请参考[应用自定义函数测试示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/jsunit/entry/src/ohosTest/ets/test/customExampleTest/customExample.test.ets) + +#### 单元测试数据驱动能力使用实例 +介绍测试框架数据驱动能力、脚本重复执行配置功能,具体代码请参考[数据驱动能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/jsunit/entry/src/ohosTest/ets/test/paramExampleTest/paramExample.test.ets) + +### UI测试脚本实例(控件类) + +#### 查找指定控件能力实例 +介绍通过设置控件属性作为查找条件,在应用界面上查找组件对象,具体代码请参考[控件查找示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/findCommentExampleTest/Component/findCommentExample.test.ets) + +#### 模拟点击操作事件能力实例 +介绍模拟用户在应用界面上进行点击,长按,双击等事件,具体代码请参考[点击事件示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/clickEvent.test.ets) -> 当处于breakOnError模式,用例发生错误时,注意查看Ignore以及中断说明 +#### 模拟鼠标操作能力实例 +介绍模拟鼠标左击、右击、滑轮事件,具体代码请参考[鼠标操作事件示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/MouseEvent.test.ets) + +#### 模拟文本输入能力实例 +介绍模拟输入中文、英文文本内容,使用前提是针对可以输入文本的组件类似文本框等组件进行操作,具体代码请参考[文本输入能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/InputEvent.test.ets) + +#### 截图能力实例 +介绍屏幕截图功能,包括指定区域截图能力,具体代码请参考[截图能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/ScreenCapEvent.test.ets) + +#### 模拟快滑操作能力实例 +介绍模拟快滑操作能力,即在可滑动页面上进行滑动,滑动后手指离开屏幕,具体代码请参考[模拟快滑操作能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/FlingEvent.test.ets) + +#### 模拟慢滑操作能力实例 +介绍模拟慢滑操作能力,即在可滑动页面上进行滑动,滑动后手指仍停留在屏幕,具体代码请参考[模拟慢滑操作能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/SwipeEvent.test.ets) + +#### 模拟缩放操作能力实例 +介绍模拟缩放能力,即在支持放大缩小的图片上,模拟双指缩放操作的能力,具体代码请参考[模拟缩放操作能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/PinchEvent.test.ets) + +#### 模拟滚动到组件顶端或底端能力实例 +介绍模拟针对滑动类组件,可以模拟操作直接滚动到组件顶端或底端,具体代码请参考[模拟滚动到组件顶端或底端示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/ui/ScrollerEvent.test.ets) + +### UI测试脚本实例(窗口类) + +#### 查找指定窗口能力实例 +介绍通过应用报名查找应用窗口,具体代码请参考[查找指定窗口能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/findCommentExampleTest/window/findWindowExample.test.ets) + +#### 模拟窗口移动能力实例 +介绍模拟移动窗口到指定位置能力,具体代码请参考[模拟窗口移动示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/window/MoveToEvent.test.ets) + +#### 模拟调整窗口大小能力实例 +介绍模拟调整窗口大小能力,并可指定调整的具体方向,具体代码请参考[模拟调整窗口大小能力示例](https://gitee.com/openharmony/applications_app_samples/blob/master/code/Project/Test/uitest/entry/src/ohosTest/ets/test/operationExampleTest/window/ReSizeWindow.test.ets) ## 常见问题 @@ -422,7 +484,7 @@ UI测试用例执行失败,查看hilog日志发现日志中有“uitest-api do **3、失败日志有“does not exist on current UI! Check if the UI has changed after you got the widget object”错误信息** -**问题描述** +**问题描述** UI测试用例执行失败,查看hilog日志发现日志中有“does not exist on current UI! Check if the UI has changed after you got the widget object”错误信息。 diff --git a/zh-cn/application-dev/file-management/app-file-upload-download.md b/zh-cn/application-dev/file-management/app-file-upload-download.md index 6e04ff93d8700c4357172d72db1720eaa315cab8..a4c8e623bfaa943a9043fcc1b9bbc458dfe42243 100644 --- a/zh-cn/application-dev/file-management/app-file-upload-download.md +++ b/zh-cn/application-dev/file-management/app-file-upload-download.md @@ -48,7 +48,7 @@ try { .then((uploadTask) => { uploadTask.on('complete', (taskStates) => { for (let i = 0; i < taskStates.length; i++) { - console.info(`upload complete taskState: ${JSON.stringify(taskStates[i])}'); + console.info(`upload complete taskState: ${JSON.stringify(taskStates[i])}`); } }); }) diff --git a/zh-cn/application-dev/file-management/figures/application-file-directory-structure.png b/zh-cn/application-dev/file-management/figures/application-file-directory-structure.png index 9a4b622dbcd94afaaf13a4fc8bf22e9636d1337b..986260d28e8bcde7058f40ba3f9b7a8b7a5b8d17 100644 Binary files a/zh-cn/application-dev/file-management/figures/application-file-directory-structure.png and b/zh-cn/application-dev/file-management/figures/application-file-directory-structure.png differ diff --git a/zh-cn/application-dev/key-features/multi-device-app-dev/adaptive-layout.md b/zh-cn/application-dev/key-features/multi-device-app-dev/adaptive-layout.md index af330e4a9d328360bfc7806c1d2161cc1e5f967c..10963cd30c214bcaad17668976d3f2b38391312e 100644 --- a/zh-cn/application-dev/key-features/multi-device-app-dev/adaptive-layout.md +++ b/zh-cn/application-dev/key-features/multi-device-app-dev/adaptive-layout.md @@ -190,7 +190,7 @@ struct FlexibleCapabilitySample2 { @Entry @Component struct EquipartitionCapabilitySample { - const list: number [] = [0, 1, 2, 3] + readonly list: number [] = [0, 1, 2, 3] @State rate: number = 0.6 // 底部滑块,可以通过拖拽滑块改变容器尺寸 @@ -424,8 +424,8 @@ struct ScaleCapabilitySample { .border({ width: 2, color: "#66F1CCB8"}) // 边框,仅用于展示效果 } .backgroundColor("#FFFFFF") - .height(this.sliderWidth) - .width(this.sliderHeight) + .height(this.sliderHeight) + .width(this.sliderWidth) this.slider() }.width('100%') @@ -709,7 +709,7 @@ struct HiddenCapabilitySample { @Component struct WrapCapabilitySample { @State rate: number = 0.7 - const imageList: Resource [] = [ + readonly imageList: Resource [] = [ $r('app.media.flexWrap1'), $r('app.media.flexWrap2'), $r('app.media.flexWrap3'), diff --git a/zh-cn/application-dev/media/Readme-CN.md b/zh-cn/application-dev/media/Readme-CN.md index 79a8ff50f3d8271c746b48def05d129f844c1a56..333eed55706b965441bf2e9b97a0dbd59cd137fc 100755 --- a/zh-cn/application-dev/media/Readme-CN.md +++ b/zh-cn/application-dev/media/Readme-CN.md @@ -12,6 +12,7 @@ - [使用TonePlayer开发音频播放功能(仅对系统应用开放)](using-toneplayer-for-playback.md) - [多音频播放的并发策略](audio-playback-concurrency.md) - [播放音量管理](volume-management.md) + - [音效管理](audio-effect-management.md) - [音频播放流管理](audio-playback-stream-management.md) - [音频输出设备管理](audio-output-device-management.md) - [分布式音频播放(仅对系统应用开放)](distributed-audio-playback.md) @@ -54,7 +55,8 @@ - [图片开发概述](image-overview.md) - [图片解码](image-decoding.md) - 图片处理 - - [图像变换](image-transformation.md) + - [图像变换(ArkTS)](image-transformation.md) + - [图像变换(Native)](image-transformation-native.md) - [位图操作](image-pixelmap-operation.md) - [图片编码](image-encoding.md) - [图片工具](image-tool.md) diff --git a/zh-cn/application-dev/media/audio-effect-management.md b/zh-cn/application-dev/media/audio-effect-management.md new file mode 100644 index 0000000000000000000000000000000000000000..0557a69155b366a213b73e450b407f0b73be3522 --- /dev/null +++ b/zh-cn/application-dev/media/audio-effect-management.md @@ -0,0 +1,118 @@ +# 音效管理 + +音效管理主要包括播放实例音效管理和全局音效查询两部分,播放实例音效管理主要包括查询和设置当前音频播放流的音效模式,全局音效查询支持查询ContentType和StreamUsage对应场景支持的音效模式。 + +## 播放实例音效管理 + +主要包括查询和设置当前音频播放流的音效模式,音效模式包括EFFECT_NONE关闭音效模式和EFFECT_DEFAULT默认音效模式。默认音效模式会根据创建音频流的ContentType和StreamUsage自动加载对应场景的音效。 + +### 获取播放实例 + +管理播放实例音效的接口是getAudioEffectMode()查询当前音频播放流的音效模式和setAudioEffectMode(mode: AudioEffectMode)设置当前音频播放流的音效模式,在使用之前,需要使用createAudioRenderer(options: AudioRendererOptions)先创建音频播放流AudioRenderer实例。 + +1. 步骤一:导入音频接口。 + + ```js + import audio from '@ohos.multimedia.audio'; + ``` + +2. 步骤二:配置音频渲染参数并创建AudioRenderer实例,音频渲染参数的详细信息可以查看[AudioRendererOptions](../reference/apis/js-apis-audio.md#audiorendereroptions8),创建AudioRenderer实例时会默认挂载EFFECT_DEFAULT模式音效。 + + ```js + let audioStreamInfo = { + samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_44100, + channels: audio.AudioChannel.CHANNEL_1, + sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE, + encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW + }; + + let audioRendererInfo = { + content: audio.ContentType.CONTENT_TYPE_SPEECH, + usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, + rendererFlags: 0 + }; + + let audioRendererOptions = { + streamInfo: audioStreamInfo, + rendererInfo: audioRendererInfo + }; + + audio.createAudioRenderer(audioRendererOptions, (err, data) => { + if (err) { + console.error(`Invoke createAudioRenderer failed, code is ${err.code}, message is ${err.message}`); + return; + } else { + console.info('Invoke createAudioRenderer succeeded.'); + let audioRenderer = data; + } + }); + ``` + +### 查询当前播放实例的音效模式 + + ```js + audioRenderer.getAudioEffectMode((err, effectmode) => { + if (err) { + console.error(`Failed to get params, code is ${err.code}, message is ${err.message}`); + return; + } else { + console.info(`getAudioEffectMode: ${effectmode}`); + } + }); + ``` + +### 设置当前播放实例的音效模式 + +关闭系统音效: + + ```js + audioRenderer.setAudioEffectMode(audio.AudioEffectMode.EFFECT_NONE, (err) => { + if (err) { + console.error(`Failed to set params, code is ${err.code}, message is ${err.message}`); + return; + } else { + console.info('Callback invoked to indicate a successful audio effect mode setting.'); + } + }); + ``` + +开启系统音效默认模式: + + ```js + audioRenderer.setAudioEffectMode(audio.AudioEffectMode.EFFECT_DEFAULT, (err) => { + if (err) { + console.error(`Failed to set params, code is ${err.code}, message is ${err.message}`); + return; + } else { + console.info('Callback invoked to indicate a successful audio effect mode setting.'); + } + }); + ``` + +## 全局查询音效模式 + +主要包括全局音效查询相应ContentType和StreamUsage对应场景的音效模式。 +对于播放音频类的应用,开发者需要关注该应用的音频流使用什么音效模式并做出相应的操作,比如音乐App播放时,应选择音乐场景下的模式。在使用查询接口前,开发者需要使用getStreamManager()创建一个AudioStreamManager音频流管理实例。 + +### 获取音频流管理接口 + +1.创建AudioStreamManager实例。在使用AudioStreamManager的API前,需要使用getStreamManager()创建一个AudioStreamManager实例。 + + ```js + import audio from '@ohos.multimedia.audio'; + let audioManager = audio.getAudioManager(); + let audioStreamManager = audioManager.getStreamManager(); + ``` + +### 查询对应场景的音效模式 + + ```js + audioStreamManager.getAudioEffectInfoArray(audio.ContentType.CONTENT_TYPE_MUSIC, audio.StreamUsage.STREAM_USAGE_MEDIA, async (err, audioEffectInfoArray) => { + if (err) { + console.error(`Failed to get effect info array`); + return; + } else { + console.info(`getAudioEffectInfoArray: ${audioEffectInfoArray}`); + } + }); + ``` diff --git a/zh-cn/application-dev/media/audio-output-device-management.md b/zh-cn/application-dev/media/audio-output-device-management.md index 192efbfa08c217912ee4ebc2bdbcb9a0538d382e..25a59e83677e8a00ede5df72211cb50c5fbbce27 100644 --- a/zh-cn/application-dev/media/audio-output-device-management.md +++ b/zh-cn/application-dev/media/audio-output-device-management.md @@ -45,16 +45,14 @@ audioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) ```ts // 监听音频设备状态变化 audioRoutingManager.on('deviceChange', audio.DeviceFlag.OUTPUT_DEVICES_FLAG, (deviceChanged) => { - console.info('device change type : ' + deviceChanged.type); // 设备连接状态变化,0为连接,1为断开连接 - console.info('device descriptor size : ' + deviceChanged.deviceDescriptors.length); - console.info('device change descriptor : ' + deviceChanged.deviceDescriptors[0].deviceRole); // 设备角色 - console.info('device change descriptor : ' + deviceChanged.deviceDescriptors[0].deviceType); // 设备类型 + console.info(`device change type : ${deviceChanged.type}`); // 设备连接状态变化,0为连接,1为断开连接 + console.info(`device descriptor size : ${deviceChanged.deviceDescriptors.length}`); + console.info(`device change descriptor : ${deviceChanged.deviceDescriptors[0].deviceRole}`); // 设备角色 + console.info(`device change descriptor : ${deviceChanged.deviceDescriptors[0].deviceType}`); // 设备类型 }); // 取消监听音频设备状态变化 -audioRoutingManager.off('deviceChange', (deviceChanged) => { - console.info('Should be no callback.'); -}); +audioRoutingManager.off('deviceChange'); ``` ## 选择音频输出设备(仅对系统应用开放) @@ -88,3 +86,46 @@ async function selectOutputDevice(){ }); } ``` + +## 获取最高优先级输设备信息 + +使用getPreferOutputDeviceForRendererInfo()方法, 可以获取当前最高优先级的输出设备。 + +> **说明:** +> +> 最高优先级输出设备表示声音将在此设备输出的设备。 + +```ts +let rendererInfo = { + content : audio.ContentType.CONTENT_TYPE_MUSIC, + usage : audio.StreamUsage.STREAM_USAGE_MEDIA, + rendererFlags : 0, +} + +async function getPreferOutputDeviceForRendererInfo() { + audioRoutingManager.getPreferOutputDeviceForRendererInfo(rendererInfo).then((desc) => { + console.info(`device descriptor: ${desc}`); + }).catch((err) => { + console.error(`Result ERROR: ${err}`); + }) +} +``` + +## 监听最高优先级输出设备变化 + +```ts +let rendererInfo = { + content : audio.ContentType.CONTENT_TYPE_MUSIC, + usage : audio.StreamUsage.STREAM_USAGE_MEDIA, + rendererFlags : 0, +} + +// 监听最高优先级输出设备变化 +audioRoutingManager.on('preferOutputDeviceChangeForRendererInfo', rendererInfo, (desc) => { + console.info(`device change descriptor : ${desc.deviceDescriptors[0].deviceRole}`); // 设备角色 + console.info(`device change descriptor : ${desc.deviceDescriptors[0].deviceType}`); // 设备类型 +}); + +// 取消监听最高优先级输出设备变化 +audioRoutingManager.off('preferOutputDeviceChangeForRendererInfo'); +``` diff --git a/zh-cn/application-dev/media/image-transformation-native.md b/zh-cn/application-dev/media/image-transformation-native.md new file mode 100644 index 0000000000000000000000000000000000000000..27e6172b8681df5f7600b1739159146248acd043 --- /dev/null +++ b/zh-cn/application-dev/media/image-transformation-native.md @@ -0,0 +1,241 @@ +# 图像变换(Native) + +开发者可以通过本指导了解如何使用Native Image进行图片处理,包括图片的裁剪、旋转、缩放、翻转、偏移、设置透明度等。 + +## 开发步骤 + + +**添加依赖** + +在进行应用开发之前,开发者需要打开native工程的src/main/cpp/CMakeLists.txt,在target_link_libraries依赖中添加image的libpixelmap_ndk.z.so以及日志依赖libhilog_ndk.z.so。 + + ```txt + target_link_libraries(entry PUBLIC libace_napi.z.so libhilog_ndk.z.so libpixelmap_ndk.z.so) + ``` + +**添加接口映射** + +打开src/main/cpp/hello.cpp文件,在Init函数中添加接口映射如下: + + ```c++ + EXTERN_C_START + static napi_value Init(napi_env env, napi_value exports) + { + napi_property_descriptor desc[] = { + { "createPixelMap", nullptr, CreatePixelMap, nullptr, nullptr, nullptr, napi_default, nullptr }, + { "createAlphaPixelMap", nullptr, CreateAlphaPixelMap, nullptr, nullptr, nullptr, napi_default, nullptr }, + { "transform", nullptr, Transform, nullptr, nullptr, nullptr, napi_default, nullptr } + }; + + napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); + return exports; + } + EXTERN_C_END + ``` + + +**Native接口调用** + +具体接口说明请参考[API文档](../reference/native-apis/image.md) + +在hello.cpp文件中获取JS的资源对象,并转为Native的资源对象,即可调用Native接口,调用方式示例代码如下: + +1. 根据像素数组创建PixelMap对象。 + + ```c++ + //创建PixelMap对象 + napi_value CreatePixelMap(napi_env env, napi_callback_info info) + { + napi_value udfVar = nullptr; + napi_value thisVar = nullptr; + napi_value argValue[2] = {0}; + size_t argCount = 2; + + void* buffer = nullptr; + size_t bufferSize = 0; + struct OhosPixelMapCreateOps createOps; + napi_value pixelmap = nullptr; + + napi_get_undefined(env, &udfVar); + napi_get_cb_info(env, info, &argCount, argValue, &thisVar, nullptr); + if (napi_get_arraybuffer_info(env, argValue[0], &buffer, &bufferSize) != napi_ok || + buffer == nullptr || bufferSize == 0) { + return udfVar; + } + + createOps.width = 4; + createOps.height = 6; + createOps.pixelFormat = 4; + createOps.alphaType = 0; + int32_t res = OH_PixelMap_CreatePixelMap(env, createOps, (uint8_t *)buffer, bufferSize, &pixelmap); + if (res != OHOS_IMAGE_RESULT_SUCCESS || pixelmap == nullptr) { + return udfVar; + } + return pixelmap; + } + + //创建仅含有alpha通道的PixelMap对象 + napi_value CreateAlphaPixelMap(napi_env env, napi_callback_info info) + { + napi_value udfVar = nullptr; + napi_value thisVar = nullptr; + napi_value argValue[1] = {0}; + size_t argCount = 1; + + napi_value alphaPixelmap = nullptr; + + napi_get_undefined(env, &udfVar); + + if (napi_get_cb_info(env, info, &argCount, argValue, &thisVar, nullptr) != napi_ok || + argCount < 1 || argValue[0] == nullptr) { + return udfVar; + } + int32_t res = OH_PixelMap_CreateAlphaPixelMap(env, argValue[0], &alphaPixelmap); + if (res != OHOS_IMAGE_RESULT_SUCCESS || alphaPixelmap == nullptr) { + return udfVar; + } + return alphaPixelmap; + } + ``` + +2. 图像变换。具体操作参考示例代码注释。 + + ```c++ + napi_value Transform(napi_env env, napi_callback_info info) + { + napi_value thisVar = nullptr; + napi_value argValue[1] = {0}; + size_t argCount = 1; + + if (napi_get_cb_info(env, info, &argCount, argValue, &thisVar, nullptr) != napi_ok || + argCount < 1 || argValue[0] == nullptr) { + return nullptr; + } + napi_value result = nullptr; + napi_get_undefined(env, &result); + + NativePixelMap* native = OH_PixelMap_InitNativePixelMap(env, argValue[0]); + if (native == nullptr) { + return result; + } + + //获取图片信息。 + struct OhosPixelMapInfo pixelmapInfo; + OH_PixelMap_GetImageInfo(native, &pixelmapInfo); + + //获取PixelMap对象每行字节数。 + int32_t rowBytes; + OH_PixelMap_GetBytesNumberPerRow(native, &rowBytes); + + //获取PixelMap对象是否可编辑的状态。 + int32_t editable = 0; + OH_PixelMap_GetIsEditable(native, &editable); + + //获取PixelMap对象是否支持Alpha通道。 + int32_t supportAlpha = 0; + OH_PixelMap_IsSupportAlpha(native, &supportAlpha); + + //设置PixelMap对象的Alpha通道。 + int32_t alphaAble = 0; + OH_PixelMap_SetAlphaAble(native, alphaAble); + + //获取PixelMap对象像素密度。 + int32_t densityG; + OH_PixelMap_GetDensity(native, &densityG); + + //设置PixelMap对象像素密度。 + int32_t densityS = 100; + OH_PixelMap_SetDensity(native, densityS); + + //设置PixelMap对象的透明度。 + float opacity = 0.5; + OH_PixelMap_SetOpacity(native, opacity); + + //设置缩放比例。 + //scaleX:宽为原来的0.5。 + //scaleY:高为原来的0.5。 + float scaleX = 0.5; + float scaleY = 0.5; + OH_PixelMap_Scale(native, scaleX, scaleY); + + //设置偏移。 + //translateX:向下偏移50。 + //translateY:向右偏移50。 + float translateX = 50; + float translateY = 50; + OH_PixelMap_Translate(native, translateX, translateY); + + //设置顺时针旋转90度。 + float angle = 90; + OH_PixelMap_Rotate(native, angle); + + //设置翻转 + //flipX:水平翻转。0为不翻转,1为翻转。 + //flipY:垂直翻转。0为不翻转,1为翻转。 + int32_t flipX = 0; + int32_t flipY = 1; + OH_PixelMap_Flip(native, flipX, flipY); + + //设置裁剪区域。 + // cropX:裁剪起始点横坐标0 + // cropY:裁剪起始点纵坐标0 + // cropH:裁剪高度10,方向为从上往下(裁剪后的图片高度为10) + // cropW:裁剪宽度10,方向为从左到右(裁剪后的图片宽度为10 + int32_t cropX = 1; + int32_t cropY = 1; + int32_t cropW = 10; + int32_t cropH = 10; + OH_PixelMap_Crop(native, cropX, cropY, cropW, cropH); + + uint8_t* pixelAddr = nullptr; + //获取PixelMap对象数据的内存地址,并锁定该内存。 + OH_PixelMap_AccessPixels(native, &pixelAddr); + //释放PixelMap对象数据的内存锁。 + OH_PixelMap_UnAccessPixels(native); + + return result; + } + ``` + +**JS侧调用** + +1. 打开src\main\ets\pages\index.ets, 导入"libentry.so"; + +2. 调用Native接口,传入JS的资源对象。示例如下: + + ```js + import testNapi from 'libentry.so' + import image from '@ohos.multimedia.image' + + @Entry + @Component + struct Index { + @State _pixelMap: image.PixelMap = undefined; + build() { + Row() { + Column() { + Button("PixelMap") + .width(100) + .height(100) + .onClick(() => { + const color = new ArrayBuffer(96); + var bufferArr = new Uint8Array(color); + for (var i = 0; i < bufferArr.length; i++) { + bufferArr[i] = 0x80; + } + + this._pixelMap = testNapi.createPixelMap(color); + testNapi.transform(this._pixelMap); + }) + + Image(this._pixelMap) + .width(500) + .height(500) + .objectFit(ImageFit.Cover) + } + .width('100%') + } + .height('100%') + } + } + ``` \ No newline at end of file diff --git a/zh-cn/application-dev/media/image-transformation.md b/zh-cn/application-dev/media/image-transformation.md index ed09128d16a072e85847c193eeb43aaea720e83b..4a86ca8638024fbf79913c35cac337922d88fb13 100644 --- a/zh-cn/application-dev/media/image-transformation.md +++ b/zh-cn/application-dev/media/image-transformation.md @@ -1,4 +1,4 @@ -# 图像变换 +# 图像变换(ArkTS) 图片处理指对PixelMap进行相关的操作,如获取图片信息、裁剪、缩放、偏移、旋转、翻转、设置透明度、读写像素数据等。图片处理主要包括图像变换、[位图操作](image-pixelmap-operation.md),本文介绍图像变换。 diff --git a/zh-cn/application-dev/napi/Readme-CN.md b/zh-cn/application-dev/napi/Readme-CN.md index bf9643b6b205090f825ce3bc6a38e37db294d2a0..d465686b9bfdc29136b52eb8bbacd957058970c0 100644 --- a/zh-cn/application-dev/napi/Readme-CN.md +++ b/zh-cn/application-dev/napi/Readme-CN.md @@ -1,6 +1,5 @@ # Native API的相关指导 -- [Native API介绍](introduction.md) - [Native API在应用工程中的使用指导](napi-guidelines.md) - [Drawing开发指导](drawing-guidelines.md) - [Rawfile开发指导](rawfile-guidelines.md) diff --git a/zh-cn/application-dev/napi/drawing-guidelines.md b/zh-cn/application-dev/napi/drawing-guidelines.md index 4de946c8a781f1e3f5b16cc929b7cce5bd585ce9..76b2d84b93a5ab76ed0d390f7517fcd9862bc01b 100644 --- a/zh-cn/application-dev/napi/drawing-guidelines.md +++ b/zh-cn/application-dev/napi/drawing-guidelines.md @@ -128,10 +128,7 @@ Native Drawing模块提供了一系列的接口用于基本图形和字体的绘 ```c++ // 画完后获取像素地址,地址指向的内存包含画布画的像素数据 void* bitmapAddr = OH_Drawing_BitmapGetPixels(cBitmap); - auto ret = memcpy_s(addr, addrSize, bitmapAddr, addrSize); - if (ret != EOK) { - LOGI("memcpy_s failed"); - } + std::copy(addr, addr + addrSize, static_cast(bitmapAddr)); // 销毁canvas对象 OH_Drawing_CanvasDestroy(cCanvas); // 销毁bitmap对象 diff --git a/zh-cn/application-dev/napi/figures/rawfile1.png b/zh-cn/application-dev/napi/figures/rawfile1.png index 9f29f7875cd983f967b7a3b27b5898bfce76c9f3..8e3ea5f2844a8124dee1bd3132b1cc86c70b8f64 100644 Binary files a/zh-cn/application-dev/napi/figures/rawfile1.png and b/zh-cn/application-dev/napi/figures/rawfile1.png differ diff --git a/zh-cn/application-dev/napi/rawfile-guidelines.md b/zh-cn/application-dev/napi/rawfile-guidelines.md index 1dc38726a59975b29f52f7275e125176e7a88ff0..dacfe03d5bff4354aebf6f19617a57fb38d5fba9 100644 --- a/zh-cn/application-dev/napi/rawfile-guidelines.md +++ b/zh-cn/application-dev/napi/rawfile-guidelines.md @@ -23,6 +23,92 @@ | bool OH_ResourceManager_ReleaseRawFileDescriptor(const RawFileDescriptor &descriptor) | 释放rawfile的fd。 | | void OH_ResourceManager_ReleaseNativeResourceManager(NativeResourceManager *resMgr) | 释放native resource manager相关资源。 | +## 函数介绍 + +1. 根据NativeResourceManager实例,使用OH_ResourceManager_OpenRawDir接口获取RawDir实例。 + + ```c++ + RawDir* rawDir = OH_ResourceManager_OpenRawDir(nativeResourceManager, path.c_str()); + ``` + +2. 根据RawDir实例,使用OH_ResourceManager_GetRawFileCount接口获取对应目录下的rawfile文件总数 。 + + ```c++ + int count = OH_ResourceManager_GetRawFileCount(rawDir); + ``` + +3. 根据RawDir实例,使用OH_ResourceManager_GetRawFileName接口获取目录下对应index的rawfile文件名。 + + ```c++ + for (int index = 0; index < count; index++) { + std::string fileName = OH_ResourceManager_GetRawFileName(rawDir, index); + } + ``` + +4. 根据NativeResourceManager实例,使用OH_ResourceManager_OpenRawFile接口获取指定文件名的RawFile实例 + + ```c++ + RawFile* rawFile = OH_ResourceManager_OpenRawFile(nativeResourceManager, fileName.c_str()); + ``` + +5. 根据RawFile实例,使用OH_ResourceManager_GetRawFileSize接口获取对应rawfile文件大小。 + + ```c++ + long rawFileSize = OH_ResourceManager_GetRawFileSize(rawFile); + ``` + +6. 根据RawFile实例,使用OH_ResourceManager_SeekRawFile接口指定rawfile偏移量。 + + ```c++ + int position = OH_ResourceManager_SeekRawFile(rawFile, 10, 0); + int position = OH_ResourceManager_SeekRawFile(rawFile, 0 , 1); + int position = OH_ResourceManager_SeekRawFile(rawFile, -10, 2); + ``` + +7. 根据RawFile实例,使用OH_ResourceManager_GetRawFileOffset接口获取rawfile偏移量。 + + ```c++ + long rawFileOffset = OH_ResourceManager_GetRawFileOffset(rawFile) + ``` + +8. 根据RawFile实例,使用OH_ResourceManager_ReadRawFile接口读取rawfile文件内容。 + + ```c++ + std::unique_ptr mediaData = std::make_unique(rawFileSize); + long rawFileOffset = OH_ResourceManager_ReadRawFile(rawFile, mediaData.get(), rawFileSize); + ``` + +9. 根据RawFile实例,使用OH_ResourceManager_CloseRawFile接口释放rawfile文件相关资源。 + + ```c++ + OH_ResourceManager_CloseRawFile(rawFile); + ``` + +10. 根据RawDir实例,使用OH_ResourceManager_CloseRawDir接口释放rawfile目录相关资源。 + + ```c++ + OH_ResourceManager_CloseRawDir(rawDir); + ``` + +11. 根据RawFile实例,使用OH_ResourceManager_GetRawFileDescriptor接口获取rawfile的RawFileDescriptor。 + + ```c++ + RawFileDescriptor descriptor; + bool result = OH_ResourceManager_GetRawFileDescriptor(rawFile, descriptor); + ``` + +12. 根据RawFileDescriptor实例,使用OH_ResourceManager_ReleaseRawFileDescriptor接口关闭rawfile的fd。 + + ```c++ + OH_ResourceManager_ReleaseRawFileDescriptor(descriptor); + ``` + +13. 根据NativeResourceManager实例,使用OH_ResourceManager_ReleaseNativeResourceManager接口释放native resource manager。 + + ```c++ + OH_ResourceManager_ReleaseNativeResourceManager(nativeResourceManager); + ``` + ## 开发步骤 以Js侧获取rawfile文件列表、rawfile文件内容、rawfile描述符{fd, offset, length}三种调用方式为例。 @@ -293,89 +379,6 @@ } ``` -## 函数介绍 - -1. 根据NativeResourceManager实例,使用OH_ResourceManager_OpenRawDir接口获取RawDir实例。 - - ```c++ - RawDir* rawDir = OH_ResourceManager_OpenRawDir(nativeResourceManager, path.c_str()); - ``` - -2. 根据RawDir实例,使用OH_ResourceManager_GetRawFileCount接口获取对应目录下的rawfile文件总数 。 - - ```c++ - int count = OH_ResourceManager_GetRawFileCount(rawDir); - ``` - -3. 根据RawDir实例,使用OH_ResourceManager_GetRawFileName接口获取目录下对应index的rawfile文件名。 - - ```c++ - for (int index = 0; index < count; index++) { - std::string fileName = OH_ResourceManager_GetRawFileName(rawDir, index); - } - ``` - -4. 根据NativeResourceManager实例,使用OH_ResourceManager_OpenRawFile接口获取指定文件名的RawFile实例 - - ```c++ - RawFile* rawFile = OH_ResourceManager_OpenRawFile(nativeResourceManager, fileName.c_str()); - ``` - -5. 根据RawFile实例,使用OH_ResourceManager_GetRawFileSize接口获取对应rawfile文件大小。 - - ```c++ - long rawFileSize = OH_ResourceManager_GetRawFileSize(rawFile); - ``` - -6. 根据RawFile实例,使用OH_ResourceManager_SeekRawFile接口指定rawfile偏移量。 - - ```c++ - int position = OH_ResourceManager_SeekRawFile(rawFile, 10, 0); - int position = OH_ResourceManager_SeekRawFile(rawFile, 0 , 1); - int position = OH_ResourceManager_SeekRawFile(rawFile, -10, 2); - ``` - -7. 根据RawFile实例,使用OH_ResourceManager_GetRawFileOffset接口获取rawfile偏移量。 - - ```c++ - long rawFileOffset = OH_ResourceManager_GetRawFileOffset(rawFile) - ``` - -8. 根据RawFile实例,使用OH_ResourceManager_ReadRawFile接口读取rawfile文件内容。 - - ```c++ - std::unique_ptr mediaData = std::make_unique(rawFileSize); - long rawFileOffset = OH_ResourceManager_ReadRawFile(rawFile, mediaData.get(), rawFileSize); - ``` - -9. 根据RawFile实例,使用OH_ResourceManager_CloseRawFile接口释放rawfile文件相关资源。 - - ```c++ - OH_ResourceManager_CloseRawFile(rawFile); - ``` - -10. 根据RawDir实例,使用OH_ResourceManager_CloseRawDir接口释放rawfile目录相关资源。 - - ```c++ - OH_ResourceManager_CloseRawDir(rawDir); - ``` - -11. 根据RawFile实例,使用OH_ResourceManager_GetRawFileDescriptor接口获取rawfile的RawFileDescriptor。 - - ```c++ - RawFileDescriptor descriptor; - bool result = OH_ResourceManager_GetRawFileDescriptor(rawFile, descriptor); - ``` - -12. 根据RawFileDescriptor实例,使用OH_ResourceManager_ReleaseRawFileDescriptor接口关闭rawfile的fd。 - - ```c++ - OH_ResourceManager_ReleaseRawFileDescriptor(descriptor); - ``` - -13. 根据NativeResourceManager实例,使用OH_ResourceManager_ReleaseNativeResourceManager接口释放native resource manager。 - - ```c++ - OH_ResourceManager_ReleaseNativeResourceManager(nativeResourceManager); - ``` +## 相关实例 +- [`NdkRawfile`:获取Rawfile资源](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Native/NdkRawfile) diff --git a/zh-cn/application-dev/quick-start/arkts-style.md b/zh-cn/application-dev/quick-start/arkts-style.md index 04a862b4a6c13dd6386738971e8630b883707e2b..3fbf608cb33814888c1ad2012fe0578d952d3044 100644 --- a/zh-cn/application-dev/quick-start/arkts-style.md +++ b/zh-cn/application-dev/quick-start/arkts-style.md @@ -94,7 +94,7 @@ struct FancyUse { Text('FancyA') .globalFancy () .fontSize(30) - // 使用全局的@Styles封装的样式 + // 使用组件内的@Styles封装的样式 Text('FancyB') .fancy() .fontSize(30) diff --git a/zh-cn/application-dev/quick-start/multi-hap-principles.md b/zh-cn/application-dev/quick-start/multi-hap-principles.md index 147f409d987cf47a827382cd62507cc4f2972fd7..9174e043ecb1013ec17c926e1b81ff2b4fb127ac 100644 --- a/zh-cn/application-dev/quick-start/multi-hap-principles.md +++ b/zh-cn/application-dev/quick-start/multi-hap-principles.md @@ -4,7 +4,7 @@ 多HAP机制主要是为方便开发者进行模块化管理。HAP和应用运行时的进程并不是一一对应的,具体运行机制如下: -- 默认情况下,应用中(同一Bundle名称)的所有UIAbility、ServiceExtensionAbility、DataShareExtensionAbility运行在同一个独立进程中,其他同类型ExtensionAbility分别运行在单独的进程。 +- 默认情况下,应用中(同一Bundle名称)的所有UIAbility、ServiceExtensionAbility和DataShareExtensionAbility均是运行在同一个独立进程(主进程)中,而其他相同类型的ExtensionAbility则是运行在各自独立的进程中。 - HAP支持在module.json5(Stage模型)或者config.json(FA模型)中通过process标签配置单独的进程(仅系统应用支持,三方应用不支持)。配置了process的HAP,其组件运行在单独的process进程中,多个HAP可以配置相同的process,则这些HAP运行在相同进程中,process配置的详细说明请参见[module.json5配置文件](module-configuration-file.md)。 diff --git a/zh-cn/application-dev/reference/Readme-CN.md b/zh-cn/application-dev/reference/Readme-CN.md index 6253620ea55348d7cb196bfaa0b3958e7e46a3b1..399c9881c627d20383a9ecc2ffe9ec1677005591 100644 --- a/zh-cn/application-dev/reference/Readme-CN.md +++ b/zh-cn/application-dev/reference/Readme-CN.md @@ -9,5 +9,6 @@ - [接口参考(ArkTS及JS API)](apis/Readme-CN.md) - [错误码参考](errorcodes/Readme-CN.md) - 接口参考(Native API) + - [Native API(NDK)入门](native-api-intro.md) - [OpenHarmony Native API](native-apis/Readme-CN.md) - [Native API标准库](native-lib/Readme-CN.md) diff --git a/zh-cn/application-dev/reference/apis/Readme-CN.md b/zh-cn/application-dev/reference/apis/Readme-CN.md index b090da5f4cc0d468f7312c481f2780832a2426bf..501b0a83b53685ffb3e7df3ed782996581b13f83 100644 --- a/zh-cn/application-dev/reference/apis/Readme-CN.md +++ b/zh-cn/application-dev/reference/apis/Readme-CN.md @@ -113,6 +113,8 @@ - continuation - [continuationExtraParams](js-apis-continuation-continuationExtraParams.md) - [continuationResult](js-apis-continuation-continuationResult.md) +- AI + - [@ohos.ai.mindSporeLite (推理能力)](js-apis-mindSporeLite.md) - 公共事件与通知 - [系统公共事件定义](commonEventManager-definitions.md) @@ -185,6 +187,7 @@ - [@ohos.animator (动画)](js-apis-animator.md) - [@ohos.arkui.componentSnapshot (组件截图)](js-apis-arkui-componentSnapshot.md) - [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](js-apis-arkui-drawableDescriptor.md) + - [@ohos.arkui.UIContext (UIContext)](js-apis-arkui-UIContext.md) - [@ohos.curves (插值计算)](js-apis-curve.md) - [@ohos.font (注册自定义字体)](js-apis-font.md) - [@ohos.matrix4 (矩阵变换)](js-apis-matrix4.md) @@ -227,6 +230,7 @@ - [@ohos.distributedMissionManager (分布式任务管理)](js-apis-distributedMissionManager.md) - [@ohos.reminderAgentManager (后台代理提醒)](js-apis-reminderAgentManager.md) - [@ohos.resourceschedule.backgroundTaskManager (后台任务管理)](js-apis-resourceschedule-backgroundTaskManager.md) + - [@ohos.resourceschedule.deviceStandby(设备待机模块)](js-apis-resourceschedule-deviceStandby.md) - [@ohos.resourceschedule.workScheduler (延迟任务调度)](js-apis-resourceschedule-workScheduler.md) - [@ohos.resourceschedule.usageStatistics (设备使用信息统计)](js-apis-resourceschedule-deviceUsageStatistics.md) - [@ohos.WorkSchedulerExtensionAbility (延迟任务调度回调)](js-apis-WorkSchedulerExtensionAbility.md) @@ -477,4 +481,4 @@ - [remoteAbilityInfo](js-apis-bundle-remoteAbilityInfo.md) - [shortcutInfo](js-apis-bundle-ShortcutInfo.md) - data/rdb - - [resultSet (结果集)](js-apis-data-resultset.md) \ No newline at end of file + - [resultSet (结果集)](js-apis-data-resultset.md) \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md b/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md index 6b6c2c5d4a024a2edf822084e9d9511608bd310f..5bcf287130ce306e4ee63e0207c9c585c322e5ac 100644 --- a/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md +++ b/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md @@ -13,50 +13,32 @@ - 值: usual.event.LOCKED_BOOT_COMPLETED - 订阅者所需权限: ohos.permission.RECEIVER_STARTUP_COMPLETED -## COMMON_EVENT_SHUTDOWN +## [COMMON_EVENT_SHUTDOWN](./common_event/commonEvent-powermgr.md) 表示设备正在关闭并将继续最终关闭的公共事件的操作。 -- 值: usual.event.SHUTDOWN -- 订阅者所需权限: 无 -## COMMON_EVENT_BATTERY_CHANGED +## [COMMON_EVENT_BATTERY_CHANGED](./common_event/commonEvent-powermgr.md) 表示电池充电状态、电平和其他信息发生变化的公共事件的动作。 -- 值: usual.event.BATTERY_CHANGED -- 订阅者所需权限: 无 -## COMMON_EVENT_BATTERY_LOW +## [COMMON_EVENT_BATTERY_LOW](./common_event/commonEvent-powermgr.md) 表示电池电量低的普通事件的动作。 -- 值: usual.event.BATTERY_LOW -- 订阅者所需权限: 无 -## COMMON_EVENT_BATTERY_OKAY +## [COMMON_EVENT_BATTERY_OKAY](./common_event/commonEvent-powermgr.md) 表示电池退出低电平状态的公共事件的动作。 -- 值: usual.event.BATTERY_OKAY -- 订阅者所需权限: 无 -## COMMON_EVENT_POWER_CONNECTED +## [COMMON_EVENT_POWER_CONNECTED](./common_event/commonEvent-powermgr.md) 设备连接到外部电源的公共事件的动作。 -- 值: usual.event.POWER_CONNECTED -- 订阅者所需权限: 无 -## COMMON_EVENT_POWER_DISCONNECTED +## [COMMON_EVENT_POWER_DISCONNECTED](./common_event/commonEvent-powermgr.md) 设备与外部电源断开的公共事件的动作。 -- 值: usual.event.POWER_DISCONNECTED -- 订阅者所需权限: 无 -## COMMON_EVENT_SCREEN_OFF +## [COMMON_EVENT_SCREEN_OFF](./common_event/commonEvent-powermgr.md) 表示设备屏幕关闭且设备处于睡眠状态的普通事件的动作。 -- 值: usual.event.SCREEN_OFF -- 订阅者所需权限: 无 -## COMMON_EVENT_SCREEN_ON +## [COMMON_EVENT_SCREEN_ON](./common_event/commonEvent-powermgr.md) 表示设备屏幕打开且设备处于交互状态的公共事件的操作。 -- 值: usual.event.SCREEN_ON -- 订阅者所需权限: 无 -## COMMON_EVENT_THERMAL_LEVEL_CHANGED +## [COMMON_EVENT_THERMAL_LEVEL_CHANGED](./common_event/commonEvent-powermgr.md) 表示设备热状态的公共事件的动作。 -- 值: usual.event.THERMAL_LEVEL_CHANGED -- 订阅者所需权限: 无 ## COMMON_EVENT_USER_PRESENT(deprecated) (预留事件,暂未支持)用户解锁设备的公共事件的动作。 @@ -91,11 +73,8 @@ - 值: usual.event.CLOSE_SYSTEM_DIALOGS - 订阅者所需权限: 无 -## COMMON_EVENT_PACKAGE_ADDED +## [COMMON_EVENT_PACKAGE_ADDED](./common_event/commonEvent-bundleManager.md) 设备上已安装新应用包的公共事件的动作。 -- 值: usual.event.PACKAGE_ADDED -- 订阅者所需权限: 无 - ## COMMON_EVENT_PACKAGE_REPLACED (预留事件,暂未支持)表示已安装的应用程序包的新版本已替换设备上的旧版本的公共事件的操作。 - 值: usual.event.PACKAGE_REPLACED @@ -106,11 +85,8 @@ - 值: usual.event.MY_PACKAGE_REPLACED - 订阅者所需权限: 无 -## COMMON_EVENT_PACKAGE_REMOVED +## [COMMON_EVENT_PACKAGE_REMOVED](./common_event/commonEvent-bundleManager.md) 表示已从设备卸载已安装的应用程序,但应用程序数据保留的公共事件的操作。 -- 值: usual.event.PACKAGE_REMOVED -- 订阅者所需权限: 无 - ## COMMON_EVENT_BUNDLE_REMOVED (预留事件,暂未支持)表示已从设备中卸载已安装的捆绑包,但应用程序数据仍保留的公共事件的操作。 - 值: usual.event.BUNDLE_REMOVED @@ -121,22 +97,16 @@ - 值: usual.event.PACKAGE_FULLY_REMOVED - 订阅者所需权限: 无 -## COMMON_EVENT_PACKAGE_CHANGED +## [COMMON_EVENT_PACKAGE_CHANGED](./common_event/commonEvent-bundleManager.md) 表示应用包已更改的公共事件的动作(例如,包中的组件已启用或禁用)。 -- 值: usual.event.PACKAGE_CHANGED -- 订阅者所需权限: 无 - ## [COMMON_EVENT_PACKAGE_RESTARTED](./common_event/commonEvent-ability.md) 表示用户重启应用包并杀死其所有进程的普通事件的动作。 ## [COMMON_EVENT_PACKAGE_DATA_CLEARED](./common_event/commonEvent-ability.md) 用户清除应用包数据的公共事件的动作。 -## COMMON_EVENT_PACKAGE_CACHE_CLEARED9+ +## [COMMON_EVENT_PACKAGE_CACHE_CLEARED9+](./common_event/commonEvent-bundleManager.md) 用户清除应用包缓存数据的公共事件的动作。 -- 值: usual.event.PACKAGE_CACHE_CLEARED -- 订阅者所需权限: 无 - ## COMMON_EVENT_PACKAGES_SUSPENDED (预留事件,暂未支持)表示应用包已挂起的公共事件的动作。 - 值: usual.event.PACKAGES_SUSPENDED @@ -232,11 +202,8 @@ - 值: usual.event.USER_FOREGROUND - 订阅者所需权限: 无 -## COMMON_EVENT_USER_SWITCHED +## [COMMON_EVENT_USER_SWITCHED](./common_event/commonEvent-account.md) 表示用户切换正在发生的公共事件的动作。 -- 值: usual.event.USER_SWITCHED -- 订阅者所需权限: ohos.permission.MANAGE_LOCAL_ACCOUNTS - ## COMMON_EVENT_USER_STARTING (预留事件,暂未支持)表示要启动用户的公共事件的动作。 - 值: usual.event.USER_STARTING @@ -257,26 +224,14 @@ - 值: usual.event.USER_STOPPED - 订阅者所需权限: 无 -## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN](./common_event/commonEvent-account.md) (预留事件,暂未支持)表示分布式帐号登录成功的动作。 -- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGIN -- 订阅者所需权限: 无 - -## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT](./common_event/commonEvent-account.md) (预留事件,暂未支持)表示分布式帐号登出成功的动作。 -- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGOUT -- 订阅者所需权限: 无 - -## COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID](./common_event/commonEvent-account.md) (预留事件,暂未支持)表示分布式帐号token令牌无效的动作。 -- 值: usual.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID -- 订阅者所需权限: 无 - -## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF](./common_event/commonEvent-account.md) (预留事件,暂未支持)表示分布式帐号注销的动作。 -- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGOFF -- 订阅者所需权限: 无 - ## COMMON_EVENT_WIFI_POWER_STATE Wi-Fi状态公共事件的动作,如启用和禁用。 - 值: usual.event.wifi.POWER_STATE @@ -547,46 +502,27 @@ Wi-Fi P2P群组信息已更改。 - 值: usual.event.nfc.action.RF_FIELD_OFF_DETECTED - 订阅者所需权限: ohos.permission.MANAGE_SECURE_SETTINGS -## COMMON_EVENT_DISCHARGING +## [COMMON_EVENT_DISCHARGING](./common_event/commonEvent-powermgr.md) 表示系统停止为电池充电的公共事件的动作。 -- 值: usual.event.DISCHARGING -- 订阅者所需权限: 无 -## COMMON_EVENT_CHARGING +## [COMMON_EVENT_CHARGING](./common_event/commonEvent-powermgr.md) 表示系统开始为电池充电的公共事件的动作。 -- 值: usual.event.CHARGING -- 订阅者所需权限: 无 -## COMMON_EVENT_CHARGE_TYPE_CHANGED +## [COMMON_EVENT_CHARGE_TYPE_CHANGED](./common_event/commonEvent-powermgr.md) 表示系统充电类型改变的公共事件的动作。仅限系统应用使用。 -- 值: usual.event.CHARGE_TYPE_CHANGED -- 订阅者所需权限: 无 ## [COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED](./common_event/commonEvent-resourceschedule.md) 表示系统待机空闲模式已更改的公共事件的动作。 -- 值: usual.event.DEVICE_IDLE_MODE_CHANGED -- 订阅者所需权限: 无 - ## [COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED10+](./common_event/commonEvent-resourceschedule.md) 表示系统待机空闲模式下豁免应用程序列表已更新的公共事件的动作。仅限系统应用使用。 -- 值: usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED -- 订阅者所需权限: 无 -## COMMON_EVENT_POWER_SAVE_MODE_CHANGED +## [COMMON_EVENT_POWER_SAVE_MODE_CHANGED](./common_event/commonEvent-powermgr.md) 表示系统节能模式更改的公共事件的动作。 -- 值: usual.event.POWER_SAVE_MODE_CHANGED -- 订阅者所需权限: 无 -## COMMON_EVENT_USER_ADDED +## [COMMON_EVENT_USER_ADDED](./common_event/commonEvent-account.md) 表示用户已添加到系统中的公共事件的动作。 -- 值: usual.event.USER_ADDED -- 订阅者所需权限: ohos.permission.MANAGE_LOCAL_ACCOUNTS - -## COMMON_EVENT_USER_REMOVED +## [COMMON_EVENT_USER_REMOVED](./common_event/commonEvent-account.md) 表示用户已从系统中删除的公共事件的动作。 -- 值: usual.event.USER_REMOVED -- 订阅者所需权限: ohos.permission.MANAGE_LOCAL_ACCOUNTS - ## COMMON_EVENT_ABILITY_ADDED (预留事件,暂未支持)表示已添加能力的公共事件的动作。 - 值: usual.event.ABILITY_ADDED @@ -662,36 +598,24 @@ Wi-Fi P2P群组信息已更改。 - 值: common.event.IVI_ACTIVE - 订阅者所需权限: 无 -## COMMON_EVENT_USB_STATE9+ +## [COMMON_EVENT_USB_STATE9+](common_event/commonEvent-usb.md) 表示USB设备状态发生变化的公共事件。 -具体查看[USB公共事件](common_event/commonEvent-usb.md)。 - -## **COMMON_EVENT_USB_PORT_CHANGED**9+ +## [**COMMON_EVENT_USB_PORT_CHANGED**9+](./common_event/commonEvent-usb.md) 表示用户设备的USB端口状态发生改变的公共事件。 -具体查看[USB公共事件](common_event/commonEvent-usb.md)。 - -## COMMON_EVENT_USB_DEVICE_ATTACHED +## [COMMON_EVENT_USB_DEVICE_ATTACHED](./common_event/commonEvent-usb.md) 当用户设备作为USB主机时,USB设备已挂载的公共事件的动作。 -具体查看[USB公共事件](common_event/commonEvent-usb.md)。 - -## COMMON_EVENT_USB_DEVICE_DETACHED +## [COMMON_EVENT_USB_DEVICE_DETACHED](./common_event/commonEvent-usb.md) 当用户设备作为USB主机时,USB设备被卸载的公共事件的动作。 -具体查看[USB公共事件](common_event/commonEvent-usb.md)。 - -## COMMON_EVENT_USB_ACCESSORY_ATTACHED +## [COMMON_EVENT_USB_ACCESSORY_ATTACHED](./common_event/commonEvent-usb.md) (预留事件,暂未支持)表示已连接USB附件的公共事件的动作。 -具体查看[USB公共事件](common_event/commonEvent-usb.md)。 - -## COMMON_EVENT_USB_ACCESSORY_DETACHED +## [COMMON_EVENT_USB_ACCESSORY_DETACHED](./common_event/commonEvent-usb.md) (预留事件,暂未支持)表示USB附件被卸载的公共事件的动作。 -具体查看[USB公共事件](common_event/commonEvent-usb.md)。 - ## COMMON_EVENT_DISK_REMOVED (预留事件,暂未支持)外部存储设备状态变更为移除时发送此公共事件。 - 值: usual.event.data.DISK_BAD_REMOVAL @@ -722,30 +646,20 @@ Wi-Fi P2P群组信息已更改。 - 值: usual.event.data.DISK_EJECT - 订阅者所需权限: ohos.permission.STORAGE_MANAGER -## COMMON_EVENT_VOLUME_REMOVED9+ +## [COMMON_EVENT_VOLUME_REMOVED9+](./common_event/commonEvent-filemanagement.md) 外部存储设备状态变更为移除时发送此公共事件。 -- 值: usual.event.data.VOLUME_REMOVED -- 订阅者所需权限: ohos.permission.STORAGE_MANAGER -## COMMON_EVENT_VOLUME_UNMOUNTED9+ +## [COMMON_EVENT_VOLUME_UNMOUNTED9+](./common_event/commonEvent-filemanagement.md) 外部存储设备状态变更为卸载时发送此公共事件。 -- 值: usual.event.data.VOLUME_UNMOUNTED -- 订阅者所需权限: ohos.permission.STORAGE_MANAGER -## COMMON_EVENT_VOLUME_MOUNTED9+ +## [COMMON_EVENT_VOLUME_MOUNTED9+](./common_event/commonEvent-filemanagement.md) 外部存储设备状态变更为挂载时发送此公共事件。 -- 值: usual.event.data.VOLUME_MOUNTED -- 订阅者所需权限: ohos.permission.STORAGE_MANAGER -## COMMON_EVENT_VOLUME_BAD_REMOVAL9+ +## [COMMON_EVENT_VOLUME_BAD_REMOVAL9+](./common_event/commonEvent-filemanagement.md) 外部存储设备状态变更为挂载状态下移除时发送此公共事件。 -- 值: usual.event.data.VOLUME_BAD_REMOVAL -- 订阅者所需权限: ohos.permission.STORAGE_MANAGER -## COMMON_EVENT_VOLUME_EJECT9+ +## [COMMON_EVENT_VOLUME_EJECT9+](./common_event/commonEvent-filemanagement.md) 用户已表示希望删除外部存储介质时发送此公共事件。 -- 值: usual.event.data.VOLUME_EJECT -- 订阅者所需权限: ohos.permission.STORAGE_MANAGER ## COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED (预留事件,暂未支持)表示帐户可见更改的公共事件的动作。 @@ -772,11 +686,8 @@ Wi-Fi P2P群组信息已更改。 - 值: usual.event.SPLIT_SCREEN - 订阅者所需权限: ohos.permission.RECEIVER_SPLIT_SCREEN -## COMMON_EVENT_SLOT_CHANGE9+ +## [COMMON_EVENT_SLOT_CHANGE9+](./common_event/commonEvent-ans.md) 表示通知通道更新的动作。 -- 值: usual.event.SLOT_CHANGE -- 订阅者所需权限: ohos.permission.NOTIFICATION_CONTROLLER - ## COMMON_EVENT_SPN_INFO_CHANGED 9+ 表示spn显示信息已更新的公共事件的动作。 - 值: usual.event.SPN_INFO_CHANGED @@ -784,118 +695,53 @@ Wi-Fi P2P群组信息已更改。 ## [COMMON_EVENT_QUICK_FIX_APPLY_RESULT9+](./common_event/commonEvent-ability.md) 表示快速修复应用的动作。 -- 值: usual.event.QUICK_FIX_APPLY_RESULT -- 订阅者所需权限: 无 - ## COMMON_EVENT_HTTP_PROXY_CHANGE10+ 表示HTTP代理的配置信息发生变化。 - 值:usual.event.HTTP_PROXY_CHANGE - 订阅者所需权限:无 -## COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED10+ +## [COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED10+](./common_event/commonEvent-account.md) 表示域账号状态发生变化。 -- 值:usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_SIM_STATE_CHANGED10+](./common_event/commonEvent-telephony.md) 提示SIM卡状态更新。 -- 值:usual.event.SIM_STATE_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_SMS_RECEIVED_COMPLETED10+](./common_event/commonEvent-telephony.md) 提示短信接收完成。 -- 值:usual.event.SMS_RECEIVED_COMPLETED -- 订阅者所需权限:ohos.permission.RECEIVE_SMS - ## [COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED10+](./common_event/commonEvent-telephony.md) 提示紧急小区广播短信接收完成。 -- 值:usual.event.SMS_EMERGENCY_CB_RECEIVE_COMPLETED -- 订阅者所需权限:ohos.permission.RECEIVE_SMS - ## [COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED10+](./common_event/commonEvent-telephony.md) 提示小区广播短信接收完成。 -- 值:usual.event.SMS_CB_RECEIVE_COMPLETED -- 订阅者所需权限:ohos.permission.RECEIVE_SMS - ## [COMMON_EVENT_STK_COMMAND10+](./common_event/commonEvent-telephony.md) (预留事件,暂未支持)提示STK命令。 -- 值:usual.event.STK_COMMAND -- 订阅者所需权限:无 - ## [COMMON_EVENT_STK_SESSION_END10+](./common_event/commonEvent-telephony.md) (预留事件,暂未支持)提示STK会话结束。 -- 值:usual.event.STK_SESSION_END -- 订阅者所需权限:无 - ## [COMMON_EVENT_STK_CARD_STATE_CHANGED10+](./common_event/commonEvent-telephony.md) (预留事件,暂未支持)提示STK卡状态已更新。 -- 值:usual.event.STK_CARD_STATE_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_STK_ALPHA_IDENTIFIER10+](./common_event/commonEvent-telephony.md) (预留事件,暂未支持)提示STK ALPHA标识符。 -- 值:usual.event.STK_ALPHA_IDENTIFIER -- 订阅者所需权限:无 - ## [COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED10+](./common_event/commonEvent-telephony.md) 提示服务信息短信接收完成。 -- 值:usual.event.SMS_WAPPUSH_RECEIVE_COMPLETED -- 订阅者所需权限:ohos.permission.RECEIVE_SMS - ## [COMMON_EVENT_OPERATOR_CONFIG_CHANGED10+](./common_event/commonEvent-telephony.md) 提示运营商配置已更新。 -- 值:usual.event.OPERATOR_CONFIG_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED10+](./common_event/commonEvent-telephony.md) 提示SIM卡默认短信主卡已更新。 -- 值:usual.event.DEFAULT_SMS_SUBSCRIPTION_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED10+](./common_event/commonEvent-telephony.md) 提示SIM卡默认数据主卡已更新。 -- 值:usual.event.DEFAULT_DATA_SUBSCRIPTION_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED10+](./common_event/commonEvent-telephony.md) 提示SIM卡默认主卡已更新。 -- 值:usual.event.SIM.DEFAULT_MAIN_SUBSCRIPTION_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED10+](./common_event/commonEvent-telephony.md) 提示SIM卡默认语音主卡已更新。 -- 值:usual.event.DEFAULT_VOICE_SUBSCRIPTION_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_CALL_STATE_CHANGED10+](./common_event/commonEvent-telephony.md) 提示呼叫状态更新。 -- 值:usual.event.CALL_STATE_CHANGED -- 订阅者所需权限:ohos.permission.GET_TELEPHONY_STATE - ## [COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED10+](./common_event/commonEvent-telephony.md) 提示蜂窝数据状态更新。 -- 值:usual.event.CELLULAR_DATA_STATE_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_NETWORK_STATE_CHANGED10+](./common_event/commonEvent-telephony.md) 提示网络状态更新。 -- 值:usual.event.NETWORK_STATE_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_SIGNAL_INFO_CHANGED10+](./common_event/commonEvent-telephony.md) 提示信号信息更新。 -- 值:usual.event.SIGNAL_INFO_CHANGED -- 订阅者所需权限:无 - ## [COMMON_EVENT_INCOMING_CALL_MISSED10+](./common_event/commonEvent-telephony.md) 提示未接来电。 -- 值:usual.event.INCOMING_CALL_MISSED -- 订阅者所需权限:ohos.permission.GET_TELEPHONY_STATE - ## [COMMON_EVENT_RADIO_STATE_CHANGE10+](./common_event/commonEvent-telephony.md) 提示设备modem上下电状态变化。 -- 值:usual.event.RADIO_STATE_CHANGE - ## COMMON_EVENT_SCREEN_LOCKED 10+ 表示屏幕锁定的公共事件。 @@ -912,4 +758,24 @@ Wi-Fi P2P群组信息已更改。 ## [COMMON_EVENT_QUICK_FIX_REVOKE_RESULT10+](./common_event/commonEvent-ability.md#common_event_quick_fix_revoke_result10) -指示撤销快速修复的动作。 \ No newline at end of file +指示撤销快速修复的动作。 + +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN](./common_event/commonEvent-account.md) +(预留事件,暂未支持)表示分布式帐号登录成功的动作。 + +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT](./common_event/commonEvent-account.md) +(预留事件,暂未支持)表示分布式帐号登出成功的动作。 + +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID](./common_event/commonEvent-account.md) +(预留事件,暂未支持)表示分布式帐号token令牌无效的动作。 + +## [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF](./common_event/commonEvent-account.md) +(预留事件,暂未支持)表示分布式帐号注销的动作。 + +## [COMMON_EVENT_USER_INFO_UPDATED9+](./common_event/commonEvent-account.md) + +表示用户信息已更新。 + +## [COMMON_EVENT_AUDIO_QUALITY_CHANGE](./common_event/commonEvent-telephony.md) + +提示音频质量发生变化。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md b/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md index 666977c93c4f3c884c480c18448e42110dd5b645..08ceb7462ebdfa7c81b95bf1fa07d21017d3dfea 100644 --- a/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md +++ b/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md @@ -5,4 +5,6 @@ - [通知服务公共事件定义](commonEvent-ans.md) - [资源调度子系统公共事件定义](commonEvent-resourceschedule.md) - [电话服务子系统公共事件定义](commonEvent-telephony.md) +- [电源管理子系统公共事件定义](commonEvent-powermgr.md) - [USB子系统公共事件定义](commonEvent-usb.md) +- [文件管理子系统公共事件定义](commonEvent-filemanagement.md) \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/common_event/commonEvent-account.md b/zh-cn/application-dev/reference/apis/common_event/commonEvent-account.md new file mode 100644 index 0000000000000000000000000000000000000000..4c1eb697e0d882afca4b77752cb68ac90ad2e94f --- /dev/null +++ b/zh-cn/application-dev/reference/apis/common_event/commonEvent-account.md @@ -0,0 +1,76 @@ +# 帐号子系统公共事件定义 +帐号子系统面向应用发布如下系统公共事件,应用如需订阅系统公共事件,请参考公共事件[接口文档](../js-apis-commonEventManager.md)。 + +## COMMON_EVENT_USER_ADDED +表示用户已添加到系统中的公共事件的动作。 + +- 值: usual.event.USER_ADDED +- 订阅者所需权限: ohos.permission.MANAGE_LOCAL_ACCOUNTS + +创建系统帐号将会触发事件通知服务发布该系统公共事件,事件携带系统帐号ID。 + +与这个公共事件相关的接口:createOsAccount、createOsAccountForDomain, 这些为系统API,具体参看[系统帐号接口文档](../js-apis-osAccount.md)。 + +## COMMON_EVENT_USER_REMOVED +表示用户已从系统中删除的公共事件的动作。 + +- 值: usual.event.USER_REMOVED +- 订阅者所需权限: ohos.permission.MANAGE_LOCAL_ACCOUNTS + +删除系统帐号将会触发事件通知服务发布该系统公共事件,事件携带系统帐号ID。 + +与这个公共事件相关的接口:removeOsAccount, 为系统API,具体参看[系统帐号接口文档](../js-apis-osAccount.md)。 + +## COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED10+ +表示域账号状态发生变化。 + +- 值:usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED +- 订阅者所需权限: ohos.permission.GET_LOCAL_ACCOUNTS + +域帐号认证、删除、令牌更新、令牌失效将会触发事件通知服务发布该系统公共事件,事件携带域账号名、域名、域账号状态等信息。 + +与这个公共事件相关的接口:removeOsAccount、DomainAccountManager.auth、updateAccountToken, 这些为系统API,具体参看[系统帐号接口文档](../js-apis-osAccount.md)。 + +## COMMON_EVENT_USER_SWITCHED +表示用户切换正在发生的公共事件的动作。 + +- 值: usual.event.USER_SWITCHED +- 订阅者所需权限: ohos.permission.MANAGE_LOCAL_ACCOUNTS + +切换帐号将会触发事件通知服务发布该系统公共事件,事件携带系统帐号ID。 + +与这个公共事件相关的接口:activateOsAccount, 为系统API,具体参看[系统帐号接口文档](../js-apis-osAccount.md)。 + +## COMMON_EVENT_USER_INFO_UPDATED9+ +表示用户信息已更新。 + +- 值:usual.event.USER_INFO_UPDATED +- 订阅者所需权限:无 + +分布式帐号信息变更、系统账号头像信息变更、系统账号名称变更将会触发事件通知服务发布该系统公共事件,事件携带系统帐号ID。 + +与这个公共事件相关的接口:setOsAccountName、setOsAccountProfilePhoto, 这些为系统API,setOsAccountDistributedInfon为公共API,具体参看[系统帐号接口文档](../js-apis-osAccount.md)、[分布式帐号接口文档](../js-apis-distributed-account.md)。 + +## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN +(预留事件,暂未支持)表示分布式帐号登录成功的动作。 + +- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGIN +- 订阅者所需权限: 无 + +## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT +(预留事件,暂未支持)表示分布式帐号登出成功的动作。 + +- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGOUT +- 订阅者所需权限: 无 + +## COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID +(预留事件,暂未支持)表示分布式帐号token令牌无效的动作。 + +- 值: usual.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID +- 订阅者所需权限: 无 + +## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF +(预留事件,暂未支持)表示分布式帐号注销的动作。 + +- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGOFF +- 订阅者所需权限: 无 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/common_event/commonEvent-filemanagement.md b/zh-cn/application-dev/reference/apis/common_event/commonEvent-filemanagement.md new file mode 100644 index 0000000000000000000000000000000000000000..ef4a7af022b88e69bb5605c8424c6e52d854d199 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/common_event/commonEvent-filemanagement.md @@ -0,0 +1,37 @@ +# 文件管理子系统公共事件定义 +文件管理子系统面向应用发布如下系统公共事件,应用如需订阅系统公共事件,请参考公共事件[接口文档](../js-apis-commonEventManager.md)。 + +## COMMON_EVENT_VOLUME_REMOVED9+ +表示外部存储设备正常移除的公共事件。 +- 值: usual.event.data.VOLUME_REMOVED +- 订阅者所需权限: ohos.permission.STORAGE_MANAGER + +当外部存储设备处于卸载状态,移除该设备时,会发送此公共事件。 + +## COMMON_EVENT_VOLUME_UNMOUNTED9+ +表示外部存储设备状态变更为卸载的公共事件。 +- 值: usual.event.data.VOLUME_UNMOUNTED +- 订阅者所需权限: ohos.permission.STORAGE_MANAGER + +当外部存储设备处于挂载状态时,用户选择通过调用[unmount](../js-apis-file-volumemanager.md)接口或者直接移除设备的方法弹出该设备,并且已将外部存储设备卸载成功后,会发送此公共事件。 + +## COMMON_EVENT_VOLUME_MOUNTED9+ +表示外部存储设备状态变更为挂载的公共事件。 +- 值: usual.event.data.VOLUME_MOUNTED +- 订阅者所需权限: ohos.permission.STORAGE_MANAGER + +当用户插入外部存储设备自动挂载成功或者将处于卸载状态的外部存储设备调用[mount](../js-apis-file-volumemanager.md)接口进行挂载成功后,会发送此公共事件。 + +## COMMON_EVENT_VOLUME_BAD_REMOVAL9+ +表示外部存储设备异常移除的公共事件。 +- 值: usual.event.data.VOLUME_BAD_REMOVAL +- 订阅者所需权限: ohos.permission.STORAGE_MANAGER + +当外部存储设备处于挂载状态时,用户直接移除该外部存储设备,会发送此公共事件。 + +## COMMON_EVENT_VOLUME_EJECT9+ +表示外部存储设备即将被弹出的公共事件。 +- 值: usual.event.data.VOLUME_EJECT +- 订阅者所需权限: ohos.permission.STORAGE_MANAGER + +当外部存储设备处于挂载状态时,用户选择通过调用[unmount](../js-apis-file-volumemanager.md)接口或者直接移除设备的方法弹出该设备时,会发送此公共事件。 diff --git a/zh-cn/application-dev/reference/apis/common_event/commonEvent-powermgr.md b/zh-cn/application-dev/reference/apis/common_event/commonEvent-powermgr.md new file mode 100644 index 0000000000000000000000000000000000000000..f829c5b1efa7bf1e167ac2c9ea1026fdf7a99781 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/common_event/commonEvent-powermgr.md @@ -0,0 +1,106 @@ +# 电源管理子系统公共事件定义 +电源管理子系统面向应用发布如下系统公共事件,应用如需订阅系统公共事件,请参考公共事件[接口文档](../js-apis-commonEventManager.md)。 + +## COMMON_EVENT_BATTERY_CHANGED +表示电池充电状态、电平和其他信息发生变化的公共事件的动作。 + +- 值: usual.event.BATTERY_CHANGED +- 订阅者所需权限: 无 + +当电池电量、电池电压、电池温度、电池健康状态、设备连接的充电器类型、充电器最大电流、充电器最大电压、电池充电状态、充电次数、电池的总容量、电池剩余容量、电池的技术型号、当前电池的电流、电池的充电类型变化时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_BATTERY_LOW +表示电池电量低的普通事件的动作。 + +- 值: usual.event.BATTERY_LOW +- 订阅者所需权限: 无 + +当电池电量低于设备设置的低电量百分比值时,将会触发事件通知服务发布该系统公共事件。设备设置低电量百分比值请参考[电量等级定制开发指导](../../../../device-dev/subsystems/subsys-power-battery-level-customization.md)。 + +## COMMON_EVENT_BATTERY_OKAY +表示电池退出低电量状态的公共事件的动作。 + +- 值: usual.event.BATTERY_OKAY +- 订阅者所需权限: 无 + +当电池电量从低电量等级变化到电池电量高于低电量等级时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_POWER_CONNECTED +设备连接到外部电源的公共事件的动作。 + +- 值: usual.event.POWER_CONNECTED +- 订阅者所需权限: 无 + +当设备连接到外部可识别的充电器类型充电时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_POWER_DISCONNECTED +设备与外部电源断开的公共事件的动作。 + +- 值: usual.event.POWER_DISCONNECTED +- 订阅者所需权限: 无 + +当设备与外部电源断开时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_DISCHARGING +表示系统停止为电池充电的公共事件的动作。 + +- 值: usual.event.DISCHARGING +- 订阅者所需权限: 无 + +当系统停止为电池充电时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_CHARGING +表示系统开始为电池充电的公共事件的动作。 + +- 值: usual.event.CHARGING +- 订阅者所需权限: 无 + +当系统开始为电池充电时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_CHARGE_TYPE_CHANGED +表示系统充电类型改变的公共事件的动作。仅限系统应用使用。 +- 值: usual.event.CHARGE_TYPE_CHANGED + +- 订阅者所需权限: 无 + +当系统充电类型改变时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_SHUTDOWN +表示设备正在关闭并将继续最终关闭的公共事件的操作。 + +- 值: usual.event.SHUTDOWN +- 订阅者所需权限: 无 + +当设备正在关闭并将继续最终关闭时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_SCREEN_OFF +表示设备屏幕关闭且设备处于睡眠状态的普通事件的动作。 + +- 值: usual.event.SCREEN_OFF +- 订阅者所需权限: 无 + +当设备屏幕关闭且设备处于睡眠状态时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_SCREEN_ON +表示设备屏幕打开且设备处于交互状态的公共事件的操作。 + +- 值: usual.event.SCREEN_ON +- 订阅者所需权限: 无 + +当设备屏幕打开且设备处于交互状态时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_POWER_SAVE_MODE_CHANGED +表示系统节能模式更改的公共事件的动作。 + +- 值: usual.event.POWER_SAVE_MODE_CHANGED +- 订阅者所需权限: 无 + +当系统节能模式更改时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_THERMAL_LEVEL_CHANGED +表示设备热状态的公共事件的动作。 + +- 值: usual.event.THERMAL_LEVEL_CHANGED +- 订阅者所需权限: 无 + +当设备热等级变化时,将会触发事件通知服务发布该系统公共事件。设备热等级配置请参考[热等级定制开发指导](../../../../device-dev/subsystems/subsys-thermal_level.md)。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/figures/Cursor_Circle.png b/zh-cn/application-dev/reference/apis/figures/Cursor_Circle.png new file mode 100644 index 0000000000000000000000000000000000000000..75b942a03da161b31d717fcfcb0a6ede1d65e76b Binary files /dev/null and b/zh-cn/application-dev/reference/apis/figures/Cursor_Circle.png differ diff --git a/zh-cn/application-dev/reference/apis/figures/Cursor_Cross.png b/zh-cn/application-dev/reference/apis/figures/Cursor_Cross.png new file mode 100644 index 0000000000000000000000000000000000000000..1b8391c4dc617e07270489643c03eede068882d1 Binary files /dev/null and b/zh-cn/application-dev/reference/apis/figures/Cursor_Cross.png differ diff --git a/zh-cn/application-dev/reference/apis/figures/Horizontal_Text_Cursor.png b/zh-cn/application-dev/reference/apis/figures/Horizontal_Text_Cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..6911b3a2c702613239bef39a7101832f5343ccdb Binary files /dev/null and b/zh-cn/application-dev/reference/apis/figures/Horizontal_Text_Cursor.png differ diff --git a/zh-cn/application-dev/reference/apis/js-apis-abilityAccessCtrl.md b/zh-cn/application-dev/reference/apis/js-apis-abilityAccessCtrl.md index 22e2fd481fed190b88ee82b92d27a9acca1c9b43..d71dabc4c8b38071f30c5d8ef766aab50721f36b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-abilityAccessCtrl.md +++ b/zh-cn/application-dev/reference/apis/js-apis-abilityAccessCtrl.md @@ -197,7 +197,7 @@ grantUserGrantedPermission(tokenID: number, permissionName: Permissions, permiss | tokenID | number | 是 | 目标应用的身份标识。可通过应用的[ApplicationInfo](js-apis-bundleManager-applicationInfo.md)获得。| | permissionName | Permissions | 是 | 被授予的权限名称,合法的权限名取值可在[系统权限定义列表](../../security/permission-list.md)中查询。 | | permissionFlags | number | 是 | 授权选项
- 0表示权限未经过用户主动设置。
- 1表示当次用户若选择禁止该权限,下次权限弹窗仍可以弹出申请用户授权。
- 2表示当次用户若选择禁止该权限,下次不会再弹出权限弹窗,需要用户在setting的权限管理中进行授权。
- 4表示当次权限设置为系统授权,用户不可更改这个权限授权状态。 | -| callback | AsyncCallback<void> | 是 | 授予应用user grant权限。当授予权限成功时,err为undefine;否则为错误对象。 | +| callback | AsyncCallback<void> | 是 | 授予应用user grant权限。当授予权限成功时,err为undefined;否则为错误对象。 | **错误码:** @@ -308,7 +308,7 @@ revokeUserGrantedPermission(tokenID: number, permissionName: Permissions, permis | tokenID | number | 是 | 目标应用的身份标识。可通过应用的[ApplicationInfo](js-apis-bundleManager-applicationInfo.md)获得。 | | permissionName | Permissions | 是 | 被撤销的权限名称,合法的权限名取值可在[系统权限定义列表](../../security/permission-list.md)中查询。 | | permissionFlags | number | 是 | 授权选项
- 0表示权限未经过用户主动设置。
- 1表示当次用户若选择禁止该权限,下次权限弹窗仍可以弹出申请用户授权。
- 2表示当次用户若选择禁止该权限,下次不会再弹出权限弹窗,需要用户在setting的权限管理中进行授权。
- 4表示当次权限设置为系统授权,用户不可更改这个权限授权状态。 | -| callback | AsyncCallback<void> | 是 | 撤销应用user grant权限。当撤销权限成功时,err为undefine;否则为错误对象。 | +| callback | AsyncCallback<void> | 是 | 撤销应用user grant权限。当撤销权限成功时,err为undefined;否则为错误对象。 | **错误码:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-animator.md b/zh-cn/application-dev/reference/apis/js-apis-animator.md index b0c58257114f39e21f789d3239e32dfb6b9f913d..16c362683449d14287bd8bfa9a8b3ed2e187ede9 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-animator.md +++ b/zh-cn/application-dev/reference/apis/js-apis-animator.md @@ -6,7 +6,7 @@ > > 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > -> 该模块不支持在[UIAbility](./js-apis-app-ability-uiAbility.md)中使用。 +> 该模块不支持在[UIAbility](./js-apis-app-ability-uiAbility.md)中使用,需要在创建组件实例后使用。 ## 导入模块 diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md index 42660c97725ae2494ba314a9815dc11413c867cf..18f417c955281d37f27a649b737b0481321906ec 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md @@ -20,7 +20,7 @@ static isRunningInStabilityTest(callback: AsyncCallback<boolean>): void **系统能力**:SystemCapability.Ability.AbilityRuntime.Core -**返回值:** +**参数:** | 类型| 说明 | | -------- | -------- | @@ -126,7 +126,7 @@ isRamConstrainedDevice(callback: AsyncCallback\): void; **系统能力**:SystemCapability.Ability.AbilityRuntime.Core -**返回值:** +**参数:** | 类型 | 说明 | | -------- | -------- | @@ -196,7 +196,7 @@ getAppMemorySize(callback: AsyncCallback\): void; **系统能力**:SystemCapability.Ability.AbilityRuntime.Core -**返回值:** +**参数:** | 类型 | 说明 | | -------- | -------- | @@ -270,7 +270,7 @@ getRunningProcessInformation(callback: AsyncCallback\ **系统能力**:SystemCapability.Ability.AbilityRuntime.Core -**返回值:** +**参数:** | 类型 | 说明 | | -------- | -------- | @@ -354,7 +354,7 @@ isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCa | bundleName | string | 是 | 表示要查询的共享库包名。 | | versionCode | number | 是 | 表示要查询的共享库版本号。 | -**返回值:** +**参数:** | 类型 | 说明 | | -------- | -------- | diff --git a/zh-cn/application-dev/reference/apis/js-apis-arkui-UIContext.md b/zh-cn/application-dev/reference/apis/js-apis-arkui-UIContext.md new file mode 100644 index 0000000000000000000000000000000000000000..4ff0256d70b8f110c20cbd17481252285efaf011 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-arkui-UIContext.md @@ -0,0 +1,1253 @@ +# @ohos.arkui.UIContext (UIContext) + +提供UIContext可调用的接口。 + +> **说明:** +> +> 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 +> +> 示例效果请以真机运行为准,当前IDE预览器不支持。 + +## UIContext + +以下API需先使用ohos.window中的[getUIContext()](./js-apis-window.md#getuicontext10)方法获取UIContext实例,再通过此实例调用对应方法。本文中UIContext对象以uiContext表示。 + +### getFont + +getFont(): Font + +获取Font对象。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| ----- | ----------------- | +| [Font](#font) | 返回Font实例对象。 | + +**示例:** + +```ts +uiContext.getFont(); +``` + +### getMediaQuery + +getMediaQuery(): MediaQuery + +获取MediaQuery对象。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| ----- | ----------------- | +| [MediaQuery](#mediaquery) | 返回MediaQuery实例对象。 | + +**示例:** + +```ts +uiContext.getMediaQuery(); +``` + +### getRouter + +getRouter(): Router + +获取Router对象。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| ----- | ----------------- | +| [Router](#router) | 返回Router实例对象。 | + +**示例:** + +```ts +uiContext.getRouter(); +``` + +### getPromptAction + +getPromptAction(): PromptAction + +获取PromptAction对象。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| ----- | ----------------- | +| [PromptAction](#promptaction) | 返回PromptAction实例对象。 | + +**示例:** + +```ts +uiContext.getPromptAction(); +``` + +### animateTo + +animateTo(value: AnimateParam, event: () => void): void + +提供animateTo接口来指定由于闭包代码导致的状态变化插入过渡动效。 + +从API version 9开始,该接口支持在ArkTS卡片中使用。 + +**参数:** + +| 参数名 | 类型 | 是否必填 | 描述 | +| ---------------- | ------------ | -------------------- | -------------------- | +| value | [AnimateParam](../arkui-ts/ts-explicit-animation.md#animateparam对象说明) | 是 | 设置动画效果相关参数。 | +| event | () => void | 是 | 指定显示动效的闭包函数,在闭包函数中导致的状态变化系统会自动插入过渡动画。 | + +**示例:** + +```ts +// xxx.ets +@Entry +@Component +struct AnimateToExample { + @State widthSize: number = 250 + @State heightSize: number = 100 + @State rotateAngle: number = 0 + private flag: boolean = true + + build() { + Column() { + Button('change size') + .width(this.widthSize) + .height(this.heightSize) + .margin(30) + .onClick(() => { + if (this.flag) { + uiContext.animateTo({ + duration: 2000, + curve: Curve.EaseOut, + iterations: 3, + playMode: PlayMode.Normal, + onFinish: () => { + console.info('play end') + } + }, () => { + this.widthSize = 150 + this.heightSize = 60 + }) + } else { + uiContext.animateTo({}, () => { + this.widthSize = 250 + this.heightSize = 100 + }) + } + this.flag = !this.flag + }) + Button('change rotate angle') + .margin(50) + .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle }) + .onClick(() => { + uiContext.animateTo({ + duration: 1200, + curve: Curve.Friction, + delay: 500, + iterations: -1, // 设置-1表示动画无限循环 + playMode: PlayMode.Alternate, + onFinish: () => { + console.info('play end') + } + }, () => { + this.rotateAngle = 90 + }) + }) + }.width('100%').margin({ top: 5 }) + } +} +``` + +### showAlertDialog + +showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons): void + +显示警告弹窗组件,可设置文本内容与响应回调。 + +**参数:** + +| 参数名 | 参数类型 | 参数描述 | +| ---- | --------------- | -------- | +| options | [AlertDialogParamWithConfirm](../arkui-ts/ts-methods-alert-dialog-box.md#alertdialogparamwithconfirm对象说明) \| [AlertDialogParamWithButtons](../arkui-ts/ts-methods-alert-dialog-box.md#alertdialogparamwithbuttons对象说明) | 定义并显示AlertDialog组件。 | + +**示例:** + +```ts +uiContext.showAlertDialog( + { + title: 'title', + message: 'text', + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: -20 }, + gridCount: 3, + confirm: { + value: 'button', + action: () => { + console.info('Button-clicking callback') + } + }, + cancel: () => { + console.info('Closed callbacks') + } + } +) +``` + +### showActionSheet + +showActionSheet(value: ActionSheetOptions): void + +定义列表弹窗并弹出。 + +**ActionSheetOptions参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ---------- | -------------------------- | ------- | ----------------------------- | +| title | [Resource](../arkui-ts/ts-types.md#resource) \| string | 是 | 弹窗标题。 | +| message | [Resource](../arkui-ts/ts-types.md#resource) \| string | 是 | 弹窗内容。 | +| autoCancel | boolean | 否 | 点击遮障层时,是否关闭弹窗。
默认值:true | +| confirm | {
value: [ResourceStr](../arkui-ts/ts-types.md#resourcestr),
action: () => void
} | 否 | 确认按钮的文本内容和点击回调。
默认值:
value:按钮文本内容。
action: 按钮选中时的回调。 | +| cancel | () => void | 否 | 点击遮障层关闭dialog时的回调。 | +| alignment | [DialogAlignment](../arkui-ts/ts-methods-alert-dialog-box.md#dialogalignment枚举说明) | 否 | 弹窗在竖直方向上的对齐方式。
默认值:DialogAlignment.Bottom | +| offset | {
dx: Length,
dy: Length
} | 否 | 弹窗相对alignment所在位置的偏移量。{
dx: 0,
dy: 0
} | +| sheets | Array<SheetInfo> | 是 | 设置选项内容,每个选择项支持设置图片、文本和选中的回调。 | + +**SheetInfo接口说明:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ------ | ------------------------------------------------------------ | ---- | ----------------- | +| title | [ResourceStr](../arkui-ts/ts-types.md#resourcestr) | 是 | 选项的文本内容。 | +| icon | [ResourceStr](../arkui-ts/ts-types.md#resourcestr) | 否 | 选项的图标,默认无图标显示。 | +| action | ()=>void | 是 | 选项选中的回调。 | + +**示例:** + +```ts +uiContext.showActionSheet({ + title: 'ActionSheet title', + message: 'message', + autoCancel: true, + confirm: { + value: 'Confirm button', + action: () => { + console.log('Get Alert Dialog handled') + } + }, + cancel: () => { + console.log('actionSheet canceled') + }, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: -10 }, + sheets: [ + { + title: 'apples', + action: () => { + console.log('apples') + } + }, + { + title: 'bananas', + action: () => { + console.log('bananas') + } + }, + { + title: 'pears', + action: () => { + console.log('pears') + } + } + ] +}) +``` + +### showDatePickerDialog + +showDatePickerDialog(options: DatePickerDialogOptions): void + +定义日期滑动选择器弹窗并弹出。 + +**DatePickerDialogOptions参数:** + +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| -------- | -------- | -------- | -------- | -------- | +| start | Date | 否 | Date('1970-1-1') | 设置选择器的起始日期。 | +| end | Date | 否 | Date('2100-12-31') | 设置选择器的结束日期。 | +| selected | Date | 否 | 当前系统日期 | 设置当前选中的日期。 | +| lunar | boolean | 否 | false | 日期是否显示为农历。 | +| showTime | boolean | 否 | false | 是否展示时间项。 | +| useMilitaryTime | boolean | 否 | false | 展示时间是否为24小时制。 | +| disappearTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | +| textStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | +| selectedTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置选中项的文本颜色、字号、字体粗细。 | +| onAccept | (value: [DatePickerResult](../arkui-ts/ts-basic-components-datepicker.md#datepickerresult对象说明)) => void | 否 | - | 点击弹窗中的“确定”按钮时触发该回调。 | +| onCancel | () => void | 否 | - | 点击弹窗中的“取消”按钮时触发该回调。 | +| onChange | (value: [DatePickerResult](../arkui-ts/ts-basic-components-datepicker.md#datepickerresult对象说明)) => void | 否 | - | 滑动弹窗中的滑动选择器使当前选中项改变时触发该回调。 | + +**示例:** + +```ts +let selectedDate: Date = new Date("2010-1-1") +uiContext.showDatePickerDialog({ + start: new Date("2000-1-1"), + end: new Date("2100-12-31"), + selected: selectedDate, + onAccept: (value: DatePickerResult) => { + // 通过Date的setFullYear方法设置按下确定按钮时的日期,这样当弹窗再次弹出时显示选中的是上一次确定的日期 + selectedDate.setFullYear(value.year, value.month, value.day) + console.info("DatePickerDialog:onAccept()" + JSON.stringify(value)) + }, + onCancel: () => { + console.info("DatePickerDialog:onCancel()") + }, + onChange: (value: DatePickerResult) => { + console.info("DatePickerDialog:onChange()" + JSON.stringify(value)) + } +}) +``` + +### showTimePickerDialog + +showTimePickerDialog(options: TimePickerDialogOptions): void + +定义时间滑动选择器弹窗并弹出。 + +**TimePickerDialogOptions参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | -------- | -------- | -------- | +| selected | Date | 否 | 设置当前选中的时间。
默认值:当前系统时间 | +| useMilitaryTime | boolean | 否 | 展示时间是否为24小时制,默认为12小时制。
默认值:false | +| disappearTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | +| textStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | +| selectedTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。 | +| onAccept | (value: [TimePickerResult](../arkui-ts/ts-basic-components-timepicker.md#timepickerresult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 | +| onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 | +| onChange | (value: [TimePickerResult](../arkui-ts/ts-basic-components-timepicker.md#timepickerresult对象说明)) => void | 否 | 滑动弹窗中的选择器使当前选中时间改变时触发该回调。 | + +**示例:** + +```ts +let selectTime: Date = new Date('2020-12-25T08:30:00') +uiContext.showTimePickerDialog({ + selected: this.selectTime, + onAccept: (value: TimePickerResult) => { + // 设置selectTime为按下确定按钮时的时间,这样当弹窗再次弹出时显示选中的为上一次确定的时间 + this.selectTime.setHours(value.hour, value.minute) + console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)) + }, + onCancel: () => { + console.info("TimePickerDialog:onCancel()") + }, + onChange: (value: TimePickerResult) => { + console.info("TimePickerDialog:onChange()" + JSON.stringify(value)) + } +}) +``` + +### showTextPickerDialog + +showTextPickerDialog(options: TextPickerDialogOptions): void + +定义文本滑动选择器弹窗并弹出。 + +**TextPickerDialogOptions参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | -------- | -------- | -------- | +| range | string[] \| [Resource](../arkui-ts/ts-types.md#resource)\|[TextPickerRangeContent](../arkui-ts/ts-basic-components-textpicker.md#textpickerrangecontent10类型说明)[] | 是 | 设置文本选择器的选择范围。不可设置为空数组,若设置为空数组,则不弹出弹窗。 | +| selected | number | 否 | 设置选中项的索引值。
默认值:0 | +| value | string | 否 | 设置选中项的文本内容。当设置了selected参数时,该参数不生效。如果设置的value值不在range范围内,则默认取range第一个元素。| +| defaultPickerItemHeight | number \| string | 否 | 设置选择器中选项的高度。 | +| disappearTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | +| textStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | +| selectedTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。 | +| onAccept | (value: [TextPickerResult](../arkui-ts/ts-methods-textpicker-dialog.md#textpickerresult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 | +| onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 | +| onChange | (value: [TextPickerResult](../arkui-ts/ts-methods-textpicker-dialog.md#textpickerresult对象说明)) => void | 否 | 滑动弹窗中的选择器使当前选中项改变时触发该回调。 | + +**示例:** + +```ts +let select: number = 2 +let fruits: string[] = ['apple1', 'orange2', 'peach3', 'grape4', 'banana5'] +uiContext.showTextPickerDialog({ + range: this.fruits, + selected: this.select, + onAccept: (value: TextPickerResult) => { + // 设置select为按下确定按钮时候的选中项index,这样当弹窗再次弹出时显示选中的是上一次确定的选项 + this.select = value.index + console.info("TextPickerDialog:onAccept()" + JSON.stringify(value)) + }, + onCancel: () => { + console.info("TextPickerDialog:onCancel()") + }, + onChange: (value: TextPickerResult) => { + console.info("TextPickerDialog:onChange()" + JSON.stringify(value)) + } +}) +``` + +## Font + +以下API需先使用UIContext中的[getFont()](#getfont)方法获取到Font对象,再通过该对象调用对应方法。 + +### registerFont + +registerFont(options: FontOptions): void + +在字体管理中注册自定义字体。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | --------------------------- | ---- | ----------- | +| options | [FontOptions](js-apis-font.md#fontoptions) | 是 | 注册的自定义字体信息。 | + +**示例:** + +```ts +let font = uiContext.getFont(); +font.registerFont({ + familyName: 'medium', + familySrc: '/font/medium.ttf' +}); +``` + +## MediaQuery + +以下API需先使用UIContext中的[getMediaQuery()](#getmediaquery)方法获取到MediaQuery对象,再通过该对象调用对应方法。 + +### matchMediaSync + +matchMediaSync(condition: string): MediaQueryListener + +设置媒体查询的查询条件,并返回对应的监听句柄。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------------------------------------- | +| condition | string | 是 | 媒体事件的匹配条件,具体可参考[媒体查询语法规则](../../ui/arkts-layout-development-media-query.md#语法规则)。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------ | ---------------------- | +| MediaQueryListener | 媒体事件监听句柄,用于注册和去注册监听回调。 | + +**示例:** + +```ts +let mediaquery = uiContext.getMediaQuery(); +let listener = mediaquery.matchMediaSync('(orientation: landscape)'); //监听横屏事件 +``` + +## Router + +以下API需先使用UIContext中的[getRouter()](#getrouter)方法获取到Router对象,再通过该对象调用对应方法。 + +### pushUrl + +pushUrl(options: RouterOptions): Promise<void> + +跳转到应用内的指定页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | --------- | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 跳转页面描述信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100002 | if the uri is not exist. | +| 100003 | if the pages are pushed too much. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.pushUrl({ + url: 'pages/routerpage2', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}) + .then(() => { + // success + }) + .catch(err => { + console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +### pushUrl + +pushUrl(options: RouterOptions, callback: AsyncCallback<void>): void + +跳转到应用内的指定页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | --------- | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 跳转页面描述信息。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100002 | if the uri is not exist. | +| 100003 | if the pages are pushed too much. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.pushUrl({ + url: 'pages/routerpage2', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}, (err) => { + if (err) { + console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('pushUrl success'); +}) +``` + +### pushUrl + +pushUrl(options: RouterOptions, mode: RouterMode): Promise<void> + +跳转到应用内的指定页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 跳转页面描述信息。 | +| mode | [RouterMode](js-apis-router.md#routermode9) | 是 | 跳转页面使用的模式。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100002 | if the uri is not exist. | +| 100003 | if the pages are pushed too much. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.pushUrl({ + url: 'pages/routerpage2', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}, router.RouterMode.Standard) + .then(() => { + // success + }) + .catch(err => { + console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +### pushUrl + +pushUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void + +跳转到应用内的指定页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 跳转页面描述信息。 | +| mode | [RouterMode](js-apis-router.md#routermode9) | 是 | 跳转页面使用的模式。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100002 | if the uri is not exist. | +| 100003 | if the pages are pushed too much. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.pushUrl({ + url: 'pages/routerpage2', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}, router.RouterMode.Standard, (err) => { + if (err) { + console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('pushUrl success'); +}) +``` + +### replaceUrl + +replaceUrl(options: RouterOptions): Promise<void> + +用应用内的某个页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Lite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ------------------ | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 替换页面描述信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found, only throw in standard system. | +| 200002 | if the uri is not exist. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.replaceUrl({ + url: 'pages/detail', + params: { + data1: 'message' + } +}) + .then(() => { + // success + }) + .catch(err => { + console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +### replaceUrl + +replaceUrl(options: RouterOptions, callback: AsyncCallback<void>): void + +用应用内的某个页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Lite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ------------------ | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 替换页面描述信息。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found, only throw in standard system. | +| 200002 | if the uri is not exist. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.replaceUrl({ + url: 'pages/detail', + params: { + data1: 'message' + } +}, (err) => { + if (err) { + console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('replaceUrl success'); +}) +``` + +### replaceUrl + +replaceUrl(options: RouterOptions, mode: RouterMode): Promise<void> + +用应用内的某个页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Lite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 替换页面描述信息。 | +| mode | [RouterMode](js-apis-router.md#routermode9) | 是 | 跳转页面使用的模式。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if can not get the delegate, only throw in standard system. | +| 200002 | if the uri is not exist. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.replaceUrl({ + url: 'pages/detail', + params: { + data1: 'message' + } +}, router.RouterMode.Standard) + .then(() => { + // success + }) + .catch(err => { + console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +### replaceUrl + +replaceUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void + +用应用内的某个页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Lite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 是 | 替换页面描述信息。 | +| mode | [RouterMode](js-apis-router.md#routermode9) | 是 | 跳转页面使用的模式。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found, only throw in standard system. | +| 200002 | if the uri is not exist. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.replaceUrl({ + url: 'pages/detail', + params: { + data1: 'message' + } +}, router.RouterMode.Standard, (err) => { + if (err) { + console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('replaceUrl success'); +}); +``` + +### back + +back(options?: RouterOptions ): void + +返回上一页面或指定的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ------------------------------------------------------------ | +| options | [RouterOptions](js-apis-router.md#routeroptions) | 否 | 返回页面描述信息,其中参数url指路由跳转时会返回到指定url的界面,如果页面栈上没有url页面,则不响应该情况。如果url未设置,则返回上一页,页面不会重新构建,页面栈里面的page不会回收,出栈后会被回收。 | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.back({url:'pages/detail'}); +``` + +### clear + +clear(): void + +清空页面栈中的所有历史页面,仅保留当前页面作为栈顶页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.clear(); +``` + +### getLength + +getLength(): string + +获取当前在页面栈内的页面数量。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| ------ | ------------------ | +| string | 页面数量,页面栈支持最大数值是32。 | + +**示例:** + +```ts +let router = uiContext.getRouter(); +let size = router.getLength(); +console.log('pages stack size = ' + size); +``` + +### getState + +getState(): RouterState + +获取当前页面的状态信息。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| --------------------------- | ------- | +| [RouterState](js-apis-router.md#routerstate) | 页面状态信息。 | + +**示例:** + +```ts +let router = uiContext.getRouter(); +let page = router.getState(); +console.log('current index = ' + page.index); +console.log('current name = ' + page.name); +console.log('current path = ' + page.path); +``` + +### showAlertBeforeBackPage + +showAlertBeforeBackPage(options: EnableAlertOptions): void + +开启页面返回询问对话框。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ---------------------------------------- | ---- | --------- | +| options | [EnableAlertOptions](js-apis-router.md#enablealertoptions) | 是 | 文本弹窗信息描述。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | + +**示例:** + +```ts +let router = uiContext.getRouter(); +try { + router.showAlertBeforeBackPage({ + message: 'Message Info' + }); +} catch(error) { + console.error(`showAlertBeforeBackPage failed, code is ${error.code}, message is ${error.message}`); +} +``` + +### hideAlertBeforeBackPage + +hideAlertBeforeBackPage(): void + +禁用页面返回询问对话框。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.hideAlertBeforeBackPage(); +``` + +### getParams + +getParams(): Object + +获取发起跳转的页面往当前页传入的参数。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| ------ | ---------------------------------- | +| object | 发起跳转的页面往当前页传入的参数。 | + +**示例:** + +```ts +let router = uiContext.getRouter(); +router.getParams(); +``` + +## PromptAction + +以下API需先使用UIContext中的[getPromptAction()](#getpromptaction)方法获取到PromptAction对象,再通过该对象调用对应方法。 + +### showToast + +showToast(options: ShowToastOptions): void + +创建并显示文本提示框。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------------- | ---- | ------- | +| options | [ShowToastOptions](js-apis-promptAction.md#showtoastoptions) | 是 | 文本弹窗选项。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | + +**示例:** + +```ts +let promptAction = uiContext.getPromptAction(); +try { + promptAction.showToast({ + message: 'Message Info', + duration: 2000 + }); +} catch (error) { + console.error(`showToast args error code is ${error.code}, message is ${error.message}`); +}; +``` + +### showDialog + +showDialog(options: ShowDialogOptions, callback: AsyncCallback<ShowDialogSuccessResponse<): void + +创建并显示对话框,对话框响应结果异步返回。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | ------------ | +| options | [ShowDialogOptions](js-apis-promptAction.md#showdialogoptions) | 是 | 页面显示对话框信息描述。 | +| callback | AsyncCallback<[ShowDialogSuccessResponse](js-apis-promptAction.md#showdialogsuccessresponse)> | 是 | 对话框响应结果回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | + +**示例:** + +```ts +let promptAction = uiContext.getPromptAction(); +try { + promptAction.showDialog({ + title: 'showDialog Title Info', + message: 'Message Info', + buttons: [ + { + text: 'button1', + color: '#000000' + }, + { + text: 'button2', + color: '#000000' + } + ] + }, (err, data) => { + if (err) { + console.info('showDialog err: ' + err); + return; + } + console.info('showDialog success callback, click button: ' + data.index); + }); +} catch (error) { + console.error(`showDialog args error code is ${error.code}, message is ${error.message}`); +}; +``` + +### showDialog + +showDialog(options: ShowDialogOptions): Promise<ShowDialogSuccessResponse> + +创建并显示对话框,对话框响应后同步返回结果。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | --------------------------------------- | ---- | ------ | +| options | [ShowDialogOptions](js-apis-promptAction.md#showdialogoptions) | 是 | 对话框选项。 | + +**返回值:** + +| 类型 | 说明 | +| ---------------------------------------- | -------- | +| Promise<[ShowDialogSuccessResponse](js-apis-promptAction.md#showdialogsuccessresponse)> | 对话框响应结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | + +**示例:** + +```ts +let promptAction = uiContext.getPromptAction(); +try { + promptAction.showDialog({ + title: 'Title Info', + message: 'Message Info', + buttons: [ + { + text: 'button1', + color: '#000000' + }, + { + text: 'button2', + color: '#000000' + } + ], + }) + .then(data => { + console.info('showDialog success, click button: ' + data.index); + }) + .catch(err => { + console.info('showDialog error: ' + err); + }) +} catch (error) { + console.error(`showDialog args error code is ${error.code}, message is ${error.message}`); +}; +``` + +### showActionMenu + +showActionMenu(options: ActionMenuOptions, callback: AsyncCallback<ActionMenuSuccessResponse>):void + +创建并显示操作菜单,菜单响应结果异步返回。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | --------- | +| options | [ActionMenuOptions](js-apis-promptAction.md#actionmenuoptions) | 是 | 操作菜单选项。 | +| callback | AsyncCallback<[ActionMenuSuccessResponse](js-apis-promptAction.md#actionmenusuccessresponse)> | 是 | 菜单响应结果回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | + +**示例:** + +```ts +let promptAction = uiContext.getPromptAction(); +try { + promptAction.showActionMenu({ + title: 'Title Info', + buttons: [ + { + text: 'item1', + color: '#666666' + }, + { + text: 'item2', + color: '#000000' + }, + ] + }, (err, data) => { + if (err) { + console.info('showActionMenu err: ' + err); + return; + } + console.info('showActionMenu success callback, click button: ' + data.index); + }) +} catch (error) { + console.error(`showActionMenu args error code is ${error.code}, message is ${error.message}`); +}; +``` + +### showActionMenu + +showActionMenu(options: ActionMenuOptions): Promise<ActionMenuSuccessResponse> + +创建并显示操作菜单,菜单响应后同步返回结果。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | --------------------------------------- | ---- | ------- | +| options | [ActionMenuOptions](js-apis-promptAction.md#actionmenuoptions) | 是 | 操作菜单选项。 | + +**返回值:** + +| 类型 | 说明 | +| ---------------------------------------- | ------- | +| Promise<[ActionMenuSuccessResponse](js-apis-promptAction.md#actionmenusuccessresponse)> | 菜单响应结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | + +**示例:** + +```ts +let promptAction = uiContext.getPromptAction(); +try { + promptAction.showActionMenu({ + title: 'showActionMenu Title Info', + buttons: [ + { + text: 'item1', + color: '#666666' + }, + { + text: 'item2', + color: '#000000' + }, + ] + }) + .then(data => { + console.info('showActionMenu success, click button: ' + data.index); + }) + .catch(err => { + console.info('showActionMenu error: ' + err); + }) +} catch (error) { + console.error(`showActionMenu args error code is ${error.code}, message is ${error.message}`); +}; +``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md b/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md index 9c4ee351f92055fd5c4b1245529a785905143861..21405345d8ab12d7c6ad25f60f2ccf40eddb5b80 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md +++ b/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md @@ -31,7 +31,7 @@ get(id: string, callback: AsyncCallback): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------- | ---- | ---------------------------------------- | -| id | string | 是 | 目标组件的[ID 标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识) | +| id | string | 是 | 目标组件的[组件标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识) | | callback | AsyncCallback<image.PixelMap> | 是 | 截图返回结果的回调。 | **示例:** @@ -74,7 +74,7 @@ struct SnapshotExample { get(id: string): Promise -获取已加载的组件的截图,传入组件的[ID 标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识),找到对应组件进行截图。通过Promise返回结果。 +获取已加载的组件的截图,传入组件的[组件标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识),找到对应组件进行截图。通过Promise返回结果。 > **说明:** > @@ -86,7 +86,7 @@ get(id: string): Promise | 参数名 | 类型 | 必填 | 说明 | | ---- | ------ | ---- | ---------------------------------------- | -| id | string | 是 | 目标组件的[ID 标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识) | +| id | string | 是 | 目标组件的[组件标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识) | **返回值:** @@ -116,8 +116,8 @@ struct SnapshotExample { Image(this.pixmap) .width(300).height(300) // ...Component - // ...Components - // ...Components + // ...Component + // ...Component Button("click to generate UI snapshot") .onClick(() => { componentSnapshot.get("root") diff --git a/zh-cn/application-dev/reference/apis/js-apis-audio.md b/zh-cn/application-dev/reference/apis/js-apis-audio.md index fcf58afaf00316b9c0ad08e715b29bd54d202a24..a92d747121452626ecec56c673c365bd7d4ab912 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-audio.md +++ b/zh-cn/application-dev/reference/apis/js-apis-audio.md @@ -579,6 +579,17 @@ async function createTonePlayerBefore(){ | STATE_RELEASED | 4 | 释放状态。 | | STATE_PAUSED | 5 | 暂停状态。 | +## AudioEffectMode10+ + +枚举,音效模式。 + +**系统能力:** SystemCapability.Multimedia.Audio.Renderer + +| 名称 | 值 | 说明 | +| ------------------ | ------ | ---------- | +| EFFECT_NONE | 0 | 关闭音效。 | +| EFFECT_DEFAULT | 1 | 默认音效。 | + ## AudioRendererRate8+ 枚举,音频渲染速度。 @@ -2083,9 +2094,7 @@ off(type: 'deviceChange', callback?: Callback): void **示例:** ```js -audioManager.off('deviceChange', (deviceChanged) => { - console.info('Should be no callback.'); -}); +audioManager.off('deviceChange'); ``` ### on('interrupt') @@ -3364,6 +3373,68 @@ audioStreamManager.isActive(audio.AudioVolumeType.MEDIA).then((value) => { }); ``` +### getAudioEffectInfoArray10+ + +getAudioEffectInfoArray(content: ContentType, usage: StreamUsage, callback: AsyncCallback<AudioEffectInfoArray>): void + +获取当前音效模式的信息。使用callback异步回调。 + +**系统能力**: SystemCapability.Multimedia.Audio.Renderer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------------------- | -------- | --------------------------- | +| content | [ContentType](#contenttype) | 是 | 音频内容类型。 | +| usage | [StreamUsage](#streamusage) | 是 | 音频流使用类型。 | +| callback | AsyncCallback<[AudioEffectInfoArray](#audioeffectinfoarray10)> | 是 | 回调函数,返回当前音效模式的信息。| + +**示例:** + +```js +audioStreamManager.getAudioEffectInfoArray(audio.ContentType.CONTENT_TYPE_MUSIC, audio.StreamUsage.STREAM_USAGE_MEDIA, async (err, audioEffectInfoArray) => { + console.info('getAudioEffectInfoArray **** Get Callback Called ****'); + if (err) { + console.error(`getAudioEffectInfoArray :ERROR: ${err}`); + return; + } else { + console.info(`The contentType of ${CONTENT_TYPE_MUSIC} and the streamUsage of ${STREAM_USAGE_MEDIA} 's effect modes are: ${audioEffectInfoArray}`); + } +}); +``` + +### getAudioEffectInfoArray10+ + +getAudioEffectInfoArray(content: ContentType, usage: StreamUsage): Promise<AudioEffectInfoArray> + +获取当前音效模式的信息。使用Promise异步回调。 + +**系统能力:** SystemCapability.Multimedia.Audio.Renderer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------------------- | -------- | --------------------------- | +| content | [ContentType](#contenttype) | 是 | 音频内容类型。 | +| usage | [StreamUsage](#streamusage) | 是 | 音频流使用类型。 | + +**返回值:** + +| 类型 | 说明 | +| --------------------------------------------------------------------------| --------------------------------------- | +| Promise<[AudioEffectInfoArray](#audioeffectinfoarray10)> | Promise对象,返回当前音效模式的信息。 | + +**示例:** + +```js +audioStreamManager.getAudioEffectInfoArray().then((audioEffectInfoArray) => { + console.info(`getAudioEffectInfoArray ######### Get Promise is called ##########`); + console.info(`The contentType of ${CONTENT_TYPE_MUSIC} and the streamUsage of ${STREAM_USAGE_MEDIA} 's effect modes are: ${audioEffectInfoArray}`); +}).catch((err) => { + console.error(`getAudioEffectInfoArray :ERROR: ${err}`); +}); +``` + ## AudioRoutingManager9+ 音频路由管理。在使用AudioRoutingManager的接口前,需要使用[getRoutingManager](#getroutingmanager9)获取AudioRoutingManager实例。 @@ -3484,9 +3555,7 @@ off(type: 'deviceChange', callback?: Callback): void **示例:** ```js -audioRoutingManager.off('deviceChange', (deviceChanged) => { - console.info('Should be no callback.'); -}); +audioRoutingManager.off('deviceChange'); ``` ### selectInputDevice9+ @@ -4038,9 +4107,7 @@ off(type: 'preferOutputDeviceChangeForRendererInfo', callback?: Callback { - console.info('Should be no callback.'); -}); +audioRoutingManager.off('preferOutputDeviceChangeForRendererInfo'); ``` ## AudioRendererChangeInfoArray9+ @@ -4158,6 +4225,10 @@ audioStreamManager.on('audioCapturerChange', (AudioCapturerChangeInfoArray) => }); ``` +## AudioEffectInfoArray10+ + +待查询ContentType和StreamUsage组合场景下的音效模式数组类型,[AudioEffectMode](#audioeffectmode10)数组,只读。 + ## AudioDeviceDescriptors 设备属性数组类型,为[AudioDeviceDescriptor](#audiodevicedescriptor)的数组,只读。 @@ -4401,6 +4472,113 @@ audioRenderer.getAudioStreamId().then((streamid) => { }); ``` +### setAudioEffectMode10+ + +setAudioEffectMode(mode: AudioEffectMode, callback: AsyncCallback\): void + +设置当前音效模式。使用callback方式异步返回结果。 + +**系统能力:** SystemCapability.Multimedia.Audio.Renderer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | ------------------------ | +| mode | [AudioEffectMode](#audioeffectmode10) | 是 | 音效模式。 | +| callback | AsyncCallback\ | 是 | 用于返回执行结果的回调。 | + +**示例:** + +```js +audioRenderer.setAudioEffectMode(audio.AudioEffectMode.EFFECT_DEFAULT, (err) => { + if (err) { + console.error('Failed to set params'); + } else { + console.info('Callback invoked to indicate a successful audio effect mode setting.'); + } +}); +``` + +### setAudioEffectMode10+ + +setAudioEffectMode(mode: AudioEffectMode): Promise\ + +设置当前音效模式。使用Promise方式异步返回结果。 + +**系统能力:** SystemCapability.Multimedia.Audio.Renderer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ---------------------------------------- | ---- | ------------ | +| mode | [AudioEffectMode](#audioeffectmode10) | 是 | 音效模式。 | + +**返回值:** + +| 类型 | 说明 | +| -------------- | ------------------------- | +| Promise\ | Promise用于返回执行结果。 | + +**示例:** + +```js +audioRenderer.setAudioEffectMode(audio.AudioEffectMode.EFFECT_DEFAULT).then(() => { + console.info('setAudioEffectMode SUCCESS'); +}).catch((err) => { + console.error(`ERROR: ${err}`); +}); +``` + +### getAudioEffectMode10+ + +getAudioEffectMode(callback: AsyncCallback\): void + +获取当前音效模式。使用callback方式异步返回结果。 + +**系统能力:** SystemCapability.Multimedia.Audio.Renderer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------------------------------------- | ---- | ------------------ | +| callback | AsyncCallback<[AudioEffectMode](#audioeffectmode10)> | 是 | 回调返回当前音效模式。 | + +**示例:** + +```js +audioRenderer.getAudioEffectMode((err, effectmode) => { + if (err) { + console.error('Failed to get params'); + } else { + console.info(`getAudioEffectMode: ${effectmode}`); + } +}); +``` + +### getAudioEffectMode10+ + +getAudioEffectMode(): Promise\ + +获取当前音效模式。使用Promise方式异步返回结果。 + +**系统能力:** SystemCapability.Multimedia.Audio.Renderer + +**返回值:** + +| 类型 | 说明 | +| ------------------------------------------------- | ------------------------- | +| Promise<[AudioEffectMode](#audioeffectmode10)> | Promise回调返回当前音效模式。 | + +**示例:** + +```js +audioRenderer.getAudioEffectMode().then((effectmode) => { + console.info(`getAudioEffectMode: ${effectmode}`); +}).catch((err) => { + console.error(`ERROR: ${err}`); +}); +``` + ### start8+ start(callback: AsyncCallback): void diff --git a/zh-cn/application-dev/reference/apis/js-apis-cryptoFramework.md b/zh-cn/application-dev/reference/apis/js-apis-cryptoFramework.md index 0c80adbe729fabcdff44ca7009521f8963eb2820..7f94ed2d53385f476881ce819528c68b6f719bb1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-cryptoFramework.md +++ b/zh-cn/application-dev/reference/apis/js-apis-cryptoFramework.md @@ -8,7 +8,7 @@ ## 导入模块 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" ``` @@ -24,7 +24,7 @@ import cryptoFramework from "@ohos.security.cryptoFramework" | NOT_SUPPORT | 801 | 操作不支持。 | | ERR_OUT_OF_MEMORY | 17620001 | 内存错误。 | | ERR_RUNTIME_ERROR | 17620002 | 运行时外部错误。 | -| ERR_CRYPTO_OPERATION | 17630001 | 调用三方算法库API出错。 | +| ERR_CRYPTO_OPERATION | 17630001 | 调用三方算 法库API出错。 | ## DataBlob @@ -36,1581 +36,1290 @@ buffer数组。 | ---- | ---------- | ---- | ---- | ------ | | data | Uint8Array | 是 | 是 | 数据。 | +## ParamsSpec -## cryptoFramework.createMac +加解密参数,在进行对称加解密时需要构造其子类对象,并将子类对象传入[init()](#init-2)方法。
适用于需要iv等参数的对称加解密模式(对于无iv等参数的模式如ECB模式,无需构造,在[init()](#init-2)中传入null即可)。 -createMac(algName : string) : Mac +**系统能力:** SystemCapability.Security.CryptoFramework -生成Mac实例,用于进行消息认证码的计算与操作。
支持的规格详见框架概述“[HMAC消息认证码算法规格](../../security/cryptoFramework-overview.md#hmac消息认证码算法规格)”一节。 +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| algName | string | 是 | 是 | 指明对称加解密参数的算法模式。可选值如下:
- "IvParamsSpec": 适用于CBC\|CTR\|OFB\|CFB模式
- "GcmParamsSpec": 适用于GCM模式
- "CcmParamsSpec": 适用于CCM模式 | -**系统能力:** SystemCapability.Security.CryptoFramework +> **说明:** +> +> 由于[init()](#init-2)的params参数是ParamsSpec类型(父类),而实际需要传入具体的子类对象(如IvParamsSpec),因此在构造子类对象时应设置其父类ParamsSpec的algName参数,使算法库在init()时知道传入的是哪种子类对象。 -**参数:** +## IvParamsSpec -| 参数名 | 类型 | 必填 | 说明 | -| ------- | ------ | ---- | ------------------------------------------------------------ | -| algName | string | 是 | 指定摘要算法,支持算法请参考“[HMAC算法支持范围](../../security/cryptoFramework-overview.md#hmac消息认证码算法规格)”一节 | +加解密参数[ParamsSpec](#paramsspec)的子类,用于在对称加解密时作为[init()](#init-2)方法的参数。
适用于CBC、CTR、OFB、CFB这些仅使用iv作为参数的加解密模式。 -**返回值**: +**系统能力:** SystemCapability.Security.CryptoFramework -| 类型 | 说明 | -| ---- | --------------------------------------- | -| Mac | 返回由输入算法指定生成的[Mac](#mac)对象 | +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ---- | --------------------- | ---- | ---- | ------------------------------------------------------------ | +| iv | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数iv。常见取值如下:
- AES的CBC\|CTR\|OFB\|CFB模式:iv长度为16字节
- 3DES的CBC\|OFB\|CFB模式:iv长度为8字节 | -**错误码:** +> **说明:** +> +> 传入[init()](#init-2)方法前需要指定其algName属性(来源于父类[ParamsSpec](#paramsspec))。 -| 错误码ID | 错误信息 | -| -------- | ------------------ | -| 17620001 | memory error. | +## GcmParamsSpec -**示例:** +加解密参数[ParamsSpec](#paramsspec)的子类,用于在对称加解密时作为[init()](#init-2)方法的参数。
适用于GCM模式。 -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +**系统能力:** SystemCapability.Security.CryptoFramework -var mac; -try { - // 参数选择请参考上述算法支持范围 - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); -} -``` +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | --------------------- | ---- | ---- | ------------------------------------------------------------ | +| iv | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数iv,长度为12字节。 | +| aad | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数aad,长度为8字节。 | +| authTag | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数authTag,长度为16字节。
采用GCM模式加密时,需要获取[doFinal()](#dofinal-2)输出的[DataBlob](#datablob),取出其末尾16字节作为解密时[init()](#init-2)方法的入参[GcmParamsSpec](#gcmparamsspec)中的的authTag。 | -## Mac +> **说明:** +> +> 传入[init()](#init-2)方法前需要指定其algName属性(来源于父类[ParamsSpec](#paramsspec))。 -Mac类,调用Mac方法可以进行MAC(Message Authentication Code)加密计算。调用前,需要通过[createMac](#cryptoframeworkcreatemac)构造Mac实例。 +## CcmParamsSpec -### 属性 +加解密参数[ParamsSpec](#paramsspec)的子类,用于在对称加解密时作为[init()](#init-2)方法的参数。
适用于CCM模式。 **系统能力:** SystemCapability.Security.CryptoFramework -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | -------------------- | -| algName | string | 是 | 否 | 代表指定的摘要算法名 | +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | --------------------- | ---- | ---- | ------------------------------------------------------------ | +| iv | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数iv,长度为7字节。 | +| aad | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数aad,长度为8字节。 | +| authTag | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数authTag,长度为12字节。
采用CCM模式加密时,需要获取[doFinal()](#dofinal-2)输出的[DataBlob](#datablob),取出其末尾12字节作为解密时[init()](#init-2)方法的入参[CcmParamsSpec](#ccmparamsspec)中的authTag。 | -### init +> **说明:** +> +> 传入[init()](#init-2)方法前需要指定其algName属性(来源于父类[ParamsSpec](#paramsspec))。 -init(key : SymKey, callback : AsyncCallback\) : void; +## CryptoMode -使用对称密钥初始化Mac计算 +表示加解密操作的枚举。 **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** +| 名称 | 值 | 说明 | +| ------------ | ---- | ------------------ | +| ENCRYPT_MODE | 0 | 表示进行加密操作。 | +| DECRYPT_MODE | 1 | 表示进行解密操作。 | -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------------------- | ---- | ------------ | -| key | [SymKey](#symkey) | 是 | 共享对称密钥 | -| callback | AsyncCallback\ | 是 | 回调函数 | +## AsyKeySpecItem10+ -**错误码:** +表示密钥参数的枚举。 -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17630001 | crypto operation error. | +**系统能力:** SystemCapability.Security.CryptoFramework -**示例:** +| 名称 | 值 | 说明 | +| ------------ | ---- | ---------------- | +| DSA_P_BN | 101 | DSA算法的素模数p。 | +| DSA_Q_BN | 102 | DSA算法中密钥参数q(p-1的素因子)。 | +| DSA_G_BN | 103 | DSA算法的参数g。 | +| DSA_SK_BN | 104 | DSA算法的私钥sk。 | +| DSA_PK_BN | 105 | DSA算法的公钥pk。 | +| ECC_FP_P_BN | 201 | DSA算法中表示椭圆曲线Fp域的素数p。 | +| ECC_A_BN | 202 | DSA算法中椭圆曲线的第一个系数a。 | +| ECC_B_BN | 203 | DSA算法中椭圆曲线的第二个系数b。 | +| ECC_G_X_BN | 204 | ECC算法中基点g的x坐标。 | +| ECC_G_Y_BN | 205 | ECC算法中基点g的y坐标。 | +| ECC_N_BN | 206 | ECC算法中基点g的阶n。 | +| ECC_H_NUM | 207 | ECC算法中的余因子h。 | +| ECC_SK_BN | 208 | ECC算法中的私钥sk。 | +| ECC_PK_X_BN | 209 | ECC算法中,公钥pk(椭圆曲线上的一个点)的x坐标。 | +| ECC_PK_Y_BN | 210 | ECC算法中,公钥pk(椭圆曲线上的一个点)的y坐标。 | +| ECC_FIELD_TYPE_STR | 211 | ECC算法中,椭圆曲线的域类型(当前只支持Fp域)。 | +| ECC_FIELD_SIZE_NUM | 212 | ECC算法中域的大小,单位为bits(注:对于Fp域,域的大小为素数p的bits长度)。 | +| ECC_CURVE_NAME_STR | 213 | ECC算法中的SECG曲线名称。 | +| RSA_N_BN | 301 | RSA算法中的模数n。 | +| RSA_SK_BN | 302 | RSA算法中的私钥sk(即私钥指数d)。 | +| RSA_PK_BN | 303 | RSA算法中的公钥pk(即公钥指数e)。 | + +## AsyKeySpecType10+ + +表示密钥参数类型的枚举。 -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +**系统能力:** SystemCapability.Security.CryptoFramework -var mac; -try { - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); -} -var KeyBlob; -var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); -symKeyGenerator.convertKey(KeyBlob, (err, symKey) => { - if (err) { - console.error("[Callback] err: " + err.code); - } - mac.init(symKey, (err1, ) => { - if (err1) { - console.error("[Callback] err: " + err1.code); - } - }); -}); -``` +| 名称 | 值 | 说明 | +| ------------ | ---- | ---------------- | +| COMMON_PARAMS_SPEC | 0 | 表示公私钥中包含的公共参数。使用此类型的参数可以调用[generateKeyPair](#generatekeypair-2)随机生成密钥对。 | +| PRIVATE_KEY_SPEC | 1 | 表示私钥中包含的参数。使用此类型的参数可以调用[generatePriKey](#generateprikey)生成指定的私钥。 | +| PUBLIC_KEY_SPEC | 2 | 表示公钥中包含的参数。使用此类型的参数可以调用[generatePubKey](#generatepubkey)生成指定的公钥。 | +| KEY_PAIR_SPEC | 3 | 表示公私钥中包含的全量参数。使用此类型的参数可以调用[generateKeyPair](#generatekeypair-2)生成指定的密钥对。 | -### init +## CipherSpecItem10+ + +表示加解密参数的枚举,这些加解密参数支持通过[setCipherSpec](#setcipherspec10)接口设置/通过[getCipherSpec](#getcipherspec10)接口获取。
当前只支持RSA算法,详细规格请参考框架概述[加解密规格](../../security/cryptoFramework-overview.md#加解密规格) + +**系统能力:** SystemCapability.Security.CryptoFramework + +| 名称 | 值 | 说明 | +| ------------ | ---- | ---------------- | +| OAEP_MD_NAME_STR | 100 | 表示RSA算法中,使用PKCS1_OAEP模式时,消息摘要功能的算法名。 | +| OAEP_MGF_NAME_STR | 101 | 表示RSA算法中,使用PKCS1_OAEP模式时,掩码生成算法(目前仅支持MGF1)。 | +| OAEP_MGF1_MD_STR | 102 | 表示RSA算法中,使用PKCS1_OAEP模式时,MGF1掩码生成功能的消息摘要算法。 | +| OAEP_MGF1_PSRC_UINT8ARR | 103 | 表示RSA算法中,使用PKCS1_OAEP模式时,pSource的字节流。 | -init(key : SymKey) : Promise\; +## SignSpecItem10+ -使用对称密钥初始化Mac计算 +表示签名验签参数的枚举,这些签名验签参数支持通过[setSignSpec](#setsignspec10)、[setVerifySpec](#setverifyspec10)接口设置/通过[getSignSpec](#getsignspec10)、[getVerifySpec](#getverifyspec10)接口获取。
当前只支持RSA算法,详细规格请参考框架概述[加解密规格](../../security/cryptoFramework-overview.md#加解密规格) **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** +| 名称 | 值 | 说明 | +| ------------ | ---- | ---------------- | +| PSS_MD_NAME_STR | 100 | 表示RSA算法中,使用PSS模式时,消息摘要功能的算法名。 | +| PSS_MGF_NAME_STR | 101 | 表示RSA算法中,使用PSS模式时,掩码生成算法(目前仅支持MGF1)。 | +| PSS_MGF1_MD_STR | 102 | 表示RSA算法中,使用PSS模式时,MGF1掩码生成功能的消息摘要参数。 | +| PSS_SALT_LEN_NUM | 103 | 表示RSA算法中,使用PSS模式时,盐值的长度,长度以字节为单位。 | +| PSS_TRAILER_FIELD_NUM | 104 | 表示RSA算法中,使用PSS模式时,用于编码操作的整数,值为1。 | -| 参数名 | 类型 | 必填 | 说明 | -| ------ | ------ | ---- | ------------ | -| key | [SymKey](#symkey) | 是 | 共享对称密钥 | +## AsyKeySpec10+ -**返回值:** +指定非对称密钥参数的基本接口,用于创建密钥生成器。在指定非对称密钥参数时需要构造其子类对象,并将子类对象传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。构造子类对象时,所有bigint类型的密钥参数均采用大端写法,并使用正数。 -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +**系统能力:** SystemCapability.Security.CryptoFramework -**错误码:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| algName | string | 是 | 是 | 指定非对称密钥的算法名称,比如"RSA"、"DSA"、"ECC"。 | +| specType | [AsyKeySpecType](#asykeyspectype10) | 是 | 是 | 指定密钥参数类型,用于区分公/私钥参数。 | -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17630001 | crypto operation error. | +## DSACommonParamsSpec10+ -**示例:** +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定DSA算法中公私钥包含的公共参数,随机生成公/私钥。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +**系统能力:** SystemCapability.Security.CryptoFramework -var mac; -try { - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Mac algName is: " + mac.algName); +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| p | bigint | 是 | 是 | 指定DSA算法的素模数p。 | +| q | bigint | 是 | 是 | 指定DSA算法中密钥参数q(p-1的素因子)。 | +| g | bigint | 是 | 是 | 指定DSA算法的参数g。 | -var KeyBlob; -var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); -var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); -promiseConvertKey.then(symKey => { - var promiseMacInit = mac.init(symKey); - return promiseMacInit; -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); +## DSAPubKeySpec10+ -``` +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定DSA算法中公钥包含的参数。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 -### update +**系统能力:** SystemCapability.Security.CryptoFramework -update(input : DataBlob, callback : AsyncCallback\) : void; +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| params | [DSACommonParamsSpec](#dsacommonparamsspec10) | 是 | 是 | 指定DSA算法中公私钥都包含的公共参数。 | +| pk | bigint | 是 | 是 | 指定DSA算法的公钥。 | -传入消息进行Mac更新计算 +## DSAKeyPairSpec10+ -> **说明:** -> Hmac算法多次调用update更新的代码示例详见开发指导“[使用消息认证码操作](../../security/cryptoFramework-guidelines.md#使用消息认证码操作)”。 +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定DSA算法中公私钥包含的全量参数。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| params | [DSACommonParamsSpec](#dsacommonparamsspec10) | 是 | 是 | 指定DSA算法中公私钥都包含的公共参数。 | +| sk | bigint | 是 | 是 | 指定DSA算法的私钥sk。 | +| pk | bigint | 是 | 是 | 指定DSA算法的公钥pk。 | -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------------------- | ---- | ---------- | -| input | [DataBlob](#datablob)| 是 | 传入的消息 | -| callback | AsyncCallback\ | 是 | 回调函数 | +## ECField10+ -**错误码:** +指定椭圆曲线的域。当前只支持Fp域。 -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17630001 | crypto operation error. | +**系统能力:** SystemCapability.Security.CryptoFramework -**示例:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| fieldType | string | 是 | 是 | 指定椭圆曲线域的类型,当前只支持"Fp"。 | -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +## ECFieldFp10+ -var KeyBlob; -var mac; -try { - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} -var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); -symKeyGenerator.convertKey(KeyBlob, (err, symKey) => { - if (err) { - console.error("[Callback] err: " + err.code); - } - mac.init(symKey, (err1, ) => { - if (err1) { - console.error("[Callback] err: " + err1.code); - } - let blob; - mac.update(blob, (err2, data) => { - if (err2) { - console.error("[Callback] err: " + err2.code); - } - }); - }); -}); -``` +指定椭圆曲线素数域。是[ECField](#ecfield10)的子类。 -### update +**系统能力:** SystemCapability.Security.CryptoFramework -update(input : DataBlob) : Promise\; +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| p | bigint | 是 | 是 | 指定素数p。 | -传入消息进行Mac更新计算 +## Point10+ -> **说明:** -> Hmac算法多次调用update更新的代码示例详见开发指导“[使用消息认证码操作](../../security/cryptoFramework-guidelines.md#使用消息认证码操作)”。 +指定椭圆曲线上的一个点。 **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| x | bigint | 是 | 是 | 指定椭圆曲线上,点的x坐标。 | +| y | bigint | 是 | 是 | 指定椭圆曲线上,点的y坐标。 | -| 参数名 | 类型 | 必填 | 说明 | -| ------ | -------- | ---- | ---------- | -| input | [DataBlob](#datablob) | 是 | 传入的消息 | +## ECCCommonParamsSpec10+ -**返回值:** +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定ECC算法中公私钥包含的公共参数,随机生成公/私钥。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +**系统能力:** SystemCapability.Security.CryptoFramework -**错误码:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| field | [ECField](#ecfield10) | 是 | 是 | 指定椭圆曲线的域(当前只支持Fp域)。 | +| a | bigint | 是 | 是 | 指定椭圆曲线的第一个系数a。 | +| b | bigint | 是 | 是 | 指定椭圆曲线的第二个系数b。 | +| g | [Point](#point10) | 是 | 是 | 指定基点g。 | +| n | bigint | 是 | 是 | 指定基点g的阶数n。 | +| h | number | 是 | 是 | 指定余因子h。 | -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17630001 | crypto operation error. | +## ECCPriKeySpec10+ -**示例:** +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定ECC算法中私钥包含的参数。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +**系统能力:** SystemCapability.Security.CryptoFramework -var mac; -try { - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Mac algName is: " + mac.algName); +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| params | [ECCCommonParamsSpec](#ecccommonparamsspec10) | 是 | 是 | 指定ECC算法中公私钥都包含的公共参数。 | +| sk | bigint | 是 | 是 | 指定ECC算法的私钥sk。 | -var KeyBlob; -var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); -var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); -promiseConvertKey.then(symKey => { - var promiseMacInit = mac.init(symKey); - return promiseMacInit; -}).then(() => { - let blob; - var promiseMacUpdate = mac.update(blob); - return promiseMacUpdate; -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); +## ECCPubKeySpec10+ -``` +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定ECC算法中公钥包含的参数。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 -### doFinal +**系统能力:** SystemCapability.Security.CryptoFramework + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| params | [ECCCommonParamsSpec](#ecccommonparamsspec10) | 是 | 是 | 指定ECC算法中公私钥都包含的公共参数。 | +| pk | [Point](#point10) | 是 | 是 | 指定ECC算法的公钥pk。 | -doFinal(callback : AsyncCallback\) : void; +## ECCKeyPairSpec10+ -返回Mac的计算结果 +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定ECC算法中公私钥包含的全量参数。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| params | [ECCCommonParamsSpec](#ecccommonparamsspec10) | 是 | 是 | 指定ECC算法中公私钥都包含的公共参数。 | +| sk | bigint | 是 | 是 | 指定ECC算法的私钥sk。 | +| pk | [Point](#point10) | 是 | 是 | 指定ECC算法的公钥pk。 | -| 参数名 | 类型 | 必填 | 说明 | -| -------- | ------------------------ | ---- | -------- | -| callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 回调函数 | +## RSACommonParamsSpec10+ -**错误码:** +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定RSA算法中公私钥包含的公共参数,随机生成公/私钥。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | -| 17630001 | crypto operation error. | +**系统能力:** SystemCapability.Security.CryptoFramework -**示例:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| n | bigint | 是 | 是 | 指定模数n。 | -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +## RSAPubKeySpec10+ -var KeyBlob; -var mac; -try { - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} -var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); -symKeyGenerator.convertKey(KeyBlob, (err, symKey) => { - if (err) { - console.error("[Callback] err: " + err.code); - } - mac.init(symKey, (err1, ) => { - if (err1) { - console.error("[Callback] err: " + err1.code); - } - let blob; - mac.update(blob, (err2, ) => { - if (err2) { - console.error("[Callback] err: " + err2.code); - } - mac.doFinal((err3, macOutput) => { - if (err3) { - console.error("[Callback] err: " + err3.code); - } else { - console.error("[Promise]: HMAC result: " + macOutput); - } - }); - }); - }); -}); -``` +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定RSA算法中公钥包含的参数。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 -### doFinal +**系统能力:** SystemCapability.Security.CryptoFramework + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| params | [RSACommonParamsSpec](#rsacommonparamsspec10) | 是 | 是 | 指定RSA算法中公私钥都包含的公共参数。 | +| pk | bigint | 是 | 是 | 指定RSA算法的公钥pk。 | -doFinal() : Promise\ +## RSAKeyPairSpec10+ -返回Mac的计算结果 +密钥参数[AsyKeySpec](#asykeyspec10)的子类,用于指定RSA算法中公私钥包含的全量参数。
在使用密钥参数生成密钥时,将其传入[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法创建密钥生成器。 **系统能力:** SystemCapability.Security.CryptoFramework -**返回值:** - -| 类型 | 说明 | -| ------------------ | ----------- | -| Promise\<[DataBlob](#datablob)> | Promise对象 | +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | +| params | [RSACommonParamsSpec](#rsacommonparamsspec10) | 是 | 是 | 指定RSA算法中公私钥都包含的公共参数。 | +| sk | bigint | 是 | 是 | 指定RSA算法的私钥sk。 | +| pk | bigint | 是 | 是 | 指定RSA算法的公钥pk。 | -**错误码:** +## Key -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | -| 17630001 | crypto operation error. | +密钥(父类),在运行密码算法(如加解密)时需要提前生成其子类对象,并传入[Cipher](#cipher)实例的[init()](#init-2)方法。
密钥可以通过密钥生成器来生成。 -**示例:** +### 属性 -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +**系统能力:** SystemCapability.Security.CryptoFramework -var mac; -try { - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Mac algName is: " + mac.algName); +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ---------------------------- | +| format | string | 是 | 否 | 密钥的格式。 | +| algName | string | 是 | 否 | 密钥对应的算法名(含长度)。 | -var KeyBlob; -var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); -var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); -promiseConvertKey.then(symKey => { - var promiseMacInit = mac.init(symKey); - return promiseMacInit; -}).then(() => { - let blob; - var promiseMacUpdate = mac.update(blob); - return promiseMacUpdate; -}).then(() => { - var PromiseMacDoFinal = mac.doFinal(); - return PromiseMacDoFinal; -}).then(macOutput => { - console.error("[Promise]: HMAC result: " + macOutput.data); -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); -``` +### getEncoded -### getMacLength +getEncoded(): DataBlob -getMacLength() : number +以同步方法,获取密钥数据的字节流。密钥可以为对称密钥,公钥或者私钥。其中,公钥格式满足ASN.1语法、X.509规范、DER编码格式;私钥格式满足ASN.1语法,PKCS#8规范、DER编码方式。 -获取Mac消息认证码的长度(字节数) +> **说明:** +> +> RSA算法使用密钥参数生成私钥时,私钥对象不支持getEncoded。 **系统能力:** SystemCapability.Security.CryptoFramework **返回值:** -| 类型 | 说明 | -| ------ | ------------------------- | -| number | 返回mac计算结果的字节长度 | +| 类型 | 说明 | +| --------------------- | ------------------------ | +| [DataBlob](#datablob) | 用于查看密钥的具体内容。 | **错误码:** +> **说明:** +> +> 从API version 10开始,该接口支持抛出错误码。 + | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 801 | this operation is not supported. | +| 17620001 | memory error. | | 17630001 | crypto operation error. | **示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" - -var mac; -try { - mac = cryptoFramework.createMac("SHA256"); -} catch (error) { - console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +function uint8ArrayToShowStr(uint8Array) { + return Array.prototype.map + .call(uint8Array, (x) => ('00' + x.toString(16)).slice(-2)) + .join(''); } -console.error("Mac algName is: " + mac.algName); -var KeyBlob; -var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); -var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); -promiseConvertKey.then(symKey => { - var promiseMacInit = mac.init(symKey); - return promiseMacInit; -}).then(() => { - let blob; - var promiseMacUpdate = mac.update(blob); - return promiseMacUpdate; -}).then(() => { - var PromiseMacDoFinal = mac.doFinal(); - return PromiseMacDoFinal; -}).then(macOutput => { - console.error("[Promise]: HMAC result: " + macOutput.data); - let macLen = mac.getMacLength(); - console.error("MAC len: " + macLen); -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); +let key; // key为使用密钥生成器 生成的密钥,此处省略生成过程 +let encodedKey = key.getEncoded(); +console.info("key hex:" + uint8ArrayToShowStr(encodedKey.data)); ``` -## cryptoFramework.createMd - -createMd(algName : string) : Md - -生成Md实例,用于进行消息摘要的计算与操作。
支持的规格详见框架概述“[MD消息摘要算法规格](../../security/cryptoFramework-overview.md#md消息摘要算法规格)”一节。 - -**系统能力:** SystemCapability.Security.CryptoFramework - -**参数:** +## SymKey -| 参数名 | 类型 | 必填 | 说明 | -| ------- | ------ | ---- | ------------------------------------------------------------ | -| algName | string | 是 | 指定摘要算法,支持算法请参考“[MD算法支持范围](../../security/cryptoFramework-overview.md#md消息摘要算法规格)”一节 | +对称密钥,是[Key](#key)的子类,在对称加解密时需要将其对象传入[Cipher](#cipher)实例的[init()](#init-2)方法使用。
对称密钥可以通过对称密钥生成器[SymKeyGenerator](#symkeygenerator)来生成。 -**返回值**: +### clearMem -| 类型 | 说明 | -| ---- | ------------------------------------- | -| Md | 返回由输入算法指定生成的[Md](#md)对象 | +clearMem(): void -**错误码:** +以同步方法,将系统底层内存中的的密钥内容清零。建议在不再使用对称密钥实例时,调用本函数,避免内存中密钥数据存留过久。 -| 错误码ID | 错误信息 | -| -------- | ------------------ | -| 17620001 | memory error. | +**系统能力:** SystemCapability.Security.CryptoFramework **示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" - -var md; -try { - // 参数选择请参考上述算法支持范围 - md = cryptoFramework.createMd("SHA256"); -} catch (error) { - console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +function uint8ArrayToShowStr(uint8Array) { + return Array.prototype.map + .call(uint8Array, (x) => ('00' + x.toString(16)).slice(-2)) + .join(''); } + +let key; // key为使用对称密钥生成器 生成的密钥,此处省略生成过程 +let encodedKey = key.getEncoded(); +console.info("key hex:" + uint8ArrayToShowStr(encodedKey.data)); // 输出密钥内容 +key.clearMem(); +encodedKey = key.getEncoded(); +console.info("key hex:" + uint8ArrayToShowStr(encodedKey.data)); // 输出全零 ``` -## Md +## PubKey -Md类,调用Md方法可以进行MD(Message Digest)摘要计算。调用前,需要通过[createMd](#cryptoframeworkcreatemd)构造Md实例。 +公钥,是Key的子类,在非对称加解密、验签、密钥协商时需要将其对象作为输入使用。
公钥可以通过非对称密钥生成器[AsyKeyGenerator](#asykeygenerator)、[AsyKeyGeneratorBySpec](#asykeygeneratorbyspec10)来生成。 ### 属性 -**系统能力:** SystemCapability.Security.CryptoFramework - -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | -------------------- | -| algName | string | 是 | 否 | 代表指定的摘要算法名 | +**系统能力:** SystemCapability.Security.CryptoFramework -### update +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ---------------------------- | +| format | string | 是 | 否 | 密钥的格式。 | +| algName | string | 是 | 否 | 密钥对应的算法名(含长度)。 | -update(input : DataBlob, callback : AsyncCallback\) : void; +### getAsyKeySpec10+ -传入消息进行Md更新计算 +getAsyKeySpec(itemType: AsyKeySpecItem): bigint | string | number -> **说明:** -> Md算法多次调用update更新的代码示例详见开发指导“[使用摘要操作](../../security/cryptoFramework-guidelines.md#使用摘要操作)”。 +以同步方法,获取密钥参数。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------------------- | ---- | ---------- | -| input | [DataBlob](#datablob)| 是 | 传入的消息 | -| callback | AsyncCallback\ | 是 | 回调函数 | +| 参数名 | 类型 | 必填 | 说明 | +| ---- | --------------------- | ---- | -------------------- | +| item | [AsyKeySpecItem](#asykeyspecitem10) | 是 | 指定的密钥参数。 | + +**返回值:** + +| 类型 | 说明 | +| --------------------------- | --------------------------------- | +| bigint\|string\|number | 用于查看密钥参数的具体内容。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | | 17630001 | crypto operation error. | **示例:** -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +```js +let key; // key为公钥对象,此处省略生成过程 +let p = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_FP_P_BN); +console.info("ecc item --- p: " + p.toString(16)); +``` -var md; -try { - md = cryptoFramework.createMd("SHA256"); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Md algName is: " + md.algName); +## PriKey -let blob; -md.update(blob, (err,) => { - if (err) { - console.error("[Callback] err: " + err.code); - } -}); -``` +私钥,是Key的子类,在非对称加解密、签名、密钥协商时需要将其作为输入使用。
私钥可以通过非对称密钥生成器[AsyKeyGenerator](#asykeygenerator)、[AsyKeyGeneratorBySpec](#asykeygeneratorbyspec10)来生成。 -### update +### 属性 -update(input : DataBlob) : Promise\; +**系统能力:** SystemCapability.Security.CryptoFramework -传入消息进行Md更新计算 +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ---------------------------- | +| format | string | 是 | 否 | 密钥的格式。 | +| algName | string | 是 | 否 | 密钥对应的算法名(含长度)。 | -> **说明:** -> Md算法多次调用update更新的代码示例详见开发指导“[使用摘要操作](../../security/cryptoFramework-guidelines.md#使用摘要操作)”。 +### clearMem + +clearMem(): void + +以同步方法,将系统底层内存中的的密钥内容清零。 **系统能力:** SystemCapability.Security.CryptoFramework -| 参数名 | 类型 | 必填 | 说明 | -| ------ | -------- | ---- | ---------- | -| input | DataBlob | 是 | 传入的消息 | +**示例:** + +```js +let key; // key为使用非对称密钥生成器生成的非对称密钥的私钥对象,此处省略生成过程 +key.clearMem(); +``` + +### getAsyKeySpec10+ + +getAsyKeySpec(itemType: AsyKeySpecItem): bigint | string | number + +以同步方法,获取密钥参数。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---- | --------------------- | ---- | -------------------- | +| item | [AsyKeySpecItem](#asykeyspecitem10) | 是 | 指定的密钥参数类型。 | **返回值:** -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +| 类型 | 说明 | +| --------------------------- | --------------------------------- | +| bigint\|string\|number | 用于查看密钥参数的具体内容。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | | 17630001 | crypto operation error. | **示例:** -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +```js +let key; // key为私钥对象,此处省略生成过程 +let p = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_FP_P_BN); +console.info("ecc item --- p: " + p.toString(16)); +``` -var md; -try { - md = cryptoFramework.createMd("SHA256"); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Md algName is: " + md.algName); +## KeyPair -let blob; -var promiseMdUpdate = md.update(blob); -promiseMdUpdate.then(() => { - // do something -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); -``` - -### digest +非对称密钥对,包含:公钥与私钥。
可以通过非对称密钥生成器[AsyKeyGenerator](#asykeygenerator)、[AsyKeyGeneratorBySpec](#asykeygeneratorbyspec10)来生成。 -digest(callback : AsyncCallback\) : void +> **说明:** +> +> KeyPair对象中的pubKey对象和priKey对象,作为KeyPair对象中的一个参数存在,当离开KeyPair对象作用域时,其内部对象可能被析构。
+> 业务方使用时应持有KeyPair对象的引用,而非内部pubKey或priKey对象的引用。 -返回Md的计算结果 +### 属性 **系统能力:** SystemCapability.Security.CryptoFramework -| 参数名 | 类型 | 必填 | 说明 | -| -------- | ------------------------ | ---- | -------- | -| callback | AsyncCallback\ | 是 | 回调函数 | - -**错误码:** - -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | -| 17630001 | crypto operation error. | - -**示例:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------ | +| priKey | [PriKey](#prikey) | 是 | 否 | 私钥。 | +| pubKey | [PubKey](#pubkey) | 是 | 否 | 公钥。 | -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" -var md; -try { - md = cryptoFramework.createMd("SHA256"); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Md algName is: " + md.algName); +## cryptoFramework.createSymKeyGenerator -let blob; -md.update(blob, (err,) => { - if (err) { - console.error("[Callback] err: " + err.code); - } - md.digest((err1, mdOutput) => { - if (err1) { - console.error("[Callback] err: " + err1.code); - } else { - console.error("[Callback]: MD result: " + mdOutput); - } - }); -}); -``` +createSymKeyGenerator(algName: string): SymKeyGenerator -### digest +通过指定算法名称的字符串,获取相应的对称密钥生成器实例。
支持的规格详见框架概述“[密钥生成规格](../../security/cryptoFramework-overview.md#密钥生成规格)”一节。 -digest() : Promise\ +**系统能力:** SystemCapability.Security.CryptoFramework -返回Md的计算结果 +**参数:** -**系统能力:** SystemCapability.Security.CryptoFramework +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | ------------------------------------------------------------ | +| algName | string | 是 | 待生成对称密钥生成器的算法名称。
具体取值详见框架概述“[密钥生成规格](../../security/cryptoFramework-overview.md#密钥生成规格)”一节中的“字符串参数”。 | **返回值:** -| 类型 | 说明 | -| ------------------ | ----------- | -| Promise\<[DataBlob](#datablob)> | Promise对象 | - -**错误码:** +| 类型 | 说明 | +| ----------------------------------- | -------------------------- | +| [SymKeyGenerator](#symkeygenerator) | 返回对称密钥生成器的对象。 | | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17630001 | crypto operation error. | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | **示例:** -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; +let symKeyGenerator = cryptoFramework.createSymKeyGenerator('3DES192'); +``` -var md; -try { - md = cryptoFramework.createMd("SHA256"); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Md algName is: " + md.algName); +## SymKeyGenerator -let blob; -var promiseMdUpdate = md.update(blob); -promiseMdUpdate.then(() => { - var PromiseMdDigest = md.digest(); - return PromiseMdDigest; -}).then(mdOutput => { - console.error("[Promise]: MD result: " + mdOutput.data); -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); -``` +对称密钥生成器。
在使用该类的方法前,需要先使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)方法构建一个symKeyGenerator实例。 -### getMdLength +### 属性 + +**系统能力:** SystemCapability.Security.CryptoFramework -getMdLength() : number +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ------------------------------ | +| algName | string | 是 | 否 | 对称密钥生成器指定的算法名称。 | + +### generateSymKey + +generateSymKey(callback: AsyncCallback\): void -获取Md消息摘要长度(字节数) +异步获取对称密钥生成器随机生成的密钥,通过注册回调函数获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。
目前支持使用OpenSSL的RAND_priv_bytes()作为底层能力生成随机密钥。 **系统能力:** SystemCapability.Security.CryptoFramework -**返回值:** +**参数:** -| 类型 | 说明 | -| ------ | ------------------------ | -| number | 返回md计算结果的字节长度 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------------- | ---- | ------------------------------------------------------------ | +| callback | AsyncCallback\<[SymKey](#symkey)> | 是 | 回调函数。当生成对称密钥成功,err为undefined,data为获取到的SymKey;否则为错误对象。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17630001 | crypto operation error. | +| 错误码ID | 错误信息 | +| -------- | ------------- | +| 17620001 | memory error. | **示例:** -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" - -var md; -try { - md = cryptoFramework.createMd("SHA256"); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} -console.error("Md algName is: " + md.algName); - -let blob; -var promiseMdUpdate = md.update(blob); -promiseMdUpdate.then(() => { - var PromiseMdDigest = md.digest(); - return PromiseMdDigest; -}).then(mdOutput => { - console.error("[Promise]: MD result: " + mdOutput.data); - let mdLen = md.getMdLength(); - console.error("MD len: " + mdLen); -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; +let symAlgName = '3DES192'; +let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); +symKeyGenerator.generateSymKey((err, symKey) => { + if (err) { + console.error(`Generate symKey failed, ${err.code}, ${err.message}`); + } else { + console.info(`Generate symKey success, algName: ${symKey.algName}`); + } +}) ``` -## cryptoFramework.createRandom +### generateSymKey -createRandom() : Random +generateSymKey(): Promise\ -生成Random实例,用于进行随机数的计算与设置种子。 +异步获取该对称密钥生成器随机生成的密钥,通过Promise获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。
目前支持使用OpenSSL的RAND_priv_bytes()作为底层能力生成随机密钥。 **系统能力:** SystemCapability.Security.CryptoFramework -**返回值**: +**返回值:** -| 类型 | 说明 | -| ------ | --------------------------------------------- | -| Random | 返回由输入算法指定生成的[Random](#random)对象 | +| 类型 | 说明 | +| --------------------------- | --------------------------------- | +| Promise\<[SymKey](#symkey)> | Promise对象,返回对称密钥SymKey。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ------------ | +| 错误码ID | 错误信息 | +| -------- | ------------- | | 17620001 | memory error. | **示例:** -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" - -try { - var rand = cryptoFramework.createRandom(); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; +let symAlgName = 'AES128'; +let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); +symKeyGenerator.generateSymKey() +.then(symKey => { + console.info(`Generate symKey success, algName: ${symKey.algName}`); +}, error => { + console.error(`Generate symKey failed, ${error.code}, ${error.message}`); +}) ``` -## Random - -Random类,调用Random方法可以进行随机数计算。调用前,需要通过[createRandom](#cryptoframeworkcreaterandom)构造Random实例。 - -### generateRandom +### convertKey -generateRandom(len : number, callback: AsyncCallback\) : void; +convertKey(key: DataBlob, callback: AsyncCallback\): void -生成指定长度的随机数 +异步根据指定数据生成对称密钥,通过注册回调函数获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | ------------------------ | ---- | -------------------- | -| len | number | 是 | 表示生成随机数的长度 | -| callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 回调函数 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------------- | ---- | ------------------------------------------------------------ | +| key | [DataBlob](#datablob) | 是 | 指定的对称密钥材料。 | +| callback | AsyncCallback\<[SymKey](#symkey)> | 是 | 回调函数。当生成对称密钥成功,err为undefined,data为获取到的SymKey;否则为错误对象。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | -| 17630001 | crypto operation error. | +| 错误码ID | 错误信息 | +| -------- | --------------------------------------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | **示例:** -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; -var rand; -try { - rand = cryptoFramework.createRandom(); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +function genKeyMaterialBlob() { + let arr = [ + 0xba, 0x3d, 0xc2, 0x71, 0x21, 0x1e, 0x30, 0x56, + 0xad, 0x47, 0xfc, 0x5a, 0x46, 0x39, 0xee, 0x7c, + 0xba, 0x3b, 0xc2, 0x71, 0xab, 0xa0, 0x30, 0x72]; // keyLen = 192 (24 bytes) + let keyMaterial = new Uint8Array(arr); + return {data: keyMaterial}; } -rand.generateRandom(12, (err, randData) => { - if (err) { - console.error("[Callback] err: " + err.code); - } else { - console.error("[Callback]: generate random result: " + randData.data); - } -}); + +let symAlgName = '3DES192'; +let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); +let keyMaterialBlob = genKeyMaterialBlob(); +symKeyGenerator.convertKey(keyMaterialBlob, (err, symKey) => { + if (err) { + console.error(`Convert symKey failed, ${err.code}, ${err.message}`); + } else { + console.info(`Convert symKey success, algName: ${symKey.algName}`); + } +}) ``` -### generateRandom +### convertKey -generateRandom(len : number) : Promise\; +convertKey(key: DataBlob): Promise\ -生成指定长度的随机数 +异步根据指定数据生成对称密钥,通过Promise获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| ------ | ------ | ---- | -------------------- | -| len | number | 是 | 表示生成随机数的长度 | +| 参数名 | 类型 | 必填 | 说明 | +| ---- | --------------------- | ---- | -------------------- | +| key | [DataBlob](#datablob) | 是 | 指定的密钥材料数据。 | **返回值:** -| 类型 | 说明 | -| ------------------ | ----------- | -| Promise\<[DataBlob](#datablob)> | Promise对象 | +| 类型 | 说明 | +| --------------------------- | --------------------------------- | +| Promise\<[SymKey](#symkey)> | Promise对象,返回对称密钥SymKey。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | -| 17630001 | crypto operation error. | +| 错误码ID | 错误信息 | +| -------- | --------------------------------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | **示例:** -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; -var rand; -try { - rand = cryptoFramework.createRandom(); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +function genKeyMaterialBlob() { + let arr = [ + 0xba, 0x3d, 0xc2, 0x71, 0x21, 0x1e, 0x30, 0x56, + 0xad, 0x47, 0xfc, 0x5a, 0x46, 0x39, 0xee, 0x7c, + 0xba, 0x3b, 0xc2, 0x71, 0xab, 0xa0, 0x30, 0x72]; // keyLen = 192 (24 bytes) + let keyMaterial = new Uint8Array(arr); + return {data: keyMaterial}; } -var promiseGenerateRand = rand.generateRandom(12); -promiseGenerateRand.then(randData => { - console.error("[Promise]: rand result: " + randData.data); -}).catch(error => { - console.error("[Promise]: error: " + error.message); -}); +let symAlgName = '3DES192'; +let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); +let keyMaterialBlob = genKeyMaterialBlob(); +symKeyGenerator.convertKey(keyMaterialBlob) +.then(symKey => { + console.info(`Convert symKey success, algName: ${symKey.algName}`); +}, error => { + console.error(`Convert symKey failed, ${error.code}, ${error.message}`); +}) ``` -### setSeed +## cryptoFramework.createAsyKeyGenerator -setSeed(seed : DataBlob) : void; +createAsyKeyGenerator(algName: string): AsyKeyGenerator -设置指定的种子 +通过指定算法名称的字符串,获取相应的非对称密钥生成器实例。
支持的规格详见框架概述“[密钥生成规格](../../security/cryptoFramework-overview.md#密钥生成规格)”一节。 **系统能力:** SystemCapability.Security.CryptoFramework -| 参数名 | 类型 | 必填 | 说明 | -| -------- | --------------------- | ---- | ---------- | -| seed | DataBlob | 是 | 设置的种子 | +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | -------------------------------- | +| algName | string | 是 | 待生成对称密钥生成器的算法名称。 | + +**返回值:** + +| 类型 | 说明 | +| --------------- | ---------------------------- | +| [AsyKeyGenerator](#asykeygenerator) | 返回非对称密钥生成器的对象。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ----------------- | -| 17620001 | memory error. | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 80110+ | this operation is not supported. | +| 1762000110+ | memory error. | **示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -var rand; -try { - rand = cryptoFramework.createRandom(); -} catch (error) { - console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); -} - -rand.generateRandom(12, (err, randData) => { - if (err) { - console.error("[Callback] err: " + err.code); - } else { - console.error("[Callback]: generate random result: " + randData.data); - try { - rand.setSeed(randData); - } catch (error) { - console.log("setSeed failed, errCode: " + error.code + ", errMsg: " + error.message); - } - } -}); +let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); ``` -## ParamsSpec +## AsyKeyGenerator -加解密参数,在进行对称加解密时需要构造其子类对象,并将子类对象传入[init()](#init-2)方法。
适用于需要iv等参数的对称加解密模式(对于无iv等参数的模式如ECB模式,无需构造,在[init()](#init-2)中传入null即可)。 +非对称密钥生成器。在使用该类的方法前,需要先使用createAsyKeyGenerator()方法构建一个AsyKeyGenerator实例。 + +### 属性 **系统能力:** SystemCapability.Security.CryptoFramework -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ------------------------------------------------------------ | -| algName | string | 是 | 是 | 指明对称加解密参数的算法模式。可选值如下:
- "IvParamsSpec": 适用于CBC\|CTR\|OFB\|CFB模式
- "GcmParamsSpec": 适用于GCM模式
- "CcmParamsSpec": 适用于CCM模式 | +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | -------------------------------- | +| algName | string | 是 | 否 | 非对称密钥生成器指定的算法名称。 | -> **说明:** -> 由于[init()](#init-2)的params参数是ParamsSpec类型(父类),而实际需要传入具体的子类对象(如IvParamsSpec),因此在构造子类对象时应设置其父类ParamsSpec的algName参数,使算法库在init()时知道传入的是哪种子类对象。 +### generateKeyPair -## IvParamsSpec +generateKeyPair(callback: AsyncCallback\): void -加解密参数[ParamsSpec](#paramsspec)的子类,用于在对称加解密时作为[init()](#init-2)方法的参数。
适用于CBC、CTR、OFB、CFB这些仅使用iv作为参数的加解密模式。 +异步获取非对称密钥生成器随机生成的密钥,通过注册回调函数获取结果。 **系统能力:** SystemCapability.Security.CryptoFramework -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ---- | --------------------- | ---- | ---- | ------------------------------------------------------------ | -| iv | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数iv。常见取值如下:
- AES的CBC\|CTR\|OFB\|CFB模式:iv长度为16字节
- 3DES的CBC\|OFB\|CFB模式:iv长度为8字节 | - -> **说明:** -> 传入[init()](#init-2)方法前需要指定其algName属性(来源于父类[ParamsSpec](#paramsspec))。 +**参数:** -## GcmParamsSpec +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------- | ---- | ------------------------------ | +| callback | AsyncCallback\<[KeyPair](#keypair)> | 是 | 回调函数,用于获取非对称密钥。 | -加解密参数[ParamsSpec](#paramsspec)的子类,用于在对称加解密时作为[init()](#init-2)方法的参数。
适用于GCM模式。 +**错误码:** -**系统能力:** SystemCapability.Security.CryptoFramework +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 1763000110+ | crypto operation error. | -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | --------------------- | ---- | ---- | ------------------------------------------------------------ | -| iv | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数iv,长度为12字节 | -| aad | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数aad,长度为8字节 | -| authTag | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数authTag,长度为16字节。
采用GCM模式加密时,需要获取[doFinal()](#dofinal-2)输出的[DataBlob](#datablob),取出其末尾16字节作为解密时[init()](#init-2)方法的入参[GcmParamsSpec](#gcmparamsspec)中的的authTag | +**示例:** -> **说明:** -> 传入[init()](#init-2)方法前需要指定其algName属性(来源于父类[ParamsSpec](#paramsspec))。 +```js +import cryptoFramework from "@ohos.security.cryptoFramework" -## CcmParamsSpec +let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); +asyKeyGenerator.generateKeyPair((err, keyPair) => { + if (err) { + console.error("generateKeyPair: error."); + return; + } + console.info("generateKeyPair: success."); +}) +``` -加解密参数[ParamsSpec](#paramsspec)的子类,用于在对称加解密时作为[init()](#init-2)方法的参数。
适用于CCM模式。 +### generateKeyPair -**系统能力:** SystemCapability.Security.CryptoFramework +generateKeyPair(): Promise\ -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | --------------------- | ---- | ---- | ------------------------------------------------------------ | -| iv | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数iv,长度为7字节 | -| aad | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数aad,长度为8字节 | -| authTag | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数authTag,长度为12字节。
采用CCM模式加密时,需要获取[doFinal()](#dofinal-2)输出的[DataBlob](#datablob),取出其末尾12字节作为解密时[init()](#init-2)方法的入参[CcmParamsSpec](#ccmparamsspec)中的authTag | +异步获取该非对称密钥生成器随机生成的密钥,通过Promise获取结果。 -> **说明:** -> 传入[init()](#init-2)方法前需要指定其algName属性(来源于父类[ParamsSpec](#paramsspec))。 +**系统能力:** SystemCapability.Security.CryptoFramework -## CryptoMode +**返回值:** -表示加解密操作的枚举。 +| 类型 | 说明 | +| ----------------- | --------------------------------- | +| Promise\<[KeyPair](#keypair)> | 使用Promise的方式获取非对称密钥。 | -**系统能力:** SystemCapability.Security.CryptoFramework +**错误码:** -| 名称 | 值 | 说明 | -| ------------ | ---- | ---------------- | -| ENCRYPT_MODE | 0 | 表示进行加密操作 | -| DECRYPT_MODE | 1 | 表示进行解密操作 | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 1763000110+ | crypto operation error. | -## Key +**示例:** -密钥(父类),在运行密码算法(如加解密)时需要提前生成其子类对象,并传入[Cipher](#cipher)实例的[init()](#init-2)方法。
密钥可以通过密钥生成器来生成。 +```js +import cryptoFramework from "@ohos.security.cryptoFramework" -### 属性 +let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); +let keyGenPromise = asyKeyGenerator.generateKeyPair(); +keyGenPromise.then( keyPair => { + console.info("generateKeyPair success."); +}).catch(error => { + console.error("generateKeyPair error."); +}); +``` -**系统能力:** SystemCapability.Security.CryptoFramework +### convertKey -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ---------------------------- | -| format | string | 是 | 否 | 密钥的格式。 | -| algName | string | 是 | 否 | 密钥对应的算法名(含长度)。 | +convertKey(pubKey: DataBlob, priKey: DataBlob, callback: AsyncCallback\): void -### getEncoded +异步获取指定数据生成非对称密钥,通过注册回调函数获取结果。详情请看下方**密钥转换说明**。 -getEncoded() : DataBlob +**系统能力:** SystemCapability.Security.CryptoFramework -以同步方法,获取16进制形式的密钥内容。 +**参数:** -**系统能力:** SystemCapability.Security.CryptoFramework +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------- | ---- | ------------------------------ | +| pubKey | [DataBlob](#datablob) | 是 | 指定的公钥材料。如果公钥不需要转换,可直接传入null。 | +| priKey | [DataBlob](#datablob) | 是 | 指定的私钥材料。如果私钥不需要转换,可直接传入null。 | +| callback | AsyncCallback\<[KeyPair](#keypair)> | 是 | 回调函数,用于获取非对称密钥。 | -**返回值:** +**错误码:** -| 类型 | 说明 | -| --------------------- | ------------------------ | -| [DataBlob](#datablob) | 用于查看密钥的具体内容。 | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 1763000110+ | crypto operation error. | **示例:** ```js import cryptoFramework from "@ohos.security.cryptoFramework" -function uint8ArrayToShowStr(uint8Array) { - return Array.prototype.map - .call(uint8Array, (x) => ('00' + x.toString(16)).slice(-2)) - .join(''); -} -let key; // key为使用对称密钥生成器 生成的密钥,此处省略生成过程 -let encodedKey = key.getEncoded(); -console.info("key hex:" + uint8ArrayToShowStr(encodedKey.data)); +let pubKeyArray = new Uint8Array([48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,83,96,142,9,86,214,126,106,247,233,92,125,4,128,138,105,246,162,215,71,81,58,202,121,26,105,211,55,130,45,236,143,55,16,248,75,167,160,167,106,2,152,243,44,68,66,0,167,99,92,235,215,159,239,28,106,124,171,34,145,124,174,57,92]); +let priKeyArray = new Uint8Array([48,49,2,1,1,4,32,115,56,137,35,207,0,60,191,90,61,136,105,210,16,27,4,171,57,10,61,123,40,189,28,34,207,236,22,45,223,10,189,160,10,6,8,42,134,72,206,61,3,1,7]); +let pubKeyBlob = { data: pubKeyArray }; // 公钥的密钥数据 +let priKeyBlob = { data: priKeyArray }; // 私钥的密钥数据 +let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); +asyKeyGenerator.convertKey(pubKeyBlob, priKeyBlob, (err, keyPair) => { + if (err) { + console.error("convertKey: error."); + return; + } + console.info("convertKey: success."); +}) ``` -## SymKey +### convertKey -对称密钥,是[Key](#key)的子类,在对称加解密时需要将其对象传入[Cipher](#cipher)实例的[init()](#init-2)方法使用。
对称密钥可以通过对称密钥生成器[SymKeyGenerator](#symkeygenerator)来生成。 +convertKey(pubKey: DataBlob, priKey: DataBlob): Promise\ -### clearMem +异步获取指定数据生成非对称密钥,通过Promise获取结果。详情请看下方**密钥转换说明**。 + +**系统能力:** SystemCapability.Security.CryptoFramework -clearMem() : void +**参数:** -以同步方法,将系统底层内存中的的密钥内容清零。建议在不再使用对称密钥实例时,调用本函数,避免内存中密钥数据存留过久。 +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ---------------- | +| pubKey | DataBlob | 是 | 指定的公钥材料。如果公钥不需要转换,可直接传入null。 | +| priKey | DataBlob | 是 | 指定的私钥材料。如果私钥不需要转换,可直接传入null。 | -**系统能力:** SystemCapability.Security.CryptoFramework +**返回值:** + +| 类型 | 说明 | +| ----------------- | --------------------------------- | +| Promise\<[KeyPair](#keypair)> | 使用Promise的方式获取非对称密钥。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 1763000110+ | crypto operation error. | **示例:** ```js import cryptoFramework from "@ohos.security.cryptoFramework" -function uint8ArrayToShowStr(uint8Array) { - return Array.prototype.map - .call(uint8Array, (x) => ('00' + x.toString(16)).slice(-2)) - .join(''); -} -let key; // key为使用对称密钥生成器 生成的密钥,此处省略生成过程 -let encodedKey = key.getEncoded(); -console.info("key hex:" + uint8ArrayToShowStr(encodedKey.data)); // 输出密钥内容 -key.clearMem(); -encodedKey = key.getEncoded(); -console.info("key hex:" + uint8ArrayToShowStr(encodedKey.data)); // 输出全零 +let pubKeyArray = new Uint8Array([48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,83,96,142,9,86,214,126,106,247,233,92,125,4,128,138,105,246,162,215,71,81,58,202,121,26,105,211,55,130,45,236,143,55,16,248,75,167,160,167,106,2,152,243,44,68,66,0,167,99,92,235,215,159,239,28,106,124,171,34,145,124,174,57,92]); +let priKeyArray = new Uint8Array([48,49,2,1,1,4,32,115,56,137,35,207,0,60,191,90,61,136,105,210,16,27,4,171,57,10,61,123,40,189,28,34,207,236,22,45,223,10,189,160,10,6,8,42,134,72,206,61,3,1,7]); +let pubKeyBlob = { data: pubKeyArray }; // 公钥的密钥数据 +let priKeyBlob = { data: priKeyArray }; // 私钥的密钥数据 +let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); +let keyGenPromise = asyKeyGenerator.convertKey(pubKeyBlob, priKeyBlob); +keyGenPromise.then( keyPair => { + console.info("convertKey success."); +}).catch(error => { + console.error("convertKey error."); +}); ``` -## PubKey +**密钥转换说明** -公钥,是Key的子类,在非对称加解密、验签、密钥协商时需要将其对象作为输入使用。
公钥可以通过非对称密钥生成器AsyKeyGenerator来生成。 +1. 非对称密钥(RSA、ECC、DSA)的公钥和私钥调用getEncoded()方法后,分别返回X.509格式和PKCS#8格式的二进制数据,此数据可用于跨应用传输或持久化存储。 +2. 当调用convertKey方法将外来二进制数据转换为算法库非对称密钥对象时,公钥应满足ASN.1语法、X.509规范、DER编码格式,私钥应满足ASN.1语法、PKCS#8规范、DER编码格式。 +3. convertKey方法中,公钥和密钥二进制数据非必选项,可单独传入公钥或私钥的数据,生成对应只包含公钥或私钥的KeyPair对象。 -### 属性 +## cryptoFramework.createAsyKeyGeneratorBySpec10+ -**系统能力:** SystemCapability.Security.CryptoFramework +createAsyKeyGeneratorBySpec(asyKeySpec: AsyKeySpec): AsyKeyGeneratorBySpec -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ---------------------------- | -| format | string | 是 | 否 | 密钥的格式。 | -| algName | string | 是 | 否 | 密钥对应的算法名(含长度)。 | +通过指定密钥参数,获取相应的非对称密钥生成器实例。
支持的规格详见框架概述“[密钥生成规格](../../security/cryptoFramework-overview.md#密钥生成规格)”一节。 +**系统能力:** SystemCapability.Security.CryptoFramework -### getEncoded +**参数:** -getEncoded() : DataBlob +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | -------------------------------- | +| asyKeySpec | [AsyKeySpec](#asykeyspec10) | 是 | 密钥参数。非对称密钥生成器根据指定的这些参数生成公/私钥。 | -以同步方法,获取二进制形式的密钥内容。公钥格式满足ASN.1语法、X.509规范、DER编码格式。 +**返回值:** -**系统能力:** SystemCapability.Security.CryptoFramework +| 类型 | 说明 | +| ----------------------------------------------- | -------------------------- | +| [AsyKeyGeneratorBySpec](#asykeygeneratorbyspec10) | 返回非对称密钥生成器实例。 | -**返回值:** +**错误码:** -| 类型 | 说明 | -| --------------------- | ------------------------ | -| [DataBlob](#datablob) | 用于查看密钥的具体内容。 | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 17620001 | memory error. | **示例:** ```js -function uint8ArrayToShowStr(uint8Array) { - return Array.prototype.map - .call(uint8Array, (x) => ('00' + x.toString(16)).slice(-2)) - .join(''); -} +import cryptoFramework from "@ohos.security.cryptoFramework" + +// 设置DSA1024中公私钥都包含的公共参数 +function genDsa1024CommonSpecBigE() { + let dsaCommonSpec = { + algName : "DSA", + specType : cryptoFramework.AsyKeySpecType.COMMON_PARAMS_SPEC, + p : BigInt("0xed1501551b8ab3547f6355ffdc2913856ddeca198833dbd04f020e5f25e47c50e0b3894f7690a0d2ea5ed3a7be25c54292a698e1f086eb3a97deb4dbf04fcad2dafd94a9f35c3ae338ab35477e16981ded6a5b13d5ff20bf55f1b262303ad3a80af71aa6aa2354d20e9c82647664bdb6b333b7bea0a5f49d55ca40bc312a1729"), + q : BigInt("0xd23304044019d5d382cfeabf351636c7ab219694ac845051f60b047b"), + g : BigInt("0x2cc266d8bd33c3009bd67f285a257ba74f0c3a7e12b722864632a0ac3f2c17c91c2f3f67eb2d57071ef47aaa8f8e17a21ad2c1072ee1ce281362aad01dcbcd3876455cd17e1dd55d4ed36fa011db40f0bbb8cba01d066f392b5eaa9404bfcb775f2196a6bc20eeec3db32d54e94d87ecdb7a0310a5a017c5cdb8ac78597778bd"), + } + return dsaCommonSpec; +} +// 设置DSA1024中公私钥包含的全量参数 +function genDsa1024KeyPairSpecBigE() { + let dsaCommonSpec = genDsa1024CommonSpecBigE(); + let dsaKeyPairSpec = { + algName : "DSA", + specType : cryptoFramework.AsyKeySpecType.KEY_PAIR_SPEC, + params : dsaCommonSpec, + sk : BigInt("0xa2dd2adb2d11392c2541930f61f1165c370aabd2d78d00342e0a2fd9"), + pk : BigInt("0xae6b5d5042e758f3fc9a02d009d896df115811a75b5f7b382d8526270dbb3c029403fafb8573ba4ef0314ea86f09d01e82a14d1ebb67b0c331f41049bd6b1842658b0592e706a5e4d20c14b67977e17df7bdd464cce14b5f13bae6607760fcdf394e0b73ac70aaf141fa4dafd736bd0364b1d6e6c0d7683a5de6b9221e7f2d6b"), + } + return dsaKeyPairSpec; +} -let key; // key为使用非对称密钥生成器生成的非对称密钥的公钥对象,此处省略生成过程 -console.info("key format:" + key.format); -console.info("key algName:" + key.algName); -var encodedKey = key.getEncoded(); -console.info("key encoded:" + uint8ArrayToShowStr(encodedKey.data)); +let asyKeyPairSpec = genDsa1024KeyPairSpecBigE(); // JS输入采用大端写法,并使用正数 +let asyKeyGeneratorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(asyKeyPairSpec); ``` -## PriKey +## AsyKeyGeneratorBySpec10+ -私钥,是Key的子类,在非对称加解密、签名、密钥协商时需要将其作为输入使用。
私钥可以通过非对称密钥生成器AsyKeyGenerator来生成。 +非对称密钥生成器。在使用该类的方法前,需要先使用[createAsyKeyGeneratorBySpec()](#cryptoframeworkcreateasykeygeneratorbyspec10)方法构建一个AsyKeyGeneratorBySpec实例。 ### 属性 -**系统能力:** SystemCapability.Security.CryptoFramework - -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ---------------------------- | -| format | string | 是 | 否 | 密钥的格式。 | -| algName | string | 是 | 否 | 密钥对应的算法名(含长度)。 | - -### getEncoded - -getEncoded() : DataBlob - -以同步方法,获取二进制形式的密钥内容。私钥格式满足ASN.1语法,PKCS#8规范、DER编码方式。 - **系统能力:** SystemCapability.Security.CryptoFramework -**返回值:** +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | -------------------------- | +| algName | string | 是 | 否 | 非对称密钥生成器的算法名。 | -| 类型 | 说明 | -| --------------------- | ------------------------ | -| [DataBlob](#datablob) | 用于查看密钥的具体内容。 | +### generateKeyPair -**示例:** +generateKeyPair(callback: AsyncCallback\): void -```js -function uint8ArrayToShowStr(uint8Array) { - return Array.prototype.map - .call(uint8Array, (x) => ('00' + x.toString(16)).slice(-2)) - .join(''); -} +异步获取非对称密钥生成器生成的密钥,通过注册回调函数获取结果。当使用COMMON_PARAMS_SPEC类型的密钥参数来创建密钥生成器时,可以得到随机生成的密钥对;当使用KEY_PAIR_SPEC类型的密钥参数来创建密钥生成器时,可以得到各项数据与密钥参数一致的密钥对。 -let key; // key为使用非对称密钥生成器生成的非对称密钥的私钥对象,此处省略生成过程 -console.info("key format:" + key.format); -console.info("key algName:" + key.algName); -var encodedKey = key.getEncoded(); -console.info("key encoded:" + uint8ArrayToShowStr(encodedKey.data)); -``` +**系统能力:** SystemCapability.Security.CryptoFramework -### clearMem +**参数:** -clearMem() : void +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------- | ---- | ------------------------------ | +| callback | AsyncCallback\<[KeyPair](#keypair)> | 是 | 回调函数,用于获取非对称密钥。 | -以同步方法,将系统底层内存中的的密钥内容清零。 +**错误码:** -**系统能力:** SystemCapability.Security.CryptoFramework +| 错误码ID | 错误信息 | +| -------- | ----------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | **示例:** ```js -let key; // key为使用非对称密钥生成器生成的非对称密钥的私钥对象,此处省略生成过程 -key.clearMem(); -``` - -## KeyPair - -非对称密钥对,包含:公钥与私钥。
可以通过非对称密钥生成器AsyKeyGenerator来生成。 - -> **说明:** -> -> KeyPair对象中的pubKey对象和priKey对象,作为KeyPair对象中的一个参数存在,当离开KeyPair对象作用域时,其内部对象可能被析构。
业务方使用时应持有KeyPair对象的引用,而非内部pubKey或priKey对象的引用。 - -### 属性 - -**系统能力:** SystemCapability.Security.CryptoFramework - -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ------------ | -| priKey | [PriKey](#prikey) | 是 | 否 | 私钥。 | -| pubKey | [PubKey](#pubkey) | 是 | 否 | 公钥。 | +import cryptoFramework from "@ohos.security.cryptoFramework" +let asyKeyPairSpec; // asyKeyPairSpec为全量密钥参数,此处省略生成过程 +let asyKeyGeneratorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(asyKeyPairSpec); +asyKeyGenerator.generateKeyPair((err, keyPair) => { + if (err) { + console.error("generateKeyPair: error."); + return; + } + console.info("generateKeyPair: success."); +}) +``` -## cryptoFramework.createSymKeyGenerator +### generateKeyPair -createSymKeyGenerator(algName : string) : SymKeyGenerator +generateKeyPair(): Promise\ -通过指定算法名称的字符串,获取相应的对称密钥生成器实例。
支持的规格详见框架概述“[密钥生成规格](../../security/cryptoFramework-overview.md#密钥生成规格)”一节。 +异步获取该非对称密钥生成器生成的密钥,通过Promise获取结果。当使用COMMON_PARAMS_SPEC类型的密钥参数来创建密钥生成器时,可以得到随机生成的密钥对;当使用KEY_PAIR_SPEC类型的密钥参数来创建密钥生成器时,可以得到各项数据与密钥参数一致的密钥对。 **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** +**返回值:** -| 参数名 | 类型 | 必填 | 说明 | -| ------- | ------ | ---- | ------------------------------------------------------------ | -| algName | string | 是 | 待生成对称密钥生成器的算法名称。
具体取值详见框架概述“[密钥生成规格](../../security/cryptoFramework-overview.md#密钥生成规格)”一节中的“字符串参数”。 | +| 类型 | 说明 | +| ----------------- | --------------------------------- | +| Promise\<[KeyPair](#keypair)> | 使用Promise的方式获取非对称密钥。 | -**返回值:** +**错误码:** -| 类型 | 说明 | -| ----------------------------------- | -------------------------- | -| [SymKeyGenerator](#symkeygenerator) | 返回对称密钥生成器的对象。 | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | **示例:** ```js -import cryptoFramework from '@ohos.security.cryptoFramework'; -let symKeyGenerator = cryptoFramework.createSymKeyGenerator('3DES192'); -``` - -## SymKeyGenerator - -对称密钥生成器。
在使用该类的方法前,需要先使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)方法构建一个symKeyGenerator实例。 - -### 属性 - -**系统能力:** SystemCapability.Security.CryptoFramework +import cryptoFramework from "@ohos.security.cryptoFramework" -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ------------------------------ | -| algName | string | 是 | 否 | 对称密钥生成器指定的算法名称。 | +let asyKeyPairSpec; // asyKeyPairSpec为全量密钥参数,此处省略生成过程 +let asyKeyGeneratorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(asyKeyPairSpec); +let keyGenPromise = asyKeyGenerator.generateKeyPair(); +keyGenPromise.then( keyPair => { + console.info("generateKeyPair success."); +}).catch(error => { + console.error("generateKeyPair error."); +}); +``` -### generateSymKey +### generatePriKey -generateSymKey(callback : AsyncCallback\) : void +generatePriKey(callback: AsyncCallback\): void -异步获取对称密钥生成器随机生成的密钥,通过注册回调函数获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。
目前支持使用OpenSSL的RAND_priv_bytes()作为底层能力生成随机密钥。 +异步获取非对称密钥生成器生成的密钥,通过注册回调函数获取结果。当使用PRIVATE_KEY_SPEC类型的密钥参数来创建密钥生成器时,可以得到指定的私钥;当使用KEY_PAIR_SPEC类型的密钥参数来创建密钥生成器时,可以从生成的密钥对中获取指定的私钥。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | --------------------------------- | ---- | ------------------------------------------------------------ | -| callback | AsyncCallback\<[SymKey](#symkey)> | 是 | 回调函数。当生成对称密钥成功,err为undefined,data为获取到的SymKey;否则为错误对象。 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------- | ---- | ------------------------------ | +| callback | AsyncCallback\<[PriKey](#prikey)> | 是 | 回调函数,用于获取非对称密钥。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ------------- | -| 17620001 | memory error. | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | **示例:** ```js -import cryptoFramework from '@ohos.security.cryptoFramework'; -let symAlgName = '3DES192'; -let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); -symKeyGenerator.generateSymKey((err, symKey) => { +import cryptoFramework from "@ohos.security.cryptoFramework" + +let asyKeyPairSpec; // asyKeyPairSpec为全量密钥参数 +let asyKeyGeneratorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(asyKeyPairSpec); +asyKeyGenerator.generatePriKey((err, prikey) => { if (err) { - console.error(`Generate symKey failed, ${err.code}, ${err.message}`); - } else { - console.info(`Generate symKey success, algName: ${symKey.algName}`); + console.error("generatePriKey: error."); + return; } + console.info("generatePriKey: success."); }) ``` -### generateSymKey +### generatePriKey -generateSymKey() : Promise\ +generatePriKey(): Promise\ -异步获取该对称密钥生成器随机生成的密钥,通过Promise获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。
目前支持使用OpenSSL的RAND_priv_bytes()作为底层能力生成随机密钥。 +异步获取该非对称密钥生成器生成的密钥,通过Promise获取结果。当使用PRIVATE_KEY_SPEC类型的密钥参数来创建密钥生成器时,可以得到指定的私钥;当使用KEY_PAIR_SPEC类型的密钥参数来创建密钥生成器时,可以从生成的密钥对中获取指定的私钥。 **系统能力:** SystemCapability.Security.CryptoFramework **返回值:** -| 类型 | 说明 | -| --------------------------- | --------------------------------- | -| Promise\<[SymKey](#symkey)> | Promise对象,返回对称密钥SymKey。 | +| 类型 | 说明 | +| ----------------- | --------------------------------- | +| Promise\<[PriKey](#prikey)> | 使用Promise的方式获取非对称密钥。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ------------- | -| 17620001 | memory error. | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | **示例:** ```js -import cryptoFramework from '@ohos.security.cryptoFramework'; -let symAlgName = 'AES128'; -let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); -symKeyGenerator.generateSymKey() -.then(symKey => { - console.info(`Generate symKey success, algName: ${symKey.algName}`); -}, error => { - console.error(`Generate symKey failed, ${error.code}, ${error.message}`); -}) +import cryptoFramework from "@ohos.security.cryptoFramework" + +let asyKeyPairSpec; // asyKeyPairSpec为全量密钥参数 +let asyKeyGeneratorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(asyKeyPairSpec); +let keyGenPromise = asyKeyGenerator.generatePriKey(); +keyGenPromise.then( priKey => { + console.info("generatePriKey success."); +}).catch(error => { + console.error("generatePriKey error."); +}); ``` -### convertKey +### generatePubKey -convertKey(key : DataBlob, callback : AsyncCallback\) : void +generatePubKey(callback: AsyncCallback\): void -异步根据指定数据生成对称密钥,通过注册回调函数获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。 +异步获取非对称密钥生成器生成的密钥,通过注册回调函数获取结果。当使用PUBLIC_KEY_SPEC类型的密钥参数来创建密钥生成器时,可以得到指定的公钥;当使用KEY_PAIR_SPEC类型的密钥参数来创建密钥生成器时,可以从生成的密钥对中获取指定的公钥。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | --------------------------------- | ---- | ------------------------------------------------------------ | -| key | [DataBlob](#datablob) | 是 | 指定的对称密钥材料。 | -| callback | AsyncCallback\<[SymKey](#symkey)> | 是 | 回调函数。当生成对称密钥成功,err为undefined,data为获取到的SymKey;否则为错误对象。 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------- | ---- | ------------------------------ | +| callback | AsyncCallback\<[PubKey](#pubkey)> | 是 | 回调函数,用于获取非对称密钥。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | --------------------------------------------------- | -| 17620001 | memory error. | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | **示例:** ```js -import cryptoFramework from '@ohos.security.cryptoFramework'; - -function genKeyMaterialBlob() { - let arr = [ - 0xba, 0x3d, 0xc2, 0x71, 0x21, 0x1e, 0x30, 0x56, - 0xad, 0x47, 0xfc, 0x5a, 0x46, 0x39, 0xee, 0x7c, - 0xba, 0x3b, 0xc2, 0x71, 0xab, 0xa0, 0x30, 0x72]; // keyLen = 192 (24 bytes) - let keyMaterial = new Uint8Array(arr); - return {data : keyMaterial}; -} +import cryptoFramework from "@ohos.security.cryptoFramework" -let symAlgName = '3DES192'; -let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); -let keyMaterialBlob = genKeyMaterialBlob(); -symKeyGenerator.convertKey(keyMaterialBlob, (err, symKey) => { +let asyKeyPairSpec; // asyKeyPairSpec为全量密钥参数,此处省略生成过程 +let asyKeyGeneratorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(asyKeyPairSpec); +asyKeyGenerator.generateKeyPair((err, pubKey) => { if (err) { - console.error(`Convert symKey failed, ${err.code}, ${err.message}`); - } else { - console.info(`Convert symKey success, algName: ${symKey.algName}`); + console.error("generatePubKey: error."); + return; } + console.info("generatePubKey: success."); }) ``` -### convertKey +### generatePubKey -convertKey(key : DataBlob) : Promise\ +generatePubKey(): Promise\ -异步根据指定数据生成对称密钥,通过Promise获取结果。
必须在使用[createSymKeyGenerator](#cryptoframeworkcreatesymkeygenerator)创建对称密钥生成器后,才能使用本函数。 +异步获取该非对称密钥生成器生成的密钥,通过Promise获取结果。当使用PUBLIC_KEY_SPEC类型的密钥参数来创建密钥生成器时,可以得到指定的公钥;当使用KEY_PAIR_SPEC类型的密钥参数来创建密钥生成器时,可以从生成的密钥对中获取指定的公钥。 **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** - -| 参数名 | 类型 | 必填 | 说明 | -| ---- | --------------------- | ---- | -------------------- | -| key | [DataBlob](#datablob) | 是 | 指定的密钥材料数据。 | - **返回值:** -| 类型 | 说明 | -| --------------------------- | --------------------------------- | -| Promise\<[SymKey](#symkey)> | Promise对象,返回对称密钥SymKey。 | +| 类型 | 说明 | +| ----------------- | --------------------------------- | +| Promise\<[PubKey](#pubkey)> | 使用Promise的方式获取非对称密钥。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | --------------------------------------------- | -| 17620001 | memory error. | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | **示例:** ```js -import cryptoFramework from '@ohos.security.cryptoFramework'; - -function genKeyMaterialBlob() { - let arr = [ - 0xba, 0x3d, 0xc2, 0x71, 0x21, 0x1e, 0x30, 0x56, - 0xad, 0x47, 0xfc, 0x5a, 0x46, 0x39, 0xee, 0x7c, - 0xba, 0x3b, 0xc2, 0x71, 0xab, 0xa0, 0x30, 0x72]; // keyLen = 192 (24 bytes) - let keyMaterial = new Uint8Array(arr); - return {data : keyMaterial}; -} +import cryptoFramework from "@ohos.security.cryptoFramework" -let symAlgName = '3DES192'; -let symKeyGenerator = cryptoFramework.createSymKeyGenerator(symAlgName); -let keyMaterialBlob = genKeyMaterialBlob(); -symKeyGenerator.convertKey(keyMaterialBlob) -.then(symKey => { - console.info(`Convert symKey success, algName: ${symKey.algName}`); -}, error => { - console.error(`Convert symKey failed, ${error.code}, ${error.message}`); -}) +let asyKeyPairSpec; // asyKeyPairSpec为全量密钥参数,此处省略生成过程 +let asyKeyGeneratorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(asyKeyPairSpec); +let keyGenPromise = asyKeyGenerator.generatePubKey(); +keyGenPromise.then( pubKey => { + console.info("generatePubKey success."); +}).catch(error => { + console.error("generatePubKey error."); +}); ``` -## cryptoFramework.createAsyKeyGenerator +## cryptoFramework.createCipher -createAsyKeyGenerator(algName : string) : AsyKeyGenerator +createCipher(transformation: string): Cipher -通过指定算法名称的字符串,获取相应的非对称密钥生成器实例。
支持的规格详见框架概述“[密钥生成规格](../../security/cryptoFramework-overview.md#密钥生成规格)”一节。 +通过指定算法名称,获取相应的[Cipher](#cipher)实例。
支持的规格详见框架概述“[加解密规格](../../security/cryptoFramework-overview.md#加解密规格)”一节。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| ------- | ------ | ---- | -------------------------------- | -| algName | string | 是 | 待生成对称密钥生成器的算法名称。 | +| 参数名 | 类型 | 必填 | 说明 | +| -------------- | ------ | ---- | ------------------------------------------------------------ | +| transformation | string | 是 | 待生成Cipher的算法名称(含密钥长度)、加密模式以及填充方法的组合。
具体取值详见框架概述“[加解密规格](../../security/cryptoFramework-overview.md#加解密规格)”一节中的“字符串参数”。 | + +> **说明:** +> +> 1. 目前对称加解密中,PKCS5和PKCS7的实现相同,其padding长度和分组长度保持一致(即PKCS5和PKCS7在3DES中均按照8字节填充,在AES中均按照16字节填充),另有NoPadding表示不填充。
开发者需要自行了解密码学不同分组模式的差异,以便选择合适的参数规格。例如选择ECB和CBC模式时,建议启用填充,否则必须确保明文长度是分组大小的整数倍;选择其他模式时,可以不启用填充,此时密文长度和明文长度一致(即可能不是分组大小的整数倍)。 +> 2. 使用RSA进行非对称加解密时,必须创建两个Cipher对象分别进行加密和解密操作,而不能对同一个Cipher对象进行加解密。对称加解密没有此要求(即只要算法规格一样,可以对同一个Cipher对象进行加解密操作)。 **返回值:** -| 类型 | 说明 | -| --------------- | ---------------------------- | -| [AsyKeyGenerator](#asykeygenerator) | 返回非对称密钥生成器的对象。 | - -**示例:** - -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" - -let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); -``` - -## AsyKeyGenerator - -非对称密钥生成器。在使用该类的方法前,需要先使用createAsyKeyGenerator()方法构建一个AsyKeyGenerator实例。 - -### 属性 - -**系统能力:** SystemCapability.Security.CryptoFramework - -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | -------------------------------- | -| algName | string | 是 | 否 | 非对称密钥生成器指定的算法名称。 | - -### generateKeyPair - -generateKeyPair(callback : AsyncCallback\) : void; - -异步获取非对称密钥生成器随机生成的密钥,通过注册回调函数获取结果。 - -**系统能力:** SystemCapability.Security.CryptoFramework - -**参数:** - -| 参数名 | 类型 | 必填 | 说明 | -| -------- | ----------------------- | ---- | ------------------------------ | -| callback | AsyncCallback\<[KeyPair](#keypair)> | 是 | 回调函数,用于获取非对称密钥。 | - -**错误码:** - -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | - -**示例:** - -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" - -let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); -asyKeyGenerator.generateKeyPair((err, keyPair) => { - if (err) { - console.error("generateKeyPair: error."); - return; - } - console.info("generateKeyPair: success."); -}) -``` - - -### generateKeyPair - -generateKeyPair() : Promise\ - -异步获取该非对称密钥生成器随机生成的密钥,通过Promise获取结果。 - -**系统能力:** SystemCapability.Security.CryptoFramework - -**返回值:** - -| 类型 | 说明 | -| ----------------- | --------------------------------- | -| Promise\<[KeyPair](#keypair)> | 使用Promise的方式获取非对称密钥。 | - -**错误码:** - -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | - -**示例:** - -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" - -let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); -let keyGenPromise = asyKeyGenerator.generateKeyPair(); -keyGenPromise.then( keyPair => { - console.info("generateKeyPair success."); -}).catch(error => { - console.error("generateKeyPair error."); -}); -``` - -### convertKey - -convertKey(pubKey : DataBlob, priKey : DataBlob, callback : AsyncCallback\) : void - -异步获取指定数据生成非对称密钥,通过注册回调函数获取结果。详情请看下方**密钥转换说明** - -**系统能力:** SystemCapability.Security.CryptoFramework - -**参数:** - -| 参数名 | 类型 | 必填 | 说明 | -| -------- | ----------- | ---- | ------------------------------ | -| pubKey | [DataBlob](#datablob) | 是 | 指定的公钥材料。如果公钥不需要转换,可直接传入null。 | -| priKey | [DataBlob](#datablob) | 是 | 指定的私钥材料。如果私钥不需要转换,可直接传入null。 | -| callback | AsyncCallback\<[KeyPair](#keypair)> | 是 | 回调函数,用于获取非对称密钥。 | - -**错误码:** - -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | - -**示例:** - -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" -let pubKey; // X.509规范、DER格式的公钥数据,此处省略数据。 -let priKey; // PKCS#8规范、DER格式的私钥数据,此处省略数据。 -let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); -asyKeyGenerator.convertKey(pubKey, priKey, (err, keyPair) => { - if (err) { - console.error("convertKey: error."); - return; - } - console.info("convertKey: success."); -}) -``` - -### convertKey - -convertKey(pubKey : DataBlob, priKey : DataBlob) : Promise\ - -异步获取指定数据生成非对称密钥,通过Promise获取结果。详情请看下方**密钥转换说明** - -**系统能力:** SystemCapability.Security.CryptoFramework - -**参数:** - -| 参数名 | 类型 | 必填 | 说明 | -| ------ | -------- | ---- | ---------------- | -| pubKey | DataBlob | 是 | 指定的公钥材料。如果公钥不需要转换,可直接传入null | -| priKey | DataBlob | 是 | 指定的私钥材料。如果私钥不需要转换,可直接传入null | - -**返回值:** - -| 类型 | 说明 | -| ----------------- | --------------------------------- | -| Promise\<[KeyPair](#keypair)> | 使用Promise的方式获取非对称密钥。 | +| 类型 | 说明 | +| ----------------- | ------------------------ | +| [Cipher](#cipher) | 返回加解密生成器的对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | - -**示例:** - -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" - -let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); -let pubKey; // pubKey为使用非对称密钥生成器生成的非对称密钥的公钥对象,此处省略生成过程 -let priKey; // priKey为使用非对称密钥生成器生成的非对称密钥的私钥对象,此处省略生成过程 -let keyGenPromise = asyKeyGenerator.convertKey(pubKey, priKey); -keyGenPromise.then( keyPair => { - console.info("convertKey success."); -}).catch(error => { - console.error("convertKey error."); -}); -``` - -**密钥转换说明** - -1. 非对称密钥(RSA、ECC)的公钥和私钥调用getEncoded()方法后,分别返回X.509格式和PKCS#8格式的二进制数据,此数据可用于跨应用传输或持久化存储。 -2. 当调用convertKey方法将外来二进制数据转换为算法库非对称密钥对象时,公钥应满足ASN.1语法、X.509规范、DER编码格式,私钥应满足ASN.1语法、PKCS#8规范、DER编码格式。 -3. convertKey方法中,公钥和密钥二进制数据非必选项,可单独传入公钥或私钥的数据,生成对应只包含公钥或私钥的KeyPair对象。 - -## cryptoFramework.createCipher - -createCipher(transformation : string) : Cipher - -通过指定算法名称,获取相应的[Cipher](#cipher)实例。
支持的规格详见框架概述“[加解密规格](../../security/cryptoFramework-overview.md#加解密规格)”一节。 - -**系统能力:** SystemCapability.Security.CryptoFramework - -**参数:** - -| 参数名 | 类型 | 必填 | 说明 | -| -------------- | ------ | ---- | ------------------------------------------------------------ | -| transformation | string | 是 | 待生成Cipher的算法名称(含密钥长度)、加密模式以及填充方法的组合。
具体取值详见框架概述“[加解密规格](../../security/cryptoFramework-overview.md#加解密规格)”一节中的“字符串参数”。 | - -> **说明:** -> 1. 目前对称加解密中,PKCS5和PKCS7的实现相同,其padding长度和分组长度保持一致(即PKCS5和PKCS7在3DES中均按照8字节填充,在AES中均按照16字节填充),另有NoPadding表示不填充。
开发者需要自行了解密码学不同分组模式的差异,以便选择合适的参数规格。例如选择ECB和CBC模式时,建议启用填充,否则必须确保明文长度是分组大小的整数倍;选择其他模式时,可以不启用填充,此时密文长度和明文长度一致(即可能不是分组大小的整数倍)。 -> 2. 使用RSA进行非对称加解密时,必须创建两个Cipher对象分别进行加密和解密操作,而不能对同一个Cipher对象进行加解密。对称加解密没有此要求(即只要算法规格一样,可以对同一个Cipher对象进行加解密操作)。 - -**返回值:** - -| 类型 | 说明 | -| ----------------- | ------------------------ | -| [Cipher](#cipher) | 返回加解密生成器的对象。 | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 1762000110+ | memory error. | **示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" let cipherAlgName = '3DES192|ECB|PKCS7'; @@ -1643,7 +1352,7 @@ try { ### init -init(opMode : CryptoMode, key : Key, params : ParamsSpec, callback : AsyncCallback\) : void +init(opMode: CryptoMode, key: Key, params: ParamsSpec, callback: AsyncCallback\): void 初始化加解密的[cipher](#cipher)对象,通过注册回调函数获取结果。
必须在使用[createCipher](#cryptoframeworkcreatecipher)创建[Cipher](#cipher)实例后,才能使用本函数。 @@ -1662,6 +1371,7 @@ init(opMode : CryptoMode, key : Key, params : ParamsSpec, callback : AsyncCallba | 错误码ID | 错误信息 | | -------- | --------------------------------------------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error.| @@ -1685,7 +1395,7 @@ cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, symKey, null, (err, ) => { ### init -init(opMode : CryptoMode, key : Key, params : ParamsSpec) : Promise\ +init(opMode: CryptoMode, key: Key, params: ParamsSpec): Promise\ 初始化加解密的cipher对象,通过Promise获取结果。
必须在使用[createCipher](#cryptoframeworkcreatecipher)创建[Cipher](#cipher)实例后,才能使用本函数。 @@ -1709,6 +1419,7 @@ init(opMode : CryptoMode, key : Key, params : ParamsSpec) : Promise\ | 错误码ID | 错误信息 | | -------- | ------------------------------------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error.| @@ -1730,13 +1441,16 @@ cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, symKey, null) ### update -update(data : DataBlob, callback : AsyncCallback\) : void +update(data: DataBlob, callback: AsyncCallback\): void 分段更新加密或者解密数据操作,通过注册回调函数获取加/解密数据。
必须在对[Cipher](#cipher)实例使用[init()](init-2)初始化后,才能使用本函数。 -> **说明:** +> **说明:** +> > 1. 在进行对称加解密操作的时候,如果开发者对各个分组模式不够熟悉,建议对每次update和doFinal的结果都判断是否为null,并在结果不为null时取出其中的数据进行拼接,形成完整的密文/明文。这是因为选择的分组模式等各项规格都可能对update和[doFinal](#dofinal-2)结果产生影响。
(例如对于ECB和CBC模式,不论update传入的数据是否为分组长度的整数倍,都会以分组作为基本单位进行加/解密,并输出本次update新产生的加/解密分组结果。
可以理解为,update只要凑满一个新的分组就会有输出,如果没有凑满则此次update输出为null,把当前还没被加/解密的数据留着,等下一次update/doFinal传入数据的时候,拼接起来继续凑分组。
最后doFinal的时候,会把剩下的还没加/解密的数据,根据[createCipher](#cryptoframeworkcreatecipher)时设置的padding模式进行填充,补齐到分组的整数倍长度,再输出剩余加解密结果。
而对于可以将分组密码转化为流模式实现的模式,还可能出现密文长度和明文长度相同的情况等。) -> 2. 根据数据量,可以不调用update(即[init](#init-2)完成后直接调用[doFinal](#dofinal-2))或多次调用update。
算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的对称加解密,采用多次update的方式传入数据。
AES使用多次update操作的示例代码详见开发指导“[使用加解密操作](../../security/cryptoFramework-guidelines.md#使用加解密操作)”。 +> 2. 根据数据量,可以不调用update(即[init](#init-2)完成后直接调用[doFinal](#dofinal-2))或多次调用update。
+> 算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的对称加解密,采用多次update的方式传入数据。
+> AES使用多次update操作的示例代码详见开发指导“[使用加解密操作](../../security/cryptoFramework-guidelines.md#使用加解密操作)”。 > 3. RSA非对称加解密不支持update操作。 **系统能力:** SystemCapability.Security.CryptoFramework @@ -1745,13 +1459,14 @@ update(data : DataBlob, callback : AsyncCallback\) : void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------- | ---- | ------------------------------------------------------------ | -| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。data不能为null,也不允许传入{data : Uint8Array(空) } | +| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。data不能为null,也不允许传入{data: Uint8Array(空) }。 | | callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 回调函数。当更新加/解密数据成功,err为undefined,data为此次更新的加/解密结果DataBlob;否则为错误对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ------------------------------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | @@ -1771,7 +1486,7 @@ function stringToUint8Array(str) { let cipher; // 此处省略生成cipher实例的过程 // 此处省略init()过程 -let plainText = {data : stringToUint8Array('this is test!')}; +let plainText = {data: stringToUint8Array('this is test!')}; cipher.update(plainText, (err, output) => { // 加密过程举例 if (err) { console.error(`Failed to update cipher`); @@ -1787,13 +1502,16 @@ cipher.update(plainText, (err, output) => { // 加密过程举例 ### update -update(data : DataBlob) : Promise\ +update(data: DataBlob): Promise\ 分段更新加密或者解密数据操作,通过通过Promise获取加/解密数据。
必须在对[Cipher](#cipher)实例使用[init()](init-2)初始化后,才能使用本函数。 -> **说明:** +> **说明:** +> > 1. 在进行对称加解密操作的时候,如果开发者对各个分组模式不够熟悉,建议对每次update和doFinal的结果都判断是否为null,并在结果不为null时取出其中的数据进行拼接,形成完整的密文/明文。这是因为选择的分组模式等各项规格都可能对update和[doFinal](#dofinal-2)结果产生影响。
(例如对于ECB和CBC模式,不论update传入的数据是否为分组长度的整数倍,都会以分组作为基本单位进行加/解密,并输出本次update新产生的加/解密分组结果。
可以理解为,update只要凑满一个新的分组就会有输出,如果没有凑满则此次update输出为null,把当前还没被加/解密的数据留着,等下一次update/doFinal传入数据的时候,拼接起来继续凑分组。
最后doFinal的时候,会把剩下的还没加/解密的数据,根据[createCipher](#cryptoframeworkcreatecipher)时设置的padding模式进行填充,补齐到分组的整数倍长度,再输出剩余加解密结果。
而对于可以将分组密码转化为流模式实现的模式,还可能出现密文长度和明文长度相同的情况等。) -> 2. 根据数据量,可以不调用update(即[init](#init-2)完成后直接调用[doFinal](#dofinal-2))或多次调用update。
算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的对称加解密,可以采用多次update的方式传入数据。
AES使用多次update操作的示例代码详见开发指导“[使用加解密操作](../../security/cryptoFramework-guidelines.md#使用加解密操作)”。 +> 2. 根据数据量,可以不调用update(即[init](#init-2)完成后直接调用[doFinal](#dofinal-2))或多次调用update。
+> 算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的对称加解密,可以采用多次update的方式传入数据。
+> AES使用多次update操作的示例代码详见开发指导“[使用加解密操作](../../security/cryptoFramework-guidelines.md#使用加解密操作)”。 > 3. RSA非对称加解密不支持update操作。 **系统能力:** SystemCapability.Security.CryptoFramework @@ -1802,7 +1520,7 @@ update(data : DataBlob) : Promise\ | 参数名 | 类型 | 必填 | 说明 | | ---- | --------------------- | ---- | -------------------- | -| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。data不能为null,也不允许传入{data : Uint8Array(空) } | +| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。data不能为null,也不允许传入{data: Uint8Array(空) }。 | **返回值:** @@ -1814,6 +1532,7 @@ update(data : DataBlob) : Promise\ | 错误码ID | 错误信息 | | -------- | -------------------------------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | @@ -1833,7 +1552,7 @@ function stringToUint8Array(str) { let cipher; // 此处省略生成cipher实例的过程 // 此处省略init()过程 -let plainText = {data : stringToUint8Array('this is test!')}; +let plainText = {data: stringToUint8Array('this is test!')}; cipher.update(plainText) .then((output) => { console.info(`Update cipher success.`); @@ -1848,7 +1567,7 @@ cipher.update(plainText) ### doFinal -doFinal(data : DataBlob, callback : AsyncCallback\) : void +doFinal(data: DataBlob, callback: AsyncCallback\): void (1)在对称加解密中,doFinal加/解密(分组模式产生的)剩余数据和本次传入的数据,最后结束加密或者解密数据操作,通过注册回调函数获取加密或者解密数据。
如果数据量较小,可以在doFinal中一次性传入数据,而不使用update;如果在本次加解密流程中,已经使用[update](#update-4)传入过数据,可以在doFinal的data参数处传入null。
根据对称加解密的模式不同,doFinal的输出有如下区别: @@ -1857,7 +1576,8 @@ doFinal(data : DataBlob, callback : AsyncCallback\) : void (2)在RSA非对称加解密中,doFinal加/解密本次传入的数据,通过注册回调函数获取加密或者解密数据。如果数据量较大,可以多次调用doFinal,拼接结果得到完整的明文/密文。 -> **说明:** +> **说明:** +> > 1. 对称加解密中,调用doFinal标志着一次加解密流程已经完成,即[Cipher](#cipher)实例的状态被清除,因此当后续开启新一轮加解密流程时,需要重新调用[init()](init-2)并传入完整的参数列表进行初始化
(比如即使是对同一个Cipher实例,采用同样的对称密钥,进行加密然后解密,则解密中调用init的时候仍需填写params参数,而不能直接省略为null)。 > 2. 如果遇到解密失败,需检查加解密数据和[init](#init-2)时的参数是否匹配,包括GCM模式下加密得到的authTag是否填入解密时的GcmParamsSpec等。 > 3. doFinal的结果可能为null,因此使用.data字段访问doFinal结果的具体数据前,请记得先判断结果是否为null,避免产生异常。 @@ -1869,13 +1589,14 @@ doFinal(data : DataBlob, callback : AsyncCallback\) : void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------- | ---- | ------------------------------------------------------------ | -| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。在对称加解密中允许为null,但不允许传入{data : Uint8Array(空) }。 | +| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。在对称加解密中允许为null,但不允许传入{data: Uint8Array(空) }。 | | callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 回调函数。当最终加/解密数据成功,err为undefined,data为剩余数据的加/解密结果DataBlob;否则为错误对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ----------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | @@ -1902,7 +1623,7 @@ cipher.doFinal(data, (err, output) => { ### doFinal -doFinal(data : DataBlob) : Promise\ +doFinal(data: DataBlob): Promise\ (1)在对称加解密中,doFinal加/解密(分组模式产生的)剩余数据和本次传入的数据,最后结束加密或者解密数据操作,通过Promise获取加密或者解密数据。
如果数据量较小,可以在doFinal中一次性传入数据,而不使用update;如果在本次加解密流程中,已经使用[update](#update-4)传入过数据,可以在doFinal的data参数处传入null。
根据对称加解密的模式不同,doFinal的输出有如下区别: @@ -1911,7 +1632,8 @@ doFinal(data : DataBlob) : Promise\ (2)在RSA非对称加解密中,doFinal加/解密本次传入的数据,通过Promise获取加密或者解密数据。如果数据量较大,可以多次调用doFinal,拼接结果得到完整的明文/密文。 -> **说明:** +> **说明:** +> > 1. 对称加解密中,调用doFinal标志着一次加解密流程已经完成,即[Cipher](#cipher)实例的状态被清除,因此当后续开启新一轮加解密流程时,需要重新调用[init()](init-2)并传入完整的参数列表进行初始化
(比如即使是对同一个Cipher实例,采用同样的对称密钥,进行加密然后解密,则解密中调用init的时候仍需填写params参数,而不能直接省略为null)。 > 2. 如果遇到解密失败,需检查加解密数据和[init](#init-2)时的参数是否匹配,包括GCM模式下加密得到的authTag是否填入解密时的GcmParamsSpec等。 > 3. doFinal的结果可能为null,因此使用.data字段访问doFinal结果的具体数据前,请记得先判断结果是否为null,避免产生异常。 @@ -1923,7 +1645,7 @@ doFinal(data : DataBlob) : Promise\ | 参数名 | 类型 | 必填 | 说明 | | ---- | --------------------- | ---- | -------------------- | -| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。data参数允许为null,但不允许传入{data : Uint8Array(空) } | +| data | [DataBlob](#datablob) | 是 | 加密或者解密的数据。data参数允许为null,但不允许传入{data: Uint8Array(空) }。 | **返回值:** @@ -1935,6 +1657,7 @@ doFinal(data : DataBlob) : Promise\ | 错误码ID | 错误信息 | | -------- | -------------------------------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | @@ -1960,7 +1683,7 @@ cipher.doFinal(data) **使用RSA加密的callback完整示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { @@ -1977,9 +1700,9 @@ rsaGenerator.generateKeyPair(function (err, keyPair) { let pubKey = keyPair.pubKey; cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, pubKey, null, function (err, data) { let plainText = "this is cipher text"; - let input = {data : stringToUint8Array(plainText) }; + let input = {data: stringToUint8Array(plainText) }; cipher.doFinal(input, function (err, data) { - AlertDialog.show({ message : "EncryptOutPut is " + data.data} ); + AlertDialog.show({ message: "EncryptOutPut is " + data.data} ); }); }); }); @@ -1987,7 +1710,7 @@ rsaGenerator.generateKeyPair(function (err, keyPair) { **使用RSA加密的promise完整示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { @@ -2006,19 +1729,92 @@ keyGenPromise.then(rsaKeyPair => { return cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, pubKey, null); // 传入私钥和DECRYPT_MODE可初始化解密模式 }).then(() => { let plainText = "this is cipher text"; - let input = { data : stringToUint8Array(plainText) }; + let input = { data: stringToUint8Array(plainText) }; return cipher.doFinal(input); }).then(dataBlob => { console.info("EncryptOutPut is " + dataBlob.data); }); ``` -> **说明:** +> **说明:** +> > 更多加解密流程的完整示例可参考开发指导中的“[使用加解密操作](../../security/cryptoFramework-guidelines.md#使用加解密操作)”一节。 +### setCipherSpec10+ + +setCipherSpec(itemType: CipherSpecItem, itemValue: Uint8Array): void + +设置加解密参数。常用的加解密参数可以直接通过[createCipher](#cryptoframeworkcreatecipher) 来指定,剩余参数可以通过本接口指定。当前只支持RSA算法。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------------------- | ---- | ---------- | +| itemType | [CipherSpecItem](#cipherspecitem10) | 是 | 用于指定需要设置的加解密参数。 | +| itemValue | Uint8Array | 是 | 用于指定加解密参数的具体值。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; + +let cipher; // 此处省略生成Cipher实例的过程 +let pSource = new Uint8Array([1,2,3,4]); +cipher.setCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF1_PSRC_UINT8ARR, pSource); +``` + +### getCipherSpec10+ + +getCipherSpec(itemType: CipherSpecItem): string | Uint8Array + +获取加解密参数。当前只支持RSA算法。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ---------- | +| itemType | [CipherSpecItem](#cipherspecitem10) | 是 | 用于指定需要获取的加解密参数。 | + +**返回值:** + +| 类型 | 说明 | +| -------------- | ----------- | +| string\|Uint8Array | 获取的加解密参数的具体值。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; + +let cipher; // 此处省略生成Cipher实例的过程 +let mdName = cipher.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MD_NAME_STR); +``` + ## cryptoFramework.createSign -createSign(algName : string) : Sign +createSign(algName: string): Sign Sign实例生成。
支持的规格详见框架概述“[签名验签规格](../../security/cryptoFramework-overview.md#签名验签规格)”一节。 @@ -2028,31 +1824,45 @@ Sign实例生成。
支持的规格详见框架概述“[签名验签规格] | 参数名 | 类型 | 必填 | 说明 | | ------- | ------ | ---- | ------------------------------------------------------------ | -| algName | string | 是 | 指定签名算法:RSA或ECC,使用RSA PKCS1模式时需要设置摘要,使用RSA PSS模式时需要设置摘要和掩码摘要 | +| algName | string | 是 | 指定签名算法:RSA,ECC或DSA。使用RSA PKCS1模式时需要设置摘要,使用RSA PSS模式时需要设置摘要和掩码摘要。 | **返回值**: -| 类型 | 说明 | -| ---- | -------------------------------- | -| Sign | 返回由输入算法指定生成的Sign对象 | +| 类型 | 说明 | +| ---- | ---------------------------------- | +| Sign | 返回由输入算法指定生成的Sign对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 80110+ | this operation is not supported. | +| 1762000110+ | memory error. | **示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" let signer1 = cryptoFramework.createSign("RSA1024|PKCS1|SHA256"); -let singer2 = cryptoFramework.createSign("RSA1024|PSS|SHA256|MGF1_SHA256") +let singer2 = cryptoFramework.createSign("RSA1024|PSS|SHA256|MGF1_SHA256"); + +let singer3 = cryptoFramework.createSign("ECC224|SHA256"); + +let singer4 = cryptoFramework.createSign("DSA2048|SHA256"); ``` ## Sign -Sign类,使用Sign方法之前需要创建该类的实例进行操作,通过createSign(algName : string) : Sign方法构造此实例。Sign类不支持重复初始化,当业务方需要使用新密钥签名时,需要重新创建新Sign对象并调用init初始化。 +Sign类,使用Sign方法之前需要创建该类的实例进行操作,通过createSign(algName: string): Sign方法构造此实例。按序调用本类中的init、update、sign方法完成签名操作。签名操作的示例代码详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 + +Sign类不支持重复初始化,当业务方需要使用新密钥签名时,需要重新创建新Sign对象并调用init初始化。 业务方使用时,在createSign时确定签名的模式,调用init接口设置密钥。 -当待签名数据较短时,可在init初始化后直接调用sign接口传入原文数据进行签名。 +当待签名数据较短时,可在init初始化后,(无需update)直接调用sign接口传入原文数据进行签名。 当待签名数据较长时,可通过update接口分段传入切分后的原文数据,最后调用sign接口对整体原文数据进行签名。 @@ -2068,9 +1878,9 @@ Sign类,使用Sign方法之前需要创建该类的实例进行操作,通过 ### init -init(priKey : PriKey, callback : AsyncCallback\) : void +init(priKey: PriKey, callback: AsyncCallback\): void -使用私钥初始化Sign对象,Callback形式,Sign类暂不支持重复init +使用私钥初始化Sign对象,Callback形式,Sign类暂不支持重复init。 **系统能力:** SystemCapability.Security.CryptoFramework @@ -2078,22 +1888,23 @@ init(priKey : PriKey, callback : AsyncCallback\) : void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------------- | ---- | ---------------- | -| priKey | [PriKey](#prikey) | 是 | 用于Sign的初始化 | -| callback | AsyncCallback\ | 是 | 回调函数 | +| priKey | [PriKey](#prikey) | 是 | 用于Sign的初始化。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | ### init -init(priKey : PriKey) : Promise\ +init(priKey: PriKey): Promise\ -使用私钥初始化Sign对象,Promise形式,Sign类暂不支持重复init +使用私钥初始化Sign对象,Promise形式,Sign类暂不支持重复init。 **系统能力:** SystemCapability.Security.CryptoFramework @@ -2101,56 +1912,64 @@ init(priKey : PriKey) : Promise\ | 参数名 | 类型 | 必填 | 说明 | | ------ | ---- | ---- | ---------------- | -| priKey | [PriKey](#prikey) | 是 | 用于Sign的初始化 | +| priKey | [PriKey](#prikey) | 是 | 用于Sign的初始化。 | **返回值:** -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | ### update -update(data : DataBlob, callback : AsyncCallback\) : void +update(data: DataBlob, callback: AsyncCallback\): void -追加待签名数据,callback方式 +追加待签名数据,通过注册回调函数完成更新。
必须在对[Sign](#sign)实例使用[init()](#init-2)初始化后,才能使用本函数。 -> **说明:** -> Sign多次调用update的代码示例详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 +> **说明:** +> +> 根据数据量,可以不调用update(即[init](#init-2)完成后直接调用[sign](#sign-1))或多次调用update。
+> 算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的签名操作,采用多次update的方式传入数据,避免一次性申请过大内存。
+> 签名使用多次update操作的示例代码详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------------------- | ---- | ---------- | -| data | [DataBlob](#datablob)| 是 | 传入的消息 | -| callback | AsyncCallback\ | 是 | 回调函数 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------- | ---- | ------------ | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | ### update -update(data : DataBlob) : Promise\; +update(data: DataBlob): Promise\ -追加待签名数据,promise方式 +追加待签名数据,通过promise方式完成更新。
必须在对[Sign](#sign)实例使用[init()](#init-3)初始化后,才能使用本函数。 -> **说明:** -> Sign多次调用update的代码示例详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 +> **说明:** +> +> 根据数据量,可以不调用update(即[init](#init-3)完成后直接调用[sign](#sign-2))或多次调用update。
+> 算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的签名操作,采用多次update的方式传入数据,避免一次性申请过大内存。
+> 签名使用多次update操作的示例代码详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 **系统能力:** SystemCapability.Security.CryptoFramework @@ -2158,27 +1977,28 @@ update(data : DataBlob) : Promise\; | 参数名 | 类型 | 必填 | 说明 | | ------ | -------- | ---- | ---------- | -| data | [DataBlob](#datablob) | 是 | 传入的消息 | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | **返回值:** -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | ### sign -sign(data : DataBlob, callback : AsyncCallback\) : void +sign(data: DataBlob, callback: AsyncCallback\): void -对数据进行签名,返回签名结果,callback方式 +对数据进行签名,通过注册回调函数获取签名结果。 **系统能力:** SystemCapability.Security.CryptoFramework @@ -2186,22 +2006,23 @@ sign(data : DataBlob, callback : AsyncCallback\) : void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------------- | ---- | ---------- | -| data | [DataBlob](#datablob) | 是 | 传入的消息 | -| callback | AsyncCallback\<[DataBlob](#datablob) > | 是 | 回调函数 | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | +| callback | AsyncCallback\<[DataBlob](#datablob) > | 是 | 回调函数。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | ### sign -sign(data : DataBlob) : Promise\ +sign(data: DataBlob): Promise\ -对数据进行签名,返回签名结果,promise方式 +对数据进行签名,通过promise方式返回签名结果。 **系统能力:** SystemCapability.Security.CryptoFramework @@ -2209,25 +2030,26 @@ sign(data : DataBlob) : Promise\ | 参数名 | 类型 | 必填 | 说明 | | ------ | -------- | ---- | ---------- | -| data | [DataBlob](#datablob) | 是 | 传入的消息 | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | **返回值:** -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | +| 401 | invalid parameters. | | 17620001 | memory error. | | 17620002 | runtime error. | | 17630001 | crypto operation error. | **callback示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { @@ -2243,8 +2065,8 @@ let globalKeyPair; let SignMessageBlob; let plan1 = "This is Sign test plan1"; // The first segment of data. let plan2 = "This is Sign test plan2"; // The second segment of fata. -let input1 = { data : stringToUint8Array(plan1) }; -let input2 = { data : stringToUint8Array(plan2) }; +let input1 = { data: stringToUint8Array(plan1) }; +let input2 = { data: stringToUint8Array(plan2) }; function signMessageCallback() { let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); @@ -2256,7 +2078,7 @@ function signMessageCallback() { signer.update(input1, function (err, data) { // add first segment of data signer.sign(input2, function (err, data) { // add second segment of data, sign input1 and input2 SignMessageBlob = data; - AlertDialog.show({message : "res" + SignMessageBlob.data}); + AlertDialog.show({message: "res" + SignMessageBlob.data}); }); }); }); @@ -2266,7 +2088,7 @@ function signMessageCallback() { **promise示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { @@ -2282,8 +2104,8 @@ let globalKeyPair; let SignMessageBlob; let plan1 = "This is Sign test plan1"; // The first segment of data. let plan2 = "This is Sign test plan2"; // The second segment of fata. -let input1 = { data : stringToUint8Array(plan1) }; -let input2 = { data : stringToUint8Array(plan2) }; +let input1 = { data: stringToUint8Array(plan1) }; +let input2 = { data: stringToUint8Array(plan2) }; function signMessagePromise() { let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); @@ -2300,386 +2122,1519 @@ function signMessagePromise() { }).then(dataBlob => { SignMessageBlob = dataBlob; console.info("sign output is " + SignMessageBlob.data); - AlertDialog.show({message : "output" + SignMessageBlob.data}); + AlertDialog.show({message: "output" + SignMessageBlob.data}); }); } ``` -## cryptoFramework.createVerify +### setSignSpec10+ + +setSignSpec(itemType: SignSpecItem, itemValue: number): void + +设置签名参数。常用的签名参数可以直接通过[createSign](#cryptoframeworkcreatesign) 来指定,剩余参数可以通过本接口指定。当前只支持RSA算法。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------------------- | ---- | ---------- | +| itemType | [SignSpecItem](#signspecitem10) | 是 | 用于指定需要设置的签名参数。 | +| itemValue | number | 是 | 用于指定签名参数的具体值。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let signer; // 此处省略生成Sign实例的过程 +let setN = 20; +signer.setSignSpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM, setN); +``` + +### getSignSpec10+ + +getSignSpec(itemType: SignSpecItem): string | number + +获取签名参数。当前只支持RSA算法。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ---------- | +| itemType | [SignSpecItem](#signspecitem) | 是 | 用于指定需要获取的签名参数。 | + +**返回值:** + +| 类型 | 说明 | +| -------------- | ----------- | +| string\|number | 获取的签名参数的具体值。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let signer; // 此处省略生成Sign实例的过程 +let saltLen = signer.getSignSpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM); +``` + +## cryptoFramework.createVerify + +createVerify(algName: string): Verify + +Verify实例生成。
支持的规格详见框架概述“[签名验签规格](../../security/cryptoFramework-overview.md#签名验签规格)”一节。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | ------------------------------------------------------------ | +| algName | string | 是 | 指定签名算法:RSA,ECC或DSA。使用RSA PKCS1模式时需要设置摘要,使用RSA PSS模式时需要设置摘要和掩码摘要。 | + +**返回值**: + +| 类型 | 说明 | +| ------ | ------------------------------------ | +| Verify | 返回由输入算法指定生成的Verify对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 80110+ | this operation is not supported. | +| 1762000110+ | memory error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let verifyer1 = cryptoFramework.createVerify("RSA1024|PKCS1|SHA256"); + +let verifyer2 = cryptoFramework.createVerify("RSA1024|PSS|SHA256|MGF1_SHA256") +``` + +## Verify + +Verify类,使用Verify方法之前需要创建该类的实例进行操作,通过createVerify(algName: string): Verify方法构造此实例。按序调用本类中的init、update、verify方法完成签名操作。验签操作的示例代码详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 + +Verify类不支持重复初始化,当业务方需要使用新密钥验签时,需要重新创建新Verify对象并调用init初始化。 + +业务方使用时,在createVerify时确定验签的模式,调用init接口设置密钥。 + +当被签名的消息较短时,可在init初始化后,(无需update)直接调用verify接口传入被签名的消息和签名(signatureData)进行验签。 + +当被签名的消息较长时,可通过update接口分段传入被签名的消息,最后调用verify接口对消息全文进行验签。verify接口的data入参支持传null,业务方可在循环中调用update接口,循环结束后调用verify传入签名(signatureData)进行验签。 + +### 属性 + +**系统能力:** SystemCapability.Security.CryptoFramework + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ---------------------------- | +| algName | string | 是 | 否 | 验签指定的算法名称。 | + +### init + +init(pubKey: PubKey, callback: AsyncCallback\): void + +传入公钥初始化Verify对象,Callback形式 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------------------- | ---- | ------------------------------ | +| pubKey | [PubKey](#pubkey) | 是 | 公钥对象,用于Verify的初始化。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +### init + +init(pubKey: PubKey): Promise\ + +传入公钥初始化Verify对象,Promise形式。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ---- | ---- | ---------------------------- | +| pubKey | [PubKey](#pubkey) | 是 | 公钥对象,用于Verify的初始化。 | + +**返回值:** + +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +### update + +update(data: DataBlob, callback: AsyncCallback\): void + +追加待验签数据,通过注册回调函数完成更新。
必须在对[Verify](#verify)实例使用[init()](#init-4)初始化后,才能使用本函数。 + +> **说明:** +> +> 根据数据量,可以不调用update(即[init](#init-4)完成后直接调用[verify](#verify-1))或多次调用update。
+> 算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的验签操作,采用多次update的方式传入数据,避免一次性申请过大内存。
+> 验签使用多次update操作的示例代码详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------- | ---- | ------------ | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +### update + +update(data: DataBlob): Promise\ + +追加待验签数据,通过Promise方式完成更新。
必须在对[Verify](#verify)实例使用[init()](#init-5)初始化后,才能使用本函数。 + +> **说明:** +> +> 根据数据量,可以不调用update(即[init](#init-5)完成后直接调用[verify](#verify-2))或多次调用update。
+> 算法库目前没有对update(单次或累计)的数据量设置大小限制,建议对于大数据量的验签操作,采用多次update的方式传入数据,避免一次性申请过大内存。
+> 验签使用多次update操作的示例代码详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ---------- | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | + +**返回值:** + +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +### verify + +verify(data: DataBlob, signatureData: DataBlob, callback: AsyncCallback\): void + +对数据进行验签,返回验签结果,callback方式。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------------- | -------------------- | ---- | ---------- | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | +| signatureData | [DataBlob](#datablob) | 是 | 签名数据。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +### verify + +verify(data: DataBlob, signatureData: DataBlob): Promise\ + +对数据进行验签,返回验签结果,promise方式。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------------- | -------- | ---- | ---------- | +| data | [DataBlob](#datablob) | 是 | 传入的消息。 | +| signatureData | [DataBlob](#datablob) | 是 | 签名数据。 | + +**返回值:** + +| 类型 | 说明 | +| ----------------- | ------------------------------ | +| Promise\ | 异步返回值,代表验签是否通过。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +**callback示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 +let input1 = null; +let input2 = null; +let signMessageBlob = null; // 签名后的数据,此处省略 +let verifyer = cryptoFramework.createVerify("RSA1024|PKCS1|SHA25"); +verifyer.init(globalKeyPair.pubKey, function (err, data) { + verifyer.update(input1, function(err, data) { + verifyer.verify(input2, signMessageBlob, function(err, data) { + console.info("verify result is " + data); + }) + }); +}) +``` + +**promise示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 +let verifyer = cryptoFramework.createVerify("RSA1024|PKCS1|SHA256"); +let verifyInitPromise = verifyer.init(globalKeyPair.pubKey); +let input1 = null; +let input2 = null; +let signMessageBlob = null; // 签名后的数据,此处省略 +verifyInitPromise.then(() => { + return verifyer.update(input1); +}).then(() => { + return verifyer.verify(input2, signMessageBlob); +}).then(res => { + console.log("Verify result is " + res); +}); +``` + +### setVerifySpec10+ + +setVerifySpec(itemType: SignSpecItem, itemValue: number): void + +设置验签参数。常用的签名参数可以直接通过[createVerify](#cryptoframeworkcreateverify) 来指定,剩余参数可以通过本接口指定。当前只支持RSA算法。 + +验签的参数应当与签名的参数保持一致。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------------------- | ---- | ---------- | +| itemType | [SignSpecItem](#signspecitem10) | 是 | 用于指定需要设置的验签参数。 | +| itemValue | number | 是 | 用于指定验签参数的具体值。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let verifyer; // 此处省略生成Verify实例的过程 +let setN = 20; +verifyer.setVerifySpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM, setN); +``` + +### getVerifySpec10+ + +getVerifySpec(itemType: SignSpecItem): string | number + +获取验签参数。当前只支持RSA算法。 + +验签的参数应当与签名的参数保持一致。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ---------- | +| itemType | [SignSpecItem](#signspecitem10) | 是 | 用于指定需要获取的验签参数。 | + +**返回值:** + +| 类型 | 说明 | +| -------------- | ----------- | +| string\|number | 获取的验签参数的具体值。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 801 | this operation is not supported. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let verifyer; // 此处省略生成Verify实例的过程 +let saltLen = verifyer.getSignSpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM); +``` + +## cryptoFramework.createKeyAgreement + +createKeyAgreement(algName: string): KeyAgreement + +KeyAgreement实例生成。
支持的规格详见框架概述“[密钥协商规格](../../security/cryptoFramework-overview.md#密钥协商规格)”一节。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | --------------------------------- | +| algName | string | 是 | 指定密钥协商算法:目前仅支持ECC。 | + +**返回值**: + +| 类型 | 说明 | +| ------------ | ------------------------------------------ | +| KeyAgreement | 返回由输入算法指定生成的KeyAgreement对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 80110+ | this operation is not supported. | +| 1762000110+ | memory error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let keyAgreement = cryptoFramework.createKeyAgreement("ECC256"); + +``` + +## KeyAgreement + +KeyAgreement类,使用密钥协商方法之前需要创建该类的实例进行操作,通过createKeyAgreement(algName: string): KeyAgreement方法构造此实例。 + +### 属性 + +**系统能力:** SystemCapability.Security.CryptoFramework + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ---------------------------- | +| algName | string | 是 | 否 | 密钥协商指定的算法名称。 | + +### generateSecret + +generateSecret(priKey: PriKey, pubKey: PubKey, callback: AsyncCallback\): void + +基于传入的私钥与公钥进行密钥协商,返回共享秘密,Callback形式。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------ | ---- | ---------------------- | +| priKey | [PriKey](#prikey) | 是 | 设置密钥协商的私钥输入。 | +| pubKey | [PubKey](#pubkey) | 是 | 设置密钥协商的公钥输入。 | +| callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 异步接受共享秘密的回调。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +### generateSecret + +generateSecret(priKey: PriKey, pubKey: PubKey): Promise\ + +基于传入的私钥与公钥进行密钥协商,返回共享秘密,Promise形式。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ---------------------- | +| priKey | [PriKey](#prikey) | 是 | 设置密钥协商的私钥输入。 | +| pubKey | [PubKey](#pubkey) | 是 | 设置密钥协商的公钥输入。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------ | -------- | +| Promise\<[DataBlob](#datablob)> | 共享秘密。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17620002 | runtime error. | +| 17630001 | crypto operation error. | + +**callback示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 +let keyAgreement = cryptoFramework.createKeyAgreement("ECC256"); +keyAgreement.generateSecret(globalKeyPair.priKey, globalKeyPair.pubKey, function (err, secret) { + if (err) { + console.error("keyAgreement error."); + return; + } + console.info("keyAgreement output is " + secret.data); +}); +``` + +**promise示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 +let keyAgreement = cryptoFramework.createKeyAgreement("ECC256"); +let keyAgreementPromise = keyAgreement.generateSecret(globalKeyPair.priKey, globalKeyPair.pubKey); +keyAgreementPromise.then((secret) => { + console.info("keyAgreement output is " + secret.data); +}).catch((error) => { + console.error("keyAgreement error."); +}); +``` + +## cryptoFramework.createMd + +createMd(algName: string): Md + +生成Md实例,用于进行消息摘要的计算与操作。
支持的规格详见框架概述“[MD消息摘要算法规格](../../security/cryptoFramework-overview.md#md消息摘要算法规格)”一节。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | ------------------------------------------------------------ | +| algName | string | 是 | 指定摘要算法,支持算法请参考“[MD算法支持范围](../../security/cryptoFramework-overview.md#md消息摘要算法规格)”一节。 | + +**返回值**: + +| 类型 | 说明 | +| ---- | --------------------------------------- | +| Md | 返回由输入算法指定生成的[Md](#md)对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ------------------ | +| 401 | invalid parameters. | +| 17620001 | memory error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var md; +try { + // 参数选择请参考上述算法支持范围 + md = cryptoFramework.createMd("SHA256"); +} catch (error) { + console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +} +``` + +## Md + +Md类,调用Md方法可以进行MD(Message Digest)摘要计算。调用前,需要通过[createMd](#cryptoframeworkcreatemd)构造Md实例。 + +### 属性 + +**系统能力:** SystemCapability.Security.CryptoFramework + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ---------------------- | +| algName | string | 是 | 否 | 代表指定的摘要算法名。 | + +### update + +update(input: DataBlob, callback: AsyncCallback\): void + +传入消息进行Md更新计算。 + +> **说明:** +> +> Md算法多次调用update更新的代码示例详见开发指导“[使用摘要操作](../../security/cryptoFramework-guidelines.md#使用摘要操作)”。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------- | ---- | ------------ | +| input | [DataBlob](#datablob) | 是 | 传入的消息。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var md; +try { + md = cryptoFramework.createMd("SHA256"); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Md algName is: " + md.algName); + +let blob; +md.update(blob, (err,) => { + if (err) { + console.error("[Callback] err: " + err.code); + } +}); +``` + +### update + +update(input: DataBlob): Promise\ + +传入消息进行Md更新计算。 + +> **说明:** +> +> Md算法多次调用update更新的代码示例详见开发指导“[使用摘要操作](../../security/cryptoFramework-guidelines.md#使用摘要操作)”。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ------------ | +| input | DataBlob | 是 | 传入的消息。 | + +**返回值:** + +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var md; +try { + md = cryptoFramework.createMd("SHA256"); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Md algName is: " + md.algName); + +let blob; +var promiseMdUpdate = md.update(blob); +promiseMdUpdate.then(() => { + // do something +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); +``` + +### digest + +digest(callback: AsyncCallback\): void + +返回Md的计算结果。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------ | ---- | ---------- | +| callback | AsyncCallback\ | 是 | 回调函数。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var md; +try { + md = cryptoFramework.createMd("SHA256"); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Md algName is: " + md.algName); + +let blob; +md.update(blob, (err,) => { + if (err) { + console.error("[Callback] err: " + err.code); + } + md.digest((err1, mdOutput) => { + if (err1) { + console.error("[Callback] err: " + err1.code); + } else { + console.error("[Callback]: MD result: " + mdOutput); + } + }); +}); +``` + +### digest + +digest(): Promise\ + +返回Md的计算结果。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**返回值:** + +| 类型 | 说明 | +| ------------------ | ----------- | +| Promise\<[DataBlob](#datablob)> | Promise对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var md; +try { + md = cryptoFramework.createMd("SHA256"); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Md algName is: " + md.algName); + +let blob; +var promiseMdUpdate = md.update(blob); +promiseMdUpdate.then(() => { + var PromiseMdDigest = md.digest(); + return PromiseMdDigest; +}).then(mdOutput => { + console.error("[Promise]: MD result: " + mdOutput.data); +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); +``` + +### getMdLength + +getMdLength(): number + +获取Md消息摘要长度(字节数)。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**返回值:** + +| 类型 | 说明 | +| ------ | -------------------------- | +| number | 返回md计算结果的字节长度。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 17630001 | crypto operation error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var md; +try { + md = cryptoFramework.createMd("SHA256"); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Md algName is: " + md.algName); + +let blob; +var promiseMdUpdate = md.update(blob); +promiseMdUpdate.then(() => { + var PromiseMdDigest = md.digest(); + return PromiseMdDigest; +}).then(mdOutput => { + console.error("[Promise]: MD result: " + mdOutput.data); + let mdLen = md.getMdLength(); + console.error("MD len: " + mdLen); +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); +``` + +## cryptoFramework.createMac + +createMac(algName: string): Mac + +生成Mac实例,用于进行消息认证码的计算与操作。
支持的规格详见框架概述“[HMAC消息认证码算法规格](../../security/cryptoFramework-overview.md#hmac消息认证码算法规格)”一节。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | ------------------------------------------------------------ | +| algName | string | 是 | 指定摘要算法,支持算法请参考“[HMAC算法支持范围](../../security/cryptoFramework-overview.md#hmac消息认证码算法规格)”一节。 | + +**返回值**: + +| 类型 | 说明 | +| ---- | ----------------------------------------- | +| Mac | 返回由输入算法指定生成的[Mac](#mac)对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ------------------ | +| 401 | invalid parameters. | +| 17620001 | memory error. | + +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var mac; +try { + // 参数选择请参考上述算法支持范围 + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +} +``` + +## Mac + +Mac类,调用Mac方法可以进行MAC(Message Authentication Code)加密计算。调用前,需要通过[createMac](#cryptoframeworkcreatemac)构造Mac实例。 -createVerify(algName : string) : Verify +### 属性 -Verify实例生成。
支持的规格详见框架概述“[签名验签规格](../../security/cryptoFramework-overview.md#签名验签规格)”一节。 +**系统能力:** SystemCapability.Security.CryptoFramework + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | ---------------------- | +| algName | string | 是 | 否 | 代表指定的摘要算法名。 | + +### init + +init(key: SymKey, callback: AsyncCallback\): void + +使用对称密钥初始化Mac计算。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| ------- | ------ | ---- | ------------------------------------------------------------ | -| algName | string | 是 | 指定签名算法:RSA或ECC,使用RSA PKCS1模式时需要设置摘要,使用RSA PSS模式时需要设置摘要和掩码摘要 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------------------- | ---- | -------------- | +| key | [SymKey](#symkey) | 是 | 共享对称密钥。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | -**返回值**: +**错误码:** -| 类型 | 说明 | -| ------ | ---------------------------------- | -| Verify | 返回由输入算法指定生成的Verify对象 | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17630001 | crypto operation error. | **示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -let verifyer1 = cryptoFramework.createVerify("RSA1024|PKCS1|SHA256"); - -let verifyer2 = cryptoFramework.createVerify("RSA1024|PSS|SHA256|MGF1_SHA256") +var mac; +try { + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +} +var KeyBlob; +var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); +symKeyGenerator.convertKey(KeyBlob, (err, symKey) => { + if (err) { + console.error("[Callback] err: " + err.code); + } + mac.init(symKey, (err1, ) => { + if (err1) { + console.error("[Callback] err: " + err1.code); + } + }); +}); ``` -## Verify +### init -Verify类,使用Verify方法之前需要创建该类的实例进行操作,通过createVerify(algName : string) : Verify方法构造此实例。 +init(key: SymKey): Promise\ -Verify类不支持重复初始化,当业务方需要使用新密钥验签时,需要重新创建新Verify对象并调用init初始化。 +使用对称密钥初始化Mac计算。 -业务方使用时,在createVerify时确定验签的模式,调用init接口设置密钥。 +**系统能力:** SystemCapability.Security.CryptoFramework -当签名数据较短时,可在init初始化后直接调用verify接口传入签名数据和原文进行验签。 +**参数:** -当签名数据较长时,可通过update接口分段传入签名数据,最后调用verify接口对整体签名数据进行验签。 +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ------------ | +| key | [SymKey](#symkey) | 是 | 共享对称密钥。 | -当使用update分段传入签名数据时,verify接口的签名数据支持传null,业务方可在循环中调用update接口,循环结束后调用verify传入原文进行验签。 +**返回值:** -### 属性 +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | -**系统能力:** SystemCapability.Security.CryptoFramework +**错误码:** -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ---------------------------- | -| algName | string | 是 | 否 | 验签指定的算法名称。 | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17630001 | crypto operation error. | +**示例:** +```js +import cryptoFramework from "@ohos.security.cryptoFramework" -### init +var mac; +try { + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Mac algName is: " + mac.algName); + +var KeyBlob; +var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); +var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); +promiseConvertKey.then(symKey => { + var promiseMacInit = mac.init(symKey); + return promiseMacInit; +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); -init(pubKey : PubKey, callback : AsyncCallback\) : void +``` -传入公钥初始化Verify对象,Callback形式 +### update + +update(input: DataBlob, callback: AsyncCallback\): void + +传入消息进行Mac更新计算。 + +> **说明:** +> +> Hmac算法多次调用update更新的代码示例详见开发指导“[使用消息认证码操作](../../security/cryptoFramework-guidelines.md#使用消息认证码操作)”。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------------------- | ---- | ---------------------------- | -| pubKey | [PubKey](#pubkey) | 是 | 公钥对象,用于Verify的初始化 | -| callback | AsyncCallback\ | 是 | 回调函数 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------- | ---- | ------------ | +| input | [DataBlob](#datablob) | 是 | 传入的消息。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | +| 401 | invalid parameters. | | 17630001 | crypto operation error. | -### init +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var KeyBlob; +var mac; +try { + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); +symKeyGenerator.convertKey(KeyBlob, (err, symKey) => { + if (err) { + console.error("[Callback] err: " + err.code); + } + mac.init(symKey, (err1, ) => { + if (err1) { + console.error("[Callback] err: " + err1.code); + } + let blob; + mac.update(blob, (err2, data) => { + if (err2) { + console.error("[Callback] err: " + err2.code); + } + }); + }); +}); +``` + +### update + +update(input: DataBlob): Promise\ -init(pubKey : PubKey) : Promise\ +传入消息进行Mac更新计算。 -传入公钥初始化Verify对象,Promise形式 +> **说明:** +> +> Hmac算法多次调用update更新的代码示例详见开发指导“[使用消息认证码操作](../../security/cryptoFramework-guidelines.md#使用消息认证码操作)”。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| ------ | ---- | ---- | ---------------------------- | -| pubKey | [PubKey](#pubkey) | 是 | 公钥对象,用于Verify的初始化 | +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ---------- | +| input | [DataBlob](#datablob) | 是 | 传入的消息。 | **返回值:** -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +| 类型 | 说明 | +| -------------- | ------------- | +| Promise\ | Promise对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | +| 401 | invalid parameters. | | 17630001 | crypto operation error. | -### update +**示例:** -update(data : DataBlob, callback : AsyncCallback\) : void +```js +import cryptoFramework from "@ohos.security.cryptoFramework" -追加待验签数据,callback方式 +var mac; +try { + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Mac algName is: " + mac.algName); -> **说明:** -> Verify多次调用update的代码示例详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 +var KeyBlob; +var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); +var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); +promiseConvertKey.then(symKey => { + var promiseMacInit = mac.init(symKey); + return promiseMacInit; +}).then(() => { + let blob; + var promiseMacUpdate = mac.update(blob); + return promiseMacUpdate; +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); + +``` + +### doFinal + +doFinal(callback: AsyncCallback\): void + +返回Mac的计算结果。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------------------- | ---- | ---------- | -| data | [DataBlob](#datablob)| 是 | 传入的消息 | -| callback | AsyncCallback\ | 是 | 回调函数 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------ | ---- | -------- | +| callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 回调函数。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | +| 17620001 | memory error. | | 17630001 | crypto operation error. | -### update +**示例:** -update(data : DataBlob) : Promise\; +```js +import cryptoFramework from "@ohos.security.cryptoFramework" -追加待验签数据,promise方式 +var KeyBlob; +var mac; +try { + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); +symKeyGenerator.convertKey(KeyBlob, (err, symKey) => { + if (err) { + console.error("[Callback] err: " + err.code); + } + mac.init(symKey, (err1, ) => { + if (err1) { + console.error("[Callback] err: " + err1.code); + } + let blob; + mac.update(blob, (err2, ) => { + if (err2) { + console.error("[Callback] err: " + err2.code); + } + mac.doFinal((err3, macOutput) => { + if (err3) { + console.error("[Callback] err: " + err3.code); + } else { + console.error("[Promise]: HMAC result: " + macOutput); + } + }); + }); + }); +}); +``` -> **说明:** -> Verify多次调用update的代码示例详见开发指导“[使用签名验签操作](../../security/cryptoFramework-guidelines.md#使用签名验签操作)”。 +### doFinal -**系统能力:** SystemCapability.Security.CryptoFramework +doFinal(): Promise\ -**参数:** +返回Mac的计算结果。 -| 参数名 | 类型 | 必填 | 说明 | -| ------ | -------- | ---- | ---------- | -| data | [DataBlob](#datablob) | 是 | 传入的消息 | +**系统能力:** SystemCapability.Security.CryptoFramework **返回值:** -| 类型 | 说明 | -| -------------- | ----------- | -| Promise\ | Promise对象 | +| 类型 | 说明 | +| ------------------ | ----------- | +| Promise\<[DataBlob](#datablob)> | Promise对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | +| 17620001 | memory error. | | 17630001 | crypto operation error. | -### verify +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var mac; +try { + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Mac algName is: " + mac.algName); + +var KeyBlob; +var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); +var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); +promiseConvertKey.then(symKey => { + var promiseMacInit = mac.init(symKey); + return promiseMacInit; +}).then(() => { + let blob; + var promiseMacUpdate = mac.update(blob); + return promiseMacUpdate; +}).then(() => { + var PromiseMacDoFinal = mac.doFinal(); + return PromiseMacDoFinal; +}).then(macOutput => { + console.error("[Promise]: HMAC result: " + macOutput.data); +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); +``` + +### getMacLength -verify(data : DataBlob, signatureData : DataBlob, callback : AsyncCallback\) : void +getMacLength(): number -对数据进行验签,返回验签结果,callback方式 +获取Mac消息认证码的长度(字节数)。 **系统能力:** SystemCapability.Security.CryptoFramework -**参数:** +**返回值:** -| 参数名 | 类型 | 必填 | 说明 | -| ------------- | -------------------- | ---- | ---------- | -| data | [DataBlob](#datablob) | 是 | 传入的消息 | -| signatureData | [DataBlob](#datablob) | 是 | 签名数据 | -| callback | AsyncCallback\ | 是 | 回调函数 | +| 类型 | 说明 | +| ------ | --------------------------- | +| number | 返回mac计算结果的字节长度。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | | 17630001 | crypto operation error. | -### verify +**示例:** -verify(data : DataBlob, signatureData : DataBlob) : Promise\ +```js +import cryptoFramework from "@ohos.security.cryptoFramework" -对数据进行验签,返回验签结果,promise方式 +var mac; +try { + mac = cryptoFramework.createMac("SHA256"); +} catch (error) { + console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); +} +console.error("Mac algName is: " + mac.algName); -**系统能力:** SystemCapability.Security.CryptoFramework +var KeyBlob; +var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); +var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); +promiseConvertKey.then(symKey => { + var promiseMacInit = mac.init(symKey); + return promiseMacInit; +}).then(() => { + let blob; + var promiseMacUpdate = mac.update(blob); + return promiseMacUpdate; +}).then(() => { + var PromiseMacDoFinal = mac.doFinal(); + return PromiseMacDoFinal; +}).then(macOutput => { + console.error("[Promise]: HMAC result: " + macOutput.data); + let macLen = mac.getMacLength(); + console.error("MAC len: " + macLen); +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); +``` -**参数:** +## cryptoFramework.createRandom -| 参数名 | 类型 | 必填 | 说明 | -| ------------- | -------- | ---- | ---------- | -| data | [DataBlob](#datablob) | 是 | 传入的消息 | -| signatureData | [DataBlob](#datablob) | 是 | 签名数据 | +createRandom(): Random -**返回值:** +生成Random实例,用于进行随机数的计算与设置种子。
支持的规格详见框架概述“[随机数算法规格](../../security/cryptoFramework-overview.md#随机数)”一节。 -| 类型 | 说明 | -| ----------------- | ---------------------------- | -| Promise\ | 异步返回值,代表验签是否通过 | +**系统能力:** SystemCapability.Security.CryptoFramework + +**返回值**: + +| 类型 | 说明 | +| ------ | ----------------------------------------------- | +| Random | 返回由输入算法指定生成的[Random](#random)对象。 | **错误码:** -| 错误码ID | 错误信息 | -| -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | -| 17630001 | crypto operation error. | +| 错误码ID | 错误信息 | +| -------- | ------------ | +| 17620001 | memory error. | -**callback示例:** +**示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 -let input1 = null; -let input2 = null; -let signMessageBlob = null; // 签名后的数据,此处省略 -let verifyer = cryptoFramework.createVerify("RSA1024|PKCS1|SHA25"); -verifyer.init(globalKeyPair.pubKey, function (err, data) { - verifyer.update(input1, function(err, data) { - verifyer.verify(input2, signMessageBlob, function(err, data) { - console.info("verify result is " + data); - }) - }); -}) +try { + var rand = cryptoFramework.createRandom(); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} ``` -**promise示例:** +## Random -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" +Random类,调用Random方法可以进行随机数计算。调用前,需要通过[createRandom](#cryptoframeworkcreaterandom)构造Random实例。 -let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 -let verifyer = cryptoFramework.createVerify("RSA1024|PKCS1|SHA256"); -let verifyInitPromise = verifyer.init(globalKeyPair.pubKey); -let input1 = null; -let input2 = null; -let signMessageBlob = null; // 签名后的数据,此处省略 -verifyInitPromise.then(() => { - return verifyer.update(input1); -}).then(() => { - return verifyer.verify(input2, signMessageBlob); -}).then(res => { - console.log("Verify result is " + res); -}); -``` +### 属性 -## cryptoFramework.createKeyAgreement +**系统能力:** SystemCapability.Security.CryptoFramework -createKeyAgreement(algName : string) : KeyAgreement +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------- | ------ | ---- | ---- | -------------------- | +| algName10+ | string | 是 | 否 | 代表当前使用的随机数生成算法,目前只支持“CTR_DRBG"。 | -KeyAgreement实例生成。
支持的规格详见框架概述“[密钥协商规格](../../security/cryptoFramework-overview.md#密钥协商规格)”一节。 +### generateRandom + +generateRandom(len: number, callback: AsyncCallback\): void + +异步生成指定长度的随机数。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| ------- | ------ | ---- | ------------------------------- | -| algName | string | 是 | 指定密钥协商算法:目前仅支持ECC | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------ | ---- | -------------------- | +| len | number | 是 | 表示生成随机数的长度,单位为byte,范围在[1, INT_MAX]。 | +| callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 回调函数。 | -**返回值**: +**错误码:** -| 类型 | 说明 | -| ------------ | ---------------------------------------- | -| KeyAgreement | 返回由输入算法指定生成的KeyAgreement对象 | +| 错误码ID | 错误信息 | +| -------- | ---------------------- | +| 401 | invalid parameters. | +| 17620001 | memory error. | +| 17630001 | crypto operation error. | **示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -let keyAgreement = cryptoFramework.createKeyAgreement("ECC256"); - +var rand; +try { + rand = cryptoFramework.createRandom(); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} +rand.generateRandom(12, (err, randData) => { + if (err) { + console.error("[Callback] err: " + err.code); + } else { + console.error("[Callback]: generate random result: " + randData.data); + } +}); ``` -## KeyAgreement +### generateRandom -KeyAgreement类,使用密钥协商方法之前需要创建该类的实例进行操作,通过createKeyAgreement(algName : string) : KeyAgreement方法构造此实例。 +generateRandom(len: number): Promise\ -### 属性 +异步生成指定长度的随机数。 **系统能力:** SystemCapability.Security.CryptoFramework -| 名称 | 类型 | 可读 | 可写 | 说明 | -| ------- | ------ | ---- | ---- | ---------------------------- | -| algName | string | 是 | 否 | 密钥协商指定的算法名称。 | - -### generateSecret - -generateSecret(priKey : PriKey, pubKey : PubKey, callback : AsyncCallback\) : void - -基于传入的私钥与公钥进行密钥协商,返回共享秘密,Callback形式 +**参数:** -**系统能力:** SystemCapability.Security.CryptoFramework +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ------------------------------------------------------ | +| len | number | 是 | 表示生成随机数的长度,单位为byte,范围在[1, INT_MAX]。 | -**参数:** +**返回值:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | ------------------------ | ---- | ---------------------- | -| priKey | [PriKey](#prikey) | 是 | 设置密钥协商的私钥输入 | -| pubKey | [PubKey](#pubkey) | 是 | 设置密钥协商的公钥输入 | -| callback | AsyncCallback\<[DataBlob](#datablob)> | 是 | 异步接受共享秘密的回调 | +| 类型 | 说明 | +| ------------------ | ----------- | +| Promise\<[DataBlob](#datablob)> | Promise对象。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | +| 401 | invalid parameters. | +| 17620001 | memory error. | | 17630001 | crypto operation error. | -### generateSecret +**示例:** + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +var rand; +try { + rand = cryptoFramework.createRandom(); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} + +var promiseGenerateRand = rand.generateRandom(12); +promiseGenerateRand.then(randData => { + console.error("[Promise]: rand result: " + randData.data); +}).catch(error => { + console.error("[Promise]: error: " + error.message); +}); +``` -generateSecret(priKey : PriKey, pubKey : PubKey) : Promise\ +### generateRandomSync10+ -基于传入的私钥与公钥进行密钥协商,返回共享秘密,Promise形式 +generateRandomSync(len: number): DataBlob + +以同步方法生成指定长度的随机数。 **系统能力:** SystemCapability.Security.CryptoFramework **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| ------ | ------ | ---- | ---------------------- | -| priKey | [PriKey](#prikey) | 是 | 设置密钥协商的私钥输入 | -| pubKey | [PubKey](#pubkey) | 是 | 设置密钥协商的公钥输入 | +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | -------------------- | +| len | number | 是 | 表示生成随机数的长度,单位为byte,范围在[1, INT_MAX]。 | **返回值:** -| 类型 | 说明 | -| ------------------ | -------- | -| Promise\<[DataBlob](#datablob)> | 共享秘密 | +| 类型 | 说明 | +| ------------------ | ----------- | +|[DataBlob](#datablob) | 表示生成的随机数。 | **错误码:** | 错误码ID | 错误信息 | | -------- | ---------------------- | -| 17620001 | memory error. | -| 17620002 | runtime error. | +| 401 | invalid parameters. | +| 17620001 | memory error. | | 17630001 | crypto operation error. | -**callback示例:** +**示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 -let keyAgreement = cryptoFramework.createKeyAgreement("ECC256"); -keyAgreement.generateSecret(globalKeyPair.priKey, globalKeyPair.pubKey, function (err, secret) { - if (err) { - console.error("keyAgreement error."); - return; +var rand; +try { + rand = cryptoFramework.createRandom(); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} + +try { + let randData = random.generateRandomSync(12); + if (randData != null) { + console.info("[Sync]: rand result: " + randData.data); + } else { + console.error("[Sync]: get rand result fail!"); } - console.info("keyAgreement output is " + secret.data); -}); +} catch (error) { + console.error("[Sync]: error: " + error.message); +} ``` -**promise示例:** +### setSeed + +setSeed(seed: DataBlob): void + +设置指定的种子。 + +**系统能力:** SystemCapability.Security.CryptoFramework + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | -------- | ---- | ------------ | +| seed | DataBlob | 是 | 设置的种子。 | + +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ----------------- | +| 17620001 | memory error. | + +**示例:** -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -let globalKeyPair; // globalKeyPair为使用非对称密钥生成器生成的非对称密钥对象,此处省略生成过程 -let keyAgreement = cryptoFramework.createKeyAgreement("ECC256"); -let keyAgreementPromise = keyAgreement.generateSecret(globalKeyPair.priKey, globalKeyPair.pubKey); -keyAgreementPromise.then((secret) => { - console.info("keyAgreement output is " + secret.data); -}).catch((error) => { - console.error("keyAgreement error."); +var rand; +try { + rand = cryptoFramework.createRandom(); +} catch (error) { + console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); +} + +rand.generateRandom(12, (err, randData) => { + if (err) { + console.error("[Callback] err: " + err.code); + } else { + console.error("[Callback]: generate random result: " + randData.data); + try { + rand.setSeed(randData); + } catch (error) { + console.log("setSeed failed, errCode: " + error.code + ", errMsg: " + error.message); + } + } }); -``` +``` \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-curve.md b/zh-cn/application-dev/reference/apis/js-apis-curve.md index 433c7e17adfeb2a33b13edbd477b5966138ed4c6..333e0779f286e16a054af0dc42a760fe9eae7566 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-curve.md +++ b/zh-cn/application-dev/reference/apis/js-apis-curve.md @@ -220,14 +220,12 @@ interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: | stiffness | number | 是 | 刚度。表示物体抵抗施加的力而形变的程度。刚度越大,抵抗变形的能力越强,恢复到平衡位置的速度越快。 | | damping | number | 是 | 阻尼。是一个纯数,无真实的物理意义,用于描述系统在受到扰动后震荡及衰减的情形。阻尼越大,弹性运动的震荡次数越少、震荡幅度越小。 | - **返回值:** | 类型 | 说明 | | ---------------------------------- | ---------------- | | [ICurve](#icurve)| 曲线的插值对象。 | - **示例:** ```ts @@ -235,6 +233,37 @@ import Curves from '@ohos.curves' Curves.interpolatingSpring(100, 1, 228, 30) // 创建一个时长由弹簧参数决定的弹簧插值曲线 ``` +## Curves.customCurve10+ + +customCurve(interpolate: (fraction: number) => number): ICurve + +构造自定义曲线对象。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----------- | ---------------------------- | ---- | ------------------------------------------------------------ | +| interpolate | (fraction: number) => number | 是 | 用户自定义的插值回调函数。
fraction为动画开始时的插值输入x值。取值范围:[0,1]
返回值为曲线的y值。取值范围:[0,1]
**说明:**
fraction等于0时,返回值为0对应动画起点,返回不为0,动画在起点处有跳变效果。
fraction等于1时,返回值为1对应动画终点,返回值不为1将导致动画的终值不是状态变量的值,出现大于或者小于状态变量值,再跳变到状态变量值的效果。 | + +**返回值:** + +| 类型 | 说明 | +| ----------------- | ---------------- | +| [ICurve](#icurve) | 曲线的插值对象。 | + +**示例:** + +```ts +import Curves from '@ohos.curves' +interpolate(fraction) { + return Math.sqrt(fraction); + } +Curves.customCurve(this.interpolate) // 创建一个用户自定义插值曲线 +``` + + ## ICurve diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-dataShare.md b/zh-cn/application-dev/reference/apis/js-apis-data-dataShare.md index d27fd96d514743ed0665e9bb40ecbfb0b1fb2e97..81efb644f5072a0c4a818d99111e2e76040eda66 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-dataShare.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-dataShare.md @@ -375,7 +375,7 @@ delTemplate(uri: string, subscriberId: string): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------| ---- | ------------------------- | -| uri | string | 是 | 指示要插入的数据的路径。 | +| uri | string | 是 | 指示要删除的数据的路径。 | | subscriberId | string | 是 | 订阅者ID,每个订阅者的ID是唯一的。 | **错误码:** @@ -558,7 +558,7 @@ let result: Array = dataShareHelper.off("publishedDat publish(data: Array<PublishedItem>, bundleName: string, version: number, callback: AsyncCallback<Array<OperationResult>>): void -发布数据,将数据数据更新至数据库。 +发布数据,将数据更新至数据库。 **系统能力:** SystemCapability.DistributedDataManager.DataShare.Consumer @@ -616,7 +616,7 @@ try { publish(data: Array<PublishedItem>, bundleName: string, callback: AsyncCallback<Array<OperationResult>>): void -发布数据,将数据数据更新至数据库。 +发布数据,将数据更新至数据库。 **系统能力:** SystemCapability.DistributedDataManager.DataShare.Consumer @@ -653,7 +653,7 @@ dataShareHelper.publish(data, "com.acts.ohos.data.datasharetest", publishCallbac publish(data: Array<PublishedItem>, bundleName: string, version?: number): Promise<Array<OperationResult>> -发布数据,将数据数据更新至数据库。 +发布数据,将数据更新至数据库。 **系统能力:** SystemCapability.DistributedDataManager.DataShare.Consumer diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md b/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md index 26c91c662fff32371bd2bb9d98054dcdc59e5dcb..98f4dc96148332589ea8ae3ca652df0f791d09ee 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md @@ -7,8 +7,7 @@ > **说明:** > > 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 -> -> 本模块接口为系统接口。 + ## 导入模块 @@ -58,6 +57,8 @@ notEqualTo(field: string, value: ValueType): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -88,6 +89,8 @@ beginWrap(): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **返回值:** @@ -116,6 +119,8 @@ endWrap(): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **返回值:** @@ -144,6 +149,8 @@ or(): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **返回值:** @@ -194,6 +201,8 @@ contains(field: string, value: string): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -224,6 +233,8 @@ beginsWith(field: string, value: string): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -254,6 +265,8 @@ endsWith(field: string, value: string): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -284,6 +297,8 @@ isNull(field: string): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -313,6 +328,8 @@ isNotNull(field: string): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -342,6 +359,8 @@ like(field: string, value: string): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -372,6 +391,8 @@ unlike(field: string, value: string): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -402,6 +423,8 @@ glob(field: string, value: string): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -432,6 +455,8 @@ between(field: string, low: ValueType, high: ValueType): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -463,6 +488,8 @@ notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -494,6 +521,8 @@ greaterThan(field: string, value: ValueType): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -524,6 +553,8 @@ lessThan(field: string, value: ValueType): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -554,6 +585,8 @@ greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -584,6 +617,8 @@ lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -672,6 +707,8 @@ distinct(): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **返回值:** @@ -725,6 +762,8 @@ groupBy(fields: Array<string>): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -754,6 +793,8 @@ indexedBy(field: string): DataSharePredicates 目前仅RDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -813,6 +854,8 @@ notIn(field: string, value: Array<ValueType>): DataSharePredicates 目前仅RDB及KVDB(schema)支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -843,6 +886,8 @@ prefixKey(prefix: string): DataSharePredicates 目前仅KVDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** @@ -872,6 +917,8 @@ inKeys(keys: Array<string>): DataSharePredicates 目前仅KVDB支持该谓词。 +**系统接口:** 此接口为系统接口。 + **系统能力:** SystemCapability.DistributedDataManager.DataShare.Core **参数:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-valuesBucket.md b/zh-cn/application-dev/reference/apis/js-apis-data-valuesBucket.md index 57c35da571b4ff8700f07423b2a4dafba65d928b..422e9a5ac931cbfb34aae6a582bab357156d96a6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-valuesBucket.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-valuesBucket.md @@ -5,8 +5,6 @@ > **说明:** > > 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 -> -> 本模块接口为系统接口。 ## 导入模块 diff --git a/zh-cn/application-dev/reference/apis/js-apis-display.md b/zh-cn/application-dev/reference/apis/js-apis-display.md index db7ab01ce6978bf0a8d49cf115a07ac5f4cd2f39..394f809d452f043f31a469954d2bcf5508f8d2c3 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-display.md +++ b/zh-cn/application-dev/reference/apis/js-apis-display.md @@ -507,7 +507,7 @@ getCutoutInfo(callback: AsyncCallback<CutoutInfo>): void | 参数名 | 类型 | 必填 | 说明 | | ----------- | --------------------------- | ---- | ------------------------------------------------------------ | -| callback | AsyncCallback<[CutoutInfo](#cutoutinfo9)> | 是 | 回调函数。返回描述不可用屏幕区域的CutoutInfo对象。。 | +| callback | AsyncCallback<[CutoutInfo](#cutoutinfo9)> | 是 | 回调函数。返回描述不可用屏幕区域的CutoutInfo对象。 | **错误码:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributedMissionManager.md b/zh-cn/application-dev/reference/apis/js-apis-distributedMissionManager.md index c5f817c83f7f8940ceca599bffde8e812c356d3c..51000aff51856c265eff8d7c1c3d1e99d3a8b873 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-distributedMissionManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributedMissionManager.md @@ -368,8 +368,8 @@ continueMission(parameter: ContinueDeviceInfo, options: ContinueCallback, callba | 参数名 | 类型 | 必填 | 说明 | | --------- | --------------------------------------- | ---- | ----- | -| parameter | [ContinueDeviceInfo](#js-apis-inner-application-continueDeviceInfo.md) | 是 | 迁移信息。 | -| options | [ContinueCallback](#js-apis-inner-application-continueCallback.md) | 是 | 迁移任务完成回调函数。 | +| parameter | [ContinueDeviceInfo](js-apis-inner-application-continueDeviceInfo.md) | 是 | 迁移信息。 | +| options | [ContinueCallback](js-apis-inner-application-continueCallback.md) | 是 | 迁移任务完成回调函数。 | | callback | AsyncCallback<void> | 是 | 执行结果回调函数。 | **错误码:** @@ -426,8 +426,8 @@ continueMission(parameter: ContinueDeviceInfo, options: ContinueCallback): Promi | 参数名 | 类型 | 必填 | 说明 | | --------- | --------------------------------------- | ---- | ----- | -| parameter | [ContinueDeviceInfo](#js-apis-inner-application-continueDeviceInfo.md) | 是 | 迁移信息。 | -| options | [ContinueCallback](#js-apis-inner-application-continueCallback.md) | 是 | 迁移任务完成回调函数。 | +| parameter | [ContinueDeviceInfo](js-apis-inner-application-continueDeviceInfo.md) | 是 | 迁移信息。 | +| options | [ContinueCallback](js-apis-inner-application-continueCallback.md) | 是 | 迁移任务完成回调函数。 | **返回值:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-enterprise-deviceSetings.md b/zh-cn/application-dev/reference/apis/js-apis-enterprise-deviceSetings.md new file mode 100644 index 0000000000000000000000000000000000000000..ce136117b5af43da22f4a8c6e08cbf54bda9a97c --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-enterprise-deviceSetings.md @@ -0,0 +1,104 @@ +# @ohos.enterprise.deviceSettings(设备设置管理) + +本模块提供企业设备设置能力,包括获取设备息屏时间等。仅企业设备管理员应用才能调用。 + +> **说明:** +> +> 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 + +## 导入模块 + +```js +import deviceSettings from '@ohos.enterprise.deviceSettings'; +``` + +## deviceSettings.getScreenOffTime + +getScreenOffTime(admin: Want, callback: AsyncCallback<number>): void + +指定设备管理员应用获取设备息屏时间,使用callback形式返回设备息屏时间。 + +**需要权限:** ohos.permission.ENTERPRISE_GET_SETTINGS + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | ------------------------------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| callback | AsyncCallback<number> | 是 | 回调函数。当接口调用成功,err为null,data为设备息屏时间,否则err为错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +deviceSettings.getScreenOffTime(wantTemp, (error, result) => { + if (error != null) { + console.log("error code:" + error.code + " error message:" + error.message); + return; + } + console.log(result); +}); +``` + +## deviceSettings.getScreenOffTime + +getScreenOffTime(admin: Want): Promise<number> + +指定设备管理员应用获取设备息屏时间,使用Promise形式返回设备息屏时间。 + +**需要权限:** ohos.permission.ENTERPRISE_GET_SETTINGS + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ------------------------- | +| Promise<number> | Promise对象,返回设备息屏时间。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +deviceSettings.getScreenOffTime(wantTemp).then((result) => { + console.log(result); +}).catch(error => { + console.log("error code:" + error.code + " error message:" + error.message); +}); +``` \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-http.md b/zh-cn/application-dev/reference/apis/js-apis-http.md index 4bc54062e32b39670e736b6be7c7727136b0ec88..24f1fef12a8704011f62cb5db03d44435fe2b588 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-http.md +++ b/zh-cn/application-dev/reference/apis/js-apis-http.md @@ -721,6 +721,9 @@ on(type: 'dataReceive', callback: Callback\): void 订阅HTTP流式响应数据接收事件。 +> **说明:** +> 暂不支持订阅HTTP流式数据上传的相关事件。 + **系统能力**:SystemCapability.Communication.NetStack **参数:** @@ -768,6 +771,9 @@ on(type: 'dataEnd', callback: Callback\): void 订阅HTTP流式响应数据接收完毕事件。 +> **说明:** +> 暂不支持订阅HTTP流式数据上传的相关事件。 + **系统能力**:SystemCapability.Communication.NetStack **参数:** @@ -815,6 +821,9 @@ on(type: 'dataProgress', callback: Callback\<{ receiveSize: number, totalSize: n 订阅HTTP流式响应数据接收进度事件。 +> **说明:** +> 暂不支持订阅HTTP流式数据上传的相关事件。 + **系统能力**:SystemCapability.Communication.NetStack **参数:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-huks.md b/zh-cn/application-dev/reference/apis/js-apis-huks.md index 1d635863fe726fcf66c322bc50979a48bd73dc78..597cb94a09798cea857bdb77e2a57833d1adfed5 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-huks.md +++ b/zh-cn/application-dev/reference/apis/js-apis-huks.md @@ -2260,10 +2260,10 @@ async function huksAbort() { | 名称 | 值 | 说明 | | -------------------------------------------- | ---- | ------------------------------ | -| HUKS_STORAGE_TEMP | 0 | 表示通过本地直接管理密钥。 | -| HUKS_STORAGE_PERSISTENT | 1 | 表示通过HUKS service管理密钥。 | -| HUKS_STORAGE_ONLY_USED_IN_HUKS10+ | 2 | 表示密钥只存储在huks中。 | -| HUKS_STORAGE_KEY_EXPORT_ALLOWED10+ | 3 | 表示密钥从huks中导出,不存储。 | +| HUKS_STORAGE_TEMP(deprecated) | 0 | 表示通过本地直接管理密钥。
> **说明:** 从API version 10开始废弃,由于开发者正常使用密钥管理过程中并不需要使用此TAG,故无替代接口。针对针对密钥派生场景,可使用HUKS_STORAGE_ONLY_USED_IN_HUKS 与 HUKS_STORAGE_KEY_EXPORT_ALLOWED。 | +| HUKS_STORAGE_PERSISTENT(deprecated) | 1 | 表示通过HUKS service管理密钥。
> **说明:** 从API version 10开始废弃,由于开发者正常使用密钥管理过程中并不需要使用此TAG,故无替代接口。针对密钥派生场景,可使用HUKS_STORAGE_ONLY_USED_IN_HUKS 与 HUKS_STORAGE_KEY_EXPORT_ALLOWED。 | +| HUKS_STORAGE_ONLY_USED_IN_HUKS10+ | 2 | 表示主密钥派生的密钥存储于huks中,由HUKS进行托管 | +| HUKS_STORAGE_KEY_EXPORT_ALLOWED10+ | 3 | 表示主密钥派生的密钥直接导出给业务方,HUKS不对其进行托管服务 | ## HuksSendType diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-commonEvent-commonEventSubscribeInfo.md b/zh-cn/application-dev/reference/apis/js-apis-inner-commonEvent-commonEventSubscribeInfo.md index 1637fecf93afcdebf68884bbcd05539914258af0..7d9f8bdc5355badcd217208a89796f8593e8d807 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-commonEvent-commonEventSubscribeInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-commonEvent-commonEventSubscribeInfo.md @@ -8,7 +8,7 @@ | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ | -| events | Array\ | 是 | 否 | 表示要发送的公共事件。 | +| events | Array\ | 是 | 否 | 表示要订阅的公共事件。 | | publisherPermission | string | 是 | 否 | 表示发布者的权限。 | | publisherDeviceId | string | 是 | 否 | 表示设备ID,该值必须是同一ohos网络上的现有设备ID。 | | userId | number | 是 | 否 | 表示用户ID。此参数是可选的,默认值当前用户的ID。如果指定了此参数,则该值必须是系统中现有的用户ID。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-logs.md b/zh-cn/application-dev/reference/apis/js-apis-logs.md index 9282f0f4ffc6ec5389acf205131f26ab9850e3ca..c1d20b17e02d0b7e610d71fc6080fa145fbae044 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-logs.md +++ b/zh-cn/application-dev/reference/apis/js-apis-logs.md @@ -12,6 +12,8 @@ debug(message: string, ...arguments: any[]): void 以格式化输出方式打印调试信息。 +从API version 9开始,该接口支持在ArkTS卡片中使用。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **参数:** @@ -39,6 +41,8 @@ log(message: string, ...arguments: any[]): void 以格式化输出方式打印日志信息。 +从API version 9开始,该接口支持在ArkTS卡片中使用。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **参数:** @@ -66,6 +70,8 @@ info(message: string, ...arguments: any[]): void 以格式化输出方式打印日志信息。(console.log()的别名)。 +从API version 9开始,该接口支持在ArkTS卡片中使用。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **参数:** @@ -93,6 +99,8 @@ warn(message: string, ...arguments: any[]): void 以格式化输出方式打印警告信息。 +从API version 9开始,该接口支持在ArkTS卡片中使用。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **参数:** @@ -120,6 +128,8 @@ error(message: string, ...arguments: any[]): void 以格式化输出方式打印错误信息。 +从API version 9开始,该接口支持在ArkTS卡片中使用。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **参数:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md b/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md index 44a24be4f6bed086ce2a089b45b752f3b537035d..3f78f1ce07e9331ed1a7d2c8bfbb5930b1061071 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md +++ b/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md @@ -6,7 +6,7 @@ > > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 > -> 该模块不支持在[UIAbility](./js-apis-app-ability-uiAbility.md)中使用。 +> 该模块不支持在[UIAbility](./js-apis-app-ability-uiAbility.md)中使用,需要在创建组件实例后使用。 ## 导入模块 diff --git a/zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md b/zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md new file mode 100644 index 0000000000000000000000000000000000000000..c6aa3395934e2e5748cb29dcbab16667a3e6ef4a --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md @@ -0,0 +1,609 @@ +# @ohos.ai.mindSporeLite (推理能力) + +MindSpore Lite是一款AI引擎,它提供了面向不同硬件设备AI模型推理的功能,目前已经在图像分类、目标识别、人脸识别、文字识别等应用中广泛使用。 +本模块介绍了MindSpore Lite推理引擎支持模型推理的相关能力。 + +> **说明:** +> +> 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。示例代码使用模型均为MindSpore端侧模型。 +> + +## 导入模块 +```js +import mindSporeLite from '@ohos.ai.mindSporeLite'; +``` + +## Context + +定义运行环境的配置信息。 + +### 属性 + +**系统能力:** SystemCapability.AI.MindSporeLite + + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ------ | ------------------------- | ---- | ---- | ------------------------------------------------------------ | +| target | string[] | 是 | 是 | 配置目标后端。可选'cpu','nnrt',默认'cpu'。 | +| cpu | [CpuDevice](#cpudevice) | 是 | 是 | CPU后端设备选项。只有当target包含'cpu'时,才能设置此属性。默认值为CpuDevice各属性默认值。 | +| nnrt | [NNRTDevice](#nnrtdevice) | 是 | 是 | NNRT后端设备选项。只有当target包含'nnrt'时,才能设置此属性,当前属性为空。 | + +**示例:** + +```js +let context = {} as any; +context.target = ['cpu','nnrt']; +``` + +## CpuDevice + +CPU后端设备选项。 + +### 属性 + +**系统能力:** SystemCapability.AI.MindSporeLite + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ---------------------- | ----------------------------------------- | ---- | ---- | ------------------------------------------------------------ | +| threadNum | number | 是 | 是 | 设置运行时的线程数,默认值:2。 | +| threadAffinityMode | [ThreadAffinityMode](#threadaffinitymode) | 是 | 是 | 设置运行时的CPU绑核策略模式,默认值为不绑核:mindSporeLite.ThreadAffinityMode.NO_AFFINITIES。 | +| threadAffinityCoreList | number[] | 是 | 是 | 设置运行时的CPU绑核列表,设置绑核策略模式后使能,当绑核策略模式为mindSporeLite.ThreadAffinityMode.NO_AFFINITIES时,绑核列表为空。列表中的数字代表核的序号。默认值:[]。 | +| precisionMode | string | 是 | 是 | 设置是否使能**Float16推理模式**,设置为'preferred_fp16'代表使能半精度推理,其余设置情况均为不支持,默认设置'enforce_fp32'表示不使能半精度推理。 | + +**Float16推理模式**: Float16又称半精度,它使用16比特表示一个数。Float16推理模式表示推理的时候用半精度进行推理。 + +**示例:** + +```js +let context = {} as any; +context.target = ['cpu']; +context.cpu.threadAffinityMode = 0; +context.cpu.precisionMode = 'preferred_fp16'; +context.cpu.threadAffinityCoreList = [0, 1, 2]; +``` + +## NNRTDevice + +Neural Network Runtime表示神经网络运行时,简称NNRt。作为中间桥梁,连通上层 AI 推理框架和底层加速芯片,实现 AI 模型的跨芯片推理计算。MindSpore Lite 可配置NNRt后端。当前暂未支持。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +## ThreadAffinityMode + +设置运行时的CPU绑核策略模式,有效值为0-2,0为默认不绑核,1为绑大核,2为绑中核。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +| 名称 | 值 | 说明 | +| ------------------ | ---- | ------------ | +| NO_AFFINITIES | 0 | 不绑核。 | +| BIG_CORES_FIRST | 1 | 绑大核优先。 | +| LITTLE_CORES_FIRST | 2 | 绑中核优先。 | + +## mindSporeLite.loadModelFromFile + +loadModelFromFile(model: string, callback: Callback<Model>): void + +从完整路径加载输入模型用于推理。使用callback异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------- | ---- | ------------------------ | +| model | string | 是 | 模型的完整输入路径。 | +| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | + +**示例:** + +```js +let model_file = '/path/to/xxx.ms'; +mindSporeLite.loadModelFromFile(model_file, (result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); +}) +``` +## mindSporeLite.loadModelFromFile + +loadModelFromFile(model: string, context: Context, callback: Callback<Model>): void + +从完整路径加载输入模型用于推理。使用callback异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------------------- | ---- | ---------------------- | +| model | string | 是 | 模型的完整输入路径。 | +| context | [Context](#context) | 是 | 运行环境的配置信息。 | +| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | + +**示例:** + +```js +let context = { + 'target': ['cpu'] +}; +let model_file = '/path/to/xxx.ms'; +mindSporeLite.loadModelFromFile(model_file, context, (result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); +}) +``` +## mindSporeLite.loadModelFromFile + +loadModelFromFile(model: string, context?: Context): Promise<Model> + +从完整路径加载输入模型用于推理。使用Promise异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------- | ---- | -------------------- | +| model | string | 是 | 模型的完整输入路径。 | +| context | [Context](#context) | 否 | 运行环境的配置信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------------- | ---------------------------- | +| Promise<[Model](#model)> | Promise对象。返回Model对象。 | + +**示例:** + +```js +let model_file = '/path/to/xxx.ms'; +mindSporeLite.loadModelFromFile(model_file).then((result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); +}) +``` +## mindSporeLite.loadModelFromBuffer + +loadModelFromBuffer(model: ArrayBuffer, callback: Callback<Model>): void + +从内存加载输入模型用于推理。使用callback异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------- | ---- | ------------------------ | +| model | ArrayBuffer | 是 | 包含模型的内存。 | +| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | + +**示例:** + +```js +import resourceManager from '@ohos.resourceManager' +@State modelName: string = 'xxx.ms'; +context.resourceManager.getRawFileContent(this.modelName).then((error,buffer) => { + this.modelBuffer = buffer; +}).catch(error) { + console.error('Failed to get buffer, error code: ${error.code},message:${error.message}.'); +} +mindSporeLite.loadModelFromBuffer(this.modelBuffer.buffer, (result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); +}) +``` +## mindSporeLite.loadModelFromBuffer + +loadModelFromBuffer(model: ArrayBuffer, context: Context, callback: Callback<Model>): void + +从内存加载输入模型用于推理。使用callback异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------------------- | ---- | ---------------------- | +| model | ArrayBuffer | 是 | 包含模型的内存。 | +| context | [Context](#context) | 是 | 运行环境的配置信息。 | +| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | + +**示例:** + +```js +import resourceManager from '@ohos.resourceManager' +@State modelName: string = 'xxx.ms'; +context.resourceManager.getRawFileContent(this.modelName).then((error,buffer) => { + this.modelBuffer = buffer; +}).catch(error) { + console.error('Failed to get buffer, error code: ${error.code},message:${error.message}.'); +} +let context = {'target': ['cpu']}; +mindSporeLite.loadModelFromBuffer(this.modelBuffer.buffer, context, (result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); +}) +``` +## mindSporeLite.loadModelFromBuffer + +loadModelFromBuffer(model: ArrayBuffer, context?: Context): Promise<Model> + +从内存加载输入模型用于推理。使用Promise异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------- | ---- | -------------------- | +| model | ArrayBuffer | 是 | 包含模型的内存。 | +| context | [Context](#context) | 否 | 运行环境的配置信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------------------- | ---------------------------- | +| Promise<[Model](#model)> | Promise对象。返回Model对象。 | + +**示例:** + +```js +import resourceManager from '@ohos.resourceManager' +@State modelName: string = 'xxx.ms'; +context.resourceManager.getRawFileContent(this.modelName).then((error,buffer) => { + this.modelBuffer = buffer; +}).catch(error) { + console.error('Failed to get buffer, error code: ${error.code},message:${error.message}.'); +} +mindSporeLite.loadModelFromBuffer(model_file).then((result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); +}) +``` +## mindSporeLite.loadModelFromFd + +loadModelFromFd(model: number, callback: Callback<Model>): void + +从文件描述符加载输入模型用于推理。使用callback异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------------------- | ---- | ---------------------- | +| model | number | 是 | 模型的文件描述符。 | +| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | + +**示例:** + +```js +import fs from '@ohos.file.fs'; +let model_file = '/path/to/xxx.ms'; +fs.open(model_file, 0, async function(err, file) { + mindSporeLite.loadModelFromFd(file.fd, (result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); + }) +}) +``` +## mindSporeLite.loadModelFromFd + +loadModelFromFd(model: number, context: Context, callback: Callback<Model>): void + +从文件描述符加载输入模型用于推理。使用callback异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------------------- | ---- | ---------------------- | +| model | number | 是 | 模型的文件描述符。 | +| context | [Context](#context) | 是 | 运行环境的配置信息。 | +| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | + +**示例:** + +```js +import fs from '@ohos.file.fs'; +let model_file = '/path/to/xxx.ms'; +let context = {'target': ['cpu']}; +fs.open(model_file, 0, async function(err, file) { + mindSporeLite.loadModelFromFd(file.fd, context, (result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); + }) +}) +``` +## mindSporeLite.loadModelFromFd + +loadModelFromFd(model: number, context?: Context): Promise< Model> + +从文件描述符加载输入模型用于推理。使用Promise异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------- | ---- | -------------------- | +| model | number | 是 | 模型的文件描述符。 | +| context | [Context](#context) | 否 | 运行环境的配置信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------------- | ---------------------------- | +| Promise<[Model](#model)> | Promise对象。返回Model对象。 | + +**示例:** + +```js +import fs from '@ohos.file.fs'; +let model_file = '/path/to/xxx.ms'; +fs.open(model_file, 0, async function(err, file) { + let mindSporeLiteModel = await mindSporeLite.loadModelFromFd(file.fd); + mindSporeLite.loadModelFromFd(file.fd).then((result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); + }) +}) +``` +## Model + +模型实例。描述Model对象的属性和方法。 + +下例API示例中都需先使用[loadModelFromFile()](#mindsporeliteloadmodelfromfile)、[loadModelFromBuffer()](#mindsporeliteloadmodelfrombuffer)、[loadModelFromFd()](#mindsporeliteloadmodelfromfd)中的任一方法获取到Model实例,再通过此实例调用对应方法。 + +### getInputs + +getInputs(): MSTensor[] + +获取模型的输入用于推理。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**返回值:** + +| 类型 | 说明 | +| ----------------------- | ------------------ | +| [MSTensor](#mstensor)[] | 返回MSTensor对象。 | + +**示例:** + +```js +let model_file = '/path/to/xxx.ms'; +mindSporeLite.loadModelFromFile(model_file).then((result) => { + const modelInputs = result.getInputs(); + console.log(modelInputs[0].name); +}) +``` +### predict + +predict(inputs: MSTensor[], callback: Callback<Model>): void + +执行推理模型。使用callback异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ----------------------- | ---- | -------------------------- | +| inputs | [MSTensor](#mstensor)[] | 是 | 模型的输入。MSTensor对象。 | +| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | + +**示例:** + +```js +import resourceManager from '@ohos.resourceManager' +@State inputName: string = 'input_data.bin'; +context.resourceManager.getRawFileContent(this.inputName).then((error,buffer) => { + this.inputBuffer = buffer; + let model_file = '/path/to/xxx.ms'; + let mindSporeLiteModel = await mindSporeLite.loadModelFromFile(model_file); + const modelInputs = mindSporeLiteModel.getInputs(); + modelInputs[0].setData(this.inputBuffer.buffer); + result.predict(modelInputs, (result) => { + let output = new Float32Array(result[0].getData()); + for (let i = 0; i < output.length; i++) { + console.log(output[i].toString()); + } + }) +}) +``` +### predict + +predict(inputs: MSTensor[]): Promise<MSTensor[]> + +执行推理模型。使用Promise异步回调。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ----------------------- | ---- | -------------------------- | +| inputs | [MSTensor](#mstensor)[] | 是 | 模型的输入。MSTensor对象。 | + +**返回值:** + +| 类型 | 说明 | +| ----------------------- | ------------------ | +| [MSTensor](#mstensor)[] | 返回MSTensor对象。 | + +**示例:** + +```js +import resourceManager from '@ohos.resourceManager' +@State inputName: string = 'input_data.bin'; +context.resourceManager.getRawFileContent(this.inputName).then((error,buffer) => { + this.inputBuffer = buffer; + let model_file = '/path/to/xxx.ms'; + let mindSporeLiteModel = await mindSporeLite.loadModelFromFile(model_file); + const modelInputs = mindSporeLiteModel.getInputs(); + modelInputs[0].setData(this.inputBuffer.buffer); + result.predict(modelInputs).then((result) => { + let output = new Float32Array(result[0].getData()); + for (let i = 0; i < output.length; i++) { + console.log(output[i].toString()); + } + }) +}) +``` + +### resize + +resize(inputs: MSTensor[], dims: Array<Array<number>>): boolean + +重新设置张量大小。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | --------------------- | ---- | ----------------------------- | +| inputs | [MSTensor](#mstensor)[] | 是 | 模型的输入。 | +| dims | Array<Array<number>> | 是 | 需要修改的目标张量大小。 | + +**返回值:** + +| 类型 | 说明 | +| ------- | ------------------------------------------------------------ | +| boolean | 返回是否设置成功的结果。true表示重新设置张量大小成功;false表示重新设置张量大小失败。 | + +**示例:** + +```js +let model_file = '/path/to/xxx.ms'; +let mindSporeLiteModel = await mindSporeLite.loadModelFromFile(model_file); +const modelInputs = mindSporeLiteModel.getInputs(); +let new_dim = new Array([1,32,32,1]); +mindSporeLiteModel.resize(modelInputs, new_dim); +``` + +## MSTensor + +模型张量实例。描述MSTensor对象的属性和方法。它与数组和矩阵非常相似,是MindSpore Lite网络运算中的基本数据结构。 + +下例API示例中都需先使用[getInputs()](#getinputs)获取到MSTensor实例,再通过此实例调用对应方法。 + +### 属性 + +**系统能力:** SystemCapability.AI.MindSporeLite + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| ---------- | --------------------- | ---- | ---- | ---------------------------------------------------- | +| name | string | 是 | 是 | 张量的名称。默认为null | +| shape | number[] | 是 | 是 | 张量的维度数组。默认为0。 | +| elementNum | number | 是 | 是 | 张量的维度数组的长度。默认为0。 | +| dataSize | number | 是 | 是 | 张量的数据的长度。默认为0。 | +| dtype | [DataType](#datatype) | 是 | 是 | 张量的数据类型。默认值为0,代表TYPE_UNKNOWN。 | +| format | [Format](#format) | 是 | 是 | 张量的数据排布方式。默认值为-1,代表DEFAULT_FORMAT。 | + +**示例:** + +```js +let model_file = '/path/to/xxx.ms'; +let mindSporeLiteModel = await mindSporeLite.loadModelFromFile(model_file); +const modelInputs = mindSporeLiteModel.getInputs(); +console.log(modelInputs[0].name); +console.log(modelInputs[0].shape.toString()); +console.log(modelInputs[0].elementNum.toString()); +console.log(modelInputs[0].dtype.toString()); +console.log(modelInputs[0].format.toString()); +console.log(modelInputs[0].dataSize.toString()); +``` + +### getData + +getData(): ArrayBuffer + +获取张量的数据。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**返回值:** + +| 类型 | 说明 | +| ----------- | -------------------- | +| ArrayBuffer | 返回张量的数据指针。 | + +**示例:** + +```js +//如果已经获取了输出张量 +result.predict(modelInputs, (result) => { + let output = new Float32Array(result[0].getData()); + for (let i = 0; i < output.length; i++) { + console.log(output[i].toString()); + } +}) +``` + +### setData + +setData(inputArray: ArrayBuffer): void + +设置张量的数据。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ----------- | ---- | ---------------------- | +| inputArray | ArrayBuffer | 是 | 张量的输入数据缓冲区。 | + +**示例:** + +```js +import resourceManager from '@ohos.resourceManager' +@State inputName: string = 'input_data.bin'; +context.resourceManager.getRawFileContent(this.inputName).then((error,buffer) => { + this.inputBuffer = buffer; +}) +let model_file = '/path/to/xxx.ms'; +let mindSporeLiteModel = await mindSporeLite.loadModelFromFile(model_file); +const modelInputs = mindSporeLiteModel.getInputs(); +modelInputs[0].setData(this.inputBuffer.buffer); +``` + +## DataType + +张量的数据类型。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +| 名称 | 值 | 说明 | +| ------------------- | ---- | ------------------- | +| TYPE_UNKNOWN | 0 | 未知类型。 | +| NUMBER_TYPE_INT8 | 32 | 保持Int8的类型。 | +| NUMBER_TYPE_INT16 | 33 | 保持Int16的类型。 | +| NUMBER_TYPE_INT32 | 34 | 保持Int32的类型。 | +| NUMBER_TYPE_INT64 | 35 | 保持Int64的类型。 | +| NUMBER_TYPE_UINT8 | 37 | 保持UInt8的类型。 | +| NUMBER_TYPE_UINT16 | 38 | 保持UInt16的类型。 | +| NUMBER_TYPE_UINT32 | 39 | 保持UInt32的类型。 | +| NUMBER_TYPE_UINT64 | 40 | 保持UInt64的类型。 | +| NUMBER_TYPE_FLOAT16 | 42 | 保持Float16的类型。 | +| NUMBER_TYPE_FLOAT32 | 43 | 保持Float32的类型。 | +| NUMBER_TYPE_FLOAT64 | 44 | 保持Float64的类型。 | + +## Format + +张量的数据排布方式。 + +**系统能力:** SystemCapability.AI.MindSporeLite + +| 名称 | 值 | 说明 | +| -------------- | ---- | --------------------- | +| DEFAULT_FORMAT | -1 | 未知数据排布方式。 | +| NCHW | 0 | 数据排布方式为NCHW。 | +| NHWC | 1 | 数据排布方式为NHWC。 | +| NHWC4 | 2 | 数据排布方式为NHWC4。 | +| HWKC | 3 | 数据排布方式为HWKC。 | +| HWCK | 4 | 数据排布方式为HWCK。 | +| KCHW | 5 | 数据排布方式为KCHW。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-connection.md b/zh-cn/application-dev/reference/apis/js-apis-net-connection.md index 7b00e60ca56dff191ba377c5829738a0a5a2f874..5472a539d30867ef98180265007158cf0018bf0e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-net-connection.md +++ b/zh-cn/application-dev/reference/apis/js-apis-net-connection.md @@ -67,6 +67,7 @@ getDefaultNet(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -100,6 +101,7 @@ getDefaultNet(): Promise\ | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -132,6 +134,7 @@ getDefaultNetSync(): NetHandle | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -161,6 +164,8 @@ getGlobalHttpProxy(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | +| 401 | Parameter error. | +| 202 | Non-system applications use system APIs. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -193,6 +198,8 @@ getGlobalHttpProxy(): Promise\; | 错误码ID | 错误信息 | | ------- | ----------------------------- | +| 401 | Parameter error. | +| 202 | Non-system applications use system APIs. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -231,6 +238,7 @@ setGlobalHttpProxy(httpProxy: HttpProxy, callback: AsyncCallback\): void | ------- | ----------------------------- | | 201 | Permission denied. | | 401 | Parameter error. | +| 202 | Non-system applications use system APIs. | | 2100001 | Invalid parameter value. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -280,6 +288,7 @@ setGlobalHttpProxy(httpProxy: HttpProxy): Promise\; | ------- | ----------------------------- | | 201 | Permission denied. | | 401 | Parameter error. | +| 202 | Non-system applications use system APIs. | | 2100001 | Invalid parameter value. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -319,6 +328,7 @@ getAppNet(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | +| 401 | Parameter error.| | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -349,6 +359,7 @@ getAppNet(): Promise\; | 错误码ID | 错误信息 | | ------- | ----------------------------- | +| 401 | Parameter error.| | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -465,6 +476,7 @@ getAllNets(callback: AsyncCallback<Array<NetHandle>>): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -498,6 +510,7 @@ getAllNets(): Promise<Array<NetHandle>> | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -690,6 +703,7 @@ isDefaultNetMetered(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -723,6 +737,7 @@ isDefaultNetMetered(): Promise\ | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -755,6 +770,7 @@ hasDefaultNet(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -788,6 +804,7 @@ hasDefaultNet(): Promise\ | 错误码ID | 错误信息 | | ------- | ----------------------------- | | 201 | Permission denied. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -821,7 +838,9 @@ enableAirplaneMode(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | -| 202 | Non-system applications use system APIs.| +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -855,7 +874,9 @@ enableAirplaneMode(): Promise\ | 错误码ID | 错误信息 | | ------- | ----------------------------- | -| 202 | Non-system applications use system APIs.| +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -889,7 +910,9 @@ disableAirplaneMode(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | ----------------------------- | -| 202 | Non-system applications use system APIs.| +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | @@ -923,7 +946,9 @@ disableAirplaneMode(): Promise\ | 错误码ID | 错误信息 | | ------- | ----------------------------- | -| 202 | Non-system applications use system APIs.| +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2100002 | Operation failed. Cannot connect to service.| | 2100003 | System internal error. | diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md b/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md index 8e5a376b35426d3872f8ab7de7aa37f90b00b1e1..93cf43ff4db4b90fce37d811e112666edce72cdb 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md +++ b/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md @@ -415,7 +415,9 @@ on(type: 'interfaceStateChange', callback: Callback\<{ iface: string, active: bo | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | +| 201 | Permission denied. | | 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** @@ -448,7 +450,9 @@ off(type: 'interfaceStateChange', callback?: Callback\<{ iface: string, active: | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | +| 201 | Permission denied. | | 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md b/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md index cf4b2ffb92c380b1566f0207a220d20da6c4df4d..5690ac8d20ab87beb5898a950ff6d41839c1c391 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md +++ b/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md @@ -394,6 +394,12 @@ createDiscoveryService(context: Context, serviceType: string): DiscoveryService | ----------------------------- |---------------------------------| | DiscoveryService | 基于指定serviceType和Context的发现服务对象。 | +**错误码:** + +| 错误码ID | 错误信息 | +|---------|---| +| 401 | Parameter error. | + **示例** FA模型示例: diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-sharing.md b/zh-cn/application-dev/reference/apis/js-apis-net-sharing.md index 0dfb683919e0f331e2746b48b58a7070f899d48e..21b0b0bad1abf67ef950e8f0de9c0c6f420c5171 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-net-sharing.md +++ b/zh-cn/application-dev/reference/apis/js-apis-net-sharing.md @@ -35,6 +35,7 @@ isSharingSupported(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | | 2202011 | Cannot get network sharing configuration. | @@ -71,6 +72,7 @@ isSharingSupported(): Promise\ | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | | 2202011 | Cannot get network sharing configuration. | @@ -184,6 +186,7 @@ startSharing(type: SharingIfaceType, callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | | 401 | Parameter error. | | 2200001 | Invalid parameter value. | | 2200002 | Operation failed. Cannot connect to service. | @@ -233,6 +236,7 @@ startSharing(type: SharingIfaceType): Promise\ | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | +| 202 | Non-system applications use system APIs. | | 201 | Permission denied. | | 401 | Parameter error. | | 2200001 | Invalid parameter value. | @@ -377,6 +381,8 @@ getStatsRxBytes(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | @@ -412,6 +418,8 @@ getStatsRxBytes(): Promise\ | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | @@ -448,6 +456,8 @@ getStatsTxBytes(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | @@ -483,6 +493,8 @@ getStatsTxBytes(): Promise\ | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | @@ -519,6 +531,8 @@ getStatsTotalBytes(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | @@ -554,6 +568,8 @@ getStatsTotalBytes(): Promise\ | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | | 2200002 | Operation failed. Cannot connect to service. | | 2200003 | System internal error. | @@ -591,6 +607,7 @@ getSharingIfaces(state: SharingIfaceState, callback: AsyncCallback\> | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | | 401 | Parameter error. | | 2200001 | Invalid parameter value. | | 2200002 | Operation failed. Cannot connect to service. | @@ -679,6 +697,7 @@ getSharingState(type: SharingIfaceType, callback: AsyncCallback\ | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | | 401 | Parameter error. | | 2200001 | Invalid parameter value. | | 2200002 | Operation failed. Cannot connect to service. | @@ -767,6 +787,7 @@ getSharableRegexes(type: SharingIfaceType, callback: AsyncCallback\> | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | | 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | | 401 | Parameter error. | | 2200001 | Invalid parameter value. | | 2200002 | Operation failed. Cannot connect to service. | @@ -854,7 +876,9 @@ on(type: 'sharingStateChange', callback: Callback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | -| 202 | Non-system applications use system APIs. | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** @@ -887,7 +911,9 @@ off(type: 'sharingStateChange', callback?: Callback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | -| 202 | Non-system applications use system APIs. | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** @@ -921,7 +947,9 @@ SharingIfaceState }>): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | -| 202 | Non-system applications use system APIs. | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** @@ -955,7 +983,9 @@ SharingIfaceState }>): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | -| 202 | Non-system applications use system APIs. | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** @@ -988,7 +1018,9 @@ on(type: 'sharingUpstreamChange', callback: Callback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | -| 202 | Non-system applications use system APIs. | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** @@ -1021,7 +1053,9 @@ off(type: 'sharingUpstreamChange', callback?: Callback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | -| 202 | Non-system applications use system APIs. | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md index 04894ff75265aae35a6f7a67e93e070c01784711..aa40fd84c2d1fdbc76679d7c61d9019bab257ed6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md +++ b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md @@ -6143,8 +6143,8 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void; | FINGERPRINT_TIP_PARTIAL | 3 | 表示仅检测到部分指纹图像。 | | FINGERPRINT_TIP_TOO_FAST | 4 | 表示指纹图像由于快速运动而不完整。 | | FINGERPRINT_TIP_TOO_SLOW | 5 | 表示由于缺少运动,指纹图像无法读取。 | -| FINGERPRINT_TIP_FINGER_DOWN10+ | 6 | 表示手指向下。 | -| FINGERPRINT_TIP_FINGER_UP10+ | 7 | 表示手指向上。 | +| FINGERPRINT_TIP_FINGER_DOWN10+ | 6 | 表示手指落下。 | +| FINGERPRINT_TIP_FINGER_UP10+ | 7 | 表示手指抬起。 | ## OsAccountInfo diff --git a/zh-cn/application-dev/reference/apis/js-apis-pointer.md b/zh-cn/application-dev/reference/apis/js-apis-pointer.md index ca0c6bfba4183825a184ac8c608d40ca85004f4a..febbf6eab19d4b7fed3597fbcced96c1d9934e31 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-pointer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-pointer.md @@ -849,4 +849,7 @@ window.getLastWindow(this.context, (error, win) => { | MIDDLE_BTN_NORTH_WEST | 35 | 向西北滚动 |![MID_Btn_North_West.png](./figures/MID_Btn_North_West.png)| | MIDDLE_BTN_SOUTH_EAST | 36 | 向东南滚动 |![MID_Btn_South_East.png](./figures/MID_Btn_South_East.png)| | MIDDLE_BTN_SOUTH_WEST | 37 | 向西南滚动 |![MID_Btn_South_West.png](./figures/MID_Btn_South_West.png)| -| MIDDLE_BTN_NORTH_SOUTH_WEST_EAST | 38 | 四向锥形移动 |![MID_Btn_North_South_West_East.png](./figures/MID_Btn_North_South_West_East.png)| \ No newline at end of file +| MIDDLE_BTN_NORTH_SOUTH_WEST_EAST | 38 | 四向锥形移动 |![MID_Btn_North_South_West_East.png](./figures/MID_Btn_North_South_West_East.png)| +| HORIZONTAL_TEXT_CURSOR | 39 | 垂直文本选择 |![Horizontal_Text_Cursor.png](./figures/Horizontal_Text_Cursor.png)| +| CURSOR_CROSS | 40 | 十字光标 |![Cursor_Cross.png](./figures/Cursor_Cross.png)| +| CURSOR_CIRCLE | 41 | 圆形光标 |![Cursor_Circle.png](./figures/Cursor_Circle.png)| \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-privacyManager.md b/zh-cn/application-dev/reference/apis/js-apis-privacyManager.md index d7ff5598a78d4d713a33c6172c06f94d65a94d90..a4e435df6d81463fc6808af176ea1c59cfc0cccf 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-privacyManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-privacyManager.md @@ -87,7 +87,7 @@ addPermissionUsedRecord(tokenID: number, permissionName: Permissions, successCou | permissionName | Permissions | 是 | 应用权限名称。 | | successCount | number | 是 | 访问成功的次数。 | | failCount | number | 是 | 访问失败的次数。 | -| callback | AsyncCallback<void> | 是 | 回调函数。当添加使用记录成功时,err为undefine;否则为错误对象。 | +| callback | AsyncCallback<void> | 是 | 回调函数。当添加使用记录成功时,err为undefined;否则为错误对象。 | **错误码:** @@ -195,7 +195,7 @@ getPermissionUsedRecord(request: PermissionUsedRequest, callback: AsyncCallback& | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------- | ---- | ------------------------------------------ | | request | [PermissionUsedRequest](#permissionusedrequest) | 是 | 查询权限使用记录的请求。 | -| callback | AsyncCallback<[PermissionUsedResponse](#permissionusedresponse)> | 是 | 回调函数。当查询记录成功时,err为undefine,data为查询到的权限使用记录;否则为错误对象。 | +| callback | AsyncCallback<[PermissionUsedResponse](#permissionusedresponse)> | 是 | 回调函数。当查询记录成功时,err为undefined,data为查询到的权限使用记录;否则为错误对象。 | **错误码:** @@ -306,7 +306,7 @@ startUsingPermission(tokenID: number, permissionName: Permissions, callback: Asy | -------------- | --------------------- | ---- | ------------------------------------ | | tokenID | number | 是 | 调用方的应用身份标识。可通过应用的[ApplicationInfo](js-apis-bundle-ApplicationInfo.md)获得。 | | permissionName | Permissions | 是 | 需要使用的权限名。 | -| callback | AsyncCallback<void> | 是 | 回调函数。当开始使用权限成功时,err为undefine;否则为错误对象。 | +| callback | AsyncCallback<void> | 是 | 回调函数。当开始使用权限成功时,err为undefined;否则为错误对象。 | **错误码:** @@ -409,7 +409,7 @@ stopUsingPermission(tokenID: number, permissionName: Permissions, callback: Asyn | -------------- | --------------------- | ---- | ------------------------------------ | | tokenID | number | 是 | 调用方的应用身份标识。可通过应用的[ApplicationInfo](js-apis-bundle-ApplicationInfo.md)获得。 | | permissionName | Permissions | 是 | 需要使用的权限名。 | -| callback | AsyncCallback<void> | 是 | 回调函数。当停止使用权限成功时,err为undefine;否则为错误对象。 | +| callback | AsyncCallback<void> | 是 | 回调函数。当停止使用权限成功时,err为undefined;否则为错误对象。 | **错误码:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-promptAction.md b/zh-cn/application-dev/reference/apis/js-apis-promptAction.md index 0163d488caf265565ac25d3684a7f2d95071469d..216fcf9485f5efa3bd4f3ccfa85321b38d13d1d9 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-promptAction.md +++ b/zh-cn/application-dev/reference/apis/js-apis-promptAction.md @@ -6,7 +6,7 @@ > > 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > -> 该模块不支持在[UIAbility](./js-apis-app-ability-uiAbility.md)中使用。 +> 该模块不支持在[UIAbility](./js-apis-app-ability-uiAbility.md)中使用,需要在创建组件实例后使用。 ## 导入模块 diff --git a/zh-cn/application-dev/reference/apis/js-apis-radio.md b/zh-cn/application-dev/reference/apis/js-apis-radio.md index c4d8e67c4199573139471a2594e7fb41f3ed4508..bce462a721422fb9ee2885aa879ea451dc6fb243 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-radio.md +++ b/zh-cn/application-dev/reference/apis/js-apis-radio.md @@ -1824,12 +1824,16 @@ promise.then(data => { }); ``` -## radio.getNrOptionMode8+ +## radio.getNrOptionMode(deprecated) getNrOptionMode\(callback: AsyncCallback\\): void 获取Nr选项模式 。使用callback异步回调。 +> **说明:** +> +> 从 API version 8开始支持,从API version 10开始废弃。建议使用[getNROptionMode](#radiogetnroptionmode10)替代。 + **系统接口:** 此接口为系统接口。 **系统能力**:SystemCapability.Telephony.CoreService @@ -1838,7 +1842,7 @@ getNrOptionMode\(callback: AsyncCallback\\): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------------------- | ---- | ---------- | -| callback | AsyncCallback\<[NrOptionMode](#nroptionmode8)\> | 是 | 回调函数。 | +| callback | AsyncCallback\<[NrOptionMode](#nroptionmodedeprecated)\> | 是 | 回调函数。 | **错误码:** @@ -1862,12 +1866,16 @@ radio.getNrOptionMode((err, data) => { ``` -## radio.getNrOptionMode8+ +## radio.getNrOptionMode(deprecated) getNrOptionMode\(slotId: number, callback: AsyncCallback\\): void 获取Nr选项模式 。使用callback异步回调。 +> **说明:** +> +> 从 API version 8开始支持,从API version 10开始废弃。建议使用[getNROptionMode](#radiogetnroptionmode10)替代。 + **系统接口:** 此接口为系统接口。 **系统能力**:SystemCapability.Telephony.CoreService @@ -1875,9 +1883,9 @@ getNrOptionMode\(slotId: number, callback: AsyncCallback\\): void **参数:** | 参数名 | 类型 | 必填 | 说明 | -| -------- | ----------------------------------------------- | ---- | -------------------------------------- | +| -------- | ----------------------------------------------- | ---- | ------------------------------------- | | slotId | number | 是 | 卡槽ID。
- 0:卡槽1
- 1:卡槽2 | -| callback | AsyncCallback\<[NrOptionMode](#nroptionmode8)\> | 是 | 回调函数。 | +| callback | AsyncCallback\<[NrOptionMode](#nroptionmodedeprecated)\> | 是 | 回调函数。 | **错误码:** @@ -1902,12 +1910,16 @@ radio.getNrOptionMode(slotId, (err, data) => { ``` -## radio.getNrOptionMode8+ +## radio.getNrOptionMode(deprecated) getNrOptionMode\(slotId?: number\): Promise\ 获取Nr选项模式 。使用Promise异步回调。 +> **说明:** +> +> 从 API version 8开始支持,从API version 10开始废弃。建议使用[getNROptionMode](#radiogetnroptionmode10)替代。 + **系统接口:** 此接口为系统接口。 **系统能力**:SystemCapability.Telephony.CoreService @@ -1920,9 +1932,9 @@ getNrOptionMode\(slotId?: number\): Promise\ **返回值:** -| 类型 | 说明 | -| ----------------------------------------- | ----------------------- | -| Promise\<[NrOptionMode](#nroptionmode8)\> | 以Promise形式返回结果。 | +| 类型 | 说明 | +| -------------------------------------------------- | ----------------------- | +| Promise\<[NrOptionMode](#nroptionmodedeprecated)\> | 以Promise形式返回结果。 | **错误码:** @@ -2671,6 +2683,190 @@ promise.then(data => { ``` +## radio.setNROptionMode10+ + +setNROptionMode\(slotId: number, mode: NROptionMode, callback: AsyncCallback\\): void + +设置Nr选项模式 。使用callback异步回调。 + +**系统接口:** 此接口为系统接口。 + +**需要权限**:ohos.permission.SET_TELEPHONY_STATE + +**系统能力**:SystemCapability.Telephony.CoreService + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------------------------------ | ---- | -------------------------------------- | +| slotId | number | 是 | 卡槽ID。
- 0:卡槽1
- 1:卡槽2 | +| mode | [NROptionMode](#nroptionmode10) | 是 | NR的选择模式。 | +| callback | AsyncCallback\ | 是 | 回调函数。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**示例:** + +```js +let slotId = 0; +radio.setNROptionMode(slotId, 1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## radio.setNROptionMode10+ + +setNROptionMode\(slotId: number, mode: NROptionMode\): Promise\ + +设置Nr选项模式 。使用Promise异步回调。 + +**系统接口:** 此接口为系统接口。 + +**需要权限**:ohos.permission.SET_TELEPHONY_STATE + +**系统能力**:SystemCapability.Telephony.CoreService + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------------------------------- | ---- | ------------------------------------- | +| slotId | number | 是 | 卡槽ID。
- 0:卡槽1
- 1:卡槽2 | +| mode | [NROptionMode](#nroptionmode10) | 是 | NR的选择模式。 | + +**返回值:** + +| 类型 | 说明 | +| ----------------- | ----------------------- | +| Promise\ | 以Promise形式返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**示例:** + +```js +let slotId = 0; +let promise = radio.setNROptionMode(slotId, 1); +promise.then(data => { + console.log(`setNROptionMode success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`setNROptionMode failed, promise: err->${JSON.stringify(err)}`); +}); +``` + + +## radio.getNROptionMode10+ + +getNROptionMode\(slotId: number, callback: AsyncCallback\\): void + +获取Nr选项模式 。使用callback异步回调。 + +**系统接口:** 此接口为系统接口。 + +**系统能力**:SystemCapability.Telephony.CoreService + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------------------------------ | ---- | -------------------------------------- | +| slotId | number | 是 | 卡槽ID。
- 0:卡槽1
- 1:卡槽2 | +| callback | AsyncCallback\<[NROptionMode](#nroptionmode10)\> | 是 | 回调函数。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**示例:** + +```js +let slotId = 0; +radio.getNROptionMode(slotId, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## radio.getNROptionMode10+ + +getNROptionMode\(slotId: number\): Promise\ + +获取Nr选项模式 。使用Promise异步回调。 + +**系统接口:** 此接口为系统接口。 + +**系统能力**:SystemCapability.Telephony.CoreService + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ------------------------------------- | +| slotId | number | 是 | 卡槽ID。
- 0:卡槽1
- 1:卡槽2 | + +**返回值:** + +| 类型 | 说明 | +| ----------------------------------------- | ----------------------- | +| Promise\<[NROptionMode](#nroptionmode10)\> | 以Promise形式返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**示例:** + +```js +let slotId = 0; +let promise = radio.getNROptionMode(slotId); +promise.then(data => { + console.log(`getNROptionMode success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`getNROptionMode failed, promise: err->${JSON.stringify(err)}`); +}); +``` + + ## RadioTechnology 无线接入技术。 @@ -2947,10 +3143,14 @@ WCDMA小区信息。 | mcc | string | 是 | 移动国家码。 | | mnc | string | 是 | 移动网号。 | -## NrOptionMode8+ +## NrOptionMode(deprecated) NR的选择模式。 +> **说明:** +> +> 从 API version 8开始支持,从API version 10开始废弃。建议使用[NROptionMode](#nroptionmode10)替代。 + **系统接口:** 此接口为系统接口。 **系统能力**:SystemCapability.Telephony.CoreService @@ -2962,6 +3162,21 @@ NR的选择模式。 | NR_OPTION_SA_ONLY | 2 | 仅独立组网的NR选择模式。 | | NR_OPTION_NSA_AND_SA | 3 | 非独立组网和独立组网的NR选择模式。 | +## NROptionMode10+ + +NR的选择模式。 + +**系统接口:** 此接口为系统接口。 + +**系统能力**:SystemCapability.Telephony.CoreService + +| 名称 | 值 | 说明 | +| -------------------- | ---- | --------------------------------- | +| NR_OPTION_UNKNOWN | 0 | 未知的NR选择模式。 | +| NR_OPTION_NSA_ONLY | 1 | 仅非独立组网的NR选择模式。 | +| NR_OPTION_SA_ONLY | 2 | 仅独立组网的NR选择模式。 | +| NR_OPTION_NSA_AND_SA | 3 | 非独立组网和独立组网的NR选择模式。 | + ## NetworkSearchResult 网络搜索结果。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-request.md b/zh-cn/application-dev/reference/apis/js-apis-request.md index a577bbe8edb3d38f237592b1aff5e2d0f4cabcd8..d6417879adc99b99d00a53188ff14d8e45b51e42 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-request.md +++ b/zh-cn/application-dev/reference/apis/js-apis-request.md @@ -94,6 +94,7 @@ uploadFile(context: BaseContext, config: UploadConfig): Promise<UploadTask> | Promise<[UploadTask](#uploadtask)> | 返回上传任务。 | **错误码:** + 以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 | 错误码ID | 错误信息 | @@ -142,6 +143,7 @@ uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback&l | callback | AsyncCallback<[UploadTask](#uploadtask)> | 是 | 回调函数,异步返回UploadTask对象。 | **错误码:** + 以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 | 错误码ID | 错误信息 | @@ -377,7 +379,7 @@ on(type: 'headerReceive', callback: (header: object) => void): void off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void -删除上传任务进度监听,同步方法。 +取消订阅上传任务进度监听,同步方法。 **需要权限**:ohos.permission.INTERNET @@ -404,7 +406,7 @@ off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) =&g off(type: 'headerReceive', callback?: (header: object) => void): void -删除上传任务HTTP标头监听,同步方法。 +取消订阅上传任务HTTP标头监听,同步方法。 **需要权限**:ohos.permission.INTERNET @@ -430,7 +432,7 @@ off(type: 'headerReceive', callback?: (header: object) => void): void off(type:'complete' | 'fail', callback?: Callback<Array<TaskState>>): void; -删除上传任务完成或失败监听,同步方法。 +取消订阅上传任务完成或失败监听,同步方法。 **需要权限**:ohos.permission.INTERNET @@ -632,7 +634,7 @@ remove(callback: AsyncCallback<boolean>): void | -------- | -------- | -------- | -------- | | filename | string | 是 | multipart提交时,请求头中的文件名。 | | name | string | 是 | multipart提交时,表单项目的名称,缺省为file。 | -| uri | string | 是 | 文件的本地存储路径。
仅支持“internal”协议类型,“internal://cache/”为必填字段,示例:
internal://cache/path/to/file.txt | +| uri | string | 是 | 文件的本地存储路径。
仅支持"internal"协议类型,"internal://cache/"为必填字段,示例:
internal://cache/path/to/file.txt | | type | string | 是 | 文件的内容类型,默认根据文件名或路径的后缀获取。 | @@ -673,13 +675,14 @@ downloadFile(context: BaseContext, config: DownloadConfig): Promise<DownloadT | Promise<[DownloadTask](#downloadtask)> | 返回下载任务。 | **错误码:** + 以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 | 错误码ID | 错误信息 | | -------- | -------- | | 13400001 | file operation error. | | 13400002 | bad file path. | - | 13400003 | task manager service error. | + | 13400003 | task service ability error. | **示例:** @@ -717,13 +720,14 @@ downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallba | callback | AsyncCallback<[DownloadTask](#downloadtask)> | 是 | 下载接口的回调函数。 | **错误码:** + 以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 | 错误码ID | 错误信息 | | -------- | -------- | | 13400001 | file operation error. | | 13400002 | bad file path. | - | 13400003 | task manager service error. | + | 13400003 | task service ability error. | **示例:** @@ -859,7 +863,7 @@ on(type: 'progress', callback:(receivedSize: number, totalSize: number) => vo off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void -删除下载任务进度监听,同步方法。 +取消订阅下载任务进度监听,同步方法。 **需要权限**:ohos.permission.INTERNET @@ -923,7 +927,7 @@ on(type: 'complete'|'pause'|'remove', callback:() => void): void off(type: 'complete'|'pause'|'remove', callback?:() => void): void -删除下载任务相关的监听,同步方法。 +取消订阅下载任务相关的监听,同步方法。 **需要权限**:ohos.permission.INTERNET @@ -993,7 +997,7 @@ on(type: 'fail', callback: (err: number) => void): void off(type: 'fail', callback?: (err: number) => void): void -删除下载任务失败监听,同步方法。 +取消订阅下载任务失败监听,同步方法。 **需要权限**:ohos.permission.INTERNET @@ -1674,7 +1678,7 @@ resume(callback: AsyncCallback<void>): void **系统能力**: SystemCapability.MiscServices.Download | 名称 | 类型 |必填 | 说明 | -| -------- | ------ |---------------- | +| -------- | -------- | -------- | -------- | | downloadId | number |是 | 下载任务ID。 | | failedReason | number|是 | 下载失败原因,可以是任何[下载任务的错误码](#下载任务的错误码)常量。 | | fileName | string |是| 下载的文件名。 | @@ -1686,4 +1690,1058 @@ resume(callback: AsyncCallback<void>): void | downloadTotalBytes | number |是| 下载的文件的总大小(int bytes)。 | | description | string |是| 待下载任务的描述信息。 | | downloadedBytes | number |是| 实时下载大小(int  bytes)。 | + +## Action10+ + +定义操作选项。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 值 |说明 | +| -------- | -------- |-------- | +| DOWNLOAD | 0 |表示下载任务。 | +| UPLOAD | 1 |表示上传任务。 | + + +## Mode10+ +定义模式选项。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 值 |说明 | +| -------- | -------- |-------- | +| BACKGROUND | 0 |表示后台任务。 | +| FOREGROUND | 1 |表示前端任务。 | + +## Network10+ + +定义网络选项。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 值 |说明 | +| -------- | -------- |-------- | +| ANY | 0 |表示不限网络类型。 | +| WIFI | 1 |表示无线网络。 | +| CELLULAR | 2 |表示蜂窝数据网络。 | + +## FileSpec10+ +表单项的文件信息。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| path | string | 是 | 文件路径,包括如下两种:
- 位于调用方的缓存文件夹下的相对路径。
- 具备访问uri路径权限的应用可使用的uri路径。 | +| mimeType | string | 否 | 文件的mimetype,默认值包括如下两种:
- 上传时,通过文件名或uri的后缀获得。
- 下载时,响应时为"Content-Type",不响应为"octet-stream"。 | +| filename | string | 否 | 文件名,默认值通过路径获取。 | +| extras | Object | 否 | 文件信息的附加内容。 | + + +## FormItem10+ +任务的表单项信息。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| name | string | 是 | 表单参数名。 | +| value | string \| [FileSpec](#filespec10) \| Array<[FileSpec](#filespec10)> | 是 | 表单参数值。 | + + +## Conf10+ +上传/下载任务的配置信息。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| action | [Action](#action10) | 是 | 任务操作选项。
-UPLOAD表示上传任务。
-DOWNLOAD表示下载任务。 | +| url | string | 是 | 资源地址,其最大长度为2048个字符。 | +| title | string | 否 | 任务标题,其最大长度为256个字符,默认值为空。 | +| description | string | 否 | 任务的详细信息,其最大长度为1024个字符,默认值为空字符串。 | +| mode | [Mode](#mode10) | 否 | 任务模式,默认为后台任务。
-对于前端任务,有回调通知。
-对于后台任务,有系统通知、检测网络连接、恢复、自动重试功能。 | +| overwrite | boolean | 否 | 下载过程中路径已存在时的解决方案选择,默认为false。
- true,覆盖已存在的文件。
- false,下载失败。 | +| method | string | 否 | 上传或下载的HTTP标准方法,包括GET、POST和PUT,不区分大小写。
-上传时,使用PUT或POST,默认值为PUT。
-下载时,使用GET或POST,默认值为GET。 | +| headers | object | 否 | 添加要包含在任务中的HTTPS标志头。
-对于上传请求,默认的Content-Type为"multipart/form-data"。
-对于下载请求,默认的Content-Type为"application/json"。 | +| data | string \| Array<[FormItem](#formitem10)> | 否 | -下载时,data为字符串类型,通常使用json(object将被转换为json文本),默认为空。
-上传时,data是表单项数组Array<[FormItem](#formitem10)>,默认为空。 | +| saveas | string | 否 | 保存下载文件的路径,包括如下两种:
-相对路径,如"./xxx/yyy/zzz.html"、"xxx/yyy/zzz.html",位于调用方的缓存路径下。
-uri路径,类似"datashare://bundle/xxx/yyy/zzz.html",具备访问url路径权限的应用可使用,当前暂不支持。
默认为相对路径,即下载至应用当前缓存路径下。 | +| network | [Network](#network10) | 否 | 网络选项,当前支持无线网络WIFI和蜂窝数据网络CELLULAR,默认为ANY(WIFI或CELLULAR)。 | +| metered | boolean | 否 | 是否允许在按流量计费的网络中工作,默认为false。 | +| roaming | boolean | 否 | 是否允许在漫游网络中工作,默认为true。 | +| retry | boolean | 否 | 是否为后台任务启用自动重试,仅应用于后台任务,默认为true。 | +| redirect | boolean | 否 | 是否允许重定向,默认为true。 | +| index | number | 否 | 任务的路径索引,通常用于任务断点续传,默认为0。 | +| begins | number | 否 | 文件起点,通常用于断点续传。默认值为0,取值为闭区间。
-下载时,请求读取服务器开始下载文件时的起点位置(http协议中设置"Range"选项)。
-上传时,在上传开始时读取。 | +| ends | number | 否 | 文件终点,通常用于断点续传。默认值为-1,取值为闭区间。
-下载时,请求读取服务器开始下载文件时的结束位置(http协议中设置"Range"选项)。
-上传时,在上传时结束读取。 | +| gauge | boolean | 否 | 后台任务的过程进度通知策略,仅应用于后台任务,默认值为false。
-false:代表仅完成或失败的通知。
-true,发出每个进度已完成或失败的通知。 | +| precise | boolean | 否 | -如果设置为true,在上传/下载无法获取文件大小时任务失败。
-如果设置为false,将文件大小设置为-1时任务继续。
默认值为false。 | +| token | string | 否 | 当创建了一个带有token的任务后,token则为正常查询期间必须提供的,否则将无法通过查询进行检索。其最小为8个字节,最大为2048个字节。默认为空。 | +| extras | object | 否 | 配置的附加功能,默认为空。 | + +## State10+ + +定义任务当前的状态。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 值 |说明 | +| -------- | -------- |-------- | +| INITIALIZED | 0x00 |通过配置信息([Conf](#conf10))创建初始化任务。 | +| WAITING | 0x10 |表示任务缺少运行或重试的资源与网络状态不匹配。 | +| RUNNING | 0x20 |表示正在处理的任务。 | +| RETRYING | 0x21 |表示任务至少失败一次,现在正在再次处理中。 | +| PAUSED | 0x30 |表示任务暂停,通常后续会恢复任务。 | +| STOPPED | 0x31 |表示任务停止。 | +| COMPLETED | 0x40 |表示任务完成。 | +| FAILED | 0x41 |表示任务失败。 | +| REMOVED | 0x50 |表示任务移除。 | + + +## Progress10+ +任务进度的数据结构。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| state | [State](#state10) | 是 | 任务当前的状态。 | +| index | number | 是 | 任务中当前正在处理的文件索引。 | +| processed | number | 是 | 任务中当前文件的已处理数据大小,单位为B。| +| sizes | Array<number> | 是 | 任务中文件的大小,单位为B。 | +| extras | object | 否 | 交互的额外内容,例如来自服务器的响应的header和body。 | + + +## Broken10+ + +定义任务失败的原因。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 值 |说明 | +| -------- | -------- |-------- | +| OTHERS | 0xFF |表示其他故障。 | +| DISCONNECTED | 0x00 |表示网络断开连接。 | +| TIMEOUT | 0x10 |表示任务超时。 | +| PROTOCOL | 0x20 |表示协议错误,例如:服务器内部错误(500)、无法处理的数据区间(416)等。 | +| FSIO | 0x40 |表示文件系统io错误,例如打开/查找/读取/写入/关闭。 | + + +## TaskInfo10+ +查询结果的任务信息数据结构,提供普通查询和高级查询,两种字段的可见范围不同。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| uid | string | 否 | 应用程序的UID,仅用于系统查询。
**系统接口**:此接口为系统接口。| +| bundle | string | 否 | 应用程序的包名,仅用于系统查询。
**系统接口**:此接口为系统接口。| +| url | string | 否 | 任务的url,仅适用于普通应用查询,系统查询返回空字串。 | +| data | string \| Array<[FormItem](#formitem10)> | 否 | 任务值。 | +| tid | string | 是 | 任务id。 | +| title | string | 是 | 任务标题。 | +| description | string | 是 | 任务描述。 | +| action | [Action](#action10) | 是 | 任务操作选项。
-UPLOAD表示上传任务。
-DOWNLOAD表示下载任务。 | +| mode | [Mode](#mode10) | 是 | 指定任务模式。
-FOREGROUND表示前端任务。
-BACKGROUND表示后台任务。 | +| mimeType | string | 是 | 任务配置中的mimetype。 | +| progress | [Progress](#progress10) | 是 | 任务的过程进度。 | +| gauge | boolean | 是 | 后台任务的进度通知策略。 | +| ctime | string | 是 | UTC模式中创建任务的日期和时间,由当前设备的系统生成的。| +| mtime | string | 是 | UTC模式中修改任务的日期和时间,由当前设备的系统生成的。| +| retry | boolean | 是 | 任务的重试开关,仅应用于后台任务。 | +| tries | number | 是 | 任务的尝试次数。 | +| broken | [Broken](#broken10) | 是 | 任务的失败原因。
-OTHERS表示其他故障。
-DISCONNECT表示网络断开连接。
-TIMEOUT表示任务超时。
-PROTOCOL表示协议错误。
-FSIO表示文件系统io错误。| +| reason | string | 是 | 等待/失败/停止/暂停任务的原因。| +| extras | string | 否 | 任务的额外部分。| + + +## Task10+ +上传或下载任务。使用该方法前需要先获取Task对象,promise形式通过[request.agent.create10+](#requestagentcreate10-1)获取,callback形式通过[request.agent.create10+](#requestagentcreate10)获取。 + +### 属性 +包括任务id和任务的配置信息。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| tid | string | 是 | 任务id,在系统上是唯一的,由系统自动生成。 | +| conf | [Conf](#conf10) | 是 | 任务的配置信息。 | + + +### on('progress'|'completed'|'failed')10+ + +on(event: "progress" | "completed" | "failed", callback: (progress: Progress) => void): void + +订阅任务相关的监听。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | event | string | 是 | 订阅的事件类型。
- 取值为'progress',表示任务进度;
- 取值为'completed',表示任务已完成;
- 取值为'failed',表示任务失败。 | + | callback | function | 是 | 发生相关的事件时触发该回调方法,返回任务进度的数据结构| + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 21900005 | task mode error. | + +**示例:** + + ```js + let attachments = [{ + name: "taskOnTest", + value: { + filename: "taskOnTest.avi", + mimetype: "application/octet-stream", + path: "./taskOnTest.avi", + } + }]; + let conf = { + action: request.agent.Action.UPLOAD, + url: 'http://127.0.0.1', + title: 'taskOnTest', + description: 'Sample code for event listening', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "PUT", + data: attachments, + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + let createOnCallback = (progress) => { + console.info('upload task completed.'); + }; + request.agent.create(globalThis.abilityContext, conf).then((task)=> { + task.on('progress', createOnCallback); + task.on('completed', createOnCallback); + task.on('failed', createOnCallback); + console.info(`create a upload task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a upload task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### off('progress'|'completed'|'failed')10+ + +off(event: "progress" | "completed" | "failed", callback?: (progress: Progress) => void): void + +取消订阅任务相关的监听。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | evt | string | 是 | 订阅的事件类型。
- 取值为'progress',表示任务进度;
- 取值为'completed',表示任务已完成;
- 取值为'failed',表示任务失败。 | + | callback | function | 否 | 发生相关的事件时触发该回调方法,返回任务进度的数据结构| + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 21900005 | task mode error. | + +**示例:** + + ```js + let attachments = [{ + name: "taskOffTest", + value: { + filename: "taskOffTest.avi", + mimetype: "application/octet-stream", + path: "./taskOffTest.avi", + } + }]; + let conf = { + action: request.agent.Action.UPLOAD, + url: 'http://127.0.0.1', + title: 'taskOffTest', + description: 'Sample code for event listening', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "PUT", + data: attachments, + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + let createOffCallback = (progress) => { + console.info('upload task completed.'); + }; + request.agent.create(globalThis.abilityContext, conf).then((task)=> { + task.on('progress', createOffCallback); + task.on('completed', createOffCallback); + task.on('failed', createOffCallback); + task.off('progress', createOffCallback); + task.off('completed', createOffCallback); + task.off('failed', createOffCallback); + console.info(`create a upload task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a upload task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### start10+ + +start(callback: AsyncCallback<void>): void + +启动任务,无法启动已初始化的任务。使用callback异步回调。 + +**需要权限**:ohos.permission.INTERNET + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | callback | function | 是 | 回调函数,开启任务成功,err为undefined,否则为错误对象 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskStartTest', + description: 'Sample code for start the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.start((err) => { + if (err) { + console.error(`Failed to start the download task, because: ${JSON.stringify(err)}`); + return; + } + console.info(`start a download task successfully. `); + }) + console.info(`create a download task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### start10+ + +start(): Promise<void> + +启动任务,无法启动已初始化的任务。使用Promise异步回调。 + +**需要权限**:ohos.permission.INTERNET + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**返回值:** + +| 类型 | 说明 | +| ------------------- | ------------------------- | +| Promise<void> | Promise对象。无返回结果的Promise对象。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskStartTest', + description: 'Sample code for start the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.start().then(() => { + console.info(`start a download task successfully. `); + }).catch((err) => { + console.error(`Failed to start the download task, because: ${JSON.stringify(err)}`); + }); + console.info(`create a download task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### pause10+ + +pause(callback: AsyncCallback<void>): void + +暂停任务,可以暂停正在等待/正在运行/正在重试的后台任务。使用callback异步回调。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | callback | function | 是 | 回调函数,暂停任务成功,err为undefined,否则为错误对象 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900005 | task mode error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskPauseTest', + description: 'Sample code for pause the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.pause((err) => { + if (err) { + console.error(`Failed to pause the download task, because: ${JSON.stringify(err)}`); + return; + } + console.info(`pause a download task successfully. `); + }) + console.info(`create a download task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### pause10+ + +pause(): Promise<void> + +暂停任务,可以暂停正在等待/正在运行/正在重试的后台任务。使用Promise异步回调。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**返回值:** + +| 类型 | 说明 | +| ------------------- | ------------------------- | +| Promise<void> | Promise对象。无返回结果的Promise对象。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900005 | task mode error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskPauseTest', + description: 'Sample code for pause the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.pause().then(() => { + console.info(`pause a upload task successfully. `); + }).catch((err) => { + console.error(`Failed to pause the upload task, because: ${JSON.stringify(err)}`); + }); + console.info(`create a upload task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a upload task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### resume10+ + +resume(callback: AsyncCallback<void>): void + +重新启动任务,可以恢复暂停的后台任务。使用callback异步回调。 + +**需要权限**:ohos.permission.INTERNET + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | callback | function | 是 | 回调函数,重新启动任务成功,err为undefined,否则为错误对象 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900005 | task mode error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskResumeTest', + description: 'Sample code for resume the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.resume().then(() => { + console.info(`resume a download task successfully. `); + }).catch((err) => { + console.error(`Failed to resume the download task, because: ${JSON.stringify(err)}`); + }); + console.info(`create a download task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### resume10+ + +resume(): Promise<void> + +重新启动任务,可以恢复暂停的后台任务。使用Promise异步回调。 + +**需要权限**:ohos.permission.INTERNET + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**返回值:** + +| 类型 | 说明 | +| ------------------- | ------------------------- | +| Promise<void> | Promise对象。无返回结果的Promise对象。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900005 | task mode error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskResumeTest', + description: 'Sample code for resume the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.resume((err) => { + if (err) { + console.error(`Failed to resume the download task, because: ${JSON.stringify(err)}`); + return; + } + console.info(`resume a download task successfully. `); + }) + console.info(`create a download task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### stop10+ + +stop(callback: AsyncCallback<void>): void + +停止任务,可以停止正在运行/正在等待/正在重试的任务。使用callback异步回调。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | callback | function | 是 | 回调函数,重新启动任务成功,err为undefined,否则为错误对象 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskStopTest', + description: 'Sample code for stop the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.stop().then(() => { + console.info(`stop a download task successfully. `); + }).catch((err) => { + console.error(`Failed to stop the download task, because: ${JSON.stringify(err)}`); + }); + console.info(`create a download task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + }); + ``` + + +### stop10+ + +stop(): Promise<void> + +停止任务,可以停止正在运行/正在等待/正在重试的任务。使用Promise异步回调。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**返回值:** + +| 类型 | 说明 | +| ------------------- | ------------------------- | +| Promise<void> | Promise对象。无返回结果的Promise对象。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900007 | task state error. | + +**示例:** + + ```js + let conf = { + action: request.agent.Action.DOWNLOAD, + url: 'http://127.0.0.1', + title: 'taskStopTest', + description: 'Sample code for stop the download task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "GET", + data: "", + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task) => { + task.stop((err) => { + if (err) { + console.error(`Failed to stop the download task, because: ${JSON.stringify(err)}`); + return; + } + console.info(`stop a download task successfully. `); + }) + console.info(`create a download task successfully. result: ${task.tid}`); + }).catch((err) => { + console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + }); + ``` + +## request.agent.create10+ + +create(context: BaseContext, conf: Conf, callback: AsyncCallback<Task>): void + +创建要上传或下载的任务,并将其排入队列,使用callback异步回调。 + + +**需要权限**:ohos.permission.INTERNET + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | conf | [Conf](#conf10) | 是 | 上传/下载任务的配置信息。 | + | context | [BaseContext](js-apis-inner-application-baseContext.md) | 是 | 基于应用程序的上下文。 | + | callback | AsyncCallback<[Task](#task10)> | 是 | 回调函数,返回创建任务的配置信息。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400001 | file operation error. | + | 13400003 | task service ability error. | + | 21900004 | application task queue full error. | + | 21900005 | task mode error. | + +**示例:** + + ```js + let attachments = [{ + name: "reeateTest", + value: { + filename: "reeateTest.avi", + mimetype: "application/octet-stream", + path: "./reeateTest.avi", + } + }]; + let conf = { + action: request.agent.Action.UPLOAD, + url: 'http://127.0.0.1', + title: 'reeateTest', + description: 'Sample code for reeate task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "PUT", + data: attachments, + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf, (err, task) => { + if (err) { + console.error(`Failed to create a upload task, because: ${err.message}`); + return; + } + console.info(`create a upload task successfully. result: ${task.conf}`); + }); + ``` + + +## request.agent.create10+ + +create(context: BaseContext, conf: Conf): Promise<Task> + +创建要上传或下载的任务,并将其排入队列。使用Promise异步回调。 + + +**需要权限**:ohos.permission.INTERNET + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | context | [BaseContext](js-apis-inner-application-baseContext.md) | 是 | 基于应用程序的上下文。 | + | conf | [Conf](#conf10) | 是 | 上传/下载任务的配置信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | ------------------------- | +| Promise<[Task](#task10)> | Promise对象。返回任务配置信息的Promise对象。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400001 | file operation error. | + | 13400003 | task service ability error. | + | 21900004 | application task queue full error. | + | 21900005 | task mode error. | + +**示例:** + + ```js + let attachments = [{ + name: "reeateTest", + value: { + filename: "reeateTest.avi", + mimetype: "application/octet-stream", + path: "./reeateTest.avi", + } + }]; + let conf = { + action: request.agent.Action.UPLOAD, + url: 'http://127.0.0.1', + title: 'reeateTest', + description: 'Sample code for reeate task', + mode: request.agent.Mode.BACKGROUND, + overwrite: false, + method: "PUT", + data: attachments, + saveas: "./", + network: request.agent.Network.CELLULAR, + metered: false, + roaming: true, + retry: true, + redirect: true, + index: 0, + begins: 0, + ends: -1, + gauge: false, + precise: false, + token: "it is a secret" + }; + request.agent.create(globalThis.abilityContext, conf).then((task)=> { + console.info(`create a upload task successfully. result: ${task.conf}`); + }).catch((err) => { + console.error(`Failed to create a upload task, because: ${err.message}`); + }); + ``` + + +## request.agent.remove10+ + +remove(id: string, callback: AsyncCallback<void>): void + +移除属于调用方的指定任务,如果正在处理中,该任务将被迫停止。使用callback异步回调。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | id | string | 是 | 任务id。 | + | callback | AsyncCallback<void> | 是 | 回调函数,删除指定任务成功,err为undefined,否则为错误对象。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900006 | task not found error. | + +**示例:** + + ```js + request.agent.remove("id", (err) => { + if (err) { + console.error(`Failed to remove a upload task, because: ${JSON.stringify(err)}`); + return; + } + console.info(`remove a upload task successfully.`); + }); + ``` + + +## request.agent.remove10+ + +remove(id: string): Promise<void> + +移除属于调用方的指定任务,如果正在处理中,该任务将被迫停止,使用Promise异步回调。 + +**系统能力**: SystemCapability.Request.FileTransferAgent + +**参数:** + + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | id | string | 是 | 任务id。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | ------------------------- | +| Promise<void> | Promise对象。无返回结果的Promise对象。 | + +**错误码:** + +以下错误码的详细介绍请参见[上传下载错误码](../errorcodes/errorcode-request.md)。 + + | 错误码ID | 错误信息 | + | -------- | -------- | + | 13400003 | task service ability error. | + | 21900006 | task not found error. | + +**示例:** + + ```js + request.agent.remove("id").then(() => { + console.info(`remove a upload task successfully. `); + }).catch((err) => { + console.error(`Failed to remove a upload task, because: ${JSON.stringify(err)}`); + }); + ``` + \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-resource-manager.md b/zh-cn/application-dev/reference/apis/js-apis-resource-manager.md index 638bea89a122f05eda4fbf9581564e2f23f628a2..7748ac56c18f497386c09238c5d82b72d9d934ad 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-resource-manager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-resource-manager.md @@ -3249,6 +3249,387 @@ getDrawableDescriptorByName(resName: string, density?: number): DrawableDescript } ``` +### getColor10+ + +getColor(resId: number, callback: AsyncCallback<number>): void; + +用户获取指定资源ID对应的颜色值,使用callback形式返回其对应的颜色值。 + +**系统能力:** SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------- | ---- | --------------- | +| resId | number | 是 | 资源ID值 | +| callback | AsyncCallback<number> | 是 | 异步回调,用于返回获取的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001001 | If the module resId invalid. | +| 9001002 | If the resource not found by resId. | +| 9001006 | If the resource re-ref too much. | + +**示例Stage:** + ```ts + try { + this.context.resourceManager.getColor($r('app.color.test').id, (error, value) => { + if (error != null) { + console.log("error is " + error); + } else { + let str = value; + } + }); + } catch (error) { + console.error(`callback getColor failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColor10+ + +getColor(resId: number): Promise<number> + +用户获取指定资源ID对应的颜色值,使用Promise形式返回对应其对应的颜色值。 + +**系统能力**:SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ------ | ---- | ----- | +| resId | number | 是 | 资源ID值 | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ----------- | +| Promise<number> | 资源ID值对应的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001001 | If the resId invalid. | +| 9001002 | If the resource not found by resId. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + try { + this.context.resourceManager.getColor($r('app.color.test').id).then(value => { + let str = value; + }).catch(error => { + console.log("getColor promise error is " + error); + }); + } catch (error) { + console.error(`promise getColor failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColor10+ + +getColor(resource: Resource, callback: AsyncCallback<number>): void; + +用户获取指定resource对象对应的颜色值,使用callback形式返回其对应的颜色值。 + +**系统能力:** SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------- | ---- | --------------- | +| resource | [Resource](#resource9) | 是 | 资源信息 | +| callback | AsyncCallback<number> | 是 | 异步回调,用于返回获取的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001001 | If the resId invalid. | +| 9001002 | If the resource not found by resId. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + let resource = { + bundleName: "com.example.myapplication", + moduleName: "entry", + id: $r('app.color.test').id + }; + try { + this.context.resourceManager.getColor(resource, (error, value) => { + if (error != null) { + console.log("error is " + error); + } else { + let str = value; + } + }); + } catch (error) { + console.error(`callback getColor failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColor10+ + +getColor(resource: Resource): Promise<number>; + +用户获取指定resource对象对应的颜色值,使用Promise形式返回其对应的颜色值。 + +**系统能力**:SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------- | ---- | ---- | +| resource | [Resource](#resource9) | 是 | 资源信息 | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<number> | resource对象对应的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001001 | If the resId invalid. | +| 9001002 | If the resource not found by resId. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + let resource = { + bundleName: "com.example.myapplication", + moduleName: "entry", + id: $r('app.color.test').id + }; + try { + this.context.resourceManager.getColor(resource).then(value => { + let str = value; + }).catch(error => { + console.log("getColor promise error is " + error); + }); + } catch (error) { + console.error(`callback getColor failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColorByName10+ + +getColorByName(resName: string, callback: AsyncCallback<number>): void + +用户获取指定资源名称对应的颜色值,使用callback形式返回其对应的颜色值。 + +**系统能力**:SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------- | ---- | --------------- | +| resName | string | 是 | 资源名称 | +| callback | AsyncCallback<number> | 是 | 异步回调,用于返回获取的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001003 | If the resName invalid. | +| 9001004 | If the resource not found by resName. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + try { + this.context.resourceManager.getColorByName("test", (error, value) => { + if (error != null) { + console.log("error is " + error); + } else { + let string = value; + } + }); + } catch (error) { + console.error(`callback getColorByName failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColorByName10+ + +getStringByName(resName: string): Promise<number> + +用户获取指定资源名称对应的颜色值,使用Promise形式返回其对应的颜色值。 + +**系统能力**:SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | ---- | +| resName | string | 是 | 资源名称 | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------- | +| Promise<number> | 资源名称对应的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001003 | If the resName invalid. | +| 9001004 | If the resource not found by resName. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + try { + this.context.resourceManager.getColorByName("test").then(value => { + let string = value; + }).catch(error => { + console.log("getColorByName promise error is " + error); + }); + } catch (error) { + console.error(`promise getColorByName failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColorSync10+ + +getColorSync(resId: number) : number; + +用户获取指定资源ID对应的颜色值,使用同步方式返回其对应的颜色值。 + +**系统能力**:SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ------ | ---- | ----- | +| resId | number | 是 | 资源ID值 | + +**返回值:** + +| 类型 | 说明 | +| ------ | ----------- | +| number | 资源ID值对应的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001001 | If the resId invalid. | +| 9001002 | If the resource not found by resId. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + try { + this.context.resourceManager.getColorSync($r('app.color.test').id); + } catch (error) { + console.error(`getColorSync failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColorSync10+ + +getColorSync(resource: Resource): number + +用户获取指定resource对象对应的颜色值,使用同步方式返回其对应的颜色值。 + +**系统能力**:SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------- | ---- | ---- | +| resource | [Resource](#resource9) | 是 | 资源信息 | + +**返回值:** + +| 类型 | 说明 | +| ------ | ---------------- | +| number | resource对象对应的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001001 | If the resId invalid. | +| 9001002 | If the resource not found by resId. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + let resource = { + bundleName: "com.example.myapplication", + moduleName: "entry", + id: $r('app.color.test').id + }; + try { + this.context.resourceManager.getColorSync(resource); + } catch (error) { + console.error(`getColorSync failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + +### getColorByNameSync10+ + +getColorByNameSync(resName: string) : number; + +用户获取指定资源名称对应的颜色值,使用同步方式返回其对应的颜色值。 + +**系统能力**:SystemCapability.Global.ResourceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------ | ---- | ---- | +| resName | string | 是 | 资源名称 | + +**返回值:** + +| 类型 | 说明 | +| ------ | ---------- | +| number | 资源名称对应的颜色值(十进制) | + +**错误码:** + +以下错误码的详细介绍请参见[资源管理错误码](../errorcodes/errorcode-resource-manager.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 9001003 | If the resName invalid. | +| 9001004 | If the resource not found by resName. | +| 9001006 | If the resource re-ref too much. | + +**示例:** + ```ts + try { + this.context.resourceManager.getColorByNameSync("test"); + } catch (error) { + console.error(`getColorByNameSync failed, error code: ${error.code}, message: ${error.message}.`) + } + ``` + ### getString(deprecated) getString(resId: number, callback: AsyncCallback<string>): void diff --git a/zh-cn/application-dev/reference/apis/js-apis-secureElement.md b/zh-cn/application-dev/reference/apis/js-apis-secureElement.md new file mode 100644 index 0000000000000000000000000000000000000000..baa60dca3f04569aca5380db0b1d43855716526c --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-secureElement.md @@ -0,0 +1,1283 @@ +# @ohos.secureElement( 安全单元的通道管理) + +本模块主要用于操作及管理安全单元(SecureElement,简称SE)。文档中出现的SE服务为SEService实例,参见[newSEService](#secureelementnewseservice)。 + +对于文档中出现以下类型说明: + +| 类型 | 说明 | +| ------- | ---------------------------------------------- | +| Session | 此类的实例表示与设备上可用的某个SE的连接会话。 | +| Reader | 此类的实例表示该设备支持的SE Reader。 | +| Channel | 此类的实例表示向SE打开的ISO/IEC 7816-4通道。 | + +> **说明:** +> +> 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 + +## **导入模块** + +```js +import secureElement from '@ohos.secureElement'; +``` + +## secureElement.ServiceState + +定义不同的SE 服务状态值。 + +**系统能力:** SystemCapability.Communication.SecureElement + +| 名称 | 值 | 说明 | +| ------------ | ---- | ------------------ | +| DISCONNECTED | 0 | SE服务状态已断开。 | +| CONNECTED | 1 | SE服务状态已连接。 | + +## secureElement.newSEService + +newSEService(type: 'serviceState', callback: Callback<[ServiceState](#secureelementservicestate)>): SEService + +建立一个可用于连接到系统中所有可用SE的新连接(服务)。连接过程较为耗时,所以此方法仅提供异步方式进行的。 + +仅当指定的回调或者当[isConnected](#seserviceisconnected)方法返回true时,该返回SEService对象是可用的。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | ---------------------------------------------------- | -------------------- | +| type | string | 'serviceState' | +| callback | Callback<[ServiceState](#secureelementservicestate)> | 返回SE服务状态的回调 | + +**返回值:** + +| **类型** | **说明** | +| :-------- | :--------- | +| SEService | SE服务实例 | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcSEService: secureElement.SEService = null; + +this.result = "Service state is Unkown"; +try { + this.nfcSEService = secureElement.newSEService("serviceState", (state) => { + if (state == secureElement.ServiceState.DISCONNECTED) { + this.result = "Service state is Disconnected"; + } else { + this.result = "Service state is Connected"; + } + }); +} catch (e) { + this.result = "newSEService occurs exception:" + e.message; +} +``` + +## SEService.getReaders + +getReaders(): Reader[] + +返回可用SE Reader的数组。返回的数组中不能有重复的对象。即使没有插入卡,也应列出所有可用的reader。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| :------- | :--------------------- | +| Reader[] | 返回可用Reader对象数组 | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcSEService: secureElement.SEService = null; +@State nfcServiceState: secureElement.ServiceState = null; +@State nfcOmaReader: secureElement.Reader = null; +@State nfcOmaReaderList: secureElement.Reader[] = null; + +// get SEService +try { + this.nfcSEService = secureElement.newSEService("serviceState", (state) => { + if (state == secureElement.ServiceState.DISCONNECTED) { + this.result = "Service state is Disconnected"; + } else { + this.result = "Service state is Connected"; + } + }); +} catch (e) { + this.result = "newSEService excpetion:" + e.message; +} + +try { + this.nfcOmaReaderList = this.nfcSEService.getReaders(); + if (this.nfcOmaReaderList != null && this.nfcOmaReaderList.length > 0) { + this.nfcOmaReader = this.nfcOmaReaderList[0]; + this.result = "get reader successfully"; + } else { + this.result = "get reader failed"; + } +} catch (e) { + this.result = "getReaders exception:" + e.message; +} +``` + +## SEService.isConnected + +isConnected(): boolean + +检查SE服务是否已连接 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| :------- | :--------------------------------------------- | +| boolean | true:SE 服务状态已连接 false:SE服务状态已断开 | + +**示例:** + +```JS +import secureElement from '@ohos.secureElement'; + +@State result: string = '' +@State nfcSEService: secureElement.SEService = null; + +try { + let ret: boolean; + // refer to newSEService for this.nfcSEService + ret = this.nfcSEService.isConnected(); + if (ret) { + this.result = 'get state: connected'; + } else { + this.result = 'get state: not connected'; + } +} catch (e) { + this.result = "isConnected exception: " + e.message; +} +``` + +## SEService.shutdown + +shutdown(): void + +释放该service分配的所有SE资源。此后[isConnected](#seserviceisconnected)将返回false。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcSEService: secureElement.SEService = null; + +try { + // refer to newSEService for this.nfcSEService + this.nfcSEService.shutdown(); + this.result = "shutdown successfully"; +} catch (e) { + this.result = "shutdown exception:" + e.message; +} +``` + +## SEService.getVersion + +getVersion(): string + +返回此实现所基于的OMA规范的版本号。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | -------------------------------------------------- | +| string | OMA版本号(例如,“3.3”表示开放移动API规范版本3.3) | + +**示例:** + +```JS +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcSEService: secureElement.SEService = null; + +this.result = "version: " +try { + // refer to newSEService for this.nfcSEService + this.result += this.nfcSEService.getVersion(); +} catch (e) { + this.result = "getVersion exception:" + e.message; +} +``` + +## Reader.getName + +getName(): string + +返回此reader的名称。如果此读卡器是SIM reader,则其名称必须为“SIM[Slot]”。如果读卡器是嵌入式SE reader,则其名称须为“eSE[slot]”。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | ---------- | +| string | reader名称 | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaReader: secureElement.Reader = null; + +try { + // refer to SEService.getReaders for this.nfcOmaReader + this.result = this.nfcOmaReader.getName(); +} catch (e) { + this.result = "getName exception:" + e.message; +} +``` + +## Reader.isSecureElementPresent + +isSecureElementPresent(): boolean + +检查当前Reader所对应的安全单元是否可用。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | -------------------------------------------- | +| boolean | true: 安全单元可用, false: 安全单元不可用。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaReader: secureElement.Reader = null; + +try { + // refer to SEService.getReaders for this.nfcOmaReader + if (this.nfcOmaReader.isSecureElementPresent()) { + this.result = "isSecureElementPresent TRUE"; + } else { + this.result = "isSecureElementPresent FALSE"; + } +} catch (e) { + this.result = "isSecureElementPresent exception:" + e.message; +} +``` + +## Reader.openSession + + openSession(): Session + +连接到此reader中的SE。此方法在返回会话对象之前准备(初始化)SE进行通信。同一reader上可能同时打开多个会话。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | ------------------------------ | +| Session | 用于创建channel的Session对象。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaReader: secureElement.Reader = null; +@State nfcOmaSession: secureElement.Session = null; + +try { + // refer to SEService.getReaders for this.nfcOmaReader + this.nfcOmaSession = this.nfcOmaReader.openSession(); + if (this.nfcOmaSession) { + this.result = "get session successfully"; + } else { + this.result = "get session failed"; + } +} catch (e) { + this.result = "OpenSession exception: " + e.message; +} +``` + +## Reader.closeSessions + + closeSessions(): void + +关闭在此reader上打开的所有session。所有这些session打开的所有channel都将关闭。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaReader: secureElement.Reader = null; + +try { + // refer to SEService.getReaders for this.nfcOmaReader + this.nfcOmaReader.closeSessions(); + this.result = "close Sessions successfully"; +} catch (e) { + this.result = "closeSessions exception:" + e.message; +} +``` + +## Session.getReader + +getReader(): Reader + +获取提供此session的reader。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | --------------------------- | +| Reader | 返回此session的Reader对象。 | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaReader: secureElement.Reader = null; +@State nfcOmaSession: secureElement.Session = null; + +try { + // refer to Reader.openSession for this.nfcOmaSession + this.nfcOmaReader = this.nfcOmaSession.getReader(); + if (this.nfcOmaReader) { + this.result = "get reader successfully"; + } else { + this.result = "get reader failed"; + } +} catch (e) { + this.result = "getReader exception:" + e.message; +} +``` + +## Session.getATR + +getATR(): number[] + +获取该SE的ATR。如果该SE的ATR不可用,则应返回空数组。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | -------------------------------------------- | +| number[] | 返回SE的ATR,SE的ATR不可用时,返回空的数组。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; + +try { + // refer to Reader.openSession for this.nfcOmaSession + let ret = this.nfcOmaSession.getATR(); + if (ret) { + this.result = "getATR result:["; + for (let i = 0; i < ret.length; ++i) { + this.result += ret[i]; + this.result += ' '; + } + this.result += ']'; + } else { + this.result = "getATR result is null"; + } +} catch (e) { + this.result = "getATR exception:" + e.message; +} +``` + +## Session.close + +close(): void + +关闭与SE的连接。这将关闭此应用程序与此SE打开的所有channel。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; + +try { + // refer to Reader.openSession for this.nfcOmaSession + this.nfcOmaSession.close(); + this.result = "session close successfully"; +} catch (e) { + this.result = "session close exception:" + e.message; +} +``` + +## Session. isClosed + +isClosed(): boolean + +检查session是否关闭。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | ------------------------------------ | +| boolean | true:session状态已关闭,否则false。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +**示例:** + +```Js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; + +try { + // refer to Reader.openSession for this.nfcOmaSession + let ret = this.nfcOmaSession.isClosed(); + if (ret) { + this.result = "session state is closed"; + } else { + this.result = "session state is not closed"; + } +} catch (e) { + this.result = "isClosed exception:" + e.message; +} +``` + +## Session.closeChannels + +closeChannels(): void + +关闭此session上打开的所有channel。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; + +try { + // refer to Reader.openSession for this.nfcOmaSession + this.nfcOmaSession.closeChannels(); + this.result = "close Channels successfully"; +} catch (e) { + this.result = "closeChannels exception:" + e.message; +} +``` + +## Session.openBasicChannel + +openBasicChannel(aid: number[]): Promise + +获取基本channel,参考[ISO 7816-4]协议,返回Channel实例对象,SE不能提供新逻辑Channel或因缺乏可用逻辑Channel对象而无法获取访问控制规则,返回null。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | -------- | ------------------------------------------------------------ | +| aid | number[] | 在此channel上选择的applet的AID数组或如果没有applet被选择时空的数组null。 | + +**返回值:** + +| **类型** | **说明** | +| -------- | --------------------- | +| Channel | 可用Channel对象实例。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + // refer to Reader.openSession for this.nfcOmaSession + let getPromise = this.nfcOmaSession.openBasicChannel(this.aidArray); + getPromise.then((channel) => { + this.nfcOmaChannel = channel; + this.result = "openBasicChannel1 get channel successfully"; + }).catch ((err) => { + this.result = "openBasicChannel1 exception:" + err.message; + }); +} catch (e) { + this.result = "OpenBasicChannel1 exception:" + e.message; +} +``` + +## Session.openBasicChannel + + openBasicChannel(aid: number[], callback: AsyncCallback): void + +获取基本channel,参考[ISO 7816-4]协议,返回channel实例对象,SE不能提供新逻辑Channel或因缺乏可用逻辑Channel对象而无法获取访问控制规则,返回null。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | ---------------------- | ------------------------------------------------------------ | +| aid | number[] | 在此channel上选择的applet的AID数组或null 如果没有applet被选择。 | +| callback | AsyncCallback | callback返回可用Channel对象实例。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; +aidArray: number[] = [720, 1080]; + +try { + // refer to Reader.openSession for this.nfcOmaSession + this.nfcOmaSession.openBasicChannel(this.aidArray, (error, data) => { + if (error) { + this.result = "openBasicChannel2 failed:" + JSON.stringify(error); + return; + } + this.nfcOmaChannel = data; + this.result = "openBasicChannel2 get channel successfully"; + }); +} catch (e) { + this.result = "openBasicChannel2 exception:" + e.message; +} +``` + +## Session.openBasicChannel + +openBasicChannel(aid: number[], p2: number): Promise + +获取基本channel,参考[ISO 7816-4]协议,返回Channel实例对象,SE不能提供新逻辑Channel对象或因缺乏可用逻辑Channel对象而无法获取访问控制规则,返回null。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | -------- | ------------------------------------------------------------ | +| aid | number[] | 在此channel上选择的applet的AID数组或null 如果没有applet被选择。 | +| p2 | number | 在该channel上执行的SELECT APDU的P2参数。 | + +**返回值:** + +| **类型** | **说明** | +| -------- | --------------------- | +| Channel | 可用Channel对象实例。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; +aidArray: number[] = [720, 1080]; +p2: number = 0x00; + +try { + // refer to Reader.openSession for this.nfcOmaSession + let getPromise = this.nfcOmaSession.openBasicChannel(this.aidArray, this.p2); + getPromise.then((channel) => { + this.nfcOmaChannel = channel; + this.result = "openBasicChannel3 get channel successfully"; + }).catch ((err) => { + this.result = "openBasicChannel3 exception"; + }); +} catch (e) { + this.result = "openBasicChannel3 exception:" + e.message; +} +``` + +## Session.openBasicChannel + +openBasicChannel(aid: number[], p2:number, callback: AsyncCallback): void + +获取基本channel,参考[ISO 7816-4]协议,返回channel实例对象,SE不能提供新逻辑Channel对象或因缺乏可用逻辑Channel对象而无法获取访问控制规则,返回null。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | ---------------------- | ------------------------------------------------------------ | +| aid | number[] | 在此channel上选择的applet的AID数组或null 如果没有applet被选择。 | +| p2 | number | 此channel上执行SELECT APDU命令的P2参数。 | +| callback | AsyncCallback | callback返回可用Channel对象实例。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; +aidArray: number[] = [720, 1080]; +p2: number = 0x00; + +try { + // refer to Reader.openSession for this.nfcOmaSession + this.nfcOmaSession.openBasicChannel(this.aidArray, this.p2, (error, data) => { + if (error) { + this.result = "openBasicChannel4 failed:" + JSON.stringify(error); + return; + } + this.nfcOmaChannel = data; + this.result = "openBasicChannel4 get channel successfully"; + }); +} catch (e) { + this.result = "openBasicChannel4 exception:" + e.message; +} +``` + +## Session.openLogicalChannel + +openLogicalChannel(aid: number[]): Promise + +打开指定SE的逻辑Channel对象。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | -------- | --------------------------------------- | +| aid | number[] | 在该Channel对象上选择的applet AID数组。 | + +**返回值:** + +| **类型** | **说明** | +| -------- | ------------------------------------------------------------ | +| Channel | 返回可用Channel对象实例,SE不能提供新的Channel对象或因缺乏可用逻辑Channel对象无法获取访问控制规则返回null。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; +aidArray: number[] = [720, 1080]; + +try { + // refer to Reader.openSession for this.nfcOmaSession + let getPromise = this.nfcOmaSession.openLogicalChannel(this.aidArray) + getPromise.then((channel) => { + this.nfcOmaChannel = channel; + this.result = "openLogicChannel1 get channel successfully"; + }).catch ((err) => { + this.result = "openLogicChannel1 exception:" + err.message; + }); +} catch (e) { + this.result = "openLogicChannel1 exception:" + e.message; +} +``` + +## Session.openLogicalChannel + + openLogicalChannel(aid:number[], callback: AsyncCallback): void + +打开指定SE的逻辑Channel对象。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | ---------------------- | ------------------------------------------------------------ | +| aid | number[] | 在该Channel对象上被选择的applet AID数组。 | +| callback | AsyncCallback | callback返回可用Channel对象实例,SE不能提供新的channel或因缺乏可用逻辑Channel对象无法获取访问控制规则返回null。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; +aidArray: number[] = [720, 1080]; + +try { + // refer to Reader.openSession for this.nfcOmaSession + this.nfcOmaSession.openLogicalChannel(this.aidArray, (error, data) => { + if (error) { + this.result = "openLogicChannel2 failed:" + JSON.stringify(error); + return; + } + this.nfcOmaChannel = data; + this.result = "openLogicChannel2 get channel successfully"; + }); +} catch (e) { + this.result = "openLogicChannel2 exception:" + e.message; +} +``` + +## Session.openLogicalChannel + +openLogicalChannel(aid: number[], p2: number): Promise + +使用SE打开逻辑通道,选择由给定AID数组(AID非null且长度不为0)表示的applet. + +如果AID数组长度为0,则该方法将通过发送一个select命令来选择SE的Issuer Security Domain,该命令的AID长度为0(如[GPCS]中所定义)。 + +如果AID为Null,则该方法应仅发送MANAGE CHANNEL Open(管理通道打开),而不应发送SELECT(选择)命令。在这种情况下,默认情况下将选择与逻辑通道关联的默认applet. + +P2通常为0x00。设备应允许P2的任何值,并且应允许以下值: 0x00, 0x04, 0x08, 0x0C (如 [ISO 7816-4](https://www.iso.org/standard/77180.html)中所定义). + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | -------- | ----------------------------------------- | +| aid | number[] | 在该Channel对象上被选择的applet AID数组。 | +| p2 | number | 此channel上执行SELECT APDU命令的P2参数。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; +aidArray: number[] = [720, 1080]; +p2: number = 0x00; + +if (this.nfcOmaSession) { + try { + // refer to Reader.openSession for this.nfcOmaSession + let getPromise = this.nfcOmaSession.openLogicalChannel(this.aidArray, this.p2); + getPromise.then((channel) => { + this.nfcOmaChannel = channel; + this.result = "openLogicChannel3 get channel successfully"; + }).catch ((err) => { + this.result = "openLogicChannel3 exception"; + }) +} catch (e) { + this.result = "openLogicChannel3 exception:" + e.message; +} +``` + +## Session.openLogicalChannel + +openLogicalChannel(aid: number[], p2: number, callback: AsyncCallback):void + +使用SE打开逻辑通道,选择由给定AID数组(AID非null且长度不为0)表示的applet. + +如果AID数组长度为0,则该方法将通过发送一个select命令来选择SE的Issuer Security Domain,该命令的AID长度为0(如[GPCS]中所定义)。 + +如果AID为Null,则该方法应仅发送MANAGE CHANNEL Open(管理通道打开),而不应发送SELECT(选择)命令。在这种情况下,默认情况下将选择与逻辑通道关联的默认applet. + +P2通常为0x00。设备应允许P2的任何值,并且应允许以下值: 0x00, 0x04, 0x08, 0x0C (如 [ISO 7816-4](https://www.iso.org/standard/77180.html)中所定义). + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | ---------------------- | ------------------------------------------------------------ | +| aid | number[] | 在该Channel对象上被选择的applet AID数组。 | +| p2 | number | 此channel上执行SELECT APDU命令的P2参数。 | +| callback | AsyncCallback | callback返回可用Channel对象实例,SE不能提供新的Channel对象或因缺乏可用逻辑Channel对象无法获取访问控制规则返回null。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300102 | No such element exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; +aidArray: number[] = [720, 1080]; +p2: number = 0x00; + +try { + // refer to Reader.openSession for this.nfcOmaSession + this.nfcOmaSession.openLogicalChannel(this.aidArray, this.p2, (error, data) => { + if (error) { + this.result = "openLogicChannel4 failed:" + JSON.stringify(error); + return; + } + this.nfcOmaChannel = data; + this.result = "openLogicChannel4 get channel successfully"; + }) +} catch (e) { + this.result = "openLogicChannel4 exception:" + e.message; +} +``` + +## Channel. getSession + + getSession(): Session + +获取打开该channel的Session对象。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | ----------------------------- | +| Session | 该channel绑定的Session 对象。 | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + // refer to Session.openBasicChannel for this.nfcOmaChannel + let ret = this.nfcOmaChannel.getSession(); + if (ret) { + this.result = "get session successfully"; + } else { + this.result = "get session failed"; + } +} catch (e) { + this.result = "getSession exception:" + e.message; +} +``` + +## Channel. close + +close(): void + +关闭与SE的此channel。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaSession: secureElement.Session = null; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + // refer to Session.openBasicChannel for this.nfcOmaChannel + this.nfcOmaChannel.close(); + this.result = "channel close successfully"; +} catch (e) { + this.result = "channel close exception:" + e.message; +} +``` + +## Channel. isBasicChannel + +isBasicChannel(): boolean + +检查该channel是否为基本channel。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | ------------------------------------------------------------ | +| boolean | true: 该channel是基本channel false:该channel不是基本channel 。 | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + // refer to Session.openBasicChannel for this.nfcOmaChannel + let ret = this.nfcOmaChannel.isBasicChannel(); + if (ret) { + this.result = "isBasicChannel TRUE"; + } else { + this.result = "isBasicChannel FALSE"; + } +} catch (e) { + this.result = "isBasicChannel异常:" + e.message; +} +``` + +## Channel. isClosed + +isClosed(): boolean + +检查该channel是否为closed。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | --------------------------------------------- | +| boolean | true:channel是closed false: 不是closed状态。 | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + // refer to Session.openBasicChannel for this.nfcOmaChannel + let ret = this.nfcOmaChannel.isClosed(); + if (ret) { + this.result = "channel isClosed TRUE"; + } else { + this.result = "channel isClosed False"; + } +} catch (e) { + this.result = "Channel isClosed exception:" + e.message; +} +``` + +## Channel. getSelectResponse + +getSelectResponse():number[] + +返回从应用程序选择命令接收的数据,包括在applet选择时接收的状态字。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**返回值:** + +| **类型** | **说明** | +| -------- | ------------------------------------------------------------ | +| number[] | 返回从应用程序选择命令接收的数据,包括在applet选择时接收的状态字。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + // refer to Session.openBasicChannel for this.nfcOmaChannel + let ret = this.nfcOmaChannel.getSelectResponse(); + if (ret) { + this.result = "getSelectResponse result:["; + for (let i = 0; i < ret.length; ++i) { + this.result += ret[i]; + this.result += ' '; + } + this.result += ']'; + } else { + this.result = "getSelectResponse result is null"; + } +} catch (e) { + this.result = "getSelectResponse exception:" + e.message; +} +``` + +## Channel. transmit + +transmit(command: number[]): Promise + +向SE发送APDU命令(根据ISO/IEC 7816)。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | -------- | ------------------------------------- | +| command | number[] | 在该channel上被选择的applet AID数组。 | + +**返回值:** + +| **类型** | **说明** | +| -------- | -------------- | +| number[] | 响应结果数组。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + let command: number[] = [100, 200]; + // refer to Session.openBasicChannel for this.nfcOmaChannel + let getPromise = this.nfcOmaChannel.transmit(command); + getPromise.then((data) => { + this.result = "transmit1 result:["; + for (let i = 0; i < data.length; ++i) { + this.result += data[i]; + this.result += " "; + } + this.result += "]"; + }).catch ((err) => { + this.result = "transmit1 exception:" + err.code; + }) +} catch (e) { + this.result = "transit1 exception:" + e.message; +} +``` + +## Channel. transmit + +transmit(command: number[], callback: AsyncCallback): void + +向SE发送APDU命令(根据ISO/IEC 7816)。 + +**系统能力:** SystemCapability.Communication.SecureElement + +**参数:** + +| **参数名** | **类型** | **说明** | +| ---------- | ----------------------- | ------------------------------------- | +| command | number[] | 在该Channel上被选择的applet AID数组。 | +| callback | AsyncCallback | 返回接收到的响应的回调,number数组。 | + +**错误码:** + +错误码的详细介绍请参见[SE错误码](../errorcodes/errorcode-se.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------- | +| 3300101 | Illegal service state exception. | +| 3300103 | Illegal access rule exception. | +| 3300104 | Secure element IO exception. | + +**示例:** + +```js +import secureElement from '@ohos.secureElement'; + +@State result: string = ''; +@State nfcOmaChannel: secureElement.Channel = null; + +try { + let command: number[] = [100, 200]; + // refer to Session.openBasicChannel for this.nfcOmaChannel + this.nfcOmaChannel.transmit(command, (error, data) => { + if (error) { + this.result = "transmit2 exception:" + JSON.stringify(error); + return; + } + this.result = "transmit2 result:["; + for (let i = 0; i < data.length; ++i) { + this.result += data[i]; + this.result += " "; + } + this.result += "]"; + }); +} catch (e) { + this.result = "transit2 exception:" + e.message; +} +``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-socket.md b/zh-cn/application-dev/reference/apis/js-apis-socket.md index cd0818c7e6334706fff0e267312881430de96a0e..c1bf293b009d186d29945984ef6ee25f4d5a8c82 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-socket.md +++ b/zh-cn/application-dev/reference/apis/js-apis-socket.md @@ -2739,6 +2739,7 @@ close(callback: AsyncCallback\): void | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | +| 401 | Parameter error. | | 2303501 | SSL is null. | | 2303505 | Error occurred in the tls system call. | | 2303506 | Error clearing tls connection. | @@ -2774,6 +2775,7 @@ close(): Promise\ | 错误码ID | 错误信息 | | ------- | -------------------------------------------- | +| 401 | Parameter error. | | 2303501 | SSL is null. | | 2303505 | Error occurred in the tls system call. | | 2303506 | Error clearing tls connection. | diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md index 04a56228c6a240a710430585c75f8849dd7047ae..813277d8d46ad7f24e20b6e87a5abf3eda0c41ce 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md @@ -30,13 +30,13 @@ getSync(key: string, def?: string): string | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | key | string | 是 | 待查询的系统参数Key。 | -| def | string | 否 | def 为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined(返回空)或自定义的任意值 | +| def | string | 否 | def为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined或自定义的任意值 | **返回值:** | 类型 | 说明 | | -------- | -------- | -| string | 系统参数值,若key不存在,返回默认值。若未指定默认值,返回空字符串。 | +| string | 系统参数值。
若key存在,返回设定的值。
若key不存在且def有效,返回def;若未指定def或def无效(如undefined),返回空字符串。 | **示例:** @@ -44,7 +44,7 @@ getSync(key: string, def?: string): string try { var info = systemparameter.getSync("const.ohos.apiversion"); console.log(JSON.stringify(info)); -}catch(e){ +} catch(e) { console.log("getSync unexpected error: " + e); } ``` @@ -74,7 +74,7 @@ try { } else { console.log(" get test.parameter.key value err:" + err.code) }}); -}catch(e){ +} catch(e) { console.log("get unexpected error: " + e); } ``` @@ -106,7 +106,7 @@ try { console.log(" get test.parameter.key value err:" + err.code) } }); -}catch(e){ +} catch(e) { console.log("get unexpected error:" + e) } ``` @@ -124,7 +124,7 @@ get(key: string, def?: string): Promise<string> | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | key | string | 是 | 待查询的系统参数Key。 | -| def | string | 否 | def 为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined(返回空)或自定义的任意值 | +| def | string | 否 | def为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined或自定义的任意值 | **返回值:** @@ -142,7 +142,7 @@ try { }).catch(function (err) { console.log("get test.parameter.key error: " + err.code); }); -}catch(e){ +} catch(e) { console.log("get unexpected error: " + e); } ``` @@ -172,7 +172,7 @@ setSync(key: string, value: string): void ```ts try { systemparameter.setSync("test.parameter.key", "default"); -}catch(e){ +} catch(e) { console.log("set unexpected error: " + e); } ``` @@ -207,7 +207,7 @@ try { } else { console.log("set test.parameter.key value err:" + err.code) }}); -}catch(e){ +} catch(e) { console.log("set unexpected error: " + e); } ``` @@ -247,7 +247,7 @@ try { }).catch(function (err) { console.log(" set test.parameter.key error: " + err.code); }); -}catch(e){ +} catch(e) { console.log("set unexpected error: " + e); } ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md b/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md index 164cbfe180c1dd5a73436aa2f757fccaf4acb389..deb3aa478fd82c340b70cc088dda988e38ef1075 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md @@ -29,13 +29,13 @@ getSync(key: string, def?: string): string | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | key | string | 是 | 待查询的系统参数Key。 | -| def | string | 否 | def 为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined(返回空)或自定义的任意值 | +| def | string | 否 | def为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined或自定义的任意值 | **返回值:** | 类型 | 说明 | | -------- | -------- | -| string | 系统参数值,若key不存在,返回默认值。若未指定默认值,返回空字符串。 | +| string | 系统参数值
若key存在,返回设定的值。
若key不存在且def有效,返回def;若未指定def或def无效(如undefined),抛异常。 | **示例:** @@ -43,7 +43,7 @@ getSync(key: string, def?: string): string try { var info = systemparameter.getSync("const.ohos.apiversion"); console.log(JSON.stringify(info)); -}catch(e){ +} catch(e) { console.log("getSync unexpected error: " + e); } ``` @@ -73,7 +73,7 @@ try { } else { console.log(" get test.parameter.key value err:" + err.code) }}); -}catch(e){ +} catch(e) { console.log("get unexpected error: " + e); } ``` @@ -105,7 +105,7 @@ try { console.log(" get test.parameter.key value err:" + err.code) } }); -}catch(e){ +} catch(e) { console.log("get unexpected error:" + e) } ``` @@ -123,7 +123,7 @@ get(key: string, def?: string): Promise<string> | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | key | string | 是 | 待查询的系统参数Key。 | -| def | string | 否 | def 为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined(返回空)或自定义的任意值 | +| def | string | 否 | def为所要获取的系统参数的默认值
def为可选参数,仅当系统参数不存在时生效
def可以传undefined或自定义的任意值 | **返回值:** @@ -141,7 +141,7 @@ try { }).catch(function (err) { console.log("get test.parameter.key error: " + err.code); }); -}catch(e){ +} catch(e) { console.log("get unexpected error: " + e); } ``` @@ -166,7 +166,7 @@ setSync(key: string, value: string): void ```ts try { systemparameter.setSync("test.parameter.key", "default"); -}catch(e){ +} catch(e) { console.log("set unexpected error: " + e); } ``` @@ -197,7 +197,7 @@ try { } else { console.log("set test.parameter.key value err:" + err.code) }}); -}catch(e){ +} catch(e) { console.log("set unexpected error: " + e); } ``` @@ -233,7 +233,7 @@ try { }).catch(function (err) { console.log(" set test.parameter.key error: " + err.code); }); -}catch(e){ +} catch(e) { console.log("set unexpected error: " + e); } ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-webview.md b/zh-cn/application-dev/reference/apis/js-apis-webview.md index b177522deaaabfe4c8e4380fed701c8d8a235ad4..c9e95de117c820a9ed9283c76c877709d44ba07a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webview.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webview.md @@ -328,6 +328,7 @@ struct WebComponent { } ``` +加载的html文件。 ```html @@ -447,7 +448,7 @@ struct WebComponent { Button('close') .onClick(() => { try { - if (this.msgPort && this.msgPort[1]) { + if (this.msgPort && this.msgPort.length == 2) { this.msgPort[1].close(); } else { console.error("msgPort is null, Please initialize first"); @@ -667,7 +668,7 @@ struct WebComponent { .onClick(() => { try { // 通过$rawfile加载本地资源文件。 - this.controller.loadUrl($rawfile('xxx.html')); + this.controller.loadUrl($rawfile('index.html')); } catch (error) { console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); } @@ -694,7 +695,7 @@ struct WebComponent { .onClick(() => { try { // 通过resource协议加载本地资源文件。 - this.controller.loadUrl("resource://rawfile/xxx.html"); + this.controller.loadUrl("resource://rawfile/index.html"); } catch (error) { console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); } @@ -707,8 +708,9 @@ struct WebComponent { 3.通过沙箱路径加载本地文件,可以参考[web](../arkui-ts/ts-basic-components-web.md#web)加载沙箱路径的示例代码。 +加载的html文件。 ```html - + @@ -1339,6 +1341,23 @@ struct Index { } ``` +加载的html文件。 +```html + + + + + + Hello world! + + + + ### runJavaScript runJavaScript(script: string, callback : AsyncCallback\): void @@ -1402,6 +1421,24 @@ struct WebComponent { } ``` +加载的html文件。 +```html + + + + + + Hello world! + + + +``` + ### runJavaScript runJavaScript(script: string): Promise\ @@ -1466,6 +1503,23 @@ struct WebComponent { } ``` +加载的html文件。 +```html + + + + + + Hello world! + + + +``` ### runJavaScriptExt10+ @@ -1565,8 +1619,11 @@ struct WebComponent { } } } +``` -//index.html +加载的html文件。 +```html + @@ -1677,8 +1734,11 @@ struct WebComponent { } } } +``` -//index.html +加载的html文件。 +```html + @@ -2174,14 +2234,15 @@ struct WebComponent { console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); } }) - Web({ src: $rawfile('xxx.html'), controller: this.controller }) + Web({ src: $rawfile('index.html'), controller: this.controller }) } } } ``` +加载的html文件。 ```html - + @@ -2969,14 +3030,15 @@ struct WebComponent { console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); } }) - Web({ src: 'www.example.com', controller: this.controller }) + Web({ src: $rawfile('index.html'), controller: this.controller }) } } } ``` +加载的html文件。 ```html - + @@ -3041,14 +3103,15 @@ struct WebComponent { console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); } }) - Web({ src: 'www.example.com', controller: this.controller }) + Web({ src: $rawfile('index.html'), controller: this.controller }) } } } ``` +加载的html文件。 ```html - + @@ -3113,14 +3176,15 @@ struct WebComponent { console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); } }) - Web({ src: 'www.example.com', controller: this.controller }) + Web({ src: $rawfile('index.html'), controller: this.controller }) } } } ``` +加载的html文件。 ```html - + diff --git a/zh-cn/application-dev/reference/apis/js-apis-window.md b/zh-cn/application-dev/reference/apis/js-apis-window.md index bfee7e004ccd2290f269c66e2ae209ede3a2a326..0ba33e3d76faa25c48d8d4a1f949cbe73ebb11e3 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-window.md +++ b/zh-cn/application-dev/reference/apis/js-apis-window.md @@ -2418,6 +2418,53 @@ try { } ``` +### getUIContext10+ + +getUIContext(): UIContext + +获取UIContext实例。 + +**模型约束:** 此接口仅可在Stage模型下使用。 + +**系统能力:** SystemCapability.WindowManager.WindowManager.Core + +**返回值:** + +| 类型 | 说明 | +| ---------- | ---------------------- | +| [UIContext](./js-apis-arkui-UIContext.md#uicontext) | 返回UIContext实例对象。 | + +**示例:** + +```ts +import UIAbility from '@ohos.app.ability.UIAbility'; + +export default class EntryAbility extends UIAbility { + onWindowStageCreate(windowStage) { + // 为主窗口加载对应的目标页面。 + windowStage.loadContent("pages/page2", (err) => { + if (err.code) { + console.error('Failed to load the content. Cause:' + JSON.stringify(err)); + return; + } + console.info('Succeeded in loading the content.'); + }); + // 获取应用主窗口。 + let windowClass = null; + windowStage.getMainWindow((err, data) => { + if (err.code) { + console.error('Failed to obtain the main window. Cause: ' + JSON.stringify(err)); + return; + } + windowClass = data; + console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data)); + // 获取UIContext实例。 + globalThis.uiContext = windowClass.getUIContext(); + }) + } +}; +``` + ### setUIContent9+ setUIContent(path: string, callback: AsyncCallback<void>): void diff --git a/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md b/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md index 083f2111f337569553990043e8bea0c4753c6446..36b7698a06178faf441e9698eefb15853f61d034 100644 --- a/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md +++ b/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md @@ -33,23 +33,21 @@ - [颜色渐变](ts-universal-attributes-gradient-color.md) - [Popup控制](ts-universal-attributes-popup.md) - [Menu控制](ts-universal-attributes-menu.md) - - [点击控制](ts-universal-attributes-click.md) - [焦点控制](ts-universal-attributes-focus.md) - [悬浮态效果](ts-universal-attributes-hover-effect.md) - [组件标识](ts-universal-attributes-component-id.md) - - [触摸热区设置](ts-universal-attributes-touch-target.md) - [多态样式](ts-universal-attributes-polymorphic-style.md) - - [触摸测试控制](ts-universal-attributes-hit-test-behavior.md) - - [组件背景模糊](ts-universal-attributes-backgroundBlurStyle.md) - [分布式迁移标识](ts-universal-attributes-restoreId.md) - [前景色设置](ts-universal-attributes-foreground-color.md) - - [图像球面效果](ts-universal-attributes-sphericalEffect.md) - - [图像渐亮效果](ts-universal-attributes-lightUpEffect.md) - - [图像边缘像素扩展效果](ts-universal-attributes-pixelStretchEffect.md) - [点击回弹](ts-universal-attributes-click-effect.md) + - 触摸交互控制 + - [点击控制](ts-universal-attributes-click.md) + - [触摸热区设置](ts-universal-attributes-touch-target.md) + - [触摸测试控制](ts-universal-attributes-hit-test-behavior.md) - 模态转场设置 - [全屏模态转场](ts-universal-attributes-modal-transition.md) - [半模态转场](ts-universal-attributes-sheet-transition.md) + - [隐私遮罩](ts-universal-attributes-obscured.md) - [文本通用属性](ts-universal-attributes-text-style.md) - [安全控件通用属性](ts-universal-attributes-securitycomponent.md) - 手势处理 @@ -161,7 +159,6 @@ - [Matrix2D](ts-components-canvas-matrix2d.md) - [OffscreenCanvasRenderingContext2D对象](ts-offscreencanvasrenderingcontext2d.md) - [Path2D对象](ts-components-canvas-path2d.md) - - [Lottie](ts-components-canvas-lottie.md) - 动画 - [属性动画](ts-animatorproperty.md) - [显式动画](ts-explicit-animation.md) diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/DataPickerDialog.gif b/zh-cn/application-dev/reference/arkui-ts/figures/DataPickerDialog.gif new file mode 100644 index 0000000000000000000000000000000000000000..f16653bb3fb1c69d1ecbe2702a676d7200a1111f Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/DataPickerDialog.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/TextPickerDialog.gif b/zh-cn/application-dev/reference/arkui-ts/figures/TextPickerDialog.gif new file mode 100644 index 0000000000000000000000000000000000000000..81dbc3fdfaf99298e7272654398db6b6b8af387a Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/TextPickerDialog.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/TimePickerDialog.gif b/zh-cn/application-dev/reference/arkui-ts/figures/TimePickerDialog.gif new file mode 100644 index 0000000000000000000000000000000000000000..834e4ff3d13b357479c261b24e431e813c0eb616 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/TimePickerDialog.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/arkts-progress.png b/zh-cn/application-dev/reference/arkui-ts/figures/arkts-progress.png index d50f4b47628b425b09f93bc9a44853ad79e12631..8e16510ddae266f037cce57857c3dc2ecc14ce2e 100644 Binary files a/zh-cn/application-dev/reference/arkui-ts/figures/arkts-progress.png and b/zh-cn/application-dev/reference/arkui-ts/figures/arkts-progress.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/obscured.png b/zh-cn/application-dev/reference/arkui-ts/figures/obscured.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb469730fae3b5df6c5b252bb7bbc050c958fe2 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/obscured.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001194352468.gif b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001194352468.gif deleted file mode 100644 index 58feeb2988e8d9a643234691ae4d5cf5ccef6d4f..0000000000000000000000000000000000000000 Binary files a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001194352468.gif and /dev/null differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-appendix-enums.md b/zh-cn/application-dev/reference/arkui-ts/ts-appendix-enums.md index 694fd314a6a83aadad95aa532c6cd7a4ff15ef4f..91321b4c38d05184db5e6dcad193f5d088c60c02 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-appendix-enums.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-appendix-enums.md @@ -410,7 +410,7 @@ | Start | 水平对齐首部。 | | Center | 水平居中对齐。 | | End | 水平对齐尾部。 | -| Justify10+ | 双端对齐。 | +| JUSTIFY10+ | 双端对齐。 | ## TextOverflow @@ -421,7 +421,7 @@ | None | 文本超长时裁剪显示。 | | Clip | 文本超长时进行裁剪显示。 | | Ellipsis | 文本超长时显示不下的文本用省略号代替。 | -| Marquee10+ | 文本超长时以跑马灯的方式展示。 | +| MARQUEE10+ | 文本超长时以跑马灯的方式展示。 | ## TextDecorationType @@ -505,25 +505,25 @@ | Thin | 轻薄材质模糊。 | | Regular | 普通厚度材质模糊。 | | Thick | 厚材质模糊。 | -| BackgroundThin | 近距景深模糊。 | -| BackgroundRegular | 中距景深模糊。 | -| BackgroundThick | 远距景深模糊。 | -| BackgroundUltraThick | 超远距景深模糊。 | +| BACKGROUND_THIN | 近距景深模糊。 | +| BACKGROUND_REGULAR | 中距景深模糊。 | +| BACKGROUND_THICK | 远距景深模糊。 | +| BACKGROUND_ULTRA_THICK | 超远距景深模糊。 | ## ThemeColorMode10+ | 名称 | 描述 | | ------ | ---------- | -| System | 跟随系统深浅色模式。 | -| Light | 固定使用浅色模式。 | -| Dark | 固定使用深色模式。 | +| SYSTEM | 跟随系统深浅色模式。 | +| LIGHT | 固定使用浅色模式。 | +| DARK | 固定使用深色模式。 | ## AdaptiveColor10+ | 名称 | 描述 | | ------- | ------------------------- | -| Default | 不使用取色模糊。使用默认的颜色作为蒙版颜色。 | -| Average | 使用取色模糊。将取色区域的颜色平均值作为蒙版颜色。 | +| DEFAULT | 不使用取色模糊。使用默认的颜色作为蒙版颜色。 | +| AVERAGE | 使用取色模糊。将取色区域的颜色平均值作为蒙版颜色。 | ## TextHeightAdaptivePolicy10+ @@ -533,7 +533,16 @@ | MIN_FONT_SIZE_FIRST | 设置文本高度自适应方式为以缩小字体优先。 | | LAYOUT_CONSTRAINT_FIRST | 设置文本高度自适应方式为以布局约束(高度)优先。 | +## ObscuredReasons10+ + +该接口支持在ArkTS卡片中使用。 + +| 名称 | 描述 | +| ----------- | ------------------------ | +| PLACEHOLDER | 显示的数据为通用占位符。 | + ## TransitionEdge10+ + | 名称 | 描述 | | ------ | ------ | | TOP | 窗口的上边缘 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md index c6405174c194a2e4f0fd89b68ce5a75d6b8b5cae..332676543c8b0a85d795a6ecee41230e44bfa9f3 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md @@ -30,12 +30,12 @@ DatePicker(options?: {start?: Date, end?: Date, selected?: Date}) 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: -| 名称 | 参数类型 | 描述 | -| -------------------------------- | ---------------------------------------- | ---------------------------------------- | -| lunar | boolean | 日期是否显示农历。
- true:展示农历。
- false:不展示农历。
默认值:false | -| disappearTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | -| textStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | -| selectedTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。 | +| 名称 | 参数类型 | 描述 | +| -------------------------------- | --------------------------------------------- | ------------------------------------------------------------ | +| lunar | boolean | 日期是否显示农历。
- true:展示农历。
- false:不展示农历。
默认值:false | +| disappearTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} | +| textStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} | +| selectedTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} | ## PickerTextStyle10+类型说明 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md index e8860c1c628ec2fe1836bf63e2acdf40494bae97..b38a0b4fcb0a039ddad107959f0856456d4cb0b0 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md @@ -60,9 +60,39 @@ Progress(options: {value: number, total?: number, type?: ProgressType}) | 名称 | 参数类型 | 描述 | | ------------------ | ---------------------------------------- | ---------------------------------------- | | value | number | 设置当前进度值。设置小于0的数值时置为0,设置大于total的数值时置为total。非法数值不生效。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| color | [ResourceColor](ts-types.md#resourcecolor) | 设置进度条前景色。
默认值:'\#ff007dff'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| backgroundColor | [ResourceColor](ts-types.md#resourcecolor) | 设置进度条底色。
默认值:'\#19182431'

从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| style8+ | {
strokeWidth?: [Length](ts-types.md#length),
scaleCount?: number,
scaleWidth?: [Length](ts-types.md#length)
} | 定义组件的样式。
- strokeWidth: 设置进度条宽度(不支持百分比设置)。从API version9开始,环形进度条设置宽度大于等于半径时,默认修改宽度至半径值的二分之一。
默认值:4.0Vp
- scaleCount: 设置环形进度条总刻度数。
默认值:120
- scaleWidth: 设置环形进度条刻度粗细(不支持百分比设置),刻度粗细大于进度条宽度时,为系统默认粗细。
默认值:2.0Vp
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| color | [ResourceColor](ts-types.md#resourcecolor) \| [LinearGradient10+](ts-basic-components-datapanel.md#lineargradient10) | 设置进度条前景色。从API version 10开始支持利用LinearGradient设置Ring样式的渐变色。
默认值(API version 9):'\#ff007dff'
默认值(API version 10):
- Capsule:'\#33006cde'
- Ring:起始端:'\#ff3b61f7',结束端:'\#ff6591bf'
- 其他样式:'\#ff007dff'
从API version 9开始,该接口支持在ArkTS卡片中使用,暂不支持LinearGradient。| +| backgroundColor | [ResourceColor](ts-types.md#resourcecolor) | 设置进度条底色。
默认值(API version 9):'\#19182431'
默认值(API version 10):
- Capsule:'\#33ffffff'
- Ring:'\#08182431'
- 其他样式:'\#19182431'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| style8+ | [ProgressStyleOptions](#progressstyleoptions) \| [CapsuleStyleOptions10+](#capsulestyleoptions10) \| [RingStyleOptions10+](#ringstyleoptions10) | 定义组件的样式。从API version 10开始追加CapsuleStyleOptions和RingStyleOptions类型。
- CapsuleStyleOptions用于设置Capsule的样式。
- RingStyleOptions用于设置Ring的样式。
- ProgressStyleOptions设置其他类型进度条的样式。
从API version 9开始,该接口支持在ArkTS卡片中设置ProgressStyleOptions,暂不支持CapsuleStyleOptions和RingStyleOptions。 | + +## ProgressStyleOptions +| 名称 | 参数类型 | 必填 | 描述 | +| ------------ | ---------------------------- | ---- | ------------------------------------------------------------------------------------------ | +| strokeWidth | [Length](ts-types.md#length) | 否 | 设置进度条宽度(不支持百分比设置)。
默认值:4.0Vp | +| scaleCount | number | 否 | 设置环形进度条总刻度数。
默认值:120 | +| scaleWidth | [Length](ts-types.md#length) | 否 | 设置环形进度条刻度粗细(不支持百分比设置),刻度粗细大于进度条宽度时,为系统默认粗细。
默认值:2.0Vp | + +## CapsuleStyleOptions10+ +| 名称 | 参数类型 | 必填 | 描述 | +| ------------- | ------- | ---- | -------- | +| borderColor | [ResourceColor](ts-types.md#resourcecolor) | 否 | 内描边颜色。
默认值:'\#33006cde' | +| borderWidth | [Length](ts-types.md#length) | 否 | 内描边宽度。
默认值:1Vp | +| content | string | 否 | 文本内容,应用可自定义。 | +| font | [Font](ts-types.md#font) | 否 | 文本样式。
默认值:
- 文本大小:12Fp
其他文本参数跟随text组件的主题值。| +| fontColor | [ResourceColor](ts-types.md#resourcecolor) | 否 | 文本颜色。
默认值:'\#ff182431' | +| enableScanEffect | boolean | 否 | 扫光效果的开关。
默认值:false | + +## RingStyleOptions10+ +| 名称 | 参数类型 | 必填 | 描述 | +| ------------- | ---------------------------- | ---- | ------------------------------------------------------------------------------------------ | +| strokeWidth | [Length](ts-types.md#length) | 否 | 设置进度条宽度(不支持百分比设置),宽度大于等于半径时,默认修改宽度至半径值的二分之一。
默认值:4Vp | +| shadow | boolean | 否 | 进度条阴影开关。
默认值:false | +| status | [ProgressStatus10+](#progressstatus10枚举说明) | 否 | 进度条状态,当设置为LOADING时会开启检查更新动效,此时设置进度值不生效。
默认值: ProgressStatus.PROGRESSING | + +## ProgressStatus10+枚举说明 +| 名称 | 描述 | +| ----------------------- | ---------------- | +| LOADING10+ | 加载中。 | +| PROGRESSING10+ | 进度更新中。 | ## 事件 @@ -111,7 +141,7 @@ struct ProgressExample { Progress({ value: 10, type: ProgressType.Ring }).width(100) Progress({ value: 20, total: 150, type: ProgressType.Ring }) .color(Color.Grey).value(50).width(100) - .style({ strokeWidth: 20, scaleCount: 30, scaleWidth: 20 }) + .style({ strokeWidth: 20 }) } Text('Capsule Progress').fontSize(9).fontColor(0xCCCCCC).width('90%') diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md index 089c0d5798917c17966d61da4487da1cd2bb6a7d..b13dc7ce3ed655f800f5a2443ddca15a1a19b1f4 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md @@ -28,10 +28,10 @@ Rating(options?: { rating: number, indicator?: boolean }) ## 属性 -| 名称 | 参数类型 | 描述 | -| --------- | ---------------------------------------- | ---------------------------------------- | -| stars | number | 设置评分总数。
默认值:5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按默认值显示。 | -| stepSize | number | 操作评级的步长。
默认值:0.5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按默认值显示。
取值范围为[0.1, stars]。 | +| 名称 | 参数类型 | 描述 | +| --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| stars | number | 设置评分总数。
默认值:5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于等于0的值时,按默认值显示。 | +| stepSize | number | 操作评级的步长。
默认值:0.5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按默认值显示。
取值范围为[0.1, stars]。 | | starStyle | {
backgroundUri: string,
foregroundUri: string,
secondaryUri?: string
} | backgroundUri:未选中的星级的图片链接,可由用户自定义或使用系统默认图片。
foregroundUri:选中的星级的图片路径,可由用户自定义或使用系统默认图片。
secondaryUir:部分选中的星级的图片路径,可由用户自定义或使用系统默认图片。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
startStyle属性所支持的图片类型能力参考[Image](ts-basic-components-image.md)组件。
支持加载本地图片和网络图片,暂不支持PixelMap类型和Resource资源。
默认图片加载方式为异步,暂不支持同步加载。
设置值为undefined或者空字符串时,rating会选择加载系统默认星型图源。 | > **说明:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md index 88a73673ec288aa1e2593aae85d68cfd09971a3b..30078a875f6e55a7c092ca96427d93653c4cdc97 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md @@ -22,7 +22,7 @@ Slider(options?: {value?: number, min?: number, max?: number, step?: number, sty | 参数名 | 参数类型 | 必填 | 参数描述 | | -------- | -------- | -------- | -------- | -| value | number | 否 | 当前进度值。
默认值:min
从API version 10开始,该参数支持[$$](../../quick-start/arkts-two-way-sync.md)双向绑定变量。 | +| value | number | 否 | 当前进度值。
默认值:参数min
从API version 10开始,该参数支持[$$](../../quick-start/arkts-two-way-sync.md)双向绑定变量。 | | min | number | 否 | 设置最小值。
默认值:0 | | max | number | 否 | 设置最大值。
默认值:100
**说明:**
min >= max异常情况,min取默认值0,max取默认值100。
value不在[min, max]范围之内,取min/max,靠近min取min,靠近max取max。 | | step | number | 否 | 设置Slider滑动步长。
默认值:1
取值范围:[0.01, max]
**说明:**
设置小于0或百分比的值时,按默认值显示。 | @@ -47,7 +47,7 @@ Slider(options?: {value?: number, min?: number, max?: number, step?: number, sty | trackColor | [ResourceColor](ts-types.md#resourcecolor) | 设置滑轨的背景颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。| | selectedColor | [ResourceColor](ts-types.md#resourcecolor) | 设置滑轨的已滑动部分颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | | showSteps | boolean | 设置当前是否显示步长刻度值。
默认值:false
从API version 9开始,该接口支持在ArkTS卡片中使用。| -| showTips | boolean | 设置滑动时是否显示百分比气泡提示。
默认值:false
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
当direction的属性值为Axis.Horizontal时,tip显示在滑块正上方。值为Axis.Vertical时,tip显示在滑块正左边。
tip的绘制区域为Slider自身节点的overlay。
Slider不设置边距,或者边距比较小时,tip会被截断。 | +| showTips | value: boolean,
content10+?: [ResourceStr](ts-types.md#resourcestr) | value:设置滑动时是否显示气泡提示。
默认值:false
content:设置气泡提示的文本内容,默认显示当前百分比。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
当direction的值为Axis.Horizontal时,tip显示在滑块正上方。值为Axis.Vertical时,tip显示在滑块正左边。
tip的绘制区域为Slider自身节点的overlay。
Slider不设置边距或者边距比较小时,tip会被截断。| | trackThickness | [Length](ts-types.md#length) | 设置滑轨的粗细。
默认值:当参数style的值设置[SliderStyle](#sliderstyle枚举说明).OutSet 时为 4.0vp,[SliderStyle](#sliderstyle枚举说明).InSet时为20.0vp
从APIversion9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按默认值显示。 | | blockBorderColor10+ | [ResourceColor](ts-types.md#resourcecolor) | 设置滑块描边颜色。 | | blockBorderWidth10+ | [Length](ts-types.md#length) | 设置滑块描边粗细。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md index 2bbed5719a9e4c7cd2a1793bbd0614270bf16c67..831a2a19a89c65ba815b591d9fb541079fbaf2ff 100755 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md @@ -47,9 +47,9 @@ TextPicker(options?: {range: string[] | string[][] | Resource | TextPickerRangeC | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | | defaultPickerItemHeight | number \| string | 设置Picker各选择项的高度。 | -| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | -| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | -| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。 | +| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} | +| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} | +| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} | | selectedIndex10+ | number \| number[] | 设置默认选中项在数组中的索引值,优先级高于options中的选中值。
**说明**:单列数据选择器使用number类型。多列、多列联动数据选择器使用number[]类型。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md index d472725ac4eaedb592d8fa813d5715b884b1b87a..654535bb907e002000994e20f40550abca2593ba 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md @@ -28,12 +28,12 @@ TimePicker(options?: {selected?: Date}) 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: -| 名称 | 参数类型 | 描述 | -| -------------------------------- | ---------------------------------------- | ----------------------------------- | -| useMilitaryTime | boolean | 展示时间是否为24小时制,不支持动态修改。
默认值:false | -| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | -| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | -| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。 | +| 名称 | 参数类型 | 描述 | +| -------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| useMilitaryTime | boolean | 展示时间是否为24小时制。
默认值:false | +| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} | +| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} | +| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md index d42ed77c08203d2cb6e12270cb022d14a9a3d0cd..a9d3af33171e7028622e8ffc2ea69bfa853179e7 100755 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md @@ -90,7 +90,7 @@ Web(options: { src: ResourceStr, controller: WebviewController | WebController}) ```ts // xxx.ets import web_webview from '@ohos.web.webview' - let url = 'file://' + globalThis.filesDir + '/xxx.html' + let url = 'file://' + globalThis.filesDir + '/index.html' @Entry @Component @@ -121,6 +121,7 @@ Web(options: { src: ResourceStr, controller: WebviewController | WebController}) } ``` + 加载的html文件。 ```html @@ -585,15 +586,16 @@ horizontalScrollBarAccess(horizontalScrollBar: boolean) controller: web_webview.WebviewController = new web_webview.WebviewController() build() { Column() { - Web({ src: 'www.example.com', controller: this.controller }) + Web({ src: $rawfile('index.html'), controller: this.controller }) .horizontalScrollBarAccess(true) } } } ``` + 加载的html文件。 ```html - + @@ -638,15 +640,16 @@ verticalScrollBarAccess(verticalScrollBar: boolean) controller: web_webview.WebviewController = new web_webview.WebviewController() build() { Column() { - Web({ src: 'www.example.com', controller: this.controller }) + Web({ src: $rawfile('index.html'), controller: this.controller }) .verticalScrollBarAccess(true) } } } ``` + 加载的html文件。 ```html - + @@ -1418,7 +1421,7 @@ onAlert(callback: (event?: { url: string; message: string; result: JsResult }) = controller: web_webview.WebviewController = new web_webview.WebviewController() build() { Column() { - Web({ src: $rawfile("xxx.html"), controller: this.controller }) + Web({ src: $rawfile("index.html"), controller: this.controller }) .onAlert((event) => { console.log("event.url:" + event.url) console.log("event.message:" + event.message) @@ -1448,8 +1451,9 @@ onAlert(callback: (event?: { url: string; message: string; result: JsResult }) = } ``` - ``` - + 加载的html文件。 + ```html + @@ -1500,7 +1504,7 @@ onBeforeUnload(callback: (event?: { url: string; message: string; result: JsResu build() { Column() { - Web({ src: $rawfile("xxx.html"), controller: this.controller }) + Web({ src: $rawfile("index.html"), controller: this.controller }) .onBeforeUnload((event) => { console.log("event.url:" + event.url) console.log("event.message:" + event.message) @@ -1530,8 +1534,9 @@ onBeforeUnload(callback: (event?: { url: string; message: string; result: JsResu } ``` - ``` - + 加载的html文件。 + ```html + @@ -1582,7 +1587,7 @@ onConfirm(callback: (event?: { url: string; message: string; result: JsResult }) build() { Column() { - Web({ src: $rawfile("xxx.html"), controller: this.controller }) + Web({ src: $rawfile("index.html"), controller: this.controller }) .onConfirm((event) => { console.log("event.url:" + event.url) console.log("event.message:" + event.message) @@ -1612,8 +1617,9 @@ onConfirm(callback: (event?: { url: string; message: string; result: JsResult }) } ``` - ``` - + 加载的html文件。 + ```html + @@ -1671,7 +1677,7 @@ onPrompt(callback: (event?: { url: string; message: string; value: string; resul build() { Column() { - Web({ src: $rawfile("xxx.html"), controller: this.controller }) + Web({ src: $rawfile("index.html"), controller: this.controller }) .onPrompt((event) => { console.log("url:" + event.url) console.log("message:" + event.message) @@ -1702,8 +1708,9 @@ onPrompt(callback: (event?: { url: string; message: string; value: string; resul } ``` - ``` - + 加载的html文件。 + ```html + @@ -4933,6 +4940,7 @@ registerJavaScriptProxy(options: { object: object, name: string, methodList: Arr } ``` + 加载的html文件。 ```html @@ -4993,7 +5001,7 @@ runJavaScript(options: { script: string, callback?: (result: string) => void }) } } ``` - + 加载的html文件。 ```html @@ -5009,7 +5017,6 @@ runJavaScript(options: { script: string, callback?: (result: string) => void }) } - ``` ### stop(deprecated) @@ -5075,18 +5082,11 @@ clearHistory(): void 通过WebCookie可以控制Web组件中的cookie的各种行为,其中每个应用中的所有web组件共享一个WebCookie。通过controller方法中的getCookieManager方法可以获取WebCookie对象,进行后续的cookie管理操作。 ### setCookie(deprecated) -setCookie(url: string, value: string): boolean +setCookie(): boolean 设置cookie,该方法为同步方法。设置成功返回true,否则返回false。 从API version 9开始不再维护,建议使用[setCookie9+](../apis/js-apis-webview.md#setcookie)代替。 -**参数:** - -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ----- | ------ | ---- | ---- | ----------------- | -| url | string | 是 | - | 要设置的cookie所属的url,建议使用完整的url。 | -| value | string | 是 | - | cookie的值。 | - **返回值:** | 类型 | 说明 | @@ -5106,7 +5106,7 @@ setCookie(url: string, value: string): boolean Column() { Button('setCookie') .onClick(() => { - let result = this.controller.getCookieManager().setCookie("https://www.example.com", "a=b") + let result = this.controller.getCookieManager().setCookie() console.log("result: " + result) }) Web({ src: 'www.example.com', controller: this.controller }) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md b/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md index 1e4a0f358d76a285de40d13f7ee59bbcc366b28f..cf4a76859576bab80b452fc8d8b1958f59f291b0 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md @@ -16,9 +16,9 @@ CanvasRenderingContext2D(settings?: RenderingContextSettings) **参数:** -| 参数名 | 参数类型 | 必填 | 参数描述 | -| ------- | ---------------------------------------- | ---- | ---------------------------------------- | -| setting | [RenderingContextSettings](#renderingcontextsettings) | 否 | 见[RenderingContextSettings](#renderingcontextsettings)。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | ---------------------------------------- | ---- | ---------------------------------------- | +| settings | [RenderingContextSettings](#renderingcontextsettings) | 否 | 见[RenderingContextSettings](#renderingcontextsettings)。 | ### RenderingContextSettings @@ -38,30 +38,30 @@ RenderingContextSettings(antialias?: boolean) ## 属性 -| 名称 | 类型 | 描述 | -| ----------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 指定绘制的填充色。
- 类型为string时,表示设置填充区域的颜色。
- 类型为number时,表示设置填充区域的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [lineWidth](#linewidth) | number | 设置绘制线条的宽度。 | -| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 设置描边的颜色。
- 类型为string时,表示设置描边使用的颜色。
- 类型为number时,表示设置描边使用的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [lineCap](#linecap) | CanvasLineCap | 指定线端点的样式,可选值为:
- 'butt':线端点以方形结束。
- 'round':线端点以圆形结束。
- 'square':线端点以方形结束,该样式下会增加一个长度和线段厚度相同,宽度是线段厚度一半的矩形。
默认值:'butt'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [lineJoin](#linejoin) | CanvasLineJoin | 指定线段间相交的交点样式,可选值为:
- 'round':在线段相连处绘制一个扇形,扇形的圆角半径是线段的宽度。
- 'bevel':在线段相连处使用三角形为底填充, 每个部分矩形拐角独立。
- 'miter':在相连部分的外边缘处进行延伸,使其相交于一点,形成一个菱形区域,该属性可以通过设置miterLimit属性展现效果。
默认值:'miter'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [miterLimit](#miterlimit) | number | 设置斜接面限制值,该值指定了线条相交处内角和外角的距离。
默认值:10
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [font](#font) | string | 设置文本绘制中的字体样式。
语法:ctx.font='font-size font-family'
- font-size(可选),指定字号和行高,单位只支持px。
- font-family(可选),指定字体系列。
语法:ctx.font='font-style font-weight font-size font-family'
- font-style(可选),用于指定字体样式,支持如下几种样式:'normal','italic'。
- font-weight(可选),用于指定字体的粗细,支持如下几种类型:'normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900。
- font-size(可选),指定字号和行高,单位支持px、vp。使用时需要添加单位。
- font-family(可选),指定字体系列,支持如下几种类型:'sans-serif', 'serif', 'monospace'。
默认值:'normal normal 14px sans-serif'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [textAlign](#textalign) | CanvasTextAlign | 设置文本绘制中的文本对齐方式,可选值为:
- 'left':文本左对齐。
- 'right':文本右对齐。
- 'center':文本居中对齐。
- 'start':文本对齐界线开始的地方。
- 'end':文本对齐界线结束的地方。
ltr布局模式下'start'和'left'一致,rtl布局模式下'start'和'right'一致·。
默认值:'left'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [textBaseline](#textbaseline) | CanvasTextBaseline | 设置文本绘制中的水平对齐方式,可选值为:
- 'alphabetic':文本基线是标准的字母基线。
- 'top':文本基线在文本块的顶部。
- 'hanging':文本基线是悬挂基线。
- 'middle':文本基线在文本块的中间。
- 'ideographic':文字基线是表意字基线;如果字符本身超出了alphabetic基线,那么ideograhpic基线位置在字符本身的底部。
- 'bottom':文本基线在文本块的底部。 与ideographic基线的区别在于ideographic基线不需要考虑下行字母。
默认值:'alphabetic'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [globalAlpha](#globalalpha) | number | 设置透明度,0.0为完全透明,1.0为完全不透明。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [lineDashOffset](#linedashoffset) | number | 设置画布的虚线偏移量,精度为float。
默认值:0.0
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [globalCompositeOperation](#globalcompositeoperation) | string | 设置合成操作的方式。类型字段可选值有'source-over','source-atop','source-in','source-out','destination-over','destination-atop','destination-in','destination-out','lighter','copy','xor'。
默认值:'source-over'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowBlur](#shadowblur) | number | 设置绘制阴影时的模糊级别,值越大越模糊,精度为float。
默认值:0.0
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowColor](#shadowcolor) | string | 设置绘制阴影时的阴影颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowOffsetX](#shadowoffsetx) | number | 设置绘制阴影时和原有对象的水平偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowOffsetY](#shadowoffsety) | number | 设置绘制阴影时和原有对象的垂直偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | 用于设置绘制图片时是否进行图像平滑度调整,true为启用,false为不启用。
默认值:true
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [height](#height) | number | 组件高度。
单位:vp
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [width](#width) | number | 组件宽度。
单位:vp
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [imageSmoothingQuality](#imagesmoothingquality) |ImageSmoothingQuality | imageSmoothingEnabled为true时,用于设置图像平滑度。可选值为:
- 'low':低画质
- 'medium':中画质
- 'high':高画质。
默认值:low
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [direction](#direction) |CanvasDirection | 用于设置绘制文字时使用的文字方向。可选值为:
- 'inherit':继承canvas组件已设定的文本方向
- 'ltr':从左往右
- 'rtl':从右往左。
默认值:inherit
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [filter](#filter) |string | 用于设置图像的滤镜。支持的滤镜效果如下:
- 'none': 无滤镜效果
- 'blur':给图像设置高斯模糊
- 'brightness':给图片应用一种线性乘法,使其看起来更亮或更暗
- 'contrast':调整图像的对比度
- 'grayscale':将图像转换为灰度图像
- 'hue-rotate':给图像应用色相旋转
- 'invert':反转输入图像
- 'opacity':转化图像的透明程度
- 'saturate':转换图像饱和度
- 'sepia':将图像转换为深褐色
默认值:'none'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| 名称 | 类型 | 描述 | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 指定绘制的填充色。
- 类型为string时,表示设置填充区域的颜色。
- 类型为number时,表示设置填充区域的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [lineWidth](#linewidth) | number | 设置绘制线条的宽度。 | +| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 设置描边的颜色。
- 类型为string时,表示设置描边使用的颜色。
- 类型为number时,表示设置描边使用的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [lineCap](#linecap) | CanvasLineCap | 指定线端点的样式,可选值为:
- 'butt':线端点以方形结束。
- 'round':线端点以圆形结束。
- 'square':线端点以方形结束,该样式下会增加一个长度和线段厚度相同,宽度是线段厚度一半的矩形。
默认值:'butt'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [lineJoin](#linejoin) | CanvasLineJoin | 指定线段间相交的交点样式,可选值为:
- 'round':在线段相连处绘制一个扇形,扇形的圆角半径是线段的宽度。
- 'bevel':在线段相连处使用三角形为底填充, 每个部分矩形拐角独立。
- 'miter':在相连部分的外边缘处进行延伸,使其相交于一点,形成一个菱形区域,该属性可以通过设置miterLimit属性展现效果。
默认值:'miter'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [miterLimit](#miterlimit) | number | 设置斜接面限制值,该值指定了线条相交处内角和外角的距离。
默认值:10
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [font](#font) | string | 设置文本绘制中的字体样式。
语法:ctx.font='font-size font-family'
- font-size(可选),指定字号和行高,单位只支持px。
- font-family(可选),指定字体系列。
语法:ctx.font='font-style font-weight font-size font-family'
- font-style(可选),用于指定字体样式,支持如下几种样式:'normal','italic'。
- font-weight(可选),用于指定字体的粗细,支持如下几种类型:'normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900。
- font-size(可选),指定字号和行高,单位支持px、vp。使用时需要添加单位。
- font-family(可选),指定字体系列,支持如下几种类型:'sans-serif', 'serif', 'monospace'。
默认值:'normal normal 14px sans-serif'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [textAlign](#textalign) | CanvasTextAlign | 设置文本绘制中的文本对齐方式,可选值为:
- 'left':文本左对齐。
- 'right':文本右对齐。
- 'center':文本居中对齐。
- 'start':文本对齐界线开始的地方。
- 'end':文本对齐界线结束的地方。
ltr布局模式下'start'和'left'一致,rtl布局模式下'start'和'right'一致·。
默认值:'left'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [textBaseline](#textbaseline) | CanvasTextBaseline | 设置文本绘制中的水平对齐方式,可选值为:
- 'alphabetic':文本基线是标准的字母基线。
- 'top':文本基线在文本块的顶部。
- 'hanging':文本基线是悬挂基线。
- 'middle':文本基线在文本块的中间。
- 'ideographic':文字基线是表意字基线;如果字符本身超出了alphabetic基线,那么ideograhpic基线位置在字符本身的底部。
- 'bottom':文本基线在文本块的底部。 与ideographic基线的区别在于ideographic基线不需要考虑下行字母。
默认值:'alphabetic'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [globalAlpha](#globalalpha) | number | 设置透明度,0.0为完全透明,1.0为完全不透明。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [lineDashOffset](#linedashoffset) | number | 设置画布的虚线偏移量,精度为float。
默认值:0.0
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [globalCompositeOperation](#globalcompositeoperation) | string | 设置合成操作的方式。类型字段可选值有'source-over','source-atop','source-in','source-out','destination-over','destination-atop','destination-in','destination-out','lighter','copy','xor'。
默认值:'source-over'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowBlur](#shadowblur) | number | 设置绘制阴影时的模糊级别,值越大越模糊,精度为float。
默认值:0.0
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowColor](#shadowcolor) | string | 设置绘制阴影时的阴影颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowOffsetX](#shadowoffsetx) | number | 设置绘制阴影时和原有对象的水平偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowOffsetY](#shadowoffsety) | number | 设置绘制阴影时和原有对象的垂直偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | 用于设置绘制图片时是否进行图像平滑度调整,true为启用,false为不启用。
默认值:true
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [height](#height) | number | 组件高度。
单位:vp
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [width](#width) | number | 组件宽度。
单位:vp
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [imageSmoothingQuality](#imagesmoothingquality) | ImageSmoothingQuality | imageSmoothingEnabled为true时,用于设置图像平滑度。可选值为:
- 'low':低画质
- 'medium':中画质
- 'high':高画质。
默认值:low
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [direction](#direction) | CanvasDirection | 用于设置绘制文字时使用的文字方向。可选值为:
- 'inherit':继承canvas组件已设定的文本方向
- 'ltr':从左往右
- 'rtl':从右往左。
默认值:inherit
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [filter](#filter) | string | 用于设置图像的滤镜。支持的滤镜效果如下:
- 'none': 无滤镜效果
- 'blur':给图像设置高斯模糊
- 'brightness':给图片应用一种线性乘法,使其看起来更亮或更暗
- 'contrast':调整图像的对比度
- 'grayscale':将图像转换为灰度图像
- 'hue-rotate':给图像应用色相旋转
- 'invert':反转输入图像
- 'opacity':转化图像的透明程度
- 'saturate':转换图像饱和度
- 'sepia':将图像转换为深褐色
默认值:'none'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | > **说明:** > @@ -872,12 +872,12 @@ fillText(text: string, x: number, y: number, maxWidth?: number): void **参数:** -| 参数 | 类型 | 必填 | 默认值 | 说明 | -| -------- | ------ | ---- | ------ | ----------------------------- | -| text | string | 是 | '' | 需要绘制的文本内容。 | -| x | number | 是 | 0 | 需要绘制的文本的左下角x坐标。 | -| y | number | 是 | 0 | 需要绘制的文本的左下角y坐标。 | -| maxWidth | number | 否 | - | 指定文本允许的最大宽度。 | +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| -------- | ------ | ---- | ---- | --------------- | +| text | string | 是 | '' | 需要绘制的文本内容。 | +| x | number | 是 | 0 | 需要绘制的文本的左下角x坐标。 | +| y | number | 是 | 0 | 需要绘制的文本的左下角y坐标。 | +| maxWidth | number | 否 | - | 指定文本允许的最大宽度。 | **示例:** @@ -919,12 +919,12 @@ strokeText(text: string, x: number, y: number, maxWidth?:number): void **参数:** -| 参数 | 类型 | 必填 | 默认值 | 描述 | -| -------- | ------ | ---- | ------ | ----------------------------- | -| text | string | 是 | '' | 需要绘制的文本内容。 | -| x | number | 是 | 0 | 需要绘制的文本的左下角x坐标。 | -| y | number | 是 | 0 | 需要绘制的文本的左下角y坐标。 | -| maxWidth | number | 否 | - | 需要绘制的文本的最大宽度 。 | +| 参数 | 类型 | 必填 | 默认值 | 描述 | +| -------- | ------ | ---- | ---- | --------------- | +| text | string | 是 | '' | 需要绘制的文本内容。 | +| x | number | 是 | 0 | 需要绘制的文本的左下角x坐标。 | +| y | number | 是 | 0 | 需要绘制的文本的左下角y坐标。 | +| maxWidth | number | 否 | - | 需要绘制的文本的最大宽度 。 | **示例:** @@ -966,14 +966,14 @@ measureText(text: string): TextMetrics **参数:** -| 参数 | 类型 | 必填 | 默认值 | 说明 | -| ---- | ------ | ---- | ------ | -------------------- | -| text | string | 是 | '' | 需要进行测量的文本。 | +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| ---- | ------ | ---- | ---- | ---------- | +| text | string | 是 | '' | 需要进行测量的文本。 | **返回值:** -| 类型 | 说明 | -| ----------- | ------------------------------------------------------------ | +| 类型 | 说明 | +| ----------- | ---------------------------------------- | | TextMetrics | 文本的尺寸信息。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | **TextMetrics类型描述:** @@ -1264,15 +1264,15 @@ createPattern(image: ImageBitmap, repetition: string | null): CanvasPattern | nu **参数:** -| 参数 | 类型 | 必填 | 描述 | -| ---------- | -------------------------------------------------- | ---- | ------------------------------------------------------------ | -| image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | 是 | 图源对象,具体参考ImageBitmap对象。 | -| repetition | string | 是 | 设置图像重复的方式,取值为:'repeat'、'repeat-x'、 'repeat-y'、'no-repeat'、'clamp'、'mirror'。
默认值:'' | +| 参数 | 类型 | 必填 | 描述 | +| ---------- | ---------------------------------------- | ---- | ---------------------------------------- | +| image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | 是 | 图源对象,具体参考ImageBitmap对象。 | +| repetition | string | 是 | 设置图像重复的方式,取值为:'repeat'、'repeat-x'、 'repeat-y'、'no-repeat'、'clamp'、'mirror'。
默认值:'' | **返回值:** -| 类型 | 说明 | -| ------------------------------- | ----------------------- | +| 类型 | 说明 | +| ---------------------------------------- | ----------------------- | | [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 通过指定图像和重复方式创建图片填充的模板对象。 | **示例:** @@ -1516,16 +1516,16 @@ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number **参数:** -| 参数 | 类型 | 必填 | 默认值 | 说明 | -| ---------------- | ------- | ---- | ----- | ----------------- | -| x | number | 是 | 0 | 椭圆圆心的x轴坐标。 | -| y | number | 是 | 0 | 椭圆圆心的y轴坐标。 | -| radiusX | number | 是 | 0 | 椭圆x轴的半径长度。 | -| radiusY | number | 是 | 0 | 椭圆y轴的半径长度。 | -| rotation | number | 是 | 0 | 椭圆的旋转角度,单位为弧度。 | -| startAngle | number | 是 | 0 | 椭圆绘制的起始点角度,以弧度表示。 | -| endAngle | number | 是 | 0 | 椭圆绘制的结束点角度,以弧度表示。 | -| counterclockwise | boolean | 否 | false | 是否以逆时针方向绘制椭圆。
true:逆时针方向绘制椭圆。
false:顺时针方向绘制椭圆。 | +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| ---------------- | ------- | ---- | ----- | ---------------------------------------- | +| x | number | 是 | 0 | 椭圆圆心的x轴坐标。 | +| y | number | 是 | 0 | 椭圆圆心的y轴坐标。 | +| radiusX | number | 是 | 0 | 椭圆x轴的半径长度。 | +| radiusY | number | 是 | 0 | 椭圆y轴的半径长度。 | +| rotation | number | 是 | 0 | 椭圆的旋转角度,单位为弧度。 | +| startAngle | number | 是 | 0 | 椭圆绘制的起始点角度,以弧度表示。 | +| endAngle | number | 是 | 0 | 椭圆绘制的结束点角度,以弧度表示。 | +| counterclockwise | boolean | 否 | false | 是否以逆时针方向绘制椭圆。
true:逆时针方向绘制椭圆。
false:顺时针方向绘制椭圆。 | **示例:** @@ -1812,8 +1812,8 @@ filter(filter: string): void **参数:** -| 参数 | 类型 | 必填 | 默认值 | 说明 | -| ------ | ------ | ---- | ---- | ------------ | +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| ------ | ------ | ---- | ---- | ---------------------------------------- | | filter | string | 是 | - | 接受各类滤镜效果的函数。支持的滤镜效果如下:
- 'none': 无滤镜效果
- 'blur':给图像设置高斯模糊
- 'brightness':给图片应用一种线性乘法,使其看起来更亮或更暗
- 'contrast':调整图像的对比度
- 'grayscale':将图像转换为灰度图像
- 'hue-rotate':给图像应用色相旋转
- 'invert':反转输入图像
- 'opacity':转化图像的透明程度
- 'saturate':转换图像饱和度
- 'sepia':将图像转换为深褐色
默认值:'none' | **示例:** @@ -1888,8 +1888,8 @@ getTransform(): Matrix2D **返回值:** -| 类型 | 说明 | -| ----------------------------------------------------- | ---------- | +| 类型 | 说明 | +| ---------------------------------------- | ----- | | [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | 矩阵对象。 | @@ -2157,9 +2157,9 @@ setTransform(transform?: Matrix2D): void **参数:** -| 参数 | 类型 | 必填 | 默认值 | 描述 | -| --------- | ----------------------------------------------------- | ---- | ------ | ---------- | -| transform | [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | 否 | null | 变换矩阵。 | +| 参数 | 类型 | 必填 | 默认值 | 描述 | +| --------- | ---------------------------------------- | ---- | ---- | ----- | +| transform | [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | 否 | null | 变换矩阵。 | ### translate @@ -2388,15 +2388,15 @@ putImageData(imageData: ImageData, dx: number | string, dy: number | string, dir **参数:** -| 参数 | 类型 | 必填 | 默认值 | 描述 | -| ----------- | ---------------------------------------------- | ---- | --------------- | --------------------------------------------------------- | -| imagedata | [ImageData](ts-components-canvas-imagedata.md) | 是 | null | 包含像素值的ImageData对象。 | -| dx | number \| string10+ | 是 | 0 | 填充区域在x轴方向的偏移量。 | -| dy | number \| string10+ | 是 | 0 | 填充区域在y轴方向的偏移量。 | -| dirtyX | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的x轴偏移量。 | -| dirtyY | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的y轴偏移量。 | -| dirtyWidth | number \| string10+ | 否 | imagedata的宽度 | 源图像数据矩形裁切范围的宽度。 | -| dirtyHeight | number \| string10+ | 否 | imagedata的高度 | 源图像数据矩形裁切范围的高度。 | +| 参数 | 类型 | 必填 | 默认值 | 描述 | +| ----------- | ---------------------------------------- | ---- | ------------ | ----------------------------- | +| imagedata | [ImageData](ts-components-canvas-imagedata.md) | 是 | null | 包含像素值的ImageData对象。 | +| dx | number \| string10+ | 是 | 0 | 填充区域在x轴方向的偏移量。 | +| dy | number \| string10+ | 是 | 0 | 填充区域在y轴方向的偏移量。 | +| dirtyX | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的x轴偏移量。 | +| dirtyY | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的y轴偏移量。 | +| dirtyWidth | number \| string10+ | 否 | imagedata的宽度 | 源图像数据矩形裁切范围的宽度。 | +| dirtyHeight | number \| string10+ | 否 | imagedata的高度 | 源图像数据矩形裁切范围的高度。 | **示例:** @@ -2873,11 +2873,11 @@ createConicGradient(startAngle: number, x: number, y: number): CanvasGradient **参数:** -| 参数 | 类型 | 必填 | 默认值 | 描述 | -| ---------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| startAngle | number | 是 | 0 | 开始渐变的角度,以弧度为单位。角度测量从中心右侧水平开始,顺时针移动。 | -| x | number | 是 | 0 | 圆锥渐变的中心x轴坐标。单位:vp | -| y | number | 是 | 0 | 圆锥渐变的中心y轴坐标。单位:vp | +| 参数 | 类型 | 必填 | 默认值 | 描述 | +| ---------- | ------ | ---- | ---- | ----------------------------------- | +| startAngle | number | 是 | 0 | 开始渐变的角度,以弧度为单位。角度测量从中心右侧水平开始,顺时针移动。 | +| x | number | 是 | 0 | 圆锥渐变的中心x轴坐标。单位:vp | +| y | number | 是 | 0 | 圆锥渐变的中心y轴坐标。单位:vp | **示例:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md b/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md deleted file mode 100644 index 4960a4ec7f300407af72a9d8a25eb00ab287100a..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md +++ /dev/null @@ -1,611 +0,0 @@ -# Lottie - -提供Lottie动画。 - -> **说明:** -> -> 从 API Version 8 开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - - - -## 导入模块 - -``` -import lottie from '@ohos/lottieETS' -``` - -> **说明:** -> -> 在第一次使用Lottie之前,需要在Terminal窗口运行 `ohpm install @ohos/lottieETS` 命令下载Lottie。 - - -## lottie.loadAnimation - -loadAnimation( - -path: string, container: object, render: string, loop: boolean, autoplay: boolean, name: string ): AnimationItem - -加载动画,须提前声明Animator('__lottie_ets')对象,并在Canvas完成布局后调用。可配合Canvas组件生命周期接口onReady()使用。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| -------------- | --------------------------- | ---- | ---------------------------------------- | -| path | string | 是 | HAP内动画资源文件路径,仅支持json格式。示例:path: "common/lottie/data.json" | -| container | object | 是 | canvas绘图上下文,声明范式需提前声明CanvasRenderingContext2D。 | -| render | string | 是 | 渲染类型,仅支持“canvas”。 | -| loop | boolean \| number | 否 | 动画播放结束后,是否循环播放,默认值true。值类型为number,且大于等于1时为设置的重复播放的次数。 | -| autoplay | boolean | 否 | 是否自动播放动画,默认值true。 | -| name | string | 否 | 开发者自定义的动画名称,后续支持通过该名称引用控制动画,默认为空。 | -| initialSegment | [number, number] | 否 | 指定动画播放的起始帧号,指定动画播放的结束帧号。 | - - -## lottie.destroy - -destroy(name: string): void - -销毁动画,页面退出时,必须调用。可配合Canvas组件生命周期接口使用,比如onDisappear()与onPageHide()。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | 是 | 被指定的动画名,同loadAnimation接口参数name, 缺省时销毁所有动画。 | - -**示例:** - ```ts - // xxx.ets - import lottie from '@ohos/lottieETS' - - @Entry - @Component - struct Index { - private controller: CanvasRenderingContext2D = new CanvasRenderingContext2D() - private animateName: string = "animate" - private animatePath: string = "common/lottie/data.json" - private animateItem: any = null - - onPageHide(): void { - console.log('onPageHide') - lottie.destroy() - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Canvas(this.controller) - .width('30%') - .height('20%') - .backgroundColor('#0D9FFB') - .onReady(() => { - console.log('canvas onAppear'); - this.animateItem = lottie.loadAnimation({ - container: this.controller, - renderer: 'canvas', - loop: true, - autoplay: true, - name: this.animateName, - path: this.animatePath, - }) - }) - - Animator('__lottie_ets') // declare Animator('__lottie_ets') when use lottie - Button('load animation') - .onClick(() => { - if (this.animateItem != null) { - this.animateItem.destroy() - this.animateItem = null - } - this.animateItem = lottie.loadAnimation({ - container: this.controller, - renderer: 'canvas', - loop: true, - autoplay: true, - name: this.animateName, - path: this.animatePath, - initialSegment: [10, 50], - }) - }) - - Button('destroy animation') - .onClick(() => { - lottie.destroy(this.animateName) - this.animateItem = null - }) - } - .width('100%') - .height('100%') - } - } - ``` - - ![zh-cn_image_0000001194352468](figures/zh-cn_image_0000001194352468.gif) - - -## lottie.play - -play(name: string): void - -播放指定动画。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | 是 | 被指定的动画名, 同loadAnimation接口参数name,缺省时播放所有动画。 | - -**示例:** - - ```ts - lottie.play(this.animateName) - ``` - - -## lottie.pause - -pause(name: string): void - -暂停指定动画,下次调用lottie.play()从当前帧开始。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | 是 | 被指定的动画名,同loadAnimation接口入参name,缺省时暂停所有动画。 | - -**示例:** - - ```ts - lottie.pause(this.animateName) - ``` - - -## lottie.togglePause - -togglePause(name: string): void - -暂停或播放指定动画,等效于lottie.play()与lottie.pause()切换调用。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | 是 | 被指定的动画名,同loadAnimation接口参数name,缺省时停止所有动画。 | - -**示例:** - - ```ts - lottie.togglePause(this.animateName) - ``` - - -## lottie.stop - -stop(name: string): void - -停止指定动画,下次调用lottie.play()从第一帧开始。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | 是 | 被指定的动画名,同loadAnimation接口参数name,缺省时停止所有动画。 | - -**示例:** - - ```ts - lottie.stop(this.animateName) - ``` - - -## lottie.setSpeed - -setSpeed(speed: number, name: string): void - -设置指定动画播放速度。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ----- | ------ | ---- | ---------------------------------------- | -| speed | number | 是 | 值为浮点类型, speed>0正向播放, speed<0反向播放, speed=0暂停播放, speed=1.0/-1.0正常速度播放。 | -| name | string | 是 | 被指定的动画,同loadAnimation接口参数name,缺省时停止所有动画。 | - -**示例:** - - ```ts - lottie.setSpeed(5, this.animateName) - ``` - - -## lottie.setDirection - -setDirection(direction: AnimationDirection, name: string): void - -设置指定动画播放顺序。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| --------- | ------------------ | ---- | ---------------------------------------- | -| direction | AnimationDirection | 是 | 1为正向,-1为反向; 当设置为反向时,从当前播放进度开始回播直到首帧,loop值为true时可无限倒放;speed<0叠加时也是倒放。
AnimationDirection:1 \| -1 | -| name | string | 是 | 被指定的动画名,同loadAnimation接口参数name,缺省时设置所有动画方向。 | - -**示例:** - - ```ts - lottie.setDirection(-1, this.animateName) - ``` - - -## AnimationItem - -loadAnimation接口的返回对象,具有属性与接口。属性描述如下: - -| 参数名称 | 参数类型 | 参数描述 | -| ----------------- | ---------------------------------------- | ---------------------------------------- | -| name | string | 动画名称。 | -| isLoaded | boolean | 动画是否已加载。 | -| currentFrame | number | 当前播放的帧号, 默认精度为>=0.0的浮点数, 调用setSubframe(false)后精度为去小数点后的正整数。 | -| currentRawFrame | number | 当前播放帧数, 精度为>=0.0的浮点数。 | -| firstFrame | number | 当前播放片段的第一帧帧号。 | -| totalFrames | number | 当前播放片段的总帧数。 | -| frameRate | number | 帧率 (frame/s)。 | -| frameMult | number | 帧率 (frame/ms)。 | -| playSpeed | number | 值为浮点类型, speed>0正向播放, speed<0反向播放, speed=0暂停播放, speed=1.0 \| -1.0正常速度播放。 | -| playDirection | number | 播放方向, 1为正放, -1为倒放。 | -| playCount | number | 动画完成播放的次数。 | -| isPaused | boolean | 当前动画是否已暂停, 值为true动画已暂停。 | -| autoplay | boolean | 加载动画后是否自动播放, 若值为false需要再调用play()接口开始播放。 | -| loop | boolean \| number | 类型为boolean时是否循环播放, 类型为number时播放次数。 | -| renderer | any | 动画渲染对象, 根据渲染类型而定。 | -| animationID | string | 动画ID。 | -| timeCompleted | number | 当前动画片段完成单次播放的帧数, 受AnimationSegment设置影响, 与totalFrames属性值相同。 | -| segmentPos | number | 当前动画片段序号, 值为>=0的正整数。 | -| isSubframeEnabled | boolean | 关联了currentFrame的精度是否为浮点数。 | -| segments | AnimationSegment \| AnimationSegment[] | 当前动画的播放片段。 | - - -## AnimationItem.play - -play(name?: string): void - -播放动画。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | --------------- | -| name | string | 否 | 被指定的动画名,缺省默认为空。 | - -**示例:** - - ```ts - this.animateItem.play() - ``` - - -## AnimationItem.destroy - -destroy(name?: string): void - -销毁动画。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | --------------- | -| name | string | 否 | 被指定的动画名,缺省默认为空。 | - -**示例:** - - ```ts - this.animateItem.destroy() - ``` - - -## AnimationItem.pause - -pause(name?: string): void - -暂停动画,下次调用play接口从当前帧开始播放。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | --------------- | -| name | string | 否 | 被指定的动画名,缺省默认为空。 | - -**示例:** - - ```ts - this.animateItem.pause() - ``` - - -## AnimationItem.togglePause - -togglePause(name?: string): void - -暂停或播放动画,等效于play接口与pause接口之间轮换调用。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | --------------- | -| name | string | 否 | 被指定的动画名,缺省默认为空。 | - -**示例:** - - ```ts - this.animateItem.togglePause() - ``` - - -## AnimationItem.stop - -stop(name?: string): void - -停止动画,下次调用play接口从第一帧开始播放。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------ | ---- | --------------- | -| name | string | 否 | 被指定的动画名,缺省默认为空。 | - -**示例:** - - ```ts - this.animateItem.stop() - ``` - - -## AnimationItem.setSpeed - -setSpeed(speed: number): void - -设置动画播放速度。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ----- | ------ | ---- | ---------------------------------------- | -| speed | number | 是 | 值为浮点类型, speed>0正向播放, speed<0反向播放, speed=0暂停播放, speed=1.0 \| -1.0正常速度播放。 | - -**示例:** - - ```ts - this.animateItem.setSpeed(5); - ``` - - -## AnimationItem.setDirection - -setDirection(direction: AnimationDirection): void - -设置动画播放顺序。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| --------- | ------------------ | ---- | ---------------------------------------- | -| direction | AnimationDirection | 是 | 1为正向,-1为反向; 当设置为反向时,从当前播放进度开始回播直到首帧,loop值为true时可无限倒放;speed<0叠加时也是倒放。
AnimationDirection:1 \| -1。 | - -**示例:** - - ```ts - this.animateItem.setDirection(-1) - ``` - - -## AnimationItem.goToAndStop - -goToAndStop(value: number, isFrame?: boolean): void - -设置动画停止在指定帧或时间进度。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ------- | ------- | ---- | ---------------------------------------- | -| value | number | 是 | 帧号(值大于等于0)或时间进度(ms)。 | -| isFrame | boolean | 否 | true: 按指定帧控制,false:按指定时间控制,缺省默认false。 | -| name | string | 否 | 被指定的动画名,缺省默认为空。 | - -**示例:** - - ```ts - // 按帧号控制 - this.animateItem.goToAndStop(25, true) - // 按时间进度控制 - this.animateItem.goToAndStop(300, false, this.animateName) - ``` - - -## AnimationItem.goToAndPlay - -goToAndPlay(value: number, isFrame: boolean, name?: string): void - -设置动画从指定帧或时间进度开始播放。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ------- | ------- | ---- | ---------------------------------------- | -| value | number | 是 | 帧号(值大于等于0)或时间进度(ms) | -| isFrame | boolean | 是 | true:按指定帧控制, false:按指定时间控制,缺省默认false。 | -| name | string | 否 | 被指定的动画名,缺省默认为空。 | - -**示例:** - - ```ts - // 按帧号控制 - this.animateItem.goToAndPlay(25, true) - // 按时间进度控制 - this.animateItem.goToAndPlay(300, false, this.animateName) - ``` - - -## AnimationItem.playSegments - -playSegments(segments: AnimationSegment | AnimationSegment[], forceFlag: boolean): void - -设置动画仅播放指定片段。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| --------- | ---------------------------------------- | ---- | ---------------------------------------- | -| segments | AnimationSegment = [number, number] \| AnimationSegment[] | 是 | 片段或片段列表;
如果片段列表全部播放完毕后,下轮循环播放仅播放最后一个片段 | -| forceFlag | boolean | 是 | true:即时生效播放,false:延迟到下轮循环播放再生效 | - -**示例:** - - ```ts - // 指定播放片段 - this.animateItem.playSegments([10, 20], false) - // 指定播放片段列表 - this.animateItem.playSegments([[0, 5], [20, 30]], true) - ``` - - -## AnimationItem.resetSegments - -resetSegments(forceFlag: boolean): void - -重置动画播放片段,播放全帧。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| --------- | ------- | ---- | ------------------------------ | -| forceFlag | boolean | 是 | true:即时生效播放,false:延迟到下轮循环播放再生效 | - -**示例:** - - ```ts - this.animateItem.resetSegments(true) - ``` - - -## AnimationItem.resize - -resize(): void - -刷新动画布局。 - -**示例:** - - ```ts - this.animateItem.resize() - ``` - - -## AnimationItem.setSubframe - -setSubframe(useSubFrame: boolean): void - -设置属性currentFrame的精度显示浮点数。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ------------ | ------- | ---- | ---------------------------------------- | -| useSubFrames | boolean | 是 | currentFrame属性默认显示浮点数,该接口参数将影响currentFrame属性的精度。
true:属性currentFrame显示浮点。
false:属性currentFrame去浮点数显示整数。 | - -**示例:** - - ```ts - this.animateItem.setSubframe(false) - ``` - - -## AnimationItem.getDuration - -getDuration(inFrames?: boolean): void - -获取动画单次完整播放的时间(与播放速度无关)或帧数, 与Lottie.loadAnimation接口入参initialSegment有关。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| -------- | ------- | ---- | ---------------------------------------- | -| inFrames | boolean | 否 | true:获取帧数, false:获取时间(单位ms),缺省默认false。 | - -**示例:** - - ```ts - this.animateItem.getDuration(true) - ``` - - -## AnimationItem.addEventListener - -addEventListener<T = any>(name: AnimationEventName, callback: AnimationEventCallback<T>): () => void - -添加侦听事件, 事件完成后会触发指定回调函数。返回可删除该侦听事件的函数对象。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| -------- | ------------------------------- | ---- | ---------------------------------------- | -| name | AnimationEventName | 是 | 指定动画事件类型,Lottie内置动画事件类型AnimationEventName:
'enterFrame'、'loopComplete'、'complete'、'segmentStart'、'destroy'、'config_ready'、'data_ready'、'DOMLoaded'、'error'、'data_failed'、'loaded_images' | -| callback | AnimationEventCallback<T> | 是 | 用户自定义回调函数 | - -**示例:** - - ```ts - private callbackItem: any = function() { - console.log("grunt loopComplete") - } - let delFunction = this.animateItem.addEventListener('loopComplete', this.animateName) - - // 删除侦听 - delFunction() - ``` - - -## AnimationItem.removeEventListener - -removeEventListener<T = any>(name: AnimationEventName, callback?: AnimationEventCallback<T>): void - -删除侦听事件。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| -------- | ------------------------------- | ---- | ---------------------------------------- | -| name | AnimationEventName | 是 | 指定动画事件类型,Lottie内置动画事件类型AnimationEventName:
'enterFrame'、'loopComplete'、'complete'、'segmentStart'、'destroy'、'config_ready'、'data_ready'、'DOMLoaded'、'error'、'data_failed'、'loaded_images' | -| callback | AnimationEventCallback<T> | 否 | 用户自定义回调函数;缺省为空时,删除此事件的所有回调函数。 | - -**示例:** - - ```ts - this.animateItem.removeEventListener('loopComplete', this.animateName) - ``` - - -## AnimationItem.triggerEvent - -triggerEvent<T = any>(name: AnimationEventName, args: T): void - -直接触发指定事件的所有已设置的回调函数。 - -**参数:** - -| 参数 | 类型 | 必填 | 描述 | -| ---- | ------------------ | ---- | --------- | -| name | AnimationEventName | 是 | 指定动画事件类型 | -| args | any | 是 | 用户自定义回调参数 | - -**示例:** - - ```ts - private triggerCallBack: any = function(item) { - console.log("trigger loopComplete, name:" + item.name) - } - - this.animateItem.addEventListener('loopComplete', this.triggerCallBack) - this.animateItem.triggerEvent('loopComplete', this.animateItem) - this.animateItem.removeEventListener('loopComplete', this.triggerCallBack) - ``` diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-badge.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-badge.md index ed09bfe25387b79da2d31f044431dc9fc05555dc..a294923d0d779c63aa36bff2de13f3cc12a70b63 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-badge.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-badge.md @@ -28,7 +28,7 @@ | 参数名 | 参数类型 | 必填 | 参数描述 | | -------- | -------- | -------- | -------- | -| count | number | 是 | 设置提醒消息数。
**说明:**
小于等于0时不显示信息标记。 | +| count | number | 是 | 设置提醒消息数。
**说明:**
小于等于0时不显示信息标记。
取值范围:[-2147483648,2147483647],非整数时会舍去小数部分取整数部分,如5.5取5。 | | position | [BadgePosition](#badgeposition枚举说明) | 否 | 设置提示点显示位置。
默认值:BadgePosition.RightTop | | maxCount | number | 否 | 最大消息数,超过最大消息时仅显示maxCount+。
默认值:99 | | style | [BadgeStyle](#badgestyle对象说明) | 是 | Badge组件可设置样式,支持设置文本颜色、尺寸、圆点颜色和尺寸。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md index b9472dbddf670c4afda46e732e57884a90be8b82..75c364211156355faf4b6344652971eff57168d4 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md @@ -39,37 +39,37 @@ List(value?:{space?: number | string, initialIndex?: number, scroller? **参数:** -| 参数名 | 参数类型 | 必填 | 参数描述 | -| -------- | -------- | -------- | -------- | -| space | number \| string | 否 | 子组件主轴方向的间隔。
默认值:0
**说明:**
设置为除-1外其他负数或百分比时,按默认值显示。
space参数值小于List分割线宽度时,子组件主轴方向的间隔取分割线宽度。 | -| initialIndex | number | 否 | 设置当前List初次加载时视口起始位置显示的item的索引值。
默认值:0
**说明:**
设置为除-1外其他负数或超过了当前List最后一个item的索引值时视为无效取值,无效取值按默认值显示。 | -| scroller | [Scroller](ts-container-scroll.md#scroller) | 否 | 可滚动组件的控制器。用于与可滚动组件进行绑定。
**说明:**
不允许和其他滚动类组件绑定同一个滚动控制对象。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ------------ | ---------------------------------------- | ---- | ---------------------------------------- | +| space | number \| string | 否 | 子组件主轴方向的间隔。
默认值:0
**说明:**
设置为除-1外其他负数或百分比时,按默认值显示。
space参数值小于List分割线宽度时,子组件主轴方向的间隔取分割线宽度。 | +| initialIndex | number | 否 | 设置当前List初次加载时视口起始位置显示的item的索引值。
默认值:0
**说明:**
设置为除-1外其他负数或超过了当前List最后一个item的索引值时视为无效取值,无效取值按默认值显示。 | +| scroller | [Scroller](ts-container-scroll.md#scroller) | 否 | 可滚动组件的控制器。用于与可滚动组件进行绑定。
**说明:**
不允许和其他滚动类组件绑定同一个滚动控制对象。 | ## 属性 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | -| listDirection | [Axis](ts-appendix-enums.md#axis) | 设置List组件排列方向。
默认值:Axis.Vertical
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| divider | {
strokeWidth: [Length](ts-types.md#length),
color?:[ResourceColor](ts-types.md#resourcecolor),
startMargin?: Length,
endMargin?: Length
} \| null | 设置ListItem分割线样式,默认无分割线。
- strokeWidth: 分割线的线宽。
- color: 分割线的颜色。
- startMargin: 分割线与列表侧边起始端的距离。
- endMargin: 分割线与列表侧边结束端的距离。
从API version 9开始,该接口支持在ArkTS卡片中使用。
endMargin +startMargin 不能超过列宽度。
startMargin和endMargin不支持设置百分比。
List的分割线画在主轴方向两个子组件之间,第一个子组件上方和最后一个子组件下方不会绘制分割线。
多列模式下,ListItem与ListItem之间的分割线起始边距从每一列的交叉轴方向起始边开始计算,其他情况从List交叉轴方向起始边开始计算。 | -| scrollBar | [BarState](ts-appendix-enums.md#barstate) | 设置滚动条状态。
默认值:BarState.Off
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
API version 9及以下版本默认值为BarState.Off,API version 10的默认值为BarState.Auto。 | -| cachedCount | number | 设置列表中ListItem/ListItemGroup的预加载数量,只在[LazyForEach](../../quick-start/arkts-rendering-control-lazyforeach.md)中生效,其中ListItemGroup将作为一个整体进行计算,ListItemGroup中的所有ListItem会一次性全部加载出来。具体使用可参考[减少应用白块说明](../../ui/arkts-performance-improvement-recommendation.md#减少应用滑动白块)。
默认值:1
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
单列模式下,会在List显示的ListItem前后各缓存cachedCount个ListItem。
多列模式下, 会在List显示的ListItem前后各缓存cachedCount*列数个ListItem。 | -| editMode(deprecated) | boolean | 声明当前List组件是否处于可编辑模式。
从API version9开始废弃。可参考[示例3](#示例3)实现删除选中的list项。
默认值:false | -| edgeEffect | [EdgeEffect](ts-appendix-enums.md#edgeeffect) | 设置组件的滑动效果,支持弹簧效果和阴影效果。
默认值:EdgeEffect.Spring
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| chainAnimation | boolean | 设置当前List是否启用链式联动动效,开启后列表滑动以及顶部和底部拖拽时会有链式联动的效果。链式联动效果:List内的list-item间隔一定距离,在基本的滑动交互行为下,主动对象驱动从动对象进行联动,驱动效果遵循弹簧物理动效。
默认值:false
- false:不启用链式联动。
- true:启用链式联动。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
链式动效生效后,List的分割线不显示。
链式动效生效需要满足以下前提条件:
-  List边缘效果为Spring类型
-  List没有启用多列模式 | -|chainAnimationOptions10+| [ChainAnimationOptions](#chainanimationoptions10对象说明) | 设置链式联动动效参数。
**系统API:** 此接口为系统接口。 | -| multiSelectable8+ | boolean | 是否开启鼠标框选。
默认值:false
- false:关闭框选。
- true:开启框选。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| lanes9+ | number \| [LengthConstrain](ts-types.md#lengthconstrain) | 以列模式为例(listDirection为Axis.Vertical):
lanes用于决定List组件在交叉轴方向按几列布局。
默认值:1
规则如下:
- lanes为指定的数量时,根据指定的数量与List组件的交叉轴尺寸除以列数作为列的宽度。
- lanes设置了{minLength,maxLength}时,根据List组件的宽度自适应决定lanes数量(即列数),保证缩放过程中lane的宽度符合{minLength,maxLength}的限制。其中,minLength条件会被优先满足,即优先保证符合ListItem的交叉轴尺寸符合最小限制。
- lanes设置了{minLength,maxLength},如果父组件交叉轴方向尺寸约束为无穷大时,固定按一列排列,列宽度按显示区域内最大的ListItem计算
- ListItemGroup在多列模式下也是独占一行,ListItemGroup中的ListItem按照List组件的lanes属性设置值来布局。
- lanes设置了{minLength,maxLength}时,计算列数会按照ListItemGroup的交叉轴尺寸计算。当ListItemGroup交叉轴尺寸与List交叉轴尺寸不一致时ListItemGroup中的列数与List中的列数可能不一样。
该接口支持在ArkTS卡片中使用。 | -| alignListItem9+ | [ListItemAlign](#listitemalign9枚举说明) | List交叉轴方向宽度大于ListItem交叉轴宽度 * lanes时,ListItem在List交叉轴方向的布局方式,默认为首部对齐。
默认值:ListItemAlign.Start
该接口支持在ArkTS卡片中使用。 | -| sticky9+ | [StickyStyle](#stickystyle9枚举说明) | 配合[ListItemGroup](ts-container-listitemgroup.md)组件使用,设置ListItemGroup中header和footer是否要吸顶或吸底。
默认值:StickyStyle.None
该接口支持在ArkTS卡片中使用。
**说明:**
sticky属性可以设置为 StickyStyle.Header \| StickyStyle.Footer 以同时支持header吸顶和footer吸底。 | +| 名称 | 参数类型 | 描述 | +| ----------------------------------- | ---------------------------------------- | ---------------------------------------- | +| listDirection | [Axis](ts-appendix-enums.md#axis) | 设置List组件排列方向。
默认值:Axis.Vertical
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| divider | {
strokeWidth: [Length](ts-types.md#length),
color?:[ResourceColor](ts-types.md#resourcecolor),
startMargin?: Length,
endMargin?: Length
} \| null | 设置ListItem分割线样式,默认无分割线。
- strokeWidth: 分割线的线宽。
- color: 分割线的颜色。
- startMargin: 分割线与列表侧边起始端的距离。
- endMargin: 分割线与列表侧边结束端的距离。
从API version 9开始,该接口支持在ArkTS卡片中使用。
endMargin +startMargin 不能超过列宽度。
startMargin和endMargin不支持设置百分比。
List的分割线画在主轴方向两个子组件之间,第一个子组件上方和最后一个子组件下方不会绘制分割线。
多列模式下,ListItem与ListItem之间的分割线起始边距从每一列的交叉轴方向起始边开始计算,其他情况从List交叉轴方向起始边开始计算。 | +| scrollBar | [BarState](ts-appendix-enums.md#barstate) | 设置滚动条状态。
默认值:BarState.Off
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
API version 9及以下版本默认值为BarState.Off,API version 10的默认值为BarState.Auto。 | +| cachedCount | number | 设置列表中ListItem/ListItemGroup的预加载数量,只在[LazyForEach](../../quick-start/arkts-rendering-control-lazyforeach.md)中生效,其中ListItemGroup将作为一个整体进行计算,ListItemGroup中的所有ListItem会一次性全部加载出来。具体使用可参考[减少应用白块说明](../../ui/arkts-performance-improvement-recommendation.md#减少应用滑动白块)。
默认值:1
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
单列模式下,会在List显示的ListItem前后各缓存cachedCount个ListItem。
多列模式下, 会在List显示的ListItem前后各缓存cachedCount*列数个ListItem。 | +| editMode(deprecated) | boolean | 声明当前List组件是否处于可编辑模式。
从API version9开始废弃。可参考[示例3](#示例3)实现删除选中的list项。
默认值:false | +| edgeEffect | [EdgeEffect](ts-appendix-enums.md#edgeeffect) | 设置组件的滑动效果,支持弹簧效果和阴影效果。
默认值:EdgeEffect.Spring
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| chainAnimation | boolean | 设置当前List是否启用链式联动动效,开启后列表滑动以及顶部和底部拖拽时会有链式联动的效果。链式联动效果:List内的list-item间隔一定距离,在基本的滑动交互行为下,主动对象驱动从动对象进行联动,驱动效果遵循弹簧物理动效。
默认值:false
- false:不启用链式联动。
- true:启用链式联动。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
链式动效生效后,List的分割线不显示。
链式动效生效需要满足以下前提条件:
-  List边缘效果为Spring类型
-  List没有启用多列模式 | +| chainAnimationOptions10+ | [ChainAnimationOptions](#chainanimationoptions10对象说明) | 设置链式联动动效参数。
**系统API:** 此接口为系统接口。 | +| multiSelectable8+ | boolean | 是否开启鼠标框选。
默认值:false
- false:关闭框选。
- true:开启框选。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| lanes9+ | number \| [LengthConstrain](ts-types.md#lengthconstrain) | 以列模式为例(listDirection为Axis.Vertical):
lanes用于决定List组件在交叉轴方向按几列布局。
默认值:1
规则如下:
- lanes为指定的数量时,根据指定的数量与List组件的交叉轴尺寸除以列数作为列的宽度。
- lanes设置了{minLength,maxLength}时,根据List组件的宽度自适应决定lanes数量(即列数),保证缩放过程中lane的宽度符合{minLength,maxLength}的限制。其中,minLength条件会被优先满足,即优先保证符合ListItem的交叉轴尺寸符合最小限制。
- lanes设置了{minLength,maxLength},如果父组件交叉轴方向尺寸约束为无穷大时,固定按一列排列,列宽度按显示区域内最大的ListItem计算
- ListItemGroup在多列模式下也是独占一行,ListItemGroup中的ListItem按照List组件的lanes属性设置值来布局。
- lanes设置了{minLength,maxLength}时,计算列数会按照ListItemGroup的交叉轴尺寸计算。当ListItemGroup交叉轴尺寸与List交叉轴尺寸不一致时ListItemGroup中的列数与List中的列数可能不一样。
该接口支持在ArkTS卡片中使用。 | +| alignListItem9+ | [ListItemAlign](#listitemalign9枚举说明) | List交叉轴方向宽度大于ListItem交叉轴宽度 * lanes时,ListItem在List交叉轴方向的布局方式,默认为首部对齐。
默认值:ListItemAlign.Start
该接口支持在ArkTS卡片中使用。 | +| sticky9+ | [StickyStyle](#stickystyle9枚举说明) | 配合[ListItemGroup](ts-container-listitemgroup.md)组件使用,设置ListItemGroup中header和footer是否要吸顶或吸底。
默认值:StickyStyle.None
该接口支持在ArkTS卡片中使用。
**说明:**
sticky属性可以设置为 StickyStyle.Header \| StickyStyle.Footer 以同时支持header吸顶和footer吸底。 | ## ListItemAlign9+枚举说明 该接口支持在ArkTS卡片中使用。 -| 名称 | 描述 | -| ------ | -------------------------------------- | +| 名称 | 描述 | +| ------ | ------------------------- | | Start | ListItem在List中,交叉轴方向首部对齐。 | | Center | ListItem在List中,交叉轴方向居中对齐。 | | End | ListItem在List中,交叉轴方向尾部对齐。 | @@ -78,11 +78,11 @@ List(value?:{space?: number | string, initialIndex?: number, scroller? 该接口支持在ArkTS卡片中使用。 -| 名称 | 描述 | -| ------ | -------------------------------------- | -| None | ListItemGroup的header不吸顶,footer不吸底。 | -| Header | ListItemGroup的header吸顶,footer不吸底。 | -| Footer | ListItemGroup的footer吸底,header不吸底。 | +| 名称 | 描述 | +| ------ | ---------------------------------- | +| None | ListItemGroup的header不吸顶,footer不吸底。 | +| Header | ListItemGroup的header吸顶,footer不吸底。 | +| Footer | ListItemGroup的footer吸底,header不吸底。 | ## ChainEdgeEffect10+枚举说明 @@ -90,10 +90,10 @@ List(value?:{space?: number | string, initialIndex?: number, scroller? **系统API:** 此接口为系统接口 -| 名称 | 描述 | -| ------ | -------------------------------------- | -| DEFAULT | 默认效果,列表滚动到边缘以后继续拖动,拖拽方向上的列表项间距缩小,拖拽反方向上的列表项间距扩大。 | -| STRETCH | 列表滚动到边缘以后继续拖动,所有列表项间距扩大。 | +| 名称 | 描述 | +| ------- | ---------------------------------------- | +| DEFAULT | 默认效果,列表滚动到边缘以后继续拖动,拖拽方向上的列表项间距缩小,拖拽反方向上的列表项间距扩大。 | +| STRETCH | 列表滚动到边缘以后继续拖动,所有列表项间距扩大。 | ## chainAnimationOptions10+对象说明 @@ -101,13 +101,13 @@ List(value?:{space?: number | string, initialIndex?: number, scroller? **系统API:** 此接口为系统接口 -| 名称 | 类型 | 必填 | 说明 | -| ------ | ------ | ---- | --------------- | -| minSpace | [Length](ts-types.md#length) | 是 | 设置链式联动动效最小间距。 | -| maxSpace | [Length](ts-types.md#length) | 是 | 设置链式联动动效最大间距。 | -| conductivity | number | 否 | 设置链式联动动效传导系数。取值范围[0,1],数值越大,动效传导范围越远。
默认为0.7。 | -| intensity | number | 否 | 设置链式联动动效效果强度。取值范围[0,1],数值越大,动效效果越明显。
默认为0.3。 | -| edgeEffect | [ChainEdgeEffect](#chainedgeeffect10枚举说明) | 否 | 设置链式联动动效边缘效果。
默认为ChainEdgeEffect.DEFAULT。| +| 名称 | 类型 | 必填 | 说明 | +| ------------ | ---------------------------------------- | ---- | ---------------------------------------- | +| minSpace | [Length](ts-types.md#length) | 是 | 设置链式联动动效最小间距。 | +| maxSpace | [Length](ts-types.md#length) | 是 | 设置链式联动动效最大间距。 | +| conductivity | number | 否 | 设置链式联动动效传导系数。取值范围[0,1],数值越大,动效传导范围越远。
默认为0.7。 | +| intensity | number | 否 | 设置链式联动动效效果强度。取值范围[0,1],数值越大,动效效果越明显。
默认为0.3。 | +| edgeEffect | [ChainEdgeEffect](#chainedgeeffect10枚举说明) | 否 | 设置链式联动动效边缘效果。
默认为ChainEdgeEffect.DEFAULT。 | > **说明:** > @@ -115,16 +115,16 @@ List(value?:{space?: number | string, initialIndex?: number, scroller? ## 事件 -| 名称 | 功能描述 | -| -------- | -------- | +| 名称 | 功能描述 | +| ---------------------------------------- | ---------------------------------------- | | onItemDelete(deprecated)(event: (index: number) => boolean) | 当List组件在编辑模式时,点击ListItem右边出现的删除按钮时触发。
从API version9开始废弃。
- index: 被删除的列表项的索引值。 | | onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void) | 列表滑动时触发。
- scrollOffset: 每帧滚动的偏移量,List的内容向上滚动时偏移量为正,向下滚动时偏移量为负。
- [scrollState](#scrollstate枚举说明): 当前滑动状态。
使用控制器调用ScrollEdge和ScrollToIndex时不会触发,其余情况有滚动就会触发该事件。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | | onScrollIndex(event: (start: number, end: number) => void) | 有子组件划入或划出List显示区域时触发。
计算索引值时,ListItemGroup作为一个整体占一个索引值,不计算ListItemGroup内部ListItem的索引值。
- start: 滑动起始位置索引值。
- end: 滑动结束位置索引值。
触发该事件的条件:列表初始化时会触发一次,List显示区域内第一个子组件的索引值或后一个子组件的索引值有变化时会触发。
List的边缘效果为弹簧效果时,在List划动到边缘继续划动和松手回弹过程不会触发onScrollIndex事件。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| onReachStart(event: () => void) | 列表到达起始位置时触发。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
List初始化时如果initialIndex为0会触发一次,List滚动到起始位置时触发一次。List边缘效果为弹簧效果时,划动经过起始位置时触发一次,回弹回起始位置时再触发一次。 | -| onReachEnd(event: () => void) | 列表到底末尾位置时触发。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
List边缘效果为弹簧效果时,划动经过末尾位置时触发一次,回弹回末尾位置时再触发一次。 | +| onReachStart(event: () => void) | 列表到达起始位置时触发。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
List初始化时如果initialIndex为0会触发一次,List滚动到起始位置时触发一次。List边缘效果为弹簧效果时,划动经过起始位置时触发一次,回弹回起始位置时再触发一次。 | +| onReachEnd(event: () => void) | 列表到底末尾位置时触发。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
List边缘效果为弹簧效果时,划动经过末尾位置时触发一次,回弹回末尾位置时再触发一次。 | | onScrollFrameBegin9+(event: (offset: number, state: ScrollState) => { offsetRemain }) | 列表开始滑动时触发,事件参数传入即将发生的滑动量,事件处理函数中可根据应用场景计算实际需要的滑动量并作为事件处理函数的返回值返回,列表将按照返回值的实际滑动量进行滑动。
\- offset:即将发生的滑动量,单位vp。
\- state:当前滑动状态。
- offsetRemain:实际滑动量,单位vp。
触发该事件的条件:手指拖动List、List惯性划动时每帧开始时触发;List超出边缘回弹、使用滚动控制器的滚动不会触发。
该接口支持在ArkTS卡片中使用。
**说明:**
当listDirection的值为Axis.Vertical时,返回垂直方向滑动量,当listDirection的值为Axis.Horizontal时,返回水平方向滑动量。 | | onScrollStart9+(event: () => void) | 列表滑动开始时触发。手指拖动列表或列表的滚动条触发的滑动开始时,会触发该事件。使用[Scroller](ts-container-scroll.md#scroller)滑动控制器触发的带动画的滑动,动画开始时会触发该事件。
该接口支持在ArkTS卡片中使用。 | -| onScrollStop(event: () => void) | 列表滑动停止时触发。手拖动列表或列表的滚动条触发的滑动,手离开屏幕并且滑动停止时会触发该事件;使用[Scroller](ts-container-scroll.md#scroller)滑动控制器触发的带动画的滑动,动画停止会触发该事件。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| onScrollStop(event: () => void) | 列表滑动停止时触发。手拖动列表或列表的滚动条触发的滑动,手离开屏幕并且滑动停止时会触发该事件;使用[Scroller](ts-container-scroll.md#scroller)滑动控制器触发的带动画的滑动,动画停止会触发该事件。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | | onItemMove(event: (from: number, to: number) => boolean) | 列表元素发生移动时触发。
- from: 移动前索引值。
- to: 移动后索引值。 | | onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) \| void) | 开始拖拽列表元素时触发。
- event: 见[ItemDragInfo对象说明](ts-container-grid.md#itemdraginfo对象说明)。
- itemIndex: 被拖拽列表元素索引值。 | | onItemDragEnter(event: (event: ItemDragInfo) => void) | 拖拽进入列表元素范围内时触发。
- event: 见[ItemDragInfo对象说明](ts-container-grid.md#itemdraginfo对象说明)。 | @@ -136,11 +136,11 @@ List(value?:{space?: number | string, initialIndex?: number, scroller? 从API version 9开始,该接口支持在ArkTS卡片中使用。 -| 名称 | 描述 | -| ------ | ------------------------- | -| Idle | 空闲状态。使用控制器提供的方法滚动、拖动滚动条滚动时触发。 | -| Scroll | 手指拖动状态。使用手指拖动List滚动时触发。 | -| Fling | 惯性滚动状态。快速划动松手后惯性滚动和划动到边缘回弹时触发。 | +| 名称 | 描述 | +| ------ | ------------------------------ | +| Idle | 空闲状态。使用控制器提供的方法滚动、拖动滚动条滚动时触发。 | +| Scroll | 手指拖动状态。使用手指拖动List滚动时触发。 | +| Fling | 惯性滚动状态。快速划动松手后惯性滚动和划动到边缘回弹时触发。 | > **说明:** > @@ -158,8 +158,9 @@ List(value?:{space?: number | string, initialIndex?: number, scroller? > > - 绑定onDragStart事件,且事件回调中返回浮动UI布局。 +## 示例 -## 示例1 +### 示例1 ```ts // xxx.ets @@ -199,7 +200,7 @@ struct ListExample { ![zh-cn_image_0000001174264378](figures/zh-cn_image_0000001174264378.gif) -## 示例2 +### 示例2 ```ts // xxx.ets @@ -248,7 +249,7 @@ struct ListLanesExample { ![list](figures/list1.gif) -## 示例3 +### 示例3 ```ts // xxx.ets diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md index 3fee48a1b767dbaef6ec9e6853f98358bfbb1714..46b4e38eb3176c0b32e70936897fe50062bfe8b7 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md @@ -54,8 +54,10 @@ Swiper(controller?: SwiperController) | 名称 | 描述 | | ----------- | ------------------------------------------ | -| Stretch | Swiper滑动一页的宽度为Swiper组件自身的宽度。| -| AutoLinear | Swiper滑动一页的宽度为子组件宽度中的最大值。| +| Stretch(deprecated) | Swiper滑动一页的宽度为Swiper组件自身的宽度。
从API verdion 10开始不再维护,建议使用STRETCH代替。| +| AutoLinear(deprecated) | Swiper滑动一页的宽度为子组件宽度中的最大值。
从API verdion 10开始不再维护,建议使用AUTO_LINEAR代替。| +| STRETCH10+ | Swiper滑动一页的宽度为Swiper组件自身的宽度。| +| AUTO_LINEAR10+ | Swiper滑动一页的宽度为子组件宽度中的最大值。| ## SwiperController diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md index 515389849fe32a961fecba1723d9394761d76400..21cbf418422030c35d7b82534a9f9ad3f14a07e9 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md @@ -15,20 +15,20 @@ show(options?: DatePickerDialogOptions) **DatePickerDialogOptions参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| -------- | -------- | -------- | -------- | -------- | -| start | Date | 否 | Date('1970-1-1') | 设置选择器的起始日期。 | -| end | Date | 否 | Date('2100-12-31') | 设置选择器的结束日期。 | -| selected | Date | 否 | 当前系统日期 | 设置当前选中的日期。 | -| lunar | boolean | 否 | false | 日期是否显示为农历。 | -| showTime10+ | boolean | 否 | false | 是否展示时间项。 | -| useMilitaryTime10+ | boolean | 否 | false | 展示时间是否为24小时制。 | -| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | -| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | -| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置选中项的文本颜色、字号、字体粗细。 | -| onAccept | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | - | 点击弹窗中的“确定”按钮时触发该回调。 | -| onCancel | () => void | 否 | - | 点击弹窗中的“取消”按钮时触发该回调。 | -| onChange | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | - | 滑动弹窗中的滑动选择器使当前选中项改变时触发该回调。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | -------- | -------- | -------- | +| start | Date | 否 | 设置选择器的起始日期。
默认值:Date('1970-1-1') | +| end | Date | 否 | 设置选择器的结束日期。
默认值:Date('2100-12-31') | +| selected | Date | 否 | 设置当前选中的日期。
默认值:当前系统日期 | +| lunar | boolean | 否 | 日期是否显示为农历。
默认值:false | +| showTime10+ | boolean | 否 | 是否展示时间项。
默认值:false | +| useMilitaryTime10+ | boolean | 否 | 展示时间是否为24小时制。
默认值:false | +| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} | +| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} | +| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} | +| onAccept | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 | +| onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 | +| onChange | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | 滑动弹窗中的滑动选择器使当前选中项改变时触发该回调。 | ## 示例 @@ -86,3 +86,5 @@ struct DatePickerDialogExample { } } ``` + +![DataPickerDialog](figures/DataPickerDialog.gif) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md index 10ce2972bc9f5c0fa650fa919602d66c323b7af6..28785bc3be8c81a23cefca62cd409bae6cf39fc8 100755 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md @@ -21,9 +21,9 @@ show(options?: TextPickerDialogOptions) | selected | number | 否 | 设置选中项的索引值。
默认值:0 | | value | string | 否 | 设置选中项的文本内容。当设置了selected参数时,该参数不生效。如果设置的value值不在range范围内,则默认取range第一个元素。| | defaultPickerItemHeight | number \| string | 否 | 设置选择器中选项的高度。 | -| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | -| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | -| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。 | +| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} | +| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} | +| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} | | onAccept | (value: [TextPickerResult](#textpickerresult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 | | onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 | | onChange | (value: [TextPickerResult](#textpickerresult对象说明)) => void | 否 | 滑动弹窗中的选择器使当前选中项改变时触发该回调。 | @@ -46,27 +46,31 @@ struct TextPickerDialogExample { private fruits: string[] = ['apple1', 'orange2', 'peach3', 'grape4', 'banana5'] build() { - Column() { - Button("TextPickerDialog") - .margin(20) - .onClick(() => { - TextPickerDialog.show({ - range: this.fruits, - selected: this.select, - onAccept: (value: TextPickerResult) => { - // 设置select为按下确定按钮时候的选中项index,这样当弹窗再次弹出时显示选中的是上一次确定的选项 - this.select = value.index - console.info("TextPickerDialog:onAccept()" + JSON.stringify(value)) - }, - onCancel: () => { - console.info("TextPickerDialog:onCancel()") - }, - onChange: (value: TextPickerResult) => { - console.info("TextPickerDialog:onChange()" + JSON.stringify(value)) - } + Row() { + Column() { + Button("TextPickerDialog") + .margin(20) + .onClick(() => { + TextPickerDialog.show({ + range: this.fruits, + selected: this.select, + onAccept: (value: TextPickerResult) => { + // 设置select为按下确定按钮时候的选中项index,这样当弹窗再次弹出时显示选中的是上一次确定的选项 + this.select = value.index + console.info("TextPickerDialog:onAccept()" + JSON.stringify(value)) + }, + onCancel: () => { + console.info("TextPickerDialog:onCancel()") + }, + onChange: (value: TextPickerResult) => { + console.info("TextPickerDialog:onChange()" + JSON.stringify(value)) + } + }) }) - }) - }.width('100%') + }.width('100%') + }.height('100%') } } ``` + +![TextPickerDialog](figures/TextPickerDialog.gif) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md index fbd598c3269e88184ad54c1c704cf08b9274c50a..5c4fede524c07beaa9ca3d558ad1f58398a1a25e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md @@ -19,9 +19,9 @@ show(options?: TimePickerDialogOptions) | -------- | -------- | -------- | -------- | | selected | Date | 否 | 设置当前选中的时间。
默认值:当前系统时间 | | useMilitaryTime | boolean | 否 | 展示时间是否为24小时制,默认为12小时制。
默认值:false | -| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 | -| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 | -| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。 | +| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} | +| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} | +| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} | | onAccept | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 | | onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 | | onChange | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult对象说明)) => void | 否 | 滑动弹窗中的选择器使当前选中时间改变时触发该回调。 | @@ -76,4 +76,6 @@ struct TimePickerDialogExample { }.width('100%') } } -``` \ No newline at end of file +``` + +![TimetPickerDialog](figures/TimePickerDialog.gif) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md b/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md index 8823443bf9dac73a25e134252837f7a13d9f10e5..72b306e7662c9d11971ed43f25568a146d23e79d 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md @@ -3,7 +3,7 @@ 使用OffscreenCanvasRenderingContext2D在Canvas上进行离屏绘制,绘制对象可以是矩形、文本、图片等。离屏绘制是指将需要绘制的内容先绘制在缓存区,然后将其转换成图片,一次性绘制到canvas上,加快了绘制速度。 > **说明:** -> +> > 从 API Version 8 开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 @@ -16,37 +16,37 @@ OffscreenCanvasRenderingContext2D(width: number, height: number, settings?: Rend **参数:** -| 参数名 | 参数类型 | 必填 | 参数描述 | -| ------- | ------------------------------------------------------------ | ---- | ------------------------------------ | -| width | number | 是 | 离屏画布的宽度 | -| height | number | 是 | 离屏画布的高度 | -| setting | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | 否 | 见RenderingContextSettings接口描述。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | ---------------------------------------- | ---- | ------------------------------ | +| width | number | 是 | 离屏画布的宽度 | +| height | number | 是 | 离屏画布的高度 | +| settings | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | 否 | 见RenderingContextSettings接口描述。 | ## 属性 -| 名称 | 类型 | 描述 | -| ----------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 指定绘制的填充色。
- 类型为string时,表示设置填充区域的颜色。
- 类型为number时,表示设置填充区域的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [lineWidth](#linewidth) | number | 设置绘制线条的宽度。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 设置描边的颜色。
- 类型为string时,表示设置描边使用的颜色。
- 类型为number时,表示设置描边使用的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [lineCap](#linecap) | CanvasLineCap | 指定线端点的样式,可选值为:
- 'butt':线端点以方形结束。
- 'round':线端点以圆形结束。
- 'square':线端点以方形结束,该样式下会增加一个长度和线段厚度相同,宽度是线段厚度一半的矩形。
- 默认值:'butt'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [lineJoin](#linejoin) | CanvasLineJoin | 指定线段间相交的交点样式,可选值为:
- 'round':在线段相连处绘制一个扇形,扇形的圆角半径是线段的宽度。
- 'bevel':在线段相连处使用三角形为底填充, 每个部分矩形拐角独立。
- 'miter':在相连部分的外边缘处进行延伸,使其相交于一点,形成一个菱形区域,该属性可以通过设置miterLimit属性展现效果。
- 默认值:'miter'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [miterLimit](#miterlimit) | number | 设置斜接面限制值,该值指定了线条相交处内角和外角的距离。
- 默认值:10。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [font](#font) | string | 设置文本绘制中的字体样式。
语法:ctx.font='font-size font-family'
- font-size(可选),指定字号和行高,单位只支持px。
- font-family(可选),指定字体系列。
语法:ctx.font='font-style font-weight font-size font-family'
- font-style(可选),用于指定字体样式,支持如下几种样式:'normal','italic'。
- font-weight(可选),用于指定字体的粗细,支持如下几种类型:'normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900。
- font-size(可选),指定字号和行高,单位支持px、vp。使用时需要添加单位。
- font-family(可选),指定字体系列,支持如下几种类型:'sans-serif', 'serif', 'monospace'。
- 默认值:'normal normal 14px sans-serif'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [textAlign](#textalign) | CanvasTextAlign | 设置文本绘制中的文本对齐方式,可选值为:
- 'left':文本左对齐。
- 'right':文本右对齐。
- 'center':文本居中对齐。
- 'start':文本对齐界线开始的地方。
- 'end':文本对齐界线结束的地方。
> **说明:**
> ltr布局模式下'start'和'left'一致,rtl布局模式下'start'和'right'一致·。
- 默认值:'left'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [textBaseline](#textbaseline) | CanvasTextBaseline | 设置文本绘制中的水平对齐方式,可选值为:
- 'alphabetic':文本基线是标准的字母基线。
- 'top':文本基线在文本块的顶部。
- 'hanging':文本基线是悬挂基线。
- 'middle':文本基线在文本块的中间。
- 'ideographic':文字基线是表意字基线;如果字符本身超出了alphabetic基线,那么ideograhpic基线位置在字符本身的底部。
- 'bottom':文本基线在文本块的底部。 与ideographic基线的区别在于ideographic基线不需要考虑下行字母。
- 默认值:'alphabetic'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [globalAlpha](#globalalpha) | number | 设置透明度,0.0为完全透明,1.0为完全不透明。 | -| [lineDashOffset](#linedashoffset) | number | 设置画布的虚线偏移量,精度为float。
- 默认值:0.0。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [globalCompositeOperation](#globalcompositeoperation) | string | 设置合成操作的方式。类型字段可选值有'source-over','source-atop','source-in','source-out','destination-over','destination-atop','destination-in','destination-out','lighter','copy','xor'。
- 默认值:'source-over'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowBlur](#shadowblur) | number | 设置绘制阴影时的模糊级别,值越大越模糊,精度为float。
- 默认值:0.0。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowColor](#shadowcolor) | string | 设置绘制阴影时的阴影颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowOffsetX](#shadowoffsetx) | number | 设置绘制阴影时和原有对象的水平偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [shadowOffsetY](#shadowoffsety) | number | 设置绘制阴影时和原有对象的垂直偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | 用于设置绘制图片时是否进行图像平滑度调整,true为启用,false为不启用。
- 默认值:true。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [imageSmoothingQuality](#imagesmoothingquality) |ImageSmoothingQuality | imageSmoothingEnabled为true时,用于设置图像平滑度。可选值为:
- 'low':低画质
- 'medium':中画质
- 'high':高画质。
默认值:low
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [direction](#direction) |CanvasDirection | 用于设置绘制文字时使用的文字方向。可选值为:
- 'inherit':继承canvas组件已设定的文本方向
- 'ltr':从左往右
- 'rtl':从右往左。
默认值:inherit
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| [filter](#filter) |string | 用于设置图像的滤镜。支持的滤镜效果如下:
- 'none': 无滤镜效果
- 'blur':给图像设置高斯模糊
- 'brightness':给图片应用一种线性乘法,使其看起来更亮或更暗
- 'contrast':调整图像的对比度
- 'grayscale':将图像转换为灰度图像
- 'hue-rotate':给图像应用色相旋转
- 'invert':反转输入图像
- 'opacity':转化图像的透明程度
- 'saturate':转换图像饱和度
- 'sepia':将图像转换为深褐色
默认值:'none'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| 名称 | 类型 | 描述 | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 指定绘制的填充色。
- 类型为string时,表示设置填充区域的颜色。
- 类型为number时,表示设置填充区域的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [lineWidth](#linewidth) | number | 设置绘制线条的宽度。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 设置描边的颜色。
- 类型为string时,表示设置描边使用的颜色。
- 类型为number时,表示设置描边使用的颜色。
- 类型为CanvasGradient时,表示渐变对象,使用[createLinearGradient](#createlineargradient)方法创建。
- 类型为CanvasPattern时,使用[createPattern](#createpattern)方法创建。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [lineCap](#linecap) | CanvasLineCap | 指定线端点的样式,可选值为:
- 'butt':线端点以方形结束。
- 'round':线端点以圆形结束。
- 'square':线端点以方形结束,该样式下会增加一个长度和线段厚度相同,宽度是线段厚度一半的矩形。
- 默认值:'butt'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [lineJoin](#linejoin) | CanvasLineJoin | 指定线段间相交的交点样式,可选值为:
- 'round':在线段相连处绘制一个扇形,扇形的圆角半径是线段的宽度。
- 'bevel':在线段相连处使用三角形为底填充, 每个部分矩形拐角独立。
- 'miter':在相连部分的外边缘处进行延伸,使其相交于一点,形成一个菱形区域,该属性可以通过设置miterLimit属性展现效果。
- 默认值:'miter'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [miterLimit](#miterlimit) | number | 设置斜接面限制值,该值指定了线条相交处内角和外角的距离。
- 默认值:10。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [font](#font) | string | 设置文本绘制中的字体样式。
语法:ctx.font='font-size font-family'
- font-size(可选),指定字号和行高,单位只支持px。
- font-family(可选),指定字体系列。
语法:ctx.font='font-style font-weight font-size font-family'
- font-style(可选),用于指定字体样式,支持如下几种样式:'normal','italic'。
- font-weight(可选),用于指定字体的粗细,支持如下几种类型:'normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900。
- font-size(可选),指定字号和行高,单位支持px、vp。使用时需要添加单位。
- font-family(可选),指定字体系列,支持如下几种类型:'sans-serif', 'serif', 'monospace'。
- 默认值:'normal normal 14px sans-serif'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [textAlign](#textalign) | CanvasTextAlign | 设置文本绘制中的文本对齐方式,可选值为:
- 'left':文本左对齐。
- 'right':文本右对齐。
- 'center':文本居中对齐。
- 'start':文本对齐界线开始的地方。
- 'end':文本对齐界线结束的地方。
> **说明:**
> ltr布局模式下'start'和'left'一致,rtl布局模式下'start'和'right'一致·。
- 默认值:'left'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [textBaseline](#textbaseline) | CanvasTextBaseline | 设置文本绘制中的水平对齐方式,可选值为:
- 'alphabetic':文本基线是标准的字母基线。
- 'top':文本基线在文本块的顶部。
- 'hanging':文本基线是悬挂基线。
- 'middle':文本基线在文本块的中间。
- 'ideographic':文字基线是表意字基线;如果字符本身超出了alphabetic基线,那么ideograhpic基线位置在字符本身的底部。
- 'bottom':文本基线在文本块的底部。 与ideographic基线的区别在于ideographic基线不需要考虑下行字母。
- 默认值:'alphabetic'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [globalAlpha](#globalalpha) | number | 设置透明度,0.0为完全透明,1.0为完全不透明。 | +| [lineDashOffset](#linedashoffset) | number | 设置画布的虚线偏移量,精度为float。
- 默认值:0.0。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [globalCompositeOperation](#globalcompositeoperation) | string | 设置合成操作的方式。类型字段可选值有'source-over','source-atop','source-in','source-out','destination-over','destination-atop','destination-in','destination-out','lighter','copy','xor'。
- 默认值:'source-over'。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowBlur](#shadowblur) | number | 设置绘制阴影时的模糊级别,值越大越模糊,精度为float。
- 默认值:0.0。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowColor](#shadowcolor) | string | 设置绘制阴影时的阴影颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowOffsetX](#shadowoffsetx) | number | 设置绘制阴影时和原有对象的水平偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [shadowOffsetY](#shadowoffsety) | number | 设置绘制阴影时和原有对象的垂直偏移值。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | 用于设置绘制图片时是否进行图像平滑度调整,true为启用,false为不启用。
- 默认值:true。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [imageSmoothingQuality](#imagesmoothingquality) | ImageSmoothingQuality | imageSmoothingEnabled为true时,用于设置图像平滑度。可选值为:
- 'low':低画质
- 'medium':中画质
- 'high':高画质。
默认值:low
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [direction](#direction) | CanvasDirection | 用于设置绘制文字时使用的文字方向。可选值为:
- 'inherit':继承canvas组件已设定的文本方向
- 'ltr':从左往右
- 'rtl':从右往左。
默认值:inherit
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| [filter](#filter) | string | 用于设置图像的滤镜。支持的滤镜效果如下:
- 'none': 无滤镜效果
- 'blur':给图像设置高斯模糊
- 'brightness':给图片应用一种线性乘法,使其看起来更亮或更暗
- 'contrast':调整图像的对比度
- 'grayscale':将图像转换为灰度图像
- 'hue-rotate':给图像应用色相旋转
- 'invert':反转输入图像
- 'opacity':转化图像的透明程度
- 'saturate':转换图像饱和度
- 'sepia':将图像转换为深褐色
默认值:'none'
从API version 9开始,该接口支持在ArkTS卡片中使用。 | > **说明:** > fillStyle、shadowColor与 strokeStyle 中string类型格式为 'rgb(255, 255, 255)','rgba(255, 255, 255, 1.0)','\#FFFFFF'。 @@ -964,8 +964,8 @@ measureText(text: string): TextMetrics **返回值:** -| 类型 | 说明 | -| ----------- | ------------------------------------------------------------ | +| 类型 | 说明 | +| ----------- | ---------------------------------------- | | TextMetrics | 文本的尺寸信息
从API version 9开始,该接口支持在ArkTS卡片中使用。 | **TextMetrics类型描述:** @@ -1278,8 +1278,8 @@ createPattern(image: ImageBitmap, repetition: string | null): CanvasPattern | nu **返回值:** -| 类型 | 说明 | -| ------------------------------- | ----------------------- | +| 类型 | 说明 | +| ---------------------------------------- | ----------------------- | | [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | 通过指定图像和重复方式创建图片填充的模板对象。 | **示例:** @@ -1538,16 +1538,16 @@ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number **参数:** -| 参数 | 类型 | 必填 | 默认值 | 说明 | -| ---------------- | ------- | ---- | ----- | ----------------- | -| x | number | 是 | 0 | 椭圆圆心的x轴坐标。 | -| y | number | 是 | 0 | 椭圆圆心的y轴坐标。 | -| radiusX | number | 是 | 0 | 椭圆x轴的半径长度。 | -| radiusY | number | 是 | 0 | 椭圆y轴的半径长度。 | -| rotation | number | 是 | 0 | 椭圆的旋转角度,单位为弧度。 | -| startAngle | number | 是 | 0 | 椭圆绘制的起始点角度,以弧度表示。 | -| endAngle | number | 是 | 0 | 椭圆绘制的结束点角度,以弧度表示。 | -| counterclockwise | boolean | 否 | false | 是否以逆时针方向绘制椭圆。
true:逆时针方向绘制椭圆。
false:顺时针方向绘制椭圆。 | +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| ---------------- | ------- | ---- | ----- | ---------------------------------------- | +| x | number | 是 | 0 | 椭圆圆心的x轴坐标。 | +| y | number | 是 | 0 | 椭圆圆心的y轴坐标。 | +| radiusX | number | 是 | 0 | 椭圆x轴的半径长度。 | +| radiusY | number | 是 | 0 | 椭圆y轴的半径长度。 | +| rotation | number | 是 | 0 | 椭圆的旋转角度,单位为弧度。 | +| startAngle | number | 是 | 0 | 椭圆绘制的起始点角度,以弧度表示。 | +| endAngle | number | 是 | 0 | 椭圆绘制的结束点角度,以弧度表示。 | +| counterclockwise | boolean | 否 | false | 是否以逆时针方向绘制椭圆。
true:逆时针方向绘制椭圆。
false:顺时针方向绘制椭圆。 | **示例:** @@ -1794,7 +1794,7 @@ clip(path:Path2D, fillRule?: CanvasFillRule): void | 参数 | 类型 | 必填 | 默认值 | 描述 | | -------- | -------------- | ---- | --------- | ---------------------------------------- | -| path | Path2D | 是 | | Path2D剪切路径。 | +| path | Path2D | 是 | | Path2D剪切路径。 | | fillRule | CanvasFillRule | 否 | "nonzero" | 指定要剪切对象的规则。
可选参数为:"nonzero", "evenodd"。 | **示例:** @@ -1850,8 +1850,8 @@ filter(filter: string): void **参数:** -| 参数 | 类型 | 必填 | 默认值 | 说明 | -| ------ | ------ | ---- | ---- | ------------ | +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| ------ | ------ | ---- | ---- | ---------------------------------------- | | filter | string | 是 | - | 接受各类滤镜效果的函数。支持的滤镜效果如下:
- 'none': 无滤镜效果
- 'blur':给图像设置高斯模糊
- 'brightness':给图片应用一种线性乘法,使其看起来更亮或更暗
- 'contrast':调整图像的对比度
- 'grayscale':将图像转换为灰度图像
- 'hue-rotate':给图像应用色相旋转
- 'invert':反转输入图像
- 'opacity':转化图像的透明程度
- 'saturate':转换图像饱和度
- 'sepia':将图像转换为深褐色
默认值:'none' | **示例:** @@ -1927,8 +1927,8 @@ getTransform(): Matrix2D **返回值:** -| 类型 | 说明 | -| ----------------------------------------------------- | ---------- | +| 类型 | 说明 | +| ---------------------------------------- | ----- | | [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | 矩阵对象。 | ### resetTransform @@ -2460,15 +2460,15 @@ putImageData(imageData: Object, dx: number | string, dy: number | string, dirtyX **参数:** -| 参数 | 类型 | 必填 | 默认值 | 描述 | -| ----------- | ---------------------------------------- | ---- | --------------- | --------------------------------------------------------- | -| imagedata | Object | 是 | null | 包含像素值的ImageData对象。 | -| dx | number \| string10+ | 是 | 0 | 填充区域在x轴方向的偏移量。 | -| dy | number \| string10+ | 是 | 0 | 填充区域在y轴方向的偏移量。 | -| dirtyX | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的x轴偏移量。 | -| dirtyY | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的y轴偏移量。 | -| dirtyWidth | number \| string10+ | 否 | imagedata的宽度 | 源图像数据矩形裁切范围的宽度。 | -| dirtyHeight | number \| string10+ | 否 | imagedata的高度 | 源图像数据矩形裁切范围的高度。 | +| 参数 | 类型 | 必填 | 默认值 | 描述 | +| ----------- | ---------------------------------------- | ---- | ------------ | ----------------------------- | +| imagedata | Object | 是 | null | 包含像素值的ImageData对象。 | +| dx | number \| string10+ | 是 | 0 | 填充区域在x轴方向的偏移量。 | +| dy | number \| string10+ | 是 | 0 | 填充区域在y轴方向的偏移量。 | +| dirtyX | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的x轴偏移量。 | +| dirtyY | number \| string10+ | 否 | 0 | 源图像数据矩形裁切范围左上角距离源图像左上角的y轴偏移量。 | +| dirtyWidth | number \| string10+ | 否 | imagedata的宽度 | 源图像数据矩形裁切范围的宽度。 | +| dirtyHeight | number \| string10+ | 否 | imagedata的高度 | 源图像数据矩形裁切范围的高度。 | **示例:** @@ -2963,11 +2963,11 @@ createConicGradient(startAngle: number, x: number, y: number): CanvasGradient **参数:** -| 参数 | 类型 | 必填 | 默认值 | 描述 | -| ---------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| startAngle | number | 是 | 0 | 开始渐变的角度,以弧度为单位。角度测量从中心右侧水平开始,顺时针移动。 | -| x | number | 是 | 0 | 圆锥渐变的中心x轴坐标。单位:vp | -| y | number | 是 | 0 | 圆锥渐变的中心y轴坐标。单位:vp | +| 参数 | 类型 | 必填 | 默认值 | 描述 | +| ---------- | ------ | ---- | ---- | ----------------------------------- | +| startAngle | number | 是 | 0 | 开始渐变的角度,以弧度为单位。角度测量从中心右侧水平开始,顺时针移动。 | +| x | number | 是 | 0 | 圆锥渐变的中心x轴坐标。单位:vp | +| y | number | 是 | 0 | 圆锥渐变的中心y轴坐标。单位:vp | **示例:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-types.md b/zh-cn/application-dev/reference/arkui-ts/ts-types.md index dcd84c0ef0a5b0d9cdcd92117d9acbd09b426b8c..172a00b4c212fed345977d7d29cbee41c81b74e2 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-types.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-types.md @@ -245,6 +245,67 @@ | 名称 | 描述 | | ------- | ------------ | -| None | 全屏模态无转场动画。 | -| Default | 全屏模态上下切换动画。 | -| Alpha | 全屏模态透明度渐变动画。 | \ No newline at end of file +| NONE | 全屏模态无转场动画。 | +| DEFAULT | 全屏模态上下切换动画。 | +| ALPHA | 全屏模态透明度渐变动画。 | + +## Dimension10+ + +长度类型,用于描述尺寸单位。 + +| 类型 | 说明 | +| --------------------- | -------------------------------------- | +| [PX](#px10) | 需要指定以px像素单位,如'10px'。 | +| [VP](#vp10) | 需要指定以vp像素单位,如'10vp'。| +| [FP](#fp10) | 需要指定以fp像素单位,如'10fp'。| +| [LPX](#lpx10) | 需要指定以lpx像素单位,如'10lpx'。| +| [Percentage](#percentage10) | 需要指定以%像素单位,如'10%'。| +| [Resource](#resource) | 资源引用类型,引入系统资源或者应用资源中的尺寸。| + +## PX10+ + +长度类型,用于描述以px像素单位为单位的长度。 + +| 类型 | 说明 | +| --------------------- | -------------------------------------- | +| {number}px | 需要指定以px像素单位,如'10px'。 | + +## VP10+ + +长度类型,用于描述以vp像素单位为单位的长度。 + +| 类型 | 说明 | +| --------------------- | -------------------------------------- | +| {number}vp | 需要指定以vp像素单位,如'10vp'。 | + +## FP10+ + +长度类型,用于描述以fp像素单位为单位的长度。 + +| 类型 | 说明 | +| --------------------- | -------------------------------------- | +| {number}fp | 需要指定以fp像素单位,如'10fp'。 | + +## LPX10+ + +长度类型,用于描述以lpx像素单位为单位的长度。 + +| 类型 | 说明 | +| --------------------- | -------------------------------------- | +| {number}lpx | 需要指定以lpx像素单位,如'10lpx'。 | + +## Percentage10+ + +长度类型,用于描述以%像素单位为单位的长度。 + +| 类型 | 说明 | +| --------------------- | -------------------------------------- | +| {number}% | 需要指定以%像素单位,如'10%'。 | + +## Degree10+ + +角度类型,用于描述以deg像素单位为单位的长度。 + +| 类型 | 说明 | +| --------------------- | -------------------------------------- | +| {number}deg | 需要指定以deg像素单位,如'10deg'。 | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-background.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-background.md index 4107ebe46ad7c0104ea0500e3121483272197ef4..8119121a151db994119ff4c020d214722020c84e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-background.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-background.md @@ -14,9 +14,19 @@ | backgroundImage | src: [ResourceStr](ts-types.md#resourcestr),
repeat?: [ImageRepeat](ts-appendix-enums.md#imagerepeat) | src:图片地址,支持网络图片资源地址和本地图片资源地址和Base64,不支持svg类型的图片。
repeat:设置背景图片的重复样式,默认不重复。当设置的背景图片为透明底色图片,且同时设置了backgroundColor时,二者叠加显示,背景颜色在最底部。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | | backgroundImageSize | {
width?: [Length](ts-types.md#length),
height?: [Length](ts-types.md#length)
} \| [ImageSize](ts-appendix-enums.md#imagesize) | 设置背景图像的高度和宽度。当输入为{width: Length, height: Length}对象时,如果只设置一个属性,则第二个属性保持图片原始宽高比进行调整。默认保持原图的比例不变。
width和height取值范围: [0, +∞)
默认值:ImageSize.Auto
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按值为0显示。当设置了height未设置width时,width根据图片原始宽高比进行调整。 | | backgroundImagePosition | [Position](ts-types.md#position8) \| [Alignment](ts-appendix-enums.md#alignment) | 设置背景图在组件中显示位置,即相对于组件左上角的坐标。
默认值:
{
x: 0,
y: 0
}
x和y值设置百分比时,偏移量是相对组件自身宽高计算的。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| backgroundBlurStyle9+ | value:[BlurStyle](ts-appendix-enums.md#blurstyle9),
options10+?:[BackgroundBlurStyleOptions](#backgroundblurstyleoptions10对象说明) | 为当前组件提供一种在背景和内容之间的模糊能力。
value: 背景模糊样式。模糊样式中封装了模糊半径、蒙版颜色、蒙版透明度、饱和度四个参数。
options: 可选参数,背景模糊选项。
该接口支持在ArkTS卡片中使用。 | + +## BackgroundBlurStyleOptions10+对象说明 + +| 名称 | 参数类型 | 必填 | 描述 | +| --------------------------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ | +| colorMode10+ | [ThemeColorMode](ts-appendix-enums.md#themecolormode10) | 否 | 背景模糊效果使用的深浅色模式。
默认值:ThemeColorMode.System | +| adaptiveColor10+ | [AdaptiveColor](ts-appendix-enums.md#adaptivecolor10) | 否 | 背景模糊效果使用的取色模式。
默认值:AdaptiveColor.Default | ## 示例 +### 示例1 + ```ts // xxx.ets @Entry @@ -84,3 +94,30 @@ struct BackgroundExample { ``` ![zh-cn_image_0000001219982703](figures/zh-cn_image_0000001219982703.png) + +### 示例2 + +```ts +// xxx.ets +@Entry +@Component +struct BackgroundBlurStyleDemo { + build() { + Column() { + Row() { + Text("Thin Material") + } + .width('50%') + .height('50%') + .backgroundBlurStyle(BlurStyle.Thin, { colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT }) + .position({ x: '15%', y: '30%' }) + } + .height('100%') + .width('100%') + .backgroundImage($r('app.media.bg')) + .backgroundImageSize(ImageSize.Cover) + } +} +``` + +![zh-cn_image_background_blur_style](figures/zh-cn_image_background_blur_style.png) \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md deleted file mode 100644 index 50b1bc3a158306be1a402a59589116586986d95e..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md +++ /dev/null @@ -1,48 +0,0 @@ -# 组件背景模糊 - -为当前组件添加背景模糊效果。 - -> **说明:** -> -> 从API Version 9开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -> -> 此接口为系统接口。 - -## 属性 - -| 名称 | 参数 | 描述 | -| -------------------- | ----------------------- | ------------------------ | -| backgroundBlurStyle | value:[BlurStyle](ts-appendix-enums.md#blurstyle9),
options10+?:[BackgroundBlurStyleOptions](#backgroundblurstyleoptions10对象说明) | 为当前组件提供一种在背景和内容之间的模糊能力。
value: 背景模糊样式。模糊样式中封装了模糊半径、蒙版颜色、蒙版透明度、饱和度四个参数。
options: 可选参数,背景模糊选项。
该接口支持在ArkTS卡片中使用。 | - -## BackgroundBlurStyleOptions10+对象说明 - -| 名称 | 参数类型 | 必填 | 描述 | -| ----------- | ------| ------ | ------ | -| colorMode10+ | [ThemeColorMode](ts-appendix-enums.md#themecolormode10) | 否 | 背景模糊效果使用的深浅色模式。
默认值:ThemeColorMode.System | -| adaptiveColor10+ | [AdaptiveColor](ts-appendix-enums.md#adaptivecolor10) | 否 | 背景模糊效果使用的取色模式。
默认值:AdaptiveColor.Default | - -## 示例 - -```ts -// xxx.ets -@Entry -@Component -struct BackgroundBlurStyleDemo { - build() { - Column() { - Row() { - Text("Thin Material") - } - .width('50%') - .height('50%') - .backgroundBlurStyle(BlurStyle.Thin, { colorMode: ThemeColorMode.Light, adaptiveColor: AdaptiveColor.Default }) - .position({ x: '15%', y: '30%' }) - } - .height('100%') - .width('100%') - .backgroundImage($r('app.media.bg')) - .backgroundImageSize(ImageSize.Cover) - } -} -``` -![zh-cn_image_background_blur_style](figures/zh-cn_image_background_blur_style.png) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-image-effect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-image-effect.md index 11f0c61a7e44545b0374a82b260187074c633e07..75f33e914d0af0b2b206f474b5523a9575ff7a3e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-image-effect.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-image-effect.md @@ -1,6 +1,6 @@ # 图像效果 -设置组件的模糊,阴影效果以及设置图片的图像效果。 +设置组件的模糊、阴影、球面效果以及设置图片的图像效果。 > **说明:** > @@ -10,19 +10,22 @@ ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ----------------------------- | ------------------------------------------------------------ | ------ | ------------------------------------------------------------ | -| blur | number | - | 为当前组件添加内容模糊效果,入参为模糊半径,模糊半径越大越模糊,为0时不模糊。
取值范围:[0, +∞)
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| backdropBlur | number | - | 为当前组件添加背景模糊效果,入参为模糊半径,模糊半径越大越模糊,为0时不模糊。
取值范围:[0, +∞)
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| shadow | [ShadowOptions](#shadowoptions对象说明) \| [ShadowStyle](#shadowstyle10枚举说明) | - | 为当前组件添加阴影效果。
入参类型为ShadowOptions时,可以指定模糊半径、阴影的颜色、X轴和Y轴的偏移量。
入参类型为ShadowStyle时,可指定不同阴影样式。
从API version 9开始,该接口支持在ArkTS卡片中使用,ArkTS卡片上不支持参数为 [ShadowStyle](#shadowstyle10枚举说明)类型。 | -| grayscale | number | 0.0 | 为当前组件添加灰度效果。值定义为灰度转换的比例,入参1.0则完全转为灰度图像,入参则0.0图像无变化,入参在0.0和1.0之间时,效果呈线性变化。(百分比)
取值范围:[0, 1]
**说明:**
设置小于0的值时,按值为0处理,设置大于1的值时,按值为1处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| brightness | number | 1.0 | 为当前组件添加高光效果,入参为高光比例,值为1时没有效果,小于1时亮度变暗,0为全黑,大于1时亮度增加,数值越大亮度越大。
取值范围:[0, +∞)
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| saturate | number | 1.0 | 为当前组件添加饱和度效果,饱和度为颜色中的含色成分和消色成分(灰)的比例,入参为1时,显示原图像,大于1时含色成分越大,饱和度越大,小于1时消色成分越大,饱和度越小。(百分比)
取值范围:[0, +∞)
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| contrast | number | 1.0 | 为当前组件添加对比度效果,入参为对比度的值。值为1时,显示原图,大于1时,值越大对比度越高,图像越清晰醒目,小于1时,值越小对比度越低,当对比度为0时,图像变为全灰。(百分比)
取值范围:[0, +∞)
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| invert | number | 0 | 反转输入的图像。入参为图像反转的比例,值为1时完全反转,值为0则图像无变化。(百分比)
取值范围:[0, 1]
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| sepia | number | 0 | 将图像转换为深褐色。入参为图像反转的比例,值为1则完全是深褐色的,值为0图像无变化。 (百分比)
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| hueRotate | number \| string | '0deg' | 色相旋转效果,输入参数为旋转角度。
取值范围:(-∞, +∞)
**说明:**
色调旋转360度会显示原始颜色。先将色调旋转180 度,然后再旋转-180度会显示原始颜色。数据类型为number时,值为90和'90deg'效果一致。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | -| colorBlend 8+ | [Color](ts-appendix-enums.md#color) \| string \| [Resource](ts-types.md#resource) | - | 为当前组件添加颜色叠加效果,入参为叠加的颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| -------------------------------- | ------------------------------------------------------------ | ------ | ------------------------------------------------------------ | +| blur | number | - | 为当前组件添加内容模糊效果,入参为模糊半径,模糊半径越大越模糊,为0时不模糊。
取值范围:[0, +∞)
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| backdropBlur | number | - | 为当前组件添加背景模糊效果,入参为模糊半径,模糊半径越大越模糊,为0时不模糊。
取值范围:[0, +∞)
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| shadow | [ShadowOptions](#shadowoptions对象说明) \| [ShadowStyle](#shadowstyle10枚举说明)10+ | - | 为当前组件添加阴影效果。
入参类型为ShadowOptions时,可以指定模糊半径、阴影的颜色、X轴和Y轴的偏移量。
入参类型为ShadowStyle时,可指定不同阴影样式。
从API version 9开始,该接口支持在ArkTS卡片中使用,ArkTS卡片上不支持参数为 [ShadowStyle](#shadowstyle10枚举说明)类型。 | +| grayscale | number | 0.0 | 为当前组件添加灰度效果。值定义为灰度转换的比例,入参1.0则完全转为灰度图像,入参则0.0图像无变化,入参在0.0和1.0之间时,效果呈线性变化。(百分比)
取值范围:[0, 1]
**说明:**
设置小于0的值时,按值为0处理,设置大于1的值时,按值为1处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| brightness | number | 1.0 | 为当前组件添加高光效果,入参为高光比例,值为1时没有效果,小于1时亮度变暗,0为全黑,大于1时亮度增加,数值越大亮度越大。
取值范围:[0, +∞)
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| saturate | number | 1.0 | 为当前组件添加饱和度效果,饱和度为颜色中的含色成分和消色成分(灰)的比例,入参为1时,显示原图像,大于1时含色成分越大,饱和度越大,小于1时消色成分越大,饱和度越小。(百分比)
取值范围:[0, +∞)
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| contrast | number | 1.0 | 为当前组件添加对比度效果,入参为对比度的值。值为1时,显示原图,大于1时,值越大对比度越高,图像越清晰醒目,小于1时,值越小对比度越低,当对比度为0时,图像变为全灰。(百分比)
取值范围:[0, +∞)
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| invert | number | 0 | 反转输入的图像。入参为图像反转的比例,值为1时完全反转,值为0则图像无变化。(百分比)
取值范围:[0, 1]
**说明:**
设置小于0的值时,按值为0处理。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| sepia | number | 0 | 将图像转换为深褐色。入参为图像反转的比例,值为1则完全是深褐色的,值为0图像无变化。 (百分比)
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| hueRotate | number \| string | '0deg' | 色相旋转效果,输入参数为旋转角度。
取值范围:(-∞, +∞)
**说明:**
色调旋转360度会显示原始颜色。先将色调旋转180 度,然后再旋转-180度会显示原始颜色。数据类型为number时,值为90和'90deg'效果一致。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| colorBlend 8+ | [Color](ts-appendix-enums.md#color) \| string \| [Resource](ts-types.md#resource) | - | 为当前组件添加颜色叠加效果,入参为叠加的颜色。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| sphericalEffect10+ | [number] | - | 设置组件的图像球面化程度。
取值范围:[0,1]。
**说明:**
1. 如果value等于0则图像保持原样,如果value等于1则图像为完全球面化效果。在0和1之间,数值越大,则球面化程度越高。
`value < 0 `或者` value > 1`为异常情况,`value < 0`按0处理,`value > 1`按1处理。
2. 如果组件的图像使用异步加载,则不支持球面效果。例如Image组件默认使用异步加载,如果要使用球面效果,就要设置`syncLoad`为`true`,但是这种做法不推荐。`backgroundImage`也是使用异步加载,所以如果设置了`backgroundImage`,不支持球面效果。
3. 如果组件设置了阴影,不支持球面效果。 | +| lightUpEffect10+ | [number] | - | 设置组件图像亮起程度。
取值范围:[0,1]。
如果value等于0则图像为全黑,如果value等于1则图像为全亮效果。0到1之间数值越大,表示图像亮度越高。`value < 0` 或者 `value > 1`为异常情况,`value < 0`按0处理,`value > 1`按1处理。 | +| pixelStretchEffect10+ | [PixelStretchEffectOptions](ts-types.md#PixelStretchEffectOptions) | - | 设置组件的图像边缘像素扩展距离。
参数`options`包括上下左右四个方向的边缘像素扩展距离。
**说明:**
1. 如果距离为正值,表示向外扩展,放大原来图像大小。上下左右四个方向分别用边缘像素填充,填充的距离即为设置的边缘扩展的距离。
2. 如果距离为负值,表示内缩,但是最终图像大小不变。
内缩方式:
图像根据`options`的设置缩小,缩小大小为四个方向边缘扩展距离的绝对值。
图像用边缘像素扩展到原来大小。
3. 对`options`的输入约束:
上下左右四个方向的扩展统一为非正值或者非负值。即四个边同时向外扩或者内缩,方向一致。
所有方向的输入均为百分比或者具体值,不支持百分比和具体值混用。
所有异常情况下,显示为{0,0,0,0}效果,即跟原图保持一致。 | ## ShadowOptions对象说明 @@ -41,12 +44,12 @@ | 名称 | 描述 | | ------ | -------------------------------------- | -| OuterDefaultXS | 超小阴影。 | -| OuterDefaultSM | 小阴影。 | -| OuterDefaultMD | 中阴影。 | -| OuterDefaultLG | 大阴影。 | -| OuterFloatingSM | 浮动小阴影。 | -| OuterFloatingMD | 浮动中阴影。 | +| OUTER_DEFAULT_XS | 超小阴影。 | +| OUTER_DEFAULT_SM | 小阴影。 | +| OUTER_DEFAULT_MD | 中阴影。 | +| OUTER_DEFAULT_LG | 大阴影。 | +| OUTER_FLOATING_SM | 浮动小阴影。 | +| OUTER_FLOATING_MD | 浮动中阴影。 | ## 示例 @@ -148,3 +151,173 @@ struct ImageEffectsExample { ![imageeffect](figures/imageeffect.png) +### 示例3 + +设置组件的图像球面效果。 + +```ts +// xxx.ets +@Entry +@Component +struct SphericalEffectExample { + build() { + Stack() { + TextInput({ placeholder: "请输入变化范围百分比([0%,100%])"}) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + .sphericalEffect(0.5) + }.alignContent(Alignment.Center).width("100%").height("100%") + } +} + +``` + +效果图如下: + +![textInputSpherical1](figures/textInputSpherical1.png) + +去掉sphericalEffect的设置,效果如下: + +![textInputSpherical2](figures/textInputSpherical2.png) + +### 示例4 + +设置组件的图像渐亮效果。 + +```ts +// xxx.ets +@Entry +@Component +struct LightUpExample { + build() { + Stack() { + Text('This is the text content with letterSpacing 0.') + .letterSpacing(0) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('50%') + .lightUpEffect(0.6) + }.alignContent(Alignment.Center).width("100%").height("100%") + } +} + +``` + +效果图如下: + +![textLightUp3](figures/textLightUp3.png) + +修改lightUpEffect参数值为0.2: + +![textLightUp2](figures/textLightUp2.png) + +去掉lightUpEffect的设置,效果如下: + +![textLightUp1](figures/textLightUp1.png) + +### 示例5 + +```ts +// xxx.ets +@Entry +@Component +struct LightUpExample { + @State isLunar: boolean = false + private selectedDate: Date = new Date('2028-08-08') + build() { + Stack() { + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2100-1-1'), + selected: this.selectedDate + }) + .lunar(this.isLunar) + .onChange((value: DatePickerResult) => { + this.selectedDate.setFullYear(value.year, value.month, value.day) + console.info('select current date is: ' + JSON.stringify(value)) + }) + .lightUpEffect(0.6) + + }.alignContent(Alignment.Center).width("100%").height("100%") + } +} +``` + +![datePickerLightUp2](figures/datePickerLightUp2.png) + +去掉lightUpEffect的设置,效果如下: + +![datePickerLightUp1](figures/datePickerLightUp1.png) + +### 示例6 + +设置组件的图像边缘像素扩展效果。 + +```ts +// xxx.ets +@Entry +@Component +struct PixelStretchExample { + build() { + Stack() { + Text('This is the text content with letterSpacing 0.') + .letterSpacing(0) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('50%') + .pixelStretchEffect({top:10,left:10,right:10,bottom:10 }) + }.alignContent(Alignment.Center).width("100%").height("100%") + } +} + +``` + +效果图如下: + +![textPixelStretch1](figures/textPixelStretch1.png) + +去掉pixelStretchEffect的设置,原图效果如下: + +![textPixelStretch2](figures/textPixelStretch2.png) + +### 示例7 + +基于示例6,现在把边缘扩展距离改为非正值。 + +```ts +// xxx.ets +@Entry +@Component +struct PixelStretchExample { + build() { + Stack() { + Text('This is the text content with letterSpacing 0.') + .letterSpacing(0) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('50%') + .pixelStretchEffect({top:-10,left:-10,right:-10,bottom:-10 }) + }.alignContent(Alignment.Center).width("100%").height("100%") + } +} +``` + +效果图如下: + +![textPixelStretch3](figures/textPixelStretch3.png) + +跟原图对比发现,效果图分两步实现:
1、原图大小缩小,缩小后的大小为原图大小减去像素 +收缩的距离。例如,原图大小为`100*100`,设置了`pixelStretchEffect({top:-10,left:-10, +right:-10,bottom:-10 })`,则缩小后的大小为`(100-10-10)*(100-10-10)`,即`80*80`。
2、使用边缘像素扩展,将图像扩展为原图大小。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-lightUpEffect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-lightUpEffect.md deleted file mode 100644 index a9bb7528afe070280842971a5984ad069b6e6fa5..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-lightUpEffect.md +++ /dev/null @@ -1,80 +0,0 @@ -# 图像渐亮效果 - -设置组件的图像渐亮效果。 - -> **说明:** -> -> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。此接口为系统接口。 - -## 属性 - -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | -| lightUpEffect | [number] | 设置组件图像亮起程度。
取值范围:[0,1]。
如果value等于0则图像为全黑,如果value等于1则图像为全亮效果。0到1之间数值越大,表示图像亮度越高。`value < 0` 或者 `value > 1`为异常情况,`value < 0`按0处理,`value > 1`按1处理。 | - -## 示例 - -### 示例1 -```ts -// xxx.ets -@Entry -@Component -struct LightUpExample { - build() { - Stack() { - Text('This is the text content with letterSpacing 0.') - .letterSpacing(0) - .fontSize(12) - .border({ width: 1 }) - .padding(10) - .width('50%') - .lightUpEffect(0.6) - }.alignContent(Alignment.Center).width("100%").height("100%") - } -} - -``` -效果图如下: - -![textLightUp3](figures/textLightUp3.png) - -修改lightUpEffect参数值为0.2: - -![textLightUp2](figures/textLightUp2.png) - -去掉lightUpEffect的设置,效果如下: - -![textLightUp1](figures/textLightUp1.png) -### 示例2 - -```ts -// xxx.ets -@Entry -@Component -struct LightUpExample { - @State isLunar: boolean = false - private selectedDate: Date = new Date('2028-08-08') - build() { - Stack() { - DatePicker({ - start: new Date('1970-1-1'), - end: new Date('2100-1-1'), - selected: this.selectedDate - }) - .lunar(this.isLunar) - .onChange((value: DatePickerResult) => { - this.selectedDate.setFullYear(value.year, value.month, value.day) - console.info('select current date is: ' + JSON.stringify(value)) - }) - .lightUpEffect(0.6) - - }.alignContent(Alignment.Center).width("100%").height("100%") - } -} -``` - -![datePickerLightUp2](figures/datePickerLightUp2.png) - -去掉lightUpEffect的设置,效果如下: - -![datePickerLightUp1](figures/datePickerLightUp1.png) \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-modal-transition.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-modal-transition.md index 9059796917df1d1b8d9728b790f6e13c1f553ca7..6f3c0a00807ec6634b19b522dc0727067a7a4483 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-modal-transition.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-modal-transition.md @@ -5,6 +5,7 @@ > **说明:** > > 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 +> 不支持横竖屏切换。 ## 属性 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-obscured.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-obscured.md new file mode 100644 index 0000000000000000000000000000000000000000..db2af7596c44f30c33b494092f7f478ad2c8e7b0 --- /dev/null +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-obscured.md @@ -0,0 +1,58 @@ +# 隐私遮罩 + +用于对组件内容进行隐私遮罩处理。 + +> **说明:** +> +> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 + + +## 属性 + + +| 名称 | 参数类型 | 描述 | +| -----| ------------------------------------------ | ------------------------------------ | +| obscured | Array<[ObscuredReasons](ts-appendix-enums.md#obscuredreasons10)> | 设置组件内容的遮罩类型。
默认值:[]
该接口支持在ArkTS卡片中使用。
仅支持[Image](ts-basic-components-image.md)组件和[Text](ts-basic-components-text.md)组件的隐私遮罩处理。
**说明:**
如需在图片加载过程中显示隐私遮罩,需要设置Image组件的宽度和高度。 | + +## 示例 + +```ts +// xxx.ets +@Entry +@Component +struct ObscuredExample { + build() { + Row() { + Column() { + Text('Text not set obscured attribute').fontSize(10).fontColor(Color.Black) + Text('This is an example for text obscured attribute.') + .fontSize(30) + .width('600px') + .fontColor(Color.Black) + .border({ width: 1 }) + Text('Image not set obscured attribute').fontSize(10).fontColor(Color.Black) + Image($r('app.media.icon')) + .width('200px') + .height('200px') + Text('Text set obscured attribute').fontSize(10).fontColor(Color.Black) + Text('This is an example for text obscured attribute.') + .fontSize(30) + .width('600px') + .fontColor(Color.Black) + .border({ width: 1 }) + .obscured([ObscuredReasons.PLACEHOLDER]) + Text('Image set obscured attribute').fontSize(10).fontColor(Color.Black) + Image($r('app.media.icon')) + .width('200px') + .height('200px') + .obscured([ObscuredReasons.PLACEHOLDER]) + } + .width('100%') + } + .height('100%') + } +} +``` + +![obscured](figures/obscured.png) + diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md deleted file mode 100644 index d99b8e9f43e3f86d4831f4341bf72680d14f683b..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md +++ /dev/null @@ -1,76 +0,0 @@ -# 图像边缘像素扩展效果 - -设置组件的图像边缘像素扩展效果。 - -> **说明:** -> -> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。此接口为系统接口。 - -## 属性 - -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | -| pixelStretchEffect | [PixelStretchEffectOptions](ts-types.md#PixelStretchEffectOptions) | 设置组件的图像边缘像素扩展距离。
参数`options`包括上下左右四个方向的边缘像素扩展距离。
**说明:**
1、如果距离为正值,表示向外扩展,放大原来图像大小。上下左右四个方向分别用边缘像素填充,填充的距离即为设置的边缘扩展的距离。
2、如果距离为负值,表示内缩,但是最终图像大小不变。内缩方式:1、图像根据`options`的设置缩小,缩小大小为四个方向边缘扩展距离的绝对值。2、图像用边缘像素扩展到原来大小。
3、对`options`的输入约束:1、上下左右四个方向的扩展统一为非正值或者非负值。即四个边同时向外扩或者内缩,方向一致。2、所有方向的输入均为百分比或者具体值,不支持百分比和具体值混用。3、所有异常情况下,显示为{0,0,0,0}效果,即跟原图保持一致。| - -## 示例 - -### 示例1 - -```ts -// xxx.ets -@Entry -@Component -struct PixelStretchExample { - build() { - Stack() { - Text('This is the text content with letterSpacing 0.') - .letterSpacing(0) - .fontSize(12) - .border({ width: 1 }) - .padding(10) - .width('50%') - .pixelStretchEffect({top:10,left:10,right:10,bottom:10 }) - }.alignContent(Alignment.Center).width("100%").height("100%") - } -} - -``` -效果图如下: - -![textPixelStretch1](figures/textPixelStretch1.png) - -去掉pixelStretchEffect的设置,原图效果如下: - -![textPixelStretch2](figures/textPixelStretch2.png) - -对比发现,如果边缘扩展距离设置为正值,图像向外扩展了边缘距离。 - -### 示例2 - -基于示例1,现在把边缘扩展距离改为非正值。 - -```ts -// xxx.ets -@Entry -@Component -struct PixelStretchExample { - build() { - Stack() { - Text('This is the text content with letterSpacing 0.') - .letterSpacing(0) - .fontSize(12) - .border({ width: 1 }) - .padding(10) - .width('50%') - .pixelStretchEffect({top:-10,left:-10,right:-10,bottom:-10 }) - }.alignContent(Alignment.Center).width("100%").height("100%") - } -} -``` -效果图如下: - -![textPixelStretch3](figures/textPixelStretch3.png) - -跟原图对比发现,效果图分两步实现:
1、原图大小缩小,缩小后的大小为原图大小减去像素 -收缩的距离。例如,原图大小为`100*100`,设置了`pixelStretchEffect({top:-10,left:-10, -right:-10,bottom:-10 })`,则缩小后的大小为`(100-10-10)*(100-10-10)`,即`80*80`。
2、使用边缘像素扩展,将图像扩展为原图大小。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md index 637af5f82670074428b988214b11e693febe3b5b..1d45e6767f1ca0240ae32491a5b29dd0bed7951d 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md @@ -29,6 +29,8 @@ | messageOptions10+ | [PopupMessageOptions](#popupmessageoptions10) | 否 | 设置弹窗信息文本参数。 | | targetSpace10+ | [Length](ts-types.md#length) | 否 | 设置popup与目标的间隙。 | | placement10+ | [Placement](ts-appendix-enums.md#placement8) | 否 | 设置popup组件相对于目标的显示位置,默认值为Placement.Bottom。
如果同时设置了`placementOnTop`和`placement`,则以`placement`的设置生效。 | +| offset10+ | [Position](ts-types.md#position8) | 否 | 设置popup组件相对于placement设置的显示位置的偏移。 | +| enableArrow10+ | boolean | 否 | 设置是否显示箭头。
默认值:true | ## PopupMessageOptions10+类型说明 @@ -50,6 +52,7 @@ | showInSubWindow9+ | boolean | 否 | 是否在子窗口显示气泡,默认值为false。 | | mask10+ | boolean \| [ResourceColor](ts-types.md#resourcecolor) | 否 | 设置气泡是否有遮罩层及遮罩颜色。如果设置为false,则没有遮罩层;如果设置为true,则设置有遮罩层并且颜色为透明色;如果设置为Color,则为遮罩层的颜色。 | | targetSpace10+ | [Length](ts-types.md#length) | 否 | 设置popup与目标的间隙。 | +| offset10+ | [Position](ts-types.md#position8) | 否 | 设置popup组件相对于placement设置的显示位置的偏移。 | ## 示例 ```ts diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sphericalEffect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sphericalEffect.md deleted file mode 100644 index 921a8085250cae49106d0c3c15ff148c747f8045..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sphericalEffect.md +++ /dev/null @@ -1,49 +0,0 @@ -# 图像球面效果 - -设置组件的图像球面效果。 - -> **说明:** -> -> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。此接口为系统接口。 - -## 属性 - -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | -| sphericalEffect | [number] | 设置组件的图像球面化程度。
取值范围:[0,1]。
**说明:**
1、如果value等于0则图像保持原样,如果value等于1则图像为完全球面化效果。在0和1之间,数值越大,则球面化程度越高。
`value < 0 `或者` value > 1`为异常情况,`value < 0`按0处理,`value > 1`按1处理。
2、如果组件的图像使用异步加载,则不支持球面效果。例如Image组件默认使用异步加载,如果要使用球面效果,就要设置`syncLoad`为`true`,但是这种做法不推荐。`backgroundImage`也是使用异步加载,所以如果设置了`backgroundImage`,不支持球面效果。
3、如果组件设置了阴影,不支持球面效果。| - -## 示例 - -### 示例1 -```ts -// xxx.ets -@Entry -@Component -struct SphericalEffectExample { - build() { - Stack() { - TextInput({ placeholder: "请输入变化范围百分比([0%,100%])"}) - .width('50%') - .height(35) - .type(InputType.Number) - .enterKeyType(EnterKeyType.Done) - .caretColor(Color.Red) - .placeholderColor(Color.Blue) - .placeholderFont({ - size: 20, - style: FontStyle.Italic, - weight: FontWeight.Bold - }) - .sphericalEffect(0.5) - }.alignContent(Alignment.Center).width("100%").height("100%") - } -} - -``` -效果图如下: - -![textInputSpherical1](figures/textInputSpherical1.png) - -去掉sphericalEffect的设置,效果如下: - -![textInputSpherical2](figures/textInputSpherical2.png) \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-mouse-key.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-mouse-key.md index d2311944b0908b312b12f43eba837fde2a2780b0..9706db4024e2a5b4f93adf11fb476e19f03d339f 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-mouse-key.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-mouse-key.md @@ -15,7 +15,7 @@ | 名称 | 支持冒泡 | 描述 | | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | -| onHover(event: (isHover?: boolean) => void) | 否 | 鼠标进入或退出组件时触发该回调。
isHover:表示鼠标是否悬浮在组件上,鼠标进入时为true, 退出时为false。 | +| onHover(event: (isHover?: boolean, event10+?: HoverEvent) => void) | 是 | 鼠标进入或退出组件时触发该回调。
isHover:表示鼠标是否悬浮在组件上,鼠标进入时为true, 退出时为false。
event:设置阻塞事件冒泡属性。 | | onMouse(event: (event?: MouseEvent) => void) | 是 | 当前组件被鼠标按键点击时或者鼠标在组件上悬浮移动时,触发该回调,event返回值包含触发事件时的时间戳、鼠标按键、动作、鼠标位置在整个屏幕上的坐标和相对于当前组件的坐标。 | @@ -34,6 +34,12 @@ | target8+ | [EventTarget](ts-universal-events-click.md#eventtarget8对象说明) | 触发事件的元素对象显示区域。 | | source8+ | [SourceType](ts-gesture-settings.md#sourcetype枚举说明) | 事件输入设备。 | +## HoverEvent10+对象说明 + +| 名称 | 属性类型 | 描述 | +| --------- | ------------------------------- | -------------------- | +| stopPropagation | () => void | 阻塞事件冒泡。 | + ## 示例 ```ts @@ -52,7 +58,7 @@ struct MouseEventExample { Button(this.hoverText) .width(180).height(80) .backgroundColor(this.color) - .onHover((isHover: boolean) => { + .onHover((isHover: boolean, event: HoverEvent) => { // 通过onHover事件动态修改按钮在是否有鼠标悬浮时的文本内容与背景颜色 if (isHover) { this.hoverText = 'hover'; @@ -117,4 +123,4 @@ struct MouseEventExample { 鼠标点击时: -![mouse1](figures/mouse1.png) \ No newline at end of file +![mouse1](figures/mouse1.png) diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-request.md b/zh-cn/application-dev/reference/errorcodes/errorcode-request.md index 3788520ef8d782e87703a9f664e0240e8b9df126..923dc44e7cb932d09e84f5be3257a3ddd22459ab 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-request.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-request.md @@ -44,7 +44,7 @@ Bad file path. **错误信息** -Task manager service error. +Task service ability error. **错误描述** @@ -57,3 +57,96 @@ Task manager service error. **处理步骤** 请检查任务配置是否正确。 + + +## 21900004 应用任务队列已满 + +**错误信息** + +application task queue full error. + +**错误描述** + +应用任务队列已满。 + +**可能原因** + +应用创建后台任务失败(前端任务直接抢占、不涉及工作队列)。 + +**处理步骤** + +1、通过查询接口获取应用所有的后台任务; + +2、主动清理,释放配额。 + +3、重新创建后台任务。 + +## 21900005 任务模式错误 + +**错误信息** + +task mode error. + +**错误描述** + +任务模式错误。 + +**可能原因** + +非前台应用创建前端任务。 + +**处理步骤** + +1:给前台应用注册、注销事件监听。 + +2:这是接口限制,按接口说明使用即可。 + +## 21900006 操作不存在的任务错误 + +**错误信息** + +task not found error. + +**错误描述** + +操作不存在的任务错误。 + +**可能原因** + +删除、查询不存在的任务。 + +**处理步骤** + +1、通过检索接口查询存在的任务。 + +2、确认所查询的任务存在否(系统会定期清理垃圾任务)。 + +3、使用正确的任务编号重新操作。 + +## 21900007 在不支持的状态上的操作 + +**错误信息** + +task mode error. + +**错误描述** + +在不支持的状态上的操作。 + +**可能原因** + +1:启动一个已删除的任务; + +2:启动一个非初始化的任务; + +3:暂停一个非执行中的任务; + +4:恢复一个非暂停的任务; + +5:停止一个非执行中的任务。 + +**处理步骤** + +1、查询任务状态; + +2、执行当前任务状态支持的操作。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-se.md b/zh-cn/application-dev/reference/errorcodes/errorcode-se.md new file mode 100644 index 0000000000000000000000000000000000000000..0d4cbd10e4b7600cd25255ac687f7a7ca1fb2b8a --- /dev/null +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-se.md @@ -0,0 +1,85 @@ +# SE错误码 + +> **说明:** +> +> 以下仅介绍本模块特有错误码,通用错误码请参考[通用错误码说明文档](errorcode-universal.md)。 + +## 3300101 SE服务状态异常 + +**错误信息** + +Illegal service state exception. + +**错误描述** + +SE服务状态异常。 + +**可能原因** + +1. SE服务状态已断开。 + +**处理步骤** + +1. 关闭SE服务。 + +2. 重新和SE服务建立连接。 + +## 3300102 没有这样的SE异常 + +**错误信息** + +No such element exception. + +**错误描述** + +没有这样的SE异常。 + +**可能原因** + +1. 和SE服务建立通信异常。 +2. SE芯片通信异常。 + +**处理步骤** + +1. 关闭SE服务后重新建立连接。 +2. 重启设备尝试。 + +## 3300103 无法获取访问控制规则异常 + +**错误信息** + +Illegal access rule exception. + +**错误描述** + +无法获取访问控制规则异常。 + +**可能原因** + +1. 安全单元上没有应用所依赖的访问规则。 + +**处理步骤** + +1. 写入正确的访问规则到安全单元上。 +2. 关闭SE服务后重新建立连接。 + +## 3300104 SE芯片IO异常 + +**错误信息** + +Secure element IO exception. + +**错误描述** + +SE芯片IO异常。 + +**可能原因** + +1. 和SE芯片通信异常。 +2. SE芯片状态异常。 + +**处理步骤** + +1. 关闭SE服务后重新建立连接。 + +2. 重启设备尝试。 diff --git a/zh-cn/application-dev/reference/native-apis/_huks_type_api.md b/zh-cn/application-dev/reference/native-apis/_huks_type_api.md index b4f17e47cb4e7767d8ea4f08d60ea1caedc63393..981c891e635cc725c02a36f55103fbefeb99f55c 100644 --- a/zh-cn/application-dev/reference/native-apis/_huks_type_api.md +++ b/zh-cn/application-dev/reference/native-apis/_huks_type_api.md @@ -74,8 +74,9 @@ | [OH_Huks_AlgSuite](#oh_huks_algsuite) {
OH_HUKS_UNWRAP_SUITE_X25519_AES_256_GCM_NOPADDING = 1,
OH_HUKS_UNWRAP_SUITE_ECDH_AES_256_GCM_NOPADDING = 2
} | 密文导入所需的算法套件类型 | | [OH_Huks_KeyGenerateType](#oh_huks_keygeneratetype) {
OH_HUKS_KEY_GENERATE_TYPE_DEFAULT = 0,
OH_HUKS_KEY_GENERATE_TYPE_DERIVE = 1,
OH_HUKS_KEY_GENERATE_TYPE_AGREE = 2
} | 生成的密钥类型。 | | [OH_Huks_KeyFlag](#oh_huks_keyflag) {
OH_HUKS_KEY_FLAG_IMPORT_KEY = 1,
OH_HUKS_KEY_FLAG_GENERATE_KEY = 2,
OH_HUKS_KEY_FLAG_AGREE_KEY = 3,
OH_HUKS_KEY_FLAG_DERIVE_KEY = 4
} | 密钥的产生方式。 | -| [OH_Huks_KeyStorageType](#oh_huks_keystoragetype) {
OH_HUKS_STORAGE_TEMP = 0,
OH_HUKS_STORAGE_PERSISTENT = 1
} | 密钥的存储方式。 | +| [OH_Huks_KeyStorageType](#oh_huks_keystoragetype) {
OH_HUKS_STORAGE_TEMP = 0,
OH_HUKS_STORAGE_PERSISTENT = 1,
OH_HUKS_STORAGE_ONLY_USED_IN_HUKS = 2,
OH_HUKS_STORAGE_KEY_EXPORT_ALLOWED = 3
} | 密钥的存储方式。 | | [OH_Huks_ImportKeyType](#oh_huks_importkeytype) {
OH_HUKS_KEY_TYPE_PUBLIC_KEY = 0,
OH_HUKS_KEY_TYPE_PRIVATE_KEY = 1,
OH_HUKS_KEY_TYPE_KEY_PAIR = 2
} | 导入密钥的类型,默认为导入公钥,导入对称密钥时不需要该字段。 | +| [OH_Huks_RsaPssSaltLenType](#oh_huks_rsapsssaltlentype) {
OH_HUKS_RSA_PSS_SALT_LEN_DIGEST = 0, OH_HUKS_RSA_PSS_SALT_LEN_MAX = 1
} | RSA在签名验签、填充模式为PSS时需要指定的盐值长度类型。 | | [OH_Huks_ErrCode](#oh_huks_errcode) {
OH_HUKS_SUCCESS = 0,
OH_HUKS_ERR_CODE_PERMISSION_FAIL = 201,
OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT = 401,
OH_HUKS_ERR_CODE_NOT_SUPPORTED_API = 801,
OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED = 12000001,
OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT = 12000002,
OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT = 12000003,
OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL = 12000004,
OH_HUKS_ERR_CODE_COMMUNICATION_FAIL = 12000005,
OH_HUKS_ERR_CODE_CRYPTO_FAIL = 12000006,
OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED = 12000007,
OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED = 12000008,
OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT = 12000009,
OH_HUKS_ERR_CODE_SESSION_LIMIT = 12000010,
OH_HUKS_ERR_CODE_ITEM_NOT_EXIST = 12000011,
OH_HUKS_ERR_CODE_INTERNAL_ERROR = 12000012,
OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013
} | 错误码。 | | [OH_Huks_TagType](#oh_huks_tagtype) {
OH_HUKS_TAG_TYPE_INVALID = 0 << 28,
OH_HUKS_TAG_TYPE_INT = 1 << 28,
OH_HUKS_TAG_TYPE_UINT = 2 << 28,
OH_HUKS_TAG_TYPE_ULONG = 3 << 28,
OH_HUKS_TAG_TYPE_BOOL = 4 << 28,
OH_HUKS_TAG_TYPE_BYTES = 5 << 28
} | 参数集中参数类型的掩码值。 | | [OH_Huks_UserAuthType](#oh_huks_userauthtype) {
OH_HUKS_USER_AUTH_TYPE_FINGERPRINT = 1 << 0,
OH_HUKS_USER_AUTH_TYPE_FACE = 1 << 1,
OH_HUKS_USER_AUTH_TYPE_PIN = 1 << 2
} | 密钥访问控制中的用户认证类型 | @@ -83,7 +84,7 @@ | [OH_Huks_ChallengeType](#oh_huks_challengetype) {
OH_HUKS_CHALLENGE_TYPE_NORMAL = 0,
OH_HUKS_CHALLENGE_TYPE_CUSTOM = 1,
OH_HUKS_CHALLENGE_TYPE_NONE = 2
} | 密钥使用时生成challenge的类型 | | [OH_Huks_ChallengePosition](#oh_huks_challengeposition) {
OH_HUKS_CHALLENGE_POS_0 = 0,
OH_HUKS_CHALLENGE_POS_1,
OH_HUKS_CHALLENGE_POS_2,
OH_HUKS_CHALLENGE_POS_3
} | challenge类型为用户自定义类型时,生成的challenge有效长度仅为8字节连续的数据,且仅支持4种位置。 | | [OH_Huks_SecureSignType](#oh_huks_securesigntype) { OH_HUKS_SECURE_SIGN_WITH_AUTHINFO = 1 } | 生成或导入密钥时,指定该密钥的安全签名类型。 | -| [OH_Huks_Tag](#oh_huks_tag) {
OH_HUKS_TAG_ALGORITHM = OH_HUKS_TAG_TYPE_UINT \| 1, OH_HUKS_TAG_PURPOSE = OH_HUKS_TAG_TYPE_UINT \| 2, OH_HUKS_TAG_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 3,
OH_HUKS_TAG_DIGEST = OH_HUKS_TAG_TYPE_UINT \| 4, OH_HUKS_TAG_PADDING = OH_HUKS_TAG_TYPE_UINT \| 5, OH_HUKS_TAG_BLOCK_MODE = OH_HUKS_TAG_TYPE_UINT \| 6, OH_HUKS_TAG_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 7,
OH_HUKS_TAG_ASSOCIATED_DATA = OH_HUKS_TAG_TYPE_BYTES \| 8, OH_HUKS_TAG_NONCE = OH_HUKS_TAG_TYPE_BYTES \| 9, OH_HUKS_TAG_IV = OH_HUKS_TAG_TYPE_BYTES \| 10, OH_HUKS_TAG_INFO = OH_HUKS_TAG_TYPE_BYTES \| 11,
OH_HUKS_TAG_SALT = OH_HUKS_TAG_TYPE_BYTES \| 12, OH_HUKS_TAG_ITERATION = OH_HUKS_TAG_TYPE_UINT \| 14, OH_HUKS_TAG_KEY_GENERATE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 15, OH_HUKS_TAG_AGREE_ALG = OH_HUKS_TAG_TYPE_UINT \| 19,
OH_HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 20, OH_HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 21, OH_HUKS_TAG_AGREE_PUBLIC_KEY = OH_HUKS_TAG_TYPE_BYTES \| 22, OH_HUKS_TAG_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 23,
OH_HUKS_TAG_DERIVE_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 24, OH_HUKS_TAG_IMPORT_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 25, OH_HUKS_TAG_UNWRAP_ALGORITHM_SUITE = OH_HUKS_TAG_TYPE_UINT \| 26, OH_HUKS_TAG_ALL_USERS = OH_HUKS_TAG_TYPE_BOOL \| 301,
OH_HUKS_TAG_USER_ID = OH_HUKS_TAG_TYPE_UINT \| 302, OH_HUKS_TAG_NO_AUTH_REQUIRED = OH_HUKS_TAG_TYPE_BOOL \| 303, OH_HUKS_TAG_USER_AUTH_TYPE = OH_HUKS_TAG_TYPE_UINT \| 304, OH_HUKS_TAG_AUTH_TIMEOUT = OH_HUKS_TAG_TYPE_UINT \| 305,
OH_HUKS_TAG_AUTH_TOKEN = OH_HUKS_TAG_TYPE_BYTES \| 306, OH_HUKS_TAG_KEY_AUTH_ACCESS_TYPE = OH_HUKS_TAG_TYPE_UINT \| 307, OH_HUKS_TAG_KEY_SECURE_SIGN_TYPE = OH_HUKS_TAG_TYPE_UINT \| 308, OH_HUKS_TAG_CHALLENGE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 309,
OH_HUKS_TAG_CHALLENGE_POS = OH_HUKS_TAG_TYPE_UINT \| 310, OH_HUKS_TAG_ATTESTATION_CHALLENGE = OH_HUKS_TAG_TYPE_BYTES \| 501, OH_HUKS_TAG_ATTESTATION_APPLICATION_ID = OH_HUKS_TAG_TYPE_BYTES \| 502, OH_HUKS_TAG_ATTESTATION_ID_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 511,
OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = OH_HUKS_TAG_TYPE_BYTES \| 514, OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO = OH_HUKS_TAG_TYPE_BYTES \| 515,
OH_HUKS_TAG_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 1001, OH_HUKS_TAG_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1002, OH_HUKS_TAG_IS_ALLOWED_WRAP = OH_HUKS_TAG_TYPE_BOOL \| 1003, OH_HUKS_TAG_KEY_WRAP_TYPE = OH_HUKS_TAG_TYPE_UINT \| 1004,
OH_HUKS_TAG_KEY_AUTH_ID = OH_HUKS_TAG_TYPE_BYTES \| 1005, OH_HUKS_TAG_KEY_ROLE = OH_HUKS_TAG_TYPE_UINT \| 1006, OH_HUKS_TAG_KEY_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1007, OH_HUKS_TAG_IS_ASYNCHRONIZED = OH_HUKS_TAG_TYPE_UINT \| 1008,
OH_HUKS_TAG_KEY_DOMAIN = OH_HUKS_TAG_TYPE_UINT \| 1011, OH_HUKS_TAG_SYMMETRIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20001,
OH_HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20002, OH_HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20003
} | 参数集所用的TAG值枚举 | +| [OH_Huks_Tag](#oh_huks_tag) {
OH_HUKS_TAG_ALGORITHM = OH_HUKS_TAG_TYPE_UINT \| 1, OH_HUKS_TAG_PURPOSE = OH_HUKS_TAG_TYPE_UINT \| 2, OH_HUKS_TAG_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 3,
OH_HUKS_TAG_DIGEST = OH_HUKS_TAG_TYPE_UINT \| 4, OH_HUKS_TAG_PADDING = OH_HUKS_TAG_TYPE_UINT \| 5, OH_HUKS_TAG_BLOCK_MODE = OH_HUKS_TAG_TYPE_UINT \| 6, OH_HUKS_TAG_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 7,
OH_HUKS_TAG_ASSOCIATED_DATA = OH_HUKS_TAG_TYPE_BYTES \| 8, OH_HUKS_TAG_NONCE = OH_HUKS_TAG_TYPE_BYTES \| 9, OH_HUKS_TAG_IV = OH_HUKS_TAG_TYPE_BYTES \| 10, OH_HUKS_TAG_INFO = OH_HUKS_TAG_TYPE_BYTES \| 11,
OH_HUKS_TAG_SALT = OH_HUKS_TAG_TYPE_BYTES \| 12, OH_HUKS_TAG_ITERATION = OH_HUKS_TAG_TYPE_UINT \| 14, OH_HUKS_TAG_KEY_GENERATE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 15, OH_HUKS_TAG_AGREE_ALG = OH_HUKS_TAG_TYPE_UINT \| 19,
OH_HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 20, OH_HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 21, OH_HUKS_TAG_AGREE_PUBLIC_KEY = OH_HUKS_TAG_TYPE_BYTES \| 22, OH_HUKS_TAG_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 23,
OH_HUKS_TAG_DERIVE_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 24, OH_HUKS_TAG_IMPORT_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 25, OH_HUKS_TAG_UNWRAP_ALGORITHM_SUITE = OH_HUKS_TAG_TYPE_UINT \| 26, OH_HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT \| 29, OH_HUKS_TAG_RSA_PSS_SALT_LEN_TYPE = OH_HUKS_TAG_TYPE_UINT \| 30, OH_HUKS_TAG_ALL_USERS = OH_HUKS_TAG_TYPE_BOOL \| 301,
OH_HUKS_TAG_USER_ID = OH_HUKS_TAG_TYPE_UINT \| 302, OH_HUKS_TAG_NO_AUTH_REQUIRED = OH_HUKS_TAG_TYPE_BOOL \| 303, OH_HUKS_TAG_USER_AUTH_TYPE = OH_HUKS_TAG_TYPE_UINT \| 304, OH_HUKS_TAG_AUTH_TIMEOUT = OH_HUKS_TAG_TYPE_UINT \| 305,
OH_HUKS_TAG_AUTH_TOKEN = OH_HUKS_TAG_TYPE_BYTES \| 306, OH_HUKS_TAG_KEY_AUTH_ACCESS_TYPE = OH_HUKS_TAG_TYPE_UINT \| 307, OH_HUKS_TAG_KEY_SECURE_SIGN_TYPE = OH_HUKS_TAG_TYPE_UINT \| 308, OH_HUKS_TAG_CHALLENGE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 309,
OH_HUKS_TAG_CHALLENGE_POS = OH_HUKS_TAG_TYPE_UINT \| 310, OH_HUKS_TAG_KEY_AUTH_PURPOSE = OH_HUKS_TAG_TYPE_UINT \| 311, OH_HUKS_TAG_ATTESTATION_CHALLENGE = OH_HUKS_TAG_TYPE_BYTES \| 501, OH_HUKS_TAG_ATTESTATION_APPLICATION_ID = OH_HUKS_TAG_TYPE_BYTES \| 502, OH_HUKS_TAG_ATTESTATION_ID_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 511,
OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = OH_HUKS_TAG_TYPE_BYTES \| 514, OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO = OH_HUKS_TAG_TYPE_BYTES \| 515,
OH_HUKS_TAG_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 1001, OH_HUKS_TAG_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1002, OH_HUKS_TAG_IS_ALLOWED_WRAP = OH_HUKS_TAG_TYPE_BOOL \| 1003, OH_HUKS_TAG_KEY_WRAP_TYPE = OH_HUKS_TAG_TYPE_UINT \| 1004,
OH_HUKS_TAG_KEY_AUTH_ID = OH_HUKS_TAG_TYPE_BYTES \| 1005, OH_HUKS_TAG_KEY_ROLE = OH_HUKS_TAG_TYPE_UINT \| 1006, OH_HUKS_TAG_KEY_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1007, OH_HUKS_TAG_IS_ASYNCHRONIZED = OH_HUKS_TAG_TYPE_UINT \| 1008,
OH_HUKS_TAG_KEY_DOMAIN = OH_HUKS_TAG_TYPE_UINT \| 1011, OH_HUKS_TAG_SYMMETRIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20001,
OH_HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20002, OH_HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20003
} | 参数集所用的TAG值枚举 | ## 枚举类型说明 @@ -175,6 +176,23 @@ enum OH_Huks_CipherMode | OH_HUKS_MODE_GCM | 使用GCM加密模式。 | +### OH_Huks_RsaPssSaltLenType + +``` +enum OH_Huks_RsaPssSaltLenType +``` +**描述:** +RSA在签名验签、填充模式为PSS时需要指定的盐值长度类型。 + +**起始版本:** +10 + +| 枚举值 | 描述 | +| -------- | -------- | +| OH_HUKS_RSA_PSS_SALT_LEN_DIGEST | 以摘要长度设置盐值长度。 | +| OH_HUKS_RSA_PSS_SALT_LEN_MAX | 以最大长度设置盐值长度。 | + + ### OH_Huks_ErrCode @@ -389,6 +407,8 @@ enum OH_Huks_KeyStorageType | -------- | -------- | | OH_HUKS_STORAGE_TEMP | 通过本地直接管理密钥。 | | OH_HUKS_STORAGE_PERSISTENT | 通过HUKS service管理密钥。 | +| OH_HUKS_STORAGE_ONLY_USED_IN_HUKS | 密钥只存储在huks中。 | +| OH_HUKS_STORAGE_KEY_EXPORT_ALLOWED | 密钥从huks中导出,不存储。 | ### OH_Huks_SecureSignType @@ -438,6 +458,8 @@ enum OH_Huks_Tag | OH_HUKS_TAG_DERIVE_KEY_SIZE | 派生密钥大小。 | | OH_HUKS_TAG_IMPORT_KEY_TYPE | 导入密钥类型, 类型可在枚举OH_Huks_ImportKeyType中选择。 | | OH_HUKS_TAG_UNWRAP_ALGORITHM_SUITE | 导入加密密钥的套件。 | +| OH_HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG | 派生密钥/协商密钥的存储类型。 | +| OH_HUKS_TAG_RSA_PSS_SALT_LEN_TYPE | RSA算法,填充模式为PSS时的盐值长度类型。 | | OH_HUKS_TAG_ALL_USERS | 密钥使用访问控制和使用认证相关的标签取值范围: 301 - 500 多用户中的所有用户。 | | OH_HUKS_TAG_USER_ID | 表示多用户id。 | | OH_HUKS_TAG_NO_AUTH_REQUIRED | 表示是否需要密钥访问控制。 | @@ -448,6 +470,7 @@ enum OH_Huks_Tag | OH_HUKS_TAG_KEY_SECURE_SIGN_TYPE | 表示生成或导入密钥时,指定该密钥的签名类型。 | | OH_HUKS_TAG_CHALLENGE_TYPE | 表示密钥使用时生成的challenge类型。从OH_Huks_ChallengeType中选择。 | | OH_HUKS_TAG_CHALLENGE_POS | 表示challenge类型为用户自定义类型时,huks产生的challenge有效长度仅为8字节连续的数据的位置。从OH_Huks_ChallengePosition中选择。 | +| H_HUKS_TAG_KEY_AUTH_PURPOSE | 表示密钥认证用途的类型。 | | OH_HUKS_TAG_ATTESTATION_CHALLENGE | 密钥认证相关的标签值: 501 - 600 密钥认证时的挑战值。 | | OH_HUKS_TAG_ATTESTATION_APPLICATION_ID | 密钥认证时拥有该密钥的application的Id。 | | OH_HUKS_TAG_ATTESTATION_ID_ALIAS | 密钥别名。 | diff --git a/zh-cn/application-dev/reference/native-apis/native__huks__type_8h.md b/zh-cn/application-dev/reference/native-apis/native__huks__type_8h.md index bb5b063e7d84d0c3bf31806e49744941431a06a3..eae5345d1e541dc8c5e7edb79e0303c4d4c89d27 100644 --- a/zh-cn/application-dev/reference/native-apis/native__huks__type_8h.md +++ b/zh-cn/application-dev/reference/native-apis/native__huks__type_8h.md @@ -69,8 +69,9 @@ | [OH_Huks_AlgSuite](_huks_type_api.md#oh_huks_algsuite) {
OH_HUKS_UNWRAP_SUITE_X25519_AES_256_GCM_NOPADDING = 1,
OH_HUKS_UNWRAP_SUITE_ECDH_AES_256_GCM_NOPADDING = 2
} | 密文导入所需的算法套件类型 | | [OH_Huks_KeyGenerateType](_huks_type_api.md#oh_huks_keygeneratetype) {
OH_HUKS_KEY_GENERATE_TYPE_DEFAULT = 0,
OH_HUKS_KEY_GENERATE_TYPE_DERIVE = 1,
OH_HUKS_KEY_GENERATE_TYPE_AGREE = 2
} | 生成的密钥类型。 | | [OH_Huks_KeyFlag](_huks_type_api.md#oh_huks_keyflag) {
OH_HUKS_KEY_FLAG_IMPORT_KEY = 1,
OH_HUKS_KEY_FLAG_GENERATE_KEY = 2,
OH_HUKS_KEY_FLAG_AGREE_KEY = 3,
OH_HUKS_KEY_FLAG_DERIVE_KEY = 4
} | 密钥的产生方式。 | -| [OH_Huks_KeyStorageType](_huks_type_api.md#oh_huks_keystoragetype) {
OH_HUKS_STORAGE_TEMP = 0,
OH_HUKS_STORAGE_PERSISTENT = 1
} | 密钥的存储方式。 | +| [OH_Huks_KeyStorageType](_huks_type_api.md#oh_huks_keystoragetype) {
OH_HUKS_STORAGE_TEMP = 0,
OH_HUKS_STORAGE_PERSISTENT = 1,
OH_HUKS_STORAGE_ONLY_USED_IN_HUKS = 2,
OH_HUKS_STORAGE_KEY_EXPORT_ALLOWED = 3
} | 密钥的存储方式。 | | [OH_Huks_ImportKeyType](_huks_type_api.md#oh_huks_importkeytype) {
OH_HUKS_KEY_TYPE_PUBLIC_KEY = 0,
OH_HUKS_KEY_TYPE_PRIVATE_KEY = 1,
OH_HUKS_KEY_TYPE_KEY_PAIR = 2
}| 导入密钥的类型,默认为导入公钥,导入对称密钥时不需要该字段。 | +| [OH_Huks_RsaPssSaltLenType](_huks_type_api.md#oh_huks_rsapsssaltlentype) {
OH_HUKS_RSA_PSS_SALT_LEN_DIGEST = 0, OH_HUKS_RSA_PSS_SALT_LEN_MAX = 1
} | RSA在签名验签、填充模式为PSS时需要指定的盐值长度类型。 | | [OH_Huks_ErrCode](_huks_type_api.md#oh_huks_errcode) {
OH_HUKS_SUCCESS = 0,
OH_HUKS_ERR_CODE_PERMISSION_FAIL = 201,
OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT = 401,
OH_HUKS_ERR_CODE_NOT_SUPPORTED_API = 801,
OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED = 12000001,
OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT = 12000002,
OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT = 12000003,
OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL = 12000004,
OH_HUKS_ERR_CODE_COMMUNICATION_FAIL = 12000005,
OH_HUKS_ERR_CODE_CRYPTO_FAIL = 12000006,
OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED = 12000007,
OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED = 12000008,
OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT = 12000009,
OH_HUKS_ERR_CODE_SESSION_LIMIT = 12000010,
OH_HUKS_ERR_CODE_ITEM_NOT_EXIST = 12000011,
OH_HUKS_ERR_CODE_INTERNAL_ERROR = 12000012,
OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013
} | 错误码。 | | [OH_Huks_TagType](_huks_type_api.md#oh_huks_tagtype) {
OH_HUKS_TAG_TYPE_INVALID = 0 << 28,
OH_HUKS_TAG_TYPE_INT = 1 << 28,
OH_HUKS_TAG_TYPE_UINT = 2 << 28,
OH_HUKS_TAG_TYPE_ULONG = 3 << 28,
OH_HUKS_TAG_TYPE_BOOL = 4 << 28,
OH_HUKS_TAG_TYPE_BYTES = 5 << 28
} | 参数集中参数类型的掩码值。 | | [OH_Huks_UserAuthType](_huks_type_api.md#oh_huks_userauthtype) {
OH_HUKS_USER_AUTH_TYPE_FINGERPRINT = 1 << 0,
OH_HUKS_USER_AUTH_TYPE_FACE = 1 << 1,
OH_HUKS_USER_AUTH_TYPE_PIN = 1 << 2
} | 密钥访问控制中的用户认证类型 | @@ -78,4 +79,4 @@ | [OH_Huks_ChallengeType](_huks_type_api.md#oh_huks_challengetype) {
OH_HUKS_CHALLENGE_TYPE_NORMAL = 0,
OH_HUKS_CHALLENGE_TYPE_CUSTOM = 1,
OH_HUKS_CHALLENGE_TYPE_NONE = 2
} | 密钥使用时生成challenge的类型 | | [OH_Huks_ChallengePosition](_huks_type_api.md#oh_huks_challengeposition) {
OH_HUKS_CHALLENGE_POS_0 = 0,
OH_HUKS_CHALLENGE_POS_1,
OH_HUKS_CHALLENGE_POS_2,
OH_HUKS_CHALLENGE_POS_3
} | challenge类型为用户自定义类型时,生成的challenge有效长度仅为8字节连续的数据,且仅支持4种位置。 | | [OH_Huks_SecureSignType](_huks_type_api.md#oh_huks_securesigntype) { OH_HUKS_SECURE_SIGN_WITH_AUTHINFO = 1 } | 生成或导入密钥时,指定该密钥的安全签名类型。 | -| [OH_Huks_Tag](_huks_type_api.md#oh_huks_tag) {
OH_HUKS_TAG_ALGORITHM = OH_HUKS_TAG_TYPE_UINT \| 1, OH_HUKS_TAG_PURPOSE = OH_HUKS_TAG_TYPE_UINT \| 2, OH_HUKS_TAG_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 3,
OH_HUKS_TAG_DIGEST = OH_HUKS_TAG_TYPE_UINT \| 4, OH_HUKS_TAG_PADDING = OH_HUKS_TAG_TYPE_UINT \| 5, OH_HUKS_TAG_BLOCK_MODE = OH_HUKS_TAG_TYPE_UINT \| 6, OH_HUKS_TAG_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 7,
OH_HUKS_TAG_ASSOCIATED_DATA = OH_HUKS_TAG_TYPE_BYTES \| 8, OH_HUKS_TAG_NONCE = OH_HUKS_TAG_TYPE_BYTES \| 9, OH_HUKS_TAG_IV = OH_HUKS_TAG_TYPE_BYTES \| 10, OH_HUKS_TAG_INFO = OH_HUKS_TAG_TYPE_BYTES \| 11,
OH_HUKS_TAG_SALT = OH_HUKS_TAG_TYPE_BYTES \| 12, OH_HUKS_TAG_ITERATION = OH_HUKS_TAG_TYPE_UINT \| 14, OH_HUKS_TAG_KEY_GENERATE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 15,
OH_HUKS_TAG_AGREE_ALG = OH_HUKS_TAG_TYPE_UINT \| 19,
OH_HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 20, OH_HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 21, OH_HUKS_TAG_AGREE_PUBLIC_KEY = OH_HUKS_TAG_TYPE_BYTES \| 22, OH_HUKS_TAG_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 23,
OH_HUKS_TAG_DERIVE_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 24, OH_HUKS_TAG_IMPORT_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 25, OH_HUKS_TAG_UNWRAP_ALGORITHM_SUITE = OH_HUKS_TAG_TYPE_UINT \| 26, OH_HUKS_TAG_ALL_USERS = OH_HUKS_TAG_TYPE_BOOL \| 301,
OH_HUKS_TAG_USER_ID = OH_HUKS_TAG_TYPE_UINT \| 302, OH_HUKS_TAG_NO_AUTH_REQUIRED = OH_HUKS_TAG_TYPE_BOOL \| 303, OH_HUKS_TAG_USER_AUTH_TYPE = OH_HUKS_TAG_TYPE_UINT \| 304, OH_HUKS_TAG_AUTH_TIMEOUT = OH_HUKS_TAG_TYPE_UINT \| 305,
OH_HUKS_TAG_AUTH_TOKEN = OH_HUKS_TAG_TYPE_BYTES \| 306, OH_HUKS_TAG_KEY_AUTH_ACCESS_TYPE = OH_HUKS_TAG_TYPE_UINT \| 307, OH_HUKS_TAG_KEY_SECURE_SIGN_TYPE = OH_HUKS_TAG_TYPE_UINT \| 308, OH_HUKS_TAG_CHALLENGE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 309,
OH_HUKS_TAG_CHALLENGE_POS = OH_HUKS_TAG_TYPE_UINT \| 310, OH_HUKS_TAG_ATTESTATION_CHALLENGE = OH_HUKS_TAG_TYPE_BYTES \| 501, OH_HUKS_TAG_ATTESTATION_APPLICATION_ID = OH_HUKS_TAG_TYPE_BYTES \| 502, OH_HUKS_TAG_ATTESTATION_ID_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 511,
OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = OH_HUKS_TAG_TYPE_BYTES \| 514, OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO = OH_HUKS_TAG_TYPE_BYTES \| 515,
OH_HUKS_TAG_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 1001, OH_HUKS_TAG_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1002, OH_HUKS_TAG_IS_ALLOWED_WRAP = OH_HUKS_TAG_TYPE_BOOL \| 1003, OH_HUKS_TAG_KEY_WRAP_TYPE = OH_HUKS_TAG_TYPE_UINT \| 1004,
OH_HUKS_TAG_KEY_AUTH_ID = OH_HUKS_TAG_TYPE_BYTES \| 1005, OH_HUKS_TAG_KEY_ROLE = OH_HUKS_TAG_TYPE_UINT \| 1006, OH_HUKS_TAG_KEY_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1007, OH_HUKS_TAG_IS_ASYNCHRONIZED = OH_HUKS_TAG_TYPE_UINT \| 1008,
OH_HUKS_TAG_KEY_DOMAIN = OH_HUKS_TAG_TYPE_UINT \| 1011, OH_HUKS_TAG_SYMMETRIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20001,
OH_HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20002, OH_HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20003
} | 参数集所用的TAG值枚举 | +| [OH_Huks_Tag](_huks_type_api.md#oh_huks_tag) {
OH_HUKS_TAG_ALGORITHM = OH_HUKS_TAG_TYPE_UINT \| 1, OH_HUKS_TAG_PURPOSE = OH_HUKS_TAG_TYPE_UINT \| 2, OH_HUKS_TAG_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 3,
OH_HUKS_TAG_DIGEST = OH_HUKS_TAG_TYPE_UINT \| 4, OH_HUKS_TAG_PADDING = OH_HUKS_TAG_TYPE_UINT \| 5, OH_HUKS_TAG_BLOCK_MODE = OH_HUKS_TAG_TYPE_UINT \| 6, OH_HUKS_TAG_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 7,
OH_HUKS_TAG_ASSOCIATED_DATA = OH_HUKS_TAG_TYPE_BYTES \| 8, OH_HUKS_TAG_NONCE = OH_HUKS_TAG_TYPE_BYTES \| 9, OH_HUKS_TAG_IV = OH_HUKS_TAG_TYPE_BYTES \| 10, OH_HUKS_TAG_INFO = OH_HUKS_TAG_TYPE_BYTES \| 11,
OH_HUKS_TAG_SALT = OH_HUKS_TAG_TYPE_BYTES \| 12, OH_HUKS_TAG_ITERATION = OH_HUKS_TAG_TYPE_UINT \| 14, OH_HUKS_TAG_KEY_GENERATE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 15, OH_HUKS_TAG_AGREE_ALG = OH_HUKS_TAG_TYPE_UINT \| 19,
OH_HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 20, OH_HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 21, OH_HUKS_TAG_AGREE_PUBLIC_KEY = OH_HUKS_TAG_TYPE_BYTES \| 22, OH_HUKS_TAG_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 23,
OH_HUKS_TAG_DERIVE_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT \| 24, OH_HUKS_TAG_IMPORT_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT \| 25, OH_HUKS_TAG_UNWRAP_ALGORITHM_SUITE = OH_HUKS_TAG_TYPE_UINT \| 26,
OH_HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT \| 29,
OH_HUKS_TAG_RSA_PSS_SALT_LEN_TYPE = OH_HUKS_TAG_TYPE_UINT \| 30, OH_HUKS_TAG_ALL_USERS = OH_HUKS_TAG_TYPE_BOOL \| 301,
OH_HUKS_TAG_USER_ID = OH_HUKS_TAG_TYPE_UINT \| 302, OH_HUKS_TAG_NO_AUTH_REQUIRED = OH_HUKS_TAG_TYPE_BOOL \| 303, OH_HUKS_TAG_USER_AUTH_TYPE = OH_HUKS_TAG_TYPE_UINT \| 304, OH_HUKS_TAG_AUTH_TIMEOUT = OH_HUKS_TAG_TYPE_UINT \| 305,
OH_HUKS_TAG_AUTH_TOKEN = OH_HUKS_TAG_TYPE_BYTES \| 306, OH_HUKS_TAG_KEY_AUTH_ACCESS_TYPE = OH_HUKS_TAG_TYPE_UINT \| 307, OH_HUKS_TAG_KEY_SECURE_SIGN_TYPE = OH_HUKS_TAG_TYPE_UINT \| 308, OH_HUKS_TAG_CHALLENGE_TYPE = OH_HUKS_TAG_TYPE_UINT \| 309,
OH_HUKS_TAG_CHALLENGE_POS = OH_HUKS_TAG_TYPE_UINT \| 310, OH_HUKS_TAG_KEY_AUTH_PURPOSE = OH_HUKS_TAG_TYPE_UINT \| 311, OH_HUKS_TAG_ATTESTATION_CHALLENGE = OH_HUKS_TAG_TYPE_BYTES \| 501, OH_HUKS_TAG_ATTESTATION_APPLICATION_ID = OH_HUKS_TAG_TYPE_BYTES \| 502, OH_HUKS_TAG_ATTESTATION_ID_ALIAS = OH_HUKS_TAG_TYPE_BYTES \| 511,
OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = OH_HUKS_TAG_TYPE_BYTES \| 514, OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO = OH_HUKS_TAG_TYPE_BYTES \| 515,
OH_HUKS_TAG_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL \| 1001, OH_HUKS_TAG_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1002, OH_HUKS_TAG_IS_ALLOWED_WRAP = OH_HUKS_TAG_TYPE_BOOL \| 1003, OH_HUKS_TAG_KEY_WRAP_TYPE = OH_HUKS_TAG_TYPE_UINT \| 1004,
OH_HUKS_TAG_KEY_AUTH_ID = OH_HUKS_TAG_TYPE_BYTES \| 1005, OH_HUKS_TAG_KEY_ROLE = OH_HUKS_TAG_TYPE_UINT \| 1006, OH_HUKS_TAG_KEY_FLAG = OH_HUKS_TAG_TYPE_UINT \| 1007, OH_HUKS_TAG_IS_ASYNCHRONIZED = OH_HUKS_TAG_TYPE_UINT \| 1008,
OH_HUKS_TAG_KEY_DOMAIN = OH_HUKS_TAG_TYPE_UINT \| 1011, OH_HUKS_TAG_SYMMETRIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20001,
OH_HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20002, OH_HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES \| 20003
} | 参数集所用的TAG值枚举 | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/native-apis/rawfile.md b/zh-cn/application-dev/reference/native-apis/rawfile.md index 286cbd6f131c777f0681ee362716462f69bbafc9..9571fb8575276e1f644e5e83ef60433d0d5b8253 100644 --- a/zh-cn/application-dev/reference/native-apis/rawfile.md +++ b/zh-cn/application-dev/reference/native-apis/rawfile.md @@ -1,10 +1,7 @@ # Rawfile -提供操作rawfile目录和rawfile文件的功能。 - - -功能包括遍历、打开、搜索、读取和关闭rawfile。 +提供操作rawfile目录和rawfile文件的功能,包括打开、遍历、搜索、读取和关闭rawfile。 **起始版本:** @@ -50,12 +47,12 @@ | [OH_ResourceManager_CloseRawDir](#oh_resourcemanager_closerawdir) ([RawDir](#rawdir) \*rawDir) | 关闭已打开的[RawDir](#rawdir)并释放所有相关联资源。 | | [OH_ResourceManager_ReadRawFile](#oh_resourcemanager_readrawfile) (const [RawFile](#rawfile) \*rawFile, void \*buf, size_t length) | 读取rawfile。 | | [OH_ResourceManager_SeekRawFile](#oh_resourcemanager_seekrawfile) (const [RawFile](#rawfile) \*rawFile, long offset, int whence) | 基于指定的offset,在rawfile文件内搜索读写数据的位置。 | -| [OH_ResourceManager_GetRawFileSize](#oh_resourcemanager_getrawfilesize) ([RawFile](#rawfile) \*rawFile) | 获取rawfile长度,单位为int32_t。 | +| [OH_ResourceManager_GetRawFileSize](#oh_resourcemanager_getrawfilesize) ([RawFile](#rawfile) \*rawFile) | 获取rawfile文件大小。 | | [OH_ResourceManager_CloseRawFile](#oh_resourcemanager_closerawfile) ([RawFile](#rawfile) \*rawFile) | 关闭已打开的[RawFile](#rawfile) 以及释放所有相关联资源。 | -| [OH_ResourceManager_GetRawFileOffset](#oh_resourcemanager_getrawfileoffset) (const [RawFile](#rawfile) \*rawFile) | 获取rawfile当前的offset,单位为int32_t。 | -| [OH_ResourceManager_GetRawFileDescriptor](#oh_resourcemanager_getrawfiledescriptor) (const [RawFile](#rawfile) \*rawFile, [RawFileDescriptor](_raw_file_descriptor.md) &descriptor) | 基于offset(单位为int32_t)和文件长度打开rawfile,并获取rawfile文件描述符。 | +| [OH_ResourceManager_GetRawFileOffset](#oh_resourcemanager_getrawfileoffset) (const [RawFile](#rawfile) \*rawFile) | 获取rawfile当前的offset。 | +| [OH_ResourceManager_GetRawFileDescriptor](#oh_resourcemanager_getrawfiledescriptor) (const [RawFile](#rawfile) \*rawFile, [RawFileDescriptor](_raw_file_descriptor.md) &descriptor) | 基于offset和文件长度打开rawfile,并获取rawfile文件描述符。 | | [OH_ResourceManager_ReleaseRawFileDescriptor](#oh_resourcemanager_releaserawfiledescriptor) (const [RawFileDescriptor](_raw_file_descriptor.md) &descriptor) | 关闭rawfile文件描述符。 | -| [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager) (napi_env env, napi_value jsResMgr) | 基于JavaScript resource manager获取native resource manager。 | +| [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager) (napi_env env, napi_value jsResMgr) | 基于JavaScript resource manager获取native resource manager。通过此对象完成rawfile相关功能。 | | [OH_ResourceManager_ReleaseNativeResourceManager](#oh_resourcemanager_releasenativeresourcemanager) ([NativeResourceManager](#nativeresourcemanager) \*resMgr) | 释放native resource manager。 | | [OH_ResourceManager_OpenRawDir](#oh_resourcemanager_openrawdir) (const [NativeResourceManager](#nativeresourcemanager) \*mgr, const char \*dirName) | 打开rawfile目录。 | | [OH_ResourceManager_OpenRawFile](#oh_resourcemanager_openrawfile) (const [NativeResourceManager](#nativeresourcemanager) \*mgr, const char \*fileName) | 打开rawfile文件。 | @@ -64,10 +61,10 @@ ## 详细描述 -## 类型定义说明 +### 类型定义说明 -### NativeResourceManager +#### NativeResourceManager ``` @@ -78,14 +75,14 @@ typedef struct NativeResourceManager NativeResourceManager 代表resource manager。 -此类封装了JavaScript resource manager的native实现 **ResourceManager**指针可以通过调用[OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager)方法获取 +此类封装了JavaScript resource manager的native实现,**ResourceManager**指针可以通过调用[OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager)方法获取。 **起始版本:** 8 -### RawDir +#### RawDir ``` @@ -101,7 +98,7 @@ typedef struct RawDir RawDir 8 -### RawFile +#### RawFile ``` @@ -110,17 +107,17 @@ typedef struct RawFile RawFile **描述:** -提供对rawfile的访问功能。 +提供对rawfile文件操作的相关功能。 **起始版本:** 8 -## 函数说明 +### 函数说明 -### OH_ResourceManager_CloseRawDir() +#### OH_ResourceManager_CloseRawDir() ``` @@ -146,7 +143,7 @@ void OH_ResourceManager_CloseRawDir (RawDir * rawDir) 8 -### OH_ResourceManager_CloseRawFile() +#### OH_ResourceManager_CloseRawFile() ``` @@ -172,7 +169,7 @@ void OH_ResourceManager_CloseRawFile (RawFile * rawFile) 8 -### OH_ResourceManager_GetRawFileCount() +#### OH_ResourceManager_GetRawFileCount() ``` @@ -200,7 +197,7 @@ int OH_ResourceManager_GetRawFileCount (RawDir * rawDir) 8 -### OH_ResourceManager_GetRawFileDescriptor() +#### OH_ResourceManager_GetRawFileDescriptor() ``` @@ -209,7 +206,7 @@ bool OH_ResourceManager_GetRawFileDescriptor (const RawFile * rawFile, RawFileDe **描述:** -基于offset(单位为int32_t)和文件长度打开rawfile,并获取rawfile文件描述符。 +基于offset和文件长度打开rawfile,并获取rawfile文件描述符。 打开的文件描述符被用于读取rawfile。 @@ -229,7 +226,7 @@ bool OH_ResourceManager_GetRawFileDescriptor (const RawFile * rawFile, RawFileDe 8 -### OH_ResourceManager_GetRawFileName() +#### OH_ResourceManager_GetRawFileName() ``` @@ -262,7 +259,7 @@ const char* OH_ResourceManager_GetRawFileName (RawDir * rawDir, int index ) 8 -### OH_ResourceManager_GetRawFileOffset() +#### OH_ResourceManager_GetRawFileOffset() ``` @@ -271,7 +268,7 @@ long OH_ResourceManager_GetRawFileOffset (const RawFile * rawFile) **描述:** -获取rawfile当前的offset,单位为int32_t。 +获取rawfile当前的offset。 rawfile当前的offset。 @@ -290,7 +287,7 @@ rawfile当前的offset。 8 -### OH_ResourceManager_GetRawFileSize() +#### OH_ResourceManager_GetRawFileSize() ``` @@ -299,7 +296,7 @@ long OH_ResourceManager_GetRawFileSize (RawFile * rawFile) **描述:** -获取rawfile长度,单位为int32_t。 +获取rawfile文件大小。 **参数:** @@ -309,14 +306,14 @@ long OH_ResourceManager_GetRawFileSize (RawFile * rawFile) **返回:** -Returns rawfile整体长度。 +Returns rawfile整体文件大小。 **起始版本:** 8 -### OH_ResourceManager_InitNativeResourceManager() +#### OH_ResourceManager_InitNativeResourceManager() ``` @@ -345,7 +342,7 @@ NativeResourceManager* OH_ResourceManager_InitNativeResourceManager (napi_env en 8 -### OH_ResourceManager_OpenRawDir() +#### OH_ResourceManager_OpenRawDir() ``` @@ -380,7 +377,7 @@ RawDir* OH_ResourceManager_OpenRawDir (const NativeResourceManager * mgr, const 8 -### OH_ResourceManager_OpenRawFile() +#### OH_ResourceManager_OpenRawFile() ``` @@ -415,7 +412,7 @@ RawFile* OH_ResourceManager_OpenRawFile (const NativeResourceManager * mgr, cons 8 -### OH_ResourceManager_ReadRawFile() +#### OH_ResourceManager_ReadRawFile() ``` @@ -445,7 +442,7 @@ int OH_ResourceManager_ReadRawFile (const RawFile * rawFile, void * buf, size_t 8 -### OH_ResourceManager_ReleaseNativeResourceManager() +#### OH_ResourceManager_ReleaseNativeResourceManager() ``` @@ -467,7 +464,7 @@ void OH_ResourceManager_ReleaseNativeResourceManager (NativeResourceManager * re 8 -### OH_ResourceManager_ReleaseRawFileDescriptor() +#### OH_ResourceManager_ReleaseRawFileDescriptor() ``` @@ -495,7 +492,7 @@ bool OH_ResourceManager_ReleaseRawFileDescriptor (const RawFileDescriptor & desc 8 -### OH_ResourceManager_SeekRawFile() +#### OH_ResourceManager_SeekRawFile() ``` diff --git a/zh-cn/application-dev/security/cryptoFramework-guidelines.md b/zh-cn/application-dev/security/cryptoFramework-guidelines.md index 8c6a5429a824e2e4b100bbf0983e9835802a96ea..50c7abdba951998d3691c26a57222f78ff44d619 100644 --- a/zh-cn/application-dev/security/cryptoFramework-guidelines.md +++ b/zh-cn/application-dev/security/cryptoFramework-guidelines.md @@ -1,24 +1,26 @@ # 加解密算法库框架开发指导 -> **说明** +> **说明:** > > 本开发指导基于API version 9,OH SDK版本3.2.7以上,适用于JS语言开发 -## 使用密钥对象生成与转换操作 +## 密钥对象生成与转换操作 -**场景说明** +### 场景说明 使用密钥生成操作中,典型的场景有: 1. 随机生成算法库密钥对象。该对象可用于后续的加解密等操作。 -2. 根据指定数据生成算法库密钥对象(也就是将外部或存储的二进制数据转换为算法库的密钥对象)。该对象可用于后续的加解密等操作。 -3. 获取算法库密钥对象的二进制数据,用于存储或传输。 +2. 根据密钥参数生成指定的算法库密钥对象。该对象可用于后续的加解密等操作。 +3. 根据指定数据生成算法库密钥对象(也就是将外部或存储的二进制数据转换为算法库的密钥对象)。该对象可用于后续的加解密等操作。 +4. 获取算法库密钥对象的二进制数据,用于存储或传输。 +5. 对于非对称密钥,获取密钥对象的参数属性,用于存储或运输。 > **说明:** > > 密钥对象Key包括对称密钥SymKey和非对称密钥(公钥PubKey和私钥PriKey),其中公钥和私钥组成密钥对KeyPair。密钥之间的具体关系可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 -**接口及参数说明** +### 接口及参数说明 详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 @@ -27,6 +29,7 @@ |实例名|接口名|描述| |---|---|---| |cryptoFramework|createAsyKeyGenerator(algName : string) : AsyKeyGenerator|根据algName设置的非对称密钥规格,创建非对称密钥生成器对象| +|cryptoFramework|createAsyKeyGeneratorBySpec(asyKeySpec: AsyKeySpec): AsyKeyGeneratorBySpec;|根据密钥参数设置的非对称密钥规格,创建非对称密钥生成器对象| |cryptoFramework|createSymKeyGenerator(algName : string) : SymKeyGenerator|根据algName设置的对称密钥规格,创建对称密钥生成器对象| |AsyKeyGenerator|generateKeyPair(callback : AsyncCallback\) : void|使用callback方式,随机生成非对称密钥对象KeyPair| |AsyKeyGenerator|generateKeyPair() : Promise\|使用Promise方式,随机生成非对称密钥对象KeyPair| @@ -38,13 +41,13 @@ | SymKeyGenerator |convertKey(pubKey : DataBlob, priKey : DataBlob) : Promise\| 使用Promise方式,根据指定的二进制数据,生成对称密钥对象SymKey | | Key | getEncoded() : DataBlob; | 获取Key密钥对象的二进制数据(Key的子类实例包括对称密钥SymKey、公钥PubKey、私钥PriKey) | -**开发步骤** +### 随机生成RSA密钥对,并获得二进制数据 示例1:随机生成非对称密钥KeyPair,并获得二进制数据(场景1、3) -1. 创建非对称密钥生成器; -2. 通过非对称密钥生成器随机生成非对称密钥; -3. 获取密钥对象的二进制数据; +1. 创建非对称密钥生成器。 +2. 通过非对称密钥生成器随机生成非对称密钥。 +3. 获取密钥对象的二进制数据。 以使用Promise方式随机生成RSA密钥(1024位,素数个数为2)为例: @@ -69,11 +72,13 @@ function generateAsyKey() { } ``` +### 随机生成AES密钥,并获得二进制数据 + 示例2:随机生成对称密钥SymKey,并获得二进制数据(场景1、3) -1. 创建对称密钥生成器; -2. 通过对称密钥生成器随机生成对称密钥; -3. 获取算法库密钥对象的二进制数据; +1. 创建对称密钥生成器。 +2. 通过对称密钥生成器随机生成对称密钥。 +3. 获取算法库密钥对象的二进制数据。 以使用Promise方式随机生成AES密钥(256位)为例: @@ -100,6 +105,8 @@ function testGenerateAesKey() { } ``` +### 根据RSA密钥二进制数据,生成密钥对 + 示例3:根据指定的RSA非对称密钥二进制数据,生成KeyPair对象(场景2) 1. 获取RSA公钥或私钥二进制数据,公钥需满足ASN.1语法、X.509规范、DER编码格式,私钥需满足ASN.1语法、PKCS#8规范、DER编码格式。 @@ -125,20 +132,20 @@ function convertAsyKey() { > > 当前convertKey操作,公钥只支持转换满足X.509规范的DER格式,私钥只支持PKCS#8规范的DER格式。 +### 根据ECC密钥二进制数据,生成密钥对 + 示例4:根据指定的ECC非对称密钥二进制数据,生成KeyPair对象(场景2、3) 1. 获取ECC二进制密钥数据,封装成DataBlob对象。 2. 调用convertKey方法,传入公钥二进制和私钥二进制(二者非必选项,可只传入其中一个),转换为KeyPair对象。 ```js -import cryptoFramework from "@ohos.security.cryptoFramework" - function convertEccAsyKey() { let pubKeyArray = new Uint8Array([48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,83,96,142,9,86,214,126,106,247,233,92,125,4,128,138,105,246,162,215,71,81,58,202,121,26,105,211,55,130,45,236,143,55,16,248,75,167,160,167,106,2,152,243,44,68,66,0,167,99,92,235,215,159,239,28,106,124,171,34,145,124,174,57,92]); let priKeyArray = new Uint8Array([48,49,2,1,1,4,32,115,56,137,35,207,0,60,191,90,61,136,105,210,16,27,4,171,57,10,61,123,40,189,28,34,207,236,22,45,223,10,189,160,10,6,8,42,134,72,206,61,3,1,7]); let pubKeyBlob = { data: pubKeyArray }; let priKeyBlob = { data: priKeyArray }; - let generator = cryptoFramework.createAsyKeyGenerator("ECC256"); + let generator = cryptoFrameWork.createAsyKeyGenerator("ECC256"); generator.convertKey(pubKeyBlob, priKeyBlob, (error, data) => { if (error) { AlertDialog.show({message : "Convert keypair fail"}); @@ -148,11 +155,13 @@ function convertEccAsyKey() { } ``` +### 根据3DES密钥二进制数据,生成密钥 + 示例5:根据指定的对称密钥二进制数据,生成SymKey对象(场景2、3) -1. 创建对称密钥生成器; -2. 通过对称密钥生成器,根据指定的对称密钥二进制数据,生成SymKey对象; -3. 获取算法库密钥对象的二进制数据; +1. 创建对称密钥生成器。 +2. 通过对称密钥生成器,根据指定的对称密钥二进制数据,生成SymKey对象。 +3. 获取算法库密钥对象的二进制数据。 以使用callback方式生成3DES密钥(3DES密钥只能为192位)为例: @@ -198,20 +207,226 @@ function testConvertAesKey() { } ``` +## 非对称密钥对象根据参数生成与获取参数 + +### 场景说明 + +使用密钥生成操作中,典型的场景有: +1. 根据非对称密钥参数生成指定的算法库密钥对象。该对象可用于后续的加解密等操作。 +2. 对于非对称密钥,获取密钥对象的参数属性,用于存储或运输。 + +> **说明:** +> +> 1. 从API version 10开始, 支持使用密钥参数来生成非对称密钥。 +> 2. 非对称密钥(公钥PubKey和私钥PriKey),其中公钥和私钥组成密钥对KeyPair。非对称密钥参数具体可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 + +### 接口及参数说明 + +详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md#asykeygeneratorbyspec10)。 + +以上场景涉及的常用接口如下表所示: + +|实例名|接口名|描述| +|---|---|---| +|AsyKeyGeneratorBySpec|generateKeyPair(callback: AsyncCallback): void;|使用callback方式,根据密钥参数生成非对称密钥对象KeyPair +|AsyKeyGeneratorBySpec|generateKeyPair(): Promise;|使用Promise方式,根据密钥参数生成非对称密钥对象KeyPair +|AsyKeyGeneratorBySpec|generatePriKey(callback: AsyncCallback): void;|使用callback方式,根据密钥参数生成非对称私钥对象PriKey +|AsyKeyGeneratorBySpec|generatePriKey(): Promise;|使用Promise方式,根据密钥参数生成非对称私钥对象PriKey +|AsyKeyGeneratorBySpec|generatePubKey(callback: AsyncCallback): void;|使用callback方式,根据密钥参数生成非对称公钥对象PubKey +|AsyKeyGeneratorBySpec|generatePubKey(): Promise;|使用Promise方式,根据密钥参数生成非对称公钥对象PubKey +| PriKey | getAsyKeySpec(itemType: AsyKeySpecItem): bigint \| string \| number; | 获取非对称密钥私钥对象的密钥参数属性 | +| PubKey | getAsyKeySpec(itemType: AsyKeySpecItem): bigint \| string \| number; | 获取非对称密钥公钥对象的密钥参数属性 | + +### 根据参数生成ECC密钥对,并获得密钥参数开发步骤 + +示例1:根据参数生成ECC密钥对,并获得密钥参数(场景1、2) + +1. 创建根据密钥参数的非对称密钥生成器。 +2. 通过根据密钥参数的非对称密钥生成器由指定密钥参数生成非对称密钥对。 +3. 获取密钥对象的密钥参数属性。 + +以使用Promise方式根据密钥参数生成ECC密钥为例: + +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; + +// 打印bigint信息 +function showBigIntInfo(bnName, bnValue) { + console.warn(bnName + ":"); + console.warn(". 十进制: " + bnValue.toString()); + console.warn(". 16进制: " + bnValue.toString(16)); + console.warn(". 长度(bits): " + bnValue.toString(2).length); +} + +// 根据密钥参数属性,构造ECC公私钥共有参数的sepc结构体 +function genEccCommonSpec() { + let fieldFp = { + fieldType : "Fp", + p : BigInt("0xffffffffffffffffffffffffffffffff000000000000000000000001") + } + + let G = { + x : BigInt("0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21"), + y : BigInt("0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34") + } + + let eccCommonSpec = { + algName : "ECC", + specType : cryptoFramework.AsyKeySpecType.COMMON_PARAMS_SPEC, + field : fieldFp, + a : BigInt("0xfffffffffffffffffffffffffffffffefffffffffffffffffffffffe"), + b : BigInt("0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4"), + g : G, + n : BigInt("0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d"), + h : 1 + } + return eccCommonSpec; +} + +// 打印ECC密钥参数属性 +function showEccSpecDetailInfo(key, keyType) { + console.info("show detail of " + keyType + ":"); + try { + let p = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_FP_P_BN); + showBigIntInfo("--- p", p); //length is 224, hex : ffffffffffffffffffffffffffffffff000000000000000000000001 + + let a = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_A_BN); + showBigIntInfo("--- a", a); // length is 224, hex : fffffffffffffffffffffffffffffffefffffffffffffffffffffffe + + let b = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_B_BN); + showBigIntInfo("--- b", b); // length is 224, hex : b4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4 + + let gX = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_G_X_BN); + showBigIntInfo("--- gX", gX); // length is 224, hex : b70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21 + + let gY = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_G_Y_BN); + showBigIntInfo("--- gY", gY); // length is 224, hex : bd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34 + + let n = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_N_BN); + showBigIntInfo("--- n", n); // length is 224, hex : ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d + + let h = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_H_NUM); + console.warn("--- h: " + h); //key h: 1 + + let fieldType = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_FIELD_TYPE_STR); + console.warn("--- field type: " + fieldType); // key field type: Fp + + let fieldSize = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_FIELD_SIZE_NUM); + console.warn("--- field size: " + fieldSize); // key field size: 224 + + let curveName = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_CURVE_NAME_STR); + console.warn("--- curve name: " + curveName); // key curve name: NID_secp224r1 + + if (keyType == "priKey") { + let sk = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_SK_BN); + showBigIntInfo("--- sk", sk); + } else if (keyType == "pubKey") { + let pkX = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_PK_X_BN); + showBigIntInfo("--- pkX", pkX); + let pkY = key.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.ECC_PK_Y_BN); + showBigIntInfo("--- pkY", pkY); + } + } catch (error) { + console.error("getAsyKeySpec error"); + console.error("error code: " + error.code + ", message is: " + error.message); + } +} + +// 测试根据ECC公私钥公共密钥参数生成ECC密钥对,并获得其密钥参数属性 +function testEccUseCommKeySpecGet() +{ + try { + let commKeySpec = genEccCommonSpec(); // 使用参数属性,构造ECC公私钥公共密钥参数对象 + let generatorBySpec = cryptoFramework.createAsyKeyGeneratorBySpec(commKeySpec); // 使用密钥参数对象创建生成器 + let keyPairPromise = generatorBySpec.generateKeyPair(); // 使用生成器创建ECC密钥对 + keyPairPromise.then( keyPair => { + showEccSpecDetailInfo(keyPair.priKey, "priKey"); // 对私钥获取相关密钥参数属性 + showEccSpecDetailInfo(keyPair.pubKey, "pubKey"); // 对公钥获取相关密钥参数属性 + }).catch(error => { + console.error("generateComm error"); + console.error("error code: " + error.code + ", message is: " + error.message); + }) + } catch(error) { + console.error("testEccUseCommSpec error"); + console.error("error code: " + error.code + ", message is: " + error.message); + } +} +``` + +### 根据参数生成RSA公钥,并获得密钥参数属性 + +示例2:根据参数生成RSA公钥,并获得密钥参数(场景1、2) + +1. 创建根据密钥参数的非对称密钥生成器。 +2. 通过根据密钥参数的非对称密钥生成器由指定密钥参数生成非对称密钥的公钥。 +3. 获取密钥对象的密钥参数属性。 + +以使用Callback方式根据密钥参数生成RSA公钥为例: +```js +import cryptoFramework from '@ohos.security.cryptoFramework'; + +// RSA公钥密钥参数生成函数 +function genRsaPubKeySpec(nIn : bigint, eIn : bigint) { + let rsaCommSpec = { n : nIn, algName : "RSA", specType : cryptoFramework.AsyKeySpecType.COMMON_PARAMS_SPEC }; + let rsaPubKeySpec = { params: rsaCommSpec, pk : eIn, algName : "RSA", specType : cryptoFramework.AsyKeySpecType.PUBLIC_KEY_SPEC }; + return rsaPubKeySpec; +} + +// 根据密钥参数属性,构造RSA公钥密钥参数对象 +function genRsa2048PubKeySpec() { + let nIn = BigInt("0x9260d0750ae117eee55c3f3deaba74917521a262ee76007cdf8a56755ad73a1598a1408410a01434c3f5bc54a88b57fa19fc4328daea0750a4c44e88cff3b2382621b80f670464433e4336e6d003e8cd65bff211da144b88291c2259a00a72b711c116ef7686e8fee34e4d933c868187bdc26f7be071493c86f7a5941c3510806ad67b0f94d88f5cf5c02a092821d8626e8932b65c5bd8c92049c210932b7afa7ac59c0e886ae5c1edb00d8ce2c57633db26bd6639bff73cee82be9275c402b4cf2a4388da8cf8c64eefe1c5a0f5ab8057c39fa5c0589c3e253f0960332300f94bea44877b588e1edbde97cf2360727a09b775262d7ee552b3319b9266f05a25"); + let eIn = BigInt("0x010001"); + return genRsaPubKeySpec(nIn, eIn); +} + +// 将RSA公钥密钥参数属性与预期值比较 +function compareRsaPubKeyBySpec(rsaKeySpec, n, e) { + if (rsaKeySpec.params.n != n) { + return false; + } + if (rsaKeySpec.pk != e) { + return false; + } + return true; +} + +// 测试根据RSA公钥密钥参数生成RSA公钥,并获得其密钥参数属性,与预期值做比较 +function rsaUsePubKeySpecGetCallback() { + let rsaPubKeySpec = genRsa2048PubKeySpec(); + let rsaGeneratorSpec = cryptoFramework.createAsyKeyGeneratorBySpec(rsaPubKeySpec); + rsaGeneratorSpec.generatePubKey((error, key) => { + let pubKey = key; + let nBN = pubKey.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.RSA_N_BN); + let eBN = pubKey.getAsyKeySpec(cryptoFramework.AsyKeySpecItem.RSA_PK_BN); + if (compareRsaPubKeyBySpec(rsaPubKeySpec, nBN, eBN) != true) { + AlertDialog.show({ message : "error pub key big number"} ); + } else { + console.info("n, e in the pubKey are same as the spec."); + } + if (error) { + console.error("generate pubKey error" + "error code: " + error.code + "error message" + error.message); + } + }); +} +``` + ## 使用加解密操作 -**场景说明** +### 场景说明 在数据存储或传输场景中,可以使用加解密操作用于保证数据的机密性,防止敏感数据泄露。使用加解密操作中,典型的场景有: +1. 使用对称密钥的加解密操作。 +2. 使用非对称密钥的加解密操作。 +3. 使用RSA, PKCS1_OAEP填充模式时,获取、设置CipherSpecItem参数。 -1. 使用对称密钥的加解密操作 -2. 使用非对称密钥的加解密操作 +> **说明:** +> +> 1. 从API version 10开始, 支持RSA使用PKCS1_OAEP填充模式时,获取、设置[CipherSpecItem](../reference/apis/js-apis-cryptoFramework.md#cipherspecitem10)参数。 +> 2. 从API version 10开始,支持加解密时字符串参数不带密钥长度。 -**接口及参数说明** +### 接口及参数说明 -详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 - -由于密码算法的复杂性,在选取不同规格和参数时,开发差异较大,无法通过代码示例一一列举,请仔细阅读API参考资料中的相关接口,确保使用正确。 +详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。
由于密码算法的复杂性,在选取不同规格和参数时,开发差异较大,无法通过代码示例一一列举,请仔细阅读API参考资料中的相关接口,确保使用正确。 以上场景设计的常用接口如下表所示: @@ -224,18 +439,18 @@ function testConvertAesKey() { |Cipher|update(data : DataBlob) : Promise\|使用Promise方式添加加解密数据| |Cipher|doFinal(data : DataBlob, callback : AsyncCallback\) : void|使用callback方式结束对所有数据的加解密| |Cipher|doFinal(data : DataBlob) : Promise\|使用Promise方式结束对所有数据的加解密| +|Cipher|getCipherSpec(itemType: CipherSpecItem): string \| Uint8Array|获取加解密的参数,当前仅支持RSA算法| +|Cipher|setCipherSpec(itemType: CipherSpecItem, itemValue: Uint8Array): void|设置加解密的参数,当前仅支持RSA算法| -**开发步骤** +### AES GCM以Promise方式加解密开发步骤: -示例1:使用对称密钥的加解密操作 +示例1:使用AES对称密钥的加解密操作 1. 创建对称密钥生成器。 -2. 通过密钥生成器生成对称密钥。 +2. 通过密钥生成器随机生成对称密钥。 3. 创建加解密生成器。 4. 通过加解密生成器加密或解密数据。 -以AES GCM以Promise方式加解密为例: - ```js import cryptoFramework from '@ohos.security.cryptoFramework'; @@ -256,7 +471,7 @@ function genGcmParamsSpec() { arr = [0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0]; // 16 bytes let dataTag = new Uint8Array(arr); let tagBlob = {data : dataTag}; // GCM的authTag在加密时从doFinal结果中获取,在解密时填入init函数的params参数中 - + let gcmParamsSpec = {iv : ivBlob, aad : aadBlob, authTag : tagBlob, algName : "GcmParamsSpec"}; return gcmParamsSpec; } @@ -286,16 +501,6 @@ function uint8ArrayToString(array) { return arrayString; } -function genKeyMaterialBlob() { - let arr = [ - 0xba, 0x3d, 0xc2, 0x71, 0x21, 0x1e, 0x30, 0x56, - 0xad, 0x47, 0xfc, 0x5a, 0x46, 0x39, 0xee, 0x7c, - 0xba, 0x3b, 0xc2, 0x71, 0xab, 0xa0, 0x30, 0x72]; // keyLen = 192 (24 bytes) - let keyMaterial = new Uint8Array(arr); - return {data : keyMaterial}; -} - - // AES GCM模式示例,自动生成密钥(promise写法) function testAesGcm() { return new Promise((resolve, reject) => { @@ -370,7 +575,14 @@ function testAesGcm() { } ``` -以3DES ECB以callback方式加解密(采用已有数据生成密钥)为例: +### 3DES ECB以callback方式加解密开发步骤: + +示例2:使用3DES对称密钥的加解密操作 + +1. 创建对称密钥生成器。 +2. 通过已有二进制数据生成密钥。 +3. 创建加解密生成器。 +4. 通过加解密生成器加密或解密数据。 ```js import cryptoFramework from '@ohos.security.cryptoFramework'; @@ -496,6 +708,15 @@ function test3DesEcb() { } ``` +### AES GCM以promise方式,分段update()加解密开发步骤: + +示例3:使用AES对称密钥的分段update()加解密操作 + +1. 创建对称密钥生成器。 +2. 通过已有二进制数据生成密钥。 +3. 创建加解密生成器。 +4. 通过加解密生成器加密或解密数据。 + 以AES GCM以promise方式,分段update()实现加解密为例: ```js @@ -584,7 +805,7 @@ function testAesMultiUpdate() { let messageArr = []; let updateLength = 20; // 假设每20字节分段update一次 globalCipherText = []; - + for (let i = 0; i <= plainText.length; i++) { if ((i % updateLength == 0 || i == plainText.length) && messageArr.length != 0) { let message = new Uint8Array(messageArr); @@ -638,7 +859,9 @@ function testAesMultiUpdate() { } ``` -示例2:使用非对称密钥的加解密操作 +### RSA加解密开发步骤 + +示例4:使用RSA非对称密钥的加解密操作 1. 生成RSA密钥。通过createAsyKeyGenerator接口创建AsyKeyGenerator对象,并生成RSA非对称密钥。 2. 生成Cipher对象。通过createCipher接口创建Cipher对象,执行初始化操作,设置密钥及加解密模式。 @@ -649,65 +872,90 @@ import cryptoFramework from "@ohos.security.cryptoFramework" let plan = "This is cipher test."; +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { arr.push(str.charCodeAt(i)); } - var tmpArray = new Uint8Array(arr); - return tmpArray; + return new Uint8Array(arr); } +// 以Promise方式加密 function encryptMessageProMise() { + // 生成非对称密钥生成器 let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); + // 生成加解密生成器 let cipher = cryptoFramework.createCipher("RSA1024|PKCS1"); + // 通过非对称秘钥生成器生成非对称密钥对 let keyGenPromise = rsaGenerator.generateKeyPair(); keyGenPromise.then(rsaKeyPair => { let pubKey = rsaKeyPair.pubKey; + // 初始化加解密操作环境:使用公钥开始加密 return cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, pubKey, null); }).then(() => { + // doFinal let input = { data : stringToUint8Array(plan) }; return cipher.doFinal(input); }).then(dataBlob => { + // 获取加密后的信息 console.info("EncryptOutPut is " + dataBlob.data); }); } +// 以Callback方式加密 function encryptMessageCallback() { + // 生成非对称密钥生成器 let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); + // 生成加解密生成器 let cipher = cryptoFramework.createCipher("RSA1024|PKCS1"); + // 通过非对称秘钥生成器生成非对称密钥对 rsaGenerator.generateKeyPair(function (err, keyPair) { let pubKey = keyPair.pubKey; + // 初始化加解密操作环境:使用公钥开始加密 cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, pubKey, null, function (err, data) { let input = {data : stringToUint8Array(plan) }; + // doFinal cipher.doFinal(input, function (err, data) { + // 获取加密后的信息 console.info("EncryptOutPut is " + data.data); }) }) }) } +// 以Promise方式加解密 function decryptMessageProMise() { + // 生成非对称密钥生成器 let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); + // 生成加解密生成器,用于加密 let cipher = cryptoFramework.createCipher("RSA1024|PKCS1"); + // 生成加解密生成器,用于解密 let decoder = cryptoFramework.createCipher("RSA1024|PKCS1"); + // 通过非对称秘钥生成器生成非对称密钥对 let keyGenPromise = rsaGenerator.generateKeyPair(); let keyPair; let cipherDataBlob; let input = { data : stringToUint8Array(plan) }; keyGenPromise.then(rsaKeyPair => { keyPair = rsaKeyPair; + // 初始化加解密操作环境:使用公钥开始加密 return cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, keyPair.pubKey, null); }).then(() => { + // 加密doFinal return cipher.doFinal(input); }).then(dataBlob => { + // 获取加密后的信息,并用于解密的入参 console.info("EncryptOutPut is " + dataBlob.data); AlertDialog.show({message : "output" + dataBlob.data}); cipherDataBlob = dataBlob; + // 初始化加解密操作环境:使用私钥开始解密 return decoder.init(cryptoFramework.CryptoMode.DECRYPT_MODE, keyPair.priKey, null); }).then(() => { + // 解密doFinal return decoder.doFinal(cipherDataBlob); }).then(decodeData => { + // 验证解密后,数据与原先数据是否保持一致 if (decodeData.data.toString() === input.data.toString()) { AlertDialog.show({message : "decrypt success"}); return; @@ -716,22 +964,33 @@ function decryptMessageProMise() { }); } +// 以Callback方式加解密 function decryptMessageCallback() { + // 生成非对称密钥生成器 let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); + // 生成加解密生成器,用于加密 let cipher = cryptoFramework.createCipher("RSA1024|PKCS1"); + // 生成加解密生成器,用于解密 let decoder = cryptoFramework.createCipher("RSA1024|PKCS1"); let plainText = "this is cipher text"; let input = {data : stringToUint8Array(plainText) }; let cipherData; let keyPair; + // 通过非对称秘钥生成器生成非对称密钥对 rsaGenerator.generateKeyPair(function (err, newKeyPair) { keyPair = newKeyPair; + // 初始化加解密操作环境:使用公钥开始加密 cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, keyPair.pubKey, null, function (err, data) { + // 加密doFinal cipher.doFinal(input, function (err, data) { + // 获取加密后的信息,并用于解密的入参 AlertDialog.show({ message : "EncryptOutPut is " + data.data} ); cipherData = data; + // 初始化加解密操作环境:使用私钥开始解密 decoder.init(cryptoFramework.CryptoMode.DECRYPT_MODE, keyPair.priKey, null, function (err, data) { + // 解密doFinal decoder.doFinal(cipherData, function (err, data) { + // 验证解密后,数据与原先数据是否保持一致 if (input.data.toString() === data.data.toString()) { AlertDialog.show({ message : "decrype success"} ); return; @@ -745,18 +1004,24 @@ function decryptMessageCallback() { } ``` -以RSA非对称加解密(多次调用doFinal实现分段)为例: +### RSA分段加解密开发步骤 + +示例5:使用RSA非对称密钥的分段加解密操作 + +1. 生成RSA密钥。通过createAsyKeyGenerator接口创建AsyKeyGenerator对象,并生成RSA非对称密钥。 +2. 生成Cipher对象。通过createCipher接口创建Cipher对象,执行初始化操作,设置密钥及加解密模式。 +3. 执行加解密操作。通过调用Cipher对象提供的doFinal接口,执行加密操作生成密文或执行解密操作生成明文,多次调用doFinal实现分段。 ```js import cryptoFramework from "@ohos.security.cryptoFramework" +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { arr.push(str.charCodeAt(i)); } - var tmpArray = new Uint8Array(arr); - return tmpArray; + return new Uint8Array(arr); } // 字节流转成可理解的字符串 @@ -834,19 +1099,131 @@ function encryptLongMessagePromise() { > **说明:** > > 1. 使用RSA加解密时,Cipher对象不可重复调用init方法初始化,在创建了一个加密Cipher对象后,如果要进行解密,则需要重新创建另一个Cipher对象执行解密操作。 -> 2. RSA加密有长度限制,允许加密明文的最大长度见[加解密算法库框架概述](cryptoFramework-overview.md)中的基本概念章节。 +> 2. RSA加密有长度限制,允许加密明文的最大长度见[加解密算法库框架概述](cryptoFramework-overview.md)中的基本概念加解密章节。 > 3. RSA解密每次允许解密的密文长度为,RSA密钥的位数/8。 +### RSA加解密PKCS1_OAEP模式开发步骤 + +示例6:使用RSA非对称密钥使用PKCS1_OAEP模式的以Promise形式的加解密操作 + +1. 根据密钥参数生成RSA密钥。通过createAsyKeyGeneratorBySpec接口创建AsyKeyGeneratorBySpec对象,并生成RSA非对称密钥对(也可以使用createAsyKeyGenerator接口随机生成或转换得到RSA密钥对象)。 +2. 生成Cipher对象。通过createCipher接口创建Cipher对象,执行初始化操作,设置密钥及加解密模式,在Update前通过setCipherSpec设置PKCS1_OAEP填充字节流P。 +3. 执行加解密操作。通过调用Cipher对象提供的doFinal接口,执行加密操作生成密文或执行解密操作生成明文,需要加解密Cipher对象的字节流P一致。 + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +// 可理解的字符串转成字节流 +function stringToUint8Array(str) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + return new Uint8Array(arr); +} + +// 根据密钥参数属性构造RSA非对称密钥对密钥参数 +function genRsaKeyPairSpec(nIn : bigint, eIn : bigint, dIn : bigint) { + let rsaCommSpec = { n : nIn, algName : "RSA", specType : cryptoFramework.AsyKeySpecType.COMMON_PARAMS_SPEC }; + let rsaKeyPairSpec = { params: rsaCommSpec, sk : dIn, pk : eIn, algName : "RSA", specType : cryptoFramework.AsyKeySpecType.KEY_PAIR_SPEC }; + return rsaKeyPairSpec; +} + +// 生成RSA2048密钥对参数 +function genRsa2048KeyPairSpec() { + let nIn = BigInt("0x9260d0750ae117eee55c3f3deaba74917521a262ee76007cdf8a56755ad73a1598a1408410a01434c3f5bc54a88b57fa19fc4328daea0750a4c44e88cff3b2382621b80f670464433e4336e6d003e8cd65bff211da144b88291c2259a00a72b711c116ef7686e8fee34e4d933c868187bdc26f7be071493c86f7a5941c3510806ad67b0f94d88f5cf5c02a092821d8626e8932b65c5bd8c92049c210932b7afa7ac59c0e886ae5c1edb00d8ce2c57633db26bd6639bff73cee82be9275c402b4cf2a4388da8cf8c64eefe1c5a0f5ab8057c39fa5c0589c3e253f0960332300f94bea44877b588e1edbde97cf2360727a09b775262d7ee552b3319b9266f05a25"); + let eIn = BigInt("0x010001"); + let dIn = BigInt("0x6a7df2ca63ead4dda191d614b6b385e0d9056a3d6d5cfe07db1daabee022db08212d97613d3328e0267c9dd23d787abde2afcb306aeb7dfce69246cc73f5c87fdf06030179a2114b767db1f083ff841c025d7dc00cd82435b9a90f695369e94df23d2ce458bc3b3283ad8bba2b8fa1ba62e2dce9accff3799aae7c840016f3ba8e0048c0b6cc4339af7161003a5beb864a0164b2c1c9237b64bc87556994351b27506c33d4bcdfce0f9c491a7d6b0628c7c852be4f0a9c3132b2ed3a2c8881e9aab07e20e17deb074691be677776a78b5c502e05d9bdde72126b3738695e2dd1a0a98a14247c65d8a7ee79432a092cb0721a12df798e44f7cfce0c498147a9b1"); + return genRsaKeyPairSpec(nIn, eIn, dIn); +} + +function rsaUseSpecDecryptOAEPPromise() { + let plan = "This is cipher test."; + // 获得RSA密钥对密钥参数对象 + let rsaKeyPairSpec = genRsa2048KeyPairSpec(); + // 根据RSA密钥对参数生成RSA密钥对 + let rsaGeneratorSpec = cryptoFramework.createAsyKeyGeneratorBySpec(rsaKeyPairSpec); + let keyGenPromise = rsaGeneratorSpec.generateKeyPair(); + let cipher = cryptoFramework.createCipher("RSA|PKCS1_OAEP|SHA256|MGF1_SHA1"); + let decoder = cryptoFramework.createCipher("RSA|PKCS1_OAEP|SHA256|MGF1_SHA1"); + let keyPair; + let cipherDataBlob; + // RSA加解密PKCS1-OAEP模式填充字节流P + let pSource = new Uint8Array([1,2,3,4]); + let input = { data : stringToUint8Array(plan) }; + // 生成密钥 + keyGenPromise.then(rsaKeyPair => { + keyPair = rsaKeyPair; + // 进行加密操作初始化 + return cipher.init(cryptoFramework.CryptoMode.ENCRYPT_MODE, keyPair.pubKey, null); + }).then(() => { + // get和set操作可以放在Cipher对象init之后,此处对cipher进行set和get操作 + cipher.setCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF1_PSRC_UINT8ARR, pSource); + let retP = cipher.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF1_PSRC_UINT8ARR); + // 比较get出来的P字节流与set进去的P字节流是否一致 + if (retP.toString() != pSource.toString()) { + AlertDialog.show({message : "error init pSource" + retP}); + } else { + console.info("pSource changed ==" + retP); + } + // 进行OAEP其他参数的get操作 + let md = cipher.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MD_NAME_STR); + console.info("md == " + md); + let mgf = cipher.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF_NAME_STR); + console.info("mgf == " + mgf); + let mgf1Md = cipher.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF1_MD_STR); + console.info("mgf1Md == " + mgf1Md); + return cipher.doFinal(input); + }).then(dataBlob => { + console.info("EncryptOutPut is " + dataBlob.data); + cipherDataBlob = dataBlob; + // get和set操作可以放在Cipher对象init之前,且与init之后等价,此处对decoder进行set和get操作 + decoder.setCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF1_PSRC_UINT8ARR, pSource); + let retP = decoder.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF1_PSRC_UINT8ARR); + // 比较get出来的P字节流与set进去的P字节流是否一致 + if (retP.toString() != pSource.toString()) { + AlertDialog.show({message : "error init pSource" + retP}); + } else { + console.info("pSource changed ==" + retP); + } + // 进行OAEP其他参数的get操作 + let md = decoder.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MD_NAME_STR); + console.info("md == " + md); + let mgf = decoder.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF_NAME_STR); + console.info("mgf == " + mgf); + let mgf1Md = decoder.getCipherSpec(cryptoFramework.CipherSpecItem.OAEP_MGF1_MD_STR); + console.info("mgf1Md == " + mgf1Md); + // 初始化解密操作 + return decoder.init(cryptoFramework.CryptoMode.DECRYPT_MODE, keyPair.priKey, null); + }).then(() => { + return decoder.doFinal(cipherDataBlob); + }).then(decodeData => { + // 解密成功 + if (decodeData.data.toString() === input.data.toString()) { + console.info("oaep decrypt success"); + AlertDialog.show({message : " oaep decrypt success"}); + } else { + AlertDialog.show({message : "oeap decrypt fail"}); + } + }); +} +``` + ## 使用签名验签操作 -**场景说明** +### 场景说明 当需要判断接收的数据是否被篡改且是否为指定对象发送的数据时,可以使用签名验签操作。使用签名验签操作中,典型的场景有: - 1. 使用RSA签名验签操作 2. 使用ECC签名验签操作 +3. 使用RSA签名验签,PSS模式时,获取、设置SignSpecItem参数。 + +> **说明:** +> +> 1. 从API version 10开始,支持RSA使用PSS填充模式时,获取、设置[SignSpecItem](../reference/apis/js-apis-cryptoFramework.md#signspecitem10)参数。 +> 2. 从API version 10开始,支持签名验签时字符串参数不带密钥长度。 -**接口及参数说明** +### 接口及参数说明 详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。
由于密码算法的复杂性,在选取不同规格和参数时,开发差异较大,无法通过代码示例一一列举,请仔细阅读API参考资料中的相关接口,确保使用正确。 @@ -859,15 +1236,19 @@ function encryptLongMessagePromise() { |Sign|update(data : DataBlob) : Promise\|用Promise方式添加签名数据| |Sign|sign(data : DataBlob, callback : AsyncCallback\) : void|使用callback方式签名所有数据| |Sign|sign(data : DataBlob) : Promise\|使用Promise方式签名所有数据| +|Sign|getSignSpec(itemType: SignSpecItem): string \| number|获得签名的参数,当前仅支持RSA算法| +|Sign|setSignSpec(itemType: SignSpecItem, itemValue: number): void|设置签名的参数,当前仅支持RSA算法| |cryptoFramework|function createVerify(algName : string) : Verify|根据String设置的参数创建Verify对象| -|Verify|init(priKey : PriKey, callback : AsyncCallback\) : void|使用callback方式设置密钥并初始化Verify对象| -|Verify|init(priKey : PriKey) : Promise\|使用Promise方式设置密钥并初始化Verify对象| +|Verify|init(pubKey : PubKey, callback : AsyncCallback\) : void|使用callback方式设置密钥并初始化Verify对象| +|Verify|init(pubKey : PubKey) : Promise\|使用Promise方式设置密钥并初始化Verify对象| |Verify|update(data : DataBlob, callback : AsyncCallback\) : void|使用callback方式添加验签数据| |Verify|update(data : DataBlob) : Promise\|用Promise方式添加验签数据| |Verify|verify(data : DataBlob, signatureData : DataBlob, callback : AsyncCallback\) : void|使用callback方式验签所有数据| |Verify|verify(data : DataBlob, signatureData : DataBlob) : Promise\|使用Promise方式验签所有数据| +|Verify|getVerifySpec(itemType: SignSpecItem): string \| number|获得验签的参数,当前仅支持RSA算法| +|Verify|setVerifySpec(itemType: SignSpecItem, itemValue: number): void|设置验签的参数,当前仅支持RSA算法| -**开发步骤** +### RSA签名验签开发步骤 示例1:使用RSA签名验签操作 @@ -880,13 +1261,13 @@ function encryptLongMessagePromise() { ```js import cryptoFramework from "@ohos.security.cryptoFramework" +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { - arr.push(str.charCodeAt(i)); + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); } - var tmpArray = new Uint8Array(arr); - return tmpArray; + return new Uint8Array(arr); } let globalKeyPair; @@ -898,7 +1279,7 @@ let input2 = { data : stringToUint8Array(plan2) }; function signMessagePromise() { let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); - let signer = cryptoFramework.createSign("RSA1024|PKCS1|SHA256"); + let signer = cryptoFramework.createSign("RSA1024|PKCS1|SHA256"); // API version 10开始,支持"RSA|PKCS1|SHA256" let keyGenPromise = rsaGenerator.generateKeyPair(); keyGenPromise.then( keyPair => { globalKeyPair = keyPair; @@ -928,7 +1309,7 @@ function verifyMessagePromise() { function signMessageCallback() { let rsaGenerator = cryptoFramework.createAsyKeyGenerator("RSA1024|PRIMES_2"); - let signer = cryptoFramework.createSign("RSA1024|PKCS1|SHA256"); + let signer = cryptoFramework.createSign("RSA1024|PKCS1|SHA256"); // API version 10开始,支持"RSA|PKCS1|SHA256" rsaGenerator.generateKeyPair(function (err, keyPair) { globalKeyPair = keyPair; let priKey = globalKeyPair.priKey; @@ -955,6 +1336,8 @@ function verifyMessageCallback() { } ``` +### ECDSA签名验签开发步骤 + 示例2:使用ECDSA操作 1. 生成ECC密钥。通过createAsyKeyGenerator接口创建AsyKeyGenerator对象,并生成ECC非对称密钥。 @@ -966,13 +1349,13 @@ function verifyMessageCallback() { ```js import cryptoFramework from "@ohos.security.cryptoFramework" +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { arr.push(str.charCodeAt(i)); } - var tmpArray = new Uint8Array(arr); - return tmpArray; + return new Uint8Array(arr); } let globalKeyPair; @@ -1041,18 +1424,26 @@ function verifyMessageCallback() { } ``` -以执行签名、验签操作时多次调用update实现分段为例: +### RSA分段签名验签开发步骤 + +示例3:使用RSA签名验签操作 + +1. 生成RSA密钥。通过createAsyKeyGenerator接口创建AsyKeyGenerator对象,并生成RSA非对称密钥。 +2. 生成Sign对象。通过createSign接口创建Sign对象,执行初始化操作并设置签名私钥。 +3. 执行签名操作。通过Sign类提供的update接口,多次添加签名数据,并调用sign接口生成数据的签名,完成分段签名。 +4. 生成Verify对象。通过createVerify接口创建Verify对象,执行初始化操作并设置验签公钥。 +5. 执行验签操作。多次通过Verify类提供的update接口,添加签名数据,并调用verify接口传入签名进行验签,完成分段验签。 ```js import cryptoFramework from "@ohos.security.cryptoFramework" +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { arr.push(str.charCodeAt(i)); } - var tmpArray = new Uint8Array(arr); - return tmpArray; + return new Uint8Array(arr); } function signLongMessagePromise() { @@ -1109,9 +1500,169 @@ function signLongMessagePromise() { } ``` +### RSA签名验签PSS模式开发步骤 + +示例4:使用RSA签名验签PSS模式,以Callback形式完成签名验签流程。 + +1. 根据密钥参数生成RSA密钥。通过createAsyKeyGeneratorBySpec接口创建AsyKeyGeneratorBySpec对象,并生成RSA非对称密钥对。 +2. 生成Sign对象。通过createSign接口创建Sign对象,执行初始化操作并设置签名私钥,可以获得、设置PSS模式相关参数。 +3. 执行签名操作。通过Sign类提供的update接口,添加签名数据,并调用sign接口生成数据的签名。 +4. 生成Verify对象。通过createVerify接口创建Verify对象,执行初始化操作并设置验签公钥,可以获得、设置PSS模式相关参数,验签成功需要保证盐值长度一致。 +5. 执行验签操作。通过Verify类提供的update接口,添加签名数据,并调用verify接口传入签名进行验签。 + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +// 可理解的字符串转成字节流 +function stringToUint8Array(str) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + return new Uint8Array(arr); +} + +// 根据密钥参数属性构造RSA非对称密钥对密钥参数 +function genRsaKeyPairSpec(nIn : bigint, eIn : bigint, dIn : bigint) { + let rsaCommSpec = { n : nIn, algName : "RSA", specType : cryptoFramework.AsyKeySpecType.COMMON_PARAMS_SPEC }; + let rsaKeyPairSpec = { params: rsaCommSpec, sk : dIn, pk : eIn, algName : "RSA", specType : cryptoFramework.AsyKeySpecType.KEY_PAIR_SPEC }; + return rsaKeyPairSpec; +} + +// 生成RSA2048密钥对参数 +function genRsa2048KeyPairSpec() { + let nIn = BigInt("0x9260d0750ae117eee55c3f3deaba74917521a262ee76007cdf8a56755ad73a1598a1408410a01434c3f5bc54a88b57fa19fc4328daea0750a4c44e88cff3b2382621b80f670464433e4336e6d003e8cd65bff211da144b88291c2259a00a72b711c116ef7686e8fee34e4d933c868187bdc26f7be071493c86f7a5941c3510806ad67b0f94d88f5cf5c02a092821d8626e8932b65c5bd8c92049c210932b7afa7ac59c0e886ae5c1edb00d8ce2c57633db26bd6639bff73cee82be9275c402b4cf2a4388da8cf8c64eefe1c5a0f5ab8057c39fa5c0589c3e253f0960332300f94bea44877b588e1edbde97cf2360727a09b775262d7ee552b3319b9266f05a25"); + let eIn = BigInt("0x010001"); + let dIn = BigInt("0x6a7df2ca63ead4dda191d614b6b385e0d9056a3d6d5cfe07db1daabee022db08212d97613d3328e0267c9dd23d787abde2afcb306aeb7dfce69246cc73f5c87fdf06030179a2114b767db1f083ff841c025d7dc00cd82435b9a90f695369e94df23d2ce458bc3b3283ad8bba2b8fa1ba62e2dce9accff3799aae7c840016f3ba8e0048c0b6cc4339af7161003a5beb864a0164b2c1c9237b64bc87556994351b27506c33d4bcdfce0f9c491a7d6b0628c7c852be4f0a9c3132b2ed3a2c8881e9aab07e20e17deb074691be677776a78b5c502e05d9bdde72126b3738695e2dd1a0a98a14247c65d8a7ee79432a092cb0721a12df798e44f7cfce0c498147a9b1"); + return genRsaKeyPairSpec(nIn, eIn, dIn); +} + +function verifyMessageCallbackPSS() { + let plan1 = "This is Sign test plan1"; + let plan2 = "This is Sign test plan1"; + let input1 = { data : stringToUint8Array(plan1) }; + let input2 = { data : stringToUint8Array(plan2) }; + let globalKeyPair; + let signMessageBlob; + // 获得RSA密钥对密钥参数对象 + let rsaKeyPairSpec = genRsa2048KeyPairSpec(); + // 构造RSA密钥对生成器 + let rsaGeneratorSpec = cryptoFramework.createAsyKeyGeneratorBySpec(rsaKeyPairSpec); + // sign和verfiy均支持RSA密钥带长度/不带长度的写法 + let signer = cryptoFramework.createSign("RSA|PSS|SHA256|MGF1_SHA256"); + let verifyer = cryptoFramework.createVerify("RSA2048|PSS|SHA256|MGF1_SHA256"); + rsaGeneratorSpec.generateKeyPair(function (err, keyPair) { + globalKeyPair = keyPair; + signer.init(globalKeyPair.priKey, function (err, data) { + // 在签名初始化后,对PSS参数进行set和get操作 + let setN = 32; + signer.setSignSpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM, setN); + let saltLen = signer.getSignSpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM); + console.info("SaltLen == " + saltLen); + let tf = signer.getSignSpec(cryptoFramework.SignSpecItem.PSS_TRAILER_FIELD_NUM); + console.info("trailer field == " + tf); + let md = signer.getSignSpec(cryptoFramework.SignSpecItem.PSS_MD_NAME_STR); + console.info("md == " + md); + let mgf = signer.getSignSpec(cryptoFramework.SignSpecItem.PSS_MGF_NAME_STR); + console.info("mgf == " + mgf); + let mgf1Md = signer.getSignSpec(cryptoFramework.SignSpecItem.PSS_MGF1_MD_STR); + console.info("mgf1Md == " + mgf1Md); + signer.update(input1, function (err, data) { + signer.sign(input2, function (err, data) { + // 在验签初始化前,对PSS参数进行set和get操作,功能与初始化后一致 + signMessageBlob = data; + AlertDialog.show({message : "res" + signMessageBlob.data}); + let setN = 32; + verifyer.setVerifySpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM, setN); + let saltLen = verifyer.getVerifySpec(cryptoFramework.SignSpecItem.PSS_SALT_LEN_NUM); + console.info("SaltLen == " + saltLen); + let tf = verifyer.getVerifySpec(cryptoFramework.SignSpecItem.PSS_TRAILER_FIELD_NUM); + console.info("trailer field == " + tf); + let md = verifyer.getVerifySpec(cryptoFramework.SignSpecItem.PSS_MD_NAME_STR); + console.info("md == " + md); + let mgf = verifyer.getVerifySpec(cryptoFramework.SignSpecItem.PSS_MGF_NAME_STR); + console.info("mgf == " + mgf); + let mgf1Md = verifyer.getVerifySpec(cryptoFramework.SignSpecItem.PSS_MGF1_MD_STR); + console.info("mgf1Md == " + mgf1Md); + verifyer.init(globalKeyPair.pubKey, function (err, data) { + verifyer.update(input1, function(err, data) { + verifyer.verify(input2, signMessageBlob, function(err, data) { + AlertDialog.show({message : "res " + data}); + }) + }); + }); + }); + }); + }); + }); +} +``` + +## 使用密钥协商操作 + +### 场景说明 + +使用密钥协商操作中,典型的场景有: + +通信双方可以在一个公开的信道上通过相互传送一些消息,共同建立一个安全的共享秘密密钥。 + +> **说明:** +> +> 从API version 10开始,支持密钥协商时字符串参数不带密钥长度。 + +### 接口及参数说明 + +详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 + +|实例名|接口名|描述| +|---|---|---| +|cryptoFramework|createKeyAgreement(algName : string) : KeyAgreement|根据String设置的参数创建KeyAgreement对象| +|KeyAgreement|generateSecret(priKey : PriKey, pubKey : PubKey, callback : AsyncCallback\) : void|使用callback方式进行密钥协商| +|KeyAgreement|generateSecret(priKey : PriKey, pubKey : PubKey) : Promise\|使用Promise方式进行密钥协商| + +### 开发步骤 + +1. 生成ECC密钥。通过createAsyKeyGenerator接口创建AsyKeyGenerator对象,并生成ECC非对称密钥。 +2. 基于ECC密钥的私钥及公钥执行ECDH操作。 + +```js +import cryptoFramework from "@ohos.security.cryptoFramework" + +let globalKeyPair; + +function ecdhPromise() { + let eccGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); + let eccKeyAgreement = cryptoFramework.createKeyAgreement("ECC256"); // API version 10开始,支持输入"ECC"来进行密钥协商 + let keyGenPromise = eccGenerator.generateKeyPair(); + keyGenPromise.then( keyPair => { + globalKeyPair = keyPair; + return eccKeyAgreement.generateSecret(keyPair.priKey, keyPair.pubKey); + }).then((secret) => { + console.info("ecdh output is " + secret.data); + }).catch((error) => { + console.error("ecdh error."); + }); +} + +function ecdhCallback() { + let eccGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); + let eccKeyAgreement = cryptoFramework.createKeyAgreement("ECC256"); + eccGenerator.generateKeyPair(function (err, keyPair) { + globalKeyPair = keyPair; + eccKeyAgreement.generateSecret(keyPair.priKey, keyPair.pubKey, function (err, secret) { + if (err) { + console.error("ecdh error."); + return; + } + console.info("ecdh output is " + secret.data); + }); + }); +} +``` + ## 使用摘要操作 -**场景说明** +### 场景说明 用户指定摘要算法(如SHA256)生成Md实例,并输入单段或多段需要摘要的信息,进行摘要计算更新,并返回消息摘要计算结果,在指定算法后可获取当前算法名与摘要计算长度(字节) @@ -1119,7 +1670,7 @@ function signLongMessagePromise() { 用户指定摘要算法(如SHA256)生成Md实例,并输入单段或多段需要摘要的信息,进行摘要计算更新,并返回消息摘要计算结果,在指定算法后可获取当前算法名与摘要计算长度(字节) -**接口及参数说明** +### 接口及参数说明 详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 @@ -1133,12 +1684,12 @@ function signLongMessagePromise() { | Md | getMdLength() : number; | 获取摘要的长度(由指定的摘要算法决定) | | Md | readonly algName : string; | 获取当前设置的摘要算法名 | -**开发步骤** +### 摘要算法开发步骤 -1. 设置算法,通过接口`createMd`生成摘要操作实例 -2. 接受用户数据,通过接口`update`,更新摘要,此步骤可重复 -3. 通过接口`digest`,返回摘要计算结果 -4. 获取当前摘要算法名与摘要计算长度 +1. 设置算法,通过接口`createMd`生成摘要操作实例。 +2. 接受用户数据,通过接口`update`,更新摘要,此步骤可重复,算法库不限制单次update的长度。 +3. 通过接口`digest`,返回摘要计算结果。 +4. 获取当前摘要算法名与摘要计算长度。 ```js import cryptoFramework from "@ohos.security.cryptoFramework" @@ -1212,7 +1763,12 @@ function doMdByCallback() { } ``` -以MD更新时多次调用update实现分段为例: +### 分段摘要算法开发步骤 + +1. 设置算法,通过接口`createMd`生成摘要操作实例。 +2. 接受用户数据,多次通过接口`update`,更新摘要,实现分段。 +3. 通过接口`digest`,返回摘要计算结果。 +4. 获取当前摘要算法名与摘要计算长度。 ```js import cryptoFramework from "@ohos.security.cryptoFramework" @@ -1226,7 +1782,6 @@ function stringToUint8Array(str) { return new Uint8Array(arr); } - // 使用Promise方式,完成分段摘要 async function doLoopMdPromise() { let mdAlgName = "SHA256"; // 摘要算法名 @@ -1273,85 +1828,17 @@ async function doLoopMdPromise() { } ``` -## 使用密钥协商操作 - -**场景说明** - -使用密钥协商操作中,典型的场景有: - -通信双方可以在一个公开的信道上通过相互传送一些消息,共同建立一个安全的共享秘密密钥。 - -**接口及参数说明** - -详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 - -|实例名|接口名|描述| -|---|---|---| -|cryptoFramework|createKeyAgreement(algName : string) : KeyAgreement|根据String设置的参数创建KeyAgreement对象| -|KeyAgreement|generateSecret(priKey : PriKey, pubKey : PubKey, callback : AsyncCallback\) : void|使用callback方式进行密钥协商| -|KeyAgreement|generateSecret(priKey : PriKey, pubKey : PubKey) : Promise\|使用Promise方式进行密钥协商| - -**开发步骤** - -1. 通过createKeyAgreement接口创建KeyAgreement对象,用于后续的密钥协商操作。 -2. 调用KeyAgreement对象提供的generateSecret方法,传入对端的ECC公钥对象,以及本地生成的ECC私钥对象。 - -```js -import cryptoFramework from "@ohos.security.cryptoFramework" - -let globalSelfPriKey; -let globalPeerPubKey; - -function ecdhPromise() { - let peerPubKeyArray = new Uint8Array([48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,83,96,142,9,86,214,126,106,247,233,92,125,4,128,138,105,246,162,215,71,81,58,202,121,26,105,211,55,130,45,236,143,55,16,248,75,167,160,167,106,2,152,243,44,68,66,0,167,99,92,235,215,159,239,28,106,124,171,34,145,124,174,57,92]); - let peerPubKeyBlob = { data: peerPubKeyArray }; - let eccGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); - let eccKeyAgreement = cryptoFramework.createKeyAgreement("ECC256"); - eccGenerator.convertKey(peerPubKeyBlob, null).then((peerKeyPair) => { - globalPeerPubKey = peerKeyPair.pubKey; - return eccGenerator.generateKeyPair(); - }).then((keyPair) => { - globalSelfPriKey = keyPair.priKey; - return eccKeyAgreement.generateSecret(globalSelfPriKey, globalPeerPubKey); - }).then((secret) => { - console.info("ecdh promise output is " + secret.data); - }).catch((error) => { - console.error("ecdh error."); - }); -} - -function ecdhCallback() { - let peerPubKeyArray = new Uint8Array([48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,83,96,142,9,86,214,126,106,247,233,92,125,4,128,138,105,246,162,215,71,81,58,202,121,26,105,211,55,130,45,236,143,55,16,248,75,167,160,167,106,2,152,243,44,68,66,0,167,99,92,235,215,159,239,28,106,124,171,34,145,124,174,57,92]); - let peerPubKeyBlob = { data: peerPubKeyArray }; - let eccGenerator = cryptoFramework.createAsyKeyGenerator("ECC256"); - let eccKeyAgreement = cryptoFramework.createKeyAgreement("ECC256"); - eccGenerator.convertKey(peerPubKeyBlob, null, function (err, peerKeyPair) { - globalPeerPubKey = peerKeyPair.pubKey; - eccGenerator.generateKeyPair(function (err, keyPair) { - globalSelfPriKey = keyPair.priKey; - eccKeyAgreement.generateSecret(globalSelfPriKey, globalPeerPubKey, function (err, secret) { - if (err) { - console.error("ecdh error."); - return; - } - console.info("ecdh callback output is " + secret.data); - }); - }); - }) -} -``` - ## 使用消息认证码操作 -**场景说明** +### 场景说明 消息认证码操作主要应用于身份认证的场景: -Mac(message authentication code)可以对消息进行完整性校验,通过使用双方共享的密钥,识别出信息伪装篡改等行为 +Mac(message authentication code)可以对消息进行完整性校验,通过使用双方共享的密钥,识别出信息伪装篡改等行为。 用户指定摘要算法(如SHA256)生成消息认证码Mac实例,输入对称密钥初始化Mac,并传入单段或多段需要摘要的信息,进行消息认证码计算,并获取消息认证码计算结果,在指定算法后可获取当前算法名与消息认证码计算长度(字节)。 -**接口及参数说明** +### 接口及参数说明 详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 @@ -1367,13 +1854,13 @@ Mac(message authentication code)可以对消息进行完整性校验,通过使 | Mac | getMacLength() : number; | 获取MAC的长度(由指定的摘要算法决定) | | Mac | readonly algName : string; | 获取当前设置的摘要算法名 | -**开发步骤** +### HMAC开发步骤 -1. 设置算法,通过接口`createMac`生成消息认证码操作实例 -2. 接受输入对称密钥,通过接口`init`,初始化Mac -3. 接受数据,通过接口`update`,更新Mac,此步骤可重复 -4. 通过接口`doFinal`,返回Mac计算结果 -5. 获取当前摘要算法名与Mac计算长度 +1. 设置算法,通过接口`createMac`生成消息认证码操作实例。 +2. 接受输入对称密钥,通过接口`init`,初始化Mac。 +3. 接受数据,通过接口`update`,更新Mac,此步骤可重复。 +4. 通过接口`doFinal`,返回Mac计算结果。 +5. 获取当前摘要算法名与Mac计算长度。 ```js import cryptoFramework from "@ohos.security.cryptoFramework" @@ -1435,6 +1922,7 @@ function doHmacByCallback() { try { mac = cryptoFramework.createMac(macAlgName); } catch (error) { + AlertDialog.show({message: "[Callback]: error code: " + error.code + ", message is: " + error.message}); console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); } console.info("[Promise]: Mac algName is: " + mac.algName); @@ -1462,9 +1950,9 @@ function doHmacByCallback() { console.error("[Callback]: err: " + err3.code); } else { macOutput = output; - console.info("[Callback]: HMAC result: " + macOutput.data); + console.error("[Callback]: HMAC result: " + macOutput.data); let macLen = mac.getMacLength(); - console.info("[Callback]: MAC len: " + macLen); + console.error("[Callback]: MAC len: " + macLen); } }); }); @@ -1473,8 +1961,16 @@ function doHmacByCallback() { } ``` +### 分段HMAC开发步骤 + 以HMAC更新MAC时多次调用update实现分段为例: +1. 设置算法,通过接口`createMac`生成消息认证码操作实例。 +2. 接受输入对称密钥,通过接口`init`,初始化Mac。 +3. 接受数据,多次通过接口`update`,以实现分段。 +4. 通过接口`doFinal`,返回Mac计算结果。 +5. 获取当前摘要算法名与Mac计算长度。 + ```js import cryptoFramework from "@ohos.security.cryptoFramework" @@ -1547,34 +2043,35 @@ function doLoopHmacPromise() { ## 使用随机数操作 -**场景说明** +### 场景说明 使用随机数操作的主要场景为: -- 用户生成随机数Random实例,输入随机数生成的长度(字节),生成指定长度的随机数。 +- 用户生成随机数Random实例,输入随机数生成的长度(字节),生成指定长度(范围为1~INT_MAX)的安全随机数。 - 用户使用生成的随机数作为参数,进行种子设置。 -**接口及参数说明** +### 接口及参数说明 详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 -| 实例名 | 接口名 | 描述 | -| --------------- | ------------------------------------------------------------ | ---------------------------------------------- | -| cryptoFramework | function createRandom() : Random; | 生成随机数Random实例 | -| Random | generateRandom(len : number, callback: AsyncCallback\) : void; | 接受输入长度,通过Callback,异步生成随机数 | -| Random | generateRandom(len : number) : Promise\; | 接受输入长度,通过Promise,异步生成随机数 | -| Random | setSeed(seed : DataBlob) : void; | 接受输入Blob,设置种子 | +| 实例名 | 接口名 | 描述 | +| --------------- | ------------------------------------------------------------ | ------------------------------------------ | +| cryptoFramework | function createRandom() : Random; | 生成随机数Random实例 | +| Random | generateRandom(len : number, callback: AsyncCallback\) : void; | 接受输入长度,通过Callback,异步生成随机数 | +| Random | generateRandom(len : number) : Promise\; | 接受输入长度,通过Promise,异步生成随机数 | +| Random | generateRandomSync(len: number): DataBlob; | 接受输入长度,同步生成随机数 | +| Random | setSeed(seed : DataBlob) : void; | 接受输入Blob,设置种子 | -**开发步骤** +### 开发步骤 -1. 通过接口`createRandom`生成随机数操作实例 -2. 接受输入长度,通过接口`generateRandom`,生成指定长度的随机数 -3. 接受DataBlob数据,通过接口`setSeed`,为随机数生成池设置种子 +1. 通过接口`createRandom`生成随机数操作实例。 +2. 接受输入长度,通过接口`generateRandom`,生成指定长度的随机数。 +3. 接受DataBlob数据,通过接口`setSeed`,为随机数生成池设置种子。 ```js import cryptoFramework from "@ohos.security.cryptoFramework" -// process by promise +// 通过Promise方式生成随机数 function doRandByPromise(len) { var rand; try { @@ -1595,7 +2092,7 @@ function doRandByPromise(len) { }); } -// process by callback +// 通过Callback方式生成随机数 function doRandByCallback(len) { var rand; try { @@ -1616,4 +2113,25 @@ function doRandByCallback(len) { } }); } + +// 通过同步接口生成随机数 +function doRandBySync(len) { + var rand; + try { + rand = cryptoFramework.createRandom(); + } catch (error) { + console.error("[Sync]: error code: " + error.code + ", message is: " + error.message); + } + + try { + let randData = rand.generateRandomSync(len); + if (randData != null) { + console.info("[Sync]: rand result: " + randData.data); + } else { + console.error("[Sync]: get rand result fail!"); + } + } catch (error) { + console.error("[Sync]: error: " + error.message); + } +} ``` diff --git a/zh-cn/application-dev/security/cryptoFramework-overview.md b/zh-cn/application-dev/security/cryptoFramework-overview.md index a039e6eba1b92c9e552ece87d90574b527690a48..75252b6e410846aeea49aaedab354ce7dc42f9e4 100644 --- a/zh-cn/application-dev/security/cryptoFramework-overview.md +++ b/zh-cn/application-dev/security/cryptoFramework-overview.md @@ -1,5 +1,4 @@ # 加解密算法库框架概述 - 加解密算法库框架是一个屏蔽了第三方密码学算法库实现差异的算法框架,提供加解密、签名验签、消息验证码、哈希、安全随机数等相关功能。开发者可以通过调用加解密算法库框架,忽略底层不同三方算法库的差异,实现迅捷开发。 > **说明:** @@ -7,37 +6,78 @@ > 加解密算法库框架仅提供密钥的密码学操作,而不提供密钥管理功能。因此,使用算法库时,需要应用自己来保管密钥(适用于临时会话密钥等仅在内存中使用的场景,或者应用自己实现密钥安全存储的场景)。如果业务需要由系统提供密钥管理功能(密钥存储等),请使用[HUKS部件](huks-overview.md)。 ## 框架实现原理 + 加解密算法库框架提供的组件分为三层:接口层,Framework层和插件层。接口层负责对外提供统一的JS接口,插件层实现针对具体三方算法库的功能,Framework层通过灵活加载插件层的插件适配并屏蔽三方算法库差异。 ## 基本概念 -**对称密钥** +### 对称密钥 对称密钥使用同一个密钥对数据进行加密解密操作。即对称加密算法中,数据发送方使用加密密钥对明文进行特殊加密算法处理后,使其变成复杂的加密密文发送出去。接收方收到密文后,若想解读原文,则需要使用同一个加密密钥以及相同算法的逆算法对密文进行解密,才能使其恢复成可读明文。 -- **AES加密** +- **AES密钥** AES的全称是Advanced Encryption Standard,是最常见的对称加密。AES为分组密码,分组密码也就是把明文分成一组一组的,每组长度相等,每次加密一组数据,直到加密完整个明文。在AES标准规范中,分组长度只能是128位,也就是说,每个分组为16个字节(每个字节8位)。密钥的长度可以使用128位、192位或256位。 -- **3DES加密** - +- **3DES密钥** + 3DES,也称为 3DESede 或 TripleDES,是三重数据加密算法,相当于是对每个数据块应用三次DES的对称加密算法,它使用3个64位的密钥对数据块进行三次加密。相比DES,3DES因密钥长度变长,安全性有所提高,但其处理速度不高。因此又出现了AES加密算法,AES较于3DES速度更快、安全性更高。 -**非对称密钥** +### 非对称密钥 非对称密钥使用公钥和私钥两个密钥来进行算法操作,公钥对外公开,私钥对外保密。对于加解密操作,一般使用公钥对明文进行加密形成密文,持有私钥的人即可对密文解密形成明文。对于签名验签操作,使用私钥对明文进行签名,公钥持有者可以通过公钥对签名数据做验签,验证数据是否被篡改。 - **RSA密钥** - RSA密钥以极大整数做因数分解的数学难题作为密钥安全性的基石。生成密钥时,首先需要随机出两个大素数p和q,计算n = p * q并将n做为模,再选择一个大于1且小于(p - 1) * (q - 1)的整数e,确保e与(p - 1)*(q - 1)互素,最后计算d,使得e * d - 1为(p - 1)和(q - 1)的倍数,则可得到公钥(n, e)和私钥(n, d)。 + RSA算法是由Ron Rivest、Adi Shamir和Leonard Adleman一起提出的,是一种非对称加密算法,广泛应用于现代的信息加密传输等领域。它的数学基础是大质数相乘,对其积做因式分解的计算困难性。 + + RSA密钥参数,涉及三个整数,包括: + + n:模数(Modulus),是私钥和公钥的公共参数。 + + sk:私钥指数(privateExponent),公式中常写作d。 - 算法库框架除提供了默认的双素数RSA密钥生成外,还提供了多素数密钥生成方式,可以在密钥生成时通过指定primes参数(PRIMES_2, PRIMES_3, PRIMES_4, PRIMES_5)指定素数个数。多素数密钥的优点是可以减少解密、签名的计算量(中国剩余定理),但相对的劣势是密钥强度会越低,算法库依据OpenSSL的素数使用规则制定了相应规格,具体将在**约束与限制**章节中说明。 + pk:公钥指数(publicExponent),公式中常写作e。 - **ECC密钥** - - ECC是一种基于椭圆曲线数学的公开密钥加密算法,其数学基础是利用椭圆曲线上的有理点构成Abel加法群上椭圆离散对数的计算困难性,算法库框架提供了多种椭圆曲线的ECC密钥生成能力。 -**加解密** + ECC的全称是Elliptic Curve Cryptography,是一种基于椭圆曲线数学的公开密钥加密算法,其数学基础是利用椭圆曲线上的有理点构成Abel加法群上椭圆离散对数的计算困难性,算法库框架提供了多种椭圆曲线的ECC密钥生成能力。 + + 椭圆曲线算法可以看作是定义在特殊集合下数的运算,当前算法库支持的是Fp域的椭圆曲线,p为素数,Fp域也称素数域。 + + Fp域下的ECC密钥参数,包括: + + p: 素数,用于确定Fp。 + + a, b: 确定椭圆曲线的方程。 + + g: 椭圆曲线的一个基点(base point),可由gx,gy表示。 + + n: 基点g的阶(order)。 + + h: 余因子(cofactor)。 + + sk: 私钥,是一个随机整数,小于n。 + + pk: 公钥,是椭圆曲线上的一个点, pk = sk * g。 + +- **DSA密钥** + + DSA的全称是Digital Signature Algorithm,是一种基于模算数和整数有限域离散对数难题的一种公开密钥算法,不能用于加解密,一般用于数字签名和验签,算法库框架提供了多种不同长度的DSA密钥生成能力。 + + DSA密钥参数,包括: + + p:一个素模数,比特长度为64的整数倍。 + + q:p-1的素因子,长度与p的长度有关。 + + g:g = (h ^ ((p - 1) / q)) mod p,h为满足1 < h < p -1的任意整数。 + + sk:私钥,为随机生成的整数,满足0 < sk < q。 + + pk:公钥,pk = (g ^ sk) mod p。 + +### 加解密 - **对称AES加解密** @@ -50,6 +90,7 @@ > > ECB、CBC加密模式,明文长度不是128位整数倍,必须使用填充方法补足。
> 由于需要填充至分组大小,所以实际算法库中的PKCS5和PKCS7都是以分组大小作为填充长度的,即AES加密填充至16字节。 + - **对称3DES加解密** 该算法的加解密过程分别是对明文/密文数据进行三次DES加密或解密,得到相应的密文或明文。 @@ -59,41 +100,71 @@ - PKCS5:填充字符由一个字节序列组成,每个字节填充该填充字节序列的长度,规定是8字节填充。 - PKCS7:填充字符和PKCS5填充方法一致,但是可以在1-255字节之间任意填充。 - > **说明:** + > **说明:** > > ECB、CBC加密模式,明文长度不是64位整数倍,必须使用填充方法补足。
> 由于需要填充至分组大小,所以实际算法库中的PKCS5和PKCS7都是以分组大小作为填充长度的,即3DES加密填充至8字节。 - **非对称RSA加解密** - 当持有RSA公钥(n, e)和私钥(n, d)后,RSA加密过程为:密文 = 明文 ^ e mod n, 解密过程为:明文 = 密文 ^ d mod n。算法库目前提供了RSA加解密常用的三种模式:PKCS1、PKCS1_OAEP和NoPadding。RSA为块加密算法,加密长度需要在固定长度进行,实际应用中会使用各种padding模式做数据填充。下文中描述了各个padding的区别: + RSA为块加密算法,加密长度需要在固定长度进行,实际应用中会使用各种padding模式做数据填充。算法库目前提供了RSA加解密常用的三种模式:NoPadding、PKCS1和PKCS1_OAEP。下文中描述了各个padding的区别: - NoPadding:不带填充,输入的数据必须与RSA钥模一样长,输出数据长度与RSA钥模一样长。 - - PKCS1:pkcs1padding V1.5是RSA加解密默认的填充方式,输入的数据必须<=RSA钥模-11,输出数据长度与RSA钥模一样长。 - - PKCS1_OAEP:RSA_PKCS1_OAEP_PADDING填充模式是PKCS#1推出的新填充方式,此模式需要设置两个摘要(md和mgf1_md),输入的数据必须小于RSA钥模 - md摘要长度 - mgf1_md摘要长度 - 2,输出数据长度与RSA钥模一样长。 + - PKCS1:即RFC3447规范中的RSAES-PKCS1-V1_5模式(对应于OpenSSL中的RSA_PKCS1_PADDING)在进行RSA运算时需要将源数据D转化为Encryption block(EB),加密时,输入的数据最大长度 <= RSA钥模 - 11,输出数据长度与RSA钥模一样长。 + - PKCS1_OAEP:即RFC3447规范中的RSAES-OAEP模式(对应于OpenSSL中的RSA_PKCS1_OAEP_PADDING),是PKCS#1推出的新填充方式,此模式需要设置两个摘要(md和mgf1_md),加密时,输入的数据必须小于RSA钥模 - md摘要长度 - mgf1_md摘要长度 - 2(摘要长度以字节为单位),输出数据长度与RSA钥模一样长;此模式还可额外设置pSource字节流,来定义OAEP填充的编码输入P,并且可以获取PKCS1_OAEP的相关参数。 + + PKCS1_OAEP的相关参数包括: + + md: 摘要算法。 + + mgf: 掩码生成算法,目前仅支持MGF1。 + + mgf1_md: mgf1摘要算法。 + + pSource: 字节流,用于编码输入。 > **说明:** > > RSA钥模 = (RSA的bits + 7) / 8 -**签名验签** +### 签名验签 - **RSA签名验签** - 当持有RSA公钥(n, e)和私钥(n, d)后,RSA签名生成过程为:签名 = 消息 ^ d mod n, 验签过程为:消息 = 签名 ^ d mod n。消息发送方发送数据时,同时发送消息和私钥签名后的签名信息,消息接收方接受到数据后,将签名信息用公钥解密并验证消息是否一致。因发送的消息长度大多大于RSA钥模,因此算法库框架提供了两种padding模式,通过摘要提取消息的散列值再做签名。算法库框架中提供了签名验签相关的两种模式:PKCS1和PSS。下问对两种模式做详细描述: - - PKCS1: pkcs1padding V1.5是RSA加解密默认的填充方式,使用该模式时需要设置摘要(md)。 - - PSS: PSS模式是RSA 算法的基础上叠加上一种填充算法,使用该签名算法时需要使用摘要(md)和掩码函数(mgf1_md)。 + 算法库框架目前提供了两种RSA签名验签的padding模式:PKCS1和PSS。下面对两种模式做详细描述: + - PKCS1: 即RFC3447规范中的RSASSA-PKCS1-V1_5模式(对应于OpenSSL中的RSA_PKCS1_PADDING),在签名验签时,使用该模式时需要设置摘要(md),摘要算法输出的长度(字节)需要小于RSA的钥模。 + - PSS: 即RFC3447规范中的RSASSA-PSS模式(对应于OpenSSL中的RSA_PKCS1_PSS_PADDING),此模式需要设置两个摘要(md和mgf1_md),且md和mgf1_md长度之和(字节)需要小于RSA的钥模;此模式还可额外设置以字节为单位的盐长度(saltLen),并且可以获取PSS的相关参数。 + + PSS的相关参数包括: + + md: 摘要算法。 + + mgf: 掩码生成算法,目前仅支持MGF1。 + + mgf1_md: MGF1算法中使用的摘要算法。 + + saltLen: 盐长度,以字节为单位。 + + trailer_field:用于编码操作的整数,其值只支持为1。 + + > **说明:** + > + > RSA钥模 = (RSA的bits + 7) / 8 - **ECDSA** - 椭圆曲线数字签名算法(ECDSA)是基于椭圆曲线密码(ECC)模拟数字签名算法(DSA)。相比普通的离散对数问题(DLP)和大数分解问题(IFP),椭圆曲线密码的单位比特强度要高于其他公钥体制。算法库框架提供了多种椭圆曲线及摘要算法组合的椭圆曲线数字签名算法(ECDSA)能力。 + 椭圆曲线数字签名算法(ECDSA)是基于椭圆曲线密码(ECC)的数字签名算法(DSA)。相比普通的离散对数问题(DLP)和大数分解问题(IFP),椭圆曲线密码的单位比特强度要高于其他公钥体制。算法库框架提供了多种椭圆曲线及摘要算法组合的椭圆曲线数字签名算法(ECDSA)能力。 -**密钥协商** +- **DSA** + + 数字签名算法(DSA)的安全性基于整数有限域离散对数问题的困难性,这类签名标准具有较大的兼容性和适用性。 + +### 密钥协商 - **ECDH** ECDH的全称是椭圆曲线迪菲-赫尔曼秘钥交换,是用来在一个非安全通道中建立起安全的共有加密资料,交换双方可以在不共享任何秘密的情况下协商出一个密钥。算法库框架基于开源算法库提供了多种椭圆曲线的ECDH能力。 -**摘要** +### 摘要 消息摘要MD算法是一种能将任意长度的输入消息,通过哈希算法生成长度固定的摘要的算法。消息摘要算法通过其不可逆的特性能被用于敏感信息的加密。消息摘要算法也被称为哈希算法或单向散列算法。 在摘要算法相同时,生成的摘要值主要有下列特点: @@ -102,35 +173,40 @@ - 当输入消息的长度不一致时,生成摘要序列长度固定(摘要长度由算法决定)。 - 当输入消息不一致时,生成摘要序列几乎不会相同(依然存在相同概率,由摘要长度决定相同概率)。 -消息摘要算法主要分为三类:MD,SHA与MAC(详见HMAC章节) +消息摘要算法主要分为三类:MD,SHA与MAC(详见HMAC章节)。 MD算法包括MD2,MD4和MD5。 SHA算法主要包括SHA1,SHA224,SHA256,SHA384,SHA512。 -**消息验证码** +### 消息验证码 HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息认证码算法。HMAC通过指定摘要算法,以通信双方共享密钥与消息作为输入,生成消息认证码用于检验传递报文的完整性,HMAC生成的消息认证码为固定长度。HMAC在消息摘要算法的基础上增加了密钥的输入,确保了信息的正确性。 -**随机数** +### 随机数 -随机数在加解密过程中主要用于临时会话密钥的生成与非对称加密算法中密钥的生成。随机数由硬件生成的硬件随机数生成器或由软件生成的伪随机数生成器进行生成。在加解密的场景中,安全随机数生成器需要具备随机性,不可预测性,与不可重现性。密码学安全伪随机数生成器CSPRNG(Cryptography Secure Random Number Generators)生成的随机数满足密码学安全伪随机性 +随机数在加解密过程中主要用于临时会话密钥的生成与非对称加密算法中密钥的生成。随机数由硬件生成的硬件随机数生成器或由软件生成的伪随机数生成器进行生成。在加解密的场景中,安全随机数生成器需要具备随机性,不可预测性,与不可重现性。密码学安全伪随机数生成器CSPRNG(Cryptography Secure Random Number Generators)生成的随机数满足密码学安全伪随机性。 -- **内部状态**代表随机数生成器内存中的数值,当内部状态相同时,随机数生成器会生成固定的随机数序列 +- **内部状态**代表随机数生成器内存中的数值,当内部状态相同时,随机数生成器会生成固定的随机数序列。 - **种子**(seed)是一个用来对伪随机数的内部状态进行初始化的数据,随机数生成器通过种子来生成一系列的随机序列。 ## 约束与限制 - 算法库框架不支持多线程并发操作。 - 算法库当前只支持OpenSSL。 +- 使用密钥参数生成密钥时,用到的bigint类型需要以大端的形式输入,且必须为正数。 +- 加解密算法库提供常用算法,其中有部分算法和规格并不适用于安全场景,如MD5等,用户需要根据使用需求选择适合的算法。 + +## 密钥生成规格 -### 密钥生成规格 +密钥生成有两种指定规格的方式:字符串参数 / 密钥参数。 +- 字符串参数:以字符串的形式描述用户想要生成的密钥规格。 +- 密钥参数:使用密钥的详细密码学信息,构造密钥对象。 -**对称密钥生成规格** +### AES密钥生成规格 -- 支持的对称密钥生成参数: +- 支持以字符串参数来生成AES密钥,其生成参数如下表所示: |对称密钥算法|密钥长度(bit)|字符串参数| |---|---|---| - |3DES|192|3DES192| |AES|128|AES128| |AES|192|AES192| |AES|256|AES256| @@ -139,13 +215,27 @@ HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息 > > “字符串参数”是“对称密钥算法”和“密钥长度”拼接而成,用于在创建对称密钥生成器时,指定密钥规格。 -**非对称密钥生成规格** +### 3DES密钥生成规格 + +- 支持以字符串参数来生成3DES密钥,其生成参数如下表所示: + + |对称密钥算法|密钥长度(bit)|字符串参数| + |---|---|---| + |3DES|192|3DES192| + + > **说明:** + > + > “字符串参数”是“对称密钥算法”和“密钥长度”拼接而成,用于在创建对称密钥生成器时,指定密钥规格。 + +### RSA密钥生成规格 -- **RSA密钥生成** + > **说明:** + > + > 从API version 10开始, 支持使用密钥参数来生成RSA密钥。 - 支持的非对称密钥生成参数: +- 支持以字符串参数来生成RSA密钥,其生成参数如下表所示: - |非对称密钥类型|素数个数|字符串参数| + |RSA密钥类型|素数个数|字符串参数| |---|---|---| |RSA512|2|RSA512\|PRIMES_2| |RSA768|2|RSA768\|PRIMES_2| @@ -165,26 +255,122 @@ HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息 > **说明:** > - > 生成RSA非对称密钥时,默认素数为2,PRIMES_2参数可省略。 + > “字符串参数”是“RSA密钥类型”和“素数个数”拼接而成,用于在创建非对称密钥生成器时,指定密钥规格。生成RSA非对称密钥时,默认素数为2,PRIMES_2参数可省略。 -- **ECC密钥生成** +- 支持以密钥参数来生成RSA密钥,其密钥参数种类和各个密钥参数的密码学规格要求如下表所示: - 支持的非对称密钥生成参数: + | |公共参数|公钥参数|私钥参数|公私钥对参数| + |---|---------|---|---|---| + |n |× |√ |× |√ | + |pk| |√ | |√ | + |sk| | |× |√ | - |非对称密钥算法|密钥长度| - |---|---| - |ECC|ECC224| - |ECC|ECC256| - |ECC|ECC384| - |ECC|ECC521| + > **说明:** + > + > 密钥参数用于在创建非对称密钥生成器时,指定密钥规格。
+ > 上表说明了算法库对于指定公/私钥参数生成RSA密钥的支持情况。
+ 打√的表示需要指定这一列中的具体属性,来构成密钥参数。
+ 打×的表示这一列中的具体属性对应于某种密钥参数,但是算法库当前不支持通过该密钥参数生成密钥。 -### 加解密规格 + > **注意:** + > + > 1. RSA不支持通过指定公共参数(n)来随机生成密钥。 + > 2. RSA不支持通过指定私钥参数(n, sk)来生成私钥。 -**对称加解密** +### ECC密钥生成规格 -- 支持的对称加密算法: + > **说明:** + > + > 从API version 10开始, 支持使用密钥参数来生成ECC密钥。 + +- 支持以字符串参数来生成ECC密钥,其生成参数如下表所示: + + |非对称密钥算法|密钥长度(bit)|曲线名|字符串参数| + |---|---|---|---| + |ECC|224|NID_secp224r1|ECC224| + |ECC|256|NID_X9_62_prime256v1|ECC256| + |ECC|384|NID_secp384r1|ECC384| + |ECC|521|NID_secp521r1|ECC521| + + > **说明:** + > + > “字符串参数”是“非对称密钥算法”和“密钥长度”拼接而成,用于在创建非对称密钥生成器时,指定密钥规格。
+ > 当前支持的ECC均为Fp域曲线。 + +- 支持以密钥参数来生成ECC密钥,其密钥参数种类和各个密钥参数的密码学规格要求如下表所示: + | |公共参数|公钥参数|私钥参数|公私钥对参数| + |---|---|---|---|---| + |fieldType| √| √| √| √| + |p | √| √| √| √| + |a | √| √| √| √| + |b | √| √| √| √| + |g | √| √| √| √| + |n | √| √| √| √| + |h | √| √| √| √| + |pk | | √| | √| + |sk | | | √| √| + + > **说明:** + > + > 密钥参数用于在创建非对称密钥生成器时,指定密钥规格。
+ > 上表说明了算法库对于指定公/私钥参数生成ECC密钥的支持情况。
+ > 打√的表示需要指定这一列中的具体属性,来构成密钥参数。 + + > **注意:** + > + > 1. 当前ECC只支持Fp域,因此fieldType固定为"Fp"。fieldType和p构成了属性field,当前field只支持[ECFieldFp](../reference/apis/js-apis-cryptoFramework.md#ecfieldfp10)。 + > 2. g和pk为ECC曲线上的点,属于[Point](../reference/apis/js-apis-cryptoFramework.md#point10)类型,需要指定具体X,Y坐标。 - |对称加解密算法|分组模式| 字符串参数 | +### DSA密钥生成规格 + + > **说明:** + > + > 从API version 10开始, 支持DSA算法,包括密钥生成和签名验签。 + +- 支持以字符串参数来生成DSA密钥,其生成参数如下表所示: + + |非对称密钥算法|密钥长度(bit)|字符串参数| + |---|---|---| + |DSA|1024|DSA1024| + |DSA|2048|DSA2048| + |DSA|3072|DSA3072| + + > **说明:** + > + > “字符串参数”是“非对称密钥算法”和“密钥长度”拼接而成,用于在创建非对称密钥生成器时,指定密钥规格。 + +- 支持以密钥参数来生成RSA密钥,其密钥参数种类和各个密钥参数的密码学规格要求如下表所示: + + | |公共参数|公钥参数|私钥参数|公私钥对参数| + |---|---------|---|---|---| + |p |√ |√ |× |√ | + |q |√ |√ |× |√ | + |g |√ |√ |× |√ | + |pk | |√ | |√ | + |sk | | |× |√ | + + > **说明:** + > + > 密钥参数用于在创建非对称密钥生成器时,指定密钥规格。
+ > 上表说明了算法库对于指定公/私钥参数生成DSA密钥的支持情况。
+ > 打√的表示需要指定这一列中的具体属性,来构成密钥参数。
+ > 打×的表示这一列中的具体属性对应于某种密钥参数,但是算法库当前不支持通过该密钥参数生成密钥。 + + > **注意:** + > + > 1. DSA不支持通过指定私钥参数(p, q, g, sk)来生成私钥。 + > 2. 当使用公共参数(p, q, g)来生成DSA密钥对时,DSA密钥长度至少需要1024位。 + +## 加解密规格 + +### 对称加解密 + + > **说明:** + > + > 从API version 10开始, 支持对称加解密不带密钥长度的规格。 + +- 支持的对称加密算法: + |对称加解密算法|分组模式|字符串参数 | |---|---|---| |3DES|ECB|3DES192\|ECB\|[NoPadding\|PKCS5\|PKCS7]| |3DES|CBC|3DES192\|CBC\|[NoPadding\|PKCS5\|PKCS7]| @@ -203,10 +389,13 @@ HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息 > 1. []中只能任选一项。 > 2. “字符串参数”是“对称加解密算法(含密钥长度)”、“分组模式”、“填充模式”拼接而成,用于在创建对称加解密实例时,指定对称加解密算法规格。 -**非对称RSA加解密** +### 非对称RSA加解密 -RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 + > **说明:** + > + > 从API version 10开始, 支持非对称RSA加解密不带密钥长度的规格。 +RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 - 使用NoPadding模式时可以指定的参数: |非对称密钥类型| 填充模式 | 字符串参数 | @@ -218,6 +407,12 @@ RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 |RSA3072|NoPadding|RSA3072\|NoPadding| |RSA4096|NoPadding|RSA4096\|NoPadding| |RSA8192|NoPadding|RSA8192\|NoPadding| + |RSA|NoPadding|RSA\|NoPadding| + + > **说明:** + > + > 1. “字符串参数”是“非对称密钥类型”、“填充模式”拼接而成,用于在创建非对称加解密实例时,指定非对称加解密算法规格。 + > 2. 在上表最后一行,为了兼容由密钥参数生成的密钥,RSA加解密参数输入密钥类型时支持不带长度,加解密运算取决于实际输入的密钥长度。 - 使用PKCS1模式时可以指定的参数: @@ -230,14 +425,14 @@ RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 |RSA3072|PKCS1|RSA3072\|PKCS1| |RSA4096|PKCS1|RSA4096\|PKCS1| |RSA8192|PKCS1|RSA8192\|PKCS1| - -- 使用PKCS1_OAEP模式时可以指定的参数: + |RSA|PKCS1|RSA\|PKCS1| > **说明:** > - > 1. []内的参数只能任选一项,非[]内的为固定值; - > 2. 使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成字符串。
- > 例如:"RSA2048|PKCS1_OAEP|SHA256|MGF1_SHA256" + > 1. “字符串参数”是“非对称密钥类型”、“填充模式”拼接而成,用于在创建非对称加解密实例时,指定非对称加解密算法规格。 + > 2. 在上表最后一行,为了兼容由密钥参数生成的密钥,RSA加解密参数输入密钥类型时支持不带长度,加解密运算取决于实际输入的密钥长度。 + +- 使用PKCS1_OAEP模式时可以指定的参数: | 非对称密钥类型 | 填充模式 | 摘要 | 掩码摘要 | |---|---|---|---| @@ -278,34 +473,62 @@ RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 |RSA8192|PKCS1_OAEP|MD5|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| |RSA8192|PKCS1_OAEP|SHA1|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| |RSA8192|PKCS1_OAEP|SHA224|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| - |RSA8192|PKCS1_OAEP|SHA256|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512 ]| + |RSA8192|PKCS1_OAEP|SHA256|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| |RSA8192|PKCS1_OAEP|SHA384|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| |RSA8192|PKCS1_OAEP|SHA512|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| + |RSA|PKCS1_OAEP|符合长度要求的摘要算法|MGF1_符合长度要求的摘要算法| + + > **说明:** + > + > 1. []内的参数只能任选一项,非[]内的为固定值。 + > 2. 使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成“字符串参数”,用于在创建非对称加解密实例时,指定非对称加解密算法规格。
+ > 例如:"RSA2048|PKCS1_OAEP|SHA256|MGF1_SHA256" + > 3. 在上表最后一行,为了兼容由密钥参数生成的密钥,RSA加解密参数输入密钥类型时支持不带长度,加解密运算取决于实际输入的密钥长度。 + > 4. 输入的数据必须小于RSA钥模 - md摘要长度 - mgf1_md摘要长度 - 2,如RSA密钥为512位时,不支持SHA512,RSA钥模和摘要长度定义,详见[加解密](#加解密)中RSA的相关描述。 + +- 使用PKCS1_OAEP模式时,可以通过获取加解密OAEP填充模式的各个[参数](../reference/apis/js-apis-cryptoFramework.md#cipherspecitem10),并设置OAEP填充的编码输入P。 + + | OAEP参数 |枚举值| 获取 | 设置 | + |---|---|---|---| + |md|OAEP_MD_NAME_STR |√|| + |mgf|OAEP_MGF_NAME_STR|√|| + |mgf1_md|OAEP_MGF1_MD_STR |√|| + |pSource|OAEP_MGF1_PSRC_UINT8ARR|√|√| + + > **说明:** + > + > 上表说明了算法库对于OAEP参数的获取和设置支持情况,打√的表示需要对该参数具有获取或设置的能力。 + +## 签名验签规格 -### 签名验签规格 +### RSA签名验签 -**RSA签名验签** + > **说明:** + > + > 从API version 10开始, 支持RSA签名验签不带密钥长度的规格。 RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 -- 使用PKCS1模式时可以指定的参数: +- 使用PKCS1模式时可以指定的参数: | 非对称密钥类型 | 填充模式 | 摘要 | 字符串参数 | |---|---|---|---| - |RSA512|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384]|RSA512\|PKCS1\| [MD5\|SHA1\|SHA224\|SHA256\|SHA384]| + |RSA512|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384]|RSA512\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384]| |RSA768|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|RSA768\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| |RSA1024|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|RSA1024\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| |RSA2048|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|RSA2048\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| |RSA3072|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|RSA3072\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| |RSA4096|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|RSA4096\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| |RSA8192|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|RSA8192\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |RSA|PKCS1|符合长度要求的摘要算法|RSA\|PKCS1\|符合长度要求的摘要算法| -- 使用PSS模式时可以指定的参数: > **说明:** > - > 1. []内的参数只能任选一项,非[]内的为固定值; - > 2. 使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成字符串。
- > 例如:"RSA2048|PSS|SHA256|MGF1_SHA256" + > 1. []内的参数只能任选一项,非[]内的为固定值。 + > 2. 在上表最后一行,为了兼容由密钥参数生成的密钥,RSA签名验签参数输入密钥类型时支持不带长度,签名验签运算取决于实际输入的密钥长度。 + > 3. RSA签名验签时,摘要算法输出的长度,需要小于RSA的钥模, 如RSA密钥为512位时,不支持SHA512,详见[签名验签](#签名验签)中RSA的相关描述。 + +- 使用PSS模式时可以指定的参数: | 非对称密钥类型 | 填充模式 | 摘要 | 掩码摘要 | |---|---|---|---| @@ -348,41 +571,99 @@ RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 |RSA8192|PSS|SHA224|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| |RSA8192|PSS|SHA256|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| |RSA8192|PSS|SHA384|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| - |RSA8192|PSS|SHA512| [MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| + |RSA8192|PSS|SHA512|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| + |RSA|PSS|符合长度要求的摘要算法|MGF1_符合长度要求的摘要算法| -**ECDSA签名验签** + > **说明:** + > + > 1. []内的参数只能任选一项,非[]内的为固定值。 + > 2. 使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成“字符串参数”,用于在创建非对称签名验签实例时,指定非对称签名验签算法规格。
+ > 例如:"RSA2048|PSS|SHA256|MGF1_SHA256" + > 3. 在上表最后一行,为了兼容由密钥参数生成的密钥,RSA签名验签参数输入密钥类型时支持不带长度,签名验签运算取决于实际输入的密钥长度。 + > 4. RSA签名验签时,对于PSS模式,md和mgf1_md长度之和(字节)需要小于RSA的钥模。如RSA密钥为512位时,无法支持md和mgf1_md同时为SHA256。RSA钥模和摘要长度定义,详见[签名验签](#签名验签)中RSA的相关描述。 + +- 使用PSS模式时,可以通过获取签名验签PSS填充模式的各个[参数](../reference/apis/js-apis-cryptoFramework.md#signspecitem10),并设置PSS的以字节为单位的盐长度(saltLen)。 + | PSS参数 |枚举值| 获取 | 设置 | + |---|---|---|---| + |md|PSS_MD_NAME_STR |√|| + |mgf|PSS_MGF_NAME_STR|√|| + |mgf1_md|PSS_MGF1_MD_STR |√|| + |saltLen|PSS_SALT_LEN_NUM|√|√| + |trailer_field|PSS_TRAILER_FIELD_NUM|√|| + + > **说明:** + > + > 上表说明了算法库对于PSS参数的获取和设置支持情况,打√的表示需要对该参数具有获取或设置的能力。 + +### ECDSA签名验签 + + > **说明**:
+ > 从API version 10开始, 支持ECDSA签名验签不带密钥长度的规格。 - 支持的ECDSA参数: - |非对称密钥算法|支持种类| - |---|---| - |ECC|ECC224| - |ECC|ECC256| - |ECC|ECC384| - |ECC|ECC521| + |非对称密钥类型|摘要|字符串参数| + |---|---|---| + |ECC224|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|ECC224\|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |ECC256|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|ECC256\|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |ECC384|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|ECC384\|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |ECC521|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|ECC521\|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |ECC|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|ECC\|[SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| - |摘要算法|支持种类| - |---|---| - |HASH|SHA1| - |HASH|SHA224| - |HASH|SHA256| - |HASH|SHA384| - |HASH|SHA512| + > **说明:** + > + > 1. []内的参数只能任选一项,非[]内的为固定值。 + > 2. 使用时请从表格中选择非对称密钥类型、摘要二个数据,用|拼接成“字符串参数”,用于在创建非对称签名验签实例时,指定非对称签名验签算法规格。
+ > 例如:"ECC224|SHA256" + > 3. 在上表最后一行,为了兼容由密钥参数生成的密钥,ECDSA签名验签参数输入密钥类型时支持不带长度,签名验签运算取决于实际输入的密钥长度。 -### 密钥协商规格 +### DSA签名验签 -**ECDH** + > **说明:** + > + > 从API version 10开始, 支持DSA签名验签规格。 + +- 支持的DSA参数: + + |非对称密钥类型|摘要|字符串参数| + |---|---|---| + |DSA1024|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|DSA1024\|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |DSA2048|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|DSA2048\|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |DSA3072|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|DSA3072\|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + |DSA|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|DSA\|[NoHash\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| + + > **说明:** + > + > 1. []内的参数只能任选一项,非[]内的为固定值。 + > 2. 使用时请从表格中选择非对称密钥类型、摘要二个数据,用|拼接成“字符串参数”,用于在创建非对称签名验签实例时,指定非对称签名验签算法规格。
+ > 例如:"DSA1024|SHA256" + > 3. 在上表最后一行,为了兼容由密钥参数生成的密钥,DSA签名验签参数输入密钥类型时支持不带长度,签名验签运算取决于实际输入的密钥长度。 + +## 密钥协商规格 + +### ECDH + + > **说明:** + > + > 从API version 10开始, 支持ECDH不带密钥长度的规格。 - 支持的ECDH参数: - |非对称密钥算法|支持种类| + |非对称密钥算法|字符串参数| |---|---| |ECC|ECC224| |ECC|ECC256| |ECC|ECC384| |ECC|ECC521| + |ECC|ECC| + + > **说明:** + > + > 1. “字符串参数”,用于在创建密钥协商时,指定密钥协商算法规格。 + > 2. 在上表最后一行,为了兼容由密钥参数生成的密钥,ECDH密钥协商参数输入密钥类型时支持不带长度,密钥协商运算取决于实际输入的密钥长度。 -### MD消息摘要算法规格 + +## MD消息摘要算法规格 - 加解密算法库框架当前支持的MD算法参数: @@ -395,7 +676,11 @@ RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 |HASH|SHA512| |HASH|MD5| -### HMAC消息认证码算法规格 + > **说明:** + > + > “支持种类”,用于在创建MD消息摘要时,指定MD消息摘要算法规格。 + +## HMAC消息认证码算法规格 - 加解密算法库框架当前支持的HMAC算法参数: @@ -406,3 +691,15 @@ RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 |HASH|SHA256| |HASH|SHA384| |HASH|SHA512| + + > **说明:** + > + > “支持种类”,用于在创建HMAC消息认证码时,指定HMAC消息认证码算法规格。 + +## 随机数 +- 加解密算法库框架支持随机数生成算法,目前只支持“CTR_DRBG"算法规格 + + > **说明:** + > + > 1. 随机数生成算法目前支持生成长度为[1, INT_MAX]的安全随机数,长度单位为byte。 + > 2. 随机数生成算法使用openssl的RAND_priv_bytes接口生成安全随机数。 \ No newline at end of file diff --git a/zh-cn/application-dev/security/huks-guidelines.md b/zh-cn/application-dev/security/huks-guidelines.md index 56e38458699a4873cc12ab959587ae6914bdcd58..a582694477a7f5966f7292f53d1168a6c092bc85 100644 --- a/zh-cn/application-dev/security/huks-guidelines.md +++ b/zh-cn/application-dev/security/huks-guidelines.md @@ -2716,4 +2716,7 @@ async function AttestKeyTest() { 2. Property 'finishSession' does not exist on type 'typeof huks'. Did you mean 'finish'? - 不能在huks库中找到finishSession,finishSession是API9版本的,请更新SDK版本或替换新版本的security.huks.d.ts文件。 \ No newline at end of file + 不能在huks库中找到finishSession,finishSession是API9版本的,请更新SDK版本或替换新版本的security.huks.d.ts文件。 + +## 相关实例 +[通用密钥库系统](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Security/Huks): 本示例使用huks相关接口实现了对任意输入内容进行加密和解密的功能 \ No newline at end of file diff --git a/zh-cn/application-dev/security/permission-list.md b/zh-cn/application-dev/security/permission-list.md index 3cfca5e0e355a0517645d3652737d8c0f83d1609..69a640c5216ab2dabaa498c60488457b7f0ca975 100644 --- a/zh-cn/application-dev/security/permission-list.md +++ b/zh-cn/application-dev/security/permission-list.md @@ -1014,6 +1014,26 @@ **ACL使能**:TRUE +## ohos.permission.ENTERPRISE_INSTALL_BUNDLE + +允许设备管理员安装和卸载包。 + +**权限级别**:system_core + +**授权方式**:system_grant + +**ACL使能**:TRUE + +## ohos.permission.ENTERPRISE_GET_SETTINGS + +允许设备管理员查询“设置”应用数据。 + +**权限级别**:system_basic + +**授权方式**:system_grant + +**ACL使能**:TRUE + ## ohos.permission.NFC_TAG 允许应用读取Tag卡片。 @@ -1976,4 +1996,4 @@ **授权方式**:system_grant -**ACL使能**:TRUE +**ACL使能**:TRUE \ No newline at end of file diff --git a/zh-cn/application-dev/ui/arkts-common-components-progress-indicator.md b/zh-cn/application-dev/ui/arkts-common-components-progress-indicator.md index 70026bd8724058808a26dcbd303ca6a0fdd85367..36a931378204a78587ae80e606723ca479d58396 100644 --- a/zh-cn/application-dev/ui/arkts-common-components-progress-indicator.md +++ b/zh-cn/application-dev/ui/arkts-common-components-progress-indicator.md @@ -48,7 +48,7 @@ Progress有5种可选类型,在创建时通过设置ProgressType枚举类型 - 环形无刻度样式进度条 ```ts - // 从左往右,1号环形进度条,默认前景色为蓝色,默认strokeWidth进度条宽度为2.0vp + // 从左往右,1号环形进度条,默认前景色为蓝色渐变,默认strokeWidth进度条宽度为2.0vp Progress({ value: 40, total: 150, type: ProgressType.Ring }).width(100).height(100) // 从左往右,2号环形进度条 Progress({ value: 40, total: 150, type: ProgressType.Ring }).width(100).height(100) @@ -97,7 +97,7 @@ Progress有5种可选类型,在创建时通过设置ProgressType枚举类型 ```ts Progress({ value: 10, total: 150, type: ProgressType.Capsule }).width(100).height(50) Progress({ value: 20, total: 150, type: ProgressType.Capsule }).width(50).height(100).color(Color.Grey) - Progress({ value: 50, total: 150, type: ProgressType.Capsule }).width(50).height(100).backgroundColor(Color.Black) + Progress({ value: 50, total: 150, type: ProgressType.Capsule }).width(50).height(100).color(Color.Blue).backgroundColor(Color.Black) ``` ![progress_captule](figures/progress_captule.png) @@ -115,8 +115,7 @@ struct ProgressCase1 { build() { Column() { Column() { - Progress({value:0, total:100, type:ProgressType.Capsule}).width(200).height(50) - .style({strokeWidth:50}).value(this.progressValue) + Progress({value:0, total:100, type:ProgressType.Capsule}).width(200).height(50).value(this.progressValue) Row().width('100%').height(5) Button("进度条+5") .onClick(()=>{ diff --git a/zh-cn/application-dev/ui/arkts-drawing-customization-on-canvas.md b/zh-cn/application-dev/ui/arkts-drawing-customization-on-canvas.md index e80a0c2f438821d28758ceb675ad4553c990c939..8b5a4fec310fb92973f81d6fbaf19ec404b97f10 100644 --- a/zh-cn/application-dev/ui/arkts-drawing-customization-on-canvas.md +++ b/zh-cn/application-dev/ui/arkts-drawing-customization-on-canvas.md @@ -89,11 +89,7 @@ Canvas提供画布组件,用于自定义绘制图形,开发者使用CanvasRe import lottie from '@ohos/lottie' ``` - 具体接口参考[Lottie](../reference/arkui-ts/ts-components-canvas-lottie.md),具体实例请参考[Lottie动画](#相关实例)。 - - >**说明:** - > - >在第一次使用Lottie之前,需要在Terminal窗口运行ohpm install \@ohos/lottieETS命令下载Lottie。 + 具体接口请参考[Lottie](https://gitee.com/openharmony-tpc/lottieETS)。 ## 初始化画布组件 diff --git a/zh-cn/application-dev/ui/arkts-graphics-display.md b/zh-cn/application-dev/ui/arkts-graphics-display.md index 44816912f12dbadf3a0fc32add3a512d373fc587..353a6446dd0a04acb19a8bf72c45a98020426448 100644 --- a/zh-cn/application-dev/ui/arkts-graphics-display.md +++ b/zh-cn/application-dev/ui/arkts-graphics-display.md @@ -26,6 +26,7 @@ Image支持加载存档图、多媒体像素图两种类型。 存档图类型的数据源可以分为本地资源、网络资源、Resource资源、媒体库datashare资源和base64。 - 本地资源 + 创建文件夹,将本地图片放入ets文件夹下的任意位置。 Image组件引入本地图片路径,即可显示图片(根目录为ets文件夹)。 @@ -36,6 +37,7 @@ Image支持加载存档图、多媒体像素图两种类型。 ``` - 网络资源 + 引入网络图片需申请权限ohos.permission.INTERNET,具体申请方式请参考[权限申请声明](../security/accesstoken-guidelines.md)。此时,Image组件的src参数为网络图片的链接。 ```ts @@ -43,6 +45,7 @@ Image支持加载存档图、多媒体像素图两种类型。 ``` - Resource资源 + 使用资源格式可以跨包/跨模块引入图片,resources文件夹下的图片都可以通过$r资源接口读 取到并转换到Resource格式。 **图1** resouces   @@ -59,7 +62,7 @@ Image支持加载存档图、多媒体像素图两种类型。 **图2** rawfile   - ![image-rawfile](figures/image-rawfile.jpg) + ![image-rawfile](figures/image-rawfile.jpg) 调用方式: @@ -68,6 +71,7 @@ Image支持加载存档图、多媒体像素图两种类型。 ``` - 媒体库datashare + 支持datashare://路径前缀的字符串,用于访问通过媒体库提供的图片路径。 1. 调用接口获取图库的照片url。 diff --git a/zh-cn/application-dev/ui/figures/progress.gif b/zh-cn/application-dev/ui/figures/progress.gif index a89a731a3413fa7af964b372682120e84b7e5cab..721f1b3e8e39aded24779711e710c8db23359df4 100644 Binary files a/zh-cn/application-dev/ui/figures/progress.gif and b/zh-cn/application-dev/ui/figures/progress.gif differ diff --git a/zh-cn/application-dev/ui/figures/progress_captule.png b/zh-cn/application-dev/ui/figures/progress_captule.png index 83362165297f7ddc073d4eb63a7ad643614a8bab..7d5c35e652f993a02ab9d488339327d795627d41 100644 Binary files a/zh-cn/application-dev/ui/figures/progress_captule.png and b/zh-cn/application-dev/ui/figures/progress_captule.png differ diff --git a/zh-cn/application-dev/ui/figures/progress_ring.png b/zh-cn/application-dev/ui/figures/progress_ring.png index 4d9555c12ae981f36d118ac93452aaccaf9edf65..06c26c34f1a1319195ca46bbed0f27f7c91117c7 100644 Binary files a/zh-cn/application-dev/ui/figures/progress_ring.png and b/zh-cn/application-dev/ui/figures/progress_ring.png differ diff --git a/zh-cn/application-dev/web/web-in-page-app-function-invoking.md b/zh-cn/application-dev/web/web-in-page-app-function-invoking.md index caffe3d2cc2a18efae36fd67650113202e5e4d2d..9b7fdaeab713bf68fede9bc49800508f30cf9e5e 100644 --- a/zh-cn/application-dev/web/web-in-page-app-function-invoking.md +++ b/zh-cn/application-dev/web/web-in-page-app-function-invoking.md @@ -92,7 +92,7 @@ > 使用[registerJavaScriptProxy()](../reference/apis/js-apis-webview.md#registerjavascriptproxy)接口注册方法时,注册后需调用[refresh()](../reference/apis/js-apis-webview.md#refresh)接口生效。 -- index.htm前端页面触发应用侧代码。 +- index.html前端页面触发应用侧代码。 ```html diff --git a/zh-cn/application-dev/website.md b/zh-cn/application-dev/website.md index 49661f285533640a304562a7f8331fb55d16b2ba..fe50393cfc6e8066e16301d05e85efaf5929b9f7 100644 --- a/zh-cn/application-dev/website.md +++ b/zh-cn/application-dev/website.md @@ -654,7 +654,6 @@ - [常见问题](key-features/multi-device-app-dev/faq.md) - [IDL工具规格及使用说明书](IDL/idl-guidelines.md) - Native API相关指导 - - [Native API介绍](napi/introduction.md) - [Native API在应用工程中的使用指导](napi/napi-guidelines.md) - [Drawing开发指导](napi/drawing-guidelines.md) - [Rawfile开发指导](napi/rawfile-guidelines.md) @@ -714,19 +713,16 @@ - [颜色渐变](reference/arkui-ts/ts-universal-attributes-gradient-color.md) - [Popup控制](reference/arkui-ts/ts-universal-attributes-popup.md) - [Menu控制](reference/arkui-ts/ts-universal-attributes-menu.md) - - [点击控制](reference/arkui-ts/ts-universal-attributes-click.md) - [焦点控制](reference/arkui-ts/ts-universal-attributes-focus.md) - [悬浮态效果](reference/arkui-ts/ts-universal-attributes-hover-effect.md) - [组件标识](reference/arkui-ts/ts-universal-attributes-component-id.md) - - [触摸热区设置](reference/arkui-ts/ts-universal-attributes-touch-target.md) - [多态样式](reference/arkui-ts/ts-universal-attributes-polymorphic-style.md) - - [触摸测试控制](reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md) - - [组件背景模糊](reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md) - [分布式迁移标识](reference/arkui-ts/ts-universal-attributes-restoreId.md) - [前景色设置](reference/arkui-ts/ts-universal-attributes-foreground-color.md) - - [图像球面效果](reference/arkui-ts/ts-universal-attributes-sphericalEffect.md) - - [图像渐亮效果](reference/arkui-ts/ts-universal-attributes-lightUpEffect.md) - - [图像边缘像素扩展效果](reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md) + - 触摸交互控制 + - [点击控制](reference/arkui-ts/ts-universal-attributes-click.md) + - [触摸热区设置](reference/arkui-ts/ts-universal-attributes-touch-target.md) + - [触摸测试控制](reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md) - 模态转场设置 - [全屏模态转场](reference/arkui-ts/ts-universal-attributes-modal-transition.md) - [半模态转场](reference/arkui-ts/ts-universal-attributes-sheet-transition.md) @@ -837,7 +833,6 @@ - [Matrix2D](reference/arkui-ts/ts-components-canvas-matrix2d.md) - [OffscreenCanvasRenderingContext2D对象](reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md) - [Path2D对象](reference/arkui-ts/ts-components-canvas-path2d.md) - - [Lottie](reference/arkui-ts/ts-components-canvas-lottie.md) - 动画 - [属性动画](reference/arkui-ts/ts-animatorproperty.md) - [显式动画](reference/arkui-ts/ts-explicit-animation.md) @@ -1149,6 +1144,8 @@ - continuation - [continuationExtraParams](reference/apis/js-apis-continuation-continuationExtraParams.md) - [continuationResult](reference/apis/js-apis-continuation-continuationResult.md) + - AI + - [@ohos.ai.mindSporeLite (推理能力)](reference/apis/js-apis-mindSporeLite.md) - 公共事件与通知 - [系统公共事件定义](reference/apis/commonEventManager-definitions.md) - [@ohos.commonEventManager (公共事件模块)(推荐)](reference/apis/js-apis-commonEventManager.md) @@ -1219,6 +1216,7 @@ - [@ohos.animator (动画)](reference/apis/js-apis-animator.md) - [@ohos.arkui.componentSnapshot (组件截图)](reference/apis/js-apis-arkui-componentSnapshot.md) - [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](reference/apis/js-apis-arkui-drawableDescriptor.md) + - [@ohos.arkui.UIContext (UIContext)](reference/apis/js-apis-arkui-UIContext.md) - [@ohos.curves (插值计算)](reference/apis/js-apis-curve.md) - [@ohos.font (注册自定义字体)](reference/apis/js-apis-font.md) - [@ohos.matrix4 (矩阵变换)](reference/apis/js-apis-matrix4.md) @@ -1272,6 +1270,8 @@ - [@ohos.userIAM.userAuth (用户认证)](reference/apis/js-apis-useriam-userauth.md) - security - [PermissionRequestResult](reference/apis/js-apis-permissionrequestresult.md) + - AI + - [使用MindSpore Lite引擎进行模型推理](ai/mindspore-lite-js-guidelines.md) - 数据管理 - [@ohos.data.cloudData (端云协同)](reference/apis/js-apis-data-cloudData.md) - [@ohos.data.dataAbility (DataAbility谓词)](reference/apis/js-apis-data-ability.md) diff --git a/zh-cn/contribute/OpenHarmony-hdf-coding-guide.md b/zh-cn/contribute/OpenHarmony-hdf-coding-guide.md index 1e41a3fc45774e9c6ee93d68e1d7706de932561b..453bc6052e742125b1ca7a1063c7533a6c046cc8 100755 --- a/zh-cn/contribute/OpenHarmony-hdf-coding-guide.md +++ b/zh-cn/contribute/OpenHarmony-hdf-coding-guide.md @@ -190,7 +190,7 @@ root { 【说明】HDF框架将一类设备驱动放在同一个Host里面,开发者也可以将Host中的驱动功能分层独立开发和部署,支持一个驱动多个Node,HDF驱动模型如下图所示: -![HDF驱动模型.png](../device-dev/driver/figures/HDF驱动模型.png) +![HDF驱动模型.png](figures/HDF驱动模型.png) 开发者应当将同一类的设备放在同一个Host里面,在新增设备时,检查是否已经存在同类型的Host。如果已存在Host,则将Device配置在此Host中,禁止重复配置Host。一个驱动设备应该只属于一类驱动类型,因此也禁止将同一个Device配置在不同Host当中。 diff --git "a/zh-cn/contribute/figures/HDF\351\251\261\345\212\250\346\250\241\345\236\213.png" "b/zh-cn/contribute/figures/HDF\351\251\261\345\212\250\346\250\241\345\236\213.png" new file mode 100644 index 0000000000000000000000000000000000000000..f2a5855dfeea0eaa8e4db38323b25858ef6a1e09 Binary files /dev/null and "b/zh-cn/contribute/figures/HDF\351\251\261\345\212\250\346\250\241\345\236\213.png" differ diff --git a/zh-cn/contribute/style-guide/Readme-CN.md b/zh-cn/contribute/style-guide/Readme-CN.md index 2a80e2a32cde98f8d5e5898765152df9a8d090dc..03b07573ebe8884ead45f77edcbd0e62637fe654 100644 --- a/zh-cn/contribute/style-guide/Readme-CN.md +++ b/zh-cn/contribute/style-guide/Readme-CN.md @@ -4,3 +4,4 @@ - [语言风格](style-guide-language-style.md) - [文档结构](style-guide-document-structure.md) - [内容元素](style-guide-content-elements.md) +- [示例代码风格](style-guide-example-code-style.md) diff --git a/zh-cn/contribute/style-guide/style-guide-content-elements.md b/zh-cn/contribute/style-guide/style-guide-content-elements.md index 6e4df91da149ba948da02bdc58abdcb0630ffc6a..dd70e36be2d3080a9947cfac4e1856b0216a0535 100755 --- a/zh-cn/contribute/style-guide/style-guide-content-elements.md +++ b/zh-cn/contribute/style-guide/style-guide-content-elements.md @@ -81,7 +81,7 @@ ### 绘图 -【规则】绘图中出现的英文单词大小写规则:术语、缩略语、专有名词(如开发板名称、设备名称)遵循[术语与缩略语](#%E6%9C%AF%E8%AF%AD%E5%8F%8A%E7%BC%A9%E7%95%A5%E8%AF%AD)的要求,全文统一大小写;其它英文单词遵循Sentence caps样式,即首个单词首字母大写。 +【规则】绘图中出现的英文单词大小写规则:术语、缩略语、专有名词(如开发板名称、设备名称)遵循[术语及缩略语](#术语及缩略语)的要求,全文统一大小写;其它英文单词遵循Sentence caps样式,即首个单词首字母大写。 【建议】字号:中英文正常字号均采用10.5pt(14px)。中文字号下限为9pt(12px),英文字号下限为8pt(11px)。 @@ -156,16 +156,16 @@ - 链接到其他站点:\[示例]\(www.example.com) - | **正例** | **反例** | - | -------- | -------- | + | **正例** | **反例** | + | ----------------------------------------------------------- | ------------------------------------------------------ | | 请参见\[OpenHarmony开源项目](https://gitee.com/openharmony) | OpenHarmony开源项目请参见https://gitee.com/openharmony | ## 术语及缩略语 -【规则】术语/缩略语名称要同“[OpenHarmony术语表](https://gitee.com/openharmony/docs/blob/master/zh-cn/glossary.md)”保持一致,且全文统一。 +【规则】术语/缩略语名称要同“[OpenHarmony术语表](../../glossary.md)”保持一致,且全文统一。 -【规则】对于“[OpenHarmony术语表](https://gitee.com/openharmony/docs/blob/master/zh-cn/glossary.md)”中未涵盖的行业通用术语/缩略语(如IP,MAC等),要同国际、国家、行业标准中的名称保持一致。 +【规则】对于“[OpenHarmony术语表](../../glossary.md)”中未涵盖的行业通用术语/缩略语(如IP,MAC等),要同国际、国家、行业标准中的名称保持一致。 【规则】禁止随意缩写英文单词,自创缩略语。 @@ -173,7 +173,7 @@ 【规则】中文文档中,缩略语全称中对应的字母大写。 -【规则】“[OpenHarmony术语表](https://gitee.com/openharmony/docs/blob/master/zh-cn/glossary.md)”中,术语名以“英文全称 (缩略语);中文全称”的形式写作;术语解释直接陈述术语内涵,不需要重复术语名。 +【规则】“[OpenHarmony术语表](../../glossary.md)”中,术语名以“英文全称 (缩略语);中文全称”的形式写作;术语解释直接陈述术语内涵,不需要重复术语名。 | **正例** | **反例** | | ------------------------------------------------------------ | ------------------------------------------------------------ | @@ -315,40 +315,7 @@ ## 代码与注释 - -### 行内代码 - -【规则】对于正文描述中涉及代码的内容,比如实际代码中的方法名、参数名或代码文件名等,使用`包裹显示。 - -| 正例 | 反例 | -| -------- | -------- | -| 在`index.js`文件中实现页面跳转。 | 在index.js文件中实现页面跳转。 | - - -### 代码块 - -【规则】对代码示例、命令行使用代码样式。在Markdown中,使用```呈现代码样式,同时指定语言类型。 - -![代码块示例](figures/code-block-example.png) - -【规则】代码块内容应符合对应语言的通用编程规范。 - -【规则】完整举例中的代码块复制后可直接执行,且执行结果与文档描述一致。 - -【规则】如果代码块中没有标识行号,则不添加行号标识。 - -【规则】代码块显示符合缩进要求。 - -【建议】代码块中的关键代码段提供注释说明。 - - -### 注释 - -【规则】适时为代码块添加注释,特别是有解释说明、开发建议或注意事项的位置。恰当的注释可有效提升代码块可读性,帮助开发者快速掌握开发过程。 - -【规则】注释符与代码块语法保持一致,禁止自创注释符。注释符与注释内容间统一添加一个空格。例如:对于JavaScript代码块,注释写法为“// 注释内容”。 - -【规则】当一行注释内容过长时,注意断句切分到下一行呈现。 +请参见[示例代码风格](style-guide-example-code-style.md)。 ## IP及MAC地址 diff --git a/zh-cn/contribute/style-guide/style-guide-example-code-style.md b/zh-cn/contribute/style-guide/style-guide-example-code-style.md new file mode 100644 index 0000000000000000000000000000000000000000..1a94ee4512c425b7e07fc192396362126e9354f6 --- /dev/null +++ b/zh-cn/contribute/style-guide/style-guide-example-code-style.md @@ -0,0 +1,530 @@ +# 示例代码风格 +本规范适用于文档中ArkTS、JavaScript和C/C++等编程语言的示例代码片段,旨在提高OpenHarmony文档示例代码的可读性、可维护性,以及风格一致性。 + +## 代码规范 + +### 【规则】遵守基本编程规范 + +【描述】 + +文档的示例代码需要遵循[JavaScript语言编程规范](../OpenHarmony-JavaScript-coding-style-guide.md)、[C语言编程规范](../OpenHarmony-c-coding-style-guide.md)和[C++语言编程规范](../OpenHarmony-cpp-coding-style-guide.md)基本的编码规范,包括命名规范、代码格式和代码规范等。 + +### 【规则】每个接口(包括方法和组件)均需要提供示例代码 + +【描述】 + +API参考中,每个接口(包括方法和组件)均需要提供示例代码。如果多个API存在关联关系,则需要在一个场景化的代码示例中体现。 + +### 【规则】示例代码中的变量需要包含定义、使用方法或者来源链接参考或者说明 + +【描述】 + +示例代码中的变量需要包含定义、使用方法或者来源链接参考或者说明,以确保开发者能够理解如何使用。例如,如果涉及到应用开发路径,需要提供获取应用开发路径的链接参考或方法。 + +【正例】 + +示例中的context的获取方式请参见[获取UIAbility的上下文信息](../../application-dev/application-models/uiability-usage.md#获取uiability的上下文信息)。 + +```ts +let context = ...; // UIAbilityContext +let want = { + deviceId: '', // deviceId为空表示本设备 + bundleName: 'com.example.myapplication', + abilityName: 'FuncAbility', + moduleName: 'func', // moduleName非必选 + parameters: { // 自定义信息 + info: '来自EntryAbility Index页面', + }, +} +// context为调用方UIAbility的UIAbilityContext +context.startAbilityForResult(want).then((data) => { + ... +}).catch((err) => { + console.error(`Failed to start ability for result. Code is ${err.code}, message is ${err.message}`); +}) +``` + +【反例】 + +```ts +// 反例1:使用到的context和want变量未进行定义 +// context为调用方UIAbility的UIAbilityContext +context.startAbilityForResult(want).then((data) => { + ... +}).catch((err) => { + console.error(`Failed to start ability for result. Code is ${err.code}, message is ${err.message}`); +}) + +// 反例2:UIAbilityContext的使用来源不止this.context这一种,这里列举出来就会有展示不全的问题 +let context = this.context; // UIAbilityContext +let want = { + deviceId: '', // deviceId为空表示本设备 + bundleName: 'com.example.myapplication', + abilityName: 'FuncAbility', + moduleName: 'func', // moduleName非必选 + parameters: { // 自定义信息 + info: '来自EntryAbility Index页面', + }, +} +// context为调用方UIAbility的UIAbilityContext +context.startAbilityForResult(want).then((data) => { + ... +}).catch((err) => { + console.error(`Failed to start ability for result. Code is ${err.code}, message is ${err.message}`); +}) +``` + +### 【建议】一致的依赖包命名风格 + +【描述】 + +导入的依赖包的命名与其依赖包的命名空间保持一致,以便于维护和理解代码。 + +采用一致的依赖包命名风格还可以方便IDE进行提示导入,提高编码效率。 + +【正例】 + +```ts +import promptAction from '@ohos.promptAction'; +``` + +【反例】 + +```ts +// 包名和其命名空间不一致,不利于维护和理解代码 +import prompt from '@ohos.promptAction'; +``` + +### 【规则】组件宽高等属性不加单位 + +【描述】 + +为了保持代码的一致性和简洁性,在设置组件的宽度、高度等属性时,应该尽量避免添加单位,因为组件的宽度、高度等属性默认以像素为单位。同时,避免添加单位也可以提高代码的可读性和便于维护。 + +【正例】 + +```ts +Image('test.png') + .width(100) + .height(100) + +Text('Hello World') + .fontSize(50) +``` + +【反例】 + +```ts +Image('test.png') + .width('100vp') + .height('100vp') + +Text('Hello World') + .fontSize('50fp') +``` + +## 代码展示 + +### 【规则】行内代码使用`包裹显示 + +【描述】 + +正文描述中涉及代码的内容,比如实际代码中的方法名、参数名或代码文件名等,使用`包裹显示。 + +【正例】 + +在`Index.ets`文件中实现页面跳转。 + +【反例】 + +在Index.ets文件中实现页面跳转。 + +### 【规则】代码示例、命令行使用代码样式进行代码染色 + +【描述】 + +对代码示例、命令行使用代码样式。在Markdown中,使用```呈现代码样式,同时指定语言类型。 + +代码染色是指在编辑器中对代码进行不同颜色的标记,以区分不同语法元素的功能。例如在编辑器中对不同的关键字、变量名、注释等使用不同的颜色进行标记,可以让代码更加易读易懂。 + +![代码块示例](figures/code-block-example.png) + +### 【规则】代码格式化 + +【描述】 + +在将代码示例放入指南之前,使用DevEco Studio中的代码格式化功能对代码进行格式化,以确保代码的一致性和可读性。 + +格式化代码的方法包括缩进、空格、换行等,这些方法可以使代码更易于阅读和理解,提高代码的可维护性和扩展性。 + +【正例】 + +```ts +import UIAbility from '@ohos.app.ability.UIAbility'; +import window from '@ohos.window'; + +export default class EntryAbility extends UIAbility { + onWindowStageCreate(windowStage: window.WindowStage) { + windowStage.loadContent('pages/Index', (err, data) => { + }); + } +} +``` + +【反例】 + +```ts +import UIAbility from '@ohos.app.ability.UIAbility'; +import window from '@ohos.window'; + +export default class EntryAbility extends UIAbility { + onWindowStageCreate(windowStage: window.WindowStage) { + // 代码未格式化 + windowStage.loadContent('pages/Index', (err, data) => { + }); + } +} +``` + +### 【规则】省略代码展示 + +【描述】 + +当需要在文档或代码中展示省略的部分时,使用统一的省略代码格式。省略代码应该简洁明了,避免冗长或混乱的格式。 + +【正例】 + +```ts +// 正例1: +... + +// 正例2: +// To do sthing. +``` + +【反例】 + +```ts +// 反例1: +// ... + +// 反例2: +.... + +// 反例3: +...... +``` + +### 【规则】代码注释展示 + +【描述】 + +示例代码中的关键内容和逻辑需要添加注释来说明,以确保开发者理解代码的作用。 + +适时为代码块添加注释,特别是有解释说明、开发建议或注意事项的位置。恰当的注释可有效提升代码块可读性,帮助开发者快速掌握开发过程。 + +注释符与代码块语法保持一致,禁止自创注释符。注释符与注释内容间统一添加一个空格。例如:对于ArkTS代码块,注释写法为“// 注释内容”。 + +当一行注释内容过长时,注意断句切分到下一行呈现。 + +示例代码中的关键内容和逻辑需要添加注释来说明,以确保开发者理解代码的作用。 + +代码注释应该清晰、简洁、有用,能够方便别人理解代码的含义和作用。注释应该写在代码上方或右方。 + +【正例】 + +```ts +// 正例1: +// 定义生命周期回调对象 +let abilityLifecycleCallback = {}; + +// 正例2: +let abilityLifecycleCallback = {}; // 定义生命周期回调对象 +``` + +【反例】 + +```ts +// 反例1:注释符与注释内容之间没有添加空格 +//定义生命周期回调对象 +let abilityLifecycleCallback = {}; + +// 反例2:注释符与注释内容之间没有添加空格 +let abilityLifecycleCallback = {}; //定义生命周期回调对象 + +// 反例3:注释符与注释内容之间添加了多个空格 +let abilityLifecycleCallback = {}; // 定义生命周期回调对象 +``` + +## 异常处理 + +### 【规则】在可能出现异常的代码段加上异常捕获,并按不同的异常类型进行分支判断 + +【描述】 + +在可能出现异常的代码段加上异常捕获,并按不同的异常类型进行分支判断,针对不同的异常类型需要使用统一的异常分支判断方式。 + +【正例】 + +```ts +// 情形1:err为undefined的场景 +if (err) { + ... +} + +// 情形2:err.code为非0的场景 +if (err.code) { + ... +} +``` + +【反例】 + +```ts +// 反例1: +if (err == null) { + ... +} + +// 反例2: +if (err != null) { + ... +} + +// 反例3: +if (err == undefined) { + ... +} + +// 反例4: +if (err === undefined) { + ... +} + +// 反例5: +if (err !== undefined) { + ... +} +``` + +### 【规则】使用console.error输出异常的详细信息,包含错误码和相关的message信息 + +【描述】 + +当存在异常情况时,统一使用`console.error(...)`方法将异常信息打印到控制台,以便在调试时能够快速发现问题。 + +在异常处理中,应该打印出异常的详细信息以便调试。 + +在打印异常信息时,应该使用模板字符串,并标明异常信息的`code`和`message`参数。 + +【正例】 + +```ts +// 模板: +console.error(`Failed to do sthing. Code: ${err.code}, message: ${err.message}`); + +// 正例: +notificationManager.publish(notificationRequest, (err) => { + if (err) { + // 异常分支打印 + console.error(`Failed to publish notification. Code: ${err.code}, message: ${err.message}`); + return; + } + ... +}); +``` + +【反例】 + +```ts +// 反例1:错误日志使用console.log输出,不足以让开发者在调试时快速找到问题 +notificationManager.publish(notificationRequest, (err) => { + if (err) { + // 异常分支打印 + console.log(`Failed to publish notification. Code: ${err.code}, message: ${err.message}`); + return; + } + ... +}); + +// 反例2:错误日志使用console.info输出,而非console.error,不利于开发者区分日志级别,快速找到问题 +notificationManager.publish(notificationRequest, (err) => { + if (err) { + // 异常分支打印 + console.info(`Failed to publish notification. Code: ${err.code}, message: ${err.message}`); + return; + } + ... +}); + +// 反例3:异常信息缺乏具体的code和message参数,不利于开发者定位和解决问题 +console.error(`Failed to publish notification, err: ${err}`); + +// 反例4:使用单引号而非模板字符串的双引号,导致变量无法解析,输出的日志信息不正确 +console.error('Failed to publish notification, err: ${err}'); + +// 反例5:使用字符串拼接和JSON序列化输出错误信息,不够直观和简洁,会增加日志产生量,不利于快速定位问题 +console.error('Failed to publish notification, err: ' + JSON.stringify(err)); +``` + +## 日志打印 + +### 【规则】正常日志打印使用console.info,以提供程序运行的状态和关键信息 + +【描述】 + +在代码编写过程中,为了更好地记录程序运行过程中的信息,开发者需要使用日志打印,以便于在程序出现异常时进行定位和排查。 + +在正常情况下,使用`console.info(...)`来打印正常日志信息。 + +【正例】 + +```ts +// 模板: +console.info('Succeeded in doing sthing.'); + +// 正例: +notificationManager.publish(notificationRequest, (err) => { + ... + console.info('Succeeded in publishing notification.'); +}); +``` + +【反例】 + +```ts +// 反例1:使用console.log(...)可能会让程序员产生困惑,无法明确该日志信息是正常日志还是错误日志 +notificationManager.publish(notificationRequest, (err) => { + ... + console.log('Succeeded in publishing notification.'); +}); + +// 反例2:使用了console.error(...)而不是console.info(...)来打印正常日志信息。console.error通常用于打印错误信息,而不是正常的日志信息 +notificationManager.publish(notificationRequest, (err) => { + ... + console.error('Succeeded in publishing notification.'); +}); +``` + +### 【规则】正常成功日志打印使用succeeded,以表示程序执行成功的结果 + +【描述】 + +在日志打印中使用一致的语言,例如成功日志可以使用`succeeded`来表达。 + +【正例】 + +```ts +// 模板: +console.info('Succeeded in doing sthing.'); + +// 正例: +notificationManager.publish(notificationRequest, (err) => { + ... + console.info('Succeeded in publishing.'); +}); +``` + +【反例】 + +```ts +// 反例1: +notificationManager.publish(notificationRequest, (err) => { + ... + console.info('Invoke publish success.'); +}); + +// 反例2: +notificationManager.publish(notificationRequest, (err) => { + ... + console.info('Invoke publish successful.'); +}); + +// 反例3: +notificationManager.publish(notificationRequest, (err) => { + ... + console.info('Invoke publish successfully.'); +}); +``` + +## 代码逻辑 + +### 【规则】回调方法中使用箭头函数替代常规函数 + +【描述】 + +在使用回调方法时,应该尽可能使用箭头方法代替常规方法,箭头方法的一个主要优点是可以避免 `this` 指向问题。在箭头方法中,`this` 绑定的是它所处的上下文的 `this` 值,而不是方法被调用时的 `this` 值。这样可以避免在使用常规方法时需要使用 `bind()` 或 `call()` 来绑定 `this` 的问题,从而简化代码并提高可读性。 + +【正例】 + +```ts +notificationManager.publish(notificationRequest, (err) => { + ... + console.info('Invoke publish succeeded.'); +}); +``` + +【反例】 + +```ts +notificationManager.publish(notificationRequest, function (err) { + ... + console.info('Invoke publish succeeded.'); +}); +``` + +### 【规则】禁止使用废弃接口 + +【描述】 + +禁止使用废弃接口,因为他们可能会在未来的版本中被删除或更改。使用最新的接口可以确保代码的稳定性和可维护性。 + +使用废弃接口可能导致代码不稳定,也可能会因为该接口在后续版本的更新中被废弃而引发编译错误、运行错误等问题。 + +如果在后续的版本中废除了某些接口,所有依赖这些接口的示例代码都需要同步适配修改。 + +【正例】 + +```ts +import fs from '@ohos.file.fs'; + +function createFile() { + // 获取应用文件路径 + let context = ...; // UIAbilityContext + let filesDir = context.filesDir; + + // 新建并打开文件 + let file = fs.openSync(filesDir + '/test.txt', fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); + // 写入一段内容至文件 + let writeLen = fs.writeSync(file.fd, 'Try to write str.'); + // 从文件读取一段内容 + let buf = new ArrayBuffer(1024); + let readLen = fs.readSync(file.fd, buf, { offset: 0 }); + // 关闭文件 + fs.closeSync(file); +} +``` + +【反例】 + +```ts +// 使用了废弃的fileio接口,而不是推荐的fs接口 +import fileio from '@ohos.fileio'; + +function createFile() { + // 获取应用文件路径 + let context = ...; // UIAbilityContext + let filesDir = context.filesDir; + + // 新建并打开文件 + let fileFD = fileio.openSync(filesDir + '/test.txt', 0o102, 0o640); + // 写入一段内容至文件 + let writeLen = fileio.writeSync(fileFD, 'Try to write str.'); + // 从文件读取一段内容 + let buf = new ArrayBuffer(1024); + let readLen = fileio.readSync(fileFD, buf, { offset: 0 }); + // 关闭文件 + fileio.closeSync(fileFD); +} +``` + diff --git a/zh-cn/device-dev/device-test/figures/smartperf_frame.png b/zh-cn/device-dev/device-test/figures/smartperf_frame.png new file mode 100644 index 0000000000000000000000000000000000000000..ec6d22ff82fcfcb4750a27a00322161bb6693e6f Binary files /dev/null and b/zh-cn/device-dev/device-test/figures/smartperf_frame.png differ diff --git a/zh-cn/device-dev/device-test/smartperf-host.md b/zh-cn/device-dev/device-test/smartperf-host.md new file mode 100644 index 0000000000000000000000000000000000000000..0c02f2bb41a6ce9b96f77c79a6584ec669a813ee --- /dev/null +++ b/zh-cn/device-dev/device-test/smartperf-host.md @@ -0,0 +1,82 @@ +# Smartperf-Host +## 简介 +Smartperf-Host是一款深入挖掘数据、细粒度地展示数据的性能功耗调优工具,旨在为开发者提供一套性能调优平台,支持对CPU调度、频点、进程线程时间片、堆内存、帧率等数据进行采集和展示,展示方式为泳道图,支持GUI(图形用户界面)操作进行详细数据分析。 +## 架构图 +![系统架构图](figures/smartperf_frame.png) +该组件整体分为设备端和PC端两部分,设备端和PC端基于gRPC(Remote Procedure Call)通信框架进行数据交互。 + +设备端内部分为应用程序内嵌组件、命令行工具、性能调优服务、性能调优插件集合、部分系统工具及部分系统内核等模块。设备端提供了插件扩展能力,对外提供了插件接口,基于该扩展能力可以按需定义自己的能力,并集成到框架中来,目前基于插件能力已经完成了native内存插件、trace插件等,详细介绍见[性能调优组件](https://gitee.com/openharmony/developtools_profiler)。 + +PC端以Smartperf-Host网站的形式进行发布,内部分为Trace Streamer数据解析、SQLite数据存储、hdc设备管理、数据导入、UI绘制、数据分析等模块。下文会重点对Smartperf-Host提供的各项能力进行介绍。 +## 项目目录 +``` +/smartperf_host +├── host # Smartperf-Host 相关代码 +│ ├── doc # Smartperf-Host 相关使用文档 +│ ├── ide # Smartperf-Host IDE 模块目录 +│ │ └── src # 主机测调优模块代码 +│ │ │ ├── base-ui # 基础组件目录 +│ │ │ └── Trace # 业务逻辑目录 +│ ├── trace_streamer # 解析模块代码目录 +│ │ ├── base # 基础功能 +│ │ ├── cfg # 配置目录 +│ │ ├── filter # Filter 功能 +│ │ ├── include # Include 头文件 +│ │ ├── multi_platform # 平台适配 +│ │ ├── parser # 解析业务逻辑 +│ │ │ ├── bytrace_parser # byTrace 解析业务逻辑 +│ │ │ └── htrace_parser # hTrace 解析业务逻辑 +│ │ ├── table # 表结构 +│ │ ├── trace_data # trace 结构 +│ │ ├── trace_streamer # traceStreamer 结构 +│ │ │ └── kits # js/napi 接口存放目录 +``` +## 功能介绍 +- 网页加载trace + + 使用Smartperf-Host加载保存在本地的trace文件(htrace、ftrace等)并显示数据到泳道图中,trace数据分析详见《[网页加载trace说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_systemtrace.md)》。 +- 网页抓取trace + + 使用Smartperf-Host在线抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[网页抓取trace说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_web_record.md)》。 +- 设备抓取trace + + 在设备端抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[设备端抓取trace说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_device_record.md)》。 +- Ability Monitor抓取 + + 使用Smartperf-Host抓取应用的CPU、内存、磁盘IO和网络的使用情况,详见《[Ability Monitor抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_ability_monitor.md)》。 +- Native Memory抓取 + + 使用Smartperf-Host抓取应用的Native Memory(C和C++部分)的分配和释放情况,详见《[Native Memory抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_native_memory.md)》。 +- Hiperf抓取 + + 使用Smartperf-Host抓取应用的cpu使用量、方法的调用栈等,详见《[HiPerf的抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_hiperf.md)》。 +- HiSystemEvent抓取 + + 使用Smartperf-Host抓取应用的各个子类别功耗占比(CPU、网络、定位等)、应用的资源申请使用记录(WorkScheduler、Runninglock、Alarm、Location Request)、应用功耗异常事件显示、功耗关联系统状态显示(电池电量、屏幕状态),详见《[HiSystemEvent的抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_hisystemevent.md)》。 +- FileSystem抓取 + + 使用Smartperf-Host抓取所有文件系统系统调用信息、读写调用次数等,详见《[FileSystem的抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_filesystem.md)》。 +- 页内存抓取 + + 使用Smartperf-Host抓取页内存相关事件的开始时间、持续时间、触发进程、触发线程、事件类型、内存地址、内存大小等,详见《[页内存的抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_page_fault.md)》。 +- Bio抓取 + + 使用Smartperf-Host抓取每次IO访问的起始时间、总延迟、进程、每4k数据的平均延迟、线程、操作(写数据、页面换入、Metadata)、访问量、路径等、Block number、优先级、Backtrace调用栈,详见《[Bio的抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_bio.md)》。 +- 进程Smaps抓取 + + 使用Smartperf-Host抓取单个进程的smaps数据(类别、Pss、Rss、Vss等),数据源为/proc/$pid/smaps,详见《[进程smaps的抓取和展示说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_smaps.md)》。 +- Sql分析和Metrics说明 + + Smartperf-Host网站trace解析完成后在线数据库使用说明,详见《[Sql分析和Metrics说明](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/src/doc/md/quickstart_sql_metrics.md)》。 +## 编译指南 +项目编译主要包括两部分,Trace Streamer编译和Smartperf-Host编译部署。 +### 构建约束 +- C++ 11版本或以上 +- node 16.15.1版本或以上 +- npm 8.13.2版本或以上 +- TypeScript 4.2.3版本或以上 +- golang 版本 1.13.8版本或以上 +### Trace Streamer编译 +搭建Smartperf-Host网站需要编译出trace_streamer的wasm版本供网页端进行原始trace数据解析工作,具体的编译过程参考《[如何独立编译Trace Streamer](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/trace_streamer/doc/compile_trace_streamer.md)》。 +### Smartperf-Host编译部署 +具体的编译部署过程参考《[SmartPerf 编译部署指导](https://gitee.com/openharmony-sig/developtools_smartperf_host/blob/master/ide/README_zh.md)》,部署成功后通过浏览器访问页面 https://[部署机器ip地址]:9000/application/ 即可使用Smartperf-Host的全部功能。 diff --git a/zh-cn/device-dev/driver/driver-peripherals-audio-des.md b/zh-cn/device-dev/driver/driver-peripherals-audio-des.md index 2064f488edf867155b4eb9718ed1d01aef03ca9b..b3ef6347a87331b81460c0c62694e323a40d551e 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-audio-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-audio-des.md @@ -1171,7 +1171,7 @@ obj-$(CONFIG_DRIVERS_HDF_AUDIO_HI3516CODEC) += \ soc/src/hi3516_dma_adapter.o ``` -小型系统(liteOS):drivers/adapter/khdf/liteos/model/audio/Makefile +小型系统(liteOS):drivers/hdf_core/adapter/khdf/liteos/model/audio/Makefile ```makefile LOCAL_SRCS += \ @@ -1272,54 +1272,58 @@ HAL(Hardware Abstraction Layer)的核心功能说明如下: 1. 提供Audio HDI接口供北向音频服务调用,实现音频服务的基本功能。 2. 作为标准南向接口,保证南向OEM产商实现HDI-adapter的规范性,保证生态良性演进。 -代码路径:drivers/peripheral/audio/hal +代码路径:drivers_interface/audio/v1_0 ### HAL模块使用步骤 ![](figures/HAL流程图.png) -1. 使用入口函数GetAudioManagerFuncs()获取函数方法。 +1. 使用入口函数IAudioManagerGet()获取函数方法。 -2. 获取所支持的声卡信息GetAllAdapters(),加载对应的声卡LoadAdapter()。 +2. 使用GetAllAdapters()获取所支持的声卡信息,调用LoadAdapter()加载对应的声卡。 3. 创建播放类CreateRender()或者录音类,下发音频文件音频相关属性。 -4. 调用创建好的播放类中挂载的方法调用render->control.Start()、render->RenderFrame()进行下发开始命令,音频数据循环下发。 +4. 调用创建好的播放类中挂载的方法,例如开始播放时调用render->Start(),音频数据循环下发时调用render->RenderFrame()。 -5. 播放过程中可调用其他控制命令对播放业务进行控制操作,例如调节音量、暂停、静音等render->control.Pause()、render->control.Resume()、render->volume.SetVolume()。 +5. 播放过程中可调用其他控制命令对播放业务进行控制操作,例如调节音量render->SetVolume()、暂停render->Pause()、恢复render->Resume()等。 -6. 播放业务完成后,下发停止命令、销毁播放类、卸载声卡。 +6. 播放业务完成后,下发停止命令render->Stop()、销毁播放类adapter->DestroyRender()、卸载声卡audioManagerIns->UnloadAdapter()。 - 1. render->control.Stop(); - - 2. adapter->DestroyRender(); - - 3. manager->UnloadAdapter(); - -### HAL使用实例 +### HAL使用示例 ```c #include #include -#include "audio_types.h" #include -#include "audio_manager.h" - - /* so动态库引用打开 */ -char *soPathHdi = "/system/lib/libhdi_audio.z.so"; -void *g_handle = dlopen(soPathHdi , 1); - -int32_t FrameStart(void *param) +#include "v1_0/audio_types.h" +#include "v1_0/iaudio_manager.h" + +struct IAudioRender *g_render = NULL; +struct IAudioAdapter *g_adapter = NULL; +struct AudioDeviceDescriptor g_devDesc; +struct AudioSampleAttributes g_attrs; +struct AudioHeadInfo g_wavHeadInfo; +bool g_isDirect = false; //IPC Loading +uint32_t g_renderId = 0; + +static int32_t FrameStart(const struct StrPara *param) { ... + /* 初始化参数 */ + char *frame = param->frame; + int32_t bufferSize = param->bufferSize; + size_t remainingDataSize = g_wavHeadInfo.riffSize; + /* 循环进行下发音频数据 */ do { - readSize = (remainingDataSize > bufferSize) ? bufferSize : remainingDataSize; + uint64_t replyBytes = 0; + size_t readSize = (remainingDataSize > bufferSize) ? (size_t)bufferSize : remainingDataSize; numRead = fread(frame, 1, readSize, g_file); if (numRead > 0) { - ret = render->RenderFrame(render, frame, numRead, &replyBytes); + int32_t ret = render->RenderFrame(render, (int8_t *)frame, numRead, &replyBytes); if (ret == HDF_ERR_INVALID_OBJECT) { - LOG_FUN_ERR("Render already stop!"); + AUDIO_FUNC_LOGE("Render already stop!"); break; } remainingDataSize -= numRead; @@ -1336,49 +1340,52 @@ int32_t FrameStart(void *param) static void *hal_main() { - /* 映射入口函数及调用 */ - struct AudioManager *(*getAudioManager)() = - (struct AudioManager *(*)())(dlsym(g_handle, "GetAudioManagerFuncs")); - struct AudioManager *manager = getAudioManager(); + int32_t adapterIndex = 0; + struct AudioPort *renderPort; + + /* 通过IAudioManagerGet()获取入口函数 */ + struct IAudioManager *audioManagerIns = IAudioManagerGet(g_isDirect); + if (audioManagerIns == NULL) { + AUDIO_FUNC_LOGE("Get Audio Manager Fail"); + return HDF_FAILURE; + } /* 获取声卡列表 */ - struct AudioAdapterDescriptor *descs = NULL; - int32_t size = 0; - int32_t ret = manager->GetAllAdapters(manager, &descs, &size); + struct AudioAdapterDescriptor *descs = (struct AudioAdapterDescriptor *)OsalMemCalloc( + sizeof(struct AudioAdapterDescriptor) * (MAX_AUDIO_ADAPTER_DESC)); + uint32_t adapterNum = MAX_AUDIO_ADAPTER_DESC; + + int32_t ret = audioManagerIns->GetAllAdapters(audioManagerIns, descs, &adapterNum); /* 根据用户指定的声卡名称和端口描述进行匹配声卡及端口 */ - enum AudioPortDirection port = PORT_OUT; // 端口类型为OUT,放音 - struct AudioPort renderPort; - char * adapterNameCase = "primary"; - int32_t index = SwitchAdapter(descs, adapterNameCase, port, &renderPort, size); + SelectAudioCard(descs, adapterNum, &adapterIndex); + strcpy_s(g_adapterName, PATH_LEN, descs[adapterIndex - 1].adapterName); + SwitchAudioPort(&descs[adapterIndex - 1], PORT_OUT, renderPort); // 端口类型为OUT,放音 /* 根据匹配到的声卡信息进行加载声卡 */ - struct AudioAdapter *adapter = NULL; - struct AudioAdapterDescriptor *desc = &descs[index]; // 根据匹配到的声卡信息获取对应设备 - manager->LoadAdapter(manager, desc, &adapter); // 加载声卡,获取声卡方法实例 + audioManagerIns->LoadAdapter(audioManagerIns, &descs[adapterIndex - 1], &g_adapter); // 加载声卡,获取声卡方法实例 /* 创建播放类 */ - struct AudioRender *render; - struct AudioDeviceDescriptor devDesc; - struct AudioSampleAttributes attrs; - InitDevDesc(&devDesc, renderPort.portId); // 初始化设置设备参数 - WavHeadAnalysis(g_file, &attrs); // 解析音频文件设置Attributes - adapter->CreateRender(adapter, &devDesc, &attrs, &render); + uint32_t portId = renderPort->portId; + InitDevDesc(&g_devDesc, portId); // 初始化设置设备参数 + InitAttrs(&g_attrs); // 初始化音频属性参数 + CheckWavFileHeader(g_file, &g_wavHeadInfo, &g_attrs); // 解析音频文件及设置Attributes + g_adapter->CreateRender(g_adapter, &g_devDesc, &g_attrs, &g_render, &g_renderId); /* 下发音频数播放 */ - render->control.Start((AudioHandle)render); // 下发控制命令start,准备动作 - pthread_create(&g_tids, NULL, (void *)(&FrameStart), &g_str); // 拉起线程进行播放 + g_render->Start((void *)g_render); // 下发控制命令start,准备动作 + pthread_create(&g_tids, &tidsAttr, (void *)(&FrameStart), &g_str); // 拉起线程进行播放 /* 控制命令 */ - render->control.Pause((AudioHandle)render); // 下发暂停操作 - render->control.Resume((AudioHandle)render); // 下发恢复操作 - render->volume.SetVolume((AudioHandle)render, 0.5); // 设置音量 + g_render->Pause((void *)g_render); // 下发暂停操作 + g_render->Resume((void *)g_render); // 下发恢复操作 + g_render->SetVolume((void *)g_render, 0.5); // 设置音量 /* 停止播放,销毁播放类 */ - render->control.Stop((AudioHandle)render); - adapter->DestroyRender(adapter, render); + g_render->Stop((void *)g_render); + g_adapter->DestroyRender(g_adapter, g_renderId); /* 卸载声卡 */ - manager->UnloadAdapter(manager, adapter); + audioManagerIns->UnloadAdapter(audioManagerIns, g_adapterName); } ``` diff --git a/zh-cn/device-dev/driver/driver-peripherals-external-des.md b/zh-cn/device-dev/driver/driver-peripherals-external-des.md index 889e18cfc090b7ac8dbba21e629d27cc5dcab2c3..85a3bee60e9fa16bde052b37058b0690c4e60920 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-external-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-external-des.md @@ -5,65 +5,71 @@ ### 功能简介 -WLAN(Wireless Local Area Network)作为网络设备的一个重要特性,其驱动的开发也是设备开发过程中不可忽略的一部分。 -在OpenHarmony架构中,基于HDF(Hardware Driver Foundation)驱动框架开发的WLAN驱动模块,具备跨操作系统迁移、自适应器件差异、模块化拼装编译等特性。 +无线局域网数据传输是端侧设备不可或缺的一部分,用户可以方便地接入到无线网络进行数据传输和共享,并且在无线网络覆盖区域自由移动,彻底摆脱有线的束缚。基于HDF(Hardware Driver Foundation)驱动框架开发的WLAN驱动,能够屏蔽硬件器件差异,为上层WLAN服务提供稳定的基础能力接口,包括启动扫描、关联/取消关联热点、获取MAC地址、设置MAC地址、获取链路信息等。 -### 运作机制 - -各WLAN设备厂商的驱动开发人员可根据WLAN模块提供的向下、向上的统一接口适配各自的驱动代码: - -- 向下统一接口实现的能力包括:建立/关闭WLAN热点、扫描、关联WLAN热点等。 -- 对HDI层向上提供能力包括:设置MAC地址、设置发射功率、获取设备的MAC地址等。 - -WLAN框架如图1所示,其中WLAN Driver模块主要提供启动加载、配置文件解析、提供总线抽象接口等能力,WLAN Chip Driver模块主要提供MAC子层管理实体等。 - - **图1** WLAN框架 - - ![image](figures/WLAN框架.png "WLAN框架") - - WLAN Driver框架如图2所示。 +### 基本概念 - **图2** WLAN Driver框架 +开发前,开发者应了解一下WLAN涉及的基本概念: - ![zh-cn_image_0000001300092359](figures/zh-cn_image_0000001300092359.png) +- AP + + 无线接入点(Access Point,简称AP),是网络的中心节点,提供无线接入服务。其它无线设备接入后,可以进行数据访问。 -WLAN Driver框架主要由如下模块组成: +- STA + + 站点(Station,简称STA),是无线局域网的最基本组成单元。每一个连接到无线网络中的终端(如笔记本电脑、PDA及其它可以联网的用户设备)都可称为一个站点。 -1. WLAN Message:该部件为每个服务单独提供业务接口,每个服务也可依赖其他服务形成组合业务接口,此模块支持在用户态、内核态和MCU环境运行,实现部件间的充分解耦。 +- ssid + + 无线网络的名称,用来标识一个无线网络,每个无线网络都有自己的ssid。 -2. WLAN Configuration Core:WLAN相关的配置文件进行解析。 +- bssid + + 用于标识WLAN中的基本服务集,是唯一的48位MAC地址。 + +- Scan -3. AP:AP(Access Point)为WLAN终端提供外部接入入口的设备。 + 终端设备扫描环境中的无线网络,获取到周围的无线网络信息。包括热点名称(ssid)、工作频带和信号强度等。 -4. STA:STA(Station)为接入WLAN系统的终端。 +- Associate -5. Mac80211:定义底层驱动相关的MAC层接口。 + 终端设备指定有效的热点进行连接,成功后即可与AP端数据通信。终端同一时刻只可以和一个AP建立链路。 -6. Bus:该驱动模块向上提供统一的总线抽象接口。通过向下调用Platform层提供的SDIO接口和封装适配USB、PCIE接口,屏蔽不同内核的差异;通过对不同类型的总线操作进行统一封装,屏蔽不同芯片差异,能够对不同芯片厂商提供完备的总线驱动能力,不同厂商共用此模块接口,从而使厂商的开发更为便捷和统一。 - -7. NetDevice:用于建立专属网络设备,屏蔽不同OS的差异,对WiFi驱动提供统一接口,提供统一的HDF NetDevice数据结构,及其统一管理、注册、去注册能力;对接轻设备及富设备上的Linux的网络设备层。 - -8. NetBuf:该部件为WLAN驱动提供Linux或者LiteOS原生的网络数据缓冲的统一数据结构的封装以及对网络数据的操作接口的封装。 +### 运作机制 -9. FlowCtl:流控模块,当数据量过大时按照优先级策略处理数据。 +本文主要介绍基于HDF(Hardware Driver Foundation)驱动框架开发的WLAN功能。WLAN整体框架: -10. HCC-CFG:WLAN相关参数配置其中包括板级配置、驱动配置、Module配置。 +![image](figures/WLAN驱动接口框架图.png "WLAN框架图") -其中主要模块关系如下: +1. 上层服务基于业务需要调用HDI接口,将用户态消息通过WPA层或HAL层下发至Client层。WPA层接口提供设置加密方式、关联热点、设置信道、隐藏热点等功能,HAL层接口作为WPA接口的补充,提供设置国家码、设置MAC地址、获取信道信息等功能。 + +2. Message模块将用户态的消息按组件分发至AP、STA等模块。 + +3. Hdf_Mac80211定义底层驱动相关的MAC层接口。命令字段下发至Hdf_Mac80211,再通过Bus模块发送到WLAN芯片固件侧。 + +4. Bus模块向上提供统一的总线抽象接口。通过向下调用Platform层提供的SDIO接口和封装适配USB、PCIE接口,屏蔽不同内核的差异;通过对不同类型的总线操作进行统一封装,屏蔽不同芯片差异,能够对不同芯片厂商提供完备的总线驱动能力,不同厂商共用此模块接口,从而使厂商的开发更为便捷和统一。 + +5. EAPOL(Extensible Authentication Protocol Over LAN),基于局域网的扩展认证协议,主要用于在客户端和设备(接入设备、服务器)之间传送EAP协议报文,以允许EAP协议报文在LAN上传送,完成认证流程,实现设备上线功能。 + +6. NetDevice用于建立专属网络设备,屏蔽不同OS的差异,对WiFi驱动提供统一接口,提供统一的HDF NetDevice数据结构,及其统一管理、注册、去注册能力;对接轻设备及富设备上的Linux的网络设备层。 + +7. NetBuf为WLAN驱动提供Linux或者LiteOS原生的网络数据缓冲的统一数据结构的封装以及对网络数据的操作接口的封装。 + +8. 协议栈与NetDevice模块、NetBuf模块共同协同完成数据流交互。 -1. WLAN Driver通过HCC-CFG模块和WLAN Configuration Core模块进行配置文件的解析与加载。 +### 约束与限制 -2. WLAN Message将用户态的消息按组件分发至AP、STA等模块。 +WLAN驱动为上层WLAN服务提供稳定的基础能力接口,HDI接口适用于标准系统,HAL接口适用于小型系统及轻量系统。 -3. 对于命令字段则下发至Mac80211,再通过Bus模块发送到WLAN芯片固件侧。 +## 开发指导 -4. 协议栈与NetDevice模块、NetBuf模块、FlowCtl模块共同协同完成数据流交互。 +### 场景介绍 -## 开发指导 +WLAN驱动的主要工作是为上层WLAN服务提供稳定的基础能力接口,保证用户可以方便地接入到无线网络,实现数据传输和共享。不同WLAN模组需要适配OpenHarmony时,请参考如下的接口说明和开发步骤。 ### 接口说明 -WLAN模块有三部分对外开放的API接口,如下图所示: +WLAN模块有三部分对外开放的API接口: 1. 对上层服务提供HDI以及HAL能力接口。 @@ -71,12 +77,7 @@ WLAN模块有三部分对外开放的API接口,如下图所示: 3. 驱动直接调用WLAN模块能力接口。 - **图3** WLAN驱动接口框架图 - - ![image](figures/WLAN驱动接口框架图.png "WLAN驱动接口框架图") - - -- WLAN驱动模块对上层服务提供的HAL能力接口(适用于小型系统及轻量系统),主要功能有:创建/销毁 IWiFi对象、设置MAC地址等。提供的部分接口说明如表2、表3所示: +- WLAN驱动模块对上层服务提供的能力接口,主要功能有:创建/销毁IWiFi对象、设置MAC地址、设置发射功率等。以下接口列举的为IDL接口描述生成的对应C语言函数接口,如表1、表2所示。接口声明见idl文件(/drivers/interface/wlan/v1_1/)。 **表1** wifi_hal.h @@ -94,9 +95,9 @@ WLAN模块有三部分对外开放的API接口,如下图所示: | int32_t (\*getFeatureType)(const struct IWiFiBaseFeature \*) | 获取特性的类型。 | | int32_t (\*setMacAddress)(const struct IWiFiBaseFeature \*, unsigned char \*, uint8_t) | 设置MAC地址。 | | int32_t (\*getDeviceMacAddress)(const struct IWiFiBaseFeature \*, unsigned char \*, uint8_t) | 获取设备持久化的MAC地址。 | - | int32_t (\*setTxPower)(const struct IWiFiBaseFeature \*, int32_t) | 设置发射功率。 | + | int32_t (\*setTxPower)(const struct IWiFiBaseFeature \*, int32_t) | 设置发射功率。 | -- WLAN驱动模块也提供了需要驱动开发人员自行去填充具体实现内容的能力接口,主要功能有:初始化/注销NetDevice、打开/关闭NetDevice、获取NetDevice的状态等。提供的部分接口说明如表4所示: +- WLAN驱动模块提供了需要驱动开发人员自行去填充具体实现内容的能力接口,主要功能有:初始化/注销NetDevice、打开/关闭NetDevice、获取NetDevice的状态等。提供的部分接口说明如表3所示: **表3** net_device.h @@ -111,7 +112,7 @@ WLAN模块有三部分对外开放的API接口,如下图所示: - WLAN驱动模块提供给驱动开发人员可直接调用的能力接口,主要功能有:创建/释放WifiModule、关联/取消关联、申请/释放NetBuf、lwip的pbuf和NetBuf的相互转换等。 - 可直接调用的接口如表5、表6和表7所示。 + 可直接调用的接口如表4、表5和表6所示。 **表4** wifi_module.h @@ -139,28 +140,13 @@ WLAN模块有三部分对外开放的API接口,如下图所示: | struct NetBuf \*NetBufAlloc(uint32_t size) | 申请NetBuf。 | | void NetBufFree(struct NetBuf \*nb) | 释放NetBuf。 | | struct NetBuf \*Pbuf2NetBuf(const struct NetDevice \*netdev, struct pbuf \*lwipBuf) | lwip的pbuf转换为NetBuf。 | - | struct pbuf \*NetBuf2Pbuf(const struct NetBuf \*nb) | NetBuf转换为lwip的pbuf。 | + | struct pbuf \*NetBuf2Pbuf(const struct NetBuf \*nb) | NetBuf转换为lwip的pbuf。 | ### 开发步骤 -#### 厂商适配WLAN框架 - -WLAN驱动基于HDF框架和Platform框架开发,不区分OS和芯片平台,为不同厂商的WLAN模组提供统一的驱动模型,各WLAN模组厂商根据如下开发流程适配WLAN驱动框架。 - -**开发流程** - -1. 配置硬件(例如module、芯片等)相关的参数。wlan_platform.hcs文件中对参数进行配置后,HDF框架会对该文件进行解析,并生成全量配置的结构体对象。 -2. 初始化和去初始化WLAN模块相关适配(如WLAN芯片初始化和去初始化、WLAN芯片驱动初始化和去初始化)。 +WLAN驱动基于HDF框架和Platform框架开发,不区分OS和芯片平台,为不同厂商的WLAN模组提供统一的驱动模型,各WLAN模组厂商根据如下开发流程适配WLAN驱动框架。示例以Hi3881WLAN芯片为例。 -3. 控制流命令下发的适配。 - -4. 事件上报的调用。 - -**开发实例** - -本例程提供WLAN模块初始化过程的完整使用流程。示例如下(以Hi3881WLAN芯片为例): - -1. Driver的HCS配置。 +#### 配置Driver的HCS文件 HCS文件配置包括:device相关配置和组件配置。 @@ -225,7 +211,8 @@ WLAN驱动基于HDF框架和Platform框架开发,不区分OS和芯片平台, } ``` -2. 驱动适配挂接WLAN芯片的初始化和去初始化、WLAN芯片驱动的初始化和去初始化。 +#### 初始化和去初始化WLAN芯片、WLAN芯片驱动 + - 驱动适配入口函数实现 根据各自的芯片定义一个HdfDriverEntry类型的变量,主要实现Bind、Init、Release接口的函数挂接。调用HDF_INIT将驱动入口注册到HDF框架中,在加载驱动时HDF框架会先调用Bind函数,再调用Init函数加载该驱动。当Init调用异常时,HDF框架会调用Release释放驱动资源。 @@ -280,296 +267,306 @@ WLAN驱动基于HDF框架和Platform框架开发,不区分OS和芯片平台, } ``` - - 芯片的初始化和去初始化 - ```c - /* WLAN芯片的初始化函数 */ - int32_t InitHi3881Chip(struct HdfWlanDevice *device) - { - uint8_t maxPortCount = 3; - int32_t ret = HI_SUCCESS; - uint8_t maxRetryCount = 3; - if (device == NULL || device->bus == NULL) { - HDF_LOGE("%s:NULL ptr!", __func__); - return HI_FAIL; - } - - do { - if (ret != HI_SUCCESS) { - if (device->reset != NULL && device->reset->Reset != NULL) { - device->reset->Reset(device->reset); - } - HDF_LOGE("%s:Retry init hi3881!last ret=%d", __func__, ret); - } - ret = hi_wifi_init(maxPortCount, device->bus); - } while (ret != 0 && --maxRetryCount > 0); - - if (ret != 0) { - HDF_LOGE("%s:Init hi3881 driver failed!", __func__); - return ret; - } - return HI_SUCCESS; - } - - /* WLAN芯片的去初始化函数 */ - int32_t DeinitHi3881Chip(struct HdfWlanDevice *device) - { - (void)device; - int32_t ret = hi_wifi_deinit(); - if (ret != 0) { - HDF_LOGE("%s:Deinit failed!ret=%d", __func__, ret); - } - return ret; - } - ``` - - 芯片驱动的初始化和去初始化 - ```c - /* WLAN芯片驱动挂接以及Mac80211与芯片侧的函数挂接 */ - static struct HdfChipDriver *BuildHi3881Driver(struct HdfWlanDevice *device, uint8_t ifIndex) - { - struct HdfChipDriver *specificDriver = NULL; - if (device == NULL) { - HDF_LOGE("%s fail: channel is NULL!", __func__); - return NULL; - } - (void)ifIndex; - specificDriver = (struct HdfChipDriver *)OsalMemCalloc(sizeof(struct HdfChipDriver)); - if (specificDriver == NULL) { - HDF_LOGE("%s fail: OsalMemCalloc fail!", __func__); - return NULL; - } - if (memset_s(specificDriver, sizeof(struct HdfChipDriver), 0, sizeof(struct HdfChipDriver)) != EOK) { - HDF_LOGE("%s fail: memset_s fail!", __func__); - OsalMemFree(specificDriver); - return NULL; - } - - if (strcpy_s(specificDriver->name, MAX_WIFI_COMPONENT_NAME_LEN, HI3881_DRIVER_NAME) != EOK) { - HDF_LOGE("%s fail: strcpy_s fail!", __func__); - OsalMemFree(specificDriver); - return NULL; - } - specificDriver->init = Hi3881Init; - specificDriver->deinit = Hi3881Deinit; - - HiMac80211Init(specificDriver); - - return specificDriver; - } + 1. 芯片的初始化和去初始化 + + ```c + /* WLAN芯片的初始化函数 */ + int32_t InitHi3881Chip(struct HdfWlanDevice *device) + { + uint8_t maxPortCount = 3; + int32_t ret = HI_SUCCESS; + uint8_t maxRetryCount = 3; + if (device == NULL || device->bus == NULL) { + HDF_LOGE("%s:NULL ptr!", __func__); + return HI_FAIL; + } + + do { + if (ret != HI_SUCCESS) { + if (device->reset != NULL && device->reset->Reset != NULL) { + device->reset->Reset(device->reset); + } + HDF_LOGE("%s:Retry init hi3881!last ret=%d", __func__, ret); + } + ret = hi_wifi_init(maxPortCount, device->bus); + } while (ret != 0 && --maxRetryCount > 0); + + if (ret != 0) { + HDF_LOGE("%s:Init hi3881 driver failed!", __func__); + return ret; + } + return HI_SUCCESS; + } + + /* WLAN芯片的去初始化函数 */ + int32_t DeinitHi3881Chip(struct HdfWlanDevice *device) + { + (void)device; + int32_t ret = hi_wifi_deinit(); + if (ret != 0) { + HDF_LOGE("%s:Deinit failed!ret=%d", __func__, ret); + } + return ret; + } + ``` - /* 释放WLAN芯片驱动 */ - static void ReleaseHi3881Driver(struct HdfChipDriver *chipDriver) - { - if (chipDriver == NULL) { - return; - } - if (strcmp(chipDriver->name, HI3881_DRIVER_NAME) != 0) { - HDF_LOGE("%s:Not my driver!", __func__); - return; - } - OsalMemFree(chipDriver); - } + 2. 芯片驱动的初始化和去初始化 + + ```c + /* WLAN芯片驱动挂接以及Mac80211与芯片侧的函数挂接 */ + static struct HdfChipDriver *BuildHi3881Driver(struct HdfWlanDevice *device, uint8_t ifIndex) + { + struct HdfChipDriver *specificDriver = NULL; + if (device == NULL) { + HDF_LOGE("%s fail: channel is NULL!", __func__); + return NULL; + } + (void)ifIndex; + specificDriver = (struct HdfChipDriver *)OsalMemCalloc(sizeof(struct HdfChipDriver)); + if (specificDriver == NULL) { + HDF_LOGE("%s fail: OsalMemCalloc fail!", __func__); + return NULL; + } + if (memset_s(specificDriver, sizeof(struct HdfChipDriver), 0, sizeof(struct HdfChipDriver)) != EOK) { + HDF_LOGE("%s fail: memset_s fail!", __func__); + OsalMemFree(specificDriver); + return NULL; + } + + if (strcpy_s(specificDriver->name, MAX_WIFI_COMPONENT_NAME_LEN, HI3881_DRIVER_NAME) != EOK) { + HDF_LOGE("%s fail: strcpy_s fail!", __func__); + OsalMemFree(specificDriver); + return NULL; + } + specificDriver->init = Hi3881Init; + specificDriver->deinit = Hi3881Deinit; + + HiMac80211Init(specificDriver); + + return specificDriver; + } + + /* 释放WLAN芯片驱动 */ + static void ReleaseHi3881Driver(struct HdfChipDriver *chipDriver) + { + if (chipDriver == NULL) { + return; + } + if (strcmp(chipDriver->name, HI3881_DRIVER_NAME) != 0) { + HDF_LOGE("%s:Not my driver!", __func__); + return; + } + OsalMemFree(chipDriver); + } + + /* WLAN芯片驱动的初始化函数 */ + int32_t Hi3881Init(struct HdfChipDriver *chipDriver, struct NetDevice *netDevice) + { + hi_u16 mode; + int32_t ret; + nl80211_iftype_uint8 type; + (void)chipDriver; + HDF_LOGI("%s: start...", __func__); + mode = wal_get_vap_mode(); + if (mode >= WAL_WIFI_MODE_BUTT) { + oam_error_log1(0, 0, "wal_init_drv_netdev:: invalid mode[%d]", mode); + return HI_FAIL; + } + if (mode == WAL_WIFI_MODE_STA) { + type = NL80211_IFTYPE_STATION; + #ifdef _PRE_WLAN_FEATURE_P2P + if (InitNetdev(netDevice, NL80211_IFTYPE_P2P_DEVICE) != HI_SUCCESS) { + return HI_FAIL; + } + #endif + } else if (mode == WAL_WIFI_MODE_AP) { + type = NL80211_IFTYPE_AP; + } else { + oam_error_log1(0, 0, "wal_init_drv_netdev:: invalid mode[%d]", mode); + return HI_FAIL; + } + ret = wal_init_drv_wlan_netdev(type, WAL_PHY_MODE_11N, netDevice); + if (ret != HI_SUCCESS) { + oam_error_log2(0, OAM_SF_ANY, "wal_init_drv_netdev %s failed.l_return:%d\n", netDevice->name, ret); + } + return ret; + } + + /* WLAN芯片驱动的去初始化函数 */ + int32_t Hi3881Deinit(struct HdfChipDriver *chipDriver, struct NetDevice *netDevice) + { + int32_t ret; + (void)chipDriver; + ret = DeinitNetdev(NL80211_IFTYPE_P2P_DEVICE); + if (ret != HI_SUCCESS) { + oam_error_log1(0, OAM_SF_ANY, "Hi3881Deinit: DeinitNetdev p2p device fail, ret = %d\n", ret); + return ret; + } + return wal_deinit_drv_wlan_netdev(netDevice); + } - /* WLAN芯片驱动的初始化函数 */ - int32_t Hi3881Init(struct HdfChipDriver *chipDriver, struct NetDevice *netDevice) - { - hi_u16 mode; - int32_t ret; - nl80211_iftype_uint8 type; - (void)chipDriver; - HDF_LOGI("%s: start...", __func__); - mode = wal_get_vap_mode(); - if (mode >= WAL_WIFI_MODE_BUTT) { - oam_error_log1(0, 0, "wal_init_drv_netdev:: invalid mode[%d]", mode); - return HI_FAIL; - } - if (mode == WAL_WIFI_MODE_STA) { - type = NL80211_IFTYPE_STATION; - #ifdef _PRE_WLAN_FEATURE_P2P - if (InitNetdev(netDevice, NL80211_IFTYPE_P2P_DEVICE) != HI_SUCCESS) { - return HI_FAIL; - } - #endif - } else if (mode == WAL_WIFI_MODE_AP) { - type = NL80211_IFTYPE_AP; - } else { - oam_error_log1(0, 0, "wal_init_drv_netdev:: invalid mode[%d]", mode); - return HI_FAIL; - } - ret = wal_init_drv_wlan_netdev(type, WAL_PHY_MODE_11N, netDevice); - if (ret != HI_SUCCESS) { - oam_error_log2(0, OAM_SF_ANY, "wal_init_drv_netdev %s failed.l_return:%d\n", netDevice->name, ret); - } - return ret; - } + ``` - /* WLAN芯片驱动的去初始化函数 */ - int32_t Hi3881Deinit(struct HdfChipDriver *chipDriver, struct NetDevice *netDevice) - { - int32_t ret; - (void)chipDriver; - ret = DeinitNetdev(NL80211_IFTYPE_P2P_DEVICE); - if (ret != HI_SUCCESS) { - oam_error_log1(0, OAM_SF_ANY, "Hi3881Deinit: DeinitNetdev p2p device fail, ret = %d\n", ret); - return ret; - } - return wal_deinit_drv_wlan_netdev(netDevice); - } + 在芯片驱动初始化过程中调用netdev的init和add接口进行初始化netdev,并挂接netdev的一些函数指针。 + + ```c + hi_s32 wal_init_drv_wlan_netdev(nl80211_iftype_uint8 type, wal_phy_mode mode, oal_net_device_stru *netdev) + { + hi_char *ac_mode_str = NULL; + hi_s32 ret; + if (oal_unlikely(netdev == HI_NULL)) { + oam_error_log0(0, OAM_SF_ANY, "{netdev is null!}"); + return HI_ERR_CODE_PTR_NULL; + } + + do { + /* 初始化网络设备。 */ + ret = wal_init_netdev(type, netdev); + if (ret != HI_SUCCESS) { + break; + } + + ret = wal_init_netif(type, netdev); + if (ret != HI_SUCCESS) { + break; + } + ac_mode_str = "11bgn"; + if (mode == WAL_PHY_MODE_11G) { + ac_mode_str = "11bg"; + } else if (mode == WAL_PHY_MODE_11B) { + ac_mode_str = "11b"; + } + + ret = wal_ioctl_set_mode(netdev, ac_mode_str); + } while (false); + + if (ret != HI_SUCCESS) { + wal_deinit_wlan_vap(netdev); + oal_net_unregister_netdev(netdev); + oal_net_clear_netdev(netdev); + return HI_FAIL; + } + + return HI_SUCCESS; + } + + /* 挂接netdev的一些函数指针,详细挂接函数请参考NetDeviceInterFace */ + oal_net_device_ops_stru g_wal_net_dev_ops = + { + .getStats = wal_netdev_get_stats, + .open = wal_netdev_open, + .stop = wal_netdev_stop, + .xmit = hmac_bridge_vap_xmit, + .ioctl = wal_net_device_ioctl, + .changeMtu = oal_net_device_change_mtu, + .init = oal_net_device_init, + .deInit = oal_net_free_netdev, + + ...... - ``` + }; - 在芯片驱动初始化过程中调用netdev的init和add接口进行初始化netdev,并挂接netdev的一些函数指针。 + hi_s32 wal_init_netif(nl80211_iftype_uint8 type, oal_net_device_stru *netdev, const oal_wireless_dev *wdev) + { + /* 添加网络设备到协议栈 */ + hi_u32 ret = NetDeviceAdd(netdev, (Protocol80211IfType)type); - ```c - hi_s32 wal_init_drv_wlan_netdev(nl80211_iftype_uint8 type, wal_phy_mode mode, oal_net_device_stru *netdev) - { - hi_char *ac_mode_str = NULL; - hi_s32 ret; - if (oal_unlikely(netdev == HI_NULL)) { - oam_error_log0(0, OAM_SF_ANY, "{netdev is null!}"); - return HI_ERR_CODE_PTR_NULL; - } + ...... - do { - /* 初始化网络设备。 */ - ret = wal_init_netdev(type, netdev); - if (ret != HI_SUCCESS) { - break; - } - - ret = wal_init_netif(type, netdev); - if (ret != HI_SUCCESS) { - break; - } - ac_mode_str = "11bgn"; - if (mode == WAL_PHY_MODE_11G) { - ac_mode_str = "11bg"; - } else if (mode == WAL_PHY_MODE_11B) { - ac_mode_str = "11b"; - } - - ret = wal_ioctl_set_mode(netdev, ac_mode_str); - } while (false); - - if (ret != HI_SUCCESS) { - wal_deinit_wlan_vap(netdev); - oal_net_unregister_netdev(netdev); - oal_net_clear_netdev(netdev); - return HI_FAIL; - } - - return HI_SUCCESS; - } - - /* 挂接netdev的一些函数指针,详细挂接函数请参考NetDeviceInterFace */ - oal_net_device_ops_stru g_wal_net_dev_ops = - { - .getStats = wal_netdev_get_stats, - .open = wal_netdev_open, - .stop = wal_netdev_stop, - .xmit = hmac_bridge_vap_xmit, - .ioctl = wal_net_device_ioctl, - .changeMtu = oal_net_device_change_mtu, - .init = oal_net_device_init, - .deInit = oal_net_free_netdev, - - ...... + return HI_SUCCESS; + } + ``` - }; +#### 适配MAC层能力接口 - hi_s32 wal_init_netif(nl80211_iftype_uint8 type, oal_net_device_stru *netdev, const oal_wireless_dev *wdev) - { - /* 添加网络设备到协议栈 */ - hi_u32 ret = NetDeviceAdd(netdev, (Protocol80211IfType)type); + 用户态消息下发到驱动后,驱动会调用相应的MAC层能力接口。 - ...... + ```c + /* 驱动需要实现的MAC层基本能力的控制接口 */ + static struct HdfMac80211BaseOps g_baseOps = { + .SetMode = WalSetMode, + .AddKey = WalAddKey, + .DelKey = WalDelKey, + .SetDefaultKey = WalSetDefaultKey, + .GetDeviceMacAddr = WalGetDeviceMacAddr, + .SetMacAddr = WalSetMacAddr, + .SetTxPower = WalSetTxPower, + .GetValidFreqsWithBand = WalGetValidFreqsWithBand, + .GetHwCapability = WalGetHwCapability + }; + + /* 驱动需要实现的MAC层STA能力的控制接口 */ + static struct HdfMac80211STAOps g_staOps = { + .Connect = WalConnect, + .Disconnect = WalDisconnect, + .StartScan = WalStartScan, + .AbortScan = WalAbortScan, + .SetScanningMacAddress = WalSetScanningMacAddress, + }; + + /* 驱动需要实现的MAC层AP能力的控制接口 */ + static struct HdfMac80211APOps g_apOps = { + .ConfigAp = WalConfigAp, + .StartAp = WalStartAp, + .StopAp = WalStopAp, + .ConfigBeacon = WalChangeBeacon, + .DelStation = WalDelStation, + .SetCountryCode = WalSetCountryCode, + .GetAssociatedStasCount = WalGetAssociatedStasCount, + .GetAssociatedStasInfo = WalGetAssociatedStasInfo + }; + + static struct HdfMac80211P2POps g_p2pOps = { + .RemainOnChannel = WalRemainOnChannel, + .CancelRemainOnChannel = WalCancelRemainOnChannel, + .ProbeReqReport = WalProbeReqReport, + .AddIf = WalAddIf, + .RemoveIf = WalRemoveIf, + .SetApWpsP2pIe = WalSetApWpsP2pIe, + .GetDriverFlag = WalGetDriverFlag + }; + + /* 初始化Mac80211与芯片侧的函数挂接 */ + void HiMac80211Init(struct HdfChipDriver *chipDriver) + { + if (chipDriver == NULL) { + HDF_LOGE("%s:input is NULL!", __func__); + return; + } + chipDriver->ops = &g_baseOps; + chipDriver->staOps = &g_staOps; + chipDriver->apOps = &g_apOps; + chipDriver->p2pOps = &g_p2pOps; + } + ``` - return HI_SUCCESS; - } - ``` +#### 适配event事件上报 + + WLAN框架提供了event事件的上报接口,详情见hdf_wifi_event.c,例:调用HdfWiFiEventNewSta AP上报新关联的某个STA的情况。 -3. 命令下发绑定,包括具有公共能力的设置MAC地址、设置发射功率等;STA相关的连接、扫描等;AP相关的启动AP、设置国家码等。 - - ```c - /* 驱动需要实现的MAC层基本能力的控制接口 */ - static struct HdfMac80211BaseOps g_baseOps = { - .SetMode = WalSetMode, - .AddKey = WalAddKey, - .DelKey = WalDelKey, - .SetDefaultKey = WalSetDefaultKey, - .GetDeviceMacAddr = WalGetDeviceMacAddr, - .SetMacAddr = WalSetMacAddr, - .SetTxPower = WalSetTxPower, - .GetValidFreqsWithBand = WalGetValidFreqsWithBand, - .GetHwCapability = WalGetHwCapability - }; - - /* 驱动需要实现的MAC层STA能力的控制接口 */ - static struct HdfMac80211STAOps g_staOps = { - .Connect = WalConnect, - .Disconnect = WalDisconnect, - .StartScan = WalStartScan, - .AbortScan = WalAbortScan, - .SetScanningMacAddress = WalSetScanningMacAddress, - }; - - /* 驱动需要实现的MAC层AP能力的控制接口 */ - static struct HdfMac80211APOps g_apOps = { - .ConfigAp = WalConfigAp, - .StartAp = WalStartAp, - .StopAp = WalStopAp, - .ConfigBeacon = WalChangeBeacon, - .DelStation = WalDelStation, - .SetCountryCode = WalSetCountryCode, - .GetAssociatedStasCount = WalGetAssociatedStasCount, - .GetAssociatedStasInfo = WalGetAssociatedStasInfo - }; - - static struct HdfMac80211P2POps g_p2pOps = { - .RemainOnChannel = WalRemainOnChannel, - .CancelRemainOnChannel = WalCancelRemainOnChannel, - .ProbeReqReport = WalProbeReqReport, - .AddIf = WalAddIf, - .RemoveIf = WalRemoveIf, - .SetApWpsP2pIe = WalSetApWpsP2pIe, - .GetDriverFlag = WalGetDriverFlag - }; - - /* 初始化Mac80211与芯片侧的函数挂接 */ - void HiMac80211Init(struct HdfChipDriver *chipDriver) - { - if (chipDriver == NULL) { - HDF_LOGE("%s:input is NULL!", __func__); - return; - } - chipDriver->ops = &g_baseOps; - chipDriver->staOps = &g_staOps; - chipDriver->apOps = &g_apOps; - chipDriver->p2pOps = &g_p2pOps; - } - ``` + ```c + hi_u32 oal_cfg80211_new_sta(oal_net_device_stru *net_device, const hi_u8 *mac_addr, hi_u8 addr_len, + oal_station_info_stru *station_info, oal_gfp_enum_uint8 en_gfp) + { + #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION) && !defined(_PRE_HDF_LINUX) + cfg80211_new_sta(net_device, mac_addr, station_info, en_gfp); + hi_unref_param(addr_len); + #elif (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION) || defined(_PRE_HDF_LINUX) + struct StationInfo info = { 0 }; + info.assocReqIes = station_info->assoc_req_ies; + info.assocReqIesLen = station_info->assoc_req_ies_len; + HdfWifiEventNewSta(net_device, mac_addr, WLAN_MAC_ADDR_LEN, &info); + hi_unref_param(en_gfp); + hi_unref_param(addr_len); + #endif + + return HI_SUCCESS; + } + ``` -4. 事件上报接口调用,WLAN框架提供了event事件的上报接口,详情见hdf_wifi_event.c,例:调用HdfWiFiEventNewSta AP上报新关联的某个STA的情况。 +### 调测验证 - ```c - hi_u32 oal_cfg80211_new_sta(oal_net_device_stru *net_device, const hi_u8 *mac_addr, hi_u8 addr_len, - oal_station_info_stru *station_info, oal_gfp_enum_uint8 en_gfp) - { - #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION) && !defined(_PRE_HDF_LINUX) - cfg80211_new_sta(net_device, mac_addr, station_info, en_gfp); - hi_unref_param(addr_len); - #elif (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION) || defined(_PRE_HDF_LINUX) - struct StationInfo info = { 0 }; - info.assocReqIes = station_info->assoc_req_ies; - info.assocReqIesLen = station_info->assoc_req_ies_len; - HdfWifiEventNewSta(net_device, mac_addr, WLAN_MAC_ADDR_LEN, &info); - hi_unref_param(en_gfp); - hi_unref_param(addr_len); - #endif - - return HI_SUCCESS; - } - ``` -**调测验证** +#### 驱动适配验证 驱动开发完成后,在WLAN模块单元测试里面开发自测试用例以及验证WLAN模块基本功能。测试环境采用开发者自测试平台(这里以Hi3516DV300标准系统为例)。 @@ -739,7 +736,8 @@ WLAN驱动基于HDF框架和Platform框架开发,不区分OS和芯片平台, 上述xxx.xxx.xxx.xxx为当前测试终端的IP地址,若测试能够ping通测试终端则表示,WLAN驱动基本功能正常。 -#### 接口调用 +#### 接口使用实例 + WLAN驱动模块向上层提供两种能力接口:HDI接口和HAL接口。 - HDI接口调用 diff --git "a/zh-cn/device-dev/driver/figures/HAL\346\265\201\347\250\213\345\233\276.png" "b/zh-cn/device-dev/driver/figures/HAL\346\265\201\347\250\213\345\233\276.png" index 2982822ddb3a2d223bd083d506722d2a1befdcfa..a9c1f39bc60b792f906646854a1a801f78dee352 100644 Binary files "a/zh-cn/device-dev/driver/figures/HAL\346\265\201\347\250\213\345\233\276.png" and "b/zh-cn/device-dev/driver/figures/HAL\346\265\201\347\250\213\345\233\276.png" differ diff --git "a/zh-cn/device-dev/driver/figures/WLAN\351\251\261\345\212\250\346\216\245\345\217\243\346\241\206\346\236\266\345\233\276.png" "b/zh-cn/device-dev/driver/figures/WLAN\351\251\261\345\212\250\346\216\245\345\217\243\346\241\206\346\236\266\345\233\276.png" index c766dbec265f9e98775cbedcd7df651d4fc8dec7..375ab9d0e28506761ff87b47fb71f0a08af6b95a 100755 Binary files "a/zh-cn/device-dev/driver/figures/WLAN\351\251\261\345\212\250\346\216\245\345\217\243\346\241\206\346\236\266\345\233\276.png" and "b/zh-cn/device-dev/driver/figures/WLAN\351\251\261\345\212\250\346\216\245\345\217\243\346\241\206\346\236\266\345\233\276.png" differ diff --git a/zh-cn/device-dev/get-code/sourcecode-acquire.md b/zh-cn/device-dev/get-code/sourcecode-acquire.md index 62ebd318f569460d30034e454f6dff926f9e8a70..b689fc8355a516934d1e051ad471b43d42ceac7d 100644 --- a/zh-cn/device-dev/get-code/sourcecode-acquire.md +++ b/zh-cn/device-dev/get-code/sourcecode-acquire.md @@ -198,12 +198,12 @@ OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及 | Hi3516解决方案-Linux(二进制) | 3.0 | [站点](https://repo.huaweicloud.com/openharmony/os/3.0/hispark_taurus_linux.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/3.0/hispark_taurus_linux.tar.gz.sha256) | 418.1 MB | | RELEASE-NOTES | 3.0 | [站点](https://gitee.com/openharmony/docs/blob/OpenHarmony-3.0-LTS/zh-cn/release-notes/OpenHarmony-v3.0-LTS.md) | - | - | | **最新发布版本源码** | **版本信息** | **下载站点** | **SHA256校验码** | **软件包容量** | -| 全量代码Beta版本(标准、轻量和小型系统) | 3.2 Release | [站点](https://repo.huaweicloud.com/harmonyos/os/3.2-Release/code-v3.2-Release.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/harmonyos/os/3.2-Release/code-v3.2-Release.tar.gz.sha256) | 21.8 GB | -| Hi3861解决方案(二进制) | 3.2 Release| [站点](https://repo.huaweicloud.com/harmonyos/os/3.2-Release/hispark_pegasus.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/harmonyos/os/3.2-Release/hispark_pegasus.tar.gz.sha256) | 22.9 MB | -| Hi3516解决方案-LiteOS(二进制) | 3.2 Release| [站点](https://repo.huaweicloud.com/openharmony/os/3.2-Release/hispark_taurus_LiteOS.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/3.2-Release/hispark_taurus_LiteOS.tar.gz.sha256) | 294.3 MB | -| Hi3516解决方案-Linux(二进制) | 3.2 Release| [站点](https://repo.huaweicloud.com/openharmony/os/3.2-Release/hispark_taurus_Linux.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/3.2-Release/hispark_taurus_Linux.tar.gz.sha256) | 174.3 MB | -| RK3568标准系统解决方案(二进制) | 3.2 Release| [站点](https://repo.huaweicloud.com/harmonyos/os/3.2-Release//dayu200_standard_arm32.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/harmonyos/os/3.2-Release//dayu200_standard_arm32.tar.gz.sha256) | 3.9 GB | -| RELEASE-NOTES | 3.2 Release| [站点](../../release-notes/OpenHarmony-v3.2-release.md) | - | - | +| 全量代码(标准、轻量和小型系统) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/code-v4.0-Beta1.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/code-v4.0-Beta1.tar.gz.sha256) | 26.2 GB | +| Hi3861解决方案(二进制) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_pegasus.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_pegasus.tar.gz.sha256) | 25.1 MB | +| Hi3516解决方案-LiteOS(二进制) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_LiteOS.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_LiteOS.tar.gz.sha256) | 287.6 MB | +| Hi3516解决方案-Linux(二进制) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_Linux.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_Linux.tar.gz.sha256) | 186.4 MB | +| RK3568标准系统解决方案(二进制) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/dayu200_standard_arm32.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/dayu200_standard_arm32.tar.gz.sha256) | 4.5 GB | +| RELEASE-NOTES | 4.0 Beta1 | [站点](../../release-notes/OpenHarmony-v4.0-beta1.md) | - | - | | **编译工具链** | **版本信息** | **下载站点** | **SHA256校验码** | **软件包容量** | | 编译工具链获取清单 | - | [站点](https://repo.huaweicloud.com/openharmony/os/2.0/tool_chain/) | - | - | diff --git a/zh-cn/release-notes/OpenHarmony-v3.1-beta.md b/zh-cn/release-notes/OpenHarmony-v3.1-beta.md index b9c359af741f32e7d1997b10549a66058afe5be3..2d4fe6da6ad046caf3f71d087ab359dd15c9e0e0 100644 --- a/zh-cn/release-notes/OpenHarmony-v3.1-beta.md +++ b/zh-cn/release-notes/OpenHarmony-v3.1-beta.md @@ -183,12 +183,9 @@ _[Changelog](api-diff/v3.1-beta/changelog-v3.1-beta.md)_ | [分布式手写板(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts) | 基于分布式能力,实现多设备同步书写互动。 | ArkTS | | [分布式数据库](https://gitee.com/openharmony/codelabs/tree/master/Data/JsDistributedData) | 基于分布式数据接口,实现多种设备上一致的数据访问体验。 | JS | | [关系型数据库](https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData) | 基于关系型数据库和数据管理能力,实现数据库相关应用服务的快速开发。 | JS | -| [极简声明式UI范式(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/SimpleGalleryEts) | 基于OpenHarmony ArkUI,实现一个图库应用。 | ArkTS | -| [一次开发多端部署(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/Multi_device) | 基于OpenHarmony ArkUI,实现一次布局,多端部署。 | ArkTS | | [购物应用(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/ShoppingEts) | 基于OpenHarmony ArkUI丰富的组件实现购物商城应用。 | ArkTS | | [转场动画的使用(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/TransitionAnimation) | 基于OpenHarmony ArkUI转场动画,实现了页面间转场、组件内转场以及共享元素转场。 | ArkTS | | [基础组件Slider的使用(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/SliderExample) | 基于OpenHarmony eTS UI,使用slider组件,实现可调节风车大小和转速的动画效果。 | ArkTS | -| [流式布局(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/FlowLayoutEts) | 基于OpenHarmony ArkUI,实现流式布局效果。 | ArkTS | | [弹窗(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/CustomDialogEts) | 基于OpenHarmony ArkUI,实现警告弹窗和自定义弹窗。 | ArkTS | diff --git a/zh-cn/release-notes/OpenHarmony-v3.1-release.md b/zh-cn/release-notes/OpenHarmony-v3.1-release.md index 21732e03288469bccac9c5dfce8eafbf59216d33..224157d5bbdf64dd33eaa6b9c84cede510e74693 100755 --- a/zh-cn/release-notes/OpenHarmony-v3.1-release.md +++ b/zh-cn/release-notes/OpenHarmony-v3.1-release.md @@ -238,7 +238,6 @@ _[API差异报告](api-diff/v3.1-Release/Readme-CN.md)_ | [音频录制应用](https://gitee.com/openharmony/codelabs/tree/master/Media/Audio_OH_ETS) | 使用媒体组件AudioRecorder收录当前音频、使用AudioPlayer播放录音的方法。 | ArkTS | | [备忘录](https://gitee.com/openharmony/codelabs/tree/master/Data/NotePad_OH_ETS) | 使用ArkTS开发一个简易备忘录,支持新建、删除和收藏笔记功能,轻量级数据库持久化存储数据。 | ArkTS | | [分布式邮件编辑](https://gitee.com/openharmony/codelabs/tree/master/Distributed/OHMailETS) | 使用ArkTS开发分布式邮件,利用分布式的能力,在相同局域网及帐号下,拉起另一个设备,实现邮件在不同设备下的编辑流转。 | ArkTS | -| [三方库](https://gitee.com/openharmony/codelabs/tree/master/ThirdPartyComponents/VCardDemo) | 介绍openHarmony中三方库vcard库使用:一款写入和读取特定格式的联系人数据(后缀名为vcard的文件)的OpenHarmony组件。 | ArkTS | ## 修复缺陷列表 diff --git a/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md b/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md index e156dad5e3cdca1dd967da9fbed7127f27d05e71..0c4832685fe31658f93280f73729b2ea59bcbca1 100644 --- a/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md +++ b/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md @@ -139,7 +139,7 @@ ArkUI适配了根据资源名称获取资源的能力。 从本版本起,仅发布Public SDK,开发者可从镜像站点获取或通过DevEco Studio下载Public SDK用于应用开发。 -包含系统接口的全量SDK(Full SDK)需下载全量代码后编译构建出SDK文件,并在DevEco Studio中替换。通过源码编译Full SDK的指导请参见[Full-SDK编译指南](../application-dev/quick-start/full-sdk-compile-guide.md)。 +包含系统接口的全量SDK(Full SDK)需下载全量代码后编译构建出SDK文件,并在DevEco Studio中替换。通过源码编译Full SDK的指导请参见[Full-SDK编译指南](../application-dev/faqs/full-sdk-compile-guide.md)。 ### 特性变更 @@ -162,7 +162,7 @@ ArkUI适配了根据资源名称获取资源的能力。 | 文件存储 | - 新增应用文件统一URI处理能力。
- 新增支持公共数据的临时授权和统一的打开入口。
主要涉及以下需求:
I687C8【新增能力】支持应用文件统一URI处理能力
I64U8W【基础能力】支持公共数据的临时授权和统一open入口 | NA | | 元能力 | - 新增常驻进程重启优化。
- 支持卡片数据库切换。
- 支持异步onConnected等能力。
主要涉及以下需求:
I65M3F 【基础能力】执行ShellCommand命令管控
I65V83 【基础能力】ServiceExtensionAbility支持异步onConnected生命周期
I61H21 【基础能力】卡片本地数据库切换
I63UJ5 【元能力】【ability_runtime】API8及以前API 支持异常处理
I6BDCW 【基础能力】应用加载禁止加载data目录下的代码
I6BDDU 【基础能力】FA模型默认启动方式为Standard
I6BDE2 【基础能力】常驻应用异常频繁重启保护 | NA | -API变更清单请参考:[API差异报告](api-change/v3.2-beta5/Readme.md) +API变更清单请参考:[API差异报告](api-diff/v3.2-beta5/Readme-CN.md) 各子系统API详细变更说明请参考:[变更说明](changelogs/v3.2-beta5/Readme.md) @@ -212,5 +212,3 @@ API变更清单请参考:[API差异报告](api-change/v3.2-beta5/Readme.md) | I641A2
I64726 | 蓝牙模块存在静默配对问题,其他设备可以静默配对后通过蓝牙键盘、鼠标完全控制设备 | 蓝牙模块存在静默配对问题。在后续版本以需求跟踪解决。 | 2023年3月30日 | | I6BRTS | 调用rdb::executeSql接口会引起内存泄漏风险 | 反复初始化调用rdb::executeSql接口出现少量内存泄露,此接口为应用初始化时调用,但不会多次调用,内存泄露影响可控。 | 2023年2月10日 | | I6AZ4T | 带textinput输入框组件的应用存在内存泄漏风险 | 高频反复调用textinput框出现少量内存泄露,根因为调用三方库flutter库,内存未回收。需排查是否为开源flutter组件问题。 | 2023年2月10日 | - - \ No newline at end of file diff --git a/zh-cn/release-notes/OpenHarmony-v4.0-beta1.md b/zh-cn/release-notes/OpenHarmony-v4.0-beta1.md index 8de729055d3bf4366fa8446811e618ffcba55d0f..5fbe5020c19ccfcdb22845bfbd3af9f29f545864 100644 --- a/zh-cn/release-notes/OpenHarmony-v4.0-beta1.md +++ b/zh-cn/release-notes/OpenHarmony-v4.0-beta1.md @@ -372,9 +372,9 @@ OpenHarmony 4.0 Beta1版本开始提供首批API Level 10接口。 | Hi3516解决方案-LiteOS(二进制) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_LiteOS.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_LiteOS.tar.gz.sha256) | 287.6 MB | | Hi3516解决方案-Linux(二进制) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_Linux.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/hispark_taurus_Linux.tar.gz.sha256) | 186.4 MB | | RK3568标准系统解决方案(二进制) | 4.0 Beta1 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/dayu200_standard_arm32.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/dayu200_standard_arm32.tar.gz.sha256) | 4.5 GB | -| 标准系统Public SDK包(Mac) | 4.0.7.5 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-mac-public.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-mac-public.tar.gz.sha256) | 718.2 MB | -| 标准系统Public SDK包(Mac-M1) | 4.0.7.5 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/L2-SDK-MAC-M1-PUBLIC.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/L2-SDK-MAC-M1-PUBLIC.tar.gz.sha256) | 673.2 MB | -| 标准系统Public SDK包(Windows/Linux) | 4.0.7.5 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-windows_linux-public-20230604.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-windows_linux-public-20230604.tar.gz.sha256) | 1.8 GB | +| 标准系统Public SDK包(Mac) | 4.0.7.5 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-mac-public-20230605.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-mac-public-20230605.tar.gz.sha256) | 718.2 MB | +| 标准系统Public SDK包(Mac-M1) | 4.0.7.5 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/L2-SDK-MAC-M1-PUBLIC-20230605.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/L2-SDK-MAC-M1-PUBLIC-20230605.tar.gz.sha256) | 673.2 MB | +| 标准系统Public SDK包(Windows/Linux) | 4.0.7.5 | [站点](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-windows_linux-public-20230605.tar.gz) | [SHA256校验码](https://repo.huaweicloud.com/openharmony/os/4.0-Beta1/ohos-sdk-windows_linux-public-20230605.tar.gz.sha256) | 1.8 GB | ## 更新说明 @@ -382,7 +382,7 @@ OpenHarmony 4.0 Beta1版本开始提供首批API Level 10接口。 ### API -OpenHarmony 4.0 Beta1的API范围相比3.2 Release,API变更的清单请参见“API差异报告(待发布)”。极少量接口的变更可能影响到已开发的应用(使用API 9或更早版本API开发的应用),变更影响的说明和接口的适配指导请参见“[changelogs](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Beta1/zh-cn/release-notes/changelogs/v4.0-beta1/Readme-CN.md)”。 +OpenHarmony 4.0 Beta1的API范围相比3.2 Release,API变更的清单请参见“[API差异报告](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Beta1/zh-cn/release-notes/api-diff/v4.0-beta1/Readme-CN.md)”。极少量接口的变更可能影响到已开发的应用(使用API 9或更早版本API开发的应用),变更影响的说明和接口的适配指导请参见“[changelogs](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Beta1/zh-cn/release-notes/changelogs/v4.0-beta1/Readme-CN.md)”。 ### 特性变更 @@ -400,10 +400,10 @@ OpenHarmony 4.0 Beta1的API范围相比3.2 Release,API变更的清单请参见 | 子系统 | 名称 | 简介 | 开发语言 | | -------- | -------- | -------- | -------- | -| 媒体 | [媒体会话——控制方](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Media/AVSession/MediaController)(仅对系统应用开放) | 本示例主要展示了媒体会话(媒体控制方,MediaController)的相关功能,使用\@ohos.multimedia.avsession等接口实现媒体提供方与媒体控制方自定义信息的交互功能。 | ArkTS | -| 媒体 | [媒体会话——提供方](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Media/AVSession/MediaProvider) | 本示例主要展示了媒体会话(媒体提供方,MediaProvider)的相关功能,使用\@ohos.multimedia.avsession等接口实现媒体提供方与媒体控制方自定义信息的交互功能。 | ArkTS | -| 媒体 | [音频管理](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Media/Audio) | 本示例主要展示了音频的相关功能,使用\@ohos.multimedia.audio等接口实现音频的发声设备的切换与查询和音频焦点功能。 | ArkTS | -| DFX | [应用故障恢复](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DFX/AppRecovery) | 本示例展示了在应用中如何适配故障恢复相关接口。 | ArkTS | +| 媒体 | [媒体会话——控制方](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-v4.0-Beta1/code/BasicFeature/Media/AVSession/MediaController)(仅对系统应用开放) | 本示例主要展示了媒体会话(媒体控制方,MediaController)的相关功能,使用\@ohos.multimedia.avsession等接口实现媒体提供方与媒体控制方自定义信息的交互功能。 | ArkTS | +| 媒体 | [媒体会话——提供方](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-v4.0-Beta1/code/BasicFeature/Media/AVSession/MediaProvider) | 本示例主要展示了媒体会话(媒体提供方,MediaProvider)的相关功能,使用\@ohos.multimedia.avsession等接口实现媒体提供方与媒体控制方自定义信息的交互功能。 | ArkTS | +| 媒体 | [音频管理](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-v4.0-Beta1/code/BasicFeature/Media/Audio) | 本示例主要展示了音频的相关功能,使用\@ohos.multimedia.audio等接口实现音频的发声设备的切换与查询和音频焦点功能。 | ArkTS | +| DFX | [应用故障恢复](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-v4.0-Beta1/code/BasicFeature/DFX/AppRecovery) | 本示例展示了在应用中如何适配故障恢复相关接口。 | ArkTS | 请访问[Samples](https://gitee.com/openharmony/applications_app_samples)仓了解更多信息。 @@ -444,5 +444,3 @@ OpenHarmony 4.0 Beta1的API范围相比3.2 Release,API变更的清单请参见 | I79752 | 中概率由进程com.ohos.smartperf下的.ohos.smartperf线程导致libark_jsruntime.so出现cppcrash。 | 非核心应用, 不影响ARP指标,影响可控。 | 2023年6月30日 | | I79P3K | 低概率由进程com.ohos.callui导致jscrash,栈名:onDestroy。 | 低概率,出现jscrash后,应用会被重新安装,不影响电话应用正常功能和使用。 | 2023年6月30日 | | I79TCB | 低概率由进程com.ohos.note下的VizCompositorTh线程导致libweb_engine.soTh出现cppcrash。 | 低概率,出现jscrash后,应用会被重新安装,不影响note应用正常功能和使用。 | 2023年6月30日 | - - \ No newline at end of file diff --git a/zh-cn/release-notes/Readme.md b/zh-cn/release-notes/Readme.md index 8b55d4ec39811fdd4d7a937e9daf689003445272..66be6c562d6b8ce7d5ff7e1efc9dfc6f95845d39 100644 --- a/zh-cn/release-notes/Readme.md +++ b/zh-cn/release-notes/Readme.md @@ -1,30 +1,35 @@ # OpenHarmony Release Notes + +## OpenHarmony 4.x Releases + +- [OpenHarmony v4.0 Beta1 (2023-06-03)](OpenHarmony-v4.0-beta1.md) + ## OpenHarmony 3.x Releases - [OpenHarmony v3.2 Release (2023-04-09)](OpenHarmony-v3.2-release.md) -- [OpenHarmony v3.2.1 Release (2023-05-22)](OpenHarmony-v3.2.1-release.md) + - [OpenHarmony v3.2.1 Release (2023-05-22)](OpenHarmony-v3.2.1-release.md) - [OpenHarmony v3.2 Beta5 (2023-01-31)](OpenHarmony-v3.2-beta5.md) - [OpenHarmony v3.2 Beta4 (2022-11-30)](OpenHarmony-v3.2-beta4.md) - [OpenHarmony v3.2 Beta3 (2022-09-30)](OpenHarmony-v3.2-beta3.md) - [OpenHarmony v3.2 Beta2 (2022-07-30)](OpenHarmony-v3.2-beta2.md) - [OpenHarmony v3.2 Beta1 (2022-05-31)](OpenHarmony-v3.2-beta1.md) - [OpenHarmony v3.1 Release (2022-03-30)](OpenHarmony-v3.1-release.md) -- [OpenHarmony v3.1.7 Release (2023-04-04)](OpenHarmony-v3.1.7-release.md) -- [OpenHarmony v3.1.6 Release (2023-02-06)](OpenHarmony-v3.1.6-release.md) -- [OpenHarmony v3.1.5 Release (2023-01-10)](OpenHarmony-v3.1.5-release.md) -- [OpenHarmony v3.1.4 Release (2022-11-02)](OpenHarmony-v3.1.4-release.md) -- [OpenHarmony v3.1.3 Release (2022-09-30)](OpenHarmony-v3.1.3-release.md) -- [OpenHarmony v3.1.2 Release (2022-08-24)](OpenHarmony-v3.1.2-release.md) -- [OpenHarmony v3.1.1 Release (2022-05-31)](OpenHarmony-v3.1.1-release.md) + - [OpenHarmony v3.1.7 Release (2023-04-04)](OpenHarmony-v3.1.7-release.md) + - [OpenHarmony v3.1.6 Release (2023-02-06)](OpenHarmony-v3.1.6-release.md) + - [OpenHarmony v3.1.5 Release (2023-01-10)](OpenHarmony-v3.1.5-release.md) + - [OpenHarmony v3.1.4 Release (2022-11-02)](OpenHarmony-v3.1.4-release.md) + - [OpenHarmony v3.1.3 Release (2022-09-30)](OpenHarmony-v3.1.3-release.md) + - [OpenHarmony v3.1.2 Release (2022-08-24)](OpenHarmony-v3.1.2-release.md) + - [OpenHarmony v3.1.1 Release (2022-05-31)](OpenHarmony-v3.1.1-release.md) - [OpenHarmony v3.1 Beta (2021-12-31)](OpenHarmony-v3.1-beta.md) - [OpenHarmony v3.0 LTS (2021-09-30)](OpenHarmony-v3.0-LTS.md) -- [OpenHarmony v3.0.8 LTS (2022-03-03)](OpenHarmony-v3.0.8-LTS.md) -- [OpenHarmony v3.0.7 LTS (2022-12-05)](OpenHarmony-v3.0.7-LTS.md) -- [OpenHarmony v3.0.6 LTS (2022-09-15)](OpenHarmony-v3.0.6-LTS.md) -- [OpenHarmony v3.0.5 LTS (2022-07-01)](OpenHarmony-v3.0.5-LTS.md) -- [OpenHarmony v3.0.3 LTS (2022-04-08)](OpenHarmony-v3.0.3-LTS.md) -- [OpenHarmony v3.0.2 LTS (2022-03-18)](OpenHarmony-v3.0.2-LTS.md) -- [OpenHarmony v3.0.1 LTS (2022-01-12)](OpenHarmony-v3.0.1-LTS.md) + - [OpenHarmony v3.0.8 LTS (2022-03-03)](OpenHarmony-v3.0.8-LTS.md) + - [OpenHarmony v3.0.7 LTS (2022-12-05)](OpenHarmony-v3.0.7-LTS.md) + - [OpenHarmony v3.0.6 LTS (2022-09-15)](OpenHarmony-v3.0.6-LTS.md) + - [OpenHarmony v3.0.5 LTS (2022-07-01)](OpenHarmony-v3.0.5-LTS.md) + - [OpenHarmony v3.0.3 LTS (2022-04-08)](OpenHarmony-v3.0.3-LTS.md) + - [OpenHarmony v3.0.2 LTS (2022-03-18)](OpenHarmony-v3.0.2-LTS.md) + - [OpenHarmony v3.0.1 LTS (2022-01-12)](OpenHarmony-v3.0.1-LTS.md) ## OpenHarmony 2.x Releases diff --git a/zh-cn/release-notes/api-diff/v3.2-beta5/Readme-CN.md b/zh-cn/release-notes/api-diff/v3.2-beta5/Readme-CN.md new file mode 100644 index 0000000000000000000000000000000000000000..4a68dabd551299179fe0de8aebf5bdb7f02233f2 --- /dev/null +++ b/zh-cn/release-notes/api-diff/v3.2-beta5/Readme-CN.md @@ -0,0 +1,25 @@ +# JS API差异报告 + +- [元能力](js-apidiff-ability.md) +- [帐号](js-apidiff-account.md) +- [应用](js-apidiff-application.md) +- [ArkUI](js-apidiff-arkui.md) +- [电源管理](js-apidiff-battery.md) +- [包管理](js-apidiff-bundle.md) +- [基础通信](js-apidiff-communication.md) +- [语言编译与运行时](js-apidiff-compiler-and-runtime.md) +- [分布式数据管理](js-apidiff-distributed-data.md) +- [文件管理](js-apidiff-file-management.md) +- [位置服务](js-apidiff-geolocation.md) +- [全球化](js-apidiff-global.md) +- [Misc软件](js-apidiff-misc.md) +- [多媒体](js-apidiff-multimedia.md) +- [事件通知](js-apidiff-notification.md) +- [资源调度](js-apidiff-resource-scheduler.md) +- [安全](js-apidiff-security.md) +- [启动](js-apidiff-start-up.md) +- [电话服务](js-apidiff-telephony.md) +- [测试](js-apidiff-unitest.md) +- [用户IAM](js-apidiff-user-iam.md) +- [Web](js-apidiff-web.md) +- [窗口](js-apidiff-window.md) diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/Readme-CN.md b/zh-cn/release-notes/api-diff/v4.0-beta1/Readme-CN.md new file mode 100644 index 0000000000000000000000000000000000000000..1ee954df711ab6d2420a10df5e1a7e6860142902 --- /dev/null +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/Readme-CN.md @@ -0,0 +1,30 @@ +# Readme + +- [元能力](js-apidiff-ability.md) +- [无障碍服务](js-apidiff-accessibility.md) +- [帐号](js-apidiff-account.md) +- [ArkUI](js-apidiff-arkui.md) +- [电源管理](js-apidiff-battery.md) +- [包管理](js-apidiff-bundle.md) +- [通信](js-apidiff-communication.md) +- [语言编译运行时](js-apidiff-compiler-and-runtime.md) +- [定制服务](js-apidiff-customization.md) +- [分布式数据管理](js-apidiff-distributed-data.md) +- [分布式硬件](js-apidiff-distributed-hardware.md) +- [文件管理](js-apidiff-file-management.md) +- [全球化](js-apidiff-global.md) +- [图形](js-apidiff-graphic.md) +- [Misc软件](js-apidiff-misc.md) +- [MSDP](js-apidiff-msdp.md) +- [多模输入](js-apidiff-multi-modal-input.md) +- [媒体](js-apidiff-multimedia.md) +- [事件与通知](js-apidiff-notification.md) +- [资源调度](js-apidiff-resource-scheduler.md) +- [安全基础服务](js-apidiff-security.md) +- [泛Sensor](js-apidiff-sensor.md) +- [电话服务](js-apidiff-telephony.md) +- [测试框架](js-apidiff-unitest.md) +- [升级服务](js-apidiff-update.md) +- [用户IAM](js-apidiff-user-iam.md) +- [Web](js-apidiff-web.md) +- [窗口](js-apidiff-window.md) \ No newline at end of file diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md index 400f699333041bc6da0c4731349714677ebe262c..0f5686b2ba3cea9b07786ebb4ae35b526f9efd66 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md @@ -1,5 +1,26 @@ | 操作 | 旧版本 | 新版本 | d.ts文件 | | ---- | ------ | ------ | -------- | -|新增(错误码)|NA|类名:Config
方法 or 属性:get(): Promise\;
错误码内容: 201, 202|@ohos.accessibility.config.d.ts| -|新增(错误码)|NA|类名:Config
方法 or 属性:get(callback: AsyncCallback\): void;
错误码内容: 201, 202|@ohos.accessibility.config.d.ts| -|新增(错误码)|NA|类名:Config
方法 or 属性:off(callback?: Callback\): void;
错误码内容: 202|@ohos.accessibility.config.d.ts| +|废弃版本有变化|类名:accessibility;
方法or属性:function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise\>;;
旧版本信息:|类名:accessibility;
方法or属性:function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise\>;;
新版本信息:9;
代替接口: ohos.accessibility#getAccessibilityExtensionList|@ohos.accessibility.d.ts| +|废弃版本有变化|类名:accessibility;
方法or属性:function sendEvent(event: EventInfo): Promise\;;
旧版本信息:|类名:accessibility;
方法or属性:function sendEvent(event: EventInfo): Promise\;;
新版本信息:9;
代替接口: ohos.accessibility#sendAccessibilityEvent|@ohos.accessibility.d.ts| +|新增(错误码)|类名:Config;
方法or属性:get(): Promise\;;
旧版本信息:|类名:Config;
方法or属性:get(): Promise\;;
新版本信息:201,202|@ohos.accessibility.config.d.ts| +|新增(错误码)|类名:Config;
方法or属性:get(callback: AsyncCallback\): void;;
旧版本信息:|类名:Config;
方法or属性:get(callback: AsyncCallback\): void;;
新版本信息:201,202|@ohos.accessibility.config.d.ts| +|新增(错误码)|类名:Config;
方法or属性:off(callback?: Callback\): void;
旧版本信息:|类名:Config;
方法or属性:off(callback?: Callback\): void;
新版本信息:202|@ohos.accessibility.config.d.ts| +|新增(错误码)|类名:AccessibilityElement;
方法or属性:attributeValue\(
attributeName: T,
callback: AsyncCallback\
): void;;
旧版本信息:|类名:AccessibilityElement;
方法or属性:attributeValue\(
attributeName: T,
callback: AsyncCallback\
): void;;
新版本信息:401,9300004|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:config;
方法or属性:function enableAbility(
name: string,
capability: Array\,
callback: AsyncCallback\
): void;
旧版本信息:201,401,9300001,9300002|类名:config;
方法or属性:function enableAbility(
name: string,
capability: Array\,
callback: AsyncCallback\
): void;
新版本信息:201,202,401,9300001,9300002|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:config;
方法or属性:function enableAbility(name: string, capability: Array\): Promise\;;
旧版本信息:201,401,9300001,9300002|类名:config;
方法or属性:function enableAbility(name: string, capability: Array\): Promise\;;
新版本信息:201,202,401,9300001,9300002|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:config;
方法or属性:function disableAbility(name: string, callback: AsyncCallback\): void;;
旧版本信息:201,401,9300001|类名:config;
方法or属性:function disableAbility(name: string, callback: AsyncCallback\): void;;
新版本信息:201,202,401,9300001|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:config;
方法or属性:function disableAbility(name: string): Promise\;;
旧版本信息:201,401,9300001|类名:config;
方法or属性:function disableAbility(name: string): Promise\;;
新版本信息:201,202,401,9300001|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:config;
方法or属性:function on(type: 'enabledAccessibilityExtensionListChange', callback: Callback\): void;;
旧版本信息:401|类名:config;
方法or属性:function on(type: 'enabledAccessibilityExtensionListChange', callback: Callback\): void;;
新版本信息:202,401|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:config;
方法or属性:function off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback\): void;;
旧版本信息:401|类名:config;
方法or属性:function off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback\): void;;
新版本信息:202,401|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:Config;
方法or属性:set(value: T, callback: AsyncCallback\): void;
旧版本信息:201,401|类名:Config;
方法or属性:set(value: T, callback: AsyncCallback\): void;
新版本信息:201,202,401|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:Config;
方法or属性:set(value: T): Promise\;;
旧版本信息:201,401|类名:Config;
方法or属性:set(value: T): Promise\;;
新版本信息:201,202,401|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:Config;
方法or属性:on(callback: Callback\): void;;
旧版本信息:401|类名:Config;
方法or属性:on(callback: Callback\): void;;
新版本信息:201,202,401|@ohos.accessibility.config.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback\): void;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback\): void;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getFocusElement(callback: AsyncCallback\): void;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getFocusElement(callback: AsyncCallback\): void;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getFocusElement(isAccessibilityFocus?: boolean): Promise\;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getFocusElement(isAccessibilityFocus?: boolean): Promise\;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getWindowRootElement(windowId: number, callback: AsyncCallback\): void;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getWindowRootElement(windowId: number, callback: AsyncCallback\): void;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getWindowRootElement(callback: AsyncCallback\): void;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getWindowRootElement(callback: AsyncCallback\): void;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getWindowRootElement(windowId?: number): Promise\;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getWindowRootElement(windowId?: number): Promise\;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getWindows(displayId?: number): Promise\>;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getWindows(displayId?: number): Promise\>;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getWindows(callback: AsyncCallback\>): void;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getWindows(callback: AsyncCallback\>): void;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| +|错误码有变化|类名:AccessibilityExtensionContext;
方法or属性:getWindows(displayId: number, callback: AsyncCallback\>): void;;
旧版本信息:9300003|类名:AccessibilityExtensionContext;
方法or属性:getWindows(displayId: number, callback: AsyncCallback\>): void;;
新版本信息:401,9300003|AccessibilityExtensionContext.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md index 855f20e9bd20bdf69c6522fa900ca4f8d5b01d45..cedd7fd83f7dd3e14c87954e3d7fd1ee22884f4f 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md @@ -80,78 +80,6 @@ |访问级别有变化|类名:DomainPlugin
访问级别:公开API|类名:DomainPlugin
访问级别:系统API|@ohos.account.osAccount.d.ts| |访问级别有变化|类名:DomainAccountManager
访问级别:公开API|类名:DomainAccountManager
访问级别:系统API|@ohos.account.osAccount.d.ts| |访问级别有变化|类名:UserIdentityManager
访问级别:公开API|类名:UserIdentityManager
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:GetPropertyRequest
方法 or 属性:authType: AuthType;
访问级别:公开API|类名:GetPropertyRequest
方法 or 属性:authType: AuthType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:GetPropertyRequest
方法 or 属性:keys: Array\;
访问级别:公开API|类名:GetPropertyRequest
方法 or 属性:keys: Array\;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:SetPropertyRequest
方法 or 属性:authType: AuthType;
访问级别:公开API|类名:SetPropertyRequest
方法 or 属性:authType: AuthType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:SetPropertyRequest
方法 or 属性:key: SetPropertyType;
访问级别:公开API|类名:SetPropertyRequest
方法 or 属性:key: SetPropertyType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:SetPropertyRequest
方法 or 属性:setInfo: Uint8Array;
访问级别:公开API|类名:SetPropertyRequest
方法 or 属性:setInfo: Uint8Array;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ExecutorProperty
方法 or 属性:result: number;
访问级别:公开API|类名:ExecutorProperty
方法 or 属性:result: number;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ExecutorProperty
方法 or 属性:authSubType: AuthSubType;
访问级别:公开API|类名:ExecutorProperty
方法 or 属性:authSubType: AuthSubType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ExecutorProperty
方法 or 属性:remainTimes?: number;
访问级别:公开API|类名:ExecutorProperty
方法 or 属性:remainTimes?: number;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ExecutorProperty
方法 or 属性:freezingTime?: number;
访问级别:公开API|类名:ExecutorProperty
方法 or 属性:freezingTime?: number;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthResult
方法 or 属性:token?: Uint8Array;
访问级别:公开API|类名:AuthResult
方法 or 属性:token?: Uint8Array;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthResult
方法 or 属性:remainTimes?: number;
访问级别:公开API|类名:AuthResult
方法 or 属性:remainTimes?: number;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthResult
方法 or 属性:freezingTime?: number;
访问级别:公开API|类名:AuthResult
方法 or 属性:freezingTime?: number;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:CredentialInfo
方法 or 属性:credType: AuthType;
访问级别:公开API|类名:CredentialInfo
方法 or 属性:credType: AuthType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:CredentialInfo
方法 or 属性:credSubType: AuthSubType;
访问级别:公开API|类名:CredentialInfo
方法 or 属性:credSubType: AuthSubType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:CredentialInfo
方法 or 属性:token: Uint8Array;
访问级别:公开API|类名:CredentialInfo
方法 or 属性:token: Uint8Array;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:RequestResult
方法 or 属性:credentialId?: Uint8Array;
访问级别:公开API|类名:RequestResult
方法 or 属性:credentialId?: Uint8Array;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:EnrolledCredInfo
方法 or 属性:credentialId: Uint8Array;
访问级别:公开API|类名:EnrolledCredInfo
方法 or 属性:credentialId: Uint8Array;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:EnrolledCredInfo
方法 or 属性:authType: AuthType;
访问级别:公开API|类名:EnrolledCredInfo
方法 or 属性:authType: AuthType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:EnrolledCredInfo
方法 or 属性:authSubType: AuthSubType;
访问级别:公开API|类名:EnrolledCredInfo
方法 or 属性:authSubType: AuthSubType;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:EnrolledCredInfo
方法 or 属性:templateId: Uint8Array;
访问级别:公开API|类名:EnrolledCredInfo
方法 or 属性:templateId: Uint8Array;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:GetPropertyType
方法 or 属性:AUTH_SUB_TYPE = 1
访问级别:公开API|类名:GetPropertyType
方法 or 属性:AUTH_SUB_TYPE = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:GetPropertyType
方法 or 属性:REMAIN_TIMES = 2
访问级别:公开API|类名:GetPropertyType
方法 or 属性:REMAIN_TIMES = 2
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:GetPropertyType
方法 or 属性:FREEZING_TIME = 3
访问级别:公开API|类名:GetPropertyType
方法 or 属性:FREEZING_TIME = 3
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:SetPropertyType
方法 or 属性:INIT_ALGORITHM = 1
访问级别:公开API|类名:SetPropertyType
方法 or 属性:INIT_ALGORITHM = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthType
方法 or 属性:PIN = 1
访问级别:公开API|类名:AuthType
方法 or 属性:PIN = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthType
方法 or 属性:FACE = 2
访问级别:公开API|类名:AuthType
方法 or 属性:FACE = 2
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthType
方法 or 属性:DOMAIN = 1024
访问级别:公开API|类名:AuthType
方法 or 属性:DOMAIN = 1024
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthSubType
方法 or 属性:PIN_SIX = 10000
访问级别:公开API|类名:AuthSubType
方法 or 属性:PIN_SIX = 10000
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthSubType
方法 or 属性:PIN_NUMBER = 10001
访问级别:公开API|类名:AuthSubType
方法 or 属性:PIN_NUMBER = 10001
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthSubType
方法 or 属性:PIN_MIXED = 10002
访问级别:公开API|类名:AuthSubType
方法 or 属性:PIN_MIXED = 10002
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthSubType
方法 or 属性:FACE_2D = 20000
访问级别:公开API|类名:AuthSubType
方法 or 属性:FACE_2D = 20000
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthSubType
方法 or 属性:FACE_3D = 20001
访问级别:公开API|类名:AuthSubType
方法 or 属性:FACE_3D = 20001
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthSubType
方法 or 属性:DOMAIN_MIXED = 10240001
访问级别:公开API|类名:AuthSubType
方法 or 属性:DOMAIN_MIXED = 10240001
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthTrustLevel
方法 or 属性:ATL1 = 10000
访问级别:公开API|类名:AuthTrustLevel
方法 or 属性:ATL1 = 10000
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthTrustLevel
方法 or 属性:ATL2 = 20000
访问级别:公开API|类名:AuthTrustLevel
方法 or 属性:ATL2 = 20000
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthTrustLevel
方法 or 属性:ATL3 = 30000
访问级别:公开API|类名:AuthTrustLevel
方法 or 属性:ATL3 = 30000
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:AuthTrustLevel
方法 or 属性:ATL4 = 40000
访问级别:公开API|类名:AuthTrustLevel
方法 or 属性:ATL4 = 40000
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:Module
方法 or 属性:FACE_AUTH = 1
访问级别:公开API|类名:Module
方法 or 属性:FACE_AUTH = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:SUCCESS = 0
访问级别:公开API|类名:ResultCode
方法 or 属性:SUCCESS = 0
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:FAIL = 1
访问级别:公开API|类名:ResultCode
方法 or 属性:FAIL = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:GENERAL_ERROR = 2
访问级别:公开API|类名:ResultCode
方法 or 属性:GENERAL_ERROR = 2
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:CANCELED = 3
访问级别:公开API|类名:ResultCode
方法 or 属性:CANCELED = 3
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:TIMEOUT = 4
访问级别:公开API|类名:ResultCode
方法 or 属性:TIMEOUT = 4
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:TYPE_NOT_SUPPORT = 5
访问级别:公开API|类名:ResultCode
方法 or 属性:TYPE_NOT_SUPPORT = 5
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:TRUST_LEVEL_NOT_SUPPORT = 6
访问级别:公开API|类名:ResultCode
方法 or 属性:TRUST_LEVEL_NOT_SUPPORT = 6
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:BUSY = 7
访问级别:公开API|类名:ResultCode
方法 or 属性:BUSY = 7
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:INVALID_PARAMETERS = 8
访问级别:公开API|类名:ResultCode
方法 or 属性:INVALID_PARAMETERS = 8
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:LOCKED = 9
访问级别:公开API|类名:ResultCode
方法 or 属性:LOCKED = 9
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ResultCode
方法 or 属性:NOT_ENROLLED = 10
访问级别:公开API|类名:ResultCode
方法 or 属性:NOT_ENROLLED = 10
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_BRIGHT = 1
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_BRIGHT = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_DARK = 2
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_DARK = 2
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_CLOSE = 3
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_CLOSE = 3
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_FAR = 4
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_FAR = 4
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_HIGH = 5
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_HIGH = 5
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_LOW = 6
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_LOW = 6
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_RIGHT = 7
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_RIGHT = 7
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_LEFT = 8
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_LEFT = 8
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_MUCH_MOTION = 9
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_TOO_MUCH_MOTION = 9
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_POOR_GAZE = 10
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_POOR_GAZE = 10
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_NOT_DETECTED = 11
访问级别:公开API|类名:FaceTipsCode
方法 or 属性:FACE_AUTH_TIP_NOT_DETECTED = 11
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_GOOD = 0
访问级别:公开API|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_GOOD = 0
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_IMAGER_DIRTY = 1
访问级别:公开API|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_IMAGER_DIRTY = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_INSUFFICIENT = 2
访问级别:公开API|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_INSUFFICIENT = 2
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_PARTIAL = 3
访问级别:公开API|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_PARTIAL = 3
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_TOO_FAST = 4
访问级别:公开API|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_TOO_FAST = 4
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_TOO_SLOW = 5
访问级别:公开API|类名:FingerprintTips
方法 or 属性:FINGERPRINT_TIP_TOO_SLOW = 5
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_NOT_EXIST = 0
访问级别:公开API|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_NOT_EXIST = 0
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_TYPE_BASE = 1
访问级别:公开API|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_TYPE_BASE = 1
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_TYPE_DEVICE_OWNER = 2
访问级别:公开API|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_TYPE_DEVICE_OWNER = 2
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_TYPE_PROFILE_OWNER = 3
访问级别:公开API|类名:ConstraintSourceType
方法 or 属性:CONSTRAINT_TYPE_PROFILE_OWNER = 3
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ConstraintSourceTypeInfo
方法 or 属性:localId: number;
访问级别:公开API|类名:ConstraintSourceTypeInfo
方法 or 属性:localId: number;
访问级别:系统API|@ohos.account.osAccount.d.ts| -|访问级别有变化|类名:ConstraintSourceTypeInfo
方法 or 属性:type: ConstraintSourceType;
访问级别:公开API|类名:ConstraintSourceTypeInfo
方法 or 属性:type: ConstraintSourceType;
访问级别:系统API|@ohos.account.osAccount.d.ts| |新增(错误码)|NA|类名:UserAuth
方法 or 属性:constructor();
错误码内容: 202|@ohos.account.osAccount.d.ts| |新增(错误码)|NA|类名:UserAuth
方法 or 属性:getVersion(): number;
错误码内容: 202|@ohos.account.osAccount.d.ts| |新增(错误码)|NA|类名:PINAuth
方法 or 属性:constructor();
错误码内容: 202|@ohos.account.osAccount.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md index 5498167e8f45e9760270c23102d129e28169d957..fa18953f61ab032ab3f22eebf4bbff41fa68aae6 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md @@ -66,11 +66,8 @@ |新增|NA|模块名: common
类名: AnimatableArithmetic
方法 or 属性:plus(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| |新增|NA|类名:AnimatableArithmetic
方法or属性:plus(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| |新增|NA|模块名: common
类名: AnimatableArithmetic
方法 or 属性:subtract(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| -|新增|NA|类名:AnimatableArithmetic
方法or属性:subtract(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| |新增|NA|模块名: common
类名: AnimatableArithmetic
方法 or 属性:multiply(scale: number): AnimatableArithmetic\;|common.d.ts| -|新增|NA|类名:AnimatableArithmetic
方法or属性:multiply(scale: number): AnimatableArithmetic\;|common.d.ts| |新增|NA|模块名: common
类名: AnimatableArithmetic
方法 or 属性:equals(rhs: AnimatableArithmetic\): boolean;|common.d.ts| -|新增|NA|类名:AnimatableArithmetic
方法or属性:equals(rhs: AnimatableArithmetic\): boolean;|common.d.ts| |新增|NA|类名:global
方法or属性:declare const Recycle: ClassDecorator;|common.d.ts| |新增|NA|模块名: common
类名: TransitionEdge|common.d.ts| |新增|NA|模块名: common
类名: TransitionEdge
方法 or 属性:TOP|common.d.ts| @@ -566,1473 +563,34 @@ |访问级别有变化|类名:SubscribedAbstractProperty
方法 or 属性:info(): string;
访问级别:系统API|类名:SubscribedAbstractProperty
方法 or 属性:info(): string;
访问级别:公开API|common_ts_ets_api.d.ts| |废弃版本有变化|类名:ShowToastOptions
废弃版本:N/A|类名:ShowToastOptions
废弃版本:8
代替接口:ohos.prompt |@system.prompt.d.ts| |废弃版本有变化|类名:TransitionOptions
废弃版本:N/A|类名:TransitionOptions
废弃版本:10
代替接口:TransitionEffect |common.d.ts| -|废弃版本有变化|类名:PopupOptions
方法 or 属性:placementOnTop?: boolean;
废弃版本:N/A|类名:PopupOptions
方法 or 属性:placementOnTop?: boolean;
废弃版本:10
代替接口:PopupOptions|common.d.ts| -|废弃版本有变化|类名:CustomPopupOptions
方法 or 属性:maskColor?: Color \| string \| Resource \| number;
废弃版本:N/A|类名:CustomPopupOptions
方法 or 属性:maskColor?: Color \| string \| Resource \| number;
废弃版本:10
代替接口:CustomPopupOptions|common.d.ts| -|废弃版本有变化|类名:CommonMethod
方法 or 属性:useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
废弃版本:N/A|类名:CommonMethod
方法 or 属性:useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
废弃版本:9
代替接口:grid_col/|common.d.ts| -|废弃版本有变化|类名:SizeType
废弃版本:N/A|类名:SizeType
废弃版本:9
代替接口:grid_col/|grid_container.d.ts| -|废弃版本有变化|类名:GridContainerOptions
废弃版本:N/A|类名:GridContainerOptions
废弃版本:9
代替接口:grid_col/|grid_container.d.ts| +|废弃版本有变化|类名:PopupOptions
方法 or 属性:placementOnTop?: boolean;
废弃版本:N/A|类名:PopupOptions
方法 or 属性:placementOnTop?: boolean;
废弃版本:10
代替接口:PopupOptions#placement|common.d.ts| +|废弃版本有变化|类名:CustomPopupOptions
方法 or 属性:maskColor?: Color \| string \| Resource \| number;
废弃版本:N/A|类名:CustomPopupOptions
方法 or 属性:maskColor?: Color \| string \| Resource \| number;
废弃版本:10
代替接口:CustomPopupOptions#mask|common.d.ts| +|废弃版本有变化|类名:CommonMethod
方法 or 属性:useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
废弃版本:N/A|类名:CommonMethod
方法 or 属性:useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
废弃版本:9
代替接口:grid_col/[GridColColumnOption] and grid_row/[GridRowColumnOption]|common.d.ts| +|废弃版本有变化|类名:SizeType
废弃版本:N/A|类名:SizeType
废弃版本:9
代替接口:grid_col/[GridColColumnOption] and grid_row/[GridRowColumnOption]|grid_container.d.ts| +|废弃版本有变化|类名:GridContainerOptions
废弃版本:N/A|类名:GridContainerOptions
废弃版本:9
代替接口:grid_col/[GridColOptions] and grid_row/[GridRowOptions]|grid_container.d.ts| |废弃版本有变化|类名:GridContainerOptions
方法 or 属性:columns?: number \| "auto";
废弃版本:N/A|类名:GridContainerOptions
方法 or 属性:columns?: number \| "auto";
废弃版本:9
代替接口:N/A|grid_container.d.ts| |废弃版本有变化|类名:GridContainerOptions
方法 or 属性:sizeType?: SizeType;
废弃版本:N/A|类名:GridContainerOptions
方法 or 属性:sizeType?: SizeType;
废弃版本:9
代替接口:N/A|grid_container.d.ts| |废弃版本有变化|类名:GridContainerOptions
方法 or 属性:gutter?: number \| string;
废弃版本:N/A|类名:GridContainerOptions
方法 or 属性:gutter?: number \| string;
废弃版本:9
代替接口:N/A|grid_container.d.ts| |废弃版本有变化|类名:GridContainerOptions
方法 or 属性:margin?: number \| string;
废弃版本:N/A|类名:GridContainerOptions
方法 or 属性:margin?: number \| string;
废弃版本:9
代替接口:N/A|grid_container.d.ts| -|废弃版本有变化|类名:GridContainerInterface
废弃版本:N/A|类名:GridContainerInterface
废弃版本:9
代替接口:grid_col/|grid_container.d.ts| +|废弃版本有变化|类名:GridContainerInterface
废弃版本:N/A|类名:GridContainerInterface
废弃版本:9
代替接口:grid_col/[GridColInterface] and grid_row/[GridRowInterface]|grid_container.d.ts| |废弃版本有变化|类名:GridContainerInterface
方法 or 属性:(value?: GridContainerOptions): GridContainerAttribute;
废弃版本:N/A|类名:GridContainerInterface
方法 or 属性:(value?: GridContainerOptions): GridContainerAttribute;
废弃版本:9
代替接口:N/A|grid_container.d.ts| -|废弃版本有变化|类名:GridContainerAttribute
废弃版本:N/A|类名:GridContainerAttribute
废弃版本:9
代替接口:grid_col/|grid_container.d.ts| -|废弃版本有变化|类名:ImageAttribute
方法 or 属性:draggable(value: boolean): ImageAttribute;
废弃版本:N/A|类名:ImageAttribute
方法 or 属性:draggable(value: boolean): ImageAttribute;
废弃版本:10
代替接口:common.CommonMethod|image.d.ts| +|废弃版本有变化|类名:GridContainerAttribute
废弃版本:N/A|类名:GridContainerAttribute
废弃版本:9
代替接口:grid_col/[GridColAttribute] and grid_row/[GridRowAttribute]|grid_container.d.ts| +|废弃版本有变化|类名:ImageAttribute
方法 or 属性:draggable(value: boolean): ImageAttribute;
废弃版本:N/A|类名:ImageAttribute
方法 or 属性:draggable(value: boolean): ImageAttribute;
废弃版本:10
代替接口:common.CommonMethod#draggable|image.d.ts| |废弃版本有变化|类名:Sticky
废弃版本:N/A|类名:Sticky
废弃版本:9
代替接口:list/StickyStyle |list_item.d.ts| -|废弃版本有变化|类名:ListItemAttribute
方法 or 属性:sticky(value: Sticky): ListItemAttribute;
废弃版本:N/A|类名:ListItemAttribute
方法 or 属性:sticky(value: Sticky): ListItemAttribute;
废弃版本:9
代替接口:list/List|list_item.d.ts| +|废弃版本有变化|类名:ListItemAttribute
方法 or 属性:sticky(value: Sticky): ListItemAttribute;
废弃版本:N/A|类名:ListItemAttribute
方法 or 属性:sticky(value: Sticky): ListItemAttribute;
废弃版本:9
代替接口:list/List#sticky|list_item.d.ts| |废弃版本有变化|类名:MenuAttribute
方法 or 属性:fontSize(value: Length): MenuAttribute;
废弃版本:N/A|类名:MenuAttribute
方法 or 属性:fontSize(value: Length): MenuAttribute;
废弃版本:10
代替接口:font |menu.d.ts| -|废弃版本有变化|类名:SwiperDisplayMode
方法 or 属性:Stretch
废弃版本:N/A|类名:SwiperDisplayMode
方法 or 属性:Stretch
废弃版本:10
代替接口:SwiperDisplayMode|swiper.d.ts| -|废弃版本有变化|类名:SwiperDisplayMode
方法 or 属性:AutoLinear
废弃版本:N/A|类名:SwiperDisplayMode
方法 or 属性:AutoLinear
废弃版本:10
代替接口:SwiperDisplayMode|swiper.d.ts| +|废弃版本有变化|类名:SwiperDisplayMode
方法 or 属性:Stretch
废弃版本:N/A|类名:SwiperDisplayMode
方法 or 属性:Stretch
废弃版本:10
代替接口:SwiperDisplayMode#STRETCH|swiper.d.ts| +|废弃版本有变化|类名:SwiperDisplayMode
方法 or 属性:AutoLinear
废弃版本:N/A|类名:SwiperDisplayMode
方法 or 属性:AutoLinear
废弃版本:10
代替接口:SwiperDisplayMode#AUTO_LINEAR|swiper.d.ts| |废弃版本有变化|类名:IndicatorStyle
废弃版本:N/A|类名:IndicatorStyle
废弃版本:10
代替接口:N/A|swiper.d.ts| |废弃版本有变化|类名:SwiperAttribute
方法 or 属性:indicatorStyle(value?: IndicatorStyle): SwiperAttribute;
废弃版本:N/A|类名:SwiperAttribute
方法 or 属性:indicatorStyle(value?: IndicatorStyle): SwiperAttribute;
废弃版本:10
代替接口:N/A|swiper.d.ts| |废弃版本有变化|类名:TextPickerAttribute
方法 or 属性:onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
废弃版本:N/A|类名:TextPickerAttribute
方法 or 属性:onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
废弃版本:10
代替接口:N/A|text_picker.d.ts| |废弃版本有变化|类名:TextPickerAttribute
方法 or 属性:onCancel(callback: () => void): TextPickerAttribute;
废弃版本:N/A|类名:TextPickerAttribute
方法 or 属性:onCancel(callback: () => void): TextPickerAttribute;
废弃版本:10
代替接口:N/A|text_picker.d.ts| -|废弃版本有变化|类名:WebAttribute
方法 or 属性:onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
废弃版本:N/A|类名:WebAttribute
方法 or 属性:onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
废弃版本:10
代替接口:ohos.web.WebAttribute|web.d.ts| -|起始版本有变化|类名:
方法 or 属性: function setInterval(handler: Function \| string, delay: number, ...arguments: any[]): number;
起始版本:7|类名:
方法 or 属性: function setInterval(handler: Function \| string, delay: number, ...arguments: any[]): number;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function setTimeout(handler: Function \| string, delay?: number, ...arguments: any[]): number;
起始版本:7|类名:
方法 or 属性: function setTimeout(handler: Function \| string, delay?: number, ...arguments: any[]): number;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function clearInterval(intervalID?: number): void;
起始版本:7|类名:
方法 or 属性: function clearInterval(intervalID?: number): void;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function clearTimeout(timeoutID?: number): void;
起始版本:7|类名:
方法 or 属性: function clearTimeout(timeoutID?: number): void;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function canIUse(syscap: string): boolean;
起始版本:8|类名:
方法 or 属性: function canIUse(syscap: string): boolean;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function getInspectorByKey(id: string): string;
起始版本:9|类名:
方法 or 属性: function getInspectorByKey(id: string): string;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function getInspectorTree(): Object;
起始版本:9|类名:
方法 or 属性: function getInspectorTree(): Object;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function sendEventByKey(id: string, action: number, params: string): boolean;
起始版本:9|类名:
方法 or 属性: function sendEventByKey(id: string, action: number, params: string): boolean;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function sendTouchEvent(event: TouchObject): boolean;
起始版本:9|类名:
方法 or 属性: function sendTouchEvent(event: TouchObject): boolean;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function sendKeyEvent(event: KeyEvent): boolean;
起始版本:9|类名:
方法 or 属性: function sendKeyEvent(event: KeyEvent): boolean;
起始版本:10|global.d.ts| -|起始版本有变化|类名:
方法 or 属性: function sendMouseEvent(event: MouseEvent): boolean;
起始版本:9|类名:
方法 or 属性: function sendMouseEvent(event: MouseEvent): boolean;
起始版本:10|global.d.ts| -|起始版本有变化|类名:AnimatorOptions
起始版本:6|类名:AnimatorOptions
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:duration: number;
起始版本:6|类名:AnimatorOptions
方法 or 属性:duration: number;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:easing: string;
起始版本:6|类名:AnimatorOptions
方法 or 属性:easing: string;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:delay: number;
起始版本:6|类名:AnimatorOptions
方法 or 属性:delay: number;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:fill: "none" \| "forwards" \| "backwards" \| "both";
起始版本:6|类名:AnimatorOptions
方法 or 属性:fill: "none" \| "forwards" \| "backwards" \| "both";
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:direction: "normal" \| "reverse" \| "alternate" \| "alternate-reverse";
起始版本:6|类名:AnimatorOptions
方法 or 属性:direction: "normal" \| "reverse" \| "alternate" \| "alternate-reverse";
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:iterations: number;
起始版本:6|类名:AnimatorOptions
方法 or 属性:iterations: number;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:begin: number;
起始版本:6|类名:AnimatorOptions
方法 or 属性:begin: number;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorOptions
方法 or 属性:end: number;
起始版本:6|类名:AnimatorOptions
方法 or 属性:end: number;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
起始版本:6|类名:AnimatorResult
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:reset(options: AnimatorOptions): void;
起始版本:9|类名:AnimatorResult
方法 or 属性:reset(options: AnimatorOptions): void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:play(): void;
起始版本:6|类名:AnimatorResult
方法 or 属性:play(): void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:finish(): void;
起始版本:6|类名:AnimatorResult
方法 or 属性:finish(): void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:pause(): void;
起始版本:6|类名:AnimatorResult
方法 or 属性:pause(): void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:cancel(): void;
起始版本:6|类名:AnimatorResult
方法 or 属性:cancel(): void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:reverse(): void;
起始版本:6|类名:AnimatorResult
方法 or 属性:reverse(): void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:onframe: (progress: number) => void;
起始版本:6|类名:AnimatorResult
方法 or 属性:onframe: (progress: number) => void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:onfinish: () => void;
起始版本:6|类名:AnimatorResult
方法 or 属性:onfinish: () => void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:oncancel: () => void;
起始版本:6|类名:AnimatorResult
方法 or 属性:oncancel: () => void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:AnimatorResult
方法 or 属性:onrepeat: () => void;
起始版本:6|类名:AnimatorResult
方法 or 属性:onrepeat: () => void;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:Animator
起始版本:6|类名:Animator
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:Animator
方法 or 属性:static create(options: AnimatorOptions): AnimatorResult;
起始版本:9|类名:Animator
方法 or 属性:static create(options: AnimatorOptions): AnimatorResult;
起始版本:10|@ohos.animator.d.ts| -|起始版本有变化|类名:curves
起始版本:7|类名:curves
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:Curve
起始版本:7|类名:Curve
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:ICurve
起始版本:9|类名:ICurve
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:curves
方法 or 属性:function initCurve(curve?: Curve): ICurve;
起始版本:9|类名:curves
方法 or 属性:function initCurve(curve?: Curve): ICurve;
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:curves
方法 or 属性:function stepsCurve(count: number, end: boolean): ICurve;
起始版本:9|类名:curves
方法 or 属性:function stepsCurve(count: number, end: boolean): ICurve;
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:curves
方法 or 属性:function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve;
起始版本:9|类名:curves
方法 or 属性:function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve;
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:curves
方法 or 属性:function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
起始版本:9|类名:curves
方法 or 属性:function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:curves
方法 or 属性:function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
起始版本:9|类名:curves
方法 or 属性:function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:curves
方法 or 属性:function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
起始版本:9|类名:curves
方法 or 属性:function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
起始版本:10|@ohos.curves.d.ts| -|起始版本有变化|类名:matrix4
起始版本:7|类名:matrix4
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:TranslateOption
起始版本:7|类名:TranslateOption
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:TranslateOption
方法 or 属性:x?: number;
起始版本:7|类名:TranslateOption
方法 or 属性:x?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:TranslateOption
方法 or 属性:y?: number;
起始版本:7|类名:TranslateOption
方法 or 属性:y?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:TranslateOption
方法 or 属性:z?: number;
起始版本:7|类名:TranslateOption
方法 or 属性:z?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:ScaleOption
起始版本:7|类名:ScaleOption
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:ScaleOption
方法 or 属性:x?: number;
起始版本:7|类名:ScaleOption
方法 or 属性:x?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:ScaleOption
方法 or 属性:y?: number;
起始版本:7|类名:ScaleOption
方法 or 属性:y?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:ScaleOption
方法 or 属性:z?: number;
起始版本:7|类名:ScaleOption
方法 or 属性:z?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:ScaleOption
方法 or 属性:centerX?: number;
起始版本:7|类名:ScaleOption
方法 or 属性:centerX?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:ScaleOption
方法 or 属性:centerY?: number;
起始版本:7|类名:ScaleOption
方法 or 属性:centerY?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:RotateOption
起始版本:7|类名:RotateOption
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:RotateOption
方法 or 属性:x?: number;
起始版本:7|类名:RotateOption
方法 or 属性:x?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:RotateOption
方法 or 属性:y?: number;
起始版本:7|类名:RotateOption
方法 or 属性:y?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:RotateOption
方法 or 属性:z?: number;
起始版本:7|类名:RotateOption
方法 or 属性:z?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:RotateOption
方法 or 属性:centerX?: number;
起始版本:7|类名:RotateOption
方法 or 属性:centerX?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:RotateOption
方法 or 属性:centerY?: number;
起始版本:7|类名:RotateOption
方法 or 属性:centerY?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:RotateOption
方法 or 属性:angle?: number;
起始版本:7|类名:RotateOption
方法 or 属性:angle?: number;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
起始版本:7|类名:Matrix4Transit
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
方法 or 属性:copy(): Matrix4Transit;
起始版本:7|类名:Matrix4Transit
方法 or 属性:copy(): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
方法 or 属性:invert(): Matrix4Transit;
起始版本:7|类名:Matrix4Transit
方法 or 属性:invert(): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
方法 or 属性:combine(options: Matrix4Transit): Matrix4Transit;
起始版本:7|类名:Matrix4Transit
方法 or 属性:combine(options: Matrix4Transit): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
方法 or 属性:translate(options: TranslateOption): Matrix4Transit;
起始版本:7|类名:Matrix4Transit
方法 or 属性:translate(options: TranslateOption): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
方法 or 属性:scale(options: ScaleOption): Matrix4Transit;
起始版本:7|类名:Matrix4Transit
方法 or 属性:scale(options: ScaleOption): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
方法 or 属性:rotate(options: RotateOption): Matrix4Transit;
起始版本:7|类名:Matrix4Transit
方法 or 属性:rotate(options: RotateOption): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:Matrix4Transit
方法 or 属性:transformPoint(options: [number, number]): [number, number];
起始版本:7|类名:Matrix4Transit
方法 or 属性:transformPoint(options: [number, number]): [number, number];
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function identity(): Matrix4Transit;
起始版本:7|类名:matrix4
方法 or 属性:function identity(): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function copy(): Matrix4Transit;
起始版本:7|类名:matrix4
方法 or 属性:function copy(): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function invert(): Matrix4Transit;
起始版本:7|类名:matrix4
方法 or 属性:function invert(): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function combine(options: Matrix4Transit): Matrix4Transit;
起始版本:7|类名:matrix4
方法 or 属性:function combine(options: Matrix4Transit): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function translate(options: TranslateOption): Matrix4Transit;
起始版本:7|类名:matrix4
方法 or 属性:function translate(options: TranslateOption): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function scale(options: ScaleOption): Matrix4Transit;
起始版本:7|类名:matrix4
方法 or 属性:function scale(options: ScaleOption): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function rotate(options: RotateOption): Matrix4Transit;
起始版本:7|类名:matrix4
方法 or 属性:function rotate(options: RotateOption): Matrix4Transit;
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:matrix4
方法 or 属性:function transformPoint(options: [number, number]): [number, number];
起始版本:7|类名:matrix4
方法 or 属性:function transformPoint(options: [number, number]): [number, number];
起始版本:10|@ohos.matrix4.d.ts| -|起始版本有变化|类名:mediaquery
起始版本:7|类名:mediaquery
起始版本:10|@ohos.mediaquery.d.ts| -|起始版本有变化|类名:MediaQueryResult
方法 or 属性:readonly matches: boolean;
起始版本:7|类名:MediaQueryResult
方法 or 属性:readonly matches: boolean;
起始版本:10|@ohos.mediaquery.d.ts| -|起始版本有变化|类名:MediaQueryResult
方法 or 属性:readonly media: string;
起始版本:7|类名:MediaQueryResult
方法 or 属性:readonly media: string;
起始版本:10|@ohos.mediaquery.d.ts| -|起始版本有变化|类名:MediaQueryListener
方法 or 属性:on(type: 'change', callback: Callback\): void;
起始版本:7|类名:MediaQueryListener
方法 or 属性:on(type: 'change', callback: Callback\): void;
起始版本:10|@ohos.mediaquery.d.ts| -|起始版本有变化|类名:MediaQueryListener
方法 or 属性:off(type: 'change', callback?: Callback\): void;
起始版本:7|类名:MediaQueryListener
方法 or 属性:off(type: 'change', callback?: Callback\): void;
起始版本:10|@ohos.mediaquery.d.ts| -|起始版本有变化|类名:mediaquery
方法 or 属性:function matchMediaSync(condition: string): MediaQueryListener;
起始版本:7|类名:mediaquery
方法 or 属性:function matchMediaSync(condition: string): MediaQueryListener;
起始版本:10|@ohos.mediaquery.d.ts| -|起始版本有变化|类名:promptAction
起始版本:9|类名:promptAction
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowToastOptions
起始版本:9|类名:ShowToastOptions
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowToastOptions
方法 or 属性:message: string \| Resource;
起始版本:9|类名:ShowToastOptions
方法 or 属性:message: string \| Resource;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowToastOptions
方法 or 属性:duration?: number;
起始版本:9|类名:ShowToastOptions
方法 or 属性:duration?: number;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowToastOptions
方法 or 属性:bottom?: string \| number;
起始版本:9|类名:ShowToastOptions
方法 or 属性:bottom?: string \| number;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:Button
起始版本:9|类名:Button
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:Button
方法 or 属性:text: string \| Resource;
起始版本:9|类名:Button
方法 or 属性:text: string \| Resource;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:Button
方法 or 属性:color: string \| Resource;
起始版本:9|类名:Button
方法 or 属性:color: string \| Resource;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowDialogSuccessResponse
起始版本:9|类名:ShowDialogSuccessResponse
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowDialogSuccessResponse
方法 or 属性:index: number;
起始版本:9|类名:ShowDialogSuccessResponse
方法 or 属性:index: number;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowDialogOptions
起始版本:9|类名:ShowDialogOptions
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowDialogOptions
方法 or 属性:title?: string \| Resource;
起始版本:9|类名:ShowDialogOptions
方法 or 属性:title?: string \| Resource;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowDialogOptions
方法 or 属性:message?: string \| Resource;
起始版本:9|类名:ShowDialogOptions
方法 or 属性:message?: string \| Resource;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ShowDialogOptions
方法 or 属性:buttons?: [Button, Button?, Button?];
起始版本:9|类名:ShowDialogOptions
方法 or 属性:buttons?: [Button, Button?, Button?];
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ActionMenuSuccessResponse
起始版本:9|类名:ActionMenuSuccessResponse
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ActionMenuSuccessResponse
方法 or 属性:index: number;
起始版本:9|类名:ActionMenuSuccessResponse
方法 or 属性:index: number;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ActionMenuOptions
起始版本:9|类名:ActionMenuOptions
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ActionMenuOptions
方法 or 属性:title?: string \| Resource;
起始版本:9|类名:ActionMenuOptions
方法 or 属性:title?: string \| Resource;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:ActionMenuOptions
方法 or 属性:buttons: [Button, Button?, Button?, Button?, Button?, Button?];
起始版本:9|类名:ActionMenuOptions
方法 or 属性:buttons: [Button, Button?, Button?, Button?, Button?, Button?];
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:promptAction
方法 or 属性:function showDialog(options: ShowDialogOptions): Promise\;
起始版本:9|类名:promptAction
方法 or 属性:function showDialog(options: ShowDialogOptions): Promise\;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:promptAction
方法 or 属性:function showActionMenu(options: ActionMenuOptions): Promise\;
起始版本:9|类名:promptAction
方法 or 属性:function showActionMenu(options: ActionMenuOptions): Promise\;
起始版本:10|@ohos.promptAction.d.ts| -|起始版本有变化|类名:SheetInfo
起始版本:8|类名:SheetInfo
起始版本:10|action_sheet.d.ts| -|起始版本有变化|类名:SheetInfo
方法 or 属性:title: string \| Resource;
起始版本:8|类名:SheetInfo
方法 or 属性:title: string \| Resource;
起始版本:10|action_sheet.d.ts| -|起始版本有变化|类名:SheetInfo
方法 or 属性:icon?: string \| Resource;
起始版本:8|类名:SheetInfo
方法 or 属性:icon?: string \| Resource;
起始版本:10|action_sheet.d.ts| -|起始版本有变化|类名:SheetInfo
方法 or 属性:action: () => void;
起始版本:8|类名:SheetInfo
方法 or 属性:action: () => void;
起始版本:10|action_sheet.d.ts| -|起始版本有变化|类名:ActionSheet
起始版本:8|类名:ActionSheet
起始版本:10|action_sheet.d.ts| -|起始版本有变化|类名:DialogAlignment
起始版本:7|类名:DialogAlignment
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:Top
起始版本:7|类名:DialogAlignment
方法 or 属性:Top
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:Center
起始版本:7|类名:DialogAlignment
方法 or 属性:Center
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:Bottom
起始版本:7|类名:DialogAlignment
方法 or 属性:Bottom
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:Default
起始版本:7|类名:DialogAlignment
方法 or 属性:Default
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:TopStart
起始版本:8|类名:DialogAlignment
方法 or 属性:TopStart
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:TopEnd
起始版本:8|类名:DialogAlignment
方法 or 属性:TopEnd
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:CenterStart
起始版本:8|类名:DialogAlignment
方法 or 属性:CenterStart
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:CenterEnd
起始版本:8|类名:DialogAlignment
方法 or 属性:CenterEnd
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:BottomStart
起始版本:8|类名:DialogAlignment
方法 or 属性:BottomStart
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:DialogAlignment
方法 or 属性:BottomEnd
起始版本:8|类名:DialogAlignment
方法 or 属性:BottomEnd
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
起始版本:7|类名:AlertDialogParam
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
方法 or 属性:title?: ResourceStr;
起始版本:7|类名:AlertDialogParam
方法 or 属性:title?: ResourceStr;
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
方法 or 属性:message: ResourceStr;
起始版本:7|类名:AlertDialogParam
方法 or 属性:message: ResourceStr;
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
方法 or 属性:autoCancel?: boolean;
起始版本:7|类名:AlertDialogParam
方法 or 属性:autoCancel?: boolean;
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
方法 or 属性:cancel?: () => void;
起始版本:7|类名:AlertDialogParam
方法 or 属性:cancel?: () => void;
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
方法 or 属性:alignment?: DialogAlignment;
起始版本:7|类名:AlertDialogParam
方法 or 属性:alignment?: DialogAlignment;
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
方法 or 属性:offset?: Offset;
起始版本:7|类名:AlertDialogParam
方法 or 属性:offset?: Offset;
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParam
方法 or 属性:gridCount?: number;
起始版本:7|类名:AlertDialogParam
方法 or 属性:gridCount?: number;
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParamWithConfirm
起始版本:7|类名:AlertDialogParamWithConfirm
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialogParamWithButtons
起始版本:7|类名:AlertDialogParamWithButtons
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialog
起始版本:7|类名:AlertDialog
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:AlertDialog
方法 or 属性:static show(value: AlertDialogParamWithConfirm \| AlertDialogParamWithButtons);
起始版本:7|类名:AlertDialog
方法 or 属性:static show(value: AlertDialogParamWithConfirm \| AlertDialogParamWithButtons);
起始版本:10|alert_dialog.d.ts| -|起始版本有变化|类名:IndexerAlign
起始版本:7|类名:IndexerAlign
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:IndexerAlign
方法 or 属性:Left
起始版本:7|类名:IndexerAlign
方法 or 属性:Left
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:IndexerAlign
方法 or 属性:Right
起始版本:7|类名:IndexerAlign
方法 or 属性:Right
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerInterface
起始版本:7|类名:AlphabetIndexerInterface
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerInterface
方法 or 属性:(value: { arrayValue: Array\; selected: number }): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerInterface
方法 or 属性:(value: { arrayValue: Array\; selected: number }): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
起始版本:7|类名:AlphabetIndexerAttribute
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:color(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:color(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:selectedColor(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:selectedColor(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:popupColor(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:popupColor(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:popupBackground(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:popupBackground(value: ResourceColor): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:usingPopup(value: boolean): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:usingPopup(value: boolean): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:selectedFont(value: Font): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:selectedFont(value: Font): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:popupFont(value: Font): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:popupFont(value: Font): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:itemSize(value: string \| number): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:itemSize(value: string \| number): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:font(value: Font): AlphabetIndexerAttribute;
起始版本:7|类名:AlphabetIndexerAttribute
方法 or 属性:font(value: Font): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:onSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
起始版本:8|类名:AlphabetIndexerAttribute
方法 or 属性:onSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:onRequestPopupData(callback: (index: number) => Array\): AlphabetIndexerAttribute;
起始版本:8|类名:AlphabetIndexerAttribute
方法 or 属性:onRequestPopupData(callback: (index: number) => Array\): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
起始版本:8|类名:AlphabetIndexerAttribute
方法 or 属性:onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:selected(index: number): AlphabetIndexerAttribute;
起始版本:8|类名:AlphabetIndexerAttribute
方法 or 属性:selected(index: number): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:AlphabetIndexerAttribute
方法 or 属性:popupPosition(value: Position): AlphabetIndexerAttribute;
起始版本:8|类名:AlphabetIndexerAttribute
方法 or 属性:popupPosition(value: Position): AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const AlphabetIndexer: AlphabetIndexerInterface;
起始版本:7|类名:global
方法 or 属性:declare const AlphabetIndexer: AlphabetIndexerInterface;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const AlphabetIndexerInstance: AlphabetIndexerAttribute;
起始版本:7|类名:global
方法 or 属性:declare const AlphabetIndexerInstance: AlphabetIndexerAttribute;
起始版本:10|alphabet_indexer.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const AnimatorInstance: AnimatorAttribute;
起始版本:7|类名:global
方法 or 属性:declare const AnimatorInstance: AnimatorAttribute;
起始版本:9|animator.d.ts| -|起始版本有变化|类名:CalendarDay
起始版本:7|类名:CalendarDay
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:index: number;
起始版本:7|类名:CalendarDay
方法 or 属性:index: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:lunarMonth: string;
起始版本:7|类名:CalendarDay
方法 or 属性:lunarMonth: string;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:lunarDay: string;
起始版本:7|类名:CalendarDay
方法 or 属性:lunarDay: string;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:dayMark: string;
起始版本:7|类名:CalendarDay
方法 or 属性:dayMark: string;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:dayMarkValue: string;
起始版本:7|类名:CalendarDay
方法 or 属性:dayMarkValue: string;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:year: number;
起始版本:7|类名:CalendarDay
方法 or 属性:year: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:month: number;
起始版本:7|类名:CalendarDay
方法 or 属性:month: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:day: number;
起始版本:7|类名:CalendarDay
方法 or 属性:day: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:isFirstOfLunar: boolean;
起始版本:7|类名:CalendarDay
方法 or 属性:isFirstOfLunar: boolean;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:hasSchedule: boolean;
起始版本:7|类名:CalendarDay
方法 or 属性:hasSchedule: boolean;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarDay
方法 or 属性:markLunarDay: boolean;
起始版本:7|类名:CalendarDay
方法 or 属性:markLunarDay: boolean;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:MonthData
起始版本:7|类名:MonthData
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:MonthData
方法 or 属性:year: number;
起始版本:7|类名:MonthData
方法 or 属性:year: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:MonthData
方法 or 属性:month: number;
起始版本:7|类名:MonthData
方法 or 属性:month: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:MonthData
方法 or 属性:data: CalendarDay[];
起始版本:7|类名:MonthData
方法 or 属性:data: CalendarDay[];
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
起始版本:7|类名:CurrentDayStyle
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:dayColor?: ResourceColor;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:dayColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:lunarColor?: ResourceColor;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:lunarColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:markLunarColor?: ResourceColor;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:markLunarColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:dayFontSize?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:dayFontSize?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:lunarDayFontSize?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:lunarDayFontSize?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:dayHeight?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:dayHeight?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:dayWidth?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:dayWidth?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:gregorianCalendarHeight?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:gregorianCalendarHeight?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:dayYAxisOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:dayYAxisOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:lunarDayYAxisOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:lunarDayYAxisOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:underscoreXAxisOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:underscoreXAxisOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:underscoreYAxisOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:underscoreYAxisOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:scheduleMarkerXAxisOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:scheduleMarkerXAxisOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:scheduleMarkerYAxisOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:scheduleMarkerYAxisOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:colSpace?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:colSpace?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:dailyFiveRowSpace?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:dailyFiveRowSpace?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:dailySixRowSpace?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:dailySixRowSpace?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:lunarHeight?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:lunarHeight?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:underscoreWidth?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:underscoreWidth?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:underscoreLength?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:underscoreLength?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:scheduleMarkerRadius?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:scheduleMarkerRadius?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:boundaryRowOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:boundaryRowOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CurrentDayStyle
方法 or 属性:boundaryColOffset?: number;
起始版本:7|类名:CurrentDayStyle
方法 or 属性:boundaryColOffset?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:NonCurrentDayStyle
起始版本:7|类名:NonCurrentDayStyle
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthDayColor?: ResourceColor;
起始版本:7|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthDayColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthLunarColor?: ResourceColor;
起始版本:7|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthLunarColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthWorkDayMarkColor?: ResourceColor;
起始版本:7|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthWorkDayMarkColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthOffDayMarkColor?: ResourceColor;
起始版本:7|类名:NonCurrentDayStyle
方法 or 属性:nonCurrentMonthOffDayMarkColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:TodayStyle
起始版本:7|类名:TodayStyle
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:TodayStyle
方法 or 属性:focusedDayColor?: ResourceColor;
起始版本:7|类名:TodayStyle
方法 or 属性:focusedDayColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:TodayStyle
方法 or 属性:focusedLunarColor?: ResourceColor;
起始版本:7|类名:TodayStyle
方法 or 属性:focusedLunarColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:TodayStyle
方法 or 属性:focusedAreaBackgroundColor?: ResourceColor;
起始版本:7|类名:TodayStyle
方法 or 属性:focusedAreaBackgroundColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:TodayStyle
方法 or 属性:focusedAreaRadius?: number;
起始版本:7|类名:TodayStyle
方法 or 属性:focusedAreaRadius?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
起始版本:7|类名:WeekStyle
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
方法 or 属性:weekColor?: ResourceColor;
起始版本:7|类名:WeekStyle
方法 or 属性:weekColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
方法 or 属性:weekendDayColor?: ResourceColor;
起始版本:7|类名:WeekStyle
方法 or 属性:weekendDayColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
方法 or 属性:weekendLunarColor?: ResourceColor;
起始版本:7|类名:WeekStyle
方法 or 属性:weekendLunarColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
方法 or 属性:weekFontSize?: number;
起始版本:7|类名:WeekStyle
方法 or 属性:weekFontSize?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
方法 or 属性:weekHeight?: number;
起始版本:7|类名:WeekStyle
方法 or 属性:weekHeight?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
方法 or 属性:weekWidth?: number;
起始版本:7|类名:WeekStyle
方法 or 属性:weekWidth?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WeekStyle
方法 or 属性:weekAndDayRowSpace?: number;
起始版本:7|类名:WeekStyle
方法 or 属性:weekAndDayRowSpace?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
起始版本:7|类名:WorkStateStyle
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
方法 or 属性:workDayMarkColor?: ResourceColor;
起始版本:7|类名:WorkStateStyle
方法 or 属性:workDayMarkColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
方法 or 属性:offDayMarkColor?: ResourceColor;
起始版本:7|类名:WorkStateStyle
方法 or 属性:offDayMarkColor?: ResourceColor;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
方法 or 属性:workDayMarkSize?: number;
起始版本:7|类名:WorkStateStyle
方法 or 属性:workDayMarkSize?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
方法 or 属性:offDayMarkSize?: number;
起始版本:7|类名:WorkStateStyle
方法 or 属性:offDayMarkSize?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
方法 or 属性:workStateWidth?: number;
起始版本:7|类名:WorkStateStyle
方法 or 属性:workStateWidth?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
方法 or 属性:workStateHorizontalMovingDistance?: number;
起始版本:7|类名:WorkStateStyle
方法 or 属性:workStateHorizontalMovingDistance?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:WorkStateStyle
方法 or 属性:workStateVerticalMovingDistance?: number;
起始版本:7|类名:WorkStateStyle
方法 or 属性:workStateVerticalMovingDistance?: number;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarController
起始版本:7|类名:CalendarController
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarController
方法 or 属性:constructor();
起始版本:7|类名:CalendarController
方法 or 属性:constructor();
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarController
方法 or 属性:backToToday();
起始版本:7|类名:CalendarController
方法 or 属性:backToToday();
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarController
方法 or 属性:goTo(value: { year: number; month: number; day: number });
起始版本:7|类名:CalendarController
方法 or 属性:goTo(value: { year: number; month: number; day: number });
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarInterface
起始版本:7|类名:CalendarInterface
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarInterface
方法 or 属性:(value: {
date: { year: number; month: number; day: number };
currentData: MonthData;
preData: MonthData;
nextData: MonthData;
controller?: CalendarController;
}): CalendarAttribute;
起始版本:7|类名:CalendarInterface
方法 or 属性:(value: {
date: { year: number; month: number; day: number };
currentData: MonthData;
preData: MonthData;
nextData: MonthData;
controller?: CalendarController;
}): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
起始版本:7|类名:CalendarAttribute
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:showLunar(value: boolean): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:showLunar(value: boolean): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:showHoliday(value: boolean): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:showHoliday(value: boolean): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:needSlide(value: boolean): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:needSlide(value: boolean): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:startOfWeek(value: number): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:startOfWeek(value: number): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:offDays(value: number): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:offDays(value: number): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:direction(value: Axis): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:direction(value: Axis): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:currentDayStyle(value: CurrentDayStyle): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:currentDayStyle(value: CurrentDayStyle): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:todayStyle(value: TodayStyle): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:todayStyle(value: TodayStyle): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:weekStyle(value: WeekStyle): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:weekStyle(value: WeekStyle): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:workStateStyle(value: WorkStateStyle): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:workStateStyle(value: WorkStateStyle): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:CalendarAttribute
方法 or 属性:onRequestData(
event: (event: {
year: number;
month: number;
currentYear: number;
currentMonth: number;
monthState: number;
}) => void,
): CalendarAttribute;
起始版本:7|类名:CalendarAttribute
方法 or 属性:onRequestData(
event: (event: {
year: number;
month: number;
currentYear: number;
currentMonth: number;
monthState: number;
}) => void,
): CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Calendar: CalendarInterface;
起始版本:7|类名:global
方法 or 属性:declare const Calendar: CalendarInterface;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const CalendarInstance: CalendarAttribute;
起始版本:7|类名:global
方法 or 属性:declare const CalendarInstance: CalendarAttribute;
起始版本:10|calendar.d.ts| -|起始版本有变化|类名:ImageBitmap
方法 or 属性:constructor(data: PixelMap);
起始版本:8|类名:ImageBitmap
方法 or 属性:constructor(data: PixelMap);
起始版本:10|canvas.d.ts| -|起始版本有变化|类名:CanvasRenderer
方法 or 属性:getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap;
起始版本:8|类名:CanvasRenderer
方法 or 属性:getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap;
起始版本:10|canvas.d.ts| -|起始版本有变化|类名:CanvasRenderer
方法 or 属性:setPixelMap(value?: PixelMap): void;
起始版本:8|类名:CanvasRenderer
方法 or 属性:setPixelMap(value?: PixelMap): void;
起始版本:10|canvas.d.ts| -|起始版本有变化|类名:ColumnSplitInterface
起始版本:7|类名:ColumnSplitInterface
起始版本:10|column_split.d.ts| -|起始版本有变化|类名:ColumnSplitInterface
方法 or 属性:(): ColumnSplitAttribute;
起始版本:7|类名:ColumnSplitInterface
方法 or 属性:(): ColumnSplitAttribute;
起始版本:10|column_split.d.ts| -|起始版本有变化|类名:ColumnSplitAttribute
起始版本:7|类名:ColumnSplitAttribute
起始版本:10|column_split.d.ts| -|起始版本有变化|类名:ColumnSplitAttribute
方法 or 属性:resizeable(value: boolean): ColumnSplitAttribute;
起始版本:7|类名:ColumnSplitAttribute
方法 or 属性:resizeable(value: boolean): ColumnSplitAttribute;
起始版本:10|column_split.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ColumnSplitInstance: ColumnSplitAttribute;
起始版本:7|类名:global
方法 or 属性:declare const ColumnSplitInstance: ColumnSplitAttribute;
起始版本:10|column_split.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ColumnSplit: ColumnSplitInterface;
起始版本:7|类名:global
方法 or 属性:declare const ColumnSplit: ColumnSplitInterface;
起始版本:10|column_split.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const StorageProp: (value: string) => PropertyDecorator;
起始版本:7|类名:global
方法 or 属性:declare const StorageProp: (value: string) => PropertyDecorator;
起始版本:10|common.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const StorageLink: (value: string) => PropertyDecorator;
起始版本:7|类名:global
方法 or 属性:declare const StorageLink: (value: string) => PropertyDecorator;
起始版本:10|common.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Concurrent: MethodDecorator;
起始版本:9|类名:global
方法 or 属性:declare const Concurrent: MethodDecorator;
起始版本:10|common.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const CustomDialog: ClassDecorator;
起始版本:7|类名:global
方法 or 属性:declare const CustomDialog: ClassDecorator;
起始版本:10|common.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const LocalStorageLink: (value: string) => PropertyDecorator;
起始版本:9|类名:global
方法 or 属性:declare const LocalStorageLink: (value: string) => PropertyDecorator;
起始版本:10|common.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const LocalStorageProp: (value: string) => PropertyDecorator;
起始版本:9|类名:global
方法 or 属性:declare const LocalStorageProp: (value: string) => PropertyDecorator;
起始版本:10|common.d.ts| -|起始版本有变化|类名:
方法 or 属性:function getContext(component?: Object): Context;
起始版本:9|类名:
方法 or 属性:function getContext(component?: Object): Context;
起始版本:10|common.d.ts| -|起始版本有变化|类名:
方法 or 属性:function postCardAction(component: Object, action: Object): void;
起始版本:9|类名:
方法 or 属性:function postCardAction(component: Object, action: Object): void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:AnimateParam
方法 or 属性:tempo?: number;
起始版本:7|类名:AnimateParam
方法 or 属性:tempo?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:AnimateParam
方法 or 属性:delay?: number;
起始版本:7|类名:AnimateParam
方法 or 属性:delay?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:AnimateParam
方法 or 属性:iterations?: number;
起始版本:7|类名:AnimateParam
方法 or 属性:iterations?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:ICurve
起始版本:9|类名:ICurve
起始版本:10|common.d.ts| -|起始版本有变化|类名:MotionPathOptions
起始版本:7|类名:MotionPathOptions
起始版本:10|common.d.ts| -|起始版本有变化|类名:MotionPathOptions
方法 or 属性:path: string;
起始版本:7|类名:MotionPathOptions
方法 or 属性:path: string;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MotionPathOptions
方法 or 属性:from?: number;
起始版本:7|类名:MotionPathOptions
方法 or 属性:from?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MotionPathOptions
方法 or 属性:to?: number;
起始版本:7|类名:MotionPathOptions
方法 or 属性:to?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MotionPathOptions
方法 or 属性:rotatable?: boolean;
起始版本:7|类名:MotionPathOptions
方法 or 属性:rotatable?: boolean;
起始版本:10|common.d.ts| -|起始版本有变化|类名:sharedTransitionOptions
起始版本:7|类名:sharedTransitionOptions
起始版本:10|common.d.ts| -|起始版本有变化|类名:sharedTransitionOptions
方法 or 属性:duration?: number;
起始版本:7|类名:sharedTransitionOptions
方法 or 属性:duration?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:sharedTransitionOptions
方法 or 属性:curve?: Curve \| string;
起始版本:7|类名:sharedTransitionOptions
方法 or 属性:curve?: Curve \| string;
起始版本:10|common.d.ts| -|起始版本有变化|类名:sharedTransitionOptions
方法 or 属性:delay?: number;
起始版本:7|类名:sharedTransitionOptions
方法 or 属性:delay?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:sharedTransitionOptions
方法 or 属性:motionPath?: MotionPathOptions;
起始版本:7|类名:sharedTransitionOptions
方法 or 属性:motionPath?: MotionPathOptions;
起始版本:10|common.d.ts| -|起始版本有变化|类名:sharedTransitionOptions
方法 or 属性:zIndex?: number;
起始版本:7|类名:sharedTransitionOptions
方法 or 属性:zIndex?: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:sharedTransitionOptions
方法 or 属性:type?: SharedTransitionEffectType;
起始版本:7|类名:sharedTransitionOptions
方法 or 属性:type?: SharedTransitionEffectType;
起始版本:10|common.d.ts| -|起始版本有变化|类名:AlignRuleOption
起始版本:9|类名:AlignRuleOption
起始版本:10|common.d.ts| -|起始版本有变化|类名:AlignRuleOption
方法 or 属性:left?: { anchor: string, align: HorizontalAlign };
起始版本:9|类名:AlignRuleOption
方法 or 属性:left?: { anchor: string, align: HorizontalAlign };
起始版本:10|common.d.ts| -|起始版本有变化|类名:AlignRuleOption
方法 or 属性:right?: { anchor: string, align: HorizontalAlign };
起始版本:9|类名:AlignRuleOption
方法 or 属性:right?: { anchor: string, align: HorizontalAlign };
起始版本:10|common.d.ts| -|起始版本有变化|类名:AlignRuleOption
方法 or 属性:middle?: { anchor: string, align: HorizontalAlign };
起始版本:9|类名:AlignRuleOption
方法 or 属性:middle?: { anchor: string, align: HorizontalAlign };
起始版本:10|common.d.ts| -|起始版本有变化|类名:AlignRuleOption
方法 or 属性:top?: { anchor: string, align: VerticalAlign };
起始版本:9|类名:AlignRuleOption
方法 or 属性:top?: { anchor: string, align: VerticalAlign };
起始版本:10|common.d.ts| -|起始版本有变化|类名:AlignRuleOption
方法 or 属性:bottom?: { anchor: string, align: VerticalAlign };
起始版本:9|类名:AlignRuleOption
方法 or 属性:bottom?: { anchor: string, align: VerticalAlign };
起始版本:10|common.d.ts| -|起始版本有变化|类名:AlignRuleOption
方法 or 属性:center?: { anchor: string, align: VerticalAlign };
起始版本:9|类名:AlignRuleOption
方法 or 属性:center?: { anchor: string, align: VerticalAlign };
起始版本:10|common.d.ts| -|起始版本有变化|类名:TransitionOptions
起始版本:9|类名:TransitionOptions
起始版本:7|common.d.ts| -|起始版本有变化|类名:TransitionOptions
方法 or 属性:type?: TransitionType;
起始版本:9|类名:TransitionOptions
方法 or 属性:type?: TransitionType;
起始版本:7|common.d.ts| -|起始版本有变化|类名:TransitionOptions
方法 or 属性:opacity?: number;
起始版本:9|类名:TransitionOptions
方法 or 属性:opacity?: number;
起始版本:7|common.d.ts| -|起始版本有变化|类名:TransitionOptions
方法 or 属性:translate?: TranslateOptions;
起始版本:9|类名:TransitionOptions
方法 or 属性:translate?: TranslateOptions;
起始版本:7|common.d.ts| -|起始版本有变化|类名:TransitionOptions
方法 or 属性:scale?: ScaleOptions;
起始版本:9|类名:TransitionOptions
方法 or 属性:scale?: ScaleOptions;
起始版本:7|common.d.ts| -|起始版本有变化|类名:TransitionOptions
方法 or 属性:rotate?: RotateOptions;
起始版本:9|类名:TransitionOptions
方法 or 属性:rotate?: RotateOptions;
起始版本:7|common.d.ts| -|起始版本有变化|类名:ItemDragInfo
起始版本:8|类名:ItemDragInfo
起始版本:10|common.d.ts| -|起始版本有变化|类名:ItemDragInfo
方法 or 属性:x: number;
起始版本:8|类名:ItemDragInfo
方法 or 属性:x: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:ItemDragInfo
方法 or 属性:y: number;
起始版本:8|类名:ItemDragInfo
方法 or 属性:y: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:DragItemInfo
起始版本:8|类名:DragItemInfo
起始版本:10|common.d.ts| -|起始版本有变化|类名:DragItemInfo
方法 or 属性:pixelMap?: PixelMap;
起始版本:8|类名:DragItemInfo
方法 or 属性:pixelMap?: PixelMap;
起始版本:10|common.d.ts| -|起始版本有变化|类名:DragItemInfo
方法 or 属性:builder?: CustomBuilder;
起始版本:8|类名:DragItemInfo
方法 or 属性:builder?: CustomBuilder;
起始版本:10|common.d.ts| -|起始版本有变化|类名:DragItemInfo
方法 or 属性:extraInfo?: string;
起始版本:8|类名:DragItemInfo
方法 or 属性:extraInfo?: string;
起始版本:10|common.d.ts| -|起始版本有变化|类名:focusControl
方法 or 属性:function requestFocus(value: string): boolean;
起始版本:9|类名:focusControl
方法 or 属性:function requestFocus(value: string): boolean;
起始版本:10|common.d.ts| -|起始版本有变化|类名:SourceType
起始版本:8|类名:SourceType
起始版本:10|common.d.ts| -|起始版本有变化|类名:SourceType
方法 or 属性:Unknown
起始版本:8|类名:SourceType
方法 or 属性:Unknown
起始版本:10|common.d.ts| -|起始版本有变化|类名:SourceType
方法 or 属性:Mouse
起始版本:8|类名:SourceType
方法 or 属性:Mouse
起始版本:10|common.d.ts| -|起始版本有变化|类名:SourceType
方法 or 属性:TouchScreen
起始版本:8|类名:SourceType
方法 or 属性:TouchScreen
起始版本:10|common.d.ts| -|起始版本有变化|类名:SourceTool
起始版本:9|类名:SourceTool
起始版本:10|common.d.ts| -|起始版本有变化|类名:SourceTool
方法 or 属性:Unknown
起始版本:9|类名:SourceTool
方法 or 属性:Unknown
起始版本:10|common.d.ts| -|起始版本有变化|类名:RepeatMode
起始版本:9|类名:RepeatMode
起始版本:10|common.d.ts| -|起始版本有变化|类名:RepeatMode
方法 or 属性:Repeat
起始版本:9|类名:RepeatMode
方法 or 属性:Repeat
起始版本:10|common.d.ts| -|起始版本有变化|类名:RepeatMode
方法 or 属性:Stretch
起始版本:9|类名:RepeatMode
方法 or 属性:Stretch
起始版本:10|common.d.ts| -|起始版本有变化|类名:RepeatMode
方法 or 属性:Round
起始版本:9|类名:RepeatMode
方法 or 属性:Round
起始版本:10|common.d.ts| -|起始版本有变化|类名:RepeatMode
方法 or 属性:Space
起始版本:9|类名:RepeatMode
方法 or 属性:Space
起始版本:10|common.d.ts| -|起始版本有变化|类名:BlurStyle
起始版本:9|类名:BlurStyle
起始版本:10|common.d.ts| -|起始版本有变化|类名:BlurStyle
方法 or 属性:Thin
起始版本:9|类名:BlurStyle
方法 or 属性:Thin
起始版本:10|common.d.ts| -|起始版本有变化|类名:BlurStyle
方法 or 属性:Regular
起始版本:9|类名:BlurStyle
方法 or 属性:Regular
起始版本:10|common.d.ts| -|起始版本有变化|类名:BlurStyle
方法 or 属性:Thick
起始版本:9|类名:BlurStyle
方法 or 属性:Thick
起始版本:10|common.d.ts| -|起始版本有变化|类名:BaseEvent
方法 or 属性:pressure: number;
起始版本:9|类名:BaseEvent
方法 or 属性:pressure: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:BaseEvent
方法 or 属性:tiltX: number;
起始版本:9|类名:BaseEvent
方法 or 属性:tiltX: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:BaseEvent
方法 or 属性:tiltY: number;
起始版本:9|类名:BaseEvent
方法 or 属性:tiltY: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:BaseEvent
方法 or 属性:sourceTool: SourceTool;
起始版本:9|类名:BaseEvent
方法 or 属性:sourceTool: SourceTool;
起始版本:10|common.d.ts| -|起始版本有变化|类名:BorderImageOption
起始版本:9|类名:BorderImageOption
起始版本:10|common.d.ts| -|起始版本有变化|类名:BorderImageOption
方法 or 属性:slice?: Length \| EdgeWidths,
起始版本:9|类名:BorderImageOption
方法 or 属性:slice?: Length \| EdgeWidths,
起始版本:10|common.d.ts| -|起始版本有变化|类名:BorderImageOption
方法 or 属性:repeat?: RepeatMode,
起始版本:9|类名:BorderImageOption
方法 or 属性:repeat?: RepeatMode,
起始版本:10|common.d.ts| -|起始版本有变化|类名:BorderImageOption
方法 or 属性:source?: string \| Resource \| LinearGradient,
起始版本:9|类名:BorderImageOption
方法 or 属性:source?: string \| Resource \| LinearGradient,
起始版本:10|common.d.ts| -|起始版本有变化|类名:BorderImageOption
方法 or 属性:width?: Length \| EdgeWidths,
起始版本:9|类名:BorderImageOption
方法 or 属性:width?: Length \| EdgeWidths,
起始版本:10|common.d.ts| -|起始版本有变化|类名:BorderImageOption
方法 or 属性:outset?: Length \| EdgeWidths,
起始版本:9|类名:BorderImageOption
方法 or 属性:outset?: Length \| EdgeWidths,
起始版本:10|common.d.ts| -|起始版本有变化|类名:BorderImageOption
方法 or 属性:fill?: boolean
起始版本:9|类名:BorderImageOption
方法 or 属性:fill?: boolean
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
起始版本:8|类名:MouseEvent
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
方法 or 属性:button: MouseButton;
起始版本:8|类名:MouseEvent
方法 or 属性:button: MouseButton;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
方法 or 属性:action: MouseAction;
起始版本:8|类名:MouseEvent
方法 or 属性:action: MouseAction;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
方法 or 属性:screenX: number;
起始版本:8|类名:MouseEvent
方法 or 属性:screenX: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
方法 or 属性:screenY: number;
起始版本:8|类名:MouseEvent
方法 or 属性:screenY: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
方法 or 属性:x: number;
起始版本:8|类名:MouseEvent
方法 or 属性:x: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
方法 or 属性:y: number;
起始版本:8|类名:MouseEvent
方法 or 属性:y: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:MouseEvent
方法 or 属性:stopPropagation?: () => void;
起始版本:8|类名:MouseEvent
方法 or 属性:stopPropagation?: () => void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchObject
起始版本:7|类名:TouchObject
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchObject
方法 or 属性:type: TouchType;
起始版本:7|类名:TouchObject
方法 or 属性:type: TouchType;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchObject
方法 or 属性:id: number;
起始版本:7|类名:TouchObject
方法 or 属性:id: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchObject
方法 or 属性:screenX: number;
起始版本:7|类名:TouchObject
方法 or 属性:screenX: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchObject
方法 or 属性:screenY: number;
起始版本:7|类名:TouchObject
方法 or 属性:screenY: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchObject
方法 or 属性:x: number;
起始版本:7|类名:TouchObject
方法 or 属性:x: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchObject
方法 or 属性:y: number;
起始版本:7|类名:TouchObject
方法 or 属性:y: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchEvent
起始版本:7|类名:TouchEvent
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchEvent
方法 or 属性:type: TouchType;
起始版本:7|类名:TouchEvent
方法 or 属性:type: TouchType;
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchEvent
方法 or 属性:touches: TouchObject[];
起始版本:7|类名:TouchEvent
方法 or 属性:touches: TouchObject[];
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchEvent
方法 or 属性:changedTouches: TouchObject[];
起始版本:7|类名:TouchEvent
方法 or 属性:changedTouches: TouchObject[];
起始版本:10|common.d.ts| -|起始版本有变化|类名:TouchEvent
方法 or 属性:stopPropagation?: () => void;
起始版本:7|类名:TouchEvent
方法 or 属性:stopPropagation?: () => void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:DragEvent
起始版本:7|类名:DragEvent
起始版本:10|common.d.ts| -|起始版本有变化|类名:DragEvent
方法 or 属性:getX(): number;
起始版本:7|类名:DragEvent
方法 or 属性:getX(): number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:DragEvent
方法 or 属性:getY(): number;
起始版本:7|类名:DragEvent
方法 or 属性:getY(): number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
起始版本:7|类名:KeyEvent
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:type: KeyType;
起始版本:7|类名:KeyEvent
方法 or 属性:type: KeyType;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:keyCode: number;
起始版本:7|类名:KeyEvent
方法 or 属性:keyCode: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:keyText: string;
起始版本:7|类名:KeyEvent
方法 or 属性:keyText: string;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:keySource: KeySource;
起始版本:7|类名:KeyEvent
方法 or 属性:keySource: KeySource;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:deviceId: number;
起始版本:7|类名:KeyEvent
方法 or 属性:deviceId: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:metaKey: number;
起始版本:7|类名:KeyEvent
方法 or 属性:metaKey: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:timestamp: number;
起始版本:7|类名:KeyEvent
方法 or 属性:timestamp: number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:KeyEvent
方法 or 属性:stopPropagation?: () => void;
起始版本:7|类名:KeyEvent
方法 or 属性:stopPropagation?: () => void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:PopupOptions
起始版本:7|类名:PopupOptions
起始版本:10|common.d.ts| -|起始版本有变化|类名:PopupOptions
方法 or 属性:message: string;
起始版本:7|类名:PopupOptions
方法 or 属性:message: string;
起始版本:10|common.d.ts| -|起始版本有变化|类名:PopupOptions
方法 or 属性:arrowOffset?: Length;
起始版本:9|类名:PopupOptions
方法 or 属性:arrowOffset?: Length;
起始版本:10|common.d.ts| -|起始版本有变化|类名:PopupOptions
方法 or 属性:showInSubWindow?: boolean;
起始版本:9|类名:PopupOptions
方法 or 属性:showInSubWindow?: boolean;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
起始版本:8|类名:CustomPopupOptions
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
方法 or 属性:builder: CustomBuilder;
起始版本:8|类名:CustomPopupOptions
方法 or 属性:builder: CustomBuilder;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
方法 or 属性:placement?: Placement;
起始版本:8|类名:CustomPopupOptions
方法 or 属性:placement?: Placement;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
方法 or 属性:popupColor?: Color \| string \| Resource \| number;
起始版本:8|类名:CustomPopupOptions
方法 or 属性:popupColor?: Color \| string \| Resource \| number;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
方法 or 属性:enableArrow?: boolean;
起始版本:8|类名:CustomPopupOptions
方法 or 属性:enableArrow?: boolean;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
方法 or 属性:autoCancel?: boolean;
起始版本:8|类名:CustomPopupOptions
方法 or 属性:autoCancel?: boolean;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
方法 or 属性:arrowOffset?: Length;
起始版本:9|类名:CustomPopupOptions
方法 or 属性:arrowOffset?: Length;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomPopupOptions
方法 or 属性:showInSubWindow?: boolean;
起始版本:9|类名:CustomPopupOptions
方法 or 属性:showInSubWindow?: boolean;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:hitTestBehavior(value: HitTestMode): T;
起始版本:9|类名:CommonMethod
方法 or 属性:hitTestBehavior(value: HitTestMode): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:borderImage(value: BorderImageOption): T;
起始版本:9|类名:CommonMethod
方法 or 属性:borderImage(value: BorderImageOption): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onHover(event: (isHover?: boolean) => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onHover(event: (isHover?: boolean) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:hoverEffect(value: HoverEffect): T;
起始版本:8|类名:CommonMethod
方法 or 属性:hoverEffect(value: HoverEffect): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onMouse(event: (event?: MouseEvent) => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onMouse(event: (event?: MouseEvent) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onTouch(event: (event?: TouchEvent) => void): T;
起始版本:7|类名:CommonMethod
方法 or 属性:onTouch(event: (event?: TouchEvent) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onKeyEvent(event: (event?: KeyEvent) => void): T;
起始版本:7|类名:CommonMethod
方法 or 属性:onKeyEvent(event: (event?: KeyEvent) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:focusable(value: boolean): T;
起始版本:8|类名:CommonMethod
方法 or 属性:focusable(value: boolean): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onFocus(event: () => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onFocus(event: () => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onBlur(event: () => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onBlur(event: () => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:tabIndex(index: number): T;
起始版本:9|类名:CommonMethod
方法 or 属性:tabIndex(index: number): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:defaultFocus(value: boolean): T;
起始版本:9|类名:CommonMethod
方法 or 属性:defaultFocus(value: boolean): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:groupDefaultFocus(value: boolean): T;
起始版本:9|类名:CommonMethod
方法 or 属性:groupDefaultFocus(value: boolean): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:focusOnTouch(value: boolean): T;
起始版本:9|类名:CommonMethod
方法 or 属性:focusOnTouch(value: boolean): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:gesture(gesture: GestureType, mask?: GestureMask): T;
起始版本:7|类名:CommonMethod
方法 or 属性:gesture(gesture: GestureType, mask?: GestureMask): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:priorityGesture(gesture: GestureType, mask?: GestureMask): T;
起始版本:7|类名:CommonMethod
方法 or 属性:priorityGesture(gesture: GestureType, mask?: GestureMask): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:parallelGesture(gesture: GestureType, mask?: GestureMask): T;
起始版本:7|类名:CommonMethod
方法 or 属性:parallelGesture(gesture: GestureType, mask?: GestureMask): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:gridSpan(value: number): T;
起始版本:7|类名:CommonMethod
方法 or 属性:gridSpan(value: number): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:gridOffset(value: number): T;
起始版本:7|类名:CommonMethod
方法 or 属性:gridOffset(value: number): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:transform(value: object): T;
起始版本:7|类名:CommonMethod
方法 or 属性:transform(value: object): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onAreaChange(event: (oldValue: Area, newValue: Area) => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onAreaChange(event: (oldValue: Area, newValue: Area) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:sharedTransition(id: string, options?: sharedTransitionOptions): T;
起始版本:7|类名:CommonMethod
方法 or 属性:sharedTransition(id: string, options?: sharedTransitionOptions): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:alignRules(value: AlignRuleOption): T;
起始版本:9|类名:CommonMethod
方法 or 属性:alignRules(value: AlignRuleOption): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder \| DragItemInfo): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder \| DragItemInfo): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:8|类名:CommonMethod
方法 or 属性:onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:motionPath(value: MotionPathOptions): T;
起始版本:7|类名:CommonMethod
方法 or 属性:motionPath(value: MotionPathOptions): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:geometryTransition(id: string): T;
起始版本:7|类名:CommonMethod
方法 or 属性:geometryTransition(id: string): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CommonMethod
方法 or 属性:onVisibleAreaChange(ratios: Array\, event: (isVisible: boolean, currentRatio: number) => void): T;
起始版本:9|类名:CommonMethod
方法 or 属性:onVisibleAreaChange(ratios: Array\, event: (isVisible: boolean, currentRatio: number) => void): T;
起始版本:10|common.d.ts| -|起始版本有变化|类名:LinearGradient
起始版本:9|类名:LinearGradient
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutBorderInfo
起始版本:9|类名:LayoutBorderInfo
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutBorderInfo
方法 or 属性:borderWidth: EdgeWidths,
起始版本:9|类名:LayoutBorderInfo
方法 or 属性:borderWidth: EdgeWidths,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutBorderInfo
方法 or 属性:margin: Margin,
起始版本:9|类名:LayoutBorderInfo
方法 or 属性:margin: Margin,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutBorderInfo
方法 or 属性:padding: Padding,
起始版本:9|类名:LayoutBorderInfo
方法 or 属性:padding: Padding,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutInfo
起始版本:9|类名:LayoutInfo
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutInfo
方法 or 属性:position: Position,
起始版本:9|类名:LayoutInfo
方法 or 属性:position: Position,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutInfo
方法 or 属性:constraint: ConstraintSizeOptions,
起始版本:9|类名:LayoutInfo
方法 or 属性:constraint: ConstraintSizeOptions,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
起始版本:9|类名:LayoutChild
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
方法 or 属性:name: string,
起始版本:9|类名:LayoutChild
方法 or 属性:name: string,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
方法 or 属性:id: string,
起始版本:9|类名:LayoutChild
方法 or 属性:id: string,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
方法 or 属性:constraint: ConstraintSizeOptions,
起始版本:9|类名:LayoutChild
方法 or 属性:constraint: ConstraintSizeOptions,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
方法 or 属性:borderInfo: LayoutBorderInfo,
起始版本:9|类名:LayoutChild
方法 or 属性:borderInfo: LayoutBorderInfo,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
方法 or 属性:position: Position,
起始版本:9|类名:LayoutChild
方法 or 属性:position: Position,
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
方法 or 属性:measure(childConstraint: ConstraintSizeOptions),
起始版本:9|类名:LayoutChild
方法 or 属性:measure(childConstraint: ConstraintSizeOptions),
起始版本:10|common.d.ts| -|起始版本有变化|类名:LayoutChild
方法 or 属性:layout(childLayoutInfo: LayoutInfo)
起始版本:9|类名:LayoutChild
方法 or 属性:layout(childLayoutInfo: LayoutInfo)
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomComponent
方法 or 属性:onLayout?(children: Array\, constraint: ConstraintSizeOptions): void;
起始版本:9|类名:CustomComponent
方法 or 属性:onLayout?(children: Array\, constraint: ConstraintSizeOptions): void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomComponent
方法 or 属性:onMeasure?(children: Array\, constraint: ConstraintSizeOptions): void;
起始版本:9|类名:CustomComponent
方法 or 属性:onMeasure?(children: Array\, constraint: ConstraintSizeOptions): void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomComponent
方法 or 属性:onPageShow?(): void;
起始版本:7|类名:CustomComponent
方法 or 属性:onPageShow?(): void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomComponent
方法 or 属性:onPageHide?(): void;
起始版本:7|类名:CustomComponent
方法 or 属性:onPageHide?(): void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomComponent
方法 or 属性:onBackPress?(): void;
起始版本:7|类名:CustomComponent
方法 or 属性:onBackPress?(): void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:CustomComponent
方法 or 属性:pageTransition?(): void;
起始版本:9|类名:CustomComponent
方法 or 属性:pageTransition?(): void;
起始版本:10|common.d.ts| -|起始版本有变化|类名:AppStorage
起始版本:7|类名:AppStorage
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Link(propName: string): any;
起始版本:7|类名:AppStorage
方法 or 属性:static Link(propName: string): any;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static SetAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
起始版本:7|类名:AppStorage
方法 or 属性:static SetAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Prop(propName: string): any;
起始版本:7|类名:AppStorage
方法 or 属性:static Prop(propName: string): any;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static SetAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
起始版本:7|类名:AppStorage
方法 or 属性:static SetAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Has(propName: string): boolean;
起始版本:7|类名:AppStorage
方法 or 属性:static Has(propName: string): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Get\(propName: string): T \| undefined;
起始版本:7|类名:AppStorage
方法 or 属性:static Get\(propName: string): T \| undefined;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Set\(propName: string, newValue: T): boolean;
起始版本:7|类名:AppStorage
方法 or 属性:static Set\(propName: string, newValue: T): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static SetOrCreate\(propName: string, newValue: T): void;
起始版本:7|类名:AppStorage
方法 or 属性:static SetOrCreate\(propName: string, newValue: T): void;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Delete(propName: string): boolean;
起始版本:7|类名:AppStorage
方法 or 属性:static Delete(propName: string): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Keys(): IterableIterator\;
起始版本:7|类名:AppStorage
方法 or 属性:static Keys(): IterableIterator\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Clear(): boolean;
起始版本:9|类名:AppStorage
方法 or 属性:static Clear(): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static IsMutable(propName: string): boolean;
起始版本:7|类名:AppStorage
方法 or 属性:static IsMutable(propName: string): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:AppStorage
方法 or 属性:static Size(): number;
起始版本:7|类名:AppStorage
方法 or 属性:static Size(): number;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:SubscribedAbstractProperty
方法 or 属性:info(): string;
起始版本:7|类名:SubscribedAbstractProperty
方法 or 属性:info(): string;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:SubscribedAbstractProperty
方法 or 属性:abstract get(): T;
起始版本:9|类名:SubscribedAbstractProperty
方法 or 属性:abstract get(): T;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:SubscribedAbstractProperty
方法 or 属性:abstract set(newValue: T): void;
起始版本:9|类名:SubscribedAbstractProperty
方法 or 属性:abstract set(newValue: T): void;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:Environment
起始版本:7|类名:Environment
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:Environment
方法 or 属性:static EnvProp\(key: string, value: S): boolean;
起始版本:7|类名:Environment
方法 or 属性:static EnvProp\(key: string, value: S): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:Environment
方法 or 属性:static EnvProps(
props: {
key: string;
defaultValue: any;
}[],
): void;
起始版本:7|类名:Environment
方法 or 属性:static EnvProps(
props: {
key: string;
defaultValue: any;
}[],
): void;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:Environment
方法 or 属性:static Keys(): Array\;
起始版本:7|类名:Environment
方法 or 属性:static Keys(): Array\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:PersistentStorage
起始版本:7|类名:PersistentStorage
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:PersistentStorage
方法 or 属性:static PersistProp\(key: string, defaultValue: T): void;
起始版本:7|类名:PersistentStorage
方法 or 属性:static PersistProp\(key: string, defaultValue: T): void;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:PersistentStorage
方法 or 属性:static DeleteProp(key: string): void;
起始版本:7|类名:PersistentStorage
方法 or 属性:static DeleteProp(key: string): void;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:PersistentStorage
方法 or 属性:static PersistProps(
properties: {
key: string;
defaultValue: any;
}[],
): void;
起始版本:7|类名:PersistentStorage
方法 or 属性:static PersistProps(
properties: {
key: string;
defaultValue: any;
}[],
): void;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:PersistentStorage
方法 or 属性:static Keys(): Array\;
起始版本:7|类名:PersistentStorage
方法 or 属性:static Keys(): Array\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
起始版本:9|类名:LocalStorage
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:constructor(initializingProperties?: Object);
起始版本:9|类名:LocalStorage
方法 or 属性:constructor(initializingProperties?: Object);
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:static GetShared(): LocalStorage;
起始版本:9|类名:LocalStorage
方法 or 属性:static GetShared(): LocalStorage;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:has(propName: string): boolean;
起始版本:9|类名:LocalStorage
方法 or 属性:has(propName: string): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:keys(): IterableIterator\;
起始版本:9|类名:LocalStorage
方法 or 属性:keys(): IterableIterator\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:size(): number;
起始版本:9|类名:LocalStorage
方法 or 属性:size(): number;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:get\(propName: string): T \| undefined;
起始版本:9|类名:LocalStorage
方法 or 属性:get\(propName: string): T \| undefined;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:set\(propName: string, newValue: T): boolean;
起始版本:9|类名:LocalStorage
方法 or 属性:set\(propName: string, newValue: T): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:setOrCreate\(propName: string, newValue: T): boolean;
起始版本:9|类名:LocalStorage
方法 or 属性:setOrCreate\(propName: string, newValue: T): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:link\(propName: string): SubscribedAbstractProperty\;
起始版本:9|类名:LocalStorage
方法 or 属性:link\(propName: string): SubscribedAbstractProperty\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:setAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
起始版本:9|类名:LocalStorage
方法 or 属性:setAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:prop\(propName: string): SubscribedAbstractProperty\;
起始版本:9|类名:LocalStorage
方法 or 属性:prop\(propName: string): SubscribedAbstractProperty\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:setAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
起始版本:9|类名:LocalStorage
方法 or 属性:setAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:delete(propName: string): boolean;
起始版本:9|类名:LocalStorage
方法 or 属性:delete(propName: string): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:LocalStorage
方法 or 属性:clear(): boolean;
起始版本:9|类名:LocalStorage
方法 or 属性:clear(): boolean;
起始版本:10|common_ts_ets_api.d.ts| -|起始版本有变化|类名:ContextMenu
起始版本:8|类名:ContextMenu
起始版本:10|context_menu.d.ts| -|起始版本有变化|类名:ContextMenu
方法 or 属性:static close();
起始版本:8|类名:ContextMenu
方法 or 属性:static close();
起始版本:10|context_menu.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
起始版本:7|类名:CustomDialogControllerOptions
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
方法 or 属性:builder: any;
起始版本:7|类名:CustomDialogControllerOptions
方法 or 属性:builder: any;
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
方法 or 属性:cancel?: () => void;
起始版本:7|类名:CustomDialogControllerOptions
方法 or 属性:cancel?: () => void;
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
方法 or 属性:autoCancel?: boolean;
起始版本:7|类名:CustomDialogControllerOptions
方法 or 属性:autoCancel?: boolean;
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
方法 or 属性:alignment?: DialogAlignment;
起始版本:7|类名:CustomDialogControllerOptions
方法 or 属性:alignment?: DialogAlignment;
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
方法 or 属性:offset?: Offset;
起始版本:7|类名:CustomDialogControllerOptions
方法 or 属性:offset?: Offset;
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
方法 or 属性:customStyle?: boolean;
起始版本:7|类名:CustomDialogControllerOptions
方法 or 属性:customStyle?: boolean;
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogControllerOptions
方法 or 属性:gridCount?: number;
起始版本:8|类名:CustomDialogControllerOptions
方法 or 属性:gridCount?: number;
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogController
起始版本:7|类名:CustomDialogController
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogController
方法 or 属性:constructor(value: CustomDialogControllerOptions);
起始版本:7|类名:CustomDialogController
方法 or 属性:constructor(value: CustomDialogControllerOptions);
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogController
方法 or 属性:open();
起始版本:7|类名:CustomDialogController
方法 or 属性:open();
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:CustomDialogController
方法 or 属性:close();
起始版本:7|类名:CustomDialogController
方法 or 属性:close();
起始版本:10|custom_dialog_controller.d.ts| -|起始版本有变化|类名:DatePickerResult
起始版本:8|类名:DatePickerResult
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerResult
方法 or 属性:year?: number;
起始版本:8|类名:DatePickerResult
方法 or 属性:year?: number;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerResult
方法 or 属性:month?: number;
起始版本:8|类名:DatePickerResult
方法 or 属性:month?: number;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerResult
方法 or 属性:day?: number;
起始版本:8|类名:DatePickerResult
方法 or 属性:day?: number;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerOptions
起始版本:8|类名:DatePickerOptions
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerOptions
方法 or 属性:start?: Date;
起始版本:8|类名:DatePickerOptions
方法 or 属性:start?: Date;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerOptions
方法 or 属性:end?: Date;
起始版本:8|类名:DatePickerOptions
方法 or 属性:end?: Date;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerOptions
方法 or 属性:selected?: Date;
起始版本:8|类名:DatePickerOptions
方法 or 属性:selected?: Date;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerInterface
起始版本:8|类名:DatePickerInterface
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerInterface
方法 or 属性:(options?: DatePickerOptions): DatePickerAttribute;
起始版本:8|类名:DatePickerInterface
方法 or 属性:(options?: DatePickerOptions): DatePickerAttribute;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerAttribute
起始版本:8|类名:DatePickerAttribute
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerAttribute
方法 or 属性:lunar(value: boolean): DatePickerAttribute;
起始版本:8|类名:DatePickerAttribute
方法 or 属性:lunar(value: boolean): DatePickerAttribute;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerAttribute
方法 or 属性:onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute;
起始版本:8|类名:DatePickerAttribute
方法 or 属性:onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerDialogOptions
起始版本:8|类名:DatePickerDialogOptions
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerDialogOptions
方法 or 属性:lunar?: boolean;
起始版本:8|类名:DatePickerDialogOptions
方法 or 属性:lunar?: boolean;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerDialogOptions
方法 or 属性:onAccept?: (value: DatePickerResult) => void;
起始版本:8|类名:DatePickerDialogOptions
方法 or 属性:onAccept?: (value: DatePickerResult) => void;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerDialogOptions
方法 or 属性:onCancel?: () => void;
起始版本:8|类名:DatePickerDialogOptions
方法 or 属性:onCancel?: () => void;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerDialogOptions
方法 or 属性:onChange?: (value: DatePickerResult) => void;
起始版本:8|类名:DatePickerDialogOptions
方法 or 属性:onChange?: (value: DatePickerResult) => void;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerDialog
起始版本:8|类名:DatePickerDialog
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:DatePickerDialog
方法 or 属性:static show(options?: DatePickerDialogOptions);
起始版本:8|类名:DatePickerDialog
方法 or 属性:static show(options?: DatePickerDialogOptions);
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const DatePicker: DatePickerInterface;
起始版本:8|类名:global
方法 or 属性:declare const DatePicker: DatePickerInterface;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const DatePickerInstance: DatePickerAttribute;
起始版本:8|类名:global
方法 or 属性:declare const DatePickerInstance: DatePickerAttribute;
起始版本:10|date_picker.d.ts| -|起始版本有变化|类名:Color
方法 or 属性:Transparent
起始版本:9|类名:Color
方法 or 属性:Transparent
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TouchType
起始版本:7|类名:TouchType
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TouchType
方法 or 属性:Down
起始版本:7|类名:TouchType
方法 or 属性:Down
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TouchType
方法 or 属性:Up
起始版本:7|类名:TouchType
方法 or 属性:Up
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TouchType
方法 or 属性:Move
起始版本:7|类名:TouchType
方法 or 属性:Move
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TouchType
方法 or 属性:Cancel
起始版本:7|类名:TouchType
方法 or 属性:Cancel
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseButton
起始版本:8|类名:MouseButton
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseButton
方法 or 属性:Left
起始版本:8|类名:MouseButton
方法 or 属性:Left
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseButton
方法 or 属性:Right
起始版本:8|类名:MouseButton
方法 or 属性:Right
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseButton
方法 or 属性:Middle
起始版本:8|类名:MouseButton
方法 or 属性:Middle
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseButton
方法 or 属性:Back
起始版本:8|类名:MouseButton
方法 or 属性:Back
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseButton
方法 or 属性:Forward
起始版本:8|类名:MouseButton
方法 or 属性:Forward
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseButton
方法 or 属性:None
起始版本:8|类名:MouseButton
方法 or 属性:None
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseAction
起始版本:8|类名:MouseAction
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseAction
方法 or 属性:Press
起始版本:8|类名:MouseAction
方法 or 属性:Press
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseAction
方法 or 属性:Release
起始版本:8|类名:MouseAction
方法 or 属性:Release
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseAction
方法 or 属性:Move
起始版本:8|类名:MouseAction
方法 or 属性:Move
起始版本:10|enums.d.ts| -|起始版本有变化|类名:MouseAction
方法 or 属性:Hover
起始版本:8|类名:MouseAction
方法 or 属性:Hover
起始版本:10|enums.d.ts| -|起始版本有变化|类名:AnimationStatus
起始版本:7|类名:AnimationStatus
起始版本:10|enums.d.ts| -|起始版本有变化|类名:AnimationStatus
方法 or 属性:Initial
起始版本:7|类名:AnimationStatus
方法 or 属性:Initial
起始版本:10|enums.d.ts| -|起始版本有变化|类名:AnimationStatus
方法 or 属性:Running
起始版本:7|类名:AnimationStatus
方法 or 属性:Running
起始版本:10|enums.d.ts| -|起始版本有变化|类名:AnimationStatus
方法 or 属性:Paused
起始版本:7|类名:AnimationStatus
方法 or 属性:Paused
起始版本:10|enums.d.ts| -|起始版本有变化|类名:AnimationStatus
方法 or 属性:Stopped
起始版本:7|类名:AnimationStatus
方法 or 属性:Stopped
起始版本:10|enums.d.ts| -|起始版本有变化|类名:FillMode
起始版本:7|类名:FillMode
起始版本:10|enums.d.ts| -|起始版本有变化|类名:FillMode
方法 or 属性:None
起始版本:7|类名:FillMode
方法 or 属性:None
起始版本:10|enums.d.ts| -|起始版本有变化|类名:FillMode
方法 or 属性:Forwards
起始版本:7|类名:FillMode
方法 or 属性:Forwards
起始版本:10|enums.d.ts| -|起始版本有变化|类名:FillMode
方法 or 属性:Backwards
起始版本:7|类名:FillMode
方法 or 属性:Backwards
起始版本:10|enums.d.ts| -|起始版本有变化|类名:FillMode
方法 or 属性:Both
起始版本:7|类名:FillMode
方法 or 属性:Both
起始版本:10|enums.d.ts| -|起始版本有变化|类名:KeyType
起始版本:7|类名:KeyType
起始版本:10|enums.d.ts| -|起始版本有变化|类名:KeyType
方法 or 属性:Down
起始版本:7|类名:KeyType
方法 or 属性:Down
起始版本:10|enums.d.ts| -|起始版本有变化|类名:KeyType
方法 or 属性:Up
起始版本:7|类名:KeyType
方法 or 属性:Up
起始版本:10|enums.d.ts| -|起始版本有变化|类名:KeySource
起始版本:7|类名:KeySource
起始版本:10|enums.d.ts| -|起始版本有变化|类名:KeySource
方法 or 属性:Unknown
起始版本:7|类名:KeySource
方法 or 属性:Unknown
起始版本:10|enums.d.ts| -|起始版本有变化|类名:KeySource
方法 or 属性:Keyboard
起始版本:7|类名:KeySource
方法 or 属性:Keyboard
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Edge
起始版本:7|类名:Edge
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Edge
方法 or 属性:Top
起始版本:7|类名:Edge
方法 or 属性:Top
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Edge
方法 or 属性:Bottom
起始版本:7|类名:Edge
方法 or 属性:Bottom
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Edge
方法 or 属性:Start
起始版本:7|类名:Edge
方法 or 属性:Start
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Edge
方法 or 属性:End
起始版本:7|类名:Edge
方法 or 属性:End
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
起始版本:7|类名:Week
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
方法 or 属性:Mon
起始版本:7|类名:Week
方法 or 属性:Mon
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
方法 or 属性:Tue
起始版本:7|类名:Week
方法 or 属性:Tue
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
方法 or 属性:Wed
起始版本:7|类名:Week
方法 or 属性:Wed
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
方法 or 属性:Thur
起始版本:7|类名:Week
方法 or 属性:Thur
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
方法 or 属性:Fri
起始版本:7|类名:Week
方法 or 属性:Fri
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
方法 or 属性:Sat
起始版本:7|类名:Week
方法 or 属性:Sat
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Week
方法 or 属性:Sun
起始版本:7|类名:Week
方法 or 属性:Sun
起始版本:10|enums.d.ts| -|起始版本有变化|类名:RelateType
起始版本:7|类名:RelateType
起始版本:10|enums.d.ts| -|起始版本有变化|类名:RelateType
方法 or 属性:FILL
起始版本:7|类名:RelateType
方法 or 属性:FILL
起始版本:10|enums.d.ts| -|起始版本有变化|类名:RelateType
方法 or 属性:FIT
起始版本:7|类名:RelateType
方法 or 属性:FIT
起始版本:10|enums.d.ts| -|起始版本有变化|类名:SharedTransitionEffectType
起始版本:7|类名:SharedTransitionEffectType
起始版本:10|enums.d.ts| -|起始版本有变化|类名:SharedTransitionEffectType
方法 or 属性:Static
起始版本:7|类名:SharedTransitionEffectType
方法 or 属性:Static
起始版本:10|enums.d.ts| -|起始版本有变化|类名:SharedTransitionEffectType
方法 or 属性:Exchange
起始版本:7|类名:SharedTransitionEffectType
方法 or 属性:Exchange
起始版本:10|enums.d.ts| -|起始版本有变化|类名:ResponseType
起始版本:8|类名:ResponseType
起始版本:10|enums.d.ts| -|起始版本有变化|类名:ResponseType
方法 or 属性:RightClick
起始版本:8|类名:ResponseType
方法 or 属性:RightClick
起始版本:10|enums.d.ts| -|起始版本有变化|类名:ResponseType
方法 or 属性:LongPress
起始版本:8|类名:ResponseType
方法 or 属性:LongPress
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HoverEffect
起始版本:8|类名:HoverEffect
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HoverEffect
方法 or 属性:Auto
起始版本:8|类名:HoverEffect
方法 or 属性:Auto
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HoverEffect
方法 or 属性:Scale
起始版本:8|类名:HoverEffect
方法 or 属性:Scale
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HoverEffect
方法 or 属性:Highlight
起始版本:8|类名:HoverEffect
方法 or 属性:Highlight
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HoverEffect
方法 or 属性:None
起始版本:8|类名:HoverEffect
方法 or 属性:None
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
起始版本:8|类名:Placement
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:Left
起始版本:8|类名:Placement
方法 or 属性:Left
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:Right
起始版本:8|类名:Placement
方法 or 属性:Right
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:Top
起始版本:8|类名:Placement
方法 or 属性:Top
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:Bottom
起始版本:8|类名:Placement
方法 or 属性:Bottom
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:TopLeft
起始版本:8|类名:Placement
方法 or 属性:TopLeft
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:TopRight
起始版本:8|类名:Placement
方法 or 属性:TopRight
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:BottomLeft
起始版本:8|类名:Placement
方法 or 属性:BottomLeft
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:BottomRight
起始版本:8|类名:Placement
方法 or 属性:BottomRight
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:LeftTop
起始版本:9|类名:Placement
方法 or 属性:LeftTop
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:LeftBottom
起始版本:9|类名:Placement
方法 or 属性:LeftBottom
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:RightTop
起始版本:9|类名:Placement
方法 or 属性:RightTop
起始版本:10|enums.d.ts| -|起始版本有变化|类名:Placement
方法 or 属性:RightBottom
起始版本:9|类名:Placement
方法 or 属性:RightBottom
起始版本:10|enums.d.ts| -|起始版本有变化|类名:CopyOptions
起始版本:9|类名:CopyOptions
起始版本:10|enums.d.ts| -|起始版本有变化|类名:CopyOptions
方法 or 属性:None = 0
起始版本:9|类名:CopyOptions
方法 or 属性:None = 0
起始版本:10|enums.d.ts| -|起始版本有变化|类名:CopyOptions
方法 or 属性:InApp = 1
起始版本:9|类名:CopyOptions
方法 or 属性:InApp = 1
起始版本:10|enums.d.ts| -|起始版本有变化|类名:CopyOptions
方法 or 属性:LocalDevice = 2
起始版本:9|类名:CopyOptions
方法 or 属性:LocalDevice = 2
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HitTestMode
起始版本:9|类名:HitTestMode
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HitTestMode
方法 or 属性:Default
起始版本:9|类名:HitTestMode
方法 or 属性:Default
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HitTestMode
方法 or 属性:Block
起始版本:9|类名:HitTestMode
方法 or 属性:Block
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HitTestMode
方法 or 属性:Transparent
起始版本:9|类名:HitTestMode
方法 or 属性:Transparent
起始版本:10|enums.d.ts| -|起始版本有变化|类名:HitTestMode
方法 or 属性:None
起始版本:9|类名:HitTestMode
方法 or 属性:None
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TitleHeight
起始版本:9|类名:TitleHeight
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TitleHeight
方法 or 属性:MainOnly
起始版本:9|类名:TitleHeight
方法 or 属性:MainOnly
起始版本:10|enums.d.ts| -|起始版本有变化|类名:TitleHeight
方法 or 属性:MainWithSub
起始版本:9|类名:TitleHeight
方法 or 属性:MainWithSub
起始版本:10|enums.d.ts| -|起始版本有变化|类名:FlowItemInterface
起始版本:9|类名:FlowItemInterface
起始版本:10|flow_item.d.ts| -|起始版本有变化|类名:FlowItemInterface
方法 or 属性:(): FlowItemAttribute;
起始版本:9|类名:FlowItemInterface
方法 or 属性:(): FlowItemAttribute;
起始版本:10|flow_item.d.ts| -|起始版本有变化|类名:FlowItemAttribute
起始版本:9|类名:FlowItemAttribute
起始版本:10|flow_item.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const FlowItem: FlowItemInterface
起始版本:9|类名:global
方法 or 属性:declare const FlowItem: FlowItemInterface
起始版本:10|flow_item.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const FlowItemInstance: FlowItemAttribute;
起始版本:9|类名:global
方法 or 属性:declare const FlowItemInstance: FlowItemAttribute;
起始版本:10|flow_item.d.ts| -|起始版本有变化|类名:PanDirection
起始版本:7|类名:PanDirection
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:None
起始版本:7|类名:PanDirection
方法 or 属性:None
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:Horizontal
起始版本:7|类名:PanDirection
方法 or 属性:Horizontal
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:Left
起始版本:7|类名:PanDirection
方法 or 属性:Left
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:Right
起始版本:7|类名:PanDirection
方法 or 属性:Right
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:Vertical
起始版本:7|类名:PanDirection
方法 or 属性:Vertical
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:Up
起始版本:7|类名:PanDirection
方法 or 属性:Up
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:Down
起始版本:7|类名:PanDirection
方法 or 属性:Down
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanDirection
方法 or 属性:All
起始版本:7|类名:PanDirection
方法 or 属性:All
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeDirection
起始版本:8|类名:SwipeDirection
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeDirection
方法 or 属性:None
起始版本:8|类名:SwipeDirection
方法 or 属性:None
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeDirection
方法 or 属性:Horizontal
起始版本:8|类名:SwipeDirection
方法 or 属性:Horizontal
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeDirection
方法 or 属性:Vertical
起始版本:8|类名:SwipeDirection
方法 or 属性:Vertical
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeDirection
方法 or 属性:All
起始版本:8|类名:SwipeDirection
方法 or 属性:All
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureMode
起始版本:7|类名:GestureMode
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureMode
方法 or 属性:Sequence
起始版本:7|类名:GestureMode
方法 or 属性:Sequence
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureMode
方法 or 属性:Parallel
起始版本:7|类名:GestureMode
方法 or 属性:Parallel
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureMode
方法 or 属性:Exclusive
起始版本:7|类名:GestureMode
方法 or 属性:Exclusive
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureMask
起始版本:7|类名:GestureMask
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureMask
方法 or 属性:Normal
起始版本:7|类名:GestureMask
方法 or 属性:Normal
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureMask
方法 or 属性:IgnoreInternal
起始版本:7|类名:GestureMask
方法 or 属性:IgnoreInternal
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:FingerInfo
起始版本:8|类名:FingerInfo
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:FingerInfo
方法 or 属性:id: number;
起始版本:8|类名:FingerInfo
方法 or 属性:id: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:FingerInfo
方法 or 属性:globalX: number;
起始版本:8|类名:FingerInfo
方法 or 属性:globalX: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:FingerInfo
方法 or 属性:globalY: number;
起始版本:8|类名:FingerInfo
方法 or 属性:globalY: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:FingerInfo
方法 or 属性:localX: number;
起始版本:8|类名:FingerInfo
方法 or 属性:localX: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:FingerInfo
方法 or 属性:localY: number;
起始版本:8|类名:FingerInfo
方法 or 属性:localY: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
起始版本:7|类名:GestureEvent
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:repeat: boolean;
起始版本:7|类名:GestureEvent
方法 or 属性:repeat: boolean;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:fingerList: FingerInfo[];
起始版本:8|类名:GestureEvent
方法 or 属性:fingerList: FingerInfo[];
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:offsetX: number;
起始版本:7|类名:GestureEvent
方法 or 属性:offsetX: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:offsetY: number;
起始版本:7|类名:GestureEvent
方法 or 属性:offsetY: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:angle: number;
起始版本:7|类名:GestureEvent
方法 or 属性:angle: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:speed: number;
起始版本:8|类名:GestureEvent
方法 or 属性:speed: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:scale: number;
起始版本:7|类名:GestureEvent
方法 or 属性:scale: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:pinchCenterX: number;
起始版本:7|类名:GestureEvent
方法 or 属性:pinchCenterX: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureEvent
方法 or 属性:pinchCenterY: number;
起始版本:7|类名:GestureEvent
方法 or 属性:pinchCenterY: number;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:TapGestureInterface
起始版本:7|类名:TapGestureInterface
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:TapGestureInterface
方法 or 属性:(value?: { count?: number; fingers?: number }): TapGestureInterface;
起始版本:7|类名:TapGestureInterface
方法 or 属性:(value?: { count?: number; fingers?: number }): TapGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:TapGestureInterface
方法 or 属性:onAction(event: (event?: GestureEvent) => void): TapGestureInterface;
起始版本:7|类名:TapGestureInterface
方法 or 属性:onAction(event: (event?: GestureEvent) => void): TapGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:LongPressGestureInterface
起始版本:7|类名:LongPressGestureInterface
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:LongPressGestureInterface
方法 or 属性:(value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
起始版本:7|类名:LongPressGestureInterface
方法 or 属性:(value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:LongPressGestureInterface
方法 or 属性:onAction(event: (event?: GestureEvent) => void): LongPressGestureInterface;
起始版本:7|类名:LongPressGestureInterface
方法 or 属性:onAction(event: (event?: GestureEvent) => void): LongPressGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:LongPressGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): LongPressGestureInterface;
起始版本:7|类名:LongPressGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): LongPressGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:LongPressGestureInterface
方法 or 属性:onActionCancel(event: () => void): LongPressGestureInterface;
起始版本:7|类名:LongPressGestureInterface
方法 or 属性:onActionCancel(event: () => void): LongPressGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureOptions
起始版本:7|类名:PanGestureOptions
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureOptions
方法 or 属性:constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number });
起始版本:7|类名:PanGestureOptions
方法 or 属性:constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number });
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureOptions
方法 or 属性:setDirection(value: PanDirection);
起始版本:7|类名:PanGestureOptions
方法 or 属性:setDirection(value: PanDirection);
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureOptions
方法 or 属性:setDistance(value: number);
起始版本:7|类名:PanGestureOptions
方法 or 属性:setDistance(value: number);
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureOptions
方法 or 属性:setFingers(value: number);
起始版本:7|类名:PanGestureOptions
方法 or 属性:setFingers(value: number);
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureInterface
起始版本:7|类名:PanGestureInterface
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureInterface
方法 or 属性:(value?: { fingers?: number; direction?: PanDirection; distance?: number } \| PanGestureOptions): PanGestureInterface;
起始版本:7|类名:PanGestureInterface
方法 or 属性:(value?: { fingers?: number; direction?: PanDirection; distance?: number } \| PanGestureOptions): PanGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureInterface
方法 or 属性:onActionStart(event: (event?: GestureEvent) => void): PanGestureInterface;
起始版本:7|类名:PanGestureInterface
方法 or 属性:onActionStart(event: (event?: GestureEvent) => void): PanGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureInterface
方法 or 属性:onActionUpdate(event: (event?: GestureEvent) => void): PanGestureInterface;
起始版本:7|类名:PanGestureInterface
方法 or 属性:onActionUpdate(event: (event?: GestureEvent) => void): PanGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): PanGestureInterface;
起始版本:7|类名:PanGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): PanGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PanGestureInterface
方法 or 属性:onActionCancel(event: () => void): PanGestureInterface;
起始版本:7|类名:PanGestureInterface
方法 or 属性:onActionCancel(event: () => void): PanGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeGestureInterface
起始版本:8|类名:SwipeGestureInterface
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeGestureInterface
方法 or 属性:(value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
起始版本:8|类名:SwipeGestureInterface
方法 or 属性:(value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:SwipeGestureInterface
方法 or 属性:onAction(event: (event?: GestureEvent) => void): SwipeGestureInterface;
起始版本:8|类名:SwipeGestureInterface
方法 or 属性:onAction(event: (event?: GestureEvent) => void): SwipeGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PinchGestureInterface
起始版本:7|类名:PinchGestureInterface
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PinchGestureInterface
方法 or 属性:(value?: { fingers?: number; distance?: number }): PinchGestureInterface;
起始版本:7|类名:PinchGestureInterface
方法 or 属性:(value?: { fingers?: number; distance?: number }): PinchGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PinchGestureInterface
方法 or 属性:onActionStart(event: (event?: GestureEvent) => void): PinchGestureInterface;
起始版本:7|类名:PinchGestureInterface
方法 or 属性:onActionStart(event: (event?: GestureEvent) => void): PinchGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PinchGestureInterface
方法 or 属性:onActionUpdate(event: (event?: GestureEvent) => void): PinchGestureInterface;
起始版本:7|类名:PinchGestureInterface
方法 or 属性:onActionUpdate(event: (event?: GestureEvent) => void): PinchGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PinchGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): PinchGestureInterface;
起始版本:7|类名:PinchGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): PinchGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:PinchGestureInterface
方法 or 属性:onActionCancel(event: () => void): PinchGestureInterface;
起始版本:7|类名:PinchGestureInterface
方法 or 属性:onActionCancel(event: () => void): PinchGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:RotationGestureInterface
起始版本:7|类名:RotationGestureInterface
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:RotationGestureInterface
方法 or 属性:(value?: { fingers?: number; angle?: number }): RotationGestureInterface;
起始版本:7|类名:RotationGestureInterface
方法 or 属性:(value?: { fingers?: number; angle?: number }): RotationGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:RotationGestureInterface
方法 or 属性:onActionStart(event: (event?: GestureEvent) => void): RotationGestureInterface;
起始版本:7|类名:RotationGestureInterface
方法 or 属性:onActionStart(event: (event?: GestureEvent) => void): RotationGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:RotationGestureInterface
方法 or 属性:onActionUpdate(event: (event?: GestureEvent) => void): RotationGestureInterface;
起始版本:7|类名:RotationGestureInterface
方法 or 属性:onActionUpdate(event: (event?: GestureEvent) => void): RotationGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:RotationGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): RotationGestureInterface;
起始版本:7|类名:RotationGestureInterface
方法 or 属性:onActionEnd(event: (event?: GestureEvent) => void): RotationGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:RotationGestureInterface
方法 or 属性:onActionCancel(event: () => void): RotationGestureInterface;
起始版本:7|类名:RotationGestureInterface
方法 or 属性:onActionCancel(event: () => void): RotationGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureGroupInterface
起始版本:7|类名:GestureGroupInterface
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureGroupInterface
方法 or 属性:(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
起始版本:7|类名:GestureGroupInterface
方法 or 属性:(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GestureGroupInterface
方法 or 属性:onCancel(event: () => void): GestureGroupInterface;
起始版本:7|类名:GestureGroupInterface
方法 or 属性:onCancel(event: () => void): GestureGroupInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TapGesture: TapGestureInterface;
起始版本:7|类名:global
方法 or 属性:declare const TapGesture: TapGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const LongPressGesture: LongPressGestureInterface;
起始版本:7|类名:global
方法 or 属性:declare const LongPressGesture: LongPressGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const PanGesture: PanGestureInterface;
起始版本:7|类名:global
方法 or 属性:declare const PanGesture: PanGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const SwipeGesture: SwipeGestureInterface;
起始版本:7|类名:global
方法 or 属性:declare const SwipeGesture: SwipeGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const PinchGesture: PinchGestureInterface;
起始版本:7|类名:global
方法 or 属性:declare const PinchGesture: PinchGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const RotationGesture: RotationGestureInterface;
起始版本:7|类名:global
方法 or 属性:declare const RotationGesture: RotationGestureInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GestureGroup: GestureGroupInterface;
起始版本:7|类名:global
方法 or 属性:declare const GestureGroup: GestureGroupInterface;
起始版本:10|gesture.d.ts| -|起始版本有变化|类名:GridInterface
起始版本:7|类名:GridInterface
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridInterface
方法 or 属性:(scroller?: Scroller): GridAttribute;
起始版本:7|类名:GridInterface
方法 or 属性:(scroller?: Scroller): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridDirection
起始版本:8|类名:GridDirection
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridDirection
方法 or 属性:Row
起始版本:8|类名:GridDirection
方法 or 属性:Row
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridDirection
方法 or 属性:Column
起始版本:8|类名:GridDirection
方法 or 属性:Column
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridDirection
方法 or 属性:RowReverse
起始版本:8|类名:GridDirection
方法 or 属性:RowReverse
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridDirection
方法 or 属性:ColumnReverse
起始版本:8|类名:GridDirection
方法 or 属性:ColumnReverse
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
起始版本:7|类名:GridAttribute
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:columnsTemplate(value: string): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:columnsTemplate(value: string): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:rowsTemplate(value: string): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:rowsTemplate(value: string): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:columnsGap(value: Length): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:columnsGap(value: Length): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:rowsGap(value: Length): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:rowsGap(value: Length): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:scrollBarWidth(value: number \| string): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:scrollBarWidth(value: number \| string): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:scrollBarColor(value: Color \| number \| string): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:scrollBarColor(value: Color \| number \| string): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:scrollBar(value: BarState): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:scrollBar(value: BarState): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:onScrollIndex(event: (first: number) => void): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:onScrollIndex(event: (first: number) => void): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:cachedCount(value: number): GridAttribute;
起始版本:7|类名:GridAttribute
方法 or 属性:cachedCount(value: number): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:editMode(value: boolean): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:editMode(value: boolean): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:multiSelectable(value: boolean): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:multiSelectable(value: boolean): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:maxCount(value: number): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:maxCount(value: number): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:minCount(value: number): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:minCount(value: number): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:cellLength(value: number): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:cellLength(value: number): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:layoutDirection(value: GridDirection): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:layoutDirection(value: GridDirection): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:supportAnimation(value: boolean): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:supportAnimation(value: boolean): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) \| void): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) \| void): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridAttribute
方法 or 属性:onItemDrop(
event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): GridAttribute;
起始版本:8|类名:GridAttribute
方法 or 属性:onItemDrop(
event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Grid: GridInterface;
起始版本:7|类名:global
方法 or 属性:declare const Grid: GridInterface;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GridInstance: GridAttribute;
起始版本:7|类名:global
方法 or 属性:declare const GridInstance: GridAttribute;
起始版本:10|grid.d.ts| -|起始版本有变化|类名:GridItemInterface
起始版本:7|类名:GridItemInterface
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemInterface
方法 or 属性:(): GridItemAttribute;
起始版本:7|类名:GridItemInterface
方法 or 属性:(): GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemAttribute
起始版本:7|类名:GridItemAttribute
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemAttribute
方法 or 属性:rowStart(value: number): GridItemAttribute;
起始版本:7|类名:GridItemAttribute
方法 or 属性:rowStart(value: number): GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemAttribute
方法 or 属性:rowEnd(value: number): GridItemAttribute;
起始版本:7|类名:GridItemAttribute
方法 or 属性:rowEnd(value: number): GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemAttribute
方法 or 属性:columnStart(value: number): GridItemAttribute;
起始版本:7|类名:GridItemAttribute
方法 or 属性:columnStart(value: number): GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemAttribute
方法 or 属性:columnEnd(value: number): GridItemAttribute;
起始版本:7|类名:GridItemAttribute
方法 or 属性:columnEnd(value: number): GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemAttribute
方法 or 属性:selectable(value: boolean): GridItemAttribute;
起始版本:8|类名:GridItemAttribute
方法 or 属性:selectable(value: boolean): GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridItemAttribute
方法 or 属性:onSelect(event: (isSelected: boolean) => void): GridItemAttribute;
起始版本:8|类名:GridItemAttribute
方法 or 属性:onSelect(event: (isSelected: boolean) => void): GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GridItem: GridItemInterface
起始版本:7|类名:global
方法 or 属性:declare const GridItem: GridItemInterface
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GridItemInstance: GridItemAttribute;
起始版本:7|类名:global
方法 or 属性:declare const GridItemInstance: GridItemAttribute;
起始版本:10|gridItem.d.ts| -|起始版本有变化|类名:GridColColumnOption
起始版本:9|类名:GridColColumnOption
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColColumnOption
方法 or 属性:xs?: number,
起始版本:9|类名:GridColColumnOption
方法 or 属性:xs?: number,
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColColumnOption
方法 or 属性:sm?: number,
起始版本:9|类名:GridColColumnOption
方法 or 属性:sm?: number,
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColColumnOption
方法 or 属性:md?: number,
起始版本:9|类名:GridColColumnOption
方法 or 属性:md?: number,
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColColumnOption
方法 or 属性:lg?: number,
起始版本:9|类名:GridColColumnOption
方法 or 属性:lg?: number,
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColColumnOption
方法 or 属性:xl?: number,
起始版本:9|类名:GridColColumnOption
方法 or 属性:xl?: number,
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColColumnOption
方法 or 属性:xxl?: number,
起始版本:9|类名:GridColColumnOption
方法 or 属性:xxl?: number,
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColOptions
起始版本:9|类名:GridColOptions
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColOptions
方法 or 属性:span?: number \| GridColColumnOption;
起始版本:9|类名:GridColOptions
方法 or 属性:span?: number \| GridColColumnOption;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColOptions
方法 or 属性:offset?: number \| GridColColumnOption;
起始版本:9|类名:GridColOptions
方法 or 属性:offset?: number \| GridColColumnOption;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColOptions
方法 or 属性:order?: number \| GridColColumnOption;
起始版本:9|类名:GridColOptions
方法 or 属性:order?: number \| GridColColumnOption;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColInterface
起始版本:9|类名:GridColInterface
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColInterface
方法 or 属性:(option?: GridColOptions): GridColAttribute;
起始版本:9|类名:GridColInterface
方法 or 属性:(option?: GridColOptions): GridColAttribute;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColAttribute
方法 or 属性:span(value: number \| GridColColumnOption): GridColAttribute;
起始版本:9|类名:GridColAttribute
方法 or 属性:span(value: number \| GridColColumnOption): GridColAttribute;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColAttribute
方法 or 属性:gridColOffset(value: number \| GridColColumnOption): GridColAttribute;
起始版本:9|类名:GridColAttribute
方法 or 属性:gridColOffset(value: number \| GridColColumnOption): GridColAttribute;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridColAttribute
方法 or 属性:order(value: number \| GridColColumnOption): GridColAttribute;
起始版本:9|类名:GridColAttribute
方法 or 属性:order(value: number \| GridColColumnOption): GridColAttribute;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GridCol: GridColInterface
起始版本:9|类名:global
方法 or 属性:declare const GridCol: GridColInterface
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GridColInstance: GridColAttribute;
起始版本:9|类名:global
方法 or 属性:declare const GridColInstance: GridColAttribute;
起始版本:10|grid_col.d.ts| -|起始版本有变化|类名:GridRowSizeOption
起始版本:9|类名:GridRowSizeOption
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowSizeOption
方法 or 属性:xs?: Length,
起始版本:9|类名:GridRowSizeOption
方法 or 属性:xs?: Length,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowSizeOption
方法 or 属性:sm?: Length,
起始版本:9|类名:GridRowSizeOption
方法 or 属性:sm?: Length,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowSizeOption
方法 or 属性:md?: Length,
起始版本:9|类名:GridRowSizeOption
方法 or 属性:md?: Length,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowSizeOption
方法 or 属性:lg?: Length,
起始版本:9|类名:GridRowSizeOption
方法 or 属性:lg?: Length,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowSizeOption
方法 or 属性:xl?: Length,
起始版本:9|类名:GridRowSizeOption
方法 or 属性:xl?: Length,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowSizeOption
方法 or 属性:xxl?: Length,
起始版本:9|类名:GridRowSizeOption
方法 or 属性:xxl?: Length,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowColumnOption
起始版本:9|类名:GridRowColumnOption
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowColumnOption
方法 or 属性:xs?: number,
起始版本:9|类名:GridRowColumnOption
方法 or 属性:xs?: number,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowColumnOption
方法 or 属性:sm?: number,
起始版本:9|类名:GridRowColumnOption
方法 or 属性:sm?: number,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowColumnOption
方法 or 属性:md?: number,
起始版本:9|类名:GridRowColumnOption
方法 or 属性:md?: number,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowColumnOption
方法 or 属性:lg?: number,
起始版本:9|类名:GridRowColumnOption
方法 or 属性:lg?: number,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowColumnOption
方法 or 属性:xl?: number,
起始版本:9|类名:GridRowColumnOption
方法 or 属性:xl?: number,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowColumnOption
方法 or 属性:xxl?: number,
起始版本:9|类名:GridRowColumnOption
方法 or 属性:xxl?: number,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GutterOption
起始版本:9|类名:GutterOption
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GutterOption
方法 or 属性:x?: Length \| GridRowSizeOption,
起始版本:9|类名:GutterOption
方法 or 属性:x?: Length \| GridRowSizeOption,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GutterOption
方法 or 属性:y?: Length \| GridRowSizeOption
起始版本:9|类名:GutterOption
方法 or 属性:y?: Length \| GridRowSizeOption
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:BreakpointsReference
起始版本:9|类名:BreakpointsReference
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:BreakpointsReference
方法 or 属性:WindowSize
起始版本:9|类名:BreakpointsReference
方法 or 属性:WindowSize
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:BreakpointsReference
方法 or 属性:ComponentSize
起始版本:9|类名:BreakpointsReference
方法 or 属性:ComponentSize
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowDirection
起始版本:9|类名:GridRowDirection
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowDirection
方法 or 属性:Row
起始版本:9|类名:GridRowDirection
方法 or 属性:Row
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowDirection
方法 or 属性:RowReverse
起始版本:9|类名:GridRowDirection
方法 or 属性:RowReverse
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:BreakPoints
起始版本:9|类名:BreakPoints
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:BreakPoints
方法 or 属性:value?: Array\,
起始版本:9|类名:BreakPoints
方法 or 属性:value?: Array\,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:BreakPoints
方法 or 属性:reference?: BreakpointsReference,
起始版本:9|类名:BreakPoints
方法 or 属性:reference?: BreakpointsReference,
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowOptions
起始版本:9|类名:GridRowOptions
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowOptions
方法 or 属性:gutter?: Length \| GutterOption;
起始版本:9|类名:GridRowOptions
方法 or 属性:gutter?: Length \| GutterOption;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowOptions
方法 or 属性:columns?: number \| GridRowColumnOption;
起始版本:9|类名:GridRowOptions
方法 or 属性:columns?: number \| GridRowColumnOption;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowOptions
方法 or 属性:breakpoints?: BreakPoints;
起始版本:9|类名:GridRowOptions
方法 or 属性:breakpoints?: BreakPoints;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowOptions
方法 or 属性:direction?: GridRowDirection;
起始版本:9|类名:GridRowOptions
方法 or 属性:direction?: GridRowDirection;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowInterface
起始版本:9|类名:GridRowInterface
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowInterface
方法 or 属性:(option?: GridRowOptions): GridRowAttribute;
起始版本:9|类名:GridRowInterface
方法 or 属性:(option?: GridRowOptions): GridRowAttribute;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:GridRowAttribute
方法 or 属性:onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute;
起始版本:9|类名:GridRowAttribute
方法 or 属性:onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GridRow: GridRowInterface;
起始版本:9|类名:global
方法 or 属性:declare const GridRow: GridRowInterface;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const GridRowInstance: GridRowAttribute;
起始版本:9|类名:global
方法 or 属性:declare const GridRowInstance: GridRowAttribute;
起始版本:10|grid_row.d.ts| -|起始版本有变化|类名:ImageAttribute
方法 or 属性:colorFilter(value: ColorFilter): ImageAttribute;
起始版本:9|类名:ImageAttribute
方法 or 属性:colorFilter(value: ColorFilter): ImageAttribute;
起始版本:10|image.d.ts| -|起始版本有变化|类名:ImageAttribute
方法 or 属性:copyOption(value: CopyOptions): ImageAttribute;
起始版本:9|类名:ImageAttribute
方法 or 属性:copyOption(value: CopyOptions): ImageAttribute;
起始版本:10|image.d.ts| -|起始版本有变化|类名:ImageAnimatorInterface
起始版本:7|类名:ImageAnimatorInterface
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorInterface
方法 or 属性:(): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorInterface
方法 or 属性:(): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageFrameInfo
起始版本:7|类名:ImageFrameInfo
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageFrameInfo
方法 or 属性:width?: number \| string;
起始版本:7|类名:ImageFrameInfo
方法 or 属性:width?: number \| string;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageFrameInfo
方法 or 属性:height?: number \| string;
起始版本:7|类名:ImageFrameInfo
方法 or 属性:height?: number \| string;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageFrameInfo
方法 or 属性:top?: number \| string;
起始版本:7|类名:ImageFrameInfo
方法 or 属性:top?: number \| string;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageFrameInfo
方法 or 属性:left?: number \| string;
起始版本:7|类名:ImageFrameInfo
方法 or 属性:left?: number \| string;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageFrameInfo
方法 or 属性:duration?: number;
起始版本:7|类名:ImageFrameInfo
方法 or 属性:duration?: number;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
起始版本:7|类名:ImageAnimatorAttribute
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:images(value: Array\): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:images(value: Array\): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:state(value: AnimationStatus): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:state(value: AnimationStatus): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:duration(value: number): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:duration(value: number): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:reverse(value: boolean): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:reverse(value: boolean): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:fixedSize(value: boolean): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:fixedSize(value: boolean): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:fillMode(value: FillMode): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:fillMode(value: FillMode): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:iterations(value: number): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:iterations(value: number): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:onStart(event: () => void): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:onStart(event: () => void): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:onPause(event: () => void): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:onPause(event: () => void): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:onRepeat(event: () => void): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:onRepeat(event: () => void): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:onCancel(event: () => void): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:onCancel(event: () => void): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:ImageAnimatorAttribute
方法 or 属性:onFinish(event: () => void): ImageAnimatorAttribute;
起始版本:7|类名:ImageAnimatorAttribute
方法 or 属性:onFinish(event: () => void): ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ImageAnimator: ImageAnimatorInterface;
起始版本:7|类名:global
方法 or 属性:declare const ImageAnimator: ImageAnimatorInterface;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ImageAnimatorInstance: ImageAnimatorAttribute;
起始版本:7|类名:global
方法 or 属性:declare const ImageAnimatorInstance: ImageAnimatorAttribute;
起始版本:10|image_animator.d.ts| -|起始版本有变化|类名:DataChangeListener
起始版本:7|类名:DataChangeListener
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:DataChangeListener
方法 or 属性:onDataReloaded(): void;
起始版本:7|类名:DataChangeListener
方法 or 属性:onDataReloaded(): void;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:DataChangeListener
方法 or 属性:onDataAdd(index: number): void;
起始版本:8|类名:DataChangeListener
方法 or 属性:onDataAdd(index: number): void;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:DataChangeListener
方法 or 属性:onDataMove(from: number, to: number): void;
起始版本:8|类名:DataChangeListener
方法 or 属性:onDataMove(from: number, to: number): void;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:DataChangeListener
方法 or 属性:onDataDelete(index: number): void;
起始版本:8|类名:DataChangeListener
方法 or 属性:onDataDelete(index: number): void;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:DataChangeListener
方法 or 属性:onDataChange(index: number): void;
起始版本:8|类名:DataChangeListener
方法 or 属性:onDataChange(index: number): void;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:IDataSource
起始版本:7|类名:IDataSource
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:IDataSource
方法 or 属性:totalCount(): number;
起始版本:7|类名:IDataSource
方法 or 属性:totalCount(): number;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:IDataSource
方法 or 属性:getData(index: number): any;
起始版本:7|类名:IDataSource
方法 or 属性:getData(index: number): any;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:IDataSource
方法 or 属性:registerDataChangeListener(listener: DataChangeListener): void;
起始版本:7|类名:IDataSource
方法 or 属性:registerDataChangeListener(listener: DataChangeListener): void;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:IDataSource
方法 or 属性:unregisterDataChangeListener(listener: DataChangeListener): void;
起始版本:7|类名:IDataSource
方法 or 属性:unregisterDataChangeListener(listener: DataChangeListener): void;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:LazyForEachInterface
起始版本:7|类名:LazyForEachInterface
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:LazyForEachInterface
方法 or 属性:(
dataSource: IDataSource,
itemGenerator: (item: any, index?: number) => void,
keyGenerator?: (item: any, index?: number) => string,
): LazyForEachInterface;
起始版本:7|类名:LazyForEachInterface
方法 or 属性:(
dataSource: IDataSource,
itemGenerator: (item: any, index?: number) => void,
keyGenerator?: (item: any, index?: number) => string,
): LazyForEachInterface;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const LazyForEach: LazyForEachInterface;
起始版本:7|类名:global
方法 or 属性:declare const LazyForEach: LazyForEachInterface;
起始版本:10|lazy_for_each.d.ts| -|起始版本有变化|类名:ListItemAlign
起始版本:9|类名:ListItemAlign
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListItemAlign
方法 or 属性:Start
起始版本:9|类名:ListItemAlign
方法 or 属性:Start
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListItemAlign
方法 or 属性:Center
起始版本:9|类名:ListItemAlign
方法 or 属性:Center
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListItemAlign
方法 or 属性:End
起始版本:9|类名:ListItemAlign
方法 or 属性:End
起始版本:10|list.d.ts| -|起始版本有变化|类名:StickyStyle
起始版本:9|类名:StickyStyle
起始版本:10|list.d.ts| -|起始版本有变化|类名:StickyStyle
方法 or 属性:None = 0
起始版本:9|类名:StickyStyle
方法 or 属性:None = 0
起始版本:10|list.d.ts| -|起始版本有变化|类名:StickyStyle
方法 or 属性:Header = 1
起始版本:9|类名:StickyStyle
方法 or 属性:Header = 1
起始版本:10|list.d.ts| -|起始版本有变化|类名:StickyStyle
方法 or 属性:Footer = 2
起始版本:9|类名:StickyStyle
方法 or 属性:Footer = 2
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:lanes(value: number \| LengthConstrain): ListAttribute;
起始版本:9|类名:ListAttribute
方法 or 属性:lanes(value: number \| LengthConstrain): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:alignListItem(value: ListItemAlign): ListAttribute;
起始版本:9|类名:ListAttribute
方法 or 属性:alignListItem(value: ListItemAlign): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:sticky(value: StickyStyle): ListAttribute;
起始版本:9|类名:ListAttribute
方法 or 属性:sticky(value: StickyStyle): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onScrollStart(event: () => void): ListAttribute;
起始版本:9|类名:ListAttribute
方法 or 属性:onScrollStart(event: () => void): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onItemMove(event: (from: number, to: number) => boolean): ListAttribute;
起始版本:7|类名:ListAttribute
方法 or 属性:onItemMove(event: (from: number, to: number) => boolean): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) \| void)): ListAttribute;
起始版本:8|类名:ListAttribute
方法 or 属性:onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) \| void)): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute;
起始版本:8|类名:ListAttribute
方法 or 属性:onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute;
起始版本:8|类名:ListAttribute
方法 or 属性:onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute;
起始版本:8|类名:ListAttribute
方法 or 属性:onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
起始版本:8|类名:ListAttribute
方法 or 属性:onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:ListAttribute
方法 or 属性:onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute;
起始版本:9|类名:ListAttribute
方法 or 属性:onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute;
起始版本:10|list.d.ts| -|起始版本有变化|类名:SwipeEdgeEffect
起始版本:9|类名:SwipeEdgeEffect
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:SwipeEdgeEffect
方法 or 属性:Spring
起始版本:9|类名:SwipeEdgeEffect
方法 or 属性:Spring
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:SwipeEdgeEffect
方法 or 属性:None
起始版本:9|类名:SwipeEdgeEffect
方法 or 属性:None
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:SwipeActionOptions
起始版本:9|类名:SwipeActionOptions
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:SwipeActionOptions
方法 or 属性:start?: CustomBuilder;
起始版本:9|类名:SwipeActionOptions
方法 or 属性:start?: CustomBuilder;
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:SwipeActionOptions
方法 or 属性:end?: CustomBuilder;
起始版本:9|类名:SwipeActionOptions
方法 or 属性:end?: CustomBuilder;
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:SwipeActionOptions
方法 or 属性:edgeEffect?: SwipeEdgeEffect;
起始版本:9|类名:SwipeActionOptions
方法 or 属性:edgeEffect?: SwipeEdgeEffect;
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:ListItemAttribute
方法 or 属性:selectable(value: boolean): ListItemAttribute;
起始版本:8|类名:ListItemAttribute
方法 or 属性:selectable(value: boolean): ListItemAttribute;
起始版本:9|list_item.d.ts| -|起始版本有变化|类名:ListItemAttribute
方法 or 属性:swipeAction(value: SwipeActionOptions): ListItemAttribute;
起始版本:9|类名:ListItemAttribute
方法 or 属性:swipeAction(value: SwipeActionOptions): ListItemAttribute;
起始版本:10|list_item.d.ts| -|起始版本有变化|类名:ListItemGroupOptions
起始版本:9|类名:ListItemGroupOptions
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:ListItemGroupOptions
方法 or 属性:header?: CustomBuilder;
起始版本:9|类名:ListItemGroupOptions
方法 or 属性:header?: CustomBuilder;
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:ListItemGroupOptions
方法 or 属性:footer?: CustomBuilder;
起始版本:9|类名:ListItemGroupOptions
方法 or 属性:footer?: CustomBuilder;
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:ListItemGroupOptions
方法 or 属性:space?: number \| string;
起始版本:9|类名:ListItemGroupOptions
方法 or 属性:space?: number \| string;
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:ListItemGroupInterface
起始版本:9|类名:ListItemGroupInterface
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:ListItemGroupInterface
方法 or 属性:(options?: ListItemGroupOptions): ListItemGroupAttribute;
起始版本:9|类名:ListItemGroupInterface
方法 or 属性:(options?: ListItemGroupOptions): ListItemGroupAttribute;
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:ListItemGroupAttribute
起始版本:9|类名:ListItemGroupAttribute
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:ListItemGroupAttribute
方法 or 属性:divider(
value: {
strokeWidth: Length;
color?: ResourceColor;
startMargin?: Length;
endMargin?: Length;
} \| null,
): ListItemGroupAttribute;
起始版本:9|类名:ListItemGroupAttribute
方法 or 属性:divider(
value: {
strokeWidth: Length;
color?: ResourceColor;
startMargin?: Length;
endMargin?: Length;
} \| null,
): ListItemGroupAttribute;
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ListItemGroupInstance: ListItemGroupAttribute;
起始版本:9|类名:global
方法 or 属性:declare const ListItemGroupInstance: ListItemGroupAttribute;
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ListItemGroup: ListItemGroupInterface;
起始版本:9|类名:global
方法 or 属性:declare const ListItemGroup: ListItemGroupInterface;
起始版本:10|list_item_group.d.ts| -|起始版本有变化|类名:MenuInterface
起始版本:9|类名:MenuInterface
起始版本:10|menu.d.ts| -|起始版本有变化|类名:MenuInterface
方法 or 属性:(): MenuAttribute;
起始版本:9|类名:MenuInterface
方法 or 属性:(): MenuAttribute;
起始版本:10|menu.d.ts| -|起始版本有变化|类名:MenuAttribute
起始版本:9|类名:MenuAttribute
起始版本:10|menu.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Menu: MenuInterface;
起始版本:9|类名:global
方法 or 属性:declare const Menu: MenuInterface;
起始版本:10|menu.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const MenuInstance: MenuAttribute;
起始版本:9|类名:global
方法 or 属性:declare const MenuInstance: MenuAttribute;
起始版本:10|menu.d.ts| -|起始版本有变化|类名:MenuItemOptions
起始版本:9|类名:MenuItemOptions
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemOptions
方法 or 属性:startIcon?: ResourceStr;
起始版本:9|类名:MenuItemOptions
方法 or 属性:startIcon?: ResourceStr;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemOptions
方法 or 属性:content?: ResourceStr;
起始版本:9|类名:MenuItemOptions
方法 or 属性:content?: ResourceStr;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemOptions
方法 or 属性:endIcon?: ResourceStr;
起始版本:9|类名:MenuItemOptions
方法 or 属性:endIcon?: ResourceStr;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemOptions
方法 or 属性:labelInfo?: ResourceStr;
起始版本:9|类名:MenuItemOptions
方法 or 属性:labelInfo?: ResourceStr;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemOptions
方法 or 属性:builder?: CustomBuilder;
起始版本:9|类名:MenuItemOptions
方法 or 属性:builder?: CustomBuilder;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemInterface
起始版本:9|类名:MenuItemInterface
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemInterface
方法 or 属性:(value?: MenuItemOptions \| CustomBuilder): MenuItemAttribute;
起始版本:9|类名:MenuItemInterface
方法 or 属性:(value?: MenuItemOptions \| CustomBuilder): MenuItemAttribute;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemAttribute
起始版本:9|类名:MenuItemAttribute
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemAttribute
方法 or 属性:selected(value: boolean): MenuItemAttribute;
起始版本:9|类名:MenuItemAttribute
方法 or 属性:selected(value: boolean): MenuItemAttribute;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemAttribute
方法 or 属性:onChange(callback: (selected: boolean) => void): MenuItemAttribute;
起始版本:9|类名:MenuItemAttribute
方法 or 属性:onChange(callback: (selected: boolean) => void): MenuItemAttribute;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const MenuItem: MenuItemInterface;
起始版本:9|类名:global
方法 or 属性:declare const MenuItem: MenuItemInterface;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const MenuItemInstance: MenuItemAttribute;
起始版本:9|类名:global
方法 or 属性:declare const MenuItemInstance: MenuItemAttribute;
起始版本:10|menu_item.d.ts| -|起始版本有变化|类名:MenuItemGroupOptions
起始版本:9|类名:MenuItemGroupOptions
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:MenuItemGroupOptions
方法 or 属性:header?: ResourceStr \| CustomBuilder;
起始版本:9|类名:MenuItemGroupOptions
方法 or 属性:header?: ResourceStr \| CustomBuilder;
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:MenuItemGroupOptions
方法 or 属性:footer?: ResourceStr \| CustomBuilder;
起始版本:9|类名:MenuItemGroupOptions
方法 or 属性:footer?: ResourceStr \| CustomBuilder;
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:MenuItemGroupInterface
起始版本:9|类名:MenuItemGroupInterface
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:MenuItemGroupInterface
方法 or 属性:(value?: MenuItemGroupOptions): MenuItemGroupAttribute;
起始版本:9|类名:MenuItemGroupInterface
方法 or 属性:(value?: MenuItemGroupOptions): MenuItemGroupAttribute;
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:MenuItemGroupAttribute
起始版本:9|类名:MenuItemGroupAttribute
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const MenuItemGroup: MenuItemGroupInterface;
起始版本:9|类名:global
方法 or 属性:declare const MenuItemGroup: MenuItemGroupInterface;
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const MenuItemGroupInstance: MenuItemGroupAttribute;
起始版本:9|类名:global
方法 or 属性:declare const MenuItemGroupInstance: MenuItemGroupAttribute;
起始版本:10|menu_item_group.d.ts| -|起始版本有变化|类名:NavigationCommonTitle
起始版本:9|类名:NavigationCommonTitle
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationCommonTitle
方法 or 属性:main: string;
起始版本:9|类名:NavigationCommonTitle
方法 or 属性:main: string;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationCommonTitle
方法 or 属性:sub: string;
起始版本:9|类名:NavigationCommonTitle
方法 or 属性:sub: string;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationCustomTitle
起始版本:9|类名:NavigationCustomTitle
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationCustomTitle
方法 or 属性:builder: CustomBuilder;
起始版本:9|类名:NavigationCustomTitle
方法 or 属性:builder: CustomBuilder;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationCustomTitle
方法 or 属性:height: TitleHeight \| Length;
起始版本:9|类名:NavigationCustomTitle
方法 or 属性:height: TitleHeight \| Length;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationMode
起始版本:9|类名:NavigationMode
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationMode
方法 or 属性:Stack
起始版本:9|类名:NavigationMode
方法 or 属性:Stack
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationMode
方法 or 属性:Split
起始版本:9|类名:NavigationMode
方法 or 属性:Split
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationMode
方法 or 属性:Auto
起始版本:9|类名:NavigationMode
方法 or 属性:Auto
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavBarPosition
起始版本:9|类名:NavBarPosition
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavBarPosition
方法 or 属性:Start
起始版本:9|类名:NavBarPosition
方法 or 属性:Start
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavBarPosition
方法 or 属性:End
起始版本:9|类名:NavBarPosition
方法 or 属性:End
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationTitleMode
起始版本:8|类名:NavigationTitleMode
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationTitleMode
方法 or 属性:Free = 0
起始版本:8|类名:NavigationTitleMode
方法 or 属性:Free = 0
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationTitleMode
方法 or 属性:Full
起始版本:8|类名:NavigationTitleMode
方法 or 属性:Full
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationTitleMode
方法 or 属性:Mini
起始版本:8|类名:NavigationTitleMode
方法 or 属性:Mini
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationMenuItem
方法 or 属性:value: string;
起始版本:8|类名:NavigationMenuItem
方法 or 属性:value: string;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationMenuItem
方法 or 属性:icon?: string;
起始版本:8|类名:NavigationMenuItem
方法 or 属性:icon?: string;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationMenuItem
方法 or 属性:action?: () => void;
起始版本:8|类名:NavigationMenuItem
方法 or 属性:action?: () => void;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationInterface
起始版本:8|类名:NavigationInterface
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationInterface
方法 or 属性:(): NavigationAttribute;
起始版本:8|类名:NavigationInterface
方法 or 属性:(): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
起始版本:8|类名:NavigationAttribute
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:navBarWidth(value: Length): NavigationAttribute;
起始版本:9|类名:NavigationAttribute
方法 or 属性:navBarWidth(value: Length): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:navBarPosition(value: NavBarPosition): NavigationAttribute;
起始版本:9|类名:NavigationAttribute
方法 or 属性:navBarPosition(value: NavBarPosition): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:mode(value: NavigationMode): NavigationAttribute;
起始版本:9|类名:NavigationAttribute
方法 or 属性:mode(value: NavigationMode): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:backButtonIcon(value: string \| PixelMap \| Resource): NavigationAttribute;
起始版本:9|类名:NavigationAttribute
方法 or 属性:backButtonIcon(value: string \| PixelMap \| Resource): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:hideNavBar(value: boolean): NavigationAttribute;
起始版本:9|类名:NavigationAttribute
方法 or 属性:hideNavBar(value: boolean): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:hideTitleBar(value: boolean): NavigationAttribute;
起始版本:8|类名:NavigationAttribute
方法 or 属性:hideTitleBar(value: boolean): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:hideBackButton(value: boolean): NavigationAttribute;
起始版本:8|类名:NavigationAttribute
方法 or 属性:hideBackButton(value: boolean): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:titleMode(value: NavigationTitleMode): NavigationAttribute;
起始版本:8|类名:NavigationAttribute
方法 or 属性:titleMode(value: NavigationTitleMode): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:menus(value: Array\ \| CustomBuilder): NavigationAttribute;
起始版本:8|类名:NavigationAttribute
方法 or 属性:menus(value: Array\ \| CustomBuilder): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:toolBar(value: object \| CustomBuilder): NavigationAttribute;
起始版本:8|类名:NavigationAttribute
方法 or 属性:toolBar(value: object \| CustomBuilder): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:hideToolBar(value: boolean): NavigationAttribute;
起始版本:8|类名:NavigationAttribute
方法 or 属性:hideToolBar(value: boolean): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
起始版本:8|类名:NavigationAttribute
方法 or 属性:onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationAttribute
方法 or 属性:onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute;
起始版本:9|类名:NavigationAttribute
方法 or 属性:onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Navigation: NavigationInterface;
起始版本:8|类名:global
方法 or 属性:declare const Navigation: NavigationInterface;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const NavigationInstance: NavigationAttribute;
起始版本:8|类名:global
方法 or 属性:declare const NavigationInstance: NavigationAttribute;
起始版本:10|navigation.d.ts| -|起始版本有变化|类名:NavigationType
起始版本:7|类名:NavigationType
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigationType
方法 or 属性:Push
起始版本:7|类名:NavigationType
方法 or 属性:Push
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigationType
方法 or 属性:Back
起始版本:7|类名:NavigationType
方法 or 属性:Back
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigationType
方法 or 属性:Replace
起始版本:7|类名:NavigationType
方法 or 属性:Replace
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorInterface
起始版本:7|类名:NavigatorInterface
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorInterface
方法 or 属性:(value?: { target: string; type?: NavigationType }): NavigatorAttribute;
起始版本:7|类名:NavigatorInterface
方法 or 属性:(value?: { target: string; type?: NavigationType }): NavigatorAttribute;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorInterface
方法 or 属性:(): NavigatorAttribute;
起始版本:7|类名:NavigatorInterface
方法 or 属性:(): NavigatorAttribute;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorAttribute
起始版本:7|类名:NavigatorAttribute
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorAttribute
方法 or 属性:active(value: boolean): NavigatorAttribute;
起始版本:7|类名:NavigatorAttribute
方法 or 属性:active(value: boolean): NavigatorAttribute;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorAttribute
方法 or 属性:type(value: NavigationType): NavigatorAttribute;
起始版本:7|类名:NavigatorAttribute
方法 or 属性:type(value: NavigationType): NavigatorAttribute;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorAttribute
方法 or 属性:target(value: string): NavigatorAttribute;
起始版本:7|类名:NavigatorAttribute
方法 or 属性:target(value: string): NavigatorAttribute;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavigatorAttribute
方法 or 属性:params(value: object): NavigatorAttribute;
起始版本:7|类名:NavigatorAttribute
方法 or 属性:params(value: object): NavigatorAttribute;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Navigator: NavigatorInterface;
起始版本:7|类名:global
方法 or 属性:declare const Navigator: NavigatorInterface;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const NavigatorInstance: NavigatorAttribute;
起始版本:7|类名:global
方法 or 属性:declare const NavigatorInstance: NavigatorAttribute;
起始版本:10|navigator.d.ts| -|起始版本有变化|类名:NavDestinationCommonTitle
起始版本:9|类名:NavDestinationCommonTitle
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationCommonTitle
方法 or 属性:main: string;
起始版本:9|类名:NavDestinationCommonTitle
方法 or 属性:main: string;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationCommonTitle
方法 or 属性:sub: string;
起始版本:9|类名:NavDestinationCommonTitle
方法 or 属性:sub: string;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationCustomTitle
起始版本:9|类名:NavDestinationCustomTitle
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationCustomTitle
方法 or 属性:builder: CustomBuilder;
起始版本:9|类名:NavDestinationCustomTitle
方法 or 属性:builder: CustomBuilder;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationCustomTitle
方法 or 属性:height: TitleHeight \| Length;
起始版本:9|类名:NavDestinationCustomTitle
方法 or 属性:height: TitleHeight \| Length;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationInterface
起始版本:9|类名:NavDestinationInterface
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationInterface
方法 or 属性:(): NavDestinationAttribute;
起始版本:9|类名:NavDestinationInterface
方法 or 属性:(): NavDestinationAttribute;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationAttribute
起始版本:9|类名:NavDestinationAttribute
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationAttribute
方法 or 属性:title(value: string \| CustomBuilder \| NavDestinationCommonTitle \| NavDestinationCustomTitle): NavDestinationAttribute;
起始版本:9|类名:NavDestinationAttribute
方法 or 属性:title(value: string \| CustomBuilder \| NavDestinationCommonTitle \| NavDestinationCustomTitle): NavDestinationAttribute;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavDestinationAttribute
方法 or 属性:hideTitleBar(value: boolean): NavDestinationAttribute;
起始版本:9|类名:NavDestinationAttribute
方法 or 属性:hideTitleBar(value: boolean): NavDestinationAttribute;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const NavDestination: NavDestinationInterface;
起始版本:9|类名:global
方法 or 属性:declare const NavDestination: NavDestinationInterface;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const NavDestinationInstance: NavDestinationAttribute;
起始版本:9|类名:global
方法 or 属性:declare const NavDestinationInstance: NavDestinationAttribute;
起始版本:10|nav_destination.d.ts| -|起始版本有变化|类名:NavRouterInterface
起始版本:9|类名:NavRouterInterface
起始版本:10|nav_router.d.ts| -|起始版本有变化|类名:NavRouterInterface
方法 or 属性:(): NavRouterAttribute;
起始版本:9|类名:NavRouterInterface
方法 or 属性:(): NavRouterAttribute;
起始版本:10|nav_router.d.ts| -|起始版本有变化|类名:NavRouterAttribute
起始版本:9|类名:NavRouterAttribute
起始版本:10|nav_router.d.ts| -|起始版本有变化|类名:NavRouterAttribute
方法 or 属性:onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute;
起始版本:9|类名:NavRouterAttribute
方法 or 属性:onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute;
起始版本:10|nav_router.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const NavRouter: NavRouterInterface;
起始版本:9|类名:global
方法 or 属性:declare const NavRouter: NavRouterInterface;
起始版本:10|nav_router.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const NavRouterInstance: NavRouterAttribute;
起始版本:9|类名:global
方法 or 属性:declare const NavRouterInstance: NavRouterAttribute;
起始版本:10|nav_router.d.ts| -|起始版本有变化|类名:RouteType
起始版本:7|类名:RouteType
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:RouteType
方法 or 属性:None
起始版本:7|类名:RouteType
方法 or 属性:None
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:RouteType
方法 or 属性:Push
起始版本:7|类名:RouteType
方法 or 属性:Push
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:RouteType
方法 or 属性:Pop
起始版本:7|类名:RouteType
方法 or 属性:Pop
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:SlideEffect
起始版本:7|类名:SlideEffect
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:SlideEffect
方法 or 属性:Left
起始版本:7|类名:SlideEffect
方法 or 属性:Left
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:SlideEffect
方法 or 属性:Right
起始版本:7|类名:SlideEffect
方法 or 属性:Right
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:SlideEffect
方法 or 属性:Top
起始版本:7|类名:SlideEffect
方法 or 属性:Top
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:SlideEffect
方法 or 属性:Bottom
起始版本:7|类名:SlideEffect
方法 or 属性:Bottom
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:CommonTransition
起始版本:7|类名:CommonTransition
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:CommonTransition
方法 or 属性:constructor();
起始版本:7|类名:CommonTransition
方法 or 属性:constructor();
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:CommonTransition
方法 or 属性:slide(value: SlideEffect): T;
起始版本:7|类名:CommonTransition
方法 or 属性:slide(value: SlideEffect): T;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:CommonTransition
方法 or 属性:translate(value: { x?: number \| string; y?: number \| string; z?: number \| string }): T;
起始版本:7|类名:CommonTransition
方法 or 属性:translate(value: { x?: number \| string; y?: number \| string; z?: number \| string }): T;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:CommonTransition
方法 or 属性:scale(value: { x?: number; y?: number; z?: number; centerX?: number \| string; centerY?: number \| string }): T;
起始版本:7|类名:CommonTransition
方法 or 属性:scale(value: { x?: number; y?: number; z?: number; centerX?: number \| string; centerY?: number \| string }): T;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:CommonTransition
方法 or 属性:opacity(value: number): T;
起始版本:7|类名:CommonTransition
方法 or 属性:opacity(value: number): T;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:PageTransitionEnterInterface
起始版本:7|类名:PageTransitionEnterInterface
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:PageTransitionEnterInterface
方法 or 属性:(value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionEnterInterface;
起始版本:7|类名:PageTransitionEnterInterface
方法 or 属性:(value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionEnterInterface;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:PageTransitionEnterInterface
方法 or 属性:onEnter(event: (type?: RouteType, progress?: number) => void): PageTransitionEnterInterface;
起始版本:7|类名:PageTransitionEnterInterface
方法 or 属性:onEnter(event: (type?: RouteType, progress?: number) => void): PageTransitionEnterInterface;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:PageTransitionExitInterface
起始版本:7|类名:PageTransitionExitInterface
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:PageTransitionExitInterface
方法 or 属性:(value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionExitInterface;
起始版本:7|类名:PageTransitionExitInterface
方法 or 属性:(value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionExitInterface;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:PageTransitionExitInterface
方法 or 属性:onExit(event: (type?: RouteType, progress?: number) => void): PageTransitionExitInterface;
起始版本:7|类名:PageTransitionExitInterface
方法 or 属性:onExit(event: (type?: RouteType, progress?: number) => void): PageTransitionExitInterface;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const PageTransitionEnter: PageTransitionEnterInterface;
起始版本:7|类名:global
方法 or 属性:declare const PageTransitionEnter: PageTransitionEnterInterface;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const PageTransitionExit: PageTransitionExitInterface;
起始版本:7|类名:global
方法 or 属性:declare const PageTransitionExit: PageTransitionExitInterface;
起始版本:10|page_transition.d.ts| -|起始版本有变化|类名:PanelMode
起始版本:7|类名:PanelMode
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelMode
方法 or 属性:Mini
起始版本:7|类名:PanelMode
方法 or 属性:Mini
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelMode
方法 or 属性:Half
起始版本:7|类名:PanelMode
方法 or 属性:Half
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelMode
方法 or 属性:Full
起始版本:7|类名:PanelMode
方法 or 属性:Full
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelType
起始版本:7|类名:PanelType
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelType
方法 or 属性:Minibar
起始版本:7|类名:PanelType
方法 or 属性:Minibar
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelType
方法 or 属性:Foldable
起始版本:7|类名:PanelType
方法 or 属性:Foldable
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelType
方法 or 属性:Temporary
起始版本:7|类名:PanelType
方法 or 属性:Temporary
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelInterface
起始版本:7|类名:PanelInterface
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelInterface
方法 or 属性:(show: boolean): PanelAttribute;
起始版本:7|类名:PanelInterface
方法 or 属性:(show: boolean): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
起始版本:7|类名:PanelAttribute
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:mode(value: PanelMode): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:mode(value: PanelMode): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:type(value: PanelType): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:type(value: PanelType): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:dragBar(value: boolean): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:dragBar(value: boolean): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:fullHeight(value: number \| string): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:fullHeight(value: number \| string): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:halfHeight(value: number \| string): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:halfHeight(value: number \| string): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:miniHeight(value: number \| string): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:miniHeight(value: number \| string): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:show(value: boolean): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:show(value: boolean): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:backgroundMask(color: ResourceColor): PanelAttribute;
起始版本:9|类名:PanelAttribute
方法 or 属性:backgroundMask(color: ResourceColor): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:onChange(
event: (
/**
* Width of content area.
* @since 7
*/
width: number,

/**
* Height of content area.
* @since 7
*/
height: number,

/**
* Initial state.
* @since 7
*/
mode: PanelMode,
) => void,
): PanelAttribute;
起始版本:7|类名:PanelAttribute
方法 or 属性:onChange(
event: (
/**
* Width of content area.
* @since 7
*/
width: number,

/**
* Height of content area.
* @since 7
*/
height: number,

/**
* Initial state.
* @since 7
*/
mode: PanelMode,
) => void,
): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PanelAttribute
方法 or 属性:onHeightChange(callback: (value: number) => void): PanelAttribute;
起始版本:9|类名:PanelAttribute
方法 or 属性:onHeightChange(callback: (value: number) => void): PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Panel: PanelInterface;
起始版本:7|类名:global
方法 or 属性:declare const Panel: PanelInterface;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const PanelInstance: PanelAttribute;
起始版本:7|类名:global
方法 or 属性:declare const PanelInstance: PanelAttribute;
起始版本:10|panel.d.ts| -|起始版本有变化|类名:PatternLockController
起始版本:9|类名:PatternLockController
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockController
方法 or 属性:constructor();
起始版本:N/A|类名:PatternLockController
方法 or 属性:constructor();
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockController
方法 or 属性:reset();
起始版本:N/A|类名:PatternLockController
方法 or 属性:reset();
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockInterface
起始版本:9|类名:PatternLockInterface
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
起始版本:9|类名:PatternLockAttribute
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:sideLength(value: Length): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:sideLength(value: Length): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:circleRadius(value: Length): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:circleRadius(value: Length): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:backgroundColor(value: ResourceColor): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:backgroundColor(value: ResourceColor): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:regularColor(value: ResourceColor): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:regularColor(value: ResourceColor): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:selectedColor(value: ResourceColor): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:selectedColor(value: ResourceColor): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:activeColor(value: ResourceColor): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:activeColor(value: ResourceColor): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:pathColor(value: ResourceColor): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:pathColor(value: ResourceColor): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:pathStrokeWidth(value: number \| string): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:pathStrokeWidth(value: number \| string): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:onPatternComplete(callback: (input: Array\) => void): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:onPatternComplete(callback: (input: Array\) => void): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:PatternLockAttribute
方法 or 属性:autoReset(value: boolean): PatternLockAttribute;
起始版本:9|类名:PatternLockAttribute
方法 or 属性:autoReset(value: boolean): PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const PatternLock: PatternLockInterface;
起始版本:9|类名:global
方法 or 属性:declare const PatternLock: PatternLockInterface;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const PatternLockInstance: PatternLockAttribute;
起始版本:9|类名:global
方法 or 属性:declare const PatternLockInstance: PatternLockAttribute;
起始版本:10|pattern_lock.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Rect: RectInterface;
起始版本:9|类名:global
方法 or 属性:declare const Rect: RectInterface;
起始版本:10|rect.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const RectInstance: RectAttribute;
起始版本:9|类名:global
方法 or 属性:declare const RectInstance: RectAttribute;
起始版本:10|rect.d.ts| -|起始版本有变化|类名:RefreshStatus
起始版本:8|类名:RefreshStatus
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshStatus
方法 or 属性:Inactive
起始版本:8|类名:RefreshStatus
方法 or 属性:Inactive
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshStatus
方法 or 属性:Drag
起始版本:8|类名:RefreshStatus
方法 or 属性:Drag
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshStatus
方法 or 属性:OverDrag
起始版本:8|类名:RefreshStatus
方法 or 属性:OverDrag
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshStatus
方法 or 属性:Refresh
起始版本:8|类名:RefreshStatus
方法 or 属性:Refresh
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshStatus
方法 or 属性:Done
起始版本:8|类名:RefreshStatus
方法 or 属性:Done
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshInterface
起始版本:8|类名:RefreshInterface
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshAttribute
起始版本:8|类名:RefreshAttribute
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshAttribute
方法 or 属性:onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute;
起始版本:8|类名:RefreshAttribute
方法 or 属性:onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute;
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RefreshAttribute
方法 or 属性:onRefreshing(callback: () => void): RefreshAttribute;
起始版本:8|类名:RefreshAttribute
方法 or 属性:onRefreshing(callback: () => void): RefreshAttribute;
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Refresh: RefreshInterface;
起始版本:8|类名:global
方法 or 属性:declare const Refresh: RefreshInterface;
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const RefreshInstance: RefreshAttribute;
起始版本:8|类名:global
方法 or 属性:declare const RefreshInstance: RefreshAttribute;
起始版本:10|refresh.d.ts| -|起始版本有变化|类名:RelativeContainerInterface
起始版本:9|类名:RelativeContainerInterface
起始版本:10|relative_container.d.ts| -|起始版本有变化|类名:RelativeContainerAttribute
起始版本:9|类名:RelativeContainerAttribute
起始版本:10|relative_container.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const RelativeContainerInstance: RelativeContainerAttribute;
起始版本:9|类名:global
方法 or 属性:declare const RelativeContainerInstance: RelativeContainerAttribute;
起始版本:10|relative_container.d.ts| -|起始版本有变化|类名:RowSplitInterface
起始版本:7|类名:RowSplitInterface
起始版本:10|row_split.d.ts| -|起始版本有变化|类名:RowSplitInterface
方法 or 属性:(): RowSplitAttribute;
起始版本:7|类名:RowSplitInterface
方法 or 属性:(): RowSplitAttribute;
起始版本:10|row_split.d.ts| -|起始版本有变化|类名:RowSplitAttribute
起始版本:7|类名:RowSplitAttribute
起始版本:10|row_split.d.ts| -|起始版本有变化|类名:RowSplitAttribute
方法 or 属性:resizeable(value: boolean): RowSplitAttribute;
起始版本:7|类名:RowSplitAttribute
方法 or 属性:resizeable(value: boolean): RowSplitAttribute;
起始版本:10|row_split.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const RowSplit: RowSplitInterface;
起始版本:7|类名:global
方法 or 属性:declare const RowSplit: RowSplitInterface;
起始版本:10|row_split.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const RowSplitInstance: RowSplitAttribute;
起始版本:7|类名:global
方法 or 属性:declare const RowSplitInstance: RowSplitAttribute;
起始版本:10|row_split.d.ts| -|起始版本有变化|类名:ScrollDirection
起始版本:7|类名:ScrollDirection
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollDirection
方法 or 属性:Vertical
起始版本:7|类名:ScrollDirection
方法 or 属性:Vertical
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollDirection
方法 or 属性:Horizontal
起始版本:7|类名:ScrollDirection
方法 or 属性:Horizontal
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollDirection
方法 or 属性:None
起始版本:7|类名:ScrollDirection
方法 or 属性:None
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:Scroller
起始版本:7|类名:Scroller
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:Scroller
方法 or 属性:constructor();
起始版本:7|类名:Scroller
方法 or 属性:constructor();
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:Scroller
方法 or 属性:scrollEdge(value: Edge);
起始版本:7|类名:Scroller
方法 or 属性:scrollEdge(value: Edge);
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:Scroller
方法 or 属性:scrollPage(value: { next: boolean });
起始版本:9|类名:Scroller
方法 or 属性:scrollPage(value: { next: boolean });
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:Scroller
方法 or 属性:currentOffset();
起始版本:7|类名:Scroller
方法 or 属性:currentOffset();
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:Scroller
方法 or 属性:scrollBy(dx: Length, dy: Length);
起始版本:9|类名:Scroller
方法 or 属性:scrollBy(dx: Length, dy: Length);
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollInterface
起始版本:7|类名:ScrollInterface
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollInterface
方法 or 属性:(scroller?: Scroller): ScrollAttribute;
起始版本:7|类名:ScrollInterface
方法 or 属性:(scroller?: Scroller): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
起始版本:7|类名:ScrollAttribute
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:scrollable(value: ScrollDirection): ScrollAttribute;
起始版本:7|类名:ScrollAttribute
方法 or 属性:scrollable(value: ScrollDirection): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute;
起始版本:7|类名:ScrollAttribute
方法 or 属性:onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:onScrollEdge(event: (side: Edge) => void): ScrollAttribute;
起始版本:7|类名:ScrollAttribute
方法 or 属性:onScrollEdge(event: (side: Edge) => void): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:onScrollStart(event: () => void): ScrollAttribute;
起始版本:9|类名:ScrollAttribute
方法 or 属性:onScrollStart(event: () => void): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:onScrollStop(event: () => void): ScrollAttribute;
起始版本:9|类名:ScrollAttribute
方法 or 属性:onScrollStop(event: () => void): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:scrollBar(barState: BarState): ScrollAttribute;
起始版本:7|类名:ScrollAttribute
方法 or 属性:scrollBar(barState: BarState): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:scrollBarColor(color: Color \| number \| string): ScrollAttribute;
起始版本:7|类名:ScrollAttribute
方法 or 属性:scrollBarColor(color: Color \| number \| string): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:scrollBarWidth(value: number \| string): ScrollAttribute;
起始版本:7|类名:ScrollAttribute
方法 or 属性:scrollBarWidth(value: number \| string): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute;
起始版本:7|类名:ScrollAttribute
方法 or 属性:edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollAttribute
方法 or 属性:onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ScrollAttribute;
起始版本:9|类名:ScrollAttribute
方法 or 属性:onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Scroll: ScrollInterface;
起始版本:7|类名:global
方法 or 属性:declare const Scroll: ScrollInterface;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ScrollInstance: ScrollAttribute;
起始版本:7|类名:global
方法 or 属性:declare const ScrollInstance: ScrollAttribute;
起始版本:10|scroll.d.ts| -|起始版本有变化|类名:ScrollBarDirection
起始版本:8|类名:ScrollBarDirection
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarDirection
方法 or 属性:Vertical
起始版本:8|类名:ScrollBarDirection
方法 or 属性:Vertical
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarDirection
方法 or 属性:Horizontal
起始版本:8|类名:ScrollBarDirection
方法 or 属性:Horizontal
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarOptions
起始版本:8|类名:ScrollBarOptions
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarOptions
方法 or 属性:scroller: Scroller;
起始版本:8|类名:ScrollBarOptions
方法 or 属性:scroller: Scroller;
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarOptions
方法 or 属性:direction?: ScrollBarDirection;
起始版本:8|类名:ScrollBarOptions
方法 or 属性:direction?: ScrollBarDirection;
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarOptions
方法 or 属性:state?: BarState;
起始版本:8|类名:ScrollBarOptions
方法 or 属性:state?: BarState;
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarInterface
起始版本:8|类名:ScrollBarInterface
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarInterface
方法 or 属性:(value: ScrollBarOptions): ScrollBarAttribute;
起始版本:8|类名:ScrollBarInterface
方法 or 属性:(value: ScrollBarOptions): ScrollBarAttribute;
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:ScrollBarAttribute
起始版本:8|类名:ScrollBarAttribute
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ScrollBar: ScrollBarInterface;
起始版本:8|类名:global
方法 or 属性:declare const ScrollBar: ScrollBarInterface;
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const ScrollBarInstance: ScrollBarAttribute;
起始版本:8|类名:global
方法 or 属性:declare const ScrollBarInstance: ScrollBarAttribute;
起始版本:10|scroll_bar.d.ts| -|起始版本有变化|类名:SearchController
起始版本:8|类名:SearchController
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchController
方法 or 属性:constructor();
起始版本:8|类名:SearchController
方法 or 属性:constructor();
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchController
方法 or 属性:caretPosition(value: number): void;
起始版本:8|类名:SearchController
方法 or 属性:caretPosition(value: number): void;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchInterface
起始版本:8|类名:SearchInterface
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
起始版本:8|类名:SearchAttribute
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:placeholderColor(value: ResourceColor): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:placeholderColor(value: ResourceColor): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:placeholderFont(value?: Font): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:placeholderFont(value?: Font): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:textFont(value?: Font): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:textFont(value?: Font): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:onSubmit(callback: (value: string) => void): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:onSubmit(callback: (value: string) => void): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:onChange(callback: (value: string) => void): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:onChange(callback: (value: string) => void): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:onCopy(callback: (value: string) => void): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:onCopy(callback: (value: string) => void): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:onCut(callback: (value: string) => void): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:onCut(callback: (value: string) => void): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:onPaste(callback: (value: string) => void): SearchAttribute;
起始版本:8|类名:SearchAttribute
方法 or 属性:onPaste(callback: (value: string) => void): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:copyOption(value: CopyOptions): SearchAttribute;
起始版本:9|类名:SearchAttribute
方法 or 属性:copyOption(value: CopyOptions): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SearchAttribute
方法 or 属性:textAlign(value: TextAlign): SearchAttribute;
起始版本:9|类名:SearchAttribute
方法 or 属性:textAlign(value: TextAlign): SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Search: SearchInterface;
起始版本:8|类名:global
方法 or 属性:declare const Search: SearchInterface;
起始版本:10|search.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const SearchInstance: SearchAttribute;
起始版本:8|类名:global
方法 or 属性:declare const SearchInstance: SearchAttribute;
起始版本:10|search.d.ts| -|起始版本有变化|类名:SelectOption
起始版本:8|类名:SelectOption
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectOption
方法 or 属性:value: ResourceStr;
起始版本:8|类名:SelectOption
方法 or 属性:value: ResourceStr;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectOption
方法 or 属性:icon?: ResourceStr;
起始版本:8|类名:SelectOption
方法 or 属性:icon?: ResourceStr;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectInterface
起始版本:8|类名:SelectInterface
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectInterface
方法 or 属性:(options: Array\): SelectAttribute;
起始版本:8|类名:SelectInterface
方法 or 属性:(options: Array\): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
起始版本:8|类名:SelectAttribute
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:selected(value: number): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:selected(value: number): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:value(value: string): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:value(value: string): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:font(value: Font): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:font(value: Font): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:fontColor(value: ResourceColor): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:fontColor(value: ResourceColor): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:selectedOptionBgColor(value: ResourceColor): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:selectedOptionBgColor(value: ResourceColor): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:selectedOptionFont(value: Font): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:selectedOptionFont(value: Font): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:selectedOptionFontColor(value: ResourceColor): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:selectedOptionFontColor(value: ResourceColor): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:optionBgColor(value: ResourceColor): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:optionBgColor(value: ResourceColor): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:optionFont(value: Font): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:optionFont(value: Font): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:optionFontColor(value: ResourceColor): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:optionFontColor(value: ResourceColor): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:SelectAttribute
方法 or 属性:onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
起始版本:8|类名:SelectAttribute
方法 or 属性:onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Select: SelectInterface;
起始版本:8|类名:global
方法 or 属性:declare const Select: SelectInterface;
起始版本:10|select.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const SelectInstance: SelectAttribute;
起始版本:8|类名:global
方法 or 属性:declare const SelectInstance: SelectAttribute;
起始版本:10|select.d.ts| -|起始版本有变化|类名:ShapeInterface
方法 or 属性:new (value?: PixelMap): ShapeAttribute;
起始版本:7|类名:ShapeInterface
方法 or 属性:new (value?: PixelMap): ShapeAttribute;
起始版本:10|shape.d.ts| -|起始版本有变化|类名:ShapeInterface
方法 or 属性:(value: PixelMap): ShapeAttribute;
起始版本:7|类名:ShapeInterface
方法 or 属性:(value: PixelMap): ShapeAttribute;
起始版本:10|shape.d.ts| -|起始版本有变化|类名:SideBarContainerType
起始版本:8|类名:SideBarContainerType
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerType
方法 or 属性:Embed
起始版本:8|类名:SideBarContainerType
方法 or 属性:Embed
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerType
方法 or 属性:Overlay
起始版本:8|类名:SideBarContainerType
方法 or 属性:Overlay
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarPosition
起始版本:9|类名:SideBarPosition
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarPosition
方法 or 属性:Start
起始版本:9|类名:SideBarPosition
方法 or 属性:Start
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarPosition
方法 or 属性:End
起始版本:9|类名:SideBarPosition
方法 or 属性:End
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:ButtonStyle
起始版本:8|类名:ButtonStyle
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:ButtonStyle
方法 or 属性:left?: number;
起始版本:8|类名:ButtonStyle
方法 or 属性:left?: number;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:ButtonStyle
方法 or 属性:top?: number;
起始版本:8|类名:ButtonStyle
方法 or 属性:top?: number;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:ButtonStyle
方法 or 属性:width?: number;
起始版本:8|类名:ButtonStyle
方法 or 属性:width?: number;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:ButtonStyle
方法 or 属性:height?: number;
起始版本:8|类名:ButtonStyle
方法 or 属性:height?: number;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerInterface
起始版本:8|类名:SideBarContainerInterface
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerInterface
方法 or 属性:(type?: SideBarContainerType): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerInterface
方法 or 属性:(type?: SideBarContainerType): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
起始版本:8|类名:SideBarContainerAttribute
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:showSideBar(value: boolean): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerAttribute
方法 or 属性:showSideBar(value: boolean): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:controlButton(value: ButtonStyle): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerAttribute
方法 or 属性:controlButton(value: ButtonStyle): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:showControlButton(value: boolean): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerAttribute
方法 or 属性:showControlButton(value: boolean): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:onChange(callback: (value: boolean) => void): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerAttribute
方法 or 属性:onChange(callback: (value: boolean) => void): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:sideBarWidth(value: number): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerAttribute
方法 or 属性:sideBarWidth(value: number): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:minSideBarWidth(value: number): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerAttribute
方法 or 属性:minSideBarWidth(value: number): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:maxSideBarWidth(value: number): SideBarContainerAttribute;
起始版本:8|类名:SideBarContainerAttribute
方法 or 属性:maxSideBarWidth(value: number): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:sideBarWidth(value: Length): SideBarContainerAttribute;
起始版本:9|类名:SideBarContainerAttribute
方法 or 属性:sideBarWidth(value: Length): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:minSideBarWidth(value: Length): SideBarContainerAttribute;
起始版本:9|类名:SideBarContainerAttribute
方法 or 属性:minSideBarWidth(value: Length): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:maxSideBarWidth(value: Length): SideBarContainerAttribute;
起始版本:9|类名:SideBarContainerAttribute
方法 or 属性:maxSideBarWidth(value: Length): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:autoHide(value: boolean): SideBarContainerAttribute;
起始版本:9|类名:SideBarContainerAttribute
方法 or 属性:autoHide(value: boolean): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:SideBarContainerAttribute
方法 or 属性:sideBarPosition(value: SideBarPosition): SideBarContainerAttribute;
起始版本:9|类名:SideBarContainerAttribute
方法 or 属性:sideBarPosition(value: SideBarPosition): SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const SideBarContainer: SideBarContainerInterface;
起始版本:8|类名:global
方法 or 属性:declare const SideBarContainer: SideBarContainerInterface;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const SideBarContainerInstance: SideBarContainerAttribute;
起始版本:8|类名:global
方法 or 属性:declare const SideBarContainerInstance: SideBarContainerAttribute;
起始版本:10|sidebar.d.ts| -|起始版本有变化|类名:ColorMode
起始版本:7|类名:ColorMode
起始版本:10|state_management.d.ts| -|起始版本有变化|类名:ColorMode
方法 or 属性:LIGHT = 0
起始版本:7|类名:ColorMode
方法 or 属性:LIGHT = 0
起始版本:10|state_management.d.ts| -|起始版本有变化|类名:ColorMode
方法 or 属性:DARK
起始版本:7|类名:ColorMode
方法 or 属性:DARK
起始版本:10|state_management.d.ts| -|起始版本有变化|类名:LayoutDirection
起始版本:7|类名:LayoutDirection
起始版本:10|state_management.d.ts| -|起始版本有变化|类名:LayoutDirection
方法 or 属性:LTR
起始版本:7|类名:LayoutDirection
方法 or 属性:LTR
起始版本:10|state_management.d.ts| -|起始版本有变化|类名:LayoutDirection
方法 or 属性:RTL
起始版本:7|类名:LayoutDirection
方法 or 属性:RTL
起始版本:10|state_management.d.ts| -|起始版本有变化|类名:LayoutDirection
方法 or 属性:Auto
起始版本:8|类名:LayoutDirection
方法 or 属性:Auto
起始版本:10|state_management.d.ts| -|起始版本有变化|类名:StepperInterface
起始版本:8|类名:StepperInterface
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:StepperInterface
方法 or 属性:(value?: { index?: number }): StepperAttribute;
起始版本:8|类名:StepperInterface
方法 or 属性:(value?: { index?: number }): StepperAttribute;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:StepperAttribute
起始版本:8|类名:StepperAttribute
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:StepperAttribute
方法 or 属性:onFinish(callback: () => void): StepperAttribute;
起始版本:8|类名:StepperAttribute
方法 or 属性:onFinish(callback: () => void): StepperAttribute;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:StepperAttribute
方法 or 属性:onSkip(callback: () => void): StepperAttribute;
起始版本:8|类名:StepperAttribute
方法 or 属性:onSkip(callback: () => void): StepperAttribute;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:StepperAttribute
方法 or 属性:onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
起始版本:8|类名:StepperAttribute
方法 or 属性:onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:StepperAttribute
方法 or 属性:onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
起始版本:8|类名:StepperAttribute
方法 or 属性:onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:StepperAttribute
方法 or 属性:onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
起始版本:8|类名:StepperAttribute
方法 or 属性:onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Stepper: StepperInterface;
起始版本:8|类名:global
方法 or 属性:declare const Stepper: StepperInterface;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const StepperInstance: StepperAttribute;
起始版本:8|类名:global
方法 or 属性:declare const StepperInstance: StepperAttribute;
起始版本:10|stepper.d.ts| -|起始版本有变化|类名:ItemState
起始版本:8|类名:ItemState
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:ItemState
方法 or 属性:Normal
起始版本:8|类名:ItemState
方法 or 属性:Normal
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:ItemState
方法 or 属性:Disabled
起始版本:8|类名:ItemState
方法 or 属性:Disabled
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:ItemState
方法 or 属性:Waiting
起始版本:8|类名:ItemState
方法 or 属性:Waiting
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:ItemState
方法 or 属性:Skip
起始版本:8|类名:ItemState
方法 or 属性:Skip
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:StepperItemInterface
起始版本:8|类名:StepperItemInterface
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:StepperItemInterface
方法 or 属性:(): StepperItemAttribute;
起始版本:8|类名:StepperItemInterface
方法 or 属性:(): StepperItemAttribute;
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:StepperItemAttribute
起始版本:8|类名:StepperItemAttribute
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:StepperItemAttribute
方法 or 属性:prevLabel(value: string): StepperItemAttribute;
起始版本:8|类名:StepperItemAttribute
方法 or 属性:prevLabel(value: string): StepperItemAttribute;
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:StepperItemAttribute
方法 or 属性:nextLabel(value: string): StepperItemAttribute;
起始版本:8|类名:StepperItemAttribute
方法 or 属性:nextLabel(value: string): StepperItemAttribute;
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:StepperItemAttribute
方法 or 属性:status(value?: ItemState): StepperItemAttribute;
起始版本:8|类名:StepperItemAttribute
方法 or 属性:status(value?: ItemState): StepperItemAttribute;
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const StepperItemInstance: StepperItemAttribute;
起始版本:8|类名:global
方法 or 属性:declare const StepperItemInstance: StepperItemAttribute;
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const StepperItem: StepperItemInterface;
起始版本:8|类名:global
方法 or 属性:declare const StepperItem: StepperItemInterface;
起始版本:10|stepper_item.d.ts| -|起始版本有变化|类名:SwiperController
起始版本:7|类名:SwiperController
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperController
方法 or 属性:constructor();
起始版本:7|类名:SwiperController
方法 or 属性:constructor();
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperController
方法 or 属性:showNext();
起始版本:7|类名:SwiperController
方法 or 属性:showNext();
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperController
方法 or 属性:showPrevious();
起始版本:7|类名:SwiperController
方法 or 属性:showPrevious();
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperController
方法 or 属性:finishAnimation(callback?: () => void);
起始版本:7|类名:SwiperController
方法 or 属性:finishAnimation(callback?: () => void);
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperDisplayMode
起始版本:7|类名:SwiperDisplayMode
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperDisplayMode
方法 or 属性:Stretch
起始版本:7|类名:SwiperDisplayMode
方法 or 属性:Stretch
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperDisplayMode
方法 or 属性:AutoLinear
起始版本:7|类名:SwiperDisplayMode
方法 or 属性:AutoLinear
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperInterface
起始版本:7|类名:SwiperInterface
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperInterface
方法 or 属性:(controller?: SwiperController): SwiperAttribute;
起始版本:7|类名:SwiperInterface
方法 or 属性:(controller?: SwiperController): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
起始版本:7|类名:SwiperAttribute
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:index(value: number): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:index(value: number): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:autoPlay(value: boolean): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:autoPlay(value: boolean): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:interval(value: number): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:interval(value: number): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:loop(value: boolean): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:loop(value: boolean): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:duration(value: number): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:duration(value: number): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:vertical(value: boolean): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:vertical(value: boolean): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:itemSpace(value: number \| string): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:itemSpace(value: number \| string): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:displayMode(value: SwiperDisplayMode): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:displayMode(value: SwiperDisplayMode): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:cachedCount(value: number): SwiperAttribute;
起始版本:8|类名:SwiperAttribute
方法 or 属性:cachedCount(value: number): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:displayCount(value: number \| string): SwiperAttribute;
起始版本:8|类名:SwiperAttribute
方法 or 属性:displayCount(value: number \| string): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:effectMode(value: EdgeEffect): SwiperAttribute;
起始版本:8|类名:SwiperAttribute
方法 or 属性:effectMode(value: EdgeEffect): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:disableSwipe(value: boolean): SwiperAttribute;
起始版本:8|类名:SwiperAttribute
方法 or 属性:disableSwipe(value: boolean): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:onChange(event: (index: number) => void): SwiperAttribute;
起始版本:7|类名:SwiperAttribute
方法 or 属性:onChange(event: (index: number) => void): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:onAnimationStart(event: (index: number) => void): SwiperAttribute;
起始版本:9|类名:SwiperAttribute
方法 or 属性:onAnimationStart(event: (index: number) => void): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:SwiperAttribute
方法 or 属性:onAnimationEnd(event: (index: number) => void): SwiperAttribute;
起始版本:9|类名:SwiperAttribute
方法 or 属性:onAnimationEnd(event: (index: number) => void): SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Swiper: SwiperInterface;
起始版本:7|类名:global
方法 or 属性:declare const Swiper: SwiperInterface;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const SwiperInstance: SwiperAttribute;
起始版本:7|类名:global
方法 or 属性:declare const SwiperInstance: SwiperAttribute;
起始版本:10|swiper.d.ts| -|起始版本有变化|类名:BarMode
起始版本:7|类名:BarMode
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:BarMode
方法 or 属性:Scrollable
起始版本:7|类名:BarMode
方法 or 属性:Scrollable
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:BarMode
方法 or 属性:Fixed
起始版本:7|类名:BarMode
方法 or 属性:Fixed
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:BarPosition
起始版本:7|类名:BarPosition
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:BarPosition
方法 or 属性:Start
起始版本:7|类名:BarPosition
方法 or 属性:Start
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:BarPosition
方法 or 属性:End
起始版本:7|类名:BarPosition
方法 or 属性:End
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsController
起始版本:7|类名:TabsController
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsController
方法 or 属性:constructor();
起始版本:7|类名:TabsController
方法 or 属性:constructor();
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsController
方法 or 属性:changeIndex(value: number): void;
起始版本:7|类名:TabsController
方法 or 属性:changeIndex(value: number): void;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsInterface
起始版本:7|类名:TabsInterface
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsInterface
方法 or 属性:(value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
起始版本:7|类名:TabsInterface
方法 or 属性:(value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
起始版本:7|类名:TabsAttribute
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:vertical(value: boolean): TabsAttribute;
起始版本:7|类名:TabsAttribute
方法 or 属性:vertical(value: boolean): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:barPosition(value: BarPosition): TabsAttribute;
起始版本:9|类名:TabsAttribute
方法 or 属性:barPosition(value: BarPosition): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:scrollable(value: boolean): TabsAttribute;
起始版本:7|类名:TabsAttribute
方法 or 属性:scrollable(value: boolean): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:barMode(value: BarMode): TabsAttribute;
起始版本:7|类名:TabsAttribute
方法 or 属性:barMode(value: BarMode): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:barWidth(value: Length): TabsAttribute;
起始版本:8|类名:TabsAttribute
方法 or 属性:barWidth(value: Length): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:barHeight(value: Length): TabsAttribute;
起始版本:8|类名:TabsAttribute
方法 or 属性:barHeight(value: Length): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:animationDuration(value: number): TabsAttribute;
起始版本:7|类名:TabsAttribute
方法 or 属性:animationDuration(value: number): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:TabsAttribute
方法 or 属性:onChange(event: (index: number) => void): TabsAttribute;
起始版本:7|类名:TabsAttribute
方法 or 属性:onChange(event: (index: number) => void): TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Tabs: TabsInterface;
起始版本:7|类名:global
方法 or 属性:declare const Tabs: TabsInterface;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TabsInstance: TabsAttribute;
起始版本:7|类名:global
方法 or 属性:declare const TabsInstance: TabsAttribute;
起始版本:10|tabs.d.ts| -|起始版本有变化|类名:SubTabBarStyle
起始版本:9|类名:SubTabBarStyle
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:BottomTabBarStyle
起始版本:9|类名:BottomTabBarStyle
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:TabContentInterface
起始版本:7|类名:TabContentInterface
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:TabContentInterface
方法 or 属性:(): TabContentAttribute;
起始版本:7|类名:TabContentInterface
方法 or 属性:(): TabContentAttribute;
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:TabContentAttribute
起始版本:7|类名:TabContentAttribute
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:TabContentAttribute
方法 or 属性:tabBar(value: SubTabBarStyle \| BottomTabBarStyle): TabContentAttribute;
起始版本:9|类名:TabContentAttribute
方法 or 属性:tabBar(value: SubTabBarStyle \| BottomTabBarStyle): TabContentAttribute;
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TabContent: TabContentInterface;
起始版本:7|类名:global
方法 or 属性:declare const TabContent: TabContentInterface;
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TabContentInstance: TabContentAttribute;
起始版本:7|类名:global
方法 or 属性:declare const TabContentInstance: TabContentAttribute;
起始版本:10|tab_content.d.ts| -|起始版本有变化|类名:TextAttribute
方法 or 属性:copyOption(value: CopyOptions): TextAttribute;
起始版本:9|类名:TextAttribute
方法 or 属性:copyOption(value: CopyOptions): TextAttribute;
起始版本:10|text.d.ts| -|起始版本有变化|类名:TextAreaController
起始版本:8|类名:TextAreaController
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaController
方法 or 属性:constructor();
起始版本:8|类名:TextAreaController
方法 or 属性:constructor();
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaController
方法 or 属性:caretPosition(value: number): void;
起始版本:8|类名:TextAreaController
方法 or 属性:caretPosition(value: number): void;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaOptions
起始版本:7|类名:TextAreaOptions
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaOptions
方法 or 属性:placeholder?: ResourceStr;
起始版本:7|类名:TextAreaOptions
方法 or 属性:placeholder?: ResourceStr;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaOptions
方法 or 属性:text?: ResourceStr;
起始版本:7|类名:TextAreaOptions
方法 or 属性:text?: ResourceStr;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaOptions
方法 or 属性:controller?: TextAreaController;
起始版本:8|类名:TextAreaOptions
方法 or 属性:controller?: TextAreaController;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaInterface
起始版本:7|类名:TextAreaInterface
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaInterface
方法 or 属性:(value?: TextAreaOptions): TextAreaAttribute;
起始版本:7|类名:TextAreaInterface
方法 or 属性:(value?: TextAreaOptions): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
起始版本:7|类名:TextAreaAttribute
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:placeholderColor(value: ResourceColor): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:placeholderColor(value: ResourceColor): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:placeholderFont(value: Font): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:placeholderFont(value: Font): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:textAlign(value: TextAlign): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:textAlign(value: TextAlign): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:caretColor(value: ResourceColor): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:caretColor(value: ResourceColor): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:fontColor(value: ResourceColor): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:fontColor(value: ResourceColor): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:fontSize(value: Length): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:fontSize(value: Length): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:fontStyle(value: FontStyle): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:fontStyle(value: FontStyle): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute;
起始版本:8|类名:TextAreaAttribute
方法 or 属性:inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:onChange(callback: (value: string) => void): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:onChange(callback: (value: string) => void): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:onCopy(callback: (value: string) => void): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:onCopy(callback: (value: string) => void): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:onCut(callback: (value: string) => void): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:onCut(callback: (value: string) => void): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:onPaste(callback: (value: string) => void): TextAreaAttribute;
起始版本:7|类名:TextAreaAttribute
方法 or 属性:onPaste(callback: (value: string) => void): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextAreaAttribute
方法 or 属性:copyOption(value: CopyOptions): TextAreaAttribute;
起始版本:9|类名:TextAreaAttribute
方法 or 属性:copyOption(value: CopyOptions): TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextArea: TextAreaInterface;
起始版本:7|类名:global
方法 or 属性:declare const TextArea: TextAreaInterface;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextAreaInstance: TextAreaAttribute;
起始版本:7|类名:global
方法 or 属性:declare const TextAreaInstance: TextAreaAttribute;
起始版本:10|text_area.d.ts| -|起始版本有变化|类名:TextClockController
起始版本:8|类名:TextClockController
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockController
方法 or 属性:constructor();
起始版本:8|类名:TextClockController
方法 or 属性:constructor();
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockController
方法 or 属性:start();
起始版本:8|类名:TextClockController
方法 or 属性:start();
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockController
方法 or 属性:stop();
起始版本:8|类名:TextClockController
方法 or 属性:stop();
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockInterface
起始版本:8|类名:TextClockInterface
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockInterface
方法 or 属性:(options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
起始版本:8|类名:TextClockInterface
方法 or 属性:(options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockAttribute
方法 or 属性:format(value: string): TextClockAttribute;
起始版本:8|类名:TextClockAttribute
方法 or 属性:format(value: string): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockAttribute
方法 or 属性:onDateChange(event: (value: number) => void): TextClockAttribute;
起始版本:8|类名:TextClockAttribute
方法 or 属性:onDateChange(event: (value: number) => void): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockAttribute
方法 or 属性:fontColor(value: ResourceColor): TextClockAttribute;
起始版本:8|类名:TextClockAttribute
方法 or 属性:fontColor(value: ResourceColor): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockAttribute
方法 or 属性:fontSize(value: Length): TextClockAttribute;
起始版本:8|类名:TextClockAttribute
方法 or 属性:fontSize(value: Length): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockAttribute
方法 or 属性:fontStyle(value: FontStyle): TextClockAttribute;
起始版本:8|类名:TextClockAttribute
方法 or 属性:fontStyle(value: FontStyle): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextClockAttribute;
起始版本:8|类名:TextClockAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:TextClockAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextClockAttribute;
起始版本:8|类名:TextClockAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextClock: TextClockInterface;
起始版本:8|类名:global
方法 or 属性:declare const TextClock: TextClockInterface;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextClockInstance: TextClockAttribute;
起始版本:8|类名:global
方法 or 属性:declare const TextClockInstance: TextClockAttribute;
起始版本:10|text_clock.d.ts| -|起始版本有变化|类名:InputType
起始版本:7|类名:InputType
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:InputType
方法 or 属性:Normal
起始版本:7|类名:InputType
方法 or 属性:Normal
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:InputType
方法 or 属性:Number
起始版本:7|类名:InputType
方法 or 属性:Number
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:InputType
方法 or 属性:PhoneNumber
起始版本:9|类名:InputType
方法 or 属性:PhoneNumber
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:InputType
方法 or 属性:Email
起始版本:7|类名:InputType
方法 or 属性:Email
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:InputType
方法 or 属性:Password
起始版本:7|类名:InputType
方法 or 属性:Password
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:EnterKeyType
起始版本:7|类名:EnterKeyType
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:EnterKeyType
方法 or 属性:Go
起始版本:7|类名:EnterKeyType
方法 or 属性:Go
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:EnterKeyType
方法 or 属性:Search
起始版本:7|类名:EnterKeyType
方法 or 属性:Search
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:EnterKeyType
方法 or 属性:Send
起始版本:7|类名:EnterKeyType
方法 or 属性:Send
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:EnterKeyType
方法 or 属性:Next
起始版本:7|类名:EnterKeyType
方法 or 属性:Next
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:EnterKeyType
方法 or 属性:Done
起始版本:7|类名:EnterKeyType
方法 or 属性:Done
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputController
起始版本:8|类名:TextInputController
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputController
方法 or 属性:constructor();
起始版本:8|类名:TextInputController
方法 or 属性:constructor();
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputController
方法 or 属性:caretPosition(value: number): void;
起始版本:8|类名:TextInputController
方法 or 属性:caretPosition(value: number): void;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputOptions
起始版本:7|类名:TextInputOptions
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputOptions
方法 or 属性:placeholder?: ResourceStr;
起始版本:7|类名:TextInputOptions
方法 or 属性:placeholder?: ResourceStr;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputOptions
方法 or 属性:text?: ResourceStr;
起始版本:7|类名:TextInputOptions
方法 or 属性:text?: ResourceStr;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputOptions
方法 or 属性:controller?: TextInputController;
起始版本:8|类名:TextInputOptions
方法 or 属性:controller?: TextInputController;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputStyle
起始版本:9|类名:TextInputStyle
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputStyle
方法 or 属性:Default
起始版本:9|类名:TextInputStyle
方法 or 属性:Default
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputStyle
方法 or 属性:Inline
起始版本:9|类名:TextInputStyle
方法 or 属性:Inline
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputInterface
起始版本:7|类名:TextInputInterface
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputInterface
方法 or 属性:(value?: TextInputOptions): TextInputAttribute;
起始版本:7|类名:TextInputInterface
方法 or 属性:(value?: TextInputOptions): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
起始版本:7|类名:TextInputAttribute
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:type(value: InputType): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:type(value: InputType): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:placeholderColor(value: ResourceColor): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:placeholderColor(value: ResourceColor): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:placeholderFont(value?: Font): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:placeholderFont(value?: Font): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:enterKeyType(value: EnterKeyType): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:enterKeyType(value: EnterKeyType): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:caretColor(value: ResourceColor): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:caretColor(value: ResourceColor): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
起始版本:8|类名:TextInputAttribute
方法 or 属性:onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:onChange(callback: (value: string) => void): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:onChange(callback: (value: string) => void): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:maxLength(value: number): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:maxLength(value: number): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:fontColor(value: ResourceColor): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:fontColor(value: ResourceColor): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:fontSize(value: Length): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:fontSize(value: Length): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:fontStyle(value: FontStyle): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:fontStyle(value: FontStyle): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextInputAttribute;
起始版本:7|类名:TextInputAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute;
起始版本:8|类名:TextInputAttribute
方法 or 属性:inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:onCopy(callback: (value: string) => void): TextInputAttribute;
起始版本:8|类名:TextInputAttribute
方法 or 属性:onCopy(callback: (value: string) => void): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:onCut(callback: (value: string) => void): TextInputAttribute;
起始版本:8|类名:TextInputAttribute
方法 or 属性:onCut(callback: (value: string) => void): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:onPaste(callback: (value: string) => void): TextInputAttribute;
起始版本:8|类名:TextInputAttribute
方法 or 属性:onPaste(callback: (value: string) => void): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:copyOption(value: CopyOptions): TextInputAttribute;
起始版本:9|类名:TextInputAttribute
方法 or 属性:copyOption(value: CopyOptions): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:showPasswordIcon(value: boolean): TextInputAttribute;
起始版本:9|类名:TextInputAttribute
方法 or 属性:showPasswordIcon(value: boolean): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:textAlign(value: TextAlign): TextInputAttribute;
起始版本:9|类名:TextInputAttribute
方法 or 属性:textAlign(value: TextAlign): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextInputAttribute
方法 or 属性:style(value: TextInputStyle): TextInputAttribute;
起始版本:9|类名:TextInputAttribute
方法 or 属性:style(value: TextInputStyle): TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextInput: TextInputInterface;
起始版本:7|类名:global
方法 or 属性:declare const TextInput: TextInputInterface;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextInputInstance: TextInputAttribute;
起始版本:7|类名:global
方法 or 属性:declare const TextInputInstance: TextInputAttribute;
起始版本:10|text_input.d.ts| -|起始版本有变化|类名:TextPickerOptions
起始版本:8|类名:TextPickerOptions
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerOptions
方法 or 属性:value?: string;
起始版本:N/A|类名:TextPickerOptions
方法 or 属性:value?: string;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerOptions
方法 or 属性:selected?: number;
起始版本:N/A|类名:TextPickerOptions
方法 or 属性:selected?: number;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerInterface
起始版本:8|类名:TextPickerInterface
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerInterface
方法 or 属性:(options?: TextPickerOptions): TextPickerAttribute;
起始版本:8|类名:TextPickerInterface
方法 or 属性:(options?: TextPickerOptions): TextPickerAttribute;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerAttribute
起始版本:8|类名:TextPickerAttribute
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerAttribute
方法 or 属性:defaultPickerItemHeight(value: number \| string): TextPickerAttribute;
起始版本:8|类名:TextPickerAttribute
方法 or 属性:defaultPickerItemHeight(value: number \| string): TextPickerAttribute;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerAttribute
方法 or 属性:onChange(callback: (value: string, index: number) => void): TextPickerAttribute;
起始版本:8|类名:TextPickerAttribute
方法 or 属性:onChange(callback: (value: string, index: number) => void): TextPickerAttribute;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerResult
起始版本:8|类名:TextPickerResult
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerResult
方法 or 属性:value: string;
起始版本:8|类名:TextPickerResult
方法 or 属性:value: string;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerResult
方法 or 属性:index: number;
起始版本:8|类名:TextPickerResult
方法 or 属性:index: number;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerDialogOptions
起始版本:8|类名:TextPickerDialogOptions
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerDialogOptions
方法 or 属性:defaultPickerItemHeight?: number \| string;
起始版本:8|类名:TextPickerDialogOptions
方法 or 属性:defaultPickerItemHeight?: number \| string;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerDialogOptions
方法 or 属性:onAccept?: (value: TextPickerResult) => void;
起始版本:8|类名:TextPickerDialogOptions
方法 or 属性:onAccept?: (value: TextPickerResult) => void;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerDialogOptions
方法 or 属性:onCancel?: () => void;
起始版本:8|类名:TextPickerDialogOptions
方法 or 属性:onCancel?: () => void;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerDialogOptions
方法 or 属性:onChange?: (value: TextPickerResult) => void;
起始版本:8|类名:TextPickerDialogOptions
方法 or 属性:onChange?: (value: TextPickerResult) => void;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerDialog
起始版本:8|类名:TextPickerDialog
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextPickerDialog
方法 or 属性:static show(options?: TextPickerDialogOptions);
起始版本:8|类名:TextPickerDialog
方法 or 属性:static show(options?: TextPickerDialogOptions);
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextPicker: TextPickerInterface;
起始版本:8|类名:global
方法 or 属性:declare const TextPicker: TextPickerInterface;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextPickerInstance: TextPickerAttribute;
起始版本:8|类名:global
方法 or 属性:declare const TextPickerInstance: TextPickerAttribute;
起始版本:10|text_picker.d.ts| -|起始版本有变化|类名:TextTimerController
起始版本:8|类名:TextTimerController
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerController
方法 or 属性:constructor();
起始版本:8|类名:TextTimerController
方法 or 属性:constructor();
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerController
方法 or 属性:start();
起始版本:8|类名:TextTimerController
方法 or 属性:start();
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerController
方法 or 属性:pause();
起始版本:8|类名:TextTimerController
方法 or 属性:pause();
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerController
方法 or 属性:reset();
起始版本:8|类名:TextTimerController
方法 or 属性:reset();
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerOptions
起始版本:8|类名:TextTimerOptions
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerOptions
方法 or 属性:isCountDown?: boolean;
起始版本:8|类名:TextTimerOptions
方法 or 属性:isCountDown?: boolean;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerOptions
方法 or 属性:count?: number;
起始版本:8|类名:TextTimerOptions
方法 or 属性:count?: number;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerOptions
方法 or 属性:controller?: TextTimerController;
起始版本:8|类名:TextTimerOptions
方法 or 属性:controller?: TextTimerController;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerInterface
起始版本:8|类名:TextTimerInterface
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerInterface
方法 or 属性:(options?: TextTimerOptions): TextTimerAttribute;
起始版本:8|类名:TextTimerInterface
方法 or 属性:(options?: TextTimerOptions): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
起始版本:8|类名:TextTimerAttribute
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
方法 or 属性:format(value: string): TextTimerAttribute;
起始版本:8|类名:TextTimerAttribute
方法 or 属性:format(value: string): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
方法 or 属性:fontColor(value: ResourceColor): TextTimerAttribute;
起始版本:8|类名:TextTimerAttribute
方法 or 属性:fontColor(value: ResourceColor): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
方法 or 属性:fontSize(value: Length): TextTimerAttribute;
起始版本:8|类名:TextTimerAttribute
方法 or 属性:fontSize(value: Length): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
方法 or 属性:fontStyle(value: FontStyle): TextTimerAttribute;
起始版本:8|类名:TextTimerAttribute
方法 or 属性:fontStyle(value: FontStyle): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextTimerAttribute;
起始版本:8|类名:TextTimerAttribute
方法 or 属性:fontWeight(value: number \| FontWeight \| string): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextTimerAttribute;
起始版本:8|类名:TextTimerAttribute
方法 or 属性:fontFamily(value: ResourceStr): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TextTimerAttribute
方法 or 属性:onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute;
起始版本:8|类名:TextTimerAttribute
方法 or 属性:onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextTimer: TextTimerInterface;
起始版本:8|类名:global
方法 or 属性:declare const TextTimer: TextTimerInterface;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TextTimerInstance: TextTimerAttribute;
起始版本:8|类名:global
方法 or 属性:declare const TextTimerInstance: TextTimerAttribute;
起始版本:10|text_timer.d.ts| -|起始版本有变化|类名:TimePickerResult
起始版本:8|类名:TimePickerResult
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerResult
方法 or 属性:hour?: number;
起始版本:8|类名:TimePickerResult
方法 or 属性:hour?: number;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerResult
方法 or 属性:minute?: number;
起始版本:8|类名:TimePickerResult
方法 or 属性:minute?: number;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerOptions
起始版本:8|类名:TimePickerOptions
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerOptions
方法 or 属性:selected?: Date;
起始版本:N/A|类名:TimePickerOptions
方法 or 属性:selected?: Date;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerInterface
起始版本:8|类名:TimePickerInterface
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerInterface
方法 or 属性:(options?: TimePickerOptions): TimePickerAttribute;
起始版本:8|类名:TimePickerInterface
方法 or 属性:(options?: TimePickerOptions): TimePickerAttribute;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerAttribute
起始版本:8|类名:TimePickerAttribute
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerAttribute
方法 or 属性:useMilitaryTime(value: boolean): TimePickerAttribute;
起始版本:8|类名:TimePickerAttribute
方法 or 属性:useMilitaryTime(value: boolean): TimePickerAttribute;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerAttribute
方法 or 属性:onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
起始版本:8|类名:TimePickerAttribute
方法 or 属性:onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerDialogOptions
起始版本:8|类名:TimePickerDialogOptions
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerDialogOptions
方法 or 属性:useMilitaryTime?: boolean;
起始版本:8|类名:TimePickerDialogOptions
方法 or 属性:useMilitaryTime?: boolean;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerDialogOptions
方法 or 属性:onAccept?: (value: TimePickerResult) => void;
起始版本:8|类名:TimePickerDialogOptions
方法 or 属性:onAccept?: (value: TimePickerResult) => void;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerDialogOptions
方法 or 属性:onCancel?: () => void;
起始版本:8|类名:TimePickerDialogOptions
方法 or 属性:onCancel?: () => void;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerDialogOptions
方法 or 属性:onChange?: (value: TimePickerResult) => void;
起始版本:8|类名:TimePickerDialogOptions
方法 or 属性:onChange?: (value: TimePickerResult) => void;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerDialog
起始版本:8|类名:TimePickerDialog
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:TimePickerDialog
方法 or 属性:static show(options?: TimePickerDialogOptions);
起始版本:8|类名:TimePickerDialog
方法 or 属性:static show(options?: TimePickerDialogOptions);
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TimePicker: TimePickerInterface;
起始版本:8|类名:global
方法 or 属性:declare const TimePicker: TimePickerInterface;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const TimePickerInstance: TimePickerAttribute;
起始版本:8|类名:global
方法 or 属性:declare const TimePickerInstance: TimePickerAttribute;
起始版本:10|time_picker.d.ts| -|起始版本有变化|类名:Resource
方法 or 属性:readonly bundleName: string;
起始版本:9|类名:Resource
方法 or 属性:readonly bundleName: string;
起始版本:10|units.d.ts| -|起始版本有变化|类名:Resource
方法 or 属性:readonly moduleName: string;
起始版本:9|类名:Resource
方法 or 属性:readonly moduleName: string;
起始版本:10|units.d.ts| -|起始版本有变化|类名:Font
起始版本:7|类名:Font
起始版本:10|units.d.ts| -|起始版本有变化|类名:Font
方法 or 属性:size?: Length;
起始版本:N/A|类名:Font
方法 or 属性:size?: Length;
起始版本:10|units.d.ts| -|起始版本有变化|类名:Font
方法 or 属性:weight?: FontWeight \| number \| string;
起始版本:N/A|类名:Font
方法 or 属性:weight?: FontWeight \| number \| string;
起始版本:10|units.d.ts| -|起始版本有变化|类名:Font
方法 or 属性:family?: string \| Resource;
起始版本:N/A|类名:Font
方法 or 属性:family?: string \| Resource;
起始版本:10|units.d.ts| -|起始版本有变化|类名:Font
方法 or 属性:style?: FontStyle;
起始版本:N/A|类名:Font
方法 or 属性:style?: FontStyle;
起始版本:10|units.d.ts| -|起始版本有变化|类名:ColorFilter
起始版本:9|类名:ColorFilter
起始版本:10|units.d.ts| -|起始版本有变化|类名:ColorFilter
方法 or 属性:constructor(value: number[]);
起始版本:9|类名:ColorFilter
方法 or 属性:constructor(value: number[]);
起始版本:10|units.d.ts| -|起始版本有变化|类名:SeekMode
起始版本:8|类名:SeekMode
起始版本:10|video.d.ts| -|起始版本有变化|类名:SeekMode
方法 or 属性:PreviousKeyframe
起始版本:8|类名:SeekMode
方法 or 属性:PreviousKeyframe
起始版本:10|video.d.ts| -|起始版本有变化|类名:SeekMode
方法 or 属性:NextKeyframe
起始版本:8|类名:SeekMode
方法 or 属性:NextKeyframe
起始版本:10|video.d.ts| -|起始版本有变化|类名:SeekMode
方法 or 属性:ClosestKeyframe
起始版本:8|类名:SeekMode
方法 or 属性:ClosestKeyframe
起始版本:10|video.d.ts| -|起始版本有变化|类名:SeekMode
方法 or 属性:Accurate
起始版本:8|类名:SeekMode
方法 or 属性:Accurate
起始版本:10|video.d.ts| -|起始版本有变化|类名:PlaybackSpeed
起始版本:8|类名:PlaybackSpeed
起始版本:10|video.d.ts| -|起始版本有变化|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_0_75_X
起始版本:8|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_0_75_X
起始版本:10|video.d.ts| -|起始版本有变化|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_1_00_X
起始版本:8|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_1_00_X
起始版本:10|video.d.ts| -|起始版本有变化|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_1_25_X
起始版本:8|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_1_25_X
起始版本:10|video.d.ts| -|起始版本有变化|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_1_75_X
起始版本:8|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_1_75_X
起始版本:10|video.d.ts| -|起始版本有变化|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_2_00_X
起始版本:8|类名:PlaybackSpeed
方法 or 属性:Speed_Forward_2_00_X
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoOptions
起始版本:7|类名:VideoOptions
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoOptions
方法 or 属性:src?: string \| Resource;
起始版本:7|类名:VideoOptions
方法 or 属性:src?: string \| Resource;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoOptions
方法 or 属性:currentProgressRate?: number \| string \| PlaybackSpeed;
起始版本:7|类名:VideoOptions
方法 or 属性:currentProgressRate?: number \| string \| PlaybackSpeed;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoOptions
方法 or 属性:previewUri?: string \| PixelMap \| Resource;
起始版本:7|类名:VideoOptions
方法 or 属性:previewUri?: string \| PixelMap \| Resource;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoOptions
方法 or 属性:controller?: VideoController;
起始版本:7|类名:VideoOptions
方法 or 属性:controller?: VideoController;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
起始版本:7|类名:VideoController
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:constructor();
起始版本:7|类名:VideoController
方法 or 属性:constructor();
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:start();
起始版本:7|类名:VideoController
方法 or 属性:start();
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:pause();
起始版本:7|类名:VideoController
方法 or 属性:pause();
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:stop();
起始版本:7|类名:VideoController
方法 or 属性:stop();
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:setCurrentTime(value: number);
起始版本:7|类名:VideoController
方法 or 属性:setCurrentTime(value: number);
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:requestFullscreen(value: boolean);
起始版本:7|类名:VideoController
方法 or 属性:requestFullscreen(value: boolean);
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:exitFullscreen();
起始版本:7|类名:VideoController
方法 or 属性:exitFullscreen();
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoController
方法 or 属性:setCurrentTime(value: number, seekMode: SeekMode);
起始版本:8|类名:VideoController
方法 or 属性:setCurrentTime(value: number, seekMode: SeekMode);
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoInterface
起始版本:7|类名:VideoInterface
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoInterface
方法 or 属性:(value: VideoOptions): VideoAttribute;
起始版本:7|类名:VideoInterface
方法 or 属性:(value: VideoOptions): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
起始版本:7|类名:VideoAttribute
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:muted(value: boolean): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:muted(value: boolean): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:autoPlay(value: boolean): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:autoPlay(value: boolean): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:controls(value: boolean): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:controls(value: boolean): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:loop(value: boolean): VideoAttribute;
起始版本:6|类名:VideoAttribute
方法 or 属性:loop(value: boolean): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:objectFit(value: ImageFit): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:objectFit(value: ImageFit): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:onStart(event: () => void): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:onStart(event: () => void): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:onPause(event: () => void): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:onPause(event: () => void): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:onFinish(event: () => void): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:onFinish(event: () => void): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:VideoAttribute
方法 or 属性:onError(event: () => void): VideoAttribute;
起始版本:7|类名:VideoAttribute
方法 or 属性:onError(event: () => void): VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const Video: VideoInterface;
起始版本:7|类名:global
方法 or 属性:declare const Video: VideoInterface;
起始版本:10|video.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const VideoInstance: VideoAttribute;
起始版本:7|类名:global
方法 or 属性:declare const VideoInstance: VideoAttribute;
起始版本:10|video.d.ts| -|起始版本有变化|类名:WaterFlowOptions
起始版本:9|类名:WaterFlowOptions
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowOptions
方法 or 属性:footer?: CustomBuilder;
起始版本:9|类名:WaterFlowOptions
方法 or 属性:footer?: CustomBuilder;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowOptions
方法 or 属性:scroller?: Scroller;
起始版本:9|类名:WaterFlowOptions
方法 or 属性:scroller?: Scroller;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowInterface
起始版本:9|类名:WaterFlowInterface
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowInterface
方法 or 属性:(options?: WaterFlowOptions): WaterFlowAttribute;
起始版本:9|类名:WaterFlowInterface
方法 or 属性:(options?: WaterFlowOptions): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
起始版本:9|类名:WaterFlowAttribute
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:columnsTemplate(value: string): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:columnsTemplate(value: string): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:itemConstraintSize(value: ConstraintSizeOptions): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:itemConstraintSize(value: ConstraintSizeOptions): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:rowsTemplate(value: string): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:rowsTemplate(value: string): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:columnsGap(value: Length): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:columnsGap(value: Length): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:rowsGap(value: Length): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:rowsGap(value: Length): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:layoutDirection(value: FlexDirection): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:layoutDirection(value: FlexDirection): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:onReachStart(event: () => void): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:onReachStart(event: () => void): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:WaterFlowAttribute
方法 or 属性:onReachEnd(event: () => void): WaterFlowAttribute;
起始版本:9|类名:WaterFlowAttribute
方法 or 属性:onReachEnd(event: () => void): WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const WaterFlow: WaterFlowInterface;
起始版本:9|类名:global
方法 or 属性:declare const WaterFlow: WaterFlowInterface;
起始版本:10|water_flow.d.ts| -|起始版本有变化|类名:global
方法 or 属性:declare const WaterFlowInstance: WaterFlowAttribute;
起始版本:9|类名:global
方法 or 属性:declare const WaterFlowInstance: WaterFlowAttribute;
起始版本:10|water_flow.d.ts| -|函数有变化|类名:ActionSheet
方法 or 属性:static show(value: {

/**

* Title Properties

* @since 8

*/

title: string \| Resource;



/**

* message Properties

* @since 8

*/

message: string \| Resource;



/**

* Invoke the commit function.

* @since 8

*/

confirm?: {

/**

* Text content of the confirmation button.

* @since 8

*/

value: string \| Resource;



/**

* Method executed by the callback.

* @since 8

*/

action: () => void;

};



/**

* Execute Cancel Function.

* @since 8

*/

cancel?: () => void;



/**

* The Array of sheets

* @since 8

*/

sheets: Array\;



/**

* Allows users to click the mask layer to exit.

* @since 8

*/

autoCancel?: boolean;



/**

* Alignment in the vertical direction.

* @since 8

*/

alignment?: DialogAlignment;



/**

* Offset of the pop-up window relative to the alignment position.

* @since 8

*/

offset?: { dx: number \| string \| Resource; dy: number \| string \| Resource };

});
|类名:ActionSheet
方法 or 属性:static show(value: {
/**
* Title Properties
* @since 8
*/
/**
* Title Properties
* @crossplatform
* @since 10
*/
title: string \| Resource;

/**
* message Properties
* @since 8
*/
/**
* message Properties
* @crossplatform
* @since 10
*/
message: string \| Resource;

/**
* Invoke the commit function.
* @since 8
*/
/**
* Invoke the commit function.
* @crossplatform
* @since 10
*/
confirm?: {
/**
* Text content of the confirmation button.
* @since 8
*/
/**
* Text content of the confirmation button.
* @crossplatform
* @since 10
*/
value: string \| Resource;

/**
* Method executed by the callback.
* @since 8
*/
/**
* Method executed by the callback.
* @crossplatform
* @since 10
*/
action: () => void;
};

/**
* Execute Cancel Function.
* @since 8
*/
/**
* Execute Cancel Function.
* @crossplatform
* @since 10
*/
cancel?: () => void;

/**
* The Array of sheets
* @since 8
*/
/**
* The Array of sheets
* @crossplatform
* @since 10
*/
sheets: Array\;

/**
* Allows users to click the mask layer to exit.
* @since 8
*/
/**
* Allows users to click the mask layer to exit.
* @crossplatform
* @since 10
*/
autoCancel?: boolean;

/**
* Alignment in the vertical direction.
* @since 8
*/
/**
* Alignment in the vertical direction.
* @crossplatform
* @since 10
*/
alignment?: DialogAlignment;

/**
* Offset of the pop-up window relative to the alignment position.
* @since 8
*/
/**
* Offset of the pop-up window relative to the alignment position.
* @crossplatform
* @since 10
*/
offset?: { dx: number \| string \| Resource; dy: number \| string \| Resource };
});
|action_sheet.d.ts| +|废弃版本有变化|类名:WebAttribute
方法 or 属性:onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
废弃版本:N/A|类名:WebAttribute
方法 or 属性:onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
废弃版本:10
代替接口:ohos.web.WebAttribute#onLoadIntercept|web.d.ts| |函数有变化|类名:AlphabetIndexerAttribute
方法 or 属性:alignStyle(value: IndexerAlign): AlphabetIndexerAttribute;
|类名:AlphabetIndexerAttribute
方法 or 属性:alignStyle(value: IndexerAlign, offset?: Length): AlphabetIndexerAttribute;
|alphabet_indexer.d.ts| -|函数有变化|类名:PopupOptions
方法 or 属性:onStateChange?: (event: { isVisible: boolean }) => void;
|类名:PopupOptions
方法 or 属性:onStateChange?: (event: {
/**
* is Visible.
* @crossplatform
* @since 10
*/
isVisible: boolean
}) => void;
|common.d.ts| -|函数有变化|类名:CustomPopupOptions
方法 or 属性:onStateChange?: (event: { isVisible: boolean }) => void;
|类名:CustomPopupOptions
方法 or 属性:onStateChange?: (event: {
/**
* is Visible.
* @crossplatform
* @since 10
*/
isVisible: boolean
}) => void;
|common.d.ts| |函数有变化|类名:CommonMethod
方法 or 属性:backgroundBlurStyle(value: BlurStyle): T;
|类名:CommonMethod
方法 or 属性:backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): T;
|common.d.ts| |函数有变化|类名:CommonMethod
方法 or 属性:borderStyle(value: BorderStyle): T;
|类名:CommonMethod
方法 or 属性:borderStyle(value: BorderStyle \| EdgeStyles): T;
|common.d.ts| -|函数有变化|类名:CommonMethod
方法 or 属性:borderStyle(value: EdgeStyles): T;
|类名:CommonMethod
方法 or 属性:borderStyle(value: BorderStyle \| EdgeStyles): T;
|common.d.ts| -|函数有变化|类名:CommonMethod
方法 or 属性:borderWidth(value: Length): T;
|类名:CommonMethod
方法 or 属性:borderWidth(value: Length \| EdgeWidths): T;
|common.d.ts| |函数有变化|类名:CommonMethod
方法 or 属性:borderWidth(value: EdgeWidths): T;
|类名:CommonMethod
方法 or 属性:borderWidth(value: Length \| EdgeWidths): T;
|common.d.ts| |函数有变化|类名:CommonMethod
方法 or 属性:borderColor(value: ResourceColor): T;
|类名:CommonMethod
方法 or 属性:borderColor(value: ResourceColor \| EdgeColors): T;
|common.d.ts| -|函数有变化|类名:CommonMethod
方法 or 属性:borderColor(value: EdgeColors): T;
|类名:CommonMethod
方法 or 属性:borderColor(value: ResourceColor \| EdgeColors): T;
|common.d.ts| -|函数有变化|类名:CommonMethod
方法 or 属性:borderRadius(value: Length): T;
|类名:CommonMethod
方法 or 属性:borderRadius(value: Length \| BorderRadiuses): T;
|common.d.ts| |函数有变化|类名:CommonMethod
方法 or 属性:borderRadius(value: BorderRadiuses): T;
|类名:CommonMethod
方法 or 属性:borderRadius(value: Length \| BorderRadiuses): T;
|common.d.ts| |函数有变化|类名:CommonMethod
方法 or 属性:transition(value: TransitionOptions): T;
|类名:CommonMethod
方法 or 属性:transition(value: TransitionOptions \| TransitionEffect): T;
|common.d.ts| |函数有变化|类名:CommonMethod
方法 or 属性:shadow(value: {
radius: number \| Resource;
color?: Color \| string \| Resource;
offsetX?: number \| Resource;
offsetY?: number \| Resource;
}): T;
|类名:CommonMethod
方法 or 属性:shadow(value: ShadowOptions \| ShadowStyle): T;
|common.d.ts| @@ -2043,16 +601,7 @@ |函数有变化|类名:MenuItemAttribute
方法 or 属性:selectIcon(value: boolean): MenuItemAttribute;
|类名:MenuItemAttribute
方法 or 属性:selectIcon(value: boolean \| ResourceStr): MenuItemAttribute;
|menu_item.d.ts| |函数有变化|类名:NavigationAttribute
方法 or 属性:title(value: string \| CustomBuilder \| NavigationCommonTitle \| NavigationCustomTitle): NavigationAttribute;
|类名:NavigationAttribute
方法 or 属性:title(value: ResourceStr \| CustomBuilder \| NavigationCommonTitle \| NavigationCustomTitle): NavigationAttribute;
|navigation.d.ts| |函数有变化|类名:RefreshInterface
方法 or 属性:(value: { refreshing: boolean; offset?: number \| string; friction?: number \| string }): RefreshAttribute;
|类名:RefreshInterface
方法 or 属性:(value: RefreshOptions): RefreshAttribute;
|refresh.d.ts| -|函数有变化|类名:Scroller
方法 or 属性:scrollTo(value: {
xOffset: number \| string;
yOffset: number \| string;
animation?: { duration: number; curve: Curve };
});
|类名:Scroller
方法 or 属性:scrollTo(value: {
/**
* The X-axis offset.
* @crossplatform
* @since 10
*/
xOffset: number \| string;

/**
* The Y-axis offset.
* @crossplatform
* @since 10
*/
yOffset: number \| string;

/**
* Descriptive animation.
* @crossplatform
* @since 10
*/
animation?: { duration: number; curve: Curve };
});
|scroll.d.ts| |函数有变化|类名:Scroller
方法 or 属性:scrollToIndex(value: number);
|类名:Scroller
方法 or 属性:scrollToIndex(value: number, smooth?:boolean);
|scroll.d.ts| -|函数有变化|类名:SearchInterface
方法 or 属性:(options?: { value?: string;
placeholder?: string;
icon?: string;
controller?: SearchController
}): SearchAttribute;
|类名:SearchInterface
方法 or 属性:(options?: {
/**
* Text input in the search text box
* @type { string }
* @since 8
*/
value?: string;

/**
* Text displayed when there is no input
* @type { string }
* @since 8
*/
/**
* Text displayed when there is no input
* @type { ResourceStr }
* @since 10
*/
placeholder?: ResourceStr;

/**
* Path to the search icon
* @type { string }
* @since 8
*/
icon?: string;

/**
* Controller of the \ component
* @type { SearchController }
* @since 8
*/
controller?: SearchController
}): SearchAttribute;
|search.d.ts| |函数有变化|类名:SearchAttribute
方法 or 属性:searchButton(value: string): SearchAttribute;
|类名:SearchAttribute
方法 or 属性:searchButton(value: string, option?: SearchButtonOption): SearchAttribute;
|search.d.ts| |函数有变化|类名:SwiperAttribute
方法 or 属性:indicator(value: boolean): SwiperAttribute;
|类名:SwiperAttribute
方法 or 属性:indicator(value: DotIndicator \| DigitIndicator \| boolean): SwiperAttribute;
|swiper.d.ts| |函数有变化|类名:SwiperAttribute
方法 or 属性:curve(value: Curve \| string): SwiperAttribute;
|类名:SwiperAttribute
方法 or 属性:curve(value: Curve \| string \| ICurve): SwiperAttribute;
|swiper.d.ts| -|函数有变化|类名:SubTabBarStyle
方法 or 属性:constructor(content: string \| Resource);
|类名:SubTabBarStyle
方法 or 属性:constructor(content: ResourceStr);
|tab_content.d.ts| -|函数有变化|类名:BottomTabBarStyle
方法 or 属性:constructor(icon: string \| Resource, text: string \| Resource);
|类名:BottomTabBarStyle
方法 or 属性:constructor(icon: ResourceStr, text: ResourceStr);
|tab_content.d.ts| -|函数有变化|类名:VideoAttribute
方法 or 属性:onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void): VideoAttribute;
|类名:VideoAttribute
方法 or 属性:onFullscreenChange(callback: (event?: {
/**
* Play the flag in full screen.
* @crossplatform
* @since 10
*/
fullscreen: boolean
}) => void): VideoAttribute;
|video.d.ts| -|函数有变化|类名:VideoAttribute
方法 or 属性:onPrepared(callback: (event?: { duration: number }) => void): VideoAttribute;
|类名:VideoAttribute
方法 or 属性:onPrepared(callback: (event?: {
/**
* Playback duration.
* @crossplatform
* @since 10
*/
duration: number
}) => void): VideoAttribute;
|video.d.ts| -|函数有变化|类名:VideoAttribute
方法 or 属性:onSeeking(callback: (event?: { time: number }) => void): VideoAttribute;
|类名:VideoAttribute
方法 or 属性:onSeeking(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| -|函数有变化|类名:VideoAttribute
方法 or 属性:onSeeked(callback: (event?: { time: number }) => void): VideoAttribute;
|类名:VideoAttribute
方法 or 属性:onSeeked(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| -|函数有变化|类名:VideoAttribute
方法 or 属性:onUpdate(callback: (event?: { time: number }) => void): VideoAttribute;
|类名:VideoAttribute
方法 or 属性:onUpdate(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md index f84230976cdfb891176d37f1b9b605d508adc4fa..699b9f678cf1d3d133b4ad8af123b0dc92cb385b 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md @@ -1,42 +1,15 @@ | 操作 | 旧版本 | 新版本 | d.ts文件 | | ---- | ------ | ------ | -------- | |新增|NA|模块名: global
类名: console
方法 or 属性:static assert(value?: Object, ...arguments: Object[]): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static assert(value?: Object, ...arguments: Object[]): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static count(label?: string): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static count(label?: string): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static countReset(label?: string): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static countReset(label?: string): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static dir(dir?: Object): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static dir(dir?: Object): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static dirxml(...arguments: Object[]): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static dirxml(...arguments: Object[]): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static group(...arguments: Object[]): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static group(...arguments: Object[]): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static groupCollapsed(...arguments: Object[]): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static groupCollapsed(...arguments: Object[]): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static groupEnd(): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static groupEnd(): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static table(tableData?: Object): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static table(tableData?: Object): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static time(label?: string): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static time(label?: string): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static timeEnd(label?: string): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static timeEnd(label?: string): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static timeLog(label?: string, ...arguments: Object[]): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static timeLog(label?: string, ...arguments: Object[]): void;|global.d.ts| |新增|NA|模块名: global
类名: console
方法 or 属性:static trace(...arguments: Object[]): void;|global.d.ts| -|新增|NA|类名:console
方法or属性:static trace(...arguments: Object[]): void;|global.d.ts| -|起始版本有变化|类名:LRUCache
方法 or 属性:keys(): K[];
起始版本:N/A|类名:LRUCache
方法 or 属性:keys(): K[];
起始版本:9|@ohos.util.d.ts| -|起始版本有变化|类名:WorkerEventListener
方法 or 属性:(event: Event): void \| Promise\;
起始版本:9|类名:WorkerEventListener
方法 or 属性:(event: Event): void \| Promise\;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:WorkerEventTarget
方法 or 属性:addEventListener(type: string, listener: WorkerEventListener): void;
起始版本:9|类名:WorkerEventTarget
方法 or 属性:addEventListener(type: string, listener: WorkerEventListener): void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorkerGlobalScope
方法 or 属性:onmessage?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
起始版本:9|类名:ThreadWorkerGlobalScope
方法 or 属性:onmessage?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorkerGlobalScope
方法 or 属性:onmessageerror?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
起始版本:9|类名:ThreadWorkerGlobalScope
方法 or 属性:onmessageerror?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:onexit?: (code: number) => void;
起始版本:9|类名:ThreadWorker
方法 or 属性:onexit?: (code: number) => void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:onerror?: (err: ErrorEvent) => void;
起始版本:9|类名:ThreadWorker
方法 or 属性:onerror?: (err: ErrorEvent) => void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:onmessage?: (event: MessageEvents) => void;
起始版本:9|类名:ThreadWorker
方法 or 属性:onmessage?: (event: MessageEvents) => void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:onmessageerror?: (event: MessageEvents) => void;
起始版本:9|类名:ThreadWorker
方法 or 属性:onmessageerror?: (event: MessageEvents) => void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:on(type: string, listener: WorkerEventListener): void;
起始版本:9|类名:ThreadWorker
方法 or 属性:on(type: string, listener: WorkerEventListener): void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:once(type: string, listener: WorkerEventListener): void;
起始版本:9|类名:ThreadWorker
方法 or 属性:once(type: string, listener: WorkerEventListener): void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:off(type: string, listener?: WorkerEventListener): void;
起始版本:9|类名:ThreadWorker
方法 or 属性:off(type: string, listener?: WorkerEventListener): void;
起始版本:10|@ohos.worker.d.ts| -|起始版本有变化|类名:ThreadWorker
方法 or 属性:addEventListener(type: string, listener: WorkerEventListener): void;
起始版本:9|类名:ThreadWorker
方法 or 属性:addEventListener(type: string, listener: WorkerEventListener): void;
起始版本:10|@ohos.worker.d.ts| -|函数有变化|类名:RationalNumber
方法 or 属性:static createRationalFromString(rationalString: string): RationalNumber​;
|类名:RationalNumber
方法 or 属性:static createRationalFromString(rationalString: string): RationalNumber;
|@ohos.util.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md index 447a174eb3d994746608aa6814d9950e80d7cc2e..de604be895bc91278e4a8fa47c9d15079fa3f8d2 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md @@ -128,166 +128,13 @@ |新增|NA|模块名: ohos.data.UDMF
类名: ApplicationDefinedRecord
方法 or 属性: applicationDefinedType: string;|@ohos.data.UDMF.d.ts| |新增|NA|模块名: ohos.data.UDMF
类名: ApplicationDefinedRecord
方法 or 属性: rawData: Uint8Array;|@ohos.data.UDMF.d.ts| |删除|模块名:ohos.data.relationalStore
类名:relationalStore
方法 or 属性:type ValuesBucket = { [key:string]: ValueType \| Uint8Array \| null;}|NA|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:put(key: string, value: Uint8Array \| string \| number \| boolean, callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:put(key: string, value: Uint8Array \| string \| number \| boolean, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:put(key: string, value: Uint8Array \| string \| number \| boolean): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:put(key: string, value: Uint8Array \| string \| number \| boolean): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:putBatch(entries: Entry[], callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:putBatch(entries: Entry[], callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:putBatch(entries: Entry[]): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:putBatch(entries: Entry[]): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:putBatch(value: Array\, callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:putBatch(value: Array\, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:putBatch(value: Array\): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:putBatch(value: Array\): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:delete(key: string, callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:delete(key: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:delete(key: string): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:delete(key: string): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\);
起始版本:9|类名:SingleKVStore
方法 or 属性:delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\);
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:delete(predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:delete(predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:deleteBatch(keys: string[], callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:deleteBatch(keys: string[], callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:deleteBatch(keys: string[]): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:deleteBatch(keys: string[]): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:getResultSet(keyPrefix: string): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:getResultSet(keyPrefix: string): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:getResultSet(query: Query, callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:getResultSet(query: Query, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:getResultSet(query: Query): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:getResultSet(query: Query): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:startTransaction(callback: AsyncCallback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:startTransaction(callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:startTransaction(): Promise\;
起始版本:9|类名:SingleKVStore
方法 or 属性:startTransaction(): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:SingleKVStore
方法 or 属性:on(event: 'dataChange', type: SubscribeType, listener: Callback\): void;
起始版本:9|类名:SingleKVStore
方法 or 属性:on(event: 'dataChange', type: SubscribeType, listener: Callback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(keyPrefix: string): Promise\;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(keyPrefix: string): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback\): void;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, keyPrefix: string): Promise\;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, keyPrefix: string): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(query: Query, callback: AsyncCallback\): void;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(query: Query, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(query: Query): Promise\;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(query: Query): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, query: Query, callback: AsyncCallback\): void;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, query: Query, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, query: Query): Promise\;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, query: Query): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:9|类名:DeviceKVStore
方法 or 属性:getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:10|@ohos.data.distributedKVStore.d.ts| -|起始版本有变化|类名:preferences
起始版本:9|类名:preferences
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:const MAX_KEY_LENGTH: 80;
起始版本:N/A|类名:preferences
方法 or 属性:const MAX_KEY_LENGTH: 80;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:const MAX_VALUE_LENGTH: 8192;
起始版本:N/A|类名:preferences
方法 or 属性:const MAX_VALUE_LENGTH: 8192;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:function getPreferences(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:9|类名:preferences
方法 or 属性:function getPreferences(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:function getPreferences(context: Context, name: string): Promise\;
起始版本:9|类名:preferences
方法 or 属性:function getPreferences(context: Context, name: string): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:function deletePreferences(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:9|类名:preferences
方法 or 属性:function deletePreferences(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:function deletePreferences(context: Context, name: string): Promise\;
起始版本:9|类名:preferences
方法 or 属性:function deletePreferences(context: Context, name: string): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:9|类名:preferences
方法 or 属性:function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:preferences
方法 or 属性:function removePreferencesFromCache(context: Context, name: string): Promise\;
起始版本:9|类名:preferences
方法 or 属性:function removePreferencesFromCache(context: Context, name: string): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
起始版本:9|类名:Preferences
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
起始版本:9|类名:Preferences
方法 or 属性:get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:get(key: string, defValue: ValueType): Promise\;
起始版本:9|类名:Preferences
方法 or 属性:get(key: string, defValue: ValueType): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:getAll(callback: AsyncCallback\): void;
起始版本:9|类名:Preferences
方法 or 属性:getAll(callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:getAll(): Promise\;
起始版本:9|类名:Preferences
方法 or 属性:getAll(): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:has(key: string, callback: AsyncCallback\): void;
起始版本:9|类名:Preferences
方法 or 属性:has(key: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:has(key: string): Promise\;
起始版本:9|类名:Preferences
方法 or 属性:has(key: string): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:put(key: string, value: ValueType, callback: AsyncCallback\): void;
起始版本:9|类名:Preferences
方法 or 属性:put(key: string, value: ValueType, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:put(key: string, value: ValueType): Promise\;
起始版本:9|类名:Preferences
方法 or 属性:put(key: string, value: ValueType): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:delete(key: string, callback: AsyncCallback\): void;
起始版本:9|类名:Preferences
方法 or 属性:delete(key: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:delete(key: string): Promise\;
起始版本:9|类名:Preferences
方法 or 属性:delete(key: string): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:clear(callback: AsyncCallback\): void;
起始版本:9|类名:Preferences
方法 or 属性:clear(callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:clear(): Promise\;
起始版本:9|类名:Preferences
方法 or 属性:clear(): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:flush(callback: AsyncCallback\): void;
起始版本:9|类名:Preferences
方法 or 属性:flush(callback: AsyncCallback\): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:flush(): Promise\;
起始版本:9|类名:Preferences
方法 or 属性:flush(): Promise\;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:on(type: 'change', callback: Callback\<{ key: string }>): void;
起始版本:9|类名:Preferences
方法 or 属性:on(type: 'change', callback: Callback\<{ key: string }>): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:Preferences
方法 or 属性:off(type: 'change', callback?: Callback\<{ key: string }>): void;
起始版本:9|类名:Preferences
方法 or 属性:off(type: 'change', callback?: Callback\<{ key: string }>): void;
起始版本:10|@ohos.data.preferences.d.ts| -|起始版本有变化|类名:relationalStore
起始版本:9|类名:relationalStore
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:StoreConfig
起始版本:9|类名:StoreConfig
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:StoreConfig
方法 or 属性:name: string;
起始版本:9|类名:StoreConfig
方法 or 属性:name: string;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:SyncMode
起始版本:9|类名:SyncMode
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:SyncMode
方法 or 属性:SYNC_MODE_PUSH = 0
起始版本:9|类名:SyncMode
方法 or 属性:SYNC_MODE_PUSH = 0
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:SyncMode
方法 or 属性:SYNC_MODE_PULL = 1
起始版本:9|类名:SyncMode
方法 or 属性:SYNC_MODE_PULL = 1
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
起始版本:9|类名:RdbPredicates
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:equalTo(field: string, value: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:equalTo(field: string, value: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:notEqualTo(field: string, value: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:notEqualTo(field: string, value: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:beginWrap(): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:beginWrap(): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:endWrap(): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:endWrap(): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:or(): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:or(): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:and(): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:and(): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:contains(field: string, value: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:contains(field: string, value: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:beginsWith(field: string, value: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:beginsWith(field: string, value: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:endsWith(field: string, value: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:endsWith(field: string, value: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:isNull(field: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:isNull(field: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:isNotNull(field: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:isNotNull(field: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:like(field: string, value: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:like(field: string, value: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:glob(field: string, value: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:glob(field: string, value: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:between(field: string, low: ValueType, high: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:between(field: string, low: ValueType, high: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:greaterThan(field: string, value: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:greaterThan(field: string, value: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:lessThan(field: string, value: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:lessThan(field: string, value: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:orderByAsc(field: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:orderByAsc(field: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:orderByDesc(field: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:orderByDesc(field: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:distinct(): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:distinct(): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:limitAs(value: number): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:limitAs(value: number): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:offsetAs(rowOffset: number): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:offsetAs(rowOffset: number): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:groupBy(fields: Array\): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:groupBy(fields: Array\): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:indexedBy(field: string): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:indexedBy(field: string): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:in(field: string, value: Array\): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:in(field: string, value: Array\): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbPredicates
方法 or 属性:notIn(field: string, value: Array\): RdbPredicates;
起始版本:9|类名:RdbPredicates
方法 or 属性:notIn(field: string, value: Array\): RdbPredicates;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
起始版本:9|类名:ResultSet
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:columnNames: Array\;
起始版本:9|类名:ResultSet
方法 or 属性:columnNames: Array\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:columnCount: number;
起始版本:9|类名:ResultSet
方法 or 属性:columnCount: number;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:rowCount: number;
起始版本:9|类名:ResultSet
方法 or 属性:rowCount: number;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:rowIndex: number;
起始版本:9|类名:ResultSet
方法 or 属性:rowIndex: number;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:isAtFirstRow: boolean;
起始版本:9|类名:ResultSet
方法 or 属性:isAtFirstRow: boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:isAtLastRow: boolean;
起始版本:9|类名:ResultSet
方法 or 属性:isAtLastRow: boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:isEnded: boolean;
起始版本:9|类名:ResultSet
方法 or 属性:isEnded: boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:isStarted: boolean;
起始版本:9|类名:ResultSet
方法 or 属性:isStarted: boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:isClosed: boolean;
起始版本:9|类名:ResultSet
方法 or 属性:isClosed: boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:getColumnIndex(columnName: string): number;
起始版本:9|类名:ResultSet
方法 or 属性:getColumnIndex(columnName: string): number;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:getColumnName(columnIndex: number): string;
起始版本:9|类名:ResultSet
方法 or 属性:getColumnName(columnIndex: number): string;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:goTo(offset: number): boolean;
起始版本:9|类名:ResultSet
方法 or 属性:goTo(offset: number): boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:goToRow(position: number): boolean;
起始版本:9|类名:ResultSet
方法 or 属性:goToRow(position: number): boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:goToFirstRow(): boolean;
起始版本:9|类名:ResultSet
方法 or 属性:goToFirstRow(): boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:goToLastRow(): boolean;
起始版本:9|类名:ResultSet
方法 or 属性:goToLastRow(): boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:goToNextRow(): boolean;
起始版本:9|类名:ResultSet
方法 or 属性:goToNextRow(): boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:goToPreviousRow(): boolean;
起始版本:9|类名:ResultSet
方法 or 属性:goToPreviousRow(): boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:getBlob(columnIndex: number): Uint8Array;
起始版本:9|类名:ResultSet
方法 or 属性:getBlob(columnIndex: number): Uint8Array;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:getString(columnIndex: number): string;
起始版本:9|类名:ResultSet
方法 or 属性:getString(columnIndex: number): string;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:getLong(columnIndex: number): number;
起始版本:9|类名:ResultSet
方法 or 属性:getLong(columnIndex: number): number;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:getDouble(columnIndex: number): number;
起始版本:9|类名:ResultSet
方法 or 属性:getDouble(columnIndex: number): number;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:isColumnNull(columnIndex: number): boolean;
起始版本:9|类名:ResultSet
方法 or 属性:isColumnNull(columnIndex: number): boolean;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:ResultSet
方法 or 属性:close(): void;
起始版本:9|类名:ResultSet
方法 or 属性:close(): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
起始版本:9|类名:RdbStore
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:batchInsert(table: string, values: Array\, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:batchInsert(table: string, values: Array\, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:batchInsert(table: string, values: Array\): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:batchInsert(table: string, values: Array\): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:delete(predicates: RdbPredicates, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:delete(predicates: RdbPredicates, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:delete(predicates: RdbPredicates): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:delete(predicates: RdbPredicates): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:beginTransaction(): void;
起始版本:9|类名:RdbStore
方法 or 属性:beginTransaction(): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:commit(): void;
起始版本:9|类名:RdbStore
方法 or 属性:commit(): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:rollBack(): void;
起始版本:9|类名:RdbStore
方法 or 属性:rollBack(): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:backup(destName: string, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:backup(destName: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:backup(destName: string): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:backup(destName: string): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:restore(srcName: string, callback: AsyncCallback\): void;
起始版本:9|类名:RdbStore
方法 or 属性:restore(srcName: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:RdbStore
方法 or 属性:restore(srcName: string): Promise\;
起始版本:9|类名:RdbStore
方法 or 属性:restore(srcName: string): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:relationalStore
方法 or 属性:function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback\): void;
起始版本:9|类名:relationalStore
方法 or 属性:function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:relationalStore
方法 or 属性:function getRdbStore(context: Context, config: StoreConfig): Promise\;
起始版本:9|类名:relationalStore
方法 or 属性:function getRdbStore(context: Context, config: StoreConfig): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:relationalStore
方法 or 属性:function deleteRdbStore(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:9|类名:relationalStore
方法 or 属性:function deleteRdbStore(context: Context, name: string, callback: AsyncCallback\): void;
起始版本:10|@ohos.data.relationalStore.d.ts| -|起始版本有变化|类名:relationalStore
方法 or 属性:function deleteRdbStore(context: Context, name: string): Promise\;
起始版本:9|类名:relationalStore
方法 or 属性:function deleteRdbStore(context: Context, name: string): Promise\;
起始版本:10|@ohos.data.relationalStore.d.ts| |新增(权限)|类名:SubscribeType
方法 or 属性:SUBSCRIBE_TYPE_REMOTE = 0
权限:N/A|类名:SubscribeType
方法 or 属性:SUBSCRIBE_TYPE_REMOTE = 0
权限:ohos.permission.DISTRIBUTED_DATASYNC|@ohos.data.rdb.d.ts| |新增(权限)|类名:SubscribeType
方法 or 属性:SUBSCRIBE_TYPE_REMOTE = 0
权限:N/A|类名:SubscribeType
方法 or 属性:SUBSCRIBE_TYPE_REMOTE = 0
权限:ohos.permission.DISTRIBUTED_DATASYNC|@ohos.data.relationalStore.d.ts| |函数有变化|类名:dataShare
方法 or 属性:function createDataShareHelper(context: Context, uri: string): Promise\;
|类名:dataShare
方法 or 属性:function createDataShareHelper(
context: Context,
uri: string,
option?: DataShareHelperOption
): Promise\;
|@ohos.data.dataShare.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket): Promise\;
|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|类名:RdbStore
方法 or 属性:update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:query(predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:query(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:querySql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:executeSql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|函数有变化|类名:RdbStore
方法 or 属性:executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|函数有变化|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket, callback: AsyncCallback): void;
insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|函数有变化|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket): Promise\;
|类名:RdbStore
方法 or 属性:insert(table: string, values: ValuesBucket): Promise\;
insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| +|函数有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|函数有变化|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|类名:RdbStore
方法 or 属性:update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| +|函数有变化|类名:RdbStore
方法 or 属性:query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
query(predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|函数有变化|类名:RdbStore
方法 or 属性:querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
querySql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|函数有变化|类名:RdbStore
方法 or 属性:executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|类名:RdbStore
方法 or 属性:executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
executeSql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md deleted file mode 100644 index 47ea72036893314517738e5e893d2a599afcb34f..0000000000000000000000000000000000000000 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md +++ /dev/null @@ -1,37 +0,0 @@ -| 操作 | 旧版本 | 新版本 | d.ts文件 | -| ---- | ------ | ------ | -------- | -|新增(权限)|类名:GeoAddress
方法 or 属性:latitude?: number;
权限:N/A|类名:GeoAddress
方法 or 属性:latitude?: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:longitude?: number;
权限:N/A|类名:GeoAddress
方法 or 属性:longitude?: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:locale?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:locale?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:placeName?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:placeName?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:countryCode?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:countryCode?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:countryName?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:countryName?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:administrativeArea?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:administrativeArea?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:subAdministrativeArea?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:subAdministrativeArea?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:locality?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:locality?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:subLocality?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:subLocality?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:roadName?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:roadName?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:subRoadName?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:subRoadName?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:premises?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:premises?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:postalCode?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:postalCode?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:phoneNumber?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:phoneNumber?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:addressUrl?: string;
权限:N/A|类名:GeoAddress
方法 or 属性:addressUrl?: string;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:descriptions?: Array\;
权限:N/A|类名:GeoAddress
方法 or 属性:descriptions?: Array\;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoAddress
方法 or 属性:descriptionsSize?: number;
权限:N/A|类名:GeoAddress
方法 or 属性:descriptionsSize?: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:latitude: number;
权限:N/A|类名:Location
方法 or 属性:latitude: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:longitude: number;
权限:N/A|类名:Location
方法 or 属性:longitude: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:altitude: number;
权限:N/A|类名:Location
方法 or 属性:altitude: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:accuracy: number;
权限:N/A|类名:Location
方法 or 属性:accuracy: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:speed: number;
权限:N/A|类名:Location
方法 or 属性:speed: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:timeStamp: number;
权限:N/A|类名:Location
方法 or 属性:timeStamp: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:direction: number;
权限:N/A|类名:Location
方法 or 属性:direction: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:timeSinceBoot: number;
权限:N/A|类名:Location
方法 or 属性:timeSinceBoot: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:additions?: Array\;
权限:N/A|类名:Location
方法 or 属性:additions?: Array\;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:Location
方法 or 属性:additionSize?: number;
权限:N/A|类名:Location
方法 or 属性:additionSize?: number;
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoLocationErrorCode
方法 or 属性:INPUT_PARAMS_ERROR
权限:N/A|类名:GeoLocationErrorCode
方法 or 属性:INPUT_PARAMS_ERROR
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoLocationErrorCode
方法 or 属性:REVERSE_GEOCODE_ERROR
权限:N/A|类名:GeoLocationErrorCode
方法 or 属性:REVERSE_GEOCODE_ERROR
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoLocationErrorCode
方法 or 属性:GEOCODE_ERROR
权限:N/A|类名:GeoLocationErrorCode
方法 or 属性:GEOCODE_ERROR
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoLocationErrorCode
方法 or 属性:LOCATOR_ERROR
权限:N/A|类名:GeoLocationErrorCode
方法 or 属性:LOCATOR_ERROR
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoLocationErrorCode
方法 or 属性:LOCATION_SWITCH_ERROR
权限:N/A|类名:GeoLocationErrorCode
方法 or 属性:LOCATION_SWITCH_ERROR
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoLocationErrorCode
方法 or 属性:LAST_KNOWN_LOCATION_ERROR
权限:N/A|类名:GeoLocationErrorCode
方法 or 属性:LAST_KNOWN_LOCATION_ERROR
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|新增(权限)|类名:GeoLocationErrorCode
方法 or 属性:LOCATION_REQUEST_TIMEOUT_ERROR
权限:N/A|类名:GeoLocationErrorCode
方法 or 属性:LOCATION_REQUEST_TIMEOUT_ERROR
权限:ohos.permission.LOCATION|@ohos.geolocation.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md index c9f47a6aaa2ab3c54a9b997956da2c72a1f0b5cc..68a7cb3408cc23227f29bd91987f6fb8becf448d 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md @@ -17,156 +17,3 @@ |新增|NA|类名:ResourceManager
方法or属性:getDrawableDescriptor(resource: Resource, density?: number): DrawableDescriptor;|@ohos.resourceManager.d.ts| |新增|NA|类名:ResourceManager
方法or属性:getRawFileList(path: string, callback: _AsyncCallback\>): void;|@ohos.resourceManager.d.ts| |新增|NA|类名:ResourceManager
方法or属性:getRawFileList(path: string): Promise\>;|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:System
起始版本:9|类名:System
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:System
方法 or 属性:static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string;
起始版本:9|类名:System
方法 or 属性:static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:System
方法 or 属性:static getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string;
起始版本:9|类名:System
方法 or 属性:static getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:System
方法 or 属性:static getSystemLanguage(): string;
起始版本:9|类名:System
方法 or 属性:static getSystemLanguage(): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:System
方法 or 属性:static setSystemLanguage(language: string): void;
起始版本:N/A|类名:System
方法 or 属性:static setSystemLanguage(language: string): void;
起始版本:9|@ohos.i18n.d.ts| -|起始版本有变化|类名:System
方法 or 属性:static getSystemRegion(): string;
起始版本:9|类名:System
方法 or 属性:static getSystemRegion(): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:System
方法 or 属性:static getSystemLocale(): string;
起始版本:9|类名:System
方法 or 属性:static getSystemLocale(): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:System
方法 or 属性:static is24HourClock(): boolean;
起始版本:9|类名:System
方法 or 属性:static is24HourClock(): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:I18NUtil
起始版本:9|类名:I18NUtil
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:I18NUtil
方法 or 属性:static getDateOrder(locale: string): string;
起始版本:9|类名:I18NUtil
方法 or 属性:static getDateOrder(locale: string): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:i18n
方法 or 属性:function getCalendar(locale: string, type?: string): Calendar;
起始版本:8|类名:i18n
方法 or 属性:function getCalendar(locale: string, type?: string): Calendar;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:setTime(date: Date): void;
起始版本:8|类名:Calendar
方法 or 属性:setTime(date: Date): void;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:setTime(time: number): void;
起始版本:8|类名:Calendar
方法 or 属性:setTime(time: number): void;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:setTimeZone(timezone: string): void;
起始版本:8|类名:Calendar
方法 or 属性:setTimeZone(timezone: string): void;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:getTimeZone(): string;
起始版本:8|类名:Calendar
方法 or 属性:getTimeZone(): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:getFirstDayOfWeek(): number;
起始版本:8|类名:Calendar
方法 or 属性:getFirstDayOfWeek(): number;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:setFirstDayOfWeek(value: number): void;
起始版本:8|类名:Calendar
方法 or 属性:setFirstDayOfWeek(value: number): void;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:getMinimalDaysInFirstWeek(): number;
起始版本:8|类名:Calendar
方法 or 属性:getMinimalDaysInFirstWeek(): number;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:setMinimalDaysInFirstWeek(value: number): void;
起始版本:8|类名:Calendar
方法 or 属性:setMinimalDaysInFirstWeek(value: number): void;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:get(field: string): number;
起始版本:8|类名:Calendar
方法 or 属性:get(field: string): number;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Calendar
方法 or 属性:isWeekend(date?: Date): boolean;
起始版本:8|类名:Calendar
方法 or 属性:isWeekend(date?: Date): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:i18n
方法 or 属性:function isRTL(locale: string): boolean;
起始版本:7|类名:i18n
方法 or 属性:function isRTL(locale: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
起始版本:9|类名:Unicode
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isDigit(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isDigit(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isSpaceChar(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isSpaceChar(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isWhitespace(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isWhitespace(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isRTL(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isRTL(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isIdeograph(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isIdeograph(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isLetter(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isLetter(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isLowerCase(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isLowerCase(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static isUpperCase(char: string): boolean;
起始版本:9|类名:Unicode
方法 or 属性:static isUpperCase(char: string): boolean;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:Unicode
方法 or 属性:static getType(char: string): string;
起始版本:9|类名:Unicode
方法 or 属性:static getType(char: string): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:i18n
方法 or 属性:function getTimeZone(zoneID?: string): TimeZone;
起始版本:7|类名:i18n
方法 or 属性:function getTimeZone(zoneID?: string): TimeZone;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:TimeZone
起始版本:7|类名:TimeZone
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:TimeZone
方法 or 属性:getID(): string;
起始版本:7|类名:TimeZone
方法 or 属性:getID(): string;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:TimeZone
方法 or 属性:getRawOffset(): number;
起始版本:7|类名:TimeZone
方法 or 属性:getRawOffset(): number;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:TimeZone
方法 or 属性:getOffset(date?: number): number;
起始版本:7|类名:TimeZone
方法 or 属性:getOffset(date?: number): number;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:TimeZone
方法 or 属性:static getAvailableIDs(): Array\;
起始版本:9|类名:TimeZone
方法 or 属性:static getAvailableIDs(): Array\;
起始版本:10|@ohos.i18n.d.ts| -|起始版本有变化|类名:intl
起始版本:6|类名:intl
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:LocaleOptions
起始版本:6|类名:LocaleOptions
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Locale
起始版本:6|类名:Locale
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Locale
方法 or 属性:constructor();
起始版本:8|类名:Locale
方法 or 属性:constructor();
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Locale
方法 or 属性:constructor(locale: string, options?: LocaleOptions);
起始版本:6|类名:Locale
方法 or 属性:constructor(locale: string, options?: LocaleOptions);
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Locale
方法 or 属性:toString(): string;
起始版本:6|类名:Locale
方法 or 属性:toString(): string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Locale
方法 or 属性:maximize(): Locale;
起始版本:6|类名:Locale
方法 or 属性:maximize(): Locale;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Locale
方法 or 属性:minimize(): Locale;
起始版本:6|类名:Locale
方法 or 属性:minimize(): Locale;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:DateTimeOptions
起始版本:6|类名:DateTimeOptions
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:DateTimeFormat
起始版本:6|类名:DateTimeFormat
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:DateTimeFormat
方法 or 属性:constructor();
起始版本:8|类名:DateTimeFormat
方法 or 属性:constructor();
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:DateTimeFormat
方法 or 属性:constructor(locale: string \| Array\, options?: DateTimeOptions);
起始版本:6|类名:DateTimeFormat
方法 or 属性:constructor(locale: string \| Array\, options?: DateTimeOptions);
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:DateTimeFormat
方法 or 属性:format(date: Date): string;
起始版本:6|类名:DateTimeFormat
方法 or 属性:format(date: Date): string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:DateTimeFormat
方法 or 属性:formatRange(startDate: Date, endDate: Date): string;
起始版本:6|类名:DateTimeFormat
方法 or 属性:formatRange(startDate: Date, endDate: Date): string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:DateTimeFormat
方法 or 属性:resolvedOptions(): DateTimeOptions;
起始版本:6|类名:DateTimeFormat
方法 or 属性:resolvedOptions(): DateTimeOptions;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:NumberOptions
起始版本:6|类名:NumberOptions
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:NumberFormat
起始版本:6|类名:NumberFormat
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:NumberFormat
方法 or 属性:constructor();
起始版本:8|类名:NumberFormat
方法 or 属性:constructor();
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:NumberFormat
方法 or 属性:constructor(locale: string \| Array\, options?: NumberOptions);
起始版本:6|类名:NumberFormat
方法 or 属性:constructor(locale: string \| Array\, options?: NumberOptions);
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:NumberFormat
方法 or 属性:format(number: number): string;
起始版本:6|类名:NumberFormat
方法 or 属性:format(number: number): string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:NumberFormat
方法 or 属性:resolvedOptions(): NumberOptions;
起始版本:6|类名:NumberFormat
方法 or 属性:resolvedOptions(): NumberOptions;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:CollatorOptions
起始版本:8|类名:CollatorOptions
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Collator
起始版本:8|类名:Collator
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Collator
方法 or 属性:constructor();
起始版本:8|类名:Collator
方法 or 属性:constructor();
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Collator
方法 or 属性:constructor(locale: string \| Array\, options?: CollatorOptions);
起始版本:8|类名:Collator
方法 or 属性:constructor(locale: string \| Array\, options?: CollatorOptions);
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Collator
方法 or 属性:compare(first: string, second: string): number;
起始版本:8|类名:Collator
方法 or 属性:compare(first: string, second: string): number;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:Collator
方法 or 属性:resolvedOptions(): CollatorOptions;
起始版本:8|类名:Collator
方法 or 属性:resolvedOptions(): CollatorOptions;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:PluralRulesOptions
起始版本:8|类名:PluralRulesOptions
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:PluralRules
起始版本:8|类名:PluralRules
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:PluralRules
方法 or 属性:constructor();
起始版本:8|类名:PluralRules
方法 or 属性:constructor();
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:PluralRules
方法 or 属性:constructor(locale: string \| Array\, options?: PluralRulesOptions);
起始版本:8|类名:PluralRules
方法 or 属性:constructor(locale: string \| Array\, options?: PluralRulesOptions);
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:PluralRules
方法 or 属性:select(n: number): string;
起始版本:8|类名:PluralRules
方法 or 属性:select(n: number): string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormatInputOptions
起始版本:8|类名:RelativeTimeFormatInputOptions
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormatResolvedOptions
起始版本:8|类名:RelativeTimeFormatResolvedOptions
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:locale: string;
起始版本:8|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:locale: string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:style: string;
起始版本:8|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:style: string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:numeric: string;
起始版本:8|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:numeric: string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:numberingSystem: string;
起始版本:8|类名:RelativeTimeFormatResolvedOptions
方法 or 属性:numberingSystem: string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormat
起始版本:8|类名:RelativeTimeFormat
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormat
方法 or 属性:constructor();
起始版本:8|类名:RelativeTimeFormat
方法 or 属性:constructor();
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormat
方法 or 属性:constructor(locale: string \| Array\, options?: RelativeTimeFormatInputOptions);
起始版本:8|类名:RelativeTimeFormat
方法 or 属性:constructor(locale: string \| Array\, options?: RelativeTimeFormatInputOptions);
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormat
方法 or 属性:format(value: number, unit: string): string;
起始版本:8|类名:RelativeTimeFormat
方法 or 属性:format(value: number, unit: string): string;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormat
方法 or 属性:formatToParts(value: number, unit: string): Array\;
起始版本:8|类名:RelativeTimeFormat
方法 or 属性:formatToParts(value: number, unit: string): Array\;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:RelativeTimeFormat
方法 or 属性:resolvedOptions(): RelativeTimeFormatResolvedOptions;
起始版本:8|类名:RelativeTimeFormat
方法 or 属性:resolvedOptions(): RelativeTimeFormatResolvedOptions;
起始版本:10|@ohos.intl.d.ts| -|起始版本有变化|类名:resourceManager
起始版本:6|类名:resourceManager
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:Direction
起始版本:6|类名:Direction
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:Direction
方法 or 属性:DIRECTION_VERTICAL = 0
起始版本:6|类名:Direction
方法 or 属性:DIRECTION_VERTICAL = 0
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:Direction
方法 or 属性:DIRECTION_HORIZONTAL = 1
起始版本:6|类名:Direction
方法 or 属性:DIRECTION_HORIZONTAL = 1
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceType
起始版本:6|类名:DeviceType
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceType
方法 or 属性:DEVICE_TYPE_PHONE = 0x00
起始版本:6|类名:DeviceType
方法 or 属性:DEVICE_TYPE_PHONE = 0x00
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceType
方法 or 属性:DEVICE_TYPE_TABLET = 0x01
起始版本:6|类名:DeviceType
方法 or 属性:DEVICE_TYPE_TABLET = 0x01
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceType
方法 or 属性:DEVICE_TYPE_CAR = 0x02
起始版本:6|类名:DeviceType
方法 or 属性:DEVICE_TYPE_CAR = 0x02
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceType
方法 or 属性:DEVICE_TYPE_PC = 0x03
起始版本:6|类名:DeviceType
方法 or 属性:DEVICE_TYPE_PC = 0x03
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceType
方法 or 属性:DEVICE_TYPE_TV = 0x04
起始版本:6|类名:DeviceType
方法 or 属性:DEVICE_TYPE_TV = 0x04
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceType
方法 or 属性:DEVICE_TYPE_WEARABLE = 0x06
起始版本:6|类名:DeviceType
方法 or 属性:DEVICE_TYPE_WEARABLE = 0x06
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ScreenDensity
起始版本:6|类名:ScreenDensity
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ScreenDensity
方法 or 属性:SCREEN_SDPI = 120
起始版本:6|类名:ScreenDensity
方法 or 属性:SCREEN_SDPI = 120
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ScreenDensity
方法 or 属性:SCREEN_MDPI = 160
起始版本:6|类名:ScreenDensity
方法 or 属性:SCREEN_MDPI = 160
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ScreenDensity
方法 or 属性:SCREEN_LDPI = 240
起始版本:6|类名:ScreenDensity
方法 or 属性:SCREEN_LDPI = 240
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ScreenDensity
方法 or 属性:SCREEN_XLDPI = 320
起始版本:6|类名:ScreenDensity
方法 or 属性:SCREEN_XLDPI = 320
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ScreenDensity
方法 or 属性:SCREEN_XXLDPI = 480
起始版本:6|类名:ScreenDensity
方法 or 属性:SCREEN_XXLDPI = 480
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ScreenDensity
方法 or 属性:SCREEN_XXXLDPI = 640
起始版本:6|类名:ScreenDensity
方法 or 属性:SCREEN_XXXLDPI = 640
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:Configuration
起始版本:6|类名:Configuration
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:DeviceCapability
起始版本:6|类名:DeviceCapability
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
起始版本:6|类名:ResourceManager
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringValue(resource: Resource, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringValue(resource: Resource, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringValue(resource: Resource): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringValue(resource: Resource): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringArrayValue(resource: Resource, callback: _AsyncCallback\>): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringArrayValue(resource: Resource, callback: _AsyncCallback\>): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringArrayValue(resource: Resource): Promise\>;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringArrayValue(resource: Resource): Promise\>;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContent(resource: Resource, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContent(resource: Resource, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContent(resource: Resource): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContent(resource: Resource): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resource: Resource, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resource: Resource, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resource: Resource): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resource: Resource): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getDeviceCapability(callback: _AsyncCallback\): void;
起始版本:6|类名:ResourceManager
方法 or 属性:getDeviceCapability(callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getDeviceCapability(): Promise\;
起始版本:6|类名:ResourceManager
方法 or 属性:getDeviceCapability(): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getConfiguration(callback: _AsyncCallback\): void;
起始版本:6|类名:ResourceManager
方法 or 属性:getConfiguration(callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getConfiguration(): Promise\;
起始版本:6|类名:ResourceManager
方法 or 属性:getConfiguration(): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getPluralStringValue(resource: Resource, num: number, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getPluralStringValue(resource: Resource, num: number, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getPluralStringValue(resource: Resource, num: number): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getPluralStringValue(resource: Resource, num: number): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringByName(resName: string, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringByName(resName: string, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringByName(resName: string): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringByName(resName: string): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringArrayByName(resName: string, callback: _AsyncCallback\>): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringArrayByName(resName: string, callback: _AsyncCallback\>): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringArrayByName(resName: string): Promise\>;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringArrayByName(resName: string): Promise\>;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaByName(resName: string, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaByName(resName: string, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaByName(resName: string): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaByName(resName: string): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaBase64ByName(resName: string, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaBase64ByName(resName: string, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaBase64ByName(resName: string): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaBase64ByName(resName: string): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getPluralStringByName(resName: string, num: number, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getPluralStringByName(resName: string, num: number, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getPluralStringByName(resName: string, num: number): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getPluralStringByName(resName: string, num: number): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringSync(resId: number): string;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringSync(resId: number): string;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringSync(resource: Resource): string;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringSync(resource: Resource): string;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringByNameSync(resName: string): string;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringByNameSync(resName: string): string;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getBoolean(resId: number): boolean;
起始版本:9|类名:ResourceManager
方法 or 属性:getBoolean(resId: number): boolean;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getBoolean(resource: Resource): boolean;
起始版本:9|类名:ResourceManager
方法 or 属性:getBoolean(resource: Resource): boolean;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getBooleanByName(resName: string): boolean;
起始版本:9|类名:ResourceManager
方法 or 属性:getBooleanByName(resName: string): boolean;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getNumber(resId: number): number;
起始版本:9|类名:ResourceManager
方法 or 属性:getNumber(resId: number): number;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getNumber(resource: Resource): number;
起始版本:9|类名:ResourceManager
方法 or 属性:getNumber(resource: Resource): number;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getNumberByName(resName: string): number;
起始版本:9|类名:ResourceManager
方法 or 属性:getNumberByName(resName: string): number;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:release();
起始版本:7|类名:ResourceManager
方法 or 属性:release();
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringValue(resId: number, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringValue(resId: number, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringValue(resId: number): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringValue(resId: number): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringArrayValue(resId: number, callback: _AsyncCallback\>): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringArrayValue(resId: number, callback: _AsyncCallback\>): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getStringArrayValue(resId: number): Promise\>;
起始版本:9|类名:ResourceManager
方法 or 属性:getStringArrayValue(resId: number): Promise\>;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getPluralStringValue(resId: number, num: number, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getPluralStringValue(resId: number, num: number, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getPluralStringValue(resId: number, num: number): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getPluralStringValue(resId: number, num: number): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContent(resId: number, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContent(resId: number, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContent(resId: number): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContent(resId: number): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resId: number, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resId: number, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resId: number): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getMediaContentBase64(resId: number): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getRawFileContent(path: string, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getRawFileContent(path: string, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getRawFileContent(path: string): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getRawFileContent(path: string): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getRawFd(path: string, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:getRawFd(path: string, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:getRawFd(path: string): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:getRawFd(path: string): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:closeRawFd(path: string, callback: _AsyncCallback\): void;
起始版本:9|类名:ResourceManager
方法 or 属性:closeRawFd(path: string, callback: _AsyncCallback\): void;
起始版本:10|@ohos.resourceManager.d.ts| -|起始版本有变化|类名:ResourceManager
方法 or 属性:closeRawFd(path: string): Promise\;
起始版本:9|类名:ResourceManager
方法 or 属性:closeRawFd(path: string): Promise\;
起始版本:10|@ohos.resourceManager.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md index 88f1047834432e5528d8806048e79472980b83a1..76a0266eff8ac72926d54918d39c2caa994bd9ec 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md @@ -157,125 +157,6 @@ |新增|NA|类名:wallpaper
方法or属性:function setVideo(source: string, wallpaperType: WallpaperType): Promise\;|@ohos.wallpaper.d.ts| |新增|NA|类名:wallpaper
方法or属性:function on(

type: 'wallpaperChange',

callback: (wallpaperType: WallpaperType, resourceType: WallpaperResourceType) => void

): void;|@ohos.wallpaper.d.ts| |新增|NA|类名:wallpaper
方法or属性:function off(

type: 'wallpaperChange',

callback?: (wallpaperType: WallpaperType, resourceType: WallpaperResourceType) => void

): void;|@ohos.wallpaper.d.ts| -|起始版本有变化|类名:inputMethod
方法 or 属性:function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback\): void;
起始版本:9|类名:inputMethod
方法 or 属性:function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback\): void;
起始版本:10|@ohos.inputMethod.d.ts| -|起始版本有变化|类名:inputMethod
方法 or 属性:function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise\;
起始版本:9|类名:inputMethod
方法 or 属性:function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise\;
起始版本:10|@ohos.inputMethod.d.ts| -|起始版本有变化|类名:request
起始版本:N/A|类名:request
起始版本:6|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const EXCEPTION_PERMISSION: number;
起始版本:9|类名:request
方法 or 属性:const EXCEPTION_PERMISSION: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const EXCEPTION_PARAMCHECK: number;
起始版本:9|类名:request
方法 or 属性:const EXCEPTION_PARAMCHECK: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const EXCEPTION_UNSUPPORTED: number;
起始版本:9|类名:request
方法 or 属性:const EXCEPTION_UNSUPPORTED: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const EXCEPTION_FILEIO: number;
起始版本:9|类名:request
方法 or 属性:const EXCEPTION_FILEIO: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const EXCEPTION_FILEPATH: number;
起始版本:9|类名:request
方法 or 属性:const EXCEPTION_FILEPATH: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const EXCEPTION_SERVICE: number;
起始版本:9|类名:request
方法 or 属性:const EXCEPTION_SERVICE: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const EXCEPTION_OTHERS: number;
起始版本:9|类名:request
方法 or 属性:const EXCEPTION_OTHERS: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const NETWORK_MOBILE: number;
起始版本:6|类名:request
方法 or 属性:const NETWORK_MOBILE: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const NETWORK_WIFI: number;
起始版本:6|类名:request
方法 or 属性:const NETWORK_WIFI: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_CANNOT_RESUME: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_CANNOT_RESUME: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_DEVICE_NOT_FOUND: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_DEVICE_NOT_FOUND: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_FILE_ALREADY_EXISTS: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_FILE_ALREADY_EXISTS: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_FILE_ERROR: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_FILE_ERROR: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_HTTP_DATA_ERROR: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_HTTP_DATA_ERROR: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_INSUFFICIENT_SPACE: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_INSUFFICIENT_SPACE: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_TOO_MANY_REDIRECTS: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_TOO_MANY_REDIRECTS: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_UNHANDLED_HTTP_CODE: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_UNHANDLED_HTTP_CODE: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_UNKNOWN: number;
起始版本:7|类名:request
方法 or 属性:const ERROR_UNKNOWN: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_OFFLINE: number;
起始版本:9|类名:request
方法 or 属性:const ERROR_OFFLINE: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const ERROR_UNSUPPORTED_NETWORK_TYPE: number;
起始版本:9|类名:request
方法 or 属性:const ERROR_UNSUPPORTED_NETWORK_TYPE: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const PAUSED_QUEUED_FOR_WIFI: number;
起始版本:7|类名:request
方法 or 属性:const PAUSED_QUEUED_FOR_WIFI: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const PAUSED_WAITING_FOR_NETWORK: number;
起始版本:7|类名:request
方法 or 属性:const PAUSED_WAITING_FOR_NETWORK: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const PAUSED_WAITING_TO_RETRY: number;
起始版本:7|类名:request
方法 or 属性:const PAUSED_WAITING_TO_RETRY: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const PAUSED_BY_USER: number;
起始版本:9|类名:request
方法 or 属性:const PAUSED_BY_USER: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const PAUSED_UNKNOWN: number;
起始版本:7|类名:request
方法 or 属性:const PAUSED_UNKNOWN: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const SESSION_SUCCESSFUL: number;
起始版本:7|类名:request
方法 or 属性:const SESSION_SUCCESSFUL: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const SESSION_RUNNING: number;
起始版本:7|类名:request
方法 or 属性:const SESSION_RUNNING: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const SESSION_PENDING: number;
起始版本:7|类名:request
方法 or 属性:const SESSION_PENDING: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const SESSION_PAUSED: number;
起始版本:7|类名:request
方法 or 属性:const SESSION_PAUSED: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:const SESSION_FAILED: number;
起始版本:7|类名:request
方法 or 属性:const SESSION_FAILED: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void;
起始版本:9|类名:request
方法 or 属性:function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:function downloadFile(context: BaseContext, config: DownloadConfig): Promise\;
起始版本:9|类名:request
方法 or 属性:function downloadFile(context: BaseContext, config: DownloadConfig): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void;
起始版本:9|类名:request
方法 or 属性:function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:request
方法 or 属性:function uploadFile(context: BaseContext, config: UploadConfig): Promise\;
起始版本:9|类名:request
方法 or 属性:function uploadFile(context: BaseContext, config: UploadConfig): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
起始版本:6|类名:DownloadConfig
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:url: string;
起始版本:6|类名:DownloadConfig
方法 or 属性:url: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:header?: Object;
起始版本:6|类名:DownloadConfig
方法 or 属性:header?: Object;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:enableMetered?: boolean;
起始版本:6|类名:DownloadConfig
方法 or 属性:enableMetered?: boolean;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:enableRoaming?: boolean;
起始版本:6|类名:DownloadConfig
方法 or 属性:enableRoaming?: boolean;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:description?: string;
起始版本:6|类名:DownloadConfig
方法 or 属性:description?: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:networkType?: number;
起始版本:6|类名:DownloadConfig
方法 or 属性:networkType?: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:filePath?: string;
起始版本:7|类名:DownloadConfig
方法 or 属性:filePath?: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:title?: string;
起始版本:6|类名:DownloadConfig
方法 or 属性:title?: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadConfig
方法 or 属性:background?: boolean;
起始版本:9|类名:DownloadConfig
方法 or 属性:background?: boolean;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
起始版本:7|类名:DownloadInfo
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:description: string;
起始版本:7|类名:DownloadInfo
方法 or 属性:description: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:downloadedBytes: number;
起始版本:7|类名:DownloadInfo
方法 or 属性:downloadedBytes: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:downloadId: number;
起始版本:7|类名:DownloadInfo
方法 or 属性:downloadId: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:failedReason: number;
起始版本:7|类名:DownloadInfo
方法 or 属性:failedReason: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:fileName: string;
起始版本:7|类名:DownloadInfo
方法 or 属性:fileName: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:filePath: string;
起始版本:7|类名:DownloadInfo
方法 or 属性:filePath: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:pausedReason: number;
起始版本:7|类名:DownloadInfo
方法 or 属性:pausedReason: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:status: number;
起始版本:7|类名:DownloadInfo
方法 or 属性:status: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:targetURI: string;
起始版本:7|类名:DownloadInfo
方法 or 属性:targetURI: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:downloadTitle: string;
起始版本:7|类名:DownloadInfo
方法 or 属性:downloadTitle: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadInfo
方法 or 属性:downloadTotalBytes: number;
起始版本:7|类名:DownloadInfo
方法 or 属性:downloadTotalBytes: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
起始版本:6|类名:DownloadTask
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:on(type: 'progress', callback: (receivedSize: number, totalSize: number) => void): void;
起始版本:6|类名:DownloadTask
方法 or 属性:on(type: 'progress', callback: (receivedSize: number, totalSize: number) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void;
起始版本:6|类名:DownloadTask
方法 or 属性:off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
起始版本:7|类名:DownloadTask
方法 or 属性:on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
起始版本:7|类名:DownloadTask
方法 or 属性:on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:off(type: 'complete' \| 'pause' \| 'remove', callback?: () => void): void;
起始版本:7|类名:DownloadTask
方法 or 属性:off(type: 'complete' \| 'pause' \| 'remove', callback?: () => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:on(type: 'fail', callback: (err: number) => void): void;
起始版本:7|类名:DownloadTask
方法 or 属性:on(type: 'fail', callback: (err: number) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:off(type: 'fail', callback?: (err: number) => void): void;
起始版本:7|类名:DownloadTask
方法 or 属性:off(type: 'fail', callback?: (err: number) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:delete(callback: AsyncCallback\): void;
起始版本:9|类名:DownloadTask
方法 or 属性:delete(callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:delete(): Promise\;
起始版本:9|类名:DownloadTask
方法 or 属性:delete(): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:suspend(callback: AsyncCallback\): void;
起始版本:9|类名:DownloadTask
方法 or 属性:suspend(callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:suspend(): Promise\;
起始版本:9|类名:DownloadTask
方法 or 属性:suspend(): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:restore(callback: AsyncCallback\): void;
起始版本:9|类名:DownloadTask
方法 or 属性:restore(callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:restore(): Promise\;
起始版本:9|类名:DownloadTask
方法 or 属性:restore(): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:getTaskInfo(callback: AsyncCallback\): void;
起始版本:9|类名:DownloadTask
方法 or 属性:getTaskInfo(callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:getTaskInfo(): Promise\;
起始版本:9|类名:DownloadTask
方法 or 属性:getTaskInfo(): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:getTaskMimeType(callback: AsyncCallback\): void;
起始版本:9|类名:DownloadTask
方法 or 属性:getTaskMimeType(callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:DownloadTask
方法 or 属性:getTaskMimeType(): Promise\;
起始版本:9|类名:DownloadTask
方法 or 属性:getTaskMimeType(): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:File
起始版本:6|类名:File
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:File
方法 or 属性:filename: string;
起始版本:6|类名:File
方法 or 属性:filename: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:File
方法 or 属性:name: string;
起始版本:6|类名:File
方法 or 属性:name: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:File
方法 or 属性:uri: string;
起始版本:6|类名:File
方法 or 属性:uri: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:File
方法 or 属性:type: string;
起始版本:6|类名:File
方法 or 属性:type: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:RequestData
起始版本:6|类名:RequestData
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:RequestData
方法 or 属性:name: string;
起始版本:6|类名:RequestData
方法 or 属性:name: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:RequestData
方法 or 属性:value: string;
起始版本:6|类名:RequestData
方法 or 属性:value: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadConfig
起始版本:6|类名:UploadConfig
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadConfig
方法 or 属性:url: string;
起始版本:6|类名:UploadConfig
方法 or 属性:url: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadConfig
方法 or 属性:header: Object;
起始版本:6|类名:UploadConfig
方法 or 属性:header: Object;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadConfig
方法 or 属性:method: string;
起始版本:6|类名:UploadConfig
方法 or 属性:method: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadConfig
方法 or 属性:files: Array\;
起始版本:6|类名:UploadConfig
方法 or 属性:files: Array\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadConfig
方法 or 属性:data: Array\;
起始版本:6|类名:UploadConfig
方法 or 属性:data: Array\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:TaskState
起始版本:9|类名:TaskState
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:TaskState
方法 or 属性:path: string;
起始版本:9|类名:TaskState
方法 or 属性:path: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:TaskState
方法 or 属性:responseCode: number;
起始版本:9|类名:TaskState
方法 or 属性:responseCode: number;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:TaskState
方法 or 属性:message: string;
起始版本:9|类名:TaskState
方法 or 属性:message: string;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadTask
起始版本:6|类名:UploadTask
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadTask
方法 or 属性:on(type: 'progress', callback: (uploadedSize: number, totalSize: number) => void): void;
起始版本:6|类名:UploadTask
方法 or 属性:on(type: 'progress', callback: (uploadedSize: number, totalSize: number) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadTask
方法 or 属性:off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void;
起始版本:6|类名:UploadTask
方法 or 属性:off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadTask
方法 or 属性:on(type: 'headerReceive', callback: (header: object) => void): void;
起始版本:7|类名:UploadTask
方法 or 属性:on(type: 'headerReceive', callback: (header: object) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadTask
方法 or 属性:off(type: 'headerReceive', callback?: (header: object) => void): void;
起始版本:7|类名:UploadTask
方法 or 属性:off(type: 'headerReceive', callback?: (header: object) => void): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadTask
方法 or 属性:delete(callback: AsyncCallback\): void;
起始版本:9|类名:UploadTask
方法 or 属性:delete(callback: AsyncCallback\): void;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadTask
方法 or 属性:delete(): Promise\;
起始版本:9|类名:UploadTask
方法 or 属性:delete(): Promise\;
起始版本:10|@ohos.request.d.ts| -|起始版本有变化|类名:UploadResponse
起始版本:N/A|类名:UploadResponse
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:DownloadResponse
起始版本:N/A|类名:DownloadResponse
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:OnDownloadCompleteResponse
起始版本:N/A|类名:OnDownloadCompleteResponse
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:RequestFile
起始版本:N/A|类名:RequestFile
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:RequestData
起始版本:N/A|类名:RequestData
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:UploadRequestOptions
起始版本:N/A|类名:UploadRequestOptions
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:DownloadRequestOptions
起始版本:N/A|类名:DownloadRequestOptions
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:OnDownloadCompleteOptions
起始版本:N/A|类名:OnDownloadCompleteOptions
起始版本:3|@system.request.d.ts| -|起始版本有变化|类名:Request
起始版本:N/A|类名:Request
起始版本:3|@system.request.d.ts| -|新增(权限)|类名:request
方法 or 属性:const EXCEPTION_PERMISSION: number;
权限:N/A|类名:request
方法 or 属性:const EXCEPTION_PERMISSION: number;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| -|新增(权限)|类名:request
方法 or 属性:const EXCEPTION_PARAMCHECK: number;
权限:N/A|类名:request
方法 or 属性:const EXCEPTION_PARAMCHECK: number;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| -|新增(权限)|类名:request
方法 or 属性:const EXCEPTION_UNSUPPORTED: number;
权限:N/A|类名:request
方法 or 属性:const EXCEPTION_UNSUPPORTED: number;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| -|新增(权限)|类名:request
方法 or 属性:const EXCEPTION_FILEIO: number;
权限:N/A|类名:request
方法 or 属性:const EXCEPTION_FILEIO: number;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| -|新增(权限)|类名:request
方法 or 属性:const EXCEPTION_FILEPATH: number;
权限:N/A|类名:request
方法 or 属性:const EXCEPTION_FILEPATH: number;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| -|新增(权限)|类名:request
方法 or 属性:const EXCEPTION_SERVICE: number;
权限:N/A|类名:request
方法 or 属性:const EXCEPTION_SERVICE: number;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| -|新增(权限)|类名:request
方法 or 属性:const EXCEPTION_OTHERS: number;
权限:N/A|类名:request
方法 or 属性:const EXCEPTION_OTHERS: number;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| -|新增(权限)|类名:DownloadConfig
方法 or 属性:background?: boolean;
权限:N/A|类名:DownloadConfig
方法 or 属性:background?: boolean;
权限:ohos.permission.INTERNET|@ohos.request.d.ts| |新增(权限)|类名:screenLock
方法 or 属性:function lock(callback: AsyncCallback\): void;
权限:N/A|类名:screenLock
方法 or 属性:function lock(callback: AsyncCallback\): void;
权限:ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| |新增(权限)|类名:screenLock
方法 or 属性:function onSystemEvent(callback: Callback\): boolean;
权限:N/A|类名:screenLock
方法 or 属性:function onSystemEvent(callback: Callback\): boolean;
权限:ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| |新增(权限)|类名:screenLock
方法 or 属性:function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback\): void;
权限:N/A|类名:screenLock
方法 or 属性:function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback\): void;
权限:ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md index 4d0c95424e72685988797e266ff1e16aeb6e2c52..00631adcc109c6cc91e4800a436d381e53e74984 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md @@ -21,10 +21,3 @@ |新增|NA|模块名: ohos.multimodalInput.shortKey
类名: shortKey
方法 or 属性: function setKeyDownDuration(businessKey: string, delay: number, callback: AsyncCallback\): void;|@ohos.multimodalInput.shortKey.d.ts| |新增|NA|模块名: ohos.multimodalInput.shortKey
类名: shortKey
方法 or 属性: function setKeyDownDuration(businessKey: string, delay: number): Promise\;|@ohos.multimodalInput.shortKey.d.ts| |删除|模块名:ohos.multimodalInput.inputDevice
类名:AxisType
方法 or 属性:type AxisType = 'touchMajor' \| 'touchMinor' \| 'orientation' \| 'x' \| 'y' \| 'pressure' \| 'toolMinor' \| 'toolMajor' \| 'NULL';|NA|@ohos.multimodalInput.inputDevice.d.ts| -|起始版本有变化|类名:KeyOptions
起始版本:N/A|类名:KeyOptions
起始版本:8|@ohos.multimodalInput.inputConsumer.d.ts| -|起始版本有变化|类名:KeyOptions
方法 or 属性:preKeys: Array\;
起始版本:N/A|类名:KeyOptions
方法 or 属性:preKeys: Array\;
起始版本:8|@ohos.multimodalInput.inputConsumer.d.ts| -|起始版本有变化|类名:KeyOptions
方法 or 属性:finalKey: number;
起始版本:N/A|类名:KeyOptions
方法 or 属性:finalKey: number;
起始版本:8|@ohos.multimodalInput.inputConsumer.d.ts| -|起始版本有变化|类名:KeyOptions
方法 or 属性:isFinalKeyDown: boolean;
起始版本:N/A|类名:KeyOptions
方法 or 属性:isFinalKeyDown: boolean;
起始版本:8|@ohos.multimodalInput.inputConsumer.d.ts| -|起始版本有变化|类名:KeyOptions
方法 or 属性:finalKeyDownDuration: number;
起始版本:N/A|类名:KeyOptions
方法 or 属性:finalKeyDownDuration: number;
起始版本:8|@ohos.multimodalInput.inputConsumer.d.ts| -|新增(权限)|类名:TouchEventReceiver
权限:N/A|类名:TouchEventReceiver
权限:ohos.permission.INPUT_MONITORING|@ohos.multimodalInput.inputMonitor.d.ts| -|SysCap有变化|类名:inputDeviceCooperate
SysCap:N/A|类名:inputDeviceCooperate
SysCap:SystemCapability.MultimodalInput.Input.Cooperator|@ohos.multimodalInput.inputDeviceCooperate.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md index 0096a41515b6c864fed2078a82b58d98e7e355a9..6b11f7190e1740164f8631d360407dab4236ea93 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md @@ -129,9 +129,10 @@ |新增|NA|模块名: ringtonePlayer
类名: RingtonePlayer
方法 or 属性: release(callback: AsyncCallback\): void;|ringtonePlayer.d.ts| |新增|NA|模块名: ringtonePlayer
类名: RingtonePlayer
方法 or 属性: release(): Promise\;|ringtonePlayer.d.ts| |新增|NA|模块名: ringtonePlayer
类名: RingtonePlayer
方法 or 属性: on(type: 'audioInterrupt', callback: Callback\): void;|ringtonePlayer.d.ts| -|访问级别有变化|类名:VolumeEvent
访问级别:公开API|类名:VolumeEvent
访问级别:系统API|@ohos.multimedia.audio.d.ts| -|访问级别有变化|类名:VolumeEvent
方法 or 属性:volumeGroupId: number;
访问级别:系统API|类名:VolumeEvent
方法 or 属性:volumeGroupId: number;
访问级别:公开API|@ohos.multimedia.audio.d.ts| -|访问级别有变化|类名:VolumeEvent
方法 or 属性:networkId: string;
访问级别:系统API|类名:VolumeEvent
方法 or 属性:networkId: string;
访问级别:公开API|@ohos.multimedia.audio.d.ts| +|访问级别有变化|类名:VolumeEvent
访问级别:公开API|类名:VolumeEvent
访问级别:系统API|@ohos.multimedia.audio.d.ts| +|访问级别有变化|类名:VolumeEvent
方法 or 属性:volumeType: AudioVolumeType;;
访问级别:公开API|类名:VolumeEvent
方法 or 属性:volumeType: AudioVolumeType;;
访问级别:系统API|@ohos.multimedia.audio.d.ts| +|访问级别有变化|类名:VolumeEvent
方法 or 属性:volume: number;
访问级别:公开API|类名:VolumeEvent
方法 or 属性:volume: number;
访问级别:系统API|@ohos.multimedia.audio.d.ts| +|访问级别有变化|类名:VolumeEvent
方法 or 属性:updateUi: boolean;
访问级别:公开API|类名:VolumeEvent
方法 or 属性:updateUi: boolean;;
访问级别:系统API|@ohos.multimedia.audio.d.ts| |访问级别有变化|类名:AVSessionType
方法 or 属性:type AVSessionType = 'audio' \| 'video';
访问级别:系统API|类名:AVSessionType
方法 or 属性:type AVSessionType = 'audio' \| 'video';
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
访问级别:系统API|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
访问级别:系统API|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| @@ -167,11 +168,48 @@ |访问级别有变化|类名:AVSession
方法 or 属性:destroy(callback: AsyncCallback\): void;
访问级别:系统API|类名:AVSession
方法 or 属性:destroy(callback: AsyncCallback\): void;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVSession
方法 or 属性:destroy(): Promise\;
访问级别:系统API|类名:AVSession
方法 or 属性:destroy(): Promise\;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVMetadata
访问级别:系统API|类名:AVMetadata
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:assetId: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:assetId: string;;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:title?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:title?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:artist?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:artist?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:author?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:author?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:album?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:album?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:writer?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:writer?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:composer?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:composer?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:duration?: number;
访问级别:系统API|类名:AVMetadata
方法 or 属性:duration?: number;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:mediaImage?: image.PixelMap \|string;;
访问级别:系统API|类名:AVMetadata
方法 or 属性:mediaImage?: image.PixelMap \|string;;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:publishDate?: Date;
访问级别:系统API|类名:AVMetadata
方法 or 属性:publishDate?: Date;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:subtitle?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:subtitle?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:description?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:description?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:lyric?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:lyric?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:previousAssetId?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:previousAssetId?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVMetadata
方法 or 属性:nextAssetId?: string;
访问级别:系统API|类名:AVMetadata
方法 or 属性:nextAssetId?: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVPlaybackState
访问级别:系统API|类名:AVPlaybackState
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVPlaybackState
方法 or 属性:state?: PlaybackState;
访问级别:系统API|类名:AVPlaybackState
方法 or 属性:state?: PlaybackState;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVPlaybackState
方法 or 属性:speed?: number;
访问级别:系统API|类名:AVPlaybackState
方法 or 属性:speed?: number;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVPlaybackState
方法 or 属性:position?: PlaybackPosition;
访问级别:系统API|类名:AVPlaybackState
方法 or 属性:position?: PlaybackPosition;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVPlaybackState
方法 or 属性:bufferedTime?: number;
访问级别:系统API|类名:AVPlaybackState
方法 or 属性:bufferedTime?: number;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVPlaybackState
方法 or 属性:loopMode?: LoopMode;
访问级别:系统API|类名:AVPlaybackState
方法 or 属性:loopMode?: LoopMode;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVPlaybackState
方法 or 属性:isFavorite?: boolean;
访问级别:系统API|类名:AVPlaybackState
方法 or 属性:isFavorite?: boolean;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:PlaybackPosition
访问级别:系统API|类名:PlaybackPosition
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackPosition
方法 or 属性:elapsedTime: number;
访问级别:系统API|类名:PlaybackPosition
方法 or 属性:elapsedTime: number;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackPosition
方法 or 属性:updateTime: number;
访问级别:系统API|类名:PlaybackPosition
方法 or 属性:updateTime: number;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:OutputDeviceInfo
访问级别:系统API|类名:OutputDeviceInfo
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:OutputDeviceInfo
方法 or 属性: isRemote: boolean;
访问级别:系统API|类名:OutputDeviceInfo
方法 or 属性: isRemote: boolean;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:OutputDeviceInfo
方法 or 属性:audioDeviceId: Array\;
访问级别:系统API|类名:OutputDeviceInfo
方法 or 属性:audioDeviceId: Array\;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:OutputDeviceInfo
方法 or 属性:deviceName: Array\;
访问级别:系统API|类名:OutputDeviceInfo
方法 or 属性:deviceName: Array\;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:LoopMode
访问级别:系统API|类名:LoopMode
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_SEQUENCE = 0,
访问级别:系统API|类名:LoopMode
方法 or 属性:LOOP_MODE_SEQUENCE = 0,;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_SINGLE = 1,
访问级别:系统API|类名:LoopMode
方法 or 属性:LOOP_MODE_SINGLE = 1,
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_LIST = 2,
访问级别:系统API|类名:LoopMode
方法 or 属性:LOOP_MODE_LIST = 2,;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_SHUFFLE = 3,
访问级别:系统API|类名:LoopMode
方法 or 属性:LOOP_MODE_SHUFFLE = 3,
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:PlaybackState
访问级别:系统API|类名:PlaybackState
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_INITIAL = 0
访问级别:系统API|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_INITIAL = 0
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PREPARE = 1
访问级别:系统API|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PREPARE = 1
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PLAY = 2
访问级别:系统API|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PLAY = 2
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PAUSE = 3
访问级别:系统API|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PAUSE = 3
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_FAST_FORWARD = 4
访问级别:系统API|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_FAST_FORWARD = 4
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_REWIND = 5
访问级别:系统API|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_REWIND = 5
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_STOP = 6
访问级别:系统API|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_STOP = 6
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVSessionController
访问级别:系统API|类名:AVSessionController
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVSessionController
方法 or 属性:readonly sessionId: string;
访问级别:系统API|类名:AVSessionController
方法 or 属性:readonly sessionId: string;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVSessionController
方法 or 属性:getAVPlaybackState(callback: AsyncCallback\): void;
访问级别:系统API|类名:AVSessionController
方法 or 属性:getAVPlaybackState(callback: AsyncCallback\): void;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| @@ -206,131 +244,15 @@ |访问级别有变化|类名:AVSessionController
方法 or 属性:on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
访问级别:系统API|类名:AVSessionController
方法 or 属性:on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVSessionController
方法 or 属性:off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
访问级别:系统API|类名:AVSessionController
方法 or 属性:off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVControlCommand
访问级别:系统API|类名:AVControlCommand
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVControlCommand
方法 or 属性:command: AVControlCommandType;
访问级别:系统API|类名:AVControlCommand
方法 or 属性:command: AVControlCommandType;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVControlCommand
方法 or 属性:parameter?: LoopMode \|string\|number;
访问级别:系统API|类名:AVControlCommand
方法 or 属性:parameter?: LoopMode \|string\|number;
访问级别:公开API|@ohos.multimedia.avsession.d.ts| |访问级别有变化|类名:AVSessionErrorCode
访问级别:系统API|类名:AVSessionErrorCode
访问级别:公开API|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AudioManager
方法 or 属性:on(type: 'volumeChange', callback: Callback\): void;
起始版本:9|类名:AudioManager
方法 or 属性:on(type: 'volumeChange', callback: Callback\): void;
起始版本:8|@ohos.multimedia.audio.d.ts| -|起始版本有变化|类名:VolumeEvent
起始版本:9|类名:VolumeEvent
起始版本:8|@ohos.multimedia.audio.d.ts| -|起始版本有变化|类名:VolumeEvent
方法 or 属性:volumeType: AudioVolumeType;
起始版本:9|类名:VolumeEvent
方法 or 属性:volumeType: AudioVolumeType;
起始版本:8|@ohos.multimedia.audio.d.ts| -|起始版本有变化|类名:VolumeEvent
方法 or 属性:volume: number;
起始版本:9|类名:VolumeEvent
方法 or 属性:volume: number;
起始版本:8|@ohos.multimedia.audio.d.ts| -|起始版本有变化|类名:VolumeEvent
方法 or 属性:updateUi: boolean;
起始版本:9|类名:VolumeEvent
方法 or 属性:updateUi: boolean;
起始版本:8|@ohos.multimedia.audio.d.ts| -|起始版本有变化|类名:AVSessionType
方法 or 属性:type AVSessionType = 'audio' \| 'video';
起始版本:9|类名:AVSessionType
方法 or 属性:type AVSessionType = 'audio' \| 'video';
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
起始版本:9|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
起始版本:9|类名:avSession
方法 or 属性:function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
起始版本:9|类名:AVSession
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:readonly sessionId: string;
起始版本:9|类名:AVSession
方法 or 属性:readonly sessionId: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:setAVMetadata(data: AVMetadata): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:setAVMetadata(data: AVMetadata): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:setAVPlaybackState(state: AVPlaybackState): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:setAVPlaybackState(state: AVPlaybackState): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:setLaunchAbility(ability: WantAgent): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:setLaunchAbility(ability: WantAgent): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:getController(callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:getController(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:getController(): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:getController(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:getOutputDevice(callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:getOutputDevice(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:getOutputDevice(): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:getOutputDevice(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
起始版本:9|类名:AVSession
方法 or 属性:on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
起始版本:9|类名:AVSession
方法 or 属性:off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:on(type: 'seek', callback: (time: number) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:on(type: 'seek', callback: (time: number) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:off(type: 'seek', callback?: (time: number) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:off(type: 'seek', callback?: (time: number) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:on(type: 'setSpeed', callback: (speed: number) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:on(type: 'setSpeed', callback: (speed: number) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:off(type: 'setSpeed', callback?: (speed: number) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:off(type: 'setSpeed', callback?: (speed: number) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
起始版本:9|类名:AVSession
方法 or 属性:off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:activate(callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:activate(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:activate(): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:activate(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:deactivate(callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:deactivate(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:deactivate(): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:deactivate(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:destroy(callback: AsyncCallback\): void;
起始版本:9|类名:AVSession
方法 or 属性:destroy(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSession
方法 or 属性:destroy(): Promise\;
起始版本:9|类名:AVSession
方法 or 属性:destroy(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
起始版本:9|类名:AVMetadata
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:assetId: string;
起始版本:9|类名:AVMetadata
方法 or 属性:assetId: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:title?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:title?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:artist?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:artist?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:author?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:author?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:album?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:album?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:writer?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:writer?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:composer?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:composer?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:duration?: number;
起始版本:9|类名:AVMetadata
方法 or 属性:duration?: number;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:mediaImage?: image.PixelMap \| string;
起始版本:9|类名:AVMetadata
方法 or 属性:mediaImage?: image.PixelMap \| string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:publishDate?: Date;
起始版本:9|类名:AVMetadata
方法 or 属性:publishDate?: Date;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:subtitle?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:subtitle?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:description?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:description?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:lyric?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:lyric?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:previousAssetId?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:previousAssetId?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVMetadata
方法 or 属性:nextAssetId?: string;
起始版本:9|类名:AVMetadata
方法 or 属性:nextAssetId?: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVPlaybackState
起始版本:9|类名:AVPlaybackState
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVPlaybackState
方法 or 属性:state?: PlaybackState;
起始版本:9|类名:AVPlaybackState
方法 or 属性:state?: PlaybackState;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVPlaybackState
方法 or 属性:speed?: number;
起始版本:9|类名:AVPlaybackState
方法 or 属性:speed?: number;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVPlaybackState
方法 or 属性:position?: PlaybackPosition;
起始版本:9|类名:AVPlaybackState
方法 or 属性:position?: PlaybackPosition;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVPlaybackState
方法 or 属性:bufferedTime?: number;
起始版本:9|类名:AVPlaybackState
方法 or 属性:bufferedTime?: number;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVPlaybackState
方法 or 属性:loopMode?: LoopMode;
起始版本:9|类名:AVPlaybackState
方法 or 属性:loopMode?: LoopMode;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVPlaybackState
方法 or 属性:isFavorite?: boolean;
起始版本:9|类名:AVPlaybackState
方法 or 属性:isFavorite?: boolean;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackPosition
起始版本:9|类名:PlaybackPosition
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackPosition
方法 or 属性:elapsedTime: number;
起始版本:9|类名:PlaybackPosition
方法 or 属性:elapsedTime: number;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackPosition
方法 or 属性:updateTime: number;
起始版本:9|类名:PlaybackPosition
方法 or 属性:updateTime: number;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:OutputDeviceInfo
起始版本:9|类名:OutputDeviceInfo
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:OutputDeviceInfo
方法 or 属性:isRemote: boolean;
起始版本:9|类名:OutputDeviceInfo
方法 or 属性:isRemote: boolean;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:OutputDeviceInfo
方法 or 属性:audioDeviceId: Array\;
起始版本:9|类名:OutputDeviceInfo
方法 or 属性:audioDeviceId: Array\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:OutputDeviceInfo
方法 or 属性:deviceName: Array\;
起始版本:9|类名:OutputDeviceInfo
方法 or 属性:deviceName: Array\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:LoopMode
起始版本:9|类名:LoopMode
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_SEQUENCE = 0
起始版本:9|类名:LoopMode
方法 or 属性:LOOP_MODE_SEQUENCE = 0
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_SINGLE = 1
起始版本:9|类名:LoopMode
方法 or 属性:LOOP_MODE_SINGLE = 1
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_LIST = 2
起始版本:9|类名:LoopMode
方法 or 属性:LOOP_MODE_LIST = 2
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:LoopMode
方法 or 属性:LOOP_MODE_SHUFFLE = 3
起始版本:9|类名:LoopMode
方法 or 属性:LOOP_MODE_SHUFFLE = 3
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
起始版本:9|类名:PlaybackState
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_INITIAL = 0
起始版本:9|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_INITIAL = 0
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PREPARE = 1
起始版本:9|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PREPARE = 1
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PLAY = 2
起始版本:9|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PLAY = 2
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PAUSE = 3
起始版本:9|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_PAUSE = 3
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_FAST_FORWARD = 4
起始版本:9|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_FAST_FORWARD = 4
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_REWIND = 5
起始版本:9|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_REWIND = 5
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_STOP = 6
起始版本:9|类名:PlaybackState
方法 or 属性:PLAYBACK_STATE_STOP = 6
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
起始版本:9|类名:AVSessionController
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:readonly sessionId: string;
起始版本:9|类名:AVSessionController
方法 or 属性:readonly sessionId: string;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getAVPlaybackState(callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:getAVPlaybackState(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getAVPlaybackState(): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:getAVPlaybackState(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getAVMetadata(callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:getAVMetadata(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getAVMetadata(): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:getAVMetadata(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getOutputDevice(callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:getOutputDevice(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getOutputDevice(): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:getOutputDevice(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:sendAVKeyEvent(event: KeyEvent): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:sendAVKeyEvent(event: KeyEvent): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getLaunchAbility(callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:getLaunchAbility(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getLaunchAbility(): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:getLaunchAbility(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getRealPlaybackPositionSync(): number;
起始版本:9|类名:AVSessionController
方法 or 属性:getRealPlaybackPositionSync(): number;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:isActive(callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:isActive(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:isActive(): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:isActive(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:destroy(callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:destroy(callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:destroy(): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:destroy(): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getValidCommands(callback: AsyncCallback\>): void;
起始版本:9|类名:AVSessionController
方法 or 属性:getValidCommands(callback: AsyncCallback\>): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:getValidCommands(): Promise\>;
起始版本:9|类名:AVSessionController
方法 or 属性:getValidCommands(): Promise\>;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
起始版本:9|类名:AVSessionController
方法 or 属性:sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:sendControlCommand(command: AVControlCommand): Promise\;
起始版本:9|类名:AVSessionController
方法 or 属性:sendControlCommand(command: AVControlCommand): Promise\;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:on(type: 'sessionDestroy', callback: () => void);
起始版本:9|类名:AVSessionController
方法 or 属性:on(type: 'sessionDestroy', callback: () => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:off(type: 'sessionDestroy', callback?: () => void);
起始版本:9|类名:AVSessionController
方法 or 属性:off(type: 'sessionDestroy', callback?: () => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:on(type: 'activeStateChange', callback: (isActive: boolean) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:on(type: 'activeStateChange', callback: (isActive: boolean) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:on(type: 'validCommandChange', callback: (commands: Array\) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:on(type: 'validCommandChange', callback: (commands: Array\) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:off(type: 'validCommandChange', callback?: (commands: Array\) => void);
起始版本:9|类名:AVSessionController
方法 or 属性:off(type: 'validCommandChange', callback?: (commands: Array\) => void);
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
起始版本:9|类名:AVSessionController
方法 or 属性:on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionController
方法 or 属性:off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
起始版本:9|类名:AVSessionController
方法 or 属性:off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVControlCommand
起始版本:9|类名:AVControlCommand
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVControlCommand
方法 or 属性:command: AVControlCommandType;
起始版本:9|类名:AVControlCommand
方法 or 属性:command: AVControlCommandType;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVControlCommand
方法 or 属性:parameter?: LoopMode \| string \| number;
起始版本:9|类名:AVControlCommand
方法 or 属性:parameter?: LoopMode \| string \| number;
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
起始版本:9|类名:AVSessionErrorCode
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SERVICE_EXCEPTION = 6600101
起始版本:9|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SERVICE_EXCEPTION = 6600101
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_NOT_EXIST = 6600102
起始版本:9|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_NOT_EXIST = 6600102
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
起始版本:9|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
起始版本:9|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_COMMAND_INVALID = 6600105
起始版本:9|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_COMMAND_INVALID = 6600105
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_INACTIVE = 6600106
起始版本:9|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_INACTIVE = 6600106
起始版本:10|@ohos.multimedia.avsession.d.ts| -|起始版本有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_MESSAGE_OVERLOAD = 6600107
起始版本:9|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_MESSAGE_OVERLOAD = 6600107
起始版本:10|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SERVICE_EXCEPTION = 6600101
访问级别:系统API|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SERVICE_EXCEPTION = 6600101,
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +|访问级别有变化|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_NOT_EXIST = 6600102
访问级别:系统API|类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_NOT_EXIST = 6600102
访问级别:公开API|@ohos.multimedia.avsession.d.ts| +| 访问级别有变化 | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_NOT_EXIST = 6600102
访问级别:系统API | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_NOT_EXIST = 6600102
访问级别:公开API | @ohos.multimedia.avsession.d.ts | +| 访问级别有变化 | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
访问级别:系统API | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_NOT_EXIST = 6600103
访问级别:公开API | @ohos.multimedia.avsession.d.ts | +| 访问级别有变化 | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
访问级别:系统API | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
访问级别:公开API | @ohos.multimedia.avsession.d.ts | +| 访问级别有变化 | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_COMMAND_INVALID = 6600105
访问级别:系统API | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_COMMAND_INVALID = 6600105
访问级别:公开API | @ohos.multimedia.avsession.d.ts | +| 访问级别有变化 | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_INACTIVE = 6600106
访问级别:系统API | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_SESSION_INACTIVE = 6600106
访问级别:公开API | @ohos.multimedia.avsession.d.ts | +| 访问级别有变化 | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_MESSAGE_OVERLOAD = 6600107
访问级别:系统API | 类名:AVSessionErrorCode
方法 or 属性:ERR_CODE_MESSAGE_OVERLOAD = 6600107
访问级别:公开API | @ohos.multimedia.avsession.d.ts | + diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md index 06f6fbcc6efcb31b2127a17d6e37883b20c0caf2..a6d4a8da0022cea61a75c08c4c6096f6f2b9cc87 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md @@ -11,18 +11,4 @@ |新增|NA|模块名: ohos.security.huks
类名: HuksTag
方法 or 属性:HUKS_TAG_KEY_AUTH_PURPOSE = HuksTagType.HUKS_TAG_TYPE_UINT \| 311|@ohos.security.huks.d.ts| |废弃版本有变化|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_TEMP = 0
废弃版本:N/A|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_TEMP = 0
废弃版本:10
代替接口:N/A|@ohos.security.huks.d.ts| |废弃版本有变化|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_PERSISTENT = 1
废弃版本:N/A|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_PERSISTENT = 1
废弃版本:10
代替接口:N/A|@ohos.security.huks.d.ts| -|起始版本有变化|类名:abilityAccessCtrl
起始版本:N/A|类名:abilityAccessCtrl
起始版本:8|@ohos.abilityAccessCtrl.d.ts| -|起始版本有变化|类名:abilityAccessCtrl
方法 or 属性:function createAtManager(): AtManager;
起始版本:8|类名:abilityAccessCtrl
方法 or 属性:function createAtManager(): AtManager;
起始版本:10|@ohos.abilityAccessCtrl.d.ts| -|起始版本有变化|类名:AtManager
起始版本:N/A|类名:AtManager
起始版本:8|@ohos.abilityAccessCtrl.d.ts| -|起始版本有变化|类名:AtManager
方法 or 属性:checkAccessToken(tokenID: number, permissionName: Permissions): Promise\;
起始版本:9|类名:AtManager
方法 or 属性:checkAccessToken(tokenID: number, permissionName: Permissions): Promise\;
起始版本:10|@ohos.abilityAccessCtrl.d.ts| -|起始版本有变化|类名:GrantStatus
起始版本:8|类名:GrantStatus
起始版本:10|@ohos.abilityAccessCtrl.d.ts| -|起始版本有变化|类名:GrantStatus
方法 or 属性:PERMISSION_DENIED = -1
起始版本:N/A|类名:GrantStatus
方法 or 属性:PERMISSION_DENIED = -1
起始版本:10|@ohos.abilityAccessCtrl.d.ts| -|起始版本有变化|类名:GrantStatus
方法 or 属性:PERMISSION_GRANTED = 0
起始版本:N/A|类名:GrantStatus
方法 or 属性:PERMISSION_GRANTED = 0
起始版本:10|@ohos.abilityAccessCtrl.d.ts| -|起始版本有变化|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_TEMP = 0
起始版本:N/A|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_TEMP = 0
起始版本:8|@ohos.security.huks.d.ts| -|起始版本有变化|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_PERSISTENT = 1
起始版本:N/A|类名:HuksKeyStorageType
方法 or 属性:HUKS_STORAGE_PERSISTENT = 1
起始版本:8|@ohos.security.huks.d.ts| -|起始版本有变化|类名:Cipher
方法 or 属性:static rsa(options: CipherRsaOptions): void;
起始版本:N/A|类名:Cipher
方法 or 属性:static rsa(options: CipherRsaOptions): void;
起始版本:3|@system.cipher.d.ts| -|起始版本有变化|类名:Cipher
方法 or 属性:static aes(options: CipherAesOptions): void;
起始版本:N/A|类名:Cipher
方法 or 属性:static aes(options: CipherAesOptions): void;
起始版本:3|@system.cipher.d.ts| -|起始版本有变化|类名:PermissionRequestResult
起始版本:9|类名:PermissionRequestResult
起始版本:10|PermissionRequestResult.d.ts| -|起始版本有变化|类名:PermissionRequestResult
方法 or 属性:permissions: Array\;
起始版本:9|类名:PermissionRequestResult
方法 or 属性:permissions: Array\;
起始版本:10|PermissionRequestResult.d.ts| -|起始版本有变化|类名:PermissionRequestResult
方法 or 属性:authResults: Array\;
起始版本:9|类名:PermissionRequestResult
方法 or 属性:authResults: Array\;
起始版本:10|PermissionRequestResult.d.ts| |新增(错误码)|NA|类名:AtManager
方法 or 属性:getVersion(): Promise\;
错误码内容: 202|@ohos.abilityAccessCtrl.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md index 05abb93978d06538358dbef9709e9c25085ce8ab..e4e59858f607850259ab0e0592a32024dbc6b925 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md @@ -8,21 +8,3 @@ |新增|NA|类名:vibrator
方法or属性:function isSupportEffect(effectId: string, callback: AsyncCallback\): void;|@ohos.vibrator.d.ts| |新增|NA|模块名: ohos.vibrator
类名: vibrator
方法 or 属性:function isSupportEffect(effectId: string): Promise\;|@ohos.vibrator.d.ts| |新增|NA|类名:vibrator
方法or属性:function isSupportEffect(effectId: string): Promise\;|@ohos.vibrator.d.ts| -|新增(权限)|类名:AccelerometerResponse
方法 or 属性:x: number;
权限:N/A|类名:AccelerometerResponse
方法 or 属性:x: number;
权限:ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|新增(权限)|类名:AccelerometerResponse
方法 or 属性:y: number;
权限:N/A|类名:AccelerometerResponse
方法 or 属性:y: number;
权限:ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|新增(权限)|类名:AccelerometerResponse
方法 or 属性:z: number;
权限:N/A|类名:AccelerometerResponse
方法 or 属性:z: number;
权限:ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|新增(权限)|类名:subscribeAccelerometerOptions
方法 or 属性:interval: string;
权限:N/A|类名:subscribeAccelerometerOptions
方法 or 属性:interval: string;
权限:ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|新增(权限)|类名:subscribeAccelerometerOptions
方法 or 属性:success: (data: AccelerometerResponse) => void;
权限:N/A|类名:subscribeAccelerometerOptions
方法 or 属性:success: (data: AccelerometerResponse) => void;
权限:ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|新增(权限)|类名:subscribeAccelerometerOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:N/A|类名:subscribeAccelerometerOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|新增(权限)|类名:StepCounterResponse
方法 or 属性:steps: number;
权限:N/A|类名:StepCounterResponse
方法 or 属性:steps: number;
权限:ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| -|新增(权限)|类名:SubscribeStepCounterOptions
方法 or 属性:success: (data: StepCounterResponse) => void;
权限:N/A|类名:SubscribeStepCounterOptions
方法 or 属性:success: (data: StepCounterResponse) => void;
权限:ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| -|新增(权限)|类名:SubscribeStepCounterOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:N/A|类名:SubscribeStepCounterOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| -|新增(权限)|类名:HeartRateResponse
方法 or 属性:heartRate: number;
权限:N/A|类名:HeartRateResponse
方法 or 属性:heartRate: number;
权限:ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| -|新增(权限)|类名:SubscribeHeartRateOptions
方法 or 属性:success: (data: HeartRateResponse) => void;
权限:N/A|类名:SubscribeHeartRateOptions
方法 or 属性:success: (data: HeartRateResponse) => void;
权限:ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| -|新增(权限)|类名:SubscribeHeartRateOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:N/A|类名:SubscribeHeartRateOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| -|新增(权限)|类名:GyroscopeResponse
方法 or 属性:x: number;
权限:N/A|类名:GyroscopeResponse
方法 or 属性:x: number;
权限:ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|新增(权限)|类名:GyroscopeResponse
方法 or 属性:y: number;
权限:N/A|类名:GyroscopeResponse
方法 or 属性:y: number;
权限:ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|新增(权限)|类名:GyroscopeResponse
方法 or 属性:z: number;
权限:N/A|类名:GyroscopeResponse
方法 or 属性:z: number;
权限:ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|新增(权限)|类名:SubscribeGyroscopeOptions
方法 or 属性:interval: string;
权限:N/A|类名:SubscribeGyroscopeOptions
方法 or 属性:interval: string;
权限:ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|新增(权限)|类名:SubscribeGyroscopeOptions
方法 or 属性:success: (data: GyroscopeResponse) => void;
权限:N/A|类名:SubscribeGyroscopeOptions
方法 or 属性:success: (data: GyroscopeResponse) => void;
权限:ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|新增(权限)|类名:SubscribeGyroscopeOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:N/A|类名:SubscribeGyroscopeOptions
方法 or 属性:fail?: (data: string, code: number) => void;
权限:ohos.permission.GYROSCOPE|@system.sensor.d.ts| diff --git a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md index 0dec2dc1fce3f15f42ca0892475f91104a01fda6..ca28030d5de598fbadf1851dd15e29d8fe65de5a 100644 --- a/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md +++ b/zh-cn/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md @@ -3,141 +3,3 @@ |新增|NA|类名:BusinessVendor
方法or属性:PUBLIC = 'public'|@ohos.update.d.ts| |新增|NA|类名:UpgradeAction
方法or属性:UPGRADE = 'upgrade'|@ohos.update.d.ts| |新增|NA|类名:UpgradeAction
方法or属性:RECOVERY = 'recovery'|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeInfo
访问级别:公开API|类名:UpgradeInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeInfo
方法 or 属性:upgradeApp: string;
访问级别:公开API|类名:UpgradeInfo
方法 or 属性:upgradeApp: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeInfo
方法 or 属性:businessType: BusinessType;
访问级别:公开API|类名:UpgradeInfo
方法 or 属性:businessType: BusinessType;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:BusinessType
访问级别:公开API|类名:BusinessType
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:BusinessType
方法 or 属性:vendor: BusinessVendor;
访问级别:公开API|类名:BusinessType
方法 or 属性:vendor: BusinessVendor;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:BusinessType
方法 or 属性:subType: BusinessSubType;
访问级别:公开API|类名:BusinessType
方法 or 属性:subType: BusinessSubType;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:CheckResult
访问级别:公开API|类名:CheckResult
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:CheckResult
方法 or 属性:isExistNewVersion: boolean;
访问级别:公开API|类名:CheckResult
方法 or 属性:isExistNewVersion: boolean;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:CheckResult
方法 or 属性:newVersionInfo: NewVersionInfo;
访问级别:公开API|类名:CheckResult
方法 or 属性:newVersionInfo: NewVersionInfo;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NewVersionInfo
访问级别:公开API|类名:NewVersionInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NewVersionInfo
方法 or 属性:versionDigestInfo: VersionDigestInfo;
访问级别:公开API|类名:NewVersionInfo
方法 or 属性:versionDigestInfo: VersionDigestInfo;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NewVersionInfo
方法 or 属性:versionComponents: Array\;
访问级别:公开API|类名:NewVersionInfo
方法 or 属性:versionComponents: Array\;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionDigestInfo
访问级别:公开API|类名:VersionDigestInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionDigestInfo
方法 or 属性:versionDigest: string;
访问级别:公开API|类名:VersionDigestInfo
方法 or 属性:versionDigest: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
访问级别:公开API|类名:VersionComponent
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:componentId: string;
访问级别:公开API|类名:VersionComponent
方法 or 属性:componentId: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:componentType: ComponentType;
访问级别:公开API|类名:VersionComponent
方法 or 属性:componentType: ComponentType;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:upgradeAction: UpgradeAction;
访问级别:公开API|类名:VersionComponent
方法 or 属性:upgradeAction: UpgradeAction;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:displayVersion: string;
访问级别:公开API|类名:VersionComponent
方法 or 属性:displayVersion: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:innerVersion: string;
访问级别:公开API|类名:VersionComponent
方法 or 属性:innerVersion: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:size: number;
访问级别:公开API|类名:VersionComponent
方法 or 属性:size: number;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:effectiveMode: EffectiveMode;
访问级别:公开API|类名:VersionComponent
方法 or 属性:effectiveMode: EffectiveMode;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:VersionComponent
方法 or 属性:descriptionInfo: DescriptionInfo;
访问级别:公开API|类名:VersionComponent
方法 or 属性:descriptionInfo: DescriptionInfo;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionOptions
访问级别:公开API|类名:DescriptionOptions
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionOptions
方法 or 属性:format: DescriptionFormat;
访问级别:公开API|类名:DescriptionOptions
方法 or 属性:format: DescriptionFormat;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionOptions
方法 or 属性:language: string;
访问级别:公开API|类名:DescriptionOptions
方法 or 属性:language: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ComponentDescription
访问级别:公开API|类名:ComponentDescription
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ComponentDescription
方法 or 属性:componentId: string;
访问级别:公开API|类名:ComponentDescription
方法 or 属性:componentId: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ComponentDescription
方法 or 属性:descriptionInfo: DescriptionInfo;
访问级别:公开API|类名:ComponentDescription
方法 or 属性:descriptionInfo: DescriptionInfo;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionInfo
访问级别:公开API|类名:DescriptionInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionInfo
方法 or 属性:descriptionType: DescriptionType;
访问级别:公开API|类名:DescriptionInfo
方法 or 属性:descriptionType: DescriptionType;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionInfo
方法 or 属性:content: string;
访问级别:公开API|类名:DescriptionInfo
方法 or 属性:content: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:CurrentVersionInfo
访问级别:公开API|类名:CurrentVersionInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:CurrentVersionInfo
方法 or 属性:osVersion: string;
访问级别:公开API|类名:CurrentVersionInfo
方法 or 属性:osVersion: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:CurrentVersionInfo
方法 or 属性:deviceName: string;
访问级别:公开API|类名:CurrentVersionInfo
方法 or 属性:deviceName: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:CurrentVersionInfo
方法 or 属性:versionComponents: Array\;
访问级别:公开API|类名:CurrentVersionInfo
方法 or 属性:versionComponents: Array\;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DownloadOptions
访问级别:公开API|类名:DownloadOptions
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DownloadOptions
方法 or 属性:allowNetwork: NetType;
访问级别:公开API|类名:DownloadOptions
方法 or 属性:allowNetwork: NetType;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DownloadOptions
方法 or 属性:order: Order;
访问级别:公开API|类名:DownloadOptions
方法 or 属性:order: Order;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ResumeDownloadOptions
访问级别:公开API|类名:ResumeDownloadOptions
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ResumeDownloadOptions
方法 or 属性:allowNetwork: NetType;
访问级别:公开API|类名:ResumeDownloadOptions
方法 or 属性:allowNetwork: NetType;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:PauseDownloadOptions
访问级别:公开API|类名:PauseDownloadOptions
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:PauseDownloadOptions
方法 or 属性:isAllowAutoResume: boolean;
访问级别:公开API|类名:PauseDownloadOptions
方法 or 属性:isAllowAutoResume: boolean;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeOptions
访问级别:公开API|类名:UpgradeOptions
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeOptions
方法 or 属性:order: Order;
访问级别:公开API|类名:UpgradeOptions
方法 or 属性:order: Order;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ClearOptions
访问级别:公开API|类名:ClearOptions
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ClearOptions
方法 or 属性:status: UpgradeStatus;
访问级别:公开API|类名:ClearOptions
方法 or 属性:status: UpgradeStatus;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradePolicy
访问级别:公开API|类名:UpgradePolicy
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradePolicy
方法 or 属性:downloadStrategy: boolean;
访问级别:公开API|类名:UpgradePolicy
方法 or 属性:downloadStrategy: boolean;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradePolicy
方法 or 属性:autoUpgradeStrategy: boolean;
访问级别:公开API|类名:UpgradePolicy
方法 or 属性:autoUpgradeStrategy: boolean;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradePolicy
方法 or 属性:autoUpgradePeriods: Array\;
访问级别:公开API|类名:UpgradePolicy
方法 or 属性:autoUpgradePeriods: Array\;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradePeriod
访问级别:公开API|类名:UpgradePeriod
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradePeriod
方法 or 属性:start: number;
访问级别:公开API|类名:UpgradePeriod
方法 or 属性:start: number;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradePeriod
方法 or 属性:end: number;
访问级别:公开API|类名:UpgradePeriod
方法 or 属性:end: number;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskInfo
访问级别:公开API|类名:TaskInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskInfo
方法 or 属性:existTask: boolean;
访问级别:公开API|类名:TaskInfo
方法 or 属性:existTask: boolean;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskInfo
方法 or 属性:taskBody: TaskBody;
访问级别:公开API|类名:TaskInfo
方法 or 属性:taskBody: TaskBody;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventInfo
访问级别:公开API|类名:EventInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventInfo
方法 or 属性:eventId: EventId;
访问级别:公开API|类名:EventInfo
方法 or 属性:eventId: EventId;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventInfo
方法 or 属性:taskBody: TaskBody;
访问级别:公开API|类名:EventInfo
方法 or 属性:taskBody: TaskBody;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
访问级别:公开API|类名:TaskBody
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
方法 or 属性:versionDigestInfo: VersionDigestInfo;
访问级别:公开API|类名:TaskBody
方法 or 属性:versionDigestInfo: VersionDigestInfo;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
方法 or 属性:status: UpgradeStatus;
访问级别:公开API|类名:TaskBody
方法 or 属性:status: UpgradeStatus;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
方法 or 属性:subStatus: number;
访问级别:公开API|类名:TaskBody
方法 or 属性:subStatus: number;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
方法 or 属性:progress: number;
访问级别:公开API|类名:TaskBody
方法 or 属性:progress: number;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
方法 or 属性:installMode: number;
访问级别:公开API|类名:TaskBody
方法 or 属性:installMode: number;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
方法 or 属性:errorMessages: Array\;
访问级别:公开API|类名:TaskBody
方法 or 属性:errorMessages: Array\;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:TaskBody
方法 or 属性:versionComponents: Array\;
访问级别:公开API|类名:TaskBody
方法 or 属性:versionComponents: Array\;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ErrorMessage
访问级别:公开API|类名:ErrorMessage
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ErrorMessage
方法 or 属性:errorCode: number;
访问级别:公开API|类名:ErrorMessage
方法 or 属性:errorCode: number;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ErrorMessage
方法 or 属性:errorMessage: string;
访问级别:公开API|类名:ErrorMessage
方法 or 属性:errorMessage: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventClassifyInfo
访问级别:公开API|类名:EventClassifyInfo
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventClassifyInfo
方法 or 属性:eventClassify: EventClassify;
访问级别:公开API|类名:EventClassifyInfo
方法 or 属性:eventClassify: EventClassify;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventClassifyInfo
方法 or 属性:extraInfo: string;
访问级别:公开API|类名:EventClassifyInfo
方法 or 属性:extraInfo: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeFile
访问级别:公开API|类名:UpgradeFile
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeFile
方法 or 属性:fileType: ComponentType;
访问级别:公开API|类名:UpgradeFile
方法 or 属性:fileType: ComponentType;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeFile
方法 or 属性:filePath: string;
访问级别:公开API|类名:UpgradeFile
方法 or 属性:filePath: string;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeTaskCallback
访问级别:公开API|类名:UpgradeTaskCallback
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeTaskCallback
方法 or 属性:(eventInfo: EventInfo): void;
访问级别:公开API|类名:UpgradeTaskCallback
方法 or 属性:(eventInfo: EventInfo): void;
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:BusinessVendor
访问级别:公开API|类名:BusinessVendor
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:BusinessSubType
访问级别:公开API|类名:BusinessSubType
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:BusinessSubType
方法 or 属性:FIRMWARE = 1
访问级别:公开API|类名:BusinessSubType
方法 or 属性:FIRMWARE = 1
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ComponentType
访问级别:公开API|类名:ComponentType
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:ComponentType
方法 or 属性:OTA = 1
访问级别:公开API|类名:ComponentType
方法 or 属性:OTA = 1
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeAction
访问级别:公开API|类名:UpgradeAction
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EffectiveMode
访问级别:公开API|类名:EffectiveMode
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EffectiveMode
方法 or 属性:COLD = 1
访问级别:公开API|类名:EffectiveMode
方法 or 属性:COLD = 1
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EffectiveMode
方法 or 属性:LIVE = 2
访问级别:公开API|类名:EffectiveMode
方法 or 属性:LIVE = 2
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EffectiveMode
方法 or 属性:LIVE_AND_COLD = 3
访问级别:公开API|类名:EffectiveMode
方法 or 属性:LIVE_AND_COLD = 3
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionType
访问级别:公开API|类名:DescriptionType
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionType
方法 or 属性:CONTENT = 0
访问级别:公开API|类名:DescriptionType
方法 or 属性:CONTENT = 0
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionType
方法 or 属性:URI = 1
访问级别:公开API|类名:DescriptionType
方法 or 属性:URI = 1
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionFormat
访问级别:公开API|类名:DescriptionFormat
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionFormat
方法 or 属性:STANDARD = 0
访问级别:公开API|类名:DescriptionFormat
方法 or 属性:STANDARD = 0
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:DescriptionFormat
方法 or 属性:SIMPLIFIED = 1
访问级别:公开API|类名:DescriptionFormat
方法 or 属性:SIMPLIFIED = 1
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NetType
访问级别:公开API|类名:NetType
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NetType
方法 or 属性:CELLULAR = 1
访问级别:公开API|类名:NetType
方法 or 属性:CELLULAR = 1
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NetType
方法 or 属性:METERED_WIFI = 2
访问级别:公开API|类名:NetType
方法 or 属性:METERED_WIFI = 2
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NetType
方法 or 属性:NOT_METERED_WIFI = 4
访问级别:公开API|类名:NetType
方法 or 属性:NOT_METERED_WIFI = 4
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NetType
方法 or 属性:WIFI = 6
访问级别:公开API|类名:NetType
方法 or 属性:WIFI = 6
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:NetType
方法 or 属性:CELLULAR_AND_WIFI = 7
访问级别:公开API|类名:NetType
方法 or 属性:CELLULAR_AND_WIFI = 7
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:Order
访问级别:公开API|类名:Order
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:Order
方法 or 属性:DOWNLOAD = 1
访问级别:公开API|类名:Order
方法 or 属性:DOWNLOAD = 1
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:Order
方法 or 属性:INSTALL = 2
访问级别:公开API|类名:Order
方法 or 属性:INSTALL = 2
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:Order
方法 or 属性:DOWNLOAD_AND_INSTALL = 3
访问级别:公开API|类名:Order
方法 or 属性:DOWNLOAD_AND_INSTALL = 3
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:Order
方法 or 属性:APPLY = 4
访问级别:公开API|类名:Order
方法 or 属性:APPLY = 4
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:Order
方法 or 属性:INSTALL_AND_APPLY = 6
访问级别:公开API|类名:Order
方法 or 属性:INSTALL_AND_APPLY = 6
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
访问级别:公开API|类名:UpgradeStatus
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:WAITING_DOWNLOAD = 20
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:WAITING_DOWNLOAD = 20
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:DOWNLOADING = 21
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:DOWNLOADING = 21
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:DOWNLOAD_PAUSED = 22
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:DOWNLOAD_PAUSED = 22
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:DOWNLOAD_FAIL = 23
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:DOWNLOAD_FAIL = 23
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:WAITING_INSTALL = 30
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:WAITING_INSTALL = 30
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:UPDATING = 31
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:UPDATING = 31
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:WAITING_APPLY = 40
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:WAITING_APPLY = 40
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:APPLYING = 41
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:APPLYING = 41
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:UPGRADE_SUCCESS = 50
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:UPGRADE_SUCCESS = 50
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:UpgradeStatus
方法 or 属性:UPGRADE_FAIL = 51
访问级别:公开API|类名:UpgradeStatus
方法 or 属性:UPGRADE_FAIL = 51
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventClassify
访问级别:公开API|类名:EventClassify
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventClassify
方法 or 属性:TASK = 0x01000000
访问级别:公开API|类名:EventClassify
方法 or 属性:TASK = 0x01000000
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
访问级别:公开API|类名:EventId
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_TASK_BASE = EventClassify.TASK
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_TASK_BASE = EventClassify.TASK
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_TASK_RECEIVE
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_TASK_RECEIVE
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_TASK_CANCEL
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_TASK_CANCEL
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_WAIT
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_WAIT
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_START
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_START
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_UPDATE
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_UPDATE
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_PAUSE
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_PAUSE
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_RESUME
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_RESUME
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_SUCCESS
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_SUCCESS
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_FAIL
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_DOWNLOAD_FAIL
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_UPGRADE_WAIT
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_UPGRADE_WAIT
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_UPGRADE_START
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_UPGRADE_START
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_UPGRADE_UPDATE
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_UPGRADE_UPDATE
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_APPLY_WAIT
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_APPLY_WAIT
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_APPLY_START
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_APPLY_START
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_UPGRADE_SUCCESS
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_UPGRADE_SUCCESS
访问级别:系统API|@ohos.update.d.ts| -|访问级别有变化|类名:EventId
方法 or 属性:EVENT_UPGRADE_FAIL
访问级别:公开API|类名:EventId
方法 or 属性:EVENT_UPGRADE_FAIL
访问级别:系统API|@ohos.update.d.ts| diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-arkui.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-arkui.md index b183f8f79f680d28e87866fb8916c36e3f2115b2..f4d9c738365e587cad0e130bcb35517fd9199928 100644 --- a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-arkui.md +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-arkui.md @@ -2,7 +2,7 @@ ## cl.arkui.1 状态变量数据类型声明使用限制。 -1. 所有的状态装饰器变量需要显式声明变量类型,不允许声明any,不支持Date数据类型。 +1. 所有的状态装饰器变量需要显式声明变量类型,不允许声明any。 示例: @@ -13,34 +13,13 @@ struct DatePickerExample { // 错误写法: @State isLunar: any = false @State isLunar: boolean = false - // 错误写法: @State selectedDate: Date = new Date('2021-08-08') - private selectedDate: Date = new Date('2021-08-08') - + build() { - Column() { - Button('切换公历农历') - .margin({ top: 30 }) - .onClick(() => { - this.isLunar = !this.isLunar - }) - DatePicker({ - start: new Date('1970-1-1'), - end: new Date('2100-1-1'), - selected: this.selectedDate - }) - .lunar(this.isLunar) - .onChange((value: DatePickerResult) => { - this.selectedDate.setFullYear(value.year, value.month, value.day) - console.info('select current date is: ' + JSON.stringify(value)) - }) - - }.width('100%') + ... } } ``` - - ![datePicker](../../../application-dev/reference/arkui-ts/figures/datePicker.gif) - + 2. @State、@Provide、 @Link和@Consume四种状态变量的数据类型声明只能由简单数据类型或引用数据类型的其中一种构成。 类型定义中的Length、ResourceStr、ResourceColor三个类型是简单数据类型或引用数据类型的组合,所以不能被以上四种状态装饰器变量使用。 @@ -76,18 +55,14 @@ **变更影响** -1. 如果状态装饰器变量没有显式声明变量类型,声明any,编译拦截报错; +1. 如果状态装饰器变量没有显式声明变量类型,声明any,编译拦截会出现警告; ```ts - // ArkTS:ERROR Please define an explicit type, not any. + // ArkTS:WARN Please define an explicit type, not any. @State isLunar: any = false ``` -2. 状态装饰器变量声明变量类型为Date,编译拦截报错; - ```ts - // ArkTS:ERROR The @State property 'selectedDate' cannot be a 'Date' object. - @State selectedDate: Date = new Date('2021-08-08') - ``` 3. @State、@Provide、 @Link和@Consume四种状态变量使用框架提供的Length、ResourceStr、ResourceColor, - 编译拦截报错。 + 编译拦截报错。 + ```ts /* ArkTS:ERROR The state variable type here is 'ResourceStr', it contains both a simple type and an object type, which are not allowed to be defined for state variable of a struct.*/ @@ -101,9 +76,8 @@ **适配指导** 1. 状态装饰器变量声明具体的变量类型替代any; -2. 使用Date对象的状态装饰器变量,修改为不加状态装饰器修饰的常规变量; 3. 因为Length(string|number|Resource), ResourceStr(string|Resource), ResourceColor(string|number|Color|Resource) - 的三个类型是简单数据类型或引用数据类型的组合,使用@State、@Provide、 @Link和@Consume四种状态变量场景参考以下修改: + 的三个类型是简单数据类型或引用数据类型的组合,使用@State、@Provide、 @Link和@Consume四种状态变量场景参考以下修改: ```ts // 错误写法: @State message: ResourceStr = $r('app.string.hello') @@ -144,7 +118,7 @@ **变更影响** -1. 不允许从父组件初始化`@LocalStorageLink`, `@LocalStorageProp`修饰的变量。 +1. 不允许从父组件初始化`@LocalStorageLink`, `@LocalStorageProp`修饰的变量,编译出现警告。 ```ts @Entry @Component @@ -152,10 +126,10 @@ build() { Column() { Child({ - /* ArkTS:ERROR Property 'simpleVarName' in the custom component 'Child' cannot + /* ArkTS:WARN Property 'simpleVarName' in the custom component 'Child' cannot initialize here (forbidden to specify). */ simpleVarName: 1, - /* ArkTS:ERROR Property 'objectName' in the custom component 'Child' cannot + /* ArkTS:WARN Property 'objectName' in the custom component 'Child' cannot initialize here (forbidden to specify). */ objectName: new ClassA("x") }) @@ -211,7 +185,7 @@ **适配指导** 1. 构造子组件时,不对子组件的`@LocalStorageLink`, `@LocalStorageProp`修饰的变量进行。 - 如果需要在父组件中修改子组件的`@LocalStorageLink`, `@LocalStorageProp`修饰的变量,则使用LocalStorage提供的API接口方法(比如set方法)赋值。 + 如果需要在父组件中修改子组件的`@LocalStorageLink`, `@LocalStorageProp`修饰的变量,则使用LocalStorage提供的API接口方法(比如set方法)赋值。 2. @ObjectLink的使用指导请参考文档[@ObjectLink使用指导](../../../application-dev/quick-start/arkts-observed-and-objectlink.md)。 ## cl.arkui.3 List组件和Scroll组件onScrollBegin事件变更 diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.1/changelogs-distributeddatamgr.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.1/changelogs-distributeddatamgr.md new file mode 100644 index 0000000000000000000000000000000000000000..5a47ecca1508f089edb1117d614f5b86e9b91e0f --- /dev/null +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.1/changelogs-distributeddatamgr.md @@ -0,0 +1,57 @@ +# 分布式数据管理子系统ChangeLog + +## cl.distributeddatamgr.1 ValuesBucket由系统接口变更为公共接口 + +**变更影响** + +基于此前版本开发的应用,仅支持系统应用使用ValuesBucket。现接口类型中的系统接口标识取消,支持第三方开发者使用。 + +**关键接口/组件变更** + +修改前的接口原型: + + ```ts + /** + * Indicates possible value types + * + * @syscap SystemCapability.DistributedDataManager.DataShare.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + export type ValueType = number | string | boolean; + ``` +修改后的接口原型: + + ```ts + /** + * Indicates possible value types + * + * @syscap SystemCapability.DistributedDataManager.DataShare.Core + * @StageModelOnly + * @since 10 + */ + export type ValueType = number | string | boolean; +} + ``` +## cl.distributeddatamgr.2 dataSharePredicates部分谓词由系统接口变更为公共接口 + +**变更影响** + +基于此前版本开发的应用,仅支持系统应用使用dataSharePredicates。现命名空间dataSharePredicates、类dataSharePredicates及类内部分谓词接口类型中的系统接口标识取消,支持第三方开发者使用。 + +**关键接口/组件变更** + +部分谓词接口的系统接口说明取消,涉及的接口有: + +- equalTo(field: string, value: ValueType): DataSharePredicates + +- and(): DataSharePredicates + +- orderByAsc(field: string): DataSharePredicates + +- orderByDesc(field: string): DataSharePredicates + +- limit(total: number, offset: number): DataSharePredicates + +- in(field: string, value: Array): DataSharePredicates \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.2/changelogs-arkui.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.2/changelogs-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..e887116ce27d7c17e96a5ff24ecd51b18d394ac9 --- /dev/null +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.2/changelogs-arkui.md @@ -0,0 +1,100 @@ +# arkui子系统ChangeLog + +## cl.arkui.1 状态变量数据类型声明使用限制。 + +所有的状态装饰器变量需要显式声明变量类型,不允许声明any。 + +**示例:** + +```ts +// xxx.ets +@Entry +@Component +struct DatePickerExample { + // 错误写法: @State isLunar: any = false + @State isLunar: boolean = false + + build() { + ... + } +} +``` + +**变更影响** + +如果状态装饰器变量没有显式声明变量类型,声明any,编译拦截等级由WARN变成ERROR。 + +```ts +// ArkTS:ERROR Please define an explicit type, not any. +@State isLunar: any = false +``` + +**关键的接口/组件变更** + +不涉及。 + +**适配指导** + +状态装饰器变量声明具体的变量类型替代any。 + +## cl.arkui.2 自定义组件成员变量初始化的规则与约束。 + +不允许从父组件初始化`@LocalStorageLink`, `@LocalStorageProp`修饰的变量。 + +**示例:** + +```ts +let NextID: number = 0; + +@Observed +class ClassA { + public id: number; + public c: number; + + constructor(c: number) { + this.id = NextID++; + this.c = c; + } +} + +@Entry +@Component +struct LocalStorageComponent { + build() { + Column() { + Child({ + /* ArkTS:ERROR Property 'simpleVarName' in the custom component 'Child' cannot + initialize here (forbidden to specify). */ + simpleVarName: 1, + /* ArkTS:ERROR Property 'objectName' in the custom component 'Child' cannot + initialize here (forbidden to specify). */ + objectName: new ClassA(1) + }) + } + } +} + +@Component +struct Child { + @LocalStorageLink("storageSimpleProp") simpleVarName: number = 0; + @LocalStorageProp("storageObjectProp") objectName: ClassA = new ClassA(1); + + build() { + } +} +``` + +**变更影响** + +如果父组件初始化`@LocalStorageLink`, `@LocalStorageProp`修饰的变量,编译拦截等级由WARN变成ERROR。 + +**关键的接口/组件变更** + +不涉及。 + +**适配指导** + +构造子组件时,不对子组件的`@LocalStorageLink`, `@LocalStorageProp`修饰的变量进行赋值。 + +如果需要在父组件中修改子组件的`@LocalStorageLink`, `@LocalStorageProp`修饰的变量,则使用LocalStorage提供的API接口方法(比如set方法)赋值。 + diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/Readme.md b/zh-cn/release-notes/changelogs/v3.2-Release/Readme.md new file mode 100644 index 0000000000000000000000000000000000000000..90bbd7a5fbf68123d02056315d5de25b313202e7 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/Readme.md @@ -0,0 +1,12 @@ +# Readme + +- [元能力](changelogs-ability.md) +- [ArkUI](changelogs-arkui.md) +- [包管理](changelogs-bundlemanager.md) +- [输入法框架](changelogs-imf.md) +- [全局资源调度](changelogs-resourceschedule.md) +- [主题框架-锁屏](changelogs-screenlock.md) +- [电话服务](changelogs-telephony.md) +- [util](changelogs-util.md) +- [主题框架-壁纸](changelogs-wallpaper.md) +- [web组件](changelogs-web.md) diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-ability.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..b5289610acebcfd24695f527efc2ae51f2198da1 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-ability.md @@ -0,0 +1,291 @@ +# 元能力子系统JS API变更Changelog + +## cl.ability.1 AreaMode接口变更 +AreaMode接口有多个重复,删除掉重复的AreaMode。 + +**变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.common.d.ts | common.AreaMode | | 删除 | +| application/Context.d.ts | AreaMode | | 删除 | + + +**适配指导** + +使用@ohos.app.ability.contextConstant.d.ts中的AreaMode + +```ts +import contextConstant from '@ohos.app.ability.contextConstant'; +let area: contextConstant.AreaMode = contextConstant.AreaMode.EL1; +``` + + + +## cl.ability.2 killProcessesBySelf接口变更 + +killProcessesBySelf接口命名不合理,修改为killAllProcesses。 + +**变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------------ | ------------------ | ----------------------------------------------------- | -------- | +| application/ApplicationContext | ApplicationContext | killProcessesBySelf(): Promise\; | 删除 | +| application/ApplicationContext | ApplicationContext | killProcessesBySelf(callback: AsyncCallback\); | 删除 | +| application/ApplicationContext | ApplicationContext | killAllProcesses(): Promise\; | 新增 | +| application/ApplicationContext | ApplicationContext | killAllProcesses(callback: AsyncCallback\); | 新增 | + + +**适配指导** + +应用中调用killProcessesBySelf可参考下列代码 + +变更前代码: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.killProcessesBySelf() +``` + +变更后代码: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.killAllProcesses() +``` + + + +## cl.ability.3 getProcessRunningInformation接口变更 + +getProcessRunningInformation接口命名不合理,修改为getRunningProcessInformation。 + +**变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ----------------------------------- | ------------------ | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.appManager.d.ts | appManager | function getProcessRunningInformation(): Promise\\>; | 删除 | +| @ohos.app.ability.appManager.d.ts | appManager | function getProcessRunningInformation(callback: AsyncCallback\\>): void; | 删除 | +| @ohos.app.ability.appManager.d.ts | appManager | function getRunningProcessInformation(): Promise\\>; | 新增 | +| @ohos.app.ability.appManager.d.ts | appManager | function getRunningProcessInformation(callback: AsyncCallback\\>): void; | 新增 | +| application/ApplicationContext.d.ts | ApplicationContext | getProcessRunningInformation(): Promise\\>; | 删除 | +| application/ApplicationContext.d.ts | ApplicationContext | getProcessRunningInformation(callback: AsyncCallback\\>): void; | 删除 | +| application/ApplicationContext.d.ts | ApplicationContext | getRunningProcessInformation(): Promise\\>; | 新增 | +| application/ApplicationContext.d.ts | ApplicationContext | getRunningProcessInformation(callback: AsyncCallback\\>): void; | 新增 | + +**适配指导** + +应用中调用getProcessRunningInformation可参考下列代码 + +变更前代码: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.getProcessRunningInformation() +``` + +变更后代码: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.getRunningProcessInformation() +``` + + + +## cl.ability.4 WantConstant.Flags接口变更 +WantConstant.Flags接口有多个无效Flag定义,删除掉无效的Flag。 + +**变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_FORWARD_RESULT | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_CONTINUATION | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_NOT_OHOS_COMPONENT | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_FORM_ENABLED | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_AUTH_PERSISTABLE_URI_PERMISSION | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_AUTH_PREFIX_URI_PERMISSION | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITYSLICE_MULTI_DEVICE | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_START_FOREGROUND_ABILITY | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_CONTINUATION_REVERSIBLE | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_INSTALL_WITH_BACKGROUND_MODE | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_CLEAR_MISSION | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_NEW_MISSION | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_MISSION_TOP | 删除 | + + + +## cl.ability.5 WantConstant.Action接口变更 +WantConstant.Action接口有多个无效Action定义,删除掉无效的Action。 + +**变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | ACTION_APP_ACCOUNT_AUTH | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | ACTION_MARKET_DOWNLOAD | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | ACTION_MARKET_CROWDTEST | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_SANDBOX | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_BUNDLE_NAME | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_MODULE_NAME | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_ABILITY_NAME | 删除 | + + + +## cl.ability.6 Caller相关接口变更 +Caller相关接口使用RPC废弃的Sequenceable和MessageParcel对象,使用RPC在API9提供的Parcelable和MessageSequence对象替代。 + +**变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| api/@ohos.app.ability.UIAbility.d.ts | CalleeCallback | (indata: rpc.MessageParcel): rpc.Sequenceable; | 变更,修改为 (indata: rpc.MessageSequence): rpc.Parcelable; | +| api/@ohos.app.ability.UIAbility.d.ts | Caller | call(method: string, data: rpc.Sequenceable): Promise; | 变更,修改为 call(method: string, data: rpc.Parcelable): Promise; | +| api/@ohos.app.ability.UIAbility.d.ts | Caller | callWithResult(method: string, data: rpc.Sequenceable): Promise; | 变更,修改为 callWithResult(method: string, data: rpc.Parcelable): Promise; | + +**适配指导** + +应用中调用Caller相关接口可参考下列代码 + +变更前代码: + +```ts + class MyMessageAble{ + name:"" + str:"" + num: 1 + constructor(name, str) { + this.name = name; + this.str = str; + } + marshalling(messageParcel) { + messageParcel.writeInt(this.num); + messageParcel.writeString(this.str); + console.log('MyMessageAble marshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + unmarshalling(messageParcel) { + this.num = messageParcel.readInt(); + this.str = messageParcel.readString(); + console.log('MyMessageAble unmarshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + }; + let method = 'call_Function'; + function funcCallBack(pdata) { + console.log('Callee funcCallBack is called ' + pdata); + let msg = new MyMessageAble("test", ""); + pdata.readSequenceable(msg); + return new MyMessageAble("test1", "Callee test"); + } + export default class MainUIAbility extends UIAbility { + onCreate(want, launchParam) { + console.log('Callee onCreate is called'); + try { + this.callee.on(method, funcCallBack); + } catch (error) { + console.log('Callee.on catch error, error.code: ' + error.code + + ' error.message: ' + error.message); + } + } + } +``` + +变更后代码: + +```ts + class MyMessageAble{ + name:"" + str:"" + num: 1 + constructor(name, str) { + this.name = name; + this.str = str; + } + marshalling(messageSequence) { + messageSequence.writeInt(this.num); + messageSequence.writeString(this.str); + console.log('MyMessageAble marshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + unmarshalling(messageSequence) { + this.num = messageSequence.readInt(); + this.str = messageSequence.readString(); + console.log('MyMessageAble unmarshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + }; + let method = 'call_Function'; + function funcCallBack(pdata) { + console.log('Callee funcCallBack is called ' + pdata); + let msg = new MyMessageAble("test", ""); + pdata.readParcelable(msg); + return new MyMessageAble("test1", "Callee test"); + } + export default class MainUIAbility extends UIAbility { + onCreate(want, launchParam) { + console.log('Callee onCreate is called'); + try { + this.callee.on(method, funcCallBack); + } catch (error) { + console.log('Callee.on catch error, error.code: ' + error.code + + ' error.message: ' + error.message); + } + } + } +``` + + + +## cl.ability.7 WantConstant.Flags接口变更 + +wantConstant接口有两个类似的枚举,合并成一个。 + +**变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ----------------------------------- | ---------------------- | ----------------------------------- | -------- | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Parameter | ABILITY_BACK_TO_OTHER_MISSION_STACK | 删除 | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Params | ABILITY_BACK_TO_OTHER_MISSION_STACK | 新增 | + +**适配指导** + +使用@ohos.app.ability.wantConstant.d.ts中的ABILITY_BACK_TO_OTHER_MISSION_STACK + +```ts +import wantConstant from '@ohos.app.ability.wantConstant'; +let backToOtherMissionStack: wantConstant.Params = wantParam.Params.ABILITY_BACK_TO_OTHER_MISSION_STACK; +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-arkui.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..23d453b41ef6811d484f1c62796676f6a2f1013b --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-arkui.md @@ -0,0 +1,306 @@ +# arkui子系统ChangeLog + +## cl.arkui.1 getInspectorTree接口返回值从string修改为Object。 + +**变更影响** + +3.2.10.7之前使用getInspectorTree接口的代码需要适配 + +**关键的接口/组件变更** + +getInspectorTree接口返回值从string修改为Object + +**适配指导** + +将getInspectorTree返回值作为string使用的代码需要修改,比如以下示例代码: + +```typescript +console.info(getInspectorTree()) +``` + +需要修改成 + +```typescript +console.info(JSON.stringify(getInspectorTree())) +``` + +## cl.arkui.2 废弃GridItem的forceRebuild属性 + +**变更影响** + +无,该属性无作用 + +**关键的接口/组件变更** + +GridItem的forceRebuild属性废弃 + +**适配指导** + +如有使用可以直接删除,不影响GridItem功能 + +## cl.arkui.3 Plugin模块接口变更 + + +### 1. arkui子系统Plugin模块 `PluginComponentTemplate` 接口存在变更: + +ability命名无法准确表达对应参数的语义,修改为bundleName。 + +开发者需要根据以下说明对应用进行适配。 + + + +**变更影响** + +基于此前版本开发的应用,需适配变更接口,变更前的接口已经不能正常使用,会在编译过程中报错。 + + + +**关键的接口/组件变更** + +- 涉及接口 + + interface PluginComponentTemplate { + source: string; + bundleName: string; + } + + interface PluginComponentInterface { + (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; +} + +- 变更前: + +```js + interface PluginComponentTemplate { source: string; ability: string; } + interface PluginComponentInterface { + (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; + } +``` + +- 变更后: + +```js + interface PluginComponentTemplate { source: string; bundleName: string; } + interface PluginComponentInterface { + (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; + } +``` + +**适配指导** + +使用变更后的接口,示例代码如下: + +- 变更前: +```js +PluginComponent({ + template: { source: 'plugincomponent1', ability: 'com.example.plugin' }, + data: { 'countDownStartValue': 'new countDownStartValue' } +}).size({ width: 500, height: 100 }) +``` + +- 变更后: +```js +PluginComponent({ + template: { source: 'plugincomponent1', bundleName: 'com.example.plugin' }, + data: { 'countDownStartValue': 'new countDownStartValue' } +}).size({ width: 500, height: 100 }) +``` + +### 2. arkui子系统Plugin模块 `pluginComponentManager` 接口存在变更: + +want命名无法准确表达对应参数的语义,修改为target。 + +开发者需要根据以下说明对应用进行适配。 + + + +**变更影响** + +基于此前版本开发的应用,需适配变更接口。变更前的接口会出现告警,虽然可以通过编译,但是已经不能正常使用其功能。 + + + +**关键的接口/组件变更** + +- 涉及接口 + + interface PushParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + extraData: KVObject; + jsonPath?: string; + } + + function push(param: PushParameterForStage, callback: AsyncCallback): void; + + interface RequestParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + jsonPath?: string; + } + + function request(param: RequestParameterForStage, callback: AsyncCallback): void; + +- 变更前: + +```js + interface PushParameterForStage { + owner: Want; + want: Want; + name: string; + data: KVObject; + extraData: KVObject; + jsonPath?: string; + } + + function push(param: PushParameterForStage, callback: AsyncCallback): void; + + interface RequestParameterForStage { + owner: Want; + want: Want; + name: string; + data: KVObject; + jsonPath?: string; + } + + function request(param: RequestParameterForStage, callback: AsyncCallback): void; +``` + +- 变更后: + +```js + interface PushParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + extraData: KVObject; + jsonPath?: string; + } + + function push(param: PushParameterForStage, callback: AsyncCallback): void; + + interface RequestParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + jsonPath?: string; + } + + function request(param: RequestParameterForStage, callback: AsyncCallback): void; +``` + +**适配指导** + +使用变更后的接口,示例代码如下: + +- 变更前: +```js +import pluginComponentManager from '@ohos.pluginComponent' + +pluginComponentManager.push({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + want: { + bundleName: "com.example.provider", + abilityName: "com.example.provider.MainAbility", + }, + name: "ets/pages/plugin2.js", + data: { + "js": "ets/pages/plugin.js", + "key_1": 1111, + }, + extraData: { + "extra_str": "this is push event" + }, + jsonPath: "", + }, + (err, data) => { + console.log("push_callback:err: " ,JSON.stringify(err)); + console.log("push_callback:data: " , JSON.stringify(data)); + console.log("push_callback: push ok!"); + } +) + +pluginComponentManager.request({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + want: { + bundleName: "com.example.provider", + abilityName: "ets/pages/plugin2.js", + }, + name: "plugintemplate", + data: { + "key_1": " myapplication plugin component test", + "key_2": 123456 + }, + jsonPath: "", +}, + (err, data) => { + console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) + console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) + } +) +``` + +- 变更后: +```js +import pluginComponentManager from '@ohos.pluginComponent' + +pluginComponentManager.push({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + target: { + bundleName: "com.example.provider", + abilityName: "com.example.provider.MainAbility", + }, + name: "ets/pages/plugin2.js", + data: { + "js": "ets/pages/plugin.js", + "key_1": 1111, + }, + extraData: { + "extra_str": "this is push event" + }, + jsonPath: "", + }, + (err, data) => { + console.log("push_callback:err: " ,JSON.stringify(err)); + console.log("push_callback:data: " , JSON.stringify(data)); + console.log("push_callback: push ok!"); + } +) + +pluginComponentManager.request({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + target: { + bundleName: "com.example.provider", + abilityName: "ets/pages/plugin2.js", + }, + name: "plugintemplate", + data: { + "key_1": " myapplication plugin component test", + "key_2": 123456 + }, + jsonPath: "", +}, + (err, data) => { + console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) + console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) + } +) +``` diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..f175165703f3b7929833790238251b5d0b6fa901 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md @@ -0,0 +1,298 @@ +# 包管理子系统ChangeLog + +## cl.bundlemanager.1 包管理删除@ohos.bundle.bundleManager.d.ts中的getAbilityIcon接口,可以使用@ohos.resourceManager.d.ts中的getMediaContent替换。 + +包管理删除[@ohos.bundle.bundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts)中的getAbilityIcon接口,可以使用[@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts)中的getMediaContent替换。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了getAbilityIcon接口的,需要改为使用getMediaContent接口。 + +**关键的接口/组件变更**
+删除@ohos.bundle.bundleManager.d.ts中的getAbilityIcon接口。 + +**适配指导**
+使用@ohos.bundle.bundleManager.d.ts下面的getAbilityIcon,需要修改为@ohos.resourceManager.d.ts中的getMediaContent。需要提前获取到图标的资源ID值,可参考该接口的[使用指导](../../../application-dev/reference/apis/js-apis-resource-manager.md#getmediacontent9)。 + +## cl.bundlemanager.2 包管理底层能力变更,仅支持系统资源HAP自定义权限,其它HAP均不支持自定义权限。 + +仅支持系统资源HAP自定义权限,其它HAP均不支持自定义权限。包管理在解析HAP时,仅支持解析资源HAP(包名为:ohos.global.systemres)的配置文件中的definePermissions字段,该字段用来定义权限。其它HAP中配置的definePermissions字段将不会解析。 +如果有应用需要自定义权限,可以在资源HAP的[配置文件](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json)中definePermissions字段下面新增定义权限。格式可参考[定义权限](../../../application-dev/quick-start/module-structure.md#definepermissions对象内部结构)。 + + +**变更影响**
+升级新版本镜像后,应用自定义的权限将不会生效,使用方在申请该权限时,会授权失败。 + +**关键的接口/组件变更**
+包管理底层能力变更,仅支持系统资源HAP自定义权限,其它HAP均不支持自定义权限。 + +**适配指导**
+如果有应用需要自定义权限,可以在资源HAP的[配置文件](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json)中definePermissions字段下面新增定义权限。格式可参考[定义权限](../../../application-dev/quick-start/module-structure.md#definepermissions对象内部结构)。 + +## cl.bundlemanager.3 包管理二级模块文件名称变更,修改为文件内对应的接口名称 + +包管理二级模块文件名称变更,修改为文件内对应的接口名称,变更文件如下: + +| 原文件名称 |变更后文件名称 | +|----|----| +| bundleManager/abilityInfo.d.ts | bundleManager/AbilityInfo.d.ts | +| bundleManager/applicationInfo.d.ts | bundleManager/ApplicationInfo.d.ts | +| bundleManager/bundleInfo.d.ts | bundleManager/BundleInfo.d.ts | +| bundleManager/dispatchInfo.d.ts | bundleManager/DispatchInfo.d.ts | +| bundleManager/elementName.d.ts | bundleManager/ElementName.d.ts | +| bundleManager/extensionAbilityInfo.d.ts | bundleManager/ExtensionAbilityInfo.d.ts | +| bundleManager/hapModuleInfo.d.ts | bundleManager/HapModuleInfo.d.ts | +| bundleManager/launcherAbilityInfo.d.ts | bundleManager/LauncherAbilityInfo.d.ts | +| bundleManager/metadata.d.ts | bundleManager/Metadata.d.ts | +| bundleManager/packInfo.d.ts | bundleManager/BundlePackInfo.d.ts | +| bundleManager/permissionDef.d.ts | bundleManager/PermissionDef.d.ts | +| bundleManager/remoteAbilityInfo.d.ts | bundleManager/RemoteAbilityInfo.d.ts | +| bundleManager/shortcutInfo.d.ts | bundleManager/ShortcutInfo.d.ts | + +除了免安装相关的BundlePackInfo文件名称增加了Bundle,其余文件名称均是修改为大写开头。 + +**变更影响**
+仅修改二级模块文件名称,不会影响一级模块的使用。在使用之前已发布的API 9各beta版本时,如果在ts文件中直接导入了bundleManager下面二级模块接口的,IDE中编译报错的话,需要修改导入的文件名称。 + +**关键的接口/组件变更**
+变更bundleManager文件夹下面的d.ts名称,修改为文件中的接口名称。 + +**适配指导**
+使用新的sdk后,正常情况下应用无需适配该变更。如果在应用中直接导入了bundleManager文件夹下面的文件,则需要修改导入的文件名称。可以按照如下的修改方式: + +**修改前:** +```ts +import {AbilityInfo} from 'bundleManger/abilityInfo'; +import {ExtensionAbilityInfo} from 'bundleManger/extensionAbilityInfo'; +import {BundlePackInfo} from 'bundleManger/packInfo'; +``` +**修改后:** +```ts +import {AbilityInfo} from 'bundleManger/AbilityInfo'; +import {ExtensionAbilityInfo} from 'bundleManger/ExtensionAbilityInfo'; +import {BundlePackInfo} from 'bundleManger/BundlePackInfo'; +``` + +## cl.bundlemanager.4 包管理LaunchType枚举类型名称变更,由STANDARD修改为MULTITON,枚举值不变。 + +包管理[LaunchType](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts)枚举类型变更,由STANDARD修改为MULTITON,枚举值不变,表示多实例类型。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了LaunchType.STANDARD的,需要改为使用LaunchType.MULTITON接口。 + +**关键的接口/组件变更**
+LaunchType枚举类型名称变更,由LaunchType.STANDARD修改为LaunchType.MULTITON。 + +**适配指导**
+由LaunchType.STANDARD修改为LaunchType.MULTITON。 + +## cl.bundlemanager.5 包管理AbilityInfo结构体中isVisible字段修改为exported,类型不变。 + +包管理[AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts)结构体中isVisible字段修改为exported,类型不变,表示当前ability是否支持导出,被其他的ability使用。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了isVisible的,需要改为使用exported。 + +**关键的接口/组件变更**
+包管理[AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts)结构体中isVisible字段修改为exported,类型不变。 + +**适配指导**
+由isVisible修改为exported。 + +## cl.bundlemanager.6 包管理ExtensionAbilityInfo结构体中isVisible字段修改为exported,类型不变。 + +包管理[ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts)结构体中isVisible字段修改为exported,类型不变,表示当前ability是否支持导出,被其他的ability使用。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了isVisible的,需要改为使用exported。 + +**关键的接口/组件变更**
+包管理[ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts)结构体中isVisible字段修改为exported,类型不变。 + +**适配指导**
+由isVisible修改为exported。 + +## cl.bundlemanager.7 包管理ModuleAbilityInfo结构体中visible字段修改为exported,类型不变。 + +包管理[ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts)结构体中visible字段修改为exported,类型不变,表示当前ability是否支持导出,被其他的ability使用。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了visible的,需要改为使用exported。 + +**关键的接口/组件变更**
+包管理[ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts)结构体中visible字段修改为exported,类型不变。 + +**适配指导**
+由visible修改为exported。 + +## cl.bundlemanager.8 app.json配置文件删除distributedNotificationEnabled标签 +删除配置文件app.json中[distributedNotificationEnabled](../../../application-dev/quick-start/app-configuration-file.md)标签 + +**变更影响**
+删除配置文件app.json中[distributedNotificationEnabled](../../../application-dev/quick-start/app-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除[distributedNotificationEnabled](../../../application-dev/quick-start/app-configuration-file.md)标签 + +## cl.bundlemanager.9 app.json配置文件删除entityType标签 +删除配置文件app.json中[entityType](../../../application-dev/quick-start/app-configuration-file.md)标签 + +**变更影响**
+删除配置文件app.json中[entityType](../../../application-dev/quick-start/app-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除[entityType](../../../application-dev/quick-start/app-configuration-file.md)标签 + +## cl.bundlemanager.10 app.json配置文件删除keepAlive标签 +删除配置文件app.json中[keepAlive](../../../application-dev/quick-start/app-configuration-file.md)标签 + +**变更影响**
+删除配置文件app.json中[keepAlive](../../../application-dev/quick-start/app-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除[keepAlive](../../../application-dev/quick-start/app-configuration-file.md)标签 + +## cl.bundlemanager.11 app.json配置文件删除removable标签 +删除配置文件app.json中[removable](../../../application-dev/quick-start/app-configuration-file.md)标签 + +**变更影响**
+删除配置文件app.json中[removable](../../../application-dev/quick-start/app-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除[removable](../../../application-dev/quick-start/app-configuration-file.md)标签 + +## cl.bundlemanager.12 app.json配置文件删除singleton标签 +删除配置文件app.json中[singleton](../../../application-dev/quick-start/app-configuration-file.md)标签 + +**变更影响**
+删除配置文件app.json中[singleton](../../../application-dev/quick-start/app-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除[singleton](../../../application-dev/quick-start/app-configuration-file.md)标签 + +## cl.bundlemanager.13 app.json配置文件删除userDataClearable标签 +删除配置文件app.json中[userDataClearable](../../../application-dev/quick-start/app-configuration-file.md)标签 + +**变更影响**
+删除配置文件app.json中[userDataClearable](../../../application-dev/quick-start/app-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除[userDataClearable](../../../application-dev/quick-start/app-configuration-file.md)标签 + +## cl.bundlemanager.14 module.json配置文件中module的name标签不再支持配置中文 +module.json配置文件中的module的[name](../../../application-dev/quick-start/module-configuration-file.md)不再支持配置中文 + +**变更影响**
+删除配置文件module.json中module的[name](../../../application-dev/quick-start/module-configuration-file.md)标签不再支持配置中文,IDE中配置该标签为中文,会导致IDE编译报错 + +**适配指导**
+使用英文语言配置module.json中module的[name](../../../application-dev/quick-start/module-configuration-file.md)标签 + +## cl.bundlemanager.15 module.json配置文件中ability的name标签不再支持配置中文 +module.json配置文件中的ability的[name](../../../application-dev/quick-start/module-configuration-file.md)不再支持配置中文 + +**变更影响**
+删除配置文件module.json中ability的[name](../../../application-dev/quick-start/module-configuration-file.md)标签不再支持配置中文,IDE中配置该标签为中文,会导致IDE编译报错 + +**适配指导**
+使用英文语言配置module.json中ability的[name](../../../application-dev/quick-start/module-configuration-file.md)标签 + +## cl.bundlemanager.16 module.json配置文件删除uiSyntax标签 +删除配置文件module.json中[uiSyntax](../../../application-dev/quick-start/module-configuration-file.md)标签 + +**变更影响**
+删除配置文件module.json中[uiSyntax](../../../application-dev/quick-start/module-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除module.json中[uiSyntax](../../../application-dev/quick-start/module-configuration-file.md)标签 + +## cl.bundlemanager.17 module.json配置文件中module及ability中的srcEntrance标签修改为srcEntry +配置文件module.json中[srcEntrance](../../../application-dev/quick-start/module-configuration-file.md)标签修改为srcEntry + +**变更影响**
+删除配置文件module.json中[srcEntrance](../../../application-dev/quick-start/module-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除module.json中[srcEntrance](../../../application-dev/quick-start/module-configuration-file.md)标签,使用srcEntry替代 + +## cl.bundlemanager.18 删除module.json配置文件中distroFilter的apiVersion标签 +删除配置文件module.json中[distroFilter](../../../application-dev/quick-start/module-configuration-file.md)的apiVersion标签 + +**变更影响**
+删除配置文件module.json[distroFilter](../../../application-dev/quick-start/module-configuration-file.md)的apiVersion标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除module.json中[distroFilter](../../../application-dev/quick-start/module-configuration-file.md)的apiVersion标签 + +## cl.bundlemanager.19 module.json配置文件中distroFilter修改为distributionFilter +配置文件module.json中[distroFilter](../../../application-dev/quick-start/module-configuration-file.md)标签修改为distributionFilter + +**变更影响**
+删除配置文件module.json[distroFilter](../../../application-dev/quick-start/module-configuration-file.md)标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除module.json中[distroFilter](../../../application-dev/quick-start/module-configuration-file.md)标签,使用distributionFilter替代 + +## cl.bundlemanager.20 module.json配置文件中launchTypede标签standard模式修改为multiton +删除module.json中[launchType](../../../application-dev/quick-start/module-configuration-file.md)标签的standard模式修改为multiton + +**适配指导**
+删除module.json中[launchType](../../../application-dev/quick-start/module-configuration-file.md)标签的standard模式,使用multiton替代 + +## cl.bundlemanager.21 app.json配置文件删除atomicService标签 +删除配置文件app.json中atomicService标签 + +**变更影响**
+删除配置文件app.json中atomicService标签,IDE中不再支持配置该标签,使用该标签会导致IDE编译报错 + +**适配指导**
+删除atomicService标签 + +## cl.bundlemanager.22 app.json配置文件新增bundleType标签 +配置文件app.json中新增bundleType标签 + +**变更影响**
+现存的元服务([installationFree](../../../application-dev/quick-start/module-configuration-file.md)为true),必须在app.json中指定bundleType为atomicService,否则打包失败。 + +**适配指导**
+新增[bundleType](../../../application-dev/quick-start/app-configuration-file.md)标签。该标签为可缺省(缺省值为app)。该标签需要和module.json中[installationFree](../../../application-dev/quick-start/module-configuration-file.md)字段保持一一对应,其相应规则为: +- 当bundleType为app时,installationFree必须为false。 +- 当bundleType为atomicService时,installationFree必须为true。 + +## cl.bundlemanager.23 包管理ApplicationInfo结构体中删除split字段。 + +包管理[ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts)结构体中删除split字段。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了split的,会编译失败。 + +**关键的接口/组件变更**
+包管理[ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts)结构体中删除split字段。 + +**适配指导**
+删除ApplicationInfo结构体中的split字段。目前元服务中stage模型强制分包,不支持不分包。 + +## cl.bundlemanager.24 包管理HapModuleInfo结构体中删除atomicServiceModuleType字段。 + +包管理[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中删除atomicServiceModuleType字段。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了atomicServiceModuleType的,会编译失败。 + +**关键的接口/组件变更**
+包管理[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中删除atomicServiceModuleType字段。 + +**适配指导**
+删除[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中的atomicServiceModuleType字段。判断atomicServiceModuleType字段的部分,用[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中的moduleType代替。 + +## cl.bundlemanager.25 包管理删除AtomicServiceModuleType枚举值。 + +包管理[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中删除atomicServiceModuleType字段。 + +**变更影响**
+使用之前已发布的API 9各beta版本且使用到了atomicServiceModuleType的,会编译失败。 + +**关键的接口/组件变更**
+包管理[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中删除atomicServiceModuleType字段。 + +**适配指导**
+删除[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中的atomicServiceModuleType字段。判断atomicServiceModuleType字段的部分,用[HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts)结构体中的moduleType代替。 \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-imf.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-imf.md new file mode 100644 index 0000000000000000000000000000000000000000..a6cdab6b8d7e7fc6a97698ce9b2e2a84ba32076a --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-imf.md @@ -0,0 +1,21 @@ +# 输入法框架子系统-输入法框架服务ChangeLog + + +## @ohos.InputMethodSubtype 中输入法子类型中name、label、id属性值变更 +从API9开始,变更如上三个属性值 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +此三个属性的取值发生变化,需要开发者进行适配更新 + +| 名称 | 变更前 | 变更后 | +| -------- | -------- | -------- | +| label | (1)取值:输入法子类型的id。| (1)取值:输入法子类型的标签。| +| name | (1)说明:输入法子类型的名字;(2)取值:输入法子类型的标签。| (1)说明:输入法应用的包名;(2)取值:输入法应用的包名。| +| id | (1)取值:输入法应用的包名。| (1)取值:输入法子类型的id。| + +**适配指导** + +请按上述取值变更结果适配更新。 diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md new file mode 100644 index 0000000000000000000000000000000000000000..8042bb2241aa42c2c43aedc691c8b1113e93bf8a --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md @@ -0,0 +1,21 @@ +# 资源调度子系统ChangeLog + +## cl.resourceschedule.workScheduler +修改parameters属性值的数据类型,不允许使用any类型,支持number、string、boolean三种类型。 + +**变更影响** + +基于OpenHarmony3.2.10.7及之后的SDK版本开发的应用,parameters属性值的数据类型不允许使用any类型,仅支持number、string、boolean三种类型,否则将编译报错。 + +**关键接口/组件变更** + +@ohos.resourceschedule.workScheduler.d.ts中的parameters属性变更。 + +| 类名 | 接口类型 | 变更前声明 | 变更后声明 | +| -- | -- | -- | -- | +| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | parameters?: {[key: string]: number | string | boolean} | + + +**适配指导**
+ +parameters属性使用{[key: string]: number | string | boolean}数据类型。 \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-screenlock.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-screenlock.md new file mode 100644 index 0000000000000000000000000000000000000000..8e5a2fab3671eb32db8accb72d764a1194f26ff1 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-screenlock.md @@ -0,0 +1,155 @@ +# 主题框架子系统-锁屏管理服务ChangeLog + + +## cl.screenlock.1 isLocked、unlock接口使用权限变更 +从API9开始,变更为systemapi,停止对三方应用开放。 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +基于此前版本开发的应用,需适配变更的js接口,变更前的接口已经不能正常使用了,否则会影响原有功能。 + +- 涉及接口 + +```js + function isLocked(): boolean; + function unlock(callback: AsyncCallback): void; + function unlock():Promise; +``` + +- 变更前: + +```js + * Checks whether the screen is currently locked. + * + * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. + * @syscap SystemCapability.MiscServices.ScreenLock + * @since 9 + */ + function isLocked(): boolean; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @systemapi Hide this for inner system use. + * @since 9 + */ + function unlock(callback: AsyncCallback): void; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @systemapi Hide this for inner system use. + * @since 9 + */ + function unlock():Promise; +``` + +- 变更后: + +```js + * Checks whether the screen is currently locked. + * + * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.ScreenLock + * @systemapi Hide this for inner system use. + * @since 9 + */ + function isLocked(): boolean; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @since 9 + */ + function unlock(callback: AsyncCallback): void; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @since 9 + */ + function unlock():Promise; +``` + + +**适配指导** + +该接口变更为系统应用后,三方应用已无法使用。 +系统应用可正常使用。 +示例代码如下: + +```js + try { + let ret = screenLock.isLocked(); + console.error(`Obtain whether the screen is locked successfully , ret is: ${ret}`); + } catch (error) { + console.error(`Failed to obtain whether the screen is locked, error is : ${error.code}, ${error.message}`); + } +``` + +```js + screenlock.unlock((err, data) => { + if (err) { + console.error(`Failed to unlock the screen, because: ${err.message}`); + return; + } + console.info(`unlock the screen successfully. result: ${data}`); + }); +``` + +```js + screenlock.unlock().then((data) => { + console.info(`unlock the screen successfully. result: ${data}`); + }).catch((err) => { + console.error(`Failed to unlock the screen, because: ${err.message}`); + }); +``` + + +## cl.screenlock.2 isSecure接口废弃变更 +从API9开始,废弃此接口。 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +该接口删除无法再使用,请使用进行更新使用,否则会影响原有功能。 + +- 涉及接口 + +```js + function isSecure(): boolean; +``` + +- 变更前: + +```js + function isSecure(): boolean; +``` + +- 变更后:删除接口,停止对外开放。 + + +**适配指导** + +该接口删除后无法再使用,请适配更新。 diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-telephony.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-telephony.md new file mode 100644 index 0000000000000000000000000000000000000000..cd74291d37afa9e4aee941a0e813824ede5af546 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-telephony.md @@ -0,0 +1,223 @@ +# 电话子系统ChangeLog + + + +## cl.telephony.1 call模块reject接口变更 +从API9开始,废弃此接口,改为使用rejectCall接口。 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +该接口删除无法再使用,请使用新增的接口rejectCall替换,否则会影响原有功能。 + +- 涉及接口 + +```js + function reject(callId: number, callback: AsyncCallback): void; + function reject(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void; + function reject(callId?: number, options?: RejectMessageOptions): Promise; + function reject(callback: AsyncCallback): void; + function reject(options: RejectMessageOptions, callback: AsyncCallback): void; +``` + +- 变更前: + +```js + function reject(callId: number, callback: AsyncCallback): void; + function reject(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void; + function reject(callId?: number, options?: RejectMessageOptions): Promise; + function reject(callback: AsyncCallback): void; + function reject(options: RejectMessageOptions, callback: AsyncCallback): void; +``` + +- 变更后: + +```js + function rejectCall(callId: number, callback: AsyncCallback): void; + function rejectCall(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void; + function rejectCall(callId?: number, options?: RejectMessageOptions): Promise; + function rejectCall(callback: AsyncCallback): void; + function rejectCall(options: RejectMessageOptions, callback: AsyncCallback): void; +``` + + +**适配指导** + +该接口删除无法再使用,请使用新增的接口rejectCall替换。 +使用变更后的接口,示例代码如下: + +```js +call.rejectCall("138xxxxxxxx", (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let rejectMessageOptions={ + messageContent: "拦截陌生号码" +} +let promise = call.rejectCall(1, rejectMessageOptions); +promise.then(data => { + console.log(`rejectCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`rejectCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +let rejectMessageOptions={ + messageContent: "拦截陌生号码" +} +let promise = call.rejectCall(1, rejectMessageOptions); +promise.then(data => { + console.log(`rejectCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`rejectCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +call.rejectCall((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let rejectMessageOptions={ + messageContent: "拦截陌生号码" +} +call.rejectCall(rejectMessageOptions, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## cl.telephony.2 call模块answer接口变更 +从API9开始,废弃此接口,改为使answerCall接口。 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +该接口删除无法再使用,请使用新增的接口answerCall替换,否则会影响原有功能。 + +- 涉及接口 + +```js + function answer(callId: number, callback: AsyncCallback): void; + function answer(callId?: number): Promise; + function answer(callback: AsyncCallback): void; +``` + +- 变更前: + +```js + function answer(callId: number, callback: AsyncCallback): void; + function answer(callId?: number): Promise; + function answer(callback: AsyncCallback): void; +``` + +- 变更后: + +```js + function answerCall(callId: number, callback: AsyncCallback): void; + function answerCall(callId?: number): Promise; + function answerCall(callback: AsyncCallback): void; +``` + + +**适配指导** + +该接口删除无法再使用,请使用新增的接口answerCall替换。 +使用变更后的接口,示例代码如下: + +```js +call.answerCall(1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let promise = call.answerCall(1); +promise.then(data => { + console.log(`answerCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`answerCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +call.answerCall((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## cl.telephony.1 call模块hangup接口变更 +从API9开始,废弃此接口,改为使用hangUpCall接口。 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +该接口删除无法再使用,请使用新增的接口hangUpCall替换,否则会影响原有功能。 + +- 涉及接口 + +```js + function hangup(callId: number, callback: AsyncCallback): void; + function hangup(callId?: number): Promise; + function hangup(callback: AsyncCallback): void; +``` + +- 变更前: + +```js + function hangup(callId: number, callback: AsyncCallback): void; + function hangup(callId?: number): Promise; + function hangup(callback: AsyncCallback): void; +``` + +- 变更后: + +```js + function hangUpCall(callId: number, callback: AsyncCallback): void; + function hangUpCall(callId?: number): Promise; + function hangUpCall(callback: AsyncCallback): void; +``` + + +**适配指导** + +该接口删除无法再使用,请使用新增的接口hangUpCall替换。 +使用变更后的接口,示例代码如下: + +```js +call.hangUpCall(1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let promise = call.hangUpCall(1); +promise.then(data => { + console.log(`hangUpCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`hangUpCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +call.hangUpCall((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-util.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-util.md new file mode 100644 index 0000000000000000000000000000000000000000..3455ff99e6f1a2e885acd1865b59f166d99a8c3e --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-util.md @@ -0,0 +1,99 @@ +# util系统JS API变更Changelog + +OpenHarmony 3.2.10.7(Mr)版本相较于OpenHarmony 3.2.beta4版本,util子系统的API变更如下 + +## cl.util.1.randomUUID接口名变更 +util子系统randomUUID函数名存在变更: + +function randomUUID(entropyCache?: boolean): string 改为 function generateRandomUUID(entropyCache?: boolean): string 函数名由原来的randomUUID改为generateRandomUUID。 + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 方法/属性/枚举/常量 | 变更类型 | +| :---------- | ------------------- | ------- | +| @ohos.util | function randomUUID(entropyCache?: boolean): string | 删除 | +| @ohos.util | function generateRandomUUID(entropyCache?: boolean): string| 变更 | + +**适配指导** + +应用中使用generateRandomUUID可参考下列代码 + +示例: + +```ts +import util from '@ohos.util' +let uuid = util.generateRandomUUID(true); +console.log("RFC 4122 Version 4 UUID:" + uuid); +// 输出: +// RFC 4122 Version 4 UUID:88368f2a-d5db-47d8-a05f-534fab0a0045 +``` + +## cl.util.2.randomBinaryUUID接口名变更 +util子系统randomBinaryUUID函数名存在变更: + +function randomBinaryUUID(entropyCache?: boolean): Uint8Array 改为 function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array 函数名由原来的randomBinaryUUID改为generateRandomBinaryUUID。 + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 方法/属性/枚举/常量 | 变更类型 | +| :---------- | ------------------- | ------- | +| @ohos.util | function randomBinaryUUID(entropyCache?: boolean): Uint8Array; | 删除 | +| @ohos.util | function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array| 变更 | + +**适配指导** + +应用中使用generateRandomBinaryUUID可参考下列代码 + +示例: + +```ts +import util from '@ohos.util' +let uuid = util.generateRandomBinaryUUID(true); +console.log(JSON.stringify(uuid)); +// 输出: +// 138,188,43,243,62,254,70,119,130,20,235,222,199,164,140,150 +``` + +## cl.util.3.LRUCache类contains接口参数类型变更 +util子系统LRUCache类contains接口参数类型变更: + +contains(key: object): boolean 改为 contains(key: K): boolean 参数类型由原来的object改为K。 + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| :-------- | ---------| -------------------------------- | -------- | +| @ohos.util | LRUCache | contains(key: object): boolean | 删除 | +| @ohos.util | LRUCache | contains(key: K): boolean | 变更 | + +**适配指导** + +应用中使用contains函数可参考下列代码 + +示例: + +```ts +import util from '@ohos.util' +let pro = new util.LRUCache(); +pro.put(2,10); +let obj = {1:"key"}; +let result = pro.contains(obj); +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-wallpaper.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-wallpaper.md new file mode 100644 index 0000000000000000000000000000000000000000..13baab45851959398ccf4689543f91c5e1aa1d68 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-wallpaper.md @@ -0,0 +1,304 @@ +# 主题框架子系统-壁纸管理服务ChangeLog + + +## cl.wallpaper.1 getColorsSync、getMinHeightSync、getMinWidthSync、restore、setImage接口使用权限变更 +从API9开始,变更为systemapi,停止对三方应用开放。 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +基于此前版本开发的应用,需适配变更的js接口,变更前的接口已经不能正常使用了,否则会影响原有功能。 + +- 涉及接口 + +```js + function getColorsSync(wallpaperType: WallpaperType): Array; + function getMinHeightSync(): number; + function getMinWidthSync(): number; + function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; + function restore(wallpaperType: WallpaperType): Promise; + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; +``` + +- 变更前: + +```js + /** + * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. + * @param wallpaperType Indicates the wallpaper type. + * @returns { Array } the Array returned by the function. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function getColorsSync(wallpaperType: WallpaperType): Array; + + /** + * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function getMinHeightSync(): number; + + /** + * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function getMinWidthSync(): number; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function restore(wallpaperType: WallpaperType): Promise; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; +``` + +- 变更后: + +```js + /** + * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. + * @param wallpaperType Indicates the wallpaper type. + * @returns { Array } the Array returned by the function. + * @throws {BusinessError} 401 - parameter error. + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function getColorsSync(wallpaperType: WallpaperType): Array; + + /** + * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function getMinHeightSync(): number; + + /** + * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function getMinWidthSync(): number; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function restore(wallpaperType: WallpaperType): Promise; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; +``` + + +**适配指导** + +该接口变更为系统应用后,三方应用已无法使用。 +系统应用可正常使用。 +示例代码如下: + +```js + try { + let colors = wallpaper.getColorsSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM); + console.log(`success to getColorsSync: ${JSON.stringify(colors)}`); + } catch (error) { + console.error(`failed to getColorsSync because: ${JSON.stringify(error)}`); + } +``` + +```js + let minHeight = wallpaper.getMinHeightSync(); +``` + +```js + let minWidth = wallpaper.getMinWidthSync(); +``` + +```js + wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { + if (error) { + console.error(`failed to restore because: ${JSON.stringify(error)}`); + return; + } + console.log(`success to restore.`); + }); +``` + +```js + wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { + console.log(`success to restore.`); + }).catch((error) => { + console.error(`failed to restore because: ${JSON.stringify(error)}`); + }); +``` + +```js + // source类型为string + let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; + wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { + if (error) { + console.error(`failed to setImage because: ${JSON.stringify(error)}`); + return; + } + console.log(`success to setImage.`); + }); +``` + +```js + // source类型为string + let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; + wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { + console.log(`success to setImage.`); + }).catch((error) => { + console.error(`failed to setImage because: ${JSON.stringify(error)}`); + }); +``` + + +## cl.wallpaper.2 getIdSync、getFileSync、isChangeAllowed、isUserChangeAllowed、on、off、RgbaColor接口废弃变更 +从API9开始,废弃此接口。 + +开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +该接口删除无法再使用,请使用进行更新使用,否则会影响原有功能。 + +- 涉及接口 + +```js + function getIdSync(wallpaperType: WallpaperType): number; + function getFileSync(wallpaperType: WallpaperType): number; + function isChangeAllowed(): boolean; + function isUserChangeAllowed(): boolean; + function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; + function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; + interface RgbaColor { + red: number; + green: number; + blue: number; + alpha: number; + } +``` + +- 变更前: + +```js + function getIdSync(wallpaperType: WallpaperType): number; + function getFileSync(wallpaperType: WallpaperType): number; + function isChangeAllowed(): boolean; + function isUserChangeAllowed(): boolean; + function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; + function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; + interface RgbaColor { + red: number; + green: number; + blue: number; + alpha: number; + } +``` + +- 变更后:删除接口,停止对外开放。 + + +**适配指导** + +该接口删除后无法再使用,请适配更新。 diff --git a/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-web.md b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-web.md new file mode 100644 index 0000000000000000000000000000000000000000..1fd92a86421021c0ac26639f04c56c4e5c0f01f6 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-Release/changelogs-web.md @@ -0,0 +1,467 @@ +# web子系统ChangeLog + +OpenHarmony 3.2.10.7 版本相较于OpenHarmony 之前的版本,web的API变更如下。 + +## cl.web.1 HitTestTypeV9命名变更 + +枚举类HitTestTypeV9由于命名规范问题,名称变更为WebHitTestType。 + +**变更影响** + +枚举类HitTestTypeV9,以及使用HitTestTypeV9作为参数或返回值的接口,在3.2.10.7版本及后续版本中无法继续正常使用。 + +**关键的接口/组件变更** + +- 涉及接口 + + enum HitTestTypeV9 + +- 变更前: + + ```ts + enum HitTestTypeV9 + ``` + +- 变更后: + + ```ts + enum WebHitTestType + ``` + +**适配指导** + +请使用WebHitTestType替换HitTestTypeV9。 + +## cl.web.2 HeaderV9命名变更 + +结构体HeaderV9由于命名规范问题,名称变更为WebHeader。 + +**变更影响** + +结构体HeaderV9,以及使用HeaderV9作为参数或返回值的接口,在3.2.10.7版本及后续版本中无法继续正常使用。 + +**关键的接口/组件变更** + +- 涉及接口 + + interface HeaderV9 + +- 变更前: + + ```ts + interface HeaderV9 + ``` + +- 变更后: + + ```ts + interface WebHeader + ``` + +**适配指导** + +请使用WebHeader替换HeaderV9。 + +## cl.web.3 HitTestValue结构体成员类型变更 + +结构体HitTestValue中的成员变量HitTestTypeV9由于命名规范问题,名称变更为WebHitTestType。 + +**变更影响** + +结构体HitTestValue,以及使用HitTestValue作为参数或返回值的接口,在3.2.10.7版本及后续版本中无法继续正常使用。 + +**关键的接口/组件变更** + +- 涉及接口 + + interface HitTestValue + +- 变更前: + + ```ts + interface HitTestValue { + + /** + * Get the hit test type. + * + * @since 9 + */ + type: HitTestTypeV9; + + /** + * Get the hit test extra data. + * + * @since 9 + */ + extra: string; + } + ``` + +- 变更后: + + ```ts + interface HitTestValue { + + /** + * Get the hit test type. + * + * @since 9 + */ + type: WebHitTestType; + + /** + * Get the hit test extra data. + * + * @since 9 + */ + extra: string; + } + ``` + +**适配指导** + +请使用WebHitTestType替换HitTestTypeV9。 + +## cl.web.4 loadUrl参数类型变更 + +loadUrl接口中的参数headers,由于其类型的命名规范问题,类型变更为WebHeader。 + +**变更影响** + +loadUrl接口若使用了headers参数,则在3.2.10.7版本及后续版本中无法继续正常使用。 + +**关键的接口/组件变更** + +- 涉及接口 + + loadUrl(url: string | Resource, headers?: Array): void + +- 变更前: + + ```ts + loadUrl(url: string | Resource, headers?: Array): void + ``` + +- 变更后: + + ```ts + loadUrl(url: string | Resource, headers?: Array): void + ``` + +**适配指导** + +在loadUrl中设置headers参数时,请使用WebHeader类型替换HeaderV9类型。 + +## cl.web.5 getHitTest返回值类型变更 + +getHitTest接口中的返回值,由于其类型的命名规范问题,变更为WebHitTest。 + +**变更影响** + +getHitTest接口,在3.2.10.7版本及后续版本中无法继续正常使用。 + +**关键的接口/组件变更** + +- 涉及接口 + + getHitTest(): HitTestTypeV9 + +- 变更前: + + ```ts + getHitTest(): HitTestTypeV9 + ``` + +- 变更后: + + ```ts + getHitTest(): WebHitTestType + ``` + +**适配指导** + +在使用getHitTest接口的返回值时,请使用WebHitTestType类型替换HitTestTypeV9类型。 + +## cl.web.6 WebMessagePort类迁移 + +WebMessagePort类迁移至@ohos.web.webview.d.ts,并新增错误码抛出。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现该类下接口支持错误码处理,需注意错误码处理的使用。 + +**关键的接口/组件变更** + +- 涉及接口 + + postMessageEvent(message: WebMessageEvent): void; + onMessageEvent(callback: (result: string) => void): void; + +- 变更前: + + ```ts + postMessageEvent(message: WebMessageEvent): void; + onMessageEvent(callback: (result: string) => void): void; + ``` + +- 变更后: + + ```ts + postMessageEvent(message: WebMessage): void; + onMessageEvent(callback: (result: WebMessage) => void): void; + ``` + +**适配指导** + +原WebMessagePort类不需要import,现WebMessagePort类使用的是@ohos.web.webview,以下方式import: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.7 HitTestValue类迁移 + +HitTestValue类迁移至@ohos.web.webview.d.ts,HitTestValue类变更为接口,getType,getExtra变更为属性。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。 + +**关键的接口/组件变更** + +- 涉及接口 + + getType(): HitTestType; + getExtra(): string; + +- 变更前: + + ```ts + getType(): HitTestType; + getExtra(): string; + ``` + +- 变更后: + + ```ts + type: WebHitTestType; + extra: string; + ``` + +**适配指导** + +原HitTestValue类不需要import,现HitTestValue类使用的是@ohos.web.webview,以下方式import: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.8 WebCookie类下api9接口迁移 + +WebCookie类下api9接口迁移,WebCookie类下api9接口迁移到web.webview.webview.WebCookieManager。 +并新增接口错误码抛出。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现该类下接口支持错误码处理,需注意错误码处理的使用。 +该类方法变为静态方法。 + +**关键的接口/组件变更** + +- 涉及接口 + + isCookieAllowed(): boolean; + isThirdPartyCookieAllowed(): boolean; + putAcceptCookieEnabled(accept: boolean): void; + putAcceptThirdPartyCookieEnabled(accept: boolean): void; + setCookie(url: string, value: string): boolean; + saveCookieSync(): boolean; + getCookie(url: string): string; + existCookie(): boolean; + deleteEntireCookie(): void; + deleteSessionCookie(): void; + +- 变更前: + + ```ts + isCookieAllowed(): boolean; + isThirdPartyCookieAllowed(): boolean; + putAcceptCookieEnabled(accept: boolean): void; + putAcceptThirdPartyCookieEnabled(accept: boolean): void; + setCookie(url: string, value: string): boolean; + saveCookieSync(): boolean; + getCookie(url: string): string; + existCookie(): boolean; + deleteEntireCookie(): void; + deleteSessionCookie(): void; + ``` + +- 变更后: + + ```ts + static isCookieAllowed(): boolean; + static isThirdPartyCookieAllowed(): boolean; + static putAcceptCookieEnabled(accept: boolean): void; + static putAcceptThirdPartyCookieEnabled(accept: boolean): void; + static setCookie(url: string, value: string): void; + static saveCookieAsync(): Promise; + static saveCookieAsync(callback: AsyncCallback): void; + static getCookie(url: string): string; + static existCookie(): boolean; + static deleteEntireCookie(): void; + static deleteSessionCookie(): void; + ``` + +**适配指导** + +原WebCookie类不需要import,现WebCookieManager使用的是@ohos.web.webview,以下方式import: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.9 WebController类下api9接口迁移 + +WebController类下api9接口迁移至web.webview.webview.WebviewController,并新增接口错误码抛出。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现该类下接口支持错误码处理,需注意错误码处理的使用。 +getDefaultUserAgent接口更名为getUserAgent。 + +**关键的接口/组件变更** + +- 涉及接口 + + zoomIn(): boolean; + zoomOut(): boolean; + createWebMessagePorts(): Array; + postMessage(options: { message: WebMessageEvent, uri: string}): void; + getHitTestValue(): HitTestValue; + getWebId(): number; + getDefaultUserAgent(): string; + getTitle(): string; + getPageHeight(): number; + backOrForward(step: number): void; + searchAllAsync(searchString: string): void; + clearMatches(): void; + searchNext(forward: boolean): void; + clearSslCache(): void; + clearClientAuthenticationCache(): void; + getUrl(): string; + +- 变更前: + + ```ts + zoomIn(): boolean; + zoomOut(): boolean; + createWebMessagePorts(): Array; + postMessage(options: { message: WebMessageEvent, uri: string}): void; + getHitTestValue(): HitTestValue; + getWebId(): number; + getDefaultUserAgent(): string; + getTitle(): string; + getPageHeight(): number; + backOrForward(step: number): void; + searchAllAsync(searchString: string): void; + clearMatches(): void; + searchNext(forward: boolean): void; + clearSslCache(): void; + clearClientAuthenticationCache(): void; + getUrl(): string; + ``` + +- 变更后: + + ```ts + zoomIn(): void; + zoomOut(): void; + createWebMessagePorts(): Array; + postMessage(name: string, ports: Array, uri: string): void; + getHitTestValue(): HitTestValue; + getWebId(): number; + getUserAgent(): string; + getTitle(): string; + getPageHeight(): number; + backOrForward(step: number): void; + searchAllAsync(searchString: string): void; + clearMatches(): void; + searchNext(forward: boolean): void; + clearSslCache(): void; + clearClientAuthenticationCache(): void; + getUrl(): string; + ``` + +**适配指导** + +原WebController类不需要import,现WebviewController类使用的是@ohos.web.webview,以下方式import: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.10 WebAsyncController类迁移 + +WebAsyncController类下接口迁移至web.webview.webview.WebviewController,并新增接口错误码抛出。 + +**变更影响** + +基于此前版本开发的应用,需注意错误码处理的使用。 + +**关键的接口/组件变更** + +- 涉及接口 + + storeWebArchive(baseName: string, autoName: boolean): Promise; + storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; + +- 变更前: + + ```ts + storeWebArchive(baseName: string, autoName: boolean): Promise; + storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; + ``` + +- 变更后: + + ```ts + storeWebArchive(baseName: string, autoName: boolean): Promise; + storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; + ``` + +**适配指导** + +使用示例: + + ```ts + // xxx.ets + import web_webview from '@ohos.web.webview' + + @Entry + @Component + struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + + build() { + Column() { + Button('saveWebArchive') + .onClick(() => { + try { + this.controller.storeWebArchive("/data/storage/el2/base/", true, (error, filename) => { + if (error) { + console.info(`save web archive error: ` + JSON.stringify(error)) + return; + } + if (filename != null) { + console.info(`save web archive success: ${filename}`) + } + }); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + }) + Web({ src: 'www.example.com', controller: this.controller }) + } + } + } + ``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/Readme.md b/zh-cn/release-notes/changelogs/v3.2-beta5/Readme.md new file mode 100644 index 0000000000000000000000000000000000000000..d8a99235b333491bbc60f91c31083b23e7a084ec --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/Readme.md @@ -0,0 +1,26 @@ +# Readme + +- [元能力](changelogs-ability.md) +- [帐号](changelogs-account_os_account.md) +- [ArkUI](changelogs-arkui.md) +- [多媒体-相机](changelogs-camera-sync.md) +- [公共基础类库-容器](changelogs-container.md) +- [分布式数据管理](changelogs-distributeddatamgr.md) +- [文件管理](changelogs-filemanagement.md) +- [输入法框架](changelogs-inputmethod-framworks.md) +- [文件管理-媒体库](changelogs-mediaLibrary.md) +- [多媒体](changelogs-multimedia.md) +- [基础通信-NFC](changelogs-nfc.md) +- [事件通知](changelogs-notification.md) +- 位置服务 + - [ohos.geoLocationManager](changelogs-ohos-geoLocationManager.md) + - [ohos.geoLocation](changelogs-ohos-geolocation.md) + - [system.geolocation](changelogs-system-geolocation.md) +- [上传下载](changelogs-request.md) +- [资源调度](changelogs-resourceschedule.md) +- [安全](changelogs-security.md) +- [电话服务](changelogs-telephony.md) +- [时间服务](changelogs-time.md) +- [公共基础类库-URL](changelogs-url.md) +- [用户IAM](changelogs-useriam.md) +- [窗口](changelogs-window.md) diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelog-x-x.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelog-x-x.md new file mode 100644 index 0000000000000000000000000000000000000000..b20dbfc1fc13ba0dc94a8044119ac0ae2473cfb7 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelog-x-x.md @@ -0,0 +1,31 @@ +# xxx子系统ChangeLog + +相比最近一个发布版本(包括不限于LTS、Release、Beta、monthly版本)发生了影响契约兼容性(契约兼容:也称语义兼容,指版本演进后,开发者原有程序行为不发生变化)的变更(包括不限于接口名、参数、返回值、所需要的权限、调用顺序、枚举值、配置参数、路径等),则需要在ChangeLog中对变更进行阐述。 + +## cl.subsystemname.x xxx功能变更, 例:DeviceType属性变更、相机权限变更(尽量概括,不要超过15个字) + +每个变更标题前需要附加编号:cl.subsystemname.x。cl为ChangeLog首字母缩写,subsystemname请填写子系统英文标准名称,x表示变更序号(从低到高逐位增加,起始为1)。 +以功能维度对变更点进行概括描述。例如:xxx功能的xxx、xxx等发生了xxx变化,开发者需要根据以下说明对应用进行适配。 +如果有此变更有对应的需求或设计文档,可以在描述中附上对应的设计文档编号。 + +**变更影响** + +是否影响已发布的接口或者接口行为发生变更,影响的是JS接口还是Native接口。 +是否影响在此前版本已开发的应用,即应用是否需要进行适配动才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** + +列举此功能变更涉及的接口/组件变更。 + +**适配指导(可选,不涉及则可以删除)** + +提供指导,帮助开发者针对相关变更进行适配,使应用可以与新版本兼容。 +例: +在xxx文件中将xxx参数修改为xxx。 + +``` +sample code +``` + + + diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ability.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..27f0f6ead460e4c49ab60f1c4af64f84a2727cb9 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ability.md @@ -0,0 +1,175 @@ +# 元能力子系统JS API变更Changelog + +## cl.ability.1 接口迁移 +ability子系统UIAbilityContext的接口requestPermissionsFromUser迁移到security子系统: + +之前权限弹窗应用是基于UIAbility实现的,需要借助于UIAbilityContext的startAbilityForResult接口把授权结果带回给调用方,故把requestPermissionsFromUser接口暂时放在UIAbilityContext中。现在权限弹窗应用切换为基于ServiceExtensionAbility实现,不再需要借助UIAbilityContext的startAbilityForResult接口,因此把requestPermissionsFromUser接口迁移到security子系统。 + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| application/UIAbilityContext | UIAbilityContext | requestPermissionsFromUser(permissions: Array, requestCallback: AsyncCallback): void; | 删除 | +| application/UIAbilityContext | UIAbilityContext | requestPermissionsFromUser(permissions: Array): Promise; | 删除 | +| @ohos.abilityAccessCtrl | AtManager | requestPermissionsFromUser(context: Context, permissions: Array, requestCallback: AsyncCallback) : void; | 新增 | +| @ohos.abilityAccessCtrl | AtManager | requestPermissionsFromUser(context: Context, permissions: Array) : Promise; | 新增 | + + +**适配指导** + +应用中调用requestPermissionsFromUser拉起权限弹窗应用可参考下列代码 + +Stage模型下的示例: + +```ts +import abilityAccessCtrl from '@ohos.abilityAccessCtrl.d.ts'; +//UIAbility的onWindowStageCreate生命周期 +onWindowStageCreate() { + let AtManager = abilityAccessCtrl.createAtManager(); + //requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗 + AtManager.requestPermissionsFromUser(this.context, ["ohos.permission.MANAGE_DISPOSED_APP_STATUS"]).then((data) => { + console.log("data type:" + typeof(data)); + console.log("data:" + data); + console.log("data permissions:" + data.permissions); + console.log("data result:" + data.authResults); + }).catch((err) => { + console.error('Failed to start ability', err.code); + }) +} +``` + + + +## cl.ability.2 删除标记为废弃的API9接口 + +元能力异常处理整改将部分API9接口标记为了废弃,根据OpenHarmony接口规范,需要删除标记为废弃的API9接口。 + +**变更影响** + +基于此前版本开发的应用,需要将被删除的接口替换为新接口,否则会影响应用编译。 + +**关键接口/组件变更** + +接口文件被删除: + +| 被删除接口 | 新接口 | +| ----------------------------------------------- | ----------------------------------------------- | +| @ohos.application.Ability.d.ts | @ohos.app.ability.UIAbility.d.ts | +| @ohos.application.AbilityConstant.d.ts | @ohos.app.ability.AbilityConstant.d.ts | +| @ohos.application.AbilityLifecycleCallback.d.ts | @ohos.app.ability.AbilityLifecycleCallback.d.ts | +| @ohos.application.AbilityStage.d.ts | @ohos.app.ability.AbilityStage.d.ts | +| @ohos.application.EnvironmentCallback.d.ts | @ohos.app.ability.EnvironmentCallback.d.ts | +| @ohos.application.ExtensionAbility.d.ts | @ohos.app.ability.ExtensionAbility.d.ts | +| @ohos.application.FormExtension.d.ts | @ohos.app.form.FormExtensionAbility.d.ts | +| @ohos.application.ServiceExtensionAbility.d.ts | @ohos.app.ability.ServiceExtensionAbility.d.ts | +| @ohos.application.StartOptions.d.ts | @ohos.app.ability.StartOptions.d.ts | +| @ohos.application.context.d.ts | @ohos.app.ability.common.d.ts | +| @ohos.application.errorManager.d.ts | @ohos.app.ability.errorManager.d.ts | + +接口、属性被删除: + +- @ohos.application.Configuration.d.ts + - Configuration 的 direction、screenDensity、displayId、hasPointerDevice 被删除。可以使用 @ohos.app.ability.Configuration.d.ts 的 Configuration替换。 +- @ohos.application.ConfigurationConstant.d.ts + - 枚举 Direction 和 ScreenDensity 被删除。可以使用 @ohos.app.ability.ConfigurationConstant.d.ts 的枚举 Direction 和 ScreenDensity 替换。 +- @ohos.application.abilityManager.d.ts + - 方法 getExtensionRunningInfos 和 getTopAbility 被删除。可以使用 @ohos.app.ability.abilityManager.d.ts 的同名方法替换。 +- @ohos.application.appManager.d.ts + - 枚举 ApplicationState 和 ProcessState 被删除。可以使用 @ohos.app.ability.appManager.d.ts 的枚举 ApplicationState 和 ProcessState 替换。 + - 方法 registerApplicationStateObserver 和 getProcessRunningInformation被删除。可以使用 @ohos.app.ability.appManager.d.ts 的同名方法替换。 +- @ohos.application.formHost.d.ts + - 方法 shareForm 和 notifyFormsPrivacyProtected 被删除。可以使用 @ohos.app.form.formHost.d.ts 的同名方法替换。 +- @ohos.application.formInfo.d.ts + - 枚举 FormType 的 eTS 被删除,可以使用 @ohos.app.form.formInfo.d.ts 的 FormType 中的 eTS 替换。 + - 枚举 FormParam 的 IDENTITY_KEY、BUNDLE_NAME_KEY、ABILITY_NAME_KEY、DEVICE_ID_KEY 被删除,可以使用 @ohos.app.form.formInfo.d.ts 的 FormParam 中的同名枚举替换。 + - 接口 FormInfoFilter 被删除。可以使用 @ohos.app.form.formInfo.d.ts 的 FormInfoFilter 替换。 + - 枚举 FormDimension 被删除。可以使用 @ohos.app.form.formInfo.d.ts 的 FormDimension 替换。 + - 枚举 VisibilityType 被删除。可以使用 @ohos.app.form.formInfo.d.ts 的 VisibilityType 替换。 +- @ohos.wantAgent.d.ts + - 方法 trigger 和 getOperationType 被删除。可以使用 @ohos.app.ability.wantAgent.d.ts 的同名方法替换。 +- application/ApplicationContext.d.ts + - 方法 registerAbilityLifecycleCallback、unregisterAbilityLifecycleCallback、registerEnvironmentCallback、unregisterEnvironmentCallback 被删除。可以使用 on、off 替换。 +- application/ServiceExtensionContext.d.ts + - 方法 connectAbility、connectAbilityWithAccount、disconnectAbility 被删除。可以使用 connectServiceExtensionAbility、connectServiceExtensionAbilityWithAccount、disconnectServiceExtensionAbility 替换。 +- @ohos.application.FormExtension.d.ts + - 生命周期onCreate、onCastToNormal、onUpdate、onVisibilityChange、onEvent、onDestroy、onAcquireFormState、onShare 被删除。可以使用@ohos.app.form.FormExtensionAbility.d.ts的onAddForm、onCastToNormalForm、onUpdateForm、onChangeFormVisibility、onFormEvent、onRemoveForm、onAcquireFormState、onShareForm +- @ohos.application.abilityDelegatorRegistry.d.ts + - 导出类 AbilityDelegator、AbilityDelegatorArgs、AbilityMonitor、ShellCmdResult 被删除。可以使用@ohos.app.ability.abilityDelegatorRegistry.d.ts中的同名导出类替换。 +- @ohos.application.abilityManager.d.ts + - 导出类 AbilityRunningInfo、ExtensionRunningInfo 被删除。可以使用@ohos.app.ability.abilityManager.d.ts中的同名导出类替换。 +- @ohos.application.appManager.d.ts + - 导出类 AbilityStateData、AppStateData、ApplicationStateObserver、ProcessRunningInfo、ProcessRunningInformation 被删除。可以使用@ohos.app.ability.appManager.d.ts中的同名导出类替换。 +- @ohos.application.missionManager.d.ts + - 导出类 MissionInfo、MissionListener、MissionSnapshot 被删除。可以使用@ohos.app.ability.missionManager.d.ts中的同名导出类替换。 +- @ohos.wantAgent.d.ts + - 导出类 TriggerInfo、WantAgentInfo 被删除。可以使用@ohos.app.ability.wantAgent.d.ts中的同名导出类替换。 + + + + + +**适配指导** + +如上所述,仅少数接口修改了接口名的如注册回调函数(registerAbilityLifecycleCallback、unregisterAbilityLifecycleCallback、registerEnvironmentCallback、unregisterEnvironmentCallback)和连接断开 ServiceExtensionAbility(connectAbility、connectAbilityWithAccount、disconnectAbility),卡片生命周期等需要替换成新的接口名。 + +绝大多数接口平移到了新的namespace中,所以可以通过修改import来解决适配问题: + +如原先接口使用了@ohos.application.Ability + +```js +import Ability from '@ohos.application.Ability'; +``` + +可以通过直接修改import,来切换到新的namespace上: + +```js +import Ability from '@ohos.app.ability.UIAbility'; +``` + +此外还需要适配异常处理,具体参考新接口的接口文档。 + +## cl.ability.3 appRecovery接口中RestartFlag属性名称变更,删除了未支持的属性 + +appRecovery接口中RestartFlag枚举命名从特定故障发生后**不重启**改成了特定故障发生后**重启**。 +删除了CPP_CRASH_NO_RESTART。 + +**变更影响** + +3.2.10.6版本之前使用CPP_CRASH_NO_RESTART/JS_CRASH_NO_RESTART/APP_FREEZE_NO_RESTART类型开发的应用,在3.2.10.6版本之后行为会发生变化。 + +**关键接口/组件变更** + +**RestartFlag** 9+ + +变更前: + +| 名称 | 值 | 说明 | +| --------------------- | ------ | -------------------------------- | +| ALWAYS_RESTART | 0 | 总是重启应用。 | +| CPP_CRASH_NO_RESTART | 0x0001 | 发生CPP_CRASH时**不重启**应用。 | +| JS_CRASH_NO_RESTART | 0x0002 | 发生JS_CRASH时**不重启**应用。 | +| APP_FREEZE_NO_RESTART | 0x0004 | 发生APP_FREEZE时**不重启**应用。 | +| NO_RESTART | 0xFFFF | 总是不重启应用。 | + +变更后: + +| 名称 | 值 | 说明 | +| ----------------------- | ------ | ------------------------------ | +| ALWAYS_RESTART | 0 | 总是重启应用。 | +| CPP_CRASH_NO_RESTART | NA | **删除**,不支持该场景的重启。 | +| RESTART_WHEN_JS_CRASH | 0x0001 | 发生JS_CRASH时**重启**应用。 | +| RESTART_WHEN_APP_FREEZE | 0x0002 | 发生APP_FREEZE时**重启**应用。 | +| NO_RESTART | 0xFFFF | 总是不重启应用。 | + +**适配指导** + +按新的语义进行适配。 + + + diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md new file mode 100644 index 0000000000000000000000000000000000000000..8b8cad7dbf026cb17c1599e61ebdbae510073a30 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md @@ -0,0 +1,96 @@ +# 帐号子系统changeLog + +## cl.account_os_account.1 createOsAccountForDomain错误码变更 + +使用createOsAccountForDomain重复创建域帐号时,变更前返回的错误码为12300001,变更后返回的错误码为12300004。 +错误信息由通用系统报错细化为帐号已存在报错。 + +**变更影响** + +基于此前版本开发的应用,需适配变更后的错误码,否则会影响原有业务逻辑。 + +**关键接口/组件变更** +- AccountManager + - createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback<OsAccountInfo>); + - createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo): Promise<OsAccountInfo>; + +**适配指导** + +重复创建域帐号的示例代码如下: + +```ts +import account_osAccount from "@ohos.account.osAccount" + +let accountMgr = account_osAccount.getAccountManager(); +let domainInfo = { + accountName: "zhangsan", + domain: "china.example.com" +}; +try { + await accountMgr.createOsAccountForDomain(account_osAccount.OsAccountType.NORMAL, domainInfo); + await accountMgr.createOsAccountForDomain(account_osAccount.OsAccountType.NORMAL, domainInfo); +} catch (err) { + console.log("activateOsAccount err: " + JSON.stringify(err)); // error.code = 12300004; +} +``` + +## cl.account_os_account.2 应用帐号getAllAccounts接口权限场景变更 + +应用使用getAllAccounts接口查询自己可访问的帐号列表时,不需要申请权限ohos.permission.GET_ALL_APP_ACCOUNTS。 + +**变更影响** + +基于此后版本开发的应用,查询自己可访问的帐号列表时,无需申请权限。 + +**关键接口/组件变更** +- AccountManager + - getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void; + - getAllAccounts(): Promise<Array<AppAccountInfo>>; + +**适配指导** + +应用未申请ohos.permission.GET_ALL_APP_ACCOUNTS,查询自己可访问的帐号列表示例代码如下: + +```ts +import account_appAccount from "@ohos.account.appAccount" + +let accountMgr = account_appAccount.createAppAccountManager(); +try { + await accountMgr.addAccount("accessibleAccount_promise_nopermission"); + var data = await accountMgr.getAllAccounts(); + if (data[0].name == "accessibleAccount_promise_nopermission") { + console.log("getAllAccounts successfully"); + } +} catch (err) { + console.log("getAllAccounts err: " + JSON.stringify(err)); +} +``` + +## cl.account_os_account.3 应用帐号getAccountsByOwner接口权限场景变更 + +应用使用getAccountsByOwner接口查询可访问的指定应用的帐号列表时,不需要申请权限ohos.permission.GET_ALL_APP_ACCOUNTS。 + +**变更影响** + +基于此后版本开发的应用,查询指定应用可访问的帐号列表时,无需申请权限。 + +**关键接口/组件变更** +- AccountManager + - getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void; + - getAccountsByOwner(owner: string): Promise<Array<AppAccountInfo>>; + +**适配指导** + +应用未申请ohos.permission.GET_ALL_APP_ACCOUNTS,查询指定应用可访问的帐号列表示例代码如下: + +```ts +import account_appAccount from "@ohos.account.appAccount" + +let accountMgr = account_appAccount.createAppAccountManager(); +try { + var ownerName = "com.example.owner"; + var data = await accountMgr.getAllAccounts(ownerName); +} catch (err) { + console.log("getAllAccounts err: " + JSON.stringify(err)); +} +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..d661cf1d84f2b2c6b06bb8102d30455fb07a7e43 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md @@ -0,0 +1,332 @@ +# arkui子系统ChangeLog + +## cl.arkui.1 状态变量数据类型声明使用限制 + +1. 所有的状态装饰器变量需要显式声明变量类型,不允许声明any,不支持Date数据类型。 + + 示例: + + ```ts + // xxx.ets + @Entry + @Component + struct DatePickerExample { + // 错误写法: @State isLunar: any = false + @State isLunar: boolean = false + // 错误写法: @State selectedDate: Date = new Date('2021-08-08') + private selectedDate: Date = new Date('2021-08-08') + + build() { + Column() { + Button('切换公历农历') + .margin({ top: 30 }) + .onClick(() => { + this.isLunar = !this.isLunar + }) + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2100-1-1'), + selected: this.selectedDate + }) + .lunar(this.isLunar) + .onChange((value: DatePickerResult) => { + this.selectedDate.setFullYear(value.year, value.month, value.day) + console.info('select current date is: ' + JSON.stringify(value)) + }) + + }.width('100%') + } + } + ``` + + ![datePicker](../../../application-dev/reference/arkui-ts/figures/datePicker.gif) + +2. @State、@Provide、 @Link和@Consume四种状态变量的数据类型声明只能由简单数据类型或引用数据类型的其中一种构成。 + + 类型定义中的Length、ResourceStr、ResourceColor三个类型是简单数据类型或引用数据类型的组合,所以不能被以上四种状态装饰器变量使用。 + Length、ResourceStr、ResourceColor的定义请看文档[arkui-ts类型定义](../../../application-dev/reference/arkui-ts/ts-types.md)。 + + 示例: + + ```ts + // xxx.ets + @Entry + @Component + struct IndexPage { + // 错误写法: @State message: string | Resource = 'Hello World' + @State message: string = 'Hello World' + // 错误写法: @State message: ResourceStr = $r('app.string.hello') + @State resourceStr: Resource = $r('app.string.hello') + + build() { + Row() { + Column() { + Text(`${this.message}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } + } + ``` + + ![hello](../../../application-dev/quick-start/figures/hello.PNG) + +**变更影响** + +1. 如果状态装饰器变量没有显式声明变量类型,声明any,编译拦截报错; + ```ts + // ArkTS:ERROR Please define an explicit type, not any. + @State isLunar: any = false + ``` +2. 状态装饰器变量声明变量类型为Date,编译拦截报错; + ```ts + // ArkTS:ERROR The @State property 'selectedDate' cannot be a 'Date' object. + @State selectedDate: Date = new Date('2021-08-08') + ``` +3. @State、@Provide、 @Link和@Consume四种状态变量使用框架提供的Length、ResourceStr、ResourceColor, + 编译拦截报错。 + ```ts + /* ArkTS:ERROR The state variable type here is 'ResourceStr', it contains both a simple type and an object type, + which are not allowed to be defined for state variable of a struct.*/ + @State message: ResourceStr = $r('app.string.hello') + ``` + +**关键的接口/组件变更** + +不涉及。 + +**适配指导** + +1. 状态装饰器变量声明具体的变量类型替代any; +2. 使用Date对象的状态装饰器变量,修改为不加状态装饰器修饰的常规变量; +3. 因为Length(string|number|Resource), ResourceStr(string|Resource), ResourceColor(string|number|Color|Resource) + 的三个类型是简单数据类型或引用数据类型的组合,使用@State、@Provide、 @Link和@Consume四种状态变量场景参考以下修改: + ```ts + // 错误写法: + @State message: ResourceStr = $r('app.string.hello') + // 修正后的写法: + @State resourceStr: Resource = $r('app.string.hello') + ``` + + +## cl.arkui.2 自定义组件成员变量初始化的规则与约束 + +通过构造函数方法初始化成员变量,需要遵循如下规则: + +| **从父组件中的变量(右)到子组件中的变量(下)** | **regular** | **@State** | **@Link** | **@Prop** | **@Provide** | **@Consume** | **@ObjectLink** | +|---------------------------------|----------------------------|------------|-----------|-----------|--------------|--------------|------------------| +| **regular** | 支持 | 支持 | 支持 | 支持 | 不支持 | 不支持 | 支持 | +| **@State** | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | +| **@Link** | 不支持 | 支持(1) | 支持(1) | 支持(1) | 支持(1) | 支持(1) | 支持(1) | +| **@Prop** | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | +| **@Provide** | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | +| **@Consume** | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | +| **@ObjectLink** | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | + +| **从父组件中的变量(右)到子组件中的变量(下)** | **@StorageLink** | **@StorageProp** | **@LocalStorageLink** | **@LocalStorageProp** | +|------------------|------------------|------------------|-----------------------|------------------------| +| **regular** | 支持 | 不支持 | 不支持 | 不支持 | +| **@State** | 支持 | 支持 | 支持 | 支持 | +| **@Link** | 支持(1) | 支持(1) | 支持(1) | 支持(1) | +| **@Prop** | 支持 | 支持 | 支持 | 支持 | +| **@Provide** | 支持 | 支持 | 支持 | 支持 | +| **@Consume** | 不支持 | 不支持 | 不支持 | 不支持 | +| **@ObjectLink** | 不支持 | 不支持 | 不支持 | 不支持 | + +> **说明** +> +> **支持(1)**:必须使用`$`, 例如 `this.$varA`。 +> **regular**:未加修饰的常规变量。 + +不允许从父组件初始化`@StorageLink`, `@StorageProp`, `@LocalStorageLink`, `@LocalStorageProp`修饰的变量。 + +**变更影响** + +1. 不允许从父组件初始化`@LocalStorageLink`, `@LocalStorageProp`修饰的变量。 + ```ts + @Entry + @Component + struct LocalStorageComponent { + build() { + Column() { + Child({ + /* ArkTS:ERROR Property 'simpleVarName' in the custom component 'Child' cannot + initialize here (forbidden to specify). */ + simpleVarName: 1, + /* ArkTS:ERROR Property 'objectName' in the custom component 'Child' cannot + initialize here (forbidden to specify). */ + objectName: new ClassA("x") + }) + } + } + } + @Component + struct Child { + @LocalStorageLink("storageSimpleProp") simpleVarName: number = 0; + @LocalStorageProp("storageObjectProp") objectName: ClassA = new ClassA("x"); + build() {} + } + ``` +2. 子组件的@ObjectLink变量不支持父组件装饰器变量的直接赋值,其父组件的源必须是数组的项或对象的属性,该数组或对象必现用`@State`、`@Link`、`@Provide`、`@Consume`或`@ObjectLink`装饰器修饰。 + ```ts + let NextID : number = 0; + + @Observed class ClassA { + public id : number; + public c: number; + constructor(c: number) { + this.id = NextID++; + this.c = c; + } + } + + @Component + struct Child { + @ObjectLink varA : ClassA; + build() { + Row() { + Text('ViewA-' + this.varA.id) + } + } + } + + @Component + struct Parent { + @Link linkValue: ClassA + build() { + Column() { + /* ArkTS:ERROR The @Link property 'linkValue' cannot be assigned to + the @ObjectLink property 'varA'.*/ + Child({ varA: this.linkValue }) + } + } + } + ``` + +**关键的接口/组件变更** + +不涉及。 + +**适配指导** +1. 构造子组件时,不对子组件的`@LocalStorageLink`, `@LocalStorageProp`修饰的变量进行。 +如果需要在父组件中修改子组件的`@LocalStorageLink`, `@LocalStorageProp`修饰的变量,则使用LocalStorage提供的API接口方法(比如set方法)赋值。 +2. @ObjectLink的使用指导请参考文档@ObjectLink使用指导。 + + +## cl.arkui.LocalStorage.1 get接口返回类型变更 + +**变更影响** + +返回类型从get(propName: string): T变更为get(propName: string): T | undefined +应用不需要进行适配。 + +## cl.arkui.LocalStorage.2 setOrCreate参数newValue变成必选 +**变更影响** + +原接口声明: +```js +setOrCreate(propName: string, newValue?: T): boolean +``` +现接口声明: +```js +setOrCreate(propName: string, newValue: T): boolean +``` +第二个参数newValue变为必选。 +如果应用调用这个接口没有指定newValue参数,在替换新的sdk后会编译不过,需要手动指定newValue。 + +**适配指导** + +```js +let storage = new LocalStorage(); +storage.setOrCreate('propA', 'hello'); +``` +## cl.arkui.LocalStorage.3 link参数和返回类型变更 +**变更影响** + +原接口声明: +```js +link(propName: string, linkUser?: T, subscribersName?: string): T +``` +现接口声明: +```js +link(propName: string): SubscribedAbstractProperty +``` +1. link第二三个参数为框架内部调用,不应对外开发,所以将接口变更为一个参数; +2. 返回类型T变更为SubscribedAbstractProperty; + +**适配指导** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let linA = storage.link("PropA"); +linA.set(50); +``` + +## cl.arkui.LocalStorage.4 setAndLink参数和返回类型变更 +**变更影响** + +原接口声明: +```js +setAndLink(propName: string, defaultValue: T, linkUser?: T, subscribersName?: string): T +``` +现接口声明: +```js +setAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty +``` +1. setAndLink第三四个参数为框架内部调用,不应对外开发,所以将接口变更为2个参数; +2. 返回类型T变更为SubscribedAbstractProperty; + +**适配指导** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let linA = storage.setAndLink("PropA", "48") +linA.set(50); +``` + +## cl.arkui.LocalStorage.5 prop参数和返回类型变更 +**变更影响** + +原接口声明: +```js +prop(propName: string, propUser?: T, subscribersName?: string): T +``` +现接口声明: +```js +prop(propName: string): SubscribedAbstractProperty +``` +1. prop第二三个参数为框架内部调用,不应对外开发,所以将接口变更为1个参数; +2. 返回类型T变更为SubscribedAbstractProperty; + +**适配指导** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let propA = storage.prop("PropA"); +propA.set(51); // one-way sync +``` + +## cl.arkui.LocalStorage.6 setAndProp参数和返回类型变更 +**变更影响** + +原接口声明: +```js +setAndProp(propName: string, defaultValue: T, propUser?: T, subscribersName?: string): T +``` +现接口声明: +```js +setAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty +``` +1. setAndProp第三四个参数为框架内部调用,不应对外开发,所以将接口变更为2个参数; +2. 返回类型T变更为SubscribedAbstractProperty; + +**适配指导** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let propA = storage.setAndProp("PropA", "48"); +propA.set(51); // one-way sync +``` diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md new file mode 100644 index 0000000000000000000000000000000000000000..3f5cd56d576151dc37ab56f50301a4d4443a271a --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md @@ -0,0 +1,520 @@ +# 媒体子系统 JS API 变更 Changelog + +## cl.subsystemname.1 camera 接口变更 +1. camera 部件在 API9 版本全量改为 SystemAPI +2. 基于以下原因新增部分功能接口以及废弃部分接口: + +提升开发者使用相机接口的便利。 +帮助开发者快速掌握相机开发接口,快速投入到开发当中。 +易于后续版本中框架功能的扩展,降低框架模块之间的耦合度。 + +具体参考下方变更内容,开发者需要根据以下说明对应用进行适配。 + +**变更影响** + +影响 API9 版本的 JS 接口,应用需要进行适配才可以在新版本 SDK 环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 是否为 SystemApi | 变更类型 | +| ---------------------- | ----------------------- | ------------------------------------------------------------ | --------------- | -------- | +| ohos.multimedia.camera | camera | function getCameraManager(context: Context): CameraManager; | 是 | 新增 | +| ohos.multimedia.camera | camera | function getCameraManager(context: Context, callback: AsyncCallback): void;
function getCameraManager(context: Context): Promise; | 是 | 废弃 | +| ohos.multimedia.camera | CameraErrorCode | INVALID_ARGUMENT = 7400101,
OPERATION_NOT_ALLOWED = 7400102,
SESSION_NOT_CONFIG = 7400103,
SESSION_NOT_RUNNING = 7400104,
SESSION_CONFIG_LOCKED = 7400105,
DEVICE_SETTING_LOCKED = 7400106,
CONFILICT_CAMERA = 7400107,
DEVICE_DISABLED = 7400108,
SERVICE_FATAL_ERROR = 7400201 | 是 | 新增 | +| ohos.multimedia.camera | CameraManager | getSupportedCameras(): Array;
getSupportedOutputCapability(camera: CameraDevice): CameraOutputCapability;
createCameraInput(camera: CameraDevice): CameraInput;
createCameraInput(position: CameraPosition, type: CameraType): CameraInput;
createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput;
createPhotoOutput(profile: Profile, surfaceId: string): PhotoOutput;
createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput;
createMetadataOutput(metadataObjectTypes: Array): MetadataOutput;
createCaptureSession(): CaptureSession; | 是 | 新增 | +| ohos.multimedia.camera | CameraManager | getSupportedCameras(callback: AsyncCallback>): void;
getSupportedCameras(): Promise>;
getSupportedOutputCapability(camera: CameraDevice, callback: AsyncCallback): void;
getSupportedOutputCapability(camera: CameraDevice): Promise;
createCameraInput(camera: CameraDevice, callback: AsyncCallback): void;
createCameraInput(camera: CameraDevice): Promise;
createCameraInput(position: CameraPosition, type: CameraType, callback: AsyncCallback): void;
createCameraInput(position: CameraPosition, type: CameraType): Promise;
createPreviewOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void;
createPreviewOutput(profile: Profile, surfaceId: string): Promise;
createPhotoOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void;
createPhotoOutput(profile: Profile, surfaceId: string): Promise;
createVideoOutput(profile: VideoProfile, surfaceId: string, callback: AsyncCallback): void;
createVideoOutput(profile: VideoProfile, surfaceId: string): Promise;
createMetadataOutput(metadataObjectTypes: Array, callback: AsyncCallback): void;
createMetadataOutput(metadataObjectTypes: Array): Promise;
createCaptureSession(callback: AsyncCallback): void;
createCaptureSession(): Promise; | 是 | 废弃 | +| ohos.multimedia.camera | CameraType | CAMERA_TYPE_DEFAULT = 0 | 是 | 新增 | +| ohos.multimedia.camera | CameraType | CAMERA_TYPE_UNSPECIFIED = 0 | 是 | 废弃 | +| ohos.multimedia.camera | CameraInput | on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; | 是 | 新增 | +| ohos.multimedia.camera | CameraInput | release(callback: AsyncCallback): void;
release(): Promise;
on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; | 是 | 废弃 | +| ohos.multimedia.camera | CameraInputErrorCode | ERROR_UNKNOWN = -1
ERROR_NO_PERMISSION = 0
ERROR_DEVICE_PREEMPTED = 1
ERROR_DEVICE_DISCONNECTED = 2
ERROR_DEVICE_IN_USE = 3
ERROR_DRIVER_ERROR = 4 | 是 | 废弃 | +| ohos.multimedia.camera | CameraInputError | code: CameraInputErrorCode | 是 | 废弃 | +| ohos.multimedia.camera | CaptureSession | beginConfig(): void;
addInput(cameraInput: CameraInput): void;
removeInput(cameraInput: CameraInput): void;
addOutput(cameraOutput: CameraOutput): void;
removeOutput(cameraOutput: CameraOutput): void;
hasFlash(): boolean;
isFlashModeSupported(flashMode: FlashMode): boolean;
getFlashMode(): FlashMode;
setFlashMode(flashMode: FlashMode): void;
isExposureModeSupported(aeMode: ExposureMode): boolean;
getExposureMode(): ExposureMode;
setExposureMode(aeMode: ExposureMode): void;
getMeteringPoint(): Point;
setMeteringPoint(point: Point): void;
getExposureBiasRange(): Array;
setExposureBias(exposureBias: number): void;
getExposureValue(): number;
isFocusModeSupported(afMode: FocusMode): boolean;
getFocusMode(): FocusMode;
setFocusMode(afMode: FocusMode): void;
setFocusPoint(point: Point): void;
getFocusPoint(): Point;
getFocalLength(): number;
getZoomRatioRange(): Array;
getZoomRatio(): number;
setZoomRatio(zoomRatio: number): void;
isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean;
getActiveVideoStabilizationMode(): VideoStabilizationMode;
setVideoStabilizationMode(mode: VideoStabilizationMode): void;
on(type: 'error', callback: ErrorCallback): void; | 是 | 新增 | +| ohos.multimedia.camera | CaptureSession | beginConfig(callback: AsyncCallback): void;
beginConfig(): Promise;
addInput(cameraInput: CameraInput, callback: AsyncCallback): void;
addInput(cameraInput: CameraInput): Promise;
removeInput(cameraInput: CameraInput, callback: AsyncCallback): void;
removeInput(cameraInput: CameraInput): Promise;
addOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void;
addOutput(cameraOutput: CameraOutput): Promise;
removeOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void;
removeOutput(cameraOutput: CameraOutput): Promise;
hasFlash(callback: AsyncCallback): void;
hasFlash(): Promise;
isFlashModeSupported(flashMode: FlashMode, callback: AsyncCallback): void;
isFlashModeSupported(flashMode: FlashMode): Promise;
getFlashMode(callback: AsyncCallback): void;
getFlashMode(): Promise;
setFlashMode(flashMode: FlashMode, callback: AsyncCallback): void;
setFlashMode(flashMode: FlashMode): Promise;
isExposureModeSupported(aeMode: ExposureMode, callback: AsyncCallback): void;
isExposureModeSupported(aeMode: ExposureMode): Promise;
getExposureMode(callback: AsyncCallback): void;
getExposureMode(): Promise;
setExposureMode(aeMode: ExposureMode, callback: AsyncCallback): void;
setExposureMode(aeMode: ExposureMode): Promise;
getMeteringPoint(callback: AsyncCallback): void;
getMeteringPoint(): Promise;
setMeteringPoint(point: Point, callback: AsyncCallback): void;
setMeteringPoint(point: Point): Promise;
getExposureBiasRange(callback: AsyncCallback>): void;
getExposureBiasRange(): Promise>;
setExposureBias(exposureBias: number, callback: AsyncCallback): void;
setExposureBias(exposureBias: number): Promise;
getExposureValue(callback: AsyncCallback): void;
getExposureValue(): Promise;
isFocusModeSupported(afMode: FocusMode, callback: AsyncCallback): void;
isFocusModeSupported(afMode: FocusMode): Promise;
getFocusMode(callback: AsyncCallback): void;
getFocusMode(): Promise;
setFocusMode(afMode: FocusMode, callback: AsyncCallback): void;
setFocusMode(afMode: FocusMode): Promise;
setFocusPoint(point: Point, callback: AsyncCallback): void;
setFocusPoint(point: Point): Promise;
getFocusPoint(callback: AsyncCallback): void;
getFocusPoint(): Promise;
getFocalLength(callback: AsyncCallback): void;
getFocalLength(): Promise;
getZoomRatioRange(callback: AsyncCallback>): void;
getZoomRatioRange(): Promise>;
getZoomRatio(callback: AsyncCallback): void;
getZoomRatio(): Promise;
setZoomRatio(zoomRatio: number, callback: AsyncCallback): void;
setZoomRatio(zoomRatio: number): Promise;
isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback): void;
isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): Promise;
getActiveVideoStabilizationMode(callback: AsyncCallback): void;
getActiveVideoStabilizationMode(): Promise;
setVideoStabilizationMode(mode: VideoStabilizationMode, callback: AsyncCallback): void;
setVideoStabilizationMode(mode: VideoStabilizationMode): Promise;
on(type: 'error', callback: ErrorCallback): void; | 是 | 废弃 | +| ohos.multimedia.camera | CaptureSessionErrorCode | ERROR_UNKNOWN = -1
ERROR_INSUFFICIENT_RESOURCES = 0
ERROR_TIMEOUT = 1 | 是 | 废弃 | +| ohos.multimedia.camera | CaptureSessionError | code: CaptureSessionErrorCode | 是 | 废弃 | +| ohos.multimedia.camera | PreviewOutput | on(type: 'error', callback: ErrorCallback): void; | 是 | 新增 | +| ohos.multimedia.camera | PreviewOutput | on(type: 'error', callback: ErrorCallback): void; | 是 | 废弃 | +| ohos.multimedia.camera | PreviewOutputErrorCode | ERROR_UNKNOWN = -1 | 是 | 废弃 | +| ohos.multimedia.camera | PreviewOutputError | code: PreviewOutputErrorCode | 是 | 废弃 | +| ohos.multimedia.camera | PhotoOutput | capture(): Promise;
isMirrorSupported(): boolean;
on(type: 'error', callback: ErrorCallback): void; | 是 | 新增 | +| ohos.multimedia.camera | PhotoOutput | isMirrorSupported(callback: AsyncCallback): void;
isMirrorSupported(): Promise;
on(type: 'error', callback: ErrorCallback): void; | 是 | 废弃 | +| ohos.multimedia.camera | PhotoOutputErrorCode | ERROR_UNKNOWN = -1
ERROR_DRIVER_ERROR = 0
ERROR_INSUFFICIENT_RESOURCES = 1
ERROR_TIMEOUT = 2 | 是 | 废弃 | +| ohos.multimedia.camera | PhotoOutputError | code: PhotoOutputErrorCode | 是 | 废弃 | +| ohos.multimedia.camera | VideoOutput | on(type: 'error', callback: ErrorCallback): void; | 是 | 新增 | +| ohos.multimedia.camera | VideoOutput | on(type: 'error', callback: ErrorCallback): void; | 是 | 废弃 | +| ohos.multimedia.camera | VideoOutputErrorCode | ERROR_UNKNOWN = -1
ERROR_DRIVER_ERROR = 0 | 是 | 废弃 | +| ohos.multimedia.camera | VideoOutputError | code: VideoOutputErrorCode | 是 | 废弃 | +| ohos.multimedia.camera | MetadataObject | readonly type: MetadataObjectType;
readonly timestamp: number; | 是 | 新增 | +| ohos.multimedia.camera | MetadataObject | getType(callback: AsyncCallback): void;
getType(): Promise;
getTimestamp(callback: AsyncCallback): void;
getTimestamp(): Promise;
getBoundingBox(callback: AsyncCallback): void;
getBoundingBox(): Promise; | 是 | 废弃 | +| ohos.multimedia.camera | MetadataFaceObject | readonly boundingBox: Rect | 是 | 新增 | +| ohos.multimedia.camera | MetadataOutput | on(type: 'error', callback: ErrorCallback): void; | 是 | 新增 | +| ohos.multimedia.camera | MetadataOutput | on(type: 'error', callback: ErrorCallback): void; | 是 | 废弃 | +| ohos.multimedia.camera | MetadataOutputErrorCode | ERROR_UNKNOWN = -1
ERROR_INSUFFICIENT_RESOURCES = 0 | 是 | 废弃 | +| ohos.multimedia.camera | MetadataOutputError | code: MetadataOutputErrorCode | 是 | 废弃 | + +**适配指导** + +除新增接口,和废弃接口之外,开发者需要关注变更的接口的适配: + +从 Beta4 版本开始,对以下接口进行调整: + +**新增接口** + +1. CameraErrorCode 枚举 + + 枚举值名称:INVALID_ARGUMENT, 值:7400101; + + 枚举值名称:OPERATION_NOT_ALLOWED, 值:7400102; + + 枚举值名称:SESSION_NOT_CONFIG, 值:7400103; + + 枚举值名称:SESSION_NOT_RUNNING, 值:7400104; + + 枚举值名称:SESSION_CONFIG_LOCKED, 值:7400105; + + 枚举值名称:DEVICE_SETTING_LOCKED, 值:7400106; + + 枚举值名称:CONFILICT_CAMERA, 值:7400107; + + 枚举值名称:DEVICE_DISABLED, 值:7400108; + + 枚举值名称:SERVICE_FATAL_ERROR, 值:7400201; + +2. PhotoOutput 接口新增 capture(): Promise; + +3. MetadataObject 接口中新增 readonly type: MetadataObjectType; + +4. MetadataObject 接口中新增 readonly timestamp: number; + +5. MetadataObject 接口中新增 readonly boundingBox: Rect; + +**废弃接口** + +1. CameraInput 中废弃接口 release(callback: AsyncCallback): void; 以及 release(): Promise; + +2. 废弃枚举 CameraInputErrorCode 以及所有它里边的枚举值(ERROR_UNKNOWN = -1,ERROR_NO_PERMISSION = 0,ERROR_DEVICE_PREEMPTED = 1,ERROR_DEVICE_DISCONNECTED = 2,ERROR_DEVICE_IN_USE = 3,ERROR_DRIVER_ERROR = 4); + +3. 废弃接口 CameraInputError 以及接口属性 code:CameraInputErrorCode; + +4. 废弃枚举 CaptureSessionErrorCode 以及所有它里边的枚举值(ERROR_UNKNOWN = -1,ERROR_INSUFFICIENT_RESOURCES = 0,ERROR_TIMEOUT = 1); + +5. 废弃接口 CaptureSessionError 以及接口属性 code: CaptureSessionErrorCode; + +6. 废弃枚举 PreviewOutputErrorCode 以及所有它里边的枚举值(ERROR_UNKNOWN = -1); + +7. 废弃接口 PreviewOutputError 以及接口属性 code: PreviewOutputErrorCode; + +8. 废弃枚举 PhotoOutputErrorCode 以及所有它里边的枚举值(ERROR_UNKNOWN = -1,ERROR_DRIVER_ERROR = 0,ERROR_INSUFFICIENT_RESOURCES = 1,ERROR_TIMEOUT = 2); + +9. 废弃接口 PhotoOutputError 以及接口属性 code:PhotoOutputErrorCode; + +10. 废弃枚举 VideoOutputErrorCode 以及所有它里边的枚举值(ERROR_UNKNOWN = -1,ERROR_DRIVER_ERROR = 0); + +11. 废弃接口 VideoOutputError 以及接口属性 code:VideoOutputErrorCode; + +12. 废弃接口 MetadataObject 中 getType(callback: AsyncCallback): void; + +13. 废弃接口 MetadataObject 中 getType(): Promise; + +14. 废弃接口 MetadataObject 中 getTimestamp(callback: AsyncCallback): void; + +15. 废弃接口 MetadataObject 中 getTimestamp(): Promise; + +16. 废弃接口 MetadataObject 中 getBoundingBox(callback: AsyncCallback): void; + +17. 废弃接口 MetadataObject 中 getBoundingBox(): Promise; + +18. 废弃枚举 MetadataOutputErrorCode 以及所有它里边的枚举值(ERROR_UNKNOWN = -1,ERROR_INSUFFICIENT_RESOURCES = 0); + +19. 废弃接口 MetadataOutputError 以及接口属性 code:MetadataOutputErrorCode; + +**接口变更** + +1. camera 模块中接口 getCameraManager 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getCameraManager(context: Context, callback: AsyncCallback): void; 以及 getCameraManager(context: Context): Promise; 变更为 getCameraManager(context: Context): CameraManager; + + 参考代码如下: + + ``` + let cameraManager = camera.getCameraManager(context); + ``` + +2. CameraManager 中接口 getSupportedCameras 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getSupportedCameras(callback: AsyncCallback>): void; 以及 getSupportedCameras(): Promise>; 变更为 getSupportedCameras(): Array; + + 参考代码如下: + + ``` + let cameras = cameraManager.getSupportedCameras(); + ``` + +3. CameraManager 中接口 getSupportedOutputCapability 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getSupportedOutputCapability(camera: CameraDevice, callback: AsyncCallback): void; 以及 getSupportedOutputCapability(camera: CameraDevice): Promise; 变更为 getSupportedOutputCapability(camera: CameraDevice): CameraOutputCapability; + + 参考代码如下: + + ``` + let cameraDevice = cameras[0]; + let CameraOutputCapability = cameraManager.getSupportedOutputCapability(cameraDevice); + ``` + +4. CameraManager 中接口 createCameraInput(camera: CameraDevice) 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 createCameraInput(camera: CameraDevice, callback: AsyncCallback): void; 以及 createCameraInput(camera: CameraDevice): Promise; 变更为 createCameraInput(camera: CameraDevice): CameraInput; + + 参考代码如下: + + ``` + let cameraDevice = cameras[0]; + let cameraInput = cameraManager.createCameraInput(cameraDevice); + ``` + +5. CameraManager 中接口 createCameraInput(position: CameraPosition, type: CameraType) 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 createCameraInput(position: CameraPosition, type: CameraType, callback: AsyncCallback): void; 以及 createCameraInput(position: CameraPosition, type: CameraType): Promise; 变更为 createCameraInput(position: CameraPosition, type: CameraType): CameraInput; + + 参考代码如下: + + ``` + let cameraDevice = cameras[0]; + let position = cameraDevice.cameraPosition; + let type = cameraDevice.cameraType; + let cameraInput = cameraManager.createCameraInput(position, type); + ``` + +6. CameraManager 中接口 createPreviewOutput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 createPreviewOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void; 以及 createPreviewOutput(profile: Profile, surfaceId: string): Promise; 变更为 createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput; + + 参考代码如下: + + ``` + let profile = cameraoutputcapability.previewProfiles[0]; + let previewOutput = cameraManager.createPreviewOutput(profile, surfaceId); + ``` + +7. CameraManager 中接口 createPhotoOutput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 createPhotoOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void; 以及 createPhotoOutput(profile: Profile, surfaceId: string): Promise; 变更为 createPhotoOutput(profile: Profile, surfaceId: string): PhotoOutput; + + 参考代码如下: + + ``` + let profile = cameraoutputcapability.photoProfiles[0]; + let photoOutput = cameraManager.createPhotoOutput(profile, surfaceId); + ``` + +8. CameraManager 中接口 createVideoOutput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 createVideoOutput(profile: VideoProfile, surfaceId: string, callback: AsyncCallback): void; 以及 createVideoOutput(profile: VideoProfile, surfaceId: string): Promise; 变更为 createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput; + + 参考代码如下: + + ``` + let profile = cameraoutputcapability.videoProfiles[0]; + let videoOutput = cameraManager.createVideoOutput(profile, surfaceId); + ``` + +9. CameraManager 中接口 createMetadataOutput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 createMetadataOutput(metadataObjectTypes: Array, callback: AsyncCallback): void; 以及 createMetadataOutput(metadataObjectTypes: Array): Promise; 变更为 createMetadataOutput(metadataObjectTypes: Array): MetadataOutput; + + 参考代码如下: + + ``` + let metadataObjectTypes = cameraoutputcapability.supportedMetadataObjectTypes; + let metadataOutput = cameraManager.createMetadataOutput(metadataObjectTypes); + ``` + +10. CameraManager 中接口 createCaptureSession 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 createCaptureSession(callback: AsyncCallback): void; 以及 createCaptureSession(): Promise; 变更为 createCaptureSession(): CaptureSession; + + 参考代码如下: + + ``` + let captureSession = cameraManager.createCaptureSession(); + ``` + +11. 枚举 CameraType 中,枚举值名称 CAMERA_TYPE_UNSPECIFIED 变更为 CAMERA_TYPE_DEFAULT。 + +12. CameraInput 中,on 接口返回值类型由 CameraInputError 变更为 BusinessError,因此旧接口 on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; 变更为 on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; + + 参考代码如下: + + ``` + let cameraDevice = cameras[0]; + cameraInput.on('error', cameraDevice, (BusinessError) => { + + }) + ``` + +13. CaptureSession 中接口 beginConfig 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 beginConfig(callback: AsyncCallback): void; 以及 beginConfig(): Promise; 变更为 beginConfig(): void; + + 参考代码如下: + + ``` + captureSession.beginConfig(); + ``` + +14. CaptureSession 中接口 addInput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 addInput(cameraInput: CameraInput, callback: AsyncCallback): void; 以及 addInput(cameraInput: CameraInput): Promise; 变更为 addInput(cameraInput: CameraInput): void; + + 参考代码如下: + + ``` + captureSession.addInput(cameraInput); + ``` + +15. CaptureSession 中接口 removeInput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 removeInput(cameraInput: CameraInput, callback: AsyncCallback): void; 以及 removeInput(cameraInput: CameraInput): Promise; 变更为 removeInput(cameraInput: CameraInput): void; + + 参考代码如下: + + ``` + captureSession.removeInput(cameraInput); + ``` + +16. CaptureSession 中接口 addOutput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 addOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void; 以及 addOutput(cameraOutput: CameraOutput): Promise; 变更为 addOutput(cameraOutput: CameraOutput): void; + + 参考代码如下: + + ``` + captureSession.addOutput(previewOutput); + ``` + +17. CaptureSession 中接口 removeOutput 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 removeOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void; 以及 removeOutput(cameraOutput: CameraOutput): Promise; 变更为 removeOutput(cameraOutput: CameraOutput): void; + + 参考代码如下: + + ``` + captureSession.removeOutput(previewOutput); + ``` + +18. CaptureSession 中接口 hasFlash 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 hasFlash(callback: AsyncCallback): void; 以及 hasFlash(): Promise; 变更为 hasFlash(): boolean; + + 参考代码如下: + + ``` + let status = captureSession.hasFlash(); + ``` + +19. CaptureSession 中接口 isFlashModeSupported 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 isFlashModeSupported(flashMode: FlashMode, callback: AsyncCallback): void; 以及 isFlashModeSupported(flashMode: FlashMode): Promise; 变更为 isFlashModeSupported(flashMode: FlashMode): boolean; + + 参考代码如下: + + ``` + let status = captureSession.isFlashModeSupported(camera.FlashMode.FLASH_MODE_AUTO); + ``` + +20. CaptureSession 中接口 getFlashMode 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getFlashMode(callback: AsyncCallback): void; 以及 getFlashMode(): Promise; 变更为 getFlashMode(): FlashMode; + + 参考代码如下: + + ``` + let flashMode = captureSession.getFlashMode(); + ``` + +21. CaptureSession 中接口 isExposureModeSupported 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 isExposureModeSupported(aeMode: ExposureMode, callback: AsyncCallback): void; 以及 isExposureModeSupported(aeMode: ExposureMode): Promise; 变更为 isExposureModeSupported(aeMode: ExposureMode): boolean; + + 参考代码如下: + + ``` + let isSupported = captureSession.isExposureModeSupported(camera.ExposureMode.EXPOSURE_MODE_LOCKED); + ``` + +22. CaptureSession 中接口 getExposureMode 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getExposureMode(callback: AsyncCallback): void; 以及 getExposureMode(): Promise; 变更为 getExposureMode(): ExposureMode; + + 参考代码如下: + + ``` + let exposureMode = captureSession.getExposureMode(); + ``` + +23. CaptureSession 中接口 setExposureMode 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 setExposureMode(aeMode: ExposureMode, callback: AsyncCallback): void; 以及 setExposureMode(aeMode: ExposureMode): Promise; 变更为 setExposureMode(aeMode: ExposureMode): void; + + 参考代码如下: + + ``` + captureSession.setExposureMode(camera.ExposureMode.EXPOSURE_MODE_LOCKED); + ``` + +24. CaptureSession 中接口 getMeteringPoint 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getMeteringPoint(callback: AsyncCallback): void; 以及 getMeteringPoint(): Promise; 变更为 getMeteringPoint(): Point; + + 参考代码如下: + + ``` + let exposurePoint = captureSession.getMeteringPoint(); + ``` + +25. CaptureSession 中接口 setMeteringPoint 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 setMeteringPoint(point: Point, callback: AsyncCallback): void; 以及 setMeteringPoint(point: Point): Promise; 变更为 setMeteringPoint(point: Point): void; + + 参考代码如下: + + ``` + let Point2 = {x: 2, y: 2}; + captureSession.setMeteringPoint(Point2); + ``` + +26. CaptureSession 中接口 getExposureBiasRange 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getExposureBiasRange(callback: AsyncCallback>): void; 以及 getExposureBiasRange(): Promise>; 变更为 getExposureBiasRange(): Array; + + 参考代码如下: + + ``` + let biasRangeArray = captureSession.getExposureBiasRange(); + ``` + +27. CaptureSession 中接口 setExposureBias 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 setExposureBias(exposureBias: number, callback: AsyncCallback): void; 以及 setExposureBias(exposureBias: number): Promise; 变更为 setExposureBias(exposureBias: number): void; + + 参考代码如下: + + ``` + let exposureBias = biasRangeArray[0]; + captureSession.setExposureBias(exposureBias); + ``` + +28. CaptureSession 中接口 getExposureValue 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getExposureValue(callback: AsyncCallback): void; 以及 getExposureValue(): Promise; 变更为 getExposureValue(): number; + + 参考代码如下: + + ``` + let exposureValue = captureSession.getExposureValue(); + ``` + +29. CaptureSession 中接口 isFocusModeSupported 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 isFocusModeSupported(afMode: FocusMode, callback: AsyncCallback): void; 以及 isFocusModeSupported(afMode: FocusMode): Promise; 变更为 isFocusModeSupported(afMode: FocusMode): boolean; + + 参考代码如下: + + ``` + let status = captureSession.isFocusModeSupported(camera.FocusMode.FOCUS_MODE_AUTO); + ``` + +30. CaptureSession 中接口 getFocusMode 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getFocusMode(callback: AsyncCallback): void; 以及 getFocusMode(): Promise; 变更为 getFocusMode(): FocusMode; + + 参考代码如下: + + ``` + let afMode = captureSession.getFocusMode(); + ``` + +31. CaptureSession 中接口 setFocusMode 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 setFocusMode(afMode: FocusMode, callback: AsyncCallback): void; 以及 setFocusMode(afMode: FocusMode): Promise; 变更为 setFocusMode(afMode: FocusMode): void; + + 参考代码如下: + + ``` + captureSession.setFocusMode(camera.FocusMode.FOCUS_MODE_AUTO); + ``` + +32. CaptureSession 中接口 setFocusPoint 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 setFocusPoint(point: Point, callback: AsyncCallback): void; 以及 setFocusPoint(point: Point): Promise; 变更为 setFocusPoint(point: Point): void; + + 参考代码如下: + + ``` + let Point2 = {x: 2, y: 2}; + captureSession.setFocusPoint(Point2); + ``` + +33. CaptureSession 中接口 getFocusPoint 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getFocusPoint(callback: AsyncCallback): void; 以及 getFocusPoint(): Promise; 变更为 getFocusPoint(): Point; + + 参考代码如下: + + ``` + let point = captureSession.getFocusPoint(); + ``` + +34. CaptureSession 中接口 getFocalLength 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getFocalLength(callback: AsyncCallback): void; 以及 getFocalLength(): Promise; 变更为 getFocalLength(): number; + + 参考代码如下: + + ``` + let focalLength = captureSession.getFocalLength(); + ``` + +35. CaptureSession 中接口 getZoomRatioRange 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getZoomRatioRange(callback: AsyncCallback>): void; 以及 getZoomRatioRange(): Promise>; 变更为 getZoomRatioRange(): Array; + + 参考代码如下: + + ``` + let zoomRatioRange = captureSession.getZoomRatioRange(); + ``` + +36. CaptureSession 中接口 getZoomRatio 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getZoomRatio(callback: AsyncCallback): void; 以及 getZoomRatio(): Promise; 变更为 getZoomRatio(): number; + + 参考代码如下: + + ``` + let zoomRatio = captureSession.getZoomRatio(); + ``` + +37. CaptureSession 中接口 setZoomRatio 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 setZoomRatio(zoomRatio: number, callback: AsyncCallback): void; 以及 setZoomRatio(zoomRatio: number): Promise; 变更为 setZoomRatio(zoomRatio: number): void; + + 参考代码如下: + + ``` + let zoomRatio = zoomRatioRange[0]; + captureSession.setZoomRatio(zoomRatio); + ``` + +38. CaptureSession 中接口 isVideoStabilizationModeSupported 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback): void; 以及 isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): Promise; 变更为 isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean; + + 参考代码如下: + + ``` + let isSupported = captureSession.isVideoStabilizationModeSupported(camera.VideoStabilizationMode.OFF); + ``` + +39. CaptureSession 中接口 getActiveVideoStabilizationMode 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 getActiveVideoStabilizationMode(callback: AsyncCallback): void; 以及 getActiveVideoStabilizationMode(): Promise; 变更为 getActiveVideoStabilizationMode(): VideoStabilizationMode; + + 参考代码如下: + + ``` + let vsMode = captureSession.getActiveVideoStabilizationMode(); + ``` + +40. CaptureSession 中接口 setVideoStabilizationMode 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 setVideoStabilizationMode(mode: VideoStabilizationMode, callback: AsyncCallback): void; 以及 setVideoStabilizationMode(mode: VideoStabilizationMode): Promise; 变更为 setVideoStabilizationMode(mode: VideoStabilizationMode): void; + + 参考代码如下: + + ``` + captureSession.setVideoStabilizationMode(camera.VideoStabilizationMode.OFF); + ``` + +41. CaptureSession 中,on(type: 'error') callback 类型由 ErrorCallback 变更为 ErrorCallback,因此旧接口 on(type: 'error', callback: ErrorCallback): void; 变更为 on(type: 'error', callback: ErrorCallback): void; + + 参考代码如下: + + ``` + captureSession.on('error', (BusinessError) => { + + }) + ``` + +42. PreviewOutput 中,on(type: 'error') callback 类型由 ErrorCallback 变更为 ErrorCallback,因此旧接口 on(type: 'error', callback: ErrorCallback): void; 变更为 on(type: 'error', callback: ErrorCallback): void; + + 参考代码如下: + + ``` + previewOutput.on('error', (BusinessError) => { + + }) + ``` + +43. PhotoOutput 中接口 isMirrorSupported 返回方式由异步 callback 跟异步 promise 变更为同步返回,因此旧接口 isMirrorSupported(callback: AsyncCallback): void; 以及 isMirrorSupported(): Promise; 变更为 isMirrorSupported(): boolean; + + 参考代码如下: + + ``` + let isSupported = photoOutput.isMirrorSupported(); + ``` + +44. PhotoOutput 中,on(type: 'error') callback 类型由 ErrorCallback 变更为 ErrorCallback,因此旧接口 on(type: 'error', callback: ErrorCallback): void; 变更为 on(type: 'error', callback: ErrorCallback): void; + + 参考代码如下: + + ``` + PhotoOutput.on('error', (BusinessError) => { + + }) + ``` + +45. VideoOutput 中,on(type: 'error') callback 类型由 ErrorCallback 变更为 ErrorCallback,因此旧接口 on(type: 'error', callback: ErrorCallback): void; 变更为 on(type: 'error', callback: ErrorCallback): void; + + 参考代码如下: + + ``` + VideoOutput.on('error', (BusinessError) => { + + }) + ``` + +46. MetadataOutput 中,on(type: 'error') callback 类型由 ErrorCallback 变更为 ErrorCallback,因此旧接口 on(type: 'error', callback: ErrorCallback): void; 变更为 on(type: 'error', callback: ErrorCallback): void; + + 参考代码如下: + + ``` + MetadataOutput.on('error', (BusinessError) => { + + }) + ``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-container.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-container.md new file mode 100644 index 0000000000000000000000000000000000000000..8ba5a4809bb3b6fee51165a615a1bded4be9421e --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-container.md @@ -0,0 +1,21 @@ +# 公共基础类库子系统JS API变更Changelog + +## cl.公共基础类库子系统.1 错误码及信息变更 +公共基础类库子系统子系统中ArrayList、List、LinkedList、Stack、Queue、Deque、PlainArray、LightWeightMap、LightWeightSet、HashMap、HashSet、TreeMap、TreeSet类的接口抛出的错误码及信息变更: + +变更后的错误码详细介绍请参见[语言基础类库错误码](../../../application-dev/reference/errorcodes/errorcode-utils.md)。 + +已使用相关接口开发的应用无需重新适配。 + +**关键的接口/组件变更** +各个类中的接口重新定义了错误码抛出的信息,并在对应模块的`*.d.ts`声明文件中通过'@throws'标签进行标示。 +示例如下: +ArrayList类变更前: +constructor(); +ArrayList类变更后: +@throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked. +constructor(); + +**变更影响** + +暂无影响。 diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md new file mode 100644 index 0000000000000000000000000000000000000000..1bf0d3ff6bd3161271a8a79a0302f981aa670947 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md @@ -0,0 +1,158 @@ +# 分布式数据管理子系统JS API变更Changelog + +## cl.distributeddatamgr.1 接口变更 +distributeddatamgr子系统kv_store组件接口存在变更: + +由于执行时间固定且耗时短,不需要异步等待执行结果,createKVManager方法需要改为同步接口。因此旧的接口function createKVManager(config: KVManagerConfig): Promise\; 与 function createKVManager(config: KVManagerConfig, callback: AsyncCallback): void; 改为 function createKVManager(config: KVManagerConfig): KVManager; + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): Promise\; | 删除 | +| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): KVManager; | 变更 | + + +**适配指导** + +应用中调用createKVManager创建KVManager对象实例可参考下列代码 + +Stage模型下的示例: + +```ts +import AbilityStage from '@ohos.application.Ability' +let kvManager; +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("MyAbilityStage onCreate") + let context = this.context + const kvManagerConfig = { + context: context, + bundleName: 'com.example.datamanagertest', + } + try { + kvManager = distributedKVStore.createKVManager(kvManagerConfig); + } catch (e) { + console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); + } + } +} +``` + +FA模型下的示例: + +```ts +import featureAbility from '@ohos.ability.featureAbility' +let kvManager; +let context = featureAbility.getContext() +const kvManagerConfig = { + context: context, + bundleName: 'com.example.datamanagertest', +} +try { + kvManager = distributedKVStore.createKVManager(kvManagerConfig); +} catch (e) { + console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); +} +``` + +## cl.distributeddatamgr.2 function getRdbStoreV9 从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts +**变更影响** +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +如下接口: +```ts +function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number, callback: AsyncCallback): void; +function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number): Promise; +``` +从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts: +``` +function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; +function getRdbStore(context: Context, config: StoreConfig): Promise; +``` + +**适配指导** + * `import rdb from "@ohos.data.rdb"` 改为 `import rdb from "@ohos.data.relationalStore"`; + * 按上述接口变更对齐修改所调用的方法名称即可。 + +## cl.distributeddatamgr.3 function deleteRdbStoreV9 从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts +**变更影响** +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +如下接口: +```ts +function deleteRdbStoreV9(context: Context, name: string, callback: AsyncCallback): void; +function deleteRdbStoreV9(context: Context, name: string): Promise; +``` +从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts: +``` +function deleteRdbStoreV9(context: Context, name: string, callback: AsyncCallback): void; +function deleteRdbStoreV9(context: Context, name: string): Promise; +``` + +**适配指导** + * `import rdb from "@ohos.data.rdb"` 改为 `import rdb from "@ohos.data.relationalStore"`; + * 按上述接口变更对齐修改所调用的方法名称即可。 + +## cl.distributeddatamgr.4 interface StoreConfigV9 从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts +**变更影响** +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface StoreConfigV9 从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts 改名为interface StoreConfig。 + +**适配指导** + * `import rdb from "@ohos.data.rdb"` 改为 `import rdb from "@ohos.data.relationalStore"`; + * 按上述接口变更对齐修改所调用的接口名称即可。 + +## cl.distributeddatamgr.5 enum SecurityLevel 从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts +**变更影响** +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +enum SecurityLevel 从ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts。 + +**适配指导** + * `import rdb from "@ohos.data.rdb"` 改为 `import rdb from "@ohos.data.relationalStore"`; + * 按上述接口变更对齐修改所调用的接口名称即可。 + +## cl.distributeddatamgr.6 interface RdbStoreV9 从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts +**变更影响** +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface RdbStoreV9 从@ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts 改名为interface RdbStore。 + +**适配指导** + * `import rdb from "@ohos.data.rdb"` 改为 `import rdb from "@ohos.data.relationalStore"`; + * 按上述接口变更对齐修改所调用的接口名称即可。 + +## cl.distributeddatamgr.7 class RdbPredicatesV9 从ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts +**变更影响** +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +class RdbPredicatesV9 从ohos.data.rdb.d.ts 迁移至@ohos.data.relationalStore.d.ts 改名为interface RdbPredicates。 + +**适配指导** + * `import rdb from "@ohos.data.rdb"` 改为 `import rdb from "@ohos.data.relationalStore"`; + * 按上述接口变更对齐修改所调用的接口名称即可。 + +## cl.distributeddatamgr.8 interface ResultSetV9 从api/@ohos.data.relationalStore.d.ts 迁移至@ohos.data.relationalStore.d.ts +**变更影响** +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface ResultSetV9 从api/data/rdb/resultSet.d.ts 迁移至@ohos.data.relationalStore.d.ts 改名为interface ResultSet。 + +**适配指导** + * `import rdb from "@ohos.data.rdb"` 改为 `import rdb from "@ohos.data.relationalStore"`; + * ResultSetV9实例仅通过getRdbStoreV9方法获取,参考cl.distributeddatamgr.2变更后,代码可自动适配ResultSet。 diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md new file mode 100644 index 0000000000000000000000000000000000000000..c8cd90d415700977a4ae914099b92cf84fafff56 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md @@ -0,0 +1,189 @@ +# 文件管理子系统ChangeLog + +## cl.filemanagement.1 environment模块变更 + +文件管理子系统d.ts归档整改,现统一整改到file一层目录下。environment模块支持错误码处理。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现environment模块支持错误码处理,需注意错误码处理的使用。 + +**关键接口/组件变更** + +原environment使用的是@ohos.environment,以以下方式import: + +```js +import environment from '@ohos.environment'; +``` + +现environment使用的是@ohos.file.environment,以以下方式import: + +```js +import environment from '@ohos.file.environment'; +``` + +## cl.filemanagement.2 securityLabel模块变更 + +文件管理子系统d.ts归档整改,现统一整改到file一层目录下。securityLabel模块支持错误码处理。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现securityLabel模块支持错误码处理,需注意错误码处理的使用。 + +**关键接口/组件变更** + +原securityLabel使用的是@ohos.securityLabel,以以下方式import: + +```js +import securityLabel from '@ohos.securityLabel'; +``` + +现securityLabel使用的是@ohos.file.securityLabel,以以下方式import: + +```js +import securityLabel from '@ohos.file.securityLabel'; +``` + +## cl.filemanagement.3 fs模块变更 + +fs模块下Stat接口ino属性类型变更。 + +**变更影响** + +fs模块下Stat接口ino属性类型变更,由number变更为bigint,以适配文件系统下所有类型文件的inode范围。 + +**关键接口/组件变更** + +原Stat接口ino属性类型为number,现变更为bigint。 + +## cl.filemanagement.4 fileAccess模块变更 + +文件管理子系统d.ts归档整改,现统一整改到file一层目录下。fileAccess模块支持错误码处理。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现fileAccess模块支持错误码处理,需注意错误码处理的使用。 + +**关键接口/组件变更** + +原fileAccess使用的是@ohos.data.fileAccess,以以下方式import: + +```js +import fileAccess from '@ohos.data.fileAccess'; +``` + +现fileAccess使用的是@ohos.file.fileAccess,以以下方式import: + +```js +import fileAccess from '@ohos.file.fileAccess'; +``` + +## cl.filemanagement.5 fileExtensionInfo模块变更 + +文件管理子系统d.ts归档整改,现统一整改到file一层目录下。fileExtensionInfo模块支持错误码处理。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现fileExtensionInfo模块支持错误码处理,需注意错误码处理的使用。 + +**关键接口/组件变更** + +原fileExtensionInfo使用的是@ohos.fileExtensionInfo,以以下方式import: + +```js +import fileExtensionInfo from '@ohos.fileExtensionInfo'; +``` + +现fileExtensionInfo使用的是@ohos.file.fileExtensionInfo,以以下方式import: + +```js +import fileExtensionInfo from '@ohos.file.fileExtensionInfo'; +``` + +## cl.filemanagement.6 storageStatistics模块变更 + +文件管理子系统d.ts归档整改,现统一整改到file一层目录下。fileExtensionInfo模块支持错误码处理。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现storageStatistics模块支持错误码处理,需注意错误码处理的使用。 + +**关键接口/组件变更** + +原storageStatistics使用的是@ohos.storageStatistics,以以下方式import: + +```js +import storageStatistics from '@ohos.storageStatistics'; +``` + +现storageStatistics使用的是@ohos.file.storageStatistics,以以下方式import: + +```js +import storageStatistics from '@ohos.file.storageStatistics'; +``` + +## cl.filemanagement.7 volumeManager模块变更 + +文件管理子系统d.ts归档整改,现统一整改到file一层目录下。fileExtensionInfo模块支持错误码处理。 + +**变更影响** + +基于此前版本开发的应用,需注意d.ts位置的变更及import模块名的变更。现volumeManager模块支持错误码处理,需注意错误码处理的使用。 + +**关键接口/组件变更** + +原volumeManager使用的是@ohos.volumeManager,以以下方式import: + +```js +import volumeManager from '@ohos.volumeManager'; +``` + +现volumeManager使用的是@ohos.file.volumeManager,以以下方式import: + +```js +import volumeManager from '@ohos.file.volumeManager'; +``` + +## cl.filemanagement.8 fileio相关接口异常处理方式变更 + +file_api部件fileio接口返回值不包含错误码error.code,现进行错误码整改,废弃原有相关接口,新增相关接口。 + +**变更影响** + +基于此前版本开发的应用,需注意废弃接口的迭代更新。新接口在接口规格上进行了微调,需注意新接口使用方法。 + +**关键接口/组件变更** + +为适配统一的API异常处理方式,对fileio相关接口进行废弃,并新增对应接口,原接口位于@ohos.fileio,新接口位于@ohos.file.fs。新增接口支持统一的错误码异常处理规范,功能上与原接口保持一致,参数上有微调,以下为规格调整的接口列表。 +废弃与新增方法同名,请在列表中对应查看。 + +| 模块名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------------------------------------------------ | -------- | +| @ohos.fileio | **function** access(path: string, mode?: number, callback?: AsyncCallback\): void \| Promise\ | 废弃 | +| @ohos.fileio | **function** accessSync(path: string, mode?: number): void | 废弃 | +| @ohos.file.fs | **function** access(path: string, callback?: AsyncCallback\): void \| Promise\ | 新增 | +| @ohos.file.fs | **function** accessSync(path: string): boolean | 新增 | +| @ohos.fileio | **function** close(fd: number, callback?: AsyncCallback\): void \| Promise\ | 废弃 | +| @ohos.fileio | **function** closeSync(fd: number): void | 废弃 | +| @ohos.file.fs | **function** close(file: File \| number, callback?: AsyncCallback\): void \| Promise\ | 新增 | +| @ohos.file.fs | **function** closeSync(file: File \| number): void | 新增 | +| @ohos.fileio | **function** mkdir(path: string, mode?: number, callback?: AsyncCallback\): void \| Promise\ | 废弃 | +| @ohos.fileio | **function** mkdirSync(path: string, mode?: number): void | 废弃 | +| @ohos.file.fs | **function** mkdir(path: string, callback?: AsyncCallback\): void \| Promise\ | 新增 | +| @ohos.file.fs | **function** mkdirSync(path: string): void | 新增 | +| @ohos.fileio | **function** readText(filePath: string, options?: { position?: number; length?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | 废弃 | +| @ohos.fileio | **function** readTextSync(filePath: string, options?: { position?: number; length?: number; encoding?: string; }): string | 废弃 | +| @ohos.file.fs | **function** readText(filePath: string, options?: { offset?: number; length?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | 新增 | +| @ohos.file.fs | **function** readTextSync(filePath: string, options?: { offset?: number; length?: number; encoding?: string; }): string | 新增 | +| @ohos.fileio | **function** Stream.read(buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }, callback?: AsyncCallback\): void \| Promise\ | 废弃 | +| @ohos.fileio | **function** Stream.readSync(buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }): number | 废弃 | +| @ohos.file.fs | **function** Stream.read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }, callback?: AsyncCallback\): void \| Promise\ | 新增 | +| @ohos.file.fs | **function** Stream.readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }): number | 新增 | +| @ohos.fileio | **function** Stream.write(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | 废弃 | +| @ohos.fileio | **function** Stream.writeSync(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): number | 废弃 | +| @ohos.file.fs | **function** Stream.write(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | 新增 | +| @ohos.file.fs | **function** Stream.writeSync(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }): number | 新增 | + +**适配指导** + +@ohos.file.fs新增统一的API异常处理方式,具体示例代码请参考[接口文档](../../../application-dev/reference/apis/js-apis-file-fs.md)。 diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md new file mode 100644 index 0000000000000000000000000000000000000000..ba3fbf1df4e369ec72a031df204a0cb6cbb7ff47 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md @@ -0,0 +1,30 @@ +# 输入法框架changeLog + +## cl.inputmethod_frameworks.1 API文件名变更 + +下列模块不符合OpenHarmony接口文件名命名规范。在API9进行变更。 + + **变更影响** + + 修改后的SDK与先前已发布版本不兼容,影响在此前版本已开发的应用,应用需要进行适配改动才可以在新版本SDK环境正常编译通过。 + + **关键的接口/组件变更** + +| 模块 | 变更前文件名 | 变更后文件名 | +|------|--------------|--------------| +| 输入法框架模块 | @ohos.inputmethod.d.ts |@ohos.inputMethod.d.ts | +| 输入法服务模块 |@ohos.inputmethodengine.d.ts | @ohos.inputMethodEngine.d.ts | +| 输入法ExtentionAbility模块 | @ohos.inputmethodextensionability.d.ts | @ohos.InputMethodExtensionAbility.d.ts | +| 输入法ExtentionContext模块 |@ohos.inputmethodextensioncontext.d.ts | @ohos.InputMethodExtensionContext.d.ts | +| 输入法子类型模块 | @ohos.inputMethodSubtype.d.ts | @ohos.InputMethodSubtype.d.ts | + + **适配指导** + + 应用中对输入法框架d.ts文件的import后的文件名要写为变更后文件名,即小驼峰/大驼峰命名格式。 + 如: + +```js +import inputMethodEngine from '@ohos.inputMethodEngine'; +``` + + \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md new file mode 100644 index 0000000000000000000000000000000000000000..73ef9158bc274f11f4de68f19cfc9561ca85ddad --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md @@ -0,0 +1,272 @@ +# 文件子系统ChangeLog + +## cl.file.1 mediaLibrary相关接口变更 + +multimedia 部件 mediaLibrary所有接口废弃。 + +**变更影响** + +[mediaLibrary](../../../application-dev/reference/apis/js-apis-medialibrary.md)所有接口废弃。系统只对三方应用开放公共目录下文件资源选择和保存功能,由[FilePicker](../../../application-dev/reference/apis/js-apis-file-picker.md)提供能力。 +基于此前版本开发的应用,需注意废弃接口的迭代更新。 + +**关键接口/组件变更** + +以下为可以使用FilePicker替代的接口。 + +| 模块名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------------------------------------------------ | -------- | +| medialibrary | **function** getMediaLibrary(context: Context): MediaLibrary; | 废弃 | +| medialibrary | **function** getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** getFileAssets(options: MediaFetchOptions): Promise\ | 废弃 | +| medialibrary | **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise\ | 废弃 | +| medialibrary | **function** getPublicDirectory(type: DirectoryType, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** getPublicDirectory(type: DirectoryType): Promise\ | 废弃 | +| medialibrary | **function** release(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** release(): Promise\ | 废弃 | +| medialibrary | **function** FileAsset.open(mode: string, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.open(mode: string): Promise\ | 废弃 | +| medialibrary | **function** FileAsset.close(fd: number, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.close(fd: number): Promise\ | 废弃 | +| medialibrary | **function** FetchFileResult.getCount(): number | 废弃 | +| medialibrary | **function** FetchFileResult.isAfterLast(): boolean | 废弃 | +| medialibrary | **function** FetchFileResult.close(): void | 废弃 | +| medialibrary | **function** FetchFileResult.getFirstObject(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FetchFileResult.getFirstObject(): Promise\ | 废弃 | +| medialibrary | **function** FetchFileResult.getNextObject(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FetchFileResult.getNextObject(): Promise\ | 废弃 | +| medialibrary | **function** FetchFileResult.getLastObject(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FetchFileResult.getLastObject(): Promise\ | 废弃 | +| medialibrary | **function** FetchFileResult.getPositionObject(index: number, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FetchFileResult.getPositionObject(index: number): Promise\ | 废弃 | +| medialibrary | **function** FetchFileResult.getAllObject(callback: AsyncCallback\\>): void | 废弃 | +| medialibrary | **function** FetchFileResult.getAllObject(): Promise\\> | 废弃 | +| medialibrary | **function** Album.getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** Album.getFileAssets(options?: MediaFetchOptions): Promise\ | 废弃 | +| medialibrary | **enum** FileKey | 废弃 | +| medialibrary | **enum** DirectoryType | 废弃 | +| medialibrary | **enum** MediaType | 废弃 | +| medialibrary | **interface** MediaFetchOptions | 废弃 | +| medialibrary | **interface** FileAsset | 废弃 | + +**适配指导** + +**使用mediaLibrary接口编辑公共目录下的文件示例:** + +1. 使用getMediaLibrary接口获取媒体库实例。 +2. 创建MediaFetchOptions检索条件使用mediaLibrary实例调用getFileAssets接口获取公共目录下的文件。 +3. 使用FetchFileResult相应接口获取目的文件的fileAsset。 +4. 使用fileAsset.open接口打开这个文件得到fd。 +5. 通过fd使用[fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync)接口对这个文件进行编辑修改。 +6. 修改完成后使用fileAsset.close接口关闭这个文件的fd。 +7. 使用fetchFileResult.close接口释放getFileAssets时占用的资源。 +8. 使用release接口释放媒体库实例。 + +**示例:** + +```js +import mediaLibrary from '@ohos.multimedia.mediaLibrary'; +import fs from '@ohos.file.fs'; + +async function example() { + try { + let context = getContext(this); + let media = mediaLibrary.getMediaLibrary(context); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const fileAsset = await fetchFileResult.getFirstObject(); + console.info('mediaLibrary fileAsset displayName: ' + fileAsset.displayName); + let fd = await fileAsset.open('rw'); + console.info('mediaLibrary fileAsset open fd: ' + fd); + let writeLen = fs.writeSync(fd, 'hello, world'); + console.info('write data to file succeed and size is: ' + writeLen); + fileAsset.close(fd); + fetchFileResult.close(); + media.release(); + } catch (err) { + console.error('mediaLibrary fail, err: ' + err); + } +} +``` + +**使用FilePicker编辑公共目录下的文件示例:** + +1. 获取DocumentViewPicker文件选择器对象。 +2. 拉起DocumentViewPicker.select接口选择目的文件。 +3. 用户选择完后返回目的文件的uri。 +4. 待界面从DocumentViewPicker返回后在其他函数中使用[fs.openSync](../../../application-dev/reference/apis/js-apis-file-fs.md#fsopensync)接口通过uri打开这个文件得到fd。 +5. 通过fd使用[fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync)接口对这个文件进行编辑修改。 +6. 编辑修改完毕后使用[fs.closeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#closesync)接口关闭这个fd。 + +**示例:** + +```js +import mediaLibrary from '@ohos.multimedia.mediaLibrary'; +import picker from '@ohos.file.picker'; +import fs from '@ohos.file.fs'; + +let uri; + +async function example() { + try { + let DocumentSelectOptions = new picker.DocumentSelectOptions(); + let documentPicker = new picker.DocumentViewPicker(); + documentPicker.select(DocumentSelectOptions).then((DocumentSelectResult) => { + console.info('DocumentViewPicker.select successfully, DocumentSelectResult uri: ' + JSON.stringify(DocumentSelectResult)); + uri = DocumentSelectResult[0]; + }).catch((err) => { + console.error('DocumentViewPicker.select failed with err: ' + err); + }); + } catch (err) { + console.error('DocumentViewPicker failed with err: ' + err); + } +} + +async function writeFile() { + try { + let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + console.info('DocumentViewPicker file fd: ' + file.fd); + let writeLen = fs.writeSync(file.fd, 'hello, world'); + console.info('write data to file succeed and size is: ' + writeLen); + fs.closeSync(file); + } catch (err) { + console.error('DocumentViewPicker fail, err: ' + err); + } +} +``` + +**使用mediaLibrary接口在公共目录下创建文件示例:** + +1. 使用getMediaLibrary接口获取媒体库实例。 +2. 使用getPublicDirectory接口获取公共目录路径。 +3. 使用createAsset接口创建文件得到这个文件的fileAsset。 +4. 使用fileAsset.open接口打开这个文件得到fd。 +5. 通过fd使用fs.write接口对这个文件进行编辑修改。 +6. 修改完成后使用fileAsset.close接口关闭这个文件的fd。 +7. 使用release接口释放媒体库实例。 + +**示例:** + +```js +import mediaLibrary from '@ohos.multimedia.mediaLibrary'; +import fs from '@ohos.file.fs'; + +async function example() { + try { + let context = getContext(this); + let media = mediaLibrary.getMediaLibrary(context); + let mediaType = mediaLibrary.MediaType.FILE; + let DIR_DOWNLOAD = mediaLibrary.DirectoryType.DIR_DOWNLOAD; + const path = await media.getPublicDirectory(DIR_DOWNLOAD); + const fileAsset = await media.createAsset(mediaType, 'test.txt', path); + console.info('mediaLibrary fileAsset displayName: ' + fileAsset.displayName); + let fd = await fileAsset.open('rw'); + console.info('mediaLibrary fileAsset open fd: ' + fd); + let writeLen = fs.writeSync(fd, 'hello, world'); + console.info('write data to file succeed and size is: ' + writeLen); + fileAsset.close(fd); + media.release(); + } catch (err) { + console.error('mediaLibrary fail, err: ' + err); + } +} +``` + +**使用FilePicker在公共目录下创建文件示例:** + +1. 获取DocumentViewPicker文件选择器对象。 +2. 拉起DocumentViewPicker.save接口创建保存一个空的文件。 +3. 用户保存完后返回目的文件的uri。 +4. 待界面从DocumentViewPicker返回后在其他函数中使用[fs.openSync](../../../application-dev/reference/apis/js-apis-file-fs.md#fsopensync)接口通过uri打开这个文件得到fd。 +5. 通过fd使用[fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync)接口对这个文件进行编辑修改。 +6. 编辑修改完毕后使用[fs.closeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#closesync)接口关闭这个fd。 + +**示例:** + +```js +import mediaLibrary from '@ohos.multimedia.mediaLibrary'; +import picker from '@ohos.file.picker'; +import fs from '@ohos.file.fs'; + +let uri; + +async function example() { + try { + let DocumentSaveOptions = new picker.DocumentSaveOptions(); + DocumentSaveOptions.newFileNames = ['DocumentViewPicker01.txt']; + let documentPicker = new picker.DocumentViewPicker(); + documentPicker.save(DocumentSaveOptions).then((DocumentSaveResult) => { + console.info('DocumentViewPicker.save successfully, DocumentSaveResult uri: ' + JSON.stringify(DocumentSaveResult)); + uri = DocumentSaveResult[0]; + }).catch((err) => { + console.error('DocumentViewPicker.save failed with err: ' + err); + }); + } catch (err) { + console.error('DocumentViewPicker failed with err: ' + err); + } +} + +async function writeFile() { + try { + let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + console.info('DocumentViewPicker file fd: ' + file.fd); + let writeLen = fs.writeSync(file.fd, 'hello, world'); + console.info('write data to file succeed and size is: ' + writeLen); + fs.closeSync(file); + } catch (err) { + console.error('DocumentViewPicker fail, err: ' + err); + } +} +``` + +**关键接口/组件变更** + +medialibrary以下废弃接口由于功能管控,不对三方应用开放,无替代接口。 + +| 模块名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------------------------------------------------ | -------- | +| medialibrary | **function** getMediaLibrary(): MediaLibrary; | 废弃 | +| medialibrary | **function** on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\): void | 废弃 | +| medialibrary | **function** off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\): void | 废弃 | +| medialibrary | **function** deleteAsset(uri: string): Promise\ | 废弃 | +| medialibrary | **function** deleteAsset(uri: string, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** storeMediaAsset(option: MediaAssetOption): Promise\ | 废弃 | +| medialibrary | **function** startImagePreview(images: Array\, index: number, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** startImagePreview(images: Array\, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** startImagePreview(images: Array\, index?: number): Promise\ | 废弃 | +| medialibrary | **function** startMediaSelect(option: MediaSelectOption, callback: AsyncCallback\\>): void | 废弃 | +| medialibrary | **function** startMediaSelect(option: MediaSelectOption): Promise\\> | 废弃 | +| medialibrary | **function** getActivePeers(): Promise\\>; | 废弃 | +| medialibrary | **function** getActivePeers(callback: AsyncCallback\\>): void; | 废弃 | +| medialibrary | **function** getAllPeers(): Promise\\>; | 废弃 | +| medialibrary | **function** FileAsset.isDirectory(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.isDirectory():Promise\ | 废弃 | +| medialibrary | **function** FileAsset.commitModify(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.commitModify(): Promise\ | 废弃 | +| medialibrary | **function** FileAsset.getThumbnail(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.getThumbnail(size: Size, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.getThumbnail(size?: Size): Promise\ | 废弃 | +| medialibrary | **function** FileAsset.favorite(isFavorite: boolean, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.favorite(isFavorite: boolean): Promise\ | 废弃 | +| medialibrary | **function** FileAsset.isFavorite(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.isFavorite():Promise\ | 废弃 | +| medialibrary | **function** FileAsset.trash(isTrash: boolean, callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.trash(isTrash: boolean): Promise\ | 废弃 | +| medialibrary | **function** FileAsset.isTrash(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** FileAsset.isTrash():Promise\ | 废弃 | +| medialibrary | **function** getAlbums(options: MediaFetchOptions, callback: AsyncCallback\\>): void | 废弃 | +| medialibrary | **function** getAlbums(options: MediaFetchOptions): Promise\\> | 废弃 | +| medialibrary | **function** Album.commitModify(callback: AsyncCallback\): void | 废弃 | +| medialibrary | **function** Album.commitModify(): Promise\ | 废弃 | +| medialibrary | **enum** DeviceType | 废弃 | +| medialibrary | **interface** PeerInfo | 废弃 | +| medialibrary | **interface** Size | 废弃 | +| medialibrary | **interface** MediaAssetOption | 废弃 | +| medialibrary | **interface** MediaSelectOption | 废弃 | \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..45249cf9851984f3119e534f732d694eacf1e31f --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md @@ -0,0 +1,53 @@ +## cl.multimedia.av_session.001 av_session所有接口更换为系统接口 + +所有av_session的接口变更为SystemApi。 + +**变更影响** + +非系统应用无法调用系统接口,如调用方为非系统应用或未申请SystemApi相关权限,将无法调用接口。 + +**关键的接口/组件变更** + +所有接口均变更为SystemApi,接口明细如下: + +| 接口、枚举或变量名 | 类型 | 是否为SystemApi | +| -------- | -------- | ------- | +| SessionToken | interface | 是 | +| AVMetadata | interface | 是 | +| AVPlaybackState | interface | 是 | +| PlaybackPosition | interface | 是 | +| OutputDeviceInfo | interface | 是 | +| AVSessionDescriptor | interface | 是 | +| AVSessionController | interface | 是 | +| AVControlCommand | interface | 是 | +| createAVSession | function | 是 | +| getAllSessionDescriptors | function | 是 | +| createController | function | 是 | +| castAudio | function | 是 | +| on | function | 是 | +| off | function | 是 | +| sendSystemAVKeyEvent | function | 是 | +| sendSystemControlCommand | function | 是 | +| sessionId | variable | 是 | +| setAVMetadata | function | 是 | +| setAVPlaybackState | function | 是 | +| setLaunchAbility | function | 是 | +| getController | function | 是 | +| getOutputDevice | function | 是 | +| activate | function | 是 | +| deactivate | function | 是 | +| destroy | function | 是 | +| getAVPlaybackState | function | 是 | +| getAVMetadata | function | 是 | +| getOutputDevice | function | 是 | +| sendAVKeyEvent | function | 是 | +| getLaunchAbility | function | 是 | +| getRealPlaybackPositionSync | function | 是 | +| isActive | function | 是 | +| getValidCommands | function | 是 | +| sendControlCommand | function | 是 | +| AVSessionType | type | 是 | +| AVControlCommandType | type | 是 | +| LoopMode | enum | 是 | +| PlaybackState | enum | 是 | +| AVSessionErrorCode | enum | 是 | diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md new file mode 100644 index 0000000000000000000000000000000000000000..21caa2f21e1b8f4d93cadb1e1d6dc4947ab5e4a4 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md @@ -0,0 +1,59 @@ +# 公共通信子系统NFC JS API变更Changelog + +## cl.nfc.1 接口变更 +NFC部分API6到API8部分JS接口不支持抛出错误码,需要删除废弃,然后使用新的API9替换。 + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响部分API6到API8部分JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | FeatureType | 废弃 | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | isSupported | 废弃 | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | hasHceCapability | 新增 | +| api/@ohos.nfc.controller.d.ts | nfcController | isNfcAvailable | 废弃 | +| api/@ohos.nfc.controller.d.ts | nfcController | openNfc | 废弃 | +| api/@ohos.nfc.controller.d.ts | nfcController | closeNfc | 废弃 | +| api/@ohos.nfc.controller.d.ts | nfcController | enableNfc | 新增 | +| api/@ohos.nfc.controller.d.ts | nfcController | disableNfc | 新增 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcATag | 废弃 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcBTag | 废弃 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcFTag | 废弃 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcVTag | 废弃 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcA | 新增 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcB | 新增 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcF | 新增 | +| api/@ohos.nfc.tag.d.ts | tag | getNfcV | 新增 | +| api/tag/tagSession.d.ts | TagSession | getTagInfo | 废弃 | +| api/tag/tagSession.d.ts | TagSession | connectTag | 废弃 | +| api/tag/tagSession.d.ts | TagSession | reset | 废弃 | +| api/tag/tagSession.d.ts | TagSession | isTagConnected | 废弃 | +| api/tag/tagSession.d.ts | TagSession | setSendDataTimeout | 废弃 | +| api/tag/tagSession.d.ts | TagSession | getSendDataTimeout | 废弃 | +| api/tag/tagSession.d.ts | TagSession | sendData | 废弃 | +| api/tag/tagSession.d.ts | TagSession | getMaxSendLength | 废弃 | +| api/tag/tagSession.d.ts | TagSession | connect | 新增 | +| api/tag/tagSession.d.ts | TagSession | resetConnection | 新增 | +| api/tag/tagSession.d.ts | TagSession | isConnected | 新增 | +| api/tag/tagSession.d.ts | TagSession | setTimeout | 新增 | +| api/tag/tagSession.d.ts | TagSession | getTimeout | 新增 | +| api/tag/tagSession.d.ts | TagSession | transmit | 新增 | +| api/tag/tagSession.d.ts | TagSession | getMaxTransmitSize | 新增 | + +**适配指导** + +查看API开发指南: +[cardEmulation-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cardEmulation.md) + +[nfcController-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-nfcController.md) + +[tag-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-nfcTag.md) + +[TagSession-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-tagSession.md) +``` + diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-notification.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-notification.md new file mode 100644 index 0000000000000000000000000000000000000000..c1f91a124b4023c7522d5075e6c96f7f669874d5 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-notification.md @@ -0,0 +1,48 @@ +# 事件通知子系统ChangeLog + +## cl.notification.1 删除标记为废弃的API9接口 + +事件通知异常处理整改将部分API9接口标记为了废弃,根据OpenHarmony接口规范,需要删除标记为废弃的API9接口。 + +**变更影响** + +基于此前版本开发的应用,需要将被删除的接口替换为新接口,否则会影响应用编译。 + +**关键接口/组件变更** + +原接口中标记为废弃的API9接口将被删除,可以使用新接口中的同名接口替换。 + +| 原接口 | 新接口 | +| ----------------------- | -------------------------------- | +| @ohos.commonEvent.d.ts | @ohos.commonEventManager.d.ts | +| @ohos.notification.d.ts | @ohos.notificationManager.d.ts | +| @ohos.notification.d.ts | @ohos.notificationSubscribe.d.ts | + +接口、属性被删除: + +- @ohos.notification.d.ts + - 接口 publishAsBundle、cancelAsBundle、isNotificationSlotEnabled、setSyncNotificationEnabledWithoutApp、getSyncNotificationEnabledWithoutApp 被删除。可以使用 api/@ohos.notificationManager.d.ts 的同名接口替换。 + - 接口 enableNotificationSlot 被删除。可以使用 api/@ohos.notificationManager.d.ts 的接口 setNotificationEnableSlot 替换。 + - 导出类 NotificationActionButton、NotificationBasicContent、NotificationContent、NotificationLongTextContent、NotificationMultiLineContent、NotificationPictureContent、NotificationFlags、NotificationFlagStatus、NotificationRequest、DistributedOptions、NotificationSlot、NotificationSorting、NotificationTemplate、NotificationUserInput 被删除。可以使用 api/@ohos.notificationManager.d.ts 的同名导出类替换。 + - 导出类 NotificationSubscribeInfo、NotificationSubscriber、SubscribeCallbackData、EnabledNotificationCallbackData 被删除。可以使用 api/@ohos.notificationSubscribe.d.ts 的同名导出类替换。 + +**适配指导** + +如上所述,仅将老接口平移到了新的namespace中,所以可以通过修改import来解决适配问题: + +如原先接口使用了@ohos.commonEvent + +```js +import commonEvent from '@ohos.commonEvent'; +``` + +可以通过直接修改import,来切换到新的namespace上: + +```js +import commonEvent from '@ohos.commonEventManager'; +``` + +@ohos.notification拆分成了两个namespace,需要根据接口情况选择需要的新namespace进行适配。 + +此外还需要适配异常处理,具体参考新接口的接口文档。 + diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md new file mode 100644 index 0000000000000000000000000000000000000000..a509d856204ff61c962b99fef71642eafaab930b --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md @@ -0,0 +1,107 @@ +# 位置服务子系统ChangeLog + +## cl.location.1 @ohos.geolocation.d.ts接口迁移到新增的@ohos.geoLocationManager.d.ts + +@ohos.geolocation.d.ts接口不支持抛出错误码,为了支持错误码功能,把@ohos.geolocation.d.ts中所有接口,迁移到新增的@ohos.geoLocationManager.d.ts中,并增加错误码描述。 + +后续需要import @ohos.geoLocationManager才能使用位置服务的接口: + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**变更影响** + +对位置服务所有接口的使用有影响,需要import @ohos.geoLocationManager才能使用位置服务接口: + +import geoLocationManager from '@ohos.geoLocationManager'; + +**关键的接口/组件变更** + +| 类名 | 接口类型 | 接口声明 | 变更类型 | +| -- | -- | -- | -- | +|geolocation| method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function off(type: 'locationChange', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function on(type: 'locationServiceState', callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'locationServiceState'更改为type: 'locationEnabledChange' | +|geolocation| method | function off(type: 'locationServiceState', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'locationServiceState'更改为type: 'locationEnabledChange' | +|geolocation| method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'cachedGnssLocationsReporting'更改为type: 'cachedGnssLocationsChange' | +|geolocation| method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'cachedGnssLocationsReporting'更改为type: 'cachedGnssLocationsChange' | +|geolocation| method | function on(type: 'gnssStatusChange', callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'gnssStatusChange'更改为type: 'satelliteStatusChange' | +|geolocation| method | function off(type: 'gnssStatusChange', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'gnssStatusChange'更改为type: 'satelliteStatusChange' | +|geolocation| method | function on(type: 'nmeaMessageChange', callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'nmeaMessageChange'更改为type: 'nmeaMessage' | +|geolocation| method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'nmeaMessageChange'更改为type: 'nmeaMessage' | +|geolocation| method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'fenceStatusChange'更改为type: 'gnssFenceStatusChange' | +|geolocation| method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | 接口迁移到@ohos.geoLocationManager.d.ts,type: 'fenceStatusChange'更改为type: 'gnssFenceStatusChange' | +|geolocation| method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCurrentLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getLastLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function getLastLocation(): Location; | +|geolocation| method | function getLastLocation(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function getLastLocation(): Location; | +|geolocation| method | function isLocationEnabled(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function isLocationEnabled(): boolean; | +|geolocation| method | function isLocationEnabled(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function isLocationEnabled(): boolean; | +|geolocation| method | function requestEnableLocation(callback: AsyncCallback): void; | 接口删除 | +|geolocation| method | function requestEnableLocation(): Promise; | 接口删除 | +|geolocation| method | function enableLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function enableLocation(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function disableLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function disableLocation(): void; | +|geolocation| method | function disableLocation(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function disableLocation(): void; | +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function isGeoServiceAvailable(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function isGeocoderAvailable(): boolean; | +|geolocation| method | function isGeoServiceAvailable(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function isGeocoderAvailable(): boolean; | +|geolocation| method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCachedGnssLocationsSize(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function flushCachedGnssLocations(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function flushCachedGnssLocations(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function sendCommand(command: LocationCommand): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function enableLocationMock(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function enableLocationMock(): void; | +|geolocation| method | function enableLocationMock(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function enableLocationMock(): void; | +|geolocation| method | function disableLocationMock(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function disableLocationMock(): void; | +|geolocation| method | function disableLocationMock(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function disableLocationMock(): void; | +|geolocation| method | function setMockedLocations(config: LocationMockConfig, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function setMockedLocations(config: LocationMockConfig): void; | +|geolocation| method | function setMockedLocations(config: LocationMockConfig): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function setMockedLocations(config: LocationMockConfig): void; | +|geolocation| method | function enableReverseGeocodingMock(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function enableReverseGeocodingMock(): void; | +|geolocation| method | function enableReverseGeocodingMock(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function enableReverseGeocodingMock(): void; | +|geolocation| method | function disableReverseGeocodingMock(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function disableReverseGeocodingMock(): void; | +|geolocation| method | function disableReverseGeocodingMock(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function disableReverseGeocodingMock(): void; | +|geolocation| method | function setReverseGeocodingMockInfo(mockInfos: Array, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function setReverseGeocodingMockInfo(mockInfos: Array): void; | +|geolocation| method | function setReverseGeocodingMockInfo(mockInfos: Array): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function setReverseGeocodingMockInfo(mockInfos: Array): void; | +|geolocation| method | function isLocationPrivacyConfirmed(type: LocationPrivacyType, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean; | +|geolocation| method | function isLocationPrivacyConfirmed(type: LocationPrivacyType,): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean; | +|geolocation| method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void; | +|geolocation| method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts,更改为function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void; | +|geolocation| interface | SatelliteStatusInfo | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | CachedGnssLocationsRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | GeofenceRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | Geofence | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | ReverseGeoCodeRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | GeoCodeRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | GeoAddress | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | LocationRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | CurrentLocationRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | Location | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | LocationRequestPriority | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | LocationRequestScenario | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | GeoLocationErrorCode | 接口废弃 | +|geolocation| enum | LocationPrivacyType | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | LocationCommand | 接口迁移到@ohos.geoLocationManager.d.ts | + + +**适配指导(可选,不涉及则可以删除)** + +以enableLocation为例,在新版本上需要使用如下方式进行调用: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..5d127ca0d13961d29741afdbd713275a3f6c8033 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md @@ -0,0 +1,92 @@ +# 位置服务子系统ChangeLog + +## cl.location.1 @ohos.geolocation.d.ts接口迁移到新增的@ohos.geoLocationManager.d.ts + +@ohos.geolocation.d.ts接口不支持抛出错误码,为了支持错误码功能,把@ohos.geolocation.d.ts中所有接口,迁移到新增的@ohos.geoLocationManager.d.ts中,并增加错误码描述。 + +后续需要import @ohos.geoLocationManager才能使用位置服务的接口: + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**变更影响** + +对位置服务所有接口的使用有影响,需要import @ohos.geoLocationManager才能使用位置服务接口: + +import geoLocationManager from '@ohos.geoLocationManager'; + +**关键的接口/组件变更** + +| 类名 | 接口类型 | 接口声明 | 变更类型 | +| -- | -- | -- | -- | +|geolocation| namespace | declare namespace geolocation| 迁移到@ohos.geoLocationManager.d.ts,使用namespace geoLocationManager代替 | +|geolocation| method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function off(type: 'locationChange', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function on(type: 'locationServiceState', callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function off(type: 'locationServiceState', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function on(type: 'gnssStatusChange', callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function off(type: 'gnssStatusChange', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function on(type: 'nmeaMessageChange', callback: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCurrentLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getLastLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getLastLocation(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function isLocationEnabled(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function isLocationEnabled(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function requestEnableLocation(callback: AsyncCallback): void; | 接口删除 | +|geolocation| method | function requestEnableLocation(): Promise; | 接口删除 | +|geolocation| method | function enableLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function enableLocation(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function disableLocation(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function disableLocation(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function isGeoServiceAvailable(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function isGeoServiceAvailable(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function getCachedGnssLocationsSize(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function flushCachedGnssLocations(callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function flushCachedGnssLocations(): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| method | function sendCommand(command: LocationCommand): Promise; | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | SatelliteStatusInfo | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | CachedGnssLocationsRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | GeofenceRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | Geofence | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | ReverseGeoCodeRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | GeoCodeRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | GeoAddress | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | LocationRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | CurrentLocationRequest | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| interface | Location | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | LocationRequestPriority | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | LocationRequestScenario | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | GeoLocationErrorCode | 接口废弃 | +|geolocation| enum | LocationPrivacyType | 接口迁移到@ohos.geoLocationManager.d.ts | +|geolocation| enum | LocationCommand | 接口迁移到@ohos.geoLocationManager.d.ts | + + +**适配指导(可选,不涉及则可以删除)** + +以enableLocation为例,在新版本上需要使用如下方式进行调用: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-request.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-request.md new file mode 100644 index 0000000000000000000000000000000000000000..6d7bc0e05cd183ff46328bbbbbe8722287961c70 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-request.md @@ -0,0 +1,42 @@ +# 上传下载子系统ChangeLog + + +## cl.request.2 request上传下载接口变更 + +- 删除API9-beta接口: +1. function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; +2. function download(context: BaseContext, config: DownloadConfig): Promise; +3. function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; +4. function upload(context: BaseContext, config: UploadConfig): Promise; + +**变更影响** + +基于此前版本使用Stage模式开发的应用,需适配变更后的接口,否则会影响原有业务逻辑。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +|--------------|--------------|-------------------------------------------------------------------------------------------------------------------|------| +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; | 删除 | +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig): Promise; | 删除 | +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | 删除 | +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig): Promise; | 删除 | + + +**适配指导** + +以download为例,在新版本上需要使用downloadFile, 如下方式进行调用: + +```ts +try { + request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap', + filePath: 'xxx/xxxxx.hap'}, (err, data) => { + if (err) { + console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); + return; + } + }); +} catch (err) { + console.log("downloadFile callback fail." + "errCode:" + err.code + ",errMessage:" + err.message); +} +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md new file mode 100644 index 0000000000000000000000000000000000000000..a7c431a2365444a6275d3fc3be61f785dcaa4b4f --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md @@ -0,0 +1,111 @@ +# 资源调度子系统ChangeLog + +## cl.resourceschedule.backgroundTaskManager +对资源调度子系统backgroundTaskManager仓原有接口进行整改,原有@ohos.backgroundTaskManager.d.ts中的API9接口删除,需要使用@ohos.resourceschedule.backgroundTaskManager.d.ts中的API9新接口。新的API9接口符合错误码规范。 + +**变更影响** + +基于OpenHarmony3.2.10.5及之后的SDK版本开发的应用,需适配API9的模块和接口,以及的API异常处理返回方式,否则会影响原有业务逻辑。 + +**关键接口/组件变更** + +以下方法、属性、枚举和常量均从API9变更。@ohos.backgroundTaskManager.d.ts文件中的接口移植到@ohos.resourceschedule.backgroundTaskManager.d.ts文件。 + +| 类名 | 接口类型 | 接口声明 | 说明 | +| -- | -- | -- | -- | +| backgroundTaskManager | method | function resetAllEfficiencyResources(): void; | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager | method | function applyEfficiencyResources(request: EfficiencyResourcesRequest): bool; | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts,修改为function applyEfficiencyResources(request: EfficiencyResourcesRequest): void; | +| backgroundTaskManager.ResourceType | enum | export enum ResourceType | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.ResourceType | enum | CPU = 1 | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.ResourceType | enum | COMMON_EVENT = 1 << 1 | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.ResourceType | enum | TIMER = 1 << 2 | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.ResourceType | enum | WORK_SCHEDULER = 1 << 3 | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.ResourceType | enum | BLUETOOTH = 1 << 4 | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.ResourceType | enum | GPS = 1 << 5 | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.ResourceType | enum | AUDIO = 1 << 6 | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.EfficiencyResourcesRequest | interface | export interface EfficiencyResourcesRequest | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.EfficiencyResourcesRequest | field | reason: string | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.EfficiencyResourcesRequest | field | isProcess?: bool | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.EfficiencyResourcesRequest | field | isPersist?: bool | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.EfficiencyResourcesRequest | field | timeOut: number | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.EfficiencyResourcesRequest | field | isApply: bool | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | +| backgroundTaskManager.EfficiencyResourcesRequest | field | resourceTypes: number | 接口API9删除,移植到ohos.resourceschedule.backgroundTaskManager.d.ts | + + +**适配指导**
+ +导入backgroundTaskManager模块。 +``` +import bundle form '@ohos.resourceschedule.backgroundTaskManager' +``` +此外还需要适配异常处理,具体参考[backgroundTaskManager接口文档](../../../application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md)。 + +## c2.resourceschedule.workScheduler +对资源调度子系统workScheduler仓原有接口进行整改,原有@ohos.workScheduler.d.ts中的API9接口删除,需要使用@ohos.resourceschedule.workScheduler.d.ts中的API9新接口。新的API9接口符合错误码规范。 + +**变更影响** + +基于OpenHarmony3.2.10.5及之后的SDK版本开发的应用,需适配API9的模块和接口,以及的API异常处理返回方式,否则会影响原有业务逻辑。 + +**关键接口/组件变更** + +以下方法、属性、枚举和常量均从API9变更。删除@ohos.workScheduler.d.ts文件,相关接口变更至@ohos.resourceschedule.workScheduler.d.ts文件中。 + +| 类名 | 接口类型 | 接口声明 | 变更类型 | +| -- | -- | -- | -- | +| workScheduler | namespace | declare namespace workScheduler | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | interface | export interface WorkInfo | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | idleWaitTime?: number | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | isDeepIdle?: boolean | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | repeatCount?: number | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | isRepeat?: boolean | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | repeatCycleTime?: number | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | storageRequest?: StorageRequest | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | batteryStatus?: BatteryStatus | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | batteryLevel?: number | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | chargerType?: ChargingType | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | isCharging?: boolean | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | networkType?: NetworkType | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | isPersisted?: boolean | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | abilityName: string | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | bundleName: string | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.WorkInfo | field | workId: number | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler | method | function isLastWorkTimeOut(workId: number): Promise; | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler | method | function isLastWorkTimeOut(workId: number, callback: AsyncCallback): boolean; | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler | method | function stopAndClearWorks(): boolean; | 接口API8变更,移植到ohos.resourceschedule.workScheduler.d.ts,修改为function stopAndClearWorks(): boolean; | +| workScheduler | method | function obtainAllWorks(): Promise>; | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler | method | function obtainAllWorks(callback: AsyncCallback): Array; | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler | method | function getWorkStatus(workId: number): Promise; | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler | method | function getWorkStatus(workId: number, callback: AsyncCallback): void; | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler | method | function stopWork(work: WorkInfo, needCancel?: boolean): boolean; | 接口API8变更,移植到ohos.resourceschedule.workScheduler.d.ts,修改为function stopWork(work: WorkInfo, needCancel?: boolean): void; | +| workScheduler | method | function startWork(work: WorkInfo): boolean; | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts,修改为function startWork(work: WorkInfo): void; | +| workScheduler.NetworkType | enum | export enum NetworkType | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.NetworkType | enum | NETWORK_TYPE_ANY = 0 | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.NetworkType | enum | NETWORK_TYPE_MOBILE | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.NetworkType | enum | NETWORK_TYPE_BLUETOOTH | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI_P2P | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.NetworkType | enum | NETWORK_TYPE_ETHERNET | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.ChargingType | enum | export enum ChargingType | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_ANY = 0 | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_AC | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_USB | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_WIRELESS | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.BatteryStatus | enum | export enum BatteryStatus | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW = 0 | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_OKAY | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW_OR_OKAY | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.StorageRequest | enum | export enum StorageRequest | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW = 0 | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_OKAY | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW_OR_OKAY | 接口API9删除,移植到ohos.resourceschedule.workScheduler.d.ts | + + +**适配指导**
+ +导入workScheduler模块。 +``` +import bundle form '@ohos.resourceschedule.workScheduler' +``` +此外还需要适配异常处理,具体参考[workScheduler接口文档](../../../application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md)。 diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-security.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-security.md new file mode 100644 index 0000000000000000000000000000000000000000..3f3a7acf0bbdee1aa1b640f511c91e3f65d2333e --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-security.md @@ -0,0 +1,475 @@ +# security子系统ChangeLog + +## cl.security.1 Random的setSeed功能变更,由异步接口改为同步接口 + +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +setSeed(seed : DataBlob, callback : AsyncCallback\) : void; +setSeed(seed : DataBlob) : Promise\; +修改后的接口原型: +setSeed(seed : DataBlob) : void; + +**适配指导** +查看API参考中setSeed对应的接口适配指南: +[加解密算法库框架-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cryptoFramework.md) + + +## cl.security.2 interface DataArray 从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface DataArray从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.3 interface EncodingFormat从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface EncodingFormat从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.4 interface EncodingBlob 从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface EncodingBlob 从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.5 interface CertChainData从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface CertChainData从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.6 interface X509Cert从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface X509Cert从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.7 function createX509Cert从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +function createX509Cert从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.8 interface X509CrlEntry从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface X509CrlEntry从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.9 interface X509Crl从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface X509Crl从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.10 function createX509Crl从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +function createX509Crl从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.11 interface CertChainValidator从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +interface CertChainValidator从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.12 function createCertChainValidator从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +function createCertChainValidator从@ohos.security.cryptoFramework.d.ts 迁移至@ohos.security.cert.d.ts + +**适配指导** +重新import并使用对应的.d.ts文件: +import cryptoCert from '@ohos.security.cert'; +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.13 X509Cert 的getPublicKey功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +getPublicKey(callback : AsyncCallback\) : void; +getPublicKey() : Promise\; +修改后的接口原型: +getPublicKey() : cryptoFramework.PubKey; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.14 X509Cert 的checkValidityWithDate功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +checkValidityWithDate(date: string, callback : AsyncCallback\) : void; +checkValidityWithDate(date: string) : Promise\; +修改后的接口原型: +checkValidityWithDate(date: string) : void; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.15 X509CrlEntry 的getCertIssuer功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +getCertIssuer(callback : AsyncCallback\) : void; +getCertIssuer() : Promise\; + +修改后的接口原型: +getCertIssuer() : DataBlob; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.16 X509CrlEntry 的getRevocationDate功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +getRevocationDate(callback : AsyncCallback\) : void; +getRevocationDate() : Promise\; + +修改后的接口原型: +getRevocationDate() : string; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.17 X509Crl 的isRevoked功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +isRevoked(cert : X509Cert, callback : AsyncCallback\) : void; +isRevoked(cert : X509Cert) : Promise\; + +修改后的接口原型: +isRevoked(cert : X509Cert) : boolean; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.18 X509Crl 的getRevokedCert功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +getRevokedCert(serialNumber : number, callback : AsyncCallback\) : void; +getRevokedCert(serialNumber : number) : Promise\; + +修改后的接口原型: +getRevokedCert(serialNumber : number) : X509CrlEntry; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.19 X509Crl 的getRevokedCertWithCert功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +getRevokedCertWithCert(cert : X509Cert, callback : AsyncCallback\) : void; +getRevokedCertWithCert(cert : X509Cert) : Promise\; + +修改后的接口原型: +getRevokedCertWithCert(cert : X509Cert) : X509CrlEntry; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.20 X509Crl 的getTbsInfo功能变更,由异步接口改为同步接口 +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以在新版本SDK环境正常编译通过。 + +**关键的接口/组件变更** +修改前的接口原型: +getTbsInfo(callback : AsyncCallback\) : void; +getTbsInfo() : Promise\; + +修改后的接口原型: +getTbsInfo() : DataBlob; + +**适配指导** +查看API参考中对应的接口适配指南: +[证书-API参考](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cert.md) + +## cl.security.21 HUKS支持No-Hash的签名模式 + +变更之前,应用传递huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE,HUKS默认使用huks.HuksKeyDigest.HUKS_DIGEST_SHA256进行处理;变更之后,应用传递huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE时,HUKS默认不进行摘要处理,需要业务先对原始数据进行hash操作,再将hash后的摘要传入huks进行签名/验签处理。 + +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 +应用需要进行适配,才可以使得变更前后的签名/验签结果通过。 + +**关键的接口/组件变更** + +发布的JS接口不变, 传入接口的参数集合发生变更。 + +业务使用No-Hash的签名模式,需要先对原始数据进行hash处理,再将hash后的摘要传入huks签名/验签接口。同时huks.HuksTag.HUKS_TAG_DIGEST参数设置为huks.HuksKeyDigest.HUKS_DIGEST_NONE。 + +**适配指导** + +以签名为例,示例代码如下: + +```js +import huks from '@ohos.security.huks'; + +let keyAlias = 'rsa_Key'; +/* sha256之后的摘要值 */ +let inDataAfterSha256 = new Uint8Array( + 0x4B, 0x1E, 0x22, 0x64, 0xA9, 0x89, 0x60, 0x1D, 0xEC, 0x78, 0xC0, 0x5D, 0xBE, 0x46, 0xAD, 0xCF, + 0x1C, 0x35, 0x16, 0x11, 0x34, 0x01, 0x4E, 0x9B, 0x7C, 0x00, 0x66, 0x0E, 0xCA, 0x09, 0xC0, 0xF3, +); +/* 签名参数 */ +let signProperties = new Array(); +signProperties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_RSA, +} +signProperties[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_SIGN +} +signProperties[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_RSA_KEY_SIZE_2048, +} +signProperties[3] = { + tag: huks.HuksTag.HUKS_TAG_DIGEST, + value: huks.HuksKeyDigest.HUKS_DIGEST_NONE, // 设置 digest-none +} +let signOptions = { + properties: signProperties, + inData: inDataAfterSha256 // 设置HASH后的值 +} + +huks.initSession(keyAlias, signOptions); +``` + +更多接口的示例代码可参考[HUKS-guidelines](../../../application-dev/security/huks-guidelines.md)和[HUKS API](../../../application-dev/reference/apis/js-apis-huks.md)。 + +## cl.security.22 HUKS支持在密钥使用时指定密钥运算参数 + +变更之前,业务在生成密钥的时候,必须指定密钥运算的全部参数;变更之后,在生成密钥时,只需要包含必选参数即可,在密钥使用阶段再传入其他参数。业务使用会更加灵活。 + +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 + +允许应用在生成密钥阶段传入的参数中包含必选参数即可,在密钥使用阶段再传入其他可选参数。 + +**关键的接口/组件变更** + +发布的JS接口不变, 传入接口的参数集合发生变更,将参数分为必选参数和可选参数,具体可参考[HUKS-guidelines](../../../application-dev/security/huks-guidelines.md),涉及的接口有: + +huks.generateKeyItem + +huks.importKeyItem + +huks.importWrappedKeyItem + +huks.initSession + +huks.updateSession + +huks.finishSession + +**适配指导** + +以生成密钥为例,示例代码如下: + +```js +let keyAlias = 'keyAlias'; +let properties = new Array(); +//必选参数 +properties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_RSA +}; +//必选参数 +properties[1] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_RSA_KEY_SIZE_2048 +}; +//必选参数 +properties[2] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_SIGN | + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_VERIFY +}; +//可选参数,如果在生成密钥阶段没有传入,则在使用密钥阶段必须传入。 +properties[3] = { + tag: huks.HuksTag.HUKS_TAG_DIGEST, + value: huks.HuksKeyDigest.HUKS_DIGEST_SHA256 +}; +let options = { + properties: properties +}; +try { + huks.generateKeyItem(keyAlias, options, function (error, data) { + if (error) { + console.error(`callback: generateKeyItem failed, code: ${error.code}, msg: ${error.message}`); + } else { + console.info(`callback: generateKeyItem key success`); + } + }); +} catch (error) { + console.error(`callback: generateKeyItem input arg invalid, code: ${error.code}, msg: ${error.message}`); +} +``` + +更多接口的示例代码可参考[HUKS-guidelines](../../../application-dev/security/huks-guidelines.md)和[HUKS API](../../../application-dev/reference/apis/js-apis-huks.md)。 diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..4494940d23cfa519f2c7b0e3ac7f3c1a3b1cfa8c --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md @@ -0,0 +1,50 @@ +# 位置服务子系统ChangeLog + +## cl.location.1 @system.geolocation.d.ts接口迁移到新增的@ohos.geoLocationManager.d.ts + +@system.geolocation.d.ts接口不支持抛出错误码,为了支持错误码功能,把@system.geolocation.d.ts中所有接口,迁移到新增的@ohos.geoLocationManager.d.ts中,并增加错误码描述。 + +后续需要import @ohos.geoLocationManager才能使用位置服务的接口: + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**变更影响** + +对位置服务所有接口的使用有影响,需要import @ohos.geoLocationManager才能使用位置服务接口: + +import geoLocationManager from '@ohos.geoLocationManager'; + +**关键的接口/组件变更** + +| 类名 | 接口类型 | 接口声明 | 变更类型 | +| -- | -- | -- | -- | +|Geolocation| class | Geolocation | 接口迁移到@ohos.geoLocationManager.d.ts,使用ohos.geoLocationManager/geoLocationManager代替 | +|Geolocation| interface | static getLocation(options?: GetLocationOption): void; | 接口迁移到@ohos.geoLocationManager.d.ts,使用ohos.geoLocationManager/geoLocationManager.getCurrentLocation代替 | +|Geolocation| interface | static getLocationType(options?: GetLocationTypeOption): void; | 接口废弃 | +|Geolocation| interface | static subscribe(options: SubscribeLocationOption): void; | 接口迁移到@ohos.geoLocationManager.d.ts,使用ohos.geoLocationManager/geoLocationManager.on#event:locationChange代替 | +|Geolocation| interface | static unsubscribe(): void; | 接口迁移到@ohos.geoLocationManager.d.ts,使用ohos.geoLocationManager/geoLocationManager.off#event:locationChange代替 | +|Geolocation| interface | static getSupportedCoordTypes(): Array; | 接口废弃 | +|| interface | GeolocationResponse| 迁移到@ohos.geoLocationManager.d.ts,使用ohos.geoLocationManager/geoLocationManager.Location代替 | +|| interface | GetLocationOption | 接口迁移到@ohos.geoLocationManager.d.ts,使用ohos.geoLocationManager/geoLocationManager.CurrentLocationRequest代替 | +|| interface | GetLocationTypeResponse | 接口废弃 | +|| interface | GetLocationTypeOption | 接口废弃 | +|| interface | SubscribeLocationOption | 接口迁移到@ohos.geoLocationManager.d.ts,使用ohos.geoLocationManager/geoLocationManager.LocationRequest代替 | + + +**适配指导(可选,不涉及则可以删除)** + +以enableLocation为例,在新版本上需要使用如下方式进行调用: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md new file mode 100644 index 0000000000000000000000000000000000000000..9096ff88cbc71e971fa3bd2d631684a161c175e2 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md @@ -0,0 +1,59 @@ +# 电话子系统ChangeLog + + + +## cl.telephony.1 radio模块接口变更 + + +### 电话子系统radio模块 `isNrSupported` 接口存在变更: + +NR是专有名词,需要全部大写。 + +开发者需要根据以下说明对应用进行适配。 + + + +**变更影响** + +基于此前版本开发的应用,需适配变更的js接口,变更前的接口已经不能正常使用了,否则会影响原有功能。 + + + +**关键的接口/组件变更** + +- 涉及接口 + + isNrSupported(): boolean; + isNrSupported(slotId: number): boolean; + +- 变更前: + +```js +function isNrSupported(): boolean; +function isNrSupported(slotId: number): boolean; +``` + +- 变更后: + +```js +function isNRSupported(): boolean; +function isNRSupported(slotId: number): boolean; +``` + + + +**适配指导** + +使用变更后的接口,示例代码如下: + +```js +let result = radio.isNrSupported(); +console.log("Result: "+ result); +``` + + +```js +let slotId = 0; +let result = radio.isNRSupported(slotId); +console.log("Result: "+ result); +``` diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-time.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-time.md new file mode 100644 index 0000000000000000000000000000000000000000..1f6aa755b94e4acbcec7900011f563478e1793fc --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-time.md @@ -0,0 +1,336 @@ +# 时间时区子系统ChangeLog + +## cl.time.1 接口异常抛出变更 + +时间时区子系统定时器接口异常抛出:202非系统应用异常和401参数无效异常。 + +**变更影响** + +该接口变更前向兼容,基于此前版本开发的应用可继续使用接口,增加相应的异常处理,原有功能不受影响。 + +**关键接口/组件变更** + +变更前: + - 接口异常抛出message,无错误码。 + +变更后: + - 接口异常抛出message和code,包括202非系统应用异常和401参数无效异常。 + + | 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | + | ----------------- | ----------- | ------------------------------------------------------------ | -------- | + | @ohos.systemTimer | systemTimer | function createTimer(options: TimerOptions, callback: AsyncCallback): void | 变更 | + | @ohos.systemTimer | systemTimer | function createTimer(options: TimerOptions): Promise | 变更 | + | @ohos.systemTimer | systemTimer | function startTimer(timer: number, triggerTime: number, callback: AsyncCallback): void | 变更 | + | @ohos.systemTimer | systemTimer | function startTimer(timer: number, triggerTime: number): Promise | 变更 | + | @ohos.systemTimer | systemTimer | function stopTimer(timer: number, callback: AsyncCallback): void | 变更 | + | @ohos.systemTimer | systemTimer | function stopTimer(timer: number): Promise | 变更 | + | @ohos.systemTimer | systemTimer | function destroyTimer(timer: number, callback: AsyncCallback): void | 变更 | + | @ohos.systemTimer | systemTimer | function destroyTimer(timer: number): Promise | 变更 | + + +**适配指导** + +应用中调用systemTimer所有接口可参考下列代码进行异常捕获 + +createTimer callback形式调用: + +**示例:** + +```js +export default { + systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat: false + }; + try { + systemTimer.createTimer(options, (error, timerId) => { + if (error) { + //捕获权限否定异常 + console.info(`Failed to create timer. message: ${error.message}, code: ${error.code}`); + } + console.info(`Succeeded in creating timer. timerId: ${timerId}`); + }); + } catch(e) { + //捕获参数校验失败异常 + console.info(`Failed to create timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +createTimer promise形式调用: + +**示例:** + +```js +export default { + systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat: false + }; + try { + systemTimer.createTimer(options).then((timerId) => { + console.info(`Succeeded in creating timer. timerId: ${timerId}`); + }).catch((error) => { + //捕获权限否定异常 + console.info(`Failed to create timer. message: ${error.message}, code: ${error.code}`); + }); + } catch(e) { + //捕获参数校验失败异常 + console.info(`Failed to create timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +startTimer callback形式调用: + +**示例:** + +```js +export default { + async systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + try { + systemTimer.startTimer(timerId, triggerTime, (error) => { + if (error) { + //捕获权限否定异常 + console.error(`Failed to start timer. message: ${error.message}, code: ${error.code}`); + } + }); + } catch (e) { + //捕获参数校验失败异常 + console.info(`Failed to start timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +startTimer promise形式调用: + +**示例:** + +```js +export default { + async systemTimer (){ + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + try { + systemTimer.startTimer(timerId, triggerTime).then((data) => { + console.log(`Succeeded in startting timer. Data:` + data); + }).catch((error) => { + //捕获权限否定异常 + console.info(`Failed to start timer. message: ${error.message}, code: ${error.code}`); + }); + } catch (e) { + //捕获参数校验失败异常 + console.info(`Failed to start timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +stopTimer callback形式调用: + +**示例:** + +```js +export default { + async systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + try { + systemTimer.stopTimer(timerId, triggerTime, (error) => { + if (error) { + //捕获权限否定异常 + console.error(`Failed to stop timer. message: ${error.message}, code: ${error.code}`); + } + }); + } catch (e) { + //捕获参数校验失败异常 + console.info(`Failed to stop timer. message: ${e.message}, code: ${e.code}`); + } + } +}git +``` + +stopTimer promise形式调用: + +**示例:** + +```js +export default { + async systemTimer (){ + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + try { + systemTimer.stopTimer(timerId, triggerTime).then((data) => { + console.log(`Succeeded in stop timer. Data:` + data); + }).catch((error) => { + //捕获权限否定异常 + console.info(`Failed to stop timer. message: ${error.message}, code: ${error.code}`); + }); + } catch (e) { + //捕获参数校验失败异常 + console.info(`Failed to stop timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +destroyTimer callback形式调用: + +**示例:** + +```js +export default { + async systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + systemTimer.stopTimer(timerId); + try { + systemTimer.destroyTimer(timerId, triggerTime, (error) => { + if (error) { + //捕获权限否定异常 + console.error(`Failed to destroy timer. message: ${error.message}, code: ${error.code}`); + } + }); + } catch (e) { + //捕获参数校验失败异常 + console.info(`Failed to destroy timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +destroyTimer promise形式调用: + +**示例:** + +```js +export default { + async systemTimer (){ + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + systemTimer.stopTimer(timerId); + try { + systemTimer.destroyTimer(timerId, triggerTime).then((data) => { + console.log(`Succeeded in destroy timer. Data:` + data); + }).catch((error) => { + //捕获权限否定异常 + console.info(`Failed to destroy timer. message: ${error.message}, code: ${error.code}`); + }); + } catch (e) { + //捕获参数校验失败异常 + console.info(`Failed to destroy timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +## cl.time.2 接口异常抛出变更 + +时间时区子系统时间相关接口异常抛出:201权限否定异常、202非系统应用异常和401参数无效异常。 + +**变更影响** + +基于此前版本开发的应用,继续使用无影响,使用新接口需要捕获并处理抛出的新异常。 + +**关键接口/组件变更** + +变更前: + - 接口异常抛出message,错误码-1。 + +变更后: + - 接口异常抛出message和code,包括201权限否定异常、202非系统应用异常和401参数无效异常。 + +原接口中标记为废弃的接口,可以使用新接口中的同名接口替换 + +| 原接口 | 新接口 | +| ---------------- | -------------------- | +| @ohos.systemTime | @ohos.systemDateTime | + +**适配指导** + +应用中调用systemTime所有接口可参考下列代码进行异常捕获,以setTime接口为例,其他接口适配方法相同。 + +callback形式调用: + +**示例:** + +```js +import systemDateTime from @ohos.systemDateTime +// time对应的时间为2021-01-20 02:36:25 +let time = 1611081385000; +try { + systemDateTime.setTime(time, (error) => { + //捕获权限否定异常和非系统应用异常 + if (error) { + console.info(`Failed to setting time. message: ${error.message}, code: ${error.code}`); + return; + } + console.info(`Succeeded in setting time.`); + }) +} catch(e) { + //捕获参数校验失败异常 + console.info(`Failed to set time. message: ${e.message}, code: ${e.code}`); +} +``` + +promise形式调用: + +**示例:** + +```js +import systemDateTime from @ohos.systemDateTime +// time对应的时间为2021-01-20 02:36:25 +let time = 1611081385000; +try { + systemDateTime.setTime(time).then(() => { + console.info(`Succeeded in setting time.`); + }).catch((error) => { + //捕获权限否定异常和非系统应用异常 + console.info(`Failed to setting time. message: ${error.message}, code: ${error.code}`); + }); +} catch(e) { + //捕获参数校验失败异常 + console.info(`Failed to set time. message: ${e.message}, code: ${e.code}`); +} +``` diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-url.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-url.md new file mode 100644 index 0000000000000000000000000000000000000000..34da098e0a10b2e03811bbc534e8599c759bac6f --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-url.md @@ -0,0 +1,68 @@ +# 公共基础类库子系统JS API变更Changelog + +## cl.commonlibrary.1.URLParams类接口变更 +公共基础类库子系统url模块URLParams类构造函数存在变更: + +constructor(init?: string[][] | Record | string | URLSearchParams) 改为 constructor(init?: string[][] | Record | string | URLParams);参数类型为原来的URLSearchParams类改为URLParams类。 + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| :------------------------ | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.url | URLParams | constructor(string[][] \| Record<string, string> \| string \| URLSearchParams) | 删除 | +| @ohos.url | URLParams | constructor(string[][] \| Record<string, string> \| string \| URLParams)| 变更 + +**适配指导** + +应用中创建URLParams对象实例可参考下列代码 + +示例: + +```ts +import url from '@ohos.url' +try { + let params1 = new Url.URLParams('?user=abc&query=xyz') + let params2 = new Url.URLParams(params1) + var result= params2.toString() + console.log(result) //"user=abc&query=xyz" +} catch (err) { + console.error(`Fail to ceate URLParams.codeis${err.code},message is ${err.message}`); +} +``` +## cl.commonlibrary.2.URL类属性变更url子系统URLParams类构造函数存在变更: +公共基础类库子系统url模块URL类属性存在变更: + +废弃searchParams: URLSearchParams属性,新增params: URLParams属性 + +开发者需要根据以下说明对应用进行适配。 + + **变更影响** + +影响API9版本的JS接口,应用需要进行适配才可以在新版本SDK环境正常实现功能。 + +**关键的接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| :------------------------ | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.url | URL | searchParams: URLSearchParams; |废弃版本:9
| +| @ohos.url | URL | params: URLParams; | 新增 | + +**适配指导** + +应用中创建URLParams对象实例可参考下列代码 + +示例: + +```ts +import url from '@ohos.url' +let that = new Url.URL('http://username:password@host:8080/directory/file?你好=china#qwer=da') +let params = that.URLParams +var result = params.toString() +console.log(result) //%E4%BD%A0%E5%A5%BD=china +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md new file mode 100644 index 0000000000000000000000000000000000000000..0444bab5234087b1f865eda378e680c95fc1abb4 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md @@ -0,0 +1,17 @@ +# 用户IAM子系统Changelog + +## cl.useriam.1 API9返回值命名变更 + +用户IAM API9的返回值枚举类类名发生变更,从 ResultCodeV9 更名为 UserAuthResultCode + +**变更影响** + +基于此版本以前开发的应用不受影响,以后的需适配错误码的类名,否则会影响业务逻辑。 + +**关键接口/组件变更** + +无接口/组件变更 + +**适配指导** + +需要修改返回值调用类名从 ResultCodeV9 改为 UserAuthResultCode \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-window.md b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-window.md new file mode 100644 index 0000000000000000000000000000000000000000..697060fe9cf6a50e0958bc566bd495e9220fa1c4 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v3.2-beta5/changelogs-window.md @@ -0,0 +1,63 @@ +# 窗口子系统ChangeLog + +## cl.window.1 WindowStage生命周期监听类型名称变更 + +WindowStage生命周期的监听类型枚举定义自3.2.10.5版本起进行了变更。 + +**变更影响** + +3.2.10.5版本之前使用FOREGROUND/BACKGROUND类型开发的应用生命周期监听,在3.2.10.5版本之后失效。 + +**关键接口/组件变更** + +## WindowStageEventType9+ + +变更前: + +| 名称 | 值 | 说明 | +| ---------- | ---- | ---------- | +| FOREGROUND | 1 | 切到前台。 | +| BACKGROUND | 4 | 切到后台。 | + +变更后: +| 名称 | 值 | 说明 | +| ------ | ---- | ---------- | +| SHOWN | 1 | 切到前台。 | +| HIDDEN | 4 | 切到后台。 | + +**适配指导** + +在注册生命周期监听回调时,将前后台事件类型改为SHOWN/HIDDEN: + +``` +import Ability from '@ohos.application.Ability'; + +class myAbility extends Ability { + onWindowStageCreate(windowStage) { + console.log('onWindowStageCreate'); + try { + windowStage.on('windowStageEvent', (stageEventType) => { + switch (stageEventType) { + case window.WindowStageEventType.SHOWN: + console.log("windowStage shown"); + break; + case window.WindowStageEventType.ACTIVE: + console.log("windowStage active"); + break; + case window.WindowStageEventType.INACTIVE: + console.log("windowStage inActive"); + break; + case window.WindowStageEventType.HIDDEN: + console.log("windowStage hidden"); + break; + default: + break; + } + } ) + } catch (exception) { + console.error('Failed to enable the listener for window stage event changes. Cause:' + + JSON.stringify(exception)); + }; + } +}; +``` diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/Readme-CN.md b/zh-cn/release-notes/changelogs/v4.0-beta1/Readme-CN.md new file mode 100644 index 0000000000000000000000000000000000000000..1032ef81260deb27c75625e8ad99f7ed535b20b9 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/Readme-CN.md @@ -0,0 +1,21 @@ +# Readme + +| 子系统 | 变更类型 | 变更说明 | +| :------------- | ------------ | ------------------------------------------------------------ | +| 通用 | 校验增强 | [System API校验权限增强,只有系统应用允许使用system-api,三方应用使用system-api将返回202错误](changelogs-common.md) | +| 元能力 | 行为变更 | [apprecovery接口中RestartFlag枚举命名从特定故障发生后不重启改成了特定故障发生后重启](changelogs-ability.md) | +| 语言编译运行时 | 解析规则变更 | [LLVM解析格式变更,对于业务依赖version-script或gcc-toolchain选项的开发者,在沿用LLVM12配置文件或选项时,部分规则发生变化,可能会解析失败](changelogs-arkcompiler.md) | +| 语言编译运行时 | 校验增强 | [LLVM新增告警及已有告警增强,LLVM从12升级15,新增告警/对已有的告警校验增强](changelogs-arkcompiler.md) | +| 语言编译运行时 | 校验增强 | [LLVM emu-tls变更,对于LLVM12/LLVM15工具链混用的开发者,会产生libc++.so emu-tls符号无法找到的问题](changelogs-arkcompiler.md) | +| 语言编译运行时 | 校验增强 | [LLVM12~15官方变更差异继承新增特性及内部接口变更](changelogs-arkcompiler.md) | +| ArkUI | 行为变更 | [修复Stack布局问题](changelogs-arkui.md) | +| ArkUI | 默认值变更 | [List组件和Gird组件滚动条默认状态变更](changelogs-arkui.md) | +| ArkUI | UX变更 | [Button组件hover状态效果变更,由100-105%放大效果变更为0-5%](changelogs-arkui.md) | +| ArkUI | UX变更 | [toast组件多行文本对齐方式由居中对齐变更为左对齐](changelogs-arkui.md) | +| 包管理 | 机制变更 | [安装hap时,hap中的文件不在解压到安装目录](changelogs-bundlemanager.md) | +| 全球化 | 接口扩展 | [getStringSync、getStringByNameSync接口能力扩展](changelogs-global.md) | +| 全球化 | 行为变更 | [资源获取rawfile文件描述符接口含义变更相较于之前的版本返回值发生了变化](changelogs-global.md) | +| 安全-huks | 行为变更 | [解决在派生密钥/协商密钥时需传入HuksKeyStorageType中定义的类型](changelogs-huks.md) | +| 安全-huks | 权限变更 | [attestKeyitem是基于设备证书链封装业务公钥对用户指定的密钥进行证明](changelogs-huks.md) | +| Web | 新增入参 | [setResponseData接口支持Resource类型](changelogs-web.md) | +| 资源调度 | 行为变更 | [提醒代理支持系统应用设置自定义按钮,并且自定义按钮可跳转指定应用界面](changelogs-resourceschedule.md) | diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-ability.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..9fc74280029e368e55e89f60e4e9da9501d612fc --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-ability.md @@ -0,0 +1,37 @@ +# 元能力子系统ChangeLog + + +## cl.ability.1 appRecovery接口中RestartFlag属性名称变更,删除了未支持的属性 + +appRecovery接口中RestartFlag枚举命名从特定故障发生后**不重启**改成了特定故障发生后**重启**。 +删除了CPP_CRASH_NO_RESTART。 + +**变更影响** + +4.0.2.3版本之前使用CPP_CRASH_NO_RESTART/JS_CRASH_NO_RESTART/APP_FREEZE_NO_RESTART类型开发的应用,在4.0.2.3版本之后行为会发生变化。 + +**关键接口/组件变更** + +**RestartFlag** 9+ + +变更前: +| 名称 | 值 | 说明 | +| ----------------------------- | ---- | ------------------------------------------------------------ | +| ALWAYS_RESTART | 0 | 总是重启应用。 | +| CPP_CRASH_NO_RESTART | 0x0001 | 发生CPP_CRASH时**不重启**应用。 | +| JS_CRASH_NO_RESTART | 0x0002 | 发生JS_CRASH时**不重启**应用。 | +| APP_FREEZE_NO_RESTART | 0x0004 | 发生APP_FREEZE时**不重启**应用。 | +| NO_RESTART | 0xFFFF | 总是不重启应用。 | + +变更后: +| 名称 | 值 | 说明 | +| ---------- | ---- | ---------- | +| ALWAYS_RESTART | 0 | 总是重启应用。 | +| CPP_CRASH_NO_RESTART | NA | **删除**,不支持该场景的重启。 | +| RESTART_WHEN_JS_CRASH | 0x0001 | 发生JS_CRASH时**重启**应用。 | +| RESTART_WHEN_APP_FREEZE | 0x0002 | 发生APP_FREEZE时**重启**应用。 | +| NO_RESTART | 0xFFFF | 总是不重启应用。 | + +**适配指导** + +按新的语义进行适配。 diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-arkcompiler.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-arkcompiler.md new file mode 100644 index 0000000000000000000000000000000000000000..84b146981cfb7b5ff609c9ff98f34a05d8e39491 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-arkcompiler.md @@ -0,0 +1,164 @@ +# 语言编译运行时子系统ChangeLog +## cl.arkcompiler.1 LLVM新增告警及已有告警增强 + +**变更影响** + +OpenHarmony NDK默认不开启-Werror选项,对于已经开启-Werror选项的开发者,建议基于告警检查提示修改错误业务代码或屏蔽 + + **关键的编译检查规则变更** + +| 新增检查选项 | 作用 | 修改建议 | +| --- | --- | --- | +| Wunused-but-set-variable | 当代码中有未使用的变量时(包含++操作符)提出告警 | 定义变量时添加"maybe_unused"属性或者使用宏区分 | +| Wdeprecated-non-prototype | 当代码中存在没有原型的函数时提出告警 | 添加函数原型并明确参数 | +| Wunqualified-std-cast-call | 当代码中错误使用std::move等时提出告警 | 明确移动语义的使用场景并检查代码 | +| Wdeprecated-builtins | 当代码中使用了废弃的内置函数时提出告警 | 替换使用新版函数 | +| Warray-parameter | 当函数参数中包含数组并且重复定义了不一致的形式时提出告警 | 确认函数参数的一致性 | +| Wbitwise-instead-of-logical | 当在布尔运算中使用按位或时提出告警 | 更新代码在布尔运算中使用逻辑或 | +| Wint-conversion | 当代码中出现int变量转换为指针时提出告警 | 更新代码替换使用新的实现方式 | +| Wdeprecated-declarations | 当代码中使用了废弃的定义(包含函数和变量等)时提出告警 | 更新代码替换使用新的实现方式 | +| Wnull-pointer-subtraction | 当代码中出现空指针减法时提出告警 | 更新代码避免空指针参与减法运算 | +| Wunused-but-set-parameter | 当函数中出现未使用的参数时提出告警 | 更新代码去掉未使用的参数 | +| Warray-bounds | 当代码中出现对数组的越界访问时提出告警 | 检查代码并修改越界访问 | +| Wdeprecated-pragma | 当代码中使用了废弃的宏时提出告警 | 更新代码避免使用废弃的宏 | +| Wreserved-identifier | 当代码中使用了"__"开头的变量时提出告警 | 检查代码避免"__"开头的变量被外部使用 | + + **适配指导** + +1. 对于用户代码中存在的LLVM-12未检测出来的问题,需要用户检查并更新代码。 +2. LLVM更新废弃了一些旧的实现,需要用户代码适配并更新代码。 +3. 开发者评估暂时规避的告警,可采用-Wno-xxx选项规避该error。 + +问题代码实例 + +``` +void Heap::Resume(TriggerGCType gcType) +{ + if (mode_ != HeapMode::SPAWN && + activeSemiSpace_->AdjustCapacity(inactiveSemiSpace_->GetAllocatedSizeSinceGC())) { + // if activeSpace capacity changes, oldSpace maximumCapacity should change, too. + size_t multiple = 2; + // oldSpaceMaxLimit被赋值了但未被使用 + size_t oldSpaceMaxLimit = 0; + if (activeSemiSpace_->GetInitialCapacity() >= inactiveSemiSpace_->GetInitialCapacity()) { + size_t delta = activeSemiSpace_->GetInitialCapacity() - inactiveSemiSpace_->GetInitialCapacity(); + oldSpaceMaxLimit = oldSpace_->GetMaximumCapacity() - delta * multiple; + } else { + size_t delta = inactiveSemiSpace_->GetInitialCapacity() - activeSemiSpace_->GetInitialCapacity(); + oldSpaceMaxLimit = oldSpace_->GetMaximumCapacity() + delta * multiple; + } + inactiveSemiSpace_->SetInitialCapacity(activeSemiSpace_->GetInitialCapacity()); + } + // irrelated code ... +} +``` + +oldSpaceMaxLimit变量并未使用,编译器提出告警 + +``` +../../arkcompiler/ets_runtime/ecmascript/mem/heap.cpp:247:16: error: variable 'oldSpaceMaxLimit' set but not used [-Werror,-Wunused-but-set-variable] + size_t oldSpaceMaxLimit = 0; +``` + +添加属性后解决 + +``` +void Heap::Resume(TriggerGCType gcType) +{ + if (mode_ != HeapMode::SPAWN && + activeSemiSpace_->AdjustCapacity(inactiveSemiSpace_->GetAllocatedSizeSinceGC())) { + // if activeSpace capacity changes, oldSpace maximumCapacity should change, too. + size_t multiple = 2; + // 添加maybe_unused属性,声明不一定使用变量oldSpaceMaxLimit + [[maybe_unused]] size_t oldSpaceMaxLimit = 0; + if (activeSemiSpace_->GetInitialCapacity() >= inactiveSemiSpace_->GetInitialCapacity()) { + size_t delta = activeSemiSpace_->GetInitialCapacity() - inactiveSemiSpace_->GetInitialCapacity(); + oldSpaceMaxLimit = oldSpace_->GetMaximumCapacity() - delta * multiple; + } else { + size_t delta = inactiveSemiSpace_->GetInitialCapacity() - activeSemiSpace_->GetInitialCapacity(); + oldSpaceMaxLimit = oldSpace_->GetMaximumCapacity() + delta * multiple; + } + inactiveSemiSpace_->SetInitialCapacity(activeSemiSpace_->GetInitialCapacity()); + } + // irrelated code ... +} +``` + +## cl.arkcompiler.2 LLVM解析格式差异 + + **变更影响** + +对于业务依赖version-script或-gcc-toolchain选项的开发者,在沿用LLVM12配置文件或选项时,可能会解析失败 + + **关键的编译规则变更** + +1. 新版本中修改了符号的表示,现在连续的">"会被编译器表示为">>",这个在旧版本中会被表示为"> >",错误使用将导致符号不被解析匹配 +2. 废弃-xx选项,如-gcc-toolchain选项,改用--gcc-toolchain选项(该选项在clang3.4以后的版本已表示会弃用,LLVM15上正式废弃) + + **适配指导** + +version-script使用方法可以参考 + +适配实例 + +对于代码中出现连续两个“>”(忽略中间空格数量),在version-script中(由于 mangling差异)会被分别解析为如下"> >"与">>"两种情况,在15中我们需要使用">>" + +原始配置文件 + +``` +{ + global: + extern "C++" { + "google::protobuf::TextFormat::ParseFromString(std::__cxx11::basic_string, std::allocator > const&, google::protobuf::Message*)"; + // LLVM12 "> >"可以被解析,但">>"不行 + "google::protobuf::TextFormat::PrintToString(google::protobuf::Message const&, std::__cxx11::basic_string, std::allocator >*)"; + }; + local: + *; +} +``` + +修改后的配置文件 + +``` +{ + global: + extern "C++" { + "google::protobuf::TextFormat::ParseFromString(std::__cxx11::basic_string, std::allocator> const&, google::protobuf::Message*)"; + // LLVM15 只会解析">>" + "google::protobuf::TextFormat::PrintToString(google::protobuf::Message const&, std::__cxx11::basic_string, std::allocator>*)"; + }; + local: + *; +} +``` + +## cl.arkcompiler.3 LLVM emu-tls变更 + + **变更影响** + +对于LLVM12/LLVM15工具链混用的开发者(禁止行为),会产生libc++.so emu-tls符号无法找到的问题 + + **关键的库依赖变更** + +LLVM15中将emu-tls符号从目标二进制抽取到了libc++.so中,即__emutls_get_address的属性从内部符号变为外部可见的符号(libc++.so中会包含该符号),可能会导致编译出来的动态库依赖libc++.so。 + + **适配指导** + +该符号同时也在libclang_rt.builtin.a中,如果不希望依赖libc++.so可以静态链接libclang_rt.builtin.a库。 + +## cl.arkcompiler.4 LLVM官方release note + + **变更影响** + +新增特性及内部接口变更(如LLVM内部的IR,编译器前端修改),详见官方变更文档 + + **关键变更文档** + +https://releases.llvm.org/13.0.0/docs/ReleaseNotes.html +https://releases.llvm.org/14.0.0/docs/ReleaseNotes.html +https://releases.llvm.org/15.0.0/docs/ReleaseNotes.html + + **适配指导** + +详细修改信息以及适配指导见官方文档 \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-arkui.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..fb31700be5dfcbe794abfefdb4db5f8c75fcde3d --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-arkui.md @@ -0,0 +1,86 @@ +# arkui子系统ChangeLog + + +## cl.arkui.1 List组件和Gird组件滚动条默认状态变更 + +List组件和Gird组件滚动条默认状态从BarState.Off变更为BarState.Auto。 + +**变更影响** + +List组件和Gird组件,如果没有设置滚动条状态,变更前不会显示滚动条,变更以后滚动时会显示滚动条,滚动停止两秒后滚动条隐藏。 + +**关键接口/组件变更** + +List组件和Gird组件滚动条API接口文档: +- [List组件属性](../../../application-dev/reference/arkui-ts/ts-container-list.md#属性) +- [Grid组件属性](../../../application-dev/reference/arkui-ts/ts-container-grid.md#属性) + +**适配指导** + +对于不需要滚动条的场景,需要将List组件或Grid组件的scrollBar属性设置为BarState.Off。 + +参考代码如下: +```ts +// xxx.ets +@Entry +@Component +struct ListItemExample { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, item => item) + } + .width('90%') + .scrollBar(BarState.Off) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} +``` + +## cl.arkui.2 修复Stack布局问题 + +修复问题:[Stack](../../../application-dev/reference/arkui-ts/ts-container-stack.md)设置alignContent,在子组件超出父组件的场景中,子组件未按照alignContent布局 +示例: +```ts +@Entry +@Component +struct StackExample { + build() { + Stack({alignContent:Alignment.TopEnd}){ + Text('First child, show in bottom') + .width(200).height(200).backgroundColor(0xd2cab3).margin(10) + }.width(150).height(150).backgroundColor(Color.Pink).margin(100) + } +} +``` +修复前:子组件未能按照alignContent:Alignment.TopEnd布局 +![stack](figures/stack_before.jpg) + +修复后:子组件可以按照alignContent:Alignment.TopEnd布局 +![stack](figures/stack_after.jpg) + + +**变更影响** + +1. 如果应用中有子组件大小大于父组件Stack的场景,需要应用进行适配。 +2. 应用之前可能采用的规避方案:给子组件设置Offset或者translate + +**适配指导** + + 去掉之前给子组件设置的Offset或者translate,使用alignContent实际布局方式进行布局。 + +## cl.arkui.3 Button组件hover状态效果变更 + +Button组件的hover状态由100-105%放大效果变更为0-5%不透明度的叠加效果,hover状态切换到press状态的效果变更为5-10%不透明度的叠加效果。 + +**变更影响** + +影响Button的hover状态的视觉效果以及hover状态切换到press状态的视觉效果。 \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-bundlemanager.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..772fca32de66e85fb2f1c37a8cad793494288557 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-bundlemanager.md @@ -0,0 +1,14 @@ +# 包管理子系统ChangeLog + +## cl.bundlemanager.1 底层能力变更,安装hap时,hap中的文件不再解压到安装目录。 + +安装hap后,安装目录下只会存在hap文件,应用不能再使用拼接路径访问解压后的资源文件,应用想要访问资源文件,需要使用标准的资源管理接口。 + +**变更影响**
+如果应用使用拼接路径的形式访问资源文件,会访问失败。需要修改成使用资源管理接口访问资源文件。 + +**关键的接口/组件变更**
+不涉及接口及组件变更 + +**适配指导**
+资源管理子系统提供Js接口访问资源文件。参考[访问资源文件](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-resource-manager.md#getrawfilecontent9) \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-common.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-common.md new file mode 100644 index 0000000000000000000000000000000000000000..8059df59a9baf2c0b5b56af0762fd37c732d8f7c --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-common.md @@ -0,0 +1,13 @@ +# 通用能力ChangeLog + +## cl.common.1 SystemAPI使用规则变更 + +目前子系统提供的system-api在调用时未做系统应用校验,三方应用使用Full版本的SDK就可以使用这些system-api,存在安全隐患,因此在OpenHarmony 4.0.2.1版本开始增加应用身份校验。 + +**变更影响** + +只有系统应用允许使用system-api,三方应用使用system-api将返回202错误,返回202错误的方式有两种:1.抛异常;2.异步回调 + +**适配指导** + +非系统应用使用systemapi有两种方法:1.申请系统应用权限 2.更换接口使用 diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-global.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-global.md new file mode 100644 index 0000000000000000000000000000000000000000..36fda1512aeb094246af0f185c355362d9de71e7 --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-global.md @@ -0,0 +1,104 @@ +# 全球化子系统ChangeLog + + +## cl.resourceManager.1 资源获取rawfile文件描述符接口含义变更 + +相较于之前的版本,在4.0.2.2 版本中,新增不解压特性,rawfile文件描述符接口返回值的含义发生了变化。接口用于返回获取的rawfile文件的descriptor:RawFileDescriptor {fd,offset, length},由于不解压特性变更,返回值没发生变化,但返回值的含义发生了变化, 变化如下: + +**新增不解压特性前**: + +fd: 访问rawfile文件的文件描述符; + +offset: 访问rawfile文件的偏移量,此时为0; + +length: 访问rawfile文件的大小。 + +**新增不解压特性后**: + +fd: 访问rawfile文件所在hap的文件描述符; + +offset: 访问rawfile文件相对于hap的偏移量; + +length: 访问rawfile文件的大小。 + +**变更影响** + +之前只通过fd可以访问到rawfile文件,在4.0.2.2 及以上版本需要通过{fd, offset, length}三个参数才能访问到。 + +**关键接口/组件变更** + +| **涉及接口** | +| ---------------- | +| getRawFd(path: string, callback: AsyncCallback\): void | +| getRawFd(path: string): Promise\ | +| getRawFileDescriptor(path: string, callback: AsyncCallback\): void| +| getRawFileDescriptor(path: string): Promise\| +|| + +**示例代码** + +以调用接口getRawFd为例: +``` +try { + this.context.resourceManager.getRawFd("test.ogg", (error, value) => { + if (error != null) { + console.log(`callback getRawFd failed error code: ${error.code}, message: ${error.message}.`); + } else { + let fileDescriptor = { + fd = value.fd, + offset = value.offset, + length = value.length + } + this.avPlayer.fdSrc(fileDescriptor); // 以音频播放为例,调用fdSrc时需要传fileDescriptor,不能仅传fd。 + } + }); + } catch (error) { + console.error(`callback getRawFd failed, error code: ${error.code}, message: ${error.message}.`) + }; +``` + + +## cl.resourceManager.2 getStringSync、getStringByNameSync新增接口 + +相较于之前的版本,在4.0.6.2 版本中,为扩展getStringSync、getStringByNameSync接口字符串匹配功能,新增了接口以及相应的错误码。 + +| 包名 | 新增接口 | +| --------------- | ---------------------------------------------------- | +| ohos.resourceManager.d.ts | getStringSync(resId: number, ...args: Array): string; | +| ohos.resourceManager.d.ts | getStringSync(resource: Resource, ...args: Array): string; | +| ohos.resourceManager.d.ts | getStringByNameSync(resName: string, ...args: Array): string; | + +**变更影响** + +之前只能直接获取resources中的string资源的value值,在4.0.6.2 及以上版本中可用通过参数格式化string资源的value值,扩展了格式化字符串的查询能力。 + +新增错误码: + +9001007 根据当前id获取的资源格式化失败 + +9001008 根据当前名称获取的资源格式化失败 + +**示例代码** + +以调用接口getStringSync为例,变更前只支持示例1,变更后示例1、示例2都支持。 +``` +示例1: +try { + this.context.resourceManager.getStringSync($r('app.string.test').id); +} catch (error) { + console.error(`getStringSync failed, error code: ${error.code}, message: ${error.message}.`) +} +示例2: +try { + this.context.resourceManager.getStringSync($r('app.string.test').id, "format string", 787, 98.78); +} catch (error) { + console.error(`getStringSync failed, error code: ${error.code}, message: ${error.message}.`) +} +``` + +**适配指导** +请参考接口说明: + +[新增接口参考](../../../application-dev/reference/apis/js-apis-resource-manager.md) + +[新增错误码参考](../../../application-dev/reference/errorcodes/errorcode-resource-manager.md) \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-huks.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-huks.md new file mode 100644 index 0000000000000000000000000000000000000000..b3a2b755ed05cd502f35a28de5d3285967cf43fe --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-huks.md @@ -0,0 +1,49 @@ +# HUKS子系统ChangeLog + +OpenHarmony 4.0.6.1 版本相较于OpenHarmony 之前的版本,HUKS的API使用权限变更如下。 + +## cl.huks.1 attestKeyItem接口使用权限变更 + +attestKeyItem是基于设备证书链封装业务公钥对用户指定的密钥进行证明,如果设备证书随意导出涉及用户隐私风险,所以此接口需要增加系统权限管控。 + +**变更影响** + +对于不具备system权限或者ohos.permission.ACCESS_IDS权限的应用,无法正常使用attestKeyItem接口。 + +**关键的接口/组件变更** + +- 涉及接口 + + attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\): void; + attestKeyItem(keyAlias: string, options: HuksOptions): Promise\; + +- 变更前: + + 只针对传入ATTESTATION_ID相关TAG的应用校验AccessToken权限,其它情况无接口权限的限制。 + + +- 变更后: + + 只有具备system权限的系统应用或者申请了ohos.permission.ACCESS_IDS权限的普通应用才能正常使用attestKeyItem接口。 + +**适配指导** + +已经具备system权限的应用则可以正常使用attestKeyItem接口,其余普通应用需申请ohos.permission.ACCESS_IDS权限即可,申请方法参考[ACL权限配置说明](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/accesstoken-overview.md#%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6%E5%88%97%E8%A1%A8acl%E8%AF%B4%E6%98%8E)。 + +## cl.huks.2 HUKS解决派生密钥/协商密钥的存储/导出问题 + +变更之前,派生密钥/协商密钥既支持存储,又支持导出,存在安全风险; + +变更之后,应用在派生密钥/协商密钥时需传入HuksKeyStorageType中定义的类型。应用只能选择存储,或者选择导出。若不传入,则默认同时支持存储和导出,存在安全问题,不推荐业务使用。 + +**变更影响** + +影响已发布的JS接口,接口行为发生变更。 + +**关键的接口/组件变更** + +发布的JS接口不变, 传入接口的参数集合发生变更。 + +**适配指导** + +接口使用的示例代码可参考[HUKS-guidelines](../../../application-dev/security/huks-guidelines.md)和[HUKS API](../../../application-dev/reference/apis/js-apis-huks.md)。 diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-resourceschedule.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-resourceschedule.md new file mode 100644 index 0000000000000000000000000000000000000000..b139ffe6e12658c9d0d43db7024eebd6915d749e --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-resourceschedule.md @@ -0,0 +1,48 @@ +# 资源调度子系统ChangeLog + + +## cl.resourceschedule.reminderAgent.1 + +提醒代理支持系统应用设置自定义按钮,并且自定义按钮可跳转指定应用界面。 + +**变更影响** + +基于OpenHarmony4.0.7.1及之后的SDK版本开发的系统应用,可设置提醒自定义按钮。 + +**关键接口/组件变更** + +| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | +| -- | -- | -- | -- | +| reminderAgentManager | ActionButtonType | ACTION_BUTTON_TYPE_CUSTOM = 2 | 新增 | +| reminderAgentManager | ActionButton | wantAgent?: WantAgent | 新增 | +| reminderAgentManager | WantAgent | uri?: string | 新增 | +| reminderAgentManager | ReminderRequest | actionButton?: [ActionButton?, ActionButton?, ActionButton?] | 变更 | + +**适配指导**
+ +```ts +import reminderAgentManager from '@ohos.reminderAgentManager'; + +let targetReminderAgent: reminderAgentManager.ReminderRequestAlarm = { + reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_ALARM, // 提醒类型为闹钟类型 + ... + actionButton: [ + { + title: '稍后提醒', + type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_SNOOZE + }, + { + title: '关闭', + type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CLOSE + }, + { + title: '自定义', + type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CUSTOM, + wantAgent: { + pkgName: "com.example.myapplication", + abilityName: "EntryAbility", + } + }, + ] +} +``` diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-web.md b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-web.md new file mode 100644 index 0000000000000000000000000000000000000000..b232d4c7fc93fa71e0e2202ef089c220ac66fc4d --- /dev/null +++ b/zh-cn/release-notes/changelogs/v4.0-beta1/changelogs-web.md @@ -0,0 +1,126 @@ +# web子系统ChangeLog + +OpenHarmony 4.0.7.3 版本相较于OpenHarmony 之前的版本,web的API变更如下。 + +## cl.web.1 setResponseData接口参数新增 + +**变更影响** + +setResponseData(data: string | number | Resource),新增入参类型`Resource` + +在应用hap不解压场景,应用hap中的文件路径已不存在。当需要读取hap包内资源时,通过使用入参`data:Resource`替代`data:number`,实现对本应用下的资源访问。 + +**关键的接口/组件变更** + +- 涉及接口 + + setResponseData + +- 变更前: + + ``` + setResponseData(data: string | number) + ``` + +- 变更后: + + ``` + setResponseData(data: string | number | Resource) + ``` + +**适配指导** + +应用hap解压时,打开并持有资源文件fd,最后通过`setResponseData(data:number)`将资源响应数据传递给内核。 + +``` +// xxx.ets +import web_webview from '@ohos.web.webview' +import fileio from '@ohos.fileio'; + +@Entry +@Component +struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController() + responseweb: WebResourceResponse = new WebResourceResponse() + heads: Header[] = new Array() + + build() { + Column() { + Web({ src: 'www.example.com', controller: this.controller }) + .onInterceptRequest((event) => { + console.log('url:' + event.request.getRequestUrl()) + var head1:Header = { + headerKey:"Connection", + headerValue:"keep-alive" + } + var head2:Header = { + headerKey:"Cache-Control", + headerValue:"no-cache" + } + var length = this.heads.push(head1) + length = this.heads.push(head2) + this.responseweb.setResponseHeader(this.heads) + this.responseweb.setResponseEncoding('utf-8') + this.responseweb.setResponseMimeType('text/html') + this.responseweb.setResponseCode(200) + this.responseweb.setReasonMessage('OK') + + //// fd方案 --start + // '/xxx/.../test.html'为文件的本地路径 + // @ts-ignore + let fd = fileio.openSync('/xxx/.../test.html', 0o102, 0o666) + this.responseweb.setResponseData(fd) + //// fd方案 --end + + return this.responseweb + }) + } + } +} +``` + +应用hap不解压时,应用hap中的文件路径已不存在,通过`setResponseData(data:Resource)`将资源响应数据传递给内核。 + +``` +// xxx.ets +import web_webview from '@ohos.web.webview' + +@Entry +@Component +struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController() + responseweb: WebResourceResponse = new WebResourceResponse() + heads: Header[] = new Array() + + build() { + Column() { + Web({ src: 'www.example.com', controller: this.controller }) + .onInterceptRequest((event) => { + console.log('url:' + event.request.getRequestUrl()) + var head1:Header = { + headerKey:"Connection", + headerValue:"keep-alive" + } + var head2:Header = { + headerKey:"Cache-Control", + headerValue:"no-cache" + } + var length = this.heads.push(head1) + length = this.heads.push(head2) + this.responseweb.setResponseHeader(this.heads) + this.responseweb.setResponseEncoding('utf-8') + this.responseweb.setResponseMimeType('text/html') + this.responseweb.setResponseCode(200) + this.responseweb.setReasonMessage('OK') + + //// Resource方案 --start + // 指定hap包中rawfile目录下的目标文件 + this.responseweb.setResponseData($rawfile('test.html')) + //// Resource方案 --end + + return this.responseweb + }) + } + } +} +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/figures/stack_after.jpg b/zh-cn/release-notes/changelogs/v4.0-beta1/figures/stack_after.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eacfe82a9b1175a8a944be8a793ec940a4a80e0d Binary files /dev/null and b/zh-cn/release-notes/changelogs/v4.0-beta1/figures/stack_after.jpg differ diff --git a/zh-cn/release-notes/changelogs/v4.0-beta1/figures/stack_before.jpg b/zh-cn/release-notes/changelogs/v4.0-beta1/figures/stack_before.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b7b26a73935e28ce34d9895ac3e0cf519bbb41b5 Binary files /dev/null and b/zh-cn/release-notes/changelogs/v4.0-beta1/figures/stack_before.jpg differ diff --git a/zh-cn/third-party-cases/Readme-CN.md b/zh-cn/third-party-cases/Readme-CN.md index 3fc0814f17b5927316cee7a4cd5f24fd670965c9..448bdeda878880a885c7a8eb07fd203868861725 100644 --- a/zh-cn/third-party-cases/Readme-CN.md +++ b/zh-cn/third-party-cases/Readme-CN.md @@ -24,12 +24,16 @@ - [属性动画示例](property-animation.md) - [如何使用OpenGL实现3D图形](how-to-use-opengl-to-draw-3d-graphics.md) - [控制页面刷新范围](overall-and-part-refresh.md) +- [常见弹窗的使用](diverse-dialogues.md) ### 网络管理 - [如何请求并加载网络图片](how-to-load-images-from-internet.md) ### 窗口管理 - [如何实现沉浸模式](immersion-mode.md) +### 媒体 +- [常见图片编辑](image-edit.md) + diff --git a/zh-cn/third-party-cases/diverse-dialogues.md b/zh-cn/third-party-cases/diverse-dialogues.md new file mode 100644 index 0000000000000000000000000000000000000000..ebecccb44d42af496db166646950939cc311ad53 --- /dev/null +++ b/zh-cn/third-party-cases/diverse-dialogues.md @@ -0,0 +1,467 @@ +# 弹窗的使用 + +## 场景说明 +应用中经常用到弹窗,比如警告弹窗、日期选择弹窗、文本选择弹窗以及其他自定义弹窗等等。本例将为大家介绍如何使用不同的弹窗。 + +## 效果呈现 +本例最终效果如下: + +![multi-dialogue](figures/multi-dialogue.gif) + +示例中共涉及四类弹窗: +- 警告弹窗:提示信息尚未保存。 +- 日期滑动选择器弹窗:选择出生日期。 +- 文本滑动选择器弹窗:选择性别。 +- 自定义弹窗:填写兴趣爱好。 + +> ![icon-note.gif](../device-dev/public_sys-resources/icon-note.gif) **说明:** +> 自定义弹窗可以根据业务需要自行定义弹窗的形式和内容,比如文本输入、单选、多选等等,本例以文本输入为例进行介绍。 + +## 运行环境 +本例基于以下环境开发,开发者也可以基于其他适配的版本进行开发: + +- IDE: DevEco Studio 3.1 Release +- SDK: Ohos_sdk_public 3.2.12.5(API Version 9 Release) + + +## 实现思路 +本例中涉及的4类弹窗及实现方案如下: +- 警告弹窗:使用AlertDialog实现。 +- 日期滑动选择器弹窗:使用DatePickerDialog实现。 +- 文本滑动选择器弹窗:使用TextPickerDialog实现。 +- 自定义弹窗:使用CustomDialogController实现。 + +## 开发步骤 +由于本例重点讲解对话框的使用,所以开发步骤会着重讲解相关实现,不相关的内容不做介绍,全量代码可参考完整代码章节。 +1. 首先,使用AlertDialog实现警告弹窗。 + + 通过message参数设置告警信息,alignment设置弹窗在界面中垂直方向的对齐方式;通过primaryButton和secondaryButton添加按钮。 + 具体代码如下: + + ```ts + alertDialog(context: Context.UIAbilityContext) { + AlertDialog.show({ + // 通过message设置告警信息 + message: '当前数据未保存,是否确认离开?', + // 通过alignment设置弹窗在界面垂直方向的对齐方式,此处设置为底部对齐 + alignment: DialogAlignment.Bottom, + // 通过offset设置基于对齐位置的便宜量 + offset: { + dx: 0, + dy: -20 + }, + // 弹窗中左起第一个按钮 + primaryButton: { + value: '取消', + action: () => { + console.info('Callback cancel button is clicked'); + } + }, + // 弹窗中左起第二个按钮 + secondaryButton: { + value: '确定', + action: () => { + // Exiting the app. + context.terminateSelf(); + console.info('Callback definite button is clicked'); + } + } + }); + } + ``` +2. 使用DatePickerDialog实现日期滑动选择器弹窗。 + + 通过start和end分别设置日期区间的起始时间和末尾时间;通过lunar设置使用农历还是阳历;使用onAccept监听选择的日期,本例中通过变量selectedDate将选中的日期设置给参数selected,这样弹窗弹出时的日期就默认为上次选中的日期。 + 具体代码如下: + + ```ts + datePickerDialog(dateCallback) { + DatePickerDialog.show({ + start: new Date('1900-1-1'), + end: new Date('2100-1-1'), + // 通过变量selectedDate将选中的日期设置给参数selected + selected: this.selectedDate, + lunar: false, + // 使用onAccept监听选择的日期 + onAccept: (value: DatePickerResult) => { + let year = value.year; + let month = value.month + 1; + let day = value.day; + let birthdate: string = this.getBirthDateValue(year, month, day); + // 通过setFullYear将选中的日期传递给变量selectedDate + this.selectedDate.setFullYear(value.year, value.month, value.day) + // 返回选中的日期 + dateCallback(birthdate); + } + }); + } + ``` +3. 使用TextPickerDialog实现文本滑动选择器弹窗。 + + 通过range设置文本选择项,使用onAccept监听选择的文本项,本例中通过变量selectedGender将选中的性别的索引设置给参数selected,这样弹窗弹出时的性别就默认为上次选中的性别。 + 具体代码如下: + + ```ts + textPickerDialog(sexArray: Resource, sexCallback) { + // 判断文本项的列表是否为空 + if (this.isEmptyArr(sexArray)) { + console.error('sex is null'); + return; + } + TextPickerDialog.show({ + // 通过range设置文本选择项 + range: sexArray, + // 通过变量selectedGender将选中的性别的索引设置给参数selected + selected: this.selectedGender, + // 使用onAccept监听选择的文本项 + onAccept: (result: TextPickerResult) => { + sexCallback(result.value); + // 获取选中项的索引 + this.selectedGender = result.index + }, + onCancel: () => { + console.info('TextPickerDialog onCancel'); + } + }); + } + ``` +4. 使用CustomDialogController实现自定义弹窗。 + + 当现有弹窗不能满足业务诉求时,开发者可以自行设计弹窗的样式。在实现自定义弹窗时,需要将弹窗的UI放在被@CustomDialog修饰的自定义组件中,然后使用CustomDialogController的实例来控制弹窗的弹出和关闭。 + 具体代码如下: + ```ts + // 使用@CustomDialog修饰自定义弹窗 + @CustomDialog + struct CustomDialogFrame{ + ... + // 定义CustomDialogController + controller: CustomDialogController + + build(){ + Column() { + Text('兴趣爱好').fontSize(20).margin({ top: 10, bottom: 10 }) + TextInput({ placeholder: '', text: this.textValue }).height(60).width('90%') + .onChange((value: string) => { + this.textValue = value + }) + Flex({ justifyContent: FlexAlign.SpaceAround }) { + Button('取消') + .onClick(() => { + // 点击‘取消’,弹窗关闭 + this.controller.close() + }) + .backgroundColor('') + .fontColor('#007DFF') + Button('保存') + .onClick(() => { + this.inputValue = this.textValue + // 点击‘保存’,弹窗关闭 + this.controller.close() + }) + .backgroundColor(0xffffff) + .fontColor('#007DFF') + }.margin({ bottom: 10 }) + }.justifyContent(FlexAlign.Start) + } + } + ... + // 实例化自定义弹窗 + customDialogController: CustomDialogController = new CustomDialogController({ + // 使用上文创建的自定义弹窗进行实例化 + builder: CustomDialogFrame({ + textValue: $textValue, + inputValue: $inputValue + }), + alignment: DialogAlignment.Bottom, + offset: { + dx: 0, + dy: -20 + } + }); + ... + ``` +## 完整代码 +本例完整代码如下: +```ts +import Context from '@ohos.app.ability.common'; +import hilog from '@ohos.hilog'; + +@Component +struct TextFrame{ + @Link content: string; + private textImage:Resource; + private text:string; + onTextClick:()=>void; + + build(){ + Row(){ + Image(this.textImage) + .width(24) + .height(24) + .margin({left:12}) + Text(this.text) + .fontSize(16) + .margin({ left:12 }) + .height(24) + Text(this.content) + .fontSize(16) + .textAlign(TextAlign.End) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .maxLines(1) + .margin({ + left: 16, + right: 7 + }) + .layoutWeight(1) + .width('100%') + Image($r('app.media.ic_arrow')) + .width(12) + .height(24) + .margin({ right: 14 }) + } + .margin({ top: 24 }) + .borderRadius(24) + .backgroundColor(Color.White) + .width('93.3%') + .height(64) + .onClick(this.onTextClick) + } +} + +@Component +struct InputFrame{ + private inputImage: Resource; + private hintText: string; + + build(){ + Row() { + Image(this.inputImage) + .width(24) + .height(24) + .margin({ left: 12 }) + TextInput({ placeholder: this.hintText }) + .fontSize(16) + .padding({ left: 12 }) + .placeholderColor('#99000000') + .backgroundColor(Color.White) + .fontWeight(FontWeight.Normal) + .fontStyle(FontStyle.Normal) + .fontColor(Color.Black) + .margin({ right: 32 }) + .layoutWeight(1) + .height(48) + } + .margin({ top: 24 }) + .borderRadius(24) + .backgroundColor(Color.White) + .width('93.3%') + .height(64) + } +} + +@CustomDialog +struct CustomDialogFrame{ + @Link textValue: string + @Link inputValue: string + controller: CustomDialogController + + build(){ + Column() { + Text('兴趣爱好').fontSize(20).margin({ top: 10, bottom: 10 }) + TextInput({ placeholder: '', text: this.textValue }).height(60).width('90%') + .onChange((value: string) => { + this.textValue = value + }) + Flex({ justifyContent: FlexAlign.SpaceAround }) { + Button('取消') + .onClick(() => { + this.controller.close() + }).backgroundColor('').fontColor('#007DFF') + Button('保存') + .onClick(() => { + this.inputValue = this.textValue + this.controller.close() + }).backgroundColor(0xffffff).fontColor('#007DFF') + }.margin({ bottom: 10 }) + }.justifyContent(FlexAlign.Start) + } +} + +@Entry +@Component +struct Index { + @State birthdate: string = ''; + @State sex: string = ''; + @State textValue: string = ''; + @State inputValue: string = ''; + selectedDate: Date = new Date("2010-1-1") + selectedGender:number = 0 + private sexArray: Resource = $r('app.strarray.sex_array'); + customDialogController: CustomDialogController = new CustomDialogController({ + builder: CustomDialogFrame({ + textValue: $textValue, + inputValue: $inputValue + }), + alignment: DialogAlignment.Bottom, + offset: { + dx: 0, + dy: -20 + } + }); + + alertDialog(context: Context.UIAbilityContext) { + AlertDialog.show({ + message: '当前数据未保存,是否确认离开?', + alignment: DialogAlignment.Bottom, + offset: { + dx: 0, + dy: -20 + }, + primaryButton: { + value: '取消', + action: () => { + console.info('Callback cancel button is clicked'); + } + }, + secondaryButton: { + value: '确定', + action: () => { + // Exiting the app. + context.terminateSelf(); + console.info('Callback definite button is clicked'); + } + } + }); + } + + datePickerDialog(dateCallback) { + DatePickerDialog.show({ + start: new Date('1900-1-1'), + end: new Date('2100-1-1'), + selected: this.selectedDate, + lunar: false, + onAccept: (value: DatePickerResult) => { + let year = value.year; + let month = value.month + 1; + let day = value.day; + let birthdate: string = this.getBirthDateValue(year, month, day); + this.selectedDate.setFullYear(value.year, value.month, value.day) + dateCallback(birthdate); + } + }); + } + + textPickerDialog(sexArray: Resource, sexCallback) { + if (this.isEmptyArr(sexArray)) { + console.error('sex is null'); + return; + } + TextPickerDialog.show({ + range: sexArray, + selected: this.selectedGender, + onAccept: (result: TextPickerResult) => { + sexCallback(result.value); + this.selectedGender = result.index + }, + onCancel: () => { + console.info('TextPickerDialog onCancel'); + } + }); + } + + getBirthDateValue(year: number, month: number, day: number): string { + let birthdate: string = `${year}${'年'}${month}` + + `${'月'}${day}${'日'}`; + return birthdate; + } + + isEmpty(obj): boolean { + return obj === undefined || obj === null || obj === ''; + } + + isEmptyArr(array): boolean { + return this.isEmpty(array) || array.length === 0; + } + + build() { + Row() { + Column() { + Row(){ + Image($r('app.media.ic_back')) + .width(26) + .height(26) + .alignSelf(ItemAlign.Start) + .margin({ + left: '7.2%', + top: 19 + }) + .onClick(() => { + let context = getContext(this) as Context.UIAbilityContext; + this.alertDialog(context); + }) + Text('个人信息') + .fontColor(Color.Black) + .fontSize(20) + .margin({ top: 20,left:20 }) + .alignSelf(ItemAlign.Center) + }.width('100%') + Image($r('app.media.ic_avatar')) + .width(56) + .height(56) + .alignSelf(ItemAlign.Center) + .margin({ top: '5.5%' }) + Text('头像') + .fontColor(Color.Black) + .fontSize(16) + .margin({ top: '2.1%' }) + .alignSelf(ItemAlign.Center) + InputFrame({ + inputImage: $r('app.media.ic_nickname'), + hintText: '昵称' + }) + TextFrame({ + textImage: $r('app.media.ic_birthdate'), + text: '出生日期', + content: $birthdate, + onTextClick: () => { + this.datePickerDialog((birthValue: string) => { + this.birthdate = birthValue; + }); + } + }) + TextFrame({ + textImage: $r('app.media.ic_sex'), + text: '性别', + content: $sex, + onTextClick: () => { + this.textPickerDialog(this.sexArray, (sexValue: string) => { + this.sex = sexValue; + }); + } + }) + InputFrame({ + inputImage: $r('app.media.ic_signature'), + hintText: '个性签名' + }) + TextFrame({ + textImage: $r('app.media.ic_hobbies'), + text: '兴趣爱好', + content: $textValue, + onTextClick: () => { + this.customDialogController.open(); + } + }) + } + .backgroundColor('#F5F5F5') + .height('100%') + .width('100%') + } + .height('100%') + } +} +``` +## 参考 +- [警告弹窗](../application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md) +- [日期滑动选择器弹窗](../application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md) +- [文本滑动选择器弹窗](../application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md) +- [自定义弹窗](../application-dev/ui/arkts-common-components-custom-dialog.md) \ No newline at end of file diff --git a/zh-cn/third-party-cases/figures/image-edit.gif b/zh-cn/third-party-cases/figures/image-edit.gif new file mode 100644 index 0000000000000000000000000000000000000000..7d9cfab7140b9857ffd32f1f4ca9ee0fa12539b2 Binary files /dev/null and b/zh-cn/third-party-cases/figures/image-edit.gif differ diff --git a/zh-cn/third-party-cases/figures/multi-dialogue.gif b/zh-cn/third-party-cases/figures/multi-dialogue.gif new file mode 100644 index 0000000000000000000000000000000000000000..84000a19a2ddd6edfc126d249501ef8d24fdecfe Binary files /dev/null and b/zh-cn/third-party-cases/figures/multi-dialogue.gif differ diff --git a/zh-cn/third-party-cases/image-edit.md b/zh-cn/third-party-cases/image-edit.md new file mode 100644 index 0000000000000000000000000000000000000000..2c3c7f846d033ff5cd1e698d84c6da28debbc6f5 --- /dev/null +++ b/zh-cn/third-party-cases/image-edit.md @@ -0,0 +1,226 @@ +# 编辑图片 + +## 场景说明 +图片编辑是在应用中经常用到的功能,比如相机拍完照片后可以对照片进行编辑;截图后可以对截图进行编辑;可以对图库中的图片进行编辑等。本例即为大家介绍如何获取图片的pixelMap数据,并通过pixelMap对图片进行常见的编辑操作。 + +## 效果呈现 +本例最终效果如下: + +![image-edit](figures/image-edit.gif) + +## 运行环境 +本例基于以下环境开发,开发者也可以基于其他适配的版本进行开发: + +- IDE: DevEco Studio 3.1 Release +- SDK: Ohos_sdk_public 3.2.12.5(API Version 9 Release) + +## 实现思路 +本例中展示的是对资源文件中的图片进行编辑,编辑操作主要分为以下三步: +1. 对图片解码,获取到pixelMap:先通过上下文context获取到资源管理器resourceManager,然后通过资源管理器获取到图片数据,然后获取图片的ArrayBuffer,最后通过ArrayBuffer创建imageSource,获取到pixelMap,完成图片解码。 +2. 编辑pixelMap:获取到pixelMap后就可以针对pixelMap进行裁剪、缩放、偏移、旋转、翻转、调节透明度等操作。 +3. 将编辑好的pixelMap渲染显示出来:完成对pixelMap的编辑后,可以通过Image组件将编辑后的pixelMap渲染显示出来。 + +## 开发步骤 +由于本例重点讲解图片编辑,所以开发步骤会着重讲解相关实现,不相关的内容不做介绍,全量代码可参考完整代码章节。 +1. 对图片进行解码。 + + 先通过上下文context获取到资源管理器resourceManager,然后通过资源管理器获取到图片数据,然后获取图片的ArrayBuffer,最后通过ArrayBuffer创建imageSource,获取到pixelMap,完成图片解码。 + 具体代码如下: + ```ts + async get_pixelmap(){ + // 获取resourceManager资源管理 + const context = getContext(this) + const resourceMgr = context.resourceManager + // 获取rawfile文件夹下httpimage.PNG的ArrayBuffer + const fileData = await resourceMgr.getMediaContent($r('app.media.httpimage')) + const buffer = fileData.buffer + // 创建imageSource + const imageSource = image.createImageSource(buffer) + // 创建PixelMap + const pixelMap = await imageSource.createPixelMap() + return pixelMap + } + ``` +2. 编辑pixelMap。 + + 分别通过以下方法对pixelMap进行裁剪、缩放、偏移、旋转、翻转、调节透明度等操作:crop、scale、translate、rotate、flip、opacity。 + 具体代码如下: + ```ts + // 对pixelMap进行裁剪 + async crop_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.crop({x:0,y:0,size:{height:300,width:300}}) + this.imagePixelMap = pixelMap + } + // 对pixelMap进行缩放 + async scale_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.scale(0.5,0.5) + this.imagePixelMap = pixelMap + } + // 对pixelMap进行偏移 + async translate_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.translate(100,100); + this.imagePixelMap = pixelMap + } + // 对pixelMap进行旋转 + async rotate_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.rotate(90); + this.imagePixelMap = pixelMap + } + // 对pixelMap进行翻转 + async flip_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.flip(false, true); + this.imagePixelMap = pixelMap + } + // 对pixelMap进行透明度调整 + async opacity_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.opacity(0.5); + this.imagePixelMap = pixelMap + } + ``` +3. 通过Image组件将编辑后的pixelMap渲染显示出来。 + + 第2步中将编辑好的pixelMap传递给状态变量imagePixelMap,本步中直接将imagePixelMap传入Image组件进行渲染显示。 + 具体代码如下: + ```ts + if(!this.edit){ + Row(){ + Image($r('app.media.httpimage')).objectFit(ImageFit.None) + }.width('100%').height('50%').backgroundColor('#F0F0F0') + }else{ + Row(){ + // 将编辑好的pixelMap传递给状态变量imagePixelMap后,通过Image组件进行渲染 + Image(this.imagePixelMap).objectFit(ImageFit.None) + }.width('100%').height('50%').backgroundColor('#F0F0F0') + } + ``` + +## 完整代码 +本例完整代码如下: +```ts +import image from '@ohos.multimedia.image'; + +@Entry +@Component +struct ImageEdit{ + @State imagePixelMap:PixelMap = undefined + @State edit:boolean = false + + @Builder buttonModel($$:{textContent,action}){ + Button($$.textContent) + .fontSize(14) + .height(30) + .width(60) + .borderRadius(10) + .backgroundColor('#E8A027') + .onClick(()=>{ + $$.action + this.edit = true + }) + } + + async get_pixelmap(){ + // 获取resourceManager资源管理 + const context = getContext(this) + const resourceMgr = context.resourceManager + // 获取rawfile文件夹下httpimage.PNG的ArrayBuffer + const fileData = await resourceMgr.getMediaContent($r('app.media.httpimage')) + const buffer = fileData.buffer + // 创建imageSource + const imageSource = image.createImageSource(buffer) + // 创建PixelMap + const pixelMap = await imageSource.createPixelMap() + return pixelMap + } + + // 对pixelMap进行裁剪 + async crop_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.crop({x:0,y:0,size:{height:300,width:300}}) + this.imagePixelMap = pixelMap + } + + // 对pixelMap进行缩放 + async scale_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.scale(0.5,0.5) + this.imagePixelMap = pixelMap + } + + // 对pixelMap进行偏移 + async translate_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.translate(100,100); + this.imagePixelMap = pixelMap + } + + // 对pixelMap进行旋转 + async rotate_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.rotate(90); + this.imagePixelMap = pixelMap + } + + // 对pixelMap进行翻转 + async flip_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.flip(false, true); + this.imagePixelMap = pixelMap + } + + // 对pixelMap进行透明度调整 + async opacity_image(){ + let pixelMap = await this.get_pixelmap() + pixelMap.opacity(0.5); + this.imagePixelMap = pixelMap + } + + build(){ + Column(){ + if(!this.edit){ + Row(){ + Image($r('app.media.httpimage')).objectFit(ImageFit.None) + }.width('100%').height('50%').backgroundColor('#F0F0F0') + }else{ + Row(){ + // 将编辑好的pixelMap传递给状态变量imagePixelMap后,通过Image组件进行渲染 + Image(this.imagePixelMap).objectFit(ImageFit.None) + }.width('100%').height('50%').backgroundColor('#F0F0F0') + } + + Flex({wrap:FlexWrap.Wrap,justifyContent:FlexAlign.SpaceEvenly}){ + this.buttonModel({textContent:'裁剪',action:this.crop_image()}) + this.buttonModel({textContent:'缩放',action:this.scale_image()}) + this.buttonModel({textContent:'偏移',action:this.translate_image()}) + this.buttonModel({textContent:'旋转',action:this.rotate_image()}) + this.buttonModel({textContent:'翻转',action:this.flip_image()}) + this.buttonModel({textContent:'透明度',action:this.opacity_image()}) + Button('还原') + .fontSize(14) + .height(30) + .width(60) + .borderRadius(10) + .margin({top:20}) + .backgroundColor('#A4AE77') + .onClick(()=>{ + this.edit = false + }) + } + .margin({top:100}) + .height('100%') + .width('100%') + } + .height('100%') + .width('100%') + } +} +``` +## 参考 +- [图片解码](../application-dev/media/image-decoding.md) +- [图片变换](../application-dev/media/image-transformation.md) +- [Image组件](../application-dev/reference/arkui-ts/ts-basic-components-image.md) diff --git a/zh-cn/website.md b/zh-cn/website.md index cee2cd8aa0534eb9e2c3802e1f31fc0714060a88..82ac867958baed51607d9a077375591fb9d033d9 100644 --- a/zh-cn/website.md +++ b/zh-cn/website.md @@ -3,7 +3,11 @@ - [了解OpenHarmony开源项目](OpenHarmony-Overview_zh.md) - [术语](glossary.md) - 版本说明 + - OpenHarmony 4.x Releases + - [OpenHarmony v4.0 Beta1 (2023-06-03)](release-notes/OpenHarmony-v4.0-beta1.md) - OpenHarmony 3.x Releases + - [OpenHarmony v3.2 Release (2023-04-09)](release-notes/OpenHarmony-v3.2-release.md) + - [OpenHarmony v3.2.1 Release (2023-05-22)](release-notes/OpenHarmony-v3.2.1-release.md) - [OpenHarmony v3.2 Beta5 (2023-01-30)](release-notes/OpenHarmony-v3.2-beta5.md) - [OpenHarmony v3.2 Beta4 (2022-11-30)](release-notes/OpenHarmony-v3.2-beta4.md) - [OpenHarmony v3.2 Beta3 (2022-09-30)](release-notes/OpenHarmony-v3.2-beta3.md) @@ -33,6 +37,142 @@ - [OpenHarmony v1.1.1 LTS (2021-06-22)](release-notes/OpenHarmony-1-1-1-LTS.md) - [OpenHarmony v1.1.0 LTS (2021-04-01)](release-notes/OpenHarmony-1-1-0-LTS.md) - API差异报告 + - OpenHarmony 4.0 Beta1 + - JS API差异报告 + - [元能力](release-notes/api-diff/v4.0-beta1/js-apidiff-ability.md) + - [无障碍服务](release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md) + - [帐号](release-notes/api-diff/v4.0-beta1/js-apidiff-account.md) + - [ArkUI](release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md) + - [电源管理](release-notes/api-diff/v4.0-beta1/js-apidiff-battery.md) + - [包管理](release-notes/api-diff/v4.0-beta1/js-apidiff-bundle.md) + - [通信](release-notes/api-diff/v4.0-beta1/js-apidiff-communication.md) + - [语言编译运行时](release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md) + - [定制服务](release-notes/api-diff/v4.0-beta1/js-apidiff-customization.md) + - [分布式数据管理](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md) + - [分布式硬件](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-hardware.md) + - [文件管理](release-notes/api-diff/v4.0-beta1/js-apidiff-file-management.md) + - [位置](release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md) + - [全球化](release-notes/api-diff/v4.0-beta1/js-apidiff-global.md) + - [图形](release-notes/api-diff/v4.0-beta1/js-apidiff-graphic.md) + - [Misc软件](release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md) + - [MSDP](release-notes/api-diff/v4.0-beta1/js-apidiff-msdp.md) + - [多模输入](release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md) + - [媒体](release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md) + - [事件与通知](release-notes/api-diff/v4.0-beta1/js-apidiff-notification.md) + - [资源调度](release-notes/api-diff/v4.0-beta1/js-apidiff-resource-scheduler.md) + - [安全基础服务](release-notes/api-diff/v4.0-beta1/js-apidiff-security.md) + - [泛Sensor](release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md) + - [电话服务](release-notes/api-diff/v4.0-beta1/js-apidiff-telephony.md) + - [测试框架](release-notes/api-diff/v4.0-beta1/js-apidiff-unitest.md) + - [升级服务](release-notes/api-diff/v4.0-beta1/js-apidiff-update.md) + - [用户IAM](release-notes/api-diff/v4.0-beta1/js-apidiff-user-iam.md) + - [Web](release-notes/api-diff/v4.0-beta1/js-apidiff-web.md) + - [窗口](release-notes/api-diff/v4.0-beta1/js-apidiff-window.md) + - API变更说明 + - [元能力](release-notes/changelogs/v4.0-beta1/changelogs-ability.md) + - [程序访问控制](release-notes/changelogs/v4.0-beta1/changelogs-accesstoken.md) + - [帐号](release-notes/changelogs/v4.0-beta1/changelogs-account_os_account.md) + - [通知](release-notes/changelogs/v4.0-beta1/changelogs-ans.md) + - [语言编译运行时](release-notes/changelogs/v4.0-beta1/changelogs-arkcompiler.md) + - [ArkUI](release-notes/changelogs/v4.0-beta1/changelogs-arkui.md) + - [蓝牙](release-notes/changelogs/v4.0-beta1/changelogs-bluetooth.md) + - [包管理](release-notes/changelogs/v4.0-beta1/changelogs-bundlemanager.md) + - [事件](release-notes/changelogs/v4.0-beta1/changelogs-ces.md) + - [分布式数据管理](release-notes/changelogs/v4.0-beta1/changelogs-distributeddatamgr.md) + - [文件管理](release-notes/changelogs/v4.0-beta1/changelogs-filemanagement.md) + - [位置](release-notes/changelogs/v4.0-beta1/changelogs-geoLocationManager.md) + - [全球化](release-notes/changelogs/v4.0-beta1/changelogs-global.md) + - [安全-huks](release-notes/changelogs/v4.0-beta1/changelogs-huks.md) + - [输入法框架](release-notes/changelogs/v4.0-beta1/changelogs-imf.md) + - [媒体](release-notes/changelogs/v4.0-beta1/changelogs-media.md) + - [Misc软件](release-notes/changelogs/v4.0-beta1/changelogs-miscdevice.md) + - [剪贴板](release-notes/changelogs/v4.0-beta1/changelogs-pasteboard.md) + - [电源](release-notes/changelogs/v4.0-beta1/changelogs-power.md) + - [资源调度](release-notes/changelogs/v4.0-beta1/changelogs-resourceschedule.md) + - [主题框架-锁屏](release-notes/changelogs/v4.0-beta1/changelogs-screenlock.md) + - [安全基础能力](release-notes/changelogs/v4.0-beta1/changelogs-security.md) + - [泛Sensor](release-notes/changelogs/v4.0-beta1/changelogs-sensor.md) + - [分布式软总线](release-notes/changelogs/v4.0-beta1/changelogs-softbus.md) + - [启动服务](release-notes/changelogs/v4.0-beta1/changelogs-startup.md) + - [电话服务](release-notes/changelogs/v4.0-beta1/changelogs-telephony.md) + - [测试框架](release-notes/changelogs/v4.0-beta1/changelogs-testfwk_arkxtest.md) + - [USB](release-notes/changelogs/v4.0-beta1/changelogs-usb.md) + - [主题框架-壁纸](release-notes/changelogs/v4.0-beta1/changelogs-wallpaper.md) + - [Web](release-notes/changelogs/v4.0-beta1/changelogs-web.md) + - [WIFI](release-notes/changelogs/v4.0-beta1/changelogs-wifiManager.md) + - OpenHarmony 3.2 Release (相比3.1 Release) + - JS API差异报告 + - [元能力](release-notes/api-diff/v3.2-Release/js-apidiff-ability.md) + - [无障碍](release-notes/api-diff/v3.2-Release/js-apidiff-accessibility.md) + - [帐号](release-notes/api-diff/v3.2-Release/js-apidiff-account.md) + - [应用](release-notes/api-diff/v3.2-Release/js-apidiff-application.md) + - [ArkUI](release-notes/api-diff/v3.2-Release/js-apidiff-arkui.md) + - [电源服务](release-notes/api-diff/v3.2-Release/js-apidiff-battery.md) + - [包管理](release-notes/api-diff/v3.2-Release/js-apidiff-bundle.md) + - [网络及通信](release-notes/api-diff/v3.2-Release/js-apidiff-communication.md) + - [语言编译器运行时](release-notes/api-diff/v3.2-Release/js-apidiff-compiler-and-runtime.md) + - [定制](release-notes/api-diff/v3.2-Release/js-apidiff-customization.md) + - [DFX](release-notes/api-diff/v3.2-Release/js-apidiff-dfx.md) + - [分布式数据](release-notes/api-diff/v3.2-Release/js-apidiff-distributed-data.md) + - [分布式硬件](release-notes/api-diff/v3.2-Release/js-apidiff-distributed-hardware.md) + - [文件管理](release-notes/api-diff/v3.2-Release/js-apidiff-file-management.md) + - [位置服务](release-notes/api-diff/v3.2-Release/js-apidiff-geolocation.md) + - [全球化](release-notes/api-diff/v3.2-Release/js-apidiff-global.md) + - [图形图像](release-notes/api-diff/v3.2-Release/js-apidiff-graphic.md) + - [Misc软件](release-notes/api-diff/v3.2-Release/js-apidiff-misc.md) + - [MSDP](release-notes/api-diff/v3.2-Release/js-apidiff-msdp.md) + - [多模输入](release-notes/api-diff/v3.2-Release/js-apidiff-multi-modal-input.md) + - [媒体服务](release-notes/api-diff/v3.2-Release/js-apidiff-multimedia.md) + - [事件与通知](release-notes/api-diff/v3.2-Release/js-apidiff-notification.md) + - [资源调度](release-notes/api-diff/v3.2-Release/js-apidiff-resource-scheduler.md) + - [安全](release-notes/api-diff/v3.2-Release/js-apidiff-security.md) + - [泛Sensor](release-notes/api-diff/v3.2-Release/js-apidiff-sensor.md) + - [启动](release-notes/api-diff/v3.2-Release/js-apidiff-start-up.md) + - [电话服务](release-notes/api-diff/v3.2-Release/js-apidiff-telephony.md) + - [测试服务](release-notes/api-diff/v3.2-Release/js-apidiff-unitest.md) + - [升级](release-notes/api-diff/v3.2-Release/js-apidiff-update.md) + - [USB服务](release-notes/api-diff/v3.2-Release/js-apidiff-usb.md) + - [用户IAM](release-notes/api-diff/v3.2-Release/js-apidiff-user-iam.md) + - [Web](release-notes/api-diff/v3.2-Release/js-apidiff-web.md) + - [窗口](release-notes/api-diff/v3.2-Release/js-apidiff-window.md) + - OpenHarmony 3.2 Release (相比3.2 Beta5) + - JS API差异报告 + - [元能力](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-ability.md) + - [帐号](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-account.md) + - [应用](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-application.md) + - [ArkUI](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-arkui.md) + - [电源服务](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-battery.md) + - [包管理](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-bundle.md) + - [网络及通信](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-communication.md) + - [语言编译器运行时](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-compiler-and-runtime.md) + - [DFX](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-dfx.md) + - [分布式数据](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-distributed-data.md) + - [文件管理](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-file-management.md) + - [Misc软件](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-misc.md) + - [媒体服务](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-multimedia.md) + - [事件与通知](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-notification.md) + - [资源调度](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-resource-scheduler.md) + - [安全](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-security.md) + - [泛Sensor](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-sensor.md) + - [启动](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-start-up.md) + - [电话服务](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-telephony.md) + - [测试服务](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-unitest.md) + - [升级](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-update.md) + - [USB服务](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-usb.md) + - [用户IAM](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-user-iam.md) + - [Web](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-web.md) + - [窗口](release-notes/api-diff/Beta5%20to%20v3.2-Release/js-apidiff-window.md) + - 变更说明 + - [元能力](release-notes/changelogs/v3.2-release/changelogs-ability.md) + - [ArkUI](release-notes/changelogs/v3.2-release/changelogs-arkui.md) + - [包管理](release-notes/changelogs/v3.2-release/changelogs-bundlemanager.md) + - [输入法框架](release-notes/changelogs/v3.2-release/changelogs-imf.md) + - [全局资源调度](release-notes/changelogs/v3.2-release/changelogs-resourceschedule.md) + - [主题框架-锁屏](release-notes/changelogs/v3.2-release/changelogs-screenlock.md) + - [电话服务](release-notes/changelogs/v3.2-release/changelogs-telephony.md) + - [util](release-notes/changelogs/v3.2-release/changelogs-util.md) + - [主题框架-壁纸](release-notes/changelogs/v3.2-release/changelogs-wallpaper.md) + - [web组件](release-notes/changelogs/v3.2-release/changelogs-web.md) - OpenHarmony 3.2 Beta4 - JS API差异报告 - [元能力](release-notes/api-diff/v3.2-beta4/js-apidiff-ability.md) @@ -217,3 +357,5 @@ - [写作规范](contribute/写作规范.md) - [社区沟通与交流](contribute/社区沟通与交流.md) - [FAQ](contribute/FAQ.md) + + \ No newline at end of file