aboutsummaryrefslogtreecommitdiff
path: root/lib/service
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-02 11:11:00 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-02 11:11:00 +0000
commitf15ee3f6cd34e4552f50dcc92a994198ed3b2dfe (patch)
treeebefc3dbe285fc4698030fc6e520ef55ff14fd98 /lib/service
parentac16b9b331350f9b15139394eafe4bf4f44e6151 (diff)
downloadenigma2-f15ee3f6cd34e4552f50dcc92a994198ed3b2dfe.tar.gz
enigma2-f15ee3f6cd34e4552f50dcc92a994198ed3b2dfe.zip
add support for listing satellites and providers
use this new stuff in a simple case study (green and yellow button in service list.. feel free to implement a cool satellites/providers tree) prepare for splitted radio/tv mode
Diffstat (limited to 'lib/service')
-rw-r--r--lib/service/iservice.h2
-rw-r--r--lib/service/listboxservice.cpp4
-rw-r--r--lib/service/servicedvb.cpp7
3 files changed, 9 insertions, 4 deletions
diff --git a/lib/service/iservice.h b/lib/service/iservice.h
index cbfd24a9..e4127fb9 100644
--- a/lib/service/iservice.h
+++ b/lib/service/iservice.h
@@ -43,10 +43,12 @@ public:
int data[8];
std::string path;
+ std::string getPath() { return path; }
// only for override service names in bouquets or to give servicerefs a name which not have a
// real existing service ( for dvb eServiceDVB )
std::string name;
+ std::string getName() { return name; }
eServiceReference()
: type(idInvalid), flags(0)
diff --git a/lib/service/listboxservice.cpp b/lib/service/listboxservice.cpp
index e1f1beb0..0b2e621c 100644
--- a/lib/service/listboxservice.cpp
+++ b/lib/service/listboxservice.cpp
@@ -152,8 +152,8 @@ void eListboxServiceContent::setElementFont(int element, gFont *font)
void eListboxServiceContent::sort()
{
ePtr<iListableService> lst;
- if (!m_service_center->list(m_root, lst))
- {
+ if (!m_service_center->list(m_root, lst))
+ {
m_list.sort(iListableServiceCompare(lst));
/* FIXME: is this really required or can we somehow keep the current entry? */
cursorHome();
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index 0de13215..14326914 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -359,9 +359,12 @@ RESULT eServiceFactoryDVB::list(const eServiceReference &ref, ePtr<iListableServ
RESULT eServiceFactoryDVB::info(const eServiceReference &ref, ePtr<iStaticServiceInformation> &ptr)
{
/* do we have a PVR service? */
- if (ref.flags & eServiceReference::flagDirectory) // bouquet
+ if ((ref.flags & eServiceReference::flagDirectory) == eServiceReference::flagDirectory) // bouquet
{
- ptr = new eStaticServiceDVBBouquetInformation;
+ if ( !ref.name.empty() )
+ ptr = new eStaticServiceDVBInformation;
+ else
+ ptr = new eStaticServiceDVBBouquetInformation;
return 0;
}
else if (!ref.path.empty())