mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 00:03:16 +02:00
Packet class squeleton
This commit is contained in:
parent
2a03f62bf2
commit
3edc29bd4b
2 changed files with 53 additions and 0 deletions
22
libraries/networking/src/Packet.cpp
Normal file
22
libraries/networking/src/Packet.cpp
Normal 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();
|
||||
}
|
31
libraries/networking/src/Packet.h
Normal file
31
libraries/networking/src/Packet.h
Normal 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
|
Loading…
Reference in a new issue