X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/43203fc1132e402ab5751167ed64196f10f5dedf..c90e905d76aed75379d220478e97fda0d34ec59b:/Server/include/plaqui/server/controlserver.h diff --git a/Server/include/plaqui/server/controlserver.h b/Server/include/plaqui/server/controlserver.h index 8a646c6..25d1224 100644 --- a/Server/include/plaqui/server/controlserver.h +++ b/Server/include/plaqui/server/controlserver.h @@ -28,15 +28,37 @@ #ifndef PLAQUI_CONTROLSERVER_H #define PLAQUI_CONTROLSERVER_H -#include "plaqui/server/serverconnection.h" +#include "plaqui/server/connection.h" +#include "plaqui/server/command.h" +#include "plaqui/server/httpresponse.h" #include +#include namespace PlaQui { namespace Server { /// Conexión para recibir comandos de control para una planta. - class ControlServer: public ServerConnection { + class ControlServer: public Connection { + + + // Tipos. + + public: + + /// Tipo de señal para indicar que se recibió un comando. + typedef SigC::Signal1 SignalCommandReceived; + + + // Atributos. + + private: + + /// Señal para indicar que se recibió un comando. + SignalCommandReceived command_received; + + + // Métodos. protected: @@ -50,7 +72,7 @@ namespace Server { /** * Destructor. */ - virtual ~ControlServer(void) {} + virtual ~ControlServer(void); /** * Constructor. @@ -59,6 +81,16 @@ namespace Server { */ ControlServer(const sockbuf::sockdesc& sd); + /** + * Envia una respuesta. + */ + void send(const HTTPResponse& response); + + /** + * Obtiene la señal que avisa cuando se recibió un comando. + */ + SignalCommandReceived& signal_command_received(void); + }; }