aboutsummaryrefslogtreecommitdiff
path: root/lib/components/scan.h
blob: eb18f10430de34fcddf2840e0540f2ca1da77003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef __lib_components_scan_h
#define __lib_components_scan_h

#include <lib/base/object.h>
#include <lib/dvb/idvb.h>

class eDVBScan;

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();
	
	PSignal0<void> statusChanged;
	
		/* progress between 0 and 100 */
	int getProgress();
	
		/* get number of services */
	int getNumServices();
	
		/* true when done or error */
	int isDone();
	
	int getError();
	
	void clear();
	void addInitial(const eDVBFrontendParametersSatellite &p);
	void addInitial(const eDVBFrontendParametersCable &p);
	void addInitial(const eDVBFrontendParametersTerrestrial &p);
	
		/* please keep the flags in sync with lib/dvb/scan.h ! */
	enum { scanNetworkSearch=1 };
	int start(int feid, int flags=0);
};

#endif