Torc  0.1
torcnotifier.h
Go to the documentation of this file.
1 #ifndef TORCNOTIFIER_H
2 #define TORCNOTIFIER_H
3 
4 // Qt
5 #include <QVariant>
6 
7 // Torc
8 #include "torcdevice.h"
9 
10 #define NOTIFICATION_TITLE QStringLiteral("title")
11 #define NOTIFICATION_BODY QStringLiteral("body")
12 #define UNKNOWN_TITLE QStringLiteral("Torc")
13 #define UNKNOWN_BODY QStringLiteral("Unknown")
14 
15 class TorcNotifier : public TorcDevice
16 {
17  Q_OBJECT
18 
19  public slots:
20  virtual void Notify (const QVariantMap &Notification) = 0;
21 
22  protected:
23  explicit TorcNotifier(const QVariantMap &Details);
24  virtual ~TorcNotifier() = default;
25 };
26 
28 {
29  public:
31  virtual ~TorcNotifierFactory() = default;
32 
33  static TorcNotifierFactory* GetTorcNotifierFactory (void);
34  TorcNotifierFactory* NextFactory (void) const;
35  virtual TorcNotifier* Create (const QString &Type, const QVariantMap &Details) = 0;
36 
37  protected:
40 
41  private:
42  Q_DISABLE_COPY(TorcNotifierFactory)
43 };
44 #endif // TORCNOTIFIER_H
TorcNotifierFactory * nextTorcNotifierFactory
Definition: torcnotifier.h:39
TorcNotifier(const QVariantMap &Details)
static TorcNotifierFactory * gTorcNotifierFactory
Definition: torcnotifier.h:38
virtual void Notify(const QVariantMap &Notification)=0
virtual ~TorcNotifier()=default