From aa8ad39cc936c7de63818d4307d8ac6a4dff5530 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Sun, 24 Feb 2019 14:28:12 -0500 Subject: Get App Service Data With Subscribe (#2812) * Initial app service app extension * Add GetAppServiceData rpc templates. * Add request to mobile, and fix HMI GASD naming * Add Core->Mobile Requests and Responses * HMI GetAppService Request/Response to hmi and from hmi. * Add mobile on event handling * Fix GASD Response From Mobile * Fixes for GetAppServiceData subscribe, and OnAppServiceData Fixes allow for multiple consumers on a single app service type. Consumer/provider can be any combination of an ios app(s), android app(s), or an ivi HMI app(s). * Update AppServicetype to string and fix unit tests * Address review comments * Address comments * Address comments * Pass info from provider in GASD response --- .../event_engine/event_dispatcher.h | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h') diff --git a/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h b/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h index 813dda0295..0656372f47 100644 --- a/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h +++ b/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h @@ -77,6 +77,42 @@ class EventDispatcher { */ virtual void remove_observer(EventObserver& observer) = 0; + // Mobile Events + + /* + * @brief Delivers the event to all subscribers + * + * @param event Received event + */ + virtual void raise_mobile_event(const MobileEvent& event) = 0; + + /* + * @brief Subscribe the observer to event + * + * @param event_id The event ID to subscribe for + * @param hmi_correlation_id The event HMI correlation ID + * @param observer The observer to subscribe for event + */ + virtual void add_mobile_observer(const MobileEvent::MobileEventID& event_id, + int32_t mobile_correlation_id, + EventObserver& observer) = 0; + + /* + * @brief Unsubscribes the observer from specific event + * + * @param event_id The event ID to unsubscribe from + * @param observer The observer to be unsubscribed + */ + virtual void remove_mobile_observer( + const MobileEvent::MobileEventID& event_id, EventObserver& observer) = 0; + + /* + * @brief Unsubscribes the observer from all events + * + * @param observer The observer to be unsubscribed + */ + virtual void remove_mobile_observer(EventObserver& observer) = 0; + /* * @brief Destructor */ -- cgit v1.2.1