-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMumble.h
65 lines (51 loc) · 1.38 KB
/
Mumble.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
/* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* Version 2, December 2004
*
* Copyright (C) 2004 Sam Hocevar
* 14 rue de Plaisance, 75014 Paris, France
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*/
#ifndef MUMBLE_H
#define MUMBLE_H
#include "Notifier.h"
#include <QUdpSocket>
#include <QTimer>
/**
* A Mumble serveur.
*/
class MumbleServer : public Server {
Q_OBJECT
private:
QUdpSocket *m_pUdpSocket;
QString m_sHost;
int m_iPort;
QTimer *m_pTimer;
unsigned int m_iNumPlayers;
unsigned int m_iMaxPlayers;
public:
MumbleServer(const char *host, int port);
MumbleServer(const QString ¶m);
unsigned int numPlayers() const;
unsigned int maxPlayers() const;
QString map() const;
QString mode() const;
private:
void setup(const char *host, int port);
private slots:
void query();
void receiveData();
public slots:
void refresh();
signals:
void infosChanged(int players, int max, QString map, QString mode,
bool gamestarted);
void errorEncountered(QString text);
};
#endif