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 #include "delegate_callback.h" 16 17 using namespace DistributedDB; 18 Callback(DBStatus status,KvStoreSnapshotDelegate * kvStoreSnapshotDelegate)19void DelegateCallback::Callback(DBStatus status, KvStoreSnapshotDelegate *kvStoreSnapshotDelegate) 20 { 21 this->status_ = status; 22 this->kvStoreSnapshotDelegate_ = kvStoreSnapshotDelegate; 23 } CallbackKv(DBStatus status,const Value & value)24void DelegateCallback::CallbackKv(DBStatus status, const Value &value) 25 { 26 this->status_ = status; 27 this->value_ = value; 28 } GetStatus()29DBStatus DelegateCallback::GetStatus() 30 { 31 return status_; 32 } GetValue()33const Value &DelegateCallback::GetValue() 34 { 35 return value_; 36 }