]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/radius/conn.h
Merge branch 'stg-2.409-radius'
[stg.git] / projects / stargazer / plugins / other / radius / conn.h
index 31ebe1dd06322d1a1bf0041fa77eb0df3b077378..96e74300f2f7f8b413570f0b362f3a970415792e 100644 (file)
 #ifndef __STG_SGCONFIG_CONN_H__
 #define __STG_SGCONFIG_CONN_H__
 
-#include "stg/os_int.h"
+#include <boost/scoped_ptr.hpp>
 
-#include <stdexcept>
 #include <string>
 
+class USER;
 class USERS;
+class PLUGIN_LOGGER;
+class RADIUS;
 
 namespace STG
 {
 
+struct Config;
+
 class Conn
 {
     public:
-        struct Error : public std::runtime_error
-        {
-            Error(const std::string& message) : runtime_error(message.c_str()) {}
-        };
-
-        Conn(USERS& users, PLUGIN_LOGGER& logger, const Config& config);
+        Conn(USERS& users, PLUGIN_LOGGER& logger, RADIUS& plugin, const Config& config, int fd, const std::string& remote);
         ~Conn();
 
-        int sock() const { return m_sock; }
+        int sock() const;
 
         bool read();
+        bool tick();
+
+        bool isOk() const;
 
     private:
-        USERS& m_users;
-        PLUGIN_LOGGER& m_logger;
-        const Config& m_config;
+        class Impl;
+        boost::scoped_ptr<Impl> m_impl;
 };
 
 }