mirror of https://github.com/aria2/aria2
Removed MetalinkResource static strings
parent
be77d1394e
commit
8788cae7e3
|
@ -192,15 +192,14 @@ void MetalinkParserController::setTypeOfResource(const std::string& type)
|
|||
if(!tResource_) {
|
||||
return;
|
||||
}
|
||||
if(type == MetalinkResource::FTP) {
|
||||
if(type == "ftp") {
|
||||
tResource_->type = MetalinkResource::TYPE_FTP;
|
||||
} else if(type == MetalinkResource::HTTP) {
|
||||
} else if(type == "http") {
|
||||
tResource_->type = MetalinkResource::TYPE_HTTP;
|
||||
} else if(type == MetalinkResource::HTTPS) {
|
||||
} else if(type == "https") {
|
||||
tResource_->type = MetalinkResource::TYPE_HTTPS;
|
||||
} else if(type == MetalinkResource::BITTORRENT) {
|
||||
tResource_->type = MetalinkResource::TYPE_BITTORRENT;
|
||||
} else if(type == MetalinkResource::TORRENT) { // Metalink4Spec
|
||||
} else if(type == "bittorrent" || type == "torrent") {
|
||||
// "torrent" is Metalink4Spec
|
||||
tResource_->type = MetalinkResource::TYPE_BITTORRENT;
|
||||
} else {
|
||||
tResource_->type = MetalinkResource::TYPE_NOT_SUPPORTED;
|
||||
|
|
|
@ -40,16 +40,6 @@ std::string MetalinkResource::type2String[] = {
|
|||
"ftp", "http", "https", "bittorrent", "not_supported", "unknown"
|
||||
};
|
||||
|
||||
const std::string MetalinkResource::HTTP("http");
|
||||
|
||||
const std::string MetalinkResource::HTTPS("https");
|
||||
|
||||
const std::string MetalinkResource::FTP("ftp");
|
||||
|
||||
const std::string MetalinkResource::BITTORRENT("bittorrent");
|
||||
|
||||
const std::string MetalinkResource::TORRENT("torrent");
|
||||
|
||||
MetalinkResource::MetalinkResource()
|
||||
: type(TYPE_UNKNOWN),
|
||||
priority(getLowestPriority()),
|
||||
|
|
|
@ -52,17 +52,6 @@ public:
|
|||
};
|
||||
|
||||
static std::string type2String[];
|
||||
|
||||
static const std::string HTTP;
|
||||
|
||||
static const std::string HTTPS;
|
||||
|
||||
static const std::string FTP;
|
||||
|
||||
static const std::string BITTORRENT;
|
||||
|
||||
static const std::string TORRENT; // Metalink4Spec
|
||||
|
||||
public:
|
||||
std::string url;
|
||||
TYPE type;
|
||||
|
|
Loading…
Reference in New Issue