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 SetTraffcounter(TRAFFCOUNTER *) {}
39 void SetStgSettings(const SETTINGS * s) { stgConfigSettings = s; }
40 void SetSettings(const MODULE_SETTINGS & s) { settings = s; }
45 int Reload() { return 0; }
46 bool IsRunning() { return running; }
48 const string & GetStrError() const { return errorStr; }
49 string GetVersion() const;
50 uint16_t GetStartPosition() const;
51 uint16_t GetStopPosition() const;
54 static void * Run(void *);
56 bool PrepareNetwork();
57 bool FinalizeNetwork();
58 void AcceptConnection();
60 mutable string errorStr;
61 STG_CONFIG_SETTINGS stgConfigSettings;
70 MODULE_SETTINGS settings;
71 const SETTINGS * stgSettings;
73 std::list<ConnectionThread *> connections;
77 //-----------------------------------------------------------------------------