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 = 14; 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 }; 44 // drive kit 45 const std::string DK_FILE_NAME = "fileName"; 46 const std::string DK_PARENT_CLOUD_ID = "parentFolder"; 47 const std::string DK_IS_DIRECTORY = "type"; 48 49 struct NotifyData { 50 std::string uri; 51 bool isDir; 52 NotifyType type = NotifyType::NOTIFY_NONE; 53 bool isLocalOperation = false; 54 std::string extraUri = ""; 55 }; 56 57 struct CacheNode { 58 std::string cloudId; 59 std::string parentCloudId; 60 std::string fileName; 61 std::string isDir; 62 bool isRecycled = false; 63 }; 64 65 } // namespace CloudDisk 66 } // namespace FileManagement 67 } // namaspace OHOS 68 69 #endif // OHOS_CLOUD_DISK_SERVICE_DB_CONST_H