2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Added GZip to `Enabled Features' list.
	* src/FeatureConfig.cc
	* src/FeatureConfig.h
	* test/FeatureConfigTest.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-07-22 16:05:02 +00:00
parent ec395b6a9c
commit 3e4b748412
4 changed files with 31 additions and 11 deletions

View File

@ -1,3 +1,10 @@
2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added GZip to `Enabled Features' list.
* src/FeatureConfig.cc
* src/FeatureConfig.h
* test/FeatureConfigTest.cc
2008-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> 2008-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now SegmentMan::findSlowerSegmentEntry() picks up the segment for which Now SegmentMan::findSlowerSegmentEntry() picks up the segment for which

View File

@ -47,36 +47,43 @@ const std::string FeatureConfig::FEATURE_BITTORRENT("BitTorrent");
const std::string FeatureConfig::FEATURE_METALINK("Metalink"); const std::string FeatureConfig::FEATURE_METALINK("Metalink");
const std::string FeatureConfig::FEATURE_MESSAGE_DIGEST("Message Digest"); const std::string FeatureConfig::FEATURE_MESSAGE_DIGEST("Message Digest");
const std::string FeatureConfig::FEATURE_ASYNC_DNS("Async DNS"); const std::string FeatureConfig::FEATURE_ASYNC_DNS("Async DNS");
const std::string FeatureConfig::FEATURE_GZIP("GZip");
#ifdef ENABLE_SSL #ifdef ENABLE_SSL
# define HTTPS_ENABLED true # define HTTPS_ENABLED true
#else #else // !ENABLE_SSL
# define HTTPS_ENABLED false # define HTTPS_ENABLED false
#endif // ENABLE_SSL #endif // !ENABLE_SSL
#ifdef ENABLE_BITTORRENT #ifdef ENABLE_BITTORRENT
# define BITTORRENT_ENABLED true # define BITTORRENT_ENABLED true
#else #else // !ENABLE_BITTORRENT
# define BITTORRENT_ENABLED false # define BITTORRENT_ENABLED false
#endif // ENABLE_BITTORRENT #endif // !ENABLE_BITTORRENT
#ifdef ENABLE_METALINK #ifdef ENABLE_METALINK
# define METALINK_ENABLED true # define METALINK_ENABLED true
#else #else // !ENABLE_METALINK
# define METALINK_ENABLED false # define METALINK_ENABLED false
#endif // ENABLE_METALINK #endif // !ENABLE_METALINK
#ifdef ENABLE_MESSAGE_DIGEST #ifdef ENABLE_MESSAGE_DIGEST
# define MESSAGE_DIGEST_ENABLED true # define MESSAGE_DIGEST_ENABLED true
#else #else // !ENABLE_MESSAGE_DIGEST
# define MESSAGE_DIGEST_ENABLED false # define MESSAGE_DIGEST_ENABLED false
#endif // ENABLE_MESSAGE_DIGEST #endif // !ENABLE_MESSAGE_DIGEST
#ifdef ENABLE_ASYNC_DNS #ifdef ENABLE_ASYNC_DNS
# define ASYNC_DNS_ENABLED true # define ASYNC_DNS_ENABLED true
#else #else // !ENABLE_ASYNC_DNS
# define ASYNC_DNS_ENABLED false # define ASYNC_DNS_ENABLED false
#endif // ENABLE_ASYNC_DNS #endif // !ENABLE_ASYNC_DNS
#ifdef HAVE_LIBZ
# define GZIP_ENABLED true
#else // !HAVE_LIBZ
# define GZIP_ENABLED false
#endif // !HAVE_LIBZ
FeatureConfig::FeatureConfig() { FeatureConfig::FeatureConfig() {
_defaultPorts.insert(PortMap::value_type(Request::PROTO_HTTP, 80)); _defaultPorts.insert(PortMap::value_type(Request::PROTO_HTTP, 80));
@ -88,7 +95,8 @@ FeatureConfig::FeatureConfig() {
FeatureMap::value_type(FEATURE_BITTORRENT, BITTORRENT_ENABLED), FeatureMap::value_type(FEATURE_BITTORRENT, BITTORRENT_ENABLED),
FeatureMap::value_type(FEATURE_METALINK, METALINK_ENABLED), FeatureMap::value_type(FEATURE_METALINK, METALINK_ENABLED),
FeatureMap::value_type(FEATURE_MESSAGE_DIGEST, MESSAGE_DIGEST_ENABLED), FeatureMap::value_type(FEATURE_MESSAGE_DIGEST, MESSAGE_DIGEST_ENABLED),
FeatureMap::value_type(FEATURE_ASYNC_DNS, ASYNC_DNS_ENABLED) FeatureMap::value_type(FEATURE_ASYNC_DNS, ASYNC_DNS_ENABLED),
FeatureMap::value_type(FEATURE_GZIP, GZIP_ENABLED),
}; };
_features.insert(&featureArray[0], &featureArray[arrayLength(featureArray)]); _features.insert(&featureArray[0], &featureArray[arrayLength(featureArray)]);

View File

@ -67,6 +67,7 @@ public:
static const std::string FEATURE_METALINK; static const std::string FEATURE_METALINK;
static const std::string FEATURE_MESSAGE_DIGEST; static const std::string FEATURE_MESSAGE_DIGEST;
static const std::string FEATURE_ASYNC_DNS; static const std::string FEATURE_ASYNC_DNS;
static const std::string FEATURE_GZIP;
}; };
} // namespace aria2 } // namespace aria2

View File

@ -58,6 +58,10 @@ void FeatureConfigTest::testFeatureSummary() {
"BitTorrent", "BitTorrent",
#endif // ENABLE_BITTORRENT #endif // ENABLE_BITTORRENT
#ifdef HAVE_LIBZ
"GZip",
#endif // HAVE_LIBZ
#ifdef ENABLE_SSL #ifdef ENABLE_SSL
"HTTPS", "HTTPS",
#endif // ENABLE_SSL #endif // ENABLE_SSL