1 /*
2  * Copyright (c) 2022 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 STORE_CHANGED_DATA_H
17 #define STORE_CHANGED_DATA_H
18 
19 #include <list>
20 #include <string>
21 #include "store_types.h"
22 
23 namespace DistributedDB {
24 struct StoreProperty {
25     std::string userId;
26     std::string appId;
27     std::string storeId;
28 };
29 
30 class StoreChangedData {
31 public:
StoreChangedData()32     StoreChangedData() {}
~StoreChangedData()33     DB_API virtual ~StoreChangedData() {}
34 
35     // Interface for Getting the device whose data changed.
36     DB_API virtual std::string GetDataChangeDevice() const = 0;
37 
38     // Interface for Getting the store whose data changed.
39     DB_API virtual void GetStoreProperty(StoreProperty &storeProperty) const = 0;
40 };
41 } // namespace DistributedDB
42 
43 #endif // STORE_CHANGED_DATA_H
44