1 /* 2 * Copyright (C) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef INTERFACES_INNERKITS_NATIVE_INCLUDE_NATIVE_ALBUM_ASSET_H_ 17 #define INTERFACES_INNERKITS_NATIVE_INCLUDE_NATIVE_ALBUM_ASSET_H_ 18 19 #include <string> 20 #include <vector> 21 22 namespace OHOS { 23 namespace Media { 24 #define EXPORT __attribute__ ((visibility ("default"))) 25 using namespace std; 26 /** 27 * @brief Data class for album details 28 * 29 * @since 1.0 30 * @version 1.0 31 */ 32 class NativeAlbumAsset { 33 public: 34 EXPORT NativeAlbumAsset(); 35 EXPORT virtual ~NativeAlbumAsset(); 36 37 EXPORT void SetAlbumId(const int32_t albumId); 38 EXPORT void SetAlbumName(const string albumName); 39 EXPORT void SetAlbumUri(const string albumUri); 40 EXPORT void SetAlbumDateModified(const int64_t albumDateModified); 41 EXPORT void SetCount(const int32_t count); 42 EXPORT void SetAlbumRelativePath(const string albumRelativePath); 43 EXPORT void SetCoverUri(const string coverUri); 44 EXPORT void SetAlbumPath(const string albumPath); 45 EXPORT int32_t GetAlbumId() const; 46 EXPORT string GetAlbumName() const; 47 EXPORT string GetAlbumUri() const; 48 EXPORT int64_t GetAlbumDateModified() const; 49 EXPORT int32_t GetCount() const; 50 EXPORT string GetAlbumRelativePath() const; 51 EXPORT string GetCoverUri() const; 52 EXPORT string GetAlbumPath() const; 53 EXPORT bool CreateAlbumAsset(); 54 EXPORT bool DeleteAlbumAsset(const std::string &albumUri); 55 EXPORT bool ModifyAlbumAsset(const std::string &albumUri); 56 57 private: 58 int32_t albumId_; 59 std::string albumName_; 60 string albumUri_; 61 int64_t albumDateModified_; 62 int32_t count_; 63 string albumRelativePath_; 64 string coverUri_; 65 string albumPath_; 66 }; 67 } // namespace Media 68 } // namespace OHOS 69 70 #endif // INTERFACES_INNERKITS_NATIVE_INCLUDE_NATIVE_ALBUM_ASSET_H_ 71