Mercurial > hg > orthanc
diff Core/HttpServer/MongooseServer.h @ 410:b2c6cc90288c
reintegration from lua-scripting
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 May 2013 12:23:32 +0200 |
parents | 63f707278fc8 |
children | c9a5d72f8481 |
line wrap: on
line diff
--- a/Core/HttpServer/MongooseServer.h Thu May 02 16:49:28 2013 +0200 +++ b/Core/HttpServer/MongooseServer.h Fri May 03 12:23:32 2013 +0200 @@ -44,6 +44,19 @@ { class ChunkStore; + class IIncomingHttpRequestFilter + { + public: + virtual ~IIncomingHttpRequestFilter() + { + } + + virtual bool IsAllowed(Orthanc_HttpMethod method, + const char* uri, + const char* ip, + const char* username) const = 0; + }; + class MongooseServer { private: @@ -62,6 +75,7 @@ bool ssl_; std::string certificate_; uint16_t port_; + IIncomingHttpRequestFilter* filter_; bool IsRunning() const; @@ -116,6 +130,13 @@ void SetRemoteAccessAllowed(bool allowed); + const IIncomingHttpRequestFilter* GetIncomingHttpRequestFilter() const + { + return filter_; + } + + void SetIncomingHttpRequestFilter(IIncomingHttpRequestFilter& filter); + void ClearHandlers(); // Can return NULL if no handler is associated to this URI