Mercurial > hg > orthanc
diff OrthancServer/ServerContext.h @ 1066:bb82e5e818e9
OnStoredInstance callback in plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Jul 2014 18:39:02 +0200 |
parents | 84b6d7bca6db |
children | 6c5a77637b23 |
line wrap: on
line diff
--- a/OrthancServer/ServerContext.h Fri Jul 25 16:59:33 2014 +0200 +++ b/OrthancServer/ServerContext.h Fri Jul 25 18:39:02 2014 +0200 @@ -45,6 +45,8 @@ namespace Orthanc { + class PluginsHttpHandler; + /** * This class is responsible for maintaining the storage area on the * filesystem (including compression), as well as the index of the @@ -69,9 +71,9 @@ bool ApplyReceivedInstanceFilter(const Json::Value& simplified, const std::string& remoteAet); - void ApplyOnStoredInstance(const std::string& instanceId, - const Json::Value& simplifiedDicom, - const Json::Value& metadata); + void ApplyLuaOnStoredInstance(const std::string& instanceId, + const Json::Value& simplifiedDicom, + const Json::Value& metadata); FileStorage storage_; ServerIndex index_; @@ -86,6 +88,7 @@ boost::mutex luaMutex_; LuaContext lua_; + PluginsHttpHandler* plugins_; // TODO Turn it into a listener pattern (idem for Lua callbacks) public: class DicomCacheLocker : public boost::noncopyable @@ -183,5 +186,10 @@ { return scheduler_; } + + void SetPluginsHttpHandler(PluginsHttpHandler& plugin) + { + plugins_ = &plugin; + } }; }