From 1cdf6cb021fcaa6548b90ba7b6765cf1e8b8b37b Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Fri, 25 Feb 2005 01:46:44 +0000 Subject: - work on actions - changed time when screens are acutally constructed - added service name (not working atm) and event info (now&next) --- lib/service/event.h | 6 ++++-- lib/service/iservice.h | 10 +--------- lib/service/servicedvb.cpp | 6 +++++- lib/service/servicedvb.h | 1 + 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'lib/service') diff --git a/lib/service/event.h b/lib/service/event.h index 967f9efa..094b080a 100644 --- a/lib/service/event.h +++ b/lib/service/event.h @@ -1,5 +1,5 @@ -#ifndef __service_ievent_h -#define __service_ievent_h +#ifndef __lib_service_event_h +#define __lib_service_event_h #include #include @@ -18,4 +18,6 @@ public: RESULT parseFrom(Event *evt); }; +TEMPLATE_TYPEDEF(ePtr, eServiceEventPtr); + #endif diff --git a/lib/service/iservice.h b/lib/service/iservice.h index f699bdb9..c58421ed 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -6,14 +6,6 @@ #include #include -#ifdef SWIG -#define TEMPLATE_TYPEDEF(x, y) \ -%template(y) x; \ -typedef x y -#else -#define TEMPLATE_TYPEDEF(x, y) typedef x y -#endif - class eServiceReference { public: @@ -184,7 +176,7 @@ public: evEnd, // when iServiceInformation is implemented: - evNewEvent + evUpdatedEventInfo }; virtual RESULT connectEvent(const Slot2 &event, ePtr &connection)=0; virtual RESULT start()=0; diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 06b6d97f..48d00d65 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -146,6 +146,7 @@ eDVBServicePlay::~eDVBServicePlay() void eDVBServicePlay::gotNewEvent() { +#if 0 // debug only ePtr m_event_now, m_event_next; getEvent(m_event_now, 0); @@ -155,6 +156,8 @@ void eDVBServicePlay::gotNewEvent() eDebug("now running: %s (%d seconds :)", m_event_now->m_event_name.c_str(), m_event_now->m_duration); if (m_event_next) eDebug("next running: %s (%d seconds :)", m_event_next->m_event_name.c_str(), m_event_next->m_duration); +#endif + m_event((iPlayableService*)this, evUpdatedEventInfo); } void eDVBServicePlay::serviceEvent(int event) @@ -254,7 +257,8 @@ RESULT eDVBServicePlay::stop() RESULT eDVBServicePlay::connectEvent(const Slot2 &event, ePtr &connection) { - return -1; + connection = new eConnection((iPlayableService*)this, m_event.connect(event)); + return 0; } RESULT eDVBServicePlay::pause(ePtr &ptr) diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index 941ad7bd..2e8d899a 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -51,6 +51,7 @@ private: void gotNewEvent(); void serviceEvent(int event); + Signal2 m_event; public: virtual ~eDVBServicePlay(); -- cgit v1.2.3