-
Notifications
You must be signed in to change notification settings - Fork 0
/
scan.h
82 lines (62 loc) · 1.69 KB
/
scan.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef SCAN_H
#define SCAN_H
#include <QObject>
#include <QVector>
#include <QThread>
#include <QDebug> //new
#include <QMutex>
//#include <QStringList>
#include </opt/include/mediaclient.h>
#include <fcntl.h> //for O_RDWR
#include <unistd.h> //for usleep
#include <tune.h>
#include <globals.h>
#include <charsets.h>
class Scan : public QObject
//class Scan : public QThread //new2
{
Q_OBJECT
public:
explicit Scan(QObject *parent = nullptr);
//void run();
//bool Stop;
bool mStop_fm_scan;
bool mStop_dab_scan;
QVector<QString> dab_vec;
QVector<QString> dab_name_vec;
QVector<QString> dab_sid_vec;
QVector<QString> fm_vec;
//int fm_scan_wrapped();
int media_scan_fm_frequencies(char *device, int devfd);
int media_scan_dabfrequencies(char *device, int devfd, int console, int running);
int media_scan_dabservices(char *device);
signals:
//void sendProgress(int workDone);
//void sendFinished();
//void NumberChanged(int);
void progress_scan_fm(int prog_bar_fm);
void progress_scan_dab(int prog_bar_dab);
//void progress_scan_fm(int);
void finished_scan_fm();
void finished_scan_dab();
void show_progbar_fm(bool vis);
void show_progbar_dab(bool vis);
void enable_buttons(bool btn_st);
/*
void progress_scan_dab(int prog_bar_dab);
void progress_scan_fm(int prog_bar_fm);
void enable_buttons(bool btn_st);
void show_progbar_fm(bool vis);
void show_progbar_dab(bool vis);
void write_to_file();
void finished_scan();
void finished_scan_fm();
*/
public slots:
void fm_scan_wrapper();
void dab_scan_wrapper();
void stop_scans();
private:
Tune mTune;
};
#endif // SCAN_H