diff --git a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md index 66d4332058d27e3c8ef94919138576d71b524467..6793f140d1e17a21900097a37f26a23ed7f255af 100644 --- a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md +++ b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md @@ -6,6 +6,32 @@ ### 描述(做了什么,变更了什么) +### 安全及低级编码自检 + +- [ ] 【变量初始化】变量使用前保证赋有效初值 +- [ ] 【变量初始化】结构体预留字段也必须初始化为0,不允许出现随机值 +- [ ] 【变量初始化】指针变量必须显示初始化为空 +- [ ] 【内存和资源】涉及内存拷贝时合理校验目标内存大小,保证目标内存大于等于源内存 +- [ ] 【内存和资源】进行字符串操作时,如字符串复制、申请字符串内存等,需要考虑字符串结束符 +- [ ] 【内存和资源】cJSON指针在异常分支里均需考虑内存释放(cJSON_free/cJSON_Delete),防止内存泄漏 +- [ ] 【内存和资源】内存资源、文件句柄、管道资源、Socket句柄异常退出时要及时关闭 +- [ ] 【指针】malloc申请内存后必须判断是否为空 +- [ ] 【指针】指针解引用或释放前判空(lamda表达式,异步任务等使用指针前需判空) +- [ ] 【指针】内存释放后立即置空,防止出现UAF +- [ ] 【指针】循环时容器的增、删、改操作,必须保证迭代器有效 +- [ ] 【指针】禁止将栈内存地址作为返回值或赋值给全局变量 +- [ ] 【数值边界】加法、乘法、减法操作,必须进行溢出和翻转保护,确保先校验再运算 +- [ ] 【数值边界】除法、求余操作必须进行除零保护 +- [ ] 【数值边界】循环变量用整型,禁止使用浮点型 +- [ ] 【数值边界】循环退出条件一定确保可达,防止出现死循环等问题 +- [ ] 【数值边界】不同大小结构体禁止强转 +- [ ] 【安全隐私】禁止使用非安全函数,使用封装好的安全函数 +- [ ] 【安全隐私】日志必须检查PassWord/位置信息/networkId/devId/uuid/udid等关键字,避免明文打印敏感信息 +- [ ] 【入参及权限校验】对函数入参坚持先校验后使用的原则(指针判空、整型变量校验范围) +- [ ] 【入参及权限校验】跨进程调用需注意权限校验,对外部传入的PID、tokenID进行权限校验 +- [ ] 【条件竞争】共享数据均需加锁保护,并且锁配对使用 +- [ ] 【条件竞争】条件变量正确加锁,消除条件变量唤醒丢失等问题 +- [ ] 【条件竞争】加锁范围确保合理,避免过大或过小导致死锁问题 ### 测试用例(新增、改动、可能影响的功能) diff --git a/common/src/utils/dcamera_hisysevent_adapter.cpp b/common/src/utils/dcamera_hisysevent_adapter.cpp index 3a3d2464afde0b68e2399091fd22cff892a293da..8229a89d7bac50f012f6e34a85ecb9a4bf807c53 100644 --- a/common/src/utils/dcamera_hisysevent_adapter.cpp +++ b/common/src/utils/dcamera_hisysevent_adapter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -26,6 +26,8 @@ namespace OHOS { namespace DistributedHardware { namespace { constexpr int32_t MSG_MAX_LEN = 2048; +constexpr int32_t ENUM_STREAMTYPE_LEN = 2; +constexpr int32_t ENUM_ENCODETYPE_LEN = 4; using HiSysEventNameSpace = OHOS::HiviewDFX::HiSysEvent; const std::string ENUM_STREAMTYPE_STRINGS[] = { "CONTINUOUS_FRAME", "SNAPSHOT_FRAME" @@ -118,6 +120,11 @@ void ReportCameraOperaterEvent(const std::string& eventName, const std::string& void ReportStartCaptureEvent(const std::string& eventName, EventCaptureInfo& capture, const std::string& errMsg) { + if (capture.encodeType_ < 0 || capture.encodeType_ >= ENUM_ENCODETYPE_LEN || + capture.type_ < 0 || capture.type_ >= ENUM_STREAMTYPE_LEN) { + DHLOGE("Invalid capture parameters."); + return; + } int32_t ret = HiSysEventWrite(HiSysEventNameSpace::Domain::DISTRIBUTED_CAMERA, eventName, HiSysEventNameSpace::EventType::BEHAVIOR, @@ -136,7 +143,6 @@ void ReportStartCaptureEvent(const std::string& eventName, EventCaptureInfo& cap std::string CreateMsg(const char *format, ...) { va_list args; - (void)memset_s(&args, sizeof(va_list), 0, sizeof(va_list)); va_start(args, format); char msg[MSG_MAX_LEN] = {0}; if (vsnprintf_s(msg, sizeof(msg), sizeof(msg) - 1, format, args) < 0) { diff --git a/common/src/utils/dcamera_utils_tools.cpp b/common/src/utils/dcamera_utils_tools.cpp index ce361daf38b25f930325c231803b0a5154438ba3..f26f140d1faba9d0d53eda8c8d2bc96775e16f5e 100644 --- a/common/src/utils/dcamera_utils_tools.cpp +++ b/common/src/utils/dcamera_utils_tools.cpp @@ -31,11 +31,7 @@ namespace OHOS { namespace DistributedHardware { namespace { -#if (defined(__aarch64__) || defined(__x86_64__)) -const std::string YUV_LIB_PATH = "/system/lib64/chipset-pub-sdk/libyuv.z.so"; -#else -const std::string YUV_LIB_PATH = "/system/lib/chipset-pub-sdk/libyuv.z.so"; -#endif +const std::string YUV_LIB_PATH = "libyuv.z.so"; const std::string GET_IMAGE_CONVERTER_FUNC = "GetImageConverter"; } diff --git a/common/test/unittest/common/utils/BUILD.gn b/common/test/unittest/common/utils/BUILD.gn index f53e98fe142e19b3497f5154e7c4011ea368e8ce..79f86df5d647e4de558b482540f0e7476e6f5f2a 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", @@ -64,6 +60,7 @@ ohos_unittest("CommonUtilsTest") { "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "hdf_core:libhdi", "hilog:libhilog", + "hisysevent:libhisysevent", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn index 7cb5ed5cee66b807cee0f914f06bf5a89ec89bd4..092c8b0c3631d254146d1df16da2f609f5cb9ce0 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("CallbackOnNotifyResourceInfoFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/callbackonnotifyresourceinfo_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp/camera_sink/include/callback" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("CallbackOnNotifyResourceInfoFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn index f235f416d725e7e136667c3751b6f6188edceab6..cc975c70befa879eb1d290c8b193e83672d803ca 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("CallbackSinkOnRemoteRequestFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/callbacksinkonremoterequest_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp/camera_sink/include/callback" ] include_dirs += [ "include", @@ -62,6 +59,7 @@ ohos_fuzztest("CallbackSinkOnRemoteRequestFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn index 267c4a991e533c8be869c88f22a72f91cb9ca4ee..b8065bc09cbb4b015bb12bcbe9ff20c8c1d64810 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", @@ -71,9 +66,11 @@ ohos_fuzztest("EncodeOnInputBufferAvailableFuzzTest") { "av_codec:av_codec_client", "c_utils:utils", "distributed_hardware_fwk:distributedhardwareutils", + "drivers_interface_display:libdisplay_composer_hdi_impl_1.1", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_surface:surface", + "hilog:libhilog", "hitrace:hitrace_meter", "media_foundation:media_foundation", ] diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn index 09e260c529a5701b8770719c0009f3da5f49f1e5..78acbc4b8b9df7bdda4a61c276618f0cc2f09bff 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", @@ -71,9 +66,11 @@ ohos_fuzztest("EncodeOnOutputBufferAvailableFuzzTest") { "av_codec:av_codec_client", "c_utils:utils", "distributed_hardware_fwk:distributedhardwareutils", + "drivers_interface_display:libdisplay_composer_hdi_impl_1.1", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_surface:surface", + "hilog:libhilog", "hitrace:hitrace_meter", "media_foundation:media_foundation", ] diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn index 77369f04a55d6d5fd3afcf6a618d550f3cbf0ef8..e361bd27347438a70c4cbb9e89c9854df7c4384b 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer/BUILD.gn @@ -24,11 +24,6 @@ ohos_fuzztest("OnSinkLocalCamSrvDiedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/onsinklocalcamsrvdied_fuzzer" include_dirs = [ - "${fwk_utils_path}/include", - "${fwk_common_path}/utils/include", - ] - - include_dirs += [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -58,6 +53,7 @@ ohos_fuzztest("OnSinkLocalCamSrvDiedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn index b2938b94f203e8df0dbce85b92108e799f4e9116..e4cb20079c181b49658255ae50e184125adec952 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer/BUILD.gn @@ -23,10 +23,7 @@ ohos_fuzztest("SinkHandlerInitSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerinitsink_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -58,6 +55,7 @@ ohos_fuzztest("SinkHandlerInitSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn index d9a222b29334b288c0ae74bea3df22965811d5e6..c6411aa6e4bc6fd5cb97ef368c2401ba566f2b7d 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerPauseDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerpausedistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("SinkHandlerPauseDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn index b081a381d018766d248143b9af7dbee43208e521..fdb9d5001d2e1e1ea4642f549f9f9201960c8e30 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerRegisterPrivacyResourcesFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerregisterprivacyresources_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -61,6 +58,7 @@ ohos_fuzztest("SinkHandlerRegisterPrivacyResourcesFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn index 2ee5a06c6f7dde21928640266811b1bd8027625e..fd18170c53a793ee3419885127c3dbebea8bee56 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("SinkHandlerReleaseSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerreleasesink_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -59,6 +56,7 @@ ohos_fuzztest("SinkHandlerReleaseSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn index f0230b7055ad4a4b8e63e37e94f93b5ea27b42b1..f1a21f846a6d93e831cbf8cab6f40c5258708f05 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerResumeDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerresumedistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("SinkHandlerResumeDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn index 7b8bf515a9db2c5d62e9807a8827c9215e6e6979..9daebfa9b4c24e1dac07bd3376a0b0c36bdbc29f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer/BUILD.gn @@ -25,10 +25,7 @@ ohos_fuzztest("SinkHandlerStopDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerstopdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -60,6 +57,7 @@ ohos_fuzztest("SinkHandlerStopDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn index 36edf7b40aff549a5c206fa89498fa7277f82a6d..5d68c7eaacc18b0990dc9a7f0a94509caa1c73df 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer/BUILD.gn @@ -23,10 +23,7 @@ ohos_fuzztest("SinkHandlerSubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlersubscribelocalhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -58,6 +55,7 @@ ohos_fuzztest("SinkHandlerSubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn index 7e9fc98a9e885ad170c60268dd5242d95994d112..7033aa4b96f71a8571ad7fb60325e5d8691739bf 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer/BUILD.gn @@ -24,10 +24,7 @@ ohos_fuzztest("SinkHandlerUnsubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkhandlerunsubscribelocalhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "${innerkits_path}/native_cpp" ] include_dirs += [ "include", @@ -59,6 +56,7 @@ ohos_fuzztest("SinkHandlerUnsubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn index acad83286ea442372037b2ec6e81c6023635909d..2faef0298489629d4e9a51211e51a115ce74bc45 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilityFailFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkonloadsystemabilityfail_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -52,6 +50,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilityFailFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn index bf85f322a3cd58d036494edf7059b034bdcb622b..c3e49b820e6c41678d5683a6c2a3c652b5f70cbb 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilitySuccessFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkonloadsystemabilitysuccess_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -53,6 +51,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilitySuccessFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn index 2143eaffa13e494f8fc00295f0e9f7cd2a3b3bc8..bdabd840d9b72079b9ea2f1d20e0e238621c0813 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyChannelNegFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxychannelneg_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyChannelNegFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn index 076585a0526efc85b87047256a3b3d2640957b2a..8be84c8c5acf6ef304a3f0ff27ed039db5ac3987 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyCloseChannelFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyclosechannel_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyCloseChannelFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn index 6c647d09549e2721b9f56801d196e0364c0e6237..b2dcd5d8026b343d567e473da7a38a0406189db0 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyGetCameraInfoFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxygetcamerainfo_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyGetCameraInfoFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn index ab22df71f8628b1e2b8a13aaea257f97c76e8ec4..88d93b6b6468291fc2bceb8b9341a4cc7e13285c 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SinkProxyInitSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyinitsink_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SinkProxyInitSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn index e79429657a9cbc4536fed56a19dec1e6cdaca040..390f70043cfa7b30324bd78cdb812029be93b5d6 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyOpenChannelFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyopenchannel_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyOpenChannelFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn index 8f4598eeedae1040d9c4dddd98d1227eab428ef1..dcb6d33d411d8e10568fa1d6616db638ba6fb267 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SinkProxyReleaseSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyreleasesink_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SinkProxyReleaseSinkFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn index ba130ef6a23b17fdceacaa2bd06ec5e2804c3244..41d470c04b6513860dbbf4c837461c207061d86d 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyStopCaptureFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxystopcapture_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyStopCaptureFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn index 060a1a072e22ab743c5015bf5df78b7bb272da1b..500c885b217eb2d406f2015f37ca222db6c7841b 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxySubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxysubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxySubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn index 9e7a88838bafbad7664ff93f3ee557a6c432f538..2ffc990f3a6c342365d7e67a7af110da8ce8d600 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer/BUILD.gn @@ -23,9 +23,7 @@ ohos_fuzztest("SinkProxyUnsubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkproxyunsubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -55,6 +53,7 @@ ohos_fuzztest("SinkProxyUnsubscribeLocalHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn index e9e3129771f6dff15ac0fa74a56a8cbaf24ad02f..f0b888ed9592e3066bdd2f04aeb0364734aee098 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceChannelNegFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicechannelneg_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceChannelNegFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceChannelNegFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceclosechannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceclosechannel_fuzzer/BUILD.gn index 75054e3e7d99968df764a995c2af9e9f818eabde..570fc458fcb62efd4c2d8a55d137ad7bd6c39b79 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", ] @@ -74,6 +70,7 @@ ohos_fuzztest("SinkServiceCloseChannelFuzzTest") { "device_manager:devicemanagersdk", "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "graphic_surface:surface", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicegetcamerainfo_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicegetcamerainfo_fuzzer/BUILD.gn index c1d8c636606ae6d4b5bed5b8e149c221adb66f80..d4f47a63a6a2798f83cfe7a1e971786b97670e23 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", ] @@ -73,6 +69,7 @@ ohos_fuzztest("SinkServiceGetCameraInfoFuzzTest") { "device_manager:devicemanagersdk", "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "graphic_surface:surface", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceinitsink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceinitsink_fuzzer/BUILD.gn index e924c9db5f4b0edebd8933effdcdbbfd51c0349a..a67481ac6f461971c8dcd75c11281e32054d9956 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", ] @@ -73,6 +69,7 @@ ohos_fuzztest("SinkServiceInitSinkFuzzTest") { "device_manager:devicemanagersdk", "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "graphic_surface:surface", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn index 3d2843400e8c289bcde427b975e036a2f3ff4f14..c3cc220b6e3313ab105b061e399f848b0a94d01c 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceOpenChannelFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceopenchannel_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceOpenChannelFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceOpenChannelFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn index 24db5a9688b261bbfa9938c362a8e2c3509b11b4..f121c80fd598d190b2b91d5ffe24bd9ac6e05b6b 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServicePauseDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicepausedistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServicePauseDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -70,6 +66,7 @@ ohos_fuzztest("SinkServicePauseDistributedHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn index 18b05e21341ba9835b91f82753106c7c96c96c02..0fe7541a78bfac4e8304dfeb788681280817211f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceReleaseSinkFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicereleasesink_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceReleaseSinkFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceReleaseSinkFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn index df13b8d9caaa84eaee518556446fd0cb928a8cab..31d22cc38c474d72e4eb3a7714960b623c66a941 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceResumeDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceresumedistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceResumeDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -70,6 +66,7 @@ ohos_fuzztest("SinkServiceResumeDistributedHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopcapture_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopcapture_fuzzer/BUILD.gn index d6aaddc3a28b3e6701bcb138965365fde3916846..fbb0c15e4b1e2c44b1d9809191f486d09b66037b 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", ] @@ -73,6 +69,7 @@ ohos_fuzztest("SinkServiceStopCaptureFuzzTest") { "device_manager:devicemanagersdk", "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "graphic_surface:surface", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn index 7b655a4bc33bc57dd58c1efff6e1a532b9b77f75..7e88022a197442faa75896def9aa159647e1a738 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceStopDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicestopdistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceStopDistributedHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -70,6 +66,7 @@ ohos_fuzztest("SinkServiceStopDistributedHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn index 83aab437cd5bde7411c67ebb55959b985b7e524e..96d5b8f61bec28ad49667032ae162309696f4466 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer/BUILD.gn @@ -23,13 +23,10 @@ ohos_fuzztest("SinkServiceSubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkservicesubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -40,7 +37,6 @@ ohos_fuzztest("SinkServiceSubscribeLocalHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -71,6 +67,7 @@ ohos_fuzztest("SinkServiceSubscribeLocalHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn index 5de12d6308cebb3cd59fb67b563a9ca1c93f3322..e2d0ecb8b5318f4d3d731462e2951a2ba8b699e0 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer/BUILD.gn @@ -24,13 +24,10 @@ ohos_fuzztest("SinkServiceUnsubscribeLocalHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/sinkserviceunsubscribelocalhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include/constants", "${common_path}/include/utils", - "${graphicsurface_path}/surface/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -41,7 +38,6 @@ ohos_fuzztest("SinkServiceUnsubscribeLocalHardwareFuzzTest") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/utils", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] @@ -72,6 +68,7 @@ ohos_fuzztest("SinkServiceUnsubscribeLocalHardwareFuzzTest") { "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "graphic_surface:surface", "hilog:libhilog", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn index a8ca55043147a6b20f7435fa0c3c1b45982c4fed..1e89f2f63fa15c2b02bfc5a522a0e72de27a716f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkBytesReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinkbytesreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSinkBytesReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn index 904fe4089b2c1d329b5098c5e631a4bef0f97323..0c8a90effc547a4d70de8efde532ba18b9081880 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkMessageReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinkmessagereceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSinkMessageReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn index 93119391bc00be46e8e6d480bfc9a968798764b6..225e19efb56056d676e8e3cd4d23f93a6caa192f 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkSessionClosedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinksessionclosed_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSinkSessionClosedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn index 6215b1a326be00de6e247831af5f684d701fa2b3..cf76f9fa7638e6289bbfd0ca4fc5efb0dd1ae6f3 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkSessionOpenedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinksessionopened_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSinkSessionOpenedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn index abdbed769d7bb08c873cc6ebd36bbea6b4ea7219..765cd3fafc5521bbe26627af57102d4a96d5c798 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSinkStreamReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sinkfuzztest/softbusonsinkstreamreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSinkStreamReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn index d8b5682d9a45bb19c2c5689f221ae6a42d0331ba..b0dd7531dd54449788d7ecf3fdb65341c53fa47b 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("CallbackOnNotifyRegResultFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/callbackonnotifyregresult_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -59,6 +57,7 @@ ohos_fuzztest("CallbackOnNotifyRegResultFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn index b9106c55776037b396748163e1ee46c64c40b14a..edb9085175ee680a3ff1c5386f0b284bdbac2ffb 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("CallbackOnNotifyUnRegResultFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/callbackonnotifyunregresult_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -59,6 +57,7 @@ ohos_fuzztest("CallbackOnNotifyUnRegResultFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn index 73432eafdf4485718118873def6a52060a917ca6..79515e79ff8d06673d284dc4d03a792a8ac79fd3 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("CallbackOnRemoteRequestFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/callbackonremoterequest_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -58,6 +56,7 @@ ohos_fuzztest("CallbackOnRemoteRequestFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn index 65eaf6185a3bca7e5deb988f95c5e7ae05813345..3bf8bc3ac002ca8784c2614944a3088512532138 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", @@ -73,6 +68,7 @@ ohos_fuzztest("DecodeOnInputBufferAvailableFuzzTest") { "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "graphic_surface:surface", + "hilog:libhilog", "hitrace:hitrace_meter", "media_foundation:media_foundation", ] diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn index bd841912cea22faa080c0741f580d557c5639843..58a4e507e9c5b93b9dd7b609ab0eff9ab95d57e8 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", @@ -73,6 +68,7 @@ ohos_fuzztest("DecodeOnOutputBufferAvailableFuzzTest") { "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "graphic_surface:surface", + "hilog:libhilog", "hitrace:hitrace_meter", "media_foundation:media_foundation", ] diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn index d7c235d37fe140f68218d0fb96a1afd8f7690d55..f8fb3fa8aaf8f43c090b614f173908cee350f7f0 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("OnSourceLocalCamSrvDiedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/onsourcelocalcamsrvdied_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -57,6 +55,7 @@ ohos_fuzztest("OnSourceLocalCamSrvDiedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn index 5973d5dbef47d78630b81cfba9e6e2744c095b63..e0afce0a3c8429ab83f0e2dce4f4a57091247f61 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer/BUILD.gn @@ -25,17 +25,12 @@ ohos_fuzztest("SoftbusAdapterFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusadapter_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -65,6 +60,7 @@ ohos_fuzztest("SoftbusAdapterFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn index 58f06335117ddbd0b160cd489219f9e2a03d0582..1ca006258f67856a508a890dff8cf7bf01cfd631 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceBytesReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcebytesreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSourceBytesReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn index a36430159cfe7bee501f5c90d609e1f1231bd262..3b45ab3859068d665f2a63d14e6ffb44c8811a42 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceMessageReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcemessagereceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSourceMessageReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn index 8b2eac410d627129361ad31b425d2be590209d33..6c4a70633ac00773b2cf9ef646a8d1c4e52610ea 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceSessionClosedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcesessionclosed_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSourceSessionClosedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn index ab6e8a74ffc711d93fbabfeee88acff70c8dc3a6..c4a47c13b97c0488b9fbcb138aff8adf35596000 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceSessionOpenedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcesessionopened_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -61,6 +56,7 @@ ohos_fuzztest("SoftbusOnSourceSessionOpenedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn index 1c324c080a9588aa92e89af2b79fdeb50dbc9dd5..6ed6aba878ea6b13c3d7eccd7b6be042dd32c8cb 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer/BUILD.gn @@ -23,17 +23,12 @@ ohos_fuzztest("SoftbusOnSourceStreamReceivedFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/softbusonsourcestreamreceived_fuzzer" - include_dirs = [ - "${fwk_common_path}/utils/include", - "${services_path}/cameraservice/base/include", - ] + include_dirs = [ "${services_path}/cameraservice/base/include" ] include_dirs += [ "${services_path}/channel/include", "${common_path}/include/constants", "${common_path}/include/utils", - "//foundation//communication//dsoftbus//core//common//include", - "${fwk_innerkits_path}/include", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", "${feeding_smoother_path}/utils", @@ -63,6 +58,7 @@ ohos_fuzztest("SoftbusOnSourceStreamReceivedFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "distributed_hardware_fwk:libdhfwk_sdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn index e70740ef74991ebc72f98253254f05cadfa5f858..1ce4b94da6ea201f3f42b3da9f2b802169556deb 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn @@ -28,7 +28,6 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { "include", "${common_path}/include", "${common_path}/include/constants", - "${fwk_common_path}/utils/include", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", ] @@ -54,6 +53,7 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn index 450cec3b8f4a490d672f147447fab4c9a08ee788..23a2a1fbb82d6d4e05279e5ca53ba34ffa9ed9d3 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn @@ -27,7 +27,6 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { "include", "${common_path}/include", "${common_path}/include/constants", - "${fwk_common_path}/utils/include", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", ] @@ -53,6 +52,7 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn index c946ac114315dfba060e1f7146297c50e6133054..eadf74ef293fee04757f68c755b75d317002a49e 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SourceHandlerRegisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourcehandlerregisterdistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceHandlerRegisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn index 890e9533f600330c1c4857c2d026af830f3bbea3..c2da36f80ca5d1199f2fefaf246e249b077f4ae5 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,9 +24,7 @@ ohos_fuzztest("SourceHandlerUnregisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourcehandlerunregisterdistributedhardware_fuzzer" - include_dirs = [ "${fwk_common_path}/utils/include" ] - - include_dirs += [ + include_dirs = [ "include", "${common_path}/include", "${common_path}/include/constants", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceHandlerUnregisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn index e8a6468e095408cb48d50c54ae28041985616160..486275fec2e47f7f729a590d0266acf33b768c64 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceOnLoadSystemAbilityFailFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceonloadsystemabilityfail_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceOnLoadSystemAbilityFailFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn index ea3ee3339ddef538425c328b015cb5d3fa3d7963..6b1ef6339d71c36e9eaa70771cac8e4ecabaeff2 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceOnLoadSystemAbilitySuccessFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceonloadsystemabilitysuccess_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -56,6 +54,7 @@ ohos_fuzztest("SourceOnLoadSystemAbilitySuccessFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn index e98099cca3c9eeb44d33bc8f6245672dafa67005..5d5e88ad451b743a8b1c37ceabb2893b2bec3e50 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceProxyDCameraNotifyFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxydcameranotify_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -57,6 +55,7 @@ ohos_fuzztest("SourceProxyDCameraNotifyFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn index 4d8a9270b15876e0b48a349bb8f49ec3ce50b057..607b0efeb7de1b67007c49c5331435fe8a50a499 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("SourceProxyInitSourceFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxyinitsource_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -57,6 +55,7 @@ ohos_fuzztest("SourceProxyInitSourceFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn index 56fa1822a97a2c1d4b51044603ddddc96874f99e..f9b6c6cc2869f2013f6cbbf23b5e5e466b2fbee7 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,10 +24,8 @@ ohos_fuzztest("SourceProxyRegisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxyregisterdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -58,6 +56,7 @@ ohos_fuzztest("SourceProxyRegisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn index 0e8f69ec56161feafa1dafc09002ca20e740c296..ea5d6f560d5dd32782b938fe4f03c574279f07ed 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer/BUILD.gn @@ -24,10 +24,8 @@ ohos_fuzztest("SourceProxyUnregisterDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/sourcefuzztest/sourceproxyunregisterdistributedhardware_fuzzer" - include_dirs = [ - "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_common_path}/utils/include", - ] + include_dirs = + [ "${innerkits_path}/native_cpp/camera_source/include/callback" ] include_dirs += [ "include", @@ -58,6 +56,7 @@ ohos_fuzztest("SourceProxyUnregisterDistributedHardwareFuzzTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicedcameranotify_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicedcameranotify_fuzzer/BUILD.gn index 362ec6b3efeb816c8f907aa2ff53b273e5452dd0..782645acd31795bbcd97793879b3fbb93a4ae23e 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,7 +65,9 @@ ohos_fuzztest("SourceServiceDCameraNotifyFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceinitsource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceinitsource_fuzzer/BUILD.gn index ccf77c8a790ac9b7081e751e6c0ae63a052e0836..b8a2fb7dc9775ce98c18017eb681a79c9ea847e9 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,7 +66,9 @@ ohos_fuzztest("SourceServiceInitSourceFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceregisterdistributedhardware_fuzzer/BUILD.gn index 338cd95aadd75bf662c1e085f4e35569c1c1985c..46f67176aec150a54549b00e55820fe253f4aae7 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,7 +66,9 @@ ohos_fuzztest("SourceServiceRegisterDistributedHardwareFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicereleasesource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceservicereleasesource_fuzzer/BUILD.gn index 61586747aab765ae85cc11543494c667e50912b7..bd7857b517b4eb8aad47ea59fff0b69836dc9b8e 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,7 +65,9 @@ ohos_fuzztest("SourceServiceReleaseSourceFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceunregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/sourceserviceunregisterdistributedhardware_fuzzer/BUILD.gn index ed97eb4cad2f509b15124eef400e6b3526b52dab..9e83115e0a0a851e0d0b7f25d5a1f088909609e2 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,7 +66,9 @@ ohos_fuzztest("SourceServiceUnregisterDistributedHardwareFuzzTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn index eed46b0fe8385e6f059ce112089fd429c14694c9..f34c1b8ea8b7b3eba7c81fe8660a704936a9965a 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/BUILD.gn @@ -26,7 +26,6 @@ config("module_private_config") { "${common_path}/include/utils", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_common_path}/utils/include", ] } @@ -51,6 +50,7 @@ ohos_unittest("DCameraSinkHandlerTest") { "access_token:libnativetoken_shared", "access_token:libtokensetproc_shared", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "dsoftbus:softbus_client", "hilog:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn index a18ec9e7a15a6812b2a9321460653d6f9febca98..8556c3398ab6f3f1ee2d2de5f495718bbf9123cd 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/BUILD.gn @@ -28,7 +28,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", "${innerkits_path}/native_cpp/test/include", - "${fwk_common_path}/utils/include", ] } @@ -50,6 +49,7 @@ ohos_unittest("DCameraSourceHandlerTest") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "hilog:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", diff --git a/services/cameraservice/base/test/unittest/common/base/BUILD.gn b/services/cameraservice/base/test/unittest/common/base/BUILD.gn index 91e06b71ce9d7a680a1d3cafe6464c8c13f4594d..5c824bffe4934402b8807414a3e070f4e2feb6ba 100755 --- a/services/cameraservice/base/test/unittest/common/base/BUILD.gn +++ b/services/cameraservice/base/test/unittest/common/base/BUILD.gn @@ -19,14 +19,8 @@ module_out_path = "distributed_camera/dcamera_services_base_test" config("module_private_config") { visibility = [ ":*" ] - include_dirs = [ - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", - ] - include_dirs += [ + include_dirs = [ "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_source/include/callback", @@ -54,15 +48,14 @@ ohos_unittest("DCameraServicesBaseTest") { deps = [ "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${services_path}/cameraservice/sourceservice:distributed_camera_source", "${services_path}/channel:distributed_camera_channel", - "//third_party/googletest:gtest_main", ] external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "dsoftbus:softbus_client", "hilog:libhilog", diff --git a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp index 79a8a42a7c1672ffabb5602591474ac5c9dd4c5e..f99a23e7f883863f7738601e10ee3b51d2949e23 100644 --- a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp +++ b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp @@ -143,6 +143,7 @@ void DCameraClient::UpdateSettingCache(const std::string& metadataStr) void DCameraClient::FindCameraMetadata(const std::string& metadataStr) { std::shared_ptr cameraMetadata = Camera::MetadataUtils::DecodeFromString(metadataStr); + CHECK_AND_RETURN_LOG(cameraMetadata == nullptr, "FindCameraMetadata get cameraMetadata is null"); camera_metadata_item_t focusItem; int32_t ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_CONTROL_FOCUS_MODE, &focusItem); if (ret == CAM_META_SUCCESS) { @@ -584,6 +585,7 @@ int32_t DCameraClient::StartPhotoOutput(std::shared_ptr& inf void DCameraClient::SetPhotoCaptureRotation(const std::shared_ptr& cameraMetadata, std::shared_ptr& photoCaptureSetting) { + CHECK_AND_RETURN_LOG(cameraMetadata == nullptr, "SetPhotoCaptureRotation param cameraMetadata is null"); uint32_t rotationCount = 1; camera_metadata_item_t item; int32_t ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_JPEG_ORIENTATION, &item); diff --git a/services/cameraservice/cameraoperator/client/test/sample/BUILD.gn b/services/cameraservice/cameraoperator/client/test/sample/BUILD.gn index 9a45628924408e996b26bbbf061c894b00a1bffe..0f4b858733fe14761f0a59fc502bfee3c69fff57 100644 --- a/services/cameraservice/cameraoperator/client/test/sample/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/test/sample/BUILD.gn @@ -70,6 +70,7 @@ ohos_executable("dcamera_client_demo") { "graphic_surface:surface", "hilog:libhilog", "ipc:ipc_core", + "samgr:samgr_proxy", ] defines = [ diff --git a/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn b/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn index 7dc97714dbb8f50fbbf5f6f452818cbe4415adb6..9304e814f6493bbd17cf623f6247fa1085089ce0 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,6 +59,8 @@ 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", diff --git a/services/cameraservice/cameraoperator/handler/include/dcamera_handler.h b/services/cameraservice/cameraoperator/handler/include/dcamera_handler.h index 3dcb9b8a726a16640586deefb225b1f23f62572c..5cb0dcb007a2cbd0933962ac208921d3d7a228fd 100644 --- a/services/cameraservice/cameraoperator/handler/include/dcamera_handler.h +++ b/services/cameraservice/cameraoperator/handler/include/dcamera_handler.h @@ -63,6 +63,7 @@ private: std::vector& profileList); bool IsValid(const DCStreamType type, const CameraStandard::Size& size); int32_t CovertToDcameraFormat(CameraStandard::CameraFormat format); + int32_t CreateMeatdataStr(sptr& info, cJSON *root); sptr cameraManager_; std::shared_ptr pluginListener_; diff --git a/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp b/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp index e0c0aabf2b3988ec175d066498b7687815806e63..00bf5fd1e236ca7eda9428128aecd758675bcf11 100644 --- a/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp +++ b/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp @@ -238,28 +238,47 @@ int32_t DCameraHandler::CreateDHItem(sptr& info, D ConfigFormatvideo(CONTINUOUS_FRAME, root, previewProfiles); std::vector supportedModes = cameraManager_->GetSupportedModes(info); - cJSON *modeArray = cJSON_CreateArray(); - CHECK_AND_FREE_RETURN_RET_LOG(modeArray == nullptr, DCAMERA_BAD_VALUE, root, "Create modeArray object failed"); - cJSON_AddItemToObject(root, CAMERA_SUPPORT_MODE.c_str(), modeArray); - for (auto &mode : supportedModes) { - DHLOGI("The camera id: %{public}s, The supportedModes is : %{public}d", GetAnonyString(id).c_str(), mode); - cJSON_AddItemToArray(modeArray, cJSON_CreateNumber(mode)); - auto capability = cameraManager_->GetSupportedOutputCapability(info, mode); - CHECK_AND_FREE_RETURN_RET_LOG(capability == nullptr, DCAMERA_BAD_VALUE, root, "supported capability is null"); - cJSON *modeData = cJSON_CreateObject(); - CHECK_AND_FREE_RETURN_RET_LOG(modeData == nullptr, DCAMERA_BAD_VALUE, root, "Create cJSON object failed"); - std::vector photoProfiles = capability->GetPhotoProfiles(); - ConfigFormatphoto(SNAPSHOT_FRAME, modeData, photoProfiles); - - std::vector previewProfiles = capability->GetPreviewProfiles(); - ConfigFormatvideo(CONTINUOUS_FRAME, modeData, previewProfiles); - - cJSON_AddItemToObject(root, std::to_string(mode).c_str(), modeData); + if (!supportedModes.empty()) { + cJSON *modeArray = cJSON_CreateArray(); + CHECK_AND_FREE_RETURN_RET_LOG(modeArray == nullptr, DCAMERA_BAD_VALUE, root, "Create modeArray object failed"); + cJSON_AddItemToObject(root, CAMERA_SUPPORT_MODE.c_str(), modeArray); + for (auto &mode : supportedModes) { + DHLOGI("The camera id: %{public}s, The supportedModes is : %{public}d", GetAnonyString(id).c_str(), mode); + cJSON_AddItemToArray(modeArray, cJSON_CreateNumber(mode)); + auto capability = cameraManager_->GetSupportedOutputCapability(info, mode); + CHECK_AND_FREE_RETURN_RET_LOG( + capability == nullptr, DCAMERA_BAD_VALUE, root, "supported capability is null"); + cJSON *modeData = cJSON_CreateObject(); + CHECK_AND_FREE_RETURN_RET_LOG(modeData == nullptr, DCAMERA_BAD_VALUE, root, "Create cJSON object failed"); + std::vector photoProfiles = capability->GetPhotoProfiles(); + ConfigFormatphoto(SNAPSHOT_FRAME, modeData, photoProfiles); + + std::vector previewProfiles = capability->GetPreviewProfiles(); + ConfigFormatvideo(CONTINUOUS_FRAME, modeData, previewProfiles); + + cJSON_AddItemToObject(root, std::to_string(mode).c_str(), modeData); + } } + ret = CreateMeatdataStr(info, root); + CHECK_AND_FREE_RETURN_RET_LOG(ret != DCAMERA_OK, DCAMERA_BAD_VALUE, root, "CreateMeatdataStr failed"); + char *jsonstr = cJSON_Print(root); + CHECK_AND_FREE_RETURN_RET_LOG(jsonstr == nullptr, DCAMERA_BAD_VALUE, root, "jsonstr is null"); + + item.attrs = jsonstr; + cJSON_free(jsonstr); + cJSON_Delete(root); + return DCAMERA_OK; +} + +int32_t DCameraHandler::CreateMeatdataStr(sptr& info, cJSON *root) +{ sptr cameraInput = nullptr; - int rv = cameraManager_->CreateCameraInput(info, &cameraInput); - CHECK_AND_FREE_RETURN_RET_LOG(rv != DCAMERA_OK, DCAMERA_BAD_VALUE, root, "create cameraInput failed"); + int32_t rv = cameraManager_->CreateCameraInput(info, &cameraInput); + if (rv != DCAMERA_OK) { + DHLOGE("create cameraInput failed"); + return DCAMERA_BAD_VALUE; + } std::hash h; std::string abilityStr = cameraInput->GetCameraSettings(); @@ -268,13 +287,7 @@ int32_t DCameraHandler::CreateDHItem(sptr& info, D std::string encStr = Base64Encode(reinterpret_cast(abilityStr.c_str()), abilityStr.length()); DHLOGI("encodeString hash: %zu, length: %zu", h(encStr), encStr.length()); cJSON_AddStringToObject(root, CAMERA_METADATA_KEY.c_str(), encStr.c_str()); - char *jsonstr = cJSON_Print(root); - CHECK_AND_FREE_RETURN_RET_LOG(jsonstr == nullptr, DCAMERA_BAD_VALUE, root, "jsonstr is null"); - - item.attrs = jsonstr; CHECK_AND_LOG(cameraInput->Release() != DCAMERA_OK, "cameraInput Release failed"); - cJSON_free(jsonstr); - cJSON_Delete(root); return DCAMERA_OK; } diff --git a/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn b/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn index 8d6a72030782298b3590c80a49b0c71375d6ad37..d1521dc0939ff5910c0d5331a586ff8cdbb242a4 100644 --- a/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn +++ b/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn @@ -19,21 +19,8 @@ module_out_path = "distributed_camera/dcamera_handler_test" config("module_private_config") { visibility = [ ":*" ] - include_dirs = [ - "${graphicsurface_path}/surface/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", - "${camerastandard_path}/services/camera_service/binder/base/include", - "${camerastandard_path}/services/camera_service/binder/client/include", - "${camerastandard_path}/services/camera_service/binder/server/include", - "${camerastandard_path}/services/camera_service/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include", - ] - include_dirs += [ + include_dirs = [ "${common_path}/include/constants", "${common_path}/include/utils", "${services_path}/cameraservice/base/include", @@ -50,10 +37,8 @@ ohos_unittest("DCameraHandlerTest") { configs = [ ":module_private_config" ] deps = [ - "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -62,6 +47,8 @@ ohos_unittest("DCameraHandlerTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "camera_framework:camera_framework", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", diff --git a/services/cameraservice/sinkservice/BUILD.gn b/services/cameraservice/sinkservice/BUILD.gn index 767bd71efc5265d2d60a0c588f1c91d45e9a40a7..441ac3f41749bf954d31319ec391ca00b8b18673 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,7 +109,6 @@ 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", diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_frame_trigger_event.h b/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_frame_trigger_event.h deleted file mode 100644 index 54c2cb2e9d4eb631eed30c2a427da1fe6f7eba20..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_frame_trigger_event.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OHOS_DCAMERA_FRAME_TRIGER_EVENT_H -#define OHOS_DCAMERA_FRAME_TRIGER_EVENT_H - -#include -#include "eventbus/event.h" - -namespace OHOS { -namespace DistributedHardware { -class DCameraFrameTriggerEvent : public Event { -TYPEINDENT(DCameraFrameTriggerEvent); -public: - explicit DCameraFrameTriggerEvent(EventSender& sender); - DCameraFrameTriggerEvent(EventSender& sender, std::string& param); - ~DCameraFrameTriggerEvent() = default; - std::string GetParam(); - -private: - std::string param_; -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif // OHOS_DCAMERA_FRAME_TRIGER_EVENT_H \ No newline at end of file diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_photo_output_event.h b/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_photo_output_event.h deleted file mode 100644 index f13dc0280c8aef9658d9bcfa97583853b37ab8c4..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_photo_output_event.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OHOS_DCAMERA_PHOTO_OUTPUT_EVENT_H -#define OHOS_DCAMERA_PHOTO_OUTPUT_EVENT_H - -#include "eventbus/event.h" - -#include -#include - -#include "data_buffer.h" - -namespace OHOS { -namespace DistributedHardware { -class DCameraPhotoOutputEvent : public Event { -TYPEINDENT(DCameraPhotoOutputEvent); -public: - explicit DCameraPhotoOutputEvent(EventSender& sender); - DCameraPhotoOutputEvent(EventSender& sender, const std::shared_ptr& param); - ~DCameraPhotoOutputEvent() = default; - std::shared_ptr GetParam(); - -private: - std::shared_ptr param_; -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif // OHOS_DCAMERA_PHOTO_OUTPUT_EVENT_H \ No newline at end of file diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_video_output_event.h b/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_video_output_event.h deleted file mode 100644 index aea9b9ab12850ddbe2b3abbeb53827779ee43c06..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_video_output_event.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OHOS_DCAMERA_VIDEO_OUTPUT_EVENT_H -#define OHOS_DCAMERA_VIDEO_OUTPUT_EVENT_H - -#include - -#include "eventbus/event.h" -#include "data_buffer.h" - -namespace OHOS { -namespace DistributedHardware { -class DCameraVideoOutputEvent : public Event { -TYPEINDENT(DCameraVideoOutputEvent); -public: - explicit DCameraVideoOutputEvent(EventSender& sender); - DCameraVideoOutputEvent(EventSender& sender, const std::shared_ptr& param); - ~DCameraVideoOutputEvent() = default; - std::shared_ptr GetParam(); - -private: - std::shared_ptr param_; -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif // OHOS_DCAMERA_VIDEO_OUTPUT_EVENT_H \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/dcamera_sink_controller.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/dcamera_sink_controller.cpp index 573ed2ce6f0704cfffb9e7ae2341d5ef668eeca7..7b258cc97446e59e0ba91341cfd8c51b4debaa8a 100644 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/dcamera_sink_controller.cpp +++ b/services/cameraservice/sinkservice/src/distributedcameramgr/dcamera_sink_controller.cpp @@ -400,6 +400,7 @@ void DCameraSinkController::ProcessFrameTrigger(const AppExecFwk::InnerEvent::Po { DHLOGD("Receive frame trigger event then start process data in sink controller."); std::shared_ptr param = event->GetSharedObject(); + CHECK_AND_RETURN_LOG(param == nullptr, "ProcessFrameTrigger get param is null"); accessControl_->TriggerFrame(*param); } @@ -408,6 +409,7 @@ void DCameraSinkController::ProcessPostAuthorization(const AppExecFwk::InnerEven DHLOGD("Receive post authorization event then start process data in sink controller."); std::shared_ptr>> captureInfos = event->GetSharedObject>>(); + CHECK_AND_RETURN_LOG(captureInfos == nullptr, "ProcessPostAuthorization get captureInfos is null"); PostAuthorization(*captureInfos); } diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp deleted file mode 100644 index 9ef08a79944cc33d3cd7743ac1daef96d7393b14..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_frame_trigger_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "dcamera_frame_trigger_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraFrameTriggerEvent::DCameraFrameTriggerEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraFrameTriggerEvent::DCameraFrameTriggerEvent(EventSender& sender, std::string& param) - : Event(sender), param_(param) -{ -} - -std::string DCameraFrameTriggerEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp deleted file mode 100644 index 1db88ea722bc6b771c5e31cabb023dcd3db4aea6..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_photo_output_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "dcamera_photo_output_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraPhotoOutputEvent::DCameraPhotoOutputEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraPhotoOutputEvent::DCameraPhotoOutputEvent(EventSender& sender, const std::shared_ptr& param) - : Event(sender), param_(param) -{ -} - -std::shared_ptr DCameraPhotoOutputEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp deleted file mode 100644 index 97bd0a6fb84b9c637408424961dd4308cb8a768d..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_post_authorization_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "dcamera_post_authorization_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraPostAuthorizationEvent::DCameraPostAuthorizationEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraPostAuthorizationEvent::DCameraPostAuthorizationEvent(EventSender& sender, - std::vector>& param) : Event(sender), param_(param) -{ -} - -std::vector> DCameraPostAuthorizationEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp b/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp deleted file mode 100644 index 6de51a9aa38a1742c97c98c07d8bc35ab2bb6148..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/src/distributedcameramgr/eventbus/dcamera_video_output_event.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "dcamera_video_output_event.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraVideoOutputEvent::DCameraVideoOutputEvent(EventSender& sender) : Event(sender) -{ -} - -DCameraVideoOutputEvent::DCameraVideoOutputEvent(EventSender& sender, const std::shared_ptr& param) - : Event(sender), param_(param) -{ -} - -std::shared_ptr DCameraVideoOutputEvent::GetParam() -{ - return param_; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn index 6a428d6f3f00221a343a8e15880d416ff25fa953..619311f433c00ae6d73e7ea93b5ac11acac488e3 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn @@ -19,22 +19,10 @@ module_out_path = "distributed_camera/dcamera_sink_test" config("module_private_config") { visibility = [ ":*" ] - include_dirs = [ - "${graphicsurface_path}/surface/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", - "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", - "${camerastandard_path}/services/camera_service/binder/base/include", - "${camerastandard_path}/services/camera_service/binder/client/include", - "${camerastandard_path}/services/camera_service/binder/server/include", - "${camerastandard_path}/services/camera_service/include", - ] - include_dirs += [ + include_dirs = [ "${common_path}/include/constants", "${common_path}/include/utils", - "${fwk_common_path}/utils/include", "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", "${services_path}/cameraservice/base/include", @@ -46,7 +34,6 @@ config("module_private_config") { "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", "${services_path}/data_process/include/eventbus", "${services_path}/channel/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", ] } @@ -69,12 +56,10 @@ ohos_unittest("DistributedCameraSinkServiceTest") { configs = [ ":module_private_config" ] deps = [ - "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", "${services_path}/cameraservice/sinkservice:distributed_camera_sink", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -83,6 +68,8 @@ ohos_unittest("DistributedCameraSinkServiceTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "camera_framework:camera_framework", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_camera:metadata", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "drivers_peripheral_display:hdi_gralloc_client", diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp index 98021ab19bce25ca7bd98fc8925ea316fe480fe3..c8ed010652c9a98dc4a6f6f29e67b8b91353712b 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp @@ -34,10 +34,9 @@ public: static void TearDownTestCase(void); void SetUp(); void TearDown(); - - std::shared_ptr sinkService_; }; +const int32_t TEST_TWENTY_MS = 20000; std::string g_dhId; std::string g_networkId = "08647073e02e7a78f09473aa122ff57fc81c00"; std::string g_testParams = "TestParams"; @@ -55,29 +54,34 @@ std::string g_testOpenInfoService = R"({ "Command": "OPEN_CHANNEL", "Value": {"SourceDevId": "TestDevId"} })"; +std::shared_ptr sinkService_; void DistributedCameraSinkServiceTest::SetUpTestCase(void) { DHLOGI("enter"); + sinkService_ = std::make_shared(DISTRIBUTED_HARDWARE_CAMERA_SINK_SA_ID, true); + DCameraHandler::GetInstance().Initialize(); + g_dhId = DCameraHandler::GetInstance().GetCameras().front(); + sptr sinkCallback(new DCameraSinkCallback()); + sinkService_->InitSink(g_testParams, sinkCallback); } void DistributedCameraSinkServiceTest::TearDownTestCase(void) { DHLOGI("enter"); + sinkService_->ReleaseSink(); + usleep(TEST_TWENTY_MS); + sinkService_ = nullptr; } void DistributedCameraSinkServiceTest::SetUp(void) { DHLOGI("enter"); - sinkService_ = std::make_shared(DISTRIBUTED_HARDWARE_CAMERA_SINK_SA_ID, true); - DCameraHandler::GetInstance().Initialize(); - g_dhId = DCameraHandler::GetInstance().GetCameras().front(); } void DistributedCameraSinkServiceTest::TearDown(void) { DHLOGI("enter"); - sinkService_ = nullptr; } /** @@ -91,15 +95,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_001, TestSi DHLOGI("dcamera_sink_service_test_001"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->SubscribeLocalHardware(g_dhId, g_testParams); + int32_t ret = sinkService_->SubscribeLocalHardware(g_dhId, g_testParams); EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -113,15 +110,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_002, TestSi DHLOGI("dcamera_sink_service_test_002"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); + int32_t ret = sinkService_->UnsubscribeLocalHardware(g_dhId); EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->UnsubscribeLocalHardware(g_dhId); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -135,15 +125,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_003, TestSi DHLOGI("dcamera_sink_service_test_003"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); + int32_t ret = sinkService_->StopCapture(g_dhId); EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->StopCapture(g_dhId); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -157,15 +140,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_004, TestSi DHLOGI("dcamera_sink_service_test_004"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ChannelNeg(g_dhId, g_testChannelInfoContinue); + int32_t ret = sinkService_->ChannelNeg(g_dhId, g_testChannelInfoContinue); EXPECT_NE(DCAMERA_OK, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -179,15 +155,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_005, TestSi DHLOGI("dcamera_sink_service_test_005"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); + int32_t ret = sinkService_->GetCameraInfo(g_dhId, g_testCameraInfo); EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->GetCameraInfo(g_dhId, g_testCameraInfo); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -201,11 +170,7 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_006, TestSi DHLOGI("dcamera_sink_service_test_006"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->OpenChannel(g_dhId, g_testOpenInfoService); + int32_t ret = sinkService_->OpenChannel(g_dhId, g_testOpenInfoService); EXPECT_NE(DCAMERA_OK, ret); ret = sinkService_->ChannelNeg(g_dhId, g_testChannelInfoContinue); @@ -213,9 +178,6 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_006, TestSi ret = sinkService_->CloseChannel(g_dhId); EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -248,15 +210,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_008, TestSi DHLOGI("dcamera_sink_service_test_008"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->SubscribeLocalHardware("", g_testParams); + int32_t ret = sinkService_->SubscribeLocalHardware("", g_testParams); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -270,15 +225,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_009, TestSi DHLOGI("dcamera_sink_service_test_009"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->UnsubscribeLocalHardware(""); + int32_t ret = sinkService_->UnsubscribeLocalHardware(""); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -291,15 +239,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_010, TestSi DHLOGI("dcamera_sink_service_test_010"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ChannelNeg("", g_testChannelInfoContinue); + int32_t ret = sinkService_->ChannelNeg("", g_testChannelInfoContinue); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -312,15 +253,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_011, TestSi DHLOGI("dcamera_sink_service_test_011"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->GetCameraInfo("", g_testCameraInfo); + int32_t ret = sinkService_->GetCameraInfo("", g_testCameraInfo); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -333,18 +267,11 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_012, TestSi DHLOGI("dcamera_sink_service_test_012"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->OpenChannel("", g_testOpenInfoService); + int32_t ret = sinkService_->OpenChannel("", g_testOpenInfoService); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); ret = sinkService_->CloseChannel(""); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -375,15 +302,8 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_014, TestSi DHLOGI("dcamera_sink_service_test_014"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->StopCapture(""); + int32_t ret = sinkService_->StopCapture(""); EXPECT_EQ(DCAMERA_NOT_FOUND, ret); - - ret = sinkService_->ReleaseSink(); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } /** @@ -396,14 +316,7 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_015, TestSi DHLOGI("dcamera_sink_service_test_015"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->PauseDistributedHardware(g_networkId); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); - - ret = sinkService_->ReleaseSink(); + int32_t ret = sinkService_->PauseDistributedHardware(g_networkId); EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } @@ -417,14 +330,7 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_016, TestSi DHLOGI("dcamera_sink_service_test_016"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->ResumeDistributedHardware(g_networkId); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); - - ret = sinkService_->ReleaseSink(); + int32_t ret = sinkService_->ResumeDistributedHardware(g_networkId); EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } @@ -438,14 +344,7 @@ HWTEST_F(DistributedCameraSinkServiceTest, dcamera_sink_service_test_017, TestSi DHLOGI("dcamera_sink_service_test_017"); EXPECT_EQ(sinkService_ == nullptr, false); - sptr sinkCallback(new DCameraSinkCallback()); - int32_t ret = sinkService_->InitSink(g_testParams, sinkCallback); - EXPECT_EQ(DCAMERA_OK, ret); - - ret = sinkService_->StopDistributedHardware(g_networkId); - EXPECT_EQ(DCAMERA_BAD_VALUE, ret); - - ret = sinkService_->ReleaseSink(); + int32_t ret = sinkService_->StopDistributedHardware(g_networkId); EXPECT_EQ(DCAMERA_BAD_VALUE, ret); } } // namespace DistributedHardware diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn index d3a2253b99bfd986b044a2eab55225577ec535e5..96f0d2cb1f9b5bf13246f13c221a09d2b862bf9c 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", @@ -110,6 +94,7 @@ ohos_unittest("DCameraSinkMgrTest") { "graphic_surface:surface", "hilog:libhilog", "ipc:ipc_core", + "samgr:samgr_proxy", ] defines = [ diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_controller_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_controller_test.cpp index dfb98e08a23445e0937a9f54d9b314a0813ef3cb..16845901303d03472f65a6a198badd0f3b268bd1 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_controller_test.cpp +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_controller_test.cpp @@ -60,6 +60,7 @@ public: std::string g_testDeviceIdController; const int32_t SLEEP_TIME_MS = 500; +const int32_t TEST_TWENTY_MS = 20000; const std::string SESSION_FLAG_CONTINUE = "dataContinue"; const std::string SESSION_FLAG_SNAPSHOT = "dataSnapshot"; const std::string TEST_DEVICE_ID_EMPTY = ""; @@ -577,8 +578,8 @@ HWTEST_F(DCameraSinkControllerTest, dcamera_sink_controller_test_024, TestSize.L { g_operatorStr = "test024"; controller_->isSensitive_ = false; - int32_t ret = controller_->PullUpPage(); - EXPECT_EQ(DCAMERA_OK, ret); + EXPECT_EQ(false, controller_->isSensitive_); + usleep(TEST_TWENTY_MS); } /** @@ -593,10 +594,8 @@ HWTEST_F(DCameraSinkControllerTest, dcamera_sink_controller_test_025, TestSize.L EXPECT_NE(nullptr, sinkCallback); controller_->isSensitive_ = true; controller_->sinkCallback_ = sinkCallback; - int32_t ret = controller_->PullUpPage(); - EXPECT_EQ(DCAMERA_OK, ret); - ret = controller_->Init(g_testCamIndex); + int32_t ret = controller_->Init(g_testCamIndex); EXPECT_EQ(DCAMERA_OK, ret); EXPECT_NE(nullptr, controller_->sinkCotrEventHandler_); std::shared_ptr param = std::make_shared(""); @@ -614,6 +613,7 @@ HWTEST_F(DCameraSinkControllerTest, dcamera_sink_controller_test_025, TestSize.L controller_->sinkCotrEventHandler_->ProcessEvent(authorizationEvent); event = AppExecFwk::InnerEvent::Get(0, param, 0); controller_->sinkCotrEventHandler_->ProcessEvent(event); + usleep(TEST_TWENTY_MS); } /** @@ -627,9 +627,7 @@ HWTEST_F(DCameraSinkControllerTest, dcamera_sink_controller_test_026, TestSize.L g_outputStr = "test026"; auto outputMock = std::make_shared("camera_1", nullptr); EXPECT_NE(DCAMERA_OK, outputMock->Init()); - controller_->output_ = outputMock; - int32_t ret = controller_->Init(g_testCamIndex); - EXPECT_NE(DCAMERA_BAD_VALUE, ret); + usleep(TEST_TWENTY_MS); } /** diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_dev_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_dev_test.cpp index 9f77c44cbb9ec042899ce48335c431da384dd3d0..d112b225ced04b23a6f2346c25e96da8a6d7ceb5 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_dev_test.cpp +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/dcamera_sink_dev_test.cpp @@ -94,33 +94,6 @@ void DCameraSinkDevTest::TearDown(void) dev_ = nullptr; } -/** - * @tc.name: dcamera_sink_dev_test_001 - * @tc.desc: Verify the Init and UnInit function. - * @tc.type: FUNC - * @tc.require: AR000GK6MV - */ -HWTEST_F(DCameraSinkDevTest, dcamera_sink_dev_test_001, TestSize.Level1) -{ - int32_t ret = dev_->Init(); - EXPECT_EQ(DCAMERA_OK, ret); - EXPECT_EQ(true, dev_->isInit_); - - ret = dev_->UnInit(); - EXPECT_EQ(DCAMERA_OK, ret); - EXPECT_EQ(false, dev_->isInit_); - - g_sinkCtrlStr = "test_001"; - ret = dev_->UnInit(); - EXPECT_EQ(DCAMERA_OK, ret); - EXPECT_EQ(false, dev_->isInit_); - - dev_->controller_ = nullptr; - ret = dev_->UnInit(); - EXPECT_EQ(DCAMERA_OK, ret); - EXPECT_EQ(false, dev_->isInit_); -} - /** * @tc.name: dcamera_sink_dev_test_002 * @tc.desc: Verify the SubscribeLocalHardware function. diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_photo_output_event_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_photo_output_event_test.cpp deleted file mode 100644 index 4777134f93273163c70cc584077f385a29159269..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_photo_output_event_test.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -#include "dcamera_photo_output_event.h" -#include "data_buffer.h" -#include "distributed_hardware_log.h" - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -class DCameraPhotoOutputEventTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); - - std::shared_ptr dataBuffer_ = nullptr; - std::shared_ptr testsender_ = nullptr; - std::shared_ptr testDCameraPhotoOutputEvent_ = nullptr; -}; - -namespace { - constexpr size_t TEST_CAPACITY = 1; -} - -void DCameraPhotoOutputEventTest::SetUpTestCase(void) -{ - DHLOGI("DCameraPhotoOutputEventTest SetUpTestCase"); -} - -void DCameraPhotoOutputEventTest::TearDownTestCase(void) -{ - DHLOGI("DCameraPhotoOutputEventTest TearDownTestCase"); -} - -void DCameraPhotoOutputEventTest::SetUp(void) -{ - DHLOGI("DCameraPhotoOutputEventTest SetUp"); - dataBuffer_ = std::make_shared(TEST_CAPACITY); - testsender_ = std::make_shared(); - testDCameraPhotoOutputEvent_ = std::make_shared(*testsender_, dataBuffer_); -} - -void DCameraPhotoOutputEventTest::TearDown(void) -{ - DHLOGI("DCameraPhotoOutputEventTest SetUp"); - testsender_ = nullptr; - testDCameraPhotoOutputEvent_ = nullptr; -} - -/** - * @tc.name: dcamera_photo_output_event_test_001 - * @tc.desc: Verify DCameraPhotoOutputEvent init param correct - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(DCameraPhotoOutputEventTest, dcamera_photo_output_event_test_001, TestSize.Level1) -{ - std::shared_ptr buffer = testDCameraPhotoOutputEvent_->GetParam(); - EXPECT_EQ(buffer->Capacity(), TEST_CAPACITY); -} -} // namespace DistributedHardware -} // namespace OHOS diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_post_authorization_event_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_post_authorization_event_test.cpp deleted file mode 100644 index 1b789e25e3dc971029a2fa5c128140c17296c297..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_post_authorization_event_test.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -#include "dcamera_post_authorization_event.h" -#include "dcamera_capture_info_cmd.h" -#include "distributed_hardware_log.h" - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -class DCameraPostAuthorizationEventTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); - - std::shared_ptr videoInfo; - std::vector> captureInfos; - std::shared_ptr testsender_; - std::shared_ptr testDCameraPostAuthorizationEvent_; -}; - -namespace { - constexpr int32_t TEST_WIDTH = 640; - constexpr int32_t TEST_HEIGHT = 480; - constexpr int32_t TEST_FORMAT_VIDEO = OHOS_CAMERA_FORMAT_RGBA_8888; -} - -void DCameraPostAuthorizationEventTest::SetUpTestCase(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest SetUpTestCase"); -} - -void DCameraPostAuthorizationEventTest::TearDownTestCase(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest TearDownTestCase"); -} - -void DCameraPostAuthorizationEventTest::SetUp(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest SetUp"); - videoInfo = std::make_shared(); - videoInfo->width_ = TEST_WIDTH; - videoInfo->height_ = TEST_HEIGHT; - videoInfo->format_ = TEST_FORMAT_VIDEO; - videoInfo->isCapture_ = true; - videoInfo->streamType_ = CONTINUOUS_FRAME; - captureInfos.push_back(videoInfo); - testsender_ = std::make_shared(); - testDCameraPostAuthorizationEvent_ = std::make_shared(*testsender_, captureInfos); -} - -void DCameraPostAuthorizationEventTest::TearDown(void) -{ - DHLOGI("DCameraPostAuthorizationEventTest SetUp"); - testsender_ = nullptr; - testDCameraPostAuthorizationEvent_ = nullptr; -} - -/** - * @tc.name: dcamera_post_authorization_event_test_001 - * @tc.desc: Verify DCameraPostAuthorizationEvent init param correct - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(DCameraPostAuthorizationEventTest, dcamera_post_authorization_event_test_001, TestSize.Level1) -{ - std::vector> info = testDCameraPostAuthorizationEvent_->GetParam(); - EXPECT_EQ(info.size(), captureInfos.size()); -} -} // namespace DistributedHardware -} // namespace OHOS diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_video_output_event_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_video_output_event_test.cpp deleted file mode 100644 index 29be3e2414ff8b6bbcef4416f64783c3f21ed122..0000000000000000000000000000000000000000 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_video_output_event_test.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -#include "dcamera_video_output_event.h" -#include "data_buffer.h" -#include "distributed_hardware_log.h" - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -class DCameraVideoOutputEventTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); - - std::shared_ptr dataBuffer_ = nullptr; - std::shared_ptr testsender_ = nullptr; - std::shared_ptr testDCameraVideoOutputEvent_ = nullptr; -}; - -namespace { - constexpr size_t TEST_CAPACITY = 1; -} - -void DCameraVideoOutputEventTest::SetUpTestCase(void) -{ - DHLOGI("DCameraVideoOutputEventTest SetUpTestCase"); -} - -void DCameraVideoOutputEventTest::TearDownTestCase(void) -{ - DHLOGI("DCameraVideoOutputEventTest TearDownTestCase"); -} - -void DCameraVideoOutputEventTest::SetUp(void) -{ - DHLOGI("DCameraVideoOutputEventTest SetUp"); - dataBuffer_ = std::make_shared(TEST_CAPACITY); - testsender_ = std::make_shared(); - testDCameraVideoOutputEvent_ = std::make_shared(*testsender_, dataBuffer_); -} - -void DCameraVideoOutputEventTest::TearDown(void) -{ - DHLOGI("DCameraVideoOutputEventTest SetUp"); - testsender_ = nullptr; - testDCameraVideoOutputEvent_ = nullptr; -} - -/** - * @tc.name: dcamera_video_output_event_test_001 - * @tc.desc: Verify DCameraVideoOutputEvent init param correct - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(DCameraVideoOutputEventTest, dcamera_video_output_event_test_001, TestSize.Level1) -{ - std::shared_ptr buffer = testDCameraVideoOutputEvent_->GetParam(); - EXPECT_EQ(buffer->Capacity(), TEST_CAPACITY); -} -} // namespace DistributedHardware -} // namespace OHOS diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h index 052d2ccdfd4f74c75823ab78fdbaaa18a89346fe..e9fd2629b789f85c27f1a11fabdbc3e20a4068b2 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/mock_dcamera_sink_data_process.h @@ -25,8 +25,6 @@ #include "data_process_listener.h" #include "dcamera_capture_info_cmd.h" #include "dcamera_index.h" -#include "dcamera_photo_output_event.h" -#include "dcamera_video_output_event.h" #include "icamera_channel.h" #include "icamera_channel_listener.h" #include "icamera_sink_data_process.h" @@ -59,12 +57,6 @@ public: void Init() { } - void OnEvent(DCameraPhotoOutputEvent& event) - { - } - void OnEvent(DCameraVideoOutputEvent& event) - { - } void OnProcessedVideoBuffer(const std::shared_ptr& videoResult) { } diff --git a/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp b/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp index 857415d7474c0f47a4297acdce22a86a70d02840..85a23569074348b0e5515670fb3f499abf1bed90 100644 --- a/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp +++ b/services/cameraservice/sourceservice/src/distributedcameramgr/dcameradata/dcamera_source_input.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -118,7 +118,7 @@ int32_t DCameraSourceInput::ReleaseStreams(std::vector& streamIds, bool& is std::vector continueStreamIds; dataProcess_[CONTINUOUS_FRAME]->GetAllStreamIds(continueStreamIds); std::vector snapStreamIds; - dataProcess_[CONTINUOUS_FRAME]->GetAllStreamIds(snapStreamIds); + dataProcess_[SNAPSHOT_FRAME]->GetAllStreamIds(snapStreamIds); if (continueStreamIds.empty() && snapStreamIds.empty()) { isAllRelease = true; } diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn index b342819abcf5d1f60f18fe9617f05332eb25365a..ac6bba897c8916dc77e32a2a4fab933cebfbaa7d 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/BUILD.gn @@ -40,12 +40,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", "${innerkits_path}/native_cpp/camera_sink/include", - - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", - "//drivers/peripheral/base/", - "${graphicsurface_path}/surface/include", ] } @@ -77,7 +71,6 @@ ohos_unittest("DCameraSourceTest") { "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "${services_path}/cameraservice/sourceservice:distributed_camera_source", "${services_path}/channel:distributed_camera_channel", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -86,6 +79,7 @@ ohos_unittest("DCameraSourceTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp index 9d55180a8a8a5cc4a59444942e7743d6050503c1..57403d98dc047402302d8df0dd4f24852269b416 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcamera/distributed_camera_source_service_test.cpp @@ -46,6 +46,7 @@ namespace { const std::string TEST_DEVICE_ID = "bb536a637105409e904d4da83790a4a7"; const std::string TEST_CAMERA_DH_ID_0 = "camera_0"; const std::string TEST_REQID = "bb536a637105409e904d4da83790a4a7"; +const int32_t TEST_SOURCE_SERVICE = 200000; } void DistributedCameraSourceServiceTest::SetUpTestCase(void) @@ -178,6 +179,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_006, Te testSrcService_->listener_ = std::make_shared(); int32_t ret = testSrcService_->InitSource(params, callbackProxy); EXPECT_EQ(DCAMERA_OK, ret); + usleep(TEST_SOURCE_SERVICE); } /** @@ -193,6 +195,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_007, Te int32_t ret = testSrcService_->ReleaseSource(); EXPECT_EQ(DCAMERA_BAD_VALUE, ret); + usleep(TEST_SOURCE_SERVICE); } /** @@ -208,6 +211,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_008, Te int32_t ret = testSrcService_->LoadDCameraHDF(); EXPECT_EQ(DCAMERA_OK, ret); + usleep(TEST_SOURCE_SERVICE); } /** @@ -225,6 +229,7 @@ HWTEST_F(DistributedCameraSourceServiceTest, dcamera_source_service_test_009, Te EXPECT_EQ(DCAMERA_OK, ret); ret = testSrcService_->UnLoadCameraHDF(); EXPECT_EQ(DCAMERA_OK, ret); + usleep(TEST_SOURCE_SERVICE); } } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn index 96fdd28cb30ea27a7f58622bda6b5fe90a8a4877..0a05c6ad0cc381d35e9167bc86666d4f6452485f 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -42,11 +42,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_sink/include", "${innerkits_path}/native_cpp/camera_sink/include/callback", - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/eventbus", - "${fwk_common_path}/utils/include", - "//drivers/peripheral/base/", - "${graphicsurface_path}/surface/include", "${feeding_smoother_path}", "${feeding_smoother_path}/base", "${feeding_smoother_path}/derived", @@ -84,7 +79,6 @@ ohos_unittest("DCameraSourceMgrTest") { "${services_path}/cameraservice/sourceservice:distributed_camera_source", "${services_path}/channel:distributed_camera_channel", "${services_path}/data_process:distributed_camera_data_process", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -93,6 +87,7 @@ ohos_unittest("DCameraSourceMgrTest") { "access_token:libtokensetproc_shared", "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", "dsoftbus:softbus_client", "eventhandler:libeventhandler", diff --git a/services/channel/src/dcamera_low_latency.cpp b/services/channel/src/dcamera_low_latency.cpp index 9c80cd851cb97515e95db3ed7d0640b8548cd84b..a528c1a78b43662daa1d02cf13afb325725c1a67 100644 --- a/services/channel/src/dcamera_low_latency.cpp +++ b/services/channel/src/dcamera_low_latency.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -95,9 +95,11 @@ int32_t DCameraLowLatency::DisableLowLatency() std::shared_ptr DCameraLowLatency::GetDHFwkKit() { - std::lock_guard lock(dHFwkKitMutex_); if (dHFwkKit_ == nullptr) { - dHFwkKit_ = std::make_shared(); + std::lock_guard lock(dHFwkKitMutex_); + if (dHFwkKit_ == nullptr) { + dHFwkKit_ = std::make_shared(); + } } return dHFwkKit_; } diff --git a/services/channel/test/unittest/common/channel/BUILD.gn b/services/channel/test/unittest/common/channel/BUILD.gn index 511e05f01e94fd21d1387c5fef592b2940b22a0d..e684ee6e89565bf8feda5ba0056504648fd51822 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,7 +79,9 @@ ohos_unittest("DCameraChannelTest") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", + "dsoftbus:softbus_client", "eventhandler:libeventhandler", "graphic_surface:surface", "hdf_core:libhdi", diff --git a/services/data_process/BUILD.gn b/services/data_process/BUILD.gn index 163a5aa3b4fe18034fe1522d6c3146cce3b0edb0..9664f13a3724a4ed7b29f40cebe47ba27f01a252 100644 --- a/services/data_process/BUILD.gn +++ b/services/data_process/BUILD.gn @@ -65,8 +65,7 @@ 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_hdi_impl_1.2", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_surface:surface", diff --git a/services/data_process/include/eventbus/dcamera_pipeline_event.h b/services/data_process/include/eventbus/dcamera_pipeline_event.h index a021436b9c90b4926a32cb78a73aeda7a65eee24..f55f0427da90ef064a738725e930bdfdcd4c9ddb 100644 --- a/services/data_process/include/eventbus/dcamera_pipeline_event.h +++ b/services/data_process/include/eventbus/dcamera_pipeline_event.h @@ -18,7 +18,6 @@ #include -#include "eventbus/event.h" #include "data_buffer.h" #include "image_common_type.h" @@ -71,31 +70,6 @@ private: std::string pipelineOwner_; std::vector> multiDataBuffers_; }; - -class DCameraPipelineEvent : public Event { - TYPEINDENT(DCameraPipelineEvent) -public: - DCameraPipelineEvent(EventSender& sender, const std::shared_ptr& pipelineConfig) - : Event(sender), pipelineConfig_(pipelineConfig), action_(PipelineAction::NO_ACTION) {} - DCameraPipelineEvent(EventSender& sender, const std::shared_ptr& pipelineConfig, - PipelineAction otherAction) - : Event(sender), pipelineConfig_(pipelineConfig), action_(otherAction) {} - ~DCameraPipelineEvent() = default; - - std::shared_ptr GetPipelineConfig() const - { - return pipelineConfig_; - } - - PipelineAction GetAction() const - { - return action_; - } - -private: - std::shared_ptr pipelineConfig_ = nullptr; - PipelineAction action_; -}; } // namespace DistributedHardware } // namespace OHOS #endif // OHOS_DCAMERA_PIPELINE_EVENT_H diff --git a/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp b/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp index b43bc9f2cbedf6e8f1b24abf47f0b49da14d6d41..bb96719dd25eb3cef1fa9c5e1f69ae4963045e35 100644 --- a/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp +++ b/services/data_process/src/pipeline_node/scale_conversion/scale_convert_process_common.cpp @@ -21,6 +21,8 @@ namespace OHOS { namespace DistributedHardware { + +const int32_t MAX_IMG_SIZE = 46340; ScaleConvertProcess::~ScaleConvertProcess() { DumpFileUtil::CloseDumpFile(&dumpFile_); @@ -164,6 +166,11 @@ int32_t ScaleConvertProcess::GetImageUnitInfo(ImageUnitInfo& imgInfo, const std: return DCAMERA_BAD_VALUE; } + if (imgInfo.alignedWidth > MAX_IMG_SIZE && imgInfo.alignedHeight > MAX_IMG_SIZE) { + DHLOGE("imgInfo aligned width and height out of range"); + return DCAMERA_BAD_VALUE; + } + bool findErr = true; int32_t colorFormat = 0; findErr = findErr && imgBuf->FindInt32("Videoformat", colorFormat); diff --git a/services/data_process/test/unittest/common/pipeline/BUILD.gn b/services/data_process/test/unittest/common/pipeline/BUILD.gn index 746689c26b35109868f8bb7800dcd5f85a33b6d7..b7bdd7a703cb767fab518429a3e44a1f4f93e4a1 100644 --- a/services/data_process/test/unittest/common/pipeline/BUILD.gn +++ b/services/data_process/test/unittest/common/pipeline/BUILD.gn @@ -32,8 +32,6 @@ config("module_private_config") { "${common_path}/include/constants", "${common_path}/include/utils", "${innerkits_path}/native_cpp/camera_source/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/eventbus", "${feeding_smoother_path}/base", "${services_path}/cameraservice/base/include", ] diff --git a/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_sink_test.cpp b/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_sink_test.cpp index be048faf7b51f0f85f78f34f8e9bd531f6cb52ad..84775cdef46974d653688db57273ad0ab71d3bfc 100644 --- a/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_sink_test.cpp +++ b/services/data_process/test/unittest/common/pipeline/dcamera_pipeline_sink_test.cpp @@ -73,7 +73,7 @@ HWTEST_F(DCameraPipelineSinkTest, dcamera_pipeline_sink_test_001, TestSize.Level EXPECT_EQ(false, testSinkPipeline_ == nullptr); std::shared_ptr listener = std::make_shared(); - VideoConfigParams srcParams(VideoCodecType::NO_CODEC, + VideoConfigParams srcParams(VideoCodecType::CODEC_H264, Videoformat::NV21, DCAMERA_PRODUCER_FPS_DEFAULT, TEST_WIDTH, @@ -160,7 +160,7 @@ HWTEST_F(DCameraPipelineSinkTest, dcamera_pipeline_sink_test_004, TestSize.Level EXPECT_EQ(false, testSinkPipeline_ == nullptr); std::shared_ptr listener = std::make_shared(); - VideoConfigParams srcParams(VideoCodecType::NO_CODEC, + VideoConfigParams srcParams(VideoCodecType::CODEC_H264, Videoformat::NV21, DCAMERA_PRODUCER_FPS_DEFAULT, TEST_WIDTH, @@ -175,7 +175,7 @@ HWTEST_F(DCameraPipelineSinkTest, dcamera_pipeline_sink_test_004, TestSize.Level std::vector> buffers; rc = testSinkPipeline_->ProcessData(buffers); - EXPECT_EQ(rc, DCAMERA_BAD_VALUE); + EXPECT_NE(rc, DCAMERA_OK); usleep(SLEEP_TIME); } 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 255b70a542cf63ded7acfa9861d214d63079c6fc..b6c91aae2e04948f0afbd8466c50084567aefad8 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 @@ -86,6 +86,7 @@ HWTEST_F(DCameraPipelineSourceTest, dcamera_pipeline_source_test_001, TestSize.L TEST_HEIGTH2); int32_t rc = testSourcePipeline_->CreateDataProcessPipeline(PipelineType::VIDEO, srcParams, destParams, listener); EXPECT_EQ(rc, DCAMERA_OK); + usleep(SLEEP_TIME); } /** @@ -174,6 +175,7 @@ HWTEST_F(DCameraPipelineSourceTest, dcamera_pipeline_source_test_004, TestSize.L std::vector> buffers; rc = testSourcePipeline_->ProcessData(buffers); EXPECT_EQ(rc, DCAMERA_BAD_VALUE); + usleep(SLEEP_TIME); } /** diff --git a/services/data_process/test/unittest/common/pipeline_node/BUILD.gn b/services/data_process/test/unittest/common/pipeline_node/BUILD.gn index 91053f6f2c3cf1be814d9a365d1d2628f6cc80d0..3b2e1336d870f118602f1ea78763ae5aefad922a 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", ] @@ -69,6 +69,7 @@ ohos_unittest("DCameraDataProcessPipelineNodeTest") { "av_codec:av_codec_client", "c_utils:utils", "distributed_hardware_fwk:distributedhardwareutils", + "drivers_interface_display:libdisplay_composer_hdi_impl_1.1", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "ffmpeg:libohosffmpeg", diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_frame_trigger_event_test.cpp b/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp similarity index 40% rename from services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_frame_trigger_event_test.cpp rename to services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp index 4e0453bad1bec1636b8f64f2645b1322cda761fb..04588486250af94d9c7801b0d1bb9a397e9b7b51 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/eventbus/dcamera_frame_trigger_event_test.cpp +++ b/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,59 +15,56 @@ #include -#include "dcamera_frame_trigger_event.h" -#include "distributed_hardware_log.h" +#include "abstract_data_process.h" +#include "distributed_camera_errno.h" +#include "encode_data_process.h" using namespace testing::ext; namespace OHOS { namespace DistributedHardware { -class DCameraFrameTriggerEventTest : public testing::Test { +class AbstractDataProcessTest : public testing::Test { public: static void SetUpTestCase(void); static void TearDownTestCase(void); void SetUp(); void TearDown(); - std::string TEST_PARAM = "testing_param"; - std::shared_ptr testsender_ = nullptr; - std::shared_ptr testDCameraFrameTriggerEvent_ = nullptr; + std::shared_ptr testAbstractDataProcess_; }; -void DCameraFrameTriggerEventTest::SetUpTestCase(void) +void AbstractDataProcessTest::SetUpTestCase(void) { - DHLOGI("DCameraFrameTriggerEventTest SetUpTestCase"); } -void DCameraFrameTriggerEventTest::TearDownTestCase(void) +void AbstractDataProcessTest::TearDownTestCase(void) { - DHLOGI("DCameraFrameTriggerEventTest TearDownTestCase"); } -void DCameraFrameTriggerEventTest::SetUp(void) +void AbstractDataProcessTest::SetUp(void) { - DHLOGI("DCameraFrameTriggerEventTest SetUp"); - testsender_ = std::make_shared(); - testDCameraFrameTriggerEvent_ = std::make_shared(*testsender_, TEST_PARAM); + std::shared_ptr sinkPipeline = std::make_shared(); + testAbstractDataProcess_ = std::make_shared(sinkPipeline); } -void DCameraFrameTriggerEventTest::TearDown(void) +void AbstractDataProcessTest::TearDown(void) { - DHLOGI("DCameraFrameTriggerEventTest SetUp"); - testsender_ = nullptr; - testDCameraFrameTriggerEvent_ = nullptr; + testAbstractDataProcess_ = nullptr; } /** - * @tc.name: dcamera_frame_trigger_event_test_001 - * @tc.desc: Verify DCameraFrameTriggerEvent init param correct + * @tc.name: abstract_data_process_test_001 + * @tc.desc: Verify SetNextNode. * @tc.type: FUNC * @tc.require: Issue Number */ -HWTEST_F(DCameraFrameTriggerEventTest, dcamera_frame_trigger_event_test_001, TestSize.Level1) +HWTEST_F(AbstractDataProcessTest, abstract_data_process_test_001, TestSize.Level1) { - std::string param = testDCameraFrameTriggerEvent_->GetParam(); - EXPECT_EQ(param, TEST_PARAM); + EXPECT_EQ(false, testAbstractDataProcess_ == nullptr); + + std::shared_ptr nextDataProcess = nullptr; + int32_t ret = testAbstractDataProcess_->SetNextNode(nextDataProcess); + EXPECT_EQ(ret, DCAMERA_BAD_VALUE); } } // namespace DistributedHardware } // namespace OHOS diff --git a/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp b/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp index 934598831a5b34da243da2b924d51a48f9cd546b..e5f0fb2e93d76b00d2724d451e887427967cdc3d 100644 --- a/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp +++ b/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp @@ -357,7 +357,7 @@ HWTEST_F(EncodeDataProcessTest, encode_data_process_test_011, TestSize.Level1) EXPECT_EQ(false, testEncodeDataProcess_ == nullptr); VideoConfigParams srcParams(VideoCodecType::NO_CODEC, - Videoformat::NV21, + Videoformat::YUVI420, DCAMERA_PRODUCER_FPS_DEFAULT, TEST_WIDTH, TEST_HEIGTH); diff --git a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_post_authorization_event.h b/services/data_process/test/unittest/common/pipeline_node/property_carrier_test.cpp similarity index 38% rename from services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_post_authorization_event.h rename to services/data_process/test/unittest/common/pipeline_node/property_carrier_test.cpp index 86dfc3da8bffdc0d340b859f07bbc27df2d91f74..4c8b2b675e7e71fda9cbe16cb6309bf07fb93758 100644 --- a/services/cameraservice/sinkservice/include/distributedcameramgr/eventbus/dcamera_post_authorization_event.h +++ b/services/data_process/test/unittest/common/pipeline_node/property_carrier_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,26 +13,56 @@ * limitations under the License. */ -#ifndef OHOS_DCAMERA_POST_AUTHORIZATION_EVENT_H -#define OHOS_DCAMERA_POST_AUTHORIZATION_EVENT_H +#include -#include "eventbus/event.h" +#include "property_carrier.h" +#include "distributed_camera_errno.h" -#include "dcamera_capture_info_cmd.h" +using namespace testing::ext; namespace OHOS { namespace DistributedHardware { -class DCameraPostAuthorizationEvent : public Event { -TYPEINDENT(DCameraPostAuthorizationEvent); +class PropertyCarrierTest : public testing::Test { public: - explicit DCameraPostAuthorizationEvent(EventSender& sender); - DCameraPostAuthorizationEvent(EventSender& sender, std::vector>& param); - ~DCameraPostAuthorizationEvent() = default; - std::vector> GetParam(); + static void SetUpTestCase(void); + static void TearDownTestCase(void); + void SetUp(); + void TearDown(); -private: - std::vector> param_; + std::shared_ptr testPropertyCarrier_; }; + +void PropertyCarrierTest::SetUpTestCase(void) +{ +} + +void PropertyCarrierTest::TearDownTestCase(void) +{ +} + +void PropertyCarrierTest::SetUp(void) +{ + testPropertyCarrier_ = std::make_shared(); +} + +void PropertyCarrierTest::TearDown(void) +{ + testPropertyCarrier_ = nullptr; +} + +/** + * @tc.name: property_carrier_test_001 + * @tc.desc: Verify CarrySurfaceProperty. + * @tc.type: FUNC + * @tc.require: Issue Number + */ +HWTEST_F(PropertyCarrierTest, property_carrier_test_001, TestSize.Level1) +{ + EXPECT_EQ(false, testPropertyCarrier_ == nullptr); + + sptr surface = nullptr; + int32_t ret = testPropertyCarrier_->CarrySurfaceProperty(surface); + EXPECT_EQ(ret, DCAMERA_BAD_VALUE); +} } // namespace DistributedHardware } // namespace OHOS -#endif // OHOS_DCAMERA_POST_AUTHORIZATION_EVENT_H \ No newline at end of file