- add more python stuff
[enigma2.git] / lib / service / servicedvb.h
1 #ifndef __servicemp3_h
2 #define __servicemp3_h
3
4 #include <lib/service/iservice.h>
5 #include <lib/dvb/idvb.h>
6
7 #include <lib/dvb/pmt.h>
8
9 class eServiceFactoryDVB: public iServiceHandler
10 {
11 DECLARE_REF;
12 public:
13         eServiceFactoryDVB();
14         virtual ~eServiceFactoryDVB();
15         enum { id = 0x1 };
16
17                 // iServiceHandler
18         RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
19         RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
20         RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
21 };
22
23 class eDVBServicePlay: public iPlayableService, public Object, public iServiceInformation
24 {
25 DECLARE_REF;
26 private:
27         friend class eServiceFactoryDVB;
28         eServiceReference m_reference;
29         
30         ePtr<iTSMPEGDecoder> m_decoder;
31         
32         eDVBServicePMTHandler m_serviceHandler;
33         
34         eDVBServicePlay(const eServiceReference &ref);
35         
36         void serviceEvent(int event);
37 public:
38         virtual ~eDVBServicePlay();
39
40                 // iPlayableService
41         RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
42         RESULT start();
43         RESULT stop();
44         RESULT getIPausableService(ePtr<iPauseableService> &ptr);
45         RESULT getIServiceInformation(ePtr<iServiceInformation> &ptr);
46         
47                 // iServiceInformation
48         RESULT getName(std::string &name);
49 };
50
51 #endif