fixes bug #369
[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 #ifndef SWIG
13         void scanEvent(int event);
14         ePtr<eConnection> m_scan_event_connection;
15         ePtr<eDVBScan> m_scan;
16         
17         int m_done, m_failed;
18         eSmartPtrList<iDVBFrontendParameters> m_initial;
19 #endif
20 public:
21         eComponentScan();
22         ~eComponentScan();
23         
24         PSignal0<void> statusChanged;
25         PSignal0<void> newService;
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                 /* get last added service */
37         void getLastServiceName(std::string &SWIG_OUTPUT);
38         
39         int getError();
40         
41         void clear();
42         void addInitial(const eDVBFrontendParametersSatellite &p);
43         void addInitial(const eDVBFrontendParametersCable &p);
44         void addInitial(const eDVBFrontendParametersTerrestrial &p);
45         
46                 /* please keep the flags in sync with lib/dvb/scan.h ! */
47         enum { scanNetworkSearch=1, scanRemoveServices=4, scanDontRemoveFeeds=8, scanDontRemoveUnscanned=16, clearToScanOnFirstNIT = 32, scanOnlyFree = 64 };
48
49         int start(int feid, int flags=0 );
50         SWIG_VOID(RESULT) getFrontend(ePtr<iDVBFrontend> &SWIG_OUTPUT);
51         SWIG_VOID(RESULT) getCurrentTransponder(ePtr<iDVBFrontendParameters> &SWIG_OUTPUT);
52 };
53
54 #endif