when in expert mode, add 'restart from begin' as choice on leave movie player dialog
[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         PSignal0<void> newService;
27         
28                 /* progress between 0 and 100 */
29         int getProgress();
30         
31                 /* get number of services */
32         int getNumServices();
33         
34                 /* true when done or error */
35         int isDone();
36         
37                 /* get last added service */
38         void getLastServiceName(std::string &SWIG_OUTPUT);
39         
40         int getError();
41         
42         void clear();
43         void addInitial(const eDVBFrontendParametersSatellite &p);
44         void addInitial(const eDVBFrontendParametersCable &p);
45         void addInitial(const eDVBFrontendParametersTerrestrial &p);
46         
47                 /* please keep the flags in sync with lib/dvb/scan.h ! */
48         enum { scanNetworkSearch=1, scanRemoveServices=4, scanDontRemoveFeeds=8, clearToScanOnFirstNIT = 16 };
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