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
|
|