From 7c47653590adc26c55d27deb0bdadb2f61c4de3f Mon Sep 17 00:00:00 2001 From: l30054665 Date: Thu, 28 Mar 2024 15:07:31 +0800 Subject: [PATCH] Independent compiler Signed-off-by: l30054665 --- bundle.json | 10 +- .../include/test/whitelistunittest/BUILD.gn | 6 +- common/log/include/distributed_hardware_log.h | 38 ++++++ common/utils/include/constants.h | 81 ++++++++++++ common/utils/include/device_type.h | 74 +++++++++++ .../include/dhardware_ipc_interface_code.h | 41 +++++++ .../include/distributed_hardware_errno.h | 116 ++++++++++++++++++ .../iav_trans_control_center_callback.h | 43 +++++++ common/utils/include/idistributed_hardware.h | 55 +++++++++ .../include/idistributed_hardware_manager.h | 41 +++++++ .../include/idistributed_hardware_sink.h | 55 +++++++++ .../include/idistributed_hardware_source.h | 59 +++++++++ common/utils/include/ihardware_handler.h | 51 ++++++++ common/utils/include/ipublisher_listener.h | 59 +++++++++ common/utils/include/single_instance.h | 51 ++++++++ dfx_utils/BUILD.gn | 4 +- dfx_utils/test/dfxtest/BUILD.gn | 4 +- inputdevicehandler/BUILD.gn | 15 +-- .../test/inputhandlertest/BUILD.gn | 15 +-- interfaces/inner_kits/BUILD.gn | 16 ++- interfaces/inner_kits/test/unittest/BUILD.gn | 13 +- .../BUILD.gn | 6 +- interfaces/ipc/test/clientunittest/BUILD.gn | 12 +- .../BUILD.gn | 6 +- .../dinputsourcecallbackunittest/BUILD.gn | 6 +- interfaces/ipc/test/ipcunittest/BUILD.gn | 12 +- .../unpreparedinputcallbackunittest/BUILD.gn | 6 +- .../unregisterdinputcallbackunittest/BUILD.gn | 6 +- sa_profile/BUILD.gn | 1 - services/sink/inputcollector/BUILD.gn | 15 +-- .../test/sinkcollectorunittest/BUILD.gn | 15 +-- services/sink/sinkmanager/BUILD.gn | 12 +- .../test/sinkmanagerunittest/BUILD.gn | 14 +-- services/sink/transport/BUILD.gn | 12 +- .../transport/test/sinktransunittest/BUILD.gn | 12 +- services/source/inputinject/BUILD.gn | 15 +-- .../test/sourceinjectunittest/BUILD.gn | 8 +- services/source/sourcemanager/BUILD.gn | 6 +- .../test/sourcemanagerunittest/BUILD.gn | 8 +- services/source/transport/BUILD.gn | 6 +- .../test/sourcetransunittest/BUILD.gn | 6 +- services/state/BUILD.gn | 2 +- .../state/test/dinpusinkstatetest/BUILD.gn | 4 +- services/transportbase/BUILD.gn | 6 +- .../test/transbaseunittest/BUILD.gn | 6 +- sinkhandler/BUILD.gn | 4 +- sinkhandler/test/unittest/BUILD.gn | 6 +- sourcehandler/BUILD.gn | 4 +- sourcehandler/test/unittest/BUILD.gn | 6 +- test/fuzztest/dinputconfigdh_fuzzer/BUILD.gn | 6 +- test/fuzztest/dinputinitsink_fuzzer/BUILD.gn | 6 +- .../fuzztest/dinputinitsource_fuzzer/BUILD.gn | 6 +- .../dinputonsessionclosed_fuzzer/BUILD.gn | 6 +- .../dinputonsessionopend_fuzzer/BUILD.gn | 6 +- .../dinputreleasesink_fuzzer/BUILD.gn | 6 +- .../dinputreleasesource_fuzzer/BUILD.gn | 6 +- .../dinputsubscribelocaldh_fuzzer/BUILD.gn | 6 +- .../distributedinputclient_fuzzer/BUILD.gn | 6 +- .../distributedinputkit_fuzzer/BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../BUILD.gn | 6 +- .../BUILD.gn | 6 +- utils/BUILD.gn | 10 +- utils/test/unittest/BUILD.gn | 8 +- 64 files changed, 966 insertions(+), 199 deletions(-) create mode 100644 common/log/include/distributed_hardware_log.h create mode 100644 common/utils/include/constants.h create mode 100644 common/utils/include/device_type.h create mode 100644 common/utils/include/dhardware_ipc_interface_code.h create mode 100644 common/utils/include/distributed_hardware_errno.h create mode 100644 common/utils/include/iav_trans_control_center_callback.h create mode 100644 common/utils/include/idistributed_hardware.h create mode 100644 common/utils/include/idistributed_hardware_manager.h create mode 100644 common/utils/include/idistributed_hardware_sink.h create mode 100644 common/utils/include/idistributed_hardware_source.h create mode 100644 common/utils/include/ihardware_handler.h create mode 100644 common/utils/include/ipublisher_listener.h create mode 100644 common/utils/include/single_instance.h diff --git a/bundle.json b/bundle.json index e0bd4b1..ebc2d1e 100755 --- a/bundle.json +++ b/bundle.json @@ -31,6 +31,7 @@ "eventhandler", "hilog", "ipc", + "json", "safwk", "samgr", "dsoftbus", @@ -41,13 +42,10 @@ "hisysevent", "hitrace", "graphic_surface", - "window_manager" - ], - "third_party": [ - "jsoncpp", - "libevdev", + "window_manager", "openssl" - ] + ], + "third_party": [ "libevdev" ] }, "build": { "sub_component": [ diff --git a/common/include/test/whitelistunittest/BUILD.gn b/common/include/test/whitelistunittest/BUILD.gn index f305114..2e8a3bf 100755 --- a/common/include/test/whitelistunittest/BUILD.gn +++ b/common/include/test/whitelistunittest/BUILD.gn @@ -33,10 +33,9 @@ ohos_unittest("distributed_input_white_list_test") { "${services_sink_path}/transport/include", "${frameworks_path}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", - "//third_party/json/include", "${utils_path}/include", ] @@ -67,6 +66,7 @@ ohos_unittest("distributed_input_white_list_test") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", ] cflags_cc = [ "-DHILOG_ENABLE" ] diff --git a/common/log/include/distributed_hardware_log.h b/common/log/include/distributed_hardware_log.h new file mode 100644 index 0000000..51c06a5 --- /dev/null +++ b/common/log/include/distributed_hardware_log.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021-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_DISTRIBUTED_HARDWARE_LOG_H +#define OHOS_DISTRIBUTED_HARDWARE_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 diff --git a/common/utils/include/constants.h b/common/utils/include/constants.h new file mode 100644 index 0000000..66dec78 --- /dev/null +++ b/common/utils/include/constants.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2021-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. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_CONSTANTS_H +#define OHOS_DISTRIBUTED_HARDWARE_CONSTANTS_H + +#include +#include + +namespace OHOS { +namespace DistributedHardware { + constexpr int32_t LOG_MAX_LEN = 4096; + constexpr int32_t ENABLE_TIMEOUT_MS = 1000; + constexpr int32_t DISABLE_TIMEOUT_MS = 500; + constexpr uint32_t MAX_MESSAGE_LEN = 40 * 1024 * 1024; + constexpr uint32_t MIN_MESSAGE_LEN = 0; + constexpr uint32_t MAX_ID_LEN = 256; + constexpr uint32_t MAX_TOPIC_SIZE = 128; + constexpr uint32_t MAX_LISTENER_SIZE = 256; + constexpr uint32_t MAX_COMP_SIZE = 128; + constexpr uint32_t MAX_DB_RECORD_SIZE = 10000; + constexpr uint32_t MAX_ONLINE_DEVICE_SIZE = 10000; + constexpr int32_t MODE_ENABLE = 0; + constexpr int32_t MODE_DISABLE = 1; + constexpr uint32_t MAX_SWITCH_SIZE = 256; + const std::string LOW_LATENCY_KEY = "identity"; + const std::u16string DHMS_STUB_INTERFACE_TOKEN = u"ohos.distributedhardware.accessToken"; + const std::string APP_ID = "dtbhardware_manager_service"; + const std::string GLOBAL_CAPABILITY_ID = "global_capability_info"; + const std::string GLOBAL_VERSION_ID = "global_version_info"; + const std::string RESOURCE_SEPARATOR = "###"; + const std::string DH_ID = "dh_id"; + const std::string DEV_ID = "dev_id"; + const std::string DEV_NAME = "dev_name"; + const std::string DEV_TYPE = "dev_type"; + const std::string DH_TYPE = "dh_type"; + const std::string DH_ATTRS = "dh_attrs"; + const std::string DH_SUBTYPE = "dh_subtype"; + const std::string DH_LOG_TITLE_TAG = "DHFWK"; + const std::string DH_VER = "dh_ver"; + const std::string COMP_VER = "comp_ver"; + const std::string NAME = "name"; + const std::string TYPE = "type"; + const std::string HANDLER = "handler"; + const std::string SOURCE_VER = "source_ver"; + const std::string SINK_VER = "sink_ver"; + const std::string DH_TASK_NAME_PREFIX = "Task_"; + const std::string DH_FWK_PKG_NAME = "ohos.dhardware"; + const std::string DH_COMPONENT_VERSIONS = "componentVersions"; + const std::string DH_COMPONENT_TYPE = "dhType"; + const std::string DH_COMPONENT_SINK_VER = "version"; + const std::string DH_COMPONENT_DEFAULT_VERSION = "1.0"; + const std::string LOW_LATENCY_ENABLE = "low_latency_enable"; + constexpr const char *DO_RECOVER = "DoRecover"; + constexpr const char *SEND_ONLINE = "SendOnLine"; + constexpr const char *DISABLE_TASK_INNER = "DisableTask"; + constexpr const char *ENABLE_TASK_INNER = "EnableTask"; + constexpr const char *OFFLINE_TASK_INNER = "OffLineTask"; + constexpr const char *TRIGGER_TASK = "TriggerTask"; + constexpr const char *EVENT_RUN = "EventRun"; + constexpr const char *START_EVENT = "StartEvent"; + constexpr const char *COMPONENTSLOAD_PROFILE_PATH = + "etc/distributedhardware/distributed_hardware_components_cfg.json"; + + const uint32_t EVENT_VERSION_INFO_DB_RECOVER = 101; + const uint32_t EVENT_CAPABILITY_INFO_DB_RECOVER = 201; +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/common/utils/include/device_type.h b/common/utils/include/device_type.h new file mode 100644 index 0000000..0f383ad --- /dev/null +++ b/common/utils/include/device_type.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2021-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. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_DEVICE_TYPE_H +#define OHOS_DISTRIBUTED_HARDWARE_DEVICE_TYPE_H + +#include +#include + +namespace OHOS { +namespace DistributedHardware { +enum class DHType : uint32_t { + UNKNOWN = 0x0, // unknown device + CAMERA = 0x01, // Camera + AUDIO = 0x02, // Mic + SCREEN = 0x08, // Display + GPS = 0x10, // GPS + INPUT = 0x20, // Key board + HFP = 0x40, // HFP External device + A2D = 0x80, // A2DP External device + VIRMODEM_AUDIO = 0x100, // Cellular call AUDIO + MAX_DH = 0x80000000 +}; + +enum class DHSubtype : uint32_t { + CAMERA = 0x01, // Camera + SCREEN = 0x08, // Display + INPUT = 0x20, // Key board + AUDIO_MIC = 0x400, // AUDIO Mic + AUDIO_SPEAKER = 0x800 // AUDIO Speaker +}; + +const std::unordered_map DHTypeStrMap = { + { DHType::CAMERA, "CAMERA" }, + { DHType::AUDIO, "AUDIO" }, + { DHType::SCREEN, "SCREEN" }, + { DHType::GPS, "GPS" }, + { DHType::INPUT, "INPUT" }, + { DHType::HFP, "HFP" }, + { DHType::A2D, "A2D" }, + { DHType::VIRMODEM_AUDIO, "VIRMODEM_AUDIO" }, +}; + +struct DeviceInfo { + std::string uuid; + std::string deviceId; + std::string deviceName; + uint16_t deviceType; + + explicit DeviceInfo(std::string uuid, std::string deviceId, std::string deviceName, uint16_t deviceType) + : uuid(uuid), deviceId(deviceId), deviceName(deviceName), deviceType(deviceType) {} +}; + +/* The key is DHType, the value is the prefix of DHId */ +const std::unordered_map DHTypePrefixMap = { + {DHType::CAMERA, "Camera"}, + {DHType::SCREEN, "Screen"}, + {DHType::INPUT, "Input"}, +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/common/utils/include/dhardware_ipc_interface_code.h b/common/utils/include/dhardware_ipc_interface_code.h new file mode 100644 index 0000000..173e96b --- /dev/null +++ b/common/utils/include/dhardware_ipc_interface_code.h @@ -0,0 +1,41 @@ +/* + * 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. + */ + +#ifndef OHOS_DHARDWARE_IPC_INTERFACE_CODE_H +#define OHOS_DHARDWARE_IPC_INTERFACE_CODE_H + +#include + +/* SAID: 4801 */ +namespace OHOS { +namespace DistributedHardware { +enum class DHMsgInterfaceCode : uint32_t { + REG_PUBLISHER_LISTNER = 48001, + UNREG_PUBLISHER_LISTENER = 48002, + PUBLISH_MESSAGE = 48003, + INIT_CTL_CEN = 48004, + RELEASE_CTL_CEN = 48005, + CREATE_CTL_CEN_CHANNEL = 48006, + NOTIFY_AV_EVENT = 48007, + REGISTER_CTL_CEN_CALLBACK = 48008, + QUERY_LOCAL_SYS_SPEC = 48009, + PAUSE_DISTRIBUTED_HARDWARE = 480010, + RESUME_DISTRIBUTED_HARDWARE = 480011, + STOP_DISTRIBUTED_HARDWARE = 480012, + NOTIFY_SOURCE_DEVICE_REMOTE_DMSDP_STARTED = 1, +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif \ No newline at end of file diff --git a/common/utils/include/distributed_hardware_errno.h b/common/utils/include/distributed_hardware_errno.h new file mode 100644 index 0000000..4dd9fd1 --- /dev/null +++ b/common/utils/include/distributed_hardware_errno.h @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2021-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_DISTRIBUTED_HARDWARE_ERRNO +#define OHOS_DISTRIBUTED_HARDWARE_ERRNO + +#include + +namespace OHOS { +namespace DistributedHardware { + /* + * The distributed hardware module define errno, range: [-10000, -19999] + * Here's common errno, range: [-10000, -10199] + */ + constexpr int32_t DH_FWK_SUCCESS = 0; + constexpr int32_t ERR_DH_FWK_PARA_INVALID = -10000; + constexpr int32_t ERR_DH_FWK_REMOTE_NETWORK_ID_IS_EMPTY = -10001; + constexpr int32_t ERR_DH_FWK_REMOTE_DEVICE_ID_IS_EMPTY = -10002; + constexpr int32_t ERR_DH_FWK_TYPE_NOT_EXIST = -10003; + constexpr int32_t ERR_DH_FWK_JSON_PARSE_FAILED = -10004; + constexpr int32_t ERR_DH_FWK_POINTER_IS_NULL = -10005; + + /* VersionManager errno, range: [-10200, -10299] */ + constexpr int32_t ERR_DH_FWK_VERSION_DEVICE_ID_NOT_EXIST = -10200; + + /* ComponentManager errno, range: [-10300, -10399] */ + constexpr int32_t ERR_DH_FWK_COMPONENT_INIT_SOURCE_FAILED = -10300; + constexpr int32_t ERR_DH_FWK_COMPONENT_INIT_SINK_FAILED = -10301; + constexpr int32_t ERR_DH_FWK_COMPONENT_ENABLE_FAILED = -10302; + constexpr int32_t ERR_DH_FWK_COMPONENT_DISABLE_FAILED = -10303; + constexpr int32_t ERR_DH_FWK_COMPONENT_ENABLE_TIMEOUT = -10304; + constexpr int32_t ERR_DH_FWK_COMPONENT_DISABLE_TIMEOUT = -10305; + constexpr int32_t ERR_DH_FWK_COMPONENT_REGISTER_FAILED = -10306; + constexpr int32_t ERR_DH_FWK_COMPONENT_UNREGISTER_FAILED = -10007; + constexpr int32_t ERR_DH_FWK_COMPONENT_GET_REMOTE_SA_FAILED = -10008; + constexpr int32_t ERR_DH_FWK_COMPONENT_GET_SINK_VERSION_FAILED = -10009; + constexpr int32_t ERR_DH_FWK_COMPONENT_DHTYPE_NOT_FOUND = -10010; + constexpr int32_t ERR_DH_FWK_COMPONENT_MONITOR_NULL = -10011; + + /* ResourceManager errno, range: [-10400, -10499] */ + constexpr int32_t ERR_DH_FWK_RESOURCE_DB_ADAPTER_POINTER_NULL = -10400; + constexpr int32_t ERR_DH_FWK_RESOURCE_KV_STORAGE_POINTER_NULL = -10401; + constexpr int32_t ERR_DH_FWK_RESOURCE_DB_ADAPTER_OPERATION_FAIL = -10402; + constexpr int32_t ERR_DH_FWK_RESOURCE_KV_STORAGE_OPERATION_FAIL = -10403; + constexpr int32_t ERR_DH_FWK_RESOURCE_CAPABILITY_MAP_NOT_FOUND = -10404; + constexpr int32_t ERR_DH_FWK_RESOURCE_DB_MANUAL_SYNC_FAIL = -10405; + constexpr int32_t ERR_DH_FWK_RESOURCE_INIT_DB_FAILED = -10406; + constexpr int32_t ERR_DH_FWK_RESOURCE_UNINIT_DB_FAILED = -10407; + constexpr int32_t ERR_DH_FWK_RESOURCE_REGISTER_DB_FAILED = -10408; + constexpr int32_t ERR_DH_FWK_RESOURCE_UNREGISTER_DB_FAILED = -10409; + constexpr int32_t ERR_DH_FWK_RESOURCE_KEY_IS_EMPTY = -10410; + constexpr int32_t ERR_DH_FWK_RESOURCE_SYNC_VERSIONINFO_FAIL = -10411; + constexpr int32_t ERR_DH_FWK_RESOURCE_DEVICE_ID_NOT_EXIST = -10412; + constexpr int32_t ERR_DH_FWK_RESOURCE_UUID_NOT_FOUND = -10413; + constexpr int32_t ERR_DH_FWK_RESOURCE_CAPINFO_POINTER_NULL = -10414; + constexpr int32_t ERR_DH_FWK_RESOURCE_RES_DB_DATA_INVALID = -10415; + + /* DistributedHardwareManager errno, range: [-10500, -10599] */ + constexpr int32_t ERR_DH_FWK_HARDWARE_MANAGER_DEVICE_REPEAT_ONLINE = -10500; + constexpr int32_t ERR_DH_FWK_HARDWARE_MANAGER_DEVICE_REPEAT_OFFLINE = -10501; + constexpr int32_t ERR_DH_FWK_HARDWARE_MANAGER_INIT_FAILED = -10502; + + /* ComponentLoader errno, range: [-10600, -10699] */ + constexpr int32_t ERR_DH_FWK_LOADER_HANDLER_IS_NULL = -10600; + constexpr int32_t ERR_DH_FWK_LOADER_CONFIG_JSON_INVALID = -10601; + constexpr int32_t ERR_DH_FWK_LOADER_GET_LOCAL_VERSION_FAIL = -10602; + constexpr int32_t ERR_DH_FWK_LOADER_DLCLOSE_FAIL = -10603; + constexpr int32_t ERR_DH_FWK_LOADER_PROFILE_PATH_IS_NULL = -10604; + + /* Task errno, range: [-10700, -10799] */ + constexpr int32_t ERR_DH_FWK_TASK_TIMEOUT = -10700; + + /* DistributedHardwareService errno, range: [-10800, -10899] */ + constexpr int32_t ERR_DH_FWK_SERVICE_IPC_WRITE_PARA_FAIL = -10800; + constexpr int32_t ERR_DH_FWK_SERVICE_IPC_SEND_REQUEST_FAIL = -10801; + constexpr int32_t ERR_DH_FWK_SERVICE_IPC_READ_PARA_FAIL = -10802; + constexpr int32_t ERR_DH_FWK_SERVICE_STRING_IS_EMPTY = -10803; + constexpr int32_t ERR_DH_FWK_SERVICE_LOCAL_VERSION_NOT_EXIST = -10804; + constexpr int32_t ERR_DH_FWK_SERVICE_WRITE_TOKEN_FAIL = -10805; + constexpr int32_t ERR_DH_FWK_SERVICE_REMOTE_IS_NULL = -10806; + constexpr int32_t ERR_DH_FWK_SERVICE_WRITE_INFO_FAIL = -10807; + constexpr int32_t ERR_DH_FWK_PUBLISHER_LISTENER_IS_NULL = -10808; + constexpr int32_t ERR_DH_FWK_SERVICE_MSG_INVALID = -10809; + + /* AccessManager errno, range: [-10900, -10999] */ + constexpr int32_t ERR_DH_FWK_ACCESS_INIT_DM_FAILED = -10900; + constexpr int32_t ERR_DH_FWK_ACCESS_UNINIT_DM_FAILED = -10901; + constexpr int32_t ERR_DH_FWK_ACCESS_REGISTER_DM_FAILED = -10902; + constexpr int32_t ERR_DH_FWK_ACCESS_UNREGISTER_DM_FAILED = -10903; + + /* Hidump errno, range: [-11000, -11099] */ + constexpr int32_t ERR_DH_FWK_HIDUMP_ERROR = -11000; + constexpr int32_t ERR_DH_FWK_HIDUMP_INVALID_ARGS = -11001; + constexpr int32_t ERR_DH_FWK_HIDUMP_DPRINTF_ERROR = -11002; + + /* DHFWK Publisher errno, range: [-11100, -11199] */ + constexpr int32_t ERR_DH_FWK_PUBLISH_MSG_FAILED = -11100; + constexpr uint32_t ERR_DH_FWK_PUBLISH_LISTENER_OVER_SIZE = -11101; + + /* DHFWK Check Permission errno, range: [-11200, -11299] */ + constexpr int32_t ERR_DH_FWK_ACCESS_PERMISSION_CHECK_FAIL = -11200; +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DISTRIBUTED_HARDWARE_ERRNO diff --git a/common/utils/include/iav_trans_control_center_callback.h b/common/utils/include/iav_trans_control_center_callback.h new file mode 100644 index 0000000..bcbe633 --- /dev/null +++ b/common/utils/include/iav_trans_control_center_callback.h @@ -0,0 +1,43 @@ +/* + * 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. + */ + +#ifndef OHOS_I_AV_TRANSPORT_CONTROL_CENTER_CALLBACK_H +#define OHOS_I_AV_TRANSPORT_CONTROL_CENTER_CALLBACK_H + +#include "iremote_broker.h" + +#include "av_sync_utils.h" +#include "av_trans_errno.h" +#include "av_trans_types.h" + +namespace OHOS { +namespace DistributedHardware { +class IAVTransControlCenterCallback : public IRemoteBroker { +public: + virtual int32_t SetParameter(AVTransTag tag, const std::string &value) = 0; + virtual int32_t SetSharedMemory(const AVTransSharedMemory &memory) = 0; + virtual int32_t Notify(const AVTransEvent &event) = 0; + + enum class Message : uint32_t { + SET_PARAMETER = 1, + SET_SHARED_MEMORY = 2, + NOTIFY_AV_EVENT = 3 + }; + + DECLARE_INTERFACE_DESCRIPTOR(u"ohos.distributedhardware.IAVTransControlCenterCallback"); +}; +} +} +#endif \ No newline at end of file diff --git a/common/utils/include/idistributed_hardware.h b/common/utils/include/idistributed_hardware.h new file mode 100644 index 0000000..090e700 --- /dev/null +++ b/common/utils/include/idistributed_hardware.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021-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. + */ + +#ifndef OHOS_IDISTRIBUTED_HARDWARE_H +#define OHOS_IDISTRIBUTED_HARDWARE_H + +#include +#include +#include + +#include "iremote_broker.h" +#include "device_type.h" + +#include "distributed_hardware_fwk_kit_paras.h" +#include "iav_trans_control_center_callback.h" +#include "ipublisher_listener.h" + +namespace OHOS { +namespace DistributedHardware { +class IDistributedHardware : public OHOS::IRemoteBroker { +public: + DECLARE_INTERFACE_DESCRIPTOR(u"ohos.distributedhardware.accessToken"); + IDistributedHardware() = default; + virtual ~IDistributedHardware() = default; + virtual int32_t RegisterPublisherListener(const DHTopic topic, const sptr &listener) = 0; + virtual int32_t UnregisterPublisherListener(const DHTopic topic, const sptr &listener) = 0; + virtual int32_t PublishMessage(const DHTopic topic, const std::string &msg) = 0; + virtual std::string QueryLocalSysSpec(QueryLocalSysSpecType spec) = 0; + + virtual int32_t InitializeAVCenter(const TransRole &transRole, int32_t &engineId) = 0; + virtual int32_t ReleaseAVCenter(int32_t engineId) = 0; + virtual int32_t CreateControlChannel(int32_t engineId, const std::string &peerDevId) = 0; + virtual int32_t NotifyAVCenter(int32_t engineId, const AVTransEvent &event) = 0; + virtual int32_t RegisterCtlCenterCallback(int32_t engineId, + const sptr &callback) = 0; + virtual int32_t NotifySourceRemoteSinkStarted(std::string &deviceId) = 0; + virtual int32_t PauseDistributedHardware(DHType dhType, const std::string &networkId) = 0; + virtual int32_t ResumeDistributedHardware(DHType dhType, const std::string &networkId) = 0; + virtual int32_t StopDistributedHardware(DHType dhType, const std::string &networkId) = 0; +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_IDISTRIBUTED_HARDWARE_H diff --git a/common/utils/include/idistributed_hardware_manager.h b/common/utils/include/idistributed_hardware_manager.h new file mode 100644 index 0000000..dc2cf89 --- /dev/null +++ b/common/utils/include/idistributed_hardware_manager.h @@ -0,0 +1,41 @@ +/* + * 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_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_MANAGER_H +#define OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_MANAGER_H + +#include +#include + +#include "device_type.h" + +namespace OHOS { +namespace DistributedHardware { +class IDistributedHardwareManager { +public: + virtual ~IDistributedHardwareManager() {} + virtual int32_t Initialize() = 0; + virtual int32_t Release() = 0; + virtual int32_t SendOnLineEvent(const std::string &networkId, const std::string &uuid, + uint16_t deviceType) = 0; + virtual int32_t SendOffLineEvent(const std::string &networkId, const std::string &uuid, + uint16_t deviceType) = 0; + virtual size_t GetOnLineCount() = 0; + virtual int32_t GetComponentVersion(std::unordered_map &versionMap) = 0; + virtual int32_t Dump(const std::vector &argsStr, std::string &result) = 0; +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_MANAGER_H diff --git a/common/utils/include/idistributed_hardware_sink.h b/common/utils/include/idistributed_hardware_sink.h new file mode 100644 index 0000000..7051585 --- /dev/null +++ b/common/utils/include/idistributed_hardware_sink.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021-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. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SINK_H +#define OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SINK_H + +#include + +namespace OHOS { +namespace DistributedHardware { +const std::string COMPONENT_LOADER_GET_SINK_HANDLER = "GetSinkHardwareHandler"; +enum class ResourceEventType : int32_t { + EVENT_TYPE_QUERY_RESOURCE = 0, + EVENT_TYPE_PULL_UP_PAGE = 1, + EVENT_TYPE_CLOSE_PAGE = 2 +}; + +class SubscribeCallback { +public: + virtual int32_t OnSubscribeCallback(const std::string &dhId, int32_t status, const std::string &data) = 0; +}; + +class PrivacyResourcesListener { +public: + virtual int32_t OnPrivaceResourceMessage(const ResourceEventType &type, const std::string &subType, + const std::string &networkId, bool &isSensitive, bool &isSameAccout) = 0; +}; + +class IDistributedHardwareSink { +public: + virtual int32_t InitSink(const std::string ¶ms) = 0; + virtual int32_t ReleaseSink() = 0; + virtual int32_t SubscribeLocalHardware(const std::string &dhId, const std::string ¶ms) = 0; + virtual int32_t UnsubscribeLocalHardware(const std::string &dhId) = 0; + virtual int32_t RegisterPrivacyResources(std::shared_ptr listener) = 0; + virtual int32_t PauseDistributedHardware(const std::string &networkId) = 0; + virtual int32_t ResumeDistributedHardware(const std::string &networkId) = 0; + virtual int32_t StopDistributedHardware(const std::string &networkId) = 0; +}; +extern "C" __attribute__((visibility("default"))) IDistributedHardwareSink* GetSinkHardwareHandler(); +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/common/utils/include/idistributed_hardware_source.h b/common/utils/include/idistributed_hardware_source.h new file mode 100644 index 0000000..3517bb3 --- /dev/null +++ b/common/utils/include/idistributed_hardware_source.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2021-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. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SOURCE_H +#define OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SOURCE_H + +#include +#include + +namespace OHOS { +namespace DistributedHardware { +const std::string COMPONENT_LOADER_GET_SOURCE_HANDLER = "GetSourceHardwareHandler"; +class RegisterCallback { +public: + virtual int32_t OnRegisterResult(const std::string &uuid, const std::string &dhId, int32_t status, + const std::string &data) = 0; +}; + +class UnregisterCallback { +public: + virtual int32_t OnUnregisterResult(const std::string &uuid, const std::string &dhId, int32_t status, + const std::string &data) = 0; +}; + +struct EnableParam { + std::string sourceVersion; + std::string sourceAttrs; + std::string sinkVersion; + std::string sinkAttrs; + std::string subtype; +}; + +class IDistributedHardwareSource { +public: + virtual int32_t InitSource(const std::string ¶ms) = 0; + virtual int32_t ReleaseSource() = 0; + virtual int32_t RegisterDistributedHardware(const std::string &uuid, const std::string &dhId, + const EnableParam ¶m, std::shared_ptr callback) = 0; + virtual int32_t UnregisterDistributedHardware(const std::string &uuid, const std::string &dhId, + std::shared_ptr callback) = 0; + virtual int32_t ConfigDistributedHardware(const std::string &uuid, const std::string &dhId, const std::string &key, + const std::string &value) = 0; +}; +extern "C" __attribute__((visibility("default"))) IDistributedHardwareSource* GetSourceHardwareHandler(); +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/common/utils/include/ihardware_handler.h b/common/utils/include/ihardware_handler.h new file mode 100644 index 0000000..fa0f75e --- /dev/null +++ b/common/utils/include/ihardware_handler.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021-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. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_IHARDWARE_HANDLER_H +#define OHOS_DISTRIBUTED_HARDWARE_IHARDWARE_HANDLER_H + +#include +#include +#include +#include + +namespace OHOS { +namespace DistributedHardware { +const std::string COMPONENT_LOADER_GET_HARDWARE_HANDLER = "GetHardwareHandler"; +struct DHItem { + std::string dhId; + std::string attrs; + std::string subtype; +}; + +class PluginListener { +public: + virtual void PluginHardware(const std::string &dhId, const std::string &attrs, const std::string &subtype) = 0; + virtual void UnPluginHardware(const std::string &dhId) = 0; +}; + +class IHardwareHandler { +public: + virtual int32_t Initialize() = 0; + virtual std::vector Query() = 0; + virtual std::map QueryExtraInfo() = 0; + virtual bool IsSupportPlugin() = 0; + virtual void RegisterPluginListener(std::shared_ptr listener) = 0; + virtual void UnRegisterPluginListener() = 0; +}; +extern "C" __attribute__((visibility("default"))) IHardwareHandler* GetHardwareHandler(); +} // namespace DistributedHardware +} // namespace OHOS +#endif diff --git a/common/utils/include/ipublisher_listener.h b/common/utils/include/ipublisher_listener.h new file mode 100644 index 0000000..151260e --- /dev/null +++ b/common/utils/include/ipublisher_listener.h @@ -0,0 +1,59 @@ +/* + * 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_IPUBLISHER_LISTENER_H +#define OHOS_IPUBLISHER_LISTENER_H + +#include +#include + +#include + +namespace OHOS { +namespace DistributedHardware { +enum class DHTopic : uint32_t { + // Topic min border, not use for real topic + TOPIC_MIN = 0, + // Start project distributed screen + TOPIC_START_DSCREEN = 1, + // Publish Sink Project Window Info + TOPIC_SINK_PROJECT_WINDOW_INFO = 2, + // Stop distributed screen project + TOPIC_STOP_DSCREEN = 3, + // publish device offline message + TOPIC_DEV_OFFLINE = 4, + // publish low latency message + TOPIC_LOW_LATENCY = 5, + // Topic init DHMS is ready + TOPIC_INIT_DHMS_READY = 6, + // Topic for physical input devices plugin event + TOPIC_PHY_DEV_PLUGIN = 7, + // Topic max border, not use for real topic + TOPIC_MAX = 8 +}; + +class IPublisherListener : public IRemoteBroker { +public: + virtual void OnMessage(const DHTopic topic, const std::string& message) = 0; + + enum class Message : uint32_t { + ON_MESSAGE, + }; + + DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedHardwareFwk.IPublisherListener"); +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_IPUBLISHER_LISTENER_H \ No newline at end of file diff --git a/common/utils/include/single_instance.h b/common/utils/include/single_instance.h new file mode 100644 index 0000000..104681a --- /dev/null +++ b/common/utils/include/single_instance.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021-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_DISTRIBUTED_HARDWARE_SINGLE_INSTANCE_H +#define OHOS_DISTRIBUTED_HARDWARE_SINGLE_INSTANCE_H + +namespace OHOS { +namespace DistributedHardware { +#define REMOVE_NO_USE_CONSTRUCTOR(className) \ +private: \ + className(const className&) = delete; \ + className& operator= (const className&) = delete; \ + className(className&&) = delete; \ + className& operator= (className&&) = delete; \ + +#define DECLARE_SINGLE_INSTANCE_BASE(className) \ +public: \ + static className & GetInstance(); \ +private: \ + className(const className&) = delete; \ + className& operator= (const className&) = delete; \ + className(className&&) = delete; \ + className& operator= (className&&) = delete; \ + +#define DECLARE_SINGLE_INSTANCE(className) \ + DECLARE_SINGLE_INSTANCE_BASE(className) \ +private: \ + className() = default; \ + virtual ~className() = default; \ + +#define IMPLEMENT_SINGLE_INSTANCE(className) \ +className & className::GetInstance() \ +{ \ + static className instance; \ + return instance; \ +} +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DISTRIBUTED_HARDWARE_SINGLE_INSTANCE_H diff --git a/dfx_utils/BUILD.gn b/dfx_utils/BUILD.gn index baff9a8..6038f0e 100755 --- a/dfx_utils/BUILD.gn +++ b/dfx_utils/BUILD.gn @@ -28,8 +28,8 @@ ohos_shared_library("libdinput_dfx_utils") { include_dirs = [ "include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${frameworks_path}/include", "${dfx_utils_path}/include", "${service_common}/include", diff --git a/dfx_utils/test/dfxtest/BUILD.gn b/dfx_utils/test/dfxtest/BUILD.gn index 354c219..0b71729 100644 --- a/dfx_utils/test/dfxtest/BUILD.gn +++ b/dfx_utils/test/dfxtest/BUILD.gn @@ -30,8 +30,8 @@ ohos_unittest("distributed_input_dfx_test") { include_dirs = [ "include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${frameworks_path}/include", "${dfx_utils_path}/include", diff --git a/inputdevicehandler/BUILD.gn b/inputdevicehandler/BUILD.gn index 963087d..87d928c 100755 --- a/inputdevicehandler/BUILD.gn +++ b/inputdevicehandler/BUILD.gn @@ -26,18 +26,14 @@ ohos_shared_library("libdinput_handler") { } branch_protector_ret = "pac_ret" include_dirs = [ - "${av_transport_path}/common/include", "include", "${common_path}/include", "${services_state_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", "${frameworks_path}/include", "${utils_path}/include", - "//third_party/json/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", ] sources = [ @@ -55,14 +51,19 @@ ohos_shared_library("libdinput_handler") { "${services_state_path}:libdinput_sink_state", "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", "dsoftbus:softbus_client", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", + "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", + "openssl:libcrypto_shared", "samgr:samgr_proxy", ] diff --git a/inputdevicehandler/test/inputhandlertest/BUILD.gn b/inputdevicehandler/test/inputhandlertest/BUILD.gn index f770e8d..8c42372 100644 --- a/inputdevicehandler/test/inputhandlertest/BUILD.gn +++ b/inputdevicehandler/test/inputhandlertest/BUILD.gn @@ -28,17 +28,13 @@ ohos_unittest("distributed_input_handler_test") { module_out_path = module_out_path include_dirs = [ - "${av_transport_path}/common/include", "${common_path}/include", "${services_state_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", "${frameworks_path}/include", "${utils_path}/include", - "//third_party/json/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", "${distributedinput_path}/inputdevicehandler/include", ] @@ -65,14 +61,19 @@ ohos_unittest("distributed_input_handler_test") { deps = [ "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", "dsoftbus:softbus_client", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", + "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", + "openssl:libcrypto_shared", "samgr:samgr_proxy", ] diff --git a/interfaces/inner_kits/BUILD.gn b/interfaces/inner_kits/BUILD.gn index 840aa3b..56c02cd 100644 --- a/interfaces/inner_kits/BUILD.gn +++ b/interfaces/inner_kits/BUILD.gn @@ -16,19 +16,15 @@ import("../../distributedinput.gni") config("input_sdk_public_config") { include_dirs = [ - "${av_transport_path}/common/include", "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", + "${common_path}/log/include", + "${common_path}/utils/include", "${innerkits_path}/include", "${innerkits_path}/src", "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", ] } ohos_shared_library("libdinput_sdk") { @@ -43,6 +39,14 @@ ohos_shared_library("libdinput_sdk") { branch_protector_ret = "pac_ret" public_configs = [ ":input_sdk_public_config" ] + public_external_deps = [ + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", + "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", + "json:nlohmann_json_static", + ] + sources = [ "${common_path}/include/input_check_param.cpp", "${common_path}/include/white_list_util.cpp", diff --git a/interfaces/inner_kits/test/unittest/BUILD.gn b/interfaces/inner_kits/test/unittest/BUILD.gn index c866c1c..beff13b 100644 --- a/interfaces/inner_kits/test/unittest/BUILD.gn +++ b/interfaces/inner_kits/test/unittest/BUILD.gn @@ -28,7 +28,6 @@ ohos_unittest("distributed_input_inner_test") { module_out_path = module_out_path include_dirs = [ - "${av_transport_path}/common/include", "${innerkits_path}/include", "${innerkits_path}/src", "${ipc_path}/include", @@ -36,12 +35,9 @@ ohos_unittest("distributed_input_inner_test") { "${distributedinput_path}/services/include", "${frameworks_path}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${utils_path}/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", "${frameworks_path}/include", ] @@ -102,8 +98,13 @@ ohos_unittest("distributed_input_inner_test") { external_deps = [ "c_utils:utils", "config_policy:configpolicy_util", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", + "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", ] cflags_cc = [ "-DHILOG_ENABLE" ] diff --git a/interfaces/ipc/test/addwhitelistinfoscallbackunittest/BUILD.gn b/interfaces/ipc/test/addwhitelistinfoscallbackunittest/BUILD.gn index a58e51c..996a1dc 100644 --- a/interfaces/ipc/test/addwhitelistinfoscallbackunittest/BUILD.gn +++ b/interfaces/ipc/test/addwhitelistinfoscallbackunittest/BUILD.gn @@ -30,8 +30,8 @@ ohos_unittest("add_white_list_infos_callbackl_test") { include_dirs = [ "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${innerkits_path}/include", @@ -39,7 +39,6 @@ ohos_unittest("add_white_list_infos_callbackl_test") { "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", ] sources = [ @@ -101,6 +100,7 @@ ohos_unittest("add_white_list_infos_callbackl_test") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/interfaces/ipc/test/clientunittest/BUILD.gn b/interfaces/ipc/test/clientunittest/BUILD.gn index 208d6b2..91f2c1b 100644 --- a/interfaces/ipc/test/clientunittest/BUILD.gn +++ b/interfaces/ipc/test/clientunittest/BUILD.gn @@ -28,19 +28,15 @@ ohos_unittest("distributed_input_client_test") { module_out_path = module_out_path include_dirs = [ - "${av_transport_path}/common/include", "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", + "${common_path}/log/include", + "${common_path}/utils/include", "${innerkits_path}/include", "${innerkits_path}/src", "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", "${services_source_path}/sourcemanager/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", @@ -120,11 +116,15 @@ ohos_unittest("distributed_input_client_test") { "access_token:libtokenid_sdk", "c_utils:utils", "config_policy:configpolicy_util", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "dsoftbus:softbus_client", "eventhandler:libeventhandler", "graphic_surface:surface", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", "window_manager:libdm", diff --git a/interfaces/ipc/test/delwhitelistinfoscallbackunittest/BUILD.gn b/interfaces/ipc/test/delwhitelistinfoscallbackunittest/BUILD.gn index d659e7b..e0f9470 100644 --- a/interfaces/ipc/test/delwhitelistinfoscallbackunittest/BUILD.gn +++ b/interfaces/ipc/test/delwhitelistinfoscallbackunittest/BUILD.gn @@ -30,8 +30,8 @@ ohos_unittest("del_white_list_infos_callbackl_test") { include_dirs = [ "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${innerkits_path}/include", @@ -39,7 +39,6 @@ ohos_unittest("del_white_list_infos_callbackl_test") { "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", ] sources = [ @@ -73,6 +72,7 @@ ohos_unittest("del_white_list_infos_callbackl_test") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/interfaces/ipc/test/dinputsourcecallbackunittest/BUILD.gn b/interfaces/ipc/test/dinputsourcecallbackunittest/BUILD.gn index dd96fc9..e2081eb 100644 --- a/interfaces/ipc/test/dinputsourcecallbackunittest/BUILD.gn +++ b/interfaces/ipc/test/dinputsourcecallbackunittest/BUILD.gn @@ -30,8 +30,8 @@ ohos_unittest("dinput_source_callback_test") { include_dirs = [ "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${innerkits_path}/include", @@ -39,7 +39,6 @@ ohos_unittest("dinput_source_callback_test") { "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", ] sources = [ @@ -101,6 +100,7 @@ ohos_unittest("dinput_source_callback_test") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/interfaces/ipc/test/ipcunittest/BUILD.gn b/interfaces/ipc/test/ipcunittest/BUILD.gn index 1a64cad..2bbf9ea 100644 --- a/interfaces/ipc/test/ipcunittest/BUILD.gn +++ b/interfaces/ipc/test/ipcunittest/BUILD.gn @@ -28,19 +28,15 @@ ohos_unittest("distributed_input_ipc_test") { module_out_path = module_out_path include_dirs = [ - "${av_transport_path}/common/include", "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", + "${common_path}/log/include", + "${common_path}/utils/include", "${innerkits_path}/include", "${innerkits_path}/src", "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", ] sources = [ @@ -107,10 +103,14 @@ ohos_unittest("distributed_input_ipc_test") { "access_token:libtokenid_sdk", "c_utils:utils", "config_policy:configpolicy_util", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/interfaces/ipc/test/unpreparedinputcallbackunittest/BUILD.gn b/interfaces/ipc/test/unpreparedinputcallbackunittest/BUILD.gn index 6fa67da..b16577e 100644 --- a/interfaces/ipc/test/unpreparedinputcallbackunittest/BUILD.gn +++ b/interfaces/ipc/test/unpreparedinputcallbackunittest/BUILD.gn @@ -30,8 +30,8 @@ ohos_unittest("unprepare_d_input_call_back_test") { include_dirs = [ "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${innerkits_path}/include", @@ -39,7 +39,6 @@ ohos_unittest("unprepare_d_input_call_back_test") { "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", ] sources = [ @@ -73,6 +72,7 @@ ohos_unittest("unprepare_d_input_call_back_test") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/interfaces/ipc/test/unregisterdinputcallbackunittest/BUILD.gn b/interfaces/ipc/test/unregisterdinputcallbackunittest/BUILD.gn index 697586b..0362d1b 100644 --- a/interfaces/ipc/test/unregisterdinputcallbackunittest/BUILD.gn +++ b/interfaces/ipc/test/unregisterdinputcallbackunittest/BUILD.gn @@ -30,8 +30,8 @@ ohos_unittest("unregister_d_input_call_back_test") { include_dirs = [ "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${innerkits_path}/include", @@ -39,7 +39,6 @@ ohos_unittest("unregister_d_input_call_back_test") { "${ipc_path}/include", "${ipc_path}/src", "${utils_path}/include", - "//third_party/json/include", ] sources = [ @@ -73,6 +72,7 @@ ohos_unittest("unregister_d_input_call_back_test") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/sa_profile/BUILD.gn b/sa_profile/BUILD.gn index 2078145..d19d7d9 100644 --- a/sa_profile/BUILD.gn +++ b/sa_profile/BUILD.gn @@ -13,7 +13,6 @@ import("//build/ohos.gni") import("//build/ohos/sa_profile/sa_profile.gni") -import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") ohos_sa_profile("distributed_input_source_sa_profile") { sources = [ "4809.json" ] diff --git a/services/sink/inputcollector/BUILD.gn b/services/sink/inputcollector/BUILD.gn index dffe553..5945e3e 100755 --- a/services/sink/inputcollector/BUILD.gn +++ b/services/sink/inputcollector/BUILD.gn @@ -26,17 +26,13 @@ ohos_shared_library("libdinput_collector") { } branch_protector_ret = "pac_ret" include_dirs = [ - "${av_transport_path}/common/include", "include", "${common_path}/include", "${services_state_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${utils_path}/include", - "//third_party/json/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", ] sources = [ @@ -54,15 +50,20 @@ ohos_shared_library("libdinput_collector") { "${services_state_path}:libdinput_sink_state", "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", + "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "openssl:libcrypto_shared" ] cflags_cc = [ "-DHILOG_ENABLE" ] diff --git a/services/sink/inputcollector/test/sinkcollectorunittest/BUILD.gn b/services/sink/inputcollector/test/sinkcollectorunittest/BUILD.gn index 37a7dca..a50e08b 100644 --- a/services/sink/inputcollector/test/sinkcollectorunittest/BUILD.gn +++ b/services/sink/inputcollector/test/sinkcollectorunittest/BUILD.gn @@ -28,17 +28,13 @@ ohos_unittest("distributed_input_inner_sinkcollector_test") { module_out_path = module_out_path include_dirs = [ - "${av_transport_path}/common/include", "${services_sink_path}/inputcollector/include", "${common_path}/include", "${services_state_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${utils_path}/include", - "//third_party/json/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", ] sources = [ @@ -65,15 +61,20 @@ ohos_unittest("distributed_input_inner_sinkcollector_test") { "${services_state_path}:libdinput_sink_state", "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", + "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "openssl:libcrypto_shared" ] cflags_cc = [ "-DHILOG_ENABLE" ] diff --git a/services/sink/sinkmanager/BUILD.gn b/services/sink/sinkmanager/BUILD.gn index 23700c9..c322b8b 100644 --- a/services/sink/sinkmanager/BUILD.gn +++ b/services/sink/sinkmanager/BUILD.gn @@ -26,7 +26,6 @@ ohos_shared_library("libdinput_sink") { } branch_protector_ret = "pac_ret" include_dirs = [ - "${av_transport_path}/common/include", "include", "${frameworks_path}/include", "${innerkits_path}/include", @@ -34,16 +33,13 @@ ohos_shared_library("libdinput_sink") { "${ipc_path}/include", "${ipc_path}/src", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", "${services_sink_path}/transport/include", "${services_sink_path}/inputcollector/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", "${distributedinput_path}/services/state/include", "${distributedinput_path}/services/transportbase/include", ] @@ -77,11 +73,15 @@ ohos_shared_library("libdinput_sink") { "access_token:libtokenid_sdk", "c_utils:utils", "config_policy:configpolicy_util", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "graphic_surface:surface", "hisysevent:libhisysevent", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", "window_manager:libdm", diff --git a/services/sink/sinkmanager/test/sinkmanagerunittest/BUILD.gn b/services/sink/sinkmanager/test/sinkmanagerunittest/BUILD.gn index dba81c9..a54bdce 100755 --- a/services/sink/sinkmanager/test/sinkmanagerunittest/BUILD.gn +++ b/services/sink/sinkmanager/test/sinkmanagerunittest/BUILD.gn @@ -34,7 +34,6 @@ ohos_unittest("distributed_input_sinkmanager_test") { } include_dirs = [ - "${av_transport_path}/common/include", "${innerkits_path}/include", "${innerkits_path}/src", "${ipc_path}/include", @@ -45,15 +44,12 @@ ohos_unittest("distributed_input_sinkmanager_test") { "${frameworks_path}/include", "${common_path}/include", "${services_state_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", - "//third_party/json/include", "${services_sink_path}/inputcollector/include", "${dfx_utils_path}/include", "${utils_path}/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", "${common_path}/test/mock", "${services_sink_path}/sinkmanager/test/sinkmanagerunittest/mock/", "${distributedinput_path}/services/state/include", @@ -97,7 +93,6 @@ ohos_unittest("distributed_input_sinkmanager_test") { "${services_sink_path}/transport:libdinput_sink_trans", "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ @@ -106,14 +101,19 @@ ohos_unittest("distributed_input_sinkmanager_test") { "access_token:libtoken_setproc", "c_utils:utils", "config_policy:configpolicy_util", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "dsoftbus:softbus_client", "eventhandler:libeventhandler", "graphic_surface:surface", "hicollie:libhicollie", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "openssl:libcrypto_shared", "window_manager:libdm", ] diff --git a/services/sink/transport/BUILD.gn b/services/sink/transport/BUILD.gn index e8dfd2e..81d98d7 100644 --- a/services/sink/transport/BUILD.gn +++ b/services/sink/transport/BUILD.gn @@ -26,18 +26,14 @@ ohos_shared_library("libdinput_sink_trans") { } branch_protector_ret = "pac_ret" include_dirs = [ - "${av_transport_path}/common/include", "include", "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", "${dfx_utils_path}/include", "${utils_path}/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", "${distributedinput_path}/services/transportbase/include", ] @@ -61,12 +57,16 @@ ohos_shared_library("libdinput_sink_trans") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "dsoftbus:softbus_client", "eventhandler:libeventhandler", "hicollie:libhicollie", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/services/sink/transport/test/sinktransunittest/BUILD.gn b/services/sink/transport/test/sinktransunittest/BUILD.gn index 1b981b6..be47056 100755 --- a/services/sink/transport/test/sinktransunittest/BUILD.gn +++ b/services/sink/transport/test/sinktransunittest/BUILD.gn @@ -28,21 +28,17 @@ ohos_unittest("distributed_input_sinktrans_test") { module_out_path = module_out_path include_dirs = [ - "${av_transport_path}/common/include", "${services_sink_path}/transport/include", "${distributedinput_path}/services/transportbase/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${frameworks_path}/include", - "${fwk_interfaces_path}/include", "${service_common}/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", "${common_path}/test/mock", "${services_sink_path}/sinkmanager/include", - "${fwk_interfaces_path}/include/ipc", "${innerkits_path}/include", "${innerkits_path}/src", "${ipc_path}/include", @@ -88,13 +84,17 @@ ohos_unittest("distributed_input_sinktrans_test") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "graphic_surface:surface", "hicollie:libhicollie", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", "window_manager:libdm", diff --git a/services/source/inputinject/BUILD.gn b/services/source/inputinject/BUILD.gn index bef2ff5..d734901 100644 --- a/services/source/inputinject/BUILD.gn +++ b/services/source/inputinject/BUILD.gn @@ -26,19 +26,15 @@ ohos_shared_library("libdinput_inject") { } branch_protector_ret = "pac_ret" include_dirs = [ - "${av_transport_path}/common/include", "include", "${common_path}/include", "${services_state_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", "${distributedinput_path}/inputdevicehandler/include", ] @@ -60,15 +56,20 @@ ohos_shared_library("libdinput_inject") { "${services_state_path}:libdinput_sink_state", "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", "dsoftbus:softbus_client", + "distributed_hardware_fwk:distributed_av_sender", + "distributed_hardware_fwk:distributed_av_receiver", + "distributed_hardware_fwk:libdhfwk_sdk", + "distributed_hardware_fwk:distributedhardwareutils", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", + "openssl:libcrypto_shared", "samgr:samgr_proxy", ] diff --git a/services/source/inputinject/test/sourceinjectunittest/BUILD.gn b/services/source/inputinject/test/sourceinjectunittest/BUILD.gn index 8c41812..5fa4726 100755 --- a/services/source/inputinject/test/sourceinjectunittest/BUILD.gn +++ b/services/source/inputinject/test/sourceinjectunittest/BUILD.gn @@ -36,10 +36,9 @@ ohos_unittest("distributed_input_inner_sourceinject_test") { "${common_path}/include", "${services_state_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", "${fwk_interfaces_path}/include", @@ -78,7 +77,6 @@ ohos_unittest("distributed_input_inner_sourceinject_test") { "${innerkits_path}:libdinput_sdk", "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ @@ -86,7 +84,9 @@ ohos_unittest("distributed_input_inner_sourceinject_test") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", + "openssl:libcrypto_shared", "samgr:samgr_proxy", ] diff --git a/services/source/sourcemanager/BUILD.gn b/services/source/sourcemanager/BUILD.gn index 536f99c..d8afb9f 100644 --- a/services/source/sourcemanager/BUILD.gn +++ b/services/source/sourcemanager/BUILD.gn @@ -34,14 +34,13 @@ ohos_shared_library("libdinput_source") { "${ipc_path}/include", "${ipc_path}/src", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", "${dfx_utils_path}/include", "${utils_path}/include", - "//third_party/json/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${distributedinput_path}/inputdevicehandler/include", @@ -120,6 +119,7 @@ ohos_shared_library("libdinput_source") { "hisysevent:libhisysevent", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/services/source/sourcemanager/test/sourcemanagerunittest/BUILD.gn b/services/source/sourcemanager/test/sourcemanagerunittest/BUILD.gn index 3a5b758..efe6752 100755 --- a/services/source/sourcemanager/test/sourcemanagerunittest/BUILD.gn +++ b/services/source/sourcemanager/test/sourcemanagerunittest/BUILD.gn @@ -38,10 +38,9 @@ ohos_unittest("distributed_input_sourcemanager_test") { "${distributedinput_path}/inputdevicehandler/include", "${common_path}/include", "${services_state_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", - "//third_party/json/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", "${dfx_utils_path}/include", @@ -116,7 +115,6 @@ ohos_unittest("distributed_input_sourcemanager_test") { "${services_source_path}/transport:libdinput_source_trans", "${utils_path}:libdinput_utils", "//third_party/libevdev:libevdev", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ @@ -131,7 +129,9 @@ ohos_unittest("distributed_input_sourcemanager_test") { "hisysevent:libhisysevent", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", + "openssl:libcrypto_shared", "samgr:samgr_proxy", ] diff --git a/services/source/transport/BUILD.gn b/services/source/transport/BUILD.gn index a762f17..789a64a 100755 --- a/services/source/transport/BUILD.gn +++ b/services/source/transport/BUILD.gn @@ -29,10 +29,9 @@ ohos_shared_library("libdinput_source_trans") { "${av_transport_path}/common/include", "include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", - "//third_party/json/include", "${service_common}/include", "${services_source_path}/inputinject/include", "${dfx_utils_path}/include", @@ -63,6 +62,7 @@ ohos_shared_library("libdinput_source_trans") { "distributed_hardware_fwk:libdhfwk_sdk", "eventhandler:libeventhandler", "hitrace:hitrace_meter", + "json:nlohmann_json_static", "samgr:samgr_proxy", ] diff --git a/services/source/transport/test/sourcetransunittest/BUILD.gn b/services/source/transport/test/sourcetransunittest/BUILD.gn index 95ee5bd..645f80b 100755 --- a/services/source/transport/test/sourcetransunittest/BUILD.gn +++ b/services/source/transport/test/sourcetransunittest/BUILD.gn @@ -33,12 +33,11 @@ ohos_unittest("distributed_input_sourcetrans_test") { "${distributedinput_path}/services/transportbase/include", "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${service_common}/include", - "//third_party/json/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", "${services_source_path}/sourcemanager/include", @@ -87,6 +86,7 @@ ohos_unittest("distributed_input_sourcetrans_test") { "distributed_hardware_fwk:libdhfwk_sdk", "eventhandler:libeventhandler", "hitrace:hitrace_meter", + "json:nlohmann_json_static", ] cflags_cc = [ "-DHILOG_ENABLE" ] diff --git a/services/state/BUILD.gn b/services/state/BUILD.gn index 5d14f9f..d1d3fe9 100644 --- a/services/state/BUILD.gn +++ b/services/state/BUILD.gn @@ -35,7 +35,7 @@ ohos_shared_library("libdinput_sink_state") { "${services_source_path}/inputinject/include", "${services_sink_path}/transport/include", "${frameworks_path}/include", - "${fwk_common_path}/utils/include", + "${common_path}/utils/include", ] sources = [ diff --git a/services/state/test/dinpusinkstatetest/BUILD.gn b/services/state/test/dinpusinkstatetest/BUILD.gn index 3251422..cdd87ff 100644 --- a/services/state/test/dinpusinkstatetest/BUILD.gn +++ b/services/state/test/dinpusinkstatetest/BUILD.gn @@ -28,7 +28,7 @@ ohos_unittest("dinput_sink_state_test") { include_dirs = [ "${common_path}/include", - "${fwk_common_path}/utils/include", + "${common_path}/utils/include", "${services_state_path}/include", ] @@ -52,8 +52,6 @@ ohos_unittest("dinput_sink_state_test") { "//third_party/libevdev:libevdev", ] - external_deps = [ "c_utils:utils" ] - cflags_cc = [ "-DHILOG_ENABLE" ] } ## UnitTest dinput_sink_state_test }}} diff --git a/services/transportbase/BUILD.gn b/services/transportbase/BUILD.gn index cf5fa16..518d6c6 100644 --- a/services/transportbase/BUILD.gn +++ b/services/transportbase/BUILD.gn @@ -30,9 +30,8 @@ ohos_shared_library("libdinput_trans_base") { "include", "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", "${dfx_utils_path}/include", "${utils_path}/include", @@ -63,6 +62,7 @@ ohos_shared_library("libdinput_trans_base") { "eventhandler:libeventhandler", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/services/transportbase/test/transbaseunittest/BUILD.gn b/services/transportbase/test/transbaseunittest/BUILD.gn index 9868599..c98050d 100644 --- a/services/transportbase/test/transbaseunittest/BUILD.gn +++ b/services/transportbase/test/transbaseunittest/BUILD.gn @@ -34,14 +34,13 @@ ohos_unittest("distributed_input_transbase_test") { "${distributedinput_path}/services/transportbase/include", "${common_path}/include", "${fwk_interfaces_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${service_common}/include", "${services_source_path}/inputinject/include", "${dfx_utils_path}/include", "${utils_path}/include", "${frameworks_path}/include", - "//third_party/json/include", "${distributedinput_path}/inputdevicehandler/include", "${distributedinput_path}/services/state/include", "${common_path}/test/mock", @@ -87,6 +86,7 @@ ohos_unittest("distributed_input_transbase_test") { "hicollie:libhicollie", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", ] cflags_cc = [ "-DHILOG_ENABLE" ] diff --git a/sinkhandler/BUILD.gn b/sinkhandler/BUILD.gn index 66ce305..cf50409 100644 --- a/sinkhandler/BUILD.gn +++ b/sinkhandler/BUILD.gn @@ -35,8 +35,8 @@ ohos_shared_library("libdinput_sink_handler") { "${frameworks_path}/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${dfx_utils_path}/include", "${utils_path}/include", "${fwk_interfaces_path}/include", diff --git a/sinkhandler/test/unittest/BUILD.gn b/sinkhandler/test/unittest/BUILD.gn index 1c566b6..7e6f45c 100755 --- a/sinkhandler/test/unittest/BUILD.gn +++ b/sinkhandler/test/unittest/BUILD.gn @@ -37,9 +37,8 @@ ohos_unittest("distributed_input_sink_handler_test") { "${frameworks_path}/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${dfx_utils_path}/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", @@ -79,6 +78,7 @@ ohos_unittest("distributed_input_sink_handler_test") { "eventhandler:libeventhandler", "hisysevent:libhisysevent", "ipc:ipc_core", + "json:nlohmann_json_static", "samgr:samgr_proxy", ] diff --git a/sourcehandler/BUILD.gn b/sourcehandler/BUILD.gn index d1c85cd..b4e1b98 100644 --- a/sourcehandler/BUILD.gn +++ b/sourcehandler/BUILD.gn @@ -35,8 +35,8 @@ ohos_shared_library("libdinput_source_handler") { "${frameworks_path}/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${dfx_utils_path}/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", diff --git a/sourcehandler/test/unittest/BUILD.gn b/sourcehandler/test/unittest/BUILD.gn index 5bc8a1e..72382f7 100755 --- a/sourcehandler/test/unittest/BUILD.gn +++ b/sourcehandler/test/unittest/BUILD.gn @@ -37,9 +37,8 @@ ohos_unittest("distributed_input_source_handler_test") { "${frameworks_path}/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${dfx_utils_path}/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", @@ -81,6 +80,7 @@ ohos_unittest("distributed_input_source_handler_test") { "eventhandler:libeventhandler", "hisysevent:libhisysevent", "ipc:ipc_core", + "json:nlohmann_json_static", "samgr:samgr_proxy", ] diff --git a/test/fuzztest/dinputconfigdh_fuzzer/BUILD.gn b/test/fuzztest/dinputconfigdh_fuzzer/BUILD.gn index 4cd6034..a4cf157 100644 --- a/test/fuzztest/dinputconfigdh_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputconfigdh_fuzzer/BUILD.gn @@ -36,9 +36,8 @@ ohos_fuzztest("DinputConfigDhFuzzTest") { "${distributedinput_path}/services/state/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${services_source_path}/inputinject/include", @@ -64,6 +63,7 @@ ohos_fuzztest("DinputConfigDhFuzzTest") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/dinputinitsink_fuzzer/BUILD.gn b/test/fuzztest/dinputinitsink_fuzzer/BUILD.gn index 6e0bb91..6268a12 100644 --- a/test/fuzztest/dinputinitsink_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputinitsink_fuzzer/BUILD.gn @@ -34,9 +34,8 @@ ohos_fuzztest("DinputInitSinkFuzzTest") { "${distributedinput_path}/inputdevicehandler/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${services_source_path}/inputinject/include", @@ -62,6 +61,7 @@ ohos_fuzztest("DinputInitSinkFuzzTest") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/dinputinitsource_fuzzer/BUILD.gn b/test/fuzztest/dinputinitsource_fuzzer/BUILD.gn index a04e4bb..2056ef9 100644 --- a/test/fuzztest/dinputinitsource_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputinitsource_fuzzer/BUILD.gn @@ -36,9 +36,8 @@ ohos_fuzztest("DinputInitSourceFuzzTest") { "${distributedinput_path}/inputdevicehandler/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${services_source_path}/inputinject/include", @@ -64,6 +63,7 @@ ohos_fuzztest("DinputInitSourceFuzzTest") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/dinputonsessionclosed_fuzzer/BUILD.gn b/test/fuzztest/dinputonsessionclosed_fuzzer/BUILD.gn index 29f3fd5..544f2b2 100644 --- a/test/fuzztest/dinputonsessionclosed_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputonsessionclosed_fuzzer/BUILD.gn @@ -28,13 +28,12 @@ ohos_fuzztest("DinputOnSessionClosedFuzzTest") { "${services_source_path}/transport/include", "${distributedinput_path}/services/transportbase/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${service_common}/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", "${frameworks_path}/include", @@ -65,6 +64,7 @@ ohos_fuzztest("DinputOnSessionClosedFuzzTest") { "eventhandler:libeventhandler", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/dinputonsessionopend_fuzzer/BUILD.gn b/test/fuzztest/dinputonsessionopend_fuzzer/BUILD.gn index ff6e76f..9e1616c 100644 --- a/test/fuzztest/dinputonsessionopend_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputonsessionopend_fuzzer/BUILD.gn @@ -28,13 +28,12 @@ ohos_fuzztest("DinputOnSessionOpendFuzzTest") { "${services_source_path}/transport/include", "${distributedinput_path}/services/transportbase/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${service_common}/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", "${frameworks_path}/include", @@ -65,6 +64,7 @@ ohos_fuzztest("DinputOnSessionOpendFuzzTest") { "eventhandler:libeventhandler", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn b/test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn index cbad993..20cc882 100644 --- a/test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn @@ -34,9 +34,8 @@ ohos_fuzztest("DinputReleaseSinkFuzzTest") { "${distributedinput_path}/inputdevicehandler/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${services_source_path}/inputinject/include", @@ -62,6 +61,7 @@ ohos_fuzztest("DinputReleaseSinkFuzzTest") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn b/test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn index 586398e..6703d04 100644 --- a/test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn @@ -36,9 +36,8 @@ ohos_fuzztest("DinputReleaseSourceFuzzTest") { "${distributedinput_path}/services/state/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${services_source_path}/inputinject/include", @@ -64,6 +63,7 @@ ohos_fuzztest("DinputReleaseSourceFuzzTest") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/dinputsubscribelocaldh_fuzzer/BUILD.gn b/test/fuzztest/dinputsubscribelocaldh_fuzzer/BUILD.gn index d21303c..a8df768 100644 --- a/test/fuzztest/dinputsubscribelocaldh_fuzzer/BUILD.gn +++ b/test/fuzztest/dinputsubscribelocaldh_fuzzer/BUILD.gn @@ -34,9 +34,8 @@ ohos_fuzztest("DinputSubscribeLocalDhFuzzTest") { "${distributedinput_path}/inputdevicehandler/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${services_source_path}/inputinject/include", @@ -62,6 +61,7 @@ ohos_fuzztest("DinputSubscribeLocalDhFuzzTest") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/distributedinputclient_fuzzer/BUILD.gn b/test/fuzztest/distributedinputclient_fuzzer/BUILD.gn index f7075ec..4c76044 100755 --- a/test/fuzztest/distributedinputclient_fuzzer/BUILD.gn +++ b/test/fuzztest/distributedinputclient_fuzzer/BUILD.gn @@ -38,9 +38,8 @@ ohos_fuzztest("DistributedInputClientFuzzTest") { "${distributedinput_path}/services/state/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${services_source_path}/inputinject/include", @@ -66,6 +65,7 @@ ohos_fuzztest("DistributedInputClientFuzzTest") { "dsoftbus:softbus_client", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/distributedinputkit_fuzzer/BUILD.gn b/test/fuzztest/distributedinputkit_fuzzer/BUILD.gn index 8587028..d0b2976 100755 --- a/test/fuzztest/distributedinputkit_fuzzer/BUILD.gn +++ b/test/fuzztest/distributedinputkit_fuzzer/BUILD.gn @@ -36,9 +36,8 @@ ohos_fuzztest("DistributedInputKitFuzzTest") { "${distributedinput_path}/inputdevicehandler/include", "${service_common}/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", - "//third_party/json/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${utils_path}/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", @@ -64,6 +63,7 @@ ohos_fuzztest("DistributedInputKitFuzzTest") { "c_utils:utils", "eventhandler:libeventhandler", "ipc:ipc_core", + "json:nlohmann_json_static", ] defines = [ diff --git a/test/fuzztest/distributedinputsinktransport_fuzzer/BUILD.gn b/test/fuzztest/distributedinputsinktransport_fuzzer/BUILD.gn index 4aaf7f9..ed3d9e6 100755 --- a/test/fuzztest/distributedinputsinktransport_fuzzer/BUILD.gn +++ b/test/fuzztest/distributedinputsinktransport_fuzzer/BUILD.gn @@ -29,11 +29,10 @@ ohos_fuzztest("DistributedInputSinkTransportFuzzTest") { "${distributedinput_path}/services/transportbase/include", "${common_path}/include", "${frameworks_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${service_common}/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", ] @@ -64,6 +63,7 @@ ohos_fuzztest("DistributedInputSinkTransportFuzzTest") { "eventhandler:libeventhandler", "hicollie:libhicollie", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/distributedinputsourcetransport_fuzzer/BUILD.gn b/test/fuzztest/distributedinputsourcetransport_fuzzer/BUILD.gn index 36490e1..2fec276 100755 --- a/test/fuzztest/distributedinputsourcetransport_fuzzer/BUILD.gn +++ b/test/fuzztest/distributedinputsourcetransport_fuzzer/BUILD.gn @@ -28,13 +28,12 @@ ohos_fuzztest("DistributedInputSourceTransportFuzzTest") { "${services_source_path}/transport/include", "${distributedinput_path}/services/transportbase/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${service_common}/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", "${frameworks_path}/include", @@ -69,6 +68,7 @@ ohos_fuzztest("DistributedInputSourceTransportFuzzTest") { "eventhandler:libeventhandler", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/test/fuzztest/distributedinputtransportbase_fuzzer/BUILD.gn b/test/fuzztest/distributedinputtransportbase_fuzzer/BUILD.gn index 4ae5eb6..14e86b3 100644 --- a/test/fuzztest/distributedinputtransportbase_fuzzer/BUILD.gn +++ b/test/fuzztest/distributedinputtransportbase_fuzzer/BUILD.gn @@ -28,13 +28,12 @@ ohos_fuzztest("DistributedInputTransportBaseFuzzTest") { "${services_source_path}/transport/include", "${distributedinput_path}/services/transportbase/include", "${common_path}/include", - "${fwk_common_path}/log/include", - "${fwk_common_path}/utils/include", + "${common_path}/log/include", + "${common_path}/utils/include", "${fwk_interfaces_path}/include", "${service_common}/include", "${services_source_path}/inputinject/include", "${services_source_path}/transport/include", - "//third_party/json/include", "${dfx_utils_path}/include", "${utils_path}/include", "${frameworks_path}/include", @@ -68,6 +67,7 @@ ohos_fuzztest("DistributedInputTransportBaseFuzzTest") { "eventhandler:libeventhandler", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "safwk:system_ability_fwk", ] diff --git a/utils/BUILD.gn b/utils/BUILD.gn index ce1a1a8..be8d53c 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -27,13 +27,11 @@ ohos_shared_library("libdinput_utils") { branch_protector_ret = "pac_ret" include_dirs = [ "${av_transport_path}/common/include", - "${fwk_common_path}/utils/include", - "${fwk_common_path}/log/include", - "//third_party/json/include", + "${common_path}/utils/include", + "${common_path}/log/include", "${utils_path}/include", "${common_path}/include", "${service_common}/include", - "//third_party/json/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${dfx_utils_path}/include", @@ -52,8 +50,6 @@ ohos_shared_library("libdinput_utils") { "LOG_DOMAIN=0xD004120", ] - deps = [ "//third_party/openssl:libcrypto_shared" ] - external_deps = [ "c_utils:utils", "distributed_hardware_fwk:libdhfwk_sdk", @@ -61,6 +57,8 @@ ohos_shared_library("libdinput_utils") { "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", + "json:nlohmann_json_static", + "openssl:libcrypto_shared", "samgr:samgr_proxy", ] diff --git a/utils/test/unittest/BUILD.gn b/utils/test/unittest/BUILD.gn index 6f38c9f..c8e1949 100644 --- a/utils/test/unittest/BUILD.gn +++ b/utils/test/unittest/BUILD.gn @@ -29,15 +29,14 @@ ohos_unittest("distributed_input_utils_test") { include_dirs = [ "${av_transport_path}/common/include", - "${fwk_common_path}/utils/include", - "${fwk_common_path}/log/include", + "${common_path}/utils/include", + "${common_path}/log/include", "${utils_path}/include", "${utils_path}/test/unittest", "${common_path}/include", "${fwk_interfaces_path}/include", "${fwk_interfaces_path}/include/ipc", "${frameworks_path}/include", - "//third_party/json/include", "${common_path}/test/mock", "${service_common}/include", ] @@ -67,7 +66,6 @@ ohos_unittest("distributed_input_utils_test") { deps = [ "${utils_path}:libdinput_utils", - "//third_party/openssl:libcrypto_shared", ] external_deps = [ @@ -76,6 +74,8 @@ ohos_unittest("distributed_input_utils_test") { "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", + "json:nlohmann_json_static", + "openssl:libcrypto_shared", "samgr:samgr_proxy", ] -- Gitee