Changeset View
Changeset View
Standalone View
Standalone View
core/backends/loopback/loopbackdevicelink.cpp
Show All 27 Lines | |||||
28 | 28 | | |||
29 | } | 29 | } | ||
30 | 30 | | |||
31 | QString LoopbackDeviceLink::name() | 31 | QString LoopbackDeviceLink::name() | ||
32 | { | 32 | { | ||
33 | return QStringLiteral("LoopbackLink"); | 33 | return QStringLiteral("LoopbackLink"); | ||
34 | } | 34 | } | ||
35 | 35 | | |||
36 | bool LoopbackDeviceLink::sendPackage(NetworkPackage& input) | 36 | bool LoopbackDeviceLink::sendPacket(NetworkPacket& input) | ||
37 | { | 37 | { | ||
38 | NetworkPackage output(QString::null); | 38 | NetworkPacket output(QString::null); | ||
39 | NetworkPackage::unserialize(input.serialize(), &output); | 39 | NetworkPacket::unserialize(input.serialize(), &output); | ||
40 | 40 | | |||
41 | //LoopbackDeviceLink does not need deviceTransferInfo | 41 | //LoopbackDeviceLink does not need deviceTransferInfo | ||
42 | if (input.hasPayload()) { | 42 | if (input.hasPayload()) { | ||
43 | bool b = input.payload()->open(QIODevice::ReadOnly); | 43 | bool b = input.payload()->open(QIODevice::ReadOnly); | ||
44 | Q_ASSERT(b); | 44 | Q_ASSERT(b); | ||
45 | output.setPayload(input.payload(), input.payloadSize()); | 45 | output.setPayload(input.payload(), input.payloadSize()); | ||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | Q_EMIT receivedPackage(output); | 48 | Q_EMIT receivedPacket(output); | ||
49 | 49 | | |||
50 | return true; | 50 | return true; | ||
51 | } | 51 | } | ||
52 | 52 | |