big push
This commit is contained in:
34
include/td/protocol/PacketHandler.h
Normal file
34
include/td/protocol/PacketHandler.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* \file PacketHandler.h
|
||||
* \brief File containing the blitz::protocol::PacketHandler class
|
||||
*/
|
||||
|
||||
#include <td/protocol/Packets.h>
|
||||
#include <td/protocol/PacketVisitor.h>
|
||||
|
||||
namespace td {
|
||||
namespace protocol {
|
||||
|
||||
class PacketDispatcher;
|
||||
|
||||
#define DeclarePacket(PacketName, ...) virtual void Visit(const packets::PacketName&); virtual void HandlePacket(const packets::PacketName&) {}
|
||||
|
||||
/**
|
||||
* \class PacketHandler
|
||||
* \brief Class used to handle packets
|
||||
*/
|
||||
class PacketHandler : public PacketVisitor {
|
||||
public:
|
||||
PacketHandler() {}
|
||||
~PacketHandler() {}
|
||||
|
||||
DeclareAllPacket()
|
||||
|
||||
};
|
||||
|
||||
#undef DeclarePacket
|
||||
|
||||
} // namespace protocol
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user