diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-08-06 22:23:41 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-08-06 22:25:44 +0200 |
| commit | 178bb3a1ceab88f29aa7d0ceb453e76de172fd27 (patch) | |
| tree | 09f830338d5490552ae878152de0f104cb7f6e5b /src/http.hh | |
| parent | 9d586aec3a5615377e389318e97e7d756c970c96 (diff) | |
Add protools, used for getting content out of packages
Only HTTP protocol implemented yet, but with gzip, deflate and bzip2
suport
Diffstat (limited to 'src/http.hh')
| -rw-r--r-- | src/http.hh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/http.hh b/src/http.hh index 9a084d2..2a4353d 100644 --- a/src/http.hh +++ b/src/http.hh @@ -42,6 +42,20 @@ protected: HeaderIterator(HeaderIterator const&) = delete; }; +class HeaderTokenIterator { +public: + virtual ~HeaderTokenIterator() {} + + virtual bool valid() const = 0; + virtual std::string token() const = 0; + virtual bool token_equal(std::string const& name) const = 0; + virtual void next() = 0; + +protected: + HeaderTokenIterator() {} + HeaderTokenIterator(HeaderTokenIterator const&) = delete; +}; + class Http { public: virtual ~Http() {} @@ -55,7 +69,9 @@ public: virtual std::unique_ptr<HeaderIterator> header( std::string const& name) const = 0; std::string first_header(std::string const& name) const; - + virtual std::unique_ptr<HeaderTokenIterator> header_tokens( + std::string const& name) const = 0; + virtual char const* data() const = 0; virtual size_t size() const = 0; protected: |
