diff --git a/daemon/devicelinks/loopbackdevicelink.cpp b/daemon/devicelinks/loopbackdevicelink.cpp index 4c46b67d7..92d5eacc0 100644 --- a/daemon/devicelinks/loopbackdevicelink.cpp +++ b/daemon/devicelinks/loopbackdevicelink.cpp @@ -27,3 +27,13 @@ LoopbackDeviceLink::LoopbackDeviceLink(const QString& deviceId, LoopbackLinkProv { } + +bool LoopbackDeviceLink::sendPackage(const NetworkPackage& toSend) const +{ + NetworkPackage toReceive(""); + NetworkPackage::unserialize(toSend.serialize(), &toReceive); + + Q_EMIT receivedPackage(toReceive); + + return true; +} diff --git a/daemon/devicelinks/loopbackdevicelink.h b/daemon/devicelinks/loopbackdevicelink.h index 07307cd2d..209b52f05 100644 --- a/daemon/devicelinks/loopbackdevicelink.h +++ b/daemon/devicelinks/loopbackdevicelink.h @@ -31,10 +31,7 @@ class LoopbackDeviceLink public: LoopbackDeviceLink(const QString& d, LoopbackLinkProvider* a); - bool sendPackage(const NetworkPackage& np) const { - Q_EMIT receivedPackage(np); - return true; - } + bool sendPackage(const NetworkPackage& np) const; };