X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f15ee3f6cd34e4552f50dcc92a994198ed3b2dfe..ca7d92c97764d916bb8dd6731efa1ccff693b944:/lib/dvb/db.h diff --git a/lib/dvb/db.h b/lib/dvb/db.h index 8bb0e5ae..430a5af0 100644 --- a/lib/dvb/db.h +++ b/lib/dvb/db.h @@ -1,20 +1,22 @@ #ifndef __db_h #define __db_h +#ifndef SWIG #include #include #include - class ServiceDescriptionSection; +#endif class eDVBDB: public iDVBChannelList { + static eDVBDB *instance; DECLARE_REF(eDVBDB); friend class eDVBDBQuery; friend class eDVBDBBouquetQuery; friend class eDVBDBSatellitesQuery; friend class eDVBDBProvidersQuery; -private: + struct channel { ePtr m_frontendParameters; @@ -25,16 +27,21 @@ private: std::map > m_services; std::map m_bouquets; +#ifdef SWIG + eDVBDB(); + ~eDVBDB(); +#endif public: - void load(); - void save(); - - void loadBouquet(const char *path); - void loadBouquets(); +// iDVBChannelList + RESULT removeFlags(unsigned int flagmask, int dvb_namespace=-1, int tsid=-1, int onid=-1, unsigned int orb_pos=0xFFFFFFFF); + RESULT removeServices(int dvb_namespace=-1, int tsid=-1, int onid=-1, unsigned int orb_pos=0xFFFFFFFF); + RESULT removeService(const eServiceReference &service); + RESULT addFlag(const eServiceReference &service, unsigned int flagmask); + RESULT removeFlag(const eServiceReference &service, unsigned int flagmask); +#ifndef SWIG + RESULT removeFlags(unsigned int flagmask, eDVBChannelID chid, unsigned int orb_pos); + RESULT removeServices(eDVBChannelID chid, unsigned int orb_pos); - eDVBDB(); - virtual ~eDVBDB(); - RESULT addChannelToList(const eDVBChannelID &id, iDVBFrontendParameters *feparm); RESULT removeChannel(const eDVBChannelID &id); @@ -47,8 +54,19 @@ public: RESULT startQuery(ePtr &query, eDVBChannelQuery *query, const eServiceReference &source); RESULT getBouquet(const eServiceReference &ref, eBouquet* &bouquet); +////// + void saveServicelist(); + void loadBouquet(const char *path); + eServiceReference searchReference(int tsid, int onid, int sid); + eDVBDB(); + virtual ~eDVBDB(); +#endif + static eDVBDB *getInstance() { return instance; } + void reloadServicelist(); + void reloadBouquets(); }; +#ifndef SWIG // we have to add a possibility to invalidate here. class eDVBDBQueryBase: public iDVBChannelListQuery { @@ -100,5 +118,6 @@ class eDVBDBProvidersQuery: public eDVBDBListQuery public: eDVBDBProvidersQuery(eDVBDB *db, const eServiceReference &source, eDVBChannelQuery *query); }; +#endif // SWIG #endif