From 893e8bb9718b2be60c8f008b068ccd7072aa59a2 Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Mon, 25 Aug 2025 14:11:15 +0800 Subject: [PATCH 1/8] wifiManager qiangji3.0 Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 1269 ++++++++++++++++++++++++++---------- 1 file changed, 921 insertions(+), 348 deletions(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index 32577605a6..5e48df064f 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -151,7 +151,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function startScan(): void; @@ -251,7 +252,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setScanAlwaysAllowed(isScanAlwaysAllowed: boolean): void; @@ -265,7 +267,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getScanAlwaysAllowed(): boolean; @@ -284,6 +287,21 @@ declare namespace wifiManager { * @since 15 */ function addDeviceConfig(config: WifiDeviceConfig): Promise; + + /** + * Add Wi-Fi connection configuration to the device. The configuration will be updated when the configuration is added.

+ * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.SET_WIFI_CONFIG + * @param { WifiDeviceConfig } config - Indicates the device configuration for connection to the Wi-Fi network. + * @returns { Promise } Returns {@code networkId} if the configuration is added; returns {@code -1} otherwise. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.STA + * @since 20 + * @arkts 1.2 + */ + function addDeviceConfigReturnsPromise(config: WifiDeviceConfig): Promise; /** * Add Wi-Fi connection configuration to the device. The configuration will be updated when the configuration is added.

@@ -301,6 +319,26 @@ declare namespace wifiManager { */ function addDeviceConfig(config: WifiDeviceConfig, callback: AsyncCallback): void; + /** + * Add Wi-Fi connection configuration to the device. The configuration will be updated when the configuration is added.

+ * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.SET_WIFI_CONFIG + * @param { WifiDeviceConfig } config - Indicates the device configuration for connection to the Wi-Fi network. + * @param { AsyncCallback } callback - Indicates call back of addDeviceConfig. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.STA + * @since 15 + */ + function addDeviceConfigWithCallback(config: WifiDeviceConfig, callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload addDeviceConfig { addDeviceConfigReturnsPromise, addDeviceConfigWithCallback }; + /** * Add a specified candidate hotspot configuration and returns the networkId. * This method adds one configuration at a time. After this configuration is added, @@ -336,6 +374,24 @@ declare namespace wifiManager { * @since 12 */ function addCandidateConfig(config: WifiDeviceConfig): Promise; + + /** + * Add a specified candidate hotspot configuration and returns the networkId. + * This method adds one configuration at a time. After this configuration is added, + * your device will determine whether to connect to the hotspot. + * The app must be in the foreground. + * @permission ohos.permission.SET_WIFI_INFO + * @param { WifiDeviceConfig } config - candidate config. + * @returns { Promise } Returns {@code networkId} if the configuration is added; returns {@code -1} otherwise. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.STA + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function addCandidateConfigReturnsPromise(config: WifiDeviceConfig): Promise; /** * Add a specified candidate hotspot configuration and returns the networkId. @@ -373,6 +429,30 @@ declare namespace wifiManager { */ function addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback): void; + /** + * Add a specified candidate hotspot configuration and returns the networkId. + * This method adds one configuration at a time. After this configuration is added, + * your device will determine whether to connect to the hotspot. + * The app must be in the foreground. + * @permission ohos.permission.SET_WIFI_INFO + * @param { WifiDeviceConfig } config - candidate config. + * @param { AsyncCallback } callback - Indicates call back of addCandidateConfig. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.STA + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function addCandidateConfigWithCallback(config: WifiDeviceConfig, callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload addCandidateConfig { addCandidateConfigReturnsPromise, addCandidateConfigWithCallback }; + /** * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed * to be removed. @@ -409,6 +489,24 @@ declare namespace wifiManager { */ function removeCandidateConfig(networkId: number): Promise; + /** + * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed + * to be removed. + * The app must be in the foreground. + * @permission ohos.permission.SET_WIFI_INFO + * @param { int } networkId - Network ID which will be removed. + * @returns { Promise } Return results. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.STA + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function removeCandidateConfigReturnsPromise(networkId: int): Promise; + /** * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed * to be removed. @@ -445,6 +543,32 @@ declare namespace wifiManager { */ function removeCandidateConfig(networkId: number, callback: AsyncCallback): void; + /** + * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed + * to be removed. + * The app must be in the foreground. + * @permission ohos.permission.SET_WIFI_INFO + * @param { int } networkId - Network ID which will be removed. + * @param { AsyncCallback } callback - Indicates call back of removeCandidateConfig. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. 3.Parameter verification failed. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.STA + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function removeCandidateConfigWithCallback(networkId: int, callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload removeCandidateConfig { removeCandidateConfigReturnsPromise, removeCandidateConfigWithCallback }; + /** * Obtain the list of all existed candidate Wi-Fi configurations which added by ourself. * You can obtain only the Wi-Fi configurations you created on your own application. @@ -478,7 +602,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getCandidateConfigs(): Array; @@ -503,7 +628,7 @@ declare namespace wifiManager { * is allowed to be connected. This method connect to a configuration at a time. * The app must be in the foreground. * @permission ohos.permission.SET_WIFI_INFO - * @param { number } networkId - Network ID which will be connected. The value of networkId cannot be less than 0. + * @param { int } networkId - Network ID which will be connected. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. @@ -512,9 +637,10 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function connectToCandidateConfig(networkId: number): void; + function connectToCandidateConfig(networkId: int): void; /** * Connect to a specified candidate hotspot by networkId, and wait for user respond result. @@ -541,7 +667,7 @@ declare namespace wifiManager { /** * Connect to Wi-Fi hotspot by networkId. * @permission ohos.permission.MANAGE_WIFI_CONNECTION or ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION - * @param { number } networkId - ID of the connected network. The value of networkId cannot be less than 0. + * @param { int } networkId - ID of the connected network. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. @@ -549,9 +675,10 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function connectToNetwork(networkId: number): void; + function connectToNetwork(networkId: int): void; /** * Connect to Wi-Fi hotspot by WifiDeviceConfig. @@ -567,7 +694,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function connectToDevice(config: WifiDeviceConfig): void; @@ -580,7 +708,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function disconnect(): void; @@ -624,11 +753,27 @@ declare namespace wifiManager { * @syscap SystemCapability.Communication.WiFi.STA * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * */ function getLinkedInfo(): Promise; - + + /** + * Obtain connection information about the Wi-Fi connection. If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. + * @permission ohos.permission.GET_WIFI_INFO + * @returns { Promise } Returns Wi-Fi linked information. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.STA + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function getLinkedInfoReturnsPromise(): Promise; + /** * Obtain multiple Wi-Fi connection information when Wi-Fi linked in MLO(Muti-Link Operation) state. * If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. @@ -640,7 +785,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getMultiLinkedInfo(): Array; @@ -669,11 +815,33 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function getLinkedInfo(callback: AsyncCallback): void; + /** + * Obtain connection information about the Wi-Fi connection. + * @permission ohos.permission.GET_WIFI_INFO + * @param { AsyncCallback } callback - Indicates callback of function. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2501000 - Operation failed. + * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.STA + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function getLinkedInfoWithCallback(callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload getLinkedInfo { getLinkedInfoReturnsPromise, getLinkedInfoWithCallback }; + /** * Obtain connection information about the Wi-Fi connection.this apireturns the result syncchronously. * If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. @@ -720,21 +888,22 @@ declare namespace wifiManager { * Obtain the features supported by the device. * To check whether this device supports a specified feature. * @permission ohos.permission.GET_WIFI_INFO - * @returns { number } Returns the features supported by this device. + * @returns { long } Returns the features supported by this device. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2401000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getSupportedFeatures(): number; + function getSupportedFeatures(): long; /** * Check whether the device supports a specified feature. * @permission ohos.permission.GET_WIFI_INFO - * @param { number } featureId Indicates the ID of the feature. + * @param { int } featureId Indicates the ID of the feature. * @returns { boolean } Returns {@code true} if this device supports the specified feature, returns {@code false} otherwise. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. @@ -742,9 +911,10 @@ declare namespace wifiManager { * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2401000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function isFeatureSupported(featureId: number): boolean; + function isFeatureSupported(featureId: int): boolean; /** * Obtain the MAC address of a Wi-Fi device. Wi-Fi must be enabled. @@ -756,7 +926,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDeviceMacAddress(): string[]; @@ -796,7 +967,8 @@ declare namespace wifiManager { * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2401000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getCountryCode(): string; @@ -810,7 +982,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function reassociate(): void; @@ -824,7 +997,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function reconnect(): void; @@ -836,7 +1010,8 @@ declare namespace wifiManager { * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDeviceConfigs(): Array; @@ -855,7 +1030,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function updateNetwork(config: WifiDeviceConfig): number; @@ -863,7 +1039,7 @@ declare namespace wifiManager { * Set whther to allow automatic connnect by networkId. * The network can be associated with again if isAllowed is true, else not. * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.MANAGE_WIFI_CONNECTION - * @param { number } netId Identifies the network to be set. The value of networkId cannot be less than 0. + * @param { int } netId Identifies the network to be set. The value of networkId cannot be less than 0. * @param { boolean } isAllowed Identifies whether allow auto connect or not. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. @@ -874,15 +1050,16 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 17 + * @since arkts {'1.1':'17', '1.2':'20'} + * @arkts 1.1&1.2 */ - function allowAutoConnect(netId: number, isAllowed: boolean): void; + function allowAutoConnect(netId: int, isAllowed: boolean): void; /** * Disable the specified DeviceConfig by networkId. * The disabled DeviceConfig will not be associated with again. * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.MANAGE_WIFI_CONNECTION - * @param { number } netId Identifies the network to disable. The value of networkId cannot be less than 0. + * @param { int } netId Identifies the network to disable. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. @@ -892,9 +1069,10 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function disableNetwork(netId: number): void; + function disableNetwork(netId: int): void; /** * Remove all the saved Wi-Fi configurations. @@ -906,7 +1084,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function removeAllNetwork(): void; @@ -917,7 +1096,7 @@ declare namespace wifiManager { * The application can only delete Wi-Fi DeviceConfig it has created. * @permission ohos.permission.SET_WIFI_INFO and (ohos.permission.MANAGE_WIFI_CONNECTION or * ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION) - * @param { number } id - Indicate the ID of the Wi-Fi DeviceConfig. The value of networkId cannot be less than 0. + * @param { int } id - Indicate the ID of the Wi-Fi DeviceConfig. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. @@ -925,9 +1104,10 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function removeDevice(id: number): void; + function removeDevice(id: int): void; /** * Check whether the current device supports the specified band. @@ -938,23 +1118,25 @@ declare namespace wifiManager { * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function isBandTypeSupported(bandType: WifiBandType): boolean; /** * Obtain the supported 5G channel list of the device. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.GET_WIFI_CONFIG - * @returns { Array } Returns 5G channel list. + * @returns { Array } Returns 5G channel list. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function get5GChannelList(): Array; + function get5GChannelList(): Array; /** * Obtain the latest disconnected reason. @@ -965,7 +1147,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDisconnectedReason(): DisconnectedReason; @@ -979,7 +1162,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function startPortalCertification(): void; @@ -1012,7 +1196,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function enableHiLinkHandshake(isHiLinkEnable: boolean, bssid: string, config: WifiDeviceConfig): void; @@ -1025,7 +1210,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function factoryReset(): void; @@ -1039,7 +1225,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function enableHotspot(): void; @@ -1053,7 +1240,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function disableHotspot(): void; @@ -1067,7 +1255,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isHotspotDualBandSupported(): boolean; @@ -1108,7 +1297,8 @@ declare namespace wifiManager { * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function isHotspotActive(): boolean; @@ -1126,7 +1316,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setHotspotConfig(config: HotspotConfig): void; @@ -1140,7 +1331,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getHotspotConfig(): HotspotConfig; @@ -1185,7 +1377,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function addHotspotBlockList(stationInfo: StationInfo); @@ -1201,7 +1394,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function delHotspotBlockList(stationInfo: StationInfo); @@ -1216,7 +1410,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getHotspotBlockList(): Array; @@ -1231,6 +1426,19 @@ declare namespace wifiManager { * @since 9 */ function getP2pLinkedInfo(): Promise; + + /** + * Obtain information about the P2P connection. + * @permission ohos.permission.GET_WIFI_INFO + * @returns { Promise } Returns p2p linked information. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getP2pLinkedInfoReturnsPromise(): Promise; /** * Obtain information about the P2P connection. @@ -1245,8 +1453,28 @@ declare namespace wifiManager { */ function getP2pLinkedInfo(callback: AsyncCallback): void; - /** - * Obtain information about the current p2p group. + /** + * Obtain information about the P2P connection. + * @permission ohos.permission.GET_WIFI_INFO + * @param { AsyncCallback } callback - Indicates callback of function. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getP2pLinkedInfoWithCallback(callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload getP2pLinkedInfo { getP2pLinkedInfoReturnsPromise, getP2pLinkedInfoWithCallback }; + + /** + * Obtain information about the current p2p group. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION * @returns { Promise } Returns p2p group information. * @throws {BusinessError} 201 - Permission denied. @@ -1267,6 +1495,19 @@ declare namespace wifiManager { */ function getCurrentGroup(): Promise; + /** + * Obtain information about the current p2p group. + * @permission ohos.permission.GET_WIFI_INFO + * @returns { Promise } Returns p2p group information. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getCurrentGroupReturnsPromise(): Promise; + /** * Obtain information about the current p2p group. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1289,6 +1530,25 @@ declare namespace wifiManager { */ function getCurrentGroup(callback: AsyncCallback): void; + /** + * Obtain information about the current p2p group. + * @permission ohos.permission.GET_WIFI_INFO + * @param { AsyncCallback } callback - Indicates callback of function. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getCurrentGroupWithCallback(callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload getCurrentGroup { getCurrentGroupReturnsPromise, getCurrentGroupWithCallback }; + /** * Obtain the information about the found devices. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1311,6 +1571,19 @@ declare namespace wifiManager { */ function getP2pPeerDevices(): Promise; + /** + * Obtain the information about the found devices. + * @permission ohos.permission.GET_WIFI_INFO + * @returns { Promise } Returns p2p device information. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getP2pPeerDevicesReturnsPromise(): Promise; + /** * Obtain the information about the found devices. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1335,6 +1608,25 @@ declare namespace wifiManager { */ function getP2pPeerDevices(callback: AsyncCallback): void; + /** + * Obtain the information about the found devices. + * @permission ohos.permission.GET_WIFI_INFO + * @param { AsyncCallback } callback - Indicates callback of function. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getP2pPeerDevicesWithCallback(callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload getP2pPeerDevices { getP2pPeerDevicesReturnsPromise, getP2pPeerDevicesWithCallback }; /** * Obtain the information about own device information. * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", @@ -1360,6 +1652,21 @@ declare namespace wifiManager { * @since 11 */ function getP2pLocalDevice(): Promise; + + /** + * Obtain the information about own device information. + * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", + * if ohos.permission.GET_WIFI_LOCAL_MAC is not granted. + * @permission ohos.permission.GET_WIFI_INFO + * @returns { Promise } Returns the information about own device info. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getP2pLocalDeviceReturnsPromise(): Promise; /** * Obtain the information about own device information. @@ -1389,6 +1696,28 @@ declare namespace wifiManager { */ function getP2pLocalDevice(callback: AsyncCallback): void; + /** + * Obtain the information about own device information. + * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", + * if ohos.permission.GET_WIFI_LOCAL_MAC is not granted. + * @permission ohos.permission.GET_WIFI_INFO + * @param { AsyncCallback } callback - Indicates callback of function. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + function getP2pLocalDeviceWithCallback(callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload getP2pLocalDevice { getP2pLocalDeviceReturnsPromise, getP2pLocalDeviceWithCallback }; + /** * Create a P2P group. * @permission ohos.permission.GET_WIFI_INFO @@ -1400,7 +1729,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function createGroup(config: WifiP2PConfig): void; @@ -1412,7 +1742,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function removeGroup(): void; @@ -1439,7 +1770,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function p2pConnect(config: WifiP2PConfig): void; @@ -1451,7 +1783,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function p2pCancelConnect(): void; @@ -1473,7 +1806,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function startDiscoverDevices(): void; @@ -1485,14 +1819,15 @@ declare namespace wifiManager { * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function stopDiscoverDevices(): void; /** * Delete the persistent P2P group with the specified network ID. * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.MANAGE_WIFI_CONNECTION - * @param { number } netId - Indicates the network ID of the group to be deleted. + * @param { int } netId - Indicates the network ID of the group to be deleted. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1.Incorrect parameter types. @@ -1501,9 +1836,10 @@ declare namespace wifiManager { * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function deletePersistentGroup(netId: number): void; + function deletePersistentGroup(netId: int): void; /** * Obtain information about the groups. @@ -1530,6 +1866,21 @@ declare namespace wifiManager { * @since 10 */ function getP2pGroups(): Promise>; + + /** + * Obtain information about the groups. + * @permission ohos.permission.GET_WIFI_INFO + * @returns { Promise> } Returns the information about own device info. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @syscap SystemCapability.Communication.WiFi.P2P + * @systemapi Hide this for inner system use. + * @since 20 + * @arkts 1.2 + */ + function getP2pGroupsReturnsPromise(): Promise>; /** * Obtain information about the groups. @@ -1559,6 +1910,28 @@ declare namespace wifiManager { */ function getP2pGroups(callback: AsyncCallback>): void; + /** + * Obtain information about the groups. + * @permission ohos.permission.GET_WIFI_INFO + * @param { AsyncCallback> } callback - Indicates callback of function. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 2801000 - Operation failed. + * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. + * @syscap SystemCapability.Communication.WiFi.P2P + * @systemapi Hide this for inner system use. + * @since 20 + * @arkts 1.2 + */ + function getP2pGroupsWithCallback(callback: AsyncCallback>): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload getP2pGroups { getP2pGroupsReturnsPromise, getP2pGroupsWithCallback }; + /** * Set the name of the Wi-Fi P2P device. * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.MANAGE_WIFI_CONNECTION @@ -1572,7 +1945,8 @@ declare namespace wifiManager { * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.P2P * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDeviceName(devName: string): void; @@ -2294,137 +2668,158 @@ declare namespace wifiManager { /** * Wi-Fi EAP method. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum EapMethod { /** * EAP NONE * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_NONE, /** * EAP PEAP * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_PEAP, /** * EAP TLS * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_TLS, /** * EAP TTLS * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_TTLS, /** * EAP PWD * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_PWD, /** * EAP SIM * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_SIM, /** * EAP AKA * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_AKA, /** * EAP AKA PRIME * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_AKA_PRIME, /** * EAP UNAUTH TLS * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EAP_UNAUTH_TLS } /** * Wi-Fi phase 2 method. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum Phase2Method { /** * Phase2 NONE * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_NONE, /** * Phase2 PAP * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_PAP, /** * Phase2 MSCHAP * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_MSCHAP, /** * Phase2 MSCHAPV2 * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_MSCHAPV2, /** * Phase2 GTC * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_GTC, /** * Phase2 SIM * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_SIM, /** * Phase2 AKA * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_AKA, /** * Phase2 AKA+ * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHASE2_AKA_PRIME } /** * Wi-Fi disconnected reason. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum DisconnectedReason { /** * Default reason * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ DISC_REASON_DEFAULT = 0, @@ -2432,7 +2827,8 @@ declare namespace wifiManager { * Password is wrong * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ DISC_REASON_WRONG_PWD = 1, @@ -2440,7 +2836,8 @@ declare namespace wifiManager { * The number of router's connection reaches the maximum number limit * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ DISC_REASON_CONNECTION_FULL = 2 } @@ -2520,17 +2917,19 @@ declare namespace wifiManager { /** * Wi-Fi Proxy method. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ProxyMethod { /** * No proxy is to be used. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ METHOD_NONE = 0, @@ -2538,7 +2937,8 @@ declare namespace wifiManager { * Use auto configured proxy. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ METHOD_AUTO = 1, @@ -2546,7 +2946,8 @@ declare namespace wifiManager { * Use manual configured proxy. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ METHOD_MANUAL = 2 } @@ -2602,43 +3003,49 @@ declare namespace wifiManager { /** * Wi-Fi link type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WifiLinkType { /** * Default link. * @syscap SystemCapability.Communication.WiFi.STA - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT_LINK = 0, /** * Wi-Fi7 single link. * @syscap SystemCapability.Communication.WiFi.STA - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI7_SINGLE_LINK = 1, /** * Wi-Fi7 MLSR. * @syscap SystemCapability.Communication.WiFi.STA - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI7_MLSR = 2, /** * Wi-Fi7 EMLSR. * @syscap SystemCapability.Communication.WiFi.STA - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI7_EMLSR = 3, /** * Wi-Fi7 STR. * @syscap SystemCapability.Communication.WiFi.STA - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI7_STR = 4 } @@ -2648,15 +3055,17 @@ declare namespace wifiManager { * @typedef WifiProxyConfig * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 - */ + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ interface WifiProxyConfig { /** * Wi-Fi proxy method * @type { ?ProxyMethod } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ proxyMethod?: ProxyMethod; @@ -2665,7 +3074,8 @@ declare namespace wifiManager { * @type { ?string } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ pacWebAddress?: string; @@ -2674,25 +3084,28 @@ declare namespace wifiManager { * @type { ?string } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ serverHostName?: string; /** * Server port for manual configured proxy. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - serverPort?: number; + serverPort?: int; /** * Exclusion objects for manual configured proxy. objects are separated by ','. * @type { ?string } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ exclusionObjects?: string; } @@ -2701,14 +3114,16 @@ declare namespace wifiManager { * Wi-Fi EAP config. * @typedef WifiEapConfig * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WifiEapConfig { /** * EAP authentication method * @type { EapMethod } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ eapMethod: EapMethod; @@ -2716,7 +3131,8 @@ declare namespace wifiManager { * Phase 2 authentication method * @type { Phase2Method } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ phase2Method: Phase2Method; @@ -2724,7 +3140,8 @@ declare namespace wifiManager { * The identity * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ identity: string; @@ -2732,7 +3149,8 @@ declare namespace wifiManager { * Anonymous identity * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ anonymousIdentity: string; @@ -2740,7 +3158,8 @@ declare namespace wifiManager { * Password * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ password: string; @@ -2748,7 +3167,8 @@ declare namespace wifiManager { * CA certificate alias * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ caCertAlias: string; @@ -2756,7 +3176,8 @@ declare namespace wifiManager { * CA certificate path * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ caPath: string; @@ -2764,7 +3185,8 @@ declare namespace wifiManager { * Client certificate alias * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ clientCertAlias: string; @@ -2772,7 +3194,8 @@ declare namespace wifiManager { * content of user's certificate * @type { Uint8Array } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ certEntry: Uint8Array; @@ -2780,7 +3203,8 @@ declare namespace wifiManager { * Password of user's certificate * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ certPassword: string; @@ -2788,7 +3212,8 @@ declare namespace wifiManager { * Alternate subject match * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ altSubjectMatch: string; @@ -2796,7 +3221,8 @@ declare namespace wifiManager { * Domain suffix match * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ domainSuffixMatch: string; @@ -2804,7 +3230,8 @@ declare namespace wifiManager { * Realm for Passpoint credential * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ realm: string; @@ -2812,17 +3239,19 @@ declare namespace wifiManager { * Public Land Mobile Network of the provider of Passpoint credential * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ plmn: string; /** * Sub ID of the SIM card - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - eapSubId: number; + eapSubId: int; } /** @@ -2884,7 +3313,8 @@ declare namespace wifiManager { * @type { ?DeviceAddressType } * @syscap SystemCapability.Communication.WiFi.STA * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bssidType?: DeviceAddressType; @@ -2908,7 +3338,8 @@ declare namespace wifiManager { * Hide SSID or not, false(default): not hide * @type { ?boolean } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isHiddenSsid?: boolean; @@ -2931,46 +3362,51 @@ declare namespace wifiManager { /** * The UID of the Wi-Fi configuration creator. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - creatorUid?: number; + creatorUid?: int; /** * Disable reason - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - disableReason?: number; + disableReason?: int; /** * Allocated networkId - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - netId?: number; + netId?: int; /** * Random mac type - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - randomMacType?: number; + randomMacType?: int; /** * Random mac address, the length is 6. * @type { ?string } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ randomMacAddr?: string; @@ -2979,7 +3415,8 @@ declare namespace wifiManager { * @type { ?IpType } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ipType?: IpType; @@ -2988,7 +3425,8 @@ declare namespace wifiManager { * @type { ?IpConfig } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ staticIp?: IpConfig; @@ -2996,7 +3434,8 @@ declare namespace wifiManager { * EAP config info. * @type { ?WifiEapConfig } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ eapConfig?: WifiEapConfig; @@ -3005,7 +3444,8 @@ declare namespace wifiManager { * @type { ?WifiProxyConfig } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ proxyConfig?: WifiProxyConfig; @@ -3013,25 +3453,28 @@ declare namespace wifiManager { * WAPI config info. * @type { ?WifiWapiConfig } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ wapiConfig?: WifiWapiConfig; /** * Device config status: 0 - enabled, 1 - disabled, 2 - permanent disabled, 3 - unknown. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - configStatus?: number; + configStatus?: int; /** * Allow auto connect config: false - not, true - yes. * @type { ?boolean } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 17 + * @since arkts {'1.1':'17', '1.2':'20'} + * @arkts 1.1&1.2 */ isAutoConnectAllowed?: boolean; @@ -3049,14 +3492,16 @@ declare namespace wifiManager { * Wi-Fi WAPI config. * @typedef WifiWapiConfig * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WifiWapiConfig { /** * WAPI pre-shared key type. * @type { WapiPskType } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ wapiPskType: WapiPskType; @@ -3064,7 +3509,8 @@ declare namespace wifiManager { * WAPI AS certification. * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ wapiAsCert: string; @@ -3072,7 +3518,8 @@ declare namespace wifiManager { * WAPI user certification. * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ wapiUserCert: string; } @@ -3082,51 +3529,57 @@ declare namespace wifiManager { * @typedef IpConfig * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface IpConfig { /** * IP address. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - ipAddress: number; + ipAddress: int; /** * Gate way. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - gateway: number; + gateway: int; /** * Prefix length. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - prefixLength: number; + prefixLength: int; /** * DNS servers. - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - dnsServers: number[]; + dnsServers: int[]; /** * Domains. * @type { Array } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ domains: Array; } @@ -3135,38 +3588,43 @@ declare namespace wifiManager { * Wi-Fi information elements. * @typedef WifiInfoElem * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WifiInfoElem { /** * Element id - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - eid: number; + eid: int; /** * Element content * @type { Uint8Array } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ content: Uint8Array; } /** * Describes the wifi channel width. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WifiChannelWidth { /** * 20MHz. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_20MHZ = 0, @@ -3174,7 +3632,8 @@ declare namespace wifiManager { * 40MHz. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_40MHZ = 1, @@ -3182,7 +3641,8 @@ declare namespace wifiManager { * 80MHz. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_80MHZ = 2, @@ -3190,7 +3650,8 @@ declare namespace wifiManager { * 160MHz. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_160MHZ = 3, @@ -3198,7 +3659,8 @@ declare namespace wifiManager { * 80MHz plus. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_80MHZ_PLUS = 4, @@ -3206,7 +3668,8 @@ declare namespace wifiManager { * Invalid. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_INVALID } @@ -3269,7 +3732,8 @@ declare namespace wifiManager { * @type { DeviceAddressType } * @syscap SystemCapability.Communication.WiFi.STA * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bssidType: DeviceAddressType; @@ -3277,7 +3741,8 @@ declare namespace wifiManager { * Hotspot capability * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ capabilities: string; @@ -3330,52 +3795,58 @@ declare namespace wifiManager { */ /** * Frequency - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - frequency: number; + frequency: int; /** * Channel width - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - channelWidth: number; + channelWidth: int; /** * Center frequency 0. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - centerFrequency0: number; + centerFrequency0: int; /** * Center frequency 1. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - centerFrequency1: number; + centerFrequency1: int; /** * Information elements. * @type { Array } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ infoElems: Array; /** * Time stamp - * @type { number } + * @type { long } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; /** * Supported wifi category @@ -3390,7 +3861,8 @@ declare namespace wifiManager { * Whether the Wi-Fi hotspot is HiLink network. * @type { boolean } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isHiLinkNetwork: boolean; } @@ -3510,16 +3982,18 @@ declare namespace wifiManager { /** * Describes the WAPI pre-shared key Type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WapiPskType { /** * ASCII character type of WAPI pre-shared key. * * @syscap SystemCapability.Communication.WiFi.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ WAPI_PSK_ASCII = 0, @@ -3527,23 +4001,26 @@ declare namespace wifiManager { * HEX character type of WAPI pre-shared key. * * @syscap SystemCapability.Communication.WiFi.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ WAPI_PSK_HEX = 1 } /** * Wi-Fi band type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WifiBandType { /** * Default. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_BAND_NONE, @@ -3551,7 +4028,8 @@ declare namespace wifiManager { * Band 2.4G. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_BAND_2G, @@ -3559,7 +4037,8 @@ declare namespace wifiManager { * Band 5G. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_BAND_5G, @@ -3567,7 +4046,8 @@ declare namespace wifiManager { * Band 6G. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_BAND_6G, @@ -3575,71 +4055,81 @@ declare namespace wifiManager { * Band 60G. * * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_BAND_60G } /** * Wi-Fi standard. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WifiStandard { /** * Undefined * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_UNDEFINED, /** * Wifi 802.11a * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_11A, /** * Wifi 802.11b * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_11B, /** * Wifi 802.11g * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_11G, /** * Wifi 802.11n * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_11N, /** * Wifi 802.11ac * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_11AC, /** * Wifi 802.11ax * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_11AX, /** * Wifi 802.11ad * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_STANDARD_11AD } @@ -3695,12 +4185,13 @@ declare namespace wifiManager { /** * The ID(uniquely identifies) of a Wi-Fi connection. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - networkId: number; + networkId: int; /** * The RSSI(dBm) of a Wi-Fi access point. @@ -3729,35 +4220,39 @@ declare namespace wifiManager { /** * The speed of a Wi-Fi access point. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - linkSpeed: number; + linkSpeed: int; /** * The rx speed of a Wi-Fi access point. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - rxLinkSpeed: number; + rxLinkSpeed: int; /** * Max tx speed of a Wi-Fi access point. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - maxSupportedTxLinkSpeed: number; + maxSupportedTxLinkSpeed: int; /** * Max rx speed of a Wi-Fi access point. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - maxSupportedRxLinkSpeed: number; + maxSupportedRxLinkSpeed: int; /** * The frequency of a Wi-Fi access point. @@ -3767,18 +4262,20 @@ declare namespace wifiManager { */ /** * The frequency of a Wi-Fi access point. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - frequency: number; + frequency: int; /** * Whether the SSID of the access point (AP) of this Wi-Fi connection is hidden. * @type { boolean } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isHidden: boolean; @@ -3786,35 +4283,39 @@ declare namespace wifiManager { * Whether this Wi-Fi connection restricts the data volume. * @type { boolean } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isRestricted: boolean; /** * The load value of this Wi-Fi connection. A greater value indicates a higher load. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - chload: number; + chload: int; /** * The signal-to-noise ratio (SNR) of this Wi-Fi connection. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - snr: number; + snr: int; /** * Type of macAddress: 0 - real mac, 1 - random mac. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - macType: number; + macType: int; /** * The Wi-Fi MAC address of a device. @@ -3827,18 +4328,20 @@ declare namespace wifiManager { /** * The IP address of this Wi-Fi connection. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - ipAddress: number; + ipAddress: int; /** * The state of the supplicant of this Wi-Fi connection. * @type { SuppState } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ suppState: SuppState; @@ -3855,7 +4358,8 @@ declare namespace wifiManager { * Channel width of the connected hotspot. * @type { WifiChannelWidth } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ channelWidth: WifiChannelWidth; @@ -3863,7 +4367,8 @@ declare namespace wifiManager { * Wifi standard of current connection. * @type { WifiStandard } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ wifiStandard: WifiStandard; @@ -3880,7 +4385,8 @@ declare namespace wifiManager { * Whether the Wi-Fi hotspot is HiLink network. * @type { boolean } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isHiLinkNetwork: boolean; @@ -3888,7 +4394,8 @@ declare namespace wifiManager { * Wi-Fi link type * @type { ?WifiLinkType } * @syscap SystemCapability.Communication.WiFi.STA - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ wifiLinkType?: WifiLinkType; } @@ -3912,51 +4419,57 @@ declare namespace wifiManager { /** * The gateway of the Wi-Fi connection - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - gateway: number; + gateway: int; /** * The network mask of the Wi-Fi connection - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - netmask: number; + netmask: int; /** * The primary DNS server IP address of the Wi-Fi connection - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - primaryDns: number; + primaryDns: int; /** * The secondary DNS server IP address of the Wi-Fi connection - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - secondDns: number; + secondDns: int; /** * The DHCP server IP address of the Wi-Fi connection - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - serverIp: number; + serverIp: int; /** * The IP address lease duration of the Wi-Fi connection - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.STA - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - leaseDuration: number; + leaseDuration: int; } /** @@ -3980,7 +4493,8 @@ declare namespace wifiManager { * The global IPv6 address of the Wi-Fi connection * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ globalIpv6Address: string; @@ -3988,7 +4502,8 @@ declare namespace wifiManager { * The rand Global IPv6 address of the Wi-Fi connection * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ randomGlobalIpv6Address: string; @@ -3996,7 +4511,8 @@ declare namespace wifiManager { * The unique IPv6 address of the Wi-Fi connection * @type { ?string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ uniqueIpv6Address?: string; @@ -4004,7 +4520,8 @@ declare namespace wifiManager { * The rand unique IPv6 address of the Wi-Fi connection * @type { ?string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ randomUniqueIpv6Address?: string; @@ -4012,7 +4529,8 @@ declare namespace wifiManager { * The gateway of the Wi-Fi connection * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ gateway: string; @@ -4020,7 +4538,8 @@ declare namespace wifiManager { * The network mask of the Wi-Fi connection * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ netmask: string; @@ -4028,7 +4547,8 @@ declare namespace wifiManager { * The primary DNS server IPV6 address of the Wi-Fi connection * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ primaryDNS: string; @@ -4036,7 +4556,8 @@ declare namespace wifiManager { * The secondary DNS server IPV6 address of the Wi-Fi connection * @type { string } * @syscap SystemCapability.Communication.WiFi.STA - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ secondDNS: string; } @@ -4082,12 +4603,13 @@ declare namespace wifiManager { /** * The channel of the Wi-Fi hotspot. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - channel?: number; + channel?: int; /** * The password of the Wi-Fi hotspot @@ -4101,19 +4623,21 @@ declare namespace wifiManager { /** * The maximum number of connections allowed by the Wi-Fi hotspot - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - maxConn: number; + maxConn: int; /** * IP address of the dhcp server, it's a string, For example 192.168.43.1 * @type { ?string } * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ipAddress?: string; } @@ -4132,7 +4656,8 @@ declare namespace wifiManager { * @type { string } * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -4151,7 +4676,8 @@ declare namespace wifiManager { * @type { ?DeviceAddressType } * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ macAddressType?: DeviceAddressType; @@ -4160,7 +4686,8 @@ declare namespace wifiManager { * @type { string } * @syscap SystemCapability.Communication.WiFi.AP.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ipAddress: string; } @@ -4168,17 +4695,19 @@ declare namespace wifiManager { /** * Wi-Fi IP type enumeration. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ enum IpType { /** * Use statically configured IP settings * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ STATIC, @@ -4186,7 +4715,8 @@ declare namespace wifiManager { * Use dynamically configured IP settings * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DHCP, @@ -4194,7 +4724,8 @@ declare namespace wifiManager { * No IP details are assigned * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN } @@ -4202,17 +4733,19 @@ declare namespace wifiManager { /** * The state of the supplicant enumeration. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum SuppState { /** * The supplicant is not associated with or is disconnected from the AP. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DISCONNECTED, @@ -4220,7 +4753,8 @@ declare namespace wifiManager { * The network interface is disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ INTERFACE_DISABLED, @@ -4228,7 +4762,8 @@ declare namespace wifiManager { * The supplicant is disabled. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ INACTIVE, @@ -4236,7 +4771,8 @@ declare namespace wifiManager { * The supplicant is scanning for a Wi-Fi connection. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SCANNING, @@ -4244,7 +4780,8 @@ declare namespace wifiManager { * The supplicant is authenticating with a specified AP. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ AUTHENTICATING, @@ -4252,7 +4789,8 @@ declare namespace wifiManager { * The supplicant is associating with a specified AP. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSOCIATING, @@ -4260,7 +4798,8 @@ declare namespace wifiManager { * The supplicant is associated with a specified AP. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSOCIATED, @@ -4268,7 +4807,8 @@ declare namespace wifiManager { * The four-way handshake is ongoing. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ FOUR_WAY_HANDSHAKE, @@ -4276,7 +4816,8 @@ declare namespace wifiManager { * The group handshake is ongoing. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GROUP_HANDSHAKE, @@ -4284,7 +4825,8 @@ declare namespace wifiManager { * All authentication is completed. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMPLETED, @@ -4292,7 +4834,8 @@ declare namespace wifiManager { * Failed to establish a connection to the supplicant. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ UNINITIALIZED, @@ -4300,7 +4843,8 @@ declare namespace wifiManager { * The supplicant is in an unknown or invalid state. * @syscap SystemCapability.Communication.WiFi.STA * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ INVALID } @@ -4456,14 +5000,16 @@ declare namespace wifiManager { * * @typedef WifiP2PConfig * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WifiP2PConfig { /** * Device mac address * @type { string } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ deviceAddress: string; @@ -4471,24 +5017,27 @@ declare namespace wifiManager { * Device mac address type * @type { ?DeviceAddressType } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ deviceAddressType?: DeviceAddressType; /** * Group network ID. When creating a group, -1 indicates creates a temporary group, * -2: indicates creates a persistent group - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - netId: number; + netId: int; /** * The passphrase of this {@code WifiP2pConfig} instance * @type { string } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ passphrase: string; @@ -4496,7 +5045,8 @@ declare namespace wifiManager { * Group name * @type { string } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ groupName: string; @@ -4504,7 +5054,8 @@ declare namespace wifiManager { * Group owner band * @type { GroupOwnerBand } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ goBand: GroupOwnerBand; } @@ -4514,14 +5065,16 @@ declare namespace wifiManager { * * @typedef WifiP2pGroupInfo * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WifiP2pGroupInfo { /** * Indicates whether it is group owner * @type { boolean } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isP2pGo: boolean; @@ -4529,7 +5082,8 @@ declare namespace wifiManager { * Group owner information * @type { WifiP2pDevice } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ownerInfo: WifiP2pDevice; @@ -4537,7 +5091,8 @@ declare namespace wifiManager { * The group passphrase * @type { string } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ passphrase: string; @@ -4549,35 +5104,48 @@ declare namespace wifiManager { */ interface: string; + /** + * Interface name + * @type { string } + * @syscap SystemCapability.Communication.WiFi.P2P + * @since 20 + * @arkts 1.2 + */ + interfaceName: string; + /** * Group name * @type { string } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ groupName: string; /** * Network ID - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - networkId: number; + networkId: int; /** * Frequency - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - frequency: number; + frequency: int; /** * Client list * @type { WifiP2pDevice[] } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ clientDevices: WifiP2pDevice[]; @@ -4585,7 +5153,8 @@ declare namespace wifiManager { * Group owner IP address * @type { string } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ goIpAddress: string; } @@ -4706,29 +5275,33 @@ declare namespace wifiManager { /** * P2P group owner band. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ enum GroupOwnerBand { /** * default band. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GO_BAND_AUTO = 0, /** * 2.4G band. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GO_BAND_2GHZ = 1, /** * 5G band. * @syscap SystemCapability.Communication.WiFi.P2P - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GO_BAND_5GHZ = 2 } -- Gitee From dfb9fe7f93a13f92abb6e00fec3a8f5d95558067 Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Mon, 25 Aug 2025 17:39:46 +0800 Subject: [PATCH 2/8] fix format Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 55 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index 5e48df064f..05b1572741 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -289,7 +289,8 @@ declare namespace wifiManager { function addDeviceConfig(config: WifiDeviceConfig): Promise; /** - * Add Wi-Fi connection configuration to the device. The configuration will be updated when the configuration is added.

+ * Add Wi-Fi connection configuration to the device. + * The configuration will be updated when the configuration is added.

* @permission ohos.permission.SET_WIFI_INFO and ohos.permission.SET_WIFI_CONFIG * @param { WifiDeviceConfig } config - Indicates the device configuration for connection to the Wi-Fi network. * @returns { Promise } Returns {@code networkId} if the configuration is added; returns {@code -1} otherwise. @@ -319,8 +320,9 @@ declare namespace wifiManager { */ function addDeviceConfig(config: WifiDeviceConfig, callback: AsyncCallback): void; - /** - * Add Wi-Fi connection configuration to the device. The configuration will be updated when the configuration is added.

+ /** + * Add Wi-Fi connection configuration to the device. + * The configuration will be updated when the configuration is added.

* @permission ohos.permission.SET_WIFI_INFO and ohos.permission.SET_WIFI_CONFIG * @param { WifiDeviceConfig } config - Indicates the device configuration for connection to the Wi-Fi network. * @param { AsyncCallback } callback - Indicates call back of addDeviceConfig. @@ -551,8 +553,6 @@ declare namespace wifiManager { * @param { int } networkId - Network ID which will be removed. * @param { AsyncCallback } callback - Indicates call back of removeCandidateConfig. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. @@ -614,7 +614,7 @@ declare namespace wifiManager { * @permission ohos.permission.SET_WIFI_INFO * @param { number } networkId - Network ID which will be connected. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -630,7 +630,7 @@ declare namespace wifiManager { * @permission ohos.permission.SET_WIFI_INFO * @param { int } networkId - Network ID which will be connected. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -669,7 +669,7 @@ declare namespace wifiManager { * @permission ohos.permission.MANAGE_WIFI_CONNECTION or ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION * @param { int } networkId - ID of the connected network. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -687,7 +687,7 @@ declare namespace wifiManager { * @param { WifiDeviceConfig } config - Indicates the device configuration for connection to the Wi-Fi hotspot. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -759,7 +759,8 @@ declare namespace wifiManager { function getLinkedInfo(): Promise; /** - * Obtain connection information about the Wi-Fi connection. If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. + * Obtain connection information about the Wi-Fi connection. + * If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. * @permission ohos.permission.GET_WIFI_INFO * @returns { Promise } Returns Wi-Fi linked information. * @throws {BusinessError} 201 - Permission denied. @@ -808,7 +809,7 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO * @param { AsyncCallback } callback - Indicates callback of function. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -824,7 +825,7 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO * @param { AsyncCallback } callback - Indicates callback of function. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -903,10 +904,10 @@ declare namespace wifiManager { /** * Check whether the device supports a specified feature. * @permission ohos.permission.GET_WIFI_INFO - * @param { int } featureId Indicates the ID of the feature. + * @param { long } featureId Indicates the ID of the feature. * @returns { boolean } Returns {@code true} if this device supports the specified feature, returns {@code false} otherwise. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2401000 - Operation failed. @@ -914,7 +915,7 @@ declare namespace wifiManager { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function isFeatureSupported(featureId: int): boolean; + function isFeatureSupported(featureId: long): boolean; /** * Obtain the MAC address of a Wi-Fi device. Wi-Fi must be enabled. @@ -1043,7 +1044,7 @@ declare namespace wifiManager { * @param { boolean } isAllowed Identifies whether allow auto connect or not. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -1062,7 +1063,7 @@ declare namespace wifiManager { * @param { int } netId Identifies the network to disable. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -1098,7 +1099,7 @@ declare namespace wifiManager { * ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION) * @param { int } id - Indicate the ID of the Wi-Fi DeviceConfig. The value of networkId cannot be less than 0. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -1189,7 +1190,7 @@ declare namespace wifiManager { * @param { WifiDeviceConfig } config - Indicates the Wi-Fi device config. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -1310,7 +1311,7 @@ declare namespace wifiManager { * If {@code securityType} is not {@code open}, {@code preSharedKey} must be available and correct. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Incorrect parameter types. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types. * 2.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2601000 - Operation failed. @@ -1427,7 +1428,7 @@ declare namespace wifiManager { */ function getP2pLinkedInfo(): Promise; - /** + /** * Obtain information about the P2P connection. * @permission ohos.permission.GET_WIFI_INFO * @returns { Promise } Returns p2p linked information. @@ -1453,7 +1454,7 @@ declare namespace wifiManager { */ function getP2pLinkedInfo(callback: AsyncCallback): void; - /** + /** * Obtain information about the P2P connection. * @permission ohos.permission.GET_WIFI_INFO * @param { AsyncCallback } callback - Indicates callback of function. @@ -1723,7 +1724,7 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO * @param { WifiP2PConfig } config - Indicates the configuration for a group. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1.Incorrect parameter types. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * 2.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2801000 - Operation failed. @@ -1752,7 +1753,7 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION * @param { WifiP2PConfig } config - Indicates the configuration for connecting to a specific group. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. + * @throws {BusinessError} 401 - Parameter error. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. @@ -1764,7 +1765,7 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO * @param { WifiP2PConfig } config - Indicates the configuration for connecting to a specific group. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1.Incorrect parameter types. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * 2.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2801000 - Operation failed. @@ -1830,7 +1831,7 @@ declare namespace wifiManager { * @param { int } netId - Indicates the network ID of the group to be deleted. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1.Incorrect parameter types. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2801000 - Operation failed. * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. @@ -1938,7 +1939,7 @@ declare namespace wifiManager { * @param { string } devName - Indicate the name to be set. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2801000 - Operation failed. -- Gitee From 116338b9f3e2017be9eb81595bc9e17c66117ab6 Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Mon, 25 Aug 2025 19:42:54 +0800 Subject: [PATCH 3/8] in line with api designer Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index 05b1572741..9e9e9c1fe0 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -247,7 +247,7 @@ declare namespace wifiManager { * @param { boolean } isScanAlwaysAllowed - true for allow trigger scan, otherwise don't allow trigger scan when Wi-Fi is disabled. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA @@ -394,7 +394,7 @@ declare namespace wifiManager { * @arkts 1.2 */ function addCandidateConfigReturnsPromise(config: WifiDeviceConfig): Promise; - + /** * Add a specified candidate hotspot configuration and returns the networkId. * This method adds one configuration at a time. After this configuration is added, @@ -796,7 +796,7 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO * @param { AsyncCallback } callback - Indicates callback of function. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -1020,11 +1020,11 @@ declare namespace wifiManager { * Update the specified Wi-Fi configuration. * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.SET_WIFI_CONFIG * @param { WifiDeviceConfig } config Indicates the Wi-Fi configuration to update. - * @returns { number } Returns the network ID in the updated Wi-Fi configuration if the update is successful; + * @returns { int } Returns the network ID in the updated Wi-Fi configuration if the update is successful; * returns {@code -1} if the specified Wi-Fi configuration is not contained in the list. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. @@ -1034,7 +1034,7 @@ declare namespace wifiManager { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function updateNetwork(config: WifiDeviceConfig): number; + function updateNetwork(config: WifiDeviceConfig): int; /** * Set whther to allow automatic connnect by networkId. @@ -1372,7 +1372,7 @@ declare namespace wifiManager { * @param { StationInfo } stationInfo - station which will be added in the block list. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1.Incorrect parameter types. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * 2.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2601000 - Operation failed. @@ -1389,7 +1389,7 @@ declare namespace wifiManager { * @param { StationInfo } stationInfo - station which will be deleted in the block list. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1.Incorrect parameter types. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * 2.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2601000 - Operation failed. @@ -1406,7 +1406,7 @@ declare namespace wifiManager { * @returns { Array } stations in the block list. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Invalid parameters. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core @@ -1440,7 +1440,7 @@ declare namespace wifiManager { * @arkts 1.2 */ function getP2pLinkedInfoReturnsPromise(): Promise; - + /** * Obtain information about the P2P connection. * @permission ohos.permission.GET_WIFI_INFO @@ -1571,7 +1571,7 @@ declare namespace wifiManager { * @since 10 */ function getP2pPeerDevices(): Promise; - + /** * Obtain the information about the found devices. * @permission ohos.permission.GET_WIFI_INFO @@ -1668,7 +1668,7 @@ declare namespace wifiManager { * @arkts 1.2 */ function getP2pLocalDeviceReturnsPromise(): Promise; - + /** * Obtain the information about own device information. * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", @@ -1882,7 +1882,7 @@ declare namespace wifiManager { * @arkts 1.2 */ function getP2pGroupsReturnsPromise(): Promise>; - + /** * Obtain information about the groups. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION -- Gitee From a96485a544038e5e13214408de29997c1716b160 Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Mon, 25 Aug 2025 20:14:07 +0800 Subject: [PATCH 4/8] add 202 Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index 9e9e9c1fe0..309e5527f3 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -1144,6 +1144,7 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.GET_WIFI_CONFIG * @returns { DisconnectedReason } Returns the latest disconnected reason. * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA @@ -1406,7 +1407,8 @@ declare namespace wifiManager { * @returns { Array } stations in the block list. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types. + * 2.Parameter verification failed. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2601000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.AP.Core -- Gitee From 02c7d56f9d1be9f009711b1754b6a3d126a5edbb Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Mon, 25 Aug 2025 20:19:26 +0800 Subject: [PATCH 5/8] remove 202 Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index 309e5527f3..b215a0f16b 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -1144,7 +1144,6 @@ declare namespace wifiManager { * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.GET_WIFI_CONFIG * @returns { DisconnectedReason } Returns the latest disconnected reason. * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 801 - Capability not supported. * @throws {BusinessError} 2501000 - Operation failed. * @syscap SystemCapability.Communication.WiFi.STA -- Gitee From 6158156ad9a2b660e0b2fedaa433df9c1bb92c53 Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Tue, 26 Aug 2025 09:40:01 +0800 Subject: [PATCH 6/8] reverse overload Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 338 +------------------------------------ 1 file changed, 4 insertions(+), 334 deletions(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index b215a0f16b..3a1464a350 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -287,22 +287,6 @@ declare namespace wifiManager { * @since 15 */ function addDeviceConfig(config: WifiDeviceConfig): Promise; - - /** - * Add Wi-Fi connection configuration to the device. - * The configuration will be updated when the configuration is added.

- * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.SET_WIFI_CONFIG - * @param { WifiDeviceConfig } config - Indicates the device configuration for connection to the Wi-Fi network. - * @returns { Promise } Returns {@code networkId} if the configuration is added; returns {@code -1} otherwise. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.STA - * @since 20 - * @arkts 1.2 - */ - function addDeviceConfigReturnsPromise(config: WifiDeviceConfig): Promise; /** * Add Wi-Fi connection configuration to the device. The configuration will be updated when the configuration is added.

@@ -320,27 +304,6 @@ declare namespace wifiManager { */ function addDeviceConfig(config: WifiDeviceConfig, callback: AsyncCallback): void; - /** - * Add Wi-Fi connection configuration to the device. - * The configuration will be updated when the configuration is added.

- * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.SET_WIFI_CONFIG - * @param { WifiDeviceConfig } config - Indicates the device configuration for connection to the Wi-Fi network. - * @param { AsyncCallback } callback - Indicates call back of addDeviceConfig. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.STA - * @since 15 - */ - function addDeviceConfigWithCallback(config: WifiDeviceConfig, callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload addDeviceConfig { addDeviceConfigReturnsPromise, addDeviceConfigWithCallback }; - /** * Add a specified candidate hotspot configuration and returns the networkId. * This method adds one configuration at a time. After this configuration is added, @@ -377,24 +340,6 @@ declare namespace wifiManager { */ function addCandidateConfig(config: WifiDeviceConfig): Promise; - /** - * Add a specified candidate hotspot configuration and returns the networkId. - * This method adds one configuration at a time. After this configuration is added, - * your device will determine whether to connect to the hotspot. - * The app must be in the foreground. - * @permission ohos.permission.SET_WIFI_INFO - * @param { WifiDeviceConfig } config - candidate config. - * @returns { Promise } Returns {@code networkId} if the configuration is added; returns {@code -1} otherwise. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.STA - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - function addCandidateConfigReturnsPromise(config: WifiDeviceConfig): Promise; - /** * Add a specified candidate hotspot configuration and returns the networkId. * This method adds one configuration at a time. After this configuration is added, @@ -431,30 +376,6 @@ declare namespace wifiManager { */ function addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback): void; - /** - * Add a specified candidate hotspot configuration and returns the networkId. - * This method adds one configuration at a time. After this configuration is added, - * your device will determine whether to connect to the hotspot. - * The app must be in the foreground. - * @permission ohos.permission.SET_WIFI_INFO - * @param { WifiDeviceConfig } config - candidate config. - * @param { AsyncCallback } callback - Indicates call back of addCandidateConfig. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.STA - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - function addCandidateConfigWithCallback(config: WifiDeviceConfig, callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload addCandidateConfig { addCandidateConfigReturnsPromise, addCandidateConfigWithCallback }; - /** * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed * to be removed. @@ -491,24 +412,6 @@ declare namespace wifiManager { */ function removeCandidateConfig(networkId: number): Promise; - /** - * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed - * to be removed. - * The app must be in the foreground. - * @permission ohos.permission.SET_WIFI_INFO - * @param { int } networkId - Network ID which will be removed. - * @returns { Promise } Return results. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.STA - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - function removeCandidateConfigReturnsPromise(networkId: int): Promise; - /** * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed * to be removed. @@ -545,30 +448,6 @@ declare namespace wifiManager { */ function removeCandidateConfig(networkId: number, callback: AsyncCallback): void; - /** - * Remove a specified candidate hotspot configuration, only the configuration which is added by ourself is allowed - * to be removed. - * The app must be in the foreground. - * @permission ohos.permission.SET_WIFI_INFO - * @param { int } networkId - Network ID which will be removed. - * @param { AsyncCallback } callback - Indicates call back of removeCandidateConfig. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.STA - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - function removeCandidateConfigWithCallback(networkId: int, callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload removeCandidateConfig { removeCandidateConfigReturnsPromise, removeCandidateConfigWithCallback }; - /** * Obtain the list of all existed candidate Wi-Fi configurations which added by ourself. * You can obtain only the Wi-Fi configurations you created on your own application. @@ -753,28 +632,12 @@ declare namespace wifiManager { * @syscap SystemCapability.Communication.WiFi.STA * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 * */ function getLinkedInfo(): Promise; - /** - * Obtain connection information about the Wi-Fi connection. - * If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. - * @permission ohos.permission.GET_WIFI_INFO - * @returns { Promise } Returns Wi-Fi linked information. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.STA - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - function getLinkedInfoReturnsPromise(): Promise; - /** * Obtain multiple Wi-Fi connection information when Wi-Fi linked in MLO(Muti-Link Operation) state. * If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. @@ -816,33 +679,11 @@ declare namespace wifiManager { * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. * @syscap SystemCapability.Communication.WiFi.STA * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLinkedInfo(callback: AsyncCallback): void; - /** - * Obtain connection information about the Wi-Fi connection. - * @permission ohos.permission.GET_WIFI_INFO - * @param { AsyncCallback } callback - Indicates callback of function. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2501000 - Operation failed. - * @throws {BusinessError} 2501001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.STA - * @crossplatform - * @since 20 - * @arkts 1.2 - */ - function getLinkedInfoWithCallback(callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload getLinkedInfo { getLinkedInfoReturnsPromise, getLinkedInfoWithCallback }; - /** * Obtain connection information about the Wi-Fi connection.this apireturns the result syncchronously. * If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. @@ -1429,19 +1270,6 @@ declare namespace wifiManager { */ function getP2pLinkedInfo(): Promise; - /** - * Obtain information about the P2P connection. - * @permission ohos.permission.GET_WIFI_INFO - * @returns { Promise } Returns p2p linked information. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getP2pLinkedInfoReturnsPromise(): Promise; - /** * Obtain information about the P2P connection. * @permission ohos.permission.GET_WIFI_INFO @@ -1455,26 +1283,6 @@ declare namespace wifiManager { */ function getP2pLinkedInfo(callback: AsyncCallback): void; - /** - * Obtain information about the P2P connection. - * @permission ohos.permission.GET_WIFI_INFO - * @param { AsyncCallback } callback - Indicates callback of function. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getP2pLinkedInfoWithCallback(callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload getP2pLinkedInfo { getP2pLinkedInfoReturnsPromise, getP2pLinkedInfoWithCallback }; - /** * Obtain information about the current p2p group. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1497,19 +1305,6 @@ declare namespace wifiManager { */ function getCurrentGroup(): Promise; - /** - * Obtain information about the current p2p group. - * @permission ohos.permission.GET_WIFI_INFO - * @returns { Promise } Returns p2p group information. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getCurrentGroupReturnsPromise(): Promise; - /** * Obtain information about the current p2p group. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1532,25 +1327,6 @@ declare namespace wifiManager { */ function getCurrentGroup(callback: AsyncCallback): void; - /** - * Obtain information about the current p2p group. - * @permission ohos.permission.GET_WIFI_INFO - * @param { AsyncCallback } callback - Indicates callback of function. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getCurrentGroupWithCallback(callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload getCurrentGroup { getCurrentGroupReturnsPromise, getCurrentGroupWithCallback }; - /** * Obtain the information about the found devices. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1573,19 +1349,6 @@ declare namespace wifiManager { */ function getP2pPeerDevices(): Promise; - /** - * Obtain the information about the found devices. - * @permission ohos.permission.GET_WIFI_INFO - * @returns { Promise } Returns p2p device information. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getP2pPeerDevicesReturnsPromise(): Promise; - /** * Obtain the information about the found devices. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1610,25 +1373,6 @@ declare namespace wifiManager { */ function getP2pPeerDevices(callback: AsyncCallback): void; - /** - * Obtain the information about the found devices. - * @permission ohos.permission.GET_WIFI_INFO - * @param { AsyncCallback } callback - Indicates callback of function. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getP2pPeerDevicesWithCallback(callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload getP2pPeerDevices { getP2pPeerDevicesReturnsPromise, getP2pPeerDevicesWithCallback }; /** * Obtain the information about own device information. * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", @@ -1655,21 +1399,6 @@ declare namespace wifiManager { */ function getP2pLocalDevice(): Promise; - /** - * Obtain the information about own device information. - * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", - * if ohos.permission.GET_WIFI_LOCAL_MAC is not granted. - * @permission ohos.permission.GET_WIFI_INFO - * @returns { Promise } Returns the information about own device info. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getP2pLocalDeviceReturnsPromise(): Promise; - /** * Obtain the information about own device information. * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", @@ -1698,28 +1427,6 @@ declare namespace wifiManager { */ function getP2pLocalDevice(callback: AsyncCallback): void; - /** - * Obtain the information about own device information. - * DeviceAddress in the returned WifiP2pDevice will be set "00:00:00:00:00:00", - * if ohos.permission.GET_WIFI_LOCAL_MAC is not granted. - * @permission ohos.permission.GET_WIFI_INFO - * @param { AsyncCallback } callback - Indicates callback of function. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.P2P - * @since 20 - * @arkts 1.2 - */ - function getP2pLocalDeviceWithCallback(callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload getP2pLocalDevice { getP2pLocalDeviceReturnsPromise, getP2pLocalDeviceWithCallback }; - /** * Create a P2P group. * @permission ohos.permission.GET_WIFI_INFO @@ -1869,21 +1576,6 @@ declare namespace wifiManager { */ function getP2pGroups(): Promise>; - /** - * Obtain information about the groups. - * @permission ohos.permission.GET_WIFI_INFO - * @returns { Promise> } Returns the information about own device info. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @syscap SystemCapability.Communication.WiFi.P2P - * @systemapi Hide this for inner system use. - * @since 20 - * @arkts 1.2 - */ - function getP2pGroupsReturnsPromise(): Promise>; - /** * Obtain information about the groups. * @permission ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION @@ -1912,28 +1604,6 @@ declare namespace wifiManager { */ function getP2pGroups(callback: AsyncCallback>): void; - /** - * Obtain information about the groups. - * @permission ohos.permission.GET_WIFI_INFO - * @param { AsyncCallback> } callback - Indicates callback of function. - * @throws {BusinessError} 201 - Permission denied. - * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. - * @throws {BusinessError} 801 - Capability not supported. - * @throws {BusinessError} 2801000 - Operation failed. - * @throws {BusinessError} 2801001 - Wi-Fi STA disabled. - * @syscap SystemCapability.Communication.WiFi.P2P - * @systemapi Hide this for inner system use. - * @since 20 - * @arkts 1.2 - */ - function getP2pGroupsWithCallback(callback: AsyncCallback>): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload getP2pGroups { getP2pGroupsReturnsPromise, getP2pGroupsWithCallback }; - /** * Set the name of the Wi-Fi P2P device. * @permission ohos.permission.SET_WIFI_INFO and ohos.permission.MANAGE_WIFI_CONNECTION -- Gitee From a9d472ab6e3b1897804a4f85715754482690645f Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Wed, 27 Aug 2025 11:02:12 +0800 Subject: [PATCH 7/8] fix wifideviceconfig.netId Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index 3a1464a350..57ffd86261 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -3056,7 +3056,6 @@ declare namespace wifiManager { * Allocated networkId * @type { ?int } * @syscap SystemCapability.Communication.WiFi.STA - * @systemapi Hide this for inner system use. * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ -- Gitee From cbb855cf71ca180ea5d0bc874582f6cd7af69335 Mon Sep 17 00:00:00 2001 From: Mxj_sgsg Date: Wed, 27 Aug 2025 17:07:17 +0800 Subject: [PATCH 8/8] fix return bug Signed-off-by: Mxj_sgsg --- api/@ohos.wifiManager.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.wifiManager.d.ts b/api/@ohos.wifiManager.d.ts index 57ffd86261..c448b40839 100644 --- a/api/@ohos.wifiManager.d.ts +++ b/api/@ohos.wifiManager.d.ts @@ -1222,7 +1222,7 @@ declare namespace wifiManager { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function addHotspotBlockList(stationInfo: StationInfo); + function addHotspotBlockList(stationInfo: StationInfo): void; /** * Delete the station from block list, the station can access the hotspot. @@ -1239,7 +1239,7 @@ declare namespace wifiManager { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function delHotspotBlockList(stationInfo: StationInfo); + function delHotspotBlockList(stationInfo: StationInfo): void; /** * Get all the stations in the block list. If does't have the permission of ohos.permission.GET_WIFI_PEERS_MAC, return random bssid. -- Gitee