1 #ifndef __dvb_frontend_h
2 #define __dvb_frontend_h
5 #include <lib/dvb/idvb.h>
6 #include <lib/dvb/sec.h>
10 class eDVBFrontendParameters: public iDVBFrontendParameters
12 DECLARE_REF(eDVBFrontendParameters);
15 eDVBFrontendParametersSatellite sat;
16 eDVBFrontendParametersCable cable;
17 eDVBFrontendParametersTerrestrial terrestrial;
21 eDVBFrontendParameters();
23 RESULT getSystem(int &type) const;
24 RESULT getDVBS(eDVBFrontendParametersSatellite &p) const;
25 RESULT getDVBC(eDVBFrontendParametersCable &p) const;
26 RESULT getDVBT(eDVBFrontendParametersTerrestrial &p) const;
28 RESULT setDVBS(eDVBFrontendParametersSatellite &p);
29 RESULT setDVBC(eDVBFrontendParametersCable &p);
30 RESULT setDVBT(eDVBFrontendParametersTerrestrial &p);
32 RESULT calculateDifference(const iDVBFrontendParameters *parm, int &diff) const;
34 RESULT getHash(unsigned long &hash) const;
37 class eDVBFrontend: public iDVBFrontend, public Object
39 DECLARE_REF(eDVBFrontend);
42 #if HAVE_DVB_API_VERSION < 3
45 FRONTENDPARAMETERS parm;
47 Signal1<void,iDVBFrontend*> m_stateChanged;
48 ePtr<iDVBSatelliteEquipmentControl> m_sec;
49 eSocketNotifier *m_sn;
54 eSecCommandList m_sec_sequence;
56 int m_data[7]; /* when satellite frontend then
57 data[0] = lastcsw -> state of the committed switch
58 data[1] = lastucsw -> state of the uncommitted switch
59 data[2] = lastToneburst -> current state of toneburst switch
60 data[3] = newRotorCmd -> last sent rotor cmd
61 data[4] = newRotorPos -> current Rotor Position
63 data[6] = curRotorPos */
66 int m_runningInputpower;
67 int m_timeoutCount; // needed for timeout
71 void tuneLoop(); // called by m_tuneTimer
74 bool setSecSequencePos(int steps);
76 eDVBFrontend(int adap, int fe, int &ok);
77 virtual ~eDVBFrontend();
79 RESULT getFrontendType(int &type);
80 RESULT tune(const iDVBFrontendParameters &where);
81 RESULT connectStateChange(const Slot1<void,iDVBFrontend*> &stateChange, ePtr<eConnection> &connection);
82 RESULT getState(int &state);
83 RESULT setTone(int tone);
84 RESULT setVoltage(int voltage);
85 RESULT sendDiseqc(const eDVBDiseqcCommand &diseqc);
86 RESULT sendToneburst(int burst);
87 RESULT setSEC(iDVBSatelliteEquipmentControl *sec);
88 RESULT setSecSequence(const eSecCommandList &list);
89 RESULT getData(int num, int &data);
90 RESULT setData(int num, int val);