From cc82698edee3ee2715c5f615ed31f50a9cbdae55 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Wed, 13 Jul 2022 19:33:35 +0800 Subject: [PATCH 1/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- .../inner_kits/native_cpp/include/device_manager.h | 6 +++--- .../inner_kits/native_cpp/include/dm_device_info.h | 2 +- .../native_cpp/include/ipc/ipc_client_proxy.h | 7 ++++--- .../include/ipc/standard/ipc_client_server_proxy.h | 7 +++++-- .../include/ipc/standard/ipc_client_stub.h | 9 +++++---- .../native_cpp/src/ipc/ipc_client_proxy.cpp | 4 +++- .../src/ipc/standard/ipc_client_server_proxy.cpp | 6 ++++-- .../src/ipc/standard/ipc_client_stub.cpp | 10 +++++++--- .../native_cpp/src/ipc/standard/ipc_cmd_parser.cpp | 10 ++++++++++ .../src/dependency/hichain/hichain_connector.cpp | 2 ++ .../src/dependency/softbus/softbus_session.cpp | 1 + utils/include/dfx/standard/dm_hidumper.h | 5 +---- utils/include/dfx/standard/dm_hisysevent.h | 11 ++--------- utils/include/dfx/standard/dm_hitrace.h | 7 +------ utils/include/dm_anonymous.h | 3 ++- utils/include/dm_error_message.h | 5 +---- utils/include/dm_hash.h | 8 +------- utils/include/dm_random.h | 2 +- .../standard/dm_distributed_hardware_load.h | 7 ++++--- utils/include/ipc/standard/ipc_cmd_register.h | 6 ++---- utils/src/dfx/standard/dm_hidumper.cpp | 14 +++++++++----- utils/src/dfx/standard/dm_hisysevent.cpp | 5 +++++ utils/src/dm_anonymous.cpp | 2 ++ utils/src/dm_error_message.cpp | 3 +++ utils/src/dm_hash.cpp | 1 + utils/src/dm_random.cpp | 7 ++----- .../standard/dm_distributed_hardware_load.cpp | 6 ++++++ utils/src/ipc/standard/ipc_cmd_register.cpp | 7 ++++++- 28 files changed, 94 insertions(+), 69 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index 0794ca5b..dcdcabc5 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -17,12 +17,12 @@ #define OHOS_DEVICE_MANAGER_H #include -#include #include - -#include "device_manager_callback.h" #include "dm_device_info.h" +#include "device_manager_callback.h" #include "dm_subscribe_info.h" +#include // for int32_t, uint16_t +#include // for string namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/include/dm_device_info.h b/interfaces/inner_kits/native_cpp/include/dm_device_info.h index 04a14602..cc085a7c 100644 --- a/interfaces/inner_kits/native_cpp/include/dm_device_info.h +++ b/interfaces/inner_kits/native_cpp/include/dm_device_info.h @@ -17,7 +17,7 @@ #define OHOS_DM_DEVICE_INFO_H #include - +#include #include "dm_app_image_info.h" #define DM_MAX_DEVICE_ID_LEN (96) diff --git a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h index f3af99cf..abd0ed35 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h @@ -18,10 +18,11 @@ #include #include - #include "ipc_client.h" -#include "ipc_req.h" -#include "ipc_rsp.h" +#include "iosfwd" +#include "ipc_def.h" +namespace OHOS::DistributedHardware{ class IpcReq; } +namespace OHOS::DistributedHardware{ class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h index 1fbf3ac7..f664959e 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h @@ -18,11 +18,14 @@ #include #include - #include "ipc_remote_broker.h" +#include "iremote_proxy.h" +#include "functional" // for __base +#include "iremote_broker.h" // for BrokerDelegator +#include "refbase.h" // for sptr #include "ipc_req.h" #include "ipc_rsp.h" -#include "iremote_proxy.h" +namespace OHOS{ class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h index d63dd56f..e5bc8f34 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h @@ -18,12 +18,13 @@ #include #include - #include "ipc_remote_broker.h" -#include "ipc_req.h" -#include "ipc_rsp.h" -#include "iremote_broker.h" #include "iremote_stub.h" +#include "refbase.h" // for sptr +namespace OHOS{ class MessageOption; } +namespace OHOS{ class MessageParcel; } +namespace OHOS::DistributedHardware{ class IpcReq; } +namespace OHOS::DistributedHardware{ class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp b/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp index 4e82edf7..19bd9063 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp @@ -14,9 +14,11 @@ */ #include "ipc_client_proxy.h" - #include "dm_constants.h" #include "dm_log.h" +#include +namespace OHOS::DistributedHardware{ class IpcReq; } +namespace OHOS::DistributedHardware{ class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp index 5b92a54e..05196bf9 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp @@ -14,11 +14,13 @@ */ #include "ipc_client_server_proxy.h" - #include "dm_constants.h" #include "dm_log.h" #include "ipc_cmd_register.h" -#include "ipc_types.h" +#include "iremote_object.h" // for IRemoteObject +#include // for shared_ptr +#include "message_option.h" // for MessageOption +#include "message_parcel.h" // for MessageParcel namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp index 5e384e21..a50d5f9e 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp @@ -14,12 +14,16 @@ */ #include "ipc_client_stub.h" - #include "dm_constants.h" #include "dm_log.h" #include "ipc_cmd_register.h" -#include "ipc_skeleton.h" -#include "ipc_types.h" +#include "ipc_object_stub.h" // for IPCObjectStub +#include // for shared_ptr +#include "message_option.h" // for MessageOption +#include "message_parcel.h" // for MessageParcel +#include // for operator!=, u16string +namespace OHOS::DistributedHardware{ class IpcReq; } +namespace OHOS::DistributedHardware{ class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp index 72457640..8f81551d 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp @@ -14,6 +14,8 @@ */ #include "device_manager_notify.h" +#include // for size_t +#include // for int32_t, int16_t #include "dm_constants.h" #include "dm_device_info.h" #include "dm_log.h" @@ -38,6 +40,14 @@ #include "ipc_verify_authenticate_req.h" #include "ipc_register_dev_state_callback_req.h" #include "securec.h" +#include "dm_subscribe_info.h" // for DmSubscribeInfo +#include "iosfwd" // for string +#include // for shared_ptr, static_... +#include "message_parcel.h" // for MessageParcel +#include "refbase.h" // for sptr +#include // for basic_string +#include // for vector +namespace OHOS{ class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/services/implementation/src/dependency/hichain/hichain_connector.cpp b/services/implementation/src/dependency/hichain/hichain_connector.cpp index 29d2a9be..3d4429ca 100644 --- a/services/implementation/src/dependency/hichain/hichain_connector.cpp +++ b/services/implementation/src/dependency/hichain/hichain_connector.cpp @@ -30,6 +30,8 @@ #include "multiple_user_connector.h" #include "nlohmann/json.hpp" #include "parameter.h" +#include "dm_dfx_constants.h" +#include "unistd.h" namespace OHOS { namespace DistributedHardware { diff --git a/services/implementation/src/dependency/softbus/softbus_session.cpp b/services/implementation/src/dependency/softbus/softbus_session.cpp index 7a49e6cd..42b14724 100644 --- a/services/implementation/src/dependency/softbus/softbus_session.cpp +++ b/services/implementation/src/dependency/softbus/softbus_session.cpp @@ -21,6 +21,7 @@ #include "dm_log.h" #include "nlohmann/json.hpp" #include "softbus_connector.h" +#include "dm_dfx_constants.h" namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dfx/standard/dm_hidumper.h b/utils/include/dfx/standard/dm_hidumper.h index 51397d7e..251a98dd 100644 --- a/utils/include/dfx/standard/dm_hidumper.h +++ b/utils/include/dfx/standard/dm_hidumper.h @@ -17,15 +17,12 @@ #define OHOS_DM_HIDUMPER_H #include -#include #include #include - -#include "dm_constants.h" #include "dm_dfx_constants.h" #include "single_instance.h" -#include "dm_log.h" #include "dm_device_info.h" +#include "iosfwd" // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dfx/standard/dm_hisysevent.h b/utils/include/dfx/standard/dm_hisysevent.h index a7296ad4..4219473a 100644 --- a/utils/include/dfx/standard/dm_hisysevent.h +++ b/utils/include/dfx/standard/dm_hisysevent.h @@ -16,15 +16,8 @@ #ifndef OHOS_DISTRIBUTED_DM_HISYSEVENT_H #define OHOS_DISTRIBUTED_DM_HISYSEVENT_H -#include "dm_anonymous.h" -#include "dm_log.h" -#include "dm_constants.h" -#include "dm_dfx_constants.h" -#include "hisysevent.h" -#include "single_instance.h" - -#include -#include +#include // for int32_t +#include "iosfwd" // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dfx/standard/dm_hitrace.h b/utils/include/dfx/standard/dm_hitrace.h index a8374deb..de8b4e85 100644 --- a/utils/include/dfx/standard/dm_hitrace.h +++ b/utils/include/dfx/standard/dm_hitrace.h @@ -16,12 +16,7 @@ #ifndef OHOS_DM_HITRACE_H #define OHOS_DM_HITRACE_H -#include - -#include "hitrace_meter.h" - -#include "dm_constants.h" -#include "dm_dfx_constants.h" +#include "iosfwd" // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_anonymous.h b/utils/include/dm_anonymous.h index 16d47661..686ffba3 100644 --- a/utils/include/dm_anonymous.h +++ b/utils/include/dm_anonymous.h @@ -16,7 +16,8 @@ #ifndef OHOS_DM_ANONYMOUS_H #define OHOS_DM_ANONYMOUS_H -#include +#include // for int32_t +#include "iosfwd" // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_error_message.h b/utils/include/dm_error_message.h index ba5dfe8e..9c458c8b 100644 --- a/utils/include/dm_error_message.h +++ b/utils/include/dm_error_message.h @@ -16,10 +16,7 @@ #ifndef OHOS_DM_ERROMSG_H #define OHOS_DM_ERROMSG_H -#include "dm_log.h" -#include "dm_constants.h" - -#include +#include "iosfwd" // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_hash.h b/utils/include/dm_hash.h index 77c3269e..bcc07cd7 100644 --- a/utils/include/dm_hash.h +++ b/utils/include/dm_hash.h @@ -16,13 +16,7 @@ #ifndef OHOS_DM_HASH_H #define OHOS_DM_HASH_H -#include -#include "base64.h" -#include "ctr_drbg.h" -#include "entropy.h" -#include "gcm.h" -#include "md.h" -#include "platform.h" +#include // for int32_t, uint8_t, uint32_t namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_random.h b/utils/include/dm_random.h index 744c95d3..d7ec70a8 100644 --- a/utils/include/dm_random.h +++ b/utils/include/dm_random.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_RANDOM_H #define OHOS_DM_RANDOM_H -#include +#include // for int32_t, int64_t, uint32_t, uint8_t namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/fwkload/standard/dm_distributed_hardware_load.h b/utils/include/fwkload/standard/dm_distributed_hardware_load.h index ca3aed65..90425f02 100644 --- a/utils/include/fwkload/standard/dm_distributed_hardware_load.h +++ b/utils/include/fwkload/standard/dm_distributed_hardware_load.h @@ -15,11 +15,12 @@ #ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H #define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H -#include "if_system_ability_manager.h" -#include "iservice_registry.h" + #include "single_instance.h" -#include "system_ability_definition.h" #include "system_ability_load_callback_stub.h" +#include // for int32_t, uint32_t +#include "refbase.h" // for sptr +namespace OHOS{ class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/ipc/standard/ipc_cmd_register.h b/utils/include/ipc/standard/ipc_cmd_register.h index 7cd07eb5..632214c6 100644 --- a/utils/include/ipc/standard/ipc_cmd_register.h +++ b/utils/include/ipc/standard/ipc_cmd_register.h @@ -19,12 +19,10 @@ #include #include #include - +#include "single_instance.h" #include "ipc_req.h" #include "ipc_rsp.h" -#include "ipc_types.h" -#include "iremote_broker.h" -#include "single_instance.h" +namespace OHOS{ class MessageParcel; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dfx/standard/dm_hidumper.cpp b/utils/src/dfx/standard/dm_hidumper.cpp index 9d57e9b1..eeb7f359 100644 --- a/utils/src/dfx/standard/dm_hidumper.cpp +++ b/utils/src/dfx/standard/dm_hidumper.cpp @@ -13,12 +13,16 @@ * limitations under the License. */ -#include - -#include "dm_anonymous.h" -#include "dm_dfx_constants.h" -#include "dm_device_info.h" +#include // for basic_string, operator==, hash #include "dm_hidumper.h" +#include "dm_anonymous.h" // for GetAnonyString +#include "dm_constants.h" // for DM_OK, ERR_DM_FAILED +#include "dm_device_info.h" // for DmDeviceInfo +#include "dm_dfx_constants.h" // for HidumperFlag, DumperInfo, MAP_ARGS +#include "dm_log.h" // for LOGI, LOGE +#include // for __hash_map_const_iterator, unordered_map +#include // for pair +#include // for vector namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dfx/standard/dm_hisysevent.cpp b/utils/src/dfx/standard/dm_hisysevent.cpp index 599cf5ad..4fa0edb4 100644 --- a/utils/src/dfx/standard/dm_hisysevent.cpp +++ b/utils/src/dfx/standard/dm_hisysevent.cpp @@ -14,6 +14,11 @@ */ #include "dm_hisysevent.h" +#include "dm_constants.h" // for DM_OK +#include "dm_log.h" // for LOGE +#include "hisysevent.h" // for HiSysEvent, HiSysEvent::Domain, HiSysEvent... +#include // for basic_string +#include "unistd.h" // for getpid, getuid namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dm_anonymous.cpp b/utils/src/dm_anonymous.cpp index 91ab33b6..9ea87d8a 100644 --- a/utils/src/dm_anonymous.cpp +++ b/utils/src/dm_anonymous.cpp @@ -15,6 +15,8 @@ #include "dm_anonymous.h" #include "dm_log.h" +#include // for size_t +#include // for basic_string, to_string namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dm_error_message.cpp b/utils/src/dm_error_message.cpp index 987c7900..33554c17 100644 --- a/utils/src/dm_error_message.cpp +++ b/utils/src/dm_error_message.cpp @@ -14,6 +14,9 @@ */ #include "dm_error_message.h" +#include // for uint32_t +#include "dm_constants.h" // for ERR_DM_AUTH_BUSINESS_BUSY, ERR_DM_AUTH_FAILED +#include // for basic_string namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dm_hash.cpp b/utils/src/dm_hash.cpp index 1695b230..817d92a1 100644 --- a/utils/src/dm_hash.cpp +++ b/utils/src/dm_hash.cpp @@ -16,6 +16,7 @@ #include "dm_log.h" #include "dm_constants.h" #include "dm_hash.h" +#include "md.h" // for mbedtls_md_free, mbedtls_md_finish, mbedtl... namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dm_random.cpp b/utils/src/dm_random.cpp index 21dff422..b48705cc 100644 --- a/utils/src/dm_random.cpp +++ b/utils/src/dm_random.cpp @@ -14,15 +14,12 @@ */ #include "dm_random.h" - #include - #include "dm_constants.h" -#include "mbedtls/base64.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/entropy.h" -#include "mbedtls/gcm.h" -#include "mbedtls/md.h" +#include // for free, malloc +#include // for uniform_int_distribution #if defined(__LITEOS_M__) #include diff --git a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp index 491cb749..908574c0 100644 --- a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp +++ b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp @@ -16,6 +16,12 @@ #include "dm_constants.h" #include "dm_log.h" #include "dm_distributed_hardware_load.h" +#include "if_system_ability_manager.h" // for ISystemAbilityManager +#include "iservice_registry.h" // for SystemAbilityManagerClient +#include "isystem_ability_load_callback.h" // for ISystemAbilityLoadCallback +#include "new" // for operator new +#include "system_ability_definition.h" // for DISTRIBUTED_HARDWARE_SA_ID +namespace OHOS{ class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/ipc/standard/ipc_cmd_register.cpp b/utils/src/ipc/standard/ipc_cmd_register.cpp index fba0bbc4..e988a3bc 100644 --- a/utils/src/ipc/standard/ipc_cmd_register.cpp +++ b/utils/src/ipc/standard/ipc_cmd_register.cpp @@ -14,10 +14,15 @@ */ #include "ipc_cmd_register.h" - #include "dm_constants.h" #include "dm_log.h" #include "ipc_def.h" +#include // for operator==, shared_ptr +#include // for __hash_map_iterator, unordered_map, operat... +#include // for pair +namespace OHOS{ class MessageParcel; } +namespace OHOS::DistributedHardware{ class IpcReq; } +namespace OHOS::DistributedHardware{ class IpcRsp; } namespace OHOS { namespace DistributedHardware { From 5fee9ff6b0dfaa3e67a49e9438407c7e315db3f1 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Wed, 13 Jul 2022 21:52:13 +0800 Subject: [PATCH 2/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- .../inner_kits/native_cpp/include/device_manager.h | 4 ++-- .../native_cpp/include/ipc/ipc_client_proxy.h | 4 ++-- .../include/ipc/standard/ipc_client_server_proxy.h | 2 +- .../include/ipc/standard/ipc_client_stub.h | 8 ++++---- .../native_cpp/src/ipc/ipc_client_proxy.cpp | 5 ++--- .../src/ipc/standard/ipc_client_server_proxy.cpp | 1 - .../native_cpp/src/ipc/standard/ipc_client_stub.cpp | 6 ++---- .../native_cpp/src/ipc/standard/ipc_cmd_parser.cpp | 13 +++++++------ utils/include/dfx/standard/dm_hisysevent.h | 2 +- utils/include/dm_anonymous.h | 2 +- .../fwkload/standard/dm_distributed_hardware_load.h | 6 +++--- utils/include/ipc/standard/ipc_cmd_register.h | 2 +- utils/src/dfx/standard/dm_hidumper.cpp | 8 ++++---- utils/src/dfx/standard/dm_hisysevent.cpp | 2 +- utils/src/dm_anonymous.cpp | 4 ++-- utils/src/dm_error_message.cpp | 4 ++-- utils/src/dm_hash.cpp | 2 +- utils/src/dm_random.cpp | 4 ++-- .../standard/dm_distributed_hardware_load.cpp | 4 ++-- utils/src/ipc/standard/ipc_cmd_register.cpp | 12 ++++++------ 20 files changed, 46 insertions(+), 49 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index dcdcabc5..bdd0aa83 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -18,11 +18,11 @@ #include #include +#include // for int32_t, uint16_t +#include // for string #include "dm_device_info.h" #include "device_manager_callback.h" #include "dm_subscribe_info.h" -#include // for int32_t, uint16_t -#include // for string namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h index abd0ed35..306b22f3 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h @@ -21,8 +21,8 @@ #include "ipc_client.h" #include "iosfwd" #include "ipc_def.h" -namespace OHOS::DistributedHardware{ class IpcReq; } -namespace OHOS::DistributedHardware{ class IpcRsp; } +namespace OHOS::DistributedHardware { class IpcReq; } +namespace OHOS::DistributedHardware { class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h index f664959e..d9b3e6a8 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h @@ -25,7 +25,7 @@ #include "refbase.h" // for sptr #include "ipc_req.h" #include "ipc_rsp.h" -namespace OHOS{ class IRemoteObject; } +namespace OHOS { class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h index e5bc8f34..2524170b 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h @@ -21,10 +21,10 @@ #include "ipc_remote_broker.h" #include "iremote_stub.h" #include "refbase.h" // for sptr -namespace OHOS{ class MessageOption; } -namespace OHOS{ class MessageParcel; } -namespace OHOS::DistributedHardware{ class IpcReq; } -namespace OHOS::DistributedHardware{ class IpcRsp; } +namespace OHOS { class MessageOption; } +namespace OHOS { class MessageParcel; } +namespace OHOS::DistributedHardware { class IpcReq; } +namespace OHOS::DistributedHardware { class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp b/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp index 19bd9063..99e0f0aa 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp @@ -16,9 +16,8 @@ #include "ipc_client_proxy.h" #include "dm_constants.h" #include "dm_log.h" -#include -namespace OHOS::DistributedHardware{ class IpcReq; } -namespace OHOS::DistributedHardware{ class IpcRsp; } +namespace OHOS::DistributedHardware { class IpcReq; } +namespace OHOS::DistributedHardware { class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp index 05196bf9..fcb934c6 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp @@ -18,7 +18,6 @@ #include "dm_log.h" #include "ipc_cmd_register.h" #include "iremote_object.h" // for IRemoteObject -#include // for shared_ptr #include "message_option.h" // for MessageOption #include "message_parcel.h" // for MessageParcel diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp index a50d5f9e..18891a35 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp @@ -18,12 +18,10 @@ #include "dm_log.h" #include "ipc_cmd_register.h" #include "ipc_object_stub.h" // for IPCObjectStub -#include // for shared_ptr #include "message_option.h" // for MessageOption #include "message_parcel.h" // for MessageParcel -#include // for operator!=, u16string -namespace OHOS::DistributedHardware{ class IpcReq; } -namespace OHOS::DistributedHardware{ class IpcRsp; } +namespace OHOS::DistributedHardware { class IpcReq; } +namespace OHOS::DistributedHardware { class IpcRsp; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp index 8f81551d..13c1e075 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp @@ -13,9 +13,12 @@ * limitations under the License. */ +#include // for size_t +#include // for int32_t, int16_t +#include // for basic_string +#include // for vector +#include // for shared_ptr, static_... #include "device_manager_notify.h" -#include // for size_t -#include // for int32_t, int16_t #include "dm_constants.h" #include "dm_device_info.h" #include "dm_log.h" @@ -42,12 +45,10 @@ #include "securec.h" #include "dm_subscribe_info.h" // for DmSubscribeInfo #include "iosfwd" // for string -#include // for shared_ptr, static_... #include "message_parcel.h" // for MessageParcel #include "refbase.h" // for sptr -#include // for basic_string -#include // for vector -namespace OHOS{ class IRemoteObject; } + +namespace OHOS { class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dfx/standard/dm_hisysevent.h b/utils/include/dfx/standard/dm_hisysevent.h index 4219473a..50c0b6d0 100644 --- a/utils/include/dfx/standard/dm_hisysevent.h +++ b/utils/include/dfx/standard/dm_hisysevent.h @@ -16,7 +16,7 @@ #ifndef OHOS_DISTRIBUTED_DM_HISYSEVENT_H #define OHOS_DISTRIBUTED_DM_HISYSEVENT_H -#include // for int32_t +#include // for int32_t #include "iosfwd" // for string namespace OHOS { diff --git a/utils/include/dm_anonymous.h b/utils/include/dm_anonymous.h index 686ffba3..eba7e9a4 100644 --- a/utils/include/dm_anonymous.h +++ b/utils/include/dm_anonymous.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_ANONYMOUS_H #define OHOS_DM_ANONYMOUS_H -#include // for int32_t +#include // for int32_t #include "iosfwd" // for string namespace OHOS { diff --git a/utils/include/fwkload/standard/dm_distributed_hardware_load.h b/utils/include/fwkload/standard/dm_distributed_hardware_load.h index 90425f02..497185ef 100644 --- a/utils/include/fwkload/standard/dm_distributed_hardware_load.h +++ b/utils/include/fwkload/standard/dm_distributed_hardware_load.h @@ -16,11 +16,11 @@ #ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H #define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H -#include "single_instance.h" #include "system_ability_load_callback_stub.h" -#include // for int32_t, uint32_t +#include // for int32_t, uint32_t +#include "single_instance.h" #include "refbase.h" // for sptr -namespace OHOS{ class IRemoteObject; } +namespace OHOS { class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/ipc/standard/ipc_cmd_register.h b/utils/include/ipc/standard/ipc_cmd_register.h index 632214c6..17f8db3f 100644 --- a/utils/include/ipc/standard/ipc_cmd_register.h +++ b/utils/include/ipc/standard/ipc_cmd_register.h @@ -22,7 +22,7 @@ #include "single_instance.h" #include "ipc_req.h" #include "ipc_rsp.h" -namespace OHOS{ class MessageParcel; } +namespace OHOS { class MessageParcel; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dfx/standard/dm_hidumper.cpp b/utils/src/dfx/standard/dm_hidumper.cpp index eeb7f359..92a10ee6 100644 --- a/utils/src/dfx/standard/dm_hidumper.cpp +++ b/utils/src/dfx/standard/dm_hidumper.cpp @@ -13,16 +13,16 @@ * limitations under the License. */ -#include // for basic_string, operator==, hash #include "dm_hidumper.h" +#include // for basic_string, operator==, hash +#include // for __hash_map_const_iterator, unordered_map +#include // for pair +#include // for vector #include "dm_anonymous.h" // for GetAnonyString #include "dm_constants.h" // for DM_OK, ERR_DM_FAILED #include "dm_device_info.h" // for DmDeviceInfo #include "dm_dfx_constants.h" // for HidumperFlag, DumperInfo, MAP_ARGS #include "dm_log.h" // for LOGI, LOGE -#include // for __hash_map_const_iterator, unordered_map -#include // for pair -#include // for vector namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dfx/standard/dm_hisysevent.cpp b/utils/src/dfx/standard/dm_hisysevent.cpp index 4fa0edb4..5517ee1b 100644 --- a/utils/src/dfx/standard/dm_hisysevent.cpp +++ b/utils/src/dfx/standard/dm_hisysevent.cpp @@ -14,10 +14,10 @@ */ #include "dm_hisysevent.h" +#include // for basic_string #include "dm_constants.h" // for DM_OK #include "dm_log.h" // for LOGE #include "hisysevent.h" // for HiSysEvent, HiSysEvent::Domain, HiSysEvent... -#include // for basic_string #include "unistd.h" // for getpid, getuid namespace OHOS { diff --git a/utils/src/dm_anonymous.cpp b/utils/src/dm_anonymous.cpp index 9ea87d8a..b8386328 100644 --- a/utils/src/dm_anonymous.cpp +++ b/utils/src/dm_anonymous.cpp @@ -14,9 +14,9 @@ */ #include "dm_anonymous.h" -#include "dm_log.h" -#include // for size_t +#include // for size_t #include // for basic_string, to_string +#include "dm_log.h" namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dm_error_message.cpp b/utils/src/dm_error_message.cpp index 33554c17..42d4336f 100644 --- a/utils/src/dm_error_message.cpp +++ b/utils/src/dm_error_message.cpp @@ -14,9 +14,9 @@ */ #include "dm_error_message.h" -#include // for uint32_t -#include "dm_constants.h" // for ERR_DM_AUTH_BUSINESS_BUSY, ERR_DM_AUTH_FAILED +#include // for uint32_t #include // for basic_string +#include "dm_constants.h" // for ERR_DM_AUTH_BUSINESS_BUSY, ERR_DM_AUTH_FAILED namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/dm_hash.cpp b/utils/src/dm_hash.cpp index 817d92a1..c826841e 100644 --- a/utils/src/dm_hash.cpp +++ b/utils/src/dm_hash.cpp @@ -13,9 +13,9 @@ * limitations under the License. */ +#include "dm_hash.h" #include "dm_log.h" #include "dm_constants.h" -#include "dm_hash.h" #include "md.h" // for mbedtls_md_free, mbedtls_md_finish, mbedtl... namespace OHOS { diff --git a/utils/src/dm_random.cpp b/utils/src/dm_random.cpp index b48705cc..b1573a67 100644 --- a/utils/src/dm_random.cpp +++ b/utils/src/dm_random.cpp @@ -15,11 +15,11 @@ #include "dm_random.h" #include +#include // for free, malloc +#include // for uniform_int_distribution #include "dm_constants.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/entropy.h" -#include // for free, malloc -#include // for uniform_int_distribution #if defined(__LITEOS_M__) #include diff --git a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp index 908574c0..82d2df48 100644 --- a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp +++ b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp @@ -13,15 +13,15 @@ * limitations under the License. */ +#include "dm_distributed_hardware_load.h" #include "dm_constants.h" #include "dm_log.h" -#include "dm_distributed_hardware_load.h" #include "if_system_ability_manager.h" // for ISystemAbilityManager #include "iservice_registry.h" // for SystemAbilityManagerClient #include "isystem_ability_load_callback.h" // for ISystemAbilityLoadCallback #include "new" // for operator new #include "system_ability_definition.h" // for DISTRIBUTED_HARDWARE_SA_ID -namespace OHOS{ class IRemoteObject; } +namespace OHOS { class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/ipc/standard/ipc_cmd_register.cpp b/utils/src/ipc/standard/ipc_cmd_register.cpp index e988a3bc..15999518 100644 --- a/utils/src/ipc/standard/ipc_cmd_register.cpp +++ b/utils/src/ipc/standard/ipc_cmd_register.cpp @@ -14,15 +14,15 @@ */ #include "ipc_cmd_register.h" -#include "dm_constants.h" -#include "dm_log.h" -#include "ipc_def.h" #include // for operator==, shared_ptr #include // for __hash_map_iterator, unordered_map, operat... #include // for pair -namespace OHOS{ class MessageParcel; } -namespace OHOS::DistributedHardware{ class IpcReq; } -namespace OHOS::DistributedHardware{ class IpcRsp; } +#include "dm_constants.h" +#include "dm_log.h" +#include "ipc_def.h" +namespace OHOS { class MessageParcel; } +namespace OHOS::DistributedHardware { class IpcReq; } +namespace OHOS::DistributedHardware { class IpcRsp; } namespace OHOS { namespace DistributedHardware { From b014148eff1de90db8b73a6bc0a06f72c680214f Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Wed, 13 Jul 2022 22:02:43 +0800 Subject: [PATCH 3/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- interfaces/inner_kits/native_cpp/include/device_manager.h | 1 - utils/include/dfx/standard/dm_hisysevent.h | 1 - utils/include/dm_anonymous.h | 1 - utils/include/fwkload/standard/dm_distributed_hardware_load.h | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index bdd0aa83..2642f8d7 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -18,7 +18,6 @@ #include #include -#include // for int32_t, uint16_t #include // for string #include "dm_device_info.h" #include "device_manager_callback.h" diff --git a/utils/include/dfx/standard/dm_hisysevent.h b/utils/include/dfx/standard/dm_hisysevent.h index 50c0b6d0..d38731eb 100644 --- a/utils/include/dfx/standard/dm_hisysevent.h +++ b/utils/include/dfx/standard/dm_hisysevent.h @@ -16,7 +16,6 @@ #ifndef OHOS_DISTRIBUTED_DM_HISYSEVENT_H #define OHOS_DISTRIBUTED_DM_HISYSEVENT_H -#include // for int32_t #include "iosfwd" // for string namespace OHOS { diff --git a/utils/include/dm_anonymous.h b/utils/include/dm_anonymous.h index eba7e9a4..dace42bd 100644 --- a/utils/include/dm_anonymous.h +++ b/utils/include/dm_anonymous.h @@ -16,7 +16,6 @@ #ifndef OHOS_DM_ANONYMOUS_H #define OHOS_DM_ANONYMOUS_H -#include // for int32_t #include "iosfwd" // for string namespace OHOS { diff --git a/utils/include/fwkload/standard/dm_distributed_hardware_load.h b/utils/include/fwkload/standard/dm_distributed_hardware_load.h index 497185ef..b56e3d44 100644 --- a/utils/include/fwkload/standard/dm_distributed_hardware_load.h +++ b/utils/include/fwkload/standard/dm_distributed_hardware_load.h @@ -16,8 +16,8 @@ #ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H #define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H -#include "system_ability_load_callback_stub.h" #include // for int32_t, uint32_t +#include "system_ability_load_callback_stub.h" #include "single_instance.h" #include "refbase.h" // for sptr namespace OHOS { class IRemoteObject; } From f063a8dbab9aa036fa726b95b4ccda25eb0959df Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Wed, 13 Jul 2022 22:21:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- utils/include/dfx/standard/dm_hisysevent.h | 1 + utils/include/dm_anonymous.h | 1 + 2 files changed, 2 insertions(+) diff --git a/utils/include/dfx/standard/dm_hisysevent.h b/utils/include/dfx/standard/dm_hisysevent.h index d38731eb..50c0b6d0 100644 --- a/utils/include/dfx/standard/dm_hisysevent.h +++ b/utils/include/dfx/standard/dm_hisysevent.h @@ -16,6 +16,7 @@ #ifndef OHOS_DISTRIBUTED_DM_HISYSEVENT_H #define OHOS_DISTRIBUTED_DM_HISYSEVENT_H +#include // for int32_t #include "iosfwd" // for string namespace OHOS { diff --git a/utils/include/dm_anonymous.h b/utils/include/dm_anonymous.h index dace42bd..eba7e9a4 100644 --- a/utils/include/dm_anonymous.h +++ b/utils/include/dm_anonymous.h @@ -16,6 +16,7 @@ #ifndef OHOS_DM_ANONYMOUS_H #define OHOS_DM_ANONYMOUS_H +#include // for int32_t #include "iosfwd" // for string namespace OHOS { From a8c37727ce5aa37781657e96406c9d2d61d5a853 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Thu, 14 Jul 2022 11:06:58 +0800 Subject: [PATCH 5/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- .../inner_kits/native_cpp/include/device_manager.h | 4 ++-- .../native_cpp/include/ipc/ipc_client_proxy.h | 2 +- .../include/ipc/standard/ipc_client_server_proxy.h | 8 ++++---- .../native_cpp/src/ipc/standard/ipc_cmd_parser.cpp | 10 +++++----- .../src/dependency/hichain/hichain_connector.cpp | 7 ++----- .../src/dependency/softbus/softbus_session.cpp | 3 +-- utils/include/dfx/standard/dm_hidumper.h | 4 ++-- .../fwkload/standard/dm_distributed_hardware_load.h | 4 ++-- utils/include/ipc/standard/ipc_cmd_register.h | 2 +- utils/src/dm_hash.cpp | 2 +- utils/src/dm_random.cpp | 4 ++-- 11 files changed, 23 insertions(+), 27 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index 2642f8d7..c41d70ca 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -16,11 +16,11 @@ #ifndef OHOS_DEVICE_MANAGER_H #define OHOS_DEVICE_MANAGER_H +#include // for string #include #include -#include // for string -#include "dm_device_info.h" #include "device_manager_callback.h" +#include "dm_device_info.h" #include "dm_subscribe_info.h" namespace OHOS { diff --git a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h index 306b22f3..c2ebba8b 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h @@ -18,8 +18,8 @@ #include #include -#include "ipc_client.h" #include "iosfwd" +#include "ipc_client.h" #include "ipc_def.h" namespace OHOS::DistributedHardware { class IpcReq; } namespace OHOS::DistributedHardware { class IpcRsp; } diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h index d9b3e6a8..9529dcbf 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h @@ -18,13 +18,13 @@ #include #include -#include "ipc_remote_broker.h" -#include "iremote_proxy.h" #include "functional" // for __base -#include "iremote_broker.h" // for BrokerDelegator -#include "refbase.h" // for sptr +#include "ipc_remote_broker.h" #include "ipc_req.h" #include "ipc_rsp.h" +#include "iremote_broker.h" // for BrokerDelegator +#include "iremote_proxy.h" +#include "refbase.h" // for sptr namespace OHOS { class IRemoteObject; } namespace OHOS { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp index 13c1e075..4f5267e4 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp @@ -15,13 +15,15 @@ #include // for size_t #include // for int32_t, int16_t +#include // for shared_ptr, static_... #include // for basic_string #include // for vector -#include // for shared_ptr, static_... #include "device_manager_notify.h" #include "dm_constants.h" #include "dm_device_info.h" #include "dm_log.h" +#include "dm_subscribe_info.h" // for DmSubscribeInfo +#include "iosfwd" // for string #include "ipc_authenticate_device_req.h" #include "ipc_cmd_register.h" #include "ipc_def.h" @@ -31,6 +33,7 @@ #include "ipc_get_local_device_info_rsp.h" #include "ipc_get_trustdevice_req.h" #include "ipc_get_trustdevice_rsp.h" +#include "ipc_register_dev_state_callback_req.h" #include "ipc_register_listener_req.h" #include "ipc_req.h" #include "ipc_rsp.h" @@ -41,12 +44,9 @@ #include "ipc_stop_discovery_req.h" #include "ipc_unauthenticate_device_req.h" #include "ipc_verify_authenticate_req.h" -#include "ipc_register_dev_state_callback_req.h" -#include "securec.h" -#include "dm_subscribe_info.h" // for DmSubscribeInfo -#include "iosfwd" // for string #include "message_parcel.h" // for MessageParcel #include "refbase.h" // for sptr +#include "securec.h" namespace OHOS { class IRemoteObject; } diff --git a/services/implementation/src/dependency/hichain/hichain_connector.cpp b/services/implementation/src/dependency/hichain/hichain_connector.cpp index 3d4429ca..ae19d198 100644 --- a/services/implementation/src/dependency/hichain/hichain_connector.cpp +++ b/services/implementation/src/dependency/hichain/hichain_connector.cpp @@ -14,15 +14,13 @@ */ #include "hichain_connector.h" - -#include - #include #include #include - +#include #include "dm_anonymous.h" #include "dm_constants.h" +#include "dm_dfx_constants.h" #include "dm_hisysevent.h" #include "dm_log.h" #include "dm_random.h" @@ -30,7 +28,6 @@ #include "multiple_user_connector.h" #include "nlohmann/json.hpp" #include "parameter.h" -#include "dm_dfx_constants.h" #include "unistd.h" namespace OHOS { diff --git a/services/implementation/src/dependency/softbus/softbus_session.cpp b/services/implementation/src/dependency/softbus/softbus_session.cpp index 42b14724..cad66180 100644 --- a/services/implementation/src/dependency/softbus/softbus_session.cpp +++ b/services/implementation/src/dependency/softbus/softbus_session.cpp @@ -14,14 +14,13 @@ */ #include "softbus_session.h" - #include "dm_anonymous.h" #include "dm_constants.h" +#include "dm_dfx_constants.h" #include "dm_hitrace.h" #include "dm_log.h" #include "nlohmann/json.hpp" #include "softbus_connector.h" -#include "dm_dfx_constants.h" namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dfx/standard/dm_hidumper.h b/utils/include/dfx/standard/dm_hidumper.h index 251a98dd..885d9da1 100644 --- a/utils/include/dfx/standard/dm_hidumper.h +++ b/utils/include/dfx/standard/dm_hidumper.h @@ -19,10 +19,10 @@ #include #include #include -#include "dm_dfx_constants.h" -#include "single_instance.h" #include "dm_device_info.h" +#include "dm_dfx_constants.h" #include "iosfwd" // for string +#include "single_instance.h" namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/fwkload/standard/dm_distributed_hardware_load.h b/utils/include/fwkload/standard/dm_distributed_hardware_load.h index b56e3d44..22f01e04 100644 --- a/utils/include/fwkload/standard/dm_distributed_hardware_load.h +++ b/utils/include/fwkload/standard/dm_distributed_hardware_load.h @@ -17,9 +17,9 @@ #define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H #include // for int32_t, uint32_t -#include "system_ability_load_callback_stub.h" -#include "single_instance.h" #include "refbase.h" // for sptr +#include "single_instance.h" +#include "system_ability_load_callback_stub.h" namespace OHOS { class IRemoteObject; } namespace OHOS { diff --git a/utils/include/ipc/standard/ipc_cmd_register.h b/utils/include/ipc/standard/ipc_cmd_register.h index 17f8db3f..3e20c250 100644 --- a/utils/include/ipc/standard/ipc_cmd_register.h +++ b/utils/include/ipc/standard/ipc_cmd_register.h @@ -19,9 +19,9 @@ #include #include #include -#include "single_instance.h" #include "ipc_req.h" #include "ipc_rsp.h" +#include "single_instance.h" namespace OHOS { class MessageParcel; } namespace OHOS { diff --git a/utils/src/dm_hash.cpp b/utils/src/dm_hash.cpp index c826841e..81a90e6b 100644 --- a/utils/src/dm_hash.cpp +++ b/utils/src/dm_hash.cpp @@ -14,8 +14,8 @@ */ #include "dm_hash.h" -#include "dm_log.h" #include "dm_constants.h" +#include "dm_log.h" #include "md.h" // for mbedtls_md_free, mbedtls_md_finish, mbedtl... namespace OHOS { diff --git a/utils/src/dm_random.cpp b/utils/src/dm_random.cpp index b1573a67..463f077f 100644 --- a/utils/src/dm_random.cpp +++ b/utils/src/dm_random.cpp @@ -14,9 +14,9 @@ */ #include "dm_random.h" -#include -#include // for free, malloc #include // for uniform_int_distribution +#include // for free, malloc +#include #include "dm_constants.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/entropy.h" From bf0f164671c4e01be243348584c5d7f383840cc5 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Thu, 14 Jul 2022 17:45:27 +0800 Subject: [PATCH 6/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- .../inner_kits/native_cpp/include/device_manager.h | 2 +- .../native_cpp/include/ipc/ipc_client_proxy.h | 2 -- .../include/ipc/standard/ipc_client_server_proxy.h | 4 ---- .../native_cpp/include/ipc/standard/ipc_client_stub.h | 1 - .../src/ipc/standard/ipc_client_server_proxy.cpp | 3 --- .../native_cpp/src/ipc/standard/ipc_cmd_parser.cpp | 10 ---------- utils/include/dfx/standard/dm_hidumper.h | 1 - utils/include/dfx/standard/dm_hisysevent.h | 3 +-- utils/include/dfx/standard/dm_hitrace.h | 2 +- utils/include/dm_anonymous.h | 3 +-- utils/include/dm_error_message.h | 2 +- .../fwkload/standard/dm_distributed_hardware_load.h | 2 -- utils/src/dfx/standard/dm_hidumper.cpp | 4 ---- utils/src/dfx/standard/dm_hisysevent.cpp | 1 - utils/src/dm_anonymous.cpp | 2 -- utils/src/dm_error_message.cpp | 2 -- utils/src/dm_random.cpp | 2 -- .../fwkload/standard/dm_distributed_hardware_load.cpp | 3 --- utils/src/ipc/standard/ipc_cmd_register.cpp | 4 ---- 19 files changed, 5 insertions(+), 48 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index c41d70ca..118f4d12 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -16,7 +16,7 @@ #ifndef OHOS_DEVICE_MANAGER_H #define OHOS_DEVICE_MANAGER_H -#include // for string +#include // for string #include #include #include "device_manager_callback.h" diff --git a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h index c2ebba8b..9d829303 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h @@ -18,9 +18,7 @@ #include #include -#include "iosfwd" #include "ipc_client.h" -#include "ipc_def.h" namespace OHOS::DistributedHardware { class IpcReq; } namespace OHOS::DistributedHardware { class IpcRsp; } diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h index 9529dcbf..f77f7c8a 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h @@ -18,14 +18,10 @@ #include #include -#include "functional" // for __base #include "ipc_remote_broker.h" #include "ipc_req.h" #include "ipc_rsp.h" -#include "iremote_broker.h" // for BrokerDelegator #include "iremote_proxy.h" -#include "refbase.h" // for sptr -namespace OHOS { class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h index 2524170b..18d69902 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h @@ -20,7 +20,6 @@ #include #include "ipc_remote_broker.h" #include "iremote_stub.h" -#include "refbase.h" // for sptr namespace OHOS { class MessageOption; } namespace OHOS { class MessageParcel; } namespace OHOS::DistributedHardware { class IpcReq; } diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp index fcb934c6..f7c4f418 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp @@ -17,9 +17,6 @@ #include "dm_constants.h" #include "dm_log.h" #include "ipc_cmd_register.h" -#include "iremote_object.h" // for IRemoteObject -#include "message_option.h" // for MessageOption -#include "message_parcel.h" // for MessageParcel namespace OHOS { namespace DistributedHardware { diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp index 4f5267e4..3966d6a2 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp @@ -13,17 +13,10 @@ * limitations under the License. */ -#include // for size_t -#include // for int32_t, int16_t -#include // for shared_ptr, static_... -#include // for basic_string -#include // for vector #include "device_manager_notify.h" #include "dm_constants.h" #include "dm_device_info.h" #include "dm_log.h" -#include "dm_subscribe_info.h" // for DmSubscribeInfo -#include "iosfwd" // for string #include "ipc_authenticate_device_req.h" #include "ipc_cmd_register.h" #include "ipc_def.h" @@ -44,10 +37,7 @@ #include "ipc_stop_discovery_req.h" #include "ipc_unauthenticate_device_req.h" #include "ipc_verify_authenticate_req.h" -#include "message_parcel.h" // for MessageParcel -#include "refbase.h" // for sptr #include "securec.h" - namespace OHOS { class IRemoteObject; } namespace OHOS { diff --git a/utils/include/dfx/standard/dm_hidumper.h b/utils/include/dfx/standard/dm_hidumper.h index 885d9da1..2c40d3cb 100644 --- a/utils/include/dfx/standard/dm_hidumper.h +++ b/utils/include/dfx/standard/dm_hidumper.h @@ -21,7 +21,6 @@ #include #include "dm_device_info.h" #include "dm_dfx_constants.h" -#include "iosfwd" // for string #include "single_instance.h" namespace OHOS { diff --git a/utils/include/dfx/standard/dm_hisysevent.h b/utils/include/dfx/standard/dm_hisysevent.h index 50c0b6d0..4553087b 100644 --- a/utils/include/dfx/standard/dm_hisysevent.h +++ b/utils/include/dfx/standard/dm_hisysevent.h @@ -16,8 +16,7 @@ #ifndef OHOS_DISTRIBUTED_DM_HISYSEVENT_H #define OHOS_DISTRIBUTED_DM_HISYSEVENT_H -#include // for int32_t -#include "iosfwd" // for string +#include namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dfx/standard/dm_hitrace.h b/utils/include/dfx/standard/dm_hitrace.h index de8b4e85..588e8f7f 100644 --- a/utils/include/dfx/standard/dm_hitrace.h +++ b/utils/include/dfx/standard/dm_hitrace.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_HITRACE_H #define OHOS_DM_HITRACE_H -#include "iosfwd" // for string +#include // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_anonymous.h b/utils/include/dm_anonymous.h index eba7e9a4..33728920 100644 --- a/utils/include/dm_anonymous.h +++ b/utils/include/dm_anonymous.h @@ -16,8 +16,7 @@ #ifndef OHOS_DM_ANONYMOUS_H #define OHOS_DM_ANONYMOUS_H -#include // for int32_t -#include "iosfwd" // for string +#include // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_error_message.h b/utils/include/dm_error_message.h index 9c458c8b..9d92826e 100644 --- a/utils/include/dm_error_message.h +++ b/utils/include/dm_error_message.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_ERROMSG_H #define OHOS_DM_ERROMSG_H -#include "iosfwd" // for string +#include // for string namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/fwkload/standard/dm_distributed_hardware_load.h b/utils/include/fwkload/standard/dm_distributed_hardware_load.h index 22f01e04..2d0ded98 100644 --- a/utils/include/fwkload/standard/dm_distributed_hardware_load.h +++ b/utils/include/fwkload/standard/dm_distributed_hardware_load.h @@ -16,8 +16,6 @@ #ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H #define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H -#include // for int32_t, uint32_t -#include "refbase.h" // for sptr #include "single_instance.h" #include "system_ability_load_callback_stub.h" namespace OHOS { class IRemoteObject; } diff --git a/utils/src/dfx/standard/dm_hidumper.cpp b/utils/src/dfx/standard/dm_hidumper.cpp index 92a10ee6..9cedbcea 100644 --- a/utils/src/dfx/standard/dm_hidumper.cpp +++ b/utils/src/dfx/standard/dm_hidumper.cpp @@ -14,14 +14,10 @@ */ #include "dm_hidumper.h" -#include // for basic_string, operator==, hash #include // for __hash_map_const_iterator, unordered_map #include // for pair -#include // for vector #include "dm_anonymous.h" // for GetAnonyString #include "dm_constants.h" // for DM_OK, ERR_DM_FAILED -#include "dm_device_info.h" // for DmDeviceInfo -#include "dm_dfx_constants.h" // for HidumperFlag, DumperInfo, MAP_ARGS #include "dm_log.h" // for LOGI, LOGE namespace OHOS { diff --git a/utils/src/dfx/standard/dm_hisysevent.cpp b/utils/src/dfx/standard/dm_hisysevent.cpp index 5517ee1b..0d0cf4f6 100644 --- a/utils/src/dfx/standard/dm_hisysevent.cpp +++ b/utils/src/dfx/standard/dm_hisysevent.cpp @@ -14,7 +14,6 @@ */ #include "dm_hisysevent.h" -#include // for basic_string #include "dm_constants.h" // for DM_OK #include "dm_log.h" // for LOGE #include "hisysevent.h" // for HiSysEvent, HiSysEvent::Domain, HiSysEvent... diff --git a/utils/src/dm_anonymous.cpp b/utils/src/dm_anonymous.cpp index b8386328..91ab33b6 100644 --- a/utils/src/dm_anonymous.cpp +++ b/utils/src/dm_anonymous.cpp @@ -14,8 +14,6 @@ */ #include "dm_anonymous.h" -#include // for size_t -#include // for basic_string, to_string #include "dm_log.h" namespace OHOS { diff --git a/utils/src/dm_error_message.cpp b/utils/src/dm_error_message.cpp index 42d4336f..09c49df7 100644 --- a/utils/src/dm_error_message.cpp +++ b/utils/src/dm_error_message.cpp @@ -14,8 +14,6 @@ */ #include "dm_error_message.h" -#include // for uint32_t -#include // for basic_string #include "dm_constants.h" // for ERR_DM_AUTH_BUSINESS_BUSY, ERR_DM_AUTH_FAILED namespace OHOS { diff --git a/utils/src/dm_random.cpp b/utils/src/dm_random.cpp index 463f077f..81ff2f1c 100644 --- a/utils/src/dm_random.cpp +++ b/utils/src/dm_random.cpp @@ -14,8 +14,6 @@ */ #include "dm_random.h" -#include // for uniform_int_distribution -#include // for free, malloc #include #include "dm_constants.h" #include "mbedtls/ctr_drbg.h" diff --git a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp index 82d2df48..a49d5364 100644 --- a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp +++ b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp @@ -18,10 +18,7 @@ #include "dm_log.h" #include "if_system_ability_manager.h" // for ISystemAbilityManager #include "iservice_registry.h" // for SystemAbilityManagerClient -#include "isystem_ability_load_callback.h" // for ISystemAbilityLoadCallback -#include "new" // for operator new #include "system_ability_definition.h" // for DISTRIBUTED_HARDWARE_SA_ID -namespace OHOS { class IRemoteObject; } namespace OHOS { namespace DistributedHardware { diff --git a/utils/src/ipc/standard/ipc_cmd_register.cpp b/utils/src/ipc/standard/ipc_cmd_register.cpp index 15999518..efe59c0d 100644 --- a/utils/src/ipc/standard/ipc_cmd_register.cpp +++ b/utils/src/ipc/standard/ipc_cmd_register.cpp @@ -14,15 +14,11 @@ */ #include "ipc_cmd_register.h" -#include // for operator==, shared_ptr -#include // for __hash_map_iterator, unordered_map, operat... #include // for pair #include "dm_constants.h" #include "dm_log.h" #include "ipc_def.h" namespace OHOS { class MessageParcel; } -namespace OHOS::DistributedHardware { class IpcReq; } -namespace OHOS::DistributedHardware { class IpcRsp; } namespace OHOS { namespace DistributedHardware { From 7a619a1cf401be20656ba1f1a346ee017e0149aa Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Thu, 14 Jul 2022 18:19:47 +0800 Subject: [PATCH 7/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- interfaces/inner_kits/native_cpp/include/device_manager.h | 3 ++- interfaces/inner_kits/native_cpp/include/dm_device_info.h | 1 + .../inner_kits/native_cpp/include/ipc/ipc_client_proxy.h | 1 + .../native_cpp/include/ipc/standard/ipc_client_server_proxy.h | 1 + .../native_cpp/include/ipc/standard/ipc_client_stub.h | 1 + interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp | 1 + .../native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp | 1 + .../inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp | 1 + .../src/dependency/hichain/hichain_connector.cpp | 2 ++ .../implementation/src/dependency/softbus/softbus_session.cpp | 1 + utils/include/dfx/standard/dm_hidumper.h | 1 + utils/include/dfx/standard/dm_hitrace.h | 2 +- utils/include/dm_anonymous.h | 2 +- utils/include/dm_error_message.h | 2 +- utils/include/dm_hash.h | 2 +- utils/include/dm_random.h | 2 +- utils/include/ipc/standard/ipc_cmd_register.h | 1 + utils/src/dfx/standard/dm_hidumper.cpp | 2 ++ utils/src/dfx/standard/dm_hisysevent.cpp | 1 + utils/src/dm_error_message.cpp | 1 + utils/src/dm_hash.cpp | 1 + utils/src/dm_random.cpp | 2 ++ utils/src/fwkload/standard/dm_distributed_hardware_load.cpp | 1 + utils/src/ipc/standard/ipc_cmd_register.cpp | 2 ++ 24 files changed, 29 insertions(+), 6 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index 118f4d12..b6933931 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -16,9 +16,10 @@ #ifndef OHOS_DEVICE_MANAGER_H #define OHOS_DEVICE_MANAGER_H -#include // for string #include +#include // for string #include + #include "device_manager_callback.h" #include "dm_device_info.h" #include "dm_subscribe_info.h" diff --git a/interfaces/inner_kits/native_cpp/include/dm_device_info.h b/interfaces/inner_kits/native_cpp/include/dm_device_info.h index cc085a7c..6bbdfb22 100644 --- a/interfaces/inner_kits/native_cpp/include/dm_device_info.h +++ b/interfaces/inner_kits/native_cpp/include/dm_device_info.h @@ -18,6 +18,7 @@ #include #include + #include "dm_app_image_info.h" #define DM_MAX_DEVICE_ID_LEN (96) diff --git a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h index 9d829303..80ea7a79 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/ipc_client_proxy.h @@ -18,6 +18,7 @@ #include #include + #include "ipc_client.h" namespace OHOS::DistributedHardware { class IpcReq; } namespace OHOS::DistributedHardware { class IpcRsp; } diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h index f77f7c8a..1fbf3ac7 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_server_proxy.h @@ -18,6 +18,7 @@ #include #include + #include "ipc_remote_broker.h" #include "ipc_req.h" #include "ipc_rsp.h" diff --git a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h index 18d69902..d11477eb 100644 --- a/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h +++ b/interfaces/inner_kits/native_cpp/include/ipc/standard/ipc_client_stub.h @@ -18,6 +18,7 @@ #include #include + #include "ipc_remote_broker.h" #include "iremote_stub.h" namespace OHOS { class MessageOption; } diff --git a/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp b/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp index 99e0f0aa..d4d8e00e 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/ipc_client_proxy.cpp @@ -14,6 +14,7 @@ */ #include "ipc_client_proxy.h" + #include "dm_constants.h" #include "dm_log.h" namespace OHOS::DistributedHardware { class IpcReq; } diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp index f7c4f418..79c8ec16 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_server_proxy.cpp @@ -14,6 +14,7 @@ */ #include "ipc_client_server_proxy.h" + #include "dm_constants.h" #include "dm_log.h" #include "ipc_cmd_register.h" diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp index 18891a35..98c2a026 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_client_stub.cpp @@ -14,6 +14,7 @@ */ #include "ipc_client_stub.h" + #include "dm_constants.h" #include "dm_log.h" #include "ipc_cmd_register.h" diff --git a/services/implementation/src/dependency/hichain/hichain_connector.cpp b/services/implementation/src/dependency/hichain/hichain_connector.cpp index ae19d198..ff977000 100644 --- a/services/implementation/src/dependency/hichain/hichain_connector.cpp +++ b/services/implementation/src/dependency/hichain/hichain_connector.cpp @@ -14,10 +14,12 @@ */ #include "hichain_connector.h" + #include #include #include #include + #include "dm_anonymous.h" #include "dm_constants.h" #include "dm_dfx_constants.h" diff --git a/services/implementation/src/dependency/softbus/softbus_session.cpp b/services/implementation/src/dependency/softbus/softbus_session.cpp index cad66180..ecea188a 100644 --- a/services/implementation/src/dependency/softbus/softbus_session.cpp +++ b/services/implementation/src/dependency/softbus/softbus_session.cpp @@ -14,6 +14,7 @@ */ #include "softbus_session.h" + #include "dm_anonymous.h" #include "dm_constants.h" #include "dm_dfx_constants.h" diff --git a/utils/include/dfx/standard/dm_hidumper.h b/utils/include/dfx/standard/dm_hidumper.h index 2c40d3cb..d895bbe3 100644 --- a/utils/include/dfx/standard/dm_hidumper.h +++ b/utils/include/dfx/standard/dm_hidumper.h @@ -19,6 +19,7 @@ #include #include #include + #include "dm_device_info.h" #include "dm_dfx_constants.h" #include "single_instance.h" diff --git a/utils/include/dfx/standard/dm_hitrace.h b/utils/include/dfx/standard/dm_hitrace.h index 588e8f7f..f7347c39 100644 --- a/utils/include/dfx/standard/dm_hitrace.h +++ b/utils/include/dfx/standard/dm_hitrace.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_HITRACE_H #define OHOS_DM_HITRACE_H -#include // for string +#include namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_anonymous.h b/utils/include/dm_anonymous.h index 33728920..16d47661 100644 --- a/utils/include/dm_anonymous.h +++ b/utils/include/dm_anonymous.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_ANONYMOUS_H #define OHOS_DM_ANONYMOUS_H -#include // for string +#include namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_error_message.h b/utils/include/dm_error_message.h index 9d92826e..9f4f1332 100644 --- a/utils/include/dm_error_message.h +++ b/utils/include/dm_error_message.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_ERROMSG_H #define OHOS_DM_ERROMSG_H -#include // for string +#include namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_hash.h b/utils/include/dm_hash.h index bcc07cd7..831ac84d 100644 --- a/utils/include/dm_hash.h +++ b/utils/include/dm_hash.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_HASH_H #define OHOS_DM_HASH_H -#include // for int32_t, uint8_t, uint32_t +#include namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/dm_random.h b/utils/include/dm_random.h index d7ec70a8..f1577777 100644 --- a/utils/include/dm_random.h +++ b/utils/include/dm_random.h @@ -16,7 +16,7 @@ #ifndef OHOS_DM_RANDOM_H #define OHOS_DM_RANDOM_H -#include // for int32_t, int64_t, uint32_t, uint8_t +#include namespace OHOS { namespace DistributedHardware { diff --git a/utils/include/ipc/standard/ipc_cmd_register.h b/utils/include/ipc/standard/ipc_cmd_register.h index 3e20c250..baff6b75 100644 --- a/utils/include/ipc/standard/ipc_cmd_register.h +++ b/utils/include/ipc/standard/ipc_cmd_register.h @@ -19,6 +19,7 @@ #include #include #include + #include "ipc_req.h" #include "ipc_rsp.h" #include "single_instance.h" diff --git a/utils/src/dfx/standard/dm_hidumper.cpp b/utils/src/dfx/standard/dm_hidumper.cpp index 9cedbcea..74af394b 100644 --- a/utils/src/dfx/standard/dm_hidumper.cpp +++ b/utils/src/dfx/standard/dm_hidumper.cpp @@ -14,8 +14,10 @@ */ #include "dm_hidumper.h" + #include // for __hash_map_const_iterator, unordered_map #include // for pair + #include "dm_anonymous.h" // for GetAnonyString #include "dm_constants.h" // for DM_OK, ERR_DM_FAILED #include "dm_log.h" // for LOGI, LOGE diff --git a/utils/src/dfx/standard/dm_hisysevent.cpp b/utils/src/dfx/standard/dm_hisysevent.cpp index 0d0cf4f6..b2f20910 100644 --- a/utils/src/dfx/standard/dm_hisysevent.cpp +++ b/utils/src/dfx/standard/dm_hisysevent.cpp @@ -14,6 +14,7 @@ */ #include "dm_hisysevent.h" + #include "dm_constants.h" // for DM_OK #include "dm_log.h" // for LOGE #include "hisysevent.h" // for HiSysEvent, HiSysEvent::Domain, HiSysEvent... diff --git a/utils/src/dm_error_message.cpp b/utils/src/dm_error_message.cpp index 09c49df7..c84daa6f 100644 --- a/utils/src/dm_error_message.cpp +++ b/utils/src/dm_error_message.cpp @@ -14,6 +14,7 @@ */ #include "dm_error_message.h" + #include "dm_constants.h" // for ERR_DM_AUTH_BUSINESS_BUSY, ERR_DM_AUTH_FAILED namespace OHOS { diff --git a/utils/src/dm_hash.cpp b/utils/src/dm_hash.cpp index 81a90e6b..b2955609 100644 --- a/utils/src/dm_hash.cpp +++ b/utils/src/dm_hash.cpp @@ -14,6 +14,7 @@ */ #include "dm_hash.h" + #include "dm_constants.h" #include "dm_log.h" #include "md.h" // for mbedtls_md_free, mbedtls_md_finish, mbedtl... diff --git a/utils/src/dm_random.cpp b/utils/src/dm_random.cpp index 81ff2f1c..862b992f 100644 --- a/utils/src/dm_random.cpp +++ b/utils/src/dm_random.cpp @@ -14,7 +14,9 @@ */ #include "dm_random.h" + #include + #include "dm_constants.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/entropy.h" diff --git a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp index a49d5364..b3a6607c 100644 --- a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp +++ b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp @@ -14,6 +14,7 @@ */ #include "dm_distributed_hardware_load.h" + #include "dm_constants.h" #include "dm_log.h" #include "if_system_ability_manager.h" // for ISystemAbilityManager diff --git a/utils/src/ipc/standard/ipc_cmd_register.cpp b/utils/src/ipc/standard/ipc_cmd_register.cpp index efe59c0d..135efda4 100644 --- a/utils/src/ipc/standard/ipc_cmd_register.cpp +++ b/utils/src/ipc/standard/ipc_cmd_register.cpp @@ -14,7 +14,9 @@ */ #include "ipc_cmd_register.h" + #include // for pair + #include "dm_constants.h" #include "dm_log.h" #include "ipc_def.h" From 76652b9b14312883626ae448cae880d8e39475de Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Thu, 14 Jul 2022 18:24:25 +0800 Subject: [PATCH 8/8] =?UTF-8?q?IWYU=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- interfaces/inner_kits/native_cpp/include/device_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index b6933931..0794ca5b 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -17,7 +17,7 @@ #define OHOS_DEVICE_MANAGER_H #include -#include // for string +#include #include #include "device_manager_callback.h"