LoopbackDevice unserializes and serializes
This way the loopback backend is more similar to regular backends
This commit is contained in:
parent
0f2ec417ce
commit
4eb5dda9c1
2 changed files with 11 additions and 4 deletions
|
@ -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
|
|||
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;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue