-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbaselistener.h
48 lines (44 loc) · 1.12 KB
/
baselistener.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
#ifndef BASELISTENER_H
#define BASELISTENER_H
#include <QtNetwork/QTcpServer>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkAccessManager>
#include <QDebug>
#include <QFile>
#include <QThread>
#include "sons.h"
extern QString line;
extern QTcpSocket *socket_c;
extern int timeout;
extern QString callsign;
extern QString dxcluster;
extern unsigned short dxclusterport;
extern unsigned short listenport;
class BaseListener : public QTcpServer
{
Q_OBJECT
public:
explicit BaseListener(QObject *parent = nullptr);
void StartServer();
Sons *thread;
signals:
void line_received(QString);
void stringfound(QString);
void pryiom_event(QString);
public slots:
void connected();
void disconnected();
void readyRead();
void reconnect();
void nodata_disconn();
void read_lists();
QStringList done(QNetworkReply*);
void get_priyom();
void send_priyom();
protected:
void incomingConnection(qintptr socketDescriptor) override;
private:
int load_config();
QStringList station_name_list();
};
#endif // BASELISTENER_H