/* */ #include "XmlRpcRequest.h" namespace aria2 { namespace xmlrpc { XmlRpcRequest::XmlRpcRequest(const std::string& methodName, const SharedHandle& params) : methodName(methodName), params(params) {} XmlRpcRequest::XmlRpcRequest(const XmlRpcRequest& c) : methodName(c.methodName), params(c.params) {} XmlRpcRequest::~XmlRpcRequest() {} XmlRpcRequest& XmlRpcRequest::operator=(const XmlRpcRequest& c) { if(this != &c) { methodName = c.methodName; params = c.params; } return *this; } const String* XmlRpcRequest::getStringParam(size_t index) const { const String* stringParam = 0; if(params->size() > index) { stringParam = asString(params->get(index)); } return stringParam; } const Integer* XmlRpcRequest::getIntegerParam(size_t index) const { const Integer* integerParam = 0; if(params->size() > index) { integerParam = asInteger(params->get(index)); } return integerParam; } const List* XmlRpcRequest::getListParam(size_t index) const { const List* listParam = 0; if(params->size() > index) { listParam = asList(params->get(index)); } return listParam; } const Dict* XmlRpcRequest::getDictParam(size_t index) const { const Dict* dictParam = 0; if(params->size() > index) { dictParam = asDict(params->get(index)); } return dictParam; } } // namespace xmlrpc } // namespace aria2