Packet class squeleton

This commit is contained in:
Atlante45 2015-07-02 16:15:20 -07:00
parent 2a03f62bf2
commit 3edc29bd4b
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,22 @@
//
// Packet.cpp
//
//
// Created by Clement on 7/2/15.
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "Packet.h"
#include <QByteArray>
std::unique_ptr<Packet> Packet::makePacket() {
return std::unique_ptr<Packet>(new Packet());
}
QByteArray Packet::payload() {
return QByteArray();
}

View file

@ -0,0 +1,31 @@
//
// Packet.h
//
//
// Created by Clement on 7/2/15.
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_Packet_h
#define hifi_Packet_h
#include <memory>
class QByteArray;
class Packet {
std::unique_ptr<Packet> makePacket();
QByteArray payload();
protected:
Packet();
Packet(const Packet&) = delete;
Packet(Packet&&) = delete;
Packet& operator=(const Packet&) = delete;
Packet& operator=(Packet&&) = delete;
};
#endif // hifi_Packet_h