8 #include "configproto.h"
12 extern "C" PLUGIN * GetPlugin();
16 //-----------------------------------------------------------------------------
17 class STG_CONFIG_SETTINGS {
19 STG_CONFIG_SETTINGS();
20 virtual ~STG_CONFIG_SETTINGS() {}
21 const string & GetStrError() const;
22 int ParseSettings(const MODULE_SETTINGS & s);
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) { stgConfigSettings = s; }
39 void SetSettings(const MODULE_SETTINGS & s) { settings = s; }
44 int Reload() { return 0; }
45 bool IsRunning() { return running; }
47 const string & GetStrError() const { return errorStr; }
48 string GetVersion() const;
49 uint16_t GetStartPosition() const;
50 uint16_t GetStopPosition() const;
53 static void * Run(void *);
55 bool PrepareNetwork();
56 bool FinalizeNetwork();
57 void AcceptConnection();
59 mutable string errorStr;
60 STG_CONFIG_SETTINGS stgConfigSettings;
69 MODULE_SETTINGS settings;
70 const SETTINGS * stgSettings;
72 std::list<ConnectionThread *> connections;
76 //-----------------------------------------------------------------------------