Commit 4eb5dda9 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

LoopbackDevice unserializes and serializes

This way the loopback backend is more similar to regular backends
parent 0f2ec417
......@@ -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;
......@@ -31,10 +31,7 @@ class LoopbackDeviceLink
LoopbackDeviceLink(const QString& d, LoopbackLinkProvider* a);
bool sendPackage(const NetworkPackage& np) const {
Q_EMIT receivedPackage(np);
return true;
bool sendPackage(const NetworkPackage& np) const;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment