1 /*
2  * Copyright (c) 2021 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 #define LOG_TAG "ChangeNotification"
17 
18 #include "change_notification.h"
19 
20 #include "log_print.h"
21 
22 namespace OHOS {
23 namespace DistributedKv {
ChangeNotification(std::vector<Entry> && insertEntries,std::vector<Entry> && updateEntries,std::vector<Entry> && deleteEntries,const std::string & deviceId,bool isClear)24 ChangeNotification::ChangeNotification(std::vector<Entry> &&insertEntries, std::vector<Entry> &&updateEntries,
25                                        std::vector<Entry> &&deleteEntries, const std::string &deviceId, bool isClear)
26     : insertEntries_(std::move(insertEntries)), updateEntries_(std::move(updateEntries)),
27     deleteEntries_(std::move(deleteEntries)), deviceId_(deviceId), isClear_(isClear)
28 {}
29 
~ChangeNotification()30 ChangeNotification::~ChangeNotification()
31 {}
32 
GetInsertEntries() const33 const std::vector<Entry> &ChangeNotification::GetInsertEntries() const
34 {
35     return insertEntries_;
36 }
37 
GetUpdateEntries() const38 const std::vector<Entry> &ChangeNotification::GetUpdateEntries() const
39 {
40     return updateEntries_;
41 }
42 
GetDeleteEntries() const43 const std::vector<Entry> &ChangeNotification::GetDeleteEntries() const
44 {
45     return deleteEntries_;
46 }
47 
GetDeviceId() const48 const std::string &ChangeNotification::GetDeviceId() const
49 {
50     return deviceId_;
51 }
52 
IsClear() const53 bool ChangeNotification::IsClear() const
54 {
55     return isClear_;
56 }
57 }  // namespace DistributedKv
58 }  // namespace OHOS
59