diff --git a/dfx_utils/include/hidumper.h b/dfx_utils/include/hidumper.h index c5bb91c..fcb1b63 100644 --- a/dfx_utils/include/hidumper.h +++ b/dfx_utils/include/hidumper.h @@ -26,7 +26,7 @@ #include #include "constants_dinput.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" namespace OHOS { namespace DistributedHardware { @@ -51,7 +51,7 @@ struct SessionInfo { }; class HiDumper { -DECLARE_SINGLE_INSTANCE_BASE(HiDumper); +FWK_DECLARE_SINGLE_INSTANCE_BASE(HiDumper); public: bool HiDump(const std::vector &args, std::string &result); diff --git a/dfx_utils/include/hisysevent_util.h b/dfx_utils/include/hisysevent_util.h index f7f36ed..933d4a1 100644 --- a/dfx_utils/include/hisysevent_util.h +++ b/dfx_utils/include/hisysevent_util.h @@ -18,7 +18,7 @@ #include -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "hisysevent.h" #include "constants_dinput.h" @@ -39,7 +39,7 @@ const std::string DINPUT_OPT_FAIL = "DINPUT_OPT_FAIL"; const std::string DINPUT_UNREGISTER_FAIL = "DINPUT_UNREGISTER_FAIL"; class HisyseventUtil { -DECLARE_SINGLE_INSTANCE_BASE(HisyseventUtil); +FWK_DECLARE_SINGLE_INSTANCE_BASE(HisyseventUtil); public: void SysEventWriteBehavior(std::string status, std::string msg); void SysEventWriteBehavior(std::string status, std::string devId, std::string msg); diff --git a/dfx_utils/src/hidumper.cpp b/dfx_utils/src/hidumper.cpp index fe2de7a..0186345 100644 --- a/dfx_utils/src/hidumper.cpp +++ b/dfx_utils/src/hidumper.cpp @@ -23,7 +23,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(HiDumper); +FWK_IMPLEMENT_SINGLE_INSTANCE(HiDumper); namespace { const std::string ARGS_HELP = "-h"; const std::string ARGS_NODE_INFO = "-nodeinfo"; diff --git a/dfx_utils/src/hisysevent_util.cpp b/dfx_utils/src/hisysevent_util.cpp index 1f0cbf7..8f5f9af 100644 --- a/dfx_utils/src/hisysevent_util.cpp +++ b/dfx_utils/src/hisysevent_util.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(HisyseventUtil); +FWK_IMPLEMENT_SINGLE_INSTANCE(HisyseventUtil); void HisyseventUtil::SysEventWriteBehavior(std::string status, std::string msg) { diff --git a/inputdevicehandler/include/distributed_input_handler.h b/inputdevicehandler/include/distributed_input_handler.h index 04cf0a0..b6e6815 100644 --- a/inputdevicehandler/include/distributed_input_handler.h +++ b/inputdevicehandler/include/distributed_input_handler.h @@ -25,7 +25,7 @@ #include #include "ihardware_handler.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "constants_dinput.h" #include "input_hub.h" @@ -38,7 +38,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { class DistributedInputHandler : public IHardwareHandler { -DECLARE_SINGLE_INSTANCE_BASE(DistributedInputHandler); +FWK_DECLARE_SINGLE_INSTANCE_BASE(DistributedInputHandler); public: API_EXPORT int32_t Initialize() override; API_EXPORT virtual std::vector QueryMeta() override; diff --git a/inputdevicehandler/src/distributed_input_handler.cpp b/inputdevicehandler/src/distributed_input_handler.cpp index 4597623..3e86406 100644 --- a/inputdevicehandler/src/distributed_input_handler.cpp +++ b/inputdevicehandler/src/distributed_input_handler.cpp @@ -40,7 +40,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DistributedInputHandler); +FWK_IMPLEMENT_SINGLE_INSTANCE(DistributedInputHandler); DistributedInputHandler::DistributedInputHandler() : collectThreadID_(-1), isCollectingEvents_(false), isStartCollectEventThread_(false) { diff --git a/interfaces/ipc/include/dinput_sa_manager.h b/interfaces/ipc/include/dinput_sa_manager.h index 2abc95f..cb1efbc 100644 --- a/interfaces/ipc/include/dinput_sa_manager.h +++ b/interfaces/ipc/include/dinput_sa_manager.h @@ -22,7 +22,7 @@ #include "i_distributed_source_input.h" #include "i_distributed_sink_input.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "system_ability_status_change_stub.h" #include "idistributed_hardware_source.h" @@ -37,7 +37,7 @@ const uint32_t DINPUT_CLIENT_CHECK_SINK_CALLBACK_REGISTER_MSG = 2; const uint32_t DINPUT_CLIENT_CLEAR_SOURCE_CALLBACK_REGISTER_MSG = 3; const uint32_t DINPUT_CLIENT_CLEAR_SINK_CALLBACK_REGISTER_MSG = 4; class DInputSAManager { -DECLARE_SINGLE_INSTANCE_BASE(DInputSAManager); +FWK_DECLARE_SINGLE_INSTANCE_BASE(DInputSAManager); public: void Init(); bool GetDInputSourceProxy(); diff --git a/interfaces/ipc/src/dinput_sa_manager.cpp b/interfaces/ipc/src/dinput_sa_manager.cpp index bb72e37..04db90c 100644 --- a/interfaces/ipc/src/dinput_sa_manager.cpp +++ b/interfaces/ipc/src/dinput_sa_manager.cpp @@ -25,7 +25,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DInputSAManager); +FWK_IMPLEMENT_SINGLE_INSTANCE(DInputSAManager); const uint32_t DINPUT_CLIENT_HANDLER_MSG_DELAY_TIME = 100; // million seconds void DInputSAManager::SystemAbilityListener::OnRemoveSystemAbility(int32_t systemAbilityId, const std::string &deviceId) { diff --git a/interfaces/ipc/test/clientunittest/mock_samanager.cpp b/interfaces/ipc/test/clientunittest/mock_samanager.cpp index 25e1be5..59dd4c3 100644 --- a/interfaces/ipc/test/clientunittest/mock_samanager.cpp +++ b/interfaces/ipc/test/clientunittest/mock_samanager.cpp @@ -27,7 +27,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DInputSAManager); +FWK_IMPLEMENT_SINGLE_INSTANCE(DInputSAManager); void DInputSAManager::SystemAbilityListener::OnRemoveSystemAbility(int32_t systemAbilityId, const std::string &deviceId) {} diff --git a/services/source/sourcemanager/include/distributed_input_source_sa_cli_mgr.h b/services/source/sourcemanager/include/distributed_input_source_sa_cli_mgr.h index 08dac97..e98b8dc 100644 --- a/services/source/sourcemanager/include/distributed_input_source_sa_cli_mgr.h +++ b/services/source/sourcemanager/include/distributed_input_source_sa_cli_mgr.h @@ -24,13 +24,13 @@ #include "event_handler.h" #include "i_distributed_source_input.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" namespace OHOS { namespace DistributedHardware { namespace DistributedInput { class DInputSourceSACliMgr { -DECLARE_SINGLE_INSTANCE_BASE(DInputSourceSACliMgr); +FWK_DECLARE_SINGLE_INSTANCE_BASE(DInputSourceSACliMgr); public: DInputSourceSACliMgr(); virtual ~DInputSourceSACliMgr(); diff --git a/services/source/sourcemanager/src/distributed_input_source_sa_cli_mgr.cpp b/services/source/sourcemanager/src/distributed_input_source_sa_cli_mgr.cpp index 7b303c4..aafebbf 100644 --- a/services/source/sourcemanager/src/distributed_input_source_sa_cli_mgr.cpp +++ b/services/source/sourcemanager/src/distributed_input_source_sa_cli_mgr.cpp @@ -25,7 +25,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DInputSourceSACliMgr); +FWK_IMPLEMENT_SINGLE_INSTANCE(DInputSourceSACliMgr); DInputSourceSACliMgr::DInputSourceSACliMgr() { DHLOGI("Ctor DInputSourceSACliMgr"); diff --git a/services/state/include/dinput_sink_state.h b/services/state/include/dinput_sink_state.h index 5844b1f..11232da 100644 --- a/services/state/include/dinput_sink_state.h +++ b/services/state/include/dinput_sink_state.h @@ -23,7 +23,7 @@ #include #include "constants_dinput.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "touchpad_event_fragment_mgr.h" namespace OHOS { @@ -40,7 +40,7 @@ enum class DhIdState { }; class DInputSinkState { - DECLARE_SINGLE_INSTANCE_BASE(DInputSinkState); + FWK_DECLARE_SINGLE_INSTANCE_BASE(DInputSinkState); public: int32_t Init(); int32_t Release(); diff --git a/services/state/src/dinput_sink_state.cpp b/services/state/src/dinput_sink_state.cpp index 8bf357f..487e099 100644 --- a/services/state/src/dinput_sink_state.cpp +++ b/services/state/src/dinput_sink_state.cpp @@ -31,7 +31,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DInputSinkState); +FWK_IMPLEMENT_SINGLE_INSTANCE(DInputSinkState); DInputSinkState::~DInputSinkState() { Release(); diff --git a/services/transportbase/include/distributed_input_transport_base.h b/services/transportbase/include/distributed_input_transport_base.h index f738515..09afa6e 100644 --- a/services/transportbase/include/distributed_input_transport_base.h +++ b/services/transportbase/include/distributed_input_transport_base.h @@ -29,7 +29,7 @@ #include "event_handler.h" #include "nlohmann/json.hpp" #include "securec.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "socket.h" #include "softbus_bus_center.h" @@ -44,7 +44,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { class DistributedInputTransportBase { - DECLARE_SINGLE_INSTANCE_BASE(DistributedInputTransportBase); + FWK_DECLARE_SINGLE_INSTANCE_BASE(DistributedInputTransportBase); public: int32_t Init(); int32_t StartSession(const std::string &remoteDevId); diff --git a/services/transportbase/src/distributed_input_transport_base.cpp b/services/transportbase/src/distributed_input_transport_base.cpp index c5c3c99..d6b6f69 100644 --- a/services/transportbase/src/distributed_input_transport_base.cpp +++ b/services/transportbase/src/distributed_input_transport_base.cpp @@ -48,7 +48,7 @@ static QosTV g_qosInfo[] = { }; static uint32_t g_QosTV_Param_Index = static_cast(sizeof(g_qosInfo) / sizeof(g_qosInfo[0])); } -IMPLEMENT_SINGLE_INSTANCE(DistributedInputTransportBase); +FWK_IMPLEMENT_SINGLE_INSTANCE(DistributedInputTransportBase); DistributedInputTransportBase::~DistributedInputTransportBase() { DHLOGI("Release Transport Session"); diff --git a/sinkhandler/include/distributed_input_sink_handler.h b/sinkhandler/include/distributed_input_sink_handler.h index 01171b3..4f19a4c 100644 --- a/sinkhandler/include/distributed_input_sink_handler.h +++ b/sinkhandler/include/distributed_input_sink_handler.h @@ -22,7 +22,7 @@ #include "idistributed_hardware_sink.h" #include "iservice_registry.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "system_ability_definition.h" #include "system_ability_load_callback_stub.h" @@ -33,7 +33,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { class DistributedInputSinkHandler : public IDistributedHardwareSink { -DECLARE_SINGLE_INSTANCE_BASE(DistributedInputSinkHandler); +FWK_DECLARE_SINGLE_INSTANCE_BASE(DistributedInputSinkHandler); public: int32_t InitSink(const std::string ¶ms) override; int32_t ReleaseSink() override; diff --git a/sinkhandler/src/distributed_input_sink_handler.cpp b/sinkhandler/src/distributed_input_sink_handler.cpp index 066a8bb..484bdd3 100644 --- a/sinkhandler/src/distributed_input_sink_handler.cpp +++ b/sinkhandler/src/distributed_input_sink_handler.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DistributedInputSinkHandler); +FWK_IMPLEMENT_SINGLE_INSTANCE(DistributedInputSinkHandler); DistributedInputSinkHandler::DistributedInputSinkHandler() { diff --git a/sourcehandler/include/distributed_input_source_handler.h b/sourcehandler/include/distributed_input_source_handler.h index 9ed6ed8..84b209e 100644 --- a/sourcehandler/include/distributed_input_source_handler.h +++ b/sourcehandler/include/distributed_input_source_handler.h @@ -22,7 +22,7 @@ #include "idistributed_hardware_source.h" #include "iservice_registry.h" -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "system_ability_load_callback_stub.h" #include "system_ability_definition.h" @@ -35,7 +35,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { class DistributedInputSourceHandler : public IDistributedHardwareSource { -DECLARE_SINGLE_INSTANCE_BASE(DistributedInputSourceHandler); +FWK_DECLARE_SINGLE_INSTANCE_BASE(DistributedInputSourceHandler); public: int32_t InitSource(const std::string ¶ms) override; int32_t ReleaseSource() override; diff --git a/sourcehandler/src/distributed_input_source_handler.cpp b/sourcehandler/src/distributed_input_source_handler.cpp index 5650deb..9c53fed 100644 --- a/sourcehandler/src/distributed_input_source_handler.cpp +++ b/sourcehandler/src/distributed_input_source_handler.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DistributedInputSourceHandler); +FWK_IMPLEMENT_SINGLE_INSTANCE(DistributedInputSourceHandler); DistributedInputSourceHandler::DistributedInputSourceHandler() { diff --git a/utils/include/dinput_context.h b/utils/include/dinput_context.h index af692f2..b0ce5be 100644 --- a/utils/include/dinput_context.h +++ b/utils/include/dinput_context.h @@ -25,7 +25,7 @@ #include -#include "single_instance.h" +#include "dhfwk_single_instance.h" #include "constants.h" #include "device_type.h" @@ -51,7 +51,7 @@ const nlohmann::json DISABLE_LOW_LATENCY = { {LOW_LATENCY_ENABLE, false}, }; class DInputContext { -DECLARE_SINGLE_INSTANCE_BASE(DInputContext); +FWK_DECLARE_SINGLE_INSTANCE_BASE(DInputContext); public: std::string GetScreenInfoKey(const std::string &devId, const uint64_t sourceWinId); int32_t RemoveSinkScreenInfo(const std::string &screenInfoKey); diff --git a/utils/src/dinput_context.cpp b/utils/src/dinput_context.cpp index deb9f03..6902efd 100644 --- a/utils/src/dinput_context.cpp +++ b/utils/src/dinput_context.cpp @@ -23,7 +23,7 @@ namespace OHOS { namespace DistributedHardware { namespace DistributedInput { -IMPLEMENT_SINGLE_INSTANCE(DInputContext); +FWK_IMPLEMENT_SINGLE_INSTANCE(DInputContext); DInputContext::~DInputContext() {