2020-01-13 16:35:58 +03:00
|
|
|
#ifndef NOTIFICATIONHANDLER_H
|
|
|
|
#define NOTIFICATIONHANDLER_H
|
|
|
|
|
|
|
|
#include <QtCore>
|
|
|
|
|
2021-10-25 12:37:58 +03:00
|
|
|
#include "usermodel.h"
|
2020-01-13 16:35:58 +03:00
|
|
|
|
|
|
|
class QJsonDocument;
|
|
|
|
|
|
|
|
namespace OCC {
|
|
|
|
|
|
|
|
class ServerNotificationHandler : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit ServerNotificationHandler(AccountState *accountState, QObject *parent = nullptr);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void newNotificationList(ActivityList);
|
2022-04-22 01:32:01 +03:00
|
|
|
void newIncomingCallsList(ActivityList);
|
2020-01-13 16:35:58 +03:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void slotFetchNotifications();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void slotNotificationsReceived(const QJsonDocument &json, int statusCode);
|
|
|
|
void slotEtagResponseHeaderReceived(const QByteArray &value, int statusCode);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPointer<JsonApiJob> _notificationJob;
|
|
|
|
AccountState *_accountState;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-10-25 12:37:58 +03:00
|
|
|
#endif // NOTIFICATIONHANDLER_H
|