comparison Plugins/Engine/OrthancPlugins.h @ 1961:ef1e9856c26f

New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Apr 2016 17:26:13 +0200
parents d7c1cb559431
children ce90d109bb64
comparison
equal deleted inserted replaced
1960:239e50b3792f 1961:ef1e9856c26f
47 47
48 #else 48 #else
49 49
50 #include "../../Core/FileStorage/IStorageArea.h" 50 #include "../../Core/FileStorage/IStorageArea.h"
51 #include "../../Core/HttpServer/IHttpHandler.h" 51 #include "../../Core/HttpServer/IHttpHandler.h"
52 #include "../../Core/HttpServer/IIncomingHttpRequestFilter.h"
52 #include "../../OrthancServer/IServerListener.h" 53 #include "../../OrthancServer/IServerListener.h"
53 #include "../../OrthancServer/IDicomImageDecoder.h" 54 #include "../../OrthancServer/IDicomImageDecoder.h"
54 #include "../../OrthancServer/DicomProtocol/IWorklistRequestHandlerFactory.h" 55 #include "../../OrthancServer/DicomProtocol/IWorklistRequestHandlerFactory.h"
55 #include "OrthancPluginDatabase.h" 56 #include "OrthancPluginDatabase.h"
56 #include "PluginsManager.h" 57 #include "PluginsManager.h"
65 class OrthancPlugins : 66 class OrthancPlugins :
66 public IHttpHandler, 67 public IHttpHandler,
67 public IPluginServiceProvider, 68 public IPluginServiceProvider,
68 public IServerListener, 69 public IServerListener,
69 public IWorklistRequestHandlerFactory, 70 public IWorklistRequestHandlerFactory,
70 public IDicomImageDecoder 71 public IDicomImageDecoder,
72 public IIncomingHttpRequestFilter
71 { 73 {
72 private: 74 private:
73 struct PImpl; 75 struct PImpl;
74 boost::shared_ptr<PImpl> pimpl_; 76 boost::shared_ptr<PImpl> pimpl_;
75 77
85 void RegisterOnChangeCallback(const void* parameters); 87 void RegisterOnChangeCallback(const void* parameters);
86 88
87 void RegisterWorklistCallback(const void* parameters); 89 void RegisterWorklistCallback(const void* parameters);
88 90
89 void RegisterDecodeImageCallback(const void* parameters); 91 void RegisterDecodeImageCallback(const void* parameters);
92
93 void RegisterIncomingHttpRequestFilter(const void* parameters);
90 94
91 void AnswerBuffer(const void* parameters); 95 void AnswerBuffer(const void* parameters);
92 96
93 void Redirect(const void* parameters); 97 void Redirect(const void* parameters);
94 98
237 bool HasCustomImageDecoder(); 241 bool HasCustomImageDecoder();
238 242
239 virtual ImageAccessor* Decode(const void* dicom, 243 virtual ImageAccessor* Decode(const void* dicom,
240 size_t size, 244 size_t size,
241 unsigned int frame); 245 unsigned int frame);
246
247 virtual bool IsAllowed(HttpMethod method,
248 const char* uri,
249 const char* ip,
250 const char* username,
251 const IHttpHandler::Arguments& httpHeaders) const;
242 }; 252 };
243 } 253 }
244 254
245 #endif 255 #endif