import of enigma2
[enigma2.git] / lib / service / servicemp3.h
1 #ifndef __servicemp3_h
2 #define __servicemp3_h
3
4 #include <lib/service/iservice.h>
5
6 class eServiceFactoryMP3: public virtual iServiceHandler, public virtual iObject
7 {
8 DECLARE_REF;
9 public:
10         eServiceFactoryMP3();
11         virtual ~eServiceFactoryMP3();
12         enum { id = 0x1001 };
13
14                 // iServiceHandler
15         RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
16         RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
17         RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
18 };
19
20 class eServiceMP3: public virtual iPlayableService, public virtual iPauseableService, public virtual iObject
21 {
22         friend class eServiceFactoryMP3;
23         std::string filename;
24         eServiceMP3(const char *filename);      
25         int ref;
26 public:
27         virtual ~eServiceMP3();
28
29                 // iObject
30         void AddRef();
31         void Release();
32
33                 // iPlayableService
34         RESULT start();
35         RESULT getIPausableService(ePtr<iPauseableService> &ptr);
36
37                 // iPausableService
38         RESULT pause();
39         RESULT unpause();
40 };
41
42 #endif