/** @file * @author Edouard DUPIN * @copyright 2016, Edouard DUPIN, all right reserved * @license APACHE v2.0 (see license file) */ #pragma once #include #include namespace appl { class TcpServerInput; class DirectInterface; class RouterInterface; class IOInterface; class GateWay : public eproperty::Interface { uint16_t m_idIncrement; private: ememory::SharedPtr m_routerClient; //!< Interface with the Gateway Front End ememory::SharedPtr m_interfaceNewService; public: eproperty::Value propertyUserName; eproperty::Value propertyRouterIp; eproperty::Value propertyRouterPort; eproperty::Value propertyServiceIp; eproperty::Value propertyServicePort; eproperty::Value propertyServiceMax; public: std::vector> m_listIODirect; //!< List of all service availlable with their specific connection interface std::vector> m_listIO; public: GateWay(); virtual ~GateWay(); void start(); void stop(); //ememory::SharedPtr get(const std::string& _serviceName); std::vector getAllServiceName(); void send(ememory::SharedPtr _data); void newService(enet::Tcp _connection); void cleanIO(); private: void onPropertyChangeClientIp(); void onPropertyChangeClientPort(); void onPropertyChangeClientMax(); void onPropertyChangeServiceIp(); void onPropertyChangeServicePort(); void onPropertyChangeServiceMax(); void onClientConnect(const bool& _value); void onServiceConnect(const bool& _value); }; }