Mercurial > hg > orthanc
changeset 331:5a96dac27959
base class for rest calls made public
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jan 2013 11:48:51 +0100 |
parents | 78a8eaa5f30b |
children | c51c9ed603e6 |
files | Core/RestApi/RestApi.cpp Core/RestApi/RestApi.h |
diffstat | 2 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/RestApi/RestApi.cpp Wed Jan 09 11:41:13 2013 +0100 +++ b/Core/RestApi/RestApi.cpp Wed Jan 09 11:48:51 2013 +0100 @@ -37,8 +37,8 @@ namespace Orthanc { - bool RestApi::SharedCall::ParseJsonRequestInternal(Json::Value& result, - const char* request) + bool RestApi::Call::ParseJsonRequestInternal(Json::Value& result, + const char* request) { result.clear(); Json::Reader reader;
--- a/Core/RestApi/RestApi.h Wed Jan 09 11:41:13 2013 +0100 +++ b/Core/RestApi/RestApi.h Wed Jan 09 11:48:51 2013 +0100 @@ -42,8 +42,8 @@ { class RestApi : public HttpHandler { - private: - class SharedCall + public: + class Call { friend class RestApi; @@ -101,8 +101,7 @@ }; - public: - class GetCall : public SharedCall + class GetCall : public Call { friend class RestApi; @@ -124,7 +123,7 @@ virtual bool ParseJsonRequest(Json::Value& result) const; }; - class PutCall : public SharedCall + class PutCall : public Call { friend class RestApi; @@ -143,7 +142,7 @@ } }; - class PostCall : public SharedCall + class PostCall : public Call { friend class RestApi; @@ -162,7 +161,7 @@ } }; - class DeleteCall : public SharedCall + class DeleteCall : public Call { public: virtual bool ParseJsonRequest(Json::Value& result) const