PiglerAPI
|
#include <PiglerAPI.h>
Public Member Functions | |
TInt | Init (TBuf< 64 > appName) |
TInt | Init () |
void | SetAppId (TInt appId) |
TInt | GetAPIVersion () |
TBuf< 64 > | GetAppName () |
TInt | SetNotification (TInt uid, TBuf< 256 > text) |
TInt | RemoveNotification (TInt uid) |
TInt | RemoveAllNotifications () |
TInt | GetLastTappedNotification () |
TInt | SetRemoveOnTap (TInt uid, TBool remove) |
TInt | SetLaunchAppOnTap (TInt uid, TBool launchOnTap) |
TInt | SetNotificationIcon (TInt uid, TPtrC8 &iconBitmap) |
TInt | GetNotificationsCount () |
void | Close () |
void | SetTapHandler (IPiglerTapHandler *handler) |
Pigler Notifications API
void PiglerAPI::Close | ( | ) |
Closes API connection
TInt PiglerAPI::GetAPIVersion | ( | ) |
Error codes:
KErrNotReady if connection was not initialized
TBuf< 64 > PiglerAPI::GetAppName | ( | ) |
TInt PiglerAPI::GetLastTappedNotification | ( | ) |
Gets last tapped notification
Error codes:
KErrNotFound if app is not initialized
KErrNone if no notification has been tapped yet
KErrNotReady if connection was not initialized
TInt PiglerAPI::GetNotificationsCount | ( | ) |
Gets number of notifications created by this app
Error codes:
KErrNotReady if connection was not initialized
KErrNotSupported
TInt PiglerAPI::Init | ( | ) |
Initializes API connection with random app name
Don't use if you need notification callbacks!
TInt PiglerAPI::Init | ( | TBuf< 64 > | appName | ) |
Initializes API connection with specified app name
appName | Application name |
TInt PiglerAPI::RemoveAllNotifications | ( | ) |
Removes all notifications created by this app
Error codes:
KErrNotReady if connection was not initialized
TInt PiglerAPI::RemoveNotification | ( | TInt | uid | ) |
Removes notification by its UID
Error codes:
KErrNotFound if there is no such item with that uid
KErrAccessDenied if item was created by another app
KErrNotReady if connection was not initialized
uid | Notification UID |
void PiglerAPI::SetAppId | ( | TInt | appId | ) |
Sets application ID that needs to be launched on notification tap, must be called before Init()
appId | Symbian app UID |
TInt PiglerAPI::SetLaunchAppOnTap | ( | TInt | uid, |
TBool | launchOnTap | ||
) |
Marks that app needs to be launched on notification tap, by default this setting is true
Error codes:
KErrNotFound if there is no such item with that uid
KErrAccessDenied if item was created by another app
KErrNotReady if connection was not initialized
uid | Notification UID |
launchOnTap |
TInt PiglerAPI::SetNotification | ( | TInt | uid, |
TBuf< 256 > | text | ||
) |
Adds or updates notification
Error codes:
KErrNotFound if there is no such item with that uid
KErrAccessDenied if item was created by another app
KErrNotReady if connection was not initialized
uid | Notification UID, 0 - to create |
text | Notification text |
TInt PiglerAPI::SetNotificationIcon | ( | TInt | uid, |
TPtrC8 & | iconBitmap | ||
) |
Sets notification icon
Error codes:
KErrNotFound if there is no such item with that uid
KErrAccessDenied if item was created by another app
KErrUnderflow if icon or mask have the smaller size than 68x68
KErrNotReady if connection was not initialized
uid | Notification UID |
iconBitmap | Icon bitmap 68x68 in ARGB32 format |
TInt PiglerAPI::SetRemoveOnTap | ( | TInt | uid, |
TBool | remove | ||
) |
Marks that notification needs to be removed on tap, by default this setting is true
Error codes:
KErrNotFound if there is no such item with that uid
KErrAccessDenied if item was created by another app
KErrNotReady if connection was not initialized
uid | Notification UID |
remove |
void PiglerAPI::SetTapHandler | ( | IPiglerTapHandler * | handler | ) |
Sets current tap handler
handler | Tap handler, ownership is not transferred |