aboutsummaryrefslogtreecommitdiff
path: root/lib/service
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-02-25 01:46:44 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-02-25 01:46:44 +0000
commit1cdf6cb021fcaa6548b90ba7b6765cf1e8b8b37b (patch)
tree5bd4dbac6538cf499f641849d26193958b48a187 /lib/service
parente677ac4a7bf81391877c909a703e5918ce4a511b (diff)
downloadenigma2-1cdf6cb021fcaa6548b90ba7b6765cf1e8b8b37b.tar.gz
enigma2-1cdf6cb021fcaa6548b90ba7b6765cf1e8b8b37b.zip
- work on actions
- changed time when screens are acutally constructed - added service name (not working atm) and event info (now&next)
Diffstat (limited to 'lib/service')
-rw-r--r--lib/service/event.h6
-rw-r--r--lib/service/iservice.h10
-rw-r--r--lib/service/servicedvb.cpp6
-rw-r--r--lib/service/servicedvb.h1
4 files changed, 11 insertions, 12 deletions
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 <time.h>
#include <lib/base/object.h>
@@ -18,4 +18,6 @@ public:
RESULT parseFrom(Event *evt);
};
+TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, 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 <connection.h>
#include <list>
-#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<void,iPlayableService*,int> &event, ePtr<eConnection> &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<eServiceEvent> 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<void,iPlayableService*,int> &event, ePtr<eConnection> &connection)
{
- return -1;
+ connection = new eConnection((iPlayableService*)this, m_event.connect(event));
+ return 0;
}
RESULT eDVBServicePlay::pause(ePtr<iPauseableService> &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<void,iPlayableService*,int> m_event;
public:
virtual ~eDVBServicePlay();