2020-06-13 08:19:49 +00:00
|
|
|
/**
|
|
|
|
* Refresh service
|
|
|
|
*
|
|
|
|
* @author Pierre Hubert
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-06-13 12:14:01 +00:00
|
|
|
#include "notificationshelper.h"
|
2020-06-13 09:28:08 +00:00
|
|
|
#include "wsclient.h"
|
|
|
|
|
2020-06-13 08:19:49 +00:00
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class RefreshService : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
static void startService();
|
|
|
|
static void stopService();
|
|
|
|
|
2020-06-13 12:14:01 +00:00
|
|
|
private slots:
|
|
|
|
void connectedToWebSocket();
|
|
|
|
|
2020-06-13 08:19:49 +00:00
|
|
|
private:
|
|
|
|
RefreshService();
|
|
|
|
~RefreshService();
|
|
|
|
|
|
|
|
// Class members
|
|
|
|
static RefreshService *svc;
|
2020-06-13 12:14:01 +00:00
|
|
|
WsClient mWsClient;
|
|
|
|
NotificationsHelper mNotifsHelper;
|
2020-06-13 08:19:49 +00:00
|
|
|
};
|