From a1e97b17796993388d8d958fce9ffa510a0556db Mon Sep 17 00:00:00 2001 From: chen0088 Date: Mon, 14 Oct 2024 15:49:39 +0800 Subject: [PATCH] modify Signed-off-by: chen0088 --- bundle.json | 3 - .../src/utils/dcamera_hisysevent_adapter.cpp | 10 ++- common/src/utils/dcamera_utils_tools.cpp | 6 +- common/test/unittest/common/utils/BUILD.gn | 6 +- .../common/utils/data_buffer_test.cpp | 12 --- .../src/callback/dcamera_sink_callback.cpp | 2 - .../src/dcamera_sink_handler_ipc.cpp | 4 +- .../src/distributed_camera_sink_proxy.cpp | 8 +- .../src/dcamera_source_handler_ipc.cpp | 4 +- .../BUILD.gn | 6 +- .../callbackonnotifyresourceinfo_fuzzer.cpp | 3 - .../BUILD.gn | 6 +- .../callbacksinkonremoterequest_fuzzer.cpp | 6 -- .../BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../onsinklocalcamsrvdied_fuzzer/BUILD.gn | 6 +- .../sinkhandlerinitsink_fuzzer/BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../sinkhandlerreleasesink_fuzzer/BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../BUILD.gn | 5 +- .../BUILD.gn | 5 +- .../sinkproxychannelneg_fuzzer/BUILD.gn | 5 +- .../sinkproxyclosechannel_fuzzer/BUILD.gn | 5 +- .../sinkproxygetcamerainfo_fuzzer/BUILD.gn | 5 +- .../sinkproxyinitsink_fuzzer/BUILD.gn | 5 +- .../sinkproxyopenchannel_fuzzer/BUILD.gn | 5 +- .../sinkproxyreleasesink_fuzzer/BUILD.gn | 5 +- .../sinkproxystopcapture_fuzzer/BUILD.gn | 5 +- .../BUILD.gn | 5 +- .../BUILD.gn | 5 +- .../sinkservicechannelneg_fuzzer/BUILD.gn | 7 +- .../sinkserviceclosechannel_fuzzer/BUILD.gn | 6 +- .../sinkservicegetcamerainfo_fuzzer/BUILD.gn | 6 +- .../sinkserviceinitsink_fuzzer/BUILD.gn | 6 +- .../sinkserviceopenchannel_fuzzer/BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../sinkservicereleasesink_fuzzer/BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../sinkservicestopcapture_fuzzer/BUILD.gn | 6 +- .../BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../callbackonnotifyregresult_fuzzer/BUILD.gn | 7 +- .../callbackonnotifyregresult_fuzzer.cpp | 3 - .../BUILD.gn | 7 +- .../callbackonnotifyunregresult_fuzzer.cpp | 3 - .../callbackonremoterequest_fuzzer/BUILD.gn | 7 +- .../callbackonremoterequest_fuzzer.cpp | 3 - .../BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../onsourcelocalcamsrvdied_fuzzer/BUILD.gn | 7 +- .../softbusadapter_fuzzer/BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 8 +- .../BUILD.gn | 2 +- .../sourcehandlerinitsource_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 5 +- .../BUILD.gn | 5 +- .../BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../sourceproxydcameranotify_fuzzer/BUILD.gn | 7 +- .../sourceproxyinitsource_fuzzer/BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../BUILD.gn | 11 +-- .../sourceserviceinitsource_fuzzer/BUILD.gn | 11 +-- .../BUILD.gn | 11 +-- .../BUILD.gn | 11 +-- .../BUILD.gn | 11 +-- .../test/unittest/common/camera_sink/BUILD.gn | 2 +- .../camera_sink/dcamera_sink_handler_test.cpp | 9 -- .../unittest/common/camera_source/BUILD.gn | 2 +- .../callback/dcamera_source_callback_test.cpp | 21 ----- .../dcamera_source_handler_test.cpp | 6 -- .../base/src/dcamera_capture_info_cmd.cpp | 10 +-- .../base/src/dcamera_event_cmd.cpp | 3 - .../base/src/dcamera_info_cmd.cpp | 3 - .../base/src/dcamera_metadata_setting_cmd.cpp | 4 - .../base/src/dcamera_open_info_cmd.cpp | 3 - .../base/test/unittest/common/base/BUILD.gn | 11 +-- .../cameraoperator/client/BUILD.gn | 4 - .../unittest/common/cameraoperator/BUILD.gn | 20 +---- .../cameraoperator/handler/BUILD.gn | 3 - .../unittest/common/dcamerahandler/BUILD.gn | 19 +--- services/cameraservice/sinkservice/BUILD.gn | 8 -- .../eventbus/dcamera_frame_trigger_event.h | 37 -------- .../eventbus/dcamera_photo_output_event.h | 41 --------- .../eventbus/dcamera_video_output_event.h | 39 -------- .../eventbus/dcamera_frame_trigger_event.cpp | 34 ------- .../eventbus/dcamera_photo_output_event.cpp | 34 ------- .../dcamera_post_authorization_event.cpp | 34 ------- .../eventbus/dcamera_video_output_event.cpp | 34 ------- .../common/distributedcamera/BUILD.gn | 19 +--- .../common/distributedcameramgr/BUILD.gn | 18 +--- .../dcamera_photo_output_event_test.cpp | 79 ----------------- .../dcamera_post_authorization_event_test.cpp | 88 ------------------- .../dcamera_video_output_event_test.cpp | 79 ----------------- .../mock_dcamera_sink_data_process.h | 8 -- services/cameraservice/sourceservice/BUILD.gn | 4 - .../dcameradata/dcamera_source_input.cpp | 4 +- .../common/distributedcamera/BUILD.gn | 8 +- ...distributed_camera_source_service_test.cpp | 5 ++ .../common/distributedcameramgr/BUILD.gn | 7 +- services/channel/BUILD.gn | 1 - services/channel/src/dcamera_low_latency.cpp | 8 +- .../test/unittest/common/channel/BUILD.gn | 5 +- services/data_process/BUILD.gn | 2 - .../include/eventbus/dcamera_pipeline_event.h | 26 ------ .../scale_convert_process_common.cpp | 7 ++ .../test/unittest/common/pipeline/BUILD.gn | 2 - .../pipeline/dcamera_pipeline_source_test.cpp | 1 - .../unittest/common/pipeline_node/BUILD.gn | 4 +- .../abstract_data_process_test.cpp} | 45 +++++----- .../pipeline_node/property_carrier_test.cpp} | 58 +++++++++--- 127 files changed, 263 insertions(+), 1125 deletions(-) delete mode 100644 services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_frame_trigger_event.h delete mode 100644 services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_photo_output_event.h delete mode 100644 services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_video_output_event.h delete mode 100644 services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp delete mode 100644 services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp delete mode 100644 services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp delete mode 100644 services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp delete mode 100644 services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_photo_output_event_test.cpp delete mode 100644 services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_post_authorization_event_test.cpp delete mode 100644 services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_video_output_event_test.cpp rename services/{cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_frame_trigger_event_test.cpp => data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp} (40%) rename services/{cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_post_authorization_event.h => data_process/test/unittest/common/pipeline_node/property_carrier_test.cpp} (38%) diff --git a/bundle.json b/bundle.json index 995acf6c..cc7dac6e 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 3a3d2464..8229a89d 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 ce361daf..f26f140d 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 f53e98fe..87a44bf2 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 9868c0b2..b973c6c5 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 39b05747..8179b4fe 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 b3e46480..690abfbc 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 cb2ea35a..cb4a5985 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 87383db2..fe9911c5 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 7cb5ed5c..092c8b0c 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 cad43507..f803426b 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 f235f416..cc975c70 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 bcc66df0..8b4f0bf2 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 267c4a99..d84aba61 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 09e260c5..11e53327 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 77369f04..e361bd27 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 b2938b94..e4cb2007 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 d9a222b2..c6411aa6 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 b081a381..fdb9d500 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 2ee5a06c..fd18170c 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 f0230b70..f1a21f84 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 7b8bf515..9daebfa9 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 36edf7b4..5d68c7ea 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 7e9fc98a..7033aa4b 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 acad8328..2faef029 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 bf85f322..c3e49b82 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 2143eaff..bdabd840 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 076585a0..8be84c8c 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 6c647d09..b2dcd5d8 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 ab22df71..88d93b6b 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 e7942965..390f7004 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 8f4598ee..dcb6d33d 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 ba130ef6..41d470c0 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 060a1a07..500c885b 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 9e7a8883..2ffc990f 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 e9e31297..f0b888ed 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 75054e3e..0c168f5d 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 c1d8c636..87433d99 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 e924c9db..2e64169c 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 3d284340..c3cc220b 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 24db5a96..f121c80f 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 18b05e21..0fe7541a 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 df13b8d9..31d22cc3 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 d6aaddc3..1e924a70 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 7b655a4b..7e88022a 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 83aab437..96d5b8f6 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 5de12d63..e2d0ecb8 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 a8ca5504..1e89f2f6 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 904fe408..0c8a90ef 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 93119391..225e19ef 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 6215b1a3..cf76f9fa 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 abdbed76..765cd3fa 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 d8b5682d..b0dd7531 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 86582342..77072bfa 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 b9106c55..edb90851 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 8667fc20..babcb071 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 73432eaf..79515e79 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 20d2ce26..fc9ed0ad 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 65eaf618..0ddd8476 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 bd841912..f01a4ea0 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 d7c235d3..f8fb3fa8 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 5973d5db..e0afce0a 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 58f06335..1ca00625 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 a3643015..3b45ab38 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 8b2eac41..6c4a7063 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 ab6e8a74..c4a47c13 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 1c324c08..6ed6aba8 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 e70740ef..1ce4b94d 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 450cec3b..23a2a1fb 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 c946ac11..eadf74ef 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 890e9533..c2da36f8 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 e8a6468e..486275fe 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 ea3ee333..6b1ef633 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 e98099cc..5d5e88ad 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 4d8a9270..607b0efe 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 56fa1822..f9b6c6cc 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 0e8f69ec..ea5d6f56 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 362ec6b3..11d80a9d 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 ccf77c8a..1efaf08e 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 338cd95a..34551179 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 61586747..2a0b09ad 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 ed97eb4c..f71373fc 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 eed46b0f..f34c1b8e 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 4223d551..cdec2924 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 a18ec9e7..8556c339 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 b9b41628..e0508530 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 60ca4282..1908a0ee 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 3c4e0c60..b65a1345 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 ce25bf3b..2c4c8873 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 5732ec5f..0f950f7f 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 468cbf2a..8688b0bc 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 92ce18a9..3b926476 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 91e06b71..5c824bff 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 1bc62ce9..8bc8fd95 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 7dc97714..e433bbdb 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 213a2b76..4e06be49 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 8d6a7203..d1521dc0 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 767bd71e..8fb4954a 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 54c2cb2e..00000000 --- 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 f13dc028..00000000 --- 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 aea9b9ab..00000000 --- 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 9ef08a79..00000000 --- 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 1db88ea7..00000000 --- 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 97bd0a6f..00000000 --- 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 6de51a9a..00000000 --- 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 6a428d6f..619311f4 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 d3a2253b..46a7a94a 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 4777134f..00000000 --- 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 1b789e25..00000000 --- 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 29be3e24..00000000 --- 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 052d2ccd..e9fd2629 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 53c27fe8..78b31809 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 857415d7..85a23569 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 b342819a..ac6bba89 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 9d55180a..57403d98 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 96fdd28c..0a05c6ad 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 0ce6c9a9..a5e4ec4f 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 9c80cd85..a528c1a7 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 511e05f0..66aed6c0 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 163a5aa3..81e3dff2 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 a021436b..f55f0427 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 b43bc9f2..bb96719d 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 746689c2..b7bdd7a7 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 b6c91aae..bdbdd7ce 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 91053f6f..3b99e709 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 4e0453ba..04588486 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 86dfc3da..4c8b2b67 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 -- Gitee