diff options
author | Javier <dev.git@javispedro.com> | 2014-11-16 16:40:06 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2014-11-16 16:40:06 +0100 |
commit | 5244f7909e04b23fbd5706dc6bcadafba21f7600 (patch) | |
tree | 88d8730dc70b68586d2d31845dc51eead9e526cb /notificationconn.h | |
parent | d8d8fc7a0d139e7b864eee3b573bd208f823ad4f (diff) | |
download | sapd-5244f7909e04b23fbd5706dc6bcadafba21f7600.tar.gz sapd-5244f7909e04b23fbd5706dc6bcadafba21f7600.zip |
initial notification support
Diffstat (limited to 'notificationconn.h')
-rw-r--r-- | notificationconn.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/notificationconn.h b/notificationconn.h new file mode 100644 index 0000000..9be3e20 --- /dev/null +++ b/notificationconn.h @@ -0,0 +1,71 @@ +#ifndef NOTIFICATIONCONN_H +#define NOTIFICATIONCONN_H + +#include <QtCore/QObject> +#include <QtCore/QDateTime> +#include "sapconnection.h" +#include "sapsocket.h" + +class NotificationConn : public QObject +{ + Q_OBJECT + +public: + NotificationConn(SAPConnection *conn, QObject *parent = 0); + +protected: + enum NotificationType { + NotificationPopup = 0 + }; + + enum NotificationAttributeType { + NotificationPackageName = 0, + NotificationCount = 1, + NotificationTitle = 2, + NotificationTime = 3, + NotificationSender = 4, + NotificationBody = 5, + NotificationThumbnail = 6, + NotificationApplicationName = 7, + NotificationOpenInWatch = 9, + NotificationOpenInHost = 10, + NotificationId = 11 + }; + + struct Notification { + Notification(); + + NotificationType type; + int sequenceNumber; + bool urgent; + int applicationId; + int category; + QString packageName; + int count; + QString title; + QDateTime time; + int sender; + QString body; + QByteArray thumbnail; + QString applicationName; + //bool openInWatch; + //bool openInHost; + int notificationId; + }; + + QByteArray packNotification(const Notification &n); + +private: + + +private slots: + void handleConnected(); + void handleMessageReceived(); + void performTest(); + +private: + SAPConnection *_conn; + SAPSocket *_socket; +}; + +#endif // NOTIFICATIONCONN_H |