mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-22 06:15:34 -04:00
Description:sync code
Match-id-ae901069d012cb1ccf50efd2545d870f46d2fe14
This commit is contained in:
@@ -33,6 +33,18 @@ namespace OHOS {
|
||||
namespace DistributedHardware {
|
||||
namespace DistributedInput {
|
||||
IMPLEMENT_SINGLE_INSTANCE(DistributedInputHandler);
|
||||
DistributedInputHandler::DistributedInputHandler()
|
||||
: collectThreadID_(-1), isCollectingEvents_(false),
|
||||
isStartCollectEventThread(false)
|
||||
{
|
||||
inputHub_ = std::make_unique<InputHub>();
|
||||
this->m_listener = nullptr;
|
||||
}
|
||||
|
||||
DistributedInputHandler::~DistributedInputHandler()
|
||||
{
|
||||
StopInputMonitorDeviceThread();
|
||||
}
|
||||
|
||||
void DistributedInputHandler::StructTransJson(const InputDevice& pBuf, std::string& strDescriptor)
|
||||
{
|
||||
@@ -56,24 +68,6 @@ void DistributedInputHandler::StructTransJson(const InputDevice& pBuf, std::stri
|
||||
return;
|
||||
}
|
||||
|
||||
DistributedInputHandler::DistributedInputHandler()
|
||||
: collectThreadID_(-1), isCollectingEvents_(false),
|
||||
isStartCollectEventThread(false)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
DistributedInputHandler::~DistributedInputHandler()
|
||||
{
|
||||
Release();
|
||||
}
|
||||
|
||||
bool DistributedInputHandler::Release()
|
||||
{
|
||||
StopInputMonitorDeviceThread();
|
||||
return true;
|
||||
}
|
||||
|
||||
int32_t DistributedInputHandler::Initialize()
|
||||
{
|
||||
if (!isStartCollectEventThread) {
|
||||
@@ -83,13 +77,6 @@ int32_t DistributedInputHandler::Initialize()
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
bool DistributedInputHandler::Init()
|
||||
{
|
||||
inputHub_ = std::make_unique<InputHub>();
|
||||
this->m_listener = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<DHItem> DistributedInputHandler::Query()
|
||||
{
|
||||
std::vector<DHItem> retInfos;
|
||||
|
||||
Reference in New Issue
Block a user