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