-
-#include "noncopyable.h"
-#include "os_int.h"
-#include "admins.h"
-#include "users.h"
-#include "tariffs.h"
-
-class TRAFFCOUNTER;
-class SETTINGS;
-class STORE;
-class MODULE_SETTINGS;
-
-class PLUGIN : private NONCOPYABLE {
-public:
- virtual void SetUsers(USERS * u) = 0;
- virtual void SetTariffs(TARIFFS * t) = 0;
- virtual void SetAdmins(ADMINS * a) = 0;
- virtual void SetTraffcounter(TRAFFCOUNTER * tc) = 0;
- virtual void SetStore(STORE * st) = 0;
- virtual void SetStgSettings(const SETTINGS * s) = 0;
- virtual void SetSettings(const MODULE_SETTINGS & s) = 0;
- virtual int ParseSettings() = 0;
-
- virtual int Start() = 0;
- virtual int Stop() = 0;
- virtual int Reload() = 0;
- virtual bool IsRunning() = 0;
- virtual const std::string & GetStrError() const = 0;
- virtual const std::string GetVersion() const = 0;
- virtual uint16_t GetStartPosition() const = 0;
- virtual uint16_t GetStopPosition() const = 0;
+#include <cstdint>
+
+namespace STG
+{
+
+struct TraffCounter;
+struct Settings;
+struct Store;
+struct Admins;
+struct Users;
+struct Tariffs;
+struct Services;
+struct Corporations;
+struct ModuleSettings;
+
+struct Plugin {
+ virtual ~Plugin() = default;
+
+ virtual void SetUsers(Users*) {}
+ virtual void SetTariffs(Tariffs*) {}
+ virtual void SetAdmins(Admins*) {}
+ virtual void SetServices(Services*) {}
+ virtual void SetCorporations(Corporations*) {}
+ virtual void SetTraffcounter(TraffCounter*) {}
+ virtual void SetStore(Store*) {}
+ virtual void SetStgSettings(const Settings*) {}
+ virtual void SetSettings(const ModuleSettings&) {}
+ virtual int ParseSettings() = 0;
+
+ virtual int Start() = 0;
+ virtual int Stop() = 0;
+ virtual int Reload(const ModuleSettings&) = 0;
+ virtual bool IsRunning() = 0;
+ virtual const std::string& GetStrError() const = 0;
+ virtual std::string GetVersion() const = 0;
+ virtual uint16_t GetStartPosition() const = 0;
+ virtual uint16_t GetStopPosition() const = 0;