dvbtime.h/cpp: add possibility to build a 16bit hash with event start time and month day
[enigma2.git] / lib / dvb / dvbtime.h
index f403ffd4d17985c7fd3f341e54f3d05e157b3ef9..c49e67e3905f3a38bc42a8060e9ac0acb257e769 100644 (file)
@@ -25,7 +25,7 @@ inline int toBCD(int dec)
        return int(dec/10)*0x10 + dec%10;
 }
 
-time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5);
+time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5, __u16 *hash=0);
 
 class TDT: public eGTable
 {
@@ -54,6 +54,8 @@ class eDVBLocalTimeHandler: public Object
                ePtr<eConnection> m_stateChangedConn;
                int m_prevChannelState;
        };
+       bool m_use_dvb_time;
+       ePtr<eTimer> m_updateNonTunedTimer;
        friend class TDT;
        std::map<iDVBChannel*, channel_data> m_knownChannels;
        std::map<eDVBChannelID,int> m_timeOffsetMap;
@@ -66,6 +68,7 @@ class eDVBLocalTimeHandler: public Object
        void readTimeOffsetData(const char*);
        void writeTimeOffsetData(const char*);
        void updateTime(time_t tp_time, eDVBChannel*, int updateCount);
+       void updateNonTuned();
        static eDVBLocalTimeHandler *instance;
 #ifdef SWIG
        eDVBLocalTimeHandler();
@@ -76,6 +79,8 @@ public:
        eDVBLocalTimeHandler();
        ~eDVBLocalTimeHandler();
 #endif
+       bool getUseDVBTime() { return m_use_dvb_time; }
+       void setUseDVBTime(bool b);
        PSignal0<void> m_timeUpdated;
        bool ready() const { return m_time_ready; }
        static eDVBLocalTimeHandler *getInstance() { return instance; }