/foundation/communication/netmanager_base/services/netpolicymanager/src/common/ |
H A D | net_policy_service_common.cpp | 27 bool NetPolicyServiceCommon::IsUidNetAllowed(uint32_t uid, bool metered) in IsUidNetAllowed() argument 30 DelayedSingleton<NetPolicyService>::GetInstance()->IsUidNetAllowed(uid, metered, isAllowed); in IsUidNetAllowed()
|
/foundation/communication/netmanager_base/test/netpolicymanager/unittest/net_policy_manager_test/ |
H A D | ut_net_policy_service_common.cpp | 65 bool metered = true; in HWTEST_F() local 67 auto ret = instance_->IsUidNetAllowed(uid, metered); in HWTEST_F()
|
H A D | net_policy_exception_service_test.cpp | 51 bool metered = false; in HWTEST_F() local 53 int32_t ret = DelayedSingleton<NetPolicyService>::GetInstance()->IsUidNetAllowed(uit, metered, isAllowed); in HWTEST_F()
|
H A D | ut_net_policy_traffic.cpp | 82 quotaPolicy1.quotapolicy.metered = true; in SetUp() 93 quotaPolicy2.quotapolicy.metered = true; in SetUp() 122 quotaPolicy1.quotapolicy.metered = 0; in HWTEST_F() 132 quotaPolicy2.quotapolicy.metered = 0; in HWTEST_F() 268 quotaPolicy.quotapolicy.lastLimitRemind == REMIND_NEVER && !quotaPolicy.quotapolicy.metered) { in HWTEST_F() 340 quotaPolicy.quotapolicy.metered = true; in HWTEST_F() 343 quotaPolicy.quotapolicy.metered = false; in HWTEST_F() 365 quotaPolicy.quotapolicy.metered = false; in HWTEST_F()
|
H A D | ut_net_policy_callback.cpp | 143 quotaPolicy1.quotapolicy.metered = true; in SetFirstNetQuotaPolicy() 158 quotaPolicy2.quotapolicy.metered = true; in SetSecondNetQuotaPolicy()
|
/foundation/communication/netmanager_base/services/common/src/ |
H A D | net_manager_center.cpp | 169 bool NetManagerCenter::IsUidNetAccess(uint32_t uid, bool metered) in IsUidNetAccess() argument 174 return IsUidNetAllowed(uid, metered); in IsUidNetAccess() 177 bool NetManagerCenter::IsUidNetAllowed(uint32_t uid, bool metered) in IsUidNetAllowed() argument 182 return policyService_->IsUidNetAllowed(uid, metered); in IsUidNetAllowed()
|
/foundation/communication/netmanager_base/frameworks/native/netpolicyclient/src/ |
H A D | net_quota_policy.cpp | 53 if (!parcel.WriteBool(quotapolicy.metered)) { in Marshalling() 112 if (!parcel.ReadBool(quotaPolicy.quotapolicy.metered)) { in Unmarshalling() 159 if (!parcel.ReadBool(quotaPolicyTmp.quotapolicy.metered)) { in Unmarshalling() 228 quotapolicy.metered = false; in Reset()
|
/foundation/communication/netmanager_base/services/common/include/ |
H A D | net_manager_center.h | 58 bool IsUidNetAccess(uint32_t uid, bool metered); 59 bool IsUidNetAllowed(uint32_t uid, bool metered);
|
H A D | net_policy_base_service.h | 25 virtual bool IsUidNetAllowed(uint32_t uid, bool metered) = 0;
|
/foundation/communication/netmanager_base/services/netpolicymanager/include/ |
H A D | net_policy_service_common.h | 33 * Get the status whether the specified uid app can access the metered network or non-metered network. 36 * @param metered Indicates metered network or non-metered network. 39 bool IsUidNetAllowed(uint32_t uid, bool metered) override;
|
H A D | net_policy_file.h | 166 quotaPolicy.quotapolicy.metered = CommonUtils::StrToBool(netPolicyQuota.metered, false); in ToQuotaPolicy()
|
H A D | net_policy_inner_define.h | 60 constexpr const char *CONFIG_QUOTA_POLICY_METERED = "metered"; 95 std::string metered; member
|
H A D | net_policy_rule.h | 64 * Get the status whether the specified uid app can access the metered network or non-metered network. 67 * @param metered Indicates meterd network or non-metered network. 74 int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed);
|
/foundation/communication/netmanager_base/services/netpolicymanager/src/core/ |
H A D | net_policy_file.cpp | 168 cJSON *metered = cJSON_GetObjectItem(quotaPolicyItem, CONFIG_QUOTA_POLICY_METERED); in ParseQuotaPolicy() local 169 quotaPolicy.metered = cJSON_GetStringValue(metered); in ParseQuotaPolicy() 173 warningBytes:%{public}s, limitBytes:%{public}s, lastLimitSnooze:%{public}s, metered:%{public}s", in ParseQuotaPolicy() 176 quotaPolicy.limitBytes.c_str(), quotaPolicy.lastLimitSnooze.c_str(), quotaPolicy.metered.c_str()); in ParseQuotaPolicy() 298 cJSON_CreateString(netPolicy_.netQuotaPolicies[i].metered.c_str())); in AddQuotaPolicy() 434 netPolicy_.netQuotaPolicies[i].metered = std::to_string(quotaPolicy.quotapolicy.metered); in UpdateQuotaPolicyExist() 461 quotaPolicy.metered = std::to_string(quotaPolicies[i].quotapolicy.metered); in WriteQuotaPolicies() [all...] |
H A D | net_policy_traffic.cpp | 122 // calculate the quota remain and get the metered ifaces in UpdateQuotaPoliciesInner() 127 // update the metered ifaces and notify the changes. in UpdateQuotaPoliciesInner() 180 // set quota for metered iface. in UpdateMeteredIfacesQuota() 181 if (iface == UNKNOW_IFACE || !quotaPolicy.quotapolicy.metered) { in UpdateMeteredIfacesQuota() 190 // remove the iface quota that not metered. in UpdateMeteredIfacesQuota() 207 // notify the callback of metered ifaces changed. in UpdateMeteredIfaces() 258 if (hasLimit || quotaPolicy.quotapolicy.metered) { in GetQuotaRemain() 271 NETMGR_LOG_D("UpdateNetEnableStatus metered[%{public}d] quotapolicy.limitAction[%{public}d]", in UpdateNetEnableStatus() 272 quotaPolicy.quotapolicy.metered, quotaPolicy.quotapolicy.limitAction); in UpdateNetEnableStatus() 273 if (quotaPolicy.quotapolicy.metered || quotaPolic in UpdateNetEnableStatus() [all...] |
H A D | net_policy_rule.cpp | 244 int32_t NetPolicyRule::IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) in IsUidNetAllowed() argument 246 NETMGR_LOG_D("IsUidNetAllowed:uid[%{public}u] metered:[%{public}d]", uid, metered); in IsUidNetAllowed() 258 if (!metered) { in IsUidNetAllowed()
|
/foundation/communication/netmanager_ext/test/vpnmanager/unittest/conn_vpn_manager_test/ |
H A D | ut_net_policy_traffic.cpp | 82 quotaPolicy1.quotapolicy.metered = true; in SetUp() 93 quotaPolicy2.quotapolicy.metered = true; in SetUp() 122 quotaPolicy1.quotapolicy.metered = 0; in HWTEST_F() 132 quotaPolicy2.quotapolicy.metered = 0; in HWTEST_F() 268 quotaPolicy.quotapolicy.lastLimitRemind == REMIND_NEVER && !quotaPolicy.quotapolicy.metered) { in HWTEST_F() 340 quotaPolicy.quotapolicy.metered = true; in HWTEST_F() 343 quotaPolicy.quotapolicy.metered = false; in HWTEST_F() 365 quotaPolicy.quotapolicy.metered = false; in HWTEST_F()
|
H A D | ut_net_policy_callback.cpp | 143 quotaPolicy1.quotapolicy.metered = true; in SetFirstNetQuotaPolicy() 158 quotaPolicy2.quotapolicy.metered = true; in SetSecondNetQuotaPolicy()
|
/foundation/communication/netmanager_base/test/fuzztest/common_fuzzer/ |
H A D | common_fuzzer.cpp | 267 bool metered = NetCommonGetData<uint32_t>() % CONVERT_NUMBER_TO_BOOL == 0; in IsUidNetAccessFuzzTest() local 268 g_netManagerCenter->IsUidNetAccess(uid, metered); in IsUidNetAccessFuzzTest() 277 bool metered = NetCommonGetData<uint32_t>() % CONVERT_NUMBER_TO_BOOL == 0; in IsUidNetAllowedFuzzTest() local 278 g_netManagerCenter->IsUidNetAllowed(uid, metered); in IsUidNetAllowedFuzzTest()
|
/foundation/communication/netmanager_base/interfaces/innerkits/netpolicyclient/include/ |
H A D | net_quota_policy.h | 65 /* Is metered network or not */ 66 bool metered = false; member
|
H A D | i_net_policy_service.h | 65 * Get the status whether the specified uid app can access the metered network or non-metered network. 68 * @param metered Indicates metered network or non-metered network. 73 virtual int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) = 0;
|
H A D | net_policy_service_proxy.h | 34 int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) override;
|
/foundation/communication/netmanager_base/test/fuzztest/netpolicyclient_fuzzer/ |
H A D | net_policy_client_fuzzer.cpp | 234 netQuotaPolicy.quotapolicy.metered = NetPolicyGetData<uint32_t>() % CONVERT_NUMBER_TO_BOOL == 0; in SetCellularPoliciesFuzzTest() 318 netQuotaPolicy.quotapolicy.metered = NetPolicyGetData<uint32_t>() % CONVERT_NUMBER_TO_BOOL == 0; in SetNetQuotaPoliciesFuzzTest() 336 bool metered = uid % CONVERT_NUMBER_TO_BOOL == 0; in IsUidNetAllowedFuzzTest() local 339 dataParcel.WriteBool(metered); in IsUidNetAllowedFuzzTest()
|
/foundation/communication/netmanager_base/services/netpolicymanager/src/ |
H A D | net_policy_service.cpp | 155 int32_t NetPolicyService::IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) in IsUidNetAllowed() argument 157 NETMGR_LOG_I("IsUidNetAllowed uid[%{public}d metered[%{public}d]", uid, metered); in IsUidNetAllowed() 163 return netPolicyRule_->IsUidNetAllowed(uid, metered, isAllowed); in IsUidNetAllowed()
|
/foundation/communication/netmanager_base/frameworks/js/napi/netpolicy/src/ |
H A D | set_net_quota_policies_context.cpp | 41 data.quotapolicy.metered = NapiUtils::GetBooleanProperty(env, quotaPolicy, "metered"); in ReadQuotaPolicy()
|