X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9701b7ab4dc4cd709ad4dcaa750fc0021f15e231..de9e44e256657beb5160021c7e4fd21d8a9a21d2:/include/stg/plugin.h?ds=sidebyside diff --git a/include/stg/plugin.h b/include/stg/plugin.h index d196b353..d02ff699 100644 --- a/include/stg/plugin.h +++ b/include/stg/plugin.h @@ -29,35 +29,40 @@ #define PLUGIN_H #include +#include #include "noncopyable.h" -#include "os_int.h" #include "admins.h" #include "users.h" #include "tariffs.h" +#include "services.h" +#include "corporations.h" class TRAFFCOUNTER; class SETTINGS; class STORE; -class MODULE_SETTINGS; +struct 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 ~PLUGIN() {} + 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 MODULE_SETTINGS &) {} virtual int ParseSettings() = 0; virtual int Start() = 0; virtual int Stop() = 0; - virtual int Reload() = 0; + virtual int Reload(const MODULE_SETTINGS &) = 0; virtual bool IsRunning() = 0; virtual const std::string & GetStrError() const = 0; - virtual const std::string GetVersion() const = 0; + virtual std::string GetVersion() const = 0; virtual uint16_t GetStartPosition() const = 0; virtual uint16_t GetStopPosition() const = 0; };