From bf0f164671c4e01be243348584c5d7f383840cc5 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Thu, 14 Jul 2022 17:45:27 +0800 Subject: [PATCH] =?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 {