- add more python stuff
[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 iServiceHandler
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 iPlayableService, public iPauseableService, public iServiceInformation, public Object
21 {
22 DECLARE_REF;
23 private:
24         friend class eServiceFactoryMP3;
25         std::string filename;
26         eServiceMP3(const char *filename);      
27         eTimer test;
28         void test_end();
29         Signal2<void,iPlayableService*,int> m_event;
30         enum
31         {
32                 stIdle, stRunning, stStopped,
33         };
34         int m_state;
35 public:
36         virtual ~eServiceMP3();
37
38                 // iPlayableService
39         RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
40         RESULT start();
41         RESULT stop();
42         RESULT getIPausableService(ePtr<iPauseableService> &ptr);
43
44                 // iPausableService
45         RESULT pause();
46         RESULT unpause();
47         
48         RESULT getIServiceInformation(ePtr<iServiceInformation>&);
49         
50                 // iServiceInformation
51         RESULT getName(std::string &name);
52 };
53
54 #endif