diff --git a/src/proc/control/proc-dispatcher.cpp b/src/proc/control/proc-dispatcher.cpp index ddeafc1b8..52d3b5be1 100644 --- a/src/proc/control/proc-dispatcher.cpp +++ b/src/proc/control/proc-dispatcher.cpp @@ -26,6 +26,7 @@ #include "include/logging.h" #include "proc/control/proc-dispatcher.hpp" #include "proc/control/command-dispatch.hpp" +#include "proc/control/session-command-service.hpp" #include "proc/mobject/session.hpp" #include "backend/thread-wrapper.hpp" //#include "proc/mobject/mobject-ref.hpp" @@ -50,10 +51,14 @@ namespace control { bool canDispatch_{false}; bool blocked_ {false}; + SessionCommandService commandService_; + + public: DispatcherLoop (Subsys::SigTerm notification) : ThreadJoinable("Lumiera Session" , bind (&DispatcherLoop::run, this, notification)) + , commandService_(*this) { INFO (session, "Proc-Dispatcher running..."); } diff --git a/src/proc/control/session-command-service.cpp b/src/proc/control/session-command-service.cpp index 6876690b2..bb96199ef 100644 --- a/src/proc/control/session-command-service.cpp +++ b/src/proc/control/session-command-service.cpp @@ -177,9 +177,10 @@ namespace control { - SessionCommandService::SessionCommandService () - : implInstance_(this,_instance), - serviceInstance_( LUMIERA_INTERFACE_REF (lumieraorg_SessionCommand, 0, lumieraorg_SessionCommandService)) + SessionCommandService::SessionCommandService (CommandDispatch& dispatcherLoopInterface) + : dispatcher_{dispatcherLoopInterface} + , implInstance_{this,_instance} + , serviceInstance_{ LUMIERA_INTERFACE_REF (lumieraorg_SessionCommand, 0, lumieraorg_SessionCommandService)} { INFO (gui, "SessionCommand Facade opened."); } diff --git a/src/proc/control/session-command-service.hpp b/src/proc/control/session-command-service.hpp index a15b97bb3..7469a668b 100644 --- a/src/proc/control/session-command-service.hpp +++ b/src/proc/control/session-command-service.hpp @@ -46,6 +46,8 @@ #include "common/instancehandle.hpp" #include "lib/singleton-ref.hpp" +#include + namespace proc { @@ -66,7 +68,10 @@ namespace control { */ class SessionCommandService : public SessionCommand + , boost::noncopyable { + CommandDispatch& dispatcher_; + /* === Implementation of the Facade Interface === */ @@ -84,7 +89,7 @@ namespace control { ServiceInstanceHandle serviceInstance_; public: - SessionCommandService(); + SessionCommandService (CommandDispatch& dispatcherLoopInterface); };