-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchess24manager.h
41 lines (31 loc) · 984 Bytes
/
chess24manager.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
#ifndef CHESS24MANAGER_H
#define CHESS24MANAGER_H
#include <QObject>
#include <QVariant>
#include <QJsonObject>
#include <QTimer>
#include <functional>
#include "tournamentssqlmodel.h"
#include "roundssqlmodel.h"
#include "livematchsqlmodel.h"
#include "chess24messageparser.h"
#include "internalmessages.h"
class Chess24Websocket;
class Chess24SqlHandler;
class WSRequest;
class Chess24Manager: public QObject
{
Q_OBJECT
public:
Chess24Manager(QObject *parent, Chess24Websocket &c24ws);
void subscribeTournament(QString name);
void onWebTournamentRedisAR(WebTournamentRedisAR msg);
WSRequest *sendMessage(std::function<QString (int)> msg) const;
WSRequest *sendMessage(std::function<QString (int, QString)> msgFunc, QString msgData) const;
void sendMessage(QString msg) const;
private:
Chess24Websocket &c24ws;
void getTournament(InternalMessages::TournamentChangedData data);
void getTournamentList();
};
#endif // CHESS24MANAGER_H