diff options
author | Hyunho Kang <hhstark.kang@samsung.com> | 2016-05-04 15:23:50 +0900 |
---|---|---|
committer | Hyunho Kang <hhstark.kang@samsung.com> | 2016-05-04 16:39:53 +0900 |
commit | dae3bdebe792f17b0b20b64d075af821a38084b9 (patch) | |
tree | 86ea4c21086ecb1289c3810cc01eb40a0e96eb35 /include | |
parent | 2018a4e199f4015d5ef9f9b08f0adc9393337d86 (diff) | |
download | badge-dae3bdebe792f17b0b20b64d075af821a38084b9.tar.gz badge-dae3bdebe792f17b0b20b64d075af821a38084b9.tar.bz2 badge-dae3bdebe792f17b0b20b64d075af821a38084b9.zip |
Refine badge_is_existing, badge_foreach APIs
- Direct DB access APIs could cause security issue
- Get data from data-provider-master
Change-Id: I1540a1a12635986d56ffccb7ad83d2da1f62e868
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
Diffstat (limited to 'include')
-rwxr-xr-x | include/badge_db.h | 2 | ||||
-rwxr-xr-x | include/badge_internal.h | 7 | ||||
-rwxr-xr-x | include/badge_ipc.h | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/badge_db.h b/include/badge_db.h index 2e2a4ba..3e068f0 100755 --- a/include/badge_db.h +++ b/include/badge_db.h @@ -39,6 +39,8 @@ int badge_db_get_count(const char *pkgname, unsigned int *count); int badge_db_set_display_option(const char *pkgname, const char *caller_pkg, unsigned int is_display); int badge_db_get_display_option(const char *pkgname, unsigned int *is_display); int badge_db_exec(sqlite3 *db, const char *query, int *num_changes); +int badge_db_get_list(GList **badge_list); +int badge_db_is_existing(const char *pkgname, bool *existing); #ifdef __cplusplus } diff --git a/include/badge_internal.h b/include/badge_internal.h index d0d24a0..453cf9d 100755 --- a/include/badge_internal.h +++ b/include/badge_internal.h @@ -47,6 +47,10 @@ extern "C" { typedef struct _badge_h badge_h; +typedef struct badge_info { + char *pkg; + unsigned int badge_count; +} badge_info_s; /** * @internal @@ -109,6 +113,7 @@ int badge_del_deferred_task( * @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter * @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @retval BADGE_ERROR_FROM_DB Error from DB + * @retval BADGE_ERROR_OUT_OF_MEMORY Out of memory * @retval BADGE_ERROR_NOT_EXIST Not exist * @retval BADGE_ERROR_SERVICE_NOT_READY Service is not ready * @see #badge_error_e @@ -138,6 +143,8 @@ int _badge_is_existing(const char *pkgname, bool *existing); int _badge_foreach_existed(badge_foreach_cb callback, void *data); +int _badge_get_list(GList **badge_list); + int _badge_insert(badge_h *badge); int _badge_remove(const char *caller, const char *pkgname); diff --git a/include/badge_ipc.h b/include/badge_ipc.h index cb23ad5..2e785ef 100755 --- a/include/badge_ipc.h +++ b/include/badge_ipc.h @@ -50,6 +50,9 @@ int badge_ipc_del_deferred_task(void (*badge_add_deferred_task)(void *data)); int badge_ipc_setting_property_set(const char *pkgname, const char *property, const char *value); int badge_ipc_setting_property_get(const char *pkgname, const char *property, char **value); +int badge_ipc_request_get_list(badge_foreach_cb callback, void *data); +int badge_ipc_request_is_existing(const char *pkgname, bool *existing); + #ifdef __cplusplus } #endif |