#include "parser_admins.h"
#include "parser_tariffs.h"
#include "parser_users.h"
+#include "parser_services.h"
#include "parser_message.h"
#include "parser_user_info.h"
#include "parser_auth_by.h"
m_admins(NULL),
m_tariffs(NULL),
m_users(NULL),
+ m_services(NULL),
+ m_corporations(NULL),
m_store(NULL),
m_port(0),
m_bindAddress("0.0.0.0"),
assert(m_admins != NULL);
assert(m_users != NULL);
assert(m_tariffs != NULL);
+ assert(m_services != NULL);
+ assert(m_corporations != NULL);
SP::GET_SERVER_INFO::FACTORY::Register(m_registry, *m_settings, *m_users, *m_tariffs);
SP::CHG_USER::FACTORY::Register(m_registry, *m_users, *m_store, *m_tariffs);
SP::CHECK_USER::FACTORY::Register(m_registry, *m_users);
+ SP::GET_SERVICES::FACTORY::Register(m_registry, *m_services);
+ SP::GET_SERVICE::FACTORY::Register(m_registry, *m_services);
+ SP::ADD_SERVICE::FACTORY::Register(m_registry, *m_services);
+ SP::DEL_SERVICE::FACTORY::Register(m_registry, *m_services);
+ SP::CHG_SERVICE::FACTORY::Register(m_registry, *m_services);
+
SP::SEND_MESSAGE::FACTORY::Register(m_registry, *m_users);
SP::AUTH_BY::FACTORY::Register(m_registry, *m_users);
class ADMINS;
class TARIFFS;
class USERS;
+class SERVICES;
+class CORPORATIONS;
class STORE;
class PLUGIN_LOGGER;
CONFIGPROTO(PLUGIN_LOGGER & l);
~CONFIGPROTO();
- void SetPort(uint16_t port) { m_port = port; }
- void SetBindAddress(const std::string & address) { m_bindAddress = address; }
- void SetSettings(const SETTINGS * settings) { m_settings = settings; }
- void SetAdmins(ADMINS * admins) { m_admins = admins; }
- void SetTariffs(TARIFFS * tariffs) { m_tariffs = tariffs; }
- void SetUsers(USERS * users) { m_users = users; }
- void SetStore(STORE * store) { m_store = store; }
-
- int Prepare();
- int Stop();
+ void SetPort(uint16_t port) { m_port = port; }
+ void SetBindAddress(const std::string & address) { m_bindAddress = address; }
+ void SetSettings(const SETTINGS * settings) { m_settings = settings; }
+ void SetAdmins(ADMINS * admins) { m_admins = admins; }
+ void SetTariffs(TARIFFS * tariffs) { m_tariffs = tariffs; }
+ void SetUsers(USERS * users) { m_users = users; }
+ void SetServices(SERVICES * services) { m_services = services; }
+ void SetCorporations(CORPORATIONS * corporations) { m_corporations = corporations; }
+ void SetStore(STORE * store) { m_store = store; }
+
+ int Prepare();
+ int Stop();
const std::string & GetStrError() const { return m_errorStr; }
- void Run();
+ void Run();
private:
CONFIGPROTO(const CONFIGPROTO & rvalue);
ADMINS * m_admins;
TARIFFS * m_tariffs;
USERS * m_users;
+ SERVICES * m_services;
+ CORPORATIONS * m_corporations;
STORE * m_store;
uint16_t m_port;
void CleanupConns();
void HandleEvents(const fd_set & fds);
void AcceptConnection();
-
- //void WriteLogAccessFailed(uint32_t ip);
};
#endif //CONFIGPROTO_H
void SetUsers(USERS * users) { config.SetUsers(users); }
void SetTariffs(TARIFFS * tariffs) { config.SetTariffs(tariffs); }
void SetAdmins(ADMINS * admins) { config.SetAdmins(admins); }
+ void SetServices(SERVICES * services) { config.SetServices(services); }
+ void SetCorporations(CORPORATIONS * corporations) { config.SetCorporations( corporations); }
void SetStore(STORE * store) { config.SetStore(store); }
void SetStgSettings(const SETTINGS * s) { config.SetSettings(s); }
void SetSettings(const MODULE_SETTINGS & s) { settings = s; }