Add 2.3 APIs 41/35941/6
authorSangyoon Jang <s89.jang@samsung.com>
Thu, 26 Feb 2015 09:52:04 +0000 (18:52 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Mon, 2 Mar 2015 02:53:08 +0000 (11:53 +0900)
TC-2466

added:
notification_set_launch_option
notification_get_launch_option
notification_set_tag
notification_get_tag
notification_load_by_tag
notification_post

use tizen error codes

Change-Id: I0bc7949ea223c68aa6a89bd76f296e1d0f5a399d
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
13 files changed:
CMakeLists.txt
include/notification.h
include/notification_error.h
include/notification_internal.h
include/notification_ipc.h
include/notification_type.h
packaging/notification.spec
src/notification.c
src/notification_db.c
src/notification_ipc.c
src/notification_noti.c
src/notification_setting.c
src/notification_status.c

index 7fa2c0a..ee1f01e 100755 (executable)
@@ -48,6 +48,7 @@ pkg_check_modules(pkgs REQUIRED
        dbus-1
        dbus-glib-1
        com-core
+       capi-appfw-application
        ecore
        eina
        libtzplatform-config
index 0243f75..82c35e6 100755 (executable)
@@ -47,14 +47,14 @@ extern "C" {
 
 /**
  * @brief Set absolute path for image file to display on notification view
- * @details 
+ * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre Notification handle should be created by notification_new()
  * @post
  * @see #notification_image_type_e
@@ -86,14 +86,14 @@ notification_error_e notification_set_image(notification_h noti,
 
 /**
  * @brief Get absolute path for image file
- * @details 
+ * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre Notification handle should be created by notification_new()
  * @post
  * @see #notification_image_type_e
@@ -105,7 +105,7 @@ notification_error_e notification_set_image(notification_h noti,
  {
        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;
@@ -125,7 +125,7 @@ notification_error_e notification_get_image(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre Notification handle should be created by notification_new()
  * @post
  * @see notification_new()
@@ -136,12 +136,12 @@ notification_error_e notification_get_image(notification_h noti,
   {
         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);
@@ -161,7 +161,7 @@ notification_error_e notification_set_time(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre Notification handle should be created by notification_new()
  * @post
  * @see notification_new()
@@ -172,7 +172,7 @@ notification_error_e notification_set_time(notification_h noti,
  {
        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;
@@ -191,10 +191,10 @@ notification_error_e notification_get_time(notification_h noti,
  * @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 
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
+ * @pre
  * @post
- * @see 
+ * @see
  * @par Sample code:
  * @code
  #include <notification.h>
@@ -202,7 +202,7 @@ notification_error_e notification_get_time(notification_h noti,
   {
         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;
@@ -232,7 +232,7 @@ notification_error_e notification_get_insert_time(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre notification handle should be created by notification_new().
  * @post
  * @see
@@ -272,7 +272,7 @@ notification_error_e notification_set_text(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -305,7 +305,7 @@ notification_error_e notification_get_text(notification_h noti,
  * @param[in] time time stamp
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre notification handle should be created by notification_new().
  * @post
  * @see
@@ -322,7 +322,7 @@ notification_error_e notification_set_time_to_text(notification_h noti, notifica
  * @param[in] time pointer of time stamp
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre notification handle should be created by notification_new().
  * @post
  * @see
@@ -339,7 +339,7 @@ notification_error_e notification_get_time_from_text(notification_h noti, notifi
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -377,7 +377,7 @@ notification_error_e notification_set_text_domain(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -411,7 +411,7 @@ notification_error_e notification_get_text_domain(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -443,7 +443,7 @@ notification_error_e notification_set_sound(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -476,7 +476,7 @@ notification_error_e notification_get_sound(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -508,10 +508,10 @@ notification_error_e notification_set_vibration(notification_h noti,
   * @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
+  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
   * @pre
   * @post
-  * @see 
+  * @see
   * @par Sample code:
   * @code
 #include <notification.h>
@@ -541,7 +541,7 @@ notification_error_e notification_get_vibration(notification_h noti,
  * @param[in] led_argb notification led color
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -573,7 +573,7 @@ notification_error_e notification_set_led(notification_h noti,
   * @param[out] led_argb notification led color
   * @return NOTIFICATION_ERROR_NONE if success, other value if failure
   * @retval NOTIFICATION_ERROR_NONE - success
-  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
   * @pre
   * @post
   * @see
@@ -606,7 +606,7 @@ notification_error_e notification_get_led(notification_h noti,
  * @param[in] off_ms time for turning on the LED
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -637,7 +637,7 @@ notification_error_e notification_set_led_time_period(notification_h noti,
   * @param[out] off_ms time for turning on the LED
   * @return NOTIFICATION_ERROR_NONE if success, other value if failure
   * @retval NOTIFICATION_ERROR_NONE - success
-  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
+  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
   * @pre
   * @post
   * @see
@@ -662,6 +662,78 @@ notification_error_e notification_get_led_time_period(notification_h noti,
                                                int *on_ms, int *off_ms);
 
 /**
+ * @brief Sets the launch option for a notification.
+ * @details When notification data selected in display application, application launched by app_control_send_launch_request with app_control handle.
+ * @since_tizen 2.3
+ * @param[in] noti The notification handle
+ * @param[in] type Launching option type
+ * @param[in] option App Control handler
+ * @return #NOTIFICATION_ERROR_NONE on success,
+ *         otherwise any other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE         Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+       notification_h noti = NULL;
+       app_control_h app_control = NULL;
+       int noti_err = NOTIFICATION_ERROR_NONE;
+
+       ...
+
+       app_control_create(&app_control);
+       app_control_set_app_id(app_control, "org.tizen.app");
+
+       ...
+
+       noti_err  = notification_set_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)app_control);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               notification_free(noti);
+               return;
+       }
+
+       app_control_destroy(app_control);
+}
+ * @endcode
+ */
+int notification_set_launch_option(notification_h noti,
+                                                               notification_launch_option_type type, void *option);
+
+/**
+ * @brief Gets the launch option from the notification handle.
+ * @since_tizen 2.3
+ * @remarks You must release @a app_control using app_control_destroy().
+ * @param[in]  noti        The notification handle
+ * @param[in] type Launching option type
+ * @param[out] option The pointer of App Control handler
+ * @return #NOTIFICATION_ERROR_NONE on success,
+ *         otherwise any other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE         Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+       app_control_h app_control = NULL;
+       app_control_create(&app_control);
+
+       ...
+
+       noti_err = notification_get_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&app_control);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               notification_free(noti);
+               return;
+       }
+}
+ * @endcode
+ */
+int notification_get_launch_option(notification_h noti,
+                                                               notification_launch_option_type type, void *option);
+
+/**
  * @brief Set execution option for a notification
  * @details When notification data selected in display application, application launched by appsvc_run_service with service_handle.
  * @remarks
@@ -672,7 +744,7 @@ notification_error_e notification_get_led_time_period(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -717,7 +789,7 @@ notification_error_e notification_set_execute_option(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
  * @pre
  * @post
  * @see
@@ -753,7 +825,7 @@ notification_error_e notification_get_execute_option(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -790,7 +862,7 @@ notification_error_e notification_set_property(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -821,7 +893,7 @@ notification_error_e notification_get_property(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -859,7 +931,7 @@ notification_error_e notification_set_display_applist(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -890,7 +962,7 @@ notification_error_e notification_get_display_applist(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -926,7 +998,7 @@ notification_error_e notification_set_size(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -957,7 +1029,7 @@ notification_error_e notification_get_size(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -993,7 +1065,7 @@ notification_error_e notification_set_progress(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -1024,7 +1096,7 @@ notification_error_e notification_get_progress(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -1060,7 +1132,7 @@ notification_error_e notification_set_pkgname(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -1091,7 +1163,7 @@ notification_error_e notification_get_pkgname(notification_h noti,
  * @param[in] type of layout
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see #notification_ly_type_e
@@ -1107,7 +1179,7 @@ notification_error_e notification_set_layout(notification_h noti,
  * @param[out] type of layout
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see #notification_ly_type_e
@@ -1124,10 +1196,10 @@ notification_error_e notification_get_layout(notification_h noti,
  * @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 
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
+ * @pre
  * @post
- * @see 
+ * @see
  * @par Sample code:
  * @code
 #include <notification.h>
@@ -1135,7 +1207,7 @@ notification_error_e notification_get_layout(notification_h noti,
   {
         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;
@@ -1154,10 +1226,10 @@ notification_error_e notification_get_id(notification_h noti,
  * @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 
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid parameter
+ * @pre
  * @post
- * @see 
+ * @see
  * @par Sample code:
  * @code
 #include <notification.h>
@@ -1185,7 +1257,7 @@ notification_error_e notification_get_type(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre notification_new()
  * @post notification_free()
  * @see #notification_h
@@ -1213,7 +1285,7 @@ notification_error_e notification_insert(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
  * @pre
  * @post
@@ -1243,7 +1315,7 @@ notification_error_e notification_update(notification_h noti);
  * @param[in] user_data user data which you want to use in callback
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
  * @pre
  * @post
@@ -1272,7 +1344,7 @@ notification_error_e notification_update_async(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see #notification_type_e
@@ -1300,7 +1372,7 @@ notification_error_e notifiation_clear(notification_type_e type);
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -1330,7 +1402,7 @@ notification_error_e notification_delete_all_by_type(const char *pkgname,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see
@@ -1359,7 +1431,7 @@ notification_error_e notification_delete_by_priv_id(const char *pkgname,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @see #notification_h
@@ -1392,7 +1464,7 @@ notification_error_e notification_delete(notification_h noti);
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @par Sample code:
@@ -1422,7 +1494,7 @@ notification_error_e notification_update_progress(notification_h noti,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @par Sample code:
@@ -1451,7 +1523,7 @@ notification_error_e notification_update_size(notification_h noti,
  * @param[in] content text to update
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - Invalid input value
  * @pre
  * @post
  * @par Sample code:
@@ -1477,7 +1549,7 @@ notification_error_e notification_update_content(notification_h noti,
  * @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, 
+ * 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.
@@ -1581,7 +1653,7 @@ notification_h notification_load(char *pkgname,
  * @param[out] clone newly created notification handle that has same with input noti.
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre
  * @post
  * @see #notification_type_e
@@ -1608,7 +1680,7 @@ notification_error_e notification_clone(notification_h noti, notification_h *clo
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre notification_new()
  * @post
  * @see #notification_h
@@ -1653,7 +1725,7 @@ notification_error_e notification_free(notification_h noti);
  * @param[out] NOTIFICATION_ERROR_NONE if success, other value if failure.
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre
  * @post
  * @see #notification_list_h
@@ -1696,7 +1768,7 @@ notification_error_e notification_get_grouping_list(notification_type_e type,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre
  * @post
  * @see #notification_list_h
@@ -1728,7 +1800,7 @@ notification_error_e notification_get_detail_list(const char *pkgname,
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre notification_get_grouping_list() or notification_get_detail_list ()
  * @post
  * @see #notification_list_h
@@ -1763,7 +1835,7 @@ notification_error_e notification_free_list(notification_list_h list);
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre notification_new()
  * @post
  * @see notification_unresister_changed_cb()
@@ -1791,7 +1863,7 @@ notification_resister_changed_cb(
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre
  * @post
  * @see notification_resister_changed_cb()
@@ -1819,7 +1891,7 @@ notification_unresister_changed_cb(
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre
  * @post
  * @see notification_unregister_detailed_changed_cb()
@@ -1847,7 +1919,7 @@ notification_register_detailed_changed_cb(
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre
  * @post
  * @see notification_register_detailed_changed_cb()
@@ -1869,13 +1941,135 @@ notification_unregister_detailed_changed_cb(
                void *user_data);
 
 /**
+ * @brief Sets the tag of the notification handle.
+ * @since_tizen 2.3
+ * @param[in] noti Notification handle
+ * @param[in] tag tag for loading notification handle
+ * @return #NOTIFICATION_ERROR_NONE on success, other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
+ * @see notification_get_tag()
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+       notification_h noti = NULL;
+       int noti_err = NOTIFICATION_ERROR_NONE;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+       if(noti == NULL) {
+               return;
+       }
+       ...
+
+       noti_err = notification_set_tag(noti, tag);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               return;
+       }
+}
+ * @endcode
+ */
+int notification_set_tag(notification_h noti, const char *tag);
+
+/**
+ * @brief Gets the tag of the notification handle.
+ * @since_tizen 2.3
+ * @param[in] noti Notification handle
+ * @param[out] tag tag for loading notification handle
+ * @return #NOTIFICATION_ERROR_NONE on success, other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
+ * @see notification_set_tag()
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+       int noti_err = NOTIFICATION_ERROR_NONE;
+       const char *tag = NULL;
+
+       ...
+
+       noti_err = notification_get_tag(noti, &tag);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               return;
+       }
+}
+ * @endcode
+ */
+int notification_get_tag(notification_h noti, const char **tag);
+
+/**
+ * @brief Loads a notification from the notification's database with the tag.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] tag tag for loading notification handle
+ * @return Notification handle(notification_h) on success, NULL on failure
+ * @retval notification_h Success
+ * @retval NULL Failure
+ * @exception #NOTIFICATION_ERROR_NONE Success
+ * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
+ * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
+ * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
+ * @see #notification_type_e
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+       notification_h noti = NULL;
+
+       noti = notification_load_by_tag(tag);
+       if(noti == NULL) {
+               return;
+       }
+       ...
+}
+ * @endcode
+ */
+notification_h notification_load_by_tag(const char *tag);
+
+/**
+ * @brief Posts a notification.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
+ * @param[in] noti Notification handle
+ * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
+ * @pre Notification handle should be created by notification_create().
+ * @post notification_free().
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+       int noti_err = NOTIFICATION_ERROR_NONE;
+
+       noti_err  = notification_post(noti);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               return;
+       }
+}
+ * @endcode
+ */
+int notification_post(notification_h noti);
+
+/**
  * @brief Get the information of notification event
  * @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
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
  * @pre notification_get_grouping_list() or notification_get_detail_list ()
  * @post
  * @see #notification_op
@@ -1894,8 +2088,8 @@ notification_error_e notification_op_get_data(notification_op *noti_op,
  * @param[out] text response
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
- * @retval NOTIFICATION_ERROR_NO_MEMORY - not enough memory
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
+ * @retval NOTIFICATION_ERROR_OUT_OF_MEMORY - not enough memory
  * @pre notification handle should be created by notification_new().
  * @post
  * @see
@@ -1914,8 +2108,8 @@ notification_error_e notification_wait_response(notification_h noti,
  * @param[in] text response
  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
  * @retval NOTIFICATION_ERROR_NONE - success
- * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
- * @retval NOTIFICATION_ERROR_NO_MEMORY - not enough memory
+ * @retval NOTIFICATION_ERROR_INVALID_PARAMETER - invalid parameter
+ * @retval NOTIFICATION_ERROR_OUT_OF_MEMORY - not enough memory
  * @pre notification handle should be created by notification_new().
  * @post
  * @see
index 9e0d114..932e6ff 100755 (executable)
 #ifndef __NOTIFICATION_ERROR_H__
 #define __NOTIFICATION_ERROR_H__
 
+#include <tizen.h>
+
 /**
- * @addtogroup NOTIFICATION_TYPE
+ * @file notification_error.h
+ */
+
+/**
+ * @addtogroup NOTIFICATION_MODULE
  * @{
  */
 
 /**
- * @breief Enumeration for notification error
+ * @brief Enumeration for notification errors.
+ * @since_tizen 2.3
  */
 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_NOT_EXIST_ID = -6,   /**< Not exist private ID */
-       NOTIFICATION_ERROR_IO = -7,     /**< disk i/o error */
-       NOTIFICATION_ERROR_SERVICE_NOT_READY = -8,      /**< no reponse from master */
-       NOTIFICATION_ERROR_PERMISSION_DENIED = -9, /**< Permission denied */
+       NOTIFICATION_ERROR_NONE = TIZEN_ERROR_NONE,     /**< Success */
+       NOTIFICATION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,   /**< Invalid parameter */
+       NOTIFICATION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,   /**< out of memory */
+       NOTIFICATION_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR,     /**< I/O error */
+       NOTIFICATION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+       NOTIFICATION_ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01,   /**< Error from DB query */
+       NOTIFICATION_ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02,  /**< Already exist private ID */
+       NOTIFICATION_ERROR_FROM_DBUS = TIZEN_ERROR_NOTIFICATION | 0x03, /**< Error from DBus */
+       NOTIFICATION_ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x04,      /**< Not exist private ID */
+       NOTIFICATION_ERROR_SERVICE_NOT_READY = TIZEN_ERROR_NOTIFICATION | 0x05, /**< No response from notification service */
 } notification_error_e;
 
-/** 
+/**
  * @}
  */
 
index 41e1489..15a5b7f 100755 (executable)
@@ -76,6 +76,7 @@ struct _notification {
        char *app_name;         /* Temporary stored app name from AIL */
        char *temp_title;
        char *temp_content;
+       char *tag;
 };
 
 #endif                         /* __NOTIFICATION_INTERNAL_H__ */
index d55c264..0aef5bd 100755 (executable)
@@ -47,12 +47,15 @@ notification_error_e notification_ipc_request_refresh(void);
 notification_error_e notification_ipc_request_delete_single(notification_type_e type, char *pkgname, int priv_id);
 notification_error_e notification_ipc_request_delete_multiple(notification_type_e type, char *pkgname);
 
+int notification_ipc_is_master_ready(void);
 notification_error_e notification_ipc_add_deffered_task(void (*deffered_task_cb)(void *data), void *user_data);
 notification_error_e notification_ipc_del_deffered_task(void (*deffered_task_cb)(void *data));
 
 notification_error_e notification_ipc_noti_setting_property_set(const char *pkgname, const char *property, const char *value);
 notification_error_e notification_ipc_noti_setting_property_get(const char *pkgname, const char *property, char **value);
 
+int notification_ipc_request_load_noti_by_tag(notification_h noti, const char *pkgname, const char *tag);
+
 #ifdef __cplusplus
 }
 #endif
index 8aad6ef..dcbdae1 100755 (executable)
@@ -28,149 +28,122 @@ extern "C" {
 
 /**
  * @file notification_type.h
- * @brief This file contains defines and enumerations for Notification APIs
+ * @brief This file contains type definitions and enumerations for Notification API.
  */
 
 /**
- * @addtogroup NOTIFICATION_TYPE
+ * @addtogroup NOTIFICATION_MODULE
  * @{
  */
 
 /**
- * @brief Enumeration for notification layout type
+ * @brief Enumeration for notification layout type.
+ * @since_tizen 2.3
  */
 typedef enum _notification_ly_type {
-       NOTIFICATION_LY_NONE = 0,
-       NOTIFICATION_LY_NOTI_EVENT_SINGLE,
-               /**< layout for notification. used to inform single event*/
-       NOTIFICATION_LY_NOTI_EVENT_MULTIPLE,
-               /**< layout for notification. used to inform multiple event*/
-       NOTIFICATION_LY_NOTI_THUMBNAIL,
-               /**< layout for notification. used to display images*/
-       NOTIFICATION_LY_ONGOING_EVENT,
-               /**< layout for ongoing notification. used to display text message*/
-       NOTIFICATION_LY_ONGOING_PROGRESS,
-               /**< layout for ongoing notification. used to display progress*/
-       NOTIFICATION_LY_MAX,
+       NOTIFICATION_LY_NONE = 0,            /**< Default */
+       NOTIFICATION_LY_NOTI_EVENT_SINGLE,   /**< Layout for notification. Used to inform single event*/
+       NOTIFICATION_LY_NOTI_EVENT_MULTIPLE, /**< Layout for notification. Used to inform multiple event*/
+       NOTIFICATION_LY_NOTI_THUMBNAIL,      /**< Layout for notification. Used to display images*/
+       NOTIFICATION_LY_ONGOING_EVENT,       /**< Layout for ongoing notification. Used to display text message*/
+       NOTIFICATION_LY_ONGOING_PROGRESS,    /**< Layout for ongoing notification. Used to display progress*/
+       NOTIFICATION_LY_MAX,                 /**< TBD */
 } notification_ly_type_e;
 
 /**
+ * @brief Enumeration for notification launch option type.
+ * @since_tizen 2.3
+ */
+typedef enum  _notification_launch_option_type {
+       NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1, /**< launching with app control */
+} notification_launch_option_type;
+
+/**
  * @brief Enumeration for notification sound type.
+ * @since_tizen 2.3
  */
 typedef enum _notification_sound_type {
-       NOTIFICATION_SOUND_TYPE_NONE = -1,
-                                       /**< Default value. no sound */
-       NOTIFICATION_SOUND_TYPE_DEFAULT = 0,
-                                       /**< default sound */
-       NOTIFICATION_SOUND_TYPE_USER_DATA,
-                                       /**< User sound data */
-       NOTIFICATION_SOUND_TYPE_MAX,
-                               /**< Max flag */
+       NOTIFICATION_SOUND_TYPE_NONE = -1,   /**< Default value. no sound */
+       NOTIFICATION_SOUND_TYPE_DEFAULT = 0, /**< Default sound */
+       NOTIFICATION_SOUND_TYPE_USER_DATA,   /**< User sound data */
+       NOTIFICATION_SOUND_TYPE_MAX,         /**< Max flag */
 } notification_sound_type_e;
 
 /**
  * @brief Enumeration for notification vibration type.
+ * @since_tizen 2.3
  */
 typedef enum _notification_vibration_type {
-       NOTIFICATION_VIBRATION_TYPE_NONE = -1,
-                                       /**< Default value. no vibration */
-       NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0,/**< default vibrate pattern */
-       NOTIFICATION_VIBRATION_TYPE_USER_DATA,
-                                       /**< User vibration data */
-       NOTIFICATION_VIBRATION_TYPE_MAX,/**< Max flag */
+       NOTIFICATION_VIBRATION_TYPE_NONE = -1,   /**< Default value. No vibration */
+       NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0, /**< Default vibrate pattern */
+       NOTIFICATION_VIBRATION_TYPE_USER_DATA,   /**< User vibration data */
+       NOTIFICATION_VIBRATION_TYPE_MAX,         /**< Max flag */
 } notification_vibration_type_e;
 
 /**
- * @brief Enumeration for notification led operation.
+ * @brief Enumeration for notification LED operation.
+ * @since_tizen 2.3
  */
 typedef enum _notification_led_op {
-       NOTIFICATION_LED_OP_OFF = -1,
-                                       /**< Default value. Disable the LED notification */
-       NOTIFICATION_LED_OP_ON = 0,/**< turn on the LED with default color */
-       NOTIFICATION_LED_OP_ON_CUSTOM_COLOR,
-                                       /**< turn on the LED with custom color */
-       NOTIFICATION_LED_OP_MAX,/**< Max flag */
+       NOTIFICATION_LED_OP_OFF = -1,        /**< Default value. Disable the LED notification */
+       NOTIFICATION_LED_OP_ON = 0,          /**< Turn on the LED with default color */
+       NOTIFICATION_LED_OP_ON_CUSTOM_COLOR, /**< Turn on the LED with custom color */
+       NOTIFICATION_LED_OP_MAX,             /**< Max flag */
 } notification_led_op_e;
 
 /**
- * @brief Will be deprecated.
+ * @brief This will be deprecated.
+ * @since_tizen 2.3
  */
 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_NONE = -1, /**< None */
+       NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0,  /**< The number is placed to left */
+       NOTIFICATION_COUNT_DISPLAY_TYPE_IN,        /**< The number is placed to center */
+       NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT,     /**< The number is placed to right */
+       NOTIFICATION_COUNT_DISPLAY_TYPE_MAX,       /**< Max flag */
 } notification_count_display_type_e;
 
 /**
  * @brief Enumeration for notification text type.
+ * @since_tizen 2.3
  */
 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_EVENT_COUNT,
-                                                               /**< text to display event count */
-       NOTIFICATION_TEXT_TYPE_INFO_1,
-                                                               /**< box contents 1 */
-       NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
-                                                               /**< box contents 1-1 */
-       NOTIFICATION_TEXT_TYPE_INFO_2,
-                                                               /**< box contents 2 */
-       NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
-                                                               /**< box contents 2-1 */
-       NOTIFICATION_TEXT_TYPE_INFO_3,
-                                                               /**< box contents 3 */
-       NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
-                                                               /**< box contents 3-1 */
-       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_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_EVENT_COUNT,                             /**< Text to display event count */
+       NOTIFICATION_TEXT_TYPE_INFO_1,                                  /**< Box contents 1 */
+       NOTIFICATION_TEXT_TYPE_INFO_SUB_1,                              /**< Box contents 1-1 */
+       NOTIFICATION_TEXT_TYPE_INFO_2,                                  /**< Box contents 2 */
+       NOTIFICATION_TEXT_TYPE_INFO_SUB_2,                              /**< Box contents 2-1 */
+       NOTIFICATION_TEXT_TYPE_INFO_3,                                  /**< Box contents 3 */
+       NOTIFICATION_TEXT_TYPE_INFO_SUB_3,                              /**< Box contents 3-1 */
+       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;
 
 /**
- * @brief Enumeration for image text type.
+ * @brief Enumeration for image type.
+ * @since_tizen 2.3
  */
 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_ICON_SUB,
-                                       /**< Icon */
-       NOTIFICATION_IMAGE_TYPE_BACKGROUND,
-                                               /**< image displayed on background */
-       NOTIFICATION_IMAGE_TYPE_LIST_1,
-                                               /**< image for thumbnail list */
-       NOTIFICATION_IMAGE_TYPE_LIST_2,
-                                               /**< image for thumbnail list */
-       NOTIFICATION_IMAGE_TYPE_LIST_3,
-                                               /**< image for thumbnail list */
-       NOTIFICATION_IMAGE_TYPE_LIST_4,
-                                               /**< image for thumbnail list */
-       NOTIFICATION_IMAGE_TYPE_LIST_5,
-                                               /**< image for thumbnail list */
-       NOTIFICATION_IMAGE_TYPE_MAX,
-                               /**< Max flag */
+       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_ICON_SUB,           /**< Icon */
+       NOTIFICATION_IMAGE_TYPE_BACKGROUND,         /**< image displayed on background */
+       NOTIFICATION_IMAGE_TYPE_LIST_1,             /**< Image for thumbnail list */
+       NOTIFICATION_IMAGE_TYPE_LIST_2,             /**< Image for thumbnail list */
+       NOTIFICATION_IMAGE_TYPE_LIST_3,             /**< Image for thumbnail list */
+       NOTIFICATION_IMAGE_TYPE_LIST_4,             /**< Image for thumbnail list */
+       NOTIFICATION_IMAGE_TYPE_LIST_5,             /**< Image for thumbnail list */
+       NOTIFICATION_IMAGE_TYPE_MAX,                /**< Max flag */
 } notification_image_type_e;
 
 /*typedef enum _notification_button_type {
@@ -183,165 +156,149 @@ typedef enum _notification_image_type {
 
 /**
  * @brief Enumeration for application execution type.
+ * @since_tizen 2.3
  */
 typedef enum _notification_execute_type {
-       NOTIFICATION_EXECUTE_TYPE_NONE = -1,
-                                       /**< No operation */
-       NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
-                                               /**< Responding action*/
-       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_NONE = -1,      /**< No operation */
+       NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0, /**< Responding action*/
+       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;
 
 /**
  * @brief Enumeration for notification type.
+ * @since_tizen 2.3
  */
 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_NONE = -1, /**< None */
+       NOTIFICATION_TYPE_NOTI = 0,  /**< Notification type */
+       NOTIFICATION_TYPE_ONGOING,   /**< Ongoing type */
+       NOTIFICATION_TYPE_MAX,       /**< Max flag */
 } notification_type_e;
 
 /**
  * @brief Enumeration for Group ID.
+ * @since_tizen 2.3
  */
 enum _notification_group_id {
-       NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
-       NOTIFICATION_GROUP_ID_DEFAULT = 0,
-                                       /**< Notification that has same title is grouping */
+       NOTIFICATION_GROUP_ID_NONE = -1,   /**< Not Grouping */
+       NOTIFICATION_GROUP_ID_DEFAULT = 0, /**< Notification that has same title is grouping */
 };
 
 /**
  * @brief Enumeration for Private ID.
+ * @since_tizen 2.3
  */
 enum _notification_priv_id {
-       NOTIFICATION_PRIV_ID_NONE = -1,
-                               /**< Internally set priv_id */
+       NOTIFICATION_PRIV_ID_NONE = -1, /**< Internally set priv_id */
 };
 
 /**
- * @brief Enumeration for notification property
+ * @brief Enumeration for notification property.
+ * @since_tizen 2.3
  */
 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 */
