/base/customization/enterprise_device_management/services/edm/src/ |
D | policy_manager.cpp | 60 bool PolicyManager::ParseAdminList(const std::string &adminName, const PolicyItemsMap &itemsMap) in ParseAdminList() argument 69 adminValueItem.insert(std::pair<std::string, std::string>(adminName, policyValue)); in ParseAdminList() 73 auto iterValue = adminValueRef.find(adminName); in ParseAdminList() 76 adminName.c_str(), policyName.c_str()); in ParseAdminList() 79 adminValueRef.insert(std::pair<std::string, std::string>(adminName, policyValue)); in ParseAdminList() 88 std::string adminName; in ParseAdminPolicy() local 96 adminName = admin["AdminName"].asString(); in ParseAdminPolicy() 101 if (admin.isMember("PolicyItems") && admin["PolicyItems"].isObject() && !adminName.empty()) { in ParseAdminPolicy() 103 adminPolicies_.insert(std::pair<std::string, PolicyItemsMap>(adminName, itemsMap)); in ParseAdminPolicy() 104 isParseAdminListSuccess = ParseAdminList(adminName, itemsMap); in ParseAdminPolicy() [all …]
|
D | enterprise_device_mgr_ability.cpp | 407 ErrCode EnterpriseDeviceMgrAbility::RemoveAdminItem(std::string adminName, std::string policyName, in RemoveAdminItem() argument 416 if ((ret = plugin->OnAdminRemove(adminName, policyValue)) != ERR_OK) { in RemoveAdminItem() 418 adminName.c_str(), policyValue.c_str(), ret); in RemoveAdminItem() 422 if ((ret = plugin->MergePolicyData(adminName, mergedPolicyData)) != ERR_OK) { in RemoveAdminItem() 433 setRet = policyMgr_->SetPolicy(adminName, policyName, "", mergedPolicyData); in RemoveAdminItem() 438 adminName.c_str(), policyName.c_str(), ret); in RemoveAdminItem() 442 plugin->OnAdminRemoveDone(adminName, policyValue); in RemoveAdminItem() 446 ErrCode EnterpriseDeviceMgrAbility::RemoveAdmin(const std::string &adminName, int32_t userId) in RemoveAdmin() argument 448 EDMLOGD("RemoveAdmin %{public}s, user id = %{public}d", adminName.c_str(), userId); in RemoveAdmin() 450 policyMgr_->GetAllPolicyByAdmin(adminName, policyItems); in RemoveAdmin() [all …]
|
D | iplugin.cpp | 47 ErrCode IPlugin::MergePolicyData(const std::string &adminName, std::string &mergeJsonData) in MergePolicyData() argument
|
D | admin_manager.cpp | 276 … std::string adminName = item->adminInfo_.packageName_ + "/" + item->adminInfo_.className_; in GetEnabledAdmin() local 277 packageNameList.push_back(adminName); in GetEnabledAdmin()
|
/base/customization/enterprise_device_management/services/edm/include/ |
D | policy_manager.h | 52 ErrCode GetAllPolicyByAdmin(const std::string &adminName, PolicyItemsMap &allAdminPolicy); 64 …ErrCode GetPolicy(const std::string &adminName, const std::string &policyName, std::string &policy… 79 …ErrCode SetPolicy(const std::string &adminName, const std::string &policyName, const std::string &… 118 bool DeleteAdminPolicyItemJsonValue(Json::Value &admin, const std::string &adminName, 120 bool GetAdminItemJsonObject(const Json::Value &admin, const std::string &adminName); 121 bool ParseAdminList(const std::string &adminName, const PolicyItemsMap &itemsMap); 125 …bool SetAdminPolicyItemJsonValue(Json::Value &admin, const std::string &adminName, const std::stri… 128 ErrCode DeleteAdminJsonValue(const std::string &adminName, const std::string &policyName); 129 ErrCode DeleteAdminPolicy(const std::string &adminName, const std::string &policyName); 132 …ErrCode GetAdminPolicy(const std::string &adminName, const std::string &policyName, std::string &p… [all …]
|
D | iplugin.h | 49 virtual ErrCode MergePolicyData(const std::string &adminName, std::string &policyData); 50 …virtual void OnHandlePolicyDone(std::uint32_t funcCode, const std::string &adminName, bool isGloba… 51 virtual ErrCode OnAdminRemove(const std::string &adminName, const std::string &policyData) = 0; 52 …virtual void OnAdminRemoveDone(const std::string &adminName, const std::string ¤tJsonData) =…
|
D | iplugin_template.h | 40 ErrCode MergePolicyData(const std::string &adminName, std::string &policyData) override; 42 void OnHandlePolicyDone(std::uint32_t funcCode, const std::string &adminName, 45 … ErrCode OnAdminRemove(const std::string &adminName, const std::string ¤tJsonData) override; 47 … void OnAdminRemoveDone(const std::string &adminName, const std::string &removedJsonData) override; 149 typedef ErrCode (CT::*BiAdminFunction)(const std::string &adminName, DT &data); 188 typedef void (CT::*BiAdminConsumer)(const std::string &adminName, DT &data); 465 ErrCode IPluginTemplate<CT, DT>::MergePolicyData(const std::string &adminName, std::string &policyD… in MergePolicyData() argument 475 auto entry = adminValues.find(adminName); in MergePolicyData() 512 …d IPluginTemplate<CT, DT>::OnHandlePolicyDone(std::uint32_t funcCode, const std::string &adminName, in OnHandlePolicyDone() argument 521 ErrCode res = entry->second.handlePolicyDone_(adminName, isGlobalChanged, type); in OnHandlePolicyDone() [all …]
|
D | enterprise_device_mgr_ability.h | 68 ErrCode RemoveAdminItem(std::string adminName, std::string policyName, std::string policyValue); 69 ErrCode RemoveAdmin(const std::string &adminName, int32_t userId);
|
/base/customization/enterprise_device_management/test/unittest/include/ |
D | plugin_manager_test.h | 43 ErrCode MergePolicyData(const std::string &adminName, std::string &policyData) override in MergePolicyData() argument 45 return IPlugin::MergePolicyData(adminName, policyData); in MergePolicyData() 48 …void OnHandlePolicyDone(std::uint32_t funcCode, const std::string &adminName, bool isGlobalChanged… in OnHandlePolicyDone() argument 50 ErrCode OnAdminRemove(const std::string &adminName, const std::string &policyData) override in OnAdminRemove() argument 55 void OnAdminRemoveDone(const std::string &adminName, const std::string &policyData) override {} in OnAdminRemoveDone() argument
|
D | iplugin_mock.h | 38 …void OnHandlePolicyDone(std::uint32_t funcCode, const std::string &adminName, bool isGlobalChanged… in OnHandlePolicyDone() argument 40 ErrCode OnAdminRemove(const std::string &adminName, const std::string &policyData) override in OnAdminRemove() argument 45 …void OnAdminRemoveDone(const std::string &adminName, const std::string ¤tJsonData) override … in OnAdminRemoveDone() argument
|
D | iplugin_template_test.h | 284 ErrCode RemoveAdmin(const std::string &adminName, std::string &data) in RemoveAdmin() argument 317 void RemoveAdminDone(const std::string &adminName, std::string &data) in RemoveAdminDone() argument
|
/base/customization/enterprise_device_management/test/unittest/src/ |
D | policy_manager_test.cpp | 63 std::string adminName = TEST_ADMIN_NAME; variable 68 res = PolicyManager::GetInstance()->SetPolicy(adminName, policyName, "false", "true"); 72 res = PolicyManager::GetInstance()->GetPolicy(adminName, policyName, policyValue); 81 res = PolicyManager::GetInstance()->GetPolicy(adminName, policyName, policyValue); 97 std::string adminName = TEST_ADMIN_NAME; variable 101 res = PolicyManager::GetInstance()->SetPolicy(adminName, policyName, adminPolicy, mergedPolicy); 105 res = PolicyManager::GetInstance()->GetPolicy(adminName, policyName, policyValue); 115 res = PolicyManager::GetInstance()->GetPolicy(adminName, policyName, policyValue);
|
D | iplugin_template_test.cpp | 227 std::string adminName; variable 235 adminName = "com.edm.test.demo"; 237 plugin->OnHandlePolicyDone(funcCode, adminName, true); 242 plugin->OnHandlePolicyDone(funcCode, adminName, false); 258 std::string adminName; variable 267 adminName = "com.edm.test.demo"; 270 plugin->OnAdminRemove(adminName, policyValue); 286 std::string adminName; variable 295 adminName = "com.edm.test.demo"; 298 plugin->OnAdminRemoveDone(adminName, policyValue);
|