Torc  0.1
torcnotification.h
Go to the documentation of this file.
1 #ifndef TORCNOTIFICATION_H
2 #define TORCNOTIFICATION_H
3 
4 // Torc
5 #include "torcdevice.h"
6 #include "torcnotifier.h"
7 
9 {
10  Q_OBJECT
11 
12  public:
13  explicit TorcNotification(const QVariantMap &Details);
14  virtual bool Setup (void);
15  virtual bool IsKnownInput (const QString &UniqueId);
16  virtual QStringList GetDescription (void) = 0;
17  virtual void Graph (QByteArray* Data) = 0;
18 
19  signals:
20  void Notify (const QVariantMap &Message);
21 
22  protected:
23  virtual ~TorcNotification() = default;
24 
25  protected:
26  QStringList m_notifierNames;
27  QList<TorcNotifier*> m_notifiers;
28  QString m_title;
29  QString m_body;
30 };
31 
33 {
34  public:
36  virtual ~TorcNotificationFactory() = default;
37 
38  static TorcNotificationFactory* GetTorcNotificationFactory (void);
39  TorcNotificationFactory* NextFactory (void) const;
40  virtual TorcNotification* Create (const QString &Type, const QVariantMap &Details) = 0;
41 
42  protected:
45 
46  private:
47  Q_DISABLE_COPY(TorcNotificationFactory)
48 };
49 
50 #endif // TORCNOTIFICATION_H
QStringList m_notifierNames
TorcNotification(const QVariantMap &Details)
TorcNotificationFactory * nextTorcNotificationFactory
QList< TorcNotifier * > m_notifiers
virtual void Graph(QByteArray *Data)=0
virtual bool Setup(void)
static TorcNotificationFactory * gTorcNotificationFactory
void Notify(const QVariantMap &Message)
virtual bool IsKnownInput(const QString &UniqueId)
virtual QStringList GetDescription(void)=0
virtual ~TorcNotification()=default