PiglerAPI
PiglerAPI.h
1#ifndef PIGLERAPI
2#define PIGLERAPI
3
4#include <e32base.h>
5
6class TPiglerMessage;
7class CPiglerTapServer;
8
13{
14public:
18 virtual void HandleTap(TInt uid) = 0;
19};
20
26class PiglerAPI: private RSessionBase
27{
28public:
29 PiglerAPI();
30 ~PiglerAPI();
31
41 TInt Init(TBuf<64> appName);
42
54 TInt Init();
55
62 void SetAppId(TInt appId);
63
72 TInt GetAPIVersion();
73
77 TBuf<64> GetAppName();
78
92 TInt SetNotification(TInt uid, TBuf<256> text);
93
106 TInt RemoveNotification(TInt uid);
107
117
129
144 TInt SetRemoveOnTap(TInt uid, TBool remove);
145
164 TInt SetLaunchAppOnTap(TInt uid, TBool launchOnTap);
165
180 TInt SetNotificationIcon(TInt uid, TPtrC8& iconBitmap);
181
194
198 void Close();
199
205 void SetTapHandler(IPiglerTapHandler *handler);
206private:
207 CPiglerTapServer *iServer;
208 TInt Connect();
209 TInt SendMessage(TInt function, const TPiglerMessage aMessage);
210 TBuf<64> iAppName;
211 TBool iConnected;
212 TInt iAppId;
213};
214
215#endif
Definition PiglerAPI.h:13
virtual void HandleTap(TInt uid)=0
Definition PiglerAPI.h:27
TInt SetRemoveOnTap(TInt uid, TBool remove)
Definition PiglerAPI.cpp:110
TBuf< 64 > GetAppName()
Definition PiglerAPI.cpp:70
TInt SetNotificationIcon(TInt uid, TPtrC8 &iconBitmap)
Definition PiglerAPI.cpp:130
TInt GetAPIVersion()
Definition PiglerAPI.cpp:64
void Close()
Definition PiglerAPI.cpp:149
TInt GetNotificationsCount()
Definition PiglerAPI.cpp:141
TInt RemoveNotification(TInt uid)
Definition PiglerAPI.cpp:85
void SetTapHandler(IPiglerTapHandler *handler)
Definition PiglerAPI.cpp:19
TInt RemoveAllNotifications()
Definition PiglerAPI.cpp:94
void SetAppId(TInt appId)
Definition PiglerAPI.cpp:24
TInt Init()
Definition PiglerAPI.cpp:47
TInt SetNotification(TInt uid, TBuf< 256 > text)
Definition PiglerAPI.cpp:75
TInt SetLaunchAppOnTap(TInt uid, TBool launchOnTap)
Definition PiglerAPI.cpp:120
TInt GetLastTappedNotification()
Definition PiglerAPI.cpp:102