diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
| commit | 07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch) | |
| tree | 2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/HttpServerBodyCommand.cc | |
| parent | 126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff) | |
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
| -rw-r--r-- | src/HttpServerBodyCommand.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index 23230d00..a860e90d 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -68,9 +68,9 @@ namespace aria2 { HttpServerBodyCommand::HttpServerBodyCommand (cuid_t cuid, - const SharedHandle<HttpServer>& httpServer, + const std::shared_ptr<HttpServer>& httpServer, DownloadEngine* e, - const SharedHandle<SocketCore>& socket) + const std::shared_ptr<SocketCore>& socket) : Command(cuid), e_(e), socket_(socket), @@ -184,7 +184,7 @@ bool HttpServerBodyCommand::execute() if(httpServer_->getMethod() == "OPTIONS") { // Response to Preflight Request. // See http://www.w3.org/TR/cors/ - const SharedHandle<HttpHeader>& header = + const std::shared_ptr<HttpHeader>& header = httpServer_->getRequestHeader(); std::string accessControlHeaders; if(!header->find(HttpHeader::ORIGIN).empty() && @@ -211,8 +211,8 @@ bool HttpServerBodyCommand::execute() switch(httpServer_->getRequestType()) { case RPC_TYPE_XML: { #ifdef ENABLE_XML_RPC - SharedHandle<rpc::XmlRpcDiskWriter> dw = - static_pointer_cast<rpc::XmlRpcDiskWriter>(httpServer_->getBody()); + auto dw = std::static_pointer_cast<rpc::XmlRpcDiskWriter> + (httpServer_->getBody()); int error; error = dw->finalize(); rpc::RpcRequest req; @@ -228,7 +228,7 @@ bool HttpServerBodyCommand::execute() addHttpServerResponseCommand(); return true; } - SharedHandle<rpc::RpcMethod> method = + std::shared_ptr<rpc::RpcMethod> method = rpc::RpcMethodFactory::create(req.methodName); A2_LOG_INFO(fmt("Executing RPC method %s", req.methodName.c_str())); rpc::RpcResponse res = method->execute(req, e_); @@ -245,7 +245,7 @@ bool HttpServerBodyCommand::execute() case RPC_TYPE_JSON: case RPC_TYPE_JSONP: { std::string callback; - SharedHandle<ValueBase> json; + std::shared_ptr<ValueBase> json; ssize_t error = 0; if(httpServer_->getRequestType() == RPC_TYPE_JSONP) { json::JsonGetParam param = json::decodeGetParams(query); @@ -256,8 +256,8 @@ bool HttpServerBodyCommand::execute() param.request.size(), error); } else { - SharedHandle<json::JsonDiskWriter> dw = - static_pointer_cast<json::JsonDiskWriter>(httpServer_->getBody()); + auto dw = std::static_pointer_cast<json::JsonDiskWriter> + (httpServer_->getBody()); error = dw->finalize(); if(error == 0) { json = dw->getResult(); |
