Mercurial > archived > louis > epitech > zia-api
view include/handler/IHandler.hpp @ 46:dad671a5f028
Corrections de typos, d'orthograffe et de formulations.
author | David Pineau <dav.pineau@gmail.com> |
---|---|
date | Mon, 22 Mar 2010 17:39:10 +0100 |
parents | 7c8cd74023ce |
children | e16869cd9773 |
line wrap: on
line source
#ifndef __ZIA_API_IHANDLER_HPP_ # define __ZIA_API_IHANDLER_HPP_ # include "http/ITransaction.hpp" namespace zia { namespace api { namespace handler { /** * @brief Identify a connection point in the server. */ enum EHook { NetworkModifier, /**< Hook to replace read/write/accept function. (INetworkHandler) */ RequestHeaderModifier, /**< Hook to modify the request's header. (IHeaderHandler) */ RequestBodyModifier, /**< Hook to modify the request's body. (IBodyHandler) */ ResponseProcessor, /**< Hook for content generation. (IBodyHandler) */ ResponseHeaderModifier, /**< Hook to modify the response's header. (IHeaderHandler) */ ResponseBodyModifier /**< Hook to modify the response's body. (IBodyHandler) */ }; /** * @brief Identify the values that each handler can return. */ enum ECode { Ok, /**< It works !*/ Decline, /**< No treatment performed */ ClientError, /**< Client error, module must have set the correct error code in the response headers. */ ServerError /**< Server error, module must have set the correct error code in the response headers. */ }; /** * @brief Interface which all handlers have to respect. */ class IHandler { public: virtual ~IHandler(void) { } /** * @brief Get where the hook has to be called. * * @return EHook which represents the location of the hook * where the handler should be added. */ virtual EHook getHook(void) const = 0; }; }; }; }; #endif /* ! __ZIA_API_IHANDLER_HPP_ */