*/
struct CliException: public VasumException {
- CliException(const std::string& error) : VasumException(error) {}
+ explicit CliException(const std::string& error) : VasumException(error) {}
};
struct IOException: public CliException {
- IOException(const std::string& error) : CliException(error) {}
+ explicit IOException(const std::string& error) : CliException(error) {}
};
} // namespace cli
*/
struct ClientException: public VasumException {
- ClientException(const std::string& error) : VasumException(error) {}
+ explicit ClientException(const std::string& error) : VasumException(error) {}
};
struct IOException: public ClientException {
- IOException(const std::string& error) : ClientException(error) {}
+ explicit IOException(const std::string& error) : ClientException(error) {}
};
struct OperationFailedException: public ClientException {
- OperationFailedException(const std::string& error) : ClientException(error) {}
+ explicit OperationFailedException(const std::string& error) : ClientException(error) {}
};
struct InvalidArgumentException: public ClientException {
- InvalidArgumentException(const std::string& error) : ClientException(error) {}
+ explicit InvalidArgumentException(const std::string& error) : ClientException(error) {}
};
struct InvalidResponseException: public ClientException {
- InvalidResponseException(const std::string& error) : ClientException(error) {}
+ explicit InvalidResponseException(const std::string& error) : ClientException(error) {}
};
}
std::make_shared<api::Void>());
});
}
-
class IPCMethodResultBuilder: public MethodResultBuilder {
public:
- IPCMethodResultBuilder(const ipc::MethodResult::Pointer& methodResult);
+ explicit IPCMethodResultBuilder(const ipc::MethodResult::Pointer& methodResult);
~IPCMethodResultBuilder() {}
private:
*/
struct VasumException: public std::runtime_error {
- VasumException(const std::string& error) : std::runtime_error(error) {}
+ explicit VasumException(const std::string& error) : std::runtime_error(error) {}
};
} // namespace vasum
*/
struct LxcException: public VasumException {
- LxcException(const std::string& error) : VasumException(error) {}
+ explicit LxcException(const std::string& error) : VasumException(error) {}
};
struct KeyNotFoundException: public LxcException {
- KeyNotFoundException(const std::string& error) : LxcException(error) {}
+ explicit KeyNotFoundException(const std::string& error) : LxcException(error) {}
};
} // namespace vasum
*/
struct UtilsException: public std::runtime_error {
- UtilsException(const std::string& error) : std::runtime_error(error) {}
+ explicit UtilsException(const std::string& error) : std::runtime_error(error) {}
};
struct ProvisionExistsException: public UtilsException {
- ProvisionExistsException(const std::string& error) : UtilsException(error) {}
+ explicit ProvisionExistsException(const std::string& error) : UtilsException(error) {}
};
/**
*/
struct DbusException: public std::runtime_error {
- DbusException(const std::string& error = "") : std::runtime_error(error) {}
+ explicit DbusException(const std::string& error = "") : std::runtime_error(error) {}
};
/**
*/
struct DbusIOException: public DbusException {
- DbusIOException(const std::string& error = "") : DbusException(error) {}
+ explicit DbusIOException(const std::string& error = "") : DbusException(error) {}
};
/**
*/
struct DbusOperationException: public DbusException {
- DbusOperationException(const std::string& error = "") : DbusException(error) {}
+ explicit DbusOperationException(const std::string& error = "") : DbusException(error) {}
};
/**
*/
struct DbusCustomException: public DbusException {
- DbusCustomException(const std::string& error = "") : DbusException(error) {}
+ explicit DbusCustomException(const std::string& error = "") : DbusException(error) {}
};
/**
*/
struct DbusInvalidArgumentException: public DbusException {
- DbusInvalidArgumentException(const std::string& error = "") : DbusException(error) {}
+ explicit DbusInvalidArgumentException(const std::string& error = "") : DbusException(error) {}
};
} // namespace dbus
* @defgroup IPCException IPCException
*/
struct IPCException: public std::runtime_error {
- IPCException(const std::string& message)
+ explicit IPCException(const std::string& message)
: std::runtime_error(message) {}
};
* @ingroup IPCException
*/
struct IPCParsingException: public IPCException {
- IPCParsingException(const std::string& message = "Exception during reading/parsing data from the socket")
+ explicit IPCParsingException(const std::string& message = "Exception during reading/parsing data from the socket")
: IPCException(message) {}
};
* @ingroup IPCException
*/
struct IPCSerializationException: public IPCException {
- IPCSerializationException(const std::string& message = "Exception during writing/serializing data to the socket")
+ explicit IPCSerializationException(const std::string& message = "Exception during writing/serializing data to the socket")
: IPCException(message) {}
};
* @ingroup IPCException
*/
struct IPCPeerDisconnectedException: public IPCException {
- IPCPeerDisconnectedException(const std::string& message = "No such peer. Might got disconnected.")
+ explicit IPCPeerDisconnectedException(const std::string& message = "No such peer. Might got disconnected.")
: IPCException(message) {}
};
* @ingroup IPCException
*/
struct IPCNaughtyPeerException: public IPCException {
- IPCNaughtyPeerException(const std::string& message = "Peer performed a forbidden action.")
+ explicit IPCNaughtyPeerException(const std::string& message = "Peer performed a forbidden action.")
: IPCException(message) {}
};
* @ingroup IPCException
*/
struct IPCRemovedPeerException: public IPCException {
- IPCRemovedPeerException(const std::string& message = "Removing peer")
+ explicit IPCRemovedPeerException(const std::string& message = "Removing peer")
: IPCException(message) {}
};
* @ingroup IPCException
*/
struct IPCClosingException: public IPCException {
- IPCClosingException(const std::string& message = "Closing IPC")
+ explicit IPCClosingException(const std::string& message = "Closing IPC")
: IPCException(message) {}
};
* @ingroup IPCException
*/
struct IPCTimeoutException: public IPCException {
- IPCTimeoutException(const std::string& message)
+ explicit IPCTimeoutException(const std::string& message)
: IPCException(message) {}
};
} // namespace ipc
-#endif // COMMON_IPC_INTERNALS_FINISH_REQUEST_HPP
\ No newline at end of file
+#endif // COMMON_IPC_INTERNALS_FINISH_REQUEST_HPP
template<typename SentDataType, typename ReceivedDataType>
static std::shared_ptr<MethodRequest> create(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& process);
ResultBuilderHandler process;
private:
- MethodRequest(const MethodID methodID, const PeerID peerID)
+ MethodRequest(const MethodID methodID, const PeerID& peerID)
: methodID(methodID),
peerID(peerID),
messageID(getNextMessageID())
template<typename SentDataType, typename ReceivedDataType>
std::shared_ptr<MethodRequest> MethodRequest::create(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& process)
{
});
}
-Processor::Peers::iterator Processor::getPeerInfoIterator(const PeerID peerID)
+Processor::Peers::iterator Processor::getPeerInfoIterator(const PeerID & peerID)
{
return std::find_if(mPeerInfo.begin(), mPeerInfo.end(), [peerID](const PeerInfo & peerInfo) {
return peerID == peerInfo.peerID;
}
void Processor::sendResult(const MethodID methodID,
- const PeerID peerID,
- const MessageID messageID,
+ const PeerID& peerID,
+ const MessageID& messageID,
const std::shared_ptr<void>& data)
{
auto requestPtr = std::make_shared<SendResultRequest>(methodID, peerID, messageID, data);
mRequestQueue.pushFront(Event::SEND_RESULT, requestPtr);
}
-void Processor::sendError(const PeerID peerID,
- const MessageID messageID,
+void Processor::sendError(const PeerID& peerID,
+ const MessageID& messageID,
const int errorCode,
const std::string& message)
{
}
void Processor::sendVoid(const MethodID methodID,
- const PeerID peerID,
- const MessageID messageID)
+ const PeerID& peerID,
+ const MessageID& messageID)
{
auto data = std::make_shared<EmptyData>();
auto requestPtr = std::make_shared<SendResultRequest>(methodID, peerID, messageID, data);
return requestPtr->peerID;
}
-void Processor::removePeerSyncInternal(const PeerID peerID, Lock& lock)
+void Processor::removePeerSyncInternal(const PeerID& peerID, Lock& lock)
{
LOGS(mLogPrefix + "Processor removePeer peerID: " << peerID);
}
}
-void Processor::onNewSignals(const PeerID peerID, std::shared_ptr<RegisterSignalsProtocolMessage>& data)
+void Processor::onNewSignals(const PeerID& peerID, std::shared_ptr<RegisterSignalsProtocolMessage>& data)
{
LOGS(mLogPrefix + "Processor onNewSignals peerID: " << peerID);
}
}
-void Processor::onErrorSignal(const PeerID, std::shared_ptr<ErrorProtocolMessage>& data)
+void Processor::onErrorSignal(const PeerID&, std::shared_ptr<ErrorProtocolMessage>& data)
{
LOGS(mLogPrefix + "Processor onErrorSignal messageID: " << data->messageID);
}
bool Processor::onReturnValue(Peers::iterator& peerIt,
- const MessageID messageID)
+ const MessageID& messageID)
{
LOGS(mLogPrefix + "Processor onReturnValue messageID: " << messageID);
bool Processor::onRemoteSignal(Peers::iterator& peerIt,
__attribute__((unused)) const MethodID methodID,
- __attribute__((unused)) const MessageID messageID,
+ __attribute__((unused)) const MessageID& messageID,
std::shared_ptr<SignalHandlers> signalCallbacks)
{
LOGS(mLogPrefix + "Processor onRemoteSignal; methodID: " << methodID << " messageID: " << messageID);
bool Processor::onRemoteMethod(Peers::iterator& peerIt,
const MethodID methodID,
- const MessageID messageID,
+ const MessageID& messageID,
std::shared_ptr<MethodHandlers> methodCallbacks)
{
LOGS(mLogPrefix + "Processor onRemoteMethod; methodID: " << methodID << " messageID: " << messageID);
* @param data data to send
*/
void sendResult(const MethodID methodID,
- const PeerID peerID,
- const MessageID messageID,
+ const PeerID& peerID,
+ const MessageID& messageID,
const std::shared_ptr<void>& data);
/**
* @param errorCode code of the error
* @param message description of the error
*/
- void sendError(const PeerID peerID,
- const MessageID messageID,
+ void sendError(const PeerID& peerID,
+ const MessageID& messageID,
const int errorCode,
const std::string& message);
* @param messageID id of the message to which it replies
*/
void sendVoid(const MethodID methodID,
- const PeerID peerID,
- const MessageID messageID);
+ const PeerID& peerID,
+ const MessageID& messageID);
/**
* Removes the callback associated with specific method id.
*/
template<typename SentDataType, typename ReceivedDataType>
std::shared_ptr<ReceivedDataType> callSync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
unsigned int timeoutMS = 5000);
*/
template<typename SentDataType, typename ReceivedDataType>
MessageID callAsync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& process);
struct RegisterSignalsProtocolMessage {
RegisterSignalsProtocolMessage() = default;
- RegisterSignalsProtocolMessage(const std::vector<MethodID>& ids)
+ explicit RegisterSignalsProtocolMessage(const std::vector<MethodID>& ids)
: ids(ids) {}
std::vector<MethodID> ids;
struct ErrorProtocolMessage {
ErrorProtocolMessage() = default;
- ErrorProtocolMessage(const MessageID messageID, const int code, const std::string& message)
+ ErrorProtocolMessage(const MessageID& messageID, const int code, const std::string& message)
: messageID(messageID), code(code), message(message) {}
MessageID messageID;
template<typename SentDataType, typename ReceivedDataType>
MessageID callAsyncInternal(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& process);
template<typename SentDataType>
void signalInternal(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data);
// Request handlers
bool onFinishRequest(FinishRequest& request);
bool onReturnValue(Peers::iterator& peerIt,
- const MessageID messageID);
+ const MessageID& messageID);
bool onRemoteMethod(Peers::iterator& peerIt,
const MethodID methodID,
- const MessageID messageID,
+ const MessageID& messageID,
std::shared_ptr<MethodHandlers> methodCallbacks);
bool onRemoteSignal(Peers::iterator& peerIt,
const MethodID methodID,
- const MessageID messageID,
+ const MessageID& messageID,
std::shared_ptr<SignalHandlers> signalCallbacks);
void removePeerInternal(Peers::iterator peerIt,
const std::exception_ptr& exceptionPtr);
- void removePeerSyncInternal(const PeerID peerID, Lock& lock);
+ void removePeerSyncInternal(const PeerID& peerID, Lock& lock);
- void onNewSignals(const PeerID peerID,
+ void onNewSignals(const PeerID& peerID,
std::shared_ptr<RegisterSignalsProtocolMessage>& data);
- void onErrorSignal(const PeerID peerID,
+ void onErrorSignal(const PeerID& peerID,
std::shared_ptr<ErrorProtocolMessage>& data);
Peers::iterator getPeerInfoIterator(const FileDescriptor fd);
- Peers::iterator getPeerInfoIterator(const PeerID peerID);
+ Peers::iterator getPeerInfoIterator(const PeerID& peerID);
};
template<typename SentDataType, typename ReceivedDataType>
MessageID Processor::callAsync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& process)
{
template<typename SentDataType, typename ReceivedDataType>
MessageID Processor::callAsyncInternal(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& process)
{
template<typename SentDataType, typename ReceivedDataType>
std::shared_ptr<ReceivedDataType> Processor::callSync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
unsigned int timeoutMS)
{
template<typename SentDataType>
void Processor::signalInternal(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data)
{
auto requestPtr = SignalRequest::create<SentDataType>(methodID, peerID, data);
RemovePeerRequest(const RemovePeerRequest&) = delete;
RemovePeerRequest& operator=(const RemovePeerRequest&) = delete;
- RemovePeerRequest(const PeerID peerID,
+ RemovePeerRequest(const PeerID& peerID,
const std::shared_ptr<std::condition_variable>& conditionPtr)
: peerID(peerID),
conditionPtr(conditionPtr)
mExceptionPtr(nullptr)
{}
- ResultBuilder(const std::exception_ptr& exceptionPtr)
+ explicit ResultBuilder(const std::exception_ptr& exceptionPtr)
: mData(nullptr),
mExceptionPtr(exceptionPtr)
{}
- ResultBuilder(const std::shared_ptr<void>& data)
+ explicit ResultBuilder(const std::shared_ptr<void>& data)
: mData(data),
mExceptionPtr(nullptr)
} // namespace ipc
#endif // COMMON_IPC_RESULT_BUILDER_HPP
-
-
-
-
-
-
SendResultRequest& operator=(const SendResultRequest&) = delete;
SendResultRequest(const MethodID methodID,
- const PeerID peerID,
- const MessageID messageID,
+ const PeerID& peerID,
+ const MessageID& messageID,
const std::shared_ptr<void>& data)
: methodID(methodID),
peerID(peerID),
template<typename SentDataType>
static std::shared_ptr<SignalRequest> create(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data);
MethodID methodID;
SerializeCallback serialize;
private:
- SignalRequest(const MethodID methodID, const PeerID peerID)
+ SignalRequest(const MethodID methodID, const PeerID& peerID)
: methodID(methodID),
peerID(peerID),
messageID(getNextMessageID())
template<typename SentDataType>
std::shared_ptr<SignalRequest> SignalRequest::create(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data)
{
std::shared_ptr<SignalRequest> request(new SignalRequest(methodID, peerID));
MethodResult::MethodResult(Processor& processor,
const MethodID methodID,
- const MessageID messageID,
- const PeerID peerID)
+ const MessageID& messageID,
+ const PeerID& peerID)
: mProcessor(processor),
mMethodID(methodID),
mPeerID(peerID),
mProcessor.sendError(mPeerID, mMessageID, code, message);
}
-PeerID MethodResult::getPeerID()
+PeerID MethodResult::getPeerID() const
{
return mPeerID;
}
MethodResult(Processor& processor,
const MethodID methodID,
- const MessageID messageID,
- const PeerID peerID);
+ const MessageID& messageID,
+ const PeerID& peerID);
template<typename Data>
void setVoid();
void setError(const int code, const std::string& message);
- PeerID getPeerID();
+ PeerID getPeerID() const;
private:
Processor& mProcessor;
*/
template<typename SentDataType, typename ReceivedDataType>
std::shared_ptr<ReceivedDataType> callSync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
unsigned int timeoutMS = 5000);
*/
template<typename SentDataType, typename ReceivedDataType>
void callAsync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& resultCallback);
template<typename SentDataType, typename ReceivedDataType>
std::shared_ptr<ReceivedDataType> Service::callSync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
unsigned int timeoutMS)
{
template<typename SentDataType, typename ReceivedDataType>
void Service::callAsync(const MethodID methodID,
- const PeerID peerID,
+ const PeerID& peerID,
const std::shared_ptr<SentDataType>& data,
const typename ResultHandler<ReceivedDataType>::type& resultCallback)
{
* Base class for exceptions in lxcpp
*/
struct Exception: public std::runtime_error {
- Exception(const std::string& message)
+ explicit Exception(const std::string& message)
: std::runtime_error(message) {}
};
struct NotImplementedException: public Exception {
- NotImplementedException(const std::string& message = "Functionality not yet implemented")
+ explicit NotImplementedException(const std::string& message = "Functionality not yet implemented")
: Exception(message) {}
};
struct ProcessSetupException: public Exception {
- ProcessSetupException(const std::string& message = "Error while setting up a process")
+ explicit ProcessSetupException(const std::string& message = "Error while setting up a process")
: Exception(message) {}
};
struct FileSystemSetupException: public Exception {
- FileSystemSetupException(const std::string& message = "Error during a file system operation")
+ explicit FileSystemSetupException(const std::string& message = "Error during a file system operation")
: Exception(message) {}
};
struct EnvironmentSetupException: public Exception {
- EnvironmentSetupException(const std::string& message = "Error during handling environment variables")
+ explicit EnvironmentSetupException(const std::string& message = "Error during handling environment variables")
: Exception(message) {}
};
struct CredentialSetupException: public Exception {
- CredentialSetupException(const std::string& message = "Error during handling environment variables")
+ explicit CredentialSetupException(const std::string& message = "Error during handling environment variables")
: Exception(message) {}
};
struct CapabilitySetupException: public Exception {
- CapabilitySetupException(const std::string& message = "Error during a capability operation")
+ explicit CapabilitySetupException(const std::string& message = "Error during a capability operation")
: Exception(message) {}
};
struct BadArgument: public Exception {
- BadArgument(const std::string& message = "Bad argument passed")
+ explicit BadArgument(const std::string& message = "Bad argument passed")
: Exception(message) {}
};
struct NoSuchValue: public Exception {
- NoSuchValue(const std::string& message = "Value not found")
+ explicit NoSuchValue(const std::string& message = "Value not found")
: Exception(message) {}
};
struct NetworkException : public Exception {
- NetworkException (const std::string& message = "Error during setting up a network")
+ explicit NetworkException (const std::string& message = "Error during setting up a network")
: Exception(message) {}
};
struct ConfigureException: public Exception {
- ConfigureException(const std::string& message = "Error while configuring a container")
+ explicit ConfigureException(const std::string& message = "Error while configuring a container")
: Exception(message) {}
};
*/
struct ServerException: public VasumException {
- ServerException(const std::string& error) : VasumException(error) {}
+ explicit ServerException(const std::string& error) : VasumException(error) {}
};
/**
*/
struct ZoneOperationException: public ServerException {
- ZoneOperationException(const std::string& error) : ServerException(error) {}
+ explicit ZoneOperationException(const std::string& error) : ServerException(error) {}
};
/**
*/
struct InvalidZoneIdException : public ServerException {
- InvalidZoneIdException(const std::string& error) : ServerException(error) {}
+ explicit InvalidZoneIdException(const std::string& error) : ServerException(error) {}
};
/**
*/
struct ZoneConnectionException: public ServerException {
- ZoneConnectionException(const std::string& error) : ServerException(error) {}
+ explicit ZoneConnectionException(const std::string& error) : ServerException(error) {}
};
/**
*/
struct HostConnectionException: public ServerException {
- HostConnectionException(const std::string& error) : ServerException(error) {}
+ explicit HostConnectionException(const std::string& error) : ServerException(error) {}
};
/**
*/
struct InputMonitorException: public ServerException {
- InputMonitorException(const std::string& error) : ServerException(error) {}
+ explicit InputMonitorException(const std::string& error) : ServerException(error) {}
};
struct TimeoutException: public InputMonitorException {
- TimeoutException(const std::string& error) : InputMonitorException (error) {}
+ explicit TimeoutException(const std::string& error) : InputMonitorException (error) {}
};
}
} catch (std::runtime_error& e) {
LOGE("Generate config failed: " << e.what());
utils::launchAsRoot(std::bind(removeAllWrapper, zonePathStr));
- throw e;
+ throw;
}
LOGT("Creating new zone");
} catch (std::runtime_error& e) {
LOGE("Creating new zone failed: " << e.what());
utils::launchAsRoot(std::bind(removeAllWrapper, zonePathStr));
- throw e;
+ throw;
}
mDynamicConfig.zoneIds.push_back(id);
OPT+=" -I libs"
OPT+=" -I client"
OPT+=" -I server"
+OPT+=" -I tests/unit_tests"
+OPT+=" -I tests/unit_tests/socket_test_service"
OPT+=" -U__NR_capset"
-cppcheck ${OPT} --template=gcc ./ 1>/dev/null
+cppcheck ${OPT} --template=gcc $@ ./ 1>/dev/null
// public API functions (or write tests to use them all)
unusedFunction:wrapper/wrapper-compatibility.cpp
unusedFunction:wrapper/wrapper.cpp
+unusedFunction:libs/config/kvstore.cpp
+unusedFunction:libs/ipc/internals/processor.cpp
+unusedFunction:server/zones-manager.cpp
+unusedFunction:libs/lxcpp/container-impl.cpp
+unusedFunction:libs/lxcpp/filesystem.cpp
+unusedFunction:libs/lxcpp/network.cpp
+unusedFunction:libs/lxcpp/network-config.cpp
+unusedFunction:client/vasum-client.cpp
+unusedFunction:common/netlink/netlink-message.cpp
+unusedFunction:common/utils/fd-utils.cpp
+unusedFunction:server/zone.cpp
-// lambda not recognized to catch exception (v1.68)
-exceptThrowInNoexecptFunction:client/vasum-client-impl.cpp
+// lambda not recognized to catch exception (v1.69)
+throwInNoexceptFunction:client/vasum-client-impl.cpp
+// complains that all constructors with 1 argument should be explicit
+noExplicitConstructor
+
+// required for C abstraction
+unusedStructMember:common/utils/initctl.cpp
+
+// functions called by external utilities
+unusedFunction:tests/unit_tests/ut.cpp
BOOST_CHECK_EQUAL(recvData->intVal, sentData->intVal);
}
-void testEcho(Service& s, const MethodID methodID, const PeerID peerID)
+void testEcho(Service& s, const MethodID methodID, const PeerID& peerID)
{
std::shared_ptr<SendData> sentData(new SendData(56));
std::shared_ptr<RecvData> recvData = s.callSync<SendData, RecvData>(methodID, peerID, sentData, TIMEOUT);
void signalSubscribe(const DbusConnection::SignalCallback& callback)
{
- mClient->signalSubscribe(callback, isHost() ? api::dbus::BUS_NAME : api::dbus::BUS_NAME);
+ mClient->signalSubscribe(callback, api::dbus::BUS_NAME);
}
void callSwitchToDefault()
interface.c_str(),
method.c_str(),
parameters);
- GVariantPtr result = mClient->callMethod(isHost() ? api::dbus::BUS_NAME :
- api::dbus::BUS_NAME,
- isHost() ? api::dbus::OBJECT_PATH :
- api::dbus::OBJECT_PATH,
- isHost() ? api::dbus::INTERFACE :
- api::dbus::INTERFACE,
+ GVariantPtr result = mClient->callMethod(api::dbus::BUS_NAME,
+ api::dbus::OBJECT_PATH,
+ api::dbus::INTERFACE,
api::dbus::METHOD_PROXY_CALL,
packedParameters,
"(v)");
Task(Task&& r) : count(r.count) {}
Task& operator=(const Task&) = delete;
Task& operator=(Task&&) = delete;
- void operator() () {}
+ void operator() () const {}
};
*/
struct ZoneDaemonException: public VasumException {
- ZoneDaemonException(const std::string& error) : VasumException(error) {}
+ explicit ZoneDaemonException(const std::string& error) : VasumException(error) {}
};