!198 fix:修改cppcheck告警

Merge pull request !198 from 李天刚/master
This commit is contained in:
openharmony_ci
2024-04-29 06:57:30 +00:00
committed by Gitee
25 changed files with 115 additions and 106 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -25,11 +25,11 @@ namespace DistributedHardware {
namespace DistributedInput {
class InputNodeListener : public IRemoteBroker {
public:
virtual void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc) = 0;
virtual void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc) = 0;
virtual void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId) = 0;
virtual void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId) = 0;
enum class Message { RESULT_ON, RESULT_OFF };
+3 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -25,8 +25,8 @@ namespace DistributedHardware {
namespace DistributedInput {
class ISharingDhIdListener : public IRemoteBroker {
public:
virtual int32_t OnSharing(std::string dhId) = 0;
virtual int32_t OnNoSharing(std::string dhId) = 0;
virtual int32_t OnSharing(const std::string &dhId) = 0;
virtual int32_t OnNoSharing(const std::string &dhId) = 0;
enum class Message {
SHARING,
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -85,8 +85,8 @@ void DistributedInputInnerTest::TestStartStopDInputCallback::OnResultDhids(
return;
}
void DistributedInputInnerTest::TestInputNodeListener::OnNodeOnLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId, const std::string sinkNodeDesc)
void DistributedInputInnerTest::TestInputNodeListener::OnNodeOnLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
(void)srcDevId;
(void)sinkDevId;
@@ -95,8 +95,8 @@ void DistributedInputInnerTest::TestInputNodeListener::OnNodeOnLine(const std::s
return;
}
void DistributedInputInnerTest::TestInputNodeListener::OnNodeOffLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId)
void DistributedInputInnerTest::TestInputNodeListener::OnNodeOffLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId)
{
(void)srcDevId;
(void)sinkDevId;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -96,11 +96,11 @@ public:
public:
TestInputNodeListener() = default;
virtual ~TestInputNodeListener() = default;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc);
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc);
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId);
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId);
};
class TestSimulationEventListenerStub : public
@@ -150,8 +150,8 @@ public:
public:
SharingDhIdListenerCb() = default;
~SharingDhIdListenerCb() override = default;
int32_t OnSharing(std::string dhId) override;
int32_t OnNoSharing(std::string dhId) override;
int32_t OnSharing(const std::string &dhId) override;
int32_t OnNoSharing(const std::string &dhId) override;
};
class GetSinkScreenInfosCb : public OHOS::DistributedHardware::DistributedInput::GetSinkScreenInfosCallbackStub {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -30,11 +30,11 @@ public:
explicit InputNodeListenerProxy(const sptr<IRemoteObject> &object);
~InputNodeListenerProxy() override;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc) override;
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc) override;
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId) override;
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId) override;
private:
static inline BrokerDelegator<InputNodeListenerProxy> delegator_;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -30,8 +30,8 @@ public:
explicit SharingDhIdListenerProxy(const sptr<IRemoteObject> &object);
~SharingDhIdListenerProxy() override;
int32_t OnSharing(std::string dhId) override;
int32_t OnNoSharing(std::string dhId) override;
int32_t OnSharing(const std::string &dhId) override;
int32_t OnNoSharing(const std::string &dhId) override;
private:
static inline BrokerDelegator<SharingDhIdListenerProxy> delegator_;
@@ -101,7 +101,7 @@ void DistributedInputClient::GetSinkScreenInfosCb::OnResult(const std::string &s
}
}
int32_t DistributedInputClient::SharingDhIdListenerCb::OnSharing(std::string dhId)
int32_t DistributedInputClient::SharingDhIdListenerCb::OnSharing(const std::string &dhId)
{
std::lock_guard<std::mutex> lock(DistributedInputClient::GetInstance().sharingDhIdsMtx_);
DHLOGI("Add Sharing Local dhId: %{public}s", GetAnonyString(dhId).c_str());
@@ -109,7 +109,7 @@ int32_t DistributedInputClient::SharingDhIdListenerCb::OnSharing(std::string dhI
return DH_SUCCESS;
}
int32_t DistributedInputClient::SharingDhIdListenerCb::OnNoSharing(std::string dhId)
int32_t DistributedInputClient::SharingDhIdListenerCb::OnNoSharing(const std::string &dhId)
{
std::lock_guard<std::mutex> lock(DistributedInputClient::GetInstance().sharingDhIdsMtx_);
DHLOGI("Remove No Sharing Local dhId: %{public}s", GetAnonyString(dhId).c_str());
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -30,8 +30,8 @@ InputNodeListenerProxy::InputNodeListenerProxy(const sptr<IRemoteObject> &object
InputNodeListenerProxy::~InputNodeListenerProxy() {}
void InputNodeListenerProxy::OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc)
void InputNodeListenerProxy::OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
sptr<IRemoteObject> remote = Remote();
if (remote == nullptr) {
@@ -68,8 +68,8 @@ void InputNodeListenerProxy::OnNodeOnLine(const std::string srcDevId, const std:
}
}
void InputNodeListenerProxy::OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId)
void InputNodeListenerProxy::OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId)
{
sptr<IRemoteObject> remote = Remote();
if (remote == nullptr) {
@@ -31,7 +31,7 @@ SharingDhIdListenerProxy::SharingDhIdListenerProxy(const sptr<IRemoteObject> &ob
SharingDhIdListenerProxy::~SharingDhIdListenerProxy() {}
int32_t SharingDhIdListenerProxy::OnSharing(std::string dhId)
int32_t SharingDhIdListenerProxy::OnSharing(const std::string &dhId)
{
int32_t result = ERR_DH_INPUT_IPC_WRITE_TOKEN_VALID_FAIL;
sptr<IRemoteObject> remote = Remote();
@@ -62,7 +62,7 @@ int32_t SharingDhIdListenerProxy::OnSharing(std::string dhId)
return result;
}
int32_t SharingDhIdListenerProxy::OnNoSharing(std::string dhId)
int32_t SharingDhIdListenerProxy::OnNoSharing(const std::string &dhId)
{
int32_t result = ERR_DH_INPUT_IPC_WRITE_TOKEN_VALID_FAIL;
sptr<IRemoteObject> remote = Remote();
@@ -76,8 +76,8 @@ void AddWhiteListInfosCallbackTest::TestGetSinkScreenInfosCallbackStub::OnResult
strJson_ = strJson;
}
void AddWhiteListInfosCallbackTest::TestInputNodeListenerStub::OnNodeOnLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId, const std::string sinkNodeDesc)
void AddWhiteListInfosCallbackTest::TestInputNodeListenerStub::OnNodeOnLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
srcDevId_ = srcDevId;
sinkDevId_ = sinkDevId;
@@ -85,8 +85,8 @@ void AddWhiteListInfosCallbackTest::TestInputNodeListenerStub::OnNodeOnLine(cons
sinkNodeDesc_ = sinkNodeDesc;
}
void AddWhiteListInfosCallbackTest::TestInputNodeListenerStub::OnNodeOffLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId)
void AddWhiteListInfosCallbackTest::TestInputNodeListenerStub::OnNodeOffLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId)
{
srcDevId_ = srcDevId;
sinkDevId_ = sinkDevId;
@@ -108,13 +108,13 @@ void AddWhiteListInfosCallbackTest::TestRegisterDInputCallbackStub::OnResult(con
status_ = status;
}
int32_t AddWhiteListInfosCallbackTest::TestSharingDhIdListenerStub::OnSharing(std::string dhId)
int32_t AddWhiteListInfosCallbackTest::TestSharingDhIdListenerStub::OnSharing(const std::string &dhId)
{
dhId_ = dhId;
return DH_SUCCESS;
}
int32_t AddWhiteListInfosCallbackTest::TestSharingDhIdListenerStub::OnNoSharing(std::string dhId)
int32_t AddWhiteListInfosCallbackTest::TestSharingDhIdListenerStub::OnNoSharing(const std::string &dhId)
{
dhId_ = dhId;
return DH_SUCCESS;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -77,11 +77,11 @@ public:
public:
TestInputNodeListenerStub() = default;
virtual ~TestInputNodeListenerStub() = default;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc);
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc);
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId);
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId);
std::string srcDevId_;
std::string sinkDevId_;
std::string sinkNodeId_;
@@ -114,8 +114,8 @@ public:
public:
TestSharingDhIdListenerStub() = default;
virtual ~TestSharingDhIdListenerStub() = default;
int32_t OnSharing(std::string dhId);
int32_t OnNoSharing(std::string dhId);
int32_t OnSharing(const std::string &dhId);
int32_t OnNoSharing(const std::string &dhId);
std::string dhId_;
};
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -123,8 +123,8 @@ void DistributedInputClientTest::TestStartStopDInputCallback::OnResultDhids(
return;
}
void DistributedInputClientTest::TestInputNodeListener::OnNodeOnLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId, const std::string sinkNodeDesc)
void DistributedInputClientTest::TestInputNodeListener::OnNodeOnLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
(void)srcDevId;
(void)sinkDevId;
@@ -133,8 +133,8 @@ void DistributedInputClientTest::TestInputNodeListener::OnNodeOnLine(const std::
return;
}
void DistributedInputClientTest::TestInputNodeListener::OnNodeOffLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId)
void DistributedInputClientTest::TestInputNodeListener::OnNodeOffLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId)
{
(void)srcDevId;
(void)sinkDevId;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -106,11 +106,11 @@ public:
public:
TestInputNodeListener() = default;
virtual ~TestInputNodeListener() = default;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc);
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc);
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId);
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId);
};
class TestSimulationEventListenerStub : public
@@ -338,8 +338,8 @@ void DInputSourceCallBackTest::TestDelWhiteListInfosCallBack::OnResult(
return;
}
void DInputSourceCallBackTest::TestDInputNodeListenerCallBack::OnNodeOnLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId, const std::string sinkNodeDesc)
void DInputSourceCallBackTest::TestDInputNodeListenerCallBack::OnNodeOnLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
(void)srcDevId;
(void)sinkDevId;
@@ -348,8 +348,8 @@ void DInputSourceCallBackTest::TestDInputNodeListenerCallBack::OnNodeOnLine(cons
return;
}
void DInputSourceCallBackTest::TestDInputNodeListenerCallBack::OnNodeOffLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId)
void DInputSourceCallBackTest::TestDInputNodeListenerCallBack::OnNodeOffLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId)
{
(void)srcDevId;
(void)sinkDevId;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -185,11 +185,11 @@ public:
public:
TestDInputNodeListenerCallBack() = default;
virtual ~TestDInputNodeListenerCallBack() = default;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc);
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc);
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId);
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId);
};
class TestDInputSimulationEventCallBack : public
@@ -456,15 +456,22 @@ void GetSinkScreenInfosCallbackStubFuzzTest(const uint8_t *data, size_t size)
class MyInputNodeListenerStub : public DistributedInput::InputNodeListenerStub {
public:
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc) override
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc) override
{
(void)srcDevId;
(void)sinkDevId;
(void)sinkNodeId;
(void)sinkNodeDesc;
return;
}
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId) override
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId) override
{
(void)srcDevId;
(void)sinkDevId;
(void)sinkNodeId;
return;
}
};
@@ -615,13 +622,15 @@ void RegisterSessionStateCallbackStubFuzzTest(const uint8_t *data, size_t size)
class MySharingDhIdListenerStub : public DistributedInput::SharingDhIdListenerStub {
public:
int32_t OnSharing(std::string dhId) override
int32_t OnSharing(const std::string &dhId) override
{
(void)dhId;
return 0;
}
int32_t OnNoSharing(std::string dhId) override
int32_t OnNoSharing(const std::string &dhId) override
{
(void)dhId;
return 0;
}
};
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -41,8 +41,8 @@ void DistributedInputIpcTest::TearDownTestCase()
{
}
void DistributedInputIpcTest::TestInputNodeListener::OnNodeOnLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId, const std::string sinkNodeDesc)
void DistributedInputIpcTest::TestInputNodeListener::OnNodeOnLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
(void)srcDevId;
(void)sinkDevId;
@@ -51,8 +51,8 @@ void DistributedInputIpcTest::TestInputNodeListener::OnNodeOnLine(const std::str
return;
}
void DistributedInputIpcTest::TestInputNodeListener::OnNodeOffLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId)
void DistributedInputIpcTest::TestInputNodeListener::OnNodeOffLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId)
{
(void)srcDevId;
(void)sinkDevId;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -45,11 +45,11 @@ public:
public:
TestInputNodeListener() = default;
virtual ~TestInputNodeListener() = default;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc);
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc);
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId);
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId);
};
class TestSimulationEventListenerStub : public
@@ -74,13 +74,13 @@ void DistributedInputSinkManagerTest::TestGetSinkScreenInfosCb::OnResult(const s
(void)strJson;
}
int32_t DistributedInputSinkManagerTest::TestSharingDhIdListenerStub::OnSharing(std::string dhId)
int32_t DistributedInputSinkManagerTest::TestSharingDhIdListenerStub::OnSharing(const std::string &dhId)
{
(void)dhId;
return DH_SUCCESS;
}
int32_t DistributedInputSinkManagerTest::TestSharingDhIdListenerStub::OnNoSharing(std::string dhId)
int32_t DistributedInputSinkManagerTest::TestSharingDhIdListenerStub::OnNoSharing(const std::string &dhId)
{
(void)dhId;
return DH_SUCCESS;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -52,8 +52,8 @@ public:
public:
TestSharingDhIdListenerStub() = default;
virtual ~TestSharingDhIdListenerStub() = default;
int32_t OnSharing(std::string dhId) override;
int32_t OnNoSharing(std::string dhId) override;
int32_t OnSharing(const std::string &dhId) override;
int32_t OnNoSharing(const std::string &dhId) override;
};
private:
DistributedInputSinkManager* sinkManager_;
@@ -51,8 +51,8 @@ void DistributedInputSourceInjectTest::TearDownTestCase()
{
}
void DistributedInputSourceInjectTest::TestInputNodeListener::OnNodeOnLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId, const std::string sinkNodeDesc)
void DistributedInputSourceInjectTest::TestInputNodeListener::OnNodeOnLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
(void)srcDevId;
(void)sinkDevId;
@@ -60,8 +60,8 @@ void DistributedInputSourceInjectTest::TestInputNodeListener::OnNodeOnLine(const
(void)sinkNodeDesc;
}
void DistributedInputSourceInjectTest::TestInputNodeListener::OnNodeOffLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId)
void DistributedInputSourceInjectTest::TestInputNodeListener::OnNodeOffLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId)
{
(void)srcDevId;
(void)sinkDevId;
@@ -42,9 +42,9 @@ public:
public:
TestInputNodeListener() = default;
virtual ~TestInputNodeListener() = default;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId, const std::string sinkNodeId,
const std::string sinkNodeDesc);
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId, const std::string sinkNodeId);
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId, const std::string &sinkNodeId,
const std::string &sinkNodeDesc);
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId, const std::string &sinkNodeId);
};
class TestRegisterSessionStateCallbackStub :
@@ -164,8 +164,8 @@ void DistributedInputSourceManagerTest::TestStartStopResultCb::OnStop(const std:
return;
}
void DistributedInputSourceManagerTest::TestInputNodeListenerCb::OnNodeOnLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId, const std::string sinkNodeDesc)
void DistributedInputSourceManagerTest::TestInputNodeListenerCb::OnNodeOnLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId, const std::string &sinkNodeDesc)
{
(void)srcDevId;
(void)sinkDevId;
@@ -174,8 +174,8 @@ void DistributedInputSourceManagerTest::TestInputNodeListenerCb::OnNodeOnLine(co
return;
}
void DistributedInputSourceManagerTest::TestInputNodeListenerCb::OnNodeOffLine(const std::string srcDevId,
const std::string sinkDevId, const std::string sinkNodeId)
void DistributedInputSourceManagerTest::TestInputNodeListenerCb::OnNodeOffLine(const std::string &srcDevId,
const std::string &sinkDevId, const std::string &sinkNodeId)
{
(void)srcDevId;
(void)sinkDevId;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -131,11 +131,11 @@ public:
public:
TestInputNodeListenerCb() = default;
virtual ~TestInputNodeListenerCb() = default;
void OnNodeOnLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId, const std::string sinkNodeDesc);
void OnNodeOnLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId, const std::string &sinkNodeDesc);
void OnNodeOffLine(const std::string srcDevId, const std::string sinkDevId,
const std::string sinkNodeId);
void OnNodeOffLine(const std::string &srcDevId, const std::string &sinkDevId,
const std::string &sinkNodeId);
};
class TestSimulationEventCb : public OHOS::DistributedHardware::DistributedInput::SimulationEventListenerStub {