00001 #ifndef DELETETHREAD_H_ 00002 #define DELETETHREAD_H_ 00003 00004 // ANSI C headers 00005 #include <stdint.h> 00006 #include <unistd.h> 00007 00008 // C++ headers 00009 using namespace std; 00010 00011 // Qt headers 00012 #include <QMutex> 00013 #include <QTimer> 00014 #include <QDateTime> 00015 #include <QStringList> 00016 #include <QWaitCondition> 00017 00018 // MythTV headers 00019 #include "mthread.h" 00020 #include "requesthandler/fileserverutil.h" 00021 00022 class DeleteThread : public QObject, public MThread 00023 { 00024 Q_OBJECT 00025 public: 00026 DeleteThread(void); 00027 void run(void); 00028 bool AddFile(QString path); 00029 bool AddFile(DeleteHandler *handler); 00030 void Stop(void) { m_run = false; } 00031 00032 private: 00033 void ProcessNew(void); 00034 void ProcessOld(void); 00035 00036 size_t m_increment; 00037 bool m_slow; 00038 bool m_link; 00039 bool m_run; 00040 00041 QList<DeleteHandler*> m_newfiles; 00042 QMutex m_newlock; 00043 00044 QList<DeleteHandler*> m_files; 00045 }; 00046 00047 #endif
1.6.3