Searched refs:netQuotaPolicy (Results 1 - 5 of 5) sorted by relevance
/foundation/communication/netmanager_base/test/fuzztest/netpolicyclient_fuzzer/ |
H A D | net_policy_client_fuzzer.cpp | 224 NetQuotaPolicy netQuotaPolicy; in SetCellularPoliciesFuzzTest() local 225 netQuotaPolicy.networkmatchrule.netType = NetPolicyGetData<uint32_t>() % CREATE_NET_TYPE_VALUE; in SetCellularPoliciesFuzzTest() 227 netQuotaPolicy.networkmatchrule.simId = NetPolicyGetString(STR_LEN); in SetCellularPoliciesFuzzTest() 228 netQuotaPolicy.networkmatchrule.ident = NetPolicyGetString(STR_LEN); in SetCellularPoliciesFuzzTest() 229 netQuotaPolicy.quotapolicy.periodStartTime = NetPolicyGetData<int64_t>(); in SetCellularPoliciesFuzzTest() 230 netQuotaPolicy.quotapolicy.periodDuration = NetPolicyGetString(STR_LEN); in SetCellularPoliciesFuzzTest() 232 netQuotaPolicy.quotapolicy.warningBytes = NetPolicyGetData<int64_t>(); in SetCellularPoliciesFuzzTest() 233 netQuotaPolicy.quotapolicy.limitBytes = NetPolicyGetData<int64_t>(); in SetCellularPoliciesFuzzTest() 234 netQuotaPolicy.quotapolicy.metered = NetPolicyGetData<uint32_t>() % CONVERT_NUMBER_TO_BOOL == 0; in SetCellularPoliciesFuzzTest() 235 netQuotaPolicy in SetCellularPoliciesFuzzTest() 308 NetQuotaPolicy netQuotaPolicy; SetNetQuotaPoliciesFuzzTest() local [all...] |
/foundation/communication/netmanager_base/frameworks/js/napi/netpolicy/src/ |
H A D | netpolicy_exec.cpp | 293 void NetPolicyExec::FillNetWorkMatchRule(napi_env env, napi_value elementObject, const NetQuotaPolicy &netQuotaPolicy) in FillNetWorkMatchRule() argument 296 NapiUtils::SetInt32Property(env, netWorkMatchRule, "netType", netQuotaPolicy.networkmatchrule.netType); in FillNetWorkMatchRule() 297 NapiUtils::SetStringPropertyUtf8(env, netWorkMatchRule, "simId", netQuotaPolicy.networkmatchrule.simId); in FillNetWorkMatchRule() 298 NapiUtils::SetStringPropertyUtf8(env, netWorkMatchRule, "identity", netQuotaPolicy.networkmatchrule.ident); in FillNetWorkMatchRule() 302 void NetPolicyExec::FillQuotaPolicy(napi_env env, napi_value elementObject, const NetQuotaPolicy &netQuotaPolicy) in FillQuotaPolicy() argument 305 NapiUtils::SetStringPropertyUtf8(env, quotaPolicy, "periodDuration", netQuotaPolicy.quotapolicy.periodDuration); in FillQuotaPolicy() 306 NapiUtils::SetInt64Property(env, quotaPolicy, "warningBytes", netQuotaPolicy.quotapolicy.warningBytes); in FillQuotaPolicy() 307 NapiUtils::SetInt64Property(env, quotaPolicy, "limitBytes", netQuotaPolicy.quotapolicy.limitBytes); in FillQuotaPolicy() 308 NapiUtils::SetInt64Property(env, quotaPolicy, "lastWarningRemind", netQuotaPolicy.quotapolicy.lastWarningRemind); in FillQuotaPolicy() 309 NapiUtils::SetInt64Property(env, quotaPolicy, "lastLimitRemind", netQuotaPolicy in FillQuotaPolicy() [all...] |
/foundation/communication/netmanager_base/test/netpolicymanager/unittest/net_policy_manager_test/ |
H A D | ut_net_quota_policy.cpp | 88 NetQuotaPolicy netQuotaPolicy = GetQuota(); in HWTEST_F() local 89 bool ret = netQuotaPolicy.Marshalling(parcel); in HWTEST_F() 94 EXPECT_EQ(recv1.networkmatchrule.simId, netQuotaPolicy.networkmatchrule.simId); in HWTEST_F() 95 EXPECT_EQ(recv1.networkmatchrule.ident, netQuotaPolicy.networkmatchrule.ident); in HWTEST_F()
|
/foundation/communication/netmanager_base/frameworks/js/napi/netpolicy/include/ |
H A D | netpolicy_exec.h | 81 static napi_value CreateNetQuotaPolicy(napi_env env, const NetQuotaPolicy &netQuotaPolicy); 83 const NetQuotaPolicy &netQuotaPolicy); 84 static void FillQuotaPolicy(napi_env env, napi_value elementObject, const NetQuotaPolicy &netQuotaPolicy);
|
/foundation/communication/netmanager_base/services/netpolicymanager/src/core/ |
H A D | net_policy_file.cpp | 141 cJSON *netQuotaPolicy = cJSON_GetObjectItem(root, CONFIG_QUOTA_POLICY); in ParseQuotaPolicy() local 142 if (netQuotaPolicy == nullptr) { in ParseQuotaPolicy() 146 uint32_t size = cJSON_GetArraySize(netQuotaPolicy); in ParseQuotaPolicy() 147 NETMGR_LOG_D("netQuotaPolicy size: %{public}u", size); in ParseQuotaPolicy() 149 cJSON *quotaPolicyItem = cJSON_GetArrayItem(netQuotaPolicy, i); in ParseQuotaPolicy()
|
Completed in 4 milliseconds