diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-02-08 15:53:45 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-02-08 15:53:45 +0000 |
| commit | 1b7c1982896dba1d38e1fe84ba9660996607f5f9 (patch) | |
| tree | d12047cb37ded1e18d4d5b97844412538beb19ff /src/HttpHeaderProcessor.h | |
| parent | d82e183d346375ac8a58a298a58728be615f947e (diff) | |
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std::
prefix to c++
standard classes.
Included string.h where mem* function are used.
Diffstat (limited to 'src/HttpHeaderProcessor.h')
| -rw-r--r-- | src/HttpHeaderProcessor.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/HttpHeaderProcessor.h b/src/HttpHeaderProcessor.h index 51491602..e0a5dda7 100644 --- a/src/HttpHeaderProcessor.h +++ b/src/HttpHeaderProcessor.h @@ -36,25 +36,29 @@ #define _D_HTTP_HEADER_PROCESSOR_H_ #include "common.h" -#include "HttpHeader.h" +#include "SharedHandle.h" #include <utility> #include <sstream> +namespace aria2 { + +class HttpHeader; + class HttpHeaderProcessor { private: - stringstream strm; + std::stringstream strm; int32_t _limit; void checkHeaderLimit(int32_t incomingLength); public: - HttpHeaderProcessor():_limit(4096) {} + HttpHeaderProcessor(); - ~HttpHeaderProcessor() {} + ~HttpHeaderProcessor(); void update(const char* data, int32_t length); - void update(const string& data); + void update(const std::string& data); /** * Returns true if end of header is reached. @@ -66,9 +70,9 @@ public: */ int32_t getPutBackDataLength() const; - pair<string, HttpHeaderHandle> getHttpStatusHeader(); + std::pair<std::string, SharedHandle<HttpHeader> > getHttpStatusHeader(); - string getHeaderString() const; + std::string getHeaderString() const; void clear(); @@ -80,4 +84,6 @@ public: typedef SharedHandle<HttpHeaderProcessor> HttpHeaderProcessorHandle; +} // namespace aria2 + #endif // _D_HTTP_HEADER_PROCESSOR_H_ |
