/* */ #include "DownloadHandlerConstants.h" #include "array_fun.h" namespace aria2 { const char* DownloadHandlerConstants::METALINK_EXTENSIONS[] = { ".metalink", // Metalink3Spec ".meta4" // Metalink4Spec }; const char* DownloadHandlerConstants::METALINK_CONTENT_TYPES[] = { "application/metalink4+xml", // Metalink4Spec "application/metalink+xml" // Metalink3Spec }; const char* DownloadHandlerConstants::BT_EXTENSIONS[] = { ".torrent" }; const char* DownloadHandlerConstants::BT_CONTENT_TYPES[] = { "application/x-bittorrent" }; const std::vector& DownloadHandlerConstants::getMetalinkExtensions() { static const std::vector l (vbegin(METALINK_EXTENSIONS), vend(METALINK_EXTENSIONS)); return l; } const std::vector& DownloadHandlerConstants::getMetalinkContentTypes() { static const std::vector l (vbegin(METALINK_CONTENT_TYPES), vend(METALINK_CONTENT_TYPES)); return l; } const std::vector& DownloadHandlerConstants::getBtExtensions() { static const std::vector l (vbegin(BT_EXTENSIONS), vend(BT_EXTENSIONS)); return l; } const std::vector& DownloadHandlerConstants::getBtContentTypes() { static const std::vector l (vbegin(BT_CONTENT_TYPES), vend(BT_CONTENT_TYPES)); return l; } } // namespace aria2