/* */ #ifndef D_METALINK_RESOURCE_H #define D_METALINK_RESOURCE_H #include "common.h" #include namespace aria2 { class MetalinkResource { public: enum TYPE { TYPE_FTP = 0, TYPE_HTTP, TYPE_HTTPS, TYPE_BITTORRENT, TYPE_NOT_SUPPORTED, TYPE_UNKNOWN }; static std::string type2String[]; public: std::string url; TYPE type; std::string location; int priority; int maxConnections; // Metalink3Spec public: MetalinkResource(); ~MetalinkResource(); // Don't allow copying MetalinkResource(const MetalinkResource&); MetalinkResource& operator=(const MetalinkResource&); static const std::string& getTypeString(TYPE type) { return type2String[type]; } static int getLowestPriority() { return 999999; } }; } // namespace aria2 #endif // D_METALINK_RESOURCE_H