improved telemetry + player list and fixed some other issues
This commit is contained in:
parent
68c8a971ee
commit
26a24122e1
39 changed files with 3134 additions and 1587 deletions
|
@ -23,8 +23,9 @@
|
|||
#include <QApplication>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
enum class TelemetryCategory : int { OperatingSystemSpec = 0, HardwareSpec = 1, UserLocaleData = 2, ApplicationConfiguration = 3, UserFeedback = 4, ApplicationSpec = 5, CustomEmitted = 99};
|
||||
enum class TelemetryCategory : int { OperatingSystemSpec = 0, HardwareSpec = 1, UserLocaleData = 2, ApplicationConf = 3, UserFeedback = 4, ApplicationSpec = 5, CustomEmitted = 99};
|
||||
|
||||
class TelemetryClass : public QObject
|
||||
{
|
||||
|
@ -32,40 +33,44 @@ class TelemetryClass : public QObject
|
|||
public:
|
||||
static TelemetryClass* getInstance() { return &telemetryClassInstance; }
|
||||
static QString categoryToString(TelemetryCategory category);
|
||||
static QUrl getWebURL();
|
||||
bool canPush();
|
||||
bool canRegister();
|
||||
bool isEnabled();
|
||||
bool isStateForced();
|
||||
bool isRegistered();
|
||||
void init();
|
||||
void work();
|
||||
void refresh();
|
||||
void setEnabled(bool enabled);
|
||||
void setDisabled(bool disabled);
|
||||
void push(TelemetryCategory category);
|
||||
void push(TelemetryCategory category, const QJsonDocument json);
|
||||
void registerClient();
|
||||
QString getRegisteredID();
|
||||
|
||||
private:
|
||||
static TelemetryClass telemetryClassInstance;
|
||||
QString telemetryClientID;
|
||||
bool telemetryEnabled;
|
||||
bool telemetryStateForced;
|
||||
bool telemetryPushAppConf;
|
||||
|
||||
void work_p(bool doWork);
|
||||
QJsonDocument getOperatingSystem();
|
||||
QJsonDocument getSystemHardware();
|
||||
QJsonDocument getApplicationSpec();
|
||||
QJsonDocument getApplicationConf();
|
||||
QJsonDocument getSystemLocaleList();
|
||||
|
||||
public slots:
|
||||
void pushStartupSet();
|
||||
|
||||
private slots:
|
||||
void pushFinished(QNetworkReply *reply);
|
||||
void registerFinished(QNetworkReply *reply);
|
||||
void work_pd(bool doWork);
|
||||
|
||||
signals:
|
||||
void pushed();
|
||||
void registered();
|
||||
void pushed(bool isSucessful);
|
||||
void registered(bool isSucessful);
|
||||
};
|
||||
|
||||
extern TelemetryClass telemetryClass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue