Quellcode durchsuchen

2008-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Added "Firefox3 Cookie" feature to FeatureConfig
	* src/FeatureConfig.cc
	* src/FeatureConfig.h
	* test/FeatureConfigTest.cc
Tatsuhiro Tsujikawa vor 17 Jahren
Ursprung
Commit
9fc8b15736
4 geänderte Dateien mit 20 neuen und 0 gelöschten Zeilen
  1. 7 0
      ChangeLog
  2. 8 0
      src/FeatureConfig.cc
  3. 1 0
      src/FeatureConfig.h
  4. 4 0
      test/FeatureConfigTest.cc

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-09-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Added "Firefox3 Cookie" feature to FeatureConfig
+	* src/FeatureConfig.cc
+	* src/FeatureConfig.h
+	* test/FeatureConfigTest.cc
+
 2008-09-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Bump up version number to 0.16.0b

+ 8 - 0
src/FeatureConfig.cc

@@ -48,6 +48,7 @@ const std::string FeatureConfig::FEATURE_METALINK("Metalink");
 const std::string FeatureConfig::FEATURE_MESSAGE_DIGEST("Message Digest");
 const std::string FeatureConfig::FEATURE_ASYNC_DNS("Async DNS");
 const std::string FeatureConfig::FEATURE_GZIP("GZip");
+const std::string FeatureConfig::FEATURE_FIREFOX3_COOKIE("Firefox3 Cookie");
 
 #ifdef ENABLE_SSL
 # define HTTPS_ENABLED true
@@ -85,6 +86,12 @@ const std::string FeatureConfig::FEATURE_GZIP("GZip");
 # define GZIP_ENABLED false
 #endif // !HAVE_LIBZ
 
+#ifdef HAVE_SQLITE3
+# define FIREFOX3_COOKIE_ENABLED true
+#else // !HAVE_SQLITE3
+# define FIREFOX3_COOKIE_ENABLED false
+#endif // !HAVE_SQLITE3
+
 FeatureConfig::FeatureConfig() {
   _defaultPorts.insert(PortMap::value_type(Request::PROTO_HTTP, 80));
   _defaultPorts.insert(PortMap::value_type(Request::PROTO_HTTPS, 443));
@@ -97,6 +104,7 @@ FeatureConfig::FeatureConfig() {
     FeatureMap::value_type(FEATURE_MESSAGE_DIGEST, MESSAGE_DIGEST_ENABLED),
     FeatureMap::value_type(FEATURE_ASYNC_DNS, ASYNC_DNS_ENABLED),
     FeatureMap::value_type(FEATURE_GZIP, GZIP_ENABLED),
+    FeatureMap::value_type(FEATURE_FIREFOX3_COOKIE, FIREFOX3_COOKIE_ENABLED),
   };
 
   _features.insert(&featureArray[0], &featureArray[arrayLength(featureArray)]);

+ 1 - 0
src/FeatureConfig.h

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

+ 4 - 0
test/FeatureConfigTest.cc

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