Mercurial > hg > orthanc
diff OrthancFramework/Sources/HttpServer/IHttpHandler.h @ 4330:a01b1c9cbef4
moving generic type definitions from IHttpHandler to HttpToolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 25 Nov 2020 14:39:10 +0100 |
parents | 9dc0e42f868b |
children | d9473bd5ed43 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/IHttpHandler.h Wed Nov 25 13:46:49 2020 +0100 +++ b/OrthancFramework/Sources/HttpServer/IHttpHandler.h Wed Nov 25 14:39:10 2020 +0100 @@ -22,9 +22,14 @@ #pragma once +#if ORTHANC_SANDBOXED == 1 +# error This file cannot be used in sandboxed environments +#endif + #include "../Compatibility.h" #include "../Toolbox.h" #include "HttpOutput.h" +#include "HttpToolbox.h" #include <map> #include <set> @@ -37,10 +42,6 @@ class IHttpHandler : public boost::noncopyable { public: - typedef std::map<std::string, std::string> Arguments; - typedef std::vector< std::pair<std::string, std::string> > GetArguments; - - class IChunkedRequestReader : public boost::noncopyable { public: @@ -69,7 +70,7 @@ const char* username, HttpMethod method, const UriComponents& uri, - const Arguments& headers) = 0; + const HttpToolbox::Arguments& headers) = 0; virtual bool Handle(HttpOutput& output, RequestOrigin origin, @@ -77,8 +78,8 @@ const char* username, HttpMethod method, const UriComponents& uri, - const Arguments& headers, - const GetArguments& getArguments, + const HttpToolbox::Arguments& headers, + const HttpToolbox::GetArguments& getArguments, const void* bodyData, size_t bodySize) = 0; @@ -86,7 +87,7 @@ IHttpHandler& handler, RequestOrigin origin, const std::string& uri, - const Arguments& httpHeaders); + const HttpToolbox::Arguments& httpHeaders); static bool SimplePost(std::string& result, IHttpHandler& handler, @@ -94,7 +95,7 @@ const std::string& uri, const void* bodyData, size_t bodySize, - const Arguments& httpHeaders); + const HttpToolbox::Arguments& httpHeaders); static bool SimplePut(std::string& result, IHttpHandler& handler, @@ -102,11 +103,11 @@ const std::string& uri, const void* bodyData, size_t bodySize, - const Arguments& httpHeaders); + const HttpToolbox::Arguments& httpHeaders); static bool SimpleDelete(IHttpHandler& handler, RequestOrigin origin, const std::string& uri, - const Arguments& httpHeaders); + const HttpToolbox::Arguments& httpHeaders); }; }