aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/dvbtime.h
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-07-02 09:27:18 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-07-02 09:27:18 +0000
commita8310a1a7345577916560e789cdb8c1712e620a9 (patch)
treee513e210bf51257962515ba9398226b885de5d57 /lib/dvb/dvbtime.h
parenta33ff213255db7f59090f70235ec06c502e2a2ce (diff)
downloadenigma2-a8310a1a7345577916560e789cdb8c1712e620a9.tar.gz
enigma2-a8310a1a7345577916560e789cdb8c1712e620a9.zip
add missing files, add ability to specify table_id mask and table_id ext mask
Diffstat (limited to 'lib/dvb/dvbtime.h')
-rw-r--r--lib/dvb/dvbtime.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/dvb/dvbtime.h b/lib/dvb/dvbtime.h
new file mode 100644
index 00000000..a1746b5e
--- /dev/null
+++ b/lib/dvb/dvbtime.h
@@ -0,0 +1,53 @@
+#ifndef __LIB_DVB_DVBTIME_H_
+#define __LIB_DVB_DVBTIME_H_
+
+#include <lib/base/eerror.h>
+#include <lib/dvb/esection.h>
+#include <lib/dvb_si/tdt.h>
+
+class eDVBChannel;
+
+time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5);
+
+class TDT: public eGTable
+{
+ eDVBChannel *chan;
+ ePtr<iDVBDemux> demux;
+ eTimer m_interval_timer;
+ int createTable(int nr, const __u8 *data, unsigned int max);
+ void ready(int);
+public:
+ TDT(eDVBChannel *chan);
+ void start();
+ void startTimer(int interval);
+};
+
+class eDVBLocalTimeHandler: public Object
+{
+ friend class TDT;
+ DECLARE_REF(eDVBLocalTimeHandler)
+ std::map<iDVBChannel*, TDT*> m_active_tables;
+ std::map<eDVBChannelID,int> m_timeOffsetMap;
+ ePtr<eConnection> m_chanAddedConn;
+ ePtr<eConnection> m_chanRemovedConn;
+ ePtr<eConnection> m_chanRunningConn;
+ bool m_time_ready;
+ int m_time_difference;
+ int m_last_tp_time_difference;
+ void DVBChannelAdded(eDVBChannel*);
+ void DVBChannelRemoved(eDVBChannel*);
+ void DVBChannelRunning(iDVBChannel*);
+ void readTimeOffsetData(const char*);
+ void writeTimeOffsetData(const char*);
+ void updateTime(time_t tp_time, eDVBChannel*);
+ static eDVBLocalTimeHandler *instance;
+public:
+ PSignal0<void> m_timeUpdated;
+ eDVBLocalTimeHandler();
+ ~eDVBLocalTimeHandler();
+ bool ready() { return m_time_ready; }
+ int difference() { return m_time_difference; }
+ static eDVBLocalTimeHandler *getInstance() { return instance; }
+};
+
+#endif // __LIB_DVB_DVBTIME_H_