diff --git a/bundle.json b/bundle.json index 995acf6c661f020e38f165acc3bcbef2d1e486c5..cc7dac6e05112c7ec37d8f08f1d958525c0ed76d 100644 --- a/bundle.json +++ b/bundle.json @@ -55,9 +55,6 @@ "drivers_interface_camera", "access_token", "av_codec" - ], - "third_party": [ - "ffmpeg" ] }, "build": { diff --git a/common/src/utils/dcamera_hisysevent_adapter.cpp b/common/src/utils/dcamera_hisysevent_adapter.cpp index 3a3d2464afde0b68e2399091fd22cff892a293da..8229a89d7bac50f012f6e34a85ecb9a4bf807c53 100644 --- a/common/src/utils/dcamera_hisysevent_adapter.cpp +++ b/common/src/utils/dcamera_hisysevent_adapter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 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 @@ -26,6 +26,8 @@ namespace OHOS { namespace DistributedHardware { namespace { constexpr int32_t MSG_MAX_LEN = 2048; +constexpr int32_t ENUM_STREAMTYPE_LEN = 2; +constexpr int32_t ENUM_ENCODETYPE_LEN = 4; using HiSysEventNameSpace = OHOS::HiviewDFX::HiSysEvent; const std::string ENUM_STREAMTYPE_STRINGS[] = { "CONTINUOUS_FRAME", "SNAPSHOT_FRAME" @@ -118,6 +120,11 @@ void ReportCameraOperaterEvent(const std::string& eventName, const std::string& void ReportStartCaptureEvent(const std::string& eventName, EventCaptureInfo& capture, const std::string& errMsg) { + if (capture.encodeType_ < 0 || capture.encodeType_ >= ENUM_ENCODETYPE_LEN || + capture.type_ < 0 || capture.type_ >= ENUM_STREAMTYPE_LEN) { + DHLOGE("Invalid capture parameters."); + return; + } int32_t ret = HiSysEventWrite(HiSysEventNameSpace::Domain::DISTRIBUTED_CAMERA, eventName, HiSysEventNameSpace::EventType::BEHAVIOR, @@ -136,7 +143,6 @@ void ReportStartCaptureEvent(const std::string& eventName, EventCaptureInfo& cap std::string CreateMsg(const char *format, ...) { va_list args; - (void)memset_s(&args, sizeof(va_list), 0, sizeof(va_list)); va_start(args, format); char msg[MSG_MAX_LEN] = {0}; if (vsnprintf_s(msg, sizeof(msg), sizeof(msg) - 1, format, args) < 0) { diff --git a/common/src/utils/dcamera_utils_tools.cpp b/common/src/utils/dcamera_utils_tools.cpp index ce361daf38b25f930325c231803b0a5154438ba3..f26f140d1faba9d0d53eda8c8d2bc96775e16f5e 100644 --- a/common/src/utils/dcamera_utils_tools.cpp +++ b/common/src/utils/dcamera_utils_tools.cpp @@ -31,11 +31,7 @@ namespace OHOS { namespace DistributedHardware { namespace { -#if (defined(__aarch64__) || defined(__x86_64__)) -const std::string YUV_LIB_PATH = "/system/lib64/chipset-pub-sdk/libyuv.z.so"; -#else -const std::string YUV_LIB_PATH = "/system/lib/chipset-pub-sdk/libyuv.z.so"; -#endif +const std::string YUV_LIB_PATH = "libyuv.z.so"; const std::string GET_IMAGE_CONVERTER_FUNC = "GetImageConverter"; } diff --git a/common/test/unittest/common/utils/BUILD.gn b/common/test/unittest/common/utils/BUILD.gn index f53e98fe142e19b3497f5154e7c4011ea368e8ce..87a44bf29d899e6a08b628db7f67a86b0a53c3f5 100644 --- a/common/test/unittest/common/utils/BUILD.gn +++ b/common/test/unittest/common/utils/BUILD.gn @@ -42,11 +42,7 @@ ohos_unittest("CommonUtilsTest") { configs = [ ":module_private_config" ] - deps = [ - "${common_path}:distributed_camera_utils", - "//third_party/googletest:gmock", - "//third_party/googletest:gtest_main", - ] + deps = [ "${common_path}:distributed_camera_utils" ] cflags = [ "-fPIC", diff --git a/common/test/unittest/common/utils/data_buffer_test.cpp b/common/test/unittest/common/utils/data_buffer_test.cpp index 9868c0b2c93f0d99a5a2da53745722d18bcbff56..b973c6c55852066ef307798aa804e0ad32b8f0cd 100644 --- a/common/test/unittest/common/utils/data_buffer_test.cpp +++ b/common/test/unittest/common/utils/data_buffer_test.cpp @@ -67,9 +67,6 @@ HWTEST_F(DataBufferTest, SetRange_001, TestSize.Level1) { size_t offset = 0; size_t size = 0; - if (dataBuffer_ == nullptr) { - return; - } int32_t ret = dataBuffer_->SetRange(offset, size); EXPECT_EQ(DCAMERA_OK, ret); offset = dataBuffer_->Offset() + 2; @@ -88,9 +85,6 @@ HWTEST_F(DataBufferTest, FindInt32_001, TestSize.Level1) { string name = "test"; int32_t value = 1; - if (dataBuffer_ == nullptr) { - return; - } dataBuffer_->SetInt32(name, value); bool ret = dataBuffer_->FindInt32(name, value); EXPECT_EQ(true, ret); @@ -109,9 +103,6 @@ HWTEST_F(DataBufferTest, FindInt62_001, TestSize.Level1) { string name = "test"; int64_t value = 1; - if (dataBuffer_ == nullptr) { - return; - } dataBuffer_->SetInt64(name, value); bool ret = dataBuffer_->FindInt64(name, value); EXPECT_EQ(true, ret); @@ -130,9 +121,6 @@ HWTEST_F(DataBufferTest, FindString_001, TestSize.Level1) { string name = "test"; string value = "test"; - if (dataBuffer_ == nullptr) { - return; - } dataBuffer_->SetString(name, value); bool ret = dataBuffer_->FindString(name, value); EXPECT_EQ(true, ret); diff --git a/interfaces/inner_kits/native_cpp/camera_sink/src/callback/dcamera_sink_callback.cpp b/interfaces/inner_kits/native_cpp/camera_sink/src/callback/dcamera_sink_callback.cpp index 39b05747be5a146847b0956b2b0fbb21711e7d13..8179b4feb61104a0becec88a4853012929f85add 100644 --- a/interfaces/inner_kits/native_cpp/camera_sink/src/callback/dcamera_sink_callback.cpp +++ b/interfaces/inner_kits/native_cpp/camera_sink/src/callback/dcamera_sink_callback.cpp @@ -36,9 +36,7 @@ int32_t DCameraSinkCallback::OnNotifyResourceInfo(const ResourceEventType &type, std::lock_guard lock(privacyResMutex_); auto iter = privacyResCallback_.begin(); if (iter != privacyResCallback_.end()) { - if (*iter != nullptr) { ret = (*iter)->OnPrivaceResourceMessage(type, subtype, networkId, isSensitive, isSameAccout); - } } return ret; } diff --git a/interfaces/inner_kits/native_cpp/camera_sink/src/dcamera_sink_handler_ipc.cpp b/interfaces/inner_kits/native_cpp/camera_sink/src/dcamera_sink_handler_ipc.cpp index b3e46480410596d9dd4a2268cd3a69eabfdc0827..690abfbca07f4afdc81079bebbfacd4c6b8088b8 100644 --- a/interfaces/inner_kits/native_cpp/camera_sink/src/dcamera_sink_handler_ipc.cpp +++ b/interfaces/inner_kits/native_cpp/camera_sink/src/dcamera_sink_handler_ipc.cpp @@ -97,7 +97,7 @@ sptr DCameraSinkHandlerIpc::GetSinkLocalCamSrv() } { std::lock_guard autoLock(sinkLocalCamSrvLock_); - if (localSink_ != nullptr && localSink_->AsObject() != nullptr) { + if (localSink_ != nullptr) { localSink_->AsObject()->RemoveDeathRecipient(sinkLocalRecipient_); } localSink_ = localSink; @@ -110,7 +110,7 @@ void DCameraSinkHandlerIpc::DeleteSinkLocalCamSrv() { DHLOGI("start"); std::lock_guard autoLock(sinkLocalCamSrvLock_); - if (localSink_ != nullptr && localSink_->AsObject()) { + if (localSink_ != nullptr) { localSink_->AsObject()->RemoveDeathRecipient(sinkLocalRecipient_); } localSink_ = nullptr; diff --git a/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp b/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp index cb2ea35aa9fd89e63362122562ddeca5d6a09e1e..cb4a59854aed3a702031d5220fb212ee2c57555a 100644 --- a/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp @@ -48,11 +48,9 @@ int32_t DistributedCameraSinkProxy::InitSink(const std::string& params, const sp DHLOGE("write params failed"); return DCAMERA_BAD_VALUE; } - if (sinkCallback != nullptr && sinkCallback->AsObject() != nullptr) { - if (!data.WriteRemoteObject(sinkCallback->AsObject())) { - DHLOGE("write sinkCallback failed"); - return DCAMERA_BAD_VALUE; - } + if (!data.WriteRemoteObject(sinkCallback->AsObject())) { + DHLOGE("write sinkCallback failed"); + return DCAMERA_BAD_VALUE; } remote->SendRequest(static_cast(IDCameraSinkInterfaceCode::INIT_SINK), data, reply, option); int32_t result = reply.ReadInt32(); diff --git a/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler_ipc.cpp b/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler_ipc.cpp index 87383db24bd0e8dd611a2cbaead41565499fd1cd..fe9911c5a47177f7fd4e6b1287fb5c4f148a6bd2 100644 --- a/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler_ipc.cpp +++ b/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler_ipc.cpp @@ -97,7 +97,7 @@ sptr DCameraSourceHandlerIpc::GetSourceLocalCamSrv() } { std::lock_guard autoLock(sourceLocalCamSrvLock_); - if (localSource_ != nullptr && localSource_->AsObject() != nullptr) { + if (localSource_ != nullptr) { localSource_->AsObject()->RemoveDeathRecipient(sourceLocalRecipient_); } localSource_ = localSource; @@ -110,7 +110,7 @@ void DCameraSourceHandlerIpc::DeleteSourceLocalCamSrv() { DHLOGI("start"); std::lock_guard autoLock(sourceLocalCamSrvLock_); - if (localSource_ != nullptr && localSource_->AsObject() != nullptr) { + if (localSource_ != nullptr) { localSource_->AsObject()->RemoveDeathRecipient(sourceLocalRecipient_); } localSource_ = nullptr; diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn index 7cb5ed5cee66b807cee0f914f06bf5a89ec89bd4..092c8b0c3631d254146d1df16da2f609f5cb9ce0 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("CallbackOnNotifyResourceInfoFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp/camera_sink/include/callback" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("CallbackOnNotifyResourceInfoFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/callbackonnotifyresourceinfo_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/callbackonnotifyresourceinfo_fuzzer.cpp index cad43507dd3a01ca98dfc8f3b9d2ef7c09ff6dbe..f803426b7dafe6b59cb385093fbc491cd0c4ec1d 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/callbackonnotifyresourceinfo_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/callbackonnotifyresourceinfo_fuzzer.cpp @@ -42,9 +42,6 @@ void CallbackOnNotifyResourceInfoFuzzTest(const uint8_t* data, size_t size) std::shared_ptr callback = std::make_shared(); sptr dcameraSinkCallback(new (std::nothrow) DCameraSinkCallback()); - if (dcameraSinkCallback == nullptr) { - return; - } dcameraSinkCallback->PushPrivacyResCallback(callback); dcameraSinkCallback->OnNotifyResourceInfo(type, subtype, networkId, isSensitive, isSameAccout); } diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn index f235f416d725e7e136667c3751b6f6188edceab6..cc975c70befa879eb1d290c8b193e83672d803ca 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("CallbackSinkOnRemoteRequestFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp/camera_sink/include/callback" ] include_dirs += [ "include", @@ -62,6 +59,7 @@ ohos_fuzztest("CallbackSinkOnRemoteRequestFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/callbacksinkonremoterequest_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/callbacksinkonremoterequest_fuzzer.cpp index bcc66df0e5c039731ab65f1297deeca1480c8daa..8b4f0bf2169909c03fbab66680ca6cc182fb16c0 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/callbacksinkonremoterequest_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/callbacksinkonremoterequest_fuzzer.cpp @@ -53,9 +53,6 @@ void CallbackSinkOnRemoteRequestFuzzTest(const uint8_t* data, size_t size) pdata.ReadBool(isSameAccout); sptr dcameraSinkCallback(new (std::nothrow) DCameraSinkCallback()); - if (dcameraSinkCallback == nullptr) { - return; - } dcameraSinkCallback->memberFuncMap_[code] = &DCameraSinkCallbackStub::OnNotifyResourceInfoInner; dcameraSinkCallback->OnRemoteRequest(code, pdata, reply, option); } @@ -79,9 +76,6 @@ void CallbackSinkOnNotifyResourceInfoInnerFuzzTest(const uint8_t* data, size_t s pdata.ReadBool(isSameAccout); sptr dcameraSinkCallback(new (std::nothrow) DCameraSinkCallback()); - if (dcameraSinkCallback == nullptr) { - return; - } dcameraSinkCallback->OnNotifyResourceInfoInner(pdata, reply); } } diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn index 267c4a991e533c8be869c88f22a72f91cb9ca4ee..d84aba612fe1b04a5dd274412a3c8e4ca8d85200 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn @@ -23,12 +23,7 @@ ohos_fuzztest("EncodeOnInputBufferAvailableFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", - "${graphicsurface_path}/surface/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/data_process/include/interfaces", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn index 09e260c529a5701b8770719c0009f3da5f49f1e5..11e53327594d708a0e9aae60fa79907ca1d690de 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn @@ -23,12 +23,7 @@ ohos_fuzztest("EncodeOnOutputBufferAvailableFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", - "${graphicsurface_path}/surface/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/data_process/include/interfaces", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn index 77369f04a55d6d5fd3afcf6a618d550f3cbf0ef8..e361bd27347438a70c4cbb9e89c9854df7c4384b 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn @@ -24,11 +24,6 @@ ohos_fuzztest("OnSinkLocalCamSrvDiedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer" include_dirs = [ - "${fwk_utils_path}/include", - "${fwk_common_path}/utils/include", - ] - - include_dirs += [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -58,6 +53,7 @@ ohos_fuzztest("OnSinkLocalCamSrvDiedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn index b2938b94f203e8df0dbce85b92108e799f4e9116..e4cb20079c181b49658255ae50e184125adec952 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn @@ -23,10 +23,7 @@ ohos_fuzztest("SinkHandlerInitSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -58,6 +55,7 @@ ohos_fuzztest("SinkHandlerInitSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn index d9a222b29334b288c0ae74bea3df22965811d5e6..c6411aa6e4bc6fd5cb97ef368c2401ba566f2b7d 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerPauseDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("SinkHandlerPauseDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn index b081a381d018766d248143b9af7dbee43208e521..fdb9d5001d2e1e1ea4642f549f9f9201960c8e30 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerRegisterPrivacyResourcesFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -61,6 +58,7 @@ ohos_fuzztest("SinkHandlerRegisterPrivacyResourcesFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn index 2ee5a06c6f7dde21928640266811b1bd8027625e..fd18170c53a793ee3419885127c3dbebea8bee56 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("SinkHandlerReleaseSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -59,6 +56,7 @@ ohos_fuzztest("SinkHandlerReleaseSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn index f0230b7055ad4a4b8e63e37e94f93b5ea27b42b1..f1a21f846a6d93e831cbf8cab6f40c5258708f05 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerResumeDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("SinkHandlerResumeDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn index 7b8bf515a9db2c5d62e9807a8827c9215e6e6979..9daebfa9b4c24e1dac07bd3376a0b0c36bdbc29f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerStopDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("SinkHandlerStopDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn index 36edf7b40aff549a5c206fa89498fa7277f82a6d..5d68c7eaacc18b0990dc9a7f0a94509caa1c73df 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn @@ -23,10 +23,7 @@ ohos_fuzztest("SinkHandlerSubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -58,6 +55,7 @@ ohos_fuzztest("SinkHandlerSubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn index 7e9fc98a9e885ad170c60268dd5242d95994d112..7033aa4b96f71a8571ad7fb60325e5d8691739bf 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("SinkHandlerUnsubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -59,6 +56,7 @@ ohos_fuzztest("SinkHandlerUnsubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn index acad83286ea442372037b2ec6e81c6023635909d..2faef0298489629d4e9a51211e51a115ce74bc45 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilityFailFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -52,6 +50,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilityFailFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn index bf85f322a3cd58d036494edf7059b034bdcb622b..c3e49b820e6c41678d5683a6c2a3c652b5f70cbb 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilitySuccessFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -53,6 +51,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilitySuccessFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn index 2143eaffa13e494f8fc00295f0e9f7cd2a3b3bc8..bdabd840d9b72079b9ea2f1d20e0e238621c0813 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyChannelNegFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyChannelNegFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn index 076585a0526efc85b87047256a3b3d2640957b2a..8be84c8c5acf6ef304a3f0ff27ed039db5ac3987 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyCloseChannelFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyCloseChannelFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn index 6c647d09549e2721b9f56801d196e0364c0e6237..b2dcd5d8026b343d567e473da7a38a0406189db0 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyGetCameraInfoFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyGetCameraInfoFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn index ab22df71f8628b1e2b8a13aaea257f97c76e8ec4..88d93b6b6468291fc2bceb8b9341a4cc7e13285c 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SinkProxyInitSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SinkProxyInitSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn index e79429657a9cbc4536fed56a19dec1e6cdaca040..390f70043cfa7b30324bd78cdb812029be93b5d6 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyOpenChannelFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyOpenChannelFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn index 8f4598eeedae1040d9c4dddd98d1227eab428ef1..dcb6d33d411d8e10568fa1d6616db638ba6fb267 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SinkProxyReleaseSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SinkProxyReleaseSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn index ba130ef6a23b17fdceacaa2bd06ec5e2804c3244..41d470c04b6513860dbbf4c837461c207061d86d 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyStopCaptureFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyStopCaptureFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn index 060a1a072e22ab743c5015bf5df78b7bb272da1b..500c885b217eb2d406f2015f37ca222db6c7841b 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxySubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxySubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn index 9e7a88838bafbad7664ff93f3ee557a6c432f538..2ffc990f3a6c342365d7e67a7af110da8ce8d600 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyUnsubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyUnsubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn index e9e3129771f6dff15ac0fa74a56a8cbaf24ad02f..f0b888ed9592e3066bdd2f04aeb0364734aee098 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceChannelNegFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceChannelNegFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceChannelNegFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceclosechannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceclosechannel_fuzzer/BUILD.gn index 75054e3e7d99968df764a995c2af9e9f818eabde..0c168f5d181f260b94e7f4abc700e736c8275dd7 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceclosechannel_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceclosechannel_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceCloseChannelFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceclosechannel_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${innerkits_path}/native_cpp/test/include", @@ -41,7 +38,6 @@ ohos_fuzztest("SinkServiceCloseChannelFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicegetcamerainfo_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicegetcamerainfo_fuzzer/BUILD.gn index c1d8c636606ae6d4b5bed5b8e149c221adb66f80..87433d99a624eae1ed0ea3610a65644371fc7f15 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicegetcamerainfo_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicegetcamerainfo_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceGetCameraInfoFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicegetcamerainfo_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceGetCameraInfoFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceinitsink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceinitsink_fuzzer/BUILD.gn index e924c9db5f4b0edebd8933effdcdbbfd51c0349a..2e64169c5cb23cdadcabf4528e5efbc02dea9748 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceinitsink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceinitsink_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceInitSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceinitsink_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceInitSinkFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn index 3d2843400e8c289bcde427b975e036a2f3ff4f14..c3cc220b6e3313ab105b061e399f848b0a94d01c 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceOpenChannelFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceOpenChannelFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceOpenChannelFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn index 24db5a9688b261bbfa9938c362a8e2c3509b11b4..f121c80fd598d190b2b91d5ffe24bd9ac6e05b6b 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServicePauseDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServicePauseDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -70,6 +66,7 @@ ohos_fuzztest("SinkServicePauseDistributedHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn index 18b05e21341ba9835b91f82753106c7c96c96c02..0fe7541a78bfac4e8304dfeb788681280817211f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceReleaseSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceReleaseSinkFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceReleaseSinkFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn index df13b8d9caaa84eaee518556446fd0cb928a8cab..31d22cc38c474d72e4eb3a7714960b623c66a941 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceResumeDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceResumeDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -70,6 +66,7 @@ ohos_fuzztest("SinkServiceResumeDistributedHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopcapture_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopcapture_fuzzer/BUILD.gn index d6aaddc3a28b3e6701bcb138965365fde3916846..1e924a70181610ea37d0c63b5ac7d75e8aaec44b 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopcapture_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopcapture_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceStopCaptureFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicestopcapture_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceStopCaptureFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn index 7b655a4bc33bc57dd58c1efff6e1a532b9b77f75..7e88022a197442faa75896def9aa159647e1a738 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceStopDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceStopDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -70,6 +66,7 @@ ohos_fuzztest("SinkServiceStopDistributedHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn index 83aab437cd5bde7411c67ebb55959b985b7e524e..96d5b8f61bec28ad49667032ae162309696f4466 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceSubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceSubscribeLocalHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceSubscribeLocalHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn index 5de12d6308cebb3cd59fb67b563a9ca1c93f3322..e2d0ecb8b5318f4d3d731462e2951a2ba8b699e0 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn @@ -24,13 +24,10 @@ ohos_fuzztest("SinkServiceUnsubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -41,7 +38,6 @@ ohos_fuzztest("SinkServiceUnsubscribeLocalHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -72,6 +68,7 @@ ohos_fuzztest("SinkServiceUnsubscribeLocalHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn index a8ca55043147a6b20f7435fa0c3c1b45982c4fed..1e89f2f63fa15c2b02bfc5a522a0e72de27a716f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkBytesReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSinkBytesReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn index 904fe4089b2c1d329b5098c5e631a4bef0f97323..0c8a90effc547a4d70de8efde532ba18b9081880 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkMessageReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSinkMessageReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn index 93119391bc00be46e8e6d480bfc9a968798764b6..225e19efb56056d676e8e3cd4d23f93a6caa192f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkSessionClosedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSinkSessionClosedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn index 6215b1a326be00de6e247831af5f684d701fa2b3..cf76f9fa7638e6289bbfd0ca4fc5efb0dd1ae6f3 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkSessionOpenedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSinkSessionOpenedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn index abdbed769d7bb08c873cc6ebd36bbea6b4ea7219..765cd3fafc5521bbe26627af57102d4a96d5c798 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkStreamReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSinkStreamReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn index d8b5682d9a45bb19c2c5689f221ae6a42d0331ba..b0dd7531dd54449788d7ecf3fdb65341c53fa47b 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("CallbackOnNotifyRegResultFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -59,6 +57,7 @@ ohos_fuzztest("CallbackOnNotifyRegResultFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/callbackonnotifyregresult_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/callbackonnotifyregresult_fuzzer.cpp index 865823427f0f1b2b48719f739b26e0592f861ec1..77072bfaf7a427ca347fc109cffebfe78818f8eb 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/callbackonnotifyregresult_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/callbackonnotifyregresult_fuzzer.cpp @@ -34,9 +34,6 @@ void CallbackOnNotifyRegResultFuzzTest(const uint8_t* data, size_t size) std::shared_ptr callback = std::make_shared(); sptr dcameraSourceCallback(new (std::nothrow) DCameraSourceCallback()); - if (dcameraSourceCallback == nullptr) { - return; - } dcameraSourceCallback->PushRegCallback(reqId, callback); dcameraSourceCallback->OnNotifyRegResult(devId, dhId, reqId, status, dataStr); } diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn index b9106c55776037b396748163e1ee46c64c40b14a..edb9085175ee680a3ff1c5386f0b284bdbac2ffb 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("CallbackOnNotifyUnRegResultFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -59,6 +57,7 @@ ohos_fuzztest("CallbackOnNotifyUnRegResultFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/callbackonnotifyunregresult_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/callbackonnotifyunregresult_fuzzer.cpp index 8667fc20c606abea266892b85cceccf8b5236901..babcb07138a2bb7902a23f25badbe35a6cd1dc27 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/callbackonnotifyunregresult_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/callbackonnotifyunregresult_fuzzer.cpp @@ -34,9 +34,6 @@ void CallbackOnNotifyRegResultFuzzTest(const uint8_t* data, size_t size) std::shared_ptr uncallback = std::make_shared(); sptr dcameraSourceCallback(new (std::nothrow) DCameraSourceCallback()); - if (dcameraSourceCallback == nullptr) { - return; - } dcameraSourceCallback->PushUnregCallback(reqId, uncallback); dcameraSourceCallback->OnNotifyRegResult(devId, dhId, reqId, status, dataStr); } diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn index 73432eafdf4485718118873def6a52060a917ca6..79515e79ff8d06673d284dc4d03a792a8ac79fd3 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("CallbackOnRemoteRequestFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -58,6 +56,7 @@ ohos_fuzztest("CallbackOnRemoteRequestFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/callbackonremoterequest_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/callbackonremoterequest_fuzzer.cpp index 20d2ce26b9b050ad6deed059f7c784570edf3ae9..fc9ed0ad755b48d393866fe8a29f1bf84d48e30b 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/callbackonremoterequest_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/callbackonremoterequest_fuzzer.cpp @@ -46,9 +46,6 @@ void CallbackOnRemoteRequestFuzzTest(const uint8_t* data, size_t size) pdata.WriteString(dataStr); sptr dcameraSourceCallback(new (std::nothrow) DCameraSourceCallback()); - if (dcameraSourceCallback == nullptr) { - return; - } dcameraSourceCallback->OnRemoteRequest(code, pdata, reply, option); } } diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn index 65eaf6185a3bca7e5deb988f95c5e7ae05813345..0ddd8476f487abfc320202132ca4f2f8edd38857 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn @@ -23,12 +23,7 @@ ohos_fuzztest("DecodeOnInputBufferAvailableFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", - "${graphicsurface_path}/surface/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/data_process/include/interfaces", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn index bd841912cea22faa080c0741f580d557c5639843..f01a4ea07bc2c9624f61636fe3ec06caeb6ee128 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn @@ -23,12 +23,7 @@ ohos_fuzztest("DecodeOnOutputBufferAvailableFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", - "${graphicsurface_path}/surface/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/data_process/include/interfaces", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn index d7c235d37fe140f68218d0fb96a1afd8f7690d55..f8fb3fa8aaf8f43c090b614f173908cee350f7f0 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("OnSourceLocalCamSrvDiedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -57,6 +55,7 @@ ohos_fuzztest("OnSourceLocalCamSrvDiedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn index 5973d5dbef47d78630b81cfba9e6e2744c095b63..e0afce0a3c8429ab83f0e2dce4f4a57091247f61 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn @@ -25,17 +25,12 @@ ohos_fuzztest("SoftbusAdapterFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -65,6 +60,7 @@ ohos_fuzztest("SoftbusAdapterFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn index 58f06335117ddbd0b160cd489219f9e2a03d0582..1ca006258f67856a508a890dff8cf7bf01cfd631 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceBytesReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSourceBytesReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn index a36430159cfe7bee501f5c90d609e1f1231bd262..3b45ab3859068d665f2a63d14e6ffb44c8811a42 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceMessageReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSourceMessageReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn index 8b2eac410d627129361ad31b425d2be590209d33..6c4a70633ac00773b2cf9ef646a8d1c4e52610ea 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceSessionClosedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSourceSessionClosedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn index ab6e8a74ffc711d93fbabfeee88acff70c8dc3a6..c4a47c13b97c0488b9fbcb138aff8adf35596000 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceSessionOpenedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSourceSessionOpenedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn index 1c324c080a9588aa92e89af2b79fdeb50dbc9dd5..6ed6aba878ea6b13c3d7eccd7b6be042dd32c8cb 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceStreamReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSourceStreamReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn index e70740ef74991ebc72f98253254f05cadfa5f858..1ce4b94da6ea201f3f42b3da9f2b802169556deb 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn @@ -28,7 +28,6 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { "include", "${common_path}/include", "${common_path}/include/constants", - "${fwk_common_path}/utils/include", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", ] @@ -54,6 +53,7 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn index 450cec3b8f4a490d672f147447fab4c9a08ee788..23a2a1fbb82d6d4e05279e5ca53ba34ffa9ed9d3 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn @@ -27,7 +27,6 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { "include", "${common_path}/include", "${common_path}/include/constants", - "${fwk_common_path}/utils/include", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", ] @@ -53,6 +52,7 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn index c946ac114315dfba060e1f7146297c50e6133054..eadf74ef293fee04757f68c755b75d317002a49e 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SourceHandlerRegisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceHandlerRegisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn index 890e9533f600330c1c4857c2d026af830f3bbea3..c2da36f80ca5d1199f2fefaf246e249b077f4ae5 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SourceHandlerUnregisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceHandlerUnregisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn index e8a6468e095408cb48d50c54ae28041985616160..486275fec2e47f7f729a590d0266acf33b768c64 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceOnLoadSystemAbilityFailFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceOnLoadSystemAbilityFailFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn index ea3ee3339ddef538425c328b015cb5d3fa3d7963..6b1ef6339d71c36e9eaa70771cac8e4ecabaeff2 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceOnLoadSystemAbilitySuccessFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceOnLoadSystemAbilitySuccessFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn index e98099cca3c9eeb44d33bc8f6245672dafa67005..5d5e88ad451b743a8b1c37ceabb2893b2bec3e50 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceProxyDCameraNotifyFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -57,6 +55,7 @@ ohos_fuzztest("SourceProxyDCameraNotifyFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn index 4d8a9270b15876e0b48a349bb8f49ec3ce50b057..607b0efeb7de1b67007c49c5331435fe8a50a499 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceProxyInitSourceFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -57,6 +55,7 @@ ohos_fuzztest("SourceProxyInitSourceFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn index 56fa1822a97a2c1d4b51044603ddddc96874f99e..f9b6c6cc2869f2013f6cbbf23b5e5e466b2fbee7 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,10 +24,8 @@ ohos_fuzztest("SourceProxyRegisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -58,6 +56,7 @@ ohos_fuzztest("SourceProxyRegisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn index 0e8f69ec56161feafa1dafc09002ca20e740c296..ea5d6f560d5dd32782b938fe4f03c574279f07ed 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,10 +24,8 @@ ohos_fuzztest("SourceProxyUnregisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -58,6 +56,7 @@ ohos_fuzztest("SourceProxyUnregisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicedcameranotify_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicedcameranotify_fuzzer/BUILD.gn index 362ec6b3efeb816c8f907aa2ff53b273e5452dd0..11d80a9d89ee857cc42bf8bf4b4d3f03b15ef0b2 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicedcameranotify_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicedcameranotify_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceServiceDCameraNotifyFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceservicedcameranotify_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -42,10 +40,6 @@ ohos_fuzztest("SourceServiceDCameraNotifyFuzzTest") { "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerahdf", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerastate", - - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", ] cflags = [ @@ -71,6 +65,7 @@ ohos_fuzztest("SourceServiceDCameraNotifyFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceinitsource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceinitsource_fuzzer/BUILD.gn index ccf77c8a790ac9b7081e751e6c0ae63a052e0836..1efaf08e545dc86092f4419f6383b9f4073b7e75 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceinitsource_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceinitsource_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceServiceInitSourceFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceserviceinitsource_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -42,10 +40,6 @@ ohos_fuzztest("SourceServiceInitSourceFuzzTest") { "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerahdf", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerastate", - - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", ] cflags = [ @@ -72,6 +66,7 @@ ohos_fuzztest("SourceServiceInitSourceFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceregisterdistributedhardware_fuzzer/BUILD.gn index 338cd95aadd75bf662c1e085f4e35569c1c1985c..3455117978b87242d3beaae363430afcdba6b3ac 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,10 +24,8 @@ ohos_fuzztest("SourceServiceRegisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceserviceregisterdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -43,10 +41,6 @@ ohos_fuzztest("SourceServiceRegisterDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerahdf", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerastate", - - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", ] cflags = [ @@ -72,6 +66,7 @@ ohos_fuzztest("SourceServiceRegisterDistributedHardwareFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicereleasesource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicereleasesource_fuzzer/BUILD.gn index 61586747aab765ae85cc11543494c667e50912b7..2a0b09adc24f7d7c0b52a45cee693900872da071 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicereleasesource_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicereleasesource_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceServiceReleaseSourceFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceservicereleasesource_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -42,10 +40,6 @@ ohos_fuzztest("SourceServiceReleaseSourceFuzzTest") { "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerahdf", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerastate", - - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", ] cflags = [ @@ -71,6 +65,7 @@ ohos_fuzztest("SourceServiceReleaseSourceFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceunregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceunregisterdistributedhardware_fuzzer/BUILD.gn index ed97eb4cad2f509b15124eef400e6b3526b52dab..f71373fcf94f1308e9e22657884e19d9631d2ee5 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceunregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceunregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,10 +24,8 @@ ohos_fuzztest("SourceServiceUnregisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceserviceunregisterdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -43,10 +41,6 @@ ohos_fuzztest("SourceServiceUnregisterDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerahdf", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface", "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerastate", - - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", ] cflags = [ @@ -72,6 +66,7 @@ ohos_fuzztest("SourceServiceUnregisterDistributedHardwareFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn index eed46b0fe8385e6f059ce112089fd429c14694c9..f34c1b8ea8b7b3eba7c81fe8660a704936a9965a 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn @@ -26,7 +26,6 @@ config("module_private_config") { "${common_path}/include/utils", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_common_path}/utils/include", ] } @@ -51,6 +50,7 @@ ohos_unittest("DCameraSinkHandlerTest") { "access_token:libnativetoken_shared", "access_token:libtokensetproc_shared", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "dsoftbus:softbus_client", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp index 4223d55105fb5f3c9b00f2b06b31646df8878817..cdec29242af56486a6ff2e4b532ddfd7213933a1 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp @@ -170,9 +170,6 @@ HWTEST_F(DCameraSinkHandlerTest, dcamera_sink_handler_test_005, TestSize.Level1) SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); sptr remoteObject = samgr->GetSystemAbility(systemAbilityId); sptr loadCallback(new DCameraSinkLoadCallback(params)); - if (loadCallback == nullptr) { - return; - } loadCallback->OnLoadSystemAbilitySuccess(systemAbilityId, remoteObject); remoteObject = nullptr; @@ -194,9 +191,6 @@ HWTEST_F(DCameraSinkHandlerTest, dcamera_sink_handler_test_006, TestSize.Level1) std::string params = "test006"; int32_t systemAbilityId = 4804; sptr loadCallback(new DCameraSinkLoadCallback(params)); - if (loadCallback == nullptr) { - return; - } loadCallback->OnLoadSystemAbilityFail(systemAbilityId); systemAbilityId = 1; @@ -263,9 +257,6 @@ HWTEST_F(DCameraSinkHandlerTest, dcamera_sink_handler_test_010, TestSize.Level1) SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); sptr remoteObject = samgr->GetSystemAbility(systemAbilityId); sptr loadCallback(new DCameraSinkLoadCallback(params)); - if (loadCallback == nullptr) { - return; - } loadCallback->OnLoadSystemAbilitySuccess(systemAbilityId, remoteObject); remoteObject = nullptr; diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn index a18ec9e7a15a6812b2a9321460653d6f9febca98..8556c3398ab6f3f1ee2d2de5f495718bbf9123cd 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn @@ -28,7 +28,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", "${innerkits_path}/native_cpp/test/include", - "${fwk_common_path}/utils/include", ] } @@ -50,6 +49,7 @@ ohos_unittest("DCameraSourceHandlerTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/callback/dcamera_source_callback_test.cpp b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/callback/dcamera_source_callback_test.cpp index b9b416287be492dbb22a9af30853bc1b81591114..e050853077cc491fca49e9cfe0ac25a321a18833 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/callback/dcamera_source_callback_test.cpp +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/callback/dcamera_source_callback_test.cpp @@ -143,9 +143,6 @@ HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_002, TestSize.L std::string reqId = "reqId"; int32_t status = 0; std::string data = "data"; - if (sourceCallback_ == nullptr) { - return; - } int32_t ret = sourceCallback_->OnNotifyRegResult(devId, dhId, reqId, status, data); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); } @@ -183,9 +180,6 @@ HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_004, TestSize.L std::string reqId = "reqId"; int32_t status = 0; std::string data = "data"; - if (sourceCallback_ == nullptr) { - return; - } int32_t ret = sourceCallback_->OnNotifyUnregResult(devId, dhId, reqId, status, data); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); } @@ -202,9 +196,6 @@ HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_005, TestSize.L std::string dhId = "dhId"; std::string reqId = "reqId"; std::string result = "result"; - if (sourceCallback_ == nullptr) { - return; - } int32_t ret = sourceCallback_->CheckParams(devId, dhId, reqId, result); EXPECT_EQ(false, ret); devId += std::string(DID_MAX_SIZE + 1, 'a'); @@ -252,9 +243,6 @@ HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_006, TestSize.L data.WriteString(devId); data.WriteString(dhId); data.WriteString(reqId); - if (sourceCallback_ == nullptr) { - return; - } int32_t ret = sourceCallback_->OnRemoteRequest(code, data, reply, option); EXPECT_NE(DCAMERA_OK, ret); code = DCameraSourceCallback::NOTIFY_REG_RESULT; @@ -310,9 +298,6 @@ HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_008, TestSize.L data.WriteString(reqId); data.WriteInt32(status); data.WriteString(result); - if (sourceCallback_ == nullptr) { - return; - } int32_t ret = sourceCallback_->NotifyUnregResultInner(data, reply); sourceCallback_->RegisterStateListener(nullptr); sourceCallback_->UnRegisterStateListener(); @@ -332,9 +317,6 @@ HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_009, TestSize.L std::string devId = "devId"; std::string dhId = "dhId"; int32_t status = 1; - if (sourceCallback_ == nullptr) { - return; - } int32_t ret = sourceCallback_->OnHardwareStateChanged(devId, dhId, status); EXPECT_EQ(DCAMERA_BAD_VALUE, ret); std::shared_ptr listener = @@ -372,9 +354,6 @@ HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_009, TestSize.L HWTEST_F(DCameraSourceCallbackTest, dcamera_source_callback_test_010, TestSize.Level1) { std::string devId = ""; - if (sourceCallback_ == nullptr) { - return; - } int32_t ret = sourceCallback_->OnDataSyncTrigger(devId); EXPECT_EQ(DCAMERA_BAD_VALUE, ret); devId += std::string(DID_MAX_SIZE + 1, 'a'); diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp index 60ca4282d44759c0966d23c09ed15d3e45b4fa41..1908a0ee28db5d90de9a56ad34d9d0a7858d63b1 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp @@ -156,9 +156,6 @@ HWTEST_F(DCameraSourceHandlerTest, dcamera_source_handler_test_005, TestSize.Lev SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); sptr remoteObject = samgr->GetSystemAbility(systemAbilityId); sptr loadCallback(new DCameraSourceLoadCallback(params)); - if (loadCallback == nullptr) { - return; - } loadCallback->OnLoadSystemAbilitySuccess(systemAbilityId, remoteObject); remoteObject = nullptr; @@ -180,9 +177,6 @@ HWTEST_F(DCameraSourceHandlerTest, dcamera_source_handler_test_006, TestSize.Lev std::string params = "test006"; int32_t systemAbilityId = 4803; sptr loadCallback(new DCameraSourceLoadCallback(params)); - if (loadCallback == nullptr) { - return; - } loadCallback->OnLoadSystemAbilityFail(systemAbilityId); systemAbilityId = 1; diff --git a/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp b/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp index 3c4e0c6067129f40a898f0d5690def2db610a909..b65a134585943797b222d118805ef7a5ecd27552 100644 --- a/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp +++ b/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp @@ -35,14 +35,13 @@ int32_t DCameraCaptureInfoCmd::Marshal(std::string& jsonStr) CHECK_NULL_FREE_RETURN(captureInfos, DCAMERA_BAD_VALUE, rootValue); cJSON_AddItemToObject(rootValue, "Value", captureInfos); for (auto iter = value_.begin(); iter != value_.end(); iter++) { - std::shared_ptr capture = *iter; - if (capture == nullptr) { + cJSON *captureInfo = cJSON_CreateObject(); + if (captureInfo == nullptr) { cJSON_Delete(rootValue); return DCAMERA_BAD_VALUE; } - cJSON *captureInfo = cJSON_CreateObject(); - CHECK_NULL_FREE_RETURN(captureInfo, DCAMERA_BAD_VALUE, rootValue); cJSON_AddItemToArray(captureInfos, captureInfo); + std::shared_ptr capture = *iter; cJSON_AddNumberToObject(captureInfo, "Width", capture->width_); cJSON_AddNumberToObject(captureInfo, "Height", capture->height_); cJSON_AddNumberToObject(captureInfo, "Format", capture->format_); @@ -165,9 +164,6 @@ int32_t DCameraCaptureInfoCmd::UmarshalValue(cJSON *rootValue) int32_t DCameraCaptureInfoCmd::UmarshalSettings(cJSON *valueJson, std::shared_ptr& captureInfo) { - if (captureInfo == nullptr) { - return DCAMERA_BAD_VALUE; - } cJSON *captureSetting = nullptr; cJSON_ArrayForEach(captureSetting, valueJson) { cJSON *settingType = cJSON_GetObjectItemCaseSensitive(captureSetting, "SettingType"); diff --git a/services/cameraservice/base/src/dcamera_event_cmd.cpp b/services/cameraservice/base/src/dcamera_event_cmd.cpp index ce25bf3b888bf9e85ba7f69bf527ff4626dc1ba5..2c4c8873506e9897c5737959232e91148b4b315d 100644 --- a/services/cameraservice/base/src/dcamera_event_cmd.cpp +++ b/services/cameraservice/base/src/dcamera_event_cmd.cpp @@ -23,9 +23,6 @@ namespace OHOS { namespace DistributedHardware { int32_t DCameraEventCmd::Marshal(std::string& jsonStr) { - if (value_ == nullptr) { - return DCAMERA_BAD_VALUE; - } cJSON *rootValue = cJSON_CreateObject(); if (rootValue == nullptr) { return DCAMERA_BAD_VALUE; diff --git a/services/cameraservice/base/src/dcamera_info_cmd.cpp b/services/cameraservice/base/src/dcamera_info_cmd.cpp index 5732ec5ff1f91d08c9e357d6aff4efcde1736f37..0f950f7f7a45b4aec926536ce36a57b0ba966bef 100644 --- a/services/cameraservice/base/src/dcamera_info_cmd.cpp +++ b/services/cameraservice/base/src/dcamera_info_cmd.cpp @@ -24,9 +24,6 @@ namespace OHOS { namespace DistributedHardware { int32_t DCameraInfoCmd::Marshal(std::string& jsonStr) { - if (value_ == nullptr) { - return DCAMERA_BAD_VALUE; - } cJSON *rootValue = cJSON_CreateObject(); if (rootValue == nullptr) { return DCAMERA_BAD_VALUE; diff --git a/services/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp b/services/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp index 468cbf2ac9ade9c1310e90ddd8c2df8216c92d42..8688b0bcb366d0ff31dd6e9ebecc3d2e4ab1912c 100644 --- a/services/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp +++ b/services/cameraservice/base/src/dcamera_metadata_setting_cmd.cpp @@ -39,10 +39,6 @@ int32_t DCameraMetadataSettingCmd::Marshal(std::string& jsonStr) } cJSON_AddItemToObject(rootValue, "Value", settings); for (auto iter = value_.begin(); iter != value_.end(); iter++) { - if ((*iter) == nullptr) { - cJSON_Delete(rootValue); - return DCAMERA_BAD_VALUE; - } cJSON *setting = cJSON_CreateObject(); if (setting == nullptr) { cJSON_Delete(rootValue); diff --git a/services/cameraservice/base/src/dcamera_open_info_cmd.cpp b/services/cameraservice/base/src/dcamera_open_info_cmd.cpp index 92ce18a9073bd0de94d764ba57a43f67c96206c7..3b92647690aa07af694db6bcb79156b71f5187e9 100644 --- a/services/cameraservice/base/src/dcamera_open_info_cmd.cpp +++ b/services/cameraservice/base/src/dcamera_open_info_cmd.cpp @@ -24,9 +24,6 @@ namespace OHOS { namespace DistributedHardware { int32_t DCameraOpenInfoCmd::Marshal(std::string& jsonStr) { - if (value_ == nullptr) { - return DCAMERA_BAD_VALUE; - } cJSON *rootValue = cJSON_CreateObject(); if (rootValue == nullptr) { return DCAMERA_BAD_VALUE; diff --git a/services/cameraservice/base/test/unittest/common/base/BUILD.gn b/services/cameraservice/base/test/unittest/common/base/BUILD.gn index 91e06b71ce9d7a680a1d3cafe6464c8c13f4594d..5c824bffe4934402b8807414a3e070f4e2feb6ba 100755 --- a/services/cameraservice/base/test/unittest/common/base/BUILD.gn +++ b/services/cameraservice/base/test/unittest/common/base/BUILD.gn @@ -19,14 +19,8 @@ module_out_path = "distributed_camera/dcamera_services_base_test" config("module_private_config") { visibility = [ ":*" ] - include_dirs = [ - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", - ] - include_dirs += [ + include_dirs = [ "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_source/include/callback", @@ -54,15 +48,14 @@ ohos_unittest("DCameraServicesBaseTest") { deps = [ "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${services_path}/cameraservice/sourceservice:distributed_camera_source", "${services_path}/channel:distributed_camera_channel", - "//third_party/googletest:gtest_main", ] external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "dsoftbus:softbus_client", "hilog:libhilog", diff --git a/services/cameraservice/cameraoperator/client/BUILD.gn b/services/cameraservice/cameraoperator/client/BUILD.gn index 1bc62ce99259a883f85d20e443a8a8f60ae1f2a0..8bc8fd95ba64ad49b6373a85ec7f3f9cd363eca8 100644 --- a/services/cameraservice/cameraoperator/client/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/BUILD.gn @@ -68,15 +68,11 @@ ohos_shared_library("distributed_camera_client") { "cJSON:cjson", "c_utils:utils", "camera_framework:camera_framework", - "drivers_interface_camera:libbuffer_handle_sequenceable_1.0", - "drivers_interface_camera:libbuffer_producer_sequenceable_1.0", "drivers_interface_camera:libcamera_proxy_1.0", - "drivers_interface_camera:libmap_data_sequenceable_1.0", "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", "graphic_surface:surface", - "hdf_core:libhdf_utils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn b/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn index 7dc97714dbb8f50fbbf5f6f452818cbe4415adb6..e433bbdb40acaac9204fb5c1d00cf5ca6babbad6 100644 --- a/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn @@ -19,21 +19,8 @@ module_out_path = "distributed_camera/dcamera_client_test" config("module_private_config") { visibility = [ ":*" ] - include_dirs = [ - "${graphicsurface_path}/surface/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", - "${camerastandard_path}/services/camera_service/binder/base/include", - "${camerastandard_path}/services/camera_service/binder/client/include", - "${camerastandard_path}/services/camera_service/binder/server/include", - "${camerastandard_path}/services/camera_service/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include", - ] - include_dirs += [ + include_dirs = [ "${common_path}/include/constants", "${common_path}/include/utils", "${feeding_smoother_path}/base", @@ -60,12 +47,10 @@ ohos_unittest("DCameraClientTest") { configs = [ ":module_private_config" ] deps = [ - "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", "${services_path}/cameraservice/sinkservice:distributed_camera_sink", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -74,9 +59,10 @@ ohos_unittest("DCameraClientTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "camera_framework:camera_framework", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_camera:libbuffer_handle_sequenceable_1.0", "drivers_interface_camera:libcamera_proxy_1.0", - "drivers_interface_camera:libmap_data_sequenceable_1.0", "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", diff --git a/services/cameraservice/cameraoperator/handler/BUILD.gn b/services/cameraservice/cameraoperator/handler/BUILD.gn index 213a2b76691b8fd62c1d9590919ba92c441a5f8b..4e06be49e265201a430dfdd0255a72e44c681cec 100644 --- a/services/cameraservice/cameraoperator/handler/BUILD.gn +++ b/services/cameraservice/cameraoperator/handler/BUILD.gn @@ -58,11 +58,8 @@ ohos_shared_library("distributed_camera_handler") { "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", "graphic_surface:surface", - "hdf_core:libhdf_utils", "hilog:libhilog", "ipc:ipc_core", - "media_foundation:media_foundation", - "samgr:samgr_proxy", ] subsystem_name = "distributedhardware" diff --git a/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn b/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn index 8d6a72030782298b3590c80a49b0c71375d6ad37..d1521dc0939ff5910c0d5331a586ff8cdbb242a4 100644 --- a/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn +++ b/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn @@ -19,21 +19,8 @@ module_out_path = "distributed_camera/dcamera_handler_test" config("module_private_config") { visibility = [ ":*" ] - include_dirs = [ - "${graphicsurface_path}/surface/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", - "${camerastandard_path}/services/camera_service/binder/base/include", - "${camerastandard_path}/services/camera_service/binder/client/include", - "${camerastandard_path}/services/camera_service/binder/server/include", - "${camerastandard_path}/services/camera_service/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include", - ] - include_dirs += [ + include_dirs = [ "${common_path}/include/constants", "${common_path}/include/utils", "${services_path}/cameraservice/base/include", @@ -50,10 +37,8 @@ ohos_unittest("DCameraHandlerTest") { configs = [ ":module_private_config" ] deps = [ - "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -62,6 +47,8 @@ ohos_unittest("DCameraHandlerTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "camera_framework:camera_framework", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", diff --git a/services/cameraservice/sinkservice/BUILD.gn b/services/cameraservice/sinkservice/BUILD.gn index 767bd71efc5265d2d60a0c588f1c91d45e9a40a7..8fb4954a865c191bd01fe1035a4d54e44b2b1a28 100644 --- a/services/cameraservice/sinkservice/BUILD.gn +++ b/services/cameraservice/sinkservice/BUILD.gn @@ -76,10 +76,6 @@ ohos_shared_library("distributed_camera_sink") { "src/distributedcameramgr/dcamera_sink_dev.cpp", "src/distributedcameramgr/dcamera_sink_output.cpp", "src/distributedcameramgr/dcamera_sink_service_ipc.cpp", - "src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp", - "src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp", - "src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp", - "src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp", "src/distributedcameramgr/listener/dcamera_sink_controller_channel_listener.cpp", "src/distributedcameramgr/listener/dcamera_sink_data_process_listener.cpp", "src/distributedcameramgr/listener/dcamera_sink_output_channel_listener.cpp", @@ -113,14 +109,10 @@ ohos_shared_library("distributed_camera_sink") { "device_security_level:dslm_sdk", "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:distributedhardwareutils", - "distributed_hardware_fwk:libdhfwk_sdk", - "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", - "dsoftbus:softbus_client", "eventhandler:libeventhandler", "graphic_surface:surface", - "hdf_core:libhdf_utils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_frame_trigger_event.h b/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_frame_trigger_event.h deleted file mode 100644 index 54c2cb2e9d4eb631eed30c2a427da1fe6f7eba20..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_frame_trigger_event.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2021-2024 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_DCAMERA_FRAME_TRIGER_EVENT_H -#define OHOS_DCAMERA_FRAME_TRIGER_EVENT_H - -#include -#include "eventbus/event.h" - -namespace OHOS { -namespace DistributedHardware { -class DCameraFrameTriggerEvent : public Event { -TYPEINDENT(DCameraFrameTriggerEvent); -public: - explicit DCameraFrameTriggerEvent(EventSender& sender); - DCameraFrameTriggerEvent(EventSender& sender, std::string& param); - ~DCameraFrameTriggerEvent() = default; - std::string GetParam(); - -private: - std::string param_; -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif // OHOS_DCAMERA_FRAME_TRIGER_EVENT_H \ No newline at end of file diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_photo_output_event.h b/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_photo_output_event.h deleted file mode 100644 index f13dc0280c8aef9658d9bcfa97583853b37ab8c4..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_photo_output_event.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2021-2024 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_DCAMERA_PHOTO_OUTPUT_EVENT_H -#define OHOS_DCAMERA_PHOTO_OUTPUT_EVENT_H - -#include "eventbus/event.h" - -#include -#include - -#include "data_buffer.h" - -namespace OHOS { -namespace DistributedHardware { -class DCameraPhotoOutputEvent : public Event { -TYPEINDENT(DCameraPhotoOutputEvent); -public: - explicit DCameraPhotoOutputEvent(EventSender& sender); - DCameraPhotoOutputEvent(EventSender& sender, const std::shared_ptr& param); - ~DCameraPhotoOutputEvent() = default; - std::shared_ptr GetParam(); - -private: - std::shared_ptr param_; -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif // OHOS_DCAMERA_PHOTO_OUTPUT_EVENT_H \ No newline at end of file diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_video_output_event.h b/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_video_output_event.h deleted file mode 100644 index aea9b9ab12850ddbe2b3abbeb53827779ee43c06..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_video_output_event.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2021-2024 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_DCAMERA_VIDEO_OUTPUT_EVENT_H -#define OHOS_DCAMERA_VIDEO_OUTPUT_EVENT_H - -#include - -#include "eventbus/event.h" -#include "data_buffer.h" - -namespace OHOS { -namespace DistributedHardware { -class DCameraVideoOutputEvent : public Event { -TYPEINDENT(DCameraVideoOutputEvent); -public: - explicit DCameraVideoOutputEvent(EventSender& sender); - DCameraVideoOutputEvent(EventSender& sender, const std::shared_ptr& param); - ~DCameraVideoOutputEvent() = default; - std::shared_ptr GetParam(); - -private: - std::shared_ptr param_; -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif // OHOS_DCAMERA_VIDEO_OUTPUT_EVENT_H \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp deleted file mode 100644 index 9ef08a79944cc33d3cd7743ac1daef96d7393b14..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 "dcamera_frame_trigger_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraFrameTriggerEvent::DCameraFrameTriggerEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraFrameTriggerEvent::DCameraFrameTriggerEvent(EventSender& sender, std::string& param) - : Event(sender), param_(param) -{ -} - -std::string DCameraFrameTriggerEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp deleted file mode 100644 index 1db88ea722bc6b771c5e31cabb023dcd3db4aea6..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 "dcamera_photo_output_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraPhotoOutputEvent::DCameraPhotoOutputEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraPhotoOutputEvent::DCameraPhotoOutputEvent(EventSender& sender, const std::shared_ptr& param) - : Event(sender), param_(param) -{ -} - -std::shared_ptr DCameraPhotoOutputEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp deleted file mode 100644 index 97bd0a6fb84b9c637408424961dd4308cb8a768d..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 "dcamera_post_authorization_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraPostAuthorizationEvent::DCameraPostAuthorizationEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraPostAuthorizationEvent::DCameraPostAuthorizationEvent(EventSender& sender, - std::vector>& param) : Event(sender), param_(param) -{ -} - -std::vector> DCameraPostAuthorizationEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp deleted file mode 100644 index 6de51a9aa38a1742c97c98c07d8bc35ab2bb6148..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 "dcamera_video_output_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraVideoOutputEvent::DCameraVideoOutputEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraVideoOutputEvent::DCameraVideoOutputEvent(EventSender& sender, const std::shared_ptr& param) - : Event(sender), param_(param) -{ -} - -std::shared_ptr DCameraVideoOutputEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn index 6a428d6f3f00221a343a8e15880d416ff25fa953..619311f433c00ae6d73e7ea93b5ac11acac488e3 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn @@ -19,22 +19,10 @@ module_out_path = "distributed_camera/dcamera_sink_test" config("module_private_config") { visibility = [ ":*" ] - include_dirs = [ - "${graphicsurface_path}/surface/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", - "${camerastandard_path}/services/camera_service/binder/base/include", - "${camerastandard_path}/services/camera_service/binder/client/include", - "${camerastandard_path}/services/camera_service/binder/server/include", - "${camerastandard_path}/services/camera_service/include", - ] - include_dirs += [ + include_dirs = [ "${common_path}/include/constants", "${common_path}/include/utils", - "${fwk_common_path}/utils/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -46,7 +34,6 @@ config("module_private_config") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/eventbus", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] } @@ -69,12 +56,10 @@ ohos_unittest("DistributedCameraSinkServiceTest") { configs = [ ":module_private_config" ] deps = [ - "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", "${services_path}/cameraservice/sinkservice:distributed_camera_sink", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -83,6 +68,8 @@ ohos_unittest("DistributedCameraSinkServiceTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "camera_framework:camera_framework", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn index d3a2253b99bfd986b044a2eab55225577ec535e5..46a7a94a0123a194189f7530bf1a85ee97d87f6f 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -20,18 +20,8 @@ module_out_path = "distributed_camera/dcamera_sink_mgr_test" config("module_private_config") { visibility = [ ":*" ] include_dirs = [ - "${graphicsurface_path}/surface/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", - "${camerastandard_path}/services/camera_service/binder/base/include", - "${camerastandard_path}/services/camera_service/binder/client/include", - "${camerastandard_path}/services/camera_service/binder/server/include", - "${camerastandard_path}/services/camera_service/include", "${services_path}/cameraservice/sinkservice/include/distributedcameramgr", "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/callback", - "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/interface", "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/listener", "${services_path}/cameraservice/cameraoperator/client/include", @@ -47,8 +37,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_source/include/callback", "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -70,10 +58,6 @@ ohos_unittest("DCameraSinkMgrTest") { "dcamera_sink_dev_test.cpp", "dcamera_sink_output_test.cpp", "dcamera_sink_service_ipc_test.cpp", - "eventbus/dcamera_frame_trigger_event_test.cpp", - "eventbus/dcamera_photo_output_event_test.cpp", - "eventbus/dcamera_post_authorization_event_test.cpp", - "eventbus/dcamera_video_output_event_test.cpp", ] cflags = [ @@ -84,7 +68,6 @@ ohos_unittest("DCameraSinkMgrTest") { configs = [ ":module_private_config" ] deps = [ - "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", @@ -100,6 +83,7 @@ ohos_unittest("DCameraSinkMgrTest") { "av_codec:av_codec_client", "cJSON:cjson", "c_utils:utils", + "camera_framework:camera_framework", "device_manager:devicemanagersdk", "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_camera:metadata", diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_photo_output_event_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_photo_output_event_test.cpp deleted file mode 100644 index 4777134f93273163c70cc584077f385a29159269..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_photo_output_event_test.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2023 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 - -#include "dcamera_photo_output_event.h" -#include "data_buffer.h" -#include "distributed_hardware_log.h" - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -class DCameraPhotoOutputEventTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); - - std::shared_ptr dataBuffer_ = nullptr; - std::shared_ptr testsender_ = nullptr; - std::shared_ptr testDCameraPhotoOutputEvent_ = nullptr; -}; - -namespace { - constexpr size_t TEST_CAPACITY = 1; -} - -void DCameraPhotoOutputEventTest::SetUpTestCase(void) -{ - DHLOGI("DCameraPhotoOutputEventTest SetUpTestCase"); -} - -void DCameraPhotoOutputEventTest::TearDownTestCase(void) -{ - DHLOGI("DCameraPhotoOutputEventTest TearDownTestCase"); -} - -void DCameraPhotoOutputEventTest::SetUp(void) -{ - DHLOGI("DCameraPhotoOutputEventTest SetUp"); - dataBuffer_ = std::make_shared(TEST_CAPACITY); - testsender_ = std::make_shared(); - testDCameraPhotoOutputEvent_ = std::make_shared(*testsender_, dataBuffer_); -} - -void DCameraPhotoOutputEventTest::TearDown(void) -{ - DHLOGI("DCameraPhotoOutputEventTest SetUp"); - testsender_ = nullptr; - testDCameraPhotoOutputEvent_ = nullptr; -} - -/** - * @tc.name: dcamera_photo_output_event_test_001 - * @tc.desc: Verify DCameraPhotoOutputEvent init param correct - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(DCameraPhotoOutputEventTest, dcamera_photo_output_event_test_001, TestSize.Level1) -{ - std::shared_ptr buffer = testDCameraPhotoOutputEvent_->GetParam(); - EXPECT_EQ(buffer->Capacity(), TEST_CAPACITY); -} -} // namespace DistributedHardware -} // namespace OHOS diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_post_authorization_event_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_post_authorization_event_test.cpp deleted file mode 100644 index 1b789e25e3dc971029a2fa5c128140c17296c297..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_post_authorization_event_test.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2023 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 - -#include "dcamera_post_authorization_event.h" -#include "dcamera_capture_info_cmd.h" -#include "distributed_hardware_log.h" - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -class DCameraPostAuthorizationEventTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); - - std::shared_ptr videoInfo; - std::vector> captureInfos; - std::shared_ptr testsender_; - std::shared_ptr testDCameraPostAuthorizationEvent_; -}; - -namespace { - constexpr int32_t TEST_WIDTH = 640; - constexpr int32_t TEST_HEIGHT = 480; - constexpr int32_t TEST_FORMAT_VIDEO = OHOS_CAMERA_FORMAT_RGBA_8888; -} - -void DCameraPostAuthorizationEventTest::SetUpTestCase(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest SetUpTestCase"); -} - -void DCameraPostAuthorizationEventTest::TearDownTestCase(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest TearDownTestCase"); -} - -void DCameraPostAuthorizationEventTest::SetUp(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest SetUp"); - videoInfo = std::make_shared(); - videoInfo->width_ = TEST_WIDTH; - videoInfo->height_ = TEST_HEIGHT; - videoInfo->format_ = TEST_FORMAT_VIDEO; - videoInfo->isCapture_ = true; - videoInfo->streamType_ = CONTINUOUS_FRAME; - captureInfos.push_back(videoInfo); - testsender_ = std::make_shared(); - testDCameraPostAuthorizationEvent_ = std::make_shared(*testsender_, captureInfos); -} - -void DCameraPostAuthorizationEventTest::TearDown(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest SetUp"); - testsender_ = nullptr; - testDCameraPostAuthorizationEvent_ = nullptr; -} - -/** - * @tc.name: dcamera_post_authorization_event_test_001 - * @tc.desc: Verify DCameraPostAuthorizationEvent init param correct - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(DCameraPostAuthorizationEventTest, dcamera_post_authorization_event_test_001, TestSize.Level1) -{ - std::vector> info = testDCameraPostAuthorizationEvent_->GetParam(); - EXPECT_EQ(info.size(), captureInfos.size()); -} -} // namespace DistributedHardware -} // namespace OHOS diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_video_output_event_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_video_output_event_test.cpp deleted file mode 100644 index 29be3e2414ff8b6bbcef4416f64783c3f21ed122..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_video_output_event_test.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2023 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 - -#include "dcamera_video_output_event.h" -#include "data_buffer.h" -#include "distributed_hardware_log.h" - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -class DCameraVideoOutputEventTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); - - std::shared_ptr dataBuffer_ = nullptr; - std::shared_ptr testsender_ = nullptr; - std::shared_ptr testDCameraVideoOutputEvent_ = nullptr; -}; - -namespace { - constexpr size_t TEST_CAPACITY = 1; -} - -void DCameraVideoOutputEventTest::SetUpTestCase(void) -{ - DHLOGI("DCameraVideoOutputEventTest SetUpTestCase"); -} - -void DCameraVideoOutputEventTest::TearDownTestCase(void) -{ - DHLOGI("DCameraVideoOutputEventTest TearDownTestCase"); -} - -void DCameraVideoOutputEventTest::SetUp(void) -{ - DHLOGI("DCameraVideoOutputEventTest SetUp"); - dataBuffer_ = std::make_shared(TEST_CAPACITY); - testsender_ = std::make_shared(); - testDCameraVideoOutputEvent_ = std::make_shared(*testsender_, dataBuffer_); -} - -void DCameraVideoOutputEventTest::TearDown(void) -{ - DHLOGI("DCameraVideoOutputEventTest SetUp"); - testsender_ = nullptr; - testDCameraVideoOutputEvent_ = nullptr; -} - -/** - * @tc.name: dcamera_video_output_event_test_001 - * @tc.desc: Verify DCameraVideoOutputEvent init param correct - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(DCameraVideoOutputEventTest, dcamera_video_output_event_test_001, TestSize.Level1) -{ - std::shared_ptr buffer = testDCameraVideoOutputEvent_->GetParam(); - EXPECT_EQ(buffer->Capacity(), TEST_CAPACITY); -} -} // namespace DistributedHardware -} // namespace OHOS diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h index 052d2ccdfd4f74c75823ab78fdbaaa18a89346fe..e9fd2629b789f85c27f1a11fabdbc3e20a4068b2 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h @@ -25,8 +25,6 @@ #include "data_process_listener.h" #include "dcamera_capture_info_cmd.h" #include "dcamera_index.h" -#include "dcamera_photo_output_event.h" -#include "dcamera_video_output_event.h" #include "icamera_channel.h" #include "icamera_channel_listener.h" #include "icamera_sink_data_process.h" @@ -59,12 +57,6 @@ public: void Init() { } - void OnEvent(DCameraPhotoOutputEvent& event) - { - } - void OnEvent(DCameraVideoOutputEvent& event) - { - } void OnProcessedVideoBuffer(const std::shared_ptr& videoResult) { } diff --git a/services/cameraservice/sourceservice/BUILD.gn b/services/cameraservice/sourceservice/BUILD.gn index 53c27fe8f435551b25cf0d8376156b14f01a5cd0..78b3180913bc0b4141266845dd14b5825d36de2a 100644 --- a/services/cameraservice/sourceservice/BUILD.gn +++ b/services/cameraservice/sourceservice/BUILD.gn @@ -126,19 +126,15 @@ ohos_shared_library("distributed_camera_source") { "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", - "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", - "dsoftbus:softbus_client", "eventhandler:libeventhandler", "graphic_surface:surface", - "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdi", "hdf_core:libpub_utils", "hicollie:libhicollie", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", - "media_foundation:media_foundation", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp b/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp index 857415d7474c0f47a4297acdce22a86a70d02840..85a23569074348b0e5515670fb3f499abf1bed90 100644 --- a/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp +++ b/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 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 @@ -118,7 +118,7 @@ int32_t DCameraSourceInput::ReleaseStreams(std::vector& streamIds, bool& is std::vector continueStreamIds; dataProcess_[CONTINUOUS_FRAME]->GetAllStreamIds(continueStreamIds); std::vector snapStreamIds; - dataProcess_[CONTINUOUS_FRAME]->GetAllStreamIds(snapStreamIds); + dataProcess_[SNAPSHOT_FRAME]->GetAllStreamIds(snapStreamIds); if (continueStreamIds.empty() && snapStreamIds.empty()) { isAllRelease = true; } diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn index b342819abcf5d1f60f18fe9617f05332eb25365a..ac6bba897c8916dc77e32a2a4fab933cebfbaa7d 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn @@ -40,12 +40,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", "${innerkits_path}/native_cpp/camera_sink/include", - - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", - "//drivers/peripheral/base/", - "${graphicsurface_path}/surface/include", ] } @@ -77,7 +71,6 @@ ohos_unittest("DCameraSourceTest") { "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "${services_path}/cameraservice/sourceservice:distributed_camera_source", "${services_path}/channel:distributed_camera_channel", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -86,6 +79,7 @@ ohos_unittest("DCameraSourceTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp index 9d55180a8a8a5cc4a59444942e7743d6050503c1..57403d98dc047402302d8df0dd4f24852269b416 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp @@ -46,6 +46,7 @@ namespace { const std::string TEST_DEVICE_ID = "bb536a637105409e904d4da83790a4a7"; const std::string TEST_CAMERA_DH_ID_0 = "camera_0"; const std::string TEST_REQID = "bb536a637105409e904d4da83790a4a7"; +const int32_t TEST_SOURCE_SERVICE = 200000; } void DistributedCameraSourceServiceTest::SetUpTestCase(void) @@ -178,6 +179,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_006, Te testSrcService_->listener_ = std::make_shared(); int32_t ret = testSrcService_->InitSource(params, callbackProxy); EXPECT_EQ(DCAMERA_OK, ret); + usleep(TEST_SOURCE_SERVICE); } /** @@ -193,6 +195,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_007, Te int32_t ret = testSrcService_->ReleaseSource(); EXPECT_EQ(DCAMERA_BAD_VALUE, ret); + usleep(TEST_SOURCE_SERVICE); } /** @@ -208,6 +211,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_008, Te int32_t ret = testSrcService_->LoadDCameraHDF(); EXPECT_EQ(DCAMERA_OK, ret); + usleep(TEST_SOURCE_SERVICE); } /** @@ -225,6 +229,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_009, Te EXPECT_EQ(DCAMERA_OK, ret); ret = testSrcService_->UnLoadCameraHDF(); EXPECT_EQ(DCAMERA_OK, ret); + usleep(TEST_SOURCE_SERVICE); } } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn index 96fdd28cb30ea27a7f58622bda6b5fe90a8a4877..0a05c6ad0cc381d35e9167bc86666d4f6452485f 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -42,11 +42,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", - "//drivers/peripheral/base/", - "${graphicsurface_path}/surface/include", "${feeding_smoother_path}", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", @@ -84,7 +79,6 @@ ohos_unittest("DCameraSourceMgrTest") { "${services_path}/cameraservice/sourceservice:distributed_camera_source", "${services_path}/channel:distributed_camera_channel", "${services_path}/data_process:distributed_camera_data_process", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -93,6 +87,7 @@ ohos_unittest("DCameraSourceMgrTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/services/channel/BUILD.gn b/services/channel/BUILD.gn index 0ce6c9a9dff4d7d7fea6ba77cf10a74df029eb9e..a5e4ec4feb8a38edd7e3d497942f9960e61bf696 100644 --- a/services/channel/BUILD.gn +++ b/services/channel/BUILD.gn @@ -65,7 +65,6 @@ ohos_shared_library("distributed_camera_channel") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "hilog:libhilog", - "ipc:ipc_core", ] subsystem_name = "distributedhardware" diff --git a/services/channel/src/dcamera_low_latency.cpp b/services/channel/src/dcamera_low_latency.cpp index 9c80cd851cb97515e95db3ed7d0640b8548cd84b..a528c1a78b43662daa1d02cf13afb325725c1a67 100644 --- a/services/channel/src/dcamera_low_latency.cpp +++ b/services/channel/src/dcamera_low_latency.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 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 @@ -95,9 +95,11 @@ int32_t DCameraLowLatency::DisableLowLatency() std::shared_ptr DCameraLowLatency::GetDHFwkKit() { - std::lock_guard lock(dHFwkKitMutex_); if (dHFwkKit_ == nullptr) { - dHFwkKit_ = std::make_shared(); + std::lock_guard lock(dHFwkKitMutex_); + if (dHFwkKit_ == nullptr) { + dHFwkKit_ = std::make_shared(); + } } return dHFwkKit_; } diff --git a/services/channel/test/unittest/common/channel/BUILD.gn b/services/channel/test/unittest/common/channel/BUILD.gn index 511e05f01e94fd21d1387c5fef592b2940b22a0d..66aed6c0b2699d5f9d11c83bdb819fbe490975cf 100644 --- a/services/channel/test/unittest/common/channel/BUILD.gn +++ b/services/channel/test/unittest/common/channel/BUILD.gn @@ -23,9 +23,6 @@ config("module_private_config") { "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", "${services_path}/cameraservice/base/include", "${services_path}/channel/include", "${services_path}/channel/test/unittest/common/channel", @@ -47,7 +44,6 @@ config("module_private_config") { "${services_path}/data_process/include/utils", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", - "${graphicsurface_path}/surface/include", "${feeding_smoother_path}/base", ] } @@ -83,6 +79,7 @@ ohos_unittest("DCameraChannelTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "eventhandler:libeventhandler", "graphic_surface:surface", diff --git a/services/data_process/BUILD.gn b/services/data_process/BUILD.gn index 163a5aa3b4fe18034fe1522d6c3146cce3b0edb0..81e3dff2b1993651d0d7e2967530ae5bb4116ee9 100644 --- a/services/data_process/BUILD.gn +++ b/services/data_process/BUILD.gn @@ -65,8 +65,6 @@ ohos_shared_library("distributed_camera_data_process") { "av_codec:av_codec_client", "cJSON:cjson", "c_utils:utils", - "distributed_hardware_fwk:distributedhardwareutils", - "drivers_interface_display:libdisplay_composer_hdi_impl", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_surface:surface", diff --git a/services/data_process/include/eventbus/dcamera_pipeline_event.h b/services/data_process/include/eventbus/dcamera_pipeline_event.h index a021436b9c90b4926a32cb78a73aeda7a65eee24..f55f0427da90ef064a738725e930bdfdcd4c9ddb 100644 --- a/services/data_process/include/eventbus/dcamera_pipeline_event.h +++ b/services/data_process/include/eventbus/dcamera_pipeline_event.h @@ -18,7 +18,6 @@ #include -#include "eventbus/event.h" #include "data_buffer.h" #include "image_common_type.h" @@ -71,31 +70,6 @@ private: std::string pipelineOwner_; std::vector> multiDataBuffers_; }; - -class DCameraPipelineEvent : public Event { - TYPEINDENT(DCameraPipelineEvent) -public: - DCameraPipelineEvent(EventSender& sender, const std::shared_ptr& pipelineConfig) - : Event(sender), pipelineConfig_(pipelineConfig), action_(PipelineAction::NO_ACTION) {} - DCameraPipelineEvent(EventSender& sender, const std::shared_ptr& pipelineConfig, - PipelineAction otherAction) - : Event(sender), pipelineConfig_(pipelineConfig), action_(otherAction) {} - ~DCameraPipelineEvent() = default; - - std::shared_ptr GetPipelineConfig() const - { - return pipelineConfig_; - } - - PipelineAction GetAction() const - { - return action_; - } - -private: - std::shared_ptr pipelineConfig_ = nullptr; - PipelineAction action_; -}; } // namespace DistributedHardware } // namespace OHOS #endif // OHOS_DCAMERA_PIPELINE_EVENT_H diff --git a/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp b/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp index b43bc9f2cbedf6e8f1b24abf47f0b49da14d6d41..bb96719dd25eb3cef1fa9c5e1f69ae4963045e35 100644 --- a/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp +++ b/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp @@ -21,6 +21,8 @@ namespace OHOS { namespace DistributedHardware { + +const int32_t MAX_IMG_SIZE = 46340; ScaleConvertProcess::~ScaleConvertProcess() { DumpFileUtil::CloseDumpFile(&dumpFile_); @@ -164,6 +166,11 @@ int32_t ScaleConvertProcess::GetImageUnitInfo(ImageUnitInfo& imgInfo, const std: return DCAMERA_BAD_VALUE; } + if (imgInfo.alignedWidth > MAX_IMG_SIZE && imgInfo.alignedHeight > MAX_IMG_SIZE) { + DHLOGE("imgInfo aligned width and height out of range"); + return DCAMERA_BAD_VALUE; + } + bool findErr = true; int32_t colorFormat = 0; findErr = findErr && imgBuf->FindInt32("Videoformat", colorFormat); diff --git a/services/data_process/test/unittest/common/pipeline/BUILD.gn b/services/data_process/test/unittest/common/pipeline/BUILD.gn index 746689c26b35109868f8bb7800dcd5f85a33b6d7..b7bdd7a703cb767fab518429a3e44a1f4f93e4a1 100644 --- a/services/data_process/test/unittest/common/pipeline/BUILD.gn +++ b/services/data_process/test/unittest/common/pipeline/BUILD.gn @@ -32,8 +32,6 @@ config("module_private_config") { "${common_path}/include/constants", "${common_path}/include/utils", "${innerkits_path}/native_cpp/camera_source/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", "${services_path}/cameraservice/base/include", ] diff --git a/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_source_test.cpp b/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_source_test.cpp index b6c91aae2e04948f0afbd8466c50084567aefad8..bdbdd7ce0e91d35d24743614e4c87ef36fddd821 100644 --- a/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_source_test.cpp +++ b/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_source_test.cpp @@ -175,7 +175,6 @@ HWTEST_F(DCameraPipelineSourceTest, dcamera_pipeline_source_test_004, TestSize.L std::vector> buffers; rc = testSourcePipeline_->ProcessData(buffers); EXPECT_EQ(rc, DCAMERA_BAD_VALUE); - usleep(SLEEP_TIME); } /** diff --git a/services/data_process/test/unittest/common/pipeline_node/BUILD.gn b/services/data_process/test/unittest/common/pipeline_node/BUILD.gn index 91053f6f2c3cf1be814d9a365d1d2628f6cc80d0..3b99e70960a440f737edef2c251737cf285919fe 100644 --- a/services/data_process/test/unittest/common/pipeline_node/BUILD.gn +++ b/services/data_process/test/unittest/common/pipeline_node/BUILD.gn @@ -32,8 +32,6 @@ config("module_private_config") { "${common_path}/include/constants", "${common_path}/include/utils", "${innerkits_path}/native_cpp/camera_source/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", "${services_path}/cameraservice/base/include", ] @@ -43,9 +41,11 @@ ohos_unittest("DCameraDataProcessPipelineNodeTest") { module_out_path = module_out_path sources = [ + "abstract_data_process_test.cpp", "decode_data_process_test.cpp", "encode_data_process_test.cpp", "fps_controller_process_test.cpp", + "property_carrier_test.cpp", "scale_convert_process_test.cpp", ] diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_frame_trigger_event_test.cpp b/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp similarity index 40% rename from services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_frame_trigger_event_test.cpp rename to services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp index 4e0453bad1bec1636b8f64f2645b1322cda761fb..04588486250af94d9c7801b0d1bb9a397e9b7b51 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_frame_trigger_event_test.cpp +++ b/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2024 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 @@ -15,59 +15,56 @@ #include -#include "dcamera_frame_trigger_event.h" -#include "distributed_hardware_log.h" +#include "abstract_data_process.h" +#include "distributed_camera_errno.h" +#include "encode_data_process.h" using namespace testing::ext; namespace OHOS { namespace DistributedHardware { -class DCameraFrameTriggerEventTest : public testing::Test { +class AbstractDataProcessTest : public testing::Test { public: static void SetUpTestCase(void); static void TearDownTestCase(void); void SetUp(); void TearDown(); - std::string TEST_PARAM = "testing_param"; - std::shared_ptr testsender_ = nullptr; - std::shared_ptr testDCameraFrameTriggerEvent_ = nullptr; + std::shared_ptr testAbstractDataProcess_; }; -void DCameraFrameTriggerEventTest::SetUpTestCase(void) +void AbstractDataProcessTest::SetUpTestCase(void) { - DHLOGI("DCameraFrameTriggerEventTest SetUpTestCase"); } -void DCameraFrameTriggerEventTest::TearDownTestCase(void) +void AbstractDataProcessTest::TearDownTestCase(void) { - DHLOGI("DCameraFrameTriggerEventTest TearDownTestCase"); } -void DCameraFrameTriggerEventTest::SetUp(void) +void AbstractDataProcessTest::SetUp(void) { - DHLOGI("DCameraFrameTriggerEventTest SetUp"); - testsender_ = std::make_shared(); - testDCameraFrameTriggerEvent_ = std::make_shared(*testsender_, TEST_PARAM); + std::shared_ptr sinkPipeline = std::make_shared(); + testAbstractDataProcess_ = std::make_shared(sinkPipeline); } -void DCameraFrameTriggerEventTest::TearDown(void) +void AbstractDataProcessTest::TearDown(void) { - DHLOGI("DCameraFrameTriggerEventTest SetUp"); - testsender_ = nullptr; - testDCameraFrameTriggerEvent_ = nullptr; + testAbstractDataProcess_ = nullptr; } /** - * @tc.name: dcamera_frame_trigger_event_test_001 - * @tc.desc: Verify DCameraFrameTriggerEvent init param correct + * @tc.name: abstract_data_process_test_001 + * @tc.desc: Verify SetNextNode. * @tc.type: FUNC * @tc.require: Issue Number */ -HWTEST_F(DCameraFrameTriggerEventTest, dcamera_frame_trigger_event_test_001, TestSize.Level1) +HWTEST_F(AbstractDataProcessTest, abstract_data_process_test_001, TestSize.Level1) { - std::string param = testDCameraFrameTriggerEvent_->GetParam(); - EXPECT_EQ(param, TEST_PARAM); + EXPECT_EQ(false, testAbstractDataProcess_ == nullptr); + + std::shared_ptr nextDataProcess = nullptr; + int32_t ret = testAbstractDataProcess_->SetNextNode(nextDataProcess); + EXPECT_EQ(ret, DCAMERA_BAD_VALUE); } } // namespace DistributedHardware } // namespace OHOS diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_post_authorization_event.h b/services/data_process/test/unittest/common/pipeline_node/property_carrier_test.cpp similarity index 38% rename from services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_post_authorization_event.h rename to services/data_process/test/unittest/common/pipeline_node/property_carrier_test.cpp index 86dfc3da8bffdc0d340b859f07bbc27df2d91f74..4c8b2b675e7e71fda9cbe16cb6309bf07fb93758 100644 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_post_authorization_event.h +++ b/services/data_process/test/unittest/common/pipeline_node/property_carrier_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 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 @@ -13,26 +13,56 @@ * limitations under the License. */ -#ifndef OHOS_DCAMERA_POST_AUTHORIZATION_EVENT_H -#define OHOS_DCAMERA_POST_AUTHORIZATION_EVENT_H +#include -#include "eventbus/event.h" +#include "property_carrier.h" +#include "distributed_camera_errno.h" -#include "dcamera_capture_info_cmd.h" +using namespace testing::ext; namespace OHOS { namespace DistributedHardware { -class DCameraPostAuthorizationEvent : public Event { -TYPEINDENT(DCameraPostAuthorizationEvent); +class PropertyCarrierTest : public testing::Test { public: - explicit DCameraPostAuthorizationEvent(EventSender& sender); - DCameraPostAuthorizationEvent(EventSender& sender, std::vector>& param); - ~DCameraPostAuthorizationEvent() = default; - std::vector> GetParam(); + static void SetUpTestCase(void); + static void TearDownTestCase(void); + void SetUp(); + void TearDown(); -private: - std::vector> param_; + std::shared_ptr testPropertyCarrier_; }; + +void PropertyCarrierTest::SetUpTestCase(void) +{ +} + +void PropertyCarrierTest::TearDownTestCase(void) +{ +} + +void PropertyCarrierTest::SetUp(void) +{ + testPropertyCarrier_ = std::make_shared(); +} + +void PropertyCarrierTest::TearDown(void) +{ + testPropertyCarrier_ = nullptr; +} + +/** + * @tc.name: property_carrier_test_001 + * @tc.desc: Verify CarrySurfaceProperty. + * @tc.type: FUNC + * @tc.require: Issue Number + */ +HWTEST_F(PropertyCarrierTest, property_carrier_test_001, TestSize.Level1) +{ + EXPECT_EQ(false, testPropertyCarrier_ == nullptr); + + sptr surface = nullptr; + int32_t ret = testPropertyCarrier_->CarrySurfaceProperty(surface); + EXPECT_EQ(ret, DCAMERA_BAD_VALUE); +} } // namespace DistributedHardware } // namespace OHOS -#endif // OHOS_DCAMERA_POST_AUTHORIZATION_EVENT_H \ No newline at end of file