update ca, sv language
[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 eDVBServiceBase,
14         public iRecordableService, public Object
15 {
16 DECLARE_REF(eDVBServiceRecord);
17 public:
18         RESULT prepare(const char *filename, time_t begTime, time_t endTime, int eit_event_id);
19         RESULT start();
20         RESULT stop();
21 private:
22         enum { stateIdle, statePrepared, stateRecording };
23         int m_state, m_want_record;
24         friend class eServiceFactoryDVB;
25         eDVBServiceRecord(const eServiceReferenceDVB &ref);
26         
27         eServiceReferenceDVB m_ref;
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         int m_target_fd;
36         
37         int doPrepare();
38         int doRecord();
39         RESULT frontendInfo(ePtr<iFrontendInformation> &ptr);
40 };
41
42 #endif