remove older no more needed events from epgcache
[enigma2.git] / lib / dvb / epgcache.h
index 9f94d5caaee61c390e8d9abd26311d59b5a7f2b7..749854a5f8191ac3e0a741b24b2a484d28aeaf97 100644 (file)
@@ -139,7 +139,7 @@ public:
        int getDuration()
        {
                return fromBCD(EITdata[7])*3600+fromBCD(EITdata[8])*60+fromBCD(EITdata[9]);
- }
      }
 };
 #endif
 
@@ -159,16 +159,15 @@ class eEPGCache: public eMainloop, private eThread, public Object
                ePtr<iDVBSectionReader> m_NowNextReader, m_ScheduleReader, m_ScheduleOtherReader;
                tidMap seenSections[3], calcedSections[3];
 #ifdef ENABLE_PRIVATE_EPG
-#ifdef NEED_DEMUX_WORKAROUND
+               eTimer startPrivateTimer;
                int m_PrevVersion;
-#endif
                int m_PrivatePid;
                uniqueEPGKey m_PrivateService;
                ePtr<eConnection> m_PrivateConn;
                ePtr<iDVBSectionReader> m_PrivateReader;
                std::set<__u8> seenPrivateSections;
                void readPrivateData(const __u8 *data);
-               void startPrivateReader(int pid, int version);
+               void startPrivateReader();
 #endif
                void readData(const __u8 *data);
                void startChannel();
@@ -177,8 +176,9 @@ class eEPGCache: public eMainloop, private eThread, public Object
                void abortEPG();
                void abortNonAvail();
        };
+       void FixOverlapping(std::pair<eventMap,timeMap> &servicemap, time_t TM, int duration, const timeMap::iterator &tm_it, const uniqueEPGKey &service);
 public:
-       enum {NOWNEXT=1, SCHEDULE=2, SCHEDULE_OTHER=4};
+       enum {PRIVATE=0, NOWNEXT=1, SCHEDULE=2, SCHEDULE_OTHER=4};
        struct Message
        {
                enum
@@ -296,7 +296,17 @@ public:
        RESULT lookupEventTime(const eServiceReference &service, time_t, Event* &, int direction=0);
        RESULT getNextTimeEntry(Event *&);
 #endif
+       enum {
+               SIMILAR_BROADCASTINGS_SEARCH,
+               EXAKT_TITLE_SEARCH,
+               PARTIAL_TITLE_SEARCH
+       };
+       enum {
+               CASE_CHECK,
+               NO_CASE_CHECK
+       };
        PyObject *lookupEvent(PyObject *list, PyObject *convertFunc=NULL);
+       PyObject *search(PyObject *);
 
        // eServiceEvent are parsed epg events.. it's safe to use them after cache unlock
        // for use from python ( members: m_start_time, m_duration, m_short_description, m_extended_description )