gros push encore
This commit is contained in:
33
include/td/protocol/packet/PacketHandler.h
Normal file
33
include/td/protocol/packet/PacketHandler.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* \file PacketHandler.h
|
||||
* \brief File containing the td::protocol::PacketHandler class
|
||||
*/
|
||||
|
||||
#include <td/protocol/packet/PacketVisitor.h>
|
||||
#include <td/protocol/packet/Packets.h>
|
||||
|
||||
namespace td {
|
||||
namespace protocol {
|
||||
|
||||
#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