aboutsummaryrefslogtreecommitdiff
path: root/lib/service
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-17 13:14:15 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-17 13:14:15 +0000
commitbbedbd76e313e3115580d819efc608d3ad9dfc9d (patch)
tree14622f4a3ad4cd3f2274e86f13317ad88797022e /lib/service
parent3b49e3b920ae79363037857acd70a8a5d5a1c11d (diff)
downloadenigma2-bbedbd76e313e3115580d819efc608d3ad9dfc9d.tar.gz
enigma2-bbedbd76e313e3115580d819efc608d3ad9dfc9d.zip
rename iFrontendStatusInformation to iFrontendInformation
add possibility to query the tuner number for playing and recording services
Diffstat (limited to 'lib/service')
-rw-r--r--lib/service/iservice.h16
-rw-r--r--lib/service/servicedvb.cpp8
-rw-r--r--lib/service/servicedvb.h22
-rw-r--r--lib/service/servicedvbrecord.cpp6
-rw-r--r--lib/service/servicedvbrecord.h5
-rw-r--r--lib/service/servicemp3.h2
6 files changed, 36 insertions, 23 deletions
diff --git a/lib/service/iservice.h b/lib/service/iservice.h
index a24b8b21..ca2348ca 100644
--- a/lib/service/iservice.h
+++ b/lib/service/iservice.h
@@ -285,25 +285,26 @@ public:
TEMPLATE_TYPEDEF(ePtr<iServiceInformation>, iServiceInformationPtr);
-class iFrontendStatusInformation: public iObject
+class iFrontendInformation: public iObject
{
#ifdef SWIG
- iFrontendStatusInformation();
- ~iFrontendStatusInformation();
+ iFrontendInformation();
+ ~iFrontendInformation();
#endif
public:
enum {
bitErrorRate,
signalPower,
signalQuality,
- LockState,
- SyncState
+ lockState,
+ syncState,
+ frontendNumber
};
virtual int getFrontendInfo(int w)=0;
virtual PyObject *getFrontendData(bool original=false)=0;
};
-TEMPLATE_TYPEDEF(ePtr<iFrontendStatusInformation>, iFrontendStatusInformationPtr);
+TEMPLATE_TYPEDEF(ePtr<iFrontendInformation>, iFrontendInformationPtr);
class iPauseableService: public iObject
{
@@ -475,7 +476,7 @@ public:
virtual SWIG_VOID(RESULT) audioTracks(ePtr<iAudioTrackSelection> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) audioChannel(ePtr<iAudioChannelSelection> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) subServices(ePtr<iSubserviceList> &SWIG_OUTPUT)=0;
- virtual SWIG_VOID(RESULT) frontendStatusInfo(ePtr<iFrontendStatusInformation> &SWIG_OUTPUT)=0;
+ virtual SWIG_VOID(RESULT) frontendInfo(ePtr<iFrontendInformation> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) timeshift(ePtr<iTimeshiftService> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) cueSheet(ePtr<iCueSheet> &SWIG_OUTPUT)=0;
};
@@ -492,6 +493,7 @@ public:
virtual RESULT prepare(const char *filename, time_t begTime=-1, time_t endTime=-1, int eit_event_id=-1)=0;
virtual RESULT start()=0;
virtual RESULT stop()=0;
+ virtual SWIG_VOID(RESULT) frontendInfo(ePtr<iFrontendInformation> &SWIG_OUTPUT)=0;
};
TEMPLATE_TYPEDEF(ePtr<iRecordableService>, iRecordableServicePtr);
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index b99357c5..928690d0 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -985,7 +985,7 @@ RESULT eDVBServicePlay::isCurrentlySeekable()
return m_is_pvr || m_timeshift_active;
}
-RESULT eDVBServicePlay::frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr)
+RESULT eDVBServicePlay::frontendInfo(ePtr<iFrontendInformation> &ptr)
{
ptr = this;
return 0;
@@ -1279,10 +1279,8 @@ RESULT eDVBServicePlay::selectChannel(int i)
}
}
-int eDVBServicePlay::getFrontendInfo(int w)
+int eDVBServiceBase::getFrontendInfo(int w)
{
- if (m_is_pvr)
- return 0;
eUsePtr<iDVBChannel> channel;
if(m_service_handler.getChannel(channel))
return 0;
@@ -1292,7 +1290,7 @@ int eDVBServicePlay::getFrontendInfo(int w)
return fe->readFrontendData(w);
}
-PyObject *eDVBServicePlay::getFrontendData(bool original)
+PyObject *eDVBServiceBase::getFrontendData(bool original)
{
PyObject *ret=0;
diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h
index 79e8d540..da307324 100644
--- a/lib/service/servicedvb.h
+++ b/lib/service/servicedvb.h
@@ -56,10 +56,20 @@ private:
eBouquet *m_bouquet;
};
-class eDVBServicePlay: public iPlayableService, public iPauseableService,
+class eDVBServiceBase: public iFrontendInformation
+{
+protected:
+ eDVBServicePMTHandler m_service_handler;
+public:
+ // iFrontendInformation
+ int getFrontendInfo(int w);
+ PyObject *getFrontendData(bool);
+};
+
+class eDVBServicePlay: public eDVBServiceBase,
+ public iPlayableService, public iPauseableService,
public iSeekableService, public Object, public iServiceInformation,
public iAudioTrackSelection, public iAudioChannelSelection,
- public iFrontendStatusInformation,
public iSubserviceList, public iTimeshiftService,
public iCueSheet
{
@@ -78,7 +88,7 @@ public:
RESULT info(ePtr<iServiceInformation> &ptr);
RESULT audioChannel(ePtr<iAudioChannelSelection> &ptr);
RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr);
- RESULT frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr);
+ RESULT frontendInfo(ePtr<iFrontendInformation> &ptr);
RESULT subServices(ePtr<iSubserviceList> &ptr);
RESULT timeshift(ePtr<iTimeshiftService> &ptr);
RESULT cueSheet(ePtr<iCueSheet> &ptr);
@@ -113,10 +123,6 @@ public:
int getCurrentChannel();
RESULT selectChannel(int i);
- // iFrontendStatusInformation
- int getFrontendInfo(int w);
- PyObject *getFrontendData(bool);
-
// iSubserviceList
int getNumberOfSubservices();
RESULT getSubservice(eServiceReference &subservice, unsigned int n);
@@ -142,7 +148,7 @@ private:
int m_is_primary;
/* in timeshift mode, we essentially have two channels, and thus pmt handlers. */
- eDVBServicePMTHandler m_service_handler, m_service_handler_timeshift;
+ eDVBServicePMTHandler m_service_handler_timeshift;
eDVBServiceEITHandler m_event_handler;
eDVBServicePlay(const eServiceReference &ref, eDVBService *service);
diff --git a/lib/service/servicedvbrecord.cpp b/lib/service/servicedvbrecord.cpp
index d0da074a..4c41b5ed 100644
--- a/lib/service/servicedvbrecord.cpp
+++ b/lib/service/servicedvbrecord.cpp
@@ -276,3 +276,9 @@ int eDVBServiceRecord::doRecord()
}
return 0;
}
+
+RESULT eDVBServiceRecord::frontendInfo(ePtr<iFrontendInformation> &ptr)
+{
+ ptr = this;
+ return 0;
+}
diff --git a/lib/service/servicedvbrecord.h b/lib/service/servicedvbrecord.h
index dd00ee8f..2b93b45a 100644
--- a/lib/service/servicedvbrecord.h
+++ b/lib/service/servicedvbrecord.h
@@ -10,7 +10,8 @@
#include <lib/service/servicedvb.h>
-class eDVBServiceRecord: public iRecordableService, public Object
+class eDVBServiceRecord: public eDVBServiceBase,
+ public iRecordableService, public Object
{
DECLARE_REF(eDVBServiceRecord);
public:
@@ -24,7 +25,6 @@ private:
eDVBServiceRecord(const eServiceReferenceDVB &ref);
eServiceReferenceDVB m_ref;
- eDVBServicePMTHandler m_service_handler;
void serviceEvent(int event);
ePtr<iDVBTSRecorder> m_record;
@@ -36,6 +36,7 @@ private:
int doPrepare();
int doRecord();
+ RESULT frontendInfo(ePtr<iFrontendInformation> &ptr);
};
#endif
diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h
index c6a0df06..e430dce0 100644
--- a/lib/service/servicemp3.h
+++ b/lib/service/servicemp3.h
@@ -60,7 +60,7 @@ public:
// not implemented (yet)
RESULT audioChannel(ePtr<iAudioChannelSelection> &ptr) { ptr = 0; return -1; }
RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr) { ptr = 0; return -1; }
- RESULT frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr) { ptr = 0; return -1; }
+ RESULT frontendInfo(ePtr<iFrontendInformation> &ptr) { ptr = 0; return -1; }
RESULT subServices(ePtr<iSubserviceList> &ptr) { ptr = 0; return -1; }
RESULT timeshift(ePtr<iTimeshiftService> &ptr) { ptr = 0; return -1; }
RESULT cueSheet(ePtr<iCueSheet>& ptr) { ptr = 0; return -1; }