Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.h Thu Apr 07 16:31:33 2016 +0200 +++ b/Plugins/Engine/OrthancPlugins.h Thu Apr 07 17:26:13 2016 +0200 @@ -49,6 +49,7 @@ #include "../../Core/FileStorage/IStorageArea.h" #include "../../Core/HttpServer/IHttpHandler.h" +#include "../../Core/HttpServer/IIncomingHttpRequestFilter.h" #include "../../OrthancServer/IServerListener.h" #include "../../OrthancServer/IDicomImageDecoder.h" #include "../../OrthancServer/DicomProtocol/IWorklistRequestHandlerFactory.h" @@ -67,7 +68,8 @@ public IPluginServiceProvider, public IServerListener, public IWorklistRequestHandlerFactory, - public IDicomImageDecoder + public IDicomImageDecoder, + public IIncomingHttpRequestFilter { private: struct PImpl; @@ -88,6 +90,8 @@ void RegisterDecodeImageCallback(const void* parameters); + void RegisterIncomingHttpRequestFilter(const void* parameters); + void AnswerBuffer(const void* parameters); void Redirect(const void* parameters); @@ -239,6 +243,12 @@ virtual ImageAccessor* Decode(const void* dicom, size_t size, unsigned int frame); + + virtual bool IsAllowed(HttpMethod method, + const char* uri, + const char* ip, + const char* username, + const IHttpHandler::Arguments& httpHeaders) const; }; }