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