mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-20 01:53:34 -04:00
Description:amend error code
Match-id-7da8cabd9c6b2dbbba9a8f268393b84446fc50f6
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
@@ -42,4 +42,5 @@ public:
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DISRIBUTED_INPUT_SINKHANDLER_TEST_H
|
||||
|
||||
@@ -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<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)
|
||||
|
||||
Reference in New Issue
Block a user