• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "store_types.h"
21 
22 namespace DistributedDB {
23 struct StoreProperty {
24     std::string userId;
25     std::string appId;
26     std::string storeId;
27 };
28 class StoreChangedData {
29 public:
StoreChangedData()30     StoreChangedData() {}
~StoreChangedData()31     DB_API virtual ~StoreChangedData() {}
32 
33     // Interface for Getting the device whose data changed.
34     DB_API virtual std::string GetDataChangeDevice() const = 0;
35 
36     // Interface for Getting the store whose data changed.
37     DB_API virtual void GetStoreProperty(StoreProperty &storeProperty) const = 0;
38 };
39 } // namespace DistributedDB
40 
41 #endif // STORE_CHANGED_DATA_H
42