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 {