comunicwatcher/refreshservice.h

45 lines
836 B
C
Raw Normal View History

2020-06-13 08:19:49 +00:00
/**
* Refresh service
*
* @author Pierre Hubert
*/
#pragma once
#include "notificationshelper.h"
2020-06-13 12:39:34 +00:00
#include "trayicon.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 15:25:16 +00:00
static void signOutUser();
private slots:
void connectedToWebSocket();
void onNewNumberNotifications(NotificationsNumber number);
void onNewNeumberUnreadNotifs(int num);
void onNewNeumberUnreadConvs(int num);
2020-06-13 15:56:09 +00:00
void openComunic();
void openAboutDialog();
2020-06-13 15:33:43 +00:00
void confirmSignOut();
2020-06-13 08:19:49 +00:00
private:
RefreshService();
~RefreshService();
// Class members
static RefreshService *svc;
WsClient mWsClient;
NotificationsHelper mNotifsHelper;
NotificationsNumber mNumbers;
2020-06-13 12:39:34 +00:00
TrayIcon mTrayIcon;
2020-06-13 08:19:49 +00:00
};