File: SpotClient.h

package info (click to toggle)
js8call 2.2.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,416 kB
  • sloc: cpp: 563,285; f90: 9,265; ansic: 937; python: 132; sh: 93; makefile: 6
file content (41 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download | duplicates (3)
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
#ifndef JS8SPOTCLIENT_H
#define JS8SPOTCLIENT_H

#include "MessageClient.hpp"

#include <QObject>
#include <QHostInfo>
#include <QQueue>
#include <QTimer>

class SpotClient : public QObject
{
    Q_OBJECT
public:
    SpotClient(MessageClient *client, QObject *parent = nullptr);

    void prepare();
    void setLocalStation(QString callsign, QString grid, QString info, QString version);
    void enqueueLocalSpot(QString callsign, QString grid, QString info, QString version);
    void enqueueCmd(QString cmd, QString from, QString to, QString relayPath, QString text, QString grid, QString extra, int submode, int dial, int offset, int snr);
    void enqueueSpot(QString callsign, QString grid, int submode, int dial, int offset, int snr);
    void sendRawSpot(QByteArray payload);

public slots:
    void processSpots();
    void dnsLookupResult(QHostInfo);

private:
    int m_seq;
    QString m_call;
    QString m_grid;
    QString m_info;
    QString m_version;

    QHostAddress m_address;
    MessageClient *m_client;
    QTimer m_timer;
    QQueue<QByteArray> m_queue;
};

#endif // JS8SPOTCLIENT_H