-#include <pthread.h>
-#include <unistd.h>
-#include <sys/select.h>
-#include <sys/types.h>
-
-extern "C" PLUGIN * GetPlugin();
-
-class STORE;
-class USERS;
-
-class RADIUS : public AUTH {
-public:
- RADIUS();
- virtual ~RADIUS() {}
-
- void SetUsers(USERS* u) { users = u; }
- void SetStore(STORE* s) { store = s; }
- void SetStgSettings(const SETTINGS*) {}
- void SetSettings(const MODULE_SETTINGS& s) { settings = s; }
- int ParseSettings();
-
- int Start();
- int Stop();
- int Reload() { return 0; }
- bool IsRunning() { return m_running; }
-
- const std::string& GetStrError() const { return m_error; }
- std::string GetVersion() const { return "RADIUS data access plugin v 1.0"; }
- uint16_t GetStartPosition() const { return 30; }
- uint16_t GetStopPosition() const { return 30; }
-
- int SendMessage(const STG_MSG&, uint32_t) const { return 0; }
-
-private:
- RADIUS(const RADIUS & rvalue);
- RADIUS & operator=(const RADIUS & rvalue);
-
- static void* run(void*);
-
- void rumImpl();
- int maxFD() const;
- void buildFDSet(fd_set & fds) const;
- void cleanupConns();
- void handleEvents(const fd_set & fds);
- void acceptConnection();
-
- mutable std::string m_error;
- STG::Config m_config;
-
- MODULE_SETTINGS m_settings;
-
- bool m_running;
- bool m_stopped;
-
- USERS* m_users;
- const STORE* m_store;
-
- pthread_t m_thread;
- pthread_mutex_t m_mutex;
-
- PLUGIN_LOGGER m_logger;
-};
-
-#endif
+namespace STG
+{
+ class RADIUS : public Auth
+ {
+ public:
+ RADIUS();
+
+ int Start() override { return 0; }
+ int Stop() override { return 0; }
+ int Reload(const ModuleSettings & /*ms*/) override { return 0; }
+ bool IsRunning() override { return isRunning; }
+ int ParseSettings() override { return 0; }
+ const std::string & GetStrError() const override { return errorStr; }
+ std::string GetVersion() const override;
+ uint16_t GetStartPosition() const override { return 0; }
+ uint16_t GetStopPosition() const override { return 0; }
+
+ int SendMessage(const Message & msg, uint32_t ip) const override { return 0; }
+
+ private:
+ mutable std::string errorStr;
+ bool isRunning;
+
+ };
+}