• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "smart_album_asset.h"
17 
18 #include "medialibrary_type_const.h"
19 
20 using namespace std;
21 
22 namespace OHOS {
23 namespace Media {
SmartAlbumAsset()24 SmartAlbumAsset::SmartAlbumAsset()
25 {
26     albumId_ = DEFAULT_ALBUM_ID;
27     albumName_ = DEFAULT_ALBUM_NAME;
28     albumUri_ = DEFAULT_ALBUM_URI;
29     albumTag_ = DEFAULT_SMART_ALBUM_TAG;
30     albumPrivateType_ = DEFAULT_SMART_ALBUM_PRIVATE_TYPE;
31     albumCapacity_ = DEFAULT_SMART_ALBUM_ALBUMCAPACITY;
32     categoryId_ = DEFAULT_SMART_ALBUM_CATEGORYID;
33     albumDateModified_ = DEFAULT_SMART_ALBUM_DATE_MODIFIED;
34     categoryName_ = DEFAULT_SMART_ALBUM_CATEGORYNAME;
35     coverUri_ = DEFAULT_COVERURI;
36     resultNapiType_ = ResultNapiType::TYPE_MEDIALIBRARY;
37 }
38 
39 SmartAlbumAsset::~SmartAlbumAsset() = default;
40 
41 
SetAlbumId(const int32_t albumId)42 void SmartAlbumAsset::SetAlbumId(const int32_t albumId)
43 {
44     albumId_ = albumId;
45 }
46 
SetAlbumName(const string albumName)47 void SmartAlbumAsset::SetAlbumName(const string albumName)
48 {
49     albumName_ = albumName;
50 }
51 
SetAlbumUri(const string albumUri)52 void SmartAlbumAsset::SetAlbumUri(const string albumUri)
53 {
54     albumUri_ = albumUri;
55 }
56 
SetAlbumTag(const string albumTag)57 void SmartAlbumAsset::SetAlbumTag(const string albumTag)
58 {
59     albumTag_ = albumTag;
60 }
61 
SetAlbumCapacity(const int32_t albumCapacity)62 void SmartAlbumAsset::SetAlbumCapacity(const int32_t albumCapacity)
63 {
64     albumCapacity_ = albumCapacity;
65 }
66 
SetCategoryId(const int32_t categoryId)67 void SmartAlbumAsset::SetCategoryId(const int32_t categoryId)
68 {
69     categoryId_ = categoryId;
70 }
71 
SetAlbumDateModified(const int64_t albumDateModified)72 void SmartAlbumAsset::SetAlbumDateModified(const int64_t albumDateModified)
73 {
74     albumDateModified_ = albumDateModified;
75 }
76 
SetCategoryName(const string categoryName)77 void SmartAlbumAsset::SetCategoryName(const string categoryName)
78 {
79     categoryName_ = categoryName;
80 }
81 
SetCoverUri(const string coverUri)82 void SmartAlbumAsset::SetCoverUri(const string coverUri)
83 {
84     coverUri_ = coverUri;
85 }
86 
SetTypeMask(const string & typeMask)87 void SmartAlbumAsset::SetTypeMask(const string &typeMask)
88 {
89     typeMask_ = typeMask;
90 }
91 
SetAlbumPrivateType(const PrivateAlbumType albumPrivateType)92 void SmartAlbumAsset::SetAlbumPrivateType(const PrivateAlbumType albumPrivateType)
93 {
94     albumPrivateType_ = albumPrivateType;
95 }
96 
SetResultNapiType(const ResultNapiType type)97 void SmartAlbumAsset::SetResultNapiType(const ResultNapiType type)
98 {
99     resultNapiType_ = type;
100 }
101 
GetAlbumId() const102 int32_t SmartAlbumAsset::GetAlbumId() const
103 {
104     return albumId_;
105 }
106 
GetAlbumName() const107 string SmartAlbumAsset::GetAlbumName() const
108 {
109     return albumName_;
110 }
111 
GetAlbumUri() const112 string SmartAlbumAsset::GetAlbumUri() const
113 {
114     return albumUri_;
115 }
116 
GetAlbumTag() const117 string SmartAlbumAsset::GetAlbumTag() const
118 {
119     return albumTag_;
120 }
121 
GetAlbumCapacity() const122 int32_t SmartAlbumAsset::GetAlbumCapacity() const
123 {
124     return albumCapacity_;
125 }
126 
GetCategoryId() const127 int32_t SmartAlbumAsset::GetCategoryId() const
128 {
129     return categoryId_;
130 }
131 
GetAlbumDateModified() const132 int64_t SmartAlbumAsset::GetAlbumDateModified() const
133 {
134     return albumDateModified_;
135 }
136 
GetCategoryName() const137 string SmartAlbumAsset::GetCategoryName() const
138 {
139     return categoryName_;
140 }
141 
GetCoverUri() const142 string SmartAlbumAsset::GetCoverUri() const
143 {
144     return coverUri_;
145 }
146 
GetTypeMask() const147 string SmartAlbumAsset::GetTypeMask() const
148 {
149     return typeMask_;
150 }
151 
GetAlbumPrivateType() const152 PrivateAlbumType SmartAlbumAsset::GetAlbumPrivateType() const
153 {
154     return albumPrivateType_;
155 }
156 
GetResultNapiType() const157 ResultNapiType SmartAlbumAsset::GetResultNapiType() const
158 {
159     return resultNapiType_;
160 }
161 }  // namespace Media
162 }  // namespace OHOS
163