comparison 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
comparison
equal deleted inserted replaced
1799:4f01c9d73f02 1800:30e97a1f4093
48 #else 48 #else
49 49
50 #include "../../Core/FileStorage/IStorageArea.h" 50 #include "../../Core/FileStorage/IStorageArea.h"
51 #include "../../Core/HttpServer/IHttpHandler.h" 51 #include "../../Core/HttpServer/IHttpHandler.h"
52 #include "../../OrthancServer/IServerListener.h" 52 #include "../../OrthancServer/IServerListener.h"
53 #include "../../OrthancServer/DicomProtocol/IWorklistRequestHandlerFactory.h"
53 #include "OrthancPluginDatabase.h" 54 #include "OrthancPluginDatabase.h"
54 #include "PluginsManager.h" 55 #include "PluginsManager.h"
55 56
56 #include <list> 57 #include <list>
57 #include <boost/shared_ptr.hpp> 58 #include <boost/shared_ptr.hpp>
61 class ServerContext; 62 class ServerContext;
62 63
63 class OrthancPlugins : 64 class OrthancPlugins :
64 public IHttpHandler, 65 public IHttpHandler,
65 public IPluginServiceProvider, 66 public IPluginServiceProvider,
66 public IServerListener 67 public IServerListener,
68 public IWorklistRequestHandlerFactory
67 { 69 {
68 private: 70 private:
69 struct PImpl; 71 struct PImpl;
70 boost::shared_ptr<PImpl> pimpl_; 72 boost::shared_ptr<PImpl> pimpl_;
71 73
74 class WorklistHandler;
75
72 void CheckContextAvailable(); 76 void CheckContextAvailable();
73 77
74 void RegisterRestCallback(const void* parameters, 78 void RegisterRestCallback(const void* parameters,
75 bool lock); 79 bool lock);
76 80
77 void RegisterOnStoredInstanceCallback(const void* parameters); 81 void RegisterOnStoredInstanceCallback(const void* parameters);
78 82
79 void RegisterOnChangeCallback(const void* parameters); 83 void RegisterOnChangeCallback(const void* parameters);
84
85 void RegisterWorklistCallback(const void* parameters);
80 86
81 void AnswerBuffer(const void* parameters); 87 void AnswerBuffer(const void* parameters);
82 88
83 void Redirect(const void* parameters); 89 void Redirect(const void* parameters);
84 90
135 const void* parameters); 141 const void* parameters);
136 142
137 void SignalChangeInternal(OrthancPluginChangeType changeType, 143 void SignalChangeInternal(OrthancPluginChangeType changeType,
138 OrthancPluginResourceType resourceType, 144 OrthancPluginResourceType resourceType,
139 const char* resource); 145 const char* resource);
146
147 void HandleWorklist(DicomFindAnswers& answers,
148 ParsedDicomFile& query,
149 const std::string& remoteIp,
150 const std::string& remoteAet,
151 const std::string& calledAet);
140 152
141 public: 153 public:
142 OrthancPlugins(); 154 OrthancPlugins();
143 155
144 virtual ~OrthancPlugins(); 156 virtual ~OrthancPlugins();
202 214
203 void SignalOrthancStopped() 215 void SignalOrthancStopped()
204 { 216 {
205 SignalChangeInternal(OrthancPluginChangeType_OrthancStopped, OrthancPluginResourceType_None, NULL); 217 SignalChangeInternal(OrthancPluginChangeType_OrthancStopped, OrthancPluginResourceType_None, NULL);
206 } 218 }
219
220
221 virtual IWorklistRequestHandler* ConstructWorklistRequestHandler();
207 }; 222 };
208 } 223 }
209 224
210 #endif 225 #endif