diff --git a/common/include/constants_dinput.h b/common/include/constants_dinput.h index 9d1f0cf..442a206 100644 --- a/common/include/constants_dinput.h +++ b/common/include/constants_dinput.h @@ -32,38 +32,7 @@ namespace DistributedInput { #define VIRTUAL_DEVICE_NAME "Hos Distributed Virtual Device " - /** - * Status code. - */ - constexpr int32_t NO_ERROR = 0; - constexpr int32_t ERROR = -1; - - /** - * Status code, indicates general success. - */ - constexpr int32_t SUCCESS = 0; - - /** - * Status code, indicates general failure. - */ - constexpr int32_t FAILURE = -60000; - - /** - * Status code, DISERVER general failure. - */ - constexpr int32_t FAILURE_DIS = -60001; - - /** - * Status code, hardware is resigtring. - */ - constexpr int32_t FAILURE_REGISTING = -60002; - - /** - * Status code, hardware is unresigtring. - */ - constexpr int32_t FAILURE_UNREGISTING = -60003; - - /** + /* * Device Type definitions */ enum class DInputDeviceType : uint32_t { @@ -74,12 +43,12 @@ namespace DistributedInput { ALL = MOUSE | KEYBOARD, }; - /** + /* * Maximum number of signalled FDs to handle at a time. */ constexpr uint32_t EPOLL_MAX_EVENTS = 16; - /** + /* * Maximum number of event buffer size. */ constexpr uint32_t INPUT_EVENT_BUFFER_SIZE = 256; @@ -218,21 +187,21 @@ namespace DistributedInput { InputDevice deviceInfo; }; - /** + /* * Device Type definitions */ enum class DInputServerType { - /** + /* * null server */ NULL_SERVER_TYPE = 0, - /** + /* * source server */ SOURCE_SERVER_TYPE = 1, - /** + /* * sink server. */ SINK_SERVER_TYPE = 2, @@ -245,7 +214,8 @@ namespace DistributedInput { OPENED = 0x02, CLOSING = 0x03, }; -} -} -} -#endif +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_DISTRIBUTED_INPUT_CONSTANTS_H diff --git a/common/include/dinput_errcode.h b/common/include/dinput_errcode.h index 348a9a6..0ca3062 100644 --- a/common/include/dinput_errcode.h +++ b/common/include/dinput_errcode.h @@ -35,11 +35,14 @@ namespace DistributedInput { constexpr int32_t ERR_DH_INPUT_DLOPEN_FAIL = -60009; constexpr int32_t ERR_DH_INPUT_DLSYM_FAIL = -60010; constexpr int32_t ERR_DH_INPUT_LOW_LATENCY_LIB_NULL = -60011; + // whilte list error code constexpr int32_t ERR_DH_INPUT_WHILTELIST_INIT_FAIL = -61001; constexpr int32_t ERR_DH_INPUT_WHILTELIST_GET_WHILTELIST_FAIL = -61002; + // handler error code constexpr int32_t ERR_DH_INPUT_HANDLER_GET_DEVICE_ID_FAIL = -63000; + // service sink error code constexpr int32_t ERR_DH_INPUT_SERVER_SINK_COLLECTOR_INIT_FAIL = -64000; constexpr int32_t ERR_DH_INPUT_SERVER_SINK_MANAGER_INIT_FAIL = -64001; @@ -52,11 +55,12 @@ namespace DistributedInput { constexpr int32_t ERR_DH_INPUT_SERVER_SINK_TRANSPORT_RESPSTOP_FAIL = -64008; constexpr int32_t ERR_DH_INPUT_SERVER_SINK_TRANSPORT_SENDMESSAGE_FAIL = -64009; constexpr int32_t ERR_DH_INPUT_SERVER_SINK_TRANSPORT_RESP_LATENCY_FAIL = -64010; + // service source error code constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_INJECT_REGISTER_FAIL = -65000; constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_INJECT_UNREGISTER_FAIL = -65001; constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_INJECT_PREPARE_FAIL = -65002; - constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_INJECT_NODE_MANAGER_IS_NULL = -65003;// + constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_INJECT_NODE_MANAGER_IS_NULL = -65003; constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_OPEN_DEVICE_NODE_FAIL = -65004; constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_CREATE_HANDLE_FAIL = -65005; constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_CLOSE_DEVICE_FAIL = -65006; @@ -88,9 +92,11 @@ namespace DistributedInput { constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_MANAGER_START_MSG_IS_BAD = -65032; constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_MANAGER_STOP_MSG_IS_BAD = -65033; constexpr int32_t ERR_DH_INPUT_SERVER_SOURCE_TRANSPORT_LATENCY_FAIL = -65034; + // handler error code constexpr int32_t ERR_DH_INPUT_SINK_HANDLER_INIT_SINK_SA_FAIL = -66000; constexpr int32_t ERR_DH_INPUT_SINK_HANDLER_INIT_SOURCE_SA_FAIL = -66001; + // interface error code constexpr int32_t ERR_DH_INPUT_IPC_INVALID_DESCRIPTOR = -67000; constexpr int32_t ERR_DH_INPUT_CLIENT_GET_SOURCE_PROXY_FAIL = -67001; @@ -128,7 +134,8 @@ namespace DistributedInput { constexpr int32_t ERR_DH_INPUT_HIDUMP_INVALID_ARGS = -68000; constexpr int32_t ERR_DH_INPUT_HIDUMP_DUMP_PROCESS_FAIL = -68001; constexpr int32_t ERR_DH_INPUT_HIDUMP_DPRINTF_FAIL = -68002; -} -} -} -#endif \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_DINPUT_ERRCODE_H \ No newline at end of file diff --git a/common/include/dinput_hitrace.h b/common/include/dinput_hitrace.h index 1074a3e..9e09661 100644 --- a/common/include/dinput_hitrace.h +++ b/common/include/dinput_hitrace.h @@ -37,4 +37,5 @@ constexpr int32_t DINPUT_STOP_TASK = 3; constexpr int32_t DINPUT_UNPREPARE_TASK = 4; } // namespace DistributedHardware } // namespace OHOS -#endif \ No newline at end of file + +#endif // OHOS_DINPUT_HITRACE_H \ No newline at end of file diff --git a/common/include/dinput_sa_process_state.h b/common/include/dinput_sa_process_state.h index ae48f91..24eae65 100644 --- a/common/include/dinput_sa_process_state.h +++ b/common/include/dinput_sa_process_state.h @@ -24,4 +24,5 @@ void SetSourceProcessExit(); } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DINPUT_SA_PROCESS_STATE_H \ No newline at end of file diff --git a/common/include/input_hub.cpp b/common/include/input_hub.cpp index 0dc2598..7e24604 100644 --- a/common/include/input_hub.cpp +++ b/common/include/input_hub.cpp @@ -452,7 +452,7 @@ int32_t InputHub::OpenInputDeviceLocked(const std::string& devicePath) } GenerateDescriptor(identifier); - // Allocate device. (The device object takes ownership of the fd at this point.) + // Allocate device. (The device object takes ownership of the fd at this point.) int32_t deviceId = nextDeviceId_++; std::unique_ptr device = std::make_unique(fd, deviceId, devicePath, identifier); diff --git a/common/include/input_hub.h b/common/include/input_hub.h index 2776aa2..922769b 100644 --- a/common/include/input_hub.h +++ b/common/include/input_hub.h @@ -99,10 +99,10 @@ private: bool ContainsNonZeroByte(const uint8_t* array, uint32_t startIndex, uint32_t endIndex); int64_t ProcessEventTimestamp(const input_event& event); /* this macro is used to tell if "bit" is set in "array" - * it selects a byte from the array, and does a boolean AND - * operation with a byte that only has the relevant bit set. - * eg. to check for the 12th bit, we do (array[1] & 1<<4) - */ + * it selects a byte from the array, and does a boolean AND + * operation with a byte that only has the relevant bit set. + * eg. to check for the 12th bit, we do (array[1] & 1<<4) + */ bool TestBit(uint32_t bit, const uint8_t* array); /* this macro computes the number of bytes needed to represent a bit array of the specified size */ uint32_t SizeofBitArray(uint32_t bit); @@ -138,4 +138,4 @@ private: } // namespace DistributedHardware } // namespace OHOS -#endif // INPUT_HUB_H +#endif // INPUT_HUB_H diff --git a/common/include/test/whitelistunittest/white_list_test.cpp b/common/include/test/whitelistunittest/white_list_test.cpp index 579c1dd..86ed8fc 100644 --- a/common/include/test/whitelistunittest/white_list_test.cpp +++ b/common/include/test/whitelistunittest/white_list_test.cpp @@ -66,7 +66,7 @@ HWTEST_F(WhiteListTest, SyncWhiteList01, testing::ext::TestSize.Level0) vecKeyCode.clear(); vecCombinationKey.clear(); int32_t ret = WhiteListUtil::GetInstance().SyncWhiteList(deviceId, vecWhiteList); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(WhiteListTest, SyncWhiteList02, testing::ext::TestSize.Level0) @@ -94,7 +94,7 @@ HWTEST_F(WhiteListTest, SyncWhiteList02, testing::ext::TestSize.Level0) vecKeyCode.clear(); vecCombinationKey.clear(); int32_t ret = WhiteListUtil::GetInstance().SyncWhiteList(deviceId, vecWhiteList); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(WhiteListTest, SyncWhiteList03, testing::ext::TestSize.Level0) @@ -120,7 +120,7 @@ HWTEST_F(WhiteListTest, SyncWhiteList03, testing::ext::TestSize.Level0) vecKeyCode.clear(); vecCombinationKey.clear(); int32_t ret = WhiteListUtil::GetInstance().SyncWhiteList(deviceId, vecWhiteList); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(WhiteListTest, SyncWhiteList04, testing::ext::TestSize.Level0) @@ -146,15 +146,15 @@ HWTEST_F(WhiteListTest, SyncWhiteList04, testing::ext::TestSize.Level0) vecKeyCode.clear(); vecCombinationKey.clear(); int32_t ret = WhiteListUtil::GetInstance().SyncWhiteList(deviceId, vecWhiteList); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } - + HWTEST_F(WhiteListTest, GetWhiteList01, testing::ext::TestSize.Level0) { std::string deviceId = "test"; TYPE_WHITE_LIST_VEC vecWhiteList; int32_t ret = WhiteListUtil::GetInstance().GetWhiteList(deviceId, vecWhiteList); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(WhiteListTest, GetWhiteList02, testing::ext::TestSize.Level0) @@ -162,7 +162,7 @@ HWTEST_F(WhiteListTest, GetWhiteList02, testing::ext::TestSize.Level0) std::string deviceId = "test1"; TYPE_WHITE_LIST_VEC vecWhiteList; int32_t ret = WhiteListUtil::GetInstance().GetWhiteList(deviceId, vecWhiteList); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(WhiteListTest, GetWhiteList03, testing::ext::TestSize.Level0) @@ -329,22 +329,22 @@ HWTEST_F(WhiteListTest, ClearWhiteList01, testing::ext::TestSize.Level0) { std::string deviceId = "test"; int32_t ret = WhiteListUtil::GetInstance().ClearWhiteList(deviceId); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(WhiteListTest, ClearWhiteList02, testing::ext::TestSize.Level0) { std::string deviceId = "test1"; int32_t ret = WhiteListUtil::GetInstance().ClearWhiteList(deviceId); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(WhiteListTest, ClearWhiteList03, testing::ext::TestSize.Level0) { std::string deviceId; int32_t ret = WhiteListUtil::GetInstance().ClearWhiteList(deviceId); - EXPECT_EQ(SUCCESS, ret); -} -} -} + EXPECT_EQ(DH_SUCCESS, ret); } +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/common/include/test/whitelistunittest/white_list_test.h b/common/include/test/whitelistunittest/white_list_test.h index 4cdea36..029aaed 100644 --- a/common/include/test/whitelistunittest/white_list_test.h +++ b/common/include/test/whitelistunittest/white_list_test.h @@ -28,7 +28,8 @@ public: virtual void SetUp() override; virtual void TearDown() override; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + #endif // WHITE_LIST_TEST_H diff --git a/common/include/white_list_util.h b/common/include/white_list_util.h index ab1e535..6be95e5 100644 --- a/common/include/white_list_util.h +++ b/common/include/white_list_util.h @@ -80,4 +80,4 @@ private: } // namespace DistributedHardware } // namespace OHOS -#endif // WHITE_LIST_UTIL_H +#endif // WHITE_LIST_UTIL_H diff --git a/dfx_utils/include/hidumper.h b/dfx_utils/include/hidumper.h index 2584769..17958d4 100644 --- a/dfx_utils/include/hidumper.h +++ b/dfx_utils/include/hidumper.h @@ -77,7 +77,8 @@ private: std::mutex sessionMutex_; std::mutex operationMutex_; }; -} -} -} -#endif \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // HIDUMP_HELPER_H \ No newline at end of file diff --git a/dfx_utils/include/hisysevent_util.h b/dfx_utils/include/hisysevent_util.h index d3590ba..f7f36ed 100644 --- a/dfx_utils/include/hisysevent_util.h +++ b/dfx_utils/include/hisysevent_util.h @@ -56,4 +56,5 @@ private: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS -#endif + +#endif // OHOS_DISTRIBUTED_INPUT_HISYSEVENT_UTILS_H diff --git a/dfx_utils/src/hisysevent_util.cpp b/dfx_utils/src/hisysevent_util.cpp index a1e5850..64d5d01 100644 --- a/dfx_utils/src/hisysevent_util.cpp +++ b/dfx_utils/src/hisysevent_util.cpp @@ -16,6 +16,7 @@ #include "hisysevent_util.h" #include "anonymous_string.h" +#include "dinput_errcode.h" #include "distributed_hardware_log.h" namespace OHOS { @@ -30,7 +31,7 @@ void HisyseventUtil::SysEventWriteBehavior(std::string status, std::string msg) status, OHOS::HiviewDFX::HiSysEvent::EventType::BEHAVIOR, "MSG", msg); - if (res != SUCCESS) { + if (res != DH_SUCCESS) { DHLOGE("Write HiSysEvent error, res:%d", res); } } @@ -43,7 +44,7 @@ void HisyseventUtil::SysEventWriteBehavior(std::string status, std::string devId OHOS::HiviewDFX::HiSysEvent::EventType::BEHAVIOR, "DEVID", GetAnonyString(devId), "MSG", msg); - if (res != SUCCESS) { + if (res != DH_SUCCESS) { DHLOGE("Write HiSysEvent error, res:%d", res); } } @@ -57,7 +58,7 @@ void HisyseventUtil::SysEventWriteBehavior(std::string status, std::string devId "DEVID", GetAnonyString(devId), "DHID", GetAnonyString(dhId), "MSG", msg); - if (res != SUCCESS) { + if (res != DH_SUCCESS) { DHLOGE("Write HiSysEvent error, res:%d", res); } } @@ -69,7 +70,7 @@ void HisyseventUtil::SysEventWriteFault(std::string status, std::string msg) status, OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, "MSG", msg); - if (res != SUCCESS) { + if (res != DH_SUCCESS) { DHLOGE("Write HiSysEvent error, res:%d", res); } } @@ -83,7 +84,7 @@ void HisyseventUtil::SysEventWriteFault(std::string status, std::string devId, i "DEVID", GetAnonyString(devId), "ERROR_CODE", errorCode, "MSG", msg); - if (res != SUCCESS) { + if (res != DH_SUCCESS) { DHLOGE("Write HiSysEvent error, res:%d", res); } } @@ -99,7 +100,7 @@ void HisyseventUtil::SysEventWriteFault(std::string status, std::string devId, s "DHID", GetAnonyString(dhId), "ERROR_CODE", errorCode, "MSG", msg); - if (res != SUCCESS) { + if (res != DH_SUCCESS) { DHLOGE("Write HiSysEvent error, res:%d", res); } } diff --git a/frameworks/include/i_add_white_list_infos_call_back.h b/frameworks/include/i_add_white_list_infos_call_back.h index 5229bb8..187a7a0 100644 --- a/frameworks/include/i_add_white_list_infos_call_back.h +++ b/frameworks/include/i_add_white_list_infos_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IAddWhiteListInfosCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_ADD_WHITE_LIST_INFOS_CALL_BACK_H +#endif // I_ADD_WHITE_LIST_INFOS_CALL_BACK_H diff --git a/frameworks/include/i_del_white_list_infos_call_back.h b/frameworks/include/i_del_white_list_infos_call_back.h index f225080..ea36bdd 100644 --- a/frameworks/include/i_del_white_list_infos_call_back.h +++ b/frameworks/include/i_del_white_list_infos_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IDelWhiteListInfosCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_ADD_WHITE_LIST_INFOS_CALL_BACK_H +#endif // I_ADD_WHITE_LIST_INFOS_CALL_BACK_H diff --git a/frameworks/include/i_prepare_d_input_call_back.h b/frameworks/include/i_prepare_d_input_call_back.h index 61debd2..f5ab6fd 100644 --- a/frameworks/include/i_prepare_d_input_call_back.h +++ b/frameworks/include/i_prepare_d_input_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IPrepareDInputCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_PREPARE_D_INPUT_CALL_BACK_H +#endif // I_PREPARE_D_INPUT_CALL_BACK_H diff --git a/frameworks/include/i_register_d_input_call_back.h b/frameworks/include/i_register_d_input_call_back.h index ed15795..eb00f69 100644 --- a/frameworks/include/i_register_d_input_call_back.h +++ b/frameworks/include/i_register_d_input_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IRegisterDInputCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_REGIST_D_INPUT_CALL_BACK_H +#endif // I_REGIST_D_INPUT_CALL_BACK_H diff --git a/frameworks/include/i_start_d_input_call_back.h b/frameworks/include/i_start_d_input_call_back.h index fac26b9..b4be761 100644 --- a/frameworks/include/i_start_d_input_call_back.h +++ b/frameworks/include/i_start_d_input_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IStartDInputCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_START_D_INPUT_CALL_BACK_H +#endif // I_START_D_INPUT_CALL_BACK_H diff --git a/frameworks/include/i_start_d_input_server_call_back.h b/frameworks/include/i_start_d_input_server_call_back.h index d300268..7396283 100644 --- a/frameworks/include/i_start_d_input_server_call_back.h +++ b/frameworks/include/i_start_d_input_server_call_back.h @@ -35,8 +35,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IStartDInputServerCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_START_D_INPUT_SERVER_CALL_BACK_H +#endif // I_START_D_INPUT_SERVER_CALL_BACK_H diff --git a/frameworks/include/i_stop_d_input_call_back.h b/frameworks/include/i_stop_d_input_call_back.h index b612131..e710e44 100644 --- a/frameworks/include/i_stop_d_input_call_back.h +++ b/frameworks/include/i_stop_d_input_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IStopDInputCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_STOP_D_INPUT_CALL_BACK_H +#endif // I_STOP_D_INPUT_CALL_BACK_H diff --git a/frameworks/include/i_unprepare_d_input_call_back.h b/frameworks/include/i_unprepare_d_input_call_back.h index e26f4b2..6d833b5 100644 --- a/frameworks/include/i_unprepare_d_input_call_back.h +++ b/frameworks/include/i_unprepare_d_input_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IUnprepareDInputCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_UNPREPARE_D_INPUT_CALL_BACK_H +#endif // I_UNPREPARE_D_INPUT_CALL_BACK_H diff --git a/frameworks/include/i_unregister_d_input_call_back.h b/frameworks/include/i_unregister_d_input_call_back.h index a7d7fa5..72f807f 100644 --- a/frameworks/include/i_unregister_d_input_call_back.h +++ b/frameworks/include/i_unregister_d_input_call_back.h @@ -33,8 +33,8 @@ public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IUnregisterDInputCallback"); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // I_UNREGIST_D_INPUT_CALL_BACK_H +#endif // I_UNREGIST_D_INPUT_CALL_BACK_H diff --git a/inputdevicehandler/include/distributed_input_handler.h b/inputdevicehandler/include/distributed_input_handler.h index f22507a..1678a7f 100644 --- a/inputdevicehandler/include/distributed_input_handler.h +++ b/inputdevicehandler/include/distributed_input_handler.h @@ -73,8 +73,8 @@ __attribute__((visibility("default"))) IHardwareHandler* GetHardwareHandler(); #ifdef __cplusplus } #endif -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_HANDLER_H +#endif // DISTRIBUTED_INPUT_HANDLER_H diff --git a/interfaces/inner_kits/include/distributed_input_kit.h b/interfaces/inner_kits/include/distributed_input_kit.h index bfa867c..0fcefb7 100644 --- a/interfaces/inner_kits/include/distributed_input_kit.h +++ b/interfaces/inner_kits/include/distributed_input_kit.h @@ -52,4 +52,5 @@ public: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DISTRIBUTED_INPUT_KIT_H diff --git a/interfaces/inner_kits/test/unittest/distributed_input_inner_test.cpp b/interfaces/inner_kits/test/unittest/distributed_input_inner_test.cpp index 2b32555..26f2f77 100644 --- a/interfaces/inner_kits/test/unittest/distributed_input_inner_test.cpp +++ b/interfaces/inner_kits/test/unittest/distributed_input_inner_test.cpp @@ -16,6 +16,7 @@ #include "distributed_input_inner_test.h" #include "system_ability_definition.h" +#include "dinput_errcode.h" using namespace testing::ext; using namespace OHOS::DistributedHardware::DistributedInput; @@ -80,23 +81,23 @@ int DistributedInputInnerTest::CheckSourceProxy() const OHOS::sptr systemAbilityManager = OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (!systemAbilityManager) { - return SUCCESS; + return DH_SUCCESS; } OHOS::sptr remoteObject = systemAbilityManager->GetSystemAbility( DISTRIBUTED_HARDWARE_INPUT_SOURCE_SA_ID); if (!remoteObject) { - return SUCCESS; + return DH_SUCCESS; } OHOS::sptr proxyTest; proxyTest = OHOS::iface_cast(remoteObject); if ((!proxyTest) || (!proxyTest->AsObject())) { - return SUCCESS; + return DH_SUCCESS; } - return SUCCESS; + return DH_SUCCESS; } int DistributedInputInnerTest::CheckSinkProxy() const @@ -104,23 +105,23 @@ int DistributedInputInnerTest::CheckSinkProxy() const OHOS::sptr systemAbilityManager = OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (!systemAbilityManager) { - return SUCCESS; + return DH_SUCCESS; } OHOS::sptr remoteObject = systemAbilityManager->GetSystemAbility( DISTRIBUTED_HARDWARE_INPUT_SINK_SA_ID); if (!remoteObject) { - return SUCCESS; + return DH_SUCCESS; } OHOS::sptr proxyTest; proxyTest = OHOS::iface_cast(remoteObject); if ((!proxyTest) || (!proxyTest->AsObject())) { - return SUCCESS; + return DH_SUCCESS; } - return SUCCESS; + return DH_SUCCESS; } HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput01, testing::ext::TestSize.Level0) @@ -128,7 +129,7 @@ HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput01, testing::ext::TestSize string deviceId = "PrepareRemoteInput01"; sptr callback = new TestPrepareDInputCallback(); int32_t ret = DistributedInputKit::PrepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput02, testing::ext::TestSize.Level0) @@ -136,7 +137,7 @@ HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput02, testing::ext::TestSize string deviceId = ""; sptr callback = new TestPrepareDInputCallback(); int32_t ret = DistributedInputKit::PrepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput03, testing::ext::TestSize.Level0) @@ -144,7 +145,7 @@ HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput03, testing::ext::TestSize string deviceId = "PrepareRemoteInput01"; sptr callback = nullptr; int32_t ret = DistributedInputKit::PrepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput04, testing::ext::TestSize.Level0) @@ -152,7 +153,7 @@ HWTEST_F(DistributedInputInnerTest, PrepareRemoteInput04, testing::ext::TestSize string deviceId = ""; sptr callback = nullptr; int32_t ret = DistributedInputKit::PrepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput01, testing::ext::TestSize.Level0) @@ -160,7 +161,7 @@ HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput01, testing::ext::TestSi string deviceId = "UnprepareRemoteInput01"; sptr callback = new TestUnprepareDInputCallback(); int32_t ret = DistributedInputKit::UnprepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput02, testing::ext::TestSize.Level0) @@ -168,7 +169,7 @@ HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput02, testing::ext::TestSi string deviceId = ""; sptr callback = new TestUnprepareDInputCallback(); int32_t ret = DistributedInputKit::UnprepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput03, testing::ext::TestSize.Level0) @@ -176,7 +177,7 @@ HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput03, testing::ext::TestSi string deviceId = "UnprepareRemoteInput01"; sptr callback = nullptr; int32_t ret = DistributedInputKit::UnprepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput04, testing::ext::TestSize.Level0) @@ -184,7 +185,7 @@ HWTEST_F(DistributedInputInnerTest, UnprepareRemoteInput04, testing::ext::TestSi string deviceId = ""; sptr callback = nullptr; int32_t ret = DistributedInputKit::UnprepareRemoteInput(deviceId, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StartRemoteInput01, testing::ext::TestSize.Level0) @@ -193,7 +194,7 @@ HWTEST_F(DistributedInputInnerTest, StartRemoteInput01, testing::ext::TestSize.L sptr callback = new TestStartDInputCallback(); int32_t ret = DistributedInputKit::StartRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StartRemoteInput02, testing::ext::TestSize.Level0) @@ -202,7 +203,7 @@ HWTEST_F(DistributedInputInnerTest, StartRemoteInput02, testing::ext::TestSize.L sptr callback = new TestStartDInputCallback(); int32_t ret = DistributedInputKit::StartRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StartRemoteInput03, testing::ext::TestSize.Level0) @@ -211,7 +212,7 @@ HWTEST_F(DistributedInputInnerTest, StartRemoteInput03, testing::ext::TestSize.L sptr callback = nullptr; int32_t ret = DistributedInputKit::StartRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StartRemoteInput04, testing::ext::TestSize.Level0) @@ -220,7 +221,7 @@ HWTEST_F(DistributedInputInnerTest, StartRemoteInput04, testing::ext::TestSize.L sptr callback = nullptr; int32_t ret = DistributedInputKit::StartRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StopRemoteInput01, testing::ext::TestSize.Level0) @@ -229,7 +230,7 @@ HWTEST_F(DistributedInputInnerTest, StopRemoteInput01, testing::ext::TestSize.Le sptr callback = new TestStopDInputCallback(); int32_t ret = DistributedInputKit::StopRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StopRemoteInput02, testing::ext::TestSize.Level0) @@ -238,7 +239,7 @@ HWTEST_F(DistributedInputInnerTest, StopRemoteInput02, testing::ext::TestSize.Le sptr callback = new TestStopDInputCallback(); int32_t ret = DistributedInputKit::StopRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StopRemoteInput03, testing::ext::TestSize.Level0) @@ -247,7 +248,7 @@ HWTEST_F(DistributedInputInnerTest, StopRemoteInput03, testing::ext::TestSize.Le sptr callback = nullptr; int32_t ret = DistributedInputKit::StopRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, StopRemoteInput04, testing::ext::TestSize.Level0) @@ -256,7 +257,7 @@ HWTEST_F(DistributedInputInnerTest, StopRemoteInput04, testing::ext::TestSize.Le sptr callback = nullptr; int32_t ret = DistributedInputKit::StopRemoteInput(deviceId, static_cast(DInputDeviceType::ALL), callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputInnerTest, IsNeedFilterOut01, testing::ext::TestSize.Level0) @@ -298,9 +299,9 @@ HWTEST_F(DistributedInputInnerTest, IsStartDistributedInput1, testing::ext::Test DInputServerType ret = DistributedInputKit::IsStartDistributedInput(static_cast(DInputDeviceType::ALL)); if (ret == DInputServerType::NULL_SERVER_TYPE) { - EXPECT_EQ(SUCCESS, 0); + EXPECT_EQ(DH_SUCCESS, 0); } else { - EXPECT_EQ(SUCCESS, -1); + EXPECT_EQ(DH_SUCCESS, -1); } } @@ -309,11 +310,11 @@ HWTEST_F(DistributedInputInnerTest, IsStartDistributedInput2, testing::ext::Test DInputServerType ret = DistributedInputKit::IsStartDistributedInput(static_cast(DInputDeviceType::ALL)); if (ret == DInputServerType::NULL_SERVER_TYPE) { - EXPECT_EQ(SUCCESS, 0); + EXPECT_EQ(DH_SUCCESS, 0); } else { - EXPECT_EQ(SUCCESS, -1); + EXPECT_EQ(DH_SUCCESS, -1); } } -} -} -} \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h b/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h index 04283ec..9be611d 100644 --- a/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h +++ b/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h @@ -82,4 +82,5 @@ public: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DISRIBUTED_INPUT_INNER_TEST_H diff --git a/interfaces/inner_kits/test/unittest/mock/mock_distributed_input_client.cpp b/interfaces/inner_kits/test/unittest/mock/mock_distributed_input_client.cpp index b1ab56f..1d8f0bb 100644 --- a/interfaces/inner_kits/test/unittest/mock/mock_distributed_input_client.cpp +++ b/interfaces/inner_kits/test/unittest/mock/mock_distributed_input_client.cpp @@ -19,6 +19,7 @@ #include "nlohmann/json.hpp" #include "constants_dinput.h" +#include "dinput_errcode.h" #include "white_list_util.h" namespace OHOS { @@ -94,58 +95,58 @@ void DistributedInputClient::DelWhiteListInfosCb::OnResult(const std::string& de int32_t DistributedInputClient::InitSource() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::InitSink() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::ReleaseSource() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::ReleaseSink() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::RegisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::string& parameters, const std::shared_ptr& callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::UnregisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::shared_ptr& callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::PrepareRemoteInput( const std::string& deviceId, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::UnprepareRemoteInput( const std::string& deviceId, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::StartRemoteInput( const std::string& deviceId, const uint32_t& inputTypes, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::StopRemoteInput( const std::string& deviceId, const uint32_t& inputTypes, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } bool DistributedInputClient::IsNeedFilterOut(const std::string& deviceId, const BusinessEvent& event) diff --git a/interfaces/ipc/include/add_white_list_infos_call_back_proxy.h b/interfaces/ipc/include/add_white_list_infos_call_back_proxy.h index 8f2cdfe..c1939e4 100644 --- a/interfaces/ipc/include/add_white_list_infos_call_back_proxy.h +++ b/interfaces/ipc/include/add_white_list_infos_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/add_white_list_infos_call_back_stub.h b/interfaces/ipc/include/add_white_list_infos_call_back_stub.h index a17c1fb..99cda31 100644 --- a/interfaces/ipc/include/add_white_list_infos_call_back_stub.h +++ b/interfaces/ipc/include/add_white_list_infos_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(AddWhiteListInfosCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/del_white_list_infos_call_back_proxy.h b/interfaces/ipc/include/del_white_list_infos_call_back_proxy.h index f62f4c1..7362a30 100644 --- a/interfaces/ipc/include/del_white_list_infos_call_back_proxy.h +++ b/interfaces/ipc/include/del_white_list_infos_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/del_white_list_infos_call_back_stub.h b/interfaces/ipc/include/del_white_list_infos_call_back_stub.h index c1aa55f..eb39ff1 100644 --- a/interfaces/ipc/include/del_white_list_infos_call_back_stub.h +++ b/interfaces/ipc/include/del_white_list_infos_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(DelWhiteListInfosCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/dinput_sa_manager.h b/interfaces/ipc/include/dinput_sa_manager.h index 4857bf7..b1f507c 100644 --- a/interfaces/ipc/include/dinput_sa_manager.h +++ b/interfaces/ipc/include/dinput_sa_manager.h @@ -64,7 +64,8 @@ public: sptr dInputSinkProxy_ = nullptr; sptr saListenerCallback = nullptr; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS -#endif \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DINPUT_SA_MANAGER_H \ No newline at end of file diff --git a/interfaces/ipc/include/distributed_input_client.h b/interfaces/ipc/include/distributed_input_client.h index 02740ee..6a6a750 100644 --- a/interfaces/ipc/include/distributed_input_client.h +++ b/interfaces/ipc/include/distributed_input_client.h @@ -139,8 +139,8 @@ private: std::vector dHardWareFwkUnRstInfos; std::mutex operationMutex_; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_CLIENT_H +#endif // DISTRIBUTED_INPUT_CLIENT_H diff --git a/interfaces/ipc/include/distributed_input_sink_stub.h b/interfaces/ipc/include/distributed_input_sink_stub.h index 221d8d4..92d2cb8 100644 --- a/interfaces/ipc/include/distributed_input_sink_stub.h +++ b/interfaces/ipc/include/distributed_input_sink_stub.h @@ -36,8 +36,8 @@ public: private: DISALLOW_COPY_AND_MOVE(DistributedInputSinkStub); }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISRIBUTED_INPUT_STUB_H \ No newline at end of file +#endif // DISRIBUTED_INPUT_STUB_H \ No newline at end of file diff --git a/interfaces/ipc/include/distributed_input_source_stub.h b/interfaces/ipc/include/distributed_input_source_stub.h index ba93d7e..5fe64a0 100644 --- a/interfaces/ipc/include/distributed_input_source_stub.h +++ b/interfaces/ipc/include/distributed_input_source_stub.h @@ -45,8 +45,8 @@ private: int32_t HandleIsStartDistributedInput(MessageParcel &data, MessageParcel &reply); DISALLOW_COPY_AND_MOVE(DistributedInputSourceStub); }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISRIBUTED_INPUT_STUB_H +#endif // DISRIBUTED_INPUT_STUB_H diff --git a/interfaces/ipc/include/prepare_d_input_call_back_proxy.h b/interfaces/ipc/include/prepare_d_input_call_back_proxy.h index 4ea404d..991dd6e 100644 --- a/interfaces/ipc/include/prepare_d_input_call_back_proxy.h +++ b/interfaces/ipc/include/prepare_d_input_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // PREPARE_D_INPUT_CALL_BACK_PROXY_H +#endif // PREPARE_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/prepare_d_input_call_back_stub.h b/interfaces/ipc/include/prepare_d_input_call_back_stub.h index 2a1cb32..437adcf 100644 --- a/interfaces/ipc/include/prepare_d_input_call_back_stub.h +++ b/interfaces/ipc/include/prepare_d_input_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(PrepareDInputCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // PREPARE_D_INPUT_CALL_BACK_STUB_H +#endif // PREPARE_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/register_d_input_call_back_proxy.h b/interfaces/ipc/include/register_d_input_call_back_proxy.h index ff25656..76119fd 100644 --- a/interfaces/ipc/include/register_d_input_call_back_proxy.h +++ b/interfaces/ipc/include/register_d_input_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // REGIST_D_INPUT_CALL_BACK_PROXY_H +#endif // REGIST_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/register_d_input_call_back_stub.h b/interfaces/ipc/include/register_d_input_call_back_stub.h index 65a6e33..098d44d 100644 --- a/interfaces/ipc/include/register_d_input_call_back_stub.h +++ b/interfaces/ipc/include/register_d_input_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(RegisterDInputCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // REGIST_D_INPUT_CALL_BACK_STUB_H +#endif // REGIST_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/start_d_input_call_back_proxy.h b/interfaces/ipc/include/start_d_input_call_back_proxy.h index a4d5595..d58205a 100644 --- a/interfaces/ipc/include/start_d_input_call_back_proxy.h +++ b/interfaces/ipc/include/start_d_input_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // START_D_INPUT_CALL_BACK_PROXY_H +#endif // START_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/start_d_input_call_back_stub.h b/interfaces/ipc/include/start_d_input_call_back_stub.h index a907c30..4f28dbf 100644 --- a/interfaces/ipc/include/start_d_input_call_back_stub.h +++ b/interfaces/ipc/include/start_d_input_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(StartDInputCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // START_D_INPUT_CALL_BACK_STUB_H +#endif // START_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/start_d_input_server_call_back_proxy.h b/interfaces/ipc/include/start_d_input_server_call_back_proxy.h index 7939702..819aeaf 100644 --- a/interfaces/ipc/include/start_d_input_server_call_back_proxy.h +++ b/interfaces/ipc/include/start_d_input_server_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // START_D_INPUT_CALL_BACK_PROXY_H +#endif // START_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/start_d_input_server_call_back_stub.h b/interfaces/ipc/include/start_d_input_server_call_back_stub.h index 2e4a055..2b3ab67 100644 --- a/interfaces/ipc/include/start_d_input_server_call_back_stub.h +++ b/interfaces/ipc/include/start_d_input_server_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(StartDInputServerCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // START_D_INPUT_SERVER_CALL_BACK_STUB_H +#endif // START_D_INPUT_SERVER_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/stop_d_input_call_back_proxy.h b/interfaces/ipc/include/stop_d_input_call_back_proxy.h index e59288c..01cfa62 100644 --- a/interfaces/ipc/include/stop_d_input_call_back_proxy.h +++ b/interfaces/ipc/include/stop_d_input_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // STOP_D_INPUT_CALL_BACK_PROXY_H +#endif // STOP_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/stop_d_input_call_back_stub.h b/interfaces/ipc/include/stop_d_input_call_back_stub.h index 7d2c246..51ed24d 100644 --- a/interfaces/ipc/include/stop_d_input_call_back_stub.h +++ b/interfaces/ipc/include/stop_d_input_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(StopDInputCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // STOP_D_INPUT_CALL_BACK_STUB_H +#endif // STOP_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/unprepare_d_input_call_back_proxy.h b/interfaces/ipc/include/unprepare_d_input_call_back_proxy.h index 3dfbc0b..cbcdac3 100644 --- a/interfaces/ipc/include/unprepare_d_input_call_back_proxy.h +++ b/interfaces/ipc/include/unprepare_d_input_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // UNPREPARE_D_INPUT_CALL_BACK_PROXY_H +#endif // UNPREPARE_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/unprepare_d_input_call_back_stub.h b/interfaces/ipc/include/unprepare_d_input_call_back_stub.h index d2888a3..52dc4d0 100644 --- a/interfaces/ipc/include/unprepare_d_input_call_back_stub.h +++ b/interfaces/ipc/include/unprepare_d_input_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(UnprepareDInputCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // UNPREPARE_D_INPUT_CALL_BACK_STUB_H +#endif // UNPREPARE_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/unregister_d_input_call_back_proxy.h b/interfaces/ipc/include/unregister_d_input_call_back_proxy.h index be14a2c..dd9cacf 100644 --- a/interfaces/ipc/include/unregister_d_input_call_back_proxy.h +++ b/interfaces/ipc/include/unregister_d_input_call_back_proxy.h @@ -36,8 +36,8 @@ public: private: static inline BrokerDelegator delegator_; }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // UNREGIST_D_INPUT_CALL_BACK_PROXY_H +#endif // UNREGIST_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/unregister_d_input_call_back_stub.h b/interfaces/ipc/include/unregister_d_input_call_back_stub.h index 7e41581..547c426 100644 --- a/interfaces/ipc/include/unregister_d_input_call_back_stub.h +++ b/interfaces/ipc/include/unregister_d_input_call_back_stub.h @@ -35,8 +35,8 @@ public: private: DISALLOW_COPY_AND_MOVE(UnregisterDInputCallbackStub); }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // UNREGIST_D_INPUT_CALL_BACK_STUB_H +#endif // UNREGIST_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/src/add_white_list_infos_call_back_proxy.cpp b/interfaces/ipc/src/add_white_list_infos_call_back_proxy.cpp index 5857096..a43c535 100644 --- a/interfaces/ipc/src/add_white_list_infos_call_back_proxy.cpp +++ b/interfaces/ipc/src/add_white_list_infos_call_back_proxy.cpp @@ -55,6 +55,6 @@ void AddWhiteListInfosCallbackProxy::OnResult(const std::string& deviceId, const } remote->SendRequest(static_cast(IAddWhiteListInfosCallback::Message::RESULT), data, reply, option); } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/add_white_list_infos_call_back_stub.cpp b/interfaces/ipc/src/add_white_list_infos_call_back_stub.cpp index 1fab102..f3c255f 100644 --- a/interfaces/ipc/src/add_white_list_infos_call_back_stub.cpp +++ b/interfaces/ipc/src/add_white_list_infos_call_back_stub.cpp @@ -52,6 +52,6 @@ int32_t AddWhiteListInfosCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/del_white_list_infos_call_back_proxy.cpp b/interfaces/ipc/src/del_white_list_infos_call_back_proxy.cpp index 273763d..f6881af 100644 --- a/interfaces/ipc/src/del_white_list_infos_call_back_proxy.cpp +++ b/interfaces/ipc/src/del_white_list_infos_call_back_proxy.cpp @@ -51,6 +51,6 @@ void DelWhiteListInfosCallbackProxy::OnResult(const std::string& deviceId) } remote->SendRequest(static_cast(IDelWhiteListInfosCallback::Message::RESULT), data, reply, option); } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/del_white_list_infos_call_back_stub.cpp b/interfaces/ipc/src/del_white_list_infos_call_back_stub.cpp index f8935d9..28f19e8 100644 --- a/interfaces/ipc/src/del_white_list_infos_call_back_stub.cpp +++ b/interfaces/ipc/src/del_white_list_infos_call_back_stub.cpp @@ -51,6 +51,6 @@ int32_t DelWhiteListInfosCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/prepare_d_input_call_back_proxy.cpp b/interfaces/ipc/src/prepare_d_input_call_back_proxy.cpp index 71fec32..c138864 100644 --- a/interfaces/ipc/src/prepare_d_input_call_back_proxy.cpp +++ b/interfaces/ipc/src/prepare_d_input_call_back_proxy.cpp @@ -58,6 +58,6 @@ void PrepareDInputCallbackProxy::OnResult(const std::string& deviceId, const int return; } } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/prepare_d_input_call_back_stub.cpp b/interfaces/ipc/src/prepare_d_input_call_back_stub.cpp index 1425182..2be936e 100644 --- a/interfaces/ipc/src/prepare_d_input_call_back_stub.cpp +++ b/interfaces/ipc/src/prepare_d_input_call_back_stub.cpp @@ -52,6 +52,6 @@ int32_t PrepareDInputCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/register_d_input_call_back_proxy.cpp b/interfaces/ipc/src/register_d_input_call_back_proxy.cpp index d5af399..ba7249d 100644 --- a/interfaces/ipc/src/register_d_input_call_back_proxy.cpp +++ b/interfaces/ipc/src/register_d_input_call_back_proxy.cpp @@ -60,6 +60,6 @@ void RegisterDInputCallbackProxy::OnResult(const std::string& devId, const std:: return; } } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/register_d_input_call_back_stub.cpp b/interfaces/ipc/src/register_d_input_call_back_stub.cpp index 1612719..031e7ee 100644 --- a/interfaces/ipc/src/register_d_input_call_back_stub.cpp +++ b/interfaces/ipc/src/register_d_input_call_back_stub.cpp @@ -53,6 +53,6 @@ int32_t RegisterDInputCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/start_d_input_call_back_proxy.cpp b/interfaces/ipc/src/start_d_input_call_back_proxy.cpp index 0aafdca..22bb7c9 100644 --- a/interfaces/ipc/src/start_d_input_call_back_proxy.cpp +++ b/interfaces/ipc/src/start_d_input_call_back_proxy.cpp @@ -63,6 +63,6 @@ void StartDInputCallbackProxy::OnResult(const std::string& devId, const uint32_t return; } } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/start_d_input_call_back_stub.cpp b/interfaces/ipc/src/start_d_input_call_back_stub.cpp index 959a34a..209b71f 100644 --- a/interfaces/ipc/src/start_d_input_call_back_stub.cpp +++ b/interfaces/ipc/src/start_d_input_call_back_stub.cpp @@ -53,6 +53,6 @@ int32_t StartDInputCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/start_d_input_server_call_back_proxy.cpp b/interfaces/ipc/src/start_d_input_server_call_back_proxy.cpp index 246a1d2..3b718da 100644 --- a/interfaces/ipc/src/start_d_input_server_call_back_proxy.cpp +++ b/interfaces/ipc/src/start_d_input_server_call_back_proxy.cpp @@ -59,6 +59,6 @@ void StartDInputServerCallbackProxy::OnResult(const int32_t& status, const uint3 return; } } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/start_d_input_server_call_back_stub.cpp b/interfaces/ipc/src/start_d_input_server_call_back_stub.cpp index fd03ae5..2495f50 100644 --- a/interfaces/ipc/src/start_d_input_server_call_back_stub.cpp +++ b/interfaces/ipc/src/start_d_input_server_call_back_stub.cpp @@ -52,6 +52,6 @@ int32_t StartDInputServerCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/stop_d_input_call_back_proxy.cpp b/interfaces/ipc/src/stop_d_input_call_back_proxy.cpp index fa5c425..5c5c1c5 100644 --- a/interfaces/ipc/src/stop_d_input_call_back_proxy.cpp +++ b/interfaces/ipc/src/stop_d_input_call_back_proxy.cpp @@ -63,6 +63,6 @@ void StopDInputCallbackProxy::OnResult(const std::string& devId, const uint32_t& return; } } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/stop_d_input_call_back_stub.cpp b/interfaces/ipc/src/stop_d_input_call_back_stub.cpp index d33340d..bfb103e 100644 --- a/interfaces/ipc/src/stop_d_input_call_back_stub.cpp +++ b/interfaces/ipc/src/stop_d_input_call_back_stub.cpp @@ -53,6 +53,6 @@ int32_t StopDInputCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/unprepare_d_input_call_back_proxy.cpp b/interfaces/ipc/src/unprepare_d_input_call_back_proxy.cpp index 59913c6..2e47eee 100644 --- a/interfaces/ipc/src/unprepare_d_input_call_back_proxy.cpp +++ b/interfaces/ipc/src/unprepare_d_input_call_back_proxy.cpp @@ -59,6 +59,6 @@ void UnprepareDInputCallbackProxy::OnResult(const std::string& deviceId, const i return; } } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/unprepare_d_input_call_back_stub.cpp b/interfaces/ipc/src/unprepare_d_input_call_back_stub.cpp index 3df5e16..5510c1a 100644 --- a/interfaces/ipc/src/unprepare_d_input_call_back_stub.cpp +++ b/interfaces/ipc/src/unprepare_d_input_call_back_stub.cpp @@ -52,6 +52,6 @@ int32_t UnprepareDInputCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/unregister_d_input_call_back_proxy.cpp b/interfaces/ipc/src/unregister_d_input_call_back_proxy.cpp index ded082e..2aca92e 100644 --- a/interfaces/ipc/src/unregister_d_input_call_back_proxy.cpp +++ b/interfaces/ipc/src/unregister_d_input_call_back_proxy.cpp @@ -63,6 +63,6 @@ void UnregisterDInputCallbackProxy::OnResult(const std::string& devId, const std return; } } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/ipc/src/unregister_d_input_call_back_stub.cpp b/interfaces/ipc/src/unregister_d_input_call_back_stub.cpp index df879dc..63e7c56 100644 --- a/interfaces/ipc/src/unregister_d_input_call_back_stub.cpp +++ b/interfaces/ipc/src/unregister_d_input_call_back_stub.cpp @@ -53,6 +53,6 @@ int32_t UnregisterDInputCallbackStub::OnRemoteRequest( } return DH_SUCCESS; } -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/low_latency/include/dinput_low_latency.h b/low_latency/include/dinput_low_latency.h index 2860995..e415b72 100644 --- a/low_latency/include/dinput_low_latency.h +++ b/low_latency/include/dinput_low_latency.h @@ -32,7 +32,9 @@ private: DInputLowLatency() = default; ~DInputLowLatency() = default; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS -#endif // DINPUT_LOW_LATENCY_H +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DINPUT_LOW_LATENCY_H + diff --git a/services/common/include/dinput_sink_trans_callback.h b/services/common/include/dinput_sink_trans_callback.h index ff5de1c..2f17451 100644 --- a/services/common/include/dinput_sink_trans_callback.h +++ b/services/common/include/dinput_sink_trans_callback.h @@ -29,7 +29,8 @@ public: virtual void onStopRemoteInput(const int32_t& sessionId, const uint32_t& inputTypes) = 0; virtual ~DInputSinkTransCallback() {} }; -} -} -} -#endif +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_DISTRIBUTED_INPUT_SINK_TANTS_H diff --git a/services/common/include/dinput_softbus_define.h b/services/common/include/dinput_softbus_define.h index 8bc65d8..2a28621 100644 --- a/services/common/include/dinput_softbus_define.h +++ b/services/common/include/dinput_softbus_define.h @@ -66,7 +66,7 @@ namespace DistributedInput { const uint32_t TRANS_SOURCE_MSG_START = 13; const uint32_t TRANS_SOURCE_MSG_STOP = 14; const uint32_t TRANS_SOURCE_MSG_LATENCY = 15; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS -#endif // DISTRIBUTED_INPUT_SOFTBUS_DEFINE_H +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS +#endif // DISTRIBUTED_INPUT_SOFTBUS_DEFINE_H diff --git a/services/common/include/dinput_source_trans_callback.h b/services/common/include/dinput_source_trans_callback.h index 38ad893..c355bf2 100644 --- a/services/common/include/dinput_source_trans_callback.h +++ b/services/common/include/dinput_source_trans_callback.h @@ -31,7 +31,8 @@ public: virtual void onResponseStopRemoteInput(const std::string deviceId, const uint32_t inputTypes, bool result) = 0; virtual void onReceivedEventRemoteInput(const std::string deviceId, const std::string &object) = 0; }; -} -} -} -#endif +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_DISTRIBUTED_INPUT_SOURCE_TRANS_H diff --git a/services/sink/inputcollector/include/distributed_input_collector.h b/services/sink/inputcollector/include/distributed_input_collector.h index 188145a..81e9c06 100644 --- a/services/sink/inputcollector/include/distributed_input_collector.h +++ b/services/sink/inputcollector/include/distributed_input_collector.h @@ -56,8 +56,8 @@ private: std::shared_ptr sinkHandler_; uint32_t inputTypes_; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_COLLECTOR_H \ No newline at end of file +#endif // DISTRIBUTED_INPUT_COLLECTOR_H \ No newline at end of file diff --git a/services/sink/sinkmanager/include/distributed_input_sink_event_handler.h b/services/sink/sinkmanager/include/distributed_input_sink_event_handler.h index efaac8b..0156fd9 100644 --- a/services/sink/sinkmanager/include/distributed_input_sink_event_handler.h +++ b/services/sink/sinkmanager/include/distributed_input_sink_event_handler.h @@ -37,7 +37,8 @@ public: private: }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS -#endif // DISRIBUTED_INPUT_SINK_EVENT_HANDLER_H +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DISRIBUTED_INPUT_SINK_EVENT_HANDLER_H diff --git a/services/sink/sinkmanager/include/distributed_input_sink_manager.h b/services/sink/sinkmanager/include/distributed_input_sink_manager.h index d488006..c741ef8 100644 --- a/services/sink/sinkmanager/include/distributed_input_sink_manager.h +++ b/services/sink/sinkmanager/include/distributed_input_sink_manager.h @@ -77,7 +77,7 @@ public: void SetInputTypes(const uint32_t& inputTypess); - /** + /* * GetEventHandler, get the ui_service manager service's handler. * * @return Returns EventHandler ptr. diff --git a/services/sink/sinkmanager/src/distributed_input_sink_event_handler.cpp b/services/sink/sinkmanager/src/distributed_input_sink_event_handler.cpp index 5da69c2..0ccdbea 100644 --- a/services/sink/sinkmanager/src/distributed_input_sink_event_handler.cpp +++ b/services/sink/sinkmanager/src/distributed_input_sink_event_handler.cpp @@ -40,6 +40,6 @@ void DistributedInputSinkEventHandler::ProxyRemoveTask(const std::string &name) { AppExecFwk::EventHandler::RemoveTask(name); } -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/sink/sinkmanager/src/distributed_input_sink_manager.cpp b/services/sink/sinkmanager/src/distributed_input_sink_manager.cpp index 57b5cae..b574258 100644 --- a/services/sink/sinkmanager/src/distributed_input_sink_manager.cpp +++ b/services/sink/sinkmanager/src/distributed_input_sink_manager.cpp @@ -221,7 +221,8 @@ void DistributedInputSinkManager::OnStart() serviceRunningState_ = ServiceSinkRunningState::STATE_RUNNING; runner_->Run(); /* Publish service maybe failed, so we need call this function at the last, - * so it can't affect the TDD test program */ + * so it can't affect the TDD test program. + */ bool ret = Publish(this); if (!ret) { return; @@ -250,7 +251,7 @@ void DistributedInputSinkManager::OnStop() serviceRunningState_ = ServiceSinkRunningState::STATE_NOT_START; } -/** +/* * get event handler * * @return event handler object. diff --git a/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.cpp b/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.cpp index eb8bf88..1b02fe3 100644 --- a/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.cpp +++ b/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.cpp @@ -42,6 +42,6 @@ void DistributedInputSinkManagerTest::SetUpTestCase() void DistributedInputSinkManagerTest::TearDownTestCase() { } -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h b/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h index 7795b6b..d56a892 100644 --- a/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h +++ b/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h @@ -40,7 +40,8 @@ public: private: DistributedInputSinkManager* sinkManager_; }; -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + #endif // DISRIBUTED_INPUT_INNER_TEST_H diff --git a/services/sink/transport/include/distributed_input_sink_switch.h b/services/sink/transport/include/distributed_input_sink_switch.h index 1af5b68..f2cb6b5 100644 --- a/services/sink/transport/include/distributed_input_sink_switch.h +++ b/services/sink/transport/include/distributed_input_sink_switch.h @@ -45,8 +45,8 @@ private: std::mutex operationMutex_; std::vector switchVector_; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_SINK_SWITCH_H +#endif // DISTRIBUTED_INPUT_SINK_SWITCH_H diff --git a/services/sink/transport/include/distributed_input_sink_transport.h b/services/sink/transport/include/distributed_input_sink_transport.h index 964a064..547f49d 100644 --- a/services/sink/transport/include/distributed_input_sink_transport.h +++ b/services/sink/transport/include/distributed_input_sink_transport.h @@ -79,8 +79,8 @@ private: std::shared_ptr eventHandler_; std::shared_ptr callback_; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_SINK_TRANSPORT_H +#endif // DISTRIBUTED_INPUT_SINK_TRANSPORT_H diff --git a/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.cpp b/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.cpp index 7dccde0..9a8afb5 100644 --- a/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.cpp +++ b/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.cpp @@ -114,7 +114,7 @@ HWTEST_F(DistributedInputSinkTransTest, StartSwitch01, testing::ext::TestSize.Le int32_t sessionId = 1000; DistributedInputSinkSwitch::GetInstance().AddSession(sessionId); int32_t ret = DistributedInputSinkSwitch::GetInstance().StartSwitch(sessionId); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkTransTest, StartSwitch02, testing::ext::TestSize.Level1) @@ -124,6 +124,6 @@ HWTEST_F(DistributedInputSinkTransTest, StartSwitch02, testing::ext::TestSize.Le int32_t ret = DistributedInputSinkSwitch::GetInstance().StartSwitch(sessionId+10); EXPECT_EQ(ERR_DH_INPUT_SERVER_SINK_START_SWITCH_FAIL, ret); } -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h b/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h index 5ff4330..6fe5eac 100644 --- a/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h +++ b/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h @@ -36,7 +36,8 @@ public: virtual void SetUp() override; virtual void TearDown() override; }; -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + #endif // DISRIBUTED_INPUT_INNER_TEST_H diff --git a/services/source/inputinject/include/distributed_input_inject.h b/services/source/inputinject/include/distributed_input_inject.h index 2d48278..27f38d2 100644 --- a/services/source/inputinject/include/distributed_input_inject.h +++ b/services/source/inputinject/include/distributed_input_inject.h @@ -46,8 +46,8 @@ private: // The event queue. static const int EVENT_BUFFER_SIZE = 16; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_INJECT_H \ No newline at end of file +#endif // DISTRIBUTED_INPUT_INJECT_H \ No newline at end of file diff --git a/services/source/inputinject/include/distributed_input_node_manager.h b/services/source/inputinject/include/distributed_input_node_manager.h index 61d5850..695e830 100644 --- a/services/source/inputinject/include/distributed_input_node_manager.h +++ b/services/source/inputinject/include/distributed_input_node_manager.h @@ -61,8 +61,8 @@ private: std::condition_variable conditionVariable_; std::queue> injectQueue_; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_INJECT_H \ No newline at end of file +#endif // DISTRIBUTED_INPUT_INJECT_H \ No newline at end of file diff --git a/services/source/inputinject/include/virtual_device.h b/services/source/inputinject/include/virtual_device.h index 6a7decb..af40911 100644 --- a/services/source/inputinject/include/virtual_device.h +++ b/services/source/inputinject/include/virtual_device.h @@ -65,7 +65,8 @@ protected: private: void RecordEventLog(const input_event& event); }; -} -} -} -#endif // OHOS_VIRTUAL_DEVICE_H +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_VIRTUAL_DEVICE_H diff --git a/services/source/inputinject/include/virtual_keyboard.h b/services/source/inputinject/include/virtual_keyboard.h index dd57c9b..11572c8 100644 --- a/services/source/inputinject/include/virtual_keyboard.h +++ b/services/source/inputinject/include/virtual_keyboard.h @@ -33,7 +33,8 @@ protected: const std::vector& GetAbs() const override; const std::vector& GetRelBits() const override; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS -#endif // OHOS_VIRTUAL_KEYBOARD_H +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_VIRTUAL_KEYBOARD_H diff --git a/services/source/inputinject/include/virtual_mouse.h b/services/source/inputinject/include/virtual_mouse.h index 722dc4a..066d608 100644 --- a/services/source/inputinject/include/virtual_mouse.h +++ b/services/source/inputinject/include/virtual_mouse.h @@ -33,7 +33,8 @@ protected: const std::vector& GetProperties() const override; const std::vector& GetAbs() const override; }; -}; -} // namespace DistributedInput -} // namespace DistributedHardware -#endif // VIRTUALKEYBOARD_H +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // VIRTUALKEYBOARD_H diff --git a/services/source/inputinject/include/virtual_touchpad.h b/services/source/inputinject/include/virtual_touchpad.h index b909ba3..2cbabef 100644 --- a/services/source/inputinject/include/virtual_touchpad.h +++ b/services/source/inputinject/include/virtual_touchpad.h @@ -33,7 +33,8 @@ protected: const std::vector& GetProperties() const override; const std::vector& GetRelBits() const override; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS -#endif +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_VIRTUAL_TOUCHPAD_H diff --git a/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.cpp b/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.cpp index 25b1153..ddba008 100644 --- a/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.cpp +++ b/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.cpp @@ -26,6 +26,7 @@ #include "event_handler.h" #include "nlohmann/json.hpp" +#include "dinput_errcode.h" #include "softbus_bus_center.h" using namespace testing::ext; @@ -68,7 +69,7 @@ HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedHardware01, testin std::string parameters; DistributedInputInject::GetInstance().StructTransJson(pBuffer, parameters); int32_t ret = DistributedInputInject::GetInstance().RegisterDistributedHardware(devId, dhId, parameters); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedHardware02, testing::ext::TestSize.Level1) @@ -89,7 +90,7 @@ HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedHardware02, testin std::string parameters; DistributedInputInject::GetInstance().StructTransJson(pBuffer, parameters); int32_t ret = DistributedInputInject::GetInstance().RegisterDistributedHardware(devId, dhId, parameters); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedHardware03, testing::ext::TestSize.Level1) @@ -110,7 +111,7 @@ HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedHardware03, testin std::string parameters; DistributedInputInject::GetInstance().StructTransJson(pBuffer, parameters); int32_t ret = DistributedInputInject::GetInstance().RegisterDistributedHardware(devId, dhId, parameters); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedEvent01, testing::ext::TestSize.Level1) @@ -147,7 +148,7 @@ HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedEvent01, testing:: size_t count = (size_t)(sizeof(writeBuffer) / sizeof(RawEvent)); int32_t ret = DistributedInputInject::GetInstance().RegisterDistributedEvent(writeBuffer, count); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedEvent02, testing::ext::TestSize.Level1) @@ -190,7 +191,7 @@ HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedEvent02, testing:: size_t count = (size_t)(sizeof(writeBuffer) / sizeof(RawEvent)); int32_t ret = DistributedInputInject::GetInstance().RegisterDistributedEvent(writeBuffer, count); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedEvent03, testing::ext::TestSize.Level1) @@ -227,7 +228,7 @@ HWTEST_F(DistributedInputSourceInjectTest, RegisterDistributedEvent03, testing:: size_t count = (size_t)(sizeof(writeBuffer) / sizeof(RawEvent)); int32_t ret = DistributedInputInject::GetInstance().RegisterDistributedEvent(writeBuffer, count); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } } // namespace DistributedInput } // namespace DistributedHardware diff --git a/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h b/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h index 64e2554..53e78a9 100644 --- a/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h +++ b/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h @@ -39,4 +39,5 @@ public: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DISRIBUTED_INPUT_INNER_TEST_H diff --git a/services/source/sourcemanager/include/distributed_input_source_event_handler.h b/services/source/sourcemanager/include/distributed_input_source_event_handler.h index 6d819b9..d344979 100644 --- a/services/source/sourcemanager/include/distributed_input_source_event_handler.h +++ b/services/source/sourcemanager/include/distributed_input_source_event_handler.h @@ -37,7 +37,8 @@ public: private: }; -} // namespace DistributedHardware -} // namespace DistributedInput -} // namespace OHOS -#endif // DISRIBUTED_INPUT_SOURCE_EVENT_HANDLER_H +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DISRIBUTED_INPUT_SOURCE_EVENT_HANDLER_H diff --git a/services/source/sourcemanager/src/distributed_input_source_event_handler.cpp b/services/source/sourcemanager/src/distributed_input_source_event_handler.cpp index 6007116..6f68d11 100644 --- a/services/source/sourcemanager/src/distributed_input_source_event_handler.cpp +++ b/services/source/sourcemanager/src/distributed_input_source_event_handler.cpp @@ -40,6 +40,6 @@ void DistributedInputSourceEventHandler::ProxyRemoveTask(const std::string &name { AppExecFwk::EventHandler::RemoveTask(name); } -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/source/sourcemanager/src/distributed_input_source_manager.cpp b/services/source/sourcemanager/src/distributed_input_source_manager.cpp index b5748ea..35a4dcb 100644 --- a/services/source/sourcemanager/src/distributed_input_source_manager.cpp +++ b/services/source/sourcemanager/src/distributed_input_source_manager.cpp @@ -243,7 +243,8 @@ void DistributedInputSourceManager::OnStart() serviceRunningState_ = ServiceSourceRunningState::STATE_RUNNING; runner_->Run(); /* Publish service maybe failed, so we need call this function at the last, - * so it can't affect the TDD test program */ + * so it can't affect the TDD test program. + */ bool ret = Publish(this); if (!ret) { return; diff --git a/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.cpp b/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.cpp index 671805e..6a2eec9 100644 --- a/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.cpp +++ b/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.cpp @@ -136,7 +136,7 @@ int32_t DistributedInputSourceManagerTest::StructTransJson(const InputDevice& pB std::ostringstream stream; stream << tmpJson.dump(); strDescriptor = stream.str(); - return SUCCESS; + return DH_SUCCESS; } HWTEST_F(DistributedInputSourceManagerTest, RegisterDistributedHardware01, testing::ext::TestSize.Level0) @@ -160,7 +160,7 @@ HWTEST_F(DistributedInputSourceManagerTest, RegisterDistributedHardware01, testi sptr callback = new TestRegisterDInputCb(); int32_t ret = sourceManager_->RegisterDistributedHardware(devId, dhId, parameters, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceManagerTest, RegisterDistributedHardware02, testing::ext::TestSize.Level0) @@ -182,7 +182,7 @@ HWTEST_F(DistributedInputSourceManagerTest, RegisterDistributedHardware02, testi StructTransJson(pBuffer, parameters); sptr callback = new TestRegisterDInputCb(); int32_t ret = sourceManager_->RegisterDistributedHardware(devId, dhId, parameters, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceManagerTest, RegisterDistributedHardware03, testing::ext::TestSize.Level0) @@ -204,7 +204,7 @@ HWTEST_F(DistributedInputSourceManagerTest, RegisterDistributedHardware03, testi StructTransJson(pBuffer, parameters); sptr callback = new TestRegisterDInputCb(); int32_t ret = sourceManager_->RegisterDistributedHardware(devId, dhId, parameters, callback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceManagerTest, PrepareRemoteInput01, testing::ext::TestSize.Level0) @@ -335,6 +335,6 @@ HWTEST_F(DistributedInputSourceManagerTest, UnregisterDistributedHardware03, tes int32_t ret = sourceManager_->UnregisterDistributedHardware(devId, dhId, callback); EXPECT_EQ(ERR_DH_INPUT_SERVER_SOURCE_MANAGER_UNREGISTER_FAIL, ret); } -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h b/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h index 6c35ded..bf1469a 100644 --- a/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h +++ b/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h @@ -111,4 +111,5 @@ private: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DISRIBUTED_INPUT_INNER_TEST_H diff --git a/services/source/transport/include/distributed_input_source_transport.h b/services/source/transport/include/distributed_input_source_transport.h index 4fbd9fe..689905f 100644 --- a/services/source/transport/include/distributed_input_source_transport.h +++ b/services/source/transport/include/distributed_input_source_transport.h @@ -88,8 +88,8 @@ private: std::thread latencyThread_; std::string eachLatencyDetails_ = ""; }; -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_SOURCE_TRANSPORT_H +#endif // DISTRIBUTED_INPUT_SOURCE_TRANSPORT_H diff --git a/services/source/transport/src/distributed_input_source_transport.cpp b/services/source/transport/src/distributed_input_source_transport.cpp index 963e261..9580c4c 100644 --- a/services/source/transport/src/distributed_input_source_transport.cpp +++ b/services/source/transport/src/distributed_input_source_transport.cpp @@ -231,11 +231,11 @@ void DistributedInputSourceTransport::RegisterSourceRespCallback(std::shared_ptr callback_ = callback; } -/** -* PrepareRemoteInput. -* @param deviceId is remote device -* @return Returns 0 is success, other is fail. -*/ +/* + * PrepareRemoteInput. + * @param deviceId is remote device + * @return Returns 0 is success, other is fail. + */ int32_t DistributedInputSourceTransport::PrepareRemoteInput(const std::string& deviceId) { std::unique_lock sessionLock(operationMutex_); diff --git a/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.cpp b/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.cpp index aabb081..7596299 100644 --- a/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.cpp +++ b/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.cpp @@ -112,6 +112,6 @@ HWTEST_F(DistributedInputSourceTransTest, StopRemoteInput02, testing::ext::TestS EXPECT_EQ(ERR_DH_INPUT_SERVER_SOURCE_TRANSPORT_STOP_FAIL, ret); DistributedInputSourceTransport::GetInstance().CloseInputSoftbus(deviceId); } -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h b/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h index f612956..335d4e9 100644 --- a/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h +++ b/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h @@ -39,4 +39,5 @@ public: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DISRIBUTED_INPUT_INNER_TEST_H diff --git a/sinkhandler/include/distributed_input_sink_handler.h b/sinkhandler/include/distributed_input_sink_handler.h index 6f27bc9..7939300 100644 --- a/sinkhandler/include/distributed_input_sink_handler.h +++ b/sinkhandler/include/distributed_input_sink_handler.h @@ -78,8 +78,8 @@ __attribute__((visibility("default"))) IDistributedHardwareSink *GetSinkHardware #ifdef __cplusplus } #endif -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_SINK_HANDLER_H +#endif // DISTRIBUTED_INPUT_SINK_HANDLER_H diff --git a/sinkhandler/include/load_d_input_sink_callback.h b/sinkhandler/include/load_d_input_sink_callback.h index 580447a..c9d9b2f 100644 --- a/sinkhandler/include/load_d_input_sink_callback.h +++ b/sinkhandler/include/load_d_input_sink_callback.h @@ -30,7 +30,8 @@ public: private: std::string params_; }; -} -} -} -#endif \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // LOAD_D_INPUT_SOURCE_CALLBACK_H \ No newline at end of file diff --git a/sinkhandler/src/load_d_input_sink_callback.cpp b/sinkhandler/src/load_d_input_sink_callback.cpp index af29494..ee7d171 100644 --- a/sinkhandler/src/load_d_input_sink_callback.cpp +++ b/sinkhandler/src/load_d_input_sink_callback.cpp @@ -42,6 +42,6 @@ void LoadDInputSinkCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId) "dinput sink LoadSystemAbility call failed."); DHLOGE("load dinput SA failed, systemAbilityId:%d", systemAbilityId); } -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS diff --git a/sinkhandler/test/unittest/distributed_input_sinkhandler_test.cpp b/sinkhandler/test/unittest/distributed_input_sinkhandler_test.cpp index 8a45bd1..244cc9e 100644 --- a/sinkhandler/test/unittest/distributed_input_sinkhandler_test.cpp +++ b/sinkhandler/test/unittest/distributed_input_sinkhandler_test.cpp @@ -14,6 +14,7 @@ */ #include "distributed_input_sinkhandler_test.h" +#include "dinput_errcode.h" using namespace testing::ext; using namespace OHOS::DistributedHardware::DistributedInput; @@ -41,32 +42,32 @@ void DistributedInputSinkHandlerTest::TearDownTestCase() HWTEST_F(DistributedInputSinkHandlerTest, InitSink01, testing::ext::TestSize.Level0) { int32_t ret = DistributedInputSinkHandler::GetInstance().InitSink("params"); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, InitSink02, testing::ext::TestSize.Level0) { std::string params = ""; int32_t ret = DistributedInputSinkHandler::GetInstance().InitSink(params); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, InitSink03, testing::ext::TestSize.Level0) { std::string params = "params"; int32_t ret = DistributedInputSinkHandler::GetInstance().InitSink(params); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, ReleaseSink01, testing::ext::TestSize.Level0) { int32_t ret = DistributedInputSinkHandler::GetInstance().ReleaseSink(); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, SubscribeLocalHardware01, testing::ext::TestSize.Level0) { int32_t ret = DistributedInputSinkHandler::GetInstance().SubscribeLocalHardware("dhId", "params"); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, SubscribeLocalHardware02, testing::ext::TestSize.Level0) @@ -74,7 +75,7 @@ HWTEST_F(DistributedInputSinkHandlerTest, SubscribeLocalHardware02, testing::ext std::string dhId = "SubscribeLocalHardware02"; std::string params = "test2"; int32_t ret = DistributedInputSinkHandler::GetInstance().SubscribeLocalHardware(dhId, params); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, SubscribeLocalHardware03, testing::ext::TestSize.Level0) @@ -82,28 +83,28 @@ HWTEST_F(DistributedInputSinkHandlerTest, SubscribeLocalHardware03, testing::ext std::string dhId = "SubscribeLocalHardware03"; std::string params = "test3"; int32_t ret = DistributedInputSinkHandler::GetInstance().SubscribeLocalHardware(dhId, params); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, UnsubscribeLocalHardware01, testing::ext::TestSize.Level0) { int32_t ret = DistributedInputSinkHandler::GetInstance().UnsubscribeLocalHardware("dhId"); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, UnsubscribeLocalHardware02, testing::ext::TestSize.Level0) { std::string dhId = "UnsubscribeLocalHardware02"; int32_t ret = DistributedInputSinkHandler::GetInstance().UnsubscribeLocalHardware(dhId); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSinkHandlerTest, UnsubscribeLocalHardware03, testing::ext::TestSize.Level0) { std::string dhId = "UnsubscribeLocalHardware03"; int32_t ret = DistributedInputSinkHandler::GetInstance().UnsubscribeLocalHardware(dhId); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } -} -} -} \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h b/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h index 5da4c69..0a3577b 100644 --- a/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h +++ b/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h @@ -42,4 +42,5 @@ public: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DISRIBUTED_INPUT_SINKHANDLER_TEST_H diff --git a/sinkhandler/test/unittest/mock/mock_distributed_input_client.cpp b/sinkhandler/test/unittest/mock/mock_distributed_input_client.cpp index cae940e..930c5eb 100644 --- a/sinkhandler/test/unittest/mock/mock_distributed_input_client.cpp +++ b/sinkhandler/test/unittest/mock/mock_distributed_input_client.cpp @@ -18,6 +18,7 @@ #include "constants_dinput.h" #include "distributed_input_client.h" +#include "dinput_errcode.h" #include "white_list_util.h" namespace OHOS { @@ -90,58 +91,58 @@ void DistributedInputClient::DelWhiteListInfosCb::OnResult(const std::string& de int32_t DistributedInputClient::InitSource() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::InitSink() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::ReleaseSource() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::ReleaseSink() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::RegisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::string& parameters, const std::shared_ptr& callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::UnregisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::shared_ptr& callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::PrepareRemoteInput( const std::string& deviceId, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::UnprepareRemoteInput( const std::string& deviceId, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::StartRemoteInput( const std::string& deviceId, const uint32_t& inputTypes, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::StopRemoteInput( const std::string& deviceId, const uint32_t& inputTypes, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } bool DistributedInputClient::IsNeedFilterOut(const std::string& deviceId, const BusinessEvent& event) diff --git a/sourcehandler/include/distributed_input_source_handler.h b/sourcehandler/include/distributed_input_source_handler.h index 4b904ab..6e8947f 100644 --- a/sourcehandler/include/distributed_input_source_handler.h +++ b/sourcehandler/include/distributed_input_source_handler.h @@ -83,8 +83,8 @@ __attribute__((visibility("default"))) IDistributedHardwareSource *GetSourceHard #ifdef __cplusplus } #endif // __cplusplus -} // namespace DistributedInput -} // namespace DistributedHardware -} // namespace OHOS +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS -#endif // DISTRIBUTED_INPUT_SOURCE_HANDLER_H +#endif // DISTRIBUTED_INPUT_SOURCE_HANDLER_H diff --git a/sourcehandler/include/load_d_input_source_callback.h b/sourcehandler/include/load_d_input_source_callback.h index b14f791..befb9d9 100644 --- a/sourcehandler/include/load_d_input_source_callback.h +++ b/sourcehandler/include/load_d_input_source_callback.h @@ -29,7 +29,8 @@ public: private: std::string params_; }; -} -} -} -#endif \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // LOAD_D_INPUT_SOURCE_CALLBACK_H \ No newline at end of file diff --git a/sourcehandler/src/load_d_input_source_callback.cpp b/sourcehandler/src/load_d_input_source_callback.cpp index 4da9655..031c971 100644 --- a/sourcehandler/src/load_d_input_source_callback.cpp +++ b/sourcehandler/src/load_d_input_source_callback.cpp @@ -43,6 +43,6 @@ void LoadDInputSourceCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId) HisyseventUtil::GetInstance().SysEventWriteFault(DINPUT_INIT_FAIL, "dinput source LoadSystemAbility call failed."); } -} -} -} +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/sourcehandler/test/unittest/distributed_input_sourcehandler_test.cpp b/sourcehandler/test/unittest/distributed_input_sourcehandler_test.cpp index ea63f76..04efcdd 100644 --- a/sourcehandler/test/unittest/distributed_input_sourcehandler_test.cpp +++ b/sourcehandler/test/unittest/distributed_input_sourcehandler_test.cpp @@ -14,6 +14,7 @@ */ #include "distributed_input_sourcehandler_test.h" +#include "dinput_errcode.h" using namespace testing::ext; using namespace OHOS::DistributedHardware::DistributedInput; @@ -41,32 +42,32 @@ void DistributedInputSourceHandlerTest::TearDownTestCase() int32_t DistributedInputSourceHandlerTest::TestRegisterDInputCallback::OnRegisterResult(const std::string &devId, const std::string &dhId, int32_t status, const std::string &data) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputSourceHandlerTest::TestUnregisterDInputCallback::OnUnregisterResult(const std::string &devId, const std::string &dhId, int32_t status, const std::string &data) { - return SUCCESS; + return DH_SUCCESS; } HWTEST_F(DistributedInputSourceHandlerTest, InitSource01, testing::ext::TestSize.Level0) { int32_t ret = DistributedInputSourceHandler::GetInstance().InitSource(""); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, InitSource02, testing::ext::TestSize.Level0) { std::string dhId = "test"; int32_t ret = DistributedInputSourceHandler::GetInstance().InitSource(dhId); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, ReleaseSource01, testing::ext::TestSize.Level0) { int32_t ret = DistributedInputSourceHandler::GetInstance().ReleaseSource(); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, RegisterDistributedHardware01, testing::ext::TestSize.Level0) @@ -79,7 +80,7 @@ HWTEST_F(DistributedInputSourceHandlerTest, RegisterDistributedHardware01, testi "version", "attrs" }, registerCallback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, RegisterDistributedHardware02, testing::ext::TestSize.Level0) @@ -89,7 +90,7 @@ HWTEST_F(DistributedInputSourceHandlerTest, RegisterDistributedHardware02, testi std::string dhId = ""; int32_t ret = DistributedInputSourceHandler::GetInstance().RegisterDistributedHardware( devId, dhId, OHOS::DistributedHardware::EnableParam {"version", "attrs" }, registerCallback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, RegisterDistributedHardware03, testing::ext::TestSize.Level0) @@ -102,7 +103,7 @@ HWTEST_F(DistributedInputSourceHandlerTest, RegisterDistributedHardware03, testi "version", "attrs" }, registerCallback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, UnregisterDistributedHardware01, testing::ext::TestSize.Level0) { @@ -110,7 +111,7 @@ HWTEST_F(DistributedInputSourceHandlerTest, UnregisterDistributedHardware01, tes std::make_shared(); int32_t ret = DistributedInputSourceHandler::GetInstance().UnregisterDistributedHardware("devId", "dhId", unregisterDInputCallback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, UnregisterDistributedHardware02, testing::ext::TestSize.Level0) @@ -120,25 +121,24 @@ HWTEST_F(DistributedInputSourceHandlerTest, UnregisterDistributedHardware02, tes std::string dhId = ""; int32_t ret = DistributedInputSourceHandler::GetInstance().UnregisterDistributedHardware("devId", "dhId", unregisterDInputCallback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, UnregisterDistributedHardware03, testing::ext::TestSize.Level0) { std::shared_ptr unregisterDInputCallback = std::make_shared(); - int32_t ret = DistributedInputSourceHandler::GetInstance().UnregisterDistributedHardware("devId", "dhId", unregisterDInputCallback); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } HWTEST_F(DistributedInputSourceHandlerTest, ConfigDistributedHardware01, testing::ext::TestSize.Level0) { int32_t ret = DistributedInputSourceHandler::GetInstance().ConfigDistributedHardware("devId", "dhId", "key", "value"); - EXPECT_EQ(SUCCESS, ret); + EXPECT_EQ(DH_SUCCESS, ret); } -} -} -} \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h b/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h index 06793be..9060f83 100644 --- a/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h +++ b/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h @@ -63,4 +63,5 @@ public: } // namespace DistributedInput } // namespace DistributedHardware } // namespace OHOS + #endif // DISRIBUTED_INPUT_SOURCEHANDLER_TEST_H diff --git a/sourcehandler/test/unittest/mock/mock_distributed_input_client.cpp b/sourcehandler/test/unittest/mock/mock_distributed_input_client.cpp index a451ea7..6857955 100644 --- a/sourcehandler/test/unittest/mock/mock_distributed_input_client.cpp +++ b/sourcehandler/test/unittest/mock/mock_distributed_input_client.cpp @@ -18,6 +18,7 @@ #include "constants_dinput.h" #include "distributed_input_client.h" +#include "dinput_errcode.h" #include "white_list_util.h" namespace OHOS { @@ -90,58 +91,58 @@ void DistributedInputClient::DelWhiteListInfosCb::OnResult(const std::string& de int32_t DistributedInputClient::InitSource() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::InitSink() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::ReleaseSource() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::ReleaseSink() { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::RegisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::string& parameters, const std::shared_ptr& callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::UnregisterDistributedHardware(const std::string& devId, const std::string& dhId, const std::shared_ptr& callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::PrepareRemoteInput( const std::string& deviceId, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::UnprepareRemoteInput( const std::string& deviceId, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::StartRemoteInput( const std::string& deviceId, const uint32_t& inputTypes, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } int32_t DistributedInputClient::StopRemoteInput( const std::string& deviceId, const uint32_t& inputTypes, sptr callback) { - return SUCCESS; + return DH_SUCCESS; } bool DistributedInputClient::IsNeedFilterOut(const std::string& deviceId, const BusinessEvent& event) diff --git a/test/fuzztest/distributedinputclient_fuzzer/distributed_input_client_fuzzer.cpp b/test/fuzztest/distributedinputclient_fuzzer/distributed_input_client_fuzzer.cpp index 5b6fd00..8dc1583 100644 --- a/test/fuzztest/distributedinputclient_fuzzer/distributed_input_client_fuzzer.cpp +++ b/test/fuzztest/distributedinputclient_fuzzer/distributed_input_client_fuzzer.cpp @@ -77,8 +77,8 @@ void RegisterDistributedHardwareFuzzTest(const uint8_t* data, size_t size) ret = DistributedInput::DistributedInputSourceHandler::GetInstance().UnregisterDistributedHardware( rDevId, rDhId, unregisterCb); } -} -} +} // namespace DistributedHardware +} // namespace OHOS /* Fuzzer entry point */ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) diff --git a/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp b/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp index 20f899e..9dff863 100644 --- a/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp +++ b/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp @@ -131,8 +131,8 @@ void IsNeedFilterOutFuzzTest(const uint8_t* data, size_t size) DistributedInput::DistributedInputKit::IsNeedFilterOut(deviceId, event); } -} -} +} // namespace DistributedHardware +} // namespace OHOS /* Fuzzer entry point */ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) diff --git a/test/fuzztest/distributedinputsinktransport_fuzzer/distributed_input_sink_transport_fuzzer.cpp b/test/fuzztest/distributedinputsinktransport_fuzzer/distributed_input_sink_transport_fuzzer.cpp index 21a68a0..850a6bd 100644 --- a/test/fuzztest/distributedinputsinktransport_fuzzer/distributed_input_sink_transport_fuzzer.cpp +++ b/test/fuzztest/distributedinputsinktransport_fuzzer/distributed_input_sink_transport_fuzzer.cpp @@ -76,8 +76,8 @@ void OnBytesReceivedFuzzTest(const uint8_t* data, size_t size) uint16_t dataLen = *(reinterpret_cast(data)); DistributedInput::DistributedInputSinkTransport::GetInstance().OnBytesReceived(sessionId, msg, dataLen); } -} -} +} // namespace DistributedHardware +} // namespace OHOS /* Fuzzer entry point */ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) diff --git a/test/fuzztest/distributedinputsourcetransport_fuzzer/distributed_input_source_transport_fuzzer.cpp b/test/fuzztest/distributedinputsourcetransport_fuzzer/distributed_input_source_transport_fuzzer.cpp index a263b0d..36c95c5 100644 --- a/test/fuzztest/distributedinputsourcetransport_fuzzer/distributed_input_source_transport_fuzzer.cpp +++ b/test/fuzztest/distributedinputsourcetransport_fuzzer/distributed_input_source_transport_fuzzer.cpp @@ -64,8 +64,8 @@ void OnBytesReceivedFuzzTest(const uint8_t* data, size_t size) uint16_t dataLen = *(reinterpret_cast(data)); DistributedInput::DistributedInputSourceTransport::GetInstance().OnBytesReceived(sessionId, msg, dataLen); } -} -} +} // namespace DistributedHardware +} // namespace OHOS /* Fuzzer entry point */ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) diff --git a/utils/include/dinput_utils_tool.h b/utils/include/dinput_utils_tool.h index 71f25f0..d46fc88 100644 --- a/utils/include/dinput_utils_tool.h +++ b/utils/include/dinput_utils_tool.h @@ -32,7 +32,8 @@ struct DevInfo { DevInfo GetLocalDeviceInfo(); uint64_t GetCurrentTime(); -} -} -} -#endif \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // OHOS_DISTRIBUTED_INPUT_UTILS_TOOL_H \ No newline at end of file diff --git a/utils/src/dinput_utils_tool.cpp b/utils/src/dinput_utils_tool.cpp index 76f729d..6bfc9bf 100644 --- a/utils/src/dinput_utils_tool.cpp +++ b/utils/src/dinput_utils_tool.cpp @@ -50,6 +50,6 @@ uint64_t GetCurrentTime() gettimeofday(&tv, nullptr); return tv.tv_sec * MS_ONE_SECOND + tv.tv_usec / MS_ONE_SECOND; } -} -} -} \ No newline at end of file +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file