Compile fixes

This commit is contained in:
Atlante45 2015-07-07 15:51:29 -07:00
parent 1932703fec
commit d496b33ae6
3 changed files with 13 additions and 9 deletions

View file

@ -38,6 +38,7 @@
#include "Node.h"
#include "NLPacket.h"
#include "PacketHeaders.h"
#include "PacketList.h"
#include "UUIDHasher.h"
const int MAX_PACKET_SIZE = 1450;
@ -67,6 +68,7 @@ Q_DECLARE_METATYPE(SharedNodePointer)
using namespace tbb;
typedef std::pair<QUuid, SharedNodePointer> UUIDNodePair;
typedef concurrent_unordered_map<QUuid, SharedNodePointer, UUIDHasher> NodeHash;
using NLPacketList = PacketList<NLPacket>;
typedef quint8 PingType_t;
namespace PingType {
@ -147,8 +149,8 @@ public:
qint64 sendUnreliablePacket(NLPacket& packet, const HifiSockAddr& sockAddr) {};
qint64 sendPacket(NLPacket&& packet, const SharedNodePointer& destinationNode) {};
qint64 sendPacket(NLPacket&& packet, const HifiSockAddr& sockAddr) {};
qint64 sendPacketList(PacketList& packetList, const SharedNodePointer& destinationNode) {};
qint64 sendPacketList(PacketList& packetList, const HifiSockAddr& sockAddr) {};
qint64 sendPacketList(NLPacketList& packetList, const SharedNodePointer& destinationNode) {};
qint64 sendPacketList(NLPacketList& packetList, const HifiSockAddr& sockAddr) {};
void (*linkedDataCreateCallback)(Node *);
@ -173,7 +175,7 @@ public:
int updateNodeWithDataFromPacket(const SharedNodePointer& matchingNode, const QByteArray& packet);
int findNodeAndUpdateWithDataFromPacket(const QByteArray& packet);
unsigned broadcastToNodes(PacketList& packetList, const NodeSet& destinationNodeTypes) {};
unsigned broadcastToNodes(NLPacketList& packetList, const NodeSet& destinationNodeTypes) {};
SharedNodePointer soloNodeOfType(char nodeType);
void getPacketStats(float &packetsPerSecond, float &bytesPerSecond);

View file

@ -19,7 +19,7 @@
/// Storage of not-yet processed inbound, or not yet sent outbound generic UDP network packet
class NetworkPacket {
public:
NetworkPacket() { }
NetworkPacket();
NetworkPacket(const NetworkPacket& packet); // copy constructor
NetworkPacket& operator= (const NetworkPacket& other); // copy assignment

View file

@ -12,7 +12,9 @@
#ifndef hifi_PacketList_h
#define hifi_PacketList_h
#pragma once
#include <QIODevice>
#include "PacketHeaders.h"
template <class T> class PacketList : public QIODevice {
public:
@ -20,7 +22,7 @@ public:
virtual bool isSequential() const { return true; }
void startSegment() { _segmentStartIndex = currentPacket->payload().pos(); }
void startSegment() { _segmentStartIndex = _currentPacket->payload().pos(); }
void endSegment() { _segmentStartIndex = -1; }
void closeCurrentPacket();
@ -28,7 +30,7 @@ public:
void setExtendedHeader(const QByteArray& extendedHeader) { _extendedHeader = extendedHeader; }
protected:
qint64 writeData(const char* data, qint64 maxSize);
qint64 readData(const char* data, qint64 maxSize) { return 0 };
qint64 readData(const char* data, qint64 maxSize) { return 0; };
private:
void createPacketWithExtendedHeader();
@ -40,7 +42,7 @@ private:
int _segmentStartIndex = -1;
QByteArray _extendedHeader = extendedHeader;
}
QByteArray _extendedHeader;
};
#endif // hifi_PacketList_h