]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/include/plaqui/server/command.h
arregle un poquito la and
[z.facultad/75.42/plaqui.git] / Server / include / plaqui / server / command.h
index 019cad2e20c6ae5ae316a421ae0a76f9ee7e53bb..00745573be6309ea6102143d6b495af1fbf6eb64 100644 (file)
@@ -28,7 +28,9 @@
 #ifndef PLAQUI_COMMAND_H
 #define PLAQUI_COMMAND_H
 
+#include "httperror.h"
 #include "httprequest.h"
+#include <socket++/sockstream.h>
 #include <string>
 #include <vector>
 #include <istream>
@@ -80,8 +82,8 @@ namespace Server {
                        /**
                         * Constructor.
                         */
-                       Command(const std::string& target = "",
-                                       const std::string& command = "");
+                       Command(const std::string& _target = "",
+                                       const std::string& _command = "");
 
                        /**
                         * Establece el destino.
@@ -91,7 +93,7 @@ namespace Server {
                        /**
                         * Obtiene el destino.
                         */
-                       const std::string& get_target(void);
+                       const std::string& get_target(void) const;
 
                        /**
                         * Establece el comando.
@@ -101,7 +103,7 @@ namespace Server {
                        /**
                         * Obtiene el comand.
                         */
-                       const std::string& get_command(void);
+                       const std::string& get_command(void) const;
 
                        /**
                         * Establece los argumentos.
@@ -111,24 +113,29 @@ namespace Server {
                        /**
                         * Obtiene los argumentos.
                         */
-                       const Arguments& get_args(void);
+                       const Arguments& get_args(void) const;
 
                        /**
-                        * Agrega un argumentos.
+                        * Agrega un argumento.
                         */
                        void add_arg(const std::string& arg);
 
+                       /**
+                        * Agrega un argumento.
+                        */
+                       void add_arg(const unsigned& arg);
+
                        /**
                         * Obtiene el comando desde un pedido HTTP completo.
                         */
                        friend std::istream& operator>>(std::istream& is,
-                                       Command& command);
+                                       Command& command) throw(HTTPError, sockerr, ios::failure);
 
                        /**
                         * Convierte el comando a un pedido HTTP completo.
                         */
                        friend std::ostream& operator<<(std::ostream& os,
-                                       const Command& command);
+                                       const Command& command) throw(sockerr);
 
        };