Mercurial > hg > orthanc
comparison OrthancServer/main.cpp @ 4031:e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Jun 2020 21:31:13 +0200 |
parents | 05a363186da6 |
children |
comparison
equal
deleted
inserted
replaced
4030:100fbe970762 | 4031:e3b3af80732d |
---|---|
39 #include "../Core/Compatibility.h" | 39 #include "../Core/Compatibility.h" |
40 #include "../Core/DicomFormat/DicomArray.h" | 40 #include "../Core/DicomFormat/DicomArray.h" |
41 #include "../Core/DicomNetworking/DicomAssociationParameters.h" | 41 #include "../Core/DicomNetworking/DicomAssociationParameters.h" |
42 #include "../Core/DicomNetworking/DicomServer.h" | 42 #include "../Core/DicomNetworking/DicomServer.h" |
43 #include "../Core/DicomParsing/FromDcmtkBridge.h" | 43 #include "../Core/DicomParsing/FromDcmtkBridge.h" |
44 #include "../Core/HttpServer/EmbeddedResourceHttpHandler.h" | |
45 #include "../Core/HttpServer/FilesystemHttpHandler.h" | 44 #include "../Core/HttpServer/FilesystemHttpHandler.h" |
46 #include "../Core/HttpServer/HttpServer.h" | 45 #include "../Core/HttpServer/HttpServer.h" |
47 #include "../Core/Logging.h" | 46 #include "../Core/Logging.h" |
48 #include "../Core/Lua/LuaFunctionCall.h" | 47 #include "../Core/Lua/LuaFunctionCall.h" |
49 #include "../Plugins/Engine/OrthancPlugins.h" | 48 #include "../Plugins/Engine/OrthancPlugins.h" |
49 #include "EmbeddedResourceHttpHandler.h" | |
50 #include "OrthancConfiguration.h" | 50 #include "OrthancConfiguration.h" |
51 #include "OrthancFindRequestHandler.h" | 51 #include "OrthancFindRequestHandler.h" |
52 #include "OrthancGetRequestHandler.h" | |
52 #include "OrthancInitialization.h" | 53 #include "OrthancInitialization.h" |
53 #include "OrthancMoveRequestHandler.h" | 54 #include "OrthancMoveRequestHandler.h" |
54 #include "OrthancGetRequestHandler.h" | |
55 #include "ServerContext.h" | 55 #include "ServerContext.h" |
56 #include "ServerJobs/StorageCommitmentScpJob.h" | 56 #include "ServerJobs/StorageCommitmentScpJob.h" |
57 #include "ServerToolbox.h" | 57 #include "ServerToolbox.h" |
58 #include "StorageCommitmentReports.h" | 58 #include "StorageCommitmentReports.h" |
59 | 59 |
1150 } | 1150 } |
1151 #endif | 1151 #endif |
1152 | 1152 |
1153 // Secondly, apply the "static resources" layer | 1153 // Secondly, apply the "static resources" layer |
1154 #if ORTHANC_STANDALONE == 1 | 1154 #if ORTHANC_STANDALONE == 1 |
1155 EmbeddedResourceHttpHandler staticResources("/app", EmbeddedResources::ORTHANC_EXPLORER); | 1155 EmbeddedResourceHttpHandler staticResources("/app", ServerResources::ORTHANC_EXPLORER); |
1156 #else | 1156 #else |
1157 FilesystemHttpHandler staticResources("/app", ORTHANC_PATH "/OrthancExplorer"); | 1157 FilesystemHttpHandler staticResources("/app", ORTHANC_PATH "/OrthancExplorer"); |
1158 #endif | 1158 #endif |
1159 | 1159 |
1160 context.GetHttpHandler().Register(staticResources, false); | 1160 context.GetHttpHandler().Register(staticResources, false); |
1564 } | 1564 } |
1565 else if (boost::starts_with(argument, "--config=")) | 1565 else if (boost::starts_with(argument, "--config=")) |
1566 { | 1566 { |
1567 // TODO WHAT IS THE ENCODING? | 1567 // TODO WHAT IS THE ENCODING? |
1568 std::string configurationSample; | 1568 std::string configurationSample; |
1569 GetFileResource(configurationSample, EmbeddedResources::CONFIGURATION_SAMPLE); | 1569 GetFileResource(configurationSample, ServerResources::CONFIGURATION_SAMPLE); |
1570 | 1570 |
1571 #if defined(_WIN32) | 1571 #if defined(_WIN32) |
1572 // Replace UNIX newlines with DOS newlines | 1572 // Replace UNIX newlines with DOS newlines |
1573 boost::replace_all(configurationSample, "\n", "\r\n"); | 1573 boost::replace_all(configurationSample, "\n", "\r\n"); |
1574 #endif | 1574 #endif |