Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi/OrthancRestApi.h @ 948:e57e08ed510f dicom-rt
integration mainline -> dicom-rt
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 25 Jun 2014 13:57:05 +0200 |
parents | 2f7802e95dd0 e7b1ca0f1e04 |
children |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestApi.h Wed Apr 16 16:15:58 2014 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestApi.h Wed Jun 25 13:57:05 2014 +0200 @@ -64,15 +64,23 @@ public: OrthancRestApi(ServerContext& context); + static OrthancRestApi& GetApi(RestApi::Call& call) + { + return dynamic_cast<OrthancRestApi&>(call.GetContext()); + } + static ServerContext& GetContext(RestApi::Call& call) { - OrthancRestApi& that = dynamic_cast<OrthancRestApi&>(call.GetContext()); - return that.context_; + return GetApi(call).context_; } static ServerIndex& GetIndex(RestApi::Call& call) { return GetContext(call).GetIndex(); } + + void AnswerStoredInstance(RestApi::PostCall& call, + const std::string& publicId, + StoreStatus status); }; }