/base/account/os_account/services/accountmgr/test/unittest/os_account/mock/ |
H A D | mock_os_account_control_file_manager.h | 56 MOCK_METHOD2(GetPhotoById, ErrCode(const int id, std::string &photo)); 58 MOCK_METHOD2(SetPhotoById, ErrCode(const int id, const std::string &photo));
|
/base/account/os_account/services/accountmgr/include/osaccount/ |
H A D | ios_account_control.h | 42 virtual ErrCode GetPhotoById(const int id, std::string &photo) = 0; 43 virtual ErrCode SetPhotoById(const int id, const std::string &photo) = 0;
|
H A D | iinner_os_account.h | 55 virtual ErrCode GetOsAccountProfilePhoto(const int id, std::string &photo) = 0; 60 virtual ErrCode SetOsAccountProfilePhoto(const int id, const std::string &photo) = 0;
|
H A D | os_account_manager_service.h | 72 ErrCode GetOsAccountProfilePhoto(const int id, std::string &photo) override; 79 ErrCode SetOsAccountProfilePhoto(const int id, const std::string &photo) override;
|
H A D | os_account_control_file_manager.h | 54 ErrCode GetPhotoById(const int id, std::string &photo) override; 55 ErrCode SetPhotoById(const int id, const std::string &photo) override;
|
H A D | iinner_os_account_manager.h | 60 ErrCode GetOsAccountProfilePhoto(const int id, std::string &photo) override; 65 ErrCode SetOsAccountProfilePhoto(const int id, const std::string &photo) override;
|
/base/account/os_account/services/accountmgr/src/osaccount/ |
H A D | os_account_control_file_manager.cpp | 520 std::string photo = osAccountInfo.GetPhoto(); in GetOsAccountList() local 521 GetPhotoById(osAccountInfo.GetLocalId(), photo); in GetOsAccountList() 522 osAccountInfo.SetPhoto(photo); in GetOsAccountList() 1543 ErrCode OsAccountControlFileManager::GetPhotoById(const int id, std::string &photo) in GetPhotoById() argument 1545 if ((photo != Constants::USER_PHOTO_FILE_JPG_NAME) && (photo != Constants::USER_PHOTO_FILE_PNG_NAME) in GetPhotoById() 1546 && (photo != Constants::USER_PHOTO_FILE_TXT_NAME)) { in GetPhotoById() 1550 Constants::USER_INFO_BASE + Constants::PATH_SEPARATOR + std::to_string(id) + Constants::PATH_SEPARATOR + photo; in GetPhotoById() 1554 ACCOUNT_LOGE("GetPhotoById cannot find photo file error"); in GetPhotoById() 1557 if (photo in GetPhotoById() 1576 SetPhotoById(const int id, const std::string &photo) SetPhotoById() argument [all...] |
H A D | os_account_manager_service.cpp | 483 ErrCode OsAccountManagerService::GetOsAccountProfilePhoto(const int id, std::string &photo) in GetOsAccountProfilePhoto() argument 489 // get current account photo in GetOsAccountProfilePhoto() 492 return innerManager_.GetOsAccountProfilePhoto(id, photo); in GetOsAccountProfilePhoto() 495 // get other account photo, check permission first in GetOsAccountProfilePhoto() 501 return innerManager_.GetOsAccountProfilePhoto(id, photo); in GetOsAccountProfilePhoto() 558 ErrCode OsAccountManagerService::SetOsAccountProfilePhoto(const int id, const std::string &photo) in SetOsAccountProfilePhoto() argument 566 ACCOUNT_LOGE("cannot set photo for system preinstalled user"); in SetOsAccountProfilePhoto() 569 if (photo.size() > Constants::LOCAL_PHOTO_MAX_SIZE) { in SetOsAccountProfilePhoto() 570 ACCOUNT_LOGE("photo out of allowed size"); in SetOsAccountProfilePhoto() 573 if (photo in SetOsAccountProfilePhoto() [all...] |
H A D | os_account_stub.cpp | 795 std::string photo = std::string(photoData, photoSize - 1); in ProcSetOsAccountProfilePhoto() local 796 ErrCode result = SetOsAccountProfilePhoto(localId, photo); in ProcSetOsAccountProfilePhoto() 954 std::string photo; in ProcGetOsAccountProfilePhoto() local 955 ErrCode result = GetOsAccountProfilePhoto(localId, photo); in ProcGetOsAccountProfilePhoto() 960 if (!reply.WriteInt32(photo.size() + 1)) { in ProcGetOsAccountProfilePhoto() 961 ACCOUNT_LOGE("Failed to write photo"); in ProcGetOsAccountProfilePhoto() 964 if (!reply.WriteRawData(photo.c_str(), photo.size() + 1)) { in ProcGetOsAccountProfilePhoto() 965 ACCOUNT_LOGE("Failed to write photo"); in ProcGetOsAccountProfilePhoto()
|
/base/account/os_account/frameworks/osaccount/native/test/benchmarktest/ |
H A D | os_account_manager_benchmark_test.cpp | 415 std::string photo; in BENCHMARK_F() local 416 EXPECT_EQ(OsAccountManager::GetOsAccountProfilePhoto(LOCAL_ID, photo), ERR_OK); in BENCHMARK_F() 417 EXPECT_EQ(photo, PHOTO_IMG); in BENCHMARK_F()
|
/base/account/os_account/frameworks/osaccount/core/src/ |
H A D | os_account.cpp | 394 ErrCode OsAccount::GetOsAccountProfilePhoto(const int id, std::string &photo) in GetOsAccountProfilePhoto() argument 405 return proxy->GetOsAccountProfilePhoto(id, photo); in GetOsAccountProfilePhoto() 456 ErrCode OsAccount::SetOsAccountProfilePhoto(const int id, const std::string &photo) in SetOsAccountProfilePhoto() argument 458 if (photo.empty()) { in SetOsAccountProfilePhoto() 459 ACCOUNT_LOGE("photo is empty"); in SetOsAccountProfilePhoto() 466 if (photo.size() > Constants::LOCAL_PHOTO_MAX_SIZE) { in SetOsAccountProfilePhoto() 467 ACCOUNT_LOGE("photo size %{public}zu too long!", photo.size()); in SetOsAccountProfilePhoto() 475 return proxy->SetOsAccountProfilePhoto(id, photo); in SetOsAccountProfilePhoto()
|
/base/account/os_account/interfaces/innerkits/osaccount/native/include/ |
H A D | os_account_manager.h | 279 * @brief Gets the profile photo of an OS account based on its local ID. 282 * @param photo - Indicates the profile photo. 285 static ErrCode GetOsAccountProfilePhoto(const int id, std::string &photo); 324 * @brief Sets the profile photo for an OS account based on its local ID. 327 * @param photo - Indicates the profile photo to set for the OS account. 330 static ErrCode SetOsAccountProfilePhoto(const int id, const std::string &photo);
|
H A D | os_account_info.h | 93 void SetPhoto(const std::string photo);
|
/base/account/os_account/frameworks/osaccount/core/include/ |
H A D | os_account.h | 54 ErrCode GetOsAccountProfilePhoto(const int id, std::string &photo); 58 ErrCode SetOsAccountProfilePhoto(const int id, const std::string &photo);
|
H A D | ios_account.h | 64 virtual ErrCode GetOsAccountProfilePhoto(const int id, std::string &photo) = 0; 69 virtual ErrCode SetOsAccountProfilePhoto(const int id, const std::string &photo) = 0;
|
H A D | os_account_proxy.h | 58 ErrCode GetOsAccountProfilePhoto(const int id, std::string &photo) override; 63 ErrCode SetOsAccountProfilePhoto(const int id, const std::string &photo) override;
|
/base/account/os_account/frameworks/osaccount/native/src/ |
H A D | os_account_manager.cpp | 176 ErrCode OsAccountManager::GetOsAccountProfilePhoto(const int id, std::string &photo) in GetOsAccountProfilePhoto() argument 178 return OsAccount::GetInstance().GetOsAccountProfilePhoto(id, photo); in GetOsAccountProfilePhoto() 197 ErrCode OsAccountManager::SetOsAccountProfilePhoto(const int id, const std::string &photo) in SetOsAccountProfilePhoto() argument 199 return OsAccount::GetInstance().SetOsAccountProfilePhoto(id, photo); in SetOsAccountProfilePhoto()
|
H A D | os_account_info.cpp | 31 const std::string PHOTO = "photo"; 228 void OsAccountInfo::SetPhoto(const std::string photo) in SetPhoto() argument 230 photo_ = photo; in SetPhoto()
|
/base/account/os_account/services/accountmgr/test/unittest/os_account/ |
H A D | os_account_control_file_manager_test.cpp | 356 std::string photo = Constants::USER_PHOTO_FILE_TXT_NAME; in HWTEST_F() local 357 EXPECT_EQ(g_controlManager->GetPhotoById(id, photo), ERR_OK); in HWTEST_F() 358 EXPECT_EQ(photo, STRING_PHOTO); in HWTEST_F() 713 std::string photo; in HWTEST_F() local 714 ErrCode ret = g_controlManager->GetPhotoById(id, photo); in HWTEST_F()
|
/base/account/os_account/frameworks/osaccount/native/test/unittest/ |
H A D | os_account_info_test.cpp | 70 "\"account\",\"photo\":\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gAUU29mdHdhcmU6IFNuaXBhc3Rl/" 329 * @tc.desc: Get the photo with valid data. 335 std::string photo = STRING_PHOTO; in HWTEST_F() local 337 osAccountInfo.photo_ = photo; in HWTEST_F() 338 EXPECT_EQ(photo, osAccountInfo.GetPhoto()); in HWTEST_F() 343 * @tc.desc: Set the photo with valid data.
|
/base/account/os_account/services/accountmgr/test/moduletest/os_account/ |
H A D | os_account_manager_service_module_test.cpp | 845 std::string photo; in HWTEST_F() local 846 EXPECT_EQ(osAccountManagerService_->GetOsAccountProfilePhoto(osAccountInfoOne.GetLocalId(), photo), ERR_OK); in HWTEST_F() 847 EXPECT_EQ(photo, PHOTO_IMG); in HWTEST_F() 861 std::string photo; in HWTEST_F() local 862 EXPECT_EQ(osAccountManagerService_->GetOsAccountProfilePhoto(osAccountInfoOne.GetLocalId(), photo), ERR_OK); in HWTEST_F() 875 std::string photo; in HWTEST_F() local 876 EXPECT_EQ(osAccountManagerService_->GetOsAccountProfilePhoto(Constants::MAX_USER_ID + 1, photo), in HWTEST_F() 1832 std::string photo; in HWTEST_F() local 1834 osAccountManagerService_->GetOsAccountProfilePhoto(MAIN_ACCOUNT_ID, photo)); in HWTEST_F() 2076 std::string photo in HWTEST_F() local [all...] |
/base/account/os_account/frameworks/test/unittest/ |
H A D | account_osaccount_proxy_mock_test.cpp | 325 std::string photo; in HWTEST_F() local 326 ErrCode errCode = OsAccountManager::GetOsAccountProfilePhoto(TEST_USER_ID, photo); in HWTEST_F()
|
/base/account/os_account/frameworks/osaccount/core/test/unittest/ |
H A D | os_account_mock_test.cpp | 316 std::string photo; in HWTEST_F() local 318 g_osAccount->GetOsAccountProfilePhoto(MAIN_ACCOUNT_ID, photo)); in HWTEST_F()
|
/base/account/os_account/interfaces/kits/napi/osaccount/include/ |
H A D | napi_os_account.h | 130 std::string photo; member 153 std::string photo; member
|
/base/account/os_account/frameworks/osaccount/native/test/moduletest/ |
H A D | os_account_manager_module_test.cpp | 1025 std::string photo; in HWTEST_F() local 1027 OsAccountManager::GetOsAccountProfilePhoto(osAccountInfoOne.GetLocalId(), photo), ERR_OK); in HWTEST_F() 1065 std::string photo; in HWTEST_F() local 1066 EXPECT_EQ(OsAccountManager::GetOsAccountProfilePhoto(osAccountInfoOne.GetLocalId(), photo), ERR_OK); in HWTEST_F() 1067 EXPECT_EQ(photo, PHOTO_IMG); in HWTEST_F() 1073 * @tc.desc: test get default photo. 1081 std::string photo; in HWTEST_F() local 1082 EXPECT_EQ(OsAccountManager::GetOsAccountProfilePhoto(osAccountInfoOne.GetLocalId(), photo), ERR_OK); in HWTEST_F() 1095 std::string photo; in HWTEST_F() local 1096 EXPECT_NE(OsAccountManager::GetOsAccountProfilePhoto(Constants::MAX_USER_ID + 1, photo), ERR_O in HWTEST_F() 2309 std::string photo; HWTEST_F() local 2398 std::string photo; HWTEST_F() local [all...] |