remove __init__.py files and create them on the fly
[enigma2.git] / lib / service / servicedvbrecord.h
1 #ifndef __servicedvbrecord_h
2 #define __servicedvbrecord_h
3
4 #include <lib/service/iservice.h>
5 #include <lib/dvb/idvb.h>
6
7 #include <lib/dvb/pmt.h>
8 #include <lib/dvb/eit.h>
9 #include <set>
10
11 #include <lib/service/servicedvb.h>
12
13 class eDVBServiceRecord: public iRecordableService, public Object
14 {
15 DECLARE_REF(eDVBServiceRecord);
16 public:
17         RESULT prepare(const char *filename);
18         RESULT start();
19         RESULT stop();
20 private:
21         enum { stateIdle, statePrepared, stateRecording };
22         int m_state, m_want_record;
23         friend class eServiceFactoryDVB;
24         eDVBServiceRecord(const eServiceReferenceDVB &ref);
25         
26         eServiceReferenceDVB m_ref;
27         eDVBServicePMTHandler m_service_handler;
28         void serviceEvent(int event);
29         
30         ePtr<iDVBTSRecorder> m_record;
31         
32         int m_recording, m_tuned;
33         std::set<int> m_pids_active;
34         std::string m_filename;
35         
36         int doPrepare();
37         int doRecord();
38 };
39
40 #endif