/foundation/window/window_manager/window_scene/test/dms_unittest/ |
H A D | single_display_pocket_fold_policy_test.cpp | 69 SingleDisplayPocketFoldPolicy policy(displayInfoMutex, screenPowerTaskScheduler); in HWTEST_F() 72 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 73 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 76 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 77 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 80 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 81 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 84 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 85 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 97 SingleDisplayPocketFoldPolicy policy(displayInfoMute in HWTEST_F() [all...] |
H A D | single_display_fold_policy_test.cpp | 64 SingleDisplayFoldPolicy policy(displayInfoMutex, screenPowerTaskScheduler); in HWTEST_F() 67 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 68 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 71 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 72 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 75 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 76 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 79 policy.ChangeScreenDisplayMode(displayMode); in HWTEST_F() 80 EXPECT_FALSE(policy.onBootAnimation_); in HWTEST_F() 92 SingleDisplayFoldPolicy policy(displayInfoMute in HWTEST_F() [all...] |
/foundation/communication/netmanager_ext/services/netfirewallmanager/src/ |
H A D | netfirewall_policy_manager.cpp | 45 int32_t NetFirewallPolicyManager::SetNetFirewallPolicy(const int32_t userId, const sptr<NetFirewallPolicy> &policy) in SetNetFirewallPolicy() argument 47 if (policy == nullptr) { in SetNetFirewallPolicy() 48 NETMGR_EXT_LOG_E("SetNetFirewallPolicy failed, policy is nullptr."); in SetNetFirewallPolicy() 57 preferencesHelper_->SaveBool(NET_FIREWALL_IS_OPEN, policy->isOpen); in SetNetFirewallPolicy() 58 preferencesHelper_->SaveInt(NET_FIREWALL_IN_ACTION, static_cast<int>(policy->inAction)); in SetNetFirewallPolicy() 59 preferencesHelper_->SaveInt(NET_FIREWALL_OUT_ACTION, static_cast<int>(policy->outAction)); in SetNetFirewallPolicy() 64 int32_t NetFirewallPolicyManager::GetNetFirewallPolicy(const int32_t userId, sptr<NetFirewallPolicy> &policy) in GetNetFirewallPolicy() argument 66 if (policy == nullptr) { in GetNetFirewallPolicy() 67 NETMGR_EXT_LOG_E("GetNetFirewallPolicy failed, policy is nullptr."); in GetNetFirewallPolicy() 72 policy in GetNetFirewallPolicy() 82 IsFirewallStatusChange(const sptr<NetFirewallPolicy> &policy) IsFirewallStatusChange() argument 89 IsFirewallActionChange(const sptr<NetFirewallPolicy> &policy) IsFirewallActionChange() argument 97 SetCurrentUserFirewallPolicy(const sptr<NetFirewallPolicy> &policy) SetCurrentUserFirewallPolicy() argument 110 GetCurrentNetFirewallPolicy(sptr<NetFirewallPolicy> &policy) GetCurrentNetFirewallPolicy() argument 210 LoadPolicyFormPreference(const int32_t userId, sptr<NetFirewallPolicy> &policy) LoadPolicyFormPreference() argument [all...] |
/foundation/resourceschedule/resource_schedule_service/ressched/plugins/cgroup_sched_plugin/framework/process_group/src/ |
H A D | cgroup_action.cpp | 67 void CgroupAction::AddSchedPolicyDeclaration(const SchedPolicy policy, in AddSchedPolicyDeclaration() argument 73 __func__, policy, fullName.c_str(), abbrName.c_str()); in AddSchedPolicyDeclaration() 76 if (policy >= SP_UPPER_LIMIT) { in AddSchedPolicyDeclaration() 78 __func__, policy, fullName.c_str(), abbrName.c_str()); in AddSchedPolicyDeclaration() 84 if (fullNames_.find(policy) != fullNames_.end()) { in AddSchedPolicyDeclaration() 91 PGCGS_LOGI("%{public}s add sched policy: %{public}u, %{public}s, %{public}s", in AddSchedPolicyDeclaration() 92 __func__, policy, fullName.c_str(), abbrName.c_str()); in AddSchedPolicyDeclaration() 93 fullNames_[policy] = fullName; in AddSchedPolicyDeclaration() 94 abbrNames_[policy] = abbrName; in AddSchedPolicyDeclaration() 106 bool CgroupAction::IsSchedPolicyValid(SchedPolicy policy) in IsSchedPolicyValid() argument 112 GetSchedPolicyFullName(SchedPolicy policy) GetSchedPolicyFullName() argument 121 GetSchedPolicyAbbrName(SchedPolicy policy) GetSchedPolicyAbbrName() argument 130 SetThreadSchedPolicy(int tid, SchedPolicy policy) SetThreadSchedPolicy() argument 141 SetThreadGroupSchedPolicy(int tid, SchedPolicy policy) SetThreadGroupSchedPolicy() argument 152 SetSchedPolicyByExecutor(int tid, int policy, uint32_t resType) SetSchedPolicyByExecutor() argument 190 GetSchedPolicy(int tid, SchedPolicy* policy) GetSchedPolicy() argument 222 GetSchedPolicyByName(const std::string& name, SchedPolicy* policy) GetSchedPolicyByName() argument [all...] |
H A D | sched_policy.cpp | 28 int SetThreadSchedPolicy(int tid, int policy) in SetThreadSchedPolicy() argument 36 SchedPolicy schedPolicy = SchedPolicy(policy); in SetThreadSchedPolicy() 39 ret = CgroupAction::GetInstance().SetSchedPolicyByExecutor(tid, policy, in SetThreadSchedPolicy() 45 int SetThreadGroupSchedPolicy(int pid, int policy) in SetThreadGroupSchedPolicy() argument 53 SchedPolicy schedPolicy = SchedPolicy(policy); in SetThreadGroupSchedPolicy() 56 ret = CgroupAction::GetInstance().SetSchedPolicyByExecutor(pid, policy, in SetThreadGroupSchedPolicy() 62 int GetThreadSchedPolicy(int tid, SchedPolicy* policy) in GetThreadSchedPolicy() argument 70 return CgroupAction::GetInstance().GetSchedPolicy(tid, policy); in GetThreadSchedPolicy() 73 int GetSchedPolicyByName(const std::string& name, SchedPolicy* policy) in GetSchedPolicyByName() argument 75 return CgroupAction::GetInstance().GetSchedPolicyByName(name, policy); in GetSchedPolicyByName() 78 GetSchedPolicyShortenedName(SchedPolicy policy) GetSchedPolicyShortenedName() argument 83 GetSchedPolicyFullName(SchedPolicy policy) GetSchedPolicyFullName() argument 88 AddSchedPolicyDeclaration(SchedPolicy policy, const std::string& fullName, const std::string& abbrName) AddSchedPolicyDeclaration() argument [all...] |
H A D | cgroup_controller.cpp | 38 for (SchedPolicy policy : policyList) { in CgroupController() 39 policyToTaskFd_[policy] = -1; in CgroupController() 40 policyToProcFd_[policy] = -1; in CgroupController() 82 bool CgroupController::SetThreadSchedPolicy(int tid, SchedPolicy policy, bool isSetThreadGroup) in SetThreadSchedPolicy() argument 84 int fd = (isSetThreadGroup ? policyToProcFd_[policy] : policyToTaskFd_[policy]); in SetThreadSchedPolicy() 111 bool CgroupController::AddSchedPolicy(SchedPolicy policy, const std::string& subgroup) in AddSchedPolicy() argument 113 return AddThreadSchedPolicy(policy, subgroup) && AddThreadGroupSchedPolicy(policy, subgroup); in AddSchedPolicy() 138 bool CgroupController::AddThreadSchedPolicy(SchedPolicy policy, cons argument 160 AddThreadGroupSchedPolicy(SchedPolicy policy, const std::string& subgroup) AddThreadGroupSchedPolicy() argument [all...] |
/foundation/resourceschedule/resource_schedule_service/ressched/plugins/cgroup_sched_plugin/test/unittest/ |
H A D | process_group_test.cpp | 25 static bool CovertSchedPolicyStringToEnumType(char* policyStr, SchedPolicy* policy) in CovertSchedPolicyStringToEnumType() argument 34 *policy = policyItem; in CovertSchedPolicyStringToEnumType() 46 SchedPolicy policy; in SetThreadSchedPolicyTest() local 47 if (!CovertSchedPolicyStringToEnumType(policyStr, &policy)) { in SetThreadSchedPolicyTest() 50 if (SetThreadSchedPolicy(tid, policy) == 0) { in SetThreadSchedPolicyTest() 51 std::cout << "Set thread tid = << "<< tid << " SolicyPolicy = "<< policy << "ok." << std::endl; in SetThreadSchedPolicyTest() 61 SchedPolicy policy; in SetThreadGroupSchedPolicyTest() local 62 if (!CovertSchedPolicyStringToEnumType(policyStr, &policy)) { in SetThreadGroupSchedPolicyTest() 65 if (SetThreadGroupSchedPolicy(pid, policy) == 0) { in SetThreadGroupSchedPolicyTest() 66 std::cout << "Set thread group pid = << "<< pid << " SolicyPolicy = "<< policy << "o in SetThreadGroupSchedPolicyTest() 75 SchedPolicy policy; GetThreadSchedPolicyTest() local 77 std::cout << "Get the SolicyPolicy of thread tid = " << tid << " is " << policy << "\\n"; GetThreadSchedPolicyTest() local 89 SchedPolicy policy = static_cast<SchedPolicy>(policyNum); GetSchedPolicyShortenedNameTest() local 102 SchedPolicy policy = static_cast<SchedPolicy>(policyNum); GetSchedPolicyFullNameTest() local [all...] |
/foundation/communication/netmanager_base/services/netpolicymanager/src/core/ |
H A D | net_policy_rule.cpp | 27 // Init uid、policy and background allow status from file,and save uid、policy into uidPolicyRules_. in Init() 28 NETMGR_LOG_I("Start init uid and policy."); in Init() 33 auto policy = CommonUtils::StrToUint(i.policy.c_str()); in Init() local 34 uidPolicyRules_[uid] = {.policy_ = policy}; in Init() 35 TransPolicyToRule(uid, policy); in Init() 42 for (const auto &[uid, policy] : uidPolicyRules_) { in TransPolicyToRule() 43 TransPolicyToRule(uid, policy.policy_); in TransPolicyToRule() 49 uint32_t policy in TransPolicyToRule() local 61 TransPolicyToRule(uint32_t uid, uint32_t policy) TransPolicyToRule() argument 88 BuildTransCondition(uint32_t uid, uint32_t policy) BuildTransCondition() argument 118 TransConditionToRuleAndNetsys(uint32_t policyCondition, uint32_t uid, uint32_t policy) TransConditionToRuleAndNetsys() argument 210 ChangePolicyToPolicyTransitionCondition(uint32_t policy) ChangePolicyToPolicyTransitionCondition() argument 218 GetPolicyByUid(uint32_t uid, uint32_t &policy) GetPolicyByUid() argument 230 GetUidsByPolicy(uint32_t policy, std::vector<uint32_t> &uids) GetUidsByPolicy() argument 305 uint32_t policy = 0; GetBackgroundPolicyByUid() local 440 IsValidNetPolicy(uint32_t policy) IsValidNetPolicy() argument 476 SetNetworkAccessPolicy(uint32_t uid, NetworkAccessPolicy policy, bool reconfirmFlag, bool isBroker) SetNetworkAccessPolicy() argument [all...] |
/foundation/filemanagement/app_file_service/tests/mock/file_permission_native/src/ |
H A D | sandbox_mock.cpp | 22 const std::vector<PolicyInfo> &policy, std::vector<bool> &result) in CheckPersistPolicy() 24 return SandboxManagerKitMock::sandboxManagerKitMock->CheckPersistPolicy(tokenId, policy, result); in CheckPersistPolicy() 27 int32_t SandboxManagerKit::PersistPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) in PersistPolicy() argument 29 return SandboxManagerKitMock::sandboxManagerKitMock->PersistPolicy(policy, result); in PersistPolicy() 32 int32_t SandboxManagerKit::UnPersistPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) in UnPersistPolicy() argument 34 return SandboxManagerKitMock::sandboxManagerKitMock->UnPersistPolicy(policy, result); in UnPersistPolicy() 37 int32_t SandboxManagerKit::StartAccessingPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) in StartAccessingPolicy() argument 39 return SandboxManagerKitMock::sandboxManagerKitMock->StartAccessingPolicy(policy, result); in StartAccessingPolicy() 42 int32_t SandboxManagerKit::StopAccessingPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) in StopAccessingPolicy() argument 44 return SandboxManagerKitMock::sandboxManagerKitMock->StopAccessingPolicy(policy, resul in StopAccessingPolicy() 21 CheckPersistPolicy(uint32_t tokenId, const std::vector<PolicyInfo> &policy, std::vector<bool> &result) CheckPersistPolicy() argument [all...] |
/foundation/resourceschedule/resource_schedule_service/ressched/plugins/cgroup_sched_plugin/framework/process_group/include/ |
H A D | cgroup_action.h | 35 void AddSchedPolicyDeclaration(SchedPolicy policy, const std::string& fullName, const std::string& abbrName); 37 const char* GetSchedPolicyFullName(SchedPolicy policy); 38 const char* GetSchedPolicyAbbrName(SchedPolicy policy); 40 bool SetThreadSchedPolicy(int tid, SchedPolicy policy); 41 bool SetThreadGroupSchedPolicy(int tid, SchedPolicy policy); 42 int SetSchedPolicyByExecutor(int tid, int policy, uint32_t resType); 43 int GetSchedPolicy(int tid, SchedPolicy* policy); 44 int GetSchedPolicyByName(const std::string& name, SchedPolicy* policy); 55 std::mutex mutex_; // for sched policy maps 62 bool IsSchedPolicyValid(SchedPolicy policy); [all...] |
H A D | sched_policy.h | 28 * Schedule policy define, keep in sync with 29 * (1) cgroup_controller.cpp: bool QuerySchedPolicyFullName(const std::string& name, SchedPolicy& policy); 30 * (2) sched_policy.cpp: const char* GetSchedPolicyShortenedName(SchedPolicy policy); 43 * Assign all threads in process pid to the cgroup associated with the specified policy. 48 * @param policy schedule policy. 51 int SetThreadGroupSchedPolicy(int pid, int policy); 54 * Assign thread tid to the cgroup associated with the specified policy. 61 * @param policy variable to accept return value. 64 int SetThreadSchedPolicy(int tid, int policy); [all...] |
/foundation/filemanagement/app_file_service/tests/mock/file_permission_native/include/ |
H A D | sandbox_mock.h | 30 const std::vector<PolicyInfo> &policy, 32 virtual int32_t PersistPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) = 0; 33 virtual int32_t UnPersistPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) = 0; 34 virtual int32_t StartAccessingPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) = 0; 35 virtual int32_t StopAccessingPolicy(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) = 0; 42 int32_t(uint32_t tokenId, const std::vector<PolicyInfo> &policy, std::vector<bool> &result)); 43 MOCK_METHOD2(PersistPolicy, int32_t(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result)); 44 MOCK_METHOD2(UnPersistPolicy, int32_t(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result)); 45 MOCK_METHOD2(StartAccessingPolicy, int32_t(const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result)); 46 MOCK_METHOD2(StopAccessingPolicy, int32_t(const std::vector<PolicyInfo> &policy, st [all...] |
/foundation/communication/netmanager_ext/services/netfirewallmanager/include/ |
H A D | netfirewall_policy_manager.h | 48 * @param policy The firewall policy to be set 51 int32_t SetNetFirewallPolicy(const int32_t userId, const sptr<NetFirewallPolicy> &policy); 54 * Query firewall policy 57 * @param policy Return to firewall policy 60 int32_t GetNetFirewallPolicy(const int32_t userId, sptr<NetFirewallPolicy> &policy); 63 * Query current user firewall policy 66 * @param policy Return to firewall policy [all...] |
/foundation/communication/ipc/ipc/native/src/core/source/ |
H A D | ipc_workthread.cpp | 45 int policy; member 65 void IPCWorkThread::JoinThread(int proto, int policy) in JoinThread() argument 69 switch (policy) { in JoinThread() 91 ZLOGE(LOG_LABEL, "invalid policy:%{public}d", policy); in JoinThread() 123 ZLOGI(LOG_LABEL, "proto:%{public}d policy:%{public}d name:%{public}s invoker:%{public}u", in ThreadHandler() 124 param->proto, param->policy, threadName.c_str(), ProcessSkeleton::ConvertAddr(invoker)); in ThreadHandler() 128 JoinThread(param->proto, param->policy); in ThreadHandler() 134 ZLOGI(LOG_LABEL, "exit, proto:%{public}d policy:%{public}d name:%{public}s invoker:%{public}u", in ThreadHandler() 135 param->proto, param->policy, threadNam in ThreadHandler() 148 Start(int policy, int proto, int threadIndex) Start() argument [all...] |
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/test/ |
H A D | store_meta_data_local_test.cpp | 110 auto policy = metaData.GetPolicy(type);
in HWTEST_F() local 111 EXPECT_EQ(policy.type, type);
in HWTEST_F() 112 metaData.policies.push_back(policy);
in HWTEST_F() 114 EXPECT_FALSE(policy.IsValueEffect());
in HWTEST_F() 116 policy = metaData.GetPolicy(type);
in HWTEST_F() 117 EXPECT_NE(policy.type, type);
in HWTEST_F() 118 policy.index = 1;
in HWTEST_F() 120 EXPECT_TRUE(policy.IsValueEffect());
in HWTEST_F() 122 policy = metaData.GetPolicy(type);
in HWTEST_F() 123 EXPECT_EQ(policy in HWTEST_F() [all...] |
/foundation/communication/netmanager_base/services/netpolicymanager/src/ |
H A D | net_access_policy_database.cpp | 105 int32_t NetAccessPolicyRDB::InsertData(NetAccessPolicyData policy) in InsertData() argument 115 policyValues.PutInt(NetAccessPolicyRdbFiledConst::FILED_UID, policy.uid); in InsertData() 116 policyValues.PutInt(NetAccessPolicyRdbFiledConst::FILED_WIFI_POLICY, policy.wifiPolicy); in InsertData() 117 policyValues.PutInt(NetAccessPolicyRdbFiledConst::FILED_CELLULAR_POLICY, policy.cellularPolicy); in InsertData() 118 policyValues.PutInt(NetAccessPolicyRdbFiledConst::FILED_SET_FROM_CONFIG_FLAG, policy.setFromConfigFlag); in InsertData() 119 policyValues.PutInt(NetAccessPolicyRdbFiledConst::FILED_IS_BROKER, policy.isBroker); in InsertData() 124 ret = UpdateByUid(policy.uid, policy); in InsertData() 156 int32_t NetAccessPolicyRDB::UpdateByUid(int32_t uid, NetAccessPolicyData policy) in UpdateByUid() argument 170 policyValues.PutInt(NetAccessPolicyRdbFiledConst::FILED_WIFI_POLICY, policy in UpdateByUid() 205 NetAccessPolicyData policy; QueryAll() local [all...] |
H A D | net_policy_service.cpp | 95 NETMGR_LOG_D("Start policy Dump, fd: %{public}d", fd); in Dump() 125 int32_t NetPolicyService::SetPolicyByUid(uint32_t uid, uint32_t policy) in SetPolicyByUid() argument 127 NETMGR_LOG_I("SetPolicyByUid uid[%{public}d] policy[%{public}d]", uid, policy); in SetPolicyByUid() 132 return netPolicyRule_->TransPolicyToRule(uid, policy); in SetPolicyByUid() 135 int32_t NetPolicyService::GetPolicyByUid(uint32_t uid, uint32_t &policy) in GetPolicyByUid() argument 142 return netPolicyRule_->GetPolicyByUid(uid, policy); in GetPolicyByUid() 145 int32_t NetPolicyService::GetUidsByPolicy(uint32_t policy, std::vector<uint32_t> &uids) in GetUidsByPolicy() argument 147 NETMGR_LOG_D("GetUidsByPolicy policy[%{public}d]", policy); in GetUidsByPolicy() 433 NetworkAccessPolicy policy; UpdateNetAccessPolicyToMapFromDB() local 442 SetNetworkAccessPolicy(uint32_t uid, NetworkAccessPolicy policy, bool reconfirmFlag) SetNetworkAccessPolicy() argument 463 GetNetworkAccessPolicy(AccessPolicyParameter parameter, AccessPolicySave &policy) GetNetworkAccessPolicy() argument [all...] |
/foundation/systemabilitymgr/samgr_lite/samgr_endpoint/source/ |
H A D | samgr_small_ipc_adapter.c | 29 static void GetRemotePolicy(IpcIo *reply, PolicyTrans **policy, uint32 *policyNum);
30 static boolean JudgePolicy(uid_t callingUid, const PolicyTrans *policy, uint32 policyNum);
31 static boolean SearchFixedPolicy(uid_t callingUid, PolicyTrans policy);
153 int ret = RegisterIdentity(&(router->saName), &identity, &(router->policy),
in RegisterRemoteFeatures() 164 int RegisterIdentity(const SaName *saName, SvcIdentity *saInfo, PolicyTrans **policy, uint32 *policyNum)
in RegisterIdentity() argument 193 GetRemotePolicy(&reply, policy, policyNum);
in RegisterIdentity() 241 !JudgePolicy(uid, (const PolicyTrans *)(router->policy), router->policyNum)) {
in HandleIpc() 249 static boolean JudgePolicy(uid_t callingUid, const PolicyTrans *policy, uint32 policyNum)
in JudgePolicy() argument 251 if (policy == NULL) {
in JudgePolicy() 257 if (policy[ in JudgePolicy() 266 SearchFixedPolicy(uid_t callingUid, PolicyTrans policy) SearchFixedPolicy() argument 322 GetRemotePolicy(IpcIo *reply, PolicyTrans **policy, uint32 *policyNum) GetRemotePolicy() argument [all...] |
H A D | endpoint.c | 63 PolicyTrans *policy;
member 75 static boolean JudgePolicy(uid_t callingUid, const PolicyTrans *policy, uint32 policyNum);
76 static boolean SearchFixedPolicy(uid_t callingUid, PolicyTrans policy);
78 const PolicyTrans *policy, uint32 policyNum);
81 PolicyTrans **policy, uint32 *policyNum);
82 static void GetRemotePolicy(IpcIo *reply, PolicyTrans **policy, uint32 *policyNum);
131 router->policy = NULL;
in SAMGR_AddRouter() 291 PolicyTrans *policy = NULL;
in SAMGR_ProcPolicy() local 293 ret = RegisterIdentity(endpoint->context, saName, &saInfo, &policy, &policyNum);
in SAMGR_ProcPolicy() 294 if (ret != EC_SUCCESS || policy in SAMGR_ProcPolicy() 319 AddPolicyToRouter(const Endpoint *endpoint, const SvcIdentity *saInfo, const PolicyTrans *policy, uint32 policyNum) AddPolicyToRouter() argument 491 RegisterIdentity(const IpcContext *context, const SaName *saName, SvcIdentity *saInfo, PolicyTrans **policy, uint32 *policyNum) RegisterIdentity() argument 619 GetRemotePolicy(IpcIo *reply, PolicyTrans **policy, uint32 *policyNum) GetRemotePolicy() argument 660 JudgePolicy(uid_t callingUid, const PolicyTrans *policy, uint32 policyNum) JudgePolicy() argument 679 SearchFixedPolicy(uid_t callingUid, PolicyTrans policy) SearchFixedPolicy() argument [all...] |
H A D | samgr_mini_ipc_adapter.c | 20 static void GetRemotePolicy(IpcIo *reply, PolicyTrans **policy, uint32 *policyNum);
87 int RegisterIdentity(const SaName *saName, SvcIdentity *saInfo, PolicyTrans **policy, uint32 *policyNum)
in RegisterIdentity() argument 115 GetRemotePolicy(&reply, policy, policyNum);
in RegisterIdentity() 135 static void GetRemotePolicy(IpcIo *reply, PolicyTrans **policy, uint32 *policyNum)
in GetRemotePolicy() argument 144 SAMGR_Free(*policy);
in GetRemotePolicy() 146 *policy = NULL;
in GetRemotePolicy() 149 *policy = (PolicyTrans *)SAMGR_Malloc(sizeof(PolicyTrans) * (*policyNum));
in GetRemotePolicy() 150 if (*policy == NULL) {
in GetRemotePolicy() 154 if (!ReadInt32(reply, &(*policy)[i].type)) {
in GetRemotePolicy() 157 switch ((*policy)[ in GetRemotePolicy() [all...] |
/foundation/communication/netmanager_base/test/netpolicymanager/unittest/net_access_policy_database_test/ |
H A D | net_access_policy_database_test.cpp | 59 NetAccessPolicyData policy; in HWTEST_F() local 60 policy.uid = 10000; in HWTEST_F() 61 policy.wifiPolicy = 64; in HWTEST_F() 63 auto ret = netAccessPolicy.InsertData(policy); in HWTEST_F() 70 NetAccessPolicyData policy; in HWTEST_F() local 71 policy.uid = uid; in HWTEST_F() 72 policy.wifiPolicy = 64; in HWTEST_F() 74 auto ret = netAccessPolicy.UpdateByUid(uid, policy); in HWTEST_F() 88 NetAccessPolicyData policy; in HWTEST_F() local 90 auto ret = netAccessPolicy.QueryByUid(uid, policy); in HWTEST_F() [all...] |
/foundation/multimedia/media_library/frameworks/services/media_multistages_capture/include/dfx/ |
H A D | multistages_capture_dfx_request_policy.h | 37 EXPORT void SetPolicy(const std::string &callingPackage, const RequestPolicy policy);
43 MultiStagesCaptureDfxRequestPolicy(const MultiStagesCaptureDfxRequestPolicy &policy) = delete;
member in OHOS::Media::MultiStagesCaptureDfxRequestPolicy 44 const MultiStagesCaptureDfxRequestPolicy &operator=(const MultiStagesCaptureDfxRequestPolicy &policy) = delete;
member in OHOS::Media::MultiStagesCaptureDfxRequestPolicy 46 EXPORT void GetCount(const RequestPolicy policy, RequestCount &count);
|
/foundation/filemanagement/storage_service/services/storage_daemon/libfscrypt/src/ |
H A D | fscrypt_utils.c | 34 int SetFscryptSysparam(const char *policy) in SetFscryptSysparam() argument 37 if (!policy) { in SetFscryptSysparam() 38 LOGE("policy is null"); in SetFscryptSysparam() 42 return FscryptSetSysparam(policy); in SetFscryptSysparam()
|
/foundation/communication/netmanager_base/test/netpolicymanager/unittest/net_policy_manager_test/ |
H A D | ut_net_policy_callback_stub.cpp | 34 int32_t NetUidPolicyChange(uint32_t uid, uint32_t policy) override 87 uint32_t policy = TEST_POLICY; in HWTEST_F() local 95 if (!data.WriteUint32(policy)) { in HWTEST_F() 114 if (!dataOk.WriteUint32(policy)) { in HWTEST_F() 146 NetQuotaPolicy policy; in HWTEST_F() local 147 policy.networkmatchrule.simId = "testIccid"; in HWTEST_F() 148 policy.networkmatchrule.ident = "testIdent"; in HWTEST_F() 149 policy.quotapolicy.title = "testTitle"; in HWTEST_F() 150 cellularPolicies.push_back(policy); in HWTEST_F()
|
/foundation/distributedhardware/device_manager/test/unittest/ |
H A D | UTTest_device_manager_service_two.cpp | 285 std::map<std::string, std::string> policy; in HWTEST_F() local 286 policy[PARAM_KEY_POLICY_STRATEGY_FOR_BLE] = "100"; in HWTEST_F() 287 policy[PARAM_KEY_POLICY_TIME_OUT] = "10"; in HWTEST_F() 288 int32_t ret = DeviceManagerService::GetInstance().SetDnPolicy(packName, policy); in HWTEST_F() 303 std::map<std::string, std::string> policy; in HWTEST_F() local 304 policy[PARAM_KEY_POLICY_STRATEGY_FOR_BLE] = "100"; in HWTEST_F() 305 policy[PARAM_KEY_POLICY_TIME_OUT] = "10"; in HWTEST_F() 306 int32_t ret = DeviceManagerService::GetInstance().SetDnPolicy(packName, policy); in HWTEST_F() 317 std::map<std::string, std::string> policy; in HWTEST_F() local 318 policy[PARAM_KEY_POLICY_TIME_OU in HWTEST_F() 330 std::map<std::string, std::string> policy; HWTEST_F() local 343 std::map<std::string, std::string> policy; HWTEST_F() local 357 std::map<std::string, std::string> policy; HWTEST_F() local [all...] |