From 920507bff803647c79dfce27c4c265b2caee7f8d Mon Sep 17 00:00:00 2001
From: Ferenc Szontágh <szf@fsociety.hu>
Date: Thu, 27 Jun 2024 21:04:53 +0000
Subject: [PATCH] some refactor, addedd google loggin', corrected plugin handling

---
 src/Command.h |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/Command.h b/src/Command.h
index 8a1b474..e1bac29 100644
--- a/src/Command.h
+++ b/src/Command.h
@@ -1,30 +1,28 @@
 #ifndef COMMAND_H
 #define COMMAND_H
 
-#include <serio/serio.h>
+#include <tser/tser.hpp>
 #include <string>
 #include <unordered_map>
+#include <cstdint>
 
 // Define the command types as an enum
-enum class CommandType {
+enum class CommandType
+{
     PluginRegistered = 1000,
     PluginList = 1001
 };
-SERIO_REGISTER(CommandType::PluginRegistered, CommandType::PluginList)
 
 // Map the CommandType enum to its string representation
 static const std::unordered_map<CommandType, std::string> CommandTypeToString = {
     {CommandType::PluginRegistered, "PluginRegistered"},
-    {CommandType::PluginList, "PluginList"}
-};
+    {CommandType::PluginList, "PluginList"}};
 
-
-
-struct Command {
+struct Command
+{
+    DEFINE_SERIALIZABLE(Command, commandType, payload)
     CommandType commandType;
     std::string payload;
-
-    SERIO_REGISTER(commandType, payload);
 };
 
-#endif // COMMAND_H
+#endif // COMMAND_H
\ No newline at end of file

--
Gitblit v1.9.3