Mercurial > hg > orthanc
diff Core/RestApi/RestApiHierarchy.cpp @ 974:83622b0f544c
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Jun 2014 14:44:05 +0200 |
parents | 2047e6f033bd |
children | c550e99c452b |
line wrap: on
line diff
--- a/Core/RestApi/RestApiHierarchy.cpp Mon Jun 30 14:08:15 2014 +0200 +++ b/Core/RestApi/RestApiHierarchy.cpp Mon Jun 30 14:44:05 2014 +0200 @@ -76,25 +76,25 @@ } - RestApi::GetHandler RestApiHierarchy::Handlers::GetGetHandler() const + RestApiGetCall::Handler RestApiHierarchy::Handlers::GetGetHandler() const { assert(getHandler_ != NULL); return getHandler_; } - RestApi::PutHandler RestApiHierarchy::Handlers::GetPutHandler() const + RestApiPutCall::Handler RestApiHierarchy::Handlers::GetPutHandler() const { assert(putHandler_ != NULL); return putHandler_; } - RestApi::PostHandler RestApiHierarchy::Handlers::GetPostHandler() const + RestApiPostCall::Handler RestApiHierarchy::Handlers::GetPostHandler() const { assert(postHandler_ != NULL); return postHandler_; } - RestApi::DeleteHandler RestApiHierarchy::Handlers::GetDeleteHandler() const + RestApiDeleteCall::Handler RestApiHierarchy::Handlers::GetDeleteHandler() const { assert(deleteHandler_ != NULL); return deleteHandler_; @@ -286,7 +286,7 @@ { if (handlers.HasHandler(HttpMethod_Get)) { - handlers.GetGetHandler() (*reinterpret_cast<RestApi::GetCall*>(call)); + handlers.GetGetHandler() (*reinterpret_cast<RestApiGetCall*>(call)); return true; } else @@ -304,7 +304,7 @@ { if (handlers.HasHandler(HttpMethod_Post)) { - handlers.GetPostHandler() (*reinterpret_cast<RestApi::PostCall*>(call)); + handlers.GetPostHandler() (*reinterpret_cast<RestApiPostCall*>(call)); return true; } else @@ -322,7 +322,7 @@ { if (handlers.HasHandler(HttpMethod_Put)) { - handlers.GetPutHandler() (*reinterpret_cast<RestApi::PutCall*>(call)); + handlers.GetPutHandler() (*reinterpret_cast<RestApiPutCall*>(call)); return true; } else @@ -340,7 +340,7 @@ { if (handlers.HasHandler(HttpMethod_Delete)) { - handlers.GetDeleteHandler() (*reinterpret_cast<RestApi::DeleteCall*>(call)); + handlers.GetDeleteHandler() (*reinterpret_cast<RestApiDeleteCall*>(call)); return true; } else @@ -357,28 +357,28 @@ } void RestApiHierarchy::Register(const std::string& uri, - RestApi::GetHandler handler) + RestApiGetCall::Handler handler) { RestApiPath path(uri); RegisterInternal(path, handler, 0); } void RestApiHierarchy::Register(const std::string& uri, - RestApi::PutHandler handler) + RestApiPutCall::Handler handler) { RestApiPath path(uri); RegisterInternal(path, handler, 0); } void RestApiHierarchy::Register(const std::string& uri, - RestApi::PostHandler handler) + RestApiPostCall::Handler handler) { RestApiPath path(uri); RegisterInternal(path, handler, 0); } void RestApiHierarchy::Register(const std::string& uri, - RestApi::DeleteHandler handler) + RestApiDeleteCall::Handler handler) { RestApiPath path(uri); RegisterInternal(path, handler, 0); @@ -429,28 +429,28 @@ }*/ } - bool RestApiHierarchy::Handle(RestApi::GetCall& call, + bool RestApiHierarchy::Handle(RestApiGetCall& call, const UriComponents& uri) { RestApiPath::Components components; return LookupHandler(components, uri, GetCallback, 0, &call); } - bool RestApiHierarchy::Handle(RestApi::PutCall& call, + bool RestApiHierarchy::Handle(RestApiPutCall& call, const UriComponents& uri) { RestApiPath::Components components; return LookupHandler(components, uri, PutCallback, 0, &call); } - bool RestApiHierarchy::Handle(RestApi::PostCall& call, + bool RestApiHierarchy::Handle(RestApiPostCall& call, const UriComponents& uri) { RestApiPath::Components components; return LookupHandler(components, uri, PostCallback, 0, &call); } - bool RestApiHierarchy::Handle(RestApi::DeleteCall& call, + bool RestApiHierarchy::Handle(RestApiDeleteCall& call, const UriComponents& uri) { RestApiPath::Components components;