Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestApi.cpp @ 1437:02f5a3f5c0a0
access to the REST API from Lua
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Jun 2015 18:41:33 +0200 |
parents | 6e7e5ed91c2d |
children | 8dc80ba768aa |
comparison
equal
deleted
inserted
replaced
1436:0a3e3be59094 | 1437:02f5a3f5c0a0 |
---|---|
32 | 32 |
33 #include "../PrecompiledHeadersServer.h" | 33 #include "../PrecompiledHeadersServer.h" |
34 #include "OrthancRestApi.h" | 34 #include "OrthancRestApi.h" |
35 | 35 |
36 #include "../DicomModification.h" | 36 #include "../DicomModification.h" |
37 #include "../ServerContext.h" | |
37 | 38 |
38 #include <glog/logging.h> | 39 #include <glog/logging.h> |
39 | 40 |
40 namespace Orthanc | 41 namespace Orthanc |
41 { | 42 { |
110 // Auto-generated directories | 111 // Auto-generated directories |
111 Register("/tools", RestApi::AutoListChildren); | 112 Register("/tools", RestApi::AutoListChildren); |
112 Register("/tools/reset", ResetOrthanc); | 113 Register("/tools/reset", ResetOrthanc); |
113 Register("/instances/{id}/frames/{frame}", RestApi::AutoListChildren); | 114 Register("/instances/{id}/frames/{frame}", RestApi::AutoListChildren); |
114 } | 115 } |
116 | |
117 | |
118 ServerContext& OrthancRestApi::GetContext(RestApiCall& call) | |
119 { | |
120 return GetApi(call).context_; | |
121 } | |
122 | |
123 | |
124 ServerIndex& OrthancRestApi::GetIndex(RestApiCall& call) | |
125 { | |
126 return GetContext(call).GetIndex(); | |
127 } | |
115 } | 128 } |