diff --git a/common/BUILD.gn b/common/BUILD.gn index c71fd76726c5e46486be81036e8232541d69880a..59820f08cd80608673ca1ae02a082ceca3a690bf 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -19,13 +19,6 @@ ohos_shared_library("distributed_camera_utils") { include_dirs = [ "//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 += [ "include/constants", "include/utils", ] @@ -36,20 +29,20 @@ ohos_shared_library("distributed_camera_utils") { ] if (!distributed_camera_common) { - cflags += [ "-DPRODUCT_M40" ] + cflags += [ "-DCAMERA_MMAP_RESERVE" ] } 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", + "src/utils/dh_log.cpp", ] - deps = [ "${fwk_utils_path}:distributedhardwareutils" ] - defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"distributedcamerautils\"", 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..6a8e38014564dce6b3fbf55f023bd9dc6632be1c --- /dev/null +++ b/common/include/utils/dh_log.h @@ -0,0 +1,43 @@ +/* + * 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; + +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..abfdb7c61be88bd235748b2cd04aa691762f95ad --- /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_SA_LOG_H +#define OHOS_DCAMERA_SA_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_SA_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..2c14c4686fbede794cf6a451cca6b36a378187b9 --- /dev/null +++ b/common/src/utils/dh_log.cpp @@ -0,0 +1,92 @@ +/* + * 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 "cstdlib" +#include "string" + +#include "securec.h" + +#ifdef HI_LOG_ENABLE +#include "hilog/log.h" +#else +#include +#endif + +namespace OHOS { +namespace DistributedHardware { + +const std::string DC_LOG_TITLE_TAG = "DCAMERA"; +constexpr int32_t LOG_MAX_LEN = 4096; + +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 be6d7ebcc85dd8dfd9a131433a9d2d4b5a19d5d7..7f6949069ee0c8fa9770b7f27e1a72953f29685a 100644 --- a/interfaces/inner_kits/native_cpp/camera_sink/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/camera_sink/BUILD.gn @@ -19,9 +19,6 @@ ohos_shared_library("distributed_camera_sink_sdk") { include_dirs = [ "//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,10 +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", - ] + deps = [ "${common_path}:distributed_camera_utils" ] defines = [ "HI_LOG_ENABLE", diff --git a/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn b/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn index 85b2a79ff3bfe82cd7148fc60ecaa8e93232d92f..6630f8bc43565e131c78cee1d64f6a6cb3917610 100644 --- a/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/camera_source/BUILD.gn @@ -19,9 +19,6 @@ ohos_shared_library("distributed_camera_source_sdk") { include_dirs = [ "//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,10 +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", - ] + deps = [ "${common_path}:distributed_camera_utils" ] defines = [ "HI_LOG_ENABLE", 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 885138836b80b70814d4438147f209bc2df5dbc5..6b59d5445a1a8ce17e44399a7ead08ddde81d256 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 = [ "//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", ] @@ -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", ] 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 7a8c0cf34f759b24eb5937a695be24b4ed20389a..79e0bdd5e0f1aafa396f70ac8e9dc043c9eece05 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}/distributedhardwarefwkservice/include/componentmanager", ] cflags = [ @@ -49,7 +48,6 @@ ohos_fuzztest("OnSourceLocalDmsDiedFuzzTest") { sources = [ "onsourcelocaldmsdied_fuzzer.cpp" ] deps = [ - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", ] 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 cb1e61972f1e18222aef3ad738f00ed435481be4..994cd12065be5e24744287cedd98724046affc09 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,11 +44,8 @@ ohos_fuzztest("SinkOnLoadSystemAbilityFailFuzzTest") { sources = [ "sinkonloadsystemabilityfail_fuzzer.cpp" ] - deps = [ - "${fwk_utils_path}:distributedhardwareutils", - "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", - ] - + deps = + [ "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk" ] defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"SinkOnLoadSystemAbilityFailFuzzTest\"", 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 6da37ee5f823cb84c918c8458e0805ed0298cfe1..100001f867d74f97089dd17b397d526bcaf0d4df 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 @@ -44,10 +44,8 @@ ohos_fuzztest("SinkOnLoadSystemAbilitySuccessFuzzTest") { sources = [ "sinkonloadsystemabilitysuccess_fuzzer.cpp" ] - deps = [ - "${fwk_utils_path}:distributedhardwareutils", - "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", - ] + deps = + [ "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk" ] defines = [ "HI_LOG_ENABLE", 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 228ef8eae63c96e8e99add3bc651b4bf8607a2e6..2d0465e49b84582725360bfb8444f243f8552ac6 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 @@ -23,10 +23,7 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/fuzztest/sourcehandlerconfigdistributedhardware_fuzzer" - include_dirs = [ - "//utils/system/safwk/native/include", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "//utils/system/safwk/native/include" ] include_dirs += [ "include", @@ -34,7 +31,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}/distributedhardwarefwkservice/include/componentmanager", ] cflags = [ @@ -47,8 +43,6 @@ ohos_fuzztest("SourceHandlerConfigDistributedHardwareFuzzTest") { sources = [ "sourcehandlerconfigdistributedhardware_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkservice/:distributedhardwarefwksvr", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", ] 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 29928996cd5f092ad4a05a67ab2edd6063df8135..97d2d97adf3195589bcdf76ba9a4c3ac342ca008 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 @@ -23,10 +23,7 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { fuzz_config_file = "${innerkits_path}/native_cpp/test/fuzztest/sourcehandlerinitsource_fuzzer" - include_dirs = [ - "//utils/system/safwk/native/include", - "${fwk_common_path}/utils/include", - ] + include_dirs = [ "//utils/system/safwk/native/include" ] include_dirs += [ "include", @@ -34,7 +31,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}/distributedhardwarefwkservice/include/componentmanager", ] cflags = [ @@ -47,8 +43,6 @@ ohos_fuzztest("SourceHandlerInitSourceFuzzTest") { sources = [ "sourcehandlerinitsource_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkservice/:distributedhardwarefwksvr", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", ] 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 536bc35d03db9d1f9aa8f35715d97e91cbabfad5..c062f1c9cd1a2d67607e56f14c202f37c37db8cf 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}/distributedhardwarefwkservice/include/componentmanager", + "${innerkits_path}/native_cpp/test/include", ] cflags = [ @@ -48,8 +48,6 @@ ohos_fuzztest("SourceHandlerRegisterDistributedHardwareFuzzTest") { sources = [ "sourcehandlerregisterdistributedhardware_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkservice/:distributedhardwarefwksvr", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", ] 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 2cc2db93b356b9e5766216f129eb6312bf9facf4..e2bbc33bad26fb58aa019adcaf9df3b010ed37ac 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}/distributedhardwarefwkservice/include/componentmanager", + "${innerkits_path}/native_cpp/test/include", ] cflags = [ @@ -48,8 +48,6 @@ ohos_fuzztest("SourceHandlerUnregisterDistributedHardwareFuzzTest") { sources = [ "sourcehandlerunregisterdistributedhardware_fuzzer.cpp" ] deps = [ - "${fwk_services_path}/distributedhardwarefwkservice/:distributedhardwarefwksvr", - "${fwk_utils_path}:distributedhardwareutils", "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk", ] 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 f9b783fbe2c3bc7e6968609f4dda9bdd73325f4a..203c5ff490ee6228ad75a9c872db69e87f1ef944 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", ] 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 69729e94373f5f9ed968829c910f05df509f3913..4287c5ae368b2fea06e3e8d603199cbefe257e1e 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", ] 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 0a6baa87536679033d549e3cfbc6e3fb5e2f8d6b..15dee24cbb2519586260ea56491fea681c8aa475 100644 --- a/services/cameraservice/cameraoperator/client/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/BUILD.gn @@ -30,10 +30,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 += [ @@ -72,7 +68,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/sample/BUILD.gn b/services/cameraservice/cameraoperator/client/test/sample/BUILD.gn index ca78e3a8be2515aaaf539daa7de3d73d172a7a98..e21b656477d756f862c71643308dd0aa5056f3b5 100644 --- a/services/cameraservice/cameraoperator/client/test/sample/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/test/sample/BUILD.gn @@ -60,7 +60,7 @@ ohos_executable("dcamera_client_demo") { ] if (!distributed_camera_common) { - cflags += [ "-DPRODUCT_M40" ] + cflags += [ "-DCAMERA_YUV" ] } deps = [ 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 17a31ba375668ef4c3f65c8eb23352110d7180ff..dc079ca8f347ae3ca926673f4950db067ae8ce4c 100644 --- a/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/test/unittest/common/cameraoperator/BUILD.gn @@ -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", diff --git a/services/cameraservice/cameraoperator/handler/BUILD.gn b/services/cameraservice/cameraoperator/handler/BUILD.gn index 3d08333ccdafd0e751e6fdf0d36df0746c4dc789..1c68027c06755cd5c9125738a0af055a7c036c9e 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 528b5884da3419d34da696ca5da5736d7ea60c7b..dc98d4bf7e136def479530538bb6951aac98c541 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 5c018a29ff35a560201c4466aa307a1ea25beb22..f84618c2e571f381be4c9713a532af3a5ae5161b 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 d6842ee513e10bacc4dccc8190f4fcc965e16ea5..57c60687728ec3adbd382625c1884afad2cefee5 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 097273838e179b5537ee6c6693cf9cc2763ea468..ff026c6a8dcbe8b57c4a86a3caf1d3dae40ecc6b 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 f6f56cf3861c4a3a10e4f59b89b0062ababc8529..954573986f8588bd911b0c1e3282582d4b5294cf 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 = [ "//commonlibrary/c_utils/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 bd994e782c132f077a478aba934927f665cc7538..74ba9ba9b0a8b865be0dc2d0638edd404cc741c5 100644 --- a/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn +++ b/services/cameraservice/sourceservice/test/unittest/common/distributedcameramgr/BUILD.gn @@ -41,11 +41,9 @@ 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", "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", "//third_party/jsoncpp/include", @@ -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 0bb243a971ceb82aaac51ae69d64aba73a7eb90d..3803131e251259b261a4857f53f3b453b25b8e01 100644 --- a/services/channel/BUILD.gn +++ b/services/channel/BUILD.gn @@ -20,10 +20,7 @@ ohos_shared_library("distributed_camera_channel") { include_dirs = [ "//commonlibrary/c_utils/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 += [ @@ -39,10 +36,7 @@ ohos_shared_library("distributed_camera_channel") { "src/dcamera_softbus_session.cpp", ] - deps = [ - "${common_path}:distributed_camera_utils", - "${fwk_utils_path}:distributedhardwareutils", - ] + deps = [ "${common_path}:distributed_camera_utils" ] defines = [ "HI_LOG_ENABLE", diff --git a/services/data_process/BUILD.gn b/services/data_process/BUILD.gn index d774358c134d9d6a64525d842634896afa8a41d7..eb1816b92bb3a1f046fa646aa774dd2d339a2303 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", ]