PiglerAPI
|
#include <PiglerAPI.h>
Public Member Functions | |
PiglerAPI () | |
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 () |
TInt | GetMaxNotificationsCount () |
TInt | GetGlobalNotificationsCount () |
TInt | StartAnnaServer () |
TInt | GetBitmapSize () |
void | Close () |
void | SetTapHandler (IPiglerTapHandler *handler) |
Pigler Notifications API
PiglerAPI::PiglerAPI | ( | ) |
Copyright (c) 2023-2024 Arman Jussupgaliyev Copyright (c) 2023 Mathew (curoviyxru)
void PiglerAPI::Close | ( | ) |
Closes API connection
TInt PiglerAPI::GetAPIVersion | ( | ) |
Error codes:
KErrNotReady if connection was not initialized
TBuf< 64 > PiglerAPI::GetAppName | ( | ) |
TInt PiglerAPI::GetBitmapSize | ( | ) |
Returns bitmap dimension
TInt PiglerAPI::GetGlobalNotificationsCount | ( | ) |
Gets number of notifications created by all applications
Error codes:
KErrNotReady if connection was not initialized
KErrNotSupported
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::GetMaxNotificationsCount | ( | ) |
Gets maximum number of notifications that can be created by plugin
Error codes:
KErrNotReady if connection was not initialized
KErrNotSupported
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!
All notifications will be removed on connection close
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
Number of notifications that can be created is limited and depends on the platform
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
KErrOverflow if no notification slots left
KErrAlreadyExists if application exceeded maximum number of notifications per app
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, since v4 bitmap size is obtained by GetBitmapSize |
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 |
TInt PiglerAPI::StartAnnaServer | ( | ) |
Starts server on Anna and N97, required to call before initializing connection