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/IPC.h | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/IPC.h b/src/IPC.h
index e77787d..7675276 100644
--- a/src/IPC.h
+++ b/src/IPC.h
@@ -1,26 +1,32 @@
#ifndef IPC_H
#define IPC_H
-#include <msgpack.h>
-#include <optional>
#include <queue>
#include <mutex>
#include <condition_variable>
-#include "Command.h"
-#include "PluginInterface.h"
+#include <memory>
+#include <optional>
+#include "tser/tser.hpp"
+#include "Serialize.h"
+#include "PluginInterface.h" // Include your IPlugin interface header
+#include "Command.h" // Include your Command structure header
+#include <glog/logging.h>
-class IPC {
+class IPC
+{
public:
IPC();
+ ~IPC();
+
void registerHandler(std::shared_ptr<IPlugin> handler);
- void sendMessage(const Command& cmd);
+ void sendMessage(const Command &cmd);
std::optional<Command> receiveMessage();
private:
- std::queue<Command> messageQueue;
+ std::queue<std::string> messageQueue;
+ std::vector<std::shared_ptr<IPlugin>> handlers;
std::mutex queueMutex;
std::condition_variable queueCondVar;
- std::vector<std::shared_ptr<IPlugin>> handlers;
};
#endif // IPC_H
--
Gitblit v1.9.3