• 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_TYPE_CONST_H
17 #define OHOS_CLOUD_DISK_SERVICE_TYPE_CONST_H
18 
19 namespace OHOS {
20 namespace FileManagement {
21 namespace CloudDisk {
22 enum class DirtyType : int32_t {
23     TYPE_SYNCED,
24     TYPE_NEW,
25     TYPE_MDIRTY,
26     TYPE_FDIRTY,
27     TYPE_DELETED,
28     TYPE_RETRY,
29     TYPE_NO_NEED_UPLOAD,
30     TYPE_COPY
31 };
32 
33 enum class FileType : int32_t {
34     FILE_TYPE_APPLICATION = 1,
35     FILE_TYPE_AUDIO,
36     FILE_TYPE_IMAGE,
37     FILE_TYPE_VIDEO,
38     FILE_TYPE_TEXT
39 };
40 
41 enum class OperationType : int64_t {
42     UNKNOWN_TYPE = 0,
43     NEW,
44     UPDATE,
45     COPY,
46     SAVE,
47     DELETE,
48     RESTORE,
49     MOVE,
50     RENAME,
51     OPEN
52 };
53 
54 enum FileStatus {
55     TO_BE_UPLOADED = 0,
56     UPLOADING = 1,
57     UPLOAD_FAILURE = 2,
58     UPLOAD_SUCCESS = 3,
59     UNKNOW = 4
60 };
61 
62 enum class NotifyType : uint32_t {
63     NOTIFY_ADDED = 0,
64     NOTIFY_MODIFIED,
65     NOTIFY_DELETED,
66     NOTIFY_RENAMED,
67     NOTIFY_FILE_CHANGED,
68     NOTIFY_NONE,
69 };
70 
71 enum class TrashOptType : int32_t {
72     RESTORE = 0,
73     RECYCLE,
74 };
75 
76 constexpr int64_t SECOND_TO_MILLISECOND = 1e3;
77 constexpr int64_t MILLISECOND_TO_NANOSECOND = 1e6;
78 constexpr int32_t LOCAL = 1;
79 constexpr int32_t CLOUD = 2;
80 constexpr int32_t LOCAL_AND_CLOUD = 3;
81 constexpr int32_t FILE = 0;
82 constexpr int32_t DIRECTORY = 1;
83 constexpr int32_t MOVE_FILE_TIME_DAEMON = 1;
84 constexpr int32_t MOVE_FILE_TIME_SERVICE = 3;
85 } // namespace CloudDisk
86 } // namespace FileManagement
87 } // namespace OHOS
88 
89 #endif // OHOS_CLOUD_DISK_SERVICE_TYPE_CONST_H