3 #ifndef __lib_dvb_serviceexternal_h
4 #define __lib_dvb_serviceexternal_h
6 #include <lib/dvb/service.h>
7 #include <lib/base/thread.h>
8 #include <lib/base/message.h>
10 class eServiceHandlerExternal
: public eServiceHandler
12 static eServiceHandlerExternal
*instance
;
14 struct FileExtensionScriptInfo
23 std::vector
<FileExtensionScriptInfo
> extensionFileList
, extensionDirectoryList
;
25 void addFile(void *node
, const eString
&filename
);
26 void addDirectory(void *node
, const eString
&filename
);
29 eServiceHandlerExternal();
30 ~eServiceHandlerExternal();
32 int play(const eServiceReference
&service
, int workaround
= 0);
33 int stop(int workaround
= 0);
35 eService
*addRef(const eServiceReference
&service
);
36 void removeRef(const eServiceReference
&service
);
38 void addFileHandler(const eString
&pattern
, const eString
&command
, int needfb
, int needrc
, int needlcd
);
39 void addDirectoryHandler(const eString
&pattern
, const eString
&command
, int needfb
, int needrc
, int needlcd
);
41 static eServiceHandlerExternal
*getInstance() { return instance
; }
44 class ePlayerThread
: public eThread
, public Object
46 eFixedMessagePump
<int> message
;
47 bool needfb
, needrc
, needlcd
;
50 void thread_finished();
51 void finalize_player();
52 void recv_msg(const int &);
54 ePlayerThread(eString command
, int needfb
, int needrc
, int needlcd
)
55 :message(eApp
, 1), command(command
), needfb(needfb
), needrc(needrc
), needlcd(needlcd
)
57 CONNECT(message
.recv_msg
, ePlayerThread::recv_msg
);