/base/account/os_account/frameworks/osaccount/native/test/unittest/ |
D | os_account_info_test.cpp | 97 OsAccountInfo *osAccountInfo = new (std::nothrow) OsAccountInfo(); variable 98 EXPECT_NE(osAccountInfo, nullptr); 99 delete (osAccountInfo); 110 OsAccountInfo *osAccountInfo = variable 112 EXPECT_NE(osAccountInfo, nullptr); 113 delete (osAccountInfo); 124 OsAccountInfo *osAccountInfo = new (std::nothrow) OsAccountInfo(INT_ID, variable 134 EXPECT_NE(osAccountInfo, nullptr); 135 delete (osAccountInfo); 147 OsAccountInfo osAccountInfo; variable [all …]
|
/base/account/os_account/services/accountmgr/include/osaccount/ |
D | os_account_interface.h | 27 static ErrCode SendToAMSAccountStart(OsAccountInfo &osAccountInfo); 28 static ErrCode SendToAMSAccountStop(OsAccountInfo &osAccountInfo); 29 static ErrCode SendToBMSAccountCreate(OsAccountInfo &osAccountInfo); 30 static ErrCode SendToBMSAccountDelete(OsAccountInfo &osAccountInfo); 32 static ErrCode SendToIDMAccountDelete(OsAccountInfo &osAccountInfo); 34 static void SendToCESAccountCreate(OsAccountInfo &osAccountInfo); 35 static void SendToCESAccountDelete(OsAccountInfo &osAccountInfo); 36 static void SendToCESAccountSwitched(OsAccountInfo &osAccountInfo); 37 static ErrCode SendToStorageAccountCreate(OsAccountInfo &osAccountInfo); 38 static ErrCode SendToStorageAccountRemove(OsAccountInfo &osAccountInfo); [all …]
|
D | iinner_os_account_manager.h | 34 const std::string &name, const OsAccountType &type, OsAccountInfo &osAccountInfo) override; 36 …t OsAccountType &type, const DomainAccountInfo &domainInfo, OsAccountInfo &osAccountInfo) override; 47 ErrCode QueryOsAccountById(const int id, OsAccountInfo &osAccountInfo) override; 73 OsAccountInfo &osAccountInfo) override; 93 void StartBaseStandardAccount(OsAccountInfo &osAccountInfo); 99 const DomainAccountInfo &domainAccount, OsAccountInfo &osAccountInfo); 100 ErrCode SendMsgForAccountCreate(OsAccountInfo &osAccountInfo); 101 ErrCode SendMsgForAccountActivate(OsAccountInfo &osAccountInfo); 102 ErrCode SendMsgForAccountStop(OsAccountInfo &osAccountInfo); 103 ErrCode SendMsgForAccountRemove(OsAccountInfo &osAccountInfo);
|
D | os_account_database_operator.h | 33 void UpdateOsAccountInDatabase(const OsAccountInfo &osAccountInfo); 34 void InsertOsAccountIntoDataBase(const OsAccountInfo &osAccountInfo); 40 …e GetOsAccountFromDatabase(const std::string& storeID, const int id, OsAccountInfo &osAccountInfo);
|
/base/account/os_account/services/accountmgr/test/mock/os_account/ |
D | os_account_interface.h | 24 static ErrCode SendToAMSAccountStart(OsAccountInfo &osAccountInfo); 25 static ErrCode SendToAMSAccountStop(OsAccountInfo &osAccountInfo); 26 static ErrCode SendToBMSAccountCreate(OsAccountInfo &osAccountInfo); 27 static ErrCode SendToBMSAccountDelete(OsAccountInfo &osAccountInfo); 29 static ErrCode SendToIDMAccountDelete(OsAccountInfo &osAccountInfo); 31 static void SendToCESAccountCreate(OsAccountInfo &osAccountInfo); 32 static void SendToCESAccountDelete(OsAccountInfo &osAccountInfo); 33 static void SendToCESAccountSwitched(OsAccountInfo &osAccountInfo); 34 static ErrCode SendToStorageAccountCreate(OsAccountInfo &osAccountInfo); 35 static ErrCode SendToStorageAccountRemove(OsAccountInfo &osAccountInfo); [all …]
|
D | os_account_interface.cpp | 20 ErrCode OsAccountInterface::SendToAMSAccountStart(OsAccountInfo &osAccountInfo) in SendToAMSAccountStart() argument 26 ErrCode OsAccountInterface::SendToAMSAccountStop(OsAccountInfo &osAccountInfo) in SendToAMSAccountStop() argument 32 ErrCode OsAccountInterface::SendToBMSAccountCreate(OsAccountInfo &osAccountInfo) in SendToBMSAccountCreate() argument 38 ErrCode OsAccountInterface::SendToBMSAccountDelete(OsAccountInfo &osAccountInfo) in SendToBMSAccountDelete() argument 45 ErrCode OsAccountInterface::SendToIDMAccountDelete(OsAccountInfo &osAccountInfo) in SendToIDMAccountDelete() argument 52 void OsAccountInterface::SendToCESAccountCreate(OsAccountInfo &osAccountInfo) in SendToCESAccountCreate() argument 57 void OsAccountInterface::SendToCESAccountDelete(OsAccountInfo &osAccountInfo) in SendToCESAccountDelete() argument 62 void OsAccountInterface::SendToCESAccountSwitched(OsAccountInfo &osAccountInfo) in SendToCESAccountSwitched() argument 67 ErrCode OsAccountInterface::SendToStorageAccountCreate(OsAccountInfo &osAccountInfo) in SendToStorageAccountCreate() argument 73 ErrCode OsAccountInterface::SendToStorageAccountRemove(OsAccountInfo &osAccountInfo) in SendToStorageAccountRemove() argument [all …]
|
/base/account/os_account/services/accountmgr/src/osaccount/ |
D | os_account_interface.cpp | 51 ErrCode OsAccountInterface::SendToAMSAccountStart(OsAccountInfo &osAccountInfo) in SendToAMSAccountStart() argument 55 ErrCode code = AbilityManagerAdapter::GetInstance()->StartUser(osAccountInfo.GetLocalId()); in SendToAMSAccountStart() 58 … ReportOsAccountOperationFail(osAccountInfo.GetLocalId(), Constants::OPERATION_ACTIVATE, code, in SendToAMSAccountStart() 68 ErrCode OsAccountInterface::SendToAMSAccountStop(OsAccountInfo &osAccountInfo) in SendToAMSAccountStop() argument 73 ReportOsAccountOperationFail(osAccountInfo.GetLocalId(), Constants::OPERATION_STOP, in SendToAMSAccountStop() 79 ErrCode code = AbilityManagerAdapter::GetInstance()->StopUser(osAccountInfo.GetLocalId(), in SendToAMSAccountStop() 83 ReportOsAccountOperationFail(osAccountInfo.GetLocalId(), Constants::OPERATION_STOP, code, in SendToAMSAccountStop() 99 ReportOsAccountOperationFail(osAccountInfo.GetLocalId(), Constants::OPERATION_STOP, -1, in SendToAMSAccountStop() 109 ErrCode OsAccountInterface::SendToBMSAccountCreate(OsAccountInfo &osAccountInfo) in SendToBMSAccountCreate() argument 111 return BundleManagerAdapter::GetInstance()->CreateNewUser(osAccountInfo.GetLocalId()); in SendToBMSAccountCreate() [all …]
|
D | inner_os_account_manager.cpp | 60 OsAccountInfo osAccountInfo( in CreateBaseAdminAccount() local 65 osAccountInfo.SetCreateTime(time); in CreateBaseAdminAccount() 66 osAccountInfo.SetIsCreateCompleted(true); in CreateBaseAdminAccount() 67 osAccountInfo.SetIsActived(true); // admin local account is always active in CreateBaseAdminAccount() 68 osAccountControl_->InsertOsAccount(osAccountInfo); in CreateBaseAdminAccount() 80 OsAccountInfo osAccountInfo( in CreateBaseStandardAccount() local 88 osAccountInfo.SetConstraints(constants); in CreateBaseStandardAccount() 92 osAccountInfo.SetCreateTime(time); in CreateBaseStandardAccount() 93 osAccountInfo.SetIsCreateCompleted(false); in CreateBaseStandardAccount() 94 osAccountControl_->InsertOsAccount(osAccountInfo); in CreateBaseStandardAccount() [all …]
|
D | os_account_database_operator.cpp | 102 void OsAccountDatabaseOperator::InsertOsAccountIntoDataBase(const OsAccountInfo &osAccountInfo) in InsertOsAccountIntoDataBase() argument 105 ACCOUNT_LOGE("InnerInit failed! target localID %{public}d!", osAccountInfo.GetLocalId()); in InsertOsAccountIntoDataBase() 109 if (osAccountInfo.GetLocalId() < Constants::START_USER_ID) { in InsertOsAccountIntoDataBase() 110 …LOGI("target os account id %{public}d will not be saved in database!", osAccountInfo.GetLocalId()); in InsertOsAccountIntoDataBase() 114 ErrCode errCode = accountDataStorage_->AddAccountInfo(osAccountInfo); in InsertOsAccountIntoDataBase() 117 errCode, osAccountInfo.GetLocalId()); in InsertOsAccountIntoDataBase() 120 ACCOUNT_LOGI("insert account %{public}d to database succeed.", osAccountInfo.GetLocalId()); in InsertOsAccountIntoDataBase() 138 void OsAccountDatabaseOperator::UpdateOsAccountInDatabase(const OsAccountInfo &osAccountInfo) in UpdateOsAccountInDatabase() argument 141 ACCOUNT_LOGE("InnerInit failed! local id %{public}d!", osAccountInfo.GetLocalId()); in UpdateOsAccountInDatabase() 145 ErrCode errCode = accountDataStorage_->SaveAccountInfo(osAccountInfo); in UpdateOsAccountInDatabase() [all …]
|
D | os_account_manager_service.cpp | 78 const std::string &name, const OsAccountType &type, OsAccountInfo &osAccountInfo) in CreateOsAccount() argument 118 return innerManager_->CreateOsAccount(name, type, osAccountInfo); in CreateOsAccount() 122 const OsAccountType &type, const DomainAccountInfo &domainInfo, OsAccountInfo &osAccountInfo) in CreateOsAccountForDomain() argument 158 return innerManager_->CreateOsAccountForDomain(type, domainInfo, osAccountInfo); in CreateOsAccountForDomain() 347 ErrCode OsAccountManagerService::QueryCurrentOsAccount(OsAccountInfo &osAccountInfo) in QueryCurrentOsAccount() argument 356 return innerManager_->QueryOsAccountById(id, osAccountInfo); in QueryCurrentOsAccount() 359 ErrCode OsAccountManagerService::QueryOsAccountById(const int id, OsAccountInfo &osAccountInfo) in QueryOsAccountById() argument 373 return innerManager_->QueryOsAccountById(id, osAccountInfo); in QueryOsAccountById() 608 OsAccountInfo osAccountInfo; in DumpState() local 609 result = innerManager_->QueryOsAccountById(id, osAccountInfo); in DumpState() [all …]
|
D | os_account_data_storage.cpp | 39 OsAccountInfo osAccountInfo; in SaveEntries() local 50 osAccountInfo.FromJson(jsonObject); in SaveEntries() 51 infos.emplace(item.key.ToString(), std::make_shared<OsAccountInfo>(osAccountInfo)); in SaveEntries()
|
/base/account/os_account/frameworks/osaccount/core/test/unittest/ |
D | os_account_test.cpp | 189 OsAccountInfo osAccountInfo; variable 190 …Code = g_osAccount->CreateOsAccount(STRING_NAME_OUT_OF_RANGE, OsAccountType::GUEST, osAccountInfo); 202 OsAccountInfo osAccountInfo; variable 203 … ErrCode errCode = g_osAccount->CreateOsAccount(STRING_EMPTY, OsAccountType::GUEST, osAccountInfo); 288 OsAccountInfo osAccountInfo; variable 290 EXPECT_EQ(osAccountInfo.SetDomainInfo(domainInfo), true); 293 osAccountInfo.GetDomainInfo(getDomainInfo); 309 OsAccountInfo osAccountInfo; variable 311 EXPECT_EQ(osAccountInfo.SetDomainInfo(domainInfoNameInvalid), false); 314 EXPECT_EQ(osAccountInfo.SetDomainInfo(domainInfoAccountInvalid), false); [all …]
|
D | os_account_mock_test.cpp | 81 OsAccountInfo osAccountInfo; variable 83 g_osAccount->CreateOsAccount(STRING_NAME, type, osAccountInfo)); 96 OsAccountInfo osAccountInfo; variable 98 g_osAccount->CreateOsAccountForDomain(type, domainInfo, osAccountInfo)); 265 OsAccountInfo osAccountInfo; variable 267 g_osAccount->QueryCurrentOsAccount(osAccountInfo)); 278 OsAccountInfo osAccountInfo; variable 280 g_osAccount->QueryOsAccountById(MAIN_ACCOUNT_ID, osAccountInfo)); 572 OsAccountInfo osAccountInfo; variable 574 g_osAccount->GetOsAccountFromDatabase(storeID, MAIN_ACCOUNT_ID, osAccountInfo));
|
/base/account/os_account/services/accountmgr/test/moduletest/os_account/ |
D | os_account_manager_service_subscribe_module_test.cpp | 102 OsAccountInfo osAccountInfo; variable 103 …de result = osAccountManagerService_->CreateOsAccount("test", OsAccountType::GUEST, osAccountInfo); 104 subscriberTestPtr->id_ = osAccountInfo.GetLocalId(); 115 result = osAccountManagerService_->ActivateOsAccount(osAccountInfo.GetLocalId()); 132 result = osAccountManagerService_->RemoveOsAccount(osAccountInfo.GetLocalId()); 154 OsAccountInfo osAccountInfo; variable 155 …de result = osAccountManagerService_->CreateOsAccount("test", OsAccountType::GUEST, osAccountInfo); 156 subscriberTestPtr->id_ = osAccountInfo.GetLocalId(); 167 result = osAccountManagerService_->ActivateOsAccount(osAccountInfo.GetLocalId()); 184 result = osAccountManagerService_->RemoveOsAccount(osAccountInfo.GetLocalId());
|
D | os_account_manager_service_module_test.cpp | 656 OsAccountInfo osAccountInfo; variable 657 EXPECT_EQ(osAccountManagerService_->QueryCurrentOsAccount(osAccountInfo), ERR_OK); 668 OsAccountInfo osAccountInfo; variable 669 …EXPECT_EQ(osAccountManagerService_->QueryOsAccountById(Constants::START_USER_ID, osAccountInfo), E… 670 EXPECT_EQ(Constants::START_USER_ID, osAccountInfo.GetLocalId()); 681 OsAccountInfo osAccountInfo; variable 682 … EXPECT_EQ(osAccountManagerService_->QueryOsAccountById(Constants::MAX_USER_ID + 1, osAccountInfo), 1065 OsAccountInfo osAccountInfo; variable 1066 …ASSERT_EQ(osAccountManagerService_->CreateOsAccountForDomain(type, domainInfo, osAccountInfo), ERR… 1068 bool checkValid = (osAccountInfo.GetLocalId() > Constants::START_USER_ID); [all …]
|
/base/account/os_account/test/fuzztest/osaccount/querycurrentosaccount_fuzzer/ |
D | querycurrentosaccount_fuzzer.cpp | 34 OsAccountInfo osAccountInfo; in QueryCurrentOsAccountFuzzTest() local 35 osAccountInfo.SetLocalName(testName); in QueryCurrentOsAccountFuzzTest() 36 result = OsAccountManager::QueryCurrentOsAccount(osAccountInfo); in QueryCurrentOsAccountFuzzTest()
|
/base/account/os_account/services/accountmgr/test/unittest/os_account/ |
D | os_account_control_file_manager_test.cpp | 131 OsAccountInfo osAccountInfo; variable 132 …Q(osAccountControlManager_->GetOsAccountInfoById(Constants::START_USER_ID, osAccountInfo), ERR_OK); 133 EXPECT_EQ(osAccountInfo.GetLocalName(), Constants::STANDARD_LOCAL_NAME); 144 OsAccountInfo osAccountInfo; variable 146 EXPECT_NE(osAccountControlManager_->GetOsAccountInfoById(id, osAccountInfo), ERR_OK); 256 …OsAccountInfo osAccountInfo(id, STRING_TEST_USER_NAME, OS_ACCOUNT_TYPE, STRING_TEST_USER_SHELLNUMB… 257 EXPECT_EQ(osAccountControlManager_->InsertOsAccount(osAccountInfo), ERR_OK); 272 OsAccountInfo osAccountInfo( 274 EXPECT_EQ(osAccountControlManager_->InsertOsAccount(osAccountInfo), 286 OsAccountInfo osAccountInfo( [all …]
|
D | os_account_data_storage_test.cpp | 63 OsAccountInfo osAccountInfo(INT_ID, STRING_NAME, INT_TYPE, INT_SHERIAL); in SetUp() local 64 osAccountDataStorage_->AddAccountInfo(osAccountInfo); in SetUp()
|
/base/account/os_account/test/fuzztest/osaccount/createosaccountfordomain_fuzzer/ |
D | createosaccountfordomain_fuzzer.cpp | 38 OsAccountInfo osAccountInfo; in CreateOsAccountForDomainFuzzTest() local 39 … result = OsAccountManager::CreateOsAccountForDomain(testType, domainInfo, osAccountInfo); in CreateOsAccountForDomainFuzzTest() 42 OsAccountManager::RemoveOsAccount(osAccountInfo.GetLocalId()); in CreateOsAccountForDomainFuzzTest()
|
/base/account/os_account/frameworks/osaccount/native/test/moduletest/ |
D | os_account_manager_module_test.cpp | 649 OsAccountInfo osAccountInfo; variable 650 EXPECT_EQ(OsAccountManager::QueryCurrentOsAccount(osAccountInfo), ERR_OK); 661 OsAccountInfo osAccountInfo; variable 662 … EXPECT_EQ(OsAccountManager::QueryOsAccountById(Constants::START_USER_ID, osAccountInfo), ERR_OK); 663 EXPECT_EQ(Constants::START_USER_ID, osAccountInfo.GetLocalId()); 674 OsAccountInfo osAccountInfo; variable 675 …EXPECT_NE(OsAccountManager::QueryOsAccountById(Constants::MAX_USER_ID + 1, osAccountInfo), ERR_OK); 992 OsAccountInfo osAccountInfo; variable 993 EXPECT_EQ(OsAccountManager::CreateOsAccountForDomain(type, domainInfo, osAccountInfo), ERR_OK); 995 bool checkValid = (osAccountInfo.GetLocalId() > Constants::START_USER_ID); [all …]
|
/base/account/os_account/frameworks/osaccount/native/src/ |
D | os_account_manager.cpp | 23 const std::string &name, const OsAccountType &type, OsAccountInfo &osAccountInfo) in CreateOsAccount() argument 25 return OsAccount::GetInstance().CreateOsAccount(name, type, osAccountInfo); in CreateOsAccount() 29 const OsAccountType &type, const DomainAccountInfo &domainInfo, OsAccountInfo &osAccountInfo) in CreateOsAccountForDomain() argument 32 type, domainInfo, osAccountInfo); in CreateOsAccountForDomain() 123 ErrCode OsAccountManager::QueryCurrentOsAccount(OsAccountInfo &osAccountInfo) in QueryCurrentOsAccount() argument 125 return OsAccount::GetInstance().QueryCurrentOsAccount(osAccountInfo); in QueryCurrentOsAccount() 128 ErrCode OsAccountManager::QueryOsAccountById(const int id, OsAccountInfo &osAccountInfo) in QueryOsAccountById() argument 130 return OsAccount::GetInstance().QueryOsAccountById(id, osAccountInfo); in QueryOsAccountById() 246 OsAccountInfo &osAccountInfo) in GetOsAccountFromDatabase() argument 248 return OsAccount::GetInstance().GetOsAccountFromDatabase(storeID, id, osAccountInfo); in GetOsAccountFromDatabase()
|
/base/account/os_account/test/fuzztest/osaccount/queryosaccountbyid_fuzzer/ |
D | queryosaccountbyid_fuzzer.cpp | 34 OsAccountInfo osAccountInfo; in QueryOsAccountByIdFuzzTest() local 35 result = OsAccountManager::QueryOsAccountById(testId, osAccountInfo); in QueryOsAccountByIdFuzzTest()
|
/base/account/os_account/test/systemtest/common/resource/fuzzTest/src/ |
D | fuzz_test_manager.cpp | 96 OsAccountInfo osAccountInfo = GetParamOsAccountInfo(); in RegisterOsAccountManager() local 97 OsAccountManager::CreateOsAccount(GetStringParam(), GetParamOsAccountType(), osAccountInfo); in RegisterOsAccountManager() 101 OsAccountInfo osAccountInfo = GetParamOsAccountInfo(); in RegisterOsAccountManager() local 103 …ccountManager::CreateOsAccountForDomain(GetParamOsAccountType(), domainAccountInfo, osAccountInfo); in RegisterOsAccountManager() 171 OsAccountInfo osAccountInfo = GetParamOsAccountInfo(); in RegisterOsAccountManager() local 172 OsAccountManager::QueryCurrentOsAccount(osAccountInfo); in RegisterOsAccountManager() 176 OsAccountInfo osAccountInfo = GetParamOsAccountInfo(); in RegisterOsAccountManager() local 177 OsAccountManager::QueryOsAccountById(GetIntParam(), osAccountInfo); in RegisterOsAccountManager() 294 OsAccountInfo osAccountInfo = GetParamOsAccountInfo(); in RegisterOsAccountManager() local 295 OsAccountManager::GetOsAccountFromDatabase(storeID, id, osAccountInfo); in RegisterOsAccountManager()
|
/base/account/os_account/interfaces/innerkits/osaccount/native/include/ |
D | os_account_manager.h | 27 … CreateOsAccount(const std::string &name, const OsAccountType &type, OsAccountInfo &osAccountInfo); 29 … const OsAccountType &type, const DomainAccountInfo &domainInfo, OsAccountInfo &osAccountInfo); 46 static ErrCode QueryCurrentOsAccount(OsAccountInfo &osAccountInfo); 47 static ErrCode QueryOsAccountById(const int id, OsAccountInfo &osAccountInfo); 74 OsAccountInfo &osAccountInfo);
|
/base/account/os_account/frameworks/osaccount/core/include/ |
D | os_account.h | 28 … CreateOsAccount(const std::string &name, const OsAccountType &type, OsAccountInfo &osAccountInfo); 30 … const OsAccountType &type, const DomainAccountInfo &domainInfo, OsAccountInfo &osAccountInfo); 44 ErrCode QueryCurrentOsAccount(OsAccountInfo &osAccountInfo); 45 ErrCode QueryOsAccountById(const int id, OsAccountInfo &osAccountInfo); 72 OsAccountInfo &osAccountInfo);
|