MythTV master
deletethread.h
Go to the documentation of this file.
1#ifndef DELETETHREAD_H_
2#define DELETETHREAD_H_
3
4// C++ headers
5#include <cstdint>
6#include <unistd.h>
7
8// Qt headers
9#include <QMutex>
10#include <QTimer>
11#include <QDateTime>
12#include <QStringList>
13#include <QWaitCondition>
14
15// MythTV headers
16#include "libmythbase/mthread.h"
18
19class DeleteThread : public QObject, public MThread
20{
21 Q_OBJECT
22 public:
23 DeleteThread(void);
24 bool AddFile(const QString& path);
25 bool AddFile(DeleteHandler *handler);
26 void Stop(void) { m_run = false; }
27
28 protected:
29 void run() override; // MThread
30
31 private:
32 void ProcessNew(void);
33 void ProcessOld(void);
34
35 size_t m_increment { 9961472 };
36 bool m_slow;
37 bool m_link;
38 bool m_run { true };
39
40 QList<DeleteHandler*> m_newfiles;
41 QMutex m_newlock;
42
43 QList<DeleteHandler*> m_files;
44};
45
46#endif
void ProcessNew(void)
DeleteThread(void)
void ProcessOld(void)
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
QList< DeleteHandler * > m_newfiles
Definition: deletethread.h:40
QList< DeleteHandler * > m_files
Definition: deletethread.h:43
bool AddFile(const QString &path)
void Stop(void)
Definition: deletethread.h:26
QMutex m_newlock
Definition: deletethread.h:41
size_t m_increment
Definition: deletethread.h:35
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49