Base interface for the messages themselves, allowing to serialize/deserialize them.
#include <SyncProtocol.hpp>
|
virtual SyncProtocol::SyncMessageType | getMessageType () const =0 |
| Subclasses must return the message type this message represents.
|
|
qint64 | createFullMessage (QByteArray &target) const |
| Writes a full message (with header) to the specified byte array. More...
|
|
virtual void | serialize (QDataStream &stream) const |
| Subclasses should override this to serialize their contents to the data stream. More...
|
|
virtual bool | deserialize (QDataStream &stream, SyncProtocol::tPayloadSize dataSize) |
| Subclasses should override this to load their contents from the data stream. More...
|
|
virtual QDebug | debugOutput (QDebug dbg) const |
| Subclasses can override this to provide proper debug output. More...
|
|
|
static void | writeString (QDataStream &stream, const QString &str) |
|
static QString | readString (QDataStream &stream) |
|
qint64 SyncProtocol::SyncMessage::createFullMessage |
( |
QByteArray & |
target | ) |
const |
Returns the total message size. If zero, the payload is too large for a SyncMessage.
virtual QDebug SyncProtocol::SyncMessage::debugOutput |
( |
QDebug |
dbg | ) |
const |
|
inlinevirtual |
virtual bool SyncProtocol::SyncMessage::deserialize |
( |
QDataStream & |
stream, |
|
|
SyncProtocol::tPayloadSize |
dataSize |
|
) |
| |
|
virtual |
virtual void SyncProtocol::SyncMessage::serialize |
( |
QDataStream & |
stream | ) |
const |
|
virtual |