diff --git a/bundle.json b/bundle.json index e0bd4b12a3cafef6fd2ac46c4908ae0dde12ec14..ebc2d1e910395973792e72ee4296959039d7e215 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 f305114dd94f304398170f5b86744b53491bd05d..2e8a3bf1cc64605ee3f394ae8dc1e52e020b7e16 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 0000000000000000000000000000000000000000..51c06a5614e8c65c52eab776de7f67c0b8627820 --- /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 0000000000000000000000000000000000000000..66dec78396da23cec4679166d9a6f17fe6b4f766 --- /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 0000000000000000000000000000000000000000..0f383ad9577185f4f73442e930c99cfecbed256b --- /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 0000000000000000000000000000000000000000..173e96bf8d69a6c117e79e4a6c12ddc7e251b886 --- /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 0000000000000000000000000000000000000000..4dd9fd14027fb597e3f5bcde0dae66b9d1790ef8 --- /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 0000000000000000000000000000000000000000..bcbe6338f28ed5bd4d945efd8464c0c979fbd7f3 --- /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 0000000000000000000000000000000000000000..090e700598a620bf97f563b06902cbb7ad6ce25c --- /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 0000000000000000000000000000000000000000..dc2cf8948f1c1d6b342370cbfd1cfb9bb1e670d5 --- /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 0000000000000000000000000000000000000000..705158510e93a9b0ae53212cc4f02e1d73174cd3 --- /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 0000000000000000000000000000000000000000..3517bb3ec982d87394694692b124cdee7089dc90 --- /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 0000000000000000000000000000000000000000..fa0f75e98aada3422a6203afb1f50d828d60d280 --- /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 0000000000000000000000000000000000000000..151260e27ecd2cb68b2b963f91108d4f49a6e3a8 --- /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 0000000000000000000000000000000000000000..104681acb50af230904324ad9cc21b1580a8b396 --- /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 baff9a81de8b2e9f5a9b0be072aef82abc045a93..6038f0e8401a407f42a3fb900ab9e1e340ead4cc 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 354c2197187d6aec2c6ae52fa73e94c11084132c..0b7172948f546873200465bf125aafbdf38f7410 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 963087df245ae9724e4ace4fe5f0fbb4467d0323..87d928cdda1191f24f25642dadc70dd784bab40d 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 f770e8dbc335b252d541fac724e84702b49710a3..8c423722ef399899a91ec8e72ecca01c875ed93d 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 840aa3b137cf79d851ab1079a7019df3a8a4f78b..56c02cdaa7321a2df157215d04583fa714c1bb33 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 c866c1cef995ef79525230cca1119d82aa63100e..beff13b1edcfeddc42ff93607dc26f837a404f4d 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 a58e51ccd7451f9effd48273550e7b20e8a5ac76..996a1dc297d723ae78c8f1335a94373cb6db1a73 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 208d6b2811216c16966c1b4320621fc02e39ee88..91f2c1b618c6cf92dcfb083a814a6d0e02ace8e1 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 d659e7b47f5e1836a7899b68523b6f2aeaffb4a3..e0f9470173aa5317ed540b6f96db99c33c1fc5a3 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 dd96fc98bb08552855654be5ce41a07fc07762a5..e2081eb95586d8f56562944edbdc58ee001e8318 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 1a64cadb9047b74cbe93be9c74be0bd689db2536..2bbf9eac731326e313f60a46f5718e29116592a8 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 6fa67dacacc3f9be30e2937eb7e83d78d0c69499..b16577ef771f82fb4aa9e79eaf028f5411ff2023 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 697586b1ec26eab4f8375fbeaa2af70194fa1647..0362d1b91b7207603eb9eb9a0335b1476c1fc61a 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 2078145ac859c4a215e948e3641e4d2f029848f1..d19d7d9d9a316320043711736e05f11938a71629 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 dffe5539586e0d0e24b70fd6b0d9d532cd81f73a..5945e3e4139ed8b404b10483b13fce9fcc833c84 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 37a7dca6e6137767ee3f362d84845226f64566ba..a50e08b95a1ac06b3eee706de939757d78a188e9 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 23700c96dda518fa6d67332c3517585891bf5374..c322b8befa4bb8fb286cc4dbd49e5d9a0cc57aa0 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 dba81c92bd1eea153679fcb24b7e0f1f7cc0f488..a54bdce9f9568c3827579db7d1cba9cd842149bc 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 e8dfd2e9f97a9ff0b10bd6534d93b95e36c31bc0..81d98d7a49ba75b328cf50339b242a92c84af302 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 1b981b6879c0c62cb9e8e9ddc9a89ee78344e4d7..be470564dbc5d97d53e1c213e65960d91ed27b66 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 bef2ff5060db5daea19ac527466dc1c067657a2c..d734901253f25d2bf132f08ea321f0982901b458 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 8c41812eb9a624015235fe255e3d770f028ce6cc..5fa4726423785161795ef993c5827cdcdf894ebb 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 536f99cbf62be79cd461ac6ec536e3907dc60c9d..d8afb9f6d6a2566124c0dd61ae014d34135450dd 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 3a5b758cbbb320b5a095fa298e5725fa1c55ee1d..efe67523b6e0303f045df2193cd80c6bb6852b72 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 a762f176066b7e1147979fe7a4f34bca4df79abf..789a64a30997f419f333bc0d7fcf0f0657c44223 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 95ee5bd0db486b32f228d9392cafadb04abfc560..645f80b057a0993004898403d0ee8d3e6eaaabb5 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 5d14f9fbb10ed1a897d1f5a86256549f2424ad95..d1d3fe9f70cbdc3dfb031ae92251f6288ad360c3 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 325142293aa969663f70143409fd530de8827438..cdd87ff81b2b1b21de86ee18c401eacef76fc79c 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 cf5fa169cba7256b8a9447e44b0d501634749c48..518d6c626d8e0563dbc685e4bb5c63be481aba1d 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 98685993c88271a3828a00e3902ee92d55df43f5..c98050d7071a9f30a059dc5f438d995c3740cf1a 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 66ce305bfb6f5690785f1fe1b58570cd426c740e..cf50409a2fb099234f86d6d509102e00722723f0 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 1c566b68c7af39ebd85a55a757ae695affa9e1b8..7e6f45cbabb09ed188b107297f8576494882bed2 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 d1c85cdfb248ffa5c05d659cd5ac18ac0bf25fc3..b4e1b986b6459b9671fe647476756639813c9fa6 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 5bc8a1e3c4566f932b756f8e106eba092dc6d359..72382f7c8258fabc84214a625bdcc612e03e5267 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 4cd6034c06a837fa0dfe66c370bced1485065a8e..a4cf157547320f3bf5036860bad17cde3aa4043d 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 6e0bb9105fbc461c543ca2cd1312a75e2bc87882..6268a129a71af304b4fcb784abb4e901877082e2 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 a04e4bb907f2680af2f81f19c7a7ac08176a71e1..2056ef9f0b7eeee9977b7c4cc9ba52f28eb7c0be 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 29f3fd5e930c5d4c1abfbb8a1c2abe35bd357e30..544f2b21abb3055a0f3af7e74cfe02d20abec3fa 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 ff6e76f8cd2a8dc0c6c8ca86db6f9d2d922a651d..9e1616c3f329916aaf8fc766e72faecf9d69f9af 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 cbad99328292ec77a7b82196cc1aba06ee952193..20cc882f7cfa956b29296a9025a440f38f099fcb 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 586398ee9705aa93d8497e40e4dab924011c070f..6703d04ed6075cafe3b63110affe98b2040f3a92 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 d21303cf8d9e3c1a7bdb06873ee434c09b48c8d6..a8df768e322e8220f3a02c2c5df8a6c3b5a85102 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 f7075ecfdf0ad52c208ae3f22c56981ea67ae4df..4c760449eeab763a7d7914969cd8217e2aacc6da 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 858702804ee9a4291bdf43a5b083801cc9d540f9..d0b2976260f429b642cc3945f4d61cdf65aa46ae 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 4aaf7f94672a7098bdb03921845470ed1e1be384..ed3d9e699908077a375c0ee98fe774cb2df96324 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 36490e15b25134589848cc349d593a53172bae90..2fec276e831ac12fbcfcc6ac792b4293d8f8d8f6 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 4ae5eb60987fd665e8c474c1ab6345ae68c7e723..14e86b370b27272983dd768479e7489bdd4b5c18 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 ce1a1a82777a2ccd6bd71345610b003b8229de00..be8d53cd3bac9956c6bbbf0dfbede369baeea13c 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 6f38c9fd3ea71ac7d3caeded5f376b81f38eb2b2..c8e19496f4c2bc669036a261cf5756fe72dd7d05 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", ]