Mercurial > hg > orthanc-stone
diff Framework/Oracle/IOracleCommand.h @ 1128:8e3763d1736a broker
removing CustomOracleCommand
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Nov 2019 22:39:25 +0100 |
parents | b82b74d13830 |
children | a0a33e5ea5bb |
line wrap: on
line diff
--- a/Framework/Oracle/IOracleCommand.h Tue Nov 05 19:01:57 2019 +0100 +++ b/Framework/Oracle/IOracleCommand.h Tue Nov 05 22:39:25 2019 +0100 @@ -21,6 +21,10 @@ #pragma once +#include "../Messages/IMessage.h" + +#include <Core/IDynamicObject.h> + #include <boost/noncopyable.hpp> namespace OrthancStone @@ -28,9 +32,30 @@ class IOracleCommand : public boost::noncopyable { public: + class OracleMessageBase : public IMessage + { + private: + IOracleCommand& command_; + + public: + OracleMessageBase(IOracleCommand& command) : + command_(command) + { + } + + void AcquireCommandPayload(Orthanc::IDynamicObject* payload) const + { + command_.AcquirePayload(payload); + } + + const IOracleCommand& GetCommand() const + { + return command_; + } + }; + enum Type { - Type_Custom, Type_GetOrthancImage, Type_GetOrthancWebViewerJpeg, Type_Http, @@ -45,5 +70,11 @@ } virtual Type GetType() const = 0; + + virtual void AcquirePayload(Orthanc::IDynamicObject* payload) = 0; + + virtual bool HasPayload() const = 0; + + virtual Orthanc::IDynamicObject& GetPayload() const = 0; }; }