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 DISTRIBUTEDDATA_KVDB_IPC_INTERFACE_CODE_H
17 #define DISTRIBUTEDDATA_KVDB_IPC_INTERFACE_CODE_H
18 
19 #include <cstdint>
20 
21 /* SAID:1301 FeatureSystem:kvdb_service */
22 namespace OHOS::DistributedKv {
23 enum class KVDBServiceInterfaceCode : uint32_t {
24     TRANS_HEAD = 0,
25     TRANS_GET_STORE_IDS = TRANS_HEAD,
26     TRANS_BEFORE_CREATE,
27     TRANS_AFTER_CREATE,
28     TRANS_DELETE,
29     TRANS_SYNC,
30     TRANS_REGISTER_NOTIFIER,
31     TRANS_UNREGISTER_NOTIFIER,
32     TRANS_SET_SYNC_PARAM,
33     TRANS_GET_SYNC_PARAM,
34     TRANS_ENABLE_CAP,
35     TRANS_DISABLE_CAP,
36     TRANS_SET_CAP,
37     TRANS_ADD_SUB,
38     TRANS_RMV_SUB,
39     TRANS_SUB,
40     TRANS_UNSUB,
41     TRANS_GET_PASSWORD,
42     TRANS_CLOUD_SYNC,
43     TRANS_NOTIFY_DATA_CHANGE,
44     TRANS_SET_CONFIG,
45     TRANS_PUT_SWITCH,
46     TRANS_GET_SWITCH,
47     TRANS_SUBSCRIBE_SWITCH_DATA,
48     TRANS_UNSUBSCRIBE_SWITCH_DATA,
49     TRANS_CLOSE,
50     TRANS_REMOVE_DEVICE_DATA,
51     TRANS_BUTT
52 };
53 
54 enum class KVDBNotifierCode : uint32_t {
55     TRANS_HEAD = 0,
56     TRANS_SYNC_COMPLETED = TRANS_HEAD,
57     TRANS_CLOUD_SYNC_COMPLETED,
58     TRANS_ON_REMOTE_CHANGED,
59     TRANS_ON_SWITCH_CHANGED,
60     TRANS_BUTT
61 };
62 } // namespace OHOS::DistributedKv
63 #endif // DISTRIBUTEDDATA_KVDB_IPC_INTERFACE_CODE_H