mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
Merge remote-tracking branch 'huffman/atp' into atp
This commit is contained in:
commit
191ede4675
2 changed files with 5 additions and 3 deletions
|
@ -11,9 +11,9 @@
|
||||||
|
|
||||||
#include "PacketList.h"
|
#include "PacketList.h"
|
||||||
|
|
||||||
PacketList::PacketList(PacketType::Value packetType, bool isOrdered) :
|
PacketList::PacketList(PacketType::Value packetType) :
|
||||||
_packetType(packetType),
|
_packetType(packetType),
|
||||||
_isOrdered(isOrdered)
|
_isOrdered(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,13 +18,15 @@
|
||||||
|
|
||||||
template <class T> class PacketList : public QIODevice {
|
template <class T> class PacketList : public QIODevice {
|
||||||
public:
|
public:
|
||||||
PacketList(PacketType::Value packetType, bool isOrdered = false);
|
PacketList(PacketType::Value packetType);
|
||||||
|
|
||||||
virtual bool isSequential() const { return true; }
|
virtual bool isSequential() const { return true; }
|
||||||
|
|
||||||
void startSegment() { _segmentStartIndex = _currentPacket->payload().pos(); }
|
void startSegment() { _segmentStartIndex = _currentPacket->payload().pos(); }
|
||||||
void endSegment() { _segmentStartIndex = -1; }
|
void endSegment() { _segmentStartIndex = -1; }
|
||||||
|
|
||||||
|
int getNumPackets() const { return _packets.size() + (_currentPacket ? 1 : 0); }
|
||||||
|
|
||||||
void closeCurrentPacket();
|
void closeCurrentPacket();
|
||||||
|
|
||||||
void setExtendedHeader(const QByteArray& extendedHeader) { _extendedHeader = extendedHeader; }
|
void setExtendedHeader(const QByteArray& extendedHeader) { _extendedHeader = extendedHeader; }
|
||||||
|
|
Loading…
Reference in a new issue