Mercurial > hg > orthanc
diff Core/RestApi/RestApi.cpp @ 759:8cfc6119a5bd dicom-rt
integration mainline -> dicom-rt
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Apr 2014 16:04:55 +0200 |
parents | 2d0a347e8cfc |
children | a811bdf8b8eb |
line wrap: on
line diff
--- a/Core/RestApi/RestApi.cpp Thu Oct 17 14:21:50 2013 +0200 +++ b/Core/RestApi/RestApi.cpp Wed Apr 16 16:04:55 2014 +0200 @@ -1,6 +1,6 @@ /** * Orthanc - A Lightweight, RESTful DICOM Store - * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, + * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, * Belgium * * This program is free software: you can redistribute it and/or @@ -51,7 +51,7 @@ result.clear(); for (HttpHandler::Arguments::const_iterator - it = getArguments_->begin(); it != getArguments_->end(); it++) + it = getArguments_.begin(); it != getArguments_.end(); ++it) { result[it->first] = it->second; } @@ -63,7 +63,7 @@ bool RestApi::IsGetAccepted(const UriComponents& uri) { for (GetHandlers::const_iterator it = getHandlers_.begin(); - it != getHandlers_.end(); it++) + it != getHandlers_.end(); ++it) { if (it->first->Match(uri)) { @@ -77,7 +77,7 @@ bool RestApi::IsPutAccepted(const UriComponents& uri) { for (PutHandlers::const_iterator it = putHandlers_.begin(); - it != putHandlers_.end(); it++) + it != putHandlers_.end(); ++it) { if (it->first->Match(uri)) { @@ -91,7 +91,7 @@ bool RestApi::IsPostAccepted(const UriComponents& uri) { for (PostHandlers::const_iterator it = postHandlers_.begin(); - it != postHandlers_.end(); it++) + it != postHandlers_.end(); ++it) { if (it->first->Match(uri)) { @@ -105,7 +105,7 @@ bool RestApi::IsDeleteAccepted(const UriComponents& uri) { for (DeleteHandlers::const_iterator it = deleteHandlers_.begin(); - it != deleteHandlers_.end(); it++) + it != deleteHandlers_.end(); ++it) { if (it->first->Match(uri)) { @@ -147,25 +147,25 @@ RestApi::~RestApi() { for (GetHandlers::iterator it = getHandlers_.begin(); - it != getHandlers_.end(); it++) + it != getHandlers_.end(); ++it) { delete it->first; } for (PutHandlers::iterator it = putHandlers_.begin(); - it != putHandlers_.end(); it++) + it != putHandlers_.end(); ++it) { delete it->first; } for (PostHandlers::iterator it = postHandlers_.begin(); - it != postHandlers_.end(); it++) + it != postHandlers_.end(); ++it) { delete it->first; } for (DeleteHandlers::iterator it = deleteHandlers_.begin(); - it != deleteHandlers_.end(); it++) + it != deleteHandlers_.end(); ++it) { delete it->first; } @@ -194,21 +194,13 @@ if (method == HttpMethod_Get) { for (GetHandlers::const_iterator it = getHandlers_.begin(); - it != getHandlers_.end(); it++) + it != getHandlers_.end(); ++it) { if (it->first->Match(components, trailing, uri)) { //LOG(INFO) << "REST GET call on: " << Toolbox::FlattenUri(uri); ok = true; - GetCall call; - call.output_ = &restOutput; - call.context_ = this; - call.httpHeaders_ = &headers; - call.uriComponents_ = &components; - call.trailing_ = &trailing; - call.fullUri_ = &uri; - - call.getArguments_ = &getArguments; + GetCall call(restOutput, *this, headers, components, trailing, uri, getArguments); it->second(call); } } @@ -216,21 +208,13 @@ else if (method == HttpMethod_Put) { for (PutHandlers::const_iterator it = putHandlers_.begin(); - it != putHandlers_.end(); it++) + it != putHandlers_.end(); ++it) { if (it->first->Match(components, trailing, uri)) { //LOG(INFO) << "REST PUT call on: " << Toolbox::FlattenUri(uri); ok = true; - PutCall call; - call.output_ = &restOutput; - call.context_ = this; - call.httpHeaders_ = &headers; - call.uriComponents_ = &components; - call.trailing_ = &trailing; - call.fullUri_ = &uri; - - call.data_ = &postData; + PutCall call(restOutput, *this, headers, components, trailing, uri, postData); it->second(call); } } @@ -238,21 +222,13 @@ else if (method == HttpMethod_Post) { for (PostHandlers::const_iterator it = postHandlers_.begin(); - it != postHandlers_.end(); it++) + it != postHandlers_.end(); ++it) { if (it->first->Match(components, trailing, uri)) { //LOG(INFO) << "REST POST call on: " << Toolbox::FlattenUri(uri); ok = true; - PostCall call; - call.output_ = &restOutput; - call.context_ = this; - call.httpHeaders_ = &headers; - call.uriComponents_ = &components; - call.trailing_ = &trailing; - call.fullUri_ = &uri; - - call.data_ = &postData; + PostCall call(restOutput, *this, headers, components, trailing, uri, postData); it->second(call); } } @@ -260,19 +236,13 @@ else if (method == HttpMethod_Delete) { for (DeleteHandlers::const_iterator it = deleteHandlers_.begin(); - it != deleteHandlers_.end(); it++) + it != deleteHandlers_.end(); ++it) { if (it->first->Match(components, trailing, uri)) { //LOG(INFO) << "REST DELETE call on: " << Toolbox::FlattenUri(uri); ok = true; - DeleteCall call; - call.output_ = &restOutput; - call.context_ = this; - call.httpHeaders_ = &headers; - call.uriComponents_ = &components; - call.trailing_ = &trailing; - call.fullUri_ = &uri; + DeleteCall call(restOutput, *this, headers, components, trailing, uri); it->second(call); } }