diff --git a/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp b/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp index 0188d46169fe7c300c2981a26c559f8b72c7d182..a31fd0d5e44a41edecef29a7c920902a302efb6b 100644 --- a/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp +++ b/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp @@ -82,7 +82,7 @@ int32_t ComponentLoader::Init() std::vector ComponentLoader::GetAllCompTypes() { std::vector DHTypeALL; - for (std::map::iterator it = compHandlerMap_.begin(); it != compHandlerMap_.end(); it++) { + for (std::map::iterator it = compHandlerMap_.begin(); it != compHandlerMap_.end(); ++it) { DHTypeALL.push_back(it->first); } return DHTypeALL; @@ -122,7 +122,7 @@ int32_t ComponentLoader::GetCompPathAndVersion(const std::string &jsonStr, std:: std::vector vecJsnCfg = jsonCfg.at(COMPONENTSLOAD_DISTRIBUTED_COMPONENTS).get>(); DHLOGI("get distributed_components CompConfig size is %d", vecJsnCfg.size()); - for (std::vector::iterator iter = vecJsnCfg.begin(); iter != vecJsnCfg.end(); iter++) { + for (std::vector::iterator iter = vecJsnCfg.begin(); iter != vecJsnCfg.end(); ++iter) { dhtypeMap.insert(std::pair((*iter).type, (*iter))); localDHVersion_.compVersions.insert( std::pair((*iter).type, GetCompVersionFromComConfig(*iter))); @@ -179,7 +179,7 @@ void *ComponentLoader::GetHandler(const std::string &soName) void ComponentLoader::GetAllHandler(std::map &dhtypeMap) { std::map::iterator itor; - for (itor = dhtypeMap.begin(); itor != dhtypeMap.end(); itor++) { + for (itor = dhtypeMap.begin(); itor != dhtypeMap.end(); ++itor) { CompHandler comHandler; comHandler.hardwareHandler = GetHandler(itor->second.compHandlerLoc); comHandler.sinkHandler = GetHandler(itor->second.compSinkLoc); @@ -302,7 +302,7 @@ int32_t ComponentLoader::UnInit() DHTraceStart(COMPONENT_RELEASE_START); int32_t ret = DH_FWK_SUCCESS; for (std::map::iterator iter = compHandlerMap_.begin(); - iter != compHandlerMap_.end(); iter++) { + iter != compHandlerMap_.end(); ++iter) { ret += ReleaseHardwareHandler(iter->first); ret += ReleaseSource(iter->first); ret += ReleaseSink(iter->first); diff --git a/services/distributedhardwarefwkservice/src/distributed_hardware_manager.cpp b/services/distributedhardwarefwkservice/src/distributed_hardware_manager.cpp index ff4cbc922a49dfd1b35440b104c07a1e9b1983ec..a44c44e5db1bdfbbfe4e8671771a23deb93b8791 100644 --- a/services/distributedhardwarefwkservice/src/distributed_hardware_manager.cpp +++ b/services/distributedhardwarefwkservice/src/distributed_hardware_manager.cpp @@ -38,17 +38,6 @@ namespace DistributedHardware { #undef DH_LOG_TAG #define DH_LOG_TAG "DistributedHardwareManager" -#ifdef __cplusplus -#define EXTERNC extern "C" -#else -#define EXTERNC -#endif - -EXTERNC __attribute__((visibility("default"))) IDistributedHardwareManager *GetDistributedHardwareManagerInstance() -{ - return &DistributedHardwareManager::GetInstance(); -} - IMPLEMENT_SINGLE_INSTANCE(DistributedHardwareManager); int32_t DistributedHardwareManager::Initialize() diff --git a/services/distributedhardwarefwkservice/src/localhardwaremanager/local_hardware_manager.cpp b/services/distributedhardwarefwkservice/src/localhardwaremanager/local_hardware_manager.cpp index 547c206caa501c12c246af7e82df684bb78fa6ac..3ab0ae501128cd1c0a37bb860da73aac6bfa230b 100644 --- a/services/distributedhardwarefwkservice/src/localhardwaremanager/local_hardware_manager.cpp +++ b/services/distributedhardwarefwkservice/src/localhardwaremanager/local_hardware_manager.cpp @@ -127,7 +127,7 @@ void LocalHardwareManager::CheckNonExistCapabilityInfo(const std::vector for (auto capabilityInfo : allLocalCapabilityInfos) { std::shared_ptr capabilityValue = capabilityInfo.second; if (capabilityValue == nullptr) { - DHLOGE("capabilityInfo value is nullptr, key: %s", capabilityValue->GetAnonymousKey().c_str()); + DHLOGE("capabilityInfo value is nullptr"); continue; } DHLOGI("The key in allLocalCapabilityInfos is %s", capabilityValue->GetAnonymousKey().c_str()); diff --git a/services/distributedhardwarefwkservice/src/resourcemanager/capability_info_manager.cpp b/services/distributedhardwarefwkservice/src/resourcemanager/capability_info_manager.cpp index 1516268afcd63fb50fb88ea2def89f7e2b87776a..46ee957bb72da9ba2a6a43ca096b57062eebe5c3 100644 --- a/services/distributedhardwarefwkservice/src/resourcemanager/capability_info_manager.cpp +++ b/services/distributedhardwarefwkservice/src/resourcemanager/capability_info_manager.cpp @@ -266,9 +266,8 @@ std::map> CapabilityInfoManager::Qu { std::lock_guard lock(capInfoMgrMutex_); std::map> capMap; - bool isMatch = true; for (auto &info : globalCapInfoMap_) { - isMatch = true; + bool isMatch = true; for (auto &filter : filters) { if (!IsCapabilityMatchFilter(info.second, filter.first, filter.second)) { isMatch = false; diff --git a/services/distributedhardwarefwkservice/test/unittest/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/BUILD.gn index 7204caa3fa8bf6e96fc5d61cbdd6cccd57ab2365..eb44ec1b2828ec989195af6e00761070263fc733 100644 --- a/services/distributedhardwarefwkservice/test/unittest/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/BUILD.gn @@ -18,6 +18,7 @@ group("test") { "common/accessmanager:AccessManagerTest", "common/componentloader:component_loader_test", "common/componentmanager:component_manager_test", + "common/dbadapter:db_adapter_test", "common/distributedhardwaremanager:distributed_hardware_manager_test", "common/distributedhardwareservice:distributed_hardware_service_test", "common/localhardwaremanager:local_hardware_manager_test", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..fd58169cbf350887996037b295472ee0e11d6429 --- /dev/null +++ b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/BUILD.gn @@ -0,0 +1,64 @@ +# Copyright (c) 2021-2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/test.gni") +import( + "//foundation/distributedhardware/distributed_hardware_fwk/distributedhardwarefwk.gni") + +module_out_path = "distributed_hardware_fwk/db_adapter_test" + +config("module_private_config") { + visibility = [ ":*" ] + include_dirs = [ + "//base/notification/eventhandler/interfaces/inner_api", + "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include", + "include", + "${utils_path}/include", + "${utils_path}/include/log", + "${utils_path}/include/eventbus", + "${services_path}/distributedhardwarefwkservice/include", + "${services_path}/distributedhardwarefwkservice/include/resourcemanager", + "${services_path}/distributedhardwarefwkservice/include/utils", + "${common_path}/utils/include", + "${common_path}/log/include", + "//commonlibrary/c_utils/base/include", + "//third_party/json/include", + "//commonlibrary/c_utils/base/include", + "//utils/system/safwk/native/include", + ] +} + +## UnitTest db_adapter_test +ohos_unittest("DbAdapterTest") { + module_out_path = module_out_path + + sources = [ + "src/db_adapter_test.cpp", + "src/mock_db_change_listener.cpp", + ] + + configs = [ ":module_private_config" ] + + deps = [ + "//foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice:distributedhardwarefwksvr", + "//foundation/distributedhardware/distributed_hardware_fwk/utils:distributedhardwareutils", + "//third_party/googletest:gtest_main", + ] + + external_deps = [ "c_utils:utils" ] +} + +group("db_adapter_test") { + testonly = true + deps = [ ":DbAdapterTest" ] +} diff --git a/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/include/db_adapter_test.h b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/include/db_adapter_test.h new file mode 100644 index 0000000000000000000000000000000000000000..e344d5763878c885254fef333b61828d6e7ee272 --- /dev/null +++ b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/include/db_adapter_test.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_DB_ADAPTER_TEST_H +#define OHOS_DISTRIBUTED_HARDWARE_DB_ADAPTER_TEST_H + +#include + +namespace OHOS { +namespace DistributedHardware { +class DbAdapterTest : public testing::Test { +public: + static void SetUpTestCase(void); + static void TearDownTestCase(void); + void SetUp(); + void TearDown(); +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/include/mock_db_change_listener.h b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/include/mock_db_change_listener.h new file mode 100644 index 0000000000000000000000000000000000000000..d4e5628f6f18c11343e5803b1ef603bfb5410ecb --- /dev/null +++ b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/include/mock_db_change_listener.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_MOCK_DB_CHANGE_LISTENER_H +#define OHOS_DISTRIBUTED_HARDWARE_MOCK_DB_CHANGE_LISTENER_H + +#include "distributed_kv_data_manager.h" +#include "kvstore_observer.h" + +namespace OHOS { +namespace DistributedHardware { +class MockDBChangeListener : public DistributedKv::KvStoreObserver { +public: + MockDBChangeListener() = default; + virtual ~MockDBChangeListener() = default; + + void OnChange(const DistributedKv::ChangeNotification &changeNotification) override; +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/src/db_adapter_test.cpp b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/src/db_adapter_test.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ebb1bbc1d3dc9201315fa12772c43339239cb76d --- /dev/null +++ b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/src/db_adapter_test.cpp @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "db_adapter_test.h" + +#include +#include +#include +#include + +#include "capability_info.h" +#include "constants.h" +#define private public +#include "db_adapter.h" +#undef private +#include "dh_context.h" +#include "distributed_hardware_errno.h" +#include "distributed_hardware_log.h" +#include "mock_db_change_listener.h" + +using namespace testing::ext; +using namespace std; + +namespace OHOS { +namespace DistributedHardware { +#undef DH_LOG_TAG +#define DH_LOG_TAG "DbAdapterTest" + +namespace { +const string DATABASE_DIR = "/data/service/el1/public/database/dtbhardware_manager_service/"; +const string TEST_DEV_ID_0 = "bb536a637105409e904d4da83791aa11"; +const string TEST_DEV_ID_1 = "bb536a637105409e904d4da83791bb22"; +const string TEST_DEV_ID_2 = "bb536a637105409e904d4da83791bb33"; +const string TEST_DEV_NAME = "Dev1"; +const string TEST_DH_ID_0 = "Camera_00"; +const string TEST_DH_ID_1 = "Mic_01"; +const string TEST_DH_ID_2 = "Gps_02"; +const string TEST_DH_ID_3 = "Display_03"; +const string TEST_DH_ID_4 = "Input_04"; +const string TEST_DH_ATTR_0 = "db_test_attr0"; +const string TEST_DH_ATTR_1 = "db_test_attr1"; +constexpr uint16_t TEST_DEV_TYPE_PAD = 0x11; + +const shared_ptr CAP_INFO_0 = + make_shared(TEST_DH_ID_0, TEST_DEV_ID_0, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::CAMERA, TEST_DH_ATTR_0); +const shared_ptr CAP_INFO_1 = + make_shared(TEST_DH_ID_1, TEST_DEV_ID_0, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::AUDIO, TEST_DH_ATTR_0); +const shared_ptr CAP_INFO_2 = + make_shared(TEST_DH_ID_2, TEST_DEV_ID_0, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::GPS, TEST_DH_ATTR_0); +const shared_ptr CAP_INFO_3 = + make_shared(TEST_DH_ID_3, TEST_DEV_ID_0, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::SCREEN, TEST_DH_ATTR_0); +const shared_ptr CAP_INFO_4 = + make_shared(TEST_DH_ID_4, TEST_DEV_ID_0, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::INPUT, TEST_DH_ATTR_0); + +const shared_ptr CAP_INFO_5 = + make_shared(TEST_DH_ID_0, TEST_DEV_ID_1, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::CAMERA, TEST_DH_ATTR_1); +const shared_ptr CAP_INFO_6 = + make_shared(TEST_DH_ID_1, TEST_DEV_ID_1, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::AUDIO, TEST_DH_ATTR_1); +const shared_ptr CAP_INFO_7 = + make_shared(TEST_DH_ID_2, TEST_DEV_ID_1, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::GPS, TEST_DH_ATTR_1); +const shared_ptr CAP_INFO_8 = + make_shared(TEST_DH_ID_3, TEST_DEV_ID_1, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::SCREEN, TEST_DH_ATTR_1); +const shared_ptr CAP_INFO_9 = + make_shared(TEST_DH_ID_4, TEST_DEV_ID_1, DEV_NAME, TEST_DEV_TYPE_PAD, DHType::INPUT, TEST_DH_ATTR_1); + +std::shared_ptr g_dbAdapterPtr; +} + +void DbAdapterTest::SetUpTestCase(void) +{ + auto ret = mkdir(DATABASE_DIR.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); + if (ret != 0) { + DHLOGE("mkdir failed, path: %s, errno : %d", DATABASE_DIR.c_str(), errno); + } + + std::shared_ptr changeListener = std::make_shared(); + g_dbAdapterPtr = std::make_shared(APP_ID, GLOBAL_CAPABILITY_ID, changeListener); + if (g_dbAdapterPtr != nullptr) { + g_dbAdapterPtr->Init(); + } +} + +void DbAdapterTest::TearDownTestCase(void) +{ + if (g_dbAdapterPtr != nullptr) { + g_dbAdapterPtr->UnInit(); + } + + g_dbAdapterPtr = nullptr; + + auto ret = remove(DATABASE_DIR.c_str()); + if (ret != 0) { + DHLOGE("remove dir failed, path: %s, errno : %d", DATABASE_DIR.c_str(), errno); + } +} + +void DbAdapterTest::SetUp() +{ +} + +void DbAdapterTest::TearDown() +{ +} + +/** + * @tc.name: db_adapter_test_000 + * @tc.desc: Verify the Init function. + * @tc.type: FUNC + * @tc.require: AR000GHSJE + */ +HWTEST_F(DbAdapterTest, db_adapter_test_000, TestSize.Level0) +{ + EXPECT_EQ(g_dbAdapterPtr->Init(), DH_FWK_SUCCESS); +} + +/** + * @tc.name: db_adapter_test_001 + * @tc.desc: Verify the PutDataBatch function. + * @tc.type: FUNC + * @tc.require: AR000GHSJE + */ +HWTEST_F(DbAdapterTest, db_adapter_test_001, TestSize.Level0) +{ + vector> resInfos { CAP_INFO_0, CAP_INFO_1, CAP_INFO_2, CAP_INFO_3, CAP_INFO_4, + CAP_INFO_5, CAP_INFO_6, CAP_INFO_7, CAP_INFO_8, CAP_INFO_9 }; + + std::vector keys; + std::vector values; + std::string key; + for (auto &resInfo : resInfos) { + key = resInfo->GetKey(); + keys.push_back(key); + values.push_back(resInfo->ToJsonString()); + } + EXPECT_EQ(g_dbAdapterPtr->PutDataBatch(keys, values), DH_FWK_SUCCESS); +} + +/** + * @tc.name: db_adapter_test_002 + * @tc.desc: Verify the PutDataBatch function. + * @tc.type: FUNC + * @tc.require: AR000GHSCV + */ +HWTEST_F(DbAdapterTest, db_adapter_test_002, TestSize.Level0) +{ + std::vector keys { std::string(TEST_DEV_ID_2 + TEST_DH_ID_0) }; + std::vector values { TEST_DH_ATTR_0 }; + + EXPECT_EQ(g_dbAdapterPtr->PutDataBatch(keys, values), DH_FWK_SUCCESS); +} + +/** + * @tc.name: db_adapter_test_003 + * @tc.desc: Verify the PutDataBatch function. + * @tc.type: FUNC + * @tc.require: AR000GHSCV + */ +HWTEST_F(DbAdapterTest, db_adapter_test_003, TestSize.Level0) +{ + std::vector keys { std::string(TEST_DEV_ID_2 + TEST_DH_ID_0) }; + std::vector valuesEmpty; + + EXPECT_EQ(g_dbAdapterPtr->PutDataBatch(keys, valuesEmpty), ERR_DH_FWK_PARA_INVALID); +} + +/** + * @tc.name: db_adapter_test_004 + * @tc.desc: Verify the PutDataBatch function. + * @tc.type: FUNC + * @tc.require: AR000GHSCV + */ +HWTEST_F(DbAdapterTest, db_adapter_test_004, TestSize.Level0) +{ + std::vector keysEmpty; + std::vector values { TEST_DH_ATTR_0 }; + + EXPECT_EQ(g_dbAdapterPtr->PutDataBatch(keysEmpty, values), ERR_DH_FWK_PARA_INVALID); +} + +/** + * @tc.name: db_adapter_test_005 + * @tc.desc: Verify the PutDataBatch function. + * @tc.type: FUNC + * @tc.require: AR000GHSCV + */ +HWTEST_F(DbAdapterTest, db_adapter_test_005, TestSize.Level0) +{ + std::vector keysEmpty; + std::vector valuesEmpty; + + EXPECT_EQ(g_dbAdapterPtr->PutDataBatch(keysEmpty, valuesEmpty), ERR_DH_FWK_PARA_INVALID); +} + +/** + * @tc.name: db_adapter_test_006 + * @tc.desc: Verify the PutDataBatch function. + * @tc.type: FUNC + * @tc.require: AR000GHSCV + */ +HWTEST_F(DbAdapterTest, db_adapter_test_006, TestSize.Level0) +{ + std::vector keys { std::string(TEST_DEV_ID_2 + TEST_DH_ID_0) }; + std::vector values { TEST_DH_ATTR_0, TEST_DH_ATTR_1 }; + + EXPECT_EQ(g_dbAdapterPtr->PutDataBatch(keys, values), ERR_DH_FWK_PARA_INVALID); +} + +/** + * @tc.name: db_adapter_test_007 + * @tc.desc: Verify the PutDataBatch function. + * @tc.type: FUNC + * @tc.require: AR000GHSCV + */ +HWTEST_F(DbAdapterTest, db_adapter_test_007, TestSize.Level0) +{ + g_dbAdapterPtr->kvStoragePtr_ = nullptr; + std::vector keys { std::string(TEST_DEV_ID_2 + TEST_DH_ID_0) }; + std::vector values { TEST_DH_ATTR_0 }; + + EXPECT_EQ(g_dbAdapterPtr->PutDataBatch(keys, values), ERR_DH_FWK_RESOURCE_KV_STORAGE_POINTER_NULL); +} +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/src/mock_db_change_listener.cpp b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/src/mock_db_change_listener.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa4895f89ef16fa42cb26c431b9790954f74e40a --- /dev/null +++ b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/src/mock_db_change_listener.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "mock_db_change_listener.h" + +#include "distributed_hardware_errno.h" +#include "distributed_hardware_log.h" + +class DBAdapter; +namespace OHOS { +namespace DistributedHardware { +#undef DH_LOG_TAG +#define DH_LOG_TAG "MockDBChangeListener" + +void MockDBChangeListener::OnChange(const DistributedKv::ChangeNotification &changeNotification) +{ + (void)changeNotification; +} +} // namespace DistributedHardware +} // namespace OHOS