8 #include "stg/plugin.h"
10 #include "stg/logger.h"
11 #include "configproto.h"
13 extern "C" PLUGIN * GetPlugin();
17 class STG_CONFIG_SETTINGS {
19 STG_CONFIG_SETTINGS() : errorStr(), port(0) {}
20 virtual ~STG_CONFIG_SETTINGS() {}
21 const std::string & GetStrError() const { return errorStr; }
22 int ParseSettings(const MODULE_SETTINGS & s);
23 uint16_t GetPort() const { return port; }
28 //-----------------------------------------------------------------------------
29 class STG_CONFIG :public PLUGIN {
32 virtual ~STG_CONFIG(){};
34 void SetUsers(USERS * u) { users = u; }
35 void SetTariffs(TARIFFS * t) { tariffs = t; }
36 void SetAdmins(ADMINS * a) { admins = a; }
37 void SetStore(STORE * s) { store = s; }
38 void SetStgSettings(const SETTINGS * s) { stgSettings = s; }
39 void SetSettings(const MODULE_SETTINGS & s) { settings = s; }
44 int Reload() { return 0; }
45 bool IsRunning() { return isRunning; }
47 const std::string & GetStrError() const { return errorStr; }
48 const std::string GetVersion() const;
49 uint16_t GetStartPosition() const { return 20; }
50 uint16_t GetStopPosition() const { return 20; }
53 STG_CONFIG(const STG_CONFIG & rvalue);
54 STG_CONFIG & operator=(const STG_CONFIG & rvalue);
56 static void * Run(void *);
58 mutable std::string errorStr;
59 STG_CONFIG_SETTINGS stgConfigSettings;
69 MODULE_SETTINGS settings;
70 const SETTINGS * stgSettings;
72 //-----------------------------------------------------------------------------