33 lines
837 B
C++
33 lines
837 B
C++
#pragma once
|
|
|
|
/**
|
|
* \file CommandHandler.h
|
|
* \brief File containing the td::protocol::CommandHandler class
|
|
*/
|
|
|
|
#include <td/protocol/command/CommandVisitor.h>
|
|
#include <td/protocol/command/Commands.h>
|
|
|
|
namespace td {
|
|
namespace protocol {
|
|
|
|
#define DeclareCommand(CommandName, ...) \
|
|
virtual void Visit(const commands::CommandName&); \
|
|
virtual void HandleCommand(const commands::CommandName&) {}
|
|
|
|
/**
|
|
* \class CommandHandler
|
|
* \brief Class used to handle packets
|
|
*/
|
|
class CommandHandler : public CommandVisitor {
|
|
public:
|
|
CommandHandler() {}
|
|
~CommandHandler() {}
|
|
|
|
DeclareAllCommand()
|
|
};
|
|
|
|
#undef DeclareCommand
|
|
|
|
} // namespace protocol
|
|
} // namespace td
|