/* */ #include "XmlRpcMethodFactory.h" #include "XmlRpcMethodImpl.h" #include "OptionParser.h" #include "OptionHandler.h" namespace aria2 { namespace xmlrpc { SharedHandle XmlRpcMethodFactory::create(const std::string& methodName) { if(methodName == "aria2.addUri") { return SharedHandle(new AddUriXmlRpcMethod()); } else if(methodName == "aria2.addTorrent") { return SharedHandle(new AddTorrentXmlRpcMethod()); } else if(methodName == "aria2.addMetalink") { return SharedHandle(new AddMetalinkXmlRpcMethod()); } else if(methodName == "aria2.remove") { return SharedHandle(new RemoveXmlRpcMethod()); } else if(methodName == "aria2.tellStatus") { return SharedHandle(new TellStatusXmlRpcMethod()); } else if(methodName == "aria2.getUris") { return SharedHandle(new GetUrisXmlRpcMethod()); } else if(methodName == "aria2.getFiles") { return SharedHandle(new GetFilesXmlRpcMethod()); } else if(methodName == "aria2.getPeers") { return SharedHandle(new GetPeersXmlRpcMethod()); } else if(methodName == "aria2.tellActive") { return SharedHandle(new TellActiveXmlRpcMethod()); } else if(methodName == "aria2.changeOption") { return SharedHandle(new ChangeOptionXmlRpcMethod()); } else if(methodName == "aria2.purgeDownloadResult") { return SharedHandle(new PurgeDownloadResultXmlRpcMethod()); } else { return SharedHandle(new NoSuchMethodXmlRpcMethod()); } } } // namespace xmlrpc } // namespace aria2