8 #include "stg/plugin.h"
10 #include "configproto.h"
12 extern "C" PLUGIN * GetPlugin();
16 class STG_CONFIG_SETTINGS {
18 STG_CONFIG_SETTINGS() : errorStr(), port(0) {}
19 virtual ~STG_CONFIG_SETTINGS() {}
20 const std::string & GetStrError() const { return errorStr; }
21 int ParseSettings(const MODULE_SETTINGS & s);
22 uint16_t GetPort() const { return port; }
27 //-----------------------------------------------------------------------------
28 class STG_CONFIG :public PLUGIN {
31 virtual ~STG_CONFIG(){};
33 void SetUsers(USERS * u) { users = u; }
34 void SetTariffs(TARIFFS * t) { tariffs = t; }
35 void SetAdmins(ADMINS * a) { admins = a; }
36 void SetStore(STORE * s) { store = s; }
37 void SetStgSettings(const SETTINGS * s) { stgSettings = s; }
38 void SetSettings(const MODULE_SETTINGS & s) { settings = s; }
43 int Reload() { return 0; }
44 bool IsRunning() { return isRunning; }
46 const std::string & GetStrError() const { return errorStr; }
47 const std::string GetVersion() const;
48 uint16_t GetStartPosition() const { return 20; }
49 uint16_t GetStopPosition() const { return 20; }
52 STG_CONFIG(const STG_CONFIG & rvalue);
53 STG_CONFIG & operator=(const STG_CONFIG & rvalue);
55 static void * Run(void *);
57 mutable std::string errorStr;
58 STG_CONFIG_SETTINGS stgConfigSettings;
67 MODULE_SETTINGS settings;
68 const SETTINGS * stgSettings;
70 //-----------------------------------------------------------------------------