Ferenc Szontágh
2024-06-27 0c428a79ef2379c6c7be29712e83f8c39e43c580
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef COMMAND_H
#define COMMAND_H
 
#include <tser/tser.hpp>
#include <string>
#include <unordered_map>
#include <cstdint>
 
// Define the command types as an enum
enum class CommandType
{
    PluginRegistered = 1000,
    PluginList = 1001
};
 
// Map the CommandType enum to its string representation
static const std::unordered_map<CommandType, std::string> CommandTypeToString = {
    {CommandType::PluginRegistered, "PluginRegistered"},
    {CommandType::PluginList, "PluginList"}};
 
struct Command
{
    DEFINE_SERIALIZABLE(Command, commandType, payload)
    CommandType commandType;
    std::string payload;
};
 
#endif // COMMAND_H