Functions |
int | badge_new (const char *writable_app_id) |
| Creates a badge for the application itself.
|
int | badge_remove (const char *app_id) |
| Removes the badge for the designated application.
|
int | badge_set_count (const char *app_id, unsigned int count) |
| Sets badge count for the designated application.
|
int | badge_get_count (const char *app_id, unsigned int *count) |
| Gets badge count for the designated application.
|
int | badge_set_display (const char *app_id, unsigned int is_display) |
| Sets the display option for the designated application.
|
int | badge_get_display (const char *app_id, unsigned int *is_display) |
| Gets the display option for the designated application.
|
Typedefs |
typedef enum _badge_error_e | badge_error_e |
| Enumeration for Badge Error.
|
Badge APIs.
Required Header
#include <badge.h>
Overview
It provides functions for creating and inserting and updating badge.
Enumeration Type Documentation
Enumeration for Badge Error.
- Enumerator:
BADGE_ERROR_NONE |
Success
|
BADGE_ERROR_INVALID_PARAMETER |
Invalid parameter
|
BADGE_ERROR_OUT_OF_MEMORY |
Out of memory
|
BADGE_ERROR_PERMISSION_DENIED |
Permission denied
|
BADGE_ERROR_IO_ERROR |
Error from I/O
|
BADGE_ERROR_FROM_DB |
Error from DB
|
BADGE_ERROR_ALREADY_EXIST |
Already exist
|
BADGE_ERROR_FROM_DBUS |
Error from DBus
|
BADGE_ERROR_NOT_EXIST |
Not exist
|
BADGE_ERROR_SERVICE_NOT_READY |
Error service not ready
|
Function Documentation
Gets badge count for the designated application.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] | app_id | The name of the designated application |
[out] | count | The count of the badge |
- Returns:
- BADGE_ERROR_NONE if success, other value if failure
- Return values:
-
BADGE_ERROR_NONE | Success |
BADGE_ERROR_INVALID_PARAMETER | Invalid parameter |
BADGE_ERROR_PERMISSION_DENIED | The application does not have the privilege to call this method |
BADGE_ERROR_FROM_DB | Error from DB |
BADGE_ERROR_ALREADY_EXIST | Already exist |
BADGE_ERROR_OUT_OF_MEMORY | Out of memory |
- See also:
- badge_error_e
-
badge_new()
-
badge_set_count()
- Sample code:
-
Gets the display option for the designated application.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] | app_id | The name of the designated application |
[out] | is_display | The display option (1 = display, 0 = not display) |
- Returns:
- BADGE_ERROR_NONE if success, other value if failure
- Return values:
-
BADGE_ERROR_NONE | Success |
BADGE_ERROR_INVALID_PARAMETER | Invalid parameter |
BADGE_ERROR_PERMISSION_DENIED | The application does not have the privilege to call this method |
BADGE_ERROR_FROM_DB | Error from DB |
BADGE_ERROR_NOT_EXIST | Not exist |
BADGE_ERROR_SERVICE_NOT_READY | Service is not ready |
BADGE_ERROR_OUT_OF_MEMORY | Out of memory |
- See also:
- badge_error_e
-
badge_new()
-
badge_set_count()
- Sample code:
-
int badge_new |
( |
const char * |
writable_app_id | ) |
|
Creates a badge for the application itself.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
Creates new badge to display.
- Parameters:
-
[in] | writable_app_id | The id of application which is authorized to change the badge |
- Returns:
- BADGE_ERROR_NONE if success, other value if failure
- Return values:
-
BADGE_ERROR_NONE | Success |
BADGE_ERROR_INVALID_PARAMETER | Invalid parameter |
BADGE_ERROR_PERMISSION_DENIED | The application does not have the privilege to call this method |
BADGE_ERROR_IO_ERROR | Error from I/O |
BADGE_ERROR_SERVICE_NOT_READY | Service is not ready |
- See also:
- badge_error_e
- Sample code:
-
Removes the badge for the designated application.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] | app_id | The name of the designated application |
- Returns:
- BADGE_ERROR_NONE if success, other value if failure
- Return values:
-
BADGE_ERROR_NONE | Success |
BADGE_ERROR_INVALID_PARAMETER | Invalid parameter |
BADGE_ERROR_PERMISSION_DENIED | The application does not have the privilege to call this method |
BADGE_ERROR_IO_ERROR | Error from I/O |
BADGE_ERROR_SERVICE_NOT_READY | Service is not ready |
- See also:
- badge_error_e
- Sample code:
-
Sets badge count for the designated application.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] | app_id | The name of the designated application |
[in] | count | The count of the badge |
- Returns:
- BADGE_ERROR_NONE if success, other value if failure
- Return values:
-
BADGE_ERROR_NONE | Success |
BADGE_ERROR_INVALID_PARAMETER | Invalid parameter |
BADGE_ERROR_PERMISSION_DENIED | The application does not have the privilege to call this method |
BADGE_ERROR_IO_ERROR | Error from I/O |
BADGE_ERROR_SERVICE_NOT_READY | Service is not ready |
- See also:
- badge_error_e
-
badge_new()
- Sample code:
-
Sets the display option for the designated application.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] | app_id | The name of the designated application |
[in] | is_display | The display option (1 = display, 0 = not display) |
- Returns:
- BADGE_ERROR_NONE if success, other value if failure
- Return values:
-
BADGE_ERROR_NONE | Success |
BADGE_ERROR_INVALID_PARAMETER | Invalid parameter |
BADGE_ERROR_PERMISSION_DENIED | The application does not have the privilege to call this method |
BADGE_ERROR_IO_ERROR | Error from I/O |
BADGE_ERROR_SERVICE_NOT_READY | Service is not ready |
- See also:
- badge_error_e
-
badge_new()
- Sample code:
-