From 8105be399ed042cbadeb736dc0c829f63fe40065 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 20 Jan 2017 02:40:38 +0100 Subject: [PATCH] GuiNotification: demote this service to be just a BusTerm in fact it just does not fulfil any of the behavioural properties of a full-fledged UI-Element. All it needs is an uplink bus connection, so let's just keep it as that Sidenote: I've realised today that such a "free standing" BusTerm without registration in Nexus is a good idea and acceptable solution. --- src/gui/notification-service.cpp | 22 +++++++++----------- src/gui/notification-service.hpp | 17 +++++++--------- wiki/thinkPad.ichthyo.mm | 35 +++++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/src/gui/notification-service.cpp b/src/gui/notification-service.cpp index f7f53e53b..0d909f720 100644 --- a/src/gui/notification-service.cpp +++ b/src/gui/notification-service.cpp @@ -43,7 +43,7 @@ extern "C" { namespace gui { using lib::diff::TreeMutator; - using model::Controller; + using gui::ctrl::BusTerm; using std::string; using util::cStr; @@ -64,13 +64,6 @@ namespace gui { } - void - NotificationService::buildMutator (TreeMutator::Handle buffer) - { - UNIMPLEMENTED ("in which way to bind the Notification service for diff messages??"); - } - - namespace { // facade implementation details @@ -184,8 +177,15 @@ namespace gui { - NotificationService::NotificationService (ctrl::BusTerm& nexus) - : Controller{lib::idi::EntryID{}, nexus} + /** + * When started, NotificationService connects to the [UI-Bus](ui-bus.hpp) via + * the provided connection. This is a simple, unidirectional up-link connection, + * without actively adding NotificationService into the routing tables in [Nexus]. + * Yet this simple connection is sufficient to implement this service by talking + * to other facilities within the UI layer. + */ + NotificationService::NotificationService (ctrl::BusTerm& upLink) + : BusTerm{lib::idi::EntryID{}, upLink} , implInstance_(this,_instance) , serviceInstance_( LUMIERA_INTERFACE_REF (lumieraorg_GuiNotification, 0,lumieraorg_GuiNotificationService)) { @@ -193,6 +193,4 @@ namespace gui { } - - } // namespace gui diff --git a/src/gui/notification-service.hpp b/src/gui/notification-service.hpp index 56772a141..8c947807e 100644 --- a/src/gui/notification-service.hpp +++ b/src/gui/notification-service.hpp @@ -41,7 +41,7 @@ #include "include/gui-notification-facade.h" #include "common/instancehandle.hpp" -#include "gui/model/controller.hpp" +#include "gui/ctrl/bus-term.hpp" #include "lib/singleton-ref.hpp" @@ -58,13 +58,14 @@ namespace gui { * a forwarding proxy within the application core to * route calls through this interface. * - * @todo the ctor of this class should take references - * to any internal service providers within the - * GUI which are needed to implement the service. + * @note the ctor of this class establishes an "up-link" + * connection to the [UI-Bus](ui-bus.hpp), which + * enables the service implementation to talk to + * other facilities within the UI. */ class NotificationService : public GuiNotification - , public model::Controller + , public ctrl::BusTerm { /* === Implementation of the Facade Interface === */ @@ -83,13 +84,9 @@ namespace gui { ServiceInstanceHandle serviceInstance_; - /* === Control Interface === */ - - /** set up a binding to respond to mutation messages via UiBus */ - virtual void buildMutator (lib::diff::TreeMutator::Handle) override; public: - NotificationService(ctrl::BusTerm& nexus); + NotificationService (ctrl::BusTerm& upLink); }; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 8257dcaba..8cb4ec907 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -337,7 +337,7 @@ - + @@ -353,6 +353,32 @@ + + + + + + +

+ wirkt alles mehr oder weniger beliebig... +

+ + +
+
+ + + +
+ + + + + + + + + @@ -502,6 +528,13 @@
+ + + + + + +