- added iStaticServiceInformation
[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         RESULT info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr);
22 };
23
24 class eDVBServiceList: public iListableService
25 {
26 DECLARE_REF;
27 private:
28         eServiceReference m_parent;
29         friend class eServiceFactoryDVB;
30         eDVBServiceList(const eServiceReference &parent);
31 public:
32         virtual ~eDVBServiceList();
33         RESULT getContent(std::list<eServiceReference> &list);
34 };
35
36 class eDVBServicePlay: public iPlayableService, public Object, public iServiceInformation
37 {
38 DECLARE_REF;
39 private:
40         friend class eServiceFactoryDVB;
41         eServiceReference m_reference;
42         
43         ePtr<iTSMPEGDecoder> m_decoder;
44         
45         eDVBServicePMTHandler m_serviceHandler;
46         
47         eDVBServicePlay(const eServiceReference &ref);
48         
49         void serviceEvent(int event);
50 public:
51         virtual ~eDVBServicePlay();
52
53                 // iPlayableService
54         RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
55         RESULT start();
56         RESULT stop();
57         RESULT pause(ePtr<iPauseableService> &ptr);
58         RESULT info(ePtr<iServiceInformation> &ptr);
59         
60                 // iServiceInformation
61         RESULT getName(const eServiceReference &ref, std::string &name);
62 };
63
64 #endif