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 #include "change_notification.h"
17
18 namespace OHOS {
19 namespace DistributedKv {
ChangeNotification(std::vector<Entry> && insertEntries,std::vector<Entry> && updateEntries,std::vector<Entry> && deleteEntries,const std::string & deviceId,const bool isClear)20 ChangeNotification::ChangeNotification(std::vector<Entry> &&insertEntries, std::vector<Entry> &&updateEntries,
21 std::vector<Entry> &&deleteEntries, const std::string &deviceId, const bool isClear)
22 : insertEntries_(insertEntries),
23 updateEntries_(updateEntries),
24 deleteEntries_(deleteEntries),
25 deviceId_(deviceId),
26 isClear_(isClear)
27 {}
28
~ChangeNotification()29 ChangeNotification::~ChangeNotification()
30 {}
31
GetInsertEntries() const32 const std::vector<Entry> &ChangeNotification::GetInsertEntries() const
33 {
34 return this->insertEntries_;
35 }
36
GetUpdateEntries() const37 const std::vector<Entry> &ChangeNotification::GetUpdateEntries() const
38 {
39 return this->updateEntries_;
40 }
41
GetDeleteEntries() const42 const std::vector<Entry> &ChangeNotification::GetDeleteEntries() const
43 {
44 return this->deleteEntries_;
45 }
46
GetDeviceId() const47 const std::string &ChangeNotification::GetDeviceId() const
48 {
49 return this->deviceId_;
50 }
51
IsClear() const52 bool ChangeNotification::IsClear() const
53 {
54 return this->isClear_;
55 }
56 } // namespace DistributedKv
57 } // namespace OHOS