diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-23 02:01:05 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-23 02:01:05 +0000 |
| commit | 1c384bc7cd9e5e2222c275a7a6b47bfd5712e870 (patch) | |
| tree | 940f006f4b52b35ff204fd63f8b55c5690638dd1 /lib | |
| parent | 5c644fbbceaa79a49501975de16b090771edee29 (diff) | |
| download | enigma2-1c384bc7cd9e5e2222c275a7a6b47bfd5712e870.tar.gz enigma2-1c384bc7cd9e5e2222c275a7a6b47bfd5712e870.zip | |
add ability to access eDVBLocalTimeHandler from python
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dvb/dvbtime.h | 7 | ||||
| -rw-r--r-- | lib/python/enigma_python.i | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/dvb/dvbtime.h b/lib/dvb/dvbtime.h index 34c5d5f6..a0b570dd 100644 --- a/lib/dvb/dvbtime.h +++ b/lib/dvb/dvbtime.h @@ -1,6 +1,8 @@ #ifndef __LIB_DVB_DVBTIME_H_ #define __LIB_DVB_DVBTIME_H_ +#ifndef SWIG + #include <lib/base/eerror.h> #include <lib/dvb/esection.h> #include <dvbsi++/time_date_section.h> @@ -33,6 +35,8 @@ public: int getUpdateCount() { return update_count; } }; +#endif // SWIG + class eDVBLocalTimeHandler: public Object { struct channel_data @@ -57,9 +61,12 @@ class eDVBLocalTimeHandler: public Object void updateTime(time_t tp_time, eDVBChannel*, int updateCount); static eDVBLocalTimeHandler *instance; public: +#ifndef SWIG PSignal0<void> m_timeUpdated; eDVBLocalTimeHandler(); ~eDVBLocalTimeHandler(); +#endif + time_t nowTime() const { return m_time_ready ? ::time(0)+m_time_difference : -1; } bool ready() const { return m_time_ready; } int difference() const { return m_time_difference; } static eDVBLocalTimeHandler *getInstance() { return instance; } diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i index d0d46723..8d18e416 100644 --- a/lib/python/enigma_python.i +++ b/lib/python/enigma_python.i @@ -72,6 +72,7 @@ is usually caused by not marking PSignals as immutable. #include <lib/dvb/sec.h> #include <lib/dvb/epgcache.h> #include <lib/dvb/frontendparms.h> +#include <lib/dvb/dvbtime.h> #include <lib/driver/avswitch.h> #include <lib/driver/rfmod.h> #include <lib/driver/etimezone.h> @@ -168,6 +169,7 @@ typedef long time_t; %include <lib/dvb/sec.h> %include <lib/dvb/epgcache.h> %include <lib/dvb/frontendparms.h> +%include <lib/dvb/dvbtime.h> %include <lib/driver/avswitch.h> %include <lib/driver/rfmod.h> %include <lib/driver/etimezone.h> |
