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 };
31 
32 enum class FileType : int32_t {
33     FILE_TYPE_APPLICATION = 1,
34     FILE_TYPE_AUDIO,
35     FILE_TYPE_IMAGE,
36     FILE_TYPE_VIDEO,
37     FILE_TYPE_TEXT
38 };
39 
40 enum class OperationType : int64_t {
41     UNKNOWN_TYPE = 0,
42     NEW,
43     UPDATE,
44     COPY,
45     SAVE,
46     DELETE,
47     RESTORE,
48     MOVE,
49     RENAME,
50     OPEN
51 };
52 
53 enum FileStatus {
54     TO_BE_UPLOADED = 0,
55     UPLOADING = 1,
56     UPLOAD_FAILURE = 2,
57     UPLOAD_SUCCESS = 3,
58     UNKNOW = 4
59 };
60 
61 enum class NotifyType : uint32_t {
62     NOTIFY_ADDED = 0,
63     NOTIFY_MODIFIED,
64     NOTIFY_DELETED,
65     NOTIFY_RENAMED,
66     NOTIFY_NONE,
67 };
68 
69 constexpr int64_t SECOND_TO_MILLISECOND = 1e3;
70 constexpr int64_t MILLISECOND_TO_NANOSECOND = 1e6;
71 constexpr int32_t LOCAL = 1;
72 constexpr int32_t CLOUD = 2;
73 constexpr int32_t LOCAL_AND_CLOUD = 3;
74 constexpr int32_t FILE = 0;
75 constexpr int32_t DIRECTORY = 1;
76 constexpr int32_t MOVE_FILE_TIME_DAEMON = 1;
77 constexpr int32_t MOVE_FILE_TIME_SERVICE = 5;
78 } // namespace CloudDisk
79 } // namespace FileManagement
80 } // namespace OHOS
81 
82 #endif // OHOS_CLOUD_DISK_SERVICE_TYPE_CONST_H