Mercurial > hg > orthanc
annotate OrthancServer/Sources/EmbeddedResourceHttpHandler.h @ 5320:e4c3950345e9
remove NEWS from reverted commits 5306:155637655710 and 5308:1e23bfb0f732
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 24 Jun 2023 12:21:26 +0200 |
parents | 0ea402b4d901 |
children | 48b8dae6dc77 |
rev | line source |
---|---|
0 | 1 /** |
59 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
5185
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
0 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU General Public License as | |
10 * published by the Free Software Foundation, either version 3 of the | |
11 * License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 #pragma once | |
24 | |
4045 | 25 #include "../../OrthancFramework/Sources/HttpServer/IHttpHandler.h" |
0 | 26 |
4032
058b5ade8acd
renaming embedded resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4031
diff
changeset
|
27 #include <OrthancServerResources.h> // Autogenerated file |
0 | 28 #include <boost/shared_ptr.hpp> |
29 | |
59 | 30 namespace Orthanc |
0 | 31 { |
1441
f3672356c121
refactoring: IHttpHandler and HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1363
diff
changeset
|
32 class EmbeddedResourceHttpHandler : public IHttpHandler |
0 | 33 { |
34 private: | |
35 UriComponents baseUri_; | |
4031
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
36 ServerResources::DirectoryResourceId resourceId_; |
0 | 37 |
38 public: | |
39 EmbeddedResourceHttpHandler( | |
40 const std::string& baseUri, | |
4031
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
41 ServerResources::DirectoryResourceId resourceId); |
0 | 42 |
3712
2a170a8f1faf
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
43 virtual bool CreateChunkedRequestReader(std::unique_ptr<IChunkedRequestReader>& target, |
3414 | 44 RequestOrigin origin, |
45 const char* remoteIp, | |
46 const char* username, | |
47 HttpMethod method, | |
48 const UriComponents& uri, | |
4335 | 49 const HttpToolbox::Arguments& headers) ORTHANC_OVERRIDE |
3395
0ce9b4f5fdf5
new abstraction: IHttpHandler::CreateStreamHandler()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
50 { |
3414 | 51 return false; |
3395
0ce9b4f5fdf5
new abstraction: IHttpHandler::CreateStreamHandler()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
52 } |
0ce9b4f5fdf5
new abstraction: IHttpHandler::CreateStreamHandler()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
53 |
3414 | 54 virtual bool Handle(HttpOutput& output, |
55 RequestOrigin origin, | |
56 const char* remoteIp, | |
57 const char* username, | |
58 HttpMethod method, | |
59 const UriComponents& uri, | |
4330
a01b1c9cbef4
moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
60 const HttpToolbox::Arguments& headers, |
a01b1c9cbef4
moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
61 const HttpToolbox::GetArguments& arguments, |
3414 | 62 const void* /*bodyData*/, |
4335 | 63 size_t /*bodySize*/) ORTHANC_OVERRIDE; |
0 | 64 }; |
65 } |