PiglerAPI
QPiglerAPI.h
1#ifndef QPIGLERAPI
2#define QPIGLERAPI
3
4#include <QObject>
5#include <QString>
6#include <QImage>
7
8#include "PiglerAPI.h"
9
10class QPiglerAPI;
11
12class QPiglerAPI : public QObject, private IPiglerTapHandler
13{
14 Q_OBJECT
15
16private:
17 PiglerAPI *api;
18 IPiglerTapHandler *handler;
19
20public:
21 explicit QPiglerAPI(QObject* parent = 0);
23
24public slots:
28 qint32 init(QString name);
32 qint32 init();
33
38 void setAppId(qint32 appId);
39
44 QString appName();
45
53 qint32 setNotification(qint32 notificationId, QString title, QString message);
62 qint32 updateNotification(qint32 notificationId, QString title, QString message);
70 qint32 createNotification(QString title, QString message);
71
77 qint32 removeNotification(qint32 notificationId);
83
89
96 qint32 setRemoveOnTap(qint32 notificationId, bool remove);
103 qint32 setLaunchAppOnTap(qint32 notificationId, bool launch);
104
111 qint32 setNotificationIcon(qint32 notificationId, QImage icon);
112
118 qint32 getNotificationsCount();
119
123 void close();
124
129 void setTapHandler(IPiglerTapHandler *handler);
130
131private:
132 virtual void HandleTap(TInt uid);
133
134private slots:
135 void doHandleTap(qint32 notificationId);
136
137signals:
138 void handleTap(qint32 notificationId);
139};
140
141#endif
Definition PiglerAPI.h:13
Definition PiglerAPI.h:27
Definition QPiglerAPI.h:13
qint32 setRemoveOnTap(qint32 notificationId, bool remove)
Definition QPiglerAPI.cpp:103
qint32 getNotificationsCount()
Definition QPiglerAPI.cpp:137
void setTapHandler(IPiglerTapHandler *handler)
Definition QPiglerAPI.cpp:17
qint32 setNotification(qint32 notificationId, QString title, QString message)
Definition QPiglerAPI.cpp:62
qint32 updateNotification(qint32 notificationId, QString title, QString message)
Definition QPiglerAPI.cpp:83
qint32 init(QString name)
Definition QPiglerAPI.cpp:47
void setAppId(qint32 appId)
Definition QPiglerAPI.cpp:57
qint32 createNotification(QString title, QString message)
Definition QPiglerAPI.cpp:78
qint32 setLaunchAppOnTap(qint32 notificationId, bool launch)
Definition QPiglerAPI.cpp:108
qint32 setNotificationIcon(qint32 notificationId, QImage icon)
Definition QPiglerAPI.cpp:113
QString appName()
Definition QPiglerAPI.cpp:41
qint32 removeAllNotifications()
Definition QPiglerAPI.cpp:93
qint32 removeNotification(qint32 notificationId)
Definition QPiglerAPI.cpp:88
void close()
Definition QPiglerAPI.cpp:142
qint32 getLastTappedNotification()
Definition QPiglerAPI.cpp:98