MythTV master
externrecscanner.h
Go to the documentation of this file.
1
6#ifndef EXTERNREC_CHANNEL_FETCHER_H
7#define EXTERNREC_CHANNEL_FETCHER_H
8
9// Qt headers
10#include <QString>
11#include <QRunnable>
12#include <QObject>
13#include <QMutex>
14#include <QMap>
15#include <QCoreApplication>
16
17// MythTV headers
18#include "libmythbase/mthread.h"
19
20class ScanMonitor;
21
22class ExternRecChannelScanner : public QRunnable
23{
25
26 public:
27 ExternRecChannelScanner(uint cardid, QString inputname, uint sourceid,
28 ScanMonitor *monitor = nullptr);
29 ~ExternRecChannelScanner() override;
30
31 void Scan(void);
32 void Stop(void);
33
34 private:
35 void SetNumChannelsParsed(uint val);
37 void SetMessage(const QString &status);
38
39 protected:
40 void run(void) override; // QRunnable
41
42 private:
45 QString m_inputName;
49 bool m_threadRunning {false};
50 bool m_stopNow {false};
51 MThread *m_thread {nullptr};
52 QMutex m_lock;
53};
54
55#endif // EXTERNREC_CHANNEL_FETCHER_H
56
57/* vim: set expandtab tabstop=4 shiftwidth=4: */
Q_DECLARE_TR_FUNCTIONS(ExternRecChannelScanner)
ExternRecChannelScanner(uint cardid, QString inputname, uint sourceid, ScanMonitor *monitor=nullptr)
void Scan(void)
Scans the list.
void SetNumChannelsParsed(uint val)
void SetNumChannelsInserted(uint val)
void run(void) override
void Stop(void)
Stops the scanning thread running.
void SetMessage(const QString &status)
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
unsigned int uint
Definition: compat.h:68