diff OrthancServer/OrthancRestApi/OrthancRestSystem.cpp @ 1434:f9cd40166269

refactoring of OrthancPlugins, improvement in ServeFolders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2015 16:04:05 +0200
parents 461e7554bff7
children 02f5a3f5c0a0
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestSystem.cpp	Tue Jun 30 15:09:34 2015 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestSystem.cpp	Tue Jun 30 16:04:05 2015 +0200
@@ -132,7 +132,7 @@
     if (OrthancRestApi::GetContext(call).HasPlugins())
     {
       std::list<std::string> plugins;
-      OrthancRestApi::GetContext(call).GetPluginsManager().ListPlugins(plugins);
+      OrthancRestApi::GetContext(call).GetPlugins().GetManager().ListPlugins(plugins);
 
       for (std::list<std::string>::const_iterator 
              it = plugins.begin(); it != plugins.end(); ++it)
@@ -152,7 +152,7 @@
       return;
     }
 
-    const PluginsManager& manager = OrthancRestApi::GetContext(call).GetPluginsManager();
+    const PluginsManager& manager = OrthancRestApi::GetContext(call).GetPlugins().GetManager();
     std::string id = call.GetUriComponent("id", "");
 
     if (manager.HasPlugin(id))
@@ -161,7 +161,7 @@
       v["ID"] = id;
       v["Version"] = manager.GetPluginVersion(id);
 
-      const OrthancPlugins& plugins = OrthancRestApi::GetContext(call).GetOrthancPlugins();
+      const OrthancPlugins& plugins = OrthancRestApi::GetContext(call).GetPlugins();
       const char *c = plugins.GetProperty(id.c_str(), _OrthancPluginProperty_RootUri);
       if (c != NULL)
       {
@@ -188,11 +188,11 @@
 
     if (OrthancRestApi::GetContext(call).HasPlugins())
     {
-      const PluginsManager& manager = OrthancRestApi::GetContext(call).GetPluginsManager();
-      const OrthancPlugins& plugins = OrthancRestApi::GetContext(call).GetOrthancPlugins();
+      const OrthancPlugins& plugins = OrthancRestApi::GetContext(call).GetPlugins();
+      const PluginsManager& manager = plugins.GetManager();
 
       std::list<std::string> lst;
-      OrthancRestApi::GetContext(call).GetPluginsManager().ListPlugins(lst);
+      manager.ListPlugins(lst);
 
       for (std::list<std::string>::const_iterator
              it = lst.begin(); it != lst.end(); ++it)