diff options
Diffstat (limited to 'saprotocol.h')
-rw-r--r-- | saprotocol.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/saprotocol.h b/saprotocol.h index 8d78dc4..68434c1 100644 --- a/saprotocol.h +++ b/saprotocol.h @@ -93,15 +93,22 @@ public: static QByteArray packFrame(const Frame& frame); static QByteArray packFrame(quint16 sessionId, const QByteArray &data, FrameType type = FrameData); + enum FragmentStatus { + FragmentNone = 0, + FragmentMiddle = 1, + FragmentLast = 3 + }; + struct DataFrame { bool withSeqNum; // (not actually present in frame) - // The following fields are only present if "withSeqNum": - quint16 seqNum; // Monotonically increasing, but only for certain sessions... - quint8 unk_1; // No idea, seems to be always 0 + // The following field is only present if "withSeqNum": + quint16 seqNum; // Monotonically increasing + bool withFragStatus; // (not actually present in frame) + FragmentStatus fragStatus; QByteArray data; }; - static DataFrame unpackDataFrame(const QByteArray &data, bool withSeqNum); + static DataFrame unpackDataFrame(const QByteArray &data, bool withSeqNum, bool withFragStatus); static QByteArray packDataFrame(const DataFrame& frame); enum ControlFrameType { |