mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-18 16:04:40 -04:00
Description:amend error code
Match-id-7da8cabd9c6b2dbbba9a8f268393b84446fc50f6
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // OHOS_DINPUT_ERRCODE_H
|
||||
@@ -37,4 +37,5 @@ constexpr int32_t DINPUT_STOP_TASK = 3;
|
||||
constexpr int32_t DINPUT_UNPREPARE_TASK = 4;
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
#endif
|
||||
|
||||
#endif // OHOS_DINPUT_HITRACE_H
|
||||
@@ -24,4 +24,5 @@ void SetSourceProcessExit();
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DINPUT_SA_PROCESS_STATE_H
|
||||
@@ -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> device = std::make_unique<Device>(fd, deviceId, devicePath, identifier);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -80,4 +80,4 @@ private:
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // WHITE_LIST_UTIL_H
|
||||
#endif // WHITE_LIST_UTIL_H
|
||||
|
||||
@@ -77,7 +77,8 @@ private:
|
||||
std::mutex sessionMutex_;
|
||||
std::mutex operationMutex_;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // HIDUMP_HELPER_H
|
||||
@@ -56,4 +56,5 @@ private:
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
#endif
|
||||
|
||||
#endif // OHOS_DISTRIBUTED_INPUT_HISYSEVENT_UTILS_H
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,4 +52,5 @@ public:
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISTRIBUTED_INPUT_KIT_H
|
||||
|
||||
@@ -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<OHOS::ISystemAbilityManager> systemAbilityManager =
|
||||
OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
||||
if (!systemAbilityManager) {
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
OHOS::sptr<OHOS::IRemoteObject> remoteObject = systemAbilityManager->GetSystemAbility(
|
||||
DISTRIBUTED_HARDWARE_INPUT_SOURCE_SA_ID);
|
||||
if (!remoteObject) {
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
OHOS::sptr<IDistributedSourceInput> proxyTest;
|
||||
|
||||
proxyTest = OHOS::iface_cast<IDistributedSourceInput>(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<OHOS::ISystemAbilityManager> systemAbilityManager =
|
||||
OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
||||
if (!systemAbilityManager) {
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
OHOS::sptr<OHOS::IRemoteObject> remoteObject = systemAbilityManager->GetSystemAbility(
|
||||
DISTRIBUTED_HARDWARE_INPUT_SINK_SA_ID);
|
||||
if (!remoteObject) {
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
OHOS::sptr<IDistributedSinkInput> proxyTest;
|
||||
|
||||
proxyTest = OHOS::iface_cast<IDistributedSinkInput>(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<TestPrepareDInputCallback> 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<TestPrepareDInputCallback> 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<TestPrepareDInputCallback> 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<TestPrepareDInputCallback> 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<TestUnprepareDInputCallback> 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<TestUnprepareDInputCallback> 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<TestUnprepareDInputCallback> 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<TestUnprepareDInputCallback> 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<TestStartDInputCallback> callback = new TestStartDInputCallback();
|
||||
int32_t ret =
|
||||
DistributedInputKit::StartRemoteInput(deviceId, static_cast<uint32_t>(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<TestStartDInputCallback> callback = new TestStartDInputCallback();
|
||||
int32_t ret =
|
||||
DistributedInputKit::StartRemoteInput(deviceId, static_cast<uint32_t>(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<TestStartDInputCallback> callback = nullptr;
|
||||
int32_t ret =
|
||||
DistributedInputKit::StartRemoteInput(deviceId, static_cast<uint32_t>(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<TestStartDInputCallback> callback = nullptr;
|
||||
int32_t ret =
|
||||
DistributedInputKit::StartRemoteInput(deviceId, static_cast<uint32_t>(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<TestStopDInputCallback> callback = new TestStopDInputCallback();
|
||||
int32_t ret =
|
||||
DistributedInputKit::StopRemoteInput(deviceId, static_cast<uint32_t>(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<TestStopDInputCallback> callback = new TestStopDInputCallback();
|
||||
int32_t ret =
|
||||
DistributedInputKit::StopRemoteInput(deviceId, static_cast<uint32_t>(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<TestStopDInputCallback> callback = nullptr;
|
||||
int32_t ret =
|
||||
DistributedInputKit::StopRemoteInput(deviceId, static_cast<uint32_t>(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<TestStopDInputCallback> callback = nullptr;
|
||||
int32_t ret =
|
||||
DistributedInputKit::StopRemoteInput(deviceId, static_cast<uint32_t>(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<uint32_t>(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<uint32_t>(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
@@ -82,4 +82,5 @@ public:
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISRIBUTED_INPUT_INNER_TEST_H
|
||||
|
||||
@@ -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<RegisterCallback>& callback)
|
||||
{
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t DistributedInputClient::UnregisterDistributedHardware(const std::string& devId, const std::string& dhId,
|
||||
const std::shared_ptr<UnregisterCallback>& callback)
|
||||
{
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t DistributedInputClient::PrepareRemoteInput(
|
||||
const std::string& deviceId, sptr<IPrepareDInputCallback> callback)
|
||||
{
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t DistributedInputClient::UnprepareRemoteInput(
|
||||
const std::string& deviceId, sptr<IUnprepareDInputCallback> callback)
|
||||
{
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t DistributedInputClient::StartRemoteInput(
|
||||
const std::string& deviceId, const uint32_t& inputTypes, sptr<IStartDInputCallback> callback)
|
||||
{
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t DistributedInputClient::StopRemoteInput(
|
||||
const std::string& deviceId, const uint32_t& inputTypes, sptr<IStopDInputCallback> callback)
|
||||
{
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
bool DistributedInputClient::IsNeedFilterOut(const std::string& deviceId, const BusinessEvent& event)
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<AddWhiteListInfosCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<DelWhiteListInfosCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -64,7 +64,8 @@ public:
|
||||
sptr<IDistributedSinkInput> dInputSinkProxy_ = nullptr;
|
||||
sptr<SystemAbilityListener> saListenerCallback = nullptr;
|
||||
};
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
#endif
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DINPUT_SA_MANAGER_H
|
||||
@@ -139,8 +139,8 @@ private:
|
||||
std::vector<DHardWareFwkUnRegistInfo> 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
|
||||
|
||||
@@ -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
|
||||
#endif // DISRIBUTED_INPUT_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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<PrepareDInputCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<RegisterDInputCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<StartDInputCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<StartDInputServerCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<StopDInputCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<UnprepareDInputCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<UnregisterDInputCallbackProxy> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -55,6 +55,6 @@ void AddWhiteListInfosCallbackProxy::OnResult(const std::string& deviceId, const
|
||||
}
|
||||
remote->SendRequest(static_cast<int32_t>(IAddWhiteListInfosCallback::Message::RESULT), data, reply, option);
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -52,6 +52,6 @@ int32_t AddWhiteListInfosCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -51,6 +51,6 @@ void DelWhiteListInfosCallbackProxy::OnResult(const std::string& deviceId)
|
||||
}
|
||||
remote->SendRequest(static_cast<int32_t>(IDelWhiteListInfosCallback::Message::RESULT), data, reply, option);
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -51,6 +51,6 @@ int32_t DelWhiteListInfosCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,6 +52,6 @@ int32_t PrepareDInputCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -53,6 +53,6 @@ int32_t RegisterDInputCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -53,6 +53,6 @@ int32_t StartDInputCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,6 +52,6 @@ int32_t StartDInputServerCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -53,6 +53,6 @@ int32_t StopDInputCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,6 +52,6 @@ int32_t UnprepareDInputCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -53,6 +53,6 @@ int32_t UnregisterDInputCallbackStub::OnRemoteRequest(
|
||||
}
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace DistributedInput
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -56,8 +56,8 @@ private:
|
||||
std::shared_ptr<AppExecFwk::EventHandler> sinkHandler_;
|
||||
uint32_t inputTypes_;
|
||||
};
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISTRIBUTED_INPUT_COLLECTOR_H
|
||||
#endif // DISTRIBUTED_INPUT_COLLECTOR_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
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
void SetInputTypes(const uint32_t& inputTypess);
|
||||
|
||||
/**
|
||||
/*
|
||||
* GetEventHandler, get the ui_service manager service's handler.
|
||||
*
|
||||
* @return Returns EventHandler ptr.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
+3
-3
@@ -42,6 +42,6 @@ void DistributedInputSinkManagerTest::SetUpTestCase()
|
||||
void DistributedInputSinkManagerTest::TearDownTestCase()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
+4
-3
@@ -40,7 +40,8 @@ public:
|
||||
private:
|
||||
DistributedInputSinkManager* sinkManager_;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISRIBUTED_INPUT_INNER_TEST_H
|
||||
|
||||
@@ -45,8 +45,8 @@ private:
|
||||
std::mutex operationMutex_;
|
||||
std::vector<SwitchStateData> 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
|
||||
|
||||
@@ -79,8 +79,8 @@ private:
|
||||
std::shared_ptr<DistributedInputSinkTransport::DInputSinkEventHandler> eventHandler_;
|
||||
std::shared_ptr<DInputSinkTransCallback> 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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
#endif // DISTRIBUTED_INPUT_INJECT_H
|
||||
@@ -61,8 +61,8 @@ private:
|
||||
std::condition_variable conditionVariable_;
|
||||
std::queue<std::shared_ptr<RawEvent>> injectQueue_;
|
||||
};
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISTRIBUTED_INPUT_INJECT_H
|
||||
#endif // DISTRIBUTED_INPUT_INJECT_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
|
||||
|
||||
@@ -33,7 +33,8 @@ protected:
|
||||
const std::vector<uint32_t>& GetAbs() const override;
|
||||
const std::vector<uint32_t>& 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
|
||||
|
||||
@@ -33,7 +33,8 @@ protected:
|
||||
const std::vector<uint32_t>& GetProperties() const override;
|
||||
const std::vector<uint32_t>& GetAbs() const override;
|
||||
};
|
||||
};
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
#endif // VIRTUALKEYBOARD_H
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // VIRTUALKEYBOARD_H
|
||||
|
||||
@@ -33,7 +33,8 @@ protected:
|
||||
const std::vector<uint32_t>& GetProperties() const override;
|
||||
const std::vector<uint32_t>& GetRelBits() const override;
|
||||
};
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
#endif
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // OHOS_VIRTUAL_TOUCHPAD_H
|
||||
|
||||
+7
-6
@@ -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
|
||||
|
||||
+1
@@ -39,4 +39,5 @@ public:
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISRIBUTED_INPUT_INNER_TEST_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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
+7
-7
@@ -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<TestRegisterDInputCb> 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<TestRegisterDInputCb> 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<TestRegisterDInputCb> 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
|
||||
+1
@@ -111,4 +111,5 @@ private:
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISRIBUTED_INPUT_INNER_TEST_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
|
||||
|
||||
@@ -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<std::mutex> sessionLock(operationMutex_);
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
+1
@@ -39,4 +39,5 @@ public:
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISRIBUTED_INPUT_INNER_TEST_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
|
||||
|
||||
@@ -30,7 +30,8 @@ public:
|
||||
private:
|
||||
std::string params_;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // LOAD_D_INPUT_SOURCE_CALLBACK_H
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user