diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-22 23:19:41 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-22 23:19:41 +0900 |
| commit | 461a542c5e236a22bb4edba3fae9610df4ba44c6 (patch) | |
| tree | 47898cc7a938ff49866b8889095b651c54e3df3c /src/ContentTypeRequestGroupCriteria.h | |
| parent | 9d294741fd1bb469ed6be4e46af2f6521ce75054 (diff) | |
Rewritten DownloadHandlerConstants
DownloadHandlerConstants was simplified. MIME type handling in Accept
header was also reworked. DownloadContext's metalinkServerContacted_
is replaced with acceptMetalink_ and its boolean value is reverted.
RequestGroup and HttpRequest now do not hold vector of accepting
types. HttpRequest has the flag acceptMetalink_ which will be set by
the same value of DownloadContext::accpetMetalink_ and if it is true,
Metalink MIME types are added to Accept header field.
Diffstat (limited to 'src/ContentTypeRequestGroupCriteria.h')
| -rw-r--r-- | src/ContentTypeRequestGroupCriteria.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/ContentTypeRequestGroupCriteria.h b/src/ContentTypeRequestGroupCriteria.h index 1c8c7c41..67e6be3a 100644 --- a/src/ContentTypeRequestGroupCriteria.h +++ b/src/ContentTypeRequestGroupCriteria.h @@ -44,16 +44,13 @@ namespace aria2 { class ContentTypeRequestGroupCriteria:public RequestGroupCriteria { private: - std::vector<std::string> contentTypes_; - std::vector<std::string> extensions_; + const char** contentTypes_; + const char** extensions_; public: - template<typename InputIterator> - ContentTypeRequestGroupCriteria(InputIterator contentTypeFirst, - InputIterator contentTypeLast, - InputIterator extensionFirst, - InputIterator extensionLast): - contentTypes_(contentTypeFirst, contentTypeLast), - extensions_(extensionFirst, extensionLast) {} + ContentTypeRequestGroupCriteria(const char** contentTypes, + const char** extensions); + + virtual ~ContentTypeRequestGroupCriteria(); virtual bool match(const RequestGroup* requestGroup) const; }; |
