view include/handler/IBodyHandler.hpp @ 41:7c8cd74023ce

Rework file layout, fix build, add README and SUPPORT
author Louis Opter <kalessin@kalessin.fr>
date Mon, 22 Mar 2010 02:08:24 +0100
parents src/include/handler/IBodyHandler.hpp@a396ce2684cd
children dad671a5f028
line wrap: on
line source

#ifndef __ZIA_API_HANDLER_IBODYHANDLER_HPP__
# define __ZIA_API_HANDLER_IBODYHANDLER_HPP__

# include <iostream>

# include "http/ITransaction.hpp"
# include "handler/IHandler.hpp"

namespace       zia
{
    namespace       api
    {
        namespace       handler
        {
            /**
             * @brief Interface for handlers which will interact with the
             * client by reading the client's socket or writing in client
             * socket.
             */
            class   IBodyHandler : public IHandler
            {
            public:
                virtual ~IBodyHandler(void) { }

                /**
                 * @brief Called by the server.
                 *
                 * @param [in] transac The transation associated with streams.
                 * @param [in] is the Input stream.
                 * @param [in] os the Output stream.
                 *
                 * @return An ECode.
                 *
                 * @see ITransaction
                 * @see ECode
                 */
                virtual ECode   operator()(zia::api::http::ITransaction & transac, std::istream & is, std::ostream & os) = 0;
            };
        };
    };
};

#endif	/* ! __ZIA_API_HANDLER_IBODYHANDLER_HPP__ */