eb18f10430de34fcddf2840e0540f2ca1da77003
[enigma2.git] / lib / components / scan.h
1 #ifndef __lib_components_scan_h
2 #define __lib_components_scan_h
3
4 #include <lib/base/object.h>
5 #include <lib/dvb/idvb.h>
6
7 class eDVBScan;
8
9 class eComponentScan: public Object, public iObject
10 {
11 DECLARE_REF(eComponentScan);
12 private:
13 #ifndef SWIG
14         void scanEvent(int event);
15         ePtr<eConnection> m_scan_event_connection;
16         ePtr<eDVBScan> m_scan;
17         
18         int m_done, m_failed;
19         eSmartPtrList<iDVBFrontendParameters> m_initial;
20 #endif
21 public:
22         eComponentScan();
23         ~eComponentScan();
24         
25         PSignal0<void> statusChanged;
26         
27                 /* progress between 0 and 100 */
28         int getProgress();
29         
30                 /* get number of services */
31         int getNumServices();
32         
33                 /* true when done or error */
34         int isDone();
35         
36         int getError();
37         
38         void clear();
39         void addInitial(const eDVBFrontendParametersSatellite &p);
40         void addInitial(const eDVBFrontendParametersCable &p);
41         void addInitial(const eDVBFrontendParametersTerrestrial &p);
42         
43                 /* please keep the flags in sync with lib/dvb/scan.h ! */
44         enum { scanNetworkSearch=1 };
45         int start(int feid, int flags=0);
46 };
47
48 #endif