/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_helper_test/src/ |
H A D | file_asset_test.cpp | 35 FileAsset fileAsset; in HWTEST_F() local 38 fileAsset.SetId(TEST_FILE_ID); in HWTEST_F() 39 EXPECT_EQ(fileAsset.GetId(), TEST_FILE_ID); in HWTEST_F() 42 fileAsset.SetUri(TEST_URI); in HWTEST_F() 43 EXPECT_EQ(fileAsset.GetUri(), TEST_URI); in HWTEST_F() 46 fileAsset.SetCount(TEST_COUNT); in HWTEST_F() 47 EXPECT_EQ(fileAsset.GetCount(), TEST_COUNT); in HWTEST_F() 52 fileAsset.SetPath(TEST_PATH); in HWTEST_F() 53 EXPECT_EQ(fileAsset.GetPath(), TEST_PATH); in HWTEST_F() 55 fileAsset in HWTEST_F() 84 FileAsset fileAsset; HWTEST_F() local 129 FileAsset fileAsset; HWTEST_F() local 171 FileAsset fileAsset; HWTEST_F() local [all...] |
/foundation/multimedia/media_library/frameworks/js/src/ |
H A D | media_library_comm_napi.cpp | 40 shared_ptr<FileAsset> fileAsset = make_shared<FileAsset>(); in CreatePhotoAssetNapi() local 41 fileAsset->SetUri(uri); in CreatePhotoAssetNapi() 44 fileAsset->SetId(stoi(fileId)); in CreatePhotoAssetNapi() 47 fileAsset->SetDisplayName(MediaFileUtils::GetFileName(uri)); in CreatePhotoAssetNapi() 49 fileAsset->SetPhotoSubType(static_cast<int32_t>(PhotoSubType::CAMERA)); in CreatePhotoAssetNapi() 50 fileAsset->SetMediaType(MediaType::MEDIA_TYPE_IMAGE); in CreatePhotoAssetNapi() 52 fileAsset->SetPhotoSubType(static_cast<int32_t>(PhotoSubType::MOVING_PHOTO)); in CreatePhotoAssetNapi() 53 fileAsset->SetMediaType(MediaType::MEDIA_TYPE_IMAGE); in CreatePhotoAssetNapi() 55 fileAsset->SetPhotoSubType(static_cast<int32_t>(PhotoSubType::BURST)); in CreatePhotoAssetNapi() 56 fileAsset in CreatePhotoAssetNapi() [all...] |
H A D | media_asset_change_request_napi.cpp | 181 CHECK_COND_WITH_MESSAGE(env, fileAssetPtr != nullptr, "fileAsset is null"); in Constructor() 185 "Unsupported type of fileAsset"); in Constructor() 313 NAPI_ERR_LOG("fileAsset is nullptr"); in CheckEffectModeWriteOperation() 318 NAPI_ERR_LOG("Failed to check pending of fileAsset: %{public}" PRId64, fileAsset_->GetTimePending()); in CheckEffectModeWriteOperation() 388 auto fileAsset = GetFileAssetInstance(); in CheckChangeOperations() local 389 if (fileAsset == nullptr) { in CheckChangeOperations() 390 NapiError::ThrowError(env, OHOS_INVALID_PARAM_CODE, "fileAsset is null"); in CheckChangeOperations() 395 if (fileAsset->GetId() <= 0 && firstOperation != AssetChangeOperation::CREATE_FROM_SCRATCH && in CheckChangeOperations() 488 auto fileAsset = changeRequest->GetFileAssetInstance(); in JSGetAsset() local 489 CHECK_COND(env, fileAsset ! in JSGetAsset() 1069 auto fileAsset = changeRequest->GetFileAssetInstance(); JSSetTitle() local 1105 auto fileAsset = changeRequest->GetFileAssetInstance(); JSSetOrientation() local 1132 auto fileAsset = changeRequest->GetFileAssetInstance(); JSSetVideoEnhancementAttr() local 1244 auto fileAsset = changeRequest->GetFileAssetInstance(); JSSetEffectMode() local 1298 auto fileAsset = changeRequest->GetFileAssetInstance(); JSSaveCameraPhoto() local 1316 auto fileAsset = changeRequest->GetFileAssetInstance(); JSDiscardCameraPhoto() local 1348 auto fileAsset = changeRequest->GetFileAssetInstance(); OpenWriteCacheHandler() local 1469 auto fileAsset = changeRequest->GetFileAssetInstance(); JSGetWriteCacheHandler() local 1561 auto fileAsset = changeRequest->GetFileAssetInstance(); JSAddResource() local 1978 auto fileAsset = context.objectInfo->GetFileAssetInstance(); AddPhotoProxyResourceExecute() local 2106 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetFavoriteExecute() local 2121 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetHiddenExecute() local 2142 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetTitleExecute() local 2155 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetOrientationExecute() local 2172 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetUserCommentExecute() local 2192 auto fileAsset = changeRequest->GetFileAssetInstance(); SetEffectModeExecute() local 2205 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetPhotoQualityExecute() local 2220 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetLocationExecute() local 2236 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetCameraShotKeyExecute() local 2249 auto fileAsset = context.objectInfo->GetFileAssetInstance(); DiscardHighQualityPhoto() local 2276 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SaveCameraPhotoExecute() local 2308 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetVideoEnhancementAttr() local 2333 auto fileAsset = context.objectInfo->GetFileAssetInstance(); AddFiltersExecute() local 2357 auto fileAsset = context.objectInfo->GetFileAssetInstance(); DiscardCameraPhotoExecute() local 2380 auto fileAsset = context.objectInfo->GetFileAssetInstance(); SetSupportedWatermarkTypeExecute() local [all...] |
H A D | media_assets_change_request_napi.cpp | 73 CHECK_COND_WITH_MESSAGE(env, fileAssetPtr != nullptr, "fileAsset is null"); in GetAssetArray() 77 "Unsupported type of fileAsset"); in GetAssetArray() 126 for (const auto& fileAsset : fileAssets_) { in GetFileAssetUriArray() 127 uriArray.push_back(fileAsset->GetUri()); in GetFileAssetUriArray() 159 for (const auto& fileAsset : fileAssets_) { in CheckChangeOperations() 160 if (fileAsset == nullptr || fileAsset->GetId() <= 0 || fileAsset->GetUri().empty()) { in CheckChangeOperations() 161 NapiError::ThrowError(env, OHOS_INVALID_PARAM_CODE, "Invalid fileAsset to apply"); in CheckChangeOperations() 185 for (const auto& fileAsset in JSSetFavorite() [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/media_library_asset_helper_capi_test/src/ |
H A D | media_library_asset_helper_capi_test.cpp | 168 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 169 fileAsset->SetResultNapiType(OHOS::Media::ResultNapiType::TYPE_PHOTOACCESS_HELPER); in HWTEST_F() 170 fileAsset->SetMediaType(OHOS::Media::MEDIA_TYPE_IMAGE); in HWTEST_F() 171 auto mediaAssetImpl = MediaAssetFactory::CreateMediaAsset(fileAsset); in HWTEST_F() 188 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 189 fileAsset->SetResultNapiType(OHOS::Media::ResultNapiType::TYPE_PHOTOACCESS_HELPER); in HWTEST_F() 190 fileAsset->SetMediaType(OHOS::Media::MEDIA_TYPE_VIDEO); in HWTEST_F() 191 auto mediaAssetImpl = MediaAssetFactory::CreateMediaAsset(fileAsset); in HWTEST_F() 208 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 209 fileAsset in HWTEST_F() 227 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 254 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 281 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 308 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 339 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 365 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 393 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 421 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 449 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 477 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 504 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 531 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 558 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 585 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 612 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 636 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 658 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 683 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 708 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 744 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 787 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 824 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 861 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 903 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 929 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 956 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 982 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 1010 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 1041 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 1072 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local [all...] |
/foundation/multimedia/media_library/frameworks/native/c_api/ |
H A D | media_asset_helper_impl.cpp | 43 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in GetMediaAsset() local 44 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, nullptr, "create file asset failed"); in GetMediaAsset() 46 fileAsset->SetUri(uri); in GetMediaAsset() 49 fileAsset->SetId(stoi(fileId)); in GetMediaAsset() 51 fileAsset->SetDisplayName(MediaFileUtils::GetFileName(uri)); in GetMediaAsset() 53 fileAsset->SetPhotoSubType(static_cast<int32_t>(PhotoSubType::CAMERA)); in GetMediaAsset() 54 fileAsset->SetMediaType(Media::MediaType::MEDIA_TYPE_IMAGE); in GetMediaAsset() 56 fileAsset->SetPhotoSubType(static_cast<int32_t>(PhotoSubType::MOVING_PHOTO)); in GetMediaAsset() 57 fileAsset->SetMediaType(Media::MediaType::MEDIA_TYPE_IMAGE); in GetMediaAsset() 59 fileAsset in GetMediaAsset() 73 InitFileAsset(std::shared_ptr<FileAsset> fileAsset) InitFileAsset() argument 140 UpdateFileAsset(std::shared_ptr<DataShare::DataShareResultSet> resultSet, std::shared_ptr<FileAsset> fileAsset) UpdateFileAsset() argument [all...] |
H A D | media_asset_change_request_impl.cpp | 90 auto fileAsset = mediaAsset_->GetFileAssetInstance(); in GetWriteCacheHandler() local 91 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, MEDIA_LIBRARY_INTERNAL_SYSTEM_ERROR, "fileAsset get failed!"); in GetWriteCacheHandler() 111 auto fileAsset = mediaAsset_->GetFileAssetInstance(); in SaveCameraPhoto() local 112 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, MEDIA_LIBRARY_OPERATION_NOT_SUPPORTED, "fileAsset get failed!"); in SaveCameraPhoto() 121 auto fileAsset = mediaAsset_->GetFileAssetInstance(); in DiscardCameraPhoto() local 122 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, MEDIA_LIBRARY_OPERATION_NOT_SUPPORTED, "fileAsset get failed!"); in DiscardCameraPhoto() 141 auto fileAsset in AddResourceWithUri() local 163 auto fileAsset = mediaAsset_->GetFileAssetInstance(); AddResourceWithBuffer() local 193 auto fileAsset = mediaAsset_->GetFileAssetInstance(); ApplyChanges() local 217 auto fileAsset = mediaAsset_->GetFileAssetInstance(); IsMovingPhoto() local 246 auto fileAsset = mediaAsset_->GetFileAssetInstance(); OpenWriteCacheHandler() local 284 auto fileAsset = mediaAsset_->GetFileAssetInstance(); CheckChangeOperations() local 353 auto fileAsset = mediaAsset_->GetFileAssetInstance(); SaveCameraPhotoExecute() local 379 auto fileAsset = mediaAsset_->GetFileAssetInstance(); DiscardCameraPhotoExecute() local 409 auto fileAsset = mediaAsset_->GetFileAssetInstance(); CopyToMediaLibrary() local 505 auto fileAsset = mediaAsset_->GetFileAssetInstance(); SubmitCache() local 611 auto fileAsset = mediaAsset_->GetFileAssetInstance(); DiscardHighQualityPhoto() local [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/media_asset_test/src/ |
H A D | media_asset_test.cpp | 48 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 49 auto mediaAssetImpl = MediaAssetFactory::CreateMediaAsset(fileAsset); in HWTEST_F() 60 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 61 auto mediaAssetImpl = MediaAssetFactory::CreateMediaAsset(fileAsset); in HWTEST_F() 70 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 71 auto mediaAssetImpl = MediaAssetFactory::CreateMediaAsset(fileAsset); in HWTEST_F() 82 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 83 auto mediaAssetImpl = MediaAssetFactory::CreateMediaAsset(fileAsset); in HWTEST_F() 92 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); in HWTEST_F() local 93 auto mediaAssetImpl = MediaAssetFactory::CreateMediaAsset(fileAsset); in HWTEST_F() 103 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 116 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 127 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 140 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 151 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 164 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 175 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 188 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 199 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 212 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 228 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 240 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 253 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 264 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 274 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 285 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 298 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 309 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 322 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 333 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 346 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 357 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 370 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 381 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 394 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 405 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 418 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local 430 std::shared_ptr<FileAsset> fileAsset = std::make_shared<FileAsset>(); HWTEST_F() local [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/ |
H A D | medialibrary_audio_operations.cpp | 71 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(*(cmd.GetAbsRdbPredicates()), in Delete() local 73 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, E_INVALID_FILEID, "Get fileAsset failed, fileId: %{private}s", in Delete() 76 int32_t deleteRow = DeleteAudio(fileAsset, cmd.GetApi()); in Delete() 114 shared_ptr<FileAsset> fileAsset = GetFileAssetByUri(uriString, false, AUDIO_COLUMN_VECTOR, pendingStatus); in Open() local 115 if (fileAsset == nullptr) { in Open() 121 return OpenAsset(fileAsset, mode, MediaLibraryApi::API_10); in Open() 123 return OpenAsset(fileAsset, mode, cmd.GetApi()); in Open() 135 shared_ptr<FileAsset> fileAsset = GetFileAssetByUri(uriString, false, AUDIO_COLUMN_VECTOR, pendingStatus); in Close() local 136 if (fileAsset in Close() 154 FileAsset fileAsset; CreateV9() local 206 FileAsset fileAsset; CreateV10() local 259 DeleteAudio(const shared_ptr<FileAsset> &fileAsset, MediaLibraryApi api) DeleteAudio() argument 305 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(*(cmd.GetAbsRdbPredicates()), UpdateV10() local 352 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(*(cmd.GetAbsRdbPredicates()), UpdateV9() local [all...] |
H A D | medialibrary_smartalbum_map_operations.cpp | 113 unique_ptr<FileAsset> fileAsset = fetchFileResult->GetObjectFromRdb(resultSet, row); in HandleAgingOperation() local 114 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, E_HAS_DB_ERROR, "Get fileAsset failed"); in HandleAgingOperation() 116 if (fileAsset->GetIsTrash() == TRASHED_ASSET) { in HandleAgingOperation() 117 errCode = MediaLibraryObjectUtils::DeleteFileObj(move(fileAsset)); in HandleAgingOperation() 118 } else if (fileAsset->GetIsTrash() == TRASHED_DIR) { in HandleAgingOperation() 119 errCode = MediaLibraryObjectUtils::DeleteDirObj(move(fileAsset)); in HandleAgingOperation() 122 errCode = MediaLibraryObjectUtils::DeleteInfoByIdInDb(cmd, to_string(fileAsset->GetId())); in HandleAgingOperation() 148 shared_ptr<FileAsset> fileAsset = MediaLibraryObjectUtils::GetFileAssetFromId(to_string(assetId)); in MakeRecycleDisplayName() local 149 if (fileAsset in MakeRecycleDisplayName() 297 RecycleDir(const shared_ptr<FileAsset> &fileAsset) RecycleDir() argument 358 RecycleDirAssetsInfoUtil(const shared_ptr<FileAsset> &fileAsset) RecycleDirAssetsInfoUtil() argument 375 RecycleFile(const shared_ptr<FileAsset> &fileAsset) RecycleFile() argument 424 RecycleFileAssetsInfoUtil(const shared_ptr<FileAsset> &fileAsset) RecycleFileAssetsInfoUtil() argument 441 shared_ptr<FileAsset> fileAsset = MediaLibraryObjectUtils::GetFileAssetFromId(to_string(fileAssetId)); RemoveTrashAssetsInfoUtil() local 574 shared_ptr<FileAsset> fileAsset = MediaLibraryObjectUtils::GetFileAssetFromId(to_string(fileAssetId)); InsertTrashAssetsInfoUtil() local [all...] |
H A D | medialibrary_asset_operations.cpp | 374 auto fileAsset = make_shared<FileAsset>(); in FetchFileAssetFromResultSet() local 375 auto &map = fileAsset->GetMemberMap(); in FetchFileAssetFromResultSet() 413 return fileAsset; in FetchFileAssetFromResultSet() 441 auto fileAsset = FetchFileAssetFromResultSet(resultSet, columns); in GetAssetVectorFromResultSet() local 442 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, E_HAS_DB_ERROR, "Failed to fetch fileAsset from resultSet"); in GetAssetVectorFromResultSet() 443 fileAssetVector.push_back(fileAsset); in GetAssetVectorFromResultSet() 698 shared_ptr<FileAsset> fileAsset = make_shared<FileAsset>(); in GetFileAssetByUri() local 702 fileAsset = GetFileAssetFromDb(MediaColumn::MEDIA_ID, id, OperationObject::FILESYSTEM_PHOTO, columns); in GetFileAssetByUri() 704 fileAsset in GetFileAssetByUri() 742 GetAssetPackageName(const FileAsset &fileAsset, const string &bundleName) GetAssetPackageName() argument 769 HandleCallingPackage(MediaLibraryCommand &cmd, const FileAsset &fileAsset, ValuesBucket &outValues) HandleCallingPackage() argument 874 FillAssetInfo(MediaLibraryCommand &cmd, const FileAsset &fileAsset) FillAssetInfo() argument 931 InsertAssetInDb(MediaLibraryCommand &cmd, const FileAsset &fileAsset) InsertAssetInDb() argument 1084 SetAssetPathInCreate(FileAsset &fileAsset) SetAssetPathInCreate() argument 1103 SetAssetPath(FileAsset &fileAsset, const string &extension) SetAssetPath() argument 1148 UpdateFileName(MediaLibraryCommand &cmd, const shared_ptr<FileAsset> &fileAsset, bool &isNameChanged) UpdateFileName() argument 1191 SetUserComment(MediaLibraryCommand &cmd, const shared_ptr<FileAsset> &fileAsset) SetUserComment() argument 1229 UpdateRelativePath(MediaLibraryCommand &cmd, const shared_ptr<FileAsset> &fileAsset, bool &isNameChanged) UpdateRelativePath() argument 1260 UpdateVirtualPath(MediaLibraryCommand &cmd, const shared_ptr<FileAsset> &fileAsset) UpdateVirtualPath() argument 1316 SetPendingTime(const shared_ptr<FileAsset> &fileAsset, int64_t pendingTime) SetPendingTime() argument 1339 CreateFileAndSetPending(const shared_ptr<FileAsset> &fileAsset, int64_t pendingTime) CreateFileAndSetPending() argument 1350 SolvePendingStatus(const shared_ptr<FileAsset> &fileAsset, const string &mode) SolvePendingStatus() argument 1408 OpenAsset(const shared_ptr<FileAsset> &fileAsset, const string &mode, MediaLibraryApi api, bool isMovingPhotoVideo) OpenAsset() argument 1462 CloseAsset(const shared_ptr<FileAsset> &fileAsset, bool isCreateThumbSync) CloseAsset() argument 1513 shared_ptr<FileAsset> fileAsset = make_shared<FileAsset>(); OpenHighlightCover() local 1531 shared_ptr<FileAsset> fileAsset = make_shared<FileAsset>(); OpenHighlightVideo() local 1732 SendFavoriteNotify(MediaLibraryCommand &cmd, shared_ptr<FileAsset> &fileAsset, const string &extraUri) SendFavoriteNotify() argument 1825 SetPendingTrue(const shared_ptr<FileAsset> &fileAsset) SetPendingTrue() argument 1863 SetPendingFalse(const shared_ptr<FileAsset> &fileAsset) SetPendingFalse() argument 1904 auto fileAsset = GetFileAssetFromDb(*(cmd.GetAbsRdbPredicates()), cmd.GetOprnObject(), columns); SetPendingStatus() local 1975 CreateExtUriForV10Asset(FileAsset &fileAsset) CreateExtUriForV10Asset() argument [all...] |
H A D | medialibrary_photo_operations.cpp | 167 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(*(cmd.GetAbsRdbPredicates()), in Delete() local 169 CHECK_AND_RETURN_RET_LOG(fileAsset != nullptr, E_INVALID_FILEID, "Get fileAsset failed, fileId: %{private}s", in Delete() 171 int32_t deleteRow = DeletePhoto(fileAsset, cmd.GetApi()); in Delete() 385 static int32_t ProcessMovingPhotoOprnKey(MediaLibraryCommand& cmd, shared_ptr<FileAsset>& fileAsset, const string& id, in ProcessMovingPhotoOprnKey() argument 391 CHECK_AND_RETURN_RET_LOG(CheckOpenMovingPhoto(fileAsset->GetPhotoSubType(), in ProcessMovingPhotoOprnKey() 392 fileAsset->GetMovingPhotoEffectMode(), cmd.GetQuerySetParam(MEDIA_OPERN_KEYWORD)), in ProcessMovingPhotoOprnKey() 395 id.c_str(), fileAsset->GetPhotoSubType()); in ProcessMovingPhotoOprnKey() 396 string imagePath = fileAsset->GetPath(); in ProcessMovingPhotoOprnKey() 397 fileAsset in ProcessMovingPhotoOprnKey() 452 shared_ptr<FileAsset> fileAsset = GetFileAssetByUri(uriString, true, PHOTO_COLUMN_VECTOR, pendingStatus); Open() local 479 shared_ptr<FileAsset> fileAsset = GetFileAssetByUri(uriString, true, PHOTO_COLUMN_VECTOR, pendingStatus); Close() local 496 SetPhotoTypeByRelativePath(const string &relativePath, FileAsset &fileAsset) SetPhotoTypeByRelativePath() argument 509 SetPhotoSubTypeFromCmd(MediaLibraryCommand &cmd, FileAsset &fileAsset) SetPhotoSubTypeFromCmd() argument 519 SetCameraShotKeyFromCmd(MediaLibraryCommand &cmd, FileAsset &fileAsset) SetCameraShotKeyFromCmd() argument 539 SetCallingPackageName(MediaLibraryCommand &cmd, FileAsset &fileAsset) SetCallingPackageName() argument 555 FileAsset fileAsset; CreateV9() local 610 SolvePhotoAlbumInCreate(MediaLibraryCommand &cmd, FileAsset &fileAsset) SolvePhotoAlbumInCreate() argument 621 SetAssetDisplayName(const string &displayName, FileAsset &fileAsset, bool &isContains) SetAssetDisplayName() argument 629 FileAsset fileAsset; CreateV10() local 679 DeletePhoto(const shared_ptr<FileAsset> &fileAsset, MediaLibraryApi api) DeletePhoto() argument 904 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, fileId, SaveCameraPhoto() local 1114 CreateImageSource( const std::shared_ptr<FileAsset> &fileAsset, std::unique_ptr<ImageSource> &imageSource) CreateImageSource() argument 1135 UpdateOrientationAllExif( MediaLibraryCommand &cmd, const std::shared_ptr<FileAsset> &fileAsset, string ¤tOrientation) UpdateOrientationAllExif() argument 1184 UpdateOrientationExif(MediaLibraryCommand &cmd, const shared_ptr<FileAsset> &fileAsset, bool &orientationUpdated, string ¤tOrientation) UpdateOrientationExif() argument 1347 RevertOrientation(const shared_ptr<FileAsset> &fileAsset, string ¤tOrientation) RevertOrientation() argument 1385 CreateThumbnailFileScan(const shared_ptr<FileAsset> &fileAsset, string &extraUri, bool orientationUpdated, bool isNeedScan) CreateThumbnailFileScan() argument 1429 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(*(cmd.GetAbsRdbPredicates()), UpdateFileAsset() local 1524 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(*(cmd.GetAbsRdbPredicates()), UpdateV9() local 1631 CheckFileAssetStatus(const shared_ptr<FileAsset>& fileAsset, bool checkMovingPhoto = false) CheckFileAssetStatus() argument 1652 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, id, RequestEditData() local 1701 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, id, RequestEditSource() local 1740 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, id, CommitEditOpen() local 1757 CommitEditOpenExecute(const shared_ptr<FileAsset> &fileAsset) CommitEditOpenExecute() argument 1901 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, to_string(fileId), UpdateExtension() local 1991 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, to_string(id), CommitEditInsert() local 2020 CommitEditInsertExecute(const shared_ptr<FileAsset> &fileAsset, const string &editData) CommitEditInsertExecute() argument 2067 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, to_string(fileId), RevertToOrigin() local 2131 DoRevertEdit(const std::shared_ptr<FileAsset> &fileAsset) DoRevertEdit() argument 2235 RevertMovingPhotoVideo(const std::shared_ptr<FileAsset> &fileAsset, const string &path, const string &sourceVideoPath, int32_t subtype) RevertMovingPhotoVideo() argument 2254 IsNeedRevertEffectMode(MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset, int32_t& effectMode) IsNeedRevertEffectMode() argument 2287 RevertToOriginalEffectMode( MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset, bool& isNeedScan) RevertToOriginalEffectMode() argument 2509 SaveSourceAndEditData( const shared_ptr<FileAsset>& fileAsset, const string& editData) SaveSourceAndEditData() argument 2551 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb( GetFileAsset() local 2618 shared_ptr<FileAsset> fileAsset = GetFileAsset(cmd); AddFilters() local 2676 auto fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, to_string(fileId), SavePicture() local 2697 AddFiltersExecute(MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset, const string& cachePath) AddFiltersExecute() argument 2773 SubmitEditCacheExecute(MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset, const string& cachePath) SubmitEditCacheExecute() argument 2814 SubmitCacheExecute(MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset, const string& cachePath) SubmitCacheExecute() argument 2853 SaveSourceVideoFile(MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset, const string& assetPath) SaveSourceVideoFile() argument 2872 SubmitEditMovingPhotoExecute(MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset) SubmitEditMovingPhotoExecute() argument 2903 GetMovingPhotoCachePath(MediaLibraryCommand& cmd, const shared_ptr<FileAsset>& fileAsset, string& imageCachePath, string& videoCachePath) GetMovingPhotoCachePath() argument 2959 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb(PhotoColumn::MEDIA_ID, to_string(id), SubmitEffectModeExecute() local 3040 shared_ptr<FileAsset> fileAsset = GetFileAssetFromDb( SubmitCache() local [all...] |
H A D | medialibrary_object_utils.cpp | 144 const FileAsset &fileAsset, const NativeAlbumAsset &dirAsset) in InsertFileInDb() 153 string displayName = fileAsset.GetDisplayName(); in InsertFileInDb() 155 assetInfo.PutInt(MEDIA_DATA_DB_MEDIA_TYPE, fileAsset.GetMediaType()); in InsertFileInDb() 156 assetInfo.PutString(MEDIA_DATA_DB_URI, MediaFileUtils::GetMediaTypeUri(fileAsset.GetMediaType())); in InsertFileInDb() 159 assetInfo.PutString(MEDIA_DATA_DB_RELATIVE_PATH, fileAsset.GetRelativePath()); in InsertFileInDb() 163 if (stat(fileAsset.GetPath().c_str(), &statInfo) == 0) { in InsertFileInDb() 168 assetInfo.PutString(MEDIA_DATA_DB_FILE_PATH, fileAsset.GetPath()); in InsertFileInDb() 180 assetInfo.PutLong(MEDIA_DATA_DB_TIME_PENDING, fileAsset.GetTimePending()); in InsertFileInDb() 206 int32_t MediaLibraryObjectUtils::BuildFileAsset(MediaLibraryCommand &cmd, FileAsset &fileAsset, in BuildFileAsset() argument 221 fileAsset in BuildFileAsset() 143 InsertFileInDb(MediaLibraryCommand &cmd, const FileAsset &fileAsset, const NativeAlbumAsset &dirAsset) InsertFileInDb() argument 257 FileAsset fileAsset; CreateFileObj() local 555 DeleteFileObj(const shared_ptr<FileAsset> &fileAsset) DeleteFileObj() argument 580 DeleteInfoRecursively(const shared_ptr<FileAsset> &fileAsset) DeleteInfoRecursively() argument 805 shared_ptr<FileAsset> fileAsset = GetFileAssetFromUri(uriString); OpenFile() local 893 auto fileAsset = GetFileAssetFromId(strFileId); CloseFile() local 1431 auto fileAsset = GetFileAssetFromUri(tempUri); CheckUriPending() local 1512 unique_ptr<FileAsset> fileAsset = fetchFileResult->GetObjectFromRdb(resultSet, row); GetFileResult() local [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_tool/src/command/ |
H A D | recv_command_v10.cpp | 35 static bool GetWriteFilePath(const ExecEnv &env, const FileAsset &fileAsset, std::string &wFilePath) in GetWriteFilePath() argument 45 string displayName = fileAsset.GetDisplayName(); in GetWriteFilePath() 55 static int32_t RecvFile(const ExecEnv &env, const FileAsset &fileAsset) in RecvFile() argument 58 if (!GetWriteFilePath(env, fileAsset, wFilePath)) { in RecvFile() 66 auto rfd = UserFileClientEx::Open(fileAsset.GetUri(), Media::MEDIA_FILEMODE_READONLY); in RecvFile() 68 printf("%s open failed. uri:%s\n", STR_FAIL.c_str(), fileAsset.GetUri().c_str()); in RecvFile() 74 printf("%s receive data failed. uri:%s\n", STR_FAIL.c_str(), fileAsset.GetUri().c_str()); in RecvFile() 78 UserFileClientEx::Close(fileAsset.GetUri(), rfd, Media::MEDIA_FILEMODE_READONLY); in RecvFile() 107 auto fileAsset = fetchResult->GetFirstObject(); in RecvAsset() local 108 RecvFile(env, *fileAsset); in RecvAsset() 134 auto fileAsset = fetchResult->GetObjectAtPosition(index); RecvAssets() local [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/album_count_cover_test/src/ |
H A D | album_count_cover_test.cpp | 384 int32_t TrashFileAsset(const unique_ptr<FileAsset> &fileAsset, bool trashState) in TrashFileAsset() argument 387 predicates.EqualTo(PhotoColumn::MEDIA_ID, fileAsset->GetUri()); in TrashFileAsset() 406 int32_t HideFileAsset(const unique_ptr<FileAsset> &fileAsset, bool hiddenState) in HideFileAsset() argument 410 predicates.EqualTo(PhotoColumn::MEDIA_ID, fileAsset->GetUri()); in HideFileAsset() 472 int32_t AlbumAddAssets(unique_ptr<PhotoAlbum> &album, unique_ptr<FileAsset> &fileAsset) in AlbumAddAssets() argument 477 values.Put(MediaColumn::MEDIA_ID, fileAsset->GetUri()); in AlbumAddAssets() 486 int32_t AlbumRemoveAssets(unique_ptr<PhotoAlbum> &album, unique_ptr<FileAsset> &fileAsset) in AlbumRemoveAssets() argument 491 predicates.EqualTo(MediaColumn::MEDIA_ID, fileAsset->GetUri()); in AlbumRemoveAssets() 556 auto fileAsset = CreateImageAsset("Test_Create_Image_001.jpg"); in HWTEST_F() local 557 EXPECT_NE(fileAsset, nullpt in HWTEST_F() 627 auto fileAsset = CreateImageAsset("Test_Hidden_Image_001.jpg"); HWTEST_F() local 681 auto fileAsset = CreateImageAsset("Test_Trash_Image_001.jpg"); HWTEST_F() local 747 auto fileAsset = CreateVideoAsset("Test_Videos_001.mp4", false); HWTEST_F() local [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_fileext_test/src/ |
H A D | medialibrary_fileext_test.cpp | 176 Uri fileAsset(""); in HWTEST_F() 180 ASSERT_EQ(mediaFileExtAbility->CreateFile(parentUri, "OpenFile_test_001.jpg", fileAsset), E_SUCCESS); in HWTEST_F() 182 auto ret = mediaFileExtAbility->OpenFile(fileAsset, O_RDWR, fd); in HWTEST_F() 183 MEDIA_DEBUG_LOG("medialib_OpenFile_test_001 fileAsset: %{public}s, fd: %{public}d", in HWTEST_F() 184 fileAsset.ToString().c_str(), fd); in HWTEST_F() 316 shared_ptr<FileAsset> fileAsset = nullptr; in HWTEST_F() local 317 ASSERT_EQ(MediaLibraryUnitTestUtils::CreateFile("CreateFile_test_005.jpg", albumAsset, fileAsset), true); in HWTEST_F() 501 shared_ptr<FileAsset> fileAsset = nullptr; in HWTEST_F() local 502 ASSERT_EQ(MediaLibraryUnitTestUtils::CreateFile("Delete_test_001.jpg", albumAsset, fileAsset), true); in HWTEST_F() 503 Uri sourceUri(fileAsset in HWTEST_F() 532 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 569 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 597 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 625 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 643 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 697 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 724 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 752 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 789 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 816 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 871 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 889 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 909 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 1339 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 1406 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local 1456 shared_ptr<FileAsset> fileAsset = nullptr; HWTEST_F() local [all...] |
/foundation/multimedia/media_library/frameworks/services/media_mtp/src/ |
H A D | mtp_medialibrary_manager.cpp | 100 unique_ptr<FileAsset> fileAsset = fetchFileResult->GetObjectAtPosition(row); in GetHandles() local 101 outHandles.push_back(fileAsset->GetId()); in GetHandles() 149 unique_ptr<FileAsset> fileAsset = fetchFileResult->GetFirstObject(); in GetHandles() local 150 while (fileAsset != nullptr) { in GetHandles() 151 outHandles->push_back(fileAsset->GetId()); in GetHandles() 152 fileAsset = fetchFileResult->GetNextObject(); in GetHandles() 182 unique_ptr<FileAsset> fileAsset = fetchFileResult->GetFirstObject(); in GetObjectInfo() local 183 return SetObjectInfo(fileAsset, outObjectInfo); in GetObjectInfo() 186 int32_t MtpMedialibraryManager::SetObjectInfo(const unique_ptr<FileAsset> &fileAsset, in SetObjectInfo() argument 191 outObjectInfo->handle = fileAsset in SetObjectInfo() 327 shared_ptr<FileAsset> fileAsset; GetPathById() local 366 shared_ptr<FileAsset> fileAsset; SendObjectInfo() local 408 shared_ptr<FileAsset> fileAsset; MoveObject() local 462 shared_ptr<FileAsset> fileAsset; SetObjectPropValue() local 501 shared_ptr<FileAsset> fileAsset; CloseFd() local 629 unique_ptr<FileAsset> fileAsset = fetchFileResult->GetObjectAtPosition(row); GetRootIdList() local [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/include/ |
H A D | medialibrary_photo_operations.h | 73 static int32_t DeletePhoto(const std::shared_ptr<FileAsset> &fileAsset, MediaLibraryApi api); 77 static void SolvePhotoAlbumInCreate(MediaLibraryCommand &cmd, FileAsset &fileAsset); 84 static int32_t CommitEditOpenExecute(const std::shared_ptr<FileAsset> &fileAsset); 85 static int32_t CommitEditInsertExecute(const std::shared_ptr<FileAsset> &fileAsset, 87 static int32_t DoRevertEdit(const std::shared_ptr<FileAsset> &fileAsset); 88 static int32_t RevertMovingPhotoVideo(const std::shared_ptr<FileAsset> &fileAsset, 92 static void CreateThumbnailFileScan(const std::shared_ptr<FileAsset> &fileAsset, std::string &extraUri, 100 static int32_t SaveSourceAndEditData(const std::shared_ptr<FileAsset> &fileAsset, const std::string &editData); 101 static int32_t SaveSourceVideoFile(MediaLibraryCommand &cmd, const std::shared_ptr<FileAsset> &fileAsset, 103 static int32_t AddFiltersExecute(MediaLibraryCommand& cmd, const std::shared_ptr<FileAsset>& fileAsset, [all...] |
H A D | medialibrary_meta_recovery.h | 73 EXPORT int32_t WriteMetadataToFile(const std::string &filePath, const FileAsset &fileAsset); 74 EXPORT int32_t ReadMetadataFromFile(const std::string &filePath, FileAsset &fileAsset); 75 void AddMetadataToJson(nlohmann::json &j, const FileAsset &fileAsset); 76 bool GetMetadataFromJson(const nlohmann::json &j, FileAsset &fileAsset); 91 int32_t InsertMetadataInDbRetry(const FileAsset &fileAsset); 92 int32_t InsertMetadataInDb(const FileAsset &fileAsset);
|
H A D | medialibrary_asset_operations.h | 159 static int32_t InsertAssetInDb(MediaLibraryCommand &cmd, const FileAsset &fileAsset); 166 EXPORT static int32_t SetAssetPathInCreate(FileAsset &fileAsset); 167 EXPORT static int32_t SetAssetPath(FileAsset &fileAsset, const std::string &extention); 170 EXPORT static int32_t UpdateFileName(MediaLibraryCommand &cmd, const std::shared_ptr<FileAsset> &fileAsset, 172 EXPORT static int32_t SetUserComment(MediaLibraryCommand &cmd, const std::shared_ptr<FileAsset> &fileAsset); 173 EXPORT static int32_t UpdateRelativePath(MediaLibraryCommand &cmd, const std::shared_ptr<FileAsset> &fileAsset, 175 static void UpdateVirtualPath(MediaLibraryCommand &cmd, const std::shared_ptr<FileAsset> &fileAsset); 177 EXPORT static int32_t OpenAsset(const std::shared_ptr<FileAsset> &fileAsset, const std::string &mode, 181 EXPORT static int32_t CloseAsset(const std::shared_ptr<FileAsset> &fileAsset, bool isCreateThumbSync = false); 184 static void SendFavoriteNotify(MediaLibraryCommand &cmd, std::shared_ptr<FileAsset> &fileAsset, [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/media_library_helper/src/ |
H A D | fetch_result.cpp | 381 void FetchResult<T>::SetAssetUri(FileAsset *fileAsset) in SetAssetUri() argument 386 string extrUri = MediaFileUtils::GetExtraUri(fileAsset->GetDisplayName(), fileAsset->GetPath(), false); in SetAssetUri() 387 MediaFileUri fileUri(fileAsset->GetMediaType(), to_string(fileAsset->GetId()), in SetAssetUri() 392 if (MediaFileUtils::IsFileTablePath(fileAsset->GetPath())) { in SetAssetUri() 393 MediaFileUri fileUri(MediaType::MEDIA_TYPE_FILE, to_string(fileAsset->GetId()), networkId_); in SetAssetUri() 396 MediaFileUri fileUri(fileAsset->GetMediaType(), to_string(fileAsset->GetId()), networkId_); in SetAssetUri() 400 MediaFileUri fileUri(fileAsset in SetAssetUri() 415 SetFileAsset(FileAsset *fileAsset, shared_ptr<NativeRdb::ResultSet> &resultSet) SetFileAsset() argument [all...] |
/foundation/multimedia/media_library/frameworks/services/media_cloud_enhancement/src/enhancement_service/ |
H A D | enhancement_service_callback.cpp | 79 static int32_t SetAssetPathInCreate(FileAsset &fileAsset)
in SetAssetPathInCreate() argument 81 if (!fileAsset.GetPath().empty()) {
in SetAssetPathInCreate() 84 string extension = MediaFileUtils::GetExtensionFromPath(fileAsset.GetDisplayName());
in SetAssetPathInCreate() 86 int32_t uniqueId = MediaLibraryAssetOperations::CreateAssetUniqueId(fileAsset.GetMediaType());
in SetAssetPathInCreate() 87 int32_t errCode = MediaLibraryAssetOperations::CreateAssetPathById(uniqueId, fileAsset.GetMediaType(),
in SetAssetPathInCreate() 95 fileAsset.SetPath(filePath);
in SetAssetPathInCreate() 161 FileAsset fileAsset;
in CreateCloudEnhancementPhoto() local 162 fileAsset.SetDisplayName(info->displayName);
in CreateCloudEnhancementPhoto() 163 fileAsset.SetTimePending(UNCREATE_FILE_TIMEPENDING);
in CreateCloudEnhancementPhoto() 164 fileAsset in CreateCloudEnhancementPhoto() [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_unittest_utils/src/ |
H A D | medialibrary_unittest_utils.cpp | 126 bool MediaLibraryUnitTestUtils::GetFileAsset(const int fileId, shared_ptr<FileAsset> &fileAsset) in GetFileAsset() argument 151 fileAsset = move(firstAsset); in GetFileAsset() 152 if (fileAsset == nullptr) { in GetFileAsset() 153 MEDIA_ERR_LOG("GetFileAsset::fileAsset = nullptr."); in GetFileAsset() 191 shared_ptr<FileAsset> &fileAsset) in CreateFile() 213 if (!GetFileAsset(retVal, fileAsset)) { in CreateFile() 257 void MediaLibraryUnitTestUtils::TrashFile(shared_ptr<FileAsset> &fileAsset) in TrashFile() argument 261 valuesBucket.Put(SMARTALBUMMAP_DB_CHILD_ASSET_ID, fileAsset->GetId()); in TrashFile() 269 void MediaLibraryUnitTestUtils::RecoveryFile(shared_ptr<FileAsset> &fileAsset) in RecoveryFile() argument 273 valuesBucket.Put(SMARTALBUMMAP_DB_CHILD_ASSET_ID, fileAsset in RecoveryFile() 190 CreateFile(string displayName, shared_ptr<FileAsset> parentAlbumAsset, shared_ptr<FileAsset> &fileAsset) CreateFile() argument [all...] |
/foundation/multimedia/media_library/frameworks/services/media_file_extension/src/ |
H A D | media_file_extention_utils.cpp | 1119 int32_t HandleFileRename(const shared_ptr<FileAsset> &fileAsset) in HandleFileRename() argument 1125 valuesBucket.Put(MEDIA_DATA_DB_MEDIA_TYPE, fileAsset->GetMediaType()); in HandleFileRename() 1127 string fileUri = fileAsset->GetUri() + SLASH_CHAR + to_string(MediaFileUtils::GetVirtualIdByType( in HandleFileRename() 1128 fileAsset->GetId(), MediaType::MEDIA_TYPE_FILE)); in HandleFileRename() 1130 string fileUri = fileAsset->GetUri() + SLASH_CHAR + to_string(fileAsset->GetId()); in HandleFileRename() 1133 valuesBucket.Put(MEDIA_DATA_DB_NAME, fileAsset->GetDisplayName()); in HandleFileRename() 1134 valuesBucket.Put(MEDIA_DATA_DB_RELATIVE_PATH, fileAsset->GetRelativePath()); in HandleFileRename() 1136 predicates.SetWhereArgs({ to_string(fileAsset->GetId()) }); in HandleFileRename() 1200 int32_t HandleAlbumRename(const shared_ptr<FileAsset> &fileAsset) in HandleAlbumRename() argument 1248 auto fileAsset = make_shared<FileAsset>(); Rename() local 1282 HandleFileMove(const shared_ptr<FileAsset> &fileAsset, const string &destRelativePath) HandleFileMove() argument 1310 UpdateMovedAlbumInfo(const shared_ptr<FileAsset> &fileAsset, const string &bucketId, const string &newAlbumPath, const string &destRelativePath) UpdateMovedAlbumInfo() argument 1326 HandleAlbumMove(const shared_ptr<FileAsset> &fileAsset, const string &destRelativePath, const string &bucketId) HandleAlbumMove() argument 1394 CheckRootDir(const shared_ptr<FileAsset> &fileAsset, const string &destRelPath) CheckRootDir() argument 1442 auto fileAsset = make_shared<FileAsset>(); Move() local [all...] |
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_unittest_utils/include/ |
H A D | medialibrary_unittest_utils.h | 57 static bool GetFileAsset(const int fileId, std::shared_ptr<FileAsset> &fileAsset); 61 std::shared_ptr<FileAsset> &fileAsset); 64 static void TrashFile(std::shared_ptr<FileAsset> &fileAsset); 65 static void RecoveryFile(std::shared_ptr<FileAsset> &fileAsset);
|