1 /* 2 * Copyright (c) 2023 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 OHOS_CLOUD_SYNC_SERVICE_GALLERY_ALBUM_CONST_H 17 #define OHOS_CLOUD_SYNC_SERVICE_GALLERY_ALBUM_CONST_H 18 19 #include <string> 20 21 #include "medialibrary_db_const.h" 22 #include "medialibrary_type_const.h" 23 #include "photo_album_column.h" 24 #include "photo_map_column.h" 25 26 #include "data_convertor.h" 27 28 namespace OHOS { 29 namespace FileManagement { 30 namespace CloudSync { 31 32 /* basic */ 33 const std::string ALBUM_NAME = "albumName"; 34 const std::string ALBUM_ID = "albumId"; 35 const std::string ALBUM_TYPE = "type"; 36 const std::string ALBUM_LOGIC_TYPE = "logicType"; 37 const std::string ALBUM_PATH = "localPath"; 38 /* properties */ 39 const std::string ALBUM_PROPERTIES = "properties"; 40 41 enum AlbumType : int32_t { 42 NORMAL, 43 SHARE, 44 }; 45 46 enum LogicType : int32_t { 47 PHYSICAL, 48 LOGICAL, 49 }; 50 51 const std::string ALBUM_LOCAL_PATH_PREFIX = "/OH/"; 52 53 const std::vector<std::string> ALBUM_LOCAL_QUERY_COLUMNS = { 54 Media::PhotoAlbumColumns::ALBUM_ID, 55 Media::PhotoAlbumColumns::ALBUM_NAME, 56 Media::PhotoAlbumColumns::ALBUM_DIRTY, 57 Media::PhotoAlbumColumns::ALBUM_CLOUD_ID 58 }; 59 60 const std::vector<std::string> GALLERY_ALBUM_COLUMNS = { 61 Media::PhotoAlbumColumns::ALBUM_TYPE, 62 Media::PhotoAlbumColumns::ALBUM_SUBTYPE, 63 Media::PhotoAlbumColumns::ALBUM_NAME, 64 Media::PhotoAlbumColumns::ALBUM_DATE_MODIFIED, 65 /* put cloud id in the last, and skip it in the loop (size - 1) */ 66 Media::PhotoAlbumColumns::ALBUM_CLOUD_ID 67 }; 68 69 const std::vector<DataType> GALLERY_ALBUM_COLUMN_TYPES = { 70 DataType::INT, /* album_type */ 71 DataType::INT, /* album_subtype */ 72 DataType::STRING, /* album_name */ 73 DataType::LONG, /* date_modified */ 74 DataType::STRING /* cloud_id */ 75 }; 76 } // namespace CloudSync 77 } // namespace FileManagement 78 } // namespace OHOS 79 #endif // OHOS_CLOUD_SYNC_SERVICE_GALLERY_ALBUM_CONST_H 80