]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/radius/radius.h
Radius. (#11)
[stg.git] / projects / stargazer / plugins / other / radius / radius.h
index 8eedace11e83cdb822674b4564b9416f920b1c1f..17f8ea4e338aca808d305f71ca45923c7379cd7b 100644 (file)
@@ -5,8 +5,11 @@
 #include "stg/module_settings.h"
 #include "stg/subscriptions.h"
 #include "stg/logger.h"
+#include "server.h"
 
+#include <boost/asio.hpp>
 #include <string>
+#include <memory>
 #include <mutex>
 #include <jthread.hpp>
 #include <cstdint> //uint8_t, uint32_t
@@ -15,6 +18,8 @@ namespace STG
 {
     struct Settings;
 
+    class Users;
+
     class RAD_SETTINGS
     {
         public:
@@ -41,6 +46,7 @@ namespace STG
             RADIUS(const RADIUS&) = delete;
             RADIUS& operator=(const RADIUS&) = delete;
 
+            void SetUsers(Users* u) { m_users = u; }
             void SetSettings(const ModuleSettings & s) override { m_settings = s; }
             int ParseSettings() override;
 
@@ -61,6 +67,7 @@ namespace STG
         private:
             std::mutex m_mutex;
 
+            boost::asio::io_service m_ioService;
             int Run(std::stop_token token);
 
             mutable std::string m_errorStr;
@@ -70,7 +77,9 @@ namespace STG
             bool m_running;
 
             std::jthread m_thread;
-
+            Users* m_users;
             PluginLogger m_logger;
+
+            std::unique_ptr<Server> m_server;
     };
 }