1 /* 2 * Copyright (c) 2024 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_DISK_SERVICE_DB_CONST_H 17 #define OHOS_CLOUD_DISK_SERVICE_DB_CONST_H 18 19 #include <string> 20 #include "clouddisk_type_const.h" 21 22 namespace OHOS { 23 namespace FileManagement { 24 namespace CloudDisk { 25 //rdb 26 const std::string CLOUD_DISK_DATABASE_NAME = "clouddisk.db"; 27 //rdb version 28 const int32_t CLOUD_DISK_RDB_VERSION = 15; 29 enum { 30 VERSION_ADD_PARENT_CLOUD_ID_INDEX = 2, 31 VERSION_FIX_FILE_TRIGGER = 3, 32 VERSION_FIX_CREATE_AND_LOCAL_TRIGGER = 4, 33 VERSION_ADD_STATUS_ERROR_FAVORITE = 5, 34 VERSION_ADD_FILE_STATUS = 6, 35 VERSION_SET_FILE_STATUS_DEFAULT = 7, 36 VERSION_ADD_CHECK_FLAG = 8, 37 VERSION_ADD_ROOT_DIRECTORY = 9, 38 VERSION_FIX_SYNC_METATIME_TRIGGER = 10, 39 VERSION_FIX_RETRY_TRIGGER = 11, 40 VERSION_REMOVE_CLOUD_SYNC_FUNC_TRIGGER = 12, 41 VERSION_ADD_ATTRIBUTE = 13, 42 VERSION_ADD_THM_FLAG = 14, 43 VERSION_ADD_SRC_CLOUD_ID = 15, 44 }; 45 // drive kit 46 const std::string DK_FILE_NAME = "fileName"; 47 const std::string DK_PARENT_CLOUD_ID = "parentFolder"; 48 const std::string DK_IS_DIRECTORY = "type"; 49 50 struct NotifyData { 51 std::string uri; 52 bool isDir = false; 53 NotifyType type = NotifyType::NOTIFY_NONE; 54 bool isLocalOperation = false; 55 std::string extraUri = ""; 56 }; 57 58 struct CacheNode { 59 std::string cloudId; 60 std::string parentCloudId; 61 std::string fileName; 62 std::string isDir; 63 bool isRecycled = false; 64 }; 65 66 } // namespace CloudDisk 67 } // namespace FileManagement 68 } // namaspace OHOS 69 70 #endif // OHOS_CLOUD_DISK_SERVICE_DB_CONST_H