X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/00cffd5f7c35a915c09d55e6292775e9e01bdeec..ad06ae2e40db5ce588092d90e1e089f527c27f84:/Server/include/plaqui/server/controlserver.h diff --git a/Server/include/plaqui/server/controlserver.h b/Server/include/plaqui/server/controlserver.h index f269e4b..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: @@ -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); + }; }