Mercurial > hg > orthanc
comparison OrthancServer/main.cpp @ 1132:f739d3f6cfcf
rename
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Sep 2014 10:43:23 +0200 |
parents | f4e65808ea58 |
children | ba9fd42284d0 |
comparison
equal
deleted
inserted
replaced
1131:ac6bd50a8c83 | 1132:f739d3f6cfcf |
---|---|
49 #include "ServerContext.h" | 49 #include "ServerContext.h" |
50 #include "OrthancFindRequestHandler.h" | 50 #include "OrthancFindRequestHandler.h" |
51 #include "OrthancMoveRequestHandler.h" | 51 #include "OrthancMoveRequestHandler.h" |
52 #include "ServerToolbox.h" | 52 #include "ServerToolbox.h" |
53 #include "../Plugins/Engine/PluginsManager.h" | 53 #include "../Plugins/Engine/PluginsManager.h" |
54 #include "../Plugins/Engine/PluginsHttpHandler.h" | 54 #include "../Plugins/Engine/OrthancPlugins.h" |
55 | 55 |
56 using namespace Orthanc; | 56 using namespace Orthanc; |
57 | 57 |
58 | 58 |
59 | 59 |
449 EmbeddedResourceHttpHandler staticResources("/app", EmbeddedResources::ORTHANC_EXPLORER); | 449 EmbeddedResourceHttpHandler staticResources("/app", EmbeddedResources::ORTHANC_EXPLORER); |
450 #else | 450 #else |
451 FilesystemHttpHandler staticResources("/app", ORTHANC_PATH "/OrthancExplorer"); | 451 FilesystemHttpHandler staticResources("/app", ORTHANC_PATH "/OrthancExplorer"); |
452 #endif | 452 #endif |
453 | 453 |
454 PluginsHttpHandler httpPlugins(context); | 454 OrthancPlugins orthancPlugins(context); |
455 httpPlugins.SetOrthancRestApi(restApi); | 455 orthancPlugins.SetOrthancRestApi(restApi); |
456 | 456 |
457 PluginsManager pluginsManager; | 457 PluginsManager pluginsManager; |
458 pluginsManager.RegisterServiceProvider(httpPlugins); | 458 pluginsManager.RegisterServiceProvider(orthancPlugins); |
459 LoadPlugins(pluginsManager); | 459 LoadPlugins(pluginsManager); |
460 | 460 |
461 httpServer.RegisterHandler(httpPlugins); | 461 httpServer.RegisterHandler(orthancPlugins); |
462 httpServer.RegisterHandler(staticResources); | 462 httpServer.RegisterHandler(staticResources); |
463 httpServer.RegisterHandler(restApi); | 463 httpServer.RegisterHandler(restApi); |
464 httpPlugins.SetOrthancRestApi(restApi); | 464 orthancPlugins.SetOrthancRestApi(restApi); |
465 context.SetPluginsHttpHandler(httpPlugins); | 465 context.SetOrthancPlugins(orthancPlugins); |
466 | 466 |
467 // GO !!! Start the requested servers | 467 // GO !!! Start the requested servers |
468 if (Configuration::GetGlobalBoolParameter("HttpServerEnabled", true)) | 468 if (Configuration::GetGlobalBoolParameter("HttpServerEnabled", true)) |
469 { | 469 { |
470 httpServer.Start(); | 470 httpServer.Start(); |