1 /*
2  * Copyright (c) 2023 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_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_SNAPSHOT_MACHINE_STATUS_H
17 #define OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_SNAPSHOT_MACHINE_STATUS_H
18 
19 #include "store/general_value.h"
20 
21 namespace OHOS {
22 namespace DistributedData {
23 
24 enum TransferStatus : int32_t {
25     STATUS_STABLE = 0,
26     STATUS_TRANSFERRING,
27     STATUS_DOWNLOADING,
28     STATUS_UPLOADING,
29     STATUS_WAIT_TRANSFER,
30     STATUS_WAIT_UPLOAD,
31     STATUS_WAIT_DOWNLOAD,
32     STATUS_BUTT,
33     STATUS_NO_CHANGE = 0XFFFFFFF,
34 };
35 
36 enum AssetEvent {
37     REMOTE_CHANGED = 0,
38     TRANSFER_FINISHED,
39     UPLOAD,
40     UPLOAD_FINISHED,
41     DOWNLOAD,
42     DOWNLOAD_FINISHED,
43     EVENT_BUTT,
44 };
45 
46 struct AssetBindInfo {
47     std::string storeName;
48     std::string tableName;
49     DistributedData::VBucket primaryKey;
50     std::string field;
51     std::string assetName;
52 };
53 } // namespace DistributedData
54 } // namespace OHOS
55 #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_SNAPSHOT_MACHINE_STATUS_H
56