diff Plugins/Engine/OrthancPlugins.h @ 1800:30e97a1f4093 worklists

callback for handling worklists with plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 20 Nov 2015 13:53:20 +0100
parents 94990da8710e
children 2c60c357ee3e
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.h	Fri Nov 20 12:57:14 2015 +0100
+++ b/Plugins/Engine/OrthancPlugins.h	Fri Nov 20 13:53:20 2015 +0100
@@ -50,6 +50,7 @@
 #include "../../Core/FileStorage/IStorageArea.h"
 #include "../../Core/HttpServer/IHttpHandler.h"
 #include "../../OrthancServer/IServerListener.h"
+#include "../../OrthancServer/DicomProtocol/IWorklistRequestHandlerFactory.h"
 #include "OrthancPluginDatabase.h"
 #include "PluginsManager.h"
 
@@ -63,12 +64,15 @@
   class OrthancPlugins : 
     public IHttpHandler, 
     public IPluginServiceProvider, 
-    public IServerListener
+    public IServerListener,
+    public IWorklistRequestHandlerFactory
   {
   private:
     struct PImpl;
     boost::shared_ptr<PImpl> pimpl_;
 
+    class WorklistHandler;
+
     void CheckContextAvailable();
 
     void RegisterRestCallback(const void* parameters,
@@ -78,6 +82,8 @@
 
     void RegisterOnChangeCallback(const void* parameters);
 
+    void RegisterWorklistCallback(const void* parameters);
+
     void AnswerBuffer(const void* parameters);
 
     void Redirect(const void* parameters);
@@ -138,6 +144,12 @@
                               OrthancPluginResourceType resourceType,
                               const char* resource);
 
+    void HandleWorklist(DicomFindAnswers& answers,
+                        ParsedDicomFile& query,
+                        const std::string& remoteIp,
+                        const std::string& remoteAet,
+                        const std::string& calledAet);
+
   public:
     OrthancPlugins();
 
@@ -204,6 +216,9 @@
     {
       SignalChangeInternal(OrthancPluginChangeType_OrthancStopped, OrthancPluginResourceType_None, NULL);
     }
+
+
+    virtual IWorklistRequestHandler* ConstructWorklistRequestHandler();
   };
 }