diff --git a/common/BUILD.gn b/common/BUILD.gn index 7d320a2e8b53bcf8287da73f52930f3613548e3f..4384003c501ea4d4e891bce7a20579dbd09e63cc 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -17,12 +17,8 @@ import( ohos_shared_library("distributed_camera_utils") { include_dirs = [ - "//utils/native/base/include", + "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include/", - "${fwk_utils_path}/include", - "${fwk_utils_path}/include/log", ] include_dirs += [ @@ -35,22 +31,19 @@ ohos_shared_library("distributed_camera_utils") { "-Wall", ] - if ("${product_name}" == "m40") { + if (!distributed_camera_common) { cflags += [ "-DPRODUCT_M40" ] } sources = [ + "src/utils/anonymous_string.cpp", "src/utils/data_buffer.cpp", "src/utils/dcamera_buffer_handle.cpp", "src/utils/dcamera_hisysevent_adapter.cpp", "src/utils/dcamera_hitrace_adapter.cpp", "src/utils/dcamera_sa_process_state.cpp", "src/utils/dcamera_utils_tools.cpp", - ] - - deps = [ - "${fwk_utils_path}:distributedhardwareutils", - "//utils/native/base:utils", + "src/utils/dh_log.cpp", ] defines = [ @@ -60,6 +53,7 @@ ohos_shared_library("distributed_camera_utils") { ] external_deps = [ + "c_utils:utils", "dsoftbus:softbus_client", "graphic_chipsetsdk:buffer_handle", "hisysevent_native:libhisysevent", diff --git a/common/include/utils/anonymous_string.h b/common/include/utils/anonymous_string.h new file mode 100644 index 0000000000000000000000000000000000000000..db4441ac18a25659132e5d05907836e38fb4945e --- /dev/null +++ b/common/include/utils/anonymous_string.h @@ -0,0 +1,28 @@ +/* + * 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. + */ + +#ifndef OHOS_DCAMERA_ANONYMOUS_STRING_H +#define OHOS_DCAMERA_ANONYMOUS_STRING_H + +#include + +namespace OHOS { +namespace DistributedHardware { +std::string GetRandomID(); +std::string GetAnonyString(const std::string &value); +std::string GetAnonyInt32(const int32_t value); +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DCAMERA_ANONYMOUS_STRING_H diff --git a/common/include/utils/dh_log.h b/common/include/utils/dh_log.h new file mode 100644 index 0000000000000000000000000000000000000000..ef907c19a718c20007dfc970fb0e7a77162e23fd --- /dev/null +++ b/common/include/utils/dh_log.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_DCAMERA_LOG_H +#define OHOS_DCAMERA_LOG_H + +namespace OHOS { +namespace DistributedHardware { +typedef enum { + DH_LOG_DEBUG, + DH_LOG_INFO, + DH_LOG_WARN, + DH_LOG_ERROR, +} DHLogLevel; + +const std::string DC_LOG_TITLE_TAG = "DCAMERA"; +constexpr int32_t LOG_MAX_LEN = 4096; + +void DHLog(DHLogLevel logLevel, const char *fmt, ...); + +#define ULOGD(fmt, ...) DHLog(DH_LOG_DEBUG, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) + +#define ULOGI(fmt, ...) DHLog(DH_LOG_INFO, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) + +#define ULOGW(fmt, ...) DHLog(DH_LOG_WARN, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) + +#define ULOGE(fmt, ...) DHLog(DH_LOG_ERROR, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DCAMERA_LOG_H diff --git a/common/include/utils/distributed_hardware_log.h b/common/include/utils/distributed_hardware_log.h new file mode 100644 index 0000000000000000000000000000000000000000..318f33c243d60d842c5012ee119611da23b4fcfe --- /dev/null +++ b/common/include/utils/distributed_hardware_log.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_DCAMERA_LOG_H +#define OHOS_DCAMERA_LOG_H + +#include + +#include "dh_log.h" + +namespace OHOS { +namespace DistributedHardware { +#define DHLOGD(fmt, ...) DHLog(DH_LOG_DEBUG, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) + +#define DHLOGI(fmt, ...) DHLog(DH_LOG_INFO, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) + +#define DHLOGW(fmt, ...) DHLog(DH_LOG_WARN, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) + +#define DHLOGE(fmt, ...) DHLog(DH_LOG_ERROR, \ + (std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__) +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DCAMERA_LOG_H diff --git a/common/src/utils/anonymous_string.cpp b/common/src/utils/anonymous_string.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c435970ad24f63e63f8a28a84dd265dfa71a48d0 --- /dev/null +++ b/common/src/utils/anonymous_string.cpp @@ -0,0 +1,102 @@ +/* + * 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 "anonymous_string.h" + +#include +#include +#include +#include +#include + +#include "securec.h" + +namespace OHOS { +namespace DistributedHardware { +constexpr int32_t WORD_WIDTH_8 = 8; +constexpr int32_t WORD_WIDTH_4 = 4; + +std::string GetRandomID() +{ + static std::random_device rd; + static std::uniform_int_distribution dist(0ULL, 0xFFFFFFFFFFFFFFFFULL); + uint64_t ab = dist(rd); + uint64_t cd = dist(rd); + uint32_t a, b, c, d; + std::stringstream ss; + ab = (ab & 0xFFFFFFFFFFFF0FFFULL) | 0x0000000000004000ULL; + cd = (cd & 0x3FFFFFFFFFFFFFFFULL) | 0x8000000000000000ULL; + a = (ab >> 32U); + b = (ab & 0xFFFFFFFFU); + c = (cd >> 32U); + d = (cd & 0xFFFFFFFFU); + ss << std::hex << std::nouppercase << std::setfill('0'); + ss << std::setw(WORD_WIDTH_8) << (a); + ss << std::setw(WORD_WIDTH_4) << (b >> 16U); + ss << std::setw(WORD_WIDTH_4) << (b & 0xFFFFU); + ss << std::setw(WORD_WIDTH_4) << (c >> 16U); + ss << std::setw(WORD_WIDTH_4) << (c & 0xFFFFU); + ss << std::setw(WORD_WIDTH_8) << d; + + return ss.str(); +} + +std::string GetAnonyString(const std::string &value) +{ + constexpr size_t INT32_SHORT_ID_LENGTH = 20; + constexpr size_t INT32_PLAINTEXT_LENGTH = 4; + constexpr size_t INT32_MIN_ID_LENGTH = 3; + std::string res; + std::string tmpStr("******"); + size_t strLen = value.length(); + if (strLen < INT32_MIN_ID_LENGTH) { + return tmpStr; + } + + if (strLen <= INT32_SHORT_ID_LENGTH) { + res += value[0]; + res += tmpStr; + res += value[strLen - 1]; + } else { + res.append(value, 0, INT32_PLAINTEXT_LENGTH); + res += tmpStr; + res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); + } + + return res; +} + +std::string GetAnonyInt32(const int32_t value) +{ + constexpr int32_t INT32_STRING_LENGTH = 40; + char tempBuffer[INT32_STRING_LENGTH] = ""; + int32_t secRet = sprintf_s(tempBuffer, INT32_STRING_LENGTH, "%d", value); + if (secRet <= 0) { + std::string nullString(""); + return nullString; + } + size_t length = strlen(tempBuffer); + for (size_t i = 1; i <= length - 1; i++) { + tempBuffer[i] = '*'; + } + if (length == 0x01) { + tempBuffer[0] = '*'; + } + + std::string tempString(tempBuffer); + return tempString; +} +} // namespace DistributedHardware +} // namespace OHOS diff --git a/common/src/utils/dh_log.cpp b/common/src/utils/dh_log.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5750e52842c7b37c3bd5366edcef9635f72a0b6d --- /dev/null +++ b/common/src/utils/dh_log.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "dh_log.h" + +#include "securec.h" + +#include "distributed_camera_constants.h" + +#ifdef HI_LOG_ENABLE +#include "hilog/log.h" +#else +#include +#endif + +namespace OHOS { +namespace DistributedHardware { +static void DHLogOut(DHLogLevel logLevel, const char *logBuf) +{ +#ifdef HI_LOG_ENABLE + LogLevel hiLogLevel = LOG_INFO; + switch (logLevel) { + case DH_LOG_DEBUG: + hiLogLevel = LOG_DEBUG; + break; + case DH_LOG_INFO: + hiLogLevel = LOG_INFO; + break; + case DH_LOG_WARN: + hiLogLevel = LOG_WARN; + break; + case DH_LOG_ERROR: + hiLogLevel = LOG_ERROR; + break; + default: + break; + } + (void)HiLogPrint(LOG_CORE, hiLogLevel, LOG_DOMAIN, DC_LOG_TITLE_TAG.c_str(), "%{public}s", logBuf); +#else + switch (logLevel) { + case DH_LOG_DEBUG: + printf("[D]%s\n", logBuf); + break; + case DH_LOG_INFO: + printf("[I]%s\n", logBuf); + break; + case DH_LOG_WARN: + printf("[W]%s\n", logBuf); + break; + case DH_LOG_ERROR: + printf("[E]%s\n", logBuf); + break; + default: + break; + } +#endif +} + +void DHLog(DHLogLevel logLevel, const char *fmt, ...) +{ + char logBuf[LOG_MAX_LEN] = {0}; + va_list arg; + + (void)memset_s(&arg, sizeof(va_list), 0, sizeof(va_list)); + va_start(arg, fmt); + int32_t ret = vsprintf_s(logBuf, sizeof(logBuf), fmt, arg); + va_end(arg); + if (ret < 0) { + DHLogOut(logLevel, "DH log length error."); + return; + } + DHLogOut(logLevel, logBuf); +} +} // namespace DistributedHardware +} // namespace OHOS diff --git a/distributedcamera.gni b/distributedcamera.gni index b49d45a36b1ffba88d60e645262014ad08795ded..a2f9d59d996ba91562a0cd7861f244d3ea8f4013 100644 --- a/distributedcamera.gni +++ b/distributedcamera.gni @@ -34,8 +34,6 @@ fwk_utils_path = "${distributedhardwarefwk_path}/utils" fwk_common_path = "${distributedhardwarefwk_path}/common" -fwk_services_path = "${distributedhardwarefwk_path}/services" - build_flags = [ "-Werror" ] declare_args() { diff --git a/interfaces/inner_kits/native_cpp/camera_sink/BUILD.gn b/interfaces/inner_kits/native_cpp/camera_sink/BUILD.gn index 08504b1b7e4b829978e98fbf094df006c46e6d65..127bd5cf0caf21166c2b3d6fec05d31ea873995e 100644 --- a/interfaces/inner_kits/native_cpp/camera_sink/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/camera_sink/BUILD.gn @@ -17,11 +17,8 @@ import( ohos_shared_library("distributed_camera_sink_sdk") { include_dirs = [ - "//utils/native/base/include", + "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", - "${fwk_common_path}/log/include", "${fwk_common_path}/utils/include", ] @@ -38,11 +35,7 @@ ohos_shared_library("distributed_camera_sink_sdk") { "src/distributed_camera_sink_proxy.cpp", ] - deps = [ - "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", - "//utils/native/base:utils", - ] + deps = [ "${common_path}:distributed_camera_utils" ] defines = [ "HI_LOG_ENABLE", @@ -51,6 +44,7 @@ ohos_shared_library("distributed_camera_sink_sdk") { ] external_deps = [ + "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr_standard:samgr_proxy", diff --git a/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn b/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn index 756242d97d1765544c214514984528bc7bf52740..1d57f302db2a5d23290ad13465ffd0ac0e92ba75 100644 --- a/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn @@ -17,11 +17,8 @@ import( ohos_shared_library("distributed_camera_source_sdk") { include_dirs = [ - "//utils/native/base/include", + "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", - "${fwk_common_path}/log/include", "${fwk_common_path}/utils/include", ] @@ -41,11 +38,7 @@ ohos_shared_library("distributed_camera_source_sdk") { "src/distributed_camera_source_proxy.cpp", ] - deps = [ - "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", - "//utils/native/base:utils", - ] + deps = [ "${common_path}:distributed_camera_utils" ] defines = [ "HI_LOG_ENABLE", @@ -54,6 +47,7 @@ ohos_shared_library("distributed_camera_source_sdk") { ] external_deps = [ + "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr_standard:samgr_proxy", diff --git a/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler.cpp b/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler.cpp index 14cc544b8b8f1c7eae0938f30af1acf5ade3b6cc..0cbb17a8dbe61c7d0e435278ec8386c9a28beb84 100644 --- a/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler.cpp +++ b/interfaces/inner_kits/native_cpp/camera_source/src/dcamera_source_handler.cpp @@ -20,7 +20,6 @@ #include "dcamera_source_callback.h" #include "dcamera_source_handler_ipc.h" #include "dcamera_source_load_callback.h" -#include "dh_utils_tool.h" #include "distributed_camera_constants.h" #include "distributed_camera_errno.h" #include "distributed_hardware_log.h" diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/onsinklocaldmsdied_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/onsinklocaldmsdied_fuzzer/BUILD.gn index 02e9a40479b8e8254688563db52d3511cbda8e71..5780cf3299b8b2d018fd5db2b73092b9f2e4e0f8 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/onsinklocaldmsdied_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/onsinklocaldmsdied_fuzzer/BUILD.gn @@ -27,9 +27,7 @@ ohos_fuzztest("OnSinkLocalDmsDiedFuzzTest") { include_dirs = [ "//utils/native/base/include", "//utils/system/safwk/native/include", - "${fwk_utils_path}/include/log", "${fwk_utils_path}/include", - "${fwk_common_path}/log/include", "${fwk_common_path}/utils/include", ] @@ -50,7 +48,7 @@ ohos_fuzztest("OnSinkLocalDmsDiedFuzzTest") { sources = [ "onsinklocaldmsdied_fuzzer.cpp" ] deps = [ - "${fwk_utils_path}:distributedhardwareutils", + "${common_path}:distributed_camera_utils", "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/onsourcelocaldmsdied_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/onsourcelocaldmsdied_fuzzer/BUILD.gn index 6d9d072aac82985872c1265aab5cb9e167d5dcf2..c432e71b0427d87f92b2d5b0080dc2fcf38769cd 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/onsourcelocaldmsdied_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/onsourcelocaldmsdied_fuzzer/BUILD.gn @@ -36,7 +36,6 @@ ohos_fuzztest("OnSourceLocalDmsDiedFuzzTest") { "${common_path}/include/constants", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_services_path}/distributedhardwarefwkserviceimpl/include/componentmanager", ] cflags = [ @@ -48,11 +47,7 @@ ohos_fuzztest("OnSourceLocalDmsDiedFuzzTest") { sources = [ "onsourcelocaldmsdied_fuzzer.cpp" ] - deps = [ - "${fwk_utils_path}:distributedhardwareutils", - "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", - "//utils/native/base:utils", - ] + deps = [ "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk" ] defines = [ "HI_LOG_ENABLE", @@ -61,11 +56,13 @@ ohos_fuzztest("OnSourceLocalDmsDiedFuzzTest") { ] external_deps = [ + "c_utils:utils", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", - "samgr_standard:samgr_proxy", + "samgr:samgr_proxy", + ] } @@ -74,4 +71,4 @@ group("fuzztest") { testonly = true deps = [ ":OnSourceLocalDmsDiedFuzzTest" ] } -############################################################################### +############################################################################### \ No newline at end of file diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn index c98aaa462860c596c4effb583d7526d94bfc28d8..80ce8ddc89b9eb0a7516123264478c2fa632aa7c 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilityfail_fuzzer/BUILD.gn @@ -44,12 +44,8 @@ ohos_fuzztest("SinkOnLoadSystemAbilityFailFuzzTest") { sources = [ "sinkonloadsystemabilityfail_fuzzer.cpp" ] - deps = [ - "${fwk_utils_path}:distributedhardwareutils", - "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", - "//utils/native/base:utils", - ] - + deps = + [ "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk" ] defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"SinkOnLoadSystemAbilityFailFuzzTest\"", @@ -57,6 +53,7 @@ ohos_fuzztest("SinkOnLoadSystemAbilityFailFuzzTest") { ] external_deps = [ + "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn index 54b16ed78f00a63d323e14699bd184639e8fba61..e38ea26a47884ac817d2b32ea2cb82d79a84f544 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sinkonloadsystemabilitysuccess_fuzzer/BUILD.gn @@ -45,7 +45,6 @@ ohos_fuzztest("SinkOnLoadSystemAbilitySuccessFuzzTest") { sources = [ "sinkonloadsystemabilitysuccess_fuzzer.cpp" ] deps = [ - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn index 28b35b098e58308e0bcb34ef7eec08288c661150..0888c65e9f254b5d383626adfadb1db1ef87d023 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerconfigdistributedhardware_fuzzer/BUILD.gn @@ -25,7 +25,6 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { include_dirs = [ "//utils/system/safwk/native/include", - "${fwk_common_path}/utils/include", ] include_dirs += [ @@ -34,7 +33,6 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { "${common_path}/include/constants", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_services_path}/distributedhardwarefwkserviceimpl/include/componentmanager", ] cflags = [ @@ -47,8 +45,6 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { sources = [ "sourcehandlerconfigdistributedhardware_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkserviceimpl/:distributedhardwarefwksvr_impl", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn index 1aced34de342e59c148fe54b60937fb1c45a7429..0de0bcc75860300ad06d843baf82d099f99f2c49 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerinitsource_fuzzer/BUILD.gn @@ -25,7 +25,6 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { include_dirs = [ "//utils/system/safwk/native/include", - "${fwk_common_path}/utils/include", ] include_dirs += [ @@ -34,7 +33,6 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { "${common_path}/include/constants", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_services_path}/distributedhardwarefwkserviceimpl/include/componentmanager", ] cflags = [ @@ -47,8 +45,6 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { sources = [ "sourcehandlerinitsource_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkserviceimpl/:distributedhardwarefwksvr_impl", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn index b100dc5e7903d2cfff56ef2f0495ebbc9d867f77..33d789430b63fc4efc8df5ea13e48b3901406821 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerregisterdistributedhardware_fuzzer/BUILD.gn @@ -35,7 +35,7 @@ ohos_fuzztest("SourceHandlerRegisterDistributedHardwareFuzzTest") { "${common_path}/include/constants", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_services_path}/distributedhardwarefwkserviceimpl/include/componentmanager", + "${innerkits_path}/native_cpp/test/include", ] cflags = [ @@ -48,8 +48,6 @@ ohos_fuzztest("SourceHandlerRegisterDistributedHardwareFuzzTest") { sources = [ "sourcehandlerregisterdistributedhardware_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkserviceimpl/:distributedhardwarefwksvr_impl", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn index 2b106da69c1776892447e1b23cf2252782e9e45e..1a254aec3d84f2cc5e2c963ab3647ef882e8b0fa 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sourcehandlerunregisterdistributedhardware_fuzzer/BUILD.gn @@ -35,7 +35,7 @@ ohos_fuzztest("SourceHandlerUnregisterDistributedHardwareFuzzTest") { "${common_path}/include/constants", "${innerkits_path}/native_cpp/camera_source/include", "${innerkits_path}/native_cpp/camera_source/include/callback", - "${fwk_services_path}/distributedhardwarefwkserviceimpl/include/componentmanager", + "${innerkits_path}/native_cpp/test/include", ] cflags = [ @@ -48,8 +48,6 @@ ohos_fuzztest("SourceHandlerUnregisterDistributedHardwareFuzzTest") { sources = [ "sourcehandlerunregisterdistributedhardware_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkserviceimpl/:distributedhardwarefwksvr_impl", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn index 5f68d8a9dd12867084e46aeb4728f5ec390061c6..39dda0ce646f8a1a97aa3c959615a17e7bf1e9b8 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilityfail_fuzzer/BUILD.gn @@ -46,7 +46,6 @@ ohos_fuzztest("SourceOnLoadSystemAbilityFailFuzzTest") { sources = [ "sourceonloadsystemabilityfail_fuzzer.cpp" ] deps = [ - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn index 3312c6ec3c2c433439d60b38b645bcafed4f9200..112a35d0d084ac4ddf668a1b5c22236610a8100a 100644 --- a/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/fuzztest/sourceonloadsystemabilitysuccess_fuzzer/BUILD.gn @@ -46,7 +46,6 @@ ohos_fuzztest("SourceOnLoadSystemAbilitySuccessFuzzTest") { sources = [ "sourceonloadsystemabilitysuccess_fuzzer.cpp" ] deps = [ - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", "//utils/native/base:utils", ] diff --git a/interfaces/inner_kits/native_cpp/test/include/mock_component_disable.h b/interfaces/inner_kits/native_cpp/test/include/mock_component_disable.h new file mode 100644 index 0000000000000000000000000000000000000000..d76d3fe75b28698d853fc3ea7a5e293cd13ee6bd --- /dev/null +++ b/interfaces/inner_kits/native_cpp/test/include/mock_component_disable.h @@ -0,0 +1,48 @@ +/* + * 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. + */ + +#ifndef OHOS_DCAMERA_MOCK_COMPONENT_DISABLE_H +#define OHOS_DCAMERA_MOCK_COMPONENT_DISABLE_H + +#include "distributed_camera_errno.h" +#include "idistributed_hardware_source.h" + +namespace OHOS { +namespace DistributedHardware { +class MockComponentDisable : public std::enable_shared_from_this, public UnregisterCallback { +public: + MockComponentDisable() + { + } + + virtual ~MockComponentDisable() + { + } + + int32_t Disable(const std::string &networkId, const std::string &dhId, + IDistributedHardwareSource *handler) + { + return DCAMERA_OK; + } + + int32_t OnUnregisterResult(const std::string &networkId, const std::string &dhId, int32_t status, + const std::string &data) override + { + return DCAMERA_OK; + } +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/interfaces/inner_kits/native_cpp/test/include/mock_component_enable.h b/interfaces/inner_kits/native_cpp/test/include/mock_component_enable.h new file mode 100644 index 0000000000000000000000000000000000000000..c6b36623b4c90b0b9db384979efff6939ceefb5a --- /dev/null +++ b/interfaces/inner_kits/native_cpp/test/include/mock_component_enable.h @@ -0,0 +1,48 @@ +/* + * 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. + */ + +#ifndef OHOS_DCAMERA_MOCK_COMPONENT_ENABLE_H +#define OHOS_DCAMERA_MOCK_COMPONENT_ENABLE_H + +#include "distributed_camera_errno.h" +#include "idistributed_hardware_source.h" + +namespace OHOS { +namespace DistributedHardware { +class MockComponentEnable : public std::enable_shared_from_this, public RegisterCallback { +public: + explicit MockComponentEnable() + { + } + + virtual ~MockComponentEnable() + { + } + + int32_t Enable(const std::string &uuid, const std::string &dhId, const EnableParam ¶m, + IDistributedHardwareSource *handler) + { + return DCAMERA_OK; + } + + int32_t OnRegisterResult(const std::string &uuid, const std::string &dhId, int32_t status, + const std::string &data) override + { + return DCAMERA_OK; + } +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/services/cameraservice/cameraoperator/client/BUILD.gn b/services/cameraservice/cameraoperator/client/BUILD.gn index 879511f68f85de81a39deeb1afc23685c6d28602..bb0d57b01009cc820617dcd655f7c4f906283421 100644 --- a/services/cameraservice/cameraoperator/client/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/BUILD.gn @@ -32,10 +32,6 @@ ohos_shared_library("distributed_camera_client") { "${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}/log/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", ] include_dirs += [ @@ -74,7 +70,6 @@ ohos_shared_library("distributed_camera_client") { deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${graphicstandard_path}:libsurface", "//drivers/peripheral/camera/interfaces/metadata:metadata", "//third_party/jsoncpp:jsoncpp", 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 08c9981d0905f99c76b0209e18117b2d459a1f3a..69316e7f2addbc1c3c06e683d3ab13dc8af92a68 100644 --- a/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn @@ -22,7 +22,7 @@ config("module_private_config") { include_dirs = [ "//drivers/peripheral/camera/interfaces/metadata/include", "//third_party/jsoncpp/include", - "//utils/native/base/include", + "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", "${graphicstandard_path}/frameworks/surface/include", "${camerastandard_path}/interfaces/inner_api/native/camera/include", @@ -33,9 +33,7 @@ config("module_private_config") { "${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}/log/include", "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", "${fwk_utils_path}/include", ] @@ -60,7 +58,6 @@ ohos_unittest("DCameraClientTest") { deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${graphicstandard_path}:libsurface", "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", @@ -68,10 +65,10 @@ ohos_unittest("DCameraClientTest") { "//drivers/peripheral/camera/interfaces/metadata:metadata", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", - "//utils/native/base:utils", ] external_deps = [ + "c_utils:utils", "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.0", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", diff --git a/services/cameraservice/cameraoperator/handler/BUILD.gn b/services/cameraservice/cameraoperator/handler/BUILD.gn index 6a61f09528f3d131b403877c353934a9dde7f86d..8576724d5a8719b33a08cdf8567b2b19aedab1a7 100644 --- a/services/cameraservice/cameraoperator/handler/BUILD.gn +++ b/services/cameraservice/cameraoperator/handler/BUILD.gn @@ -32,9 +32,7 @@ ohos_shared_library("distributed_camera_handler") { "${camerastandard_path}/services/camera_service/binder/server/include", "${camerastandard_path}/services/camera_service/include", "${mediastandard_path}/interfaces/innerkits/native/media/include", - "${fwk_common_path}/log/include", "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", "${fwk_utils_path}/include", ] @@ -56,7 +54,6 @@ ohos_shared_library("distributed_camera_handler") { deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${graphicstandard_path}:libsurface", "//drivers/peripheral/camera/interfaces/metadata:metadata", "//third_party/jsoncpp:jsoncpp", 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 f459f0943d0794270eda20123d4fbf31273f1095..6b841ccbced45fb8163b207ce7af826a34392f16 100644 --- a/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn +++ b/services/cameraservice/cameraoperator/handler/test/unittest/common/dcamerahandler/BUILD.gn @@ -32,9 +32,7 @@ config("module_private_config") { "${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}/log/include", "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", "${fwk_utils_path}/include", ] @@ -57,7 +55,6 @@ ohos_unittest("DCameraHandlerTest") { deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${graphicstandard_path}:libsurface", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", "//drivers/peripheral/camera/interfaces/metadata:metadata", diff --git a/services/cameraservice/sinkservice/BUILD.gn b/services/cameraservice/sinkservice/BUILD.gn index 6780bc1a88896cc22d072b0b530a87a73baa5767..17ece61336bd8b9a382859910ac3dad026c5d94a 100644 --- a/services/cameraservice/sinkservice/BUILD.gn +++ b/services/cameraservice/sinkservice/BUILD.gn @@ -30,11 +30,8 @@ ohos_shared_library("distributed_camera_sink") { "${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}/log/include", "${fwk_common_path}/utils/include", "${fwk_utils_path}/include/eventbus", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", "//third_party/jsoncpp/include", ] @@ -99,7 +96,6 @@ ohos_shared_library("distributed_camera_sink") { deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${graphicstandard_path}:libsurface", "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn index 8c30a5d9d7844a22b9be0bc6601b06e4a3d50b76..fe4ee25410df99a65dd390c64c0aa1d3fdd80ecf 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/BUILD.gn @@ -33,10 +33,6 @@ config("module_private_config") { "${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}/log/include", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", ] include_dirs += [ @@ -58,7 +54,6 @@ ohos_unittest("DistributedCameraSinkServiceTest") { deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${graphicstandard_path}:libsurface", "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn index 06587a6ccc9954daae0b19c5be5b58a50c479bd9..19de8ff3465b8b0cafb7a345098eed717a05d866 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -48,11 +48,6 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_source/include/callback", "${fwk_utils_path}/include/eventbus", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", - "${fwk_common_path}/utils/include", - "${fwk_common_path}/log/include", - "//drivers/peripheral/base", "//drivers/peripheral/camera/interfaces/metadata/include", ] @@ -74,7 +69,6 @@ ohos_unittest("DCameraSinkMgrTest") { deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${graphicstandard_path}:libsurface", "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", "${services_path}/cameraservice/sinkservice:distributed_camera_sink", diff --git a/services/cameraservice/sourceservice/BUILD.gn b/services/cameraservice/sourceservice/BUILD.gn index 1929f4e8edea4b04e72cb5d73fe86a75ff20d616..de818a1a2e0b940e322b9ceaad452f438e1804f4 100644 --- a/services/cameraservice/sourceservice/BUILD.gn +++ b/services/cameraservice/sourceservice/BUILD.gn @@ -20,11 +20,8 @@ ohos_shared_library("distributed_camera_source") { include_dirs = [ "//utils/native/base/include", "//utils/system/safwk/native/include", - "${fwk_common_path}/log/include", "${fwk_common_path}/utils/include", "${fwk_utils_path}/include/eventbus", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", "//third_party/jsoncpp/include", "//drivers/peripheral/base", ] @@ -87,7 +84,6 @@ ohos_shared_library("distributed_camera_source") { deps = [ "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "${services_path}/channel:distributed_camera_channel", "${services_path}/data_process:distributed_camera_data_process", "//third_party/jsoncpp:jsoncpp", diff --git a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn index c9f1e981aa5f407d18f07bcb83ea9ca9d2f9a703..df8521ff0cfc2bcf670474afcfd5de46c1cd0def 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -41,12 +41,10 @@ config("module_private_config") { "${innerkits_path}/native_cpp/camera_source/include/callback", "${innerkits_path}/native_cpp/camera_sink/include", - "${fwk_utils_path}/include/log", "${fwk_utils_path}/include", "${fwk_utils_path}/include/eventbus", "${fwk_common_path}/utils/include", - "${fwk_common_path}/log/include", - "//utils/native/base/include", + "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", "//third_party/jsoncpp/include", "//drivers/peripheral/base/", @@ -62,7 +60,6 @@ ohos_unittest("DCameraSourceMgrTest") { 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", diff --git a/services/channel/BUILD.gn b/services/channel/BUILD.gn index 75cab6f2d604420d519801815528e4e8e52a4e00..72db816e79f63be5a16037a11f62d48a7cfb0c08 100644 --- a/services/channel/BUILD.gn +++ b/services/channel/BUILD.gn @@ -20,10 +20,7 @@ ohos_shared_library("distributed_camera_channel") { include_dirs = [ "//utils/native/base/include", "//utils/system/safwk/native/include", - "${fwk_common_path}/log/include", "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", - "${fwk_utils_path}/include", ] include_dirs += [ @@ -41,8 +38,6 @@ ohos_shared_library("distributed_camera_channel") { deps = [ "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", - "//utils/native/base:utils", ] defines = [ diff --git a/services/data_process/BUILD.gn b/services/data_process/BUILD.gn index 72e5e377d5af72c9746bc1171a4c89efb74b1c65..4f0b5d7efd348822a361f762204ffabe45c338e6 100644 --- a/services/data_process/BUILD.gn +++ b/services/data_process/BUILD.gn @@ -25,11 +25,8 @@ ohos_shared_library("distributed_camera_data_process") { "//foundation/graphic/graphic_2d/interfaces/innerkits/surface", "//drivers/peripheral/display/interfaces/include", "//foundation/multimedia/player_framework/interfaces/innerkits/native/media/include", - "${fwk_common_path}/log/include", "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", "${fwk_utils_path}/include/eventbus", - "${fwk_utils_path}/include", ] include_dirs += [ @@ -74,7 +71,6 @@ ohos_shared_library("distributed_camera_data_process") { deps = [ "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", "//foundation/graphic/graphic_2d/frameworks/surface:surface", "//utils/native/base:utils", ]