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 NATIVE_RDB_RDB_COMMON_H
17 #define NATIVE_RDB_RDB_COMMON_H
18 
19 #include <cstdint>
20 namespace OHOS {
21 namespace NativeRdb {
22 enum class ConflictResolution {
23     /** Implements no action when conflict occurs.*/
24     ON_CONFLICT_NONE = 0,
25     /** Implements rollback operation when conflict occurs.*/
26     ON_CONFLICT_ROLLBACK,
27     /** Implements abort operation when conflict occurs.*/
28     ON_CONFLICT_ABORT,
29     /** Implements fail operation when conflict occurs.*/
30     ON_CONFLICT_FAIL,
31     /** Implements ignore operation when conflict occurs.*/
32     ON_CONFLICT_IGNORE,
33     /** Implements replace operation operator when conflict occurs.*/
34     ON_CONFLICT_REPLACE,
35 };
36 
37 enum RebuiltType : uint32_t {
38     NONE,
39     REBUILT,
40     REPAIRED,
41 };
42 
43 enum SlaveStatus : uint32_t {
44     UNDEFINED,
45     DB_NOT_EXITS,
46     BACKING_UP,
47     BACKUP_INTERRUPT,
48     BACKUP_FINISHED,
49 };
50 
51 enum ExchangeStrategy : uint32_t {
52     NOT_HANDLE,
53     BACKUP,
54     RESTORE,
55 };
56 } // namespace NativeRdb
57 } // namespace OHOS
58 
59 #endif // NATIVE_RDB_RDB_COMMON_H
60