diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-11-15 21:50:06 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-11-15 21:50:06 +0000 |
| commit | d6e0b1fd881d459036f5b7ace9fa7a61f6bcce8f (patch) | |
| tree | a6b1008c0248598da9ad84af86c01ac0036d3cb7 /lib/components | |
| parent | a8644e3e187fa0301e72ad752b1c8f2a20e848e5 (diff) | |
| download | enigma2-d6e0b1fd881d459036f5b7ace9fa7a61f6bcce8f.tar.gz enigma2-d6e0b1fd881d459036f5b7ace9fa7a61f6bcce8f.zip | |
add initial transponders from python
Diffstat (limited to 'lib/components')
| -rw-r--r-- | lib/components/scan.cpp | 39 | ||||
| -rw-r--r-- | lib/components/scan.h | 8 |
2 files changed, 43 insertions, 4 deletions
diff --git a/lib/components/scan.cpp b/lib/components/scan.cpp index cfbff6d8..fc2470f7 100644 --- a/lib/components/scan.cpp +++ b/lib/components/scan.cpp @@ -50,8 +50,38 @@ eComponentScan::~eComponentScan() { } +void eComponentScan::clear() +{ + m_initial.clear(); +} + +void eComponentScan::addInitial(const eDVBFrontendParametersSatellite &p) +{ + ePtr<eDVBFrontendParameters> parm = new eDVBFrontendParameters(); + parm->setDVBS(p); + m_initial.push_back(parm); +} + +void eComponentScan::addInitial(const eDVBFrontendParametersCable &p) +{ + ePtr<eDVBFrontendParameters> parm = new eDVBFrontendParameters(); + parm->setDVBC(p); + m_initial.push_back(parm); +} + +void eComponentScan::addInitial(const eDVBFrontendParametersTerrestrial &p) +{ + ePtr<eDVBFrontendParameters> parm = new eDVBFrontendParameters(); + parm->setDVBT(p); + m_initial.push_back(parm); +} + + int eComponentScan::start() { + if (m_initial.empty()) + return -2; + if (m_done != -1) return -1; @@ -60,7 +90,8 @@ int eComponentScan::start() eDVBResourceManager::getInstance(mgr); - eDVBFrontendParameters *fe = new eDVBFrontendParameters(); +#if 0 + ePtr<eDVBFrontendParameters> fe = new eDVBFrontendParameters(); #if 1 eDVBFrontendParametersSatellite fesat; @@ -86,6 +117,8 @@ int eComponentScan::start() fet.hierarchy = eDVBFrontendParametersTerrestrial::Hierarchy::HNone; fe->setDVBT(fet); #endif +#endif + eUsePtr<iDVBChannel> channel; if (mgr->allocateRawChannel(channel)) @@ -96,11 +129,9 @@ int eComponentScan::start() std::list<ePtr<iDVBFrontendParameters> > list; - list.push_back(fe); - m_scan = new eDVBScan(channel); m_scan->connectEvent(slot(*this, &eComponentScan::scanEvent), m_scan_event_connection); - m_scan->start(list); + m_scan->start(m_initial); return 0; } diff --git a/lib/components/scan.h b/lib/components/scan.h index 62456138..d90331cd 100644 --- a/lib/components/scan.h +++ b/lib/components/scan.h @@ -2,6 +2,7 @@ #define __lib_components_scan_h #include <lib/base/object.h> +#include <lib/dvb/idvb.h> class eDVBScan; @@ -9,11 +10,14 @@ class eComponentScan: public Object, public iObject { DECLARE_REF(eComponentScan); private: +#ifndef SWIG void scanEvent(int event); ePtr<eConnection> m_scan_event_connection; ePtr<eDVBScan> m_scan; int m_done, m_failed; + eSmartPtrList<iDVBFrontendParameters> m_initial; +#endif public: eComponentScan(); ~eComponentScan(); @@ -31,6 +35,10 @@ public: int getError(); + void clear(); + void addInitial(const eDVBFrontendParametersSatellite &p); + void addInitial(const eDVBFrontendParametersCable &p); + void addInitial(const eDVBFrontendParametersTerrestrial &p); int start(); }; |
