aboutsummaryrefslogtreecommitdiff
path: root/lib/service
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-03 12:37:40 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-03 12:37:40 +0000
commit20fdb2a2af40da98427a702a03a79b1fbec3d7af (patch)
treeb0c7cbc1d6bda798795c27e23383436277189f01 /lib/service
parent738b4b576eee308b08d3769f6139f989f970a62d (diff)
downloadenigma2-20fdb2a2af40da98427a702a03a79b1fbec3d7af.tar.gz
enigma2-20fdb2a2af40da98427a702a03a79b1fbec3d7af.zip
remove non working indication of playable services in servicelist
get current event in listboxservicecontent via iStaticServiceInformation instead of use directly eEPGCache
Diffstat (limited to 'lib/service')
-rw-r--r--lib/service/iservice.h4
-rw-r--r--lib/service/listboxservice.cpp21
-rw-r--r--lib/service/listboxservice.h5
-rw-r--r--lib/service/service.cpp11
-rw-r--r--lib/service/servicedvb.cpp14
5 files changed, 29 insertions, 26 deletions
diff --git a/lib/service/iservice.h b/lib/service/iservice.h
index e4127fb9..ab95ef79 100644
--- a/lib/service/iservice.h
+++ b/lib/service/iservice.h
@@ -3,6 +3,7 @@
#include <lib/python/swig.h>
#include <lib/base/object.h>
+#include <lib/service/event.h>
#include <string>
#include <connection.h>
#include <list>
@@ -172,7 +173,8 @@ public:
virtual SWIG_VOID(RESULT) getName(const eServiceReference &ref, std::string &SWIG_OUTPUT)=0;
// doesn't need to be implemented, should return -1 then.
- virtual int getLength(const eServiceReference &ref)=0;
+ virtual int getLength(const eServiceReference &ref);
+ virtual SWIG_VOID(RESULT) getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &SWIG_OUTPUT);
};
TEMPLATE_TYPEDEF(ePtr<iStaticServiceInformation>, iStaticServiceInformationPtr);
diff --git a/lib/service/listboxservice.cpp b/lib/service/listboxservice.cpp
index 9d68a5e8..4e20fcb7 100644
--- a/lib/service/listboxservice.cpp
+++ b/lib/service/listboxservice.cpp
@@ -166,12 +166,10 @@ void eListboxServiceContent::sort()
DEFINE_REF(eListboxServiceContent);
eListboxServiceContent::eListboxServiceContent()
- :m_epgcache(eEPGCache::getInstance()), m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_numberoffset(0)
+ :m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_numberoffset(0)
{
cursorHome();
eServiceCenter::getInstance(m_service_center);
- if (eDVBResourceManager::getInstance(m_res_mgr))
- eDebug("no resource manager");
}
void eListboxServiceContent::cursorHome()
@@ -339,17 +337,15 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
bool tuneable=true;
+#if 0
if (m_res_mgr && cursorValid() && !((m_cursor->flags & eServiceReference::flagDirectory) == eServiceReference::flagDirectory))
{
- if ( eDVBServicePMTHandler::getCount() > 1 )
- {
- eServiceReferenceDVB &ref = (eServiceReferenceDVB&) *m_cursor;
- eUsePtr<iDVBChannel> channel;
- eDVBChannelID chid;
- ref.getChannelID(chid);
- tuneable = !m_res_mgr->allocateChannel(chid, channel, true); // no real allocate channel..just fake
- }
+ eServiceReferenceDVB &ref = (eServiceReferenceDVB&) *m_cursor;
+ eDVBChannelID chid;
+ ref.getChannelID(chid);
+ tuneable = m_res_mgr->canAllocateChannel(chid);
}
+#endif
if (m_current_marked && selected)
style.setStyle(painter, eWindowStyle::styleListboxMarked);
@@ -401,8 +397,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
case celServiceInfo:
{
ePtr<eServiceEvent> evt;
- time_t t=-1;
- if ( !m_epgcache->lookupEventTime(*m_cursor, t, evt) )
+ if ( !service_info->getEvent(*m_cursor, evt) )
text = '(' + evt->getEventName() + ')';
else
continue;
diff --git a/lib/service/listboxservice.h b/lib/service/listboxservice.h
index 6e8d5017..b1cc249b 100644
--- a/lib/service/listboxservice.h
+++ b/lib/service/listboxservice.h
@@ -1,18 +1,13 @@
#ifndef __lib_service_listboxservice_h
#define __lib_service_listboxservice_h
-#include <lib/dvb/dvb.h>
#include <lib/gui/elistbox.h>
#include <lib/service/iservice.h>
#include <set>
-class eEPGCache;
-
class eListboxServiceContent: public virtual iListboxContent
{
DECLARE_REF(eListboxServiceContent);
- eEPGCache *m_epgcache;
- ePtr<eDVBResourceManager> m_res_mgr;
public:
eListboxServiceContent();
void setRoot(const eServiceReference &ref);
diff --git a/lib/service/service.cpp b/lib/service/service.cpp
index 62bbe12d..a7f6e529 100644
--- a/lib/service/service.cpp
+++ b/lib/service/service.cpp
@@ -133,6 +133,17 @@ RESULT iServiceHandler::info(const eServiceReference &, ePtr<iStaticServiceInfor
#include <lib/service/event.h>
+RESULT iStaticServiceInformation::getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &evt)
+{
+ evt = 0;
+ return -1;
+}
+
+int iStaticServiceInformation::getLength(const eServiceReference &ref)
+{
+ return -1;
+}
+
RESULT iServiceInformation::getEvent(ePtr<eServiceEvent> &evt, int m_nownext)
{
evt = 0;
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index 14326914..96f942ab 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -25,7 +25,7 @@ DEFINE_REF(eStaticServiceDVBInformation);
RESULT eStaticServiceDVBInformation::getName(const eServiceReference &ref, std::string &name)
{
- if ( ref.name.length() )
+ if ( !ref.name.empty() )
{
name = ref.name;
return 0;
@@ -358,25 +358,25 @@ RESULT eServiceFactoryDVB::list(const eServiceReference &ref, ePtr<iListableServ
RESULT eServiceFactoryDVB::info(const eServiceReference &ref, ePtr<iStaticServiceInformation> &ptr)
{
- /* do we have a PVR service? */
+ /* is a listable service? */
if ((ref.flags & eServiceReference::flagDirectory) == eServiceReference::flagDirectory) // bouquet
{
- if ( !ref.name.empty() )
+ if ( !ref.name.empty() ) // satellites or providers list
ptr = new eStaticServiceDVBInformation;
- else
+ else // a dvb bouquet
ptr = new eStaticServiceDVBBouquetInformation;
return 0;
}
- else if (!ref.path.empty())
+ else if (!ref.path.empty()) /* do we have a PVR service? */
{
ptr = new eStaticServiceDVBPVRInformation(ref);
return 0;
}
- else
+ else // normal dvb service
{
ePtr<eDVBService> service;
int r = lookupService(service, ref);
- if (r)
+ if (r) // no eDVBService avail for this reference ( Linkage Services... )
ptr = new eStaticServiceDVBInformation;
else
/* eDVBService has the iStaticServiceInformation interface, so we pass it here. */