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