-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboothserver.h
More file actions
42 lines (34 loc) · 763 Bytes
/
boothserver.h
File metadata and controls
42 lines (34 loc) · 763 Bytes
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
#ifndef BOOTHSERVER_H
#define BOOTHSERVER_H
#include <QObject>
#include <QVector>
#include <QHash>
#include <QTimer>
class Booth;
class Packet;
class QIODevice;
class ServiceCategory;
class BoothServer : public QObject
{
Q_OBJECT
public:
explicit BoothServer(QIODevice *ioDev, QObject *parent = 0);
~BoothServer();
private:
QIODevice *ioDev;
bool isWaiting;
int curBoothNum;
QVector<Booth*> availBooths;
QTimer waitTimer;
Booth* currentBooth();
void incrementCurrentBooth();
void pingNextBooth();
void pingCurrentBooth();
void sendPacket(Packet packet);
void processIncomingData(QByteArray data);
signals:
public slots:
void onDeviceTimeout();
void onReadyRead();
};
#endif // BOOTHSERVER_H