Merge pull request !2836 from liuyuanyuan66/OpenHarmony-5.0-Release
This commit is contained in:
openharmony_ci 2024-09-03 01:58:34 +00:00 committed by Gitee
commit 6033e89ab3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 17 additions and 0 deletions

View File

@ -244,6 +244,12 @@ enum class WifiChannelWidthJs {
WIDTH_INVALID,
};
enum class WifiCategoryJs {
DEFAULT = 1,
WIFI6 = 2,
WIFI6_PLUS = 3
};
enum class WifiStandardJs {
WIFI_STANDARD_UNDEFINED = 0,
WIFI_STANDARD_11A = 1,

View File

@ -180,6 +180,15 @@ static napi_value WifiChannelWidthInit(napi_env env)
static_cast<int>(WifiChannelWidthJs::WIDTH_INVALID), "WIDTH_INVALID");
return wifiChannelWidth;
}
static napi_value WifiCategoryInit(napi_env env)
{
napi_value wifiCategory = nullptr;
napi_create_object(env, &wifiCategory);
SetNamedPropertyByInteger(env, wifiCategory, static_cast<int>(WifiCategoryJs::DEFAULT), "DEFAULT");
SetNamedPropertyByInteger(env, wifiCategory, static_cast<int>(WifiCategoryJs::WIFI6), "WIFI6");
SetNamedPropertyByInteger(env, wifiCategory, static_cast<int>(WifiCategoryJs::WIFI6_PLUS), "WIFI6_PLUS");
return wifiCategory;
}
static napi_value WifiStandardInit(napi_env env)
{
napi_value wifiStandard = nullptr;
@ -272,6 +281,7 @@ static napi_value PropertyValueInit(napi_env env, napi_value exports)
napi_value bandTypeObj = WifiBandTypeInit(env);
napi_value proxyMethodObj = ProxyMethodInit(env);
napi_value wapiPskTypeObj = WapiPskTypeInit(env);
napi_value wifiCategoryObj = WifiCategoryInit(env);
#endif
napi_property_descriptor exportFuncs[] = {
#ifdef ENABLE_NAPI_WIFI_MANAGER
@ -282,6 +292,7 @@ static napi_value PropertyValueInit(napi_env env, napi_value exports)
DECLARE_NAPI_PROPERTY("WifiBandType", bandTypeObj),
DECLARE_NAPI_PROPERTY("ProxyMethod", proxyMethodObj),
DECLARE_NAPI_PROPERTY("WapiPskType", wapiPskTypeObj),
DECLARE_NAPI_PROPERTY("WifiCategory", wifiCategoryObj),
#endif
DECLARE_NAPI_PROPERTY("SuppState", suppStateObj),
DECLARE_NAPI_PROPERTY("WifiSecurityType", securityTypeObj),