-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommandControlInterface.h
48 lines (38 loc) · 1.03 KB
/
CommandControlInterface.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 COMMANDCONTROLINTERFACE_H
#define COMMANDCONTROLINTERFACE_H
#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonObject>
enum Status
{
ONLINE, OFFLINE
};
class CommandControlInterface : public QObject
{
Q_OBJECT
public:
explicit CommandControlInterface(QObject *parent = 0);
~CommandControlInterface();
void setCredentials(const QString &, const QString &);
void login();
void status(Status);
QString getAvailableStaticProxy();
void shutdown(const QString &);
QJsonObject* registerApplication();
static const QString DOMAIN;
static const QString LOGIN_ENDPOINT;
static const QString DVP_ENDPOINT;
static const QString SP_ENDPOINT;
static const QString ONLINE_ENDPOINT;
static const QString OFFLINE_ENDPOINT;
signals:
public slots:
void requestError(QNetworkReply::NetworkError);
private:
QNetworkAccessManager* mNetworkManager;
QString mToken;
QString mUUID;
QString mPassword;
};
#endif // COMMANDCONTROLINTERFACE_H