+       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 */
 };
 
 /**
- * @brief Enumeration for display application list
+ * @brief Enumeration for display application list.
+ * @since_tizen 2.3
  */
 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_TICKER = 0x00000002,/**< Ticker notification */
+       NOTIFICATION_DISPLAY_APP_LOCK = 0x00000004,/**< Lock screen */
        NOTIFICATION_DISPLAY_APP_INDICATOR = 0x00000008,/**< Indicator */
-       NOTIFICATION_DISPLAY_APP_ALL = 0xffffffff,
-                                               /**< All display application */
+       NOTIFICATION_DISPLAY_APP_ALL = 0xffffffff,/**< All display application */
 };
 
 /**
- * @}
- */
-
-/**
- * @brief Enumeration for notification operation code
+ * @brief Enumeration for notification operation code.
+ * @since_tizen 2.3
  */
 typedef enum _notification_op_type {
-       NOTIFICATION_OP_NONE = 0,
-       NOTIFICATION_OP_INSERT = 1,
-       NOTIFICATION_OP_UPDATE,
-       NOTIFICATION_OP_DELETE,
-       NOTIFICATION_OP_DELETE_ALL,
-       NOTIFICATION_OP_REFRESH,
-       NOTIFICATION_OP_SERVICE_READY,
+       NOTIFICATION_OP_NONE = 0,      /**< Default */
+       NOTIFICATION_OP_INSERT = 1,    /**< Notification inserted */
+       NOTIFICATION_OP_UPDATE,        /**< Notification updated */
+       NOTIFICATION_OP_DELETE,        /**< Notification deleted */
+       NOTIFICATION_OP_DELETE_ALL,    /**< Notifications deleted */
+       NOTIFICATION_OP_REFRESH,       /**< Deprecated */
+       NOTIFICATION_OP_SERVICE_READY, /**< Notification service is ready  */
 } notification_op_type_e;
 
 /**
  * @brief Enumeration for notification operation data code
+ * @since_tizen 2.3
  */
 typedef enum _notification_op_data_type {
-       NOTIFICATION_OP_DATA_MIN = 0,
-       NOTIFICATION_OP_DATA_TYPE,
-       NOTIFICATION_OP_DATA_PRIV_ID,
-       NOTIFICATION_OP_DATA_NOTI,
-       NOTIFICATION_OP_DATA_EXTRA_INFO_1,
-       NOTIFICATION_OP_DATA_EXTRA_INFO_2,
-       NOTIFICATION_OP_DATA_MAX,
+       NOTIFICATION_OP_DATA_MIN = 0,      /**< Default */
+       NOTIFICATION_OP_DATA_TYPE,         /**< Operation type */
+       NOTIFICATION_OP_DATA_PRIV_ID,      /**< Private ID */
+       NOTIFICATION_OP_DATA_NOTI,         /**< Notification handler */
+       NOTIFICATION_OP_DATA_EXTRA_INFO_1, /**< Reserved */
+       NOTIFICATION_OP_DATA_EXTRA_INFO_2, /**< Reserved */
+       NOTIFICATION_OP_DATA_MAX,          /**< Max flag */
 } notification_op_data_type_e;
 
 /**
  * @brief Enumeration for notification count position in the text.
+ * @since_tizen 2.3
  */
 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_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;
 
 /**
- * @brief Enumeration for notification variable parameter type
+ * @brief Enumeration for notification variable parameter type.
+ * @since_tizen 2.3
  */
 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_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;
 
 /**
- * @brief Notification handle
+ * @brief Notification handle.
+ * @since_tizen 2.3
  */
 typedef struct _notification *notification_h;
 
 /**
- * @brief Notification operation handle
+ * @brief The structure for notification operation.
+ * @since_tizen 2.3
  */
 typedef struct _notification_op {
-       notification_op_type_e type;
-       int priv_id;
-       int extra_info_1;
-       int extra_info_2;
-       notification_h noti;
+       notification_op_type_e type; /**< Notification operation type */
+       int priv_id;                 /**< private ID */
+       int extra_info_1;            /**< Reserved */
+       int extra_info_2;            /**< Reserved */
+       notification_h noti;         /**< Notification handler */
 } notification_op;
 
