提交 41ffc8191447d176e8c75cfca7c05d994bed6e0e

作者 LJH 李佳桓
1 个父辈 20efbc6a

add

正在显示 1 个修改的文件 包含 47 行增加0 行删除
  1 +/*
  2 + * Copyright 2007 Stephen Liu
  3 + * For license terms, see the file COPYING along with this library.
  4 + */
  5 +
  6 +#ifndef __sphttp_hpp__
  7 +#define __sphttp_hpp__
  8 +
  9 +#include "sphandler.hpp"
  10 +#include "spmsgdecoder.hpp"
  11 +
  12 +class SP_HttpRequest;
  13 +class SP_HttpResponse;
  14 +class SP_HttpMsgParser;
  15 +
  16 +class SP_HttpHandler {
  17 +public:
  18 + virtual ~SP_HttpHandler();
  19 +
  20 + virtual void handle( SP_HttpRequest * request, SP_HttpResponse * response ) = 0;
  21 +
  22 + virtual void error();
  23 +
  24 + virtual void timeout();
  25 +};
  26 +
  27 +class SP_HttpHandlerFactory {
  28 +public:
  29 + virtual ~SP_HttpHandlerFactory();
  30 +
  31 + virtual SP_HttpHandler * create() const = 0;
  32 +};
  33 +
  34 +class SP_HttpHandlerAdapterFactory : public SP_HandlerFactory {
  35 +public:
  36 + SP_HttpHandlerAdapterFactory( SP_HttpHandlerFactory * factory );
  37 +
  38 + virtual ~SP_HttpHandlerAdapterFactory();
  39 +
  40 + virtual SP_Handler * create() const;
  41 +
  42 +private:
  43 + SP_HttpHandlerFactory * mFactory;
  44 +};
  45 +
  46 +#endif
  47 +
... ...
注册登录 后发表评论