#ifndef __dvb_idvb_h
#define __dvb_idvb_h
+#include <config.h>
+#if HAVE_DVB_API_VERSION < 3
+#include <ost/frontend.h>
+#define FRONTENDPARAMETERS FrontendParameters
+#else
+#include <linux/dvb/frontend.h>
+#define FRONTENDPARAMETERS struct dvb_frontend_parameters
+#endif
#include <lib/base/object.h>
#include <lib/base/ebase.h>
#include <lib/service/service.h>
setTransportStreamID(chid.transport_stream_id);
}
- void getChannelID(eDVBChannelID &chid)
+ void getChannelID(eDVBChannelID &chid) const
{
chid = eDVBChannelID(getDVBNamespace(), getTransportStreamID(), getOriginalNetworkID());
}
};
+////////////////// TODO: we need an interface here, but what exactly?
+
+#include <set>
+// btw, still implemented in db.cpp. FIX THIS, TOO.
+
+class eDVBChannelQuery;
+
+class eDVBService: public iStaticServiceInformation
+{
+ DECLARE_REF;
+public:
+ eDVBService();
+ std::string m_service_name;
+ std::string m_provider_name;
+
+ int m_flags;
+ std::set<int> m_ca;
+ std::map<int,int> m_cache;
+ virtual ~eDVBService();
+
+ eDVBService &operator=(const eDVBService &);
+
+ // iStaticServiceInformation
+ RESULT getName(const eServiceReference &ref, std::string &name);
+
+ // for filtering:
+ int checkFilter(const eServiceReferenceDVB &ref, const eDVBChannelQuery &query);
+};
+
+//////////////////
+
class iDVBChannel;
class iDVBDemux;
class iDVBFrontendParameters;
-class iDVBChannelList: public virtual iObject
+class iDVBChannelListQuery: public iObject
{
public:
+ virtual RESULT getNextResult(eServiceReferenceDVB &ref)=0;
+};
+
+class eDVBChannelQuery: public iObject
+{
+ DECLARE_REF;
+public:
+ enum
+ {
+ tName,
+ tProvider,
+ tType,
+ tBouquet,
+ tSatellitePosition,
+ tChannelID,
+ tAND,
+ tOR
+ };
+
+ int m_type;
+ int m_inverse;
+
+ std::string m_string;
+ int m_int;
+ eDVBChannelID m_channelid;
+
+ static RESULT compile(ePtr<eDVBChannelQuery> &res, std::string query);
+
+ ePtr<eDVBChannelQuery> m_p1, m_p2;
+};
+
+class iDVBChannelList: public iObject
+{
+public:
+ virtual RESULT addChannelToList(const eDVBChannelID &id, iDVBFrontendParameters *feparm)=0;
+ virtual RESULT removeChannel(const eDVBChannelID &id)=0;
+
virtual RESULT getChannelFrontendData(const eDVBChannelID &id, ePtr<iDVBFrontendParameters> &parm)=0;
+
+ virtual RESULT addService(const eServiceReferenceDVB &service, eDVBService *service)=0;
+ virtual RESULT getService(const eServiceReferenceDVB &reference, ePtr<eDVBService> &service)=0;
+
+ virtual RESULT startQuery(ePtr<iDVBChannelListQuery> &query, eDVBChannelQuery *query)=0;
};
-class iDVBResourceManager: public virtual iObject
+class iDVBResourceManager: public iObject
{
public:
/*
void set(const TerrestrialDeliverySystemDescriptor &);
};
-class iDVBFrontendParameters: public virtual iObject
+class iDVBFrontendParameters: public iObject
{
public:
virtual RESULT getSystem(int &type) const = 0;
class iDVBSatelliteEquipmentControl;
-class iDVBFrontend: public virtual iObject
+class iDVBFrontend: public iObject
{
public:
enum {
class iDVBSatelliteEquipmentControl: public iObject
{
public:
- virtual RESULT prepare(iDVBFrontend &frontend, struct dvb_frontend_parameters &parm, eDVBFrontendParametersSatellite &sat)=0;
+ virtual RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, eDVBFrontendParametersSatellite &sat)=0;
};
struct eDVBCIRouting
int enabled;
};
-class iDVBChannel: public virtual iObject
+class iDVBChannel: public iObject
{
public:
enum
class iDVBSectionReader;
class iTSMPEGDecoder;
-class iDVBDemux: public virtual iObject
+class iDVBDemux: public iObject
{
public:
virtual RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader)=0;