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_SMART_ALBUM_ASSET_H_ 17 #define INTERFACES_INNERKITS_NATIVE_INCLUDE_SMART_ALBUM_ASSET_H_ 18 19 #include <string> 20 #include <vector> 21 22 #include "medialibrary_type_const.h" 23 namespace OHOS { 24 namespace Media { 25 #define EXPORT __attribute__ ((visibility ("default"))) 26 /** 27 * @brief Data class for album details 28 * 29 * @since 1.0 30 * @version 1.0 31 */ 32 class SmartAlbumAsset { 33 public: 34 EXPORT SmartAlbumAsset(); 35 EXPORT virtual ~SmartAlbumAsset(); 36 37 EXPORT void SetAlbumId(const int32_t albumId); 38 EXPORT void SetAlbumName(const std::string &albumName); 39 EXPORT void SetAlbumUri(const std::string &albumUri); 40 EXPORT void SetAlbumTag(const std::string &albumTag); 41 EXPORT void SetAlbumCapacity(const int32_t albumCapacity); 42 EXPORT void SetAlbumDateModified(const int64_t albumDateModified); 43 EXPORT void SetCategoryId(const int32_t categoryId); 44 EXPORT void SetCategoryName(const std::string &categoryName); 45 EXPORT void SetCoverUri(const std::string &coverUri); 46 EXPORT void SetAlbumPrivateType(const PrivateAlbumType albumPrivateType); 47 EXPORT void SetResultNapiType(const ResultNapiType type); 48 EXPORT void SetDescription(const std::string &description); 49 EXPORT void SetExpiredTime(const int32_t expiredTime); 50 51 EXPORT int32_t GetAlbumId() const; 52 EXPORT std::string GetAlbumName() const; 53 EXPORT std::string GetAlbumUri() const; 54 EXPORT std::string GetAlbumTag() const; 55 EXPORT int32_t GetAlbumCapacity() const; 56 EXPORT int64_t GetAlbumDateModified() const; 57 EXPORT int32_t GetCategoryId() const; 58 EXPORT std::string GetCategoryName() const; 59 EXPORT std::string GetCoverUri() const; 60 EXPORT PrivateAlbumType GetAlbumPrivateType() const; 61 EXPORT ResultNapiType GetResultNapiType() const; 62 EXPORT std::string GetDescription() const; 63 EXPORT int32_t GetExpiredTime() const; 64 65 private: 66 int32_t albumId_; 67 std::string albumName_; 68 std::string albumUri_; 69 std::string albumTag_; 70 PrivateAlbumType albumPrivateType_; 71 int32_t albumCapacity_; 72 int32_t categoryId_; 73 int64_t albumDateModified_; 74 ResultNapiType resultNapiType_; 75 std::string categoryName_; 76 std::string coverUri_; 77 std::string description_; 78 int32_t expiredTime_; 79 }; 80 } // namespace Media 81 } // namespace OHOS 82 83 #endif // INTERFACES_INNERKITS_NATIVE_INCLUDE_SMART_ALBUM_ASSET_H_ 84