blob: 9be3e207afb819fa74f9067c2afa4a64d2b60005 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
|