Home
last modified time | relevance | path

Searched refs:metered (Results 1 - 25 of 36) sorted by relevance

12

/foundation/communication/netmanager_base/services/netpolicymanager/src/common/
H A Dnet_policy_service_common.cpp27 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 Dut_net_policy_service_common.cpp65 bool metered = true; in HWTEST_F() local
67 auto ret = instance_->IsUidNetAllowed(uid, metered); in HWTEST_F()
H A Dnet_policy_exception_service_test.cpp51 bool metered = false; in HWTEST_F() local
53 int32_t ret = DelayedSingleton<NetPolicyService>::GetInstance()->IsUidNetAllowed(uit, metered, isAllowed); in HWTEST_F()
H A Dut_net_policy_traffic.cpp82 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 Dut_net_policy_callback.cpp143 quotaPolicy1.quotapolicy.metered = true; in SetFirstNetQuotaPolicy()
158 quotaPolicy2.quotapolicy.metered = true; in SetSecondNetQuotaPolicy()
/foundation/communication/netmanager_base/services/common/src/
H A Dnet_manager_center.cpp169 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 Dnet_quota_policy.cpp53 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 Dnet_manager_center.h58 bool IsUidNetAccess(uint32_t uid, bool metered);
59 bool IsUidNetAllowed(uint32_t uid, bool metered);
H A Dnet_policy_base_service.h25 virtual bool IsUidNetAllowed(uint32_t uid, bool metered) = 0;
/foundation/communication/netmanager_base/services/netpolicymanager/include/
H A Dnet_policy_service_common.h33 * 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 Dnet_policy_file.h166 quotaPolicy.quotapolicy.metered = CommonUtils::StrToBool(netPolicyQuota.metered, false); in ToQuotaPolicy()
H A Dnet_policy_inner_define.h60 constexpr const char *CONFIG_QUOTA_POLICY_METERED = "metered";
95 std::string metered; member
H A Dnet_policy_rule.h64 * 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 Dnet_policy_file.cpp168 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 Dnet_policy_traffic.cpp122 // 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 Dnet_policy_rule.cpp244 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 Dut_net_policy_traffic.cpp82 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 Dut_net_policy_callback.cpp143 quotaPolicy1.quotapolicy.metered = true; in SetFirstNetQuotaPolicy()
158 quotaPolicy2.quotapolicy.metered = true; in SetSecondNetQuotaPolicy()
/foundation/communication/netmanager_base/test/fuzztest/common_fuzzer/
H A Dcommon_fuzzer.cpp267 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 Dnet_quota_policy.h65 /* Is metered network or not */
66 bool metered = false; member
H A Di_net_policy_service.h65 * 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 Dnet_policy_service_proxy.h34 int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) override;
/foundation/communication/netmanager_base/test/fuzztest/netpolicyclient_fuzzer/
H A Dnet_policy_client_fuzzer.cpp234 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 Dnet_policy_service.cpp155 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 Dset_net_quota_policies_context.cpp41 data.quotapolicy.metered = NapiUtils::GetBooleanProperty(env, quotaPolicy, "metered"); in ReadQuotaPolicy()

Completed in 12 milliseconds

12