Torc  0.1
torcpushbulletnotifier.h
Go to the documentation of this file.
1 #ifndef TORCPUSHBULLETNOTIFIER_H
2 #define TORCPUSHBULLETNOTIFIER_H
3 
4 // Qt
5 #include <QTimer>
6 
7 // Torc
8 #include "torcnotifier.h"
9 
10 class TorcNetworkRequest;
11 
12 #define PUSHBULLET_PUSH_URL QStringLiteral("https://api.pushbullet.com/v2/pushes")
13 
15 {
16  Q_OBJECT
17 
18  public:
19  explicit TorcPushbulletNotifier(const QVariantMap &Details);
21 
22  void Notify (const QVariantMap &Notification) override;
23  QStringList GetDescription(void) override;
24 
25  signals:
26  void StartResetTimer (int MSeconds);
27 
28  public slots:
29  void RequestReady (TorcNetworkRequest* Request);
30  void ResetTimerTimeout (void);
31 
32  private:
33  QTimer m_resetTimer;
34  int m_networkAbort;
35  QString m_accessToken;
36  QList<TorcNetworkRequest*> m_requests;
37  int m_badRequestCount;
38 };
39 
40 #endif // TORCPUSHBULLETNOTIFIER_H
TorcPushbulletNotifier(const QVariantMap &Details)
A wrapper around QNetworkRequest.
void StartResetTimer(int MSeconds)
QStringList GetDescription(void) override
void Notify(const QVariantMap &Notification) override
void RequestReady(TorcNetworkRequest *Request)
Send push notifications using the Pushbullet API.