X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fdb.h;h=098ee03ea3a9176af9ce394fe01b53b65cd973ac;hp=8bb0e5aeca2eae701a098a02aa6024f55dd580dd;hb=36cca1d3f31265929ef3443999ab7fd242b4dae5;hpb=f15ee3f6cd34e4552f50dcc92a994198ed3b2dfe diff --git a/lib/dvb/db.h b/lib/dvb/db.h index 8bb0e5a..098ee03 100644 --- a/lib/dvb/db.h +++ b/lib/dvb/db.h @@ -1,20 +1,22 @@ #ifndef __db_h #define __db_h -#include +#ifndef SWIG #include +#include #include - class ServiceDescriptionSection; +#endif class eDVBDB: public iDVBChannelList { -DECLARE_REF(eDVBDB); + DECLARE_REF(eDVBDB); + static eDVBDB *instance; friend class eDVBDBQuery; friend class eDVBDBBouquetQuery; friend class eDVBDBSatellitesQuery; friend class eDVBDBProvidersQuery; -private: + struct channel { ePtr m_frontendParameters; @@ -25,34 +27,57 @@ 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); + PyObject *readSatellites(SWIG_PYOBJECT(ePyObject) sat_list, SWIG_PYOBJECT(ePyObject) sat_dict, SWIG_PYOBJECT(ePyObject) tp_dict); + PyObject *readTerrestrials(SWIG_PYOBJECT(ePyObject) ter_list, SWIG_PYOBJECT(ePyObject) tp_dict); + PyObject *readCables(SWIG_PYOBJECT(ePyObject) cab_list, SWIG_PYOBJECT(ePyObject) tp_dict); +#ifndef SWIG + RESULT removeFlags(unsigned int flagmask, eDVBChannelID chid, unsigned int orb_pos); + RESULT removeServices(eDVBChannelID chid, unsigned int orb_pos); + RESULT removeServices(iDVBFrontendParameters *feparm); - eDVBDB(); - virtual ~eDVBDB(); - RESULT addChannelToList(const eDVBChannelID &id, iDVBFrontendParameters *feparm); RESULT removeChannel(const eDVBChannelID &id); RESULT getChannelFrontendData(const eDVBChannelID &id, ePtr &parm); - RESULT addService(const eServiceReferenceDVB &service, eDVBService *service); + RESULT addService(const eServiceReferenceDVB &referenc, eDVBService *service); RESULT getService(const eServiceReferenceDVB &reference, ePtr &service); RESULT flush(); - RESULT startQuery(ePtr &query, eDVBChannelQuery *query, const eServiceReference &source); + RESULT startQuery(ePtr &query, eDVBChannelQuery *q, const eServiceReference &source); RESULT getBouquet(const eServiceReference &ref, eBouquet* &bouquet); +////// + void loadBouquet(const char *path); + eServiceReference searchReference(int tsid, int onid, int sid); + eDVBDB(); + virtual ~eDVBDB(); +#endif + void loadServicelist(const char *filename); + static eDVBDB *getInstance() { return instance; } + void reloadServicelist(); + void saveServicelist(); + void saveServicelist(const char *file); + void reloadBouquets(); + void parseServiceData(ePtr s, std::string str); }; +#ifndef SWIG // we have to add a possibility to invalidate here. class eDVBDBQueryBase: public iDVBChannelListQuery { -DECLARE_REF(eDVBDBQueryBase); + DECLARE_REF(eDVBDBQueryBase); protected: ePtr m_db; ePtr m_query; @@ -100,5 +125,6 @@ class eDVBDBProvidersQuery: public eDVBDBListQuery public: eDVBDBProvidersQuery(eDVBDB *db, const eServiceReference &source, eDVBChannelQuery *query); }; +#endif // SWIG #endif