]> git.stg.codes - stg.git/blobdiff - stargazer/plugins/other/radius/config.h
Public interfaces: part 1
[stg.git] / stargazer / plugins / other / radius / config.h
index 0e6547a1f53f71e5e69b16ccfff2bdadd4f1a9cb..cae7226d0c13710a85bcaea1dd5cce2971919c24 100644 (file)
@@ -18,8 +18,7 @@
  *    Author : Maxim Mamontov <faust@stargazer.dp.ua>
  */
 
-#ifndef __STG_RADIUS_CONFIG_H__
-#define __STG_RADIUS_CONFIG_H__
+#pragma once
 
 #include "stg/module_settings.h"
 
 #include <unistd.h> // uid_t, gid_t
 #include <sys/stat.h> // mode_t
 
-class USER;
-
 namespace STG
 {
 
+struct User;
+
 struct Config
 {
     typedef std::map<std::string, std::string> Pairs;
@@ -59,7 +58,7 @@ struct Config
             Authorize() : m_auth(false) {}
             Authorize(const Pairs& cond) : m_auth(true), m_cond(cond) {}
 
-            bool check(const USER& user, const Pairs& radiusData) const;
+            bool check(const User& user, const Pairs& radiusData) const;
             bool exists() const { return m_auth; }
         private:
             bool m_auth;
@@ -68,7 +67,7 @@ struct Config
 
     struct Section
     {
-        Section() {}
+        Section() = default;
         Section(const Pairs& ma, const Pairs& mo, const Pairs& re, ReturnCode code, const Authorize& auth)
             : match(ma), modify(mo), reply(re), returnCode(code), authorize(auth) {}
         Pairs match;
@@ -78,8 +77,8 @@ struct Config
         Authorize authorize;
     };
 
-    Config() {}
-    Config(const MODULE_SETTINGS& settings);
+    Config() = default;
+    Config(const ModuleSettings& settings);
 
     Section autz;
     Section auth;
@@ -102,5 +101,3 @@ struct Config
 };
 
 } // namespace STG
-
-#endif