summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKibum Kim <kb0929.kim@samsung.com>2012-01-07 00:50:19 +0900
committerKibum Kim <kb0929.kim@samsung.com>2012-01-07 00:50:19 +0900
commitf82d616f46273ffbb9f043ad162b8d6f1c6d410d (patch)
tree013875b2cdcbc0e5c404dc284b5c295592d032bb /include
parentbbe023c911411370c4896540a424a455885cc87b (diff)
downloadnotification-f82d616f46273ffbb9f043ad162b8d6f1c6d410d.tar.gz
notification-f82d616f46273ffbb9f043ad162b8d6f1c6d410d.tar.bz2
notification-f82d616f46273ffbb9f043ad162b8d6f1c6d410d.zip
Git init
Diffstat (limited to 'include')
-rwxr-xr-xinclude/notification.h1776
-rwxr-xr-xinclude/notification_db.h53
-rwxr-xr-xinclude/notification_debug.h46
-rwxr-xr-xinclude/notification_error.h46
-rwxr-xr-xinclude/notification_group.h57
-rwxr-xr-xinclude/notification_internal.h76
-rwxr-xr-xinclude/notification_list.h271
-rwxr-xr-xinclude/notification_noti.h52
-rwxr-xr-xinclude/notification_ongoing.h33
-rwxr-xr-xinclude/notification_type.h253
10 files changed, 2663 insertions, 0 deletions
diff --git a/include/notification.h b/include/notification.h
new file mode 100755
index 0000000..a833560
--- /dev/null
+++ b/include/notification.h
@@ -0,0 +1,1776 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_H__
+#define __NOTIFICATION_H__
+
+#include <time.h>
+#include <bundle.h>
+
+#include <notification_error.h>
+#include <notification_type.h>
+#include <notification_list.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup NOTIFICATION_LIBRARY Notification Library
+ * @brief This notification library provides UI notification event. Inserted notification event is displaying Notification Tray, Indicator, etc.
+ */
+
+/**
+ * @ingroup NOTIFICATION_LIBRARY
+ * @defgroup NOTIFICATION notification core API
+ * @brief Notification core API
+ */
+
+/**
+ * @addtogroup NOTIFICATION
+ * @{
+ */
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_image()
+ *
+ */
+notification_error_e notification_set_icon(notification_h noti,
+ const char *icon_path);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_image()
+ *
+ */
+notification_error_e notification_get_icon(notification_h noti,
+ char **icon_path);
+
+/**
+ * @brief This function set image path according to type.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] type notification image type
+ * @param[in] image_path image file full path
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre Notification handle should be created by notification_new()
+ * @post
+ * @see #notification_image_type_e
+ * @see notification_new()
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_image(notification_h noti,
+ notification_image_type_e type,
+ const char *image_path);
+
+/**
+ * @brief This function get image path according to type.
+ * @details
+ * @remarks Do not free image_path. It will be freed when notification_free() or notification_free_list().
+ * @param[in] noti notification handle
+ * @param[in] type notification image type
+ * @param[out] image_path image file full path
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre Notification handle should be created by notification_new()
+ * @post
+ * @see #notification_image_type_e
+ * @see notification_new()
+ * @par Sample code:
+ * @code
+ #include <notification.h>
+ ...
+ {
+ char *image_path = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_image(notification_h noti,
+ notification_image_type_e type,
+ char **image_path);
+
+/**
+ * @brief This function set time infomation.
+ * @details If input_time is 0, time information is set by current time.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] input_time input time
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre Notification handle should be created by notification_new()
+ * @post
+ * @see notification_new()
+ * @par Sample code:
+ * @code
+#include <notification.h>
+ ...
+ {
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_time(noti, time(NULL));
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+ }
+ * @endcode
+ */
+notification_error_e notification_set_time(notification_h noti,
+ time_t input_time);
+
+/**
+ * @brief This function get time information.
+ * @details If ret_time is 0, time information is not set before.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] ret_time return time value
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre Notification handle should be created by notification_new()
+ * @post
+ * @see notification_new()
+ * @par Sample code:
+ * @code
+ #include <notification.h>
+ ...
+ {
+ time_t ret_time;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_time(noti, &ret_time);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_time(notification_h noti,
+ time_t * ret_time);
+
+/**
+ * @brief This function get insert time information.
+ * @details If ret_time is 0, this notification data is not inserted before.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] ret_time return time value
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+ #include <notification.h>
+ ...
+ {
+ time_t ret_time;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_insert_time(noti, &ret_time);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+ }
+ * @endcode
+ */
+notification_error_e notification_get_insert_time(notification_h noti,
+ time_t * ret_time);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_text()
+ *
+ */
+notification_error_e notification_set_title(notification_h noti,
+ const char *title,
+ const char *loc_title);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_text()
+ *
+ */
+notification_error_e notification_get_title(notification_h noti,
+ char **title,
+ char **loc_title);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_text()
+ *
+ */
+notification_error_e notification_set_group_title(const char *pkgname,
+ int group_id,
+ const char *title,
+ const char *loc_title,
+ notification_count_display_type_e
+ count_display);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_text()
+ *
+ */
+notification_error_e notification_get_group_title(const char *pkgname,
+ int group_id,
+ char **title,
+ char **loc_title,
+ notification_count_display_type_e *count_display);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_text()
+ *
+ */
+notification_error_e notification_set_content(notification_h noti,
+ const char *content,
+ const char *loc_content);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_text()
+ *
+ */
+notification_error_e notification_get_content(notification_h noti,
+ char **content,
+ char **loc_content);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_text()
+ *
+ */
+notification_error_e notification_set_default_content(notification_h noti,
+ const char *content,
+ const char *loc_content);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_text()
+ *
+ */
+notification_error_e notification_get_default_content(notification_h noti,
+ char **content,
+ char **loc_content);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_text()
+ *
+ */
+notification_error_e notification_set_group_content(const char *pkgname,
+ int group_id,
+ const char *content,
+ const char *loc_content,
+ notification_count_display_type_e count_display);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_text()
+ *
+ */
+notification_error_e notification_get_group_content(const char *pkgname,
+ int group_id,
+ char **content,
+ char **loc_content,
+ notification_count_display_type_e *count_display);
+
+/**
+ * @brief This function set text.
+ * @details Set title, content string. If text is formated data(only support %d, %f, %s), type - value pair should be set.
+ * If %d, type NOTIFICATION_VARIABLE_TYPE_INT and value is integer value.
+ * If %f, type NOTIFICATION_VARIABLE_TYPE_DOUBLE and value is double value.
+ * If %s, type NOTIFICATION_VARIABLE_TYPE_STRING and value is character string.
+ * If type is NOTIFICATION_VARIABLE_TYPE_COUNT, notification count is displaying with text.
+ * If value is NOTIFICATION_COUNT_POS_LEFT, count is displaying at the left of the text.
+ * If value is NOTIFICATION_COUNT_POS_IN, count is displaying in the text that text has %d format.
+ * If value is NOTIFICATION_COUNT_POS_RIGHT, count is displaying at the right of the text.
+ * Variable parameter should be terminated NOTIFICATION_VARIABLE_TYPE_NONE.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] type notification text type
+ * @param[in] text basic text
+ * @param[in] key text key for localization
+ * @param[in] args_type variable parameter that type - value pair.
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre notification handle should be created by notification_new().
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, "I'm Title", "IDS_APP_BODY_IM_TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_text(notification_h noti,
+ notification_text_type_e type,
+ const char *text,
+ const char *key,
+ int args_type, ...);
+
+/**
+ * @brief This function get text.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] type notification text type.
+ * @param[out] text text
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ char *text = NULL;
+
+ noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_text(notification_h noti,
+ notification_text_type_e type,
+ char **text);
+
+/**
+ * @brief This function set text domain.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] domain text domain
+ * @param[in] dir text dir
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_text_domain(noti, PACKAGE, LOCALEDIR);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_text_domain(notification_h noti,
+ const char *domain,
+ const char *dir);
+
+/**
+ * @brief This function get text domain.
+ * @details
+ * @remarks Do not free returned domain and dir. These are freed when notification_free or notification_free_list.
+ * @param[in] noti notification handle
+ * @param[out] domain domain
+ * @param[out] dir locale dir
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ char *domain = NULL;
+ char *dir = NULL;
+
+ noti_err = notification_get_text_domain(noti, &domain, &dir);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_text_domain(notification_h noti,
+ char **domain,
+ char **dir);
+
+/**
+ * @brief This function set notification sound.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] type notification sound type
+ * @param[in] path user sound file path
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_sound(notification_h noti,
+ notification_sound_type_e type,
+ const char *path);
+
+/**
+ * @brief This function get notification sound.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] type notification sound type
+ * @param[out] path user sound file path
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE;
+
+ noti_err = notification_get_sound(noti, &type, NULL);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_sound(notification_h noti,
+ notification_sound_type_e *type,
+ const char **path);
+
+/**
+ * @brief This function set notification vibration.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] type notification vibration type
+ * @param[in] path user vibration file path
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_vibration(notification_h noti,
+ notification_vibration_type_e type,
+ const char *path);
+
+/**
+ * @brief This function get notification vibration.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] type notification sound type
+ * @param[out] path user vibration file path
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE;
+
+ noti_err = notification_get_vibration(noti, &type, NULL);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_vibration(notification_h noti,
+ notification_vibration_type_e *type,
+ const char **path);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_execute_option()
+ *
+ */
+notification_error_e notification_set_application(notification_h noti, const char *pkgname); /* Do not use this */
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_execute_option()
+ *
+ */
+notification_error_e notification_get_application(notification_h noti, char **pkgname); /* Do not use this */
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_execute_option()
+ *
+ */
+notification_error_e notification_set_args(notification_h noti, bundle * args, bundle * group_args); /* Do not use this */
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_execute_option()
+ *
+ */
+notification_error_e notification_get_args(notification_h noti, bundle ** args, bundle ** group_args); /* Do not use this */
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_execute_option()
+ *
+ */
+notification_error_e notification_set_service_data(notification_h noti,
+ bundle *service_data,
+ bundle *group_service_data);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_execute_option()
+ *
+ */
+notification_error_e notification_get_service_data(notification_h noti,
+ bundle **service_data,
+ bundle **group_service_data);
+
+/**
+ * @brief This function set execute option.
+ * @details When notification data selected in display application, application launched by appsvc_run_service with service_handle.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] type notification execute type
+ * @param[in] text basic text for button
+ * @param[in] key value for localizaed text
+ * @param[in] service_handle appsvc bundle data
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ */
+notification_error_e notification_set_execute_option(notification_h noti,
+ notification_execute_type_e type,
+ const char *text,
+ const char *key,
+ bundle *service_handle);
+
+/**
+ * @brief This function get execute option.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] type notification execute type
+ * @param[out] text text for button
+ * @param[out] service_handle appsvc bundle data
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ bundle *b = NULL;
+
+ ...
+
+ noti_err = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, &b);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_execute_option(notification_h noti,
+ notification_execute_type_e type,
+ const char **text,
+ bundle **service_handle);
+
+/**
+ * @brief This function set notification property.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] flags property with | operation
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ bundle *b = NULL;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_property(notification_h noti,
+ int flags);
+
+/**
+ * @brief This function get notification property.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] flags notification property
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ int flags = 0;
+
+ noti_err = notification_get_property(noti, &flags);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_property(notification_h noti,
+ int *flags);
+
+/**
+ * @brief This function set display application list.
+ * @details All display application is enable(NOTIFICATION_DISPLAY_APP_ALL) if you are not call this API.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] applist with | operation
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ bundle *b = NULL;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+}
+ * @endcode
+ */
+notification_error_e notification_set_display_applist(notification_h noti,
+ int applist);
+
+/**
+ * @brief This function get display application list.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] applist display application list.
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ int applist = 0;
+
+ noti_err = notification_get_display_applist(noti, &applist);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_display_applist(notification_h noti,
+ int *applist);
+
+/**
+ * @brief This function set initial size for ongoing type.
+ * @details After notification_insert, it does not upate size. If you want to update size, please call notification_update_size().
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] size double type size.
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_size(noti, 0.0);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_size(notification_h noti,
+ double size);
+
+/**
+ * @brief This function get progress size.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] size progress size
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ double size = 0.0;
+
+ noti_err = notification_get_size(noti, &size);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_size(notification_h noti,
+ double *size);
+
+/**
+ * @brief This function set initial progress for ongoing type.
+ * @details After notification_insert, it does not upate progress. If you want to update progress, please call notification_update_progress().
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] percentage progress percentage
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_progress(noti, 0.0);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_progress(notification_h noti,
+ double percentage);
+
+/**
+ * @brief This function get progress percentage.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] percentage progress percentage
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ double percentage = 0.0;
+
+ noti_err = notification_get_progress(noti, &percentage);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_progress(notification_h noti,
+ double *percentage);
+
+/**
+ * @brief This function set caller_pkgname.
+ * @details caller_pkgname is set automatically when notification_new. We are not recommend to use this API.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] pkgname caller package name
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_pkgname(noti, "org.tizen.phone");
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_pkgname(notification_h noti,
+ const char *pkgname);
+
+/**
+ * @brief This function get caller pkgname.
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] pkgname caller package name
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ char *pkgname = NULL;
+
+ noti_err = notification_get_pkgname(noti, &pkgname);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_pkgname(notification_h noti,
+ char **pkgname);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_set_badge()
+ *
+ */
+notification_error_e notification_set_unread_count(const char *pkgname,
+ int group_id,
+ int unread_count);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_badge()
+ *
+ */
+notification_error_e notification_get_unread_count(const char *pkgname,
+ int group_id,
+ int *unread_count);
+
+/**
+ * @brief This function set application badge count.
+ * @details
+ * @remarks
+ * @param[in] pkgname If NULL, caller pkgname is set internally.
+ * @param[in] group_id group id
+ * @param[in] count badge count
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+#include <notification.h>
+ ...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_set_badge(NULL, NOTIFICATION_GROUP_ID_NONE, 5);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+ }
+ * @endcode
+ */
+notification_error_e notification_set_badge(const char *pkgname,
+ int group_id, int count);
+
+/**
+ * @brief This function get application badge count.
+ * @details
+ * @remarks
+ * @param[in] pkgname If NULL, caller pkgname is set internally.
+ * @param[in] group_id group id
+ * @param[out] count badge count
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+#include <notification.h>
+ ...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ int count = 0;
+
+ noti_err = notification_get_badge(NULL, NOTIFICATION_GROUP_ID_NONE, &count);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+ }
+ * @endcode
+ */
+notification_error_e notification_get_badge(const char *pkgname,
+ int group_id, int *count);
+
+/**
+ * @brief This function get Group ID and Private ID
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] group_id Group ID
+ * @param[out] priv_id Private ID
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+ ...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ int group_id, priv_id;
+
+ noti_err = notification_get_id(noti, &group_id, &priv_id);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+ }
+ * @endcode
+ */
+notification_error_e notification_get_id(notification_h noti,
+ int *group_id, int *priv_id);
+
+/**
+ * @brief This function get notification type
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] type notification type
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ notification_type_e type;
+
+ noti_err = notification_get_type(noti, &type);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_type(notification_h noti,
+ notification_type_e * type);
+
+/**
+ * @brief This function insert notification data.
+ * @details Notification data is inserted to DB and then notification data is displaying display application.
+ * When notification_new() call, if priv_id is NOTIFICATION_PRIV_ID_NONE, priv_id is return internally set priv_id.
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] priv_id private ID
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre notification_new()
+ * @post notification_free()
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_insert(noti, NULL);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_insert(notification_h noti,
+ int *priv_id);
+
+/**
+ * @brief This function update notification data. Not fully implemented yet.
+ * @details Display application update UI.
+ * @remarks
+ * @param[in] noti notification handle that is created by notification_new().
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_update(NULL);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_update(notification_h noti);
+
+/**
+ * @brief This function clear all notification of type.
+ * @details Not recommand API. Only for notification tray's clear button operation.
+ * @remarks
+ * @param[in] type notification type
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see #notification_type_e
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notifiation_clear(NOTIFICATION_TYPE_NOTI);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notifiation_clear(notification_type_e type);
+
+/**
+ * @brief This function delete notification by type.
+ * @details If pkgname is NULL, caller_pkgname is set internally.
+ * @remarks
+ * @param[in] pkgname caller application package name or NULL
+ * @param[in] type notification type
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_delete_all_by_type(const char *pkgname,
+ notification_type_e type);
+
+/**
+ * @brief This function delete group notification data by group ID.
+ * @details If pkgname is NULL, caller_pkgname is set internally.
+ * @remarks
+ * @param[in] pkgname caller application package name or NULL
+ * @param[in] type notification type
+ * @param[in] group_id group ID
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_delete_group_by_group_id(NULL, NOTIFICATION_TYPE_NOTI, APP_GROUP_ID);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_delete_group_by_group_id(const char *pkgname,
+ notification_type_e type,
+ int group_id);
+
+/**
+ * @brief This function delete group notification data that include priv_id.
+ * @details If pkgname is NULL, caller_pkgname is set internally.
+ * @remarks
+ * @param[in] pkgname caller application package name or NULL
+ * @param[in] type notification type
+ * @param[in] priv_id priv ID
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_delete_group_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_delete_group_by_priv_id(const char *pkgname,
+ notification_type_e type,
+ int priv_id);
+
+/**
+ * @brief This function delete notification data that private ID is priv_id.
+ * @details If pkgname is NULL, caller_pkgname is set internally.
+ * @remarks
+ * @param[in] pkgname caller application package name or NULL
+ * @param[in] type notification type
+ * @param[in] priv_id priv ID
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_delete_by_priv_id(const char *pkgname,
+ notification_type_e type,
+ int priv_id);
+
+/**
+ * @brief This function delete notification data from DB
+ * @details notification_delete() remove notification data from DB and notification_free release menory of notification data.
+ * @remarks
+ * @param[in] noti notification handle
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notificaton_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ ...
+
+ noti_err = notification_delete(noti);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+
+}
+ * @endcode
+ */
+notification_error_e notification_delete(notification_h noti);
+
+/**
+ * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
+ * @details Display application update UI.
+ * @remarks
+ * @param[in] noti notification handle or NULL if priv_id is valid
+ * @param[in] priv_id private ID
+ * @param[in] progress % value of progressive data
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_update_progress(NULL, APP_NOTI_PRIV_ID, 0.6);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_update_progress(notification_h noti,
+ int priv_id,
+ double progress);
+
+/**
+ * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
+ * @details Display application update UI.
+ * @remarks
+ * @param[in] noti notification handle or NULL if priv_id is valid
+ * @param[in] priv_id private ID
+ * @param[in] size bytes of progressive data
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @pre
+ * @post
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_update_size(NULL, APP_NOTI_PRIV_ID, 3000000);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_update_size(notification_h noti,
+ int priv_id, double size);
+
+/**
+ * @brief This function create internal structure data and return notification handle.
+ * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
+ * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
+ * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
+ * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT,
+ * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
+ * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
+ * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
+ * @remarks
+ * @param[in] type notification type
+ * @param[in] group_id Group ID
+ * @param[in] priv_id Priv ID
+ * @return notification handle(#notification_h) if success, NULL if failure.
+ * @retval #notification_h - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_type_e
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+ ...
+}
+ * @endcode
+ */
+notification_h notification_new(notification_type_e type, int group_id,
+ int priv_id);
+
+/**
+ * @brief This function free internal structure data of notification handle.
+ * @details Internal data of notification handle is released. Notification data that inserted is not deleted.
+ * @remarks
+ * @param[in] noti notification handle
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre notification_new()
+ * @post
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+ ...
+
+ noti_err = notification_free(noti);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_free(notification_h noti);
+
+/**
+ * @brief This function register notification chagned callback.
+ * @details
+ * @remarks
+ * @param[in] changed_cb callback function
+ * @param[in] user_data user data
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre notification_new()
+ * @post
+ * @see notification_unresister_changed_cb()
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e
+notification_resister_changed_cb(
+ void (*changed_cb)(void *data, notification_type_e type),
+ void *user_data);
+
+/**
+ * @brief This function unregister notification chagned callback.
+ * @details
+ * @remarks
+ * @param[in] changed_cb callback function
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre notification_new()
+ * @post
+ * @see notification_resister_changed_cb()
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ noti_err = notification_unresister_changed_cb(app_changed_cb);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e
+notification_unresister_changed_cb(
+ void (*changed_cb)(void *data, notification_type_e type));
+
+/**
+ * @brief This function get notification data count.
+ * @details Count is the result of the conditions that type, pkgname, group_id, priv_id.
+ * @remarks
+ * @param[in] type notification type
+ * @param[in] pkgname caller application package name
+ * @param[in] group_id group id
+ * @param[in] priv_id private id
+ * @param[out] count notification data number
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre
+ * @post
+ * @see #notification_type_e
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ int count = 0;
+
+ noti_err = notification_get_count(NOTIFICATION_TYPE_NONE, NULL, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE, &count);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_count(notification_type_e type,
+ const char *pkgname,
+ int group_id, int priv_id,
+ int *count);
+
+/**
+ * @brief This function will be deprecated.
+ * @see notification_get_grouping_list()
+ *
+ */
+notification_error_e notification_get_list(notification_type_e type,
+ int count,
+ notification_list_h * list);
+
+/**
+ * @brief This function return notification grouping list handle.
+ * @details If count is -1, all of notification list is returned.
+ * @remarks
+ * @param[in] type notification type
+ * @param[in] count returned notification data number
+ * @param[out] list notification list handle
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_grouping_list(notification_type_e type,
+ int count,
+ notification_list_h *list);
+
+/**
+ * @brief This function return notification detail list handle of grouping data.
+ * @details If count is -1, all of notification list is returned.
+ * @remarks
+ * @param[in] pkgname caller application package name
+ * @param[in] group_id group id
+ * @param[in] priv_id private id
+ * @param[in] count returned notification data number
+ * @param[out] list notification list handle
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, &noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_detail_list(const char *pkgname,
+ int group_id,
+ int priv_id,
+ int count,
+ notification_list_h *list);
+
+/**
+ * @brief This function release notification list.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
+ * @retval NOTIFICATION_ERROR_NONE - success
+ * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @pre notification_get_grouping_list() or notification_get_detail_list ()
+ * @post
+ * @see #notification_list_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ ...
+
+ noti_err = notification_free_list(noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_free_list(notification_list_h list);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __NOTIFICATION_H__ */
diff --git a/include/notification_db.h b/include/notification_db.h
new file mode 100755
index 0000000..a7fb204
--- /dev/null
+++ b/include/notification_db.h
@@ -0,0 +1,53 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_DB_H__
+#define __NOTIFICATION_DB_H__
+
+#include <bundle.h>
+#include <sqlite3.h>
+
+#ifndef DBDIR
+#error "DBDIR not defined"
+#endif
+
+#ifndef DBFILE
+#error "DBFILE not defined"
+#endif
+
+#define DBPATH DBDIR"/"DBFILE
+
+#define NOTIFICATION_QUERY_MAX 4096
+
+#define NOTIFICATION_EMPTY_STR ""
+#define NOTIFICATION_CHECK_STR(p) ((p)?(p):NOTIFICATION_EMPTY_STR)
+
+sqlite3 *notification_db_open(const char *dbfile);
+
+int notification_db_close(sqlite3 ** db);
+
+int notification_db_exec(sqlite3 * db, const char *query);
+
+char *notification_db_column_text(sqlite3_stmt * stmt, int col);
+
+bundle *notification_db_column_bundle(sqlite3_stmt * stmt, int col);
+
+#endif /* __NOTIFICATION_DB_H__ */
diff --git a/include/notification_debug.h b/include/notification_debug.h
new file mode 100755
index 0000000..feebbb7
--- /dev/null
+++ b/include/notification_debug.h
@@ -0,0 +1,46 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_DEBUG_H__
+#define __NOTIFICATION_DEBUG_H__
+
+#define LOG_TAG "notification"
+#include <dlog.h>
+
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__ ((visibility("default")))
+#endif
+
+#ifndef _DLOG_H_
+#include <stdio.h>
+#define NOTIFICATION_ERR(fmt, arg...)\
+ do { fprintf(stderr, "["LOG_TAG"] %s(%d):"fmt"\n", __FUNCTION__, __LINE__, ##arg); } while (0)
+#define NOTIFICATION_INFO(fmt, arg...)\
+ do { fprintf(stdout, "["LOG_TAG"] %s(%d):"fmt"\n", __FUNCTION__, __LINE__, ##arg); } while (0)
+#define NOTIFICATION_DBG(fmt, arg...)\
+ do { fprintf(stdout, "["LOG_TAG"] %s(%d):"fmt"\n", __FUNCTION__, __LINE__, ##arg); } while (0)
+#else
+#define NOTIFICATION_ERR(...) LOGE(__VA_ARGS__)
+#define NOTIFICATION_INFO(...) LOGI(__VA_ARGS__)
+#define NOTIFICATION_DBG(...) LOGD(__VA_ARGS__)
+#endif
+
+#endif /* __NOTIFICATION_DEBUG_H__ */
diff --git a/include/notification_error.h b/include/notification_error.h
new file mode 100755
index 0000000..034a465
--- /dev/null
+++ b/include/notification_error.h
@@ -0,0 +1,46 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_ERROR_H__
+#define __NOTIFICATION_ERROR_H__
+
+/**
+ * @addtogroup NOTIFICATION_TYPE
+ * @{
+ */
+
+/**
+ * @breief Enumeration for notification error
+ */
+typedef enum _notification_error {
+ NOTIFICATION_ERROR_NONE = 0, /**< Success */
+ NOTIFICATION_ERROR_INVALID_DATA = -1, /**< Invalid parameter */
+ NOTIFICATION_ERROR_NO_MEMORY = -2, /**< No memory */
+ NOTIFICATION_ERROR_FROM_DB = -3, /**< Error from DB query */
+ NOTIFICATION_ERROR_ALREADY_EXIST_ID = -4, /**< Already exist private ID */
+ NOTIFICATION_ERROR_FROM_DBUS = -5, /**< Error from DBus */
+} notification_error_e;
+
+/**
+ * @}
+ */
+
+#endif /* __NOTIFICATION_ERROR_H__ */
diff --git a/include/notification_group.h b/include/notification_group.h
new file mode 100755
index 0000000..5c79232
--- /dev/null
+++ b/include/notification_group.h
@@ -0,0 +1,57 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_GROUP_H__
+#define __NOTIFICATION_GROUP_H__
+
+#include <notification.h>
+
+notification_error_e notification_group_set_title(const char *pkgname,
+ int group_id,
+ const char *title,
+ const char *loc_title,
+ notification_count_display_type_e count_display);
+
+notification_error_e notification_group_get_title(const char *pkgname,
+ int group_id,
+ char **ret_title,
+ char **ret_loc_title,
+ notification_count_display_type_e *count_display);
+
+notification_error_e notification_group_set_content(const char *pkgname,
+ int group_id,
+ const char *content,
+ const char *loc_content,
+ notification_count_display_type_e count_display);
+
+notification_error_e notification_group_get_content(const char *pkgname,
+ int group_id,
+ char **ret_content,
+ char **ret_loc_content,
+ notification_count_display_type_e *count_display);
+
+notification_error_e notification_group_set_badge(const char *pkgname,
+ int group_id, int count);
+
+notification_error_e notification_group_get_badge(const char *pkgname,
+ int group_id, int *count);
+
+#endif /* __NOTIFICATION_GROUP_H__ */
diff --git a/include/notification_internal.h b/include/notification_internal.h
new file mode 100755
index 0000000..77b75c3
--- /dev/null
+++ b/include/notification_internal.h
@@ -0,0 +1,76 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_INTERNAL_H__
+#define __NOTIFICATION_INTERNAL_H__
+
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__ ((visibility("default")))
+#endif
+
+struct _notification {
+ notification_type_e type;
+
+ int group_id; /* Group ID */
+ int internal_group_id; /* Internal Group ID */
+ int priv_id; /* Private ID */
+
+ char *caller_pkgname; /* Caller App package name */
+ char *launch_pkgname; /* Launch App package name. It will be from appsvc_set_pkgname */
+ bundle *args; /* Will be removed. */
+ bundle *group_args; /* Will be removed. */
+
+ bundle *b_execute_option;
+ bundle *b_service_responding;
+ bundle *b_service_single_launch;
+ bundle *b_service_multi_launch;
+
+ char *domain; /* Text domain for localization */
+ char *dir; /* Text dir for localization */
+
+ bundle *b_text; /* basic text */
+ bundle *b_key; /* key for localized text */
+ bundle *b_format_args; /* args type and value for format string */
+ int num_format_args; /* number of format string args */
+
+ bundle *b_image_path; /* image path */
+
+ notification_sound_type_e sound_type;
+ char *sound_path;
+ notification_vibration_type_e vibration_type;
+ char *vibration_path;
+
+ time_t time; /* time set by application */
+ time_t insert_time; /* insert time */
+
+ int flags_for_property; /* property NOTIFICATION_PROP_XXX */
+ int display_applist; /* display app list NOTIFICATION_DISPLAY_APP_XXX */
+
+ double progress_size; /* size of progress */
+ double progress_percentage; /* percentage of progress */
+
+ char *app_icon_path; /* Temporary stored app icon path from AIL */
+ char *app_name; /* Temporary stored app name from AIL */
+ char *temp_title;
+ char *temp_content;
+};
+
+#endif /* __NOTIFICATION_INTERNAL_H__ */
diff --git a/include/notification_list.h b/include/notification_list.h
new file mode 100755
index 0000000..2a490e3
--- /dev/null
+++ b/include/notification_list.h
@@ -0,0 +1,271 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_LIST_H__
+#define __NOTIFICATION_LIST_H__
+
+#include <notification.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup NOTIFICATION_LIBRARY
+ * @defgroup NOTIFICATION_LIST notification list
+ * @brief Notification List API
+ */
+
+/**
+ * @addtogroup NOTIFICATION_LIST
+ * @{
+ */
+
+/**
+ * @breief Notification list handle
+ */
+typedef struct _notification_list *notification_list_h;
+
+/**
+ * @brief This function get head pointer of the notification list.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @return notification list handle if success, NULL if failure.
+ * @retval notification list handle(#notification_list_h) - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+
+ noti_list = notification_list_get_head(noti_list);
+}
+ * @endcode
+ */
+notification_list_h notification_list_get_head(notification_list_h list);
+
+/**
+ * @brief This function get tail pointer of the notification list.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @return notification list handle if success, NULL if failure.
+ * @retval notification list handle(#notification_list_h) - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+
+ noti_list = notification_list_get_tail(noti_list);
+}
+ * @endcode
+ */
+notification_list_h notification_list_get_tail(notification_list_h list);
+
+/**
+ * @brief This function get previous pointer of the current notification list.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @return notification list handle if success, NULL if failure.
+ * @retval notification list handle(#notification_list_h) - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+
+ noti_list = notification_list_get_prev(noti_list);
+}
+ * @endcode
+ */
+notification_list_h notification_list_get_prev(notification_list_h list);
+
+/**
+ * @brief This function get next pointer of the current notification list.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @return notification list handle if success, NULL if failure.
+ * @retval notification list handle(#notification_list_h) - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+
+ noti_list = notification_list_get_next(noti_list);
+}
+ * @endcode
+ */
+notification_list_h notification_list_get_next(notification_list_h list);
+
+/**
+ * @brief This function get notification handle that list has.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @return notification handle if success, NULL if failure.
+ * @retval notification handle(#notification_h) - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+
+ noti = notification_list_get_data(noti_list);
+}
+ * @endcode
+ */
+notification_h notification_list_get_data(notification_list_h list);
+
+/**
+ * @brief This function append notification data in notification list.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @param[in] noti notification handle
+ * @return notification handle if success, NULL if failure.
+ * @retval notification handle(#notification_h) - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+ if(noti == NULL) {
+ return;
+ }
+
+ noti_list = notification_list_append(noti_list, noti);
+}
+ * @endcode
+ */
+notification_list_h notification_list_append(notification_list_h list,
+ notification_h noti);
+
+/**
+ * @brief This function remove notification data from notification list.
+ * @details
+ * @remarks
+ * @param[in] list notification list handle
+ * @param[in] noti notification handle
+ * @return notification handle if success, NULL if failure.
+ * @retval notification handle(#notification_h) - success
+ * @retval NULL - failure
+ * @pre
+ * @post
+ * @see #notification_list_h
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_list_h noti_list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ ...
+
+ noti_list = notification_list_remove(noti_list, noti);
+}
+ * @endcode
+ */
+notification_list_h notification_list_remove(notification_list_h list,
+ notification_h noti);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __NOTIFICATION_LIST_H__ */
diff --git a/include/notification_noti.h b/include/notification_noti.h
new file mode 100755
index 0000000..a5d934e
--- /dev/null
+++ b/include/notification_noti.h
@@ -0,0 +1,52 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_NOTI_H__
+#define __NOTIFICATION_NOTI_H__
+
+#include <notification.h>
+
+int notification_noti_insert(notification_h noti);
+
+int notification_noti_delete_all(notification_type_e type, const char *pkgname);
+
+int notification_noti_delete_group_by_group_id(const char *pkgname,
+ int group_id);
+
+int notification_noti_delete_group_by_priv_id(const char *pkgname, int priv_id);
+
+int notification_noti_delete_by_priv_id(const char *pkgname, int priv_id);
+
+notification_error_e notification_noti_get_count(notification_type_e type,
+ const char *pkgname,
+ int group_id, int priv_id,
+ int *count);
+
+notification_error_e notification_noti_get_grouping_list(notification_type_e type,
+ int count,
+ notification_list_h *list);
+
+notification_error_e notification_noti_get_detail_list(const char *pkgname,
+ int group_id,
+ int priv_id, int count,
+ notification_list_h *list);
+
+#endif /* __NOTIFICATION_NOTI_H__ */
diff --git a/include/notification_ongoing.h b/include/notification_ongoing.h
new file mode 100755
index 0000000..6d04798
--- /dev/null
+++ b/include/notification_ongoing.h
@@ -0,0 +1,33 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_ONGOING_H__
+#define __NOTIFICATION_ONGOING_H__
+
+#include <notification.h>
+notification_error_e notification_ongoing_update_progress(const char *caller_pkgname,
+ int priv_id,
+ double progress);
+
+notification_error_e notification_ongoing_update_size(const char *caller_pkgname,
+ int priv_id, double size);
+
+#endif /* __NOTIFICATION_ONGOING_H__ */
diff --git a/include/notification_type.h b/include/notification_type.h
new file mode 100755
index 0000000..b2584ba
--- /dev/null
+++ b/include/notification_type.h
@@ -0,0 +1,253 @@
+/*
+ * libnotification
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NOTIFICATION_TYPE_H__
+#define __NOTIFICATION_TYPE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup NOTIFICATION_LIBRARY
+ * @defgroup NOTIFICATION_TYPE notification type
+ * @brief Notification type
+ */
+
+/**
+ * @addtogroup NOTIFICATION_TYPE
+ * @{
+ */
+
+/**
+ * @breief Enumeration for notification sound type.
+ */
+typedef enum _notification_sound_type {
+ NOTIFICATION_SOUND_TYPE_NONE = -1,
+ /**< Default value. Disable sound */
+ NOTIFICATION_SOUND_TYPE_DEFAULT = 0,
+ /**< New chat sound */
+ NOTIFICATION_SOUND_TYPE_USER_DATA,
+ /**< User sound data */
+ NOTIFICATION_SOUND_TYPE_MAX,
+ /**< Max flag */
+} notification_sound_type_e;
+
+/**
+ * @breief Enumeration for notification vibration type.
+ */
+typedef enum _notification_vibration_type {
+ NOTIFICATION_VIBRATION_TYPE_NONE = -1,
+ /**< Default value. Disable vibration */
+ NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0,/**< New chat vibration */
+ NOTIFICATION_VIBRATION_TYPE_USER_DATA,
+ /**< User vibration data */
+ NOTIFICATION_VIBRATION_TYPE_MAX,/**< Max flag */
+} notification_vibration_type_e;
+
+/**
+ * @breief Will be deprecated.
+ */
+typedef enum _notification_count_display_type {
+ NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1,
+ NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0,
+ NOTIFICATION_COUNT_DISPLAY_TYPE_IN,
+ NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT,
+ NOTIFICATION_COUNT_DISPLAY_TYPE_MAX,
+} notification_count_display_type_e;
+
+/**
+ * @breief Enumeration for notification count position in the text.
+ */
+typedef enum _notifcation_count_pos_type {
+ NOTIFICATION_COUNT_POS_NONE = -1,
+ /**< Count data is not displaying in the text */
+ NOTIFICATION_COUNT_POS_LEFT = 0,/**< Count data is displaying at the left of the text */
+ NOTIFICATION_COUNT_POS_IN,
+ /**< Count data is displaying in the text */
+ NOTIFICATION_COUNT_POS_RIGHT,
+ /**< Count data is displaying at the right of the text */
+ NOTIFICATION_COUNT_POS_MAX,
+ /**< Max flag */
+} notification_count_pos_type_e;
+
+/**
+ * @breief Enumeration for notification variable parameter type
+ */
+typedef enum _notification_variable_type {
+ NOTIFICATION_VARIABLE_TYPE_NONE = -1,
+ /**< Variable parameter type is NONE */
+ NOTIFICATION_VARIABLE_TYPE_INT = 0,
+ /**< Variable parameter type is int */
+ NOTIFICATION_VARIABLE_TYPE_DOUBLE,
+ /**< Variable parameter type is double */
+ NOTIFICATION_VARIABLE_TYPE_STRING,
+ /**< Variable parameter type is string */
+ NOTIFICATION_VARIABLE_TYPE_COUNT,
+ /**< Variable parameter type is count */
+ NOTIFICATION_VARIABLE_TYPE_MAX,
+ /**< Max flag */
+} notification_variable_type_e;
+
+/**
+ * @breief Enumeration for notification text type.
+ */
+typedef enum _notification_text_type {
+ NOTIFICATION_TEXT_TYPE_NONE = -1,
+ /**< NONE */
+ NOTIFICATION_TEXT_TYPE_TITLE = 0,
+ /**< Title */
+ NOTIFICATION_TEXT_TYPE_CONTENT,
+ /**< Content */
+ NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
+ /**< Content for content display option is off of the Settings */
+ NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
+ /**< Group title */
+ NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
+ /**< Group content */
+ NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
+ /**< Group content for content display option is off of the Settings */
+ NOTIFICATION_TEXT_TYPE_MAX,
+ /**< Max flag */
+} notification_text_type_e;
+
+/**
+ * @breief Enumeration for image text type.
+ */
+typedef enum _notification_image_type {
+ NOTIFICATION_IMAGE_TYPE_NONE = -1,
+ /**< NONE */
+ NOTIFICATION_IMAGE_TYPE_ICON = 0,
+ /**< Icon */
+ NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
+ /**< Indicator icon */
+ NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
+ /**< Lock screen icon */
+ NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
+ /**< Thumbnail */
+ NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
+ /**< Lock screen thumbnail */
+ NOTIFICATION_IMAGE_TYPE_MAX,
+ /**< Max flag */
+} notification_image_type_e;
+
+/*typedef enum _notification_button_type {
+ NOTIFICATION_BUTTON_TYPE_NONE = -1,
+ NOTIFICATION_BUTTON_TYPE_RUN = 0,
+ NOTIFICATION_BUTTON_TYPE_VIEW,
+ NOTIFICATION_BUTTON_TYPE_DISMISS,
+ NOTIFICATION_BUTTON_TYPE_MAX,
+}notification_button_type_e;*/
+
+/**
+ * @breief Enumeration for application execution type.
+ */
+typedef enum _notification_execute_type {
+ NOTIFICATION_EXECUTE_TYPE_NONE = -1,
+ /**< No operation */
+ NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
+ /**< Responding */
+ NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,/**< Launching when notification data is single */
+ NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
+ /**< Launching when notification data is grouping(multi) */
+ NOTIFICATION_EXECUTE_TYPE_MAX,
+ /**< Max flag */
+} notification_execute_type_e;
+
+/**
+ * @breief Enumeration for notification type.
+ */
+typedef enum _notification_type {
+ NOTIFICATION_TYPE_NONE = -1,
+ /**< None */
+ NOTIFICATION_TYPE_NOTI = 0,
+ /**< Notification type */
+ NOTIFICATION_TYPE_ONGOING,
+ /**< Ongoing type */
+ NOTIFICATION_TYPE_MAX,
+ /**< Max flag */
+} notification_type_e;
+
+/**
+ * @breief Enumeration for Group ID.
+ */
+enum _notification_group_id {
+ NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
+ NOTIFICATION_GROUP_ID_DEFAULT = 0,
+ /**< Notification that has same title is grouping */
+};
+
+/**
+ * @breief Enumeration for Private ID.
+ */
+enum _notification_priv_id {
+ NOTIFICATION_PRIV_ID_NONE = -1,
+ /**< Internally set priv_id */
+};
+
+/**
+ * @breief Enumeration for notification property
+ */
+enum _notification_property {
+ NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 0x00000001,
+ /**< Display only SIM card inserted */
+ NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 0x00000002,
+ /**< Disable application launch when it selected */
+ NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 0x00000004,
+ /**< Disable auto delete when it selected */
+ NOTIFICATION_PROP_LAUNCH_UG = 0x00000008,
+ /**< Will be deprecated. Notification Tray should launch application using appsvc API */
+ NOTIFICATION_PROP_DISABLE_TICKERNOTI = 0x00000010,
+ /**< Will be deprecated. Use notification_set_display_applist API */
+ NOTIFICATION_PROP_PERMANENT_DISPLAY = 0x00000020,
+ /** < Will be deprecated. */
+ NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 0x00000040,/**< Disable update when it inserted. */
+ NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 0x00000080,/**< Disable update when it deleted. */
+ NOTIFICATION_PROP_VOLATILE_DISPLAY = 0x00000100,/**< Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type */
+};
+
+/**
+ * @breief Enumeration for display application list
+ */
+enum _notificaton_display_applist {
+ NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 0x00000001,/**< Notification Tray(Quickpanel) */
+ NOTIFICATION_DISPLAY_APP_TICKER = 0x00000002,
+ /**< Ticker notification */
+ NOTIFICATION_DISPLAY_APP_LOCK = 0x00000004,
+ /**< Lock screen */
+ NOTIFICATION_DISPLAY_APP_INDICATOR = 0x00000004,/**< Indicator */
+ NOTIFICATION_DISPLAY_APP_ALL = 0xffffffff,
+ /**< All display application */
+};
+
+/**
+ * @brief Notification handle
+ */
+typedef struct _notification *notification_h;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __NOTIFICATION_TYPE_H__ */