Mercurial > hg > orthanc
comparison OrthancServer/main.cpp @ 912:dcb2469f00f4 plugins
PluginsHttpHandler::RestApiGet
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 20 Jun 2014 14:55:24 +0200 |
parents | e078ea944089 |
children | 3fb427ac3f53 |
comparison
equal
deleted
inserted
replaced
911:306afd58a0b3 | 912:dcb2469f00f4 |
---|---|
372 context.SetCompressionEnabled(Configuration::GetGlobalBoolParameter("StorageCompression", false)); | 372 context.SetCompressionEnabled(Configuration::GetGlobalBoolParameter("StorageCompression", false)); |
373 context.SetStoreMD5ForAttachments(Configuration::GetGlobalBoolParameter("StoreMD5ForAttachments", true)); | 373 context.SetStoreMD5ForAttachments(Configuration::GetGlobalBoolParameter("StoreMD5ForAttachments", true)); |
374 | 374 |
375 LoadLuaScripts(context); | 375 LoadLuaScripts(context); |
376 | 376 |
377 PluginsHttpHandler httpPlugins(context); | |
378 | |
379 PluginsManager pluginsManager; | |
380 pluginsManager.RegisterServiceProvider(httpPlugins); | |
381 LoadPlugins(pluginsManager); | |
382 | |
383 try | 377 try |
384 { | 378 { |
385 context.GetIndex().SetMaximumPatientCount(Configuration::GetGlobalIntegerParameter("MaximumPatientCount", 0)); | 379 context.GetIndex().SetMaximumPatientCount(Configuration::GetGlobalIntegerParameter("MaximumPatientCount", 0)); |
386 } | 380 } |
387 catch (...) | 381 catch (...) |
441 EmbeddedResourceHttpHandler staticResources("/app", EmbeddedResources::ORTHANC_EXPLORER); | 435 EmbeddedResourceHttpHandler staticResources("/app", EmbeddedResources::ORTHANC_EXPLORER); |
442 #else | 436 #else |
443 FilesystemHttpHandler staticResources("/app", ORTHANC_PATH "/OrthancExplorer"); | 437 FilesystemHttpHandler staticResources("/app", ORTHANC_PATH "/OrthancExplorer"); |
444 #endif | 438 #endif |
445 | 439 |
440 PluginsHttpHandler httpPlugins(context); | |
441 httpPlugins.SetOrthancRestApi(restApi); | |
442 | |
443 PluginsManager pluginsManager; | |
444 pluginsManager.RegisterServiceProvider(httpPlugins); | |
445 LoadPlugins(pluginsManager); | |
446 | |
446 httpServer.RegisterHandler(httpPlugins); | 447 httpServer.RegisterHandler(httpPlugins); |
447 httpServer.RegisterHandler(staticResources); | 448 httpServer.RegisterHandler(staticResources); |
448 httpServer.RegisterHandler(restApi); | 449 httpServer.RegisterHandler(restApi); |
449 httpPlugins.SetOrthancRestApi(restApi); | 450 httpPlugins.SetOrthancRestApi(restApi); |
450 | 451 |