Merge branch 'tizen_2.4' of ssh://spin:29418/apps/home/notification into tizen submit/tizen_mobile/20150527.071719 submit/tizen_mobile/20150529.103300
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 26 May 2015 14:12:32 +0000 (23:12 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 26 May 2015 14:12:38 +0000 (23:12 +0900)
Conflicts:
CMakeLists.txt
include/notification.h
include/notification_internal.h
include/notification_list.h
include/notification_status.h
include/notification_type.h
packaging/notification.spec
src/notification.c
src/notification_noti.c
test-app/CMakeLists.txt
test-app/main.c

Change-Id: I879a434de924aaf724679a42d26f2586ba616fde
Signed-off-by: Sung-jae Park <nicesj.park@samsung.com>
13 files changed:
1  2 
CMakeLists.txt
include/notification.h
include/notification_error.h
include/notification_internal.h
include/notification_list.h
include/notification_status.h
include/notification_type.h
packaging/notification.spec
src/notification.c
src/notification_ipc.c
src/notification_noti.c
src/notification_status.c
test-app/main.c

diff --cc CMakeLists.txt
@@@ -76,6 -83,6 +83,14 @@@ ADD_DEFINITIONS("-DDBDIR=\"${DBDIR}\""
  ADD_DEFINITIONS("-DDBFILE=\"${DBFILE}\"")
  ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"")
  
++IF (HAVE_X11)
++ADD_DEFINITIONS("-DHAVE_X11")
++ENDIF (HAVE_X11)
++
++IF (HAVE_WAYLAND)
++ADD_DEFINITIONS("-DHAVE_WAYLAND")
++ENDIF (HAVE_WAYLAND)
++
  ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${MAJOR_VER})
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
@@@ -318,78 -319,11 +319,9 @@@ int notification_set_time_to_text(notif
  int notification_get_time_from_text(notification_h noti, notification_text_type_e type,
                                                                time_t *time);
  
 -
 -
  /**
-  * @internal
-  * @brief Sets the text domain to localize the notification.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @param[in] noti   The notification handle
-  * @param[in] domain The text domain
-  * @param[in] dir    The text dir
-  * @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;
-       int noti_err = NOTIFICATION_ERROR_NONE;
-       noti = notification_create(NOTIFICATION_TYPE_NOTI);
-       if(noti == NULL) {
-               return;
-       }
-       noti_err  = notification_set_text_domain(noti, PACKAGE, LOCALEDIR);
-       if(noti_err != NOTIFICATION_ERROR_NONE) {
-               notification_free(noti);
-               return;
-       }
- }
-  * @endcode
-  */
- int notification_set_text_domain(notification_h noti,
-                                                 const char *domain,
-                                                 const char *dir);
- /**
-  * @internal
-  * @brief Gets the text domain from the notification handle.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @remarks Do not free returned domain and dir. They are freed when notification_free() or notification_free_list() is called.
-  * @param[in]  noti   The notification handle
-  * @param[out] domain The domain
-  * @param[out] dir    The locale dir
-  * @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;
-       int noti_err = NOTIFICATION_ERROR_NONE;
-       char *domain = NULL;
-       char *dir = NULL;
-       noti_err  = notification_get_text_domain(noti, &domain, &dir);
-       if(noti_err != NOTIFICATION_ERROR_NONE) {
-               return;
-       }
- }
-  * @endcode
-  */
- int notification_get_text_domain(notification_h noti,
-                                                 char **domain,
-                                                 char **dir);
- /**
   * @brief Sets the sound type for the notification.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @param[in] noti The notification handle
   * @param[in] type The notification sound type
   * @param[in] path The user sound file path
@@@ -695,8 -629,81 +627,81 @@@ int notification_get_launch_option(noti
                                                                notification_launch_option_type type, void *option);
  
  /**
+  * @brief Sets the handler for a specific event.
+  * @details When some event occurs on notification, application launched by app_control_send_launch_request with app_control handle.\n
+  *          Setting event handler of a button means that the notification will show the button.
+  * @since_tizen 2.4
+  * @param[in] noti The notification handle
+  * @param[in] event_type event type
+  * @param[in] event_handler app control handle
+  * @return #NOTIFICATION_ERROR_NONE on success,
+  *         otherwise any other value on failure
+  * @retval #NOTIFICATION_ERROR_NONE         Success
+  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+  * @see #notification_event_type_e
+  * @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_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, app_control);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               notification_free(noti);
+               return;
+       }
+       app_control_destroy(app_control);
+ }
+  * @endcode
+  */
+ int notification_set_event_handler(notification_h noti, notification_event_type_e event_type, app_control_h event_handler);
+ /**
+  * @brief Gets the event handler of a specific event.
+  * @remarks You must release @a app_control using app_control_destroy().
+  * @since_tizen 2.4
+  * @param[in]  noti        The notification handle
+  * @param[in] event_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
+  * @see #notification_event_type_e
+  * @par Sample code:
+  * @code
+ #include <notification.h>
+ ...
+ {
+       app_control_h app_control = NULL;
+       app_control_create(&app_control);
+       ...
+       noti_err = notification_get_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, &app_control);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               notification_free(noti);
+               return;
+       }
+ }
+  * @endcode
+  */
+ int notification_get_event_handler(notification_h noti, notification_event_type_e event_type, app_control_h *event_handler);
+ /**
   * @brief Sets the property of the notification.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @param[in] noti  The notification handle
   * @param[in] flags The property with | operation
   * @return #NOTIFICATION_ERROR_NONE on success,
@@@ -1065,43 -1037,9 +1035,9 @@@ int notification_get_type(notification_
  int notification_update(notification_h noti);
  
  /**
-  * @internal
-  * @brief Updates a notification, asynchronously.
-  * @details The updated notification will appear in the notification area.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @privlevel public
-  * @privilege %http://tizen.org/privilege/notification
-  * @remarks This function updates the notification asynchronously.
-  * @param[in] noti      The notification handle that is created by notification_create()
-  * @param[in] result_cb The callback called when an update completed
-  * @param[in] user_data The user data which you want to use in callback
-  * @return #NOTIFICATION_ERROR_NONE on success,
-  *         otherwise any other value on failure
-  * @retval #NOTIFICATION_ERROR_NONE         Success
-  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
-  * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist
-  * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
-  * @par Sample code:
-  * @code
- #include <notification.h>
- ...
-  {
-       int noti_err = NOTIFICATION_ERROR_NONE;
-       noti_err  = notification_update_async(NULL, result_cb, data);
-       if(noti_err != NOTIFICATION_ERROR_NONE) {
-               return;
-       }
- }
-  * @endcode
-  */
- int notification_update_async(notification_h noti,
-               void (*result_cb)(int priv_id, int result, void *data), void *user_data);
- /**
   * @brief Deletes a notification with the given handle.
   * @details notification_delete() removes notification data from database and notification_free() releases memory of notification data.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @privlevel public
   * @privilege %http://tizen.org/privilege/notification
   * @param[in] noti The notification handle
@@@ -1350,68 -1171,8 +1169,8 @@@ int notification_free(notification_h no
   */
  
  /**
-  * @internal
-  * @brief Registers a callback for all notification events.
-  * @details The registered callback could be called for all notification events.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @privlevel public
-  * @privilege %http://tizen.org/privilege/notification
-  * @param[in] changed_cb The callback function
-  * @param[in] user_data  The user data
-  * @return #NOTIFICATION_ERROR_NONE on success,
-  *         otherwise any 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_unregister_detailed_changed_cb()
-  * @par Sample code:
-  * @code
- #include <notification.h>
- ...
- {
-       noti_err = notification_register_detailed_changed_cb(app_changed_cb, user_data);
-       if(noti_err != NOTIFICATION_ERROR_NONE) {
-               return;
-       }
- }
-  * @endcode
-  */
- int notification_register_detailed_changed_cb(
-               void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
-               void *user_data);
- /**
-  * @internal
-  * @brief Unregisters a callback for all notification events.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @privlevel public
-  * @privilege %http://tizen.org/privilege/notification
-  * @param[in] changed_cb The callback function
-  * @return #NOTIFICATION_ERROR_NONE on success,
-  *         otherwise any 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_register_detailed_changed_cb()
-  * @par Sample code:
-  * @code
- #include <notification.h>
- ...
- {
-       noti_err = notification_register_detailed_changed_cb(app_changed_cb, user_data);
-       if(noti_err != NOTIFICATION_ERROR_NONE) {
-               return;
-       }
- }
-  * @endcode
-  */
- int notification_unregister_detailed_changed_cb(
-               void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
-               void *user_data);
- /**
   * @brief Sets the tag of the notification handle.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @param[in] noti Notification handle
   * @param[in] tag tag for loading notification handle
   * @return #NOTIFICATION_ERROR_NONE on success, other value on failure
Simple merge
Simple merge
@@@ -45,10 -45,115 +45,115 @@@ extern "C" 
   */
  typedef struct _notification_list *notification_list_h;
  
+ /**
+  * @brief Returns the notification list handle.
+  * @details If count is equal to @c -1, all notifications are returned.
+  * @since_tizen 2.3
+  * @privlevel public
+  * @privilege %http://tizen.org/privilege/notification
+  * @param[in]  type  The notification type
+  * @param[in]  count The returned notification data number
+  * @param[out] #NOTIFICATION_ERROR_NONE on success, other value on failure
+  * @return #NOTIFICATION_ERROR_NONE on success,
+  *         otherwise any 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_list_h
+  * @par Sample code:
+  * @code
+ #include <notification.h>
+ ...
+ {
+       notification_list_h noti_list = NULL;
+       int noti_err = NOTIFICATION_ERROR_NONE;
+       noti_err = notification_get_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               return;
+       }
+ }
+  * @endcode
+  */
+ int notification_get_list(notification_type_e type,
+                                          int count,
+                                          notification_list_h * list);
+ /**
+  * @brief Returns the notification detail list handle of grouping data.
+  * @details If count is equal to c -1, all notifications are returned.
+  * @since_tizen 2.3
+  * @privlevel public
+  * @privilege %http://tizen.org/privilege/notification
+  * @param[in]  pkgname  The caller application package name
+  * @param[in]  group_id The group ID
+  * @param[in]  priv_id  The private ID
+  * @param[in]  count    The returned notification data number
+  * @param[out] list     The notification list 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
+  * @see #notification_list_h
+  * @par Sample code:
+  * @code
+ #include <notification.h>
+ ...
+ {
+       notification_list_h noti_list = NULL;
+       int noti_err = NOTIFICATION_ERROR_NONE;
+       noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, &noti_list);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               return;
+       }
+ }
+  * @endcode
+  */
+ int notification_get_detail_list(const char *pkgname,
+                                                 int group_id,
+                                                 int priv_id,
+                                                 int count,
+                                                 notification_list_h *list);
+ /**
+  * @brief Frees a notification list.
+  * @since_tizen 2.3
+  * @privlevel public
+  * @privilege %http://tizen.org/privilege/notification
+  * @param[in] list The notification list handle
+  * @return #NOTIFICATION_ERROR_NONE on success,
+  *         otherwise any 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
+  * @pre notification_get_grouping_list() or notification_get_detail_list().
+  * @see #notification_list_h
+  * @par Sample code:
+  * @code
+ #include <notification.h>
+ ...
+ {
+       notification_list_h noti_list = NULL;
+       int noti_err = NOTIFICATION_ERROR_NONE;
+       ...
+       noti_err = notification_free_list(noti_list);
+       if(noti_err != NOTIFICATION_ERROR_NONE) {
+               return;
+       }
+ }
+  * @endcode
+  */
+ int notification_free_list(notification_list_h list);
  /**
-  * @internal
   * @brief Gets the head pointer of the notification list.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
   * @param[in] list Notification list handle
   * @return Notification list handle on success, NULL on failure
  notification_list_h notification_list_get_head(notification_list_h list);
  
  /**
-  * @internal
 -  * @brief Gets the tail pointer to the notification list.
 + * @brief Gets the tail pointer to the notification list.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
+  * @since_tizen 2.3
   * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
   * @param[in] list Notification list handle
   * @return Notification list handle on success, NULL on failure
  notification_list_h notification_list_get_tail(notification_list_h list);
  
  /**
-  * @internal
   * @brief Gets the previous pointer of the current notification list.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
   * @param[in] list Notification list handle
   * @return Notification list handle on success, NULL on failure
  notification_list_h notification_list_get_prev(notification_list_h list);
  
  /**
-  * @internal
   * @brief Gets the next pointer of the current notification list.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
   * @param[in] list Notification list handle
   * @return Notification list handle on success, NULL on failure
  notification_list_h notification_list_get_next(notification_list_h list);
  
  /**
-  * @internal
   * @brief Gets the notification handle that the list has.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
   * @param[in] list Notification list handle
   * @return Notification handle on success, NULL on failure
  notification_h notification_list_get_data(notification_list_h list);
  
  /**
-  * @internal
   * @brief Appends notification data to the notification list.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
   * @param[in] list Notification list handle
   * @param[in] noti Notification handle
@@@ -239,9 -339,8 +339,8 @@@ notification_list_h notification_list_a
                                             notification_h noti);
  
  /**
-  * @internal
   * @brief Removes notification data from the notification list.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
   * @param[in] list The notification list handle
   * @param[in] noti The notification handle
@@@ -36,43 -36,8 +36,8 @@@ extern "C" 
   */
  
  /**
-  * @internal
-  * @brief Called when a new message is posted.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @param[in] message The message posted
-  * @param[in] data    The user data
-  * @pre notification_status_monitor_message_cb_set() used to register this callback.
-  * @see notification_status_monitor_message_cb_set()
- */
- typedef void (*notification_status_message_cb)(const char *message, void *data);
- /**
-  * @internal
-  * @brief Registers a callback to receive a message.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @param[in] callback The callback function
-  * @param[in] data     The user_data
-  * @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_FROM_DBUS Error from DBus
-  */
- int notification_status_monitor_message_cb_set(notification_status_message_cb callback, void *user_data);
- /**
-  * @internal
-  * @brief Unregisters a callback to receive a message.
-  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
-  * @param[in] callback The callback function
-  * @param[in] data     The user_data
-  * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
-  * @retval #NOTIFICATION_ERROR_NONE Success
-  */
- int notification_status_monitor_message_cb_unset(void);
- /**
   * @brief Sends a string (message) to the notification status monitor.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   * @privlevel public
   * @privilege %http://tizen.org/privilege/notification
   * @param[in] message The messages to be posted
@@@ -75,8 -75,24 +75,24 @@@ typedef enum  _notification_launch_opti
  } notification_launch_option_type;
  
  /**
+  * @brief Enumeration for event type on notification.
+  * @since_tizen 2.4
+  */
+ typedef enum _notification_event_type {
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1  = 0,  /** < Event type : Click on button 1 */
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_2  = 1,  /** < Event type : Click on button 2 */
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_3  = 2,  /** < Event type : Click on button 3 */
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_4  = 3,  /** < Event type : Click on button 4 */
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_5  = 4,  /** < Event type : Click on button 5 */
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_6  = 5,  /** < Event type : Click on button 6 */
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON      = 6,  /** < Event type : Click on icon */
+       NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL = 7,  /** < Event type : Click on thumbnail */
+       NOTIFICATION_EVENT_TYPE_MAX,
+ } notification_event_type_e;
+ /**
   * @brief Enumeration for notification sound type.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   */
  typedef enum _notification_sound_type {
        NOTIFICATION_SOUND_TYPE_NONE = -1,
@@@ -195,21 -220,24 +220,24 @@@ typedef enum _notification_image_type 
                                                /**< Image for thumbnail list */
        NOTIFICATION_IMAGE_TYPE_LIST_5,
                                                /**< Image for thumbnail list */
+       NOTIFICATION_IMAGE_TYPE_BUTTON_1,
+                                               /**< Image for button 1 */
+       NOTIFICATION_IMAGE_TYPE_BUTTON_2,
+                                               /**< Image for button 2 */
+       NOTIFICATION_IMAGE_TYPE_BUTTON_3,
+                                               /**< Image for button 3 */
+       NOTIFICATION_IMAGE_TYPE_BUTTON_4,
+                                               /**< Image for button 4 */
+       NOTIFICATION_IMAGE_TYPE_BUTTON_5,
+                                               /**< Image for button 5 */
+       NOTIFICATION_IMAGE_TYPE_BUTTON_6,
+                                               /**< Image for button 6 */
        NOTIFICATION_IMAGE_TYPE_MAX,
-                               /**< Max flag */
  } notification_image_type_e;
  
- /*typedef enum _notification_button_type {
-       NOTIFICATION_BUTTON_TYPE_NONE = -1,
-       NOTIFICATION_BUTTON_TYPE_RUN = 0,
-       NOTIFICATION_BUTTON_TYPE_VIEW,
-       NOTIFICATION_BUTTON_TYPE_DISMISS,
-       NOTIFICATION_BUTTON_TYPE_MAX,
- }notification_button_type_e;*/
  /**
   * @brief Enumeration for application execution type.
 - * @since_tizen 2.3
 + * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
   */
  typedef enum _notification_execute_type {
        NOTIFICATION_EXECUTE_TYPE_NONE = -1,
@@@ -1,9 -1,9 +1,10 @@@
++%bcond_with wayland
  Name:       notification
  Summary:    notification library
- Version:    0.2.25
+ Version:    0.2.34
  Release:    1
  Group:      TBD
 -License:    Apache
 +License:    Apache-2.0
  Source0:    %{name}-%{version}.tar.gz
  BuildRequires: pkgconfig(sqlite3)
  BuildRequires: pkgconfig(db-util)
@@@ -62,8 -62,7 +63,12 @@@ export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBU
  export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
  %endif
  export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
 -LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
 +LDFLAGS="$LDFLAGS"
- %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
++%if %{with wayland}
++%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DHAVE_WAYLAND=On
++%else
++%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DHAVE_X11=On
++%endif
  make %{?jobs:-j%jobs}
  
  %install
Simple merge
Simple merge
Simple merge
  #include <errno.h>
  #include <vconf.h>
  #include <E_DBus.h>
+ #include <Ecore.h>
+ #include <Elementary.h>
+ #include <Eina.h>
++#include <Evas.h>
  
  #include <notification.h>
  #include <notification_db.h>
@@@ -38,6 -42,9 +43,9 @@@
  #define INTERFACE_NAME "org.tizen.system.notification.status_message"
  #define MEMBER_NAME   "status_message"
  
 -static Eina_List *toast_popup;
+ static Eina_List *toast_list;
++static Evas_Object *toast_popup;
  struct _message_cb_data {
        notification_status_message_cb callback;
        void *data;
  
  static struct _message_cb_data md;
  
 -      elm_win_indicator_type_set(toast_window,ELM_WIN_INDICATOR_TYPE_1);
+ int _post_toast_message(char *message);
+ static void popup_timeout_cb(void *data, Evas_Object *obj, void *event_info)
+ {
+       char *msg = NULL;
+       int count = 0;
+       evas_object_del(toast_popup);
+       toast_popup = NULL;
+       evas_object_del((Evas_Object *)data);
+       count = eina_list_count(toast_list);
+       if (count == 1){
+               msg = (char *)eina_list_data_get(toast_list);
+               free(msg);
+               eina_list_free(toast_list);
+               toast_list = NULL;
+       } else if (count > 1) {
+               msg = (char *)eina_list_data_get(toast_list);
+               toast_list = eina_list_remove(toast_list, msg);
+               free(msg);
+               _post_toast_message((char *)eina_list_data_get(toast_list));
+       }
+ }
+ int _post_toast_message(char *message)
+ {
+       Evas_Object *toast_window;
+       Evas *e;
+       Ecore_Evas *ee;
+       double scale = elm_config_scale_get();
+       toast_window = elm_win_add(NULL, "toast", ELM_WIN_BASIC);
+       elm_win_alpha_set(toast_window, EINA_TRUE);
+       elm_win_title_set(toast_window, "toast");
+       elm_win_indicator_mode_set(toast_window, ELM_WIN_INDICATOR_SHOW);
 -      int let = 0;
++/**
++ * @note
++ * TYPE_1 is deprecated from elementary.
++      elm_win_indicator_type_set(toast_window, ELM_WIN_INDICATOR_TYPE_1);
++*/
+       //elm_win_autodel_set(toast_win, EINA_TRUE);
+       if (elm_win_wm_rotation_supported_get(toast_window)) {
+               int rots[4] = { 0, 90, 180, 270 };
+               elm_win_wm_rotation_available_rotations_set(toast_window, (const int*)(&rots), 4);
+       }
+       e = evas_object_evas_get(toast_window);
+       ee = ecore_evas_ecore_evas_get(e);
+       ecore_evas_name_class_set(ee, "TOAST_POPUP", "SYSTEM_POPUP");
+       evas_object_resize(toast_window, (480 * scale), (650 * scale));
++#if defined(HAVE_X11)
+       ecore_x_window_shape_input_rectangle_set(elm_win_xwindow_get(toast_window), 0, 0, (480 * scale), (650 * scale));
++#endif
+       toast_popup = elm_popup_add(toast_window);
+       elm_object_style_set(toast_popup, "toast");
+       evas_object_size_hint_weight_set(toast_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(toast_popup,message);
+       if (eina_list_count(toast_list) != 1) {
+               elm_popup_timeout_set(toast_popup, 1.0);
+       }
+       else {
+               elm_popup_timeout_set(toast_popup, 3.0);
+       }
+       evas_object_smart_callback_add(toast_popup, "timeout", popup_timeout_cb, (void *)toast_window);
+       elm_win_prop_focus_skip_set(toast_window, EINA_TRUE);
+       evas_object_show(toast_window);
+       evas_object_show(toast_popup);
+       return 0;
+ }
+ int notification_noti_post_toast_message(const char *message)
+ {
 -              let = _post_toast_message(msg);
+       char *msg = NULL;
+       int count = 0;
+       msg = (char *)calloc(strlen(message) + 1, sizeof(char));
+       strcpy(msg, message);
+       count = eina_list_count(toast_list);
+       if (count == 0) {
+               toast_list = eina_list_append(toast_list, msg);
++              (void)_post_toast_message(msg);
+       }
+       else if (count == 1) {
+               if (strcmp(msg, (char *)eina_list_nth(toast_list, count - 1)) == 0) {
+                       elm_popup_timeout_set(toast_popup, 3.0);
+               }
+               else {
+                       toast_list = eina_list_append(toast_list, msg);
+                       elm_popup_timeout_set(toast_popup, 1.0);
+               }
+       }
+       else if (count >= 2) {
+               if (strcmp(msg, (char *)eina_list_nth(toast_list, count - 1)) == 0) {
+                       free(msg);
+                       return 0;
+               }
+               else {
+                       toast_list = eina_list_append(toast_list, msg);
+               }
+       }
+       return 0;
+ }
  static void __notification_status_message_dbus_callback(void *data, DBusMessage *msg)
  {
        int ret = 0;
diff --cc test-app/main.c
index 229219a,95693ab..95693ab
mode 100644,100755..100644