+/**
+ * @}
+ */
+
 #ifdef __cplusplus
 }
 #endif
-#endif                         /* __NOTIFICATION_TYPE_H__ */
+
+#endif /* __NOTIFICATION_TYPE_H__ */
index a84edd5..c621d38 100755 (executable)
@@ -18,6 +18,7 @@ BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(appsvc)
 BuildRequires: pkgconfig(dbus-glib-1)
 BuildRequires: pkgconfig(com-core)
+BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(eina)
 BuildRequires: pkgconfig(libtzplatform-config)
index 9842d31..27e10b5 100755 (executable)
@@ -33,6 +33,8 @@
 #include <dbus/dbus.h>
 #include <dbus/dbus-glib-lowlevel.h>
 
+#include <app_control.h>
+#include <app_control_internal.h>
 #include <aul.h>
 #include <ail.h>
 #include <appsvc.h>
@@ -137,13 +139,13 @@ EXPORT_API notification_error_e notification_set_image(notification_h noti,
 
        /* Check noti and image_path are valid data */
        if (noti == NULL || image_path == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check image type is valid type */
        if (type <= NOTIFICATION_IMAGE_TYPE_NONE
            || type >= NOTIFICATION_IMAGE_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check image path bundle is exist */
@@ -190,13 +192,13 @@ EXPORT_API notification_error_e notification_get_image(notification_h noti,
 
        /* Check noti and image_path is valid data */
        if (noti == NULL || image_path == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check image type is valid data */
        if (type <= NOTIFICATION_IMAGE_TYPE_NONE
            || type >= NOTIFICATION_IMAGE_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check image path bundle exist */
@@ -236,7 +238,7 @@ EXPORT_API notification_error_e notification_set_time(notification_h noti,
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (input_time == 0) {
@@ -255,7 +257,7 @@ EXPORT_API notification_error_e notification_get_time(notification_h noti,
 {
        /* Check noti and time is valid data */
        if (noti == NULL || ret_time == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set time infomation */
@@ -269,7 +271,7 @@ EXPORT_API notification_error_e notification_get_insert_time(notification_h noti
 {
        /* Check noti and ret_time is valid data */
        if (noti == NULL || ret_time == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set insert time information */
@@ -300,13 +302,13 @@ EXPORT_API notification_error_e notification_set_text(notification_h noti,
 
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check text type is valid type */
        if (type <= NOTIFICATION_TEXT_TYPE_NONE
            || type >= NOTIFICATION_TEXT_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check text bundle exist */
@@ -507,7 +509,7 @@ EXPORT_API notification_error_e notification_set_text(notification_h noti,
                default:
                        NOTIFICATION_ERR("Error. invalid variable type. : %d",
                                         var_type);
-                       noti_err = NOTIFICATION_ERROR_INVALID_DATA;
+                       noti_err = NOTIFICATION_ERROR_INVALID_PARAMETER;
                        break;
                }
 
@@ -559,13 +561,13 @@ EXPORT_API notification_error_e notification_get_text(notification_h noti,
 
        /* Check noti is valid data */
        if (noti == NULL || text == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check text type is valid type */
        if (type <= NOTIFICATION_TEXT_TYPE_NONE
            || type >= NOTIFICATION_TEXT_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check key */
@@ -903,7 +905,7 @@ EXPORT_API notification_error_e notification_set_text_domain(notification_h noti
 {
        /* check noti and domain is valid data */
        if (noti == NULL || domain == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check domain */
@@ -931,7 +933,7 @@ EXPORT_API notification_error_e notification_get_text_domain(notification_h noti
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Get domain */
@@ -955,10 +957,10 @@ EXPORT_API notification_error_e notification_set_time_to_text(notification_h not
        char buf_tag[512] = { 0, };
 
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        if (time <= 0) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        snprintf(buf, sizeof(buf), "%lu", time);
@@ -977,27 +979,27 @@ EXPORT_API notification_error_e notification_get_time_from_text(notification_h n
        notification_error_e ret = NOTIFICATION_ERROR_NONE;
 
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        if (time == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        char *ret_text = NULL;
        ret = notification_get_text(noti, type, &ret_text);
 
        if (ret != NOTIFICATION_ERROR_NONE || ret_text == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (notification_noti_get_tag_type(ret_text) == TAG_TYPE_INVALID) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        char *tag_value = NULL;
        tag_value = notification_noti_strip_tag(ret_text);
        if (tag_value == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        *time = atol(tag_value);
@@ -1012,13 +1014,13 @@ EXPORT_API notification_error_e notification_set_sound(notification_h noti,
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check type is valid */
        if (type < NOTIFICATION_SOUND_TYPE_NONE
            || type >= NOTIFICATION_SOUND_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Save sound type */
@@ -1047,7 +1049,7 @@ EXPORT_API notification_error_e notification_get_sound(notification_h noti,
 {
        /* check noti and type is valid data */
        if (noti == NULL || type == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set sound type */
@@ -1068,13 +1070,13 @@ EXPORT_API notification_error_e notification_set_vibration(notification_h noti,
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check type is valid */
        if (type < NOTIFICATION_VIBRATION_TYPE_NONE
            || type >= NOTIFICATION_VIBRATION_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Save vibration type */
@@ -1104,7 +1106,7 @@ EXPORT_API notification_error_e notification_get_vibration(notification_h noti,
 {
        /* check noti and type is valid data */
        if (noti == NULL || type == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set vibration type */
@@ -1125,13 +1127,13 @@ EXPORT_API notification_error_e notification_set_led(notification_h noti,
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check operation is valid */
        if (operation < NOTIFICATION_LED_OP_OFF
            || operation >= NOTIFICATION_LED_OP_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Save led operation */
@@ -1151,7 +1153,7 @@ EXPORT_API notification_error_e notification_get_led(notification_h noti,
 {
        /* check noti and operation is valid data */
        if (noti == NULL || operation == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set led operation */
@@ -1171,7 +1173,7 @@ EXPORT_API notification_error_e notification_set_led_time_period(notification_h
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Save led operation */
@@ -1186,7 +1188,7 @@ EXPORT_API notification_error_e notification_get_led_time_period(notification_h
 {
        /* check noti and operation is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (on_ms)
@@ -1201,7 +1203,7 @@ EXPORT_API notification_error_e notification_set_application(notification_h noti
                                                             const char *pkgname)
 {
        if (noti == NULL || pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (noti->launch_pkgname) {
@@ -1217,7 +1219,7 @@ EXPORT_API notification_error_e notification_get_application(notification_h noti
                                                             char **pkgname)
 {
        if (noti == NULL || pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (noti->launch_pkgname) {
@@ -1229,6 +1231,79 @@ EXPORT_API notification_error_e notification_get_application(notification_h noti
        return NOTIFICATION_ERROR_NONE;
 }
 
+EXPORT_API int notification_set_launch_option(notification_h noti,
+               notification_launch_option_type type, void *option)
+{
+       int ret = 0;
+       bundle *b = NULL;
+       app_control_h app_control = option;
+
+       if (noti == NULL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+       if (app_control == NULL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+       if (type != NOTIFICATION_LAUNCH_OPTION_APP_CONTROL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+
+       if ((ret = app_control_to_bundle(app_control, &b)) == APP_CONTROL_ERROR_NONE) {
+               return notification_set_execute_option(noti,
+                               NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
+                               NULL, NULL,
+                               b);
+       } else {
+               NOTIFICATION_ERR("Failed to convert appcontrol to bundle:%d", ret);
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+}
+
+EXPORT_API int notification_get_launch_option(notification_h noti,
+               notification_launch_option_type type, void *option)
+{
+       int ret = 0;
+       bundle *b = NULL;
+       app_control_h *app_control = (app_control_h *)option;
+       app_control_h app_control_new = NULL;
+
+       if (noti == NULL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+       if (app_control == NULL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+       if (type != NOTIFICATION_LAUNCH_OPTION_APP_CONTROL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+
+       ret = notification_get_execute_option(noti,
+                               NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
+                               NULL,
+                               &b);
+       if (ret == NOTIFICATION_ERROR_NONE && b != NULL) {
+               ret = app_control_create(&app_control_new);
+               if (ret == APP_CONTROL_ERROR_NONE && app_control_new != NULL) {
+                       ret = app_control_import_from_bundle(app_control_new, b);
+                       if (ret == APP_CONTROL_ERROR_NONE) {
+                               *app_control = app_control_new;
+                       } else {
+                               app_control_destroy(app_control_new);
+                               NOTIFICATION_ERR("Failed to import app control from bundle:%d", ret);
+                               return NOTIFICATION_ERROR_IO_ERROR;
+                       }
+               } else {
+                       NOTIFICATION_ERR("Failed to create app control:%d", ret);
+                       return NOTIFICATION_ERROR_IO_ERROR;
+               }
+       } else {
+               NOTIFICATION_ERR("Failed to get execute option:%d", ret);
+               return ret;
+       }
+
+       return NOTIFICATION_ERROR_NONE;
+}
+
 EXPORT_API notification_error_e notification_set_execute_option(notification_h noti,
                                                                notification_execute_type_e type,
                                                                const char *text,
@@ -1240,12 +1315,12 @@ EXPORT_API notification_error_e notification_set_execute_option(notification_h n
        bundle *b = NULL;
 
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (type <= NOTIFICATION_EXECUTE_TYPE_NONE
            || type >= NOTIFICATION_EXECUTE_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Create execute option bundle if does not exist */
@@ -1342,12 +1417,12 @@ EXPORT_API notification_error_e notification_get_execute_option(notification_h n
        bundle *b = NULL;
 
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (type <= NOTIFICATION_EXECUTE_TYPE_NONE
            || type >= NOTIFICATION_EXECUTE_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        switch (type) {
@@ -1430,7 +1505,7 @@ EXPORT_API notification_error_e notification_set_property(notification_h noti,
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set flags */
@@ -1444,7 +1519,7 @@ EXPORT_API notification_error_e notification_get_property(notification_h noti,
 {
        /* Check noti and flags are valid data */
        if (noti == NULL || flags == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set flags */
@@ -1458,7 +1533,7 @@ EXPORT_API notification_error_e notification_set_display_applist(notification_h
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set app list */
@@ -1472,7 +1547,7 @@ EXPORT_API notification_error_e notification_get_display_applist(notification_h
 {
        /* Check noti and applist are valid data */
        if (noti == NULL || applist == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set app list */
@@ -1486,7 +1561,7 @@ EXPORT_API notification_error_e notification_set_size(notification_h noti,
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Save progress size */
@@ -1500,7 +1575,7 @@ EXPORT_API notification_error_e notification_get_size(notification_h noti,
 {
        /* Check noti and size is valid data */
        if (noti == NULL || size == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set progress size */
@@ -1514,7 +1589,7 @@ EXPORT_API notification_error_e notification_set_progress(notification_h noti,
 {
        /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Save progress percentage */
@@ -1528,7 +1603,7 @@ EXPORT_API notification_error_e notification_get_progress(notification_h noti,
 {
        /* Check noti and percentage are valid data */
        if (noti == NULL || percentage == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set progress percentage */
@@ -1542,7 +1617,7 @@ EXPORT_API notification_error_e notification_set_pkgname(notification_h noti,
 {
        /* check noti and pkgname are valid data */
        if (noti == NULL || pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Remove previous caller pkgname */
@@ -1561,7 +1636,7 @@ EXPORT_API notification_error_e notification_get_pkgname(notification_h noti,
 {
        /* Check noti and pkgname are valid data */
        if (noti == NULL || pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Get caller pkgname */
@@ -1579,7 +1654,7 @@ EXPORT_API notification_error_e notification_set_layout(notification_h noti,
 {
        /* check noti and pkgname are valid data */
        if (noti == NULL || (layout < NOTIFICATION_LY_NONE || layout >= NOTIFICATION_LY_MAX)) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        noti->layout = layout;
@@ -1592,7 +1667,7 @@ EXPORT_API notification_error_e notification_get_layout(notification_h noti,
 {
        /* Check noti and pkgname are valid data */
        if (noti == NULL || layout == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        *layout = noti->layout;
@@ -1605,7 +1680,7 @@ EXPORT_API notification_error_e notification_get_id(notification_h noti,
 {
        /* check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check group_id is valid data */
@@ -1632,7 +1707,7 @@ EXPORT_API notification_error_e notification_get_type(notification_h noti,
 {
        /* Check noti and type is valid data */
        if (noti == NULL || type == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Set noti type */
@@ -1641,21 +1716,50 @@ EXPORT_API notification_error_e notification_get_type(notification_h noti,
        return NOTIFICATION_ERROR_NONE;
 }
 
+EXPORT_API int notification_post(notification_h noti)
+{
+       int ret = 0;
+       int id = 0;
+
+       /* Check noti is valid data */
+       if (noti == NULL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+
+       /* Check noti type is valid type */
+       if (noti->type <= NOTIFICATION_TYPE_NONE
+           || noti->type >= NOTIFICATION_TYPE_MAX) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+
+       /* Save insert time */
+       noti->insert_time = time(NULL);
+
+       ret = notification_ipc_request_insert(noti, &id);
+       if (ret != NOTIFICATION_ERROR_NONE) {
+               return ret;
+       }
+       noti->priv_id = id;
+       NOTIFICATION_DBG("from master:%d", id);
+
+       return NOTIFICATION_ERROR_NONE;
+}
+
 EXPORT_API notification_error_e notification_insert(notification_h noti,
                                                    int *priv_id)
 {
        int ret = 0;
        int id = 0;
 
-       /* Check noti is vaild data */
+       /* Check noti is valid data */
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Check noti type is valid type */
        if (noti->type <= NOTIFICATION_TYPE_NONE
            || noti->type >= NOTIFICATION_TYPE_MAX) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Save insert time */
@@ -1759,7 +1863,7 @@ EXPORT_API notification_error_e notification_delete_by_priv_id(const char *pkgna
        char *caller_pkgname = NULL;
 
        if (priv_id <= NOTIFICATION_PRIV_ID_NONE) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (pkgname == NULL) {
@@ -1787,7 +1891,7 @@ EXPORT_API notification_error_e notification_delete(notification_h noti)
        int ret = 0;
 
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret = notification_ipc_request_delete_single(NOTIFICATION_TYPE_NONE, noti->caller_pkgname, noti->priv_id);
@@ -1808,7 +1912,7 @@ EXPORT_API notification_error_e notification_update_progress(notification_h noti
 
        if (priv_id <= NOTIFICATION_PRIV_ID_NONE) {
                if (noti == NULL) {
-                       return NOTIFICATION_ERROR_INVALID_DATA;
+                       return NOTIFICATION_ERROR_INVALID_PARAMETER;
                } else {
                        input_priv_id = noti->priv_id;
                }
@@ -1850,7 +1954,7 @@ EXPORT_API notification_error_e notification_update_size(notification_h noti,
 
        if (priv_id <= NOTIFICATION_PRIV_ID_NONE) {
                if (noti == NULL) {
-                       return NOTIFICATION_ERROR_INVALID_DATA;
+                       return NOTIFICATION_ERROR_INVALID_PARAMETER;
                } else {
                        input_priv_id = noti->priv_id;
                }
@@ -1889,7 +1993,7 @@ EXPORT_API notification_error_e notification_update_content(notification_h noti,
 
        if (priv_id <= NOTIFICATION_PRIV_ID_NONE) {
                if (noti == NULL) {
-                       return NOTIFICATION_ERROR_INVALID_DATA;
+                       return NOTIFICATION_ERROR_INVALID_PARAMETER;
                } else {
                        input_priv_id = noti->priv_id;
                }
@@ -1981,19 +2085,62 @@ EXPORT_API notification_h notification_load(char *pkgname,
        return noti;
 }
 
+EXPORT_API notification_h  notification_load_by_tag(const char *tag)
+{
+       int ret = 0;
+       notification_h noti = NULL;
+       char *caller_pkgname = NULL;
+
+       if (tag == NULL) {
+               NOTIFICATION_ERR("Invalid parameter");
+               set_last_result(NOTIFICATION_ERROR_INVALID_PARAMETER);
+               return NULL;
+       }
+
+       caller_pkgname = _notification_get_pkgname_by_pid();
+       if (!caller_pkgname) {
+               NOTIFICATION_ERR("Failed to get a package name");
+               set_last_result(NOTIFICATION_ERROR_OUT_OF_MEMORY);
+
+               return NULL;
+       }
+
+       noti = (notification_h) calloc(1, sizeof(struct _notification));
+       if (noti == NULL) {
+               NOTIFICATION_ERR("Failed to alloc a new notification");
+               set_last_result(NOTIFICATION_ERROR_OUT_OF_MEMORY);
+               free(caller_pkgname);
+
+               return NULL;
+       }
+
+       ret = notification_ipc_request_load_noti_by_tag(noti, caller_pkgname, tag);
+
+       free(caller_pkgname);
+
+       set_last_result(ret);
+
+       if (ret != NOTIFICATION_ERROR_NONE) {
+               notification_free(noti);
+               return NULL;
+       }
+
+       return noti;
+}
+
 EXPORT_API notification_error_e notification_clone(notification_h noti, notification_h *clone)
 {
        notification_h new_noti = NULL;
 
        if (noti == NULL || clone == NULL) {
                NOTIFICATION_ERR("INVALID PARAMETER.");
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        new_noti = (notification_h) calloc(1, sizeof(struct _notification));
        if (new_noti == NULL) {
                NOTIFICATION_ERR("NO MEMORY : noti == NULL");
-               return NOTIFICATION_ERROR_NO_MEMORY;
+               return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
        new_noti->type = noti->type;
@@ -2120,7 +2267,7 @@ EXPORT_API notification_error_e notification_clone(notification_h noti, notifica
 EXPORT_API notification_error_e notification_free(notification_h noti)
 {
        if (noti == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (noti->caller_pkgname) {
@@ -2204,10 +2351,10 @@ notification_resister_changed_cb(void (*changed_cb)
        notification_cb_list_s *noti_cb_list = NULL;
 
        if (changed_cb == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        if (notification_ipc_monitor_init() != NOTIFICATION_ERROR_NONE) {
-               return NOTIFICATION_ERROR_IO;
+               return NOTIFICATION_ERROR_IO_ERROR;
        }
 
        noti_cb_list_new =
@@ -2247,10 +2394,10 @@ notification_unresister_changed_cb(void (*changed_cb)
        noti_cb_list = g_notification_cb_list;
 
        if (changed_cb == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        if (noti_cb_list == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        while (noti_cb_list->prev != NULL) {
@@ -2286,7 +2433,7 @@ notification_unresister_changed_cb(void (*changed_cb)
                noti_cb_list = noti_cb_list->next;
        } while (noti_cb_list != NULL);
 
-       return NOTIFICATION_ERROR_INVALID_DATA;
+       return NOTIFICATION_ERROR_INVALID_PARAMETER;
 }
 
 EXPORT_API notification_error_e
@@ -2298,10 +2445,10 @@ notification_register_detailed_changed_cb(
        notification_cb_list_s *noti_cb_list = NULL;
 
        if (detailed_changed_cb == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        if (notification_ipc_monitor_init() != NOTIFICATION_ERROR_NONE) {
-               return NOTIFICATION_ERROR_IO;
+               return NOTIFICATION_ERROR_IO_ERROR;
        }
 
        noti_cb_list_new =
@@ -2342,10 +2489,10 @@ notification_unregister_detailed_changed_cb(
        noti_cb_list = g_notification_cb_list;
 
        if (detailed_changed_cb == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        if (noti_cb_list == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        while (noti_cb_list->prev != NULL) {
@@ -2381,7 +2528,7 @@ notification_unregister_detailed_changed_cb(
                noti_cb_list = noti_cb_list->next;
        } while (noti_cb_list != NULL);
 
-       return NOTIFICATION_ERROR_INVALID_DATA;
+       return NOTIFICATION_ERROR_INVALID_PARAMETER;
 }
 
 EXPORT_API notification_error_e notification_get_count(notification_type_e type,
@@ -2393,7 +2540,7 @@ EXPORT_API notification_error_e notification_get_count(notification_type_e type,
        int noti_count = 0;
 
        if (count == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret =
@@ -2416,7 +2563,7 @@ EXPORT_API notification_error_e notification_get_list(notification_type_e type,
        int ret = 0;
 
        if (list == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret = notification_noti_get_grouping_list(type, count, &get_list);
@@ -2437,7 +2584,7 @@ notification_get_grouping_list(notification_type_e type, int count,
        int ret = 0;
 
        if (list == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret = notification_noti_get_grouping_list(type, count, &get_list);
@@ -2460,7 +2607,7 @@ EXPORT_API notification_error_e notification_get_detail_list(const char *pkgname
        int ret = 0;
 
        if (list == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret =
@@ -2481,7 +2628,7 @@ EXPORT_API notification_error_e notification_free_list(notification_list_h list)
        notification_h noti = NULL;
 
        if (list == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        cur_list = notification_list_get_head(list);
@@ -2500,7 +2647,7 @@ EXPORT_API notification_error_e notification_op_get_data(notification_op *noti_o
                                                       void *data)
 {
        if (noti_op == NULL || data == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        switch (type) {
@@ -2520,7 +2667,7 @@ EXPORT_API notification_error_e notification_op_get_data(notification_op *noti_o
                        *((int*)data) = noti_op->extra_info_2;
                        break;
                default:
-                       return NOTIFICATION_ERROR_INVALID_DATA;
+                       return NOTIFICATION_ERROR_INVALID_PARAMETER;
                        break;
        }
 
@@ -2574,7 +2721,7 @@ notification_add_deffered_task(
                void (*deffered_task_cb)(void *data), void *user_data)
 {
        if (deffered_task_cb == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        return notification_ipc_add_deffered_task(deffered_task_cb, user_data);
@@ -2585,7 +2732,7 @@ notification_del_deffered_task(
                void (*deffered_task_cb)(void *data))
 {
        if (deffered_task_cb == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        return notification_ipc_del_deffered_task(deffered_task_cb);
@@ -2715,7 +2862,7 @@ EXPORT_API notification_error_e notification_set_args(notification_h noti,
                                                      bundle * group_args)
 {
        if (noti == NULL || args == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (noti->args) {
@@ -2741,7 +2888,7 @@ EXPORT_API notification_error_e notification_get_args(notification_h noti,
                                                      bundle ** group_args)
 {
        if (noti == NULL || args == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (noti->args) {
@@ -2811,6 +2958,37 @@ EXPORT_API notification_error_e notification_delete_group_by_priv_id(const char
        return NOTIFICATION_ERROR_NONE;
 }
 
+EXPORT_API int  notification_set_tag(notification_h noti, const char *tag)
+{
+       /* Check noti is valid data */
+       if (noti == NULL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+
+       if (tag != NULL) {
+               /* save input TAG */
+               if (noti->tag != NULL) {
+                       free(noti->tag);
+               }
+               noti->tag = strdup(tag);
+       }
+
+       return NOTIFICATION_ERROR_NONE;
+
+}
+
+EXPORT_API int  notification_get_tag(notification_h noti, const char **tag)
+{
+       /* Check noti is valid data */
+       if (noti == NULL) {
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+       }
+
+       /* Set sound type */
+       *tag = noti->tag;
+       return NOTIFICATION_ERROR_NONE;
+}
+
 EXPORT_API notification_error_e notification_wait_response(notification_h noti,
                                                           int timeout,
                                                           int *respi,
@@ -2838,7 +3016,7 @@ EXPORT_API notification_error_e notification_wait_response(notification_h noti,
        NULL, &b);
 
        if (b == NULL)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        tid_c = bundle_get_val(b, "tid");
        if (tid_c == NULL) {
@@ -2854,7 +3032,7 @@ EXPORT_API notification_error_e notification_wait_response(notification_h noti,
 
        sock_fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
        if (sock_fd == -1)
-               return NOTIFICATION_ERROR_NO_MEMORY;
+               return NOTIFICATION_ERROR_OUT_OF_MEMORY;
 
        sock_addr.sun_family = AF_UNIX;
        asprintf(&sock_path, "/tmp/.notification-%s", tid_c);
@@ -2863,7 +3041,7 @@ EXPORT_API notification_error_e notification_wait_response(notification_h noti,
                close(sock_fd);
                free(sock_path);
                free((char *)tid_c);
-               return NOTIFICATION_ERROR_NO_MEMORY;
+               return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
        if (timeout > 0) {
@@ -2925,16 +3103,16 @@ EXPORT_API notification_error_e notification_send_response(notification_h noti,
        NULL, &b);
 
        if (b == NULL)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        tid_c = bundle_get_val(b, "tid");
        if (tid_c == NULL)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        tid = atoi(tid_c);
 
        sock_fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
        if (sock_fd == -1)
-               return NOTIFICATION_ERROR_NO_MEMORY;
+               return NOTIFICATION_ERROR_OUT_OF_MEMORY;
 
        sock_addr.sun_family = AF_UNIX;
        asprintf(&sock_path, "/tmp/.notification-%d", tid);
@@ -2942,7 +3120,7 @@ EXPORT_API notification_error_e notification_send_response(notification_h noti,
        if (connect(sock_fd, (struct sockaddr *)&sock_addr, sizeof(sock_addr)) == -1) {
                close(sock_fd);
                free(sock_path);
-               return NOTIFICATION_ERROR_NO_MEMORY;
+               return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
        if (respc)
index 7796fa5..82cdf39 100755 (executable)
@@ -50,7 +50,7 @@ int notification_db_close(sqlite3 ** db)
        int ret = 0;
 
        if (db == NULL || *db == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret = db_util_close(*db);
@@ -70,10 +70,10 @@ int notification_db_exec(sqlite3 * db, const char *query, int *num_changes)
        sqlite3_stmt *stmt = NULL;
 
        if (db == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        if (query == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
index 19af87c..985b812 100755 (executable)
@@ -26,6 +26,8 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#include <vconf.h>
+
 #include <packet.h>
 #include <com-core.h>
 #include <com-core_packet.h>
 
 #define NOTIFICATION_IPC_TIMEOUT 0.0
 
+#if !defined(VCONFKEY_MASTER_STARTED)
+#define VCONFKEY_MASTER_STARTED "memory/data-provider-master/started"
+#endif
+
 static struct info {
        int server_fd;
        int server_cl_fd;
@@ -90,6 +96,21 @@ static Eina_Bool _do_deffered_task(void *data);
  * the task when the service is available)
  */
 
+int notification_ipc_is_master_ready(void)
+{
+       int ret = -1, is_master_started = 0;
+
+       ret = vconf_get_bool(VCONFKEY_MASTER_STARTED, &is_master_started);
+       if (ret == 0 && is_master_started == 1) {
+               NOTIFICATION_ERR("the master has been started");
+       } else {
+               is_master_started = 0;
+               NOTIFICATION_ERR("the master has been stopped");
+       }
+
+       return is_master_started;
+}
+
 notification_error_e
 notification_ipc_add_deffered_task(
                void (*deffered_task_cb)(void *data),
@@ -102,7 +123,7 @@ notification_ipc_add_deffered_task(
            (task_list *) malloc(sizeof(task_list));
 
        if (list_new == NULL) {
-               return NOTIFICATION_ERROR_NO_MEMORY;
+               return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
        list_new->next = NULL;
@@ -140,7 +161,7 @@ notification_ipc_del_deffered_task(
        list_del = g_task_list;
 
        if (list_del == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        while (list_del->prev != NULL) {
@@ -177,7 +198,7 @@ notification_ipc_del_deffered_task(
                list_del = list_del->next;
        } while (list_del != NULL);
 
-       return NOTIFICATION_ERROR_INVALID_DATA;
+       return NOTIFICATION_ERROR_INVALID_PARAMETER;
 }
 
 static Eina_Bool _do_deffered_task(void *data) {
@@ -315,7 +336,7 @@ EXPORT_API notification_error_e notification_ipc_make_noti_from_packet(notificat
 
        if (noti == NULL) {
                NOTIFICATION_ERR("invalid data");
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret = packet_get(packet,
@@ -361,7 +382,7 @@ EXPORT_API notification_error_e notification_ipc_make_noti_from_packet(notificat
 
        if (ret != 38) {
                NOTIFICATION_ERR("failed to create a noti from packet");
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /*!
@@ -731,10 +752,10 @@ static int _handler_service_register(pid_t pid, int handle, const struct packet
 
        if (!packet) {
                NOTIFICATION_ERR("Packet is not valid\n");
-               ret = NOTIFICATION_ERROR_INVALID_DATA;
+               ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
        } else if (packet_get(packet, "i", &ret) != 1) {
                NOTIFICATION_ERR("Packet is not valid\n");
-               ret = NOTIFICATION_ERROR_INVALID_DATA;
+               ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
        } else {
                if (ret == 0) {
                        notification_op *noti_op = notification_ipc_create_op(NOTIFICATION_OP_SERVICE_READY, 1, NULL, 1, NULL);
@@ -790,14 +811,14 @@ notification_error_e notification_ipc_monitor_init(void)
        s_info.server_fd = com_core_packet_client_init(s_info.socket_file, 0, service_table);
        if (s_info.server_fd < 0) {
                NOTIFICATION_ERR("Failed to make a connection to the master\n");
-               return NOTIFICATION_ERROR_IO;
+               return NOTIFICATION_ERROR_IO_ERROR;
        }
 
        packet = packet_create("service_register", "");
        if (!packet) {
                NOTIFICATION_ERR("Failed to build a packet\n");
                com_core_packet_client_fini(s_info.server_fd);
-               return NOTIFICATION_ERROR_IO;
+               return NOTIFICATION_ERROR_IO_ERROR;
        }
 
        ret = com_core_packet_async_send(s_info.server_fd, packet, 1.0, _handler_service_register, NULL);
@@ -805,8 +826,8 @@ notification_error_e notification_ipc_monitor_init(void)
        packet_destroy(packet);
        if (ret != 0) {
                com_core_packet_client_fini(s_info.server_fd);
-               s_info.server_fd = NOTIFICATION_ERROR_INVALID_DATA;
-               ret = NOTIFICATION_ERROR_IO;
+               s_info.server_fd = NOTIFICATION_ERROR_INVALID_PARAMETER;
+               ret = NOTIFICATION_ERROR_IO_ERROR;
        } else {
                ret = NOTIFICATION_ERROR_NONE;
        }
@@ -822,7 +843,7 @@ notification_error_e notification_ipc_monitor_fini(void)
        }
 
        com_core_packet_client_fini(s_info.server_fd);
-       s_info.server_fd = NOTIFICATION_ERROR_INVALID_DATA;
+       s_info.server_fd = NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        s_info.initialized = 0;
 
@@ -854,7 +875,7 @@ notification_error_e notification_ipc_request_insert(notification_h noti, int *p
                if (packet_get(result, "ii", &status, &id) != 2) {
                        NOTIFICATION_ERR("Failed to get a result packet");
                        packet_unref(result);
-                       return NOTIFICATION_ERROR_IO;
+                       return NOTIFICATION_ERROR_IO_ERROR;
                }
 
                if (status != NOTIFICATION_ERROR_NONE) {
@@ -891,7 +912,7 @@ notification_error_e notification_ipc_request_delete_single(notification_type_e
                if (packet_get(result, "ii", &status, &id) != 2) {
                        NOTIFICATION_ERR("Failed to get a result packet");
                        packet_unref(result);
-                       return NOTIFICATION_ERROR_IO;
+                       return NOTIFICATION_ERROR_IO_ERROR;
                }
                packet_unref(result);
        } else {
@@ -919,7 +940,7 @@ notification_error_e notification_ipc_request_delete_multiple(notification_type_
                if (packet_get(result, "ii", &status, &num_deleted) != 2) {
                        NOTIFICATION_ERR("Failed to get a result packet");
                        packet_unref(result);
-                       return NOTIFICATION_ERROR_IO;
+                       return NOTIFICATION_ERROR_IO_ERROR;
                }
                NOTIFICATION_ERR("num deleted:%d", num_deleted);
                packet_unref(result);
@@ -948,7 +969,7 @@ notification_error_e notification_ipc_request_update(notification_h noti)
                if (packet_get(result, "ii", &status, &id) != 2) {
                        NOTIFICATION_ERR("Failed to get a result packet");
                        packet_unref(result);
-                       return NOTIFICATION_ERROR_IO;
+                       return NOTIFICATION_ERROR_IO_ERROR;
                }
                packet_unref(result);
        } else {
@@ -967,7 +988,7 @@ static int _notification_ipc_update_cb(pid_t pid, int handle, const struct packe
 
        if (cb_item == NULL) {
                NOTIFICATION_ERR("Failed to get a callback item");
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
        s_info.server_cl_fd_ref_cnt = (s_info.server_cl_fd_ref_cnt <= 1) ? 0 : s_info.server_cl_fd_ref_cnt - 1;
        if (s_info.server_cl_fd_ref_cnt <= 0) {
@@ -981,7 +1002,7 @@ static int _notification_ipc_update_cb(pid_t pid, int handle, const struct packe
        if (packet != NULL) {
                if (packet_get(packet, "ii", &status, &id) != 2) {
                        NOTIFICATION_ERR("Failed to get a result packet");
-                       status = NOTIFICATION_ERROR_IO;
+                       status = NOTIFICATION_ERROR_IO_ERROR;
                }
        }
 
@@ -1003,13 +1024,13 @@ notification_error_e notification_ipc_request_update_async(notification_h noti,
 
        packet = notification_ipc_make_packet_from_noti(noti, "update_noti", 1);
        if (packet == NULL) {
-               ret = NOTIFICATION_ERROR_INVALID_DATA;
+               ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
                goto fail;
        }
 
        cb_item = calloc(1, sizeof(result_cb_item));
        if (cb_item == NULL) {
-               ret = NOTIFICATION_ERROR_NO_MEMORY;
+               ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                goto fail;
        }
 
@@ -1042,7 +1063,7 @@ notification_error_e notification_ipc_request_update_async(notification_h noti,
                        com_core_packet_client_fini(fd_temp);
                        NOTIFICATION_INFO("FD(%d) finalized", fd_temp);
                }
-               ret = NOTIFICATION_ERROR_IO;
+               ret = NOTIFICATION_ERROR_IO_ERROR;
                goto fail;
        } else {
                ret = NOTIFICATION_ERROR_NONE;
@@ -1075,7 +1096,7 @@ notification_error_e notification_ipc_request_refresh(void)
                if (packet_get(result, "i", &status) != 1) {
                        NOTIFICATION_ERR("Failed to get a result packet");
                        packet_unref(result);
-                       return NOTIFICATION_ERROR_IO;
+                       return NOTIFICATION_ERROR_IO_ERROR;
                }
                packet_unref(result);
        } else {
@@ -1103,7 +1124,7 @@ notification_error_e notification_ipc_noti_setting_property_set(const char *pkgn
                if (packet_get(result, "ii", &status, &ret) != 2) {
                        NOTIFICATION_ERR("Failed to get a result packet");
                        packet_unref(result);
-                       return NOTIFICATION_ERROR_IO;
+                       return NOTIFICATION_ERROR_IO_ERROR;
                }
                packet_unref(result);
        } else {
@@ -1131,7 +1152,7 @@ notification_error_e notification_ipc_noti_setting_property_get(const char *pkgn
                if (packet_get(result, "is", &status, &ret) != 2) {
                        NOTIFICATION_ERR("Failed to get a result packet");
                        packet_unref(result);
-                       return NOTIFICATION_ERROR_IO;
+                       return NOTIFICATION_ERROR_IO_ERROR;
                }
                if (status == NOTIFICATION_ERROR_NONE && ret != NULL) {
                        *value = strdup(ret);
@@ -1144,3 +1165,33 @@ notification_error_e notification_ipc_noti_setting_property_get(const char *pkgn
 
        return status;
 }
+
+int notification_ipc_request_load_noti_by_tag(notification_h noti, const char *pkgname, const char *tag)
+{
+       struct packet *packet;
+       struct packet *result;
+
+       packet = packet_create("load_noti_by_tag", "ss", pkgname, tag);
+       result = com_core_packet_oneshot_send(NOTIFICATION_ADDR,
+                       packet,
+                       NOTIFICATION_IPC_TIMEOUT);
+       packet_destroy(packet);
+
+       if (result != NULL) {
+               if (notification_ipc_make_noti_from_packet(noti, result) != NOTIFICATION_ERROR_NONE) {
+                       NOTIFICATION_ERR("Failed to get a result packet");
+                       packet_unref(result);
+                       return NOTIFICATION_ERROR_IO_ERROR;
+               }
+
+               packet_unref(result);
+       } else {
+               NOTIFICATION_ERR("failed to receive answer(load noti by tag)");
+               if (notification_ipc_is_master_ready() == 1)
+                       return NOTIFICATION_ERROR_PERMISSION_DENIED;
+               else
+                       return NOTIFICATION_ERROR_SERVICE_NOT_READY;
+       }
+
+       return NOTIFICATION_ERROR_NONE;
+}
index 0c447fb..695a621 100755 (executable)
@@ -534,7 +534,7 @@ int notification_noti_set_tag(const char *tag, char *value, char *buf, int buf_l
        len_total += (strlen(tag) * 2) + 5 + strlen(value) + 1;
 
        if (buf_len <= len_total)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        snprintf(buf, buf_len, "<%s>%s</%s>", tag, value, tag);
 
@@ -589,7 +589,7 @@ static int _notification_noti_update_priv_id(sqlite3 * db, int rowid)
        char query[128] = { 0, };
 
        if (db == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        snprintf(query, sizeof(query), "update noti_list set "
@@ -708,7 +708,7 @@ int notification_noti_get_by_priv_id(notification_h noti, char *pkgname, int pri
        int ret = 0;
 
        if (priv_id < 0 || noti == NULL) {
-               ret = NOTIFICATION_ERROR_INVALID_DATA;
+               ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
                goto err;
        }
 
@@ -895,7 +895,7 @@ EXPORT_API int notification_noti_delete_all(notification_type_e type, const char
                                         */
                                        free(*list_deleted_rowid);
                                        *list_deleted_rowid = NULL;
-                                       ret = NOTIFICATION_ERROR_NO_MEMORY;
+                                       ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                                        goto err;
                                }
                        }
@@ -977,7 +977,7 @@ int notification_noti_delete_group_by_group_id(const char *pkgname,
 
        /* Check pkgname is valid */
        if (pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        snprintf(query_where, sizeof(query_where),
@@ -1016,7 +1016,7 @@ int notification_noti_delete_group_by_group_id(const char *pkgname,
                                } else {
                                        free(*list_deleted_rowid);
                                        *list_deleted_rowid = NULL;
-                                       ret = NOTIFICATION_ERROR_NO_MEMORY;
+                                       ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                                        goto err;
                                }
                        }
@@ -1088,7 +1088,7 @@ int notification_noti_delete_group_by_priv_id(const char *pkgname, int priv_id)
 
        /* Check pkgname is valid */
        if (pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Open DB */
@@ -1124,7 +1124,7 @@ EXPORT_API int notification_noti_delete_by_priv_id(const char *pkgname, int priv
 
        /* Check pkgname is valid */
        if (pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Open DB */
@@ -1157,7 +1157,7 @@ EXPORT_API int notification_noti_delete_by_priv_id_get_changes(const char *pkgna
 
        /* Check pkgname is valid */
        if (pkgname == NULL) {
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        /* Open DB */
index 69aca51..f7c9111 100755 (executable)
@@ -118,10 +118,10 @@ static notification_error_e _is_record_exist(const char *pkgname, sqlite3 *db)
        int sqlret;
 
        if (!pkgname)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!db)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        sqlbuf = sqlite3_mprintf("SELECT count(*) FROM %s WHERE " \
                         "appid = %Q",
@@ -129,7 +129,7 @@ static notification_error_e _is_record_exist(const char *pkgname, sqlite3 *db)
 
        if (!sqlbuf) {
                NOTIFICATION_ERR("fail to alloc sql query");
-               return NOTIFICATION_ERROR_NO_MEMORY;
+               return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
        sqlret = sqlite3_prepare_v2(db, sqlbuf, -1, &stmt, NULL);
@@ -171,17 +171,17 @@ EXPORT_API notification_error_e notification_setting_db_set(const char *pkgname,
        const char *column = NULL;
 
        if (!pkgname)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!property)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!value)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        column = _get_prop_column(property);
        if (!column)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        sqlret = db_util_open(NOTIFICATION_SETTING_DB_PATH, &db, 0);
        if (sqlret != SQLITE_OK || !db) {
@@ -200,7 +200,7 @@ EXPORT_API notification_error_e notification_setting_db_set(const char *pkgname,
                        NOTIFICATION_SETTING_DB, column, value, pkgname);
        if (!sqlbuf) {
                NOTIFICATION_ERR("fail to alloc query");
-               result = NOTIFICATION_ERROR_NO_MEMORY;
+               result = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                goto return_close_db;
        }
 
@@ -229,17 +229,17 @@ EXPORT_API notification_error_e notification_setting_db_get(const char *pkgname,
        const char *column = NULL;
 
        if (!pkgname)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!property)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!value)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        column = _get_prop_column(property);
        if (!column)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        sqlret = db_util_open(NOTIFICATION_SETTING_DB_PATH, &db, 0);
        if (sqlret != SQLITE_OK || !db) {
@@ -258,7 +258,7 @@ EXPORT_API notification_error_e notification_setting_db_get(const char *pkgname,
                        column, NOTIFICATION_SETTING_DB, pkgname);
        if (!sqlbuf) {
                NOTIFICATION_ERR("fail to alloc query");
-               result = NOTIFICATION_ERROR_NO_MEMORY;
+               result = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                goto return_close_db;
        }
 
@@ -281,7 +281,7 @@ EXPORT_API notification_error_e notification_setting_db_get(const char *pkgname,
                        *value = get_data;
                } else {
                        NOTIFICATION_ERR("fail to alloc query");
-                       result = NOTIFICATION_ERROR_NO_MEMORY;
+                       result = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                        goto return_close_db;
                }
        }
@@ -305,13 +305,13 @@ EXPORT_API notification_error_e notification_setting_property_set(const char *pk
        int ret = 0;
 
        if (!pkgname)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!property)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!value)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        ret = notification_ipc_noti_setting_property_set(pkgname, property, value);
        if (ret != NOTIFICATION_ERROR_NONE) {
@@ -326,13 +326,13 @@ EXPORT_API notification_error_e notification_setting_property_get(const char *pk
        int ret = 0;
 
        if (!pkgname)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!property)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        if (!value)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        ret = notification_ipc_noti_setting_property_get(pkgname, property, value);
        if (ret != NOTIFICATION_ERROR_NONE) {
index b0a1d4e..8dd401a 100755 (executable)
@@ -82,19 +82,19 @@ int notification_status_message_post(const char *message)
 
        if (!message) {
                NOTIFICATION_ERR("message is NULL");
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        if (strlen(message) <= 0) {
                NOTIFICATION_ERR("message has only NULL");
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
 
        ret = vconf_set_str(NOTIFICATION_STATUS_MESSAGE_KEY, message);
        if (ret) {
                NOTIFICATION_ERR("fail to set message [%s]", message);
-               return NOTIFICATION_ERROR_IO;
+               return NOTIFICATION_ERROR_IO_ERROR;
        }
 
        return NOTIFICATION_ERROR_NONE;
@@ -105,13 +105,13 @@ int notification_status_monitor_message_cb_set(notification_status_message_cb ca
 {
        int ret = 0;
        if (!callback)
-               return NOTIFICATION_ERROR_INVALID_DATA;
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        ret = vconf_notify_key_changed(NOTIFICATION_STATUS_MESSAGE_KEY,
                        __notification_status_message_change_cb, NULL);
        if (ret && errno != EALREADY) {
                NOTIFICATION_ERR("fail to set message cb");
-               return NOTIFICATION_ERROR_IO;
+               return NOTIFICATION_ERROR_IO_ERROR;
        }
 
        md.callback = callback;