use 'l'-flag for seekBackManual, and remove timer
[enigma2.git] / lib / components / file_eraser.h
1 #ifndef __lib_components_file_eraser_h
2 #define __lib_components_file_eraser_h
3
4 #include <lib/base/thread.h>
5 #include <lib/base/message.h>
6 #include <lib/base/ebase.h>
7
8 class eBackgroundFileEraser: public eMainloop, private eThread, public Object
9 {
10         struct Message
11         {
12                 int type;
13                 const char *filename;
14                 enum
15                 {
16                         erase,
17                         quit
18                 };
19                 Message(int type=0, const char *filename=0)
20                         :type(type), filename(filename)
21                 {}
22         };
23         eFixedMessagePump<Message> messages;
24         static eBackgroundFileEraser *instance;
25         void gotMessage(const Message &message);
26         void thread();
27         void idle();
28         eTimer stop_thread_timer;
29 #ifndef SWIG
30 public:
31 #endif
32         eBackgroundFileEraser();
33         ~eBackgroundFileEraser();
34 #ifdef SWIG
35 public:
36 #endif
37         void erase(const char * filename);
38         static eBackgroundFileEraser *getInstance() { return instance; }
39 };
40
41 #endif