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 void run() override; // MThread
25 bool AddFile(const QString& path);
26 bool AddFile(DeleteHandler *handler);
27 void Stop(void) { m_run = false; }
28
29 private:
30 void ProcessNew(void);
31 void ProcessOld(void);
32
33 size_t m_increment { 9961472 };
34 bool m_slow;
35 bool m_link;
36 bool m_run { true };
37
38 QList<DeleteHandler*> m_newfiles;
39 QMutex m_newlock;
40
41 QList<DeleteHandler*> m_files;
42};
43
44#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:38
QList< DeleteHandler * > m_files
Definition: deletethread.h:41
bool AddFile(const QString &path)
void Stop(void)
Definition: deletethread.h:27
QMutex m_newlock
Definition: deletethread.h:39
size_t m_increment
Definition: deletethread.h:33
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49