/**
+ * @brief Sets the image height for the extended notification.
+ * @details The image is shown under the notification's text. The application can set the image height.
+ * The image is modified to fit into the height set by this function.
+ * The image can be scaled down and/or cropped.
+ * If @a height is 0, the default value is used. The default height depends on the screen size.
+ * @since_tizen 4.0
+ * @param[in] noti The notification handle
+ * @param[in] height The image height
+ * @return #NOTIFICATION_ERROR_NONE On success,
+ * otherwise a negative error value
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see notification_get_extension_image_size()
+ * @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(noti,
+ NOTIFICATION_TEXT_TYPE_CONTENT_EXTENTION,
+ "message",
+ NULL,
+ NOTIFICATION_VARIABLE_TYPE_NONE);
+ if (noti_err != NOTIFICATION_ERROR_NONE)
+ return;
+
+ noti_err = notification_set_image(noti,
+ NOTIFICATION_IMAGE_TYPE_EXTENTION,
+ image_path);
+ if (noti_err != NOTIFICATION_ERROR_NONE)
+ return;
+
+ noti_err = notification_set_layout(noti, NOTIFICATION_LY_EXTENTION);
+ if (noti_err != NOTIFICATION_ERROR_NONE)
+ return;
+
+ noti_err = notification_set_extension_image_size(noti, 20);
+ if (noti_err != NOTIFICATION_ERROR_NONE)
+ return;
+
+ // Do something
+}
+ * @endcode
+ */
+int notification_set_extension_image_size(notification_h noti, int height);
+
+
+/**
+ * @brief Gets the image height for the extended notification.
+ * @since_tizen 4.0
+ * @param[in] noti The notification handle
+ * @param[out] height The image height
+ * @return #NOTIFICATION_ERROR_NONE On success, otherwise a negative error value
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see notification_set_extension_image_size()
+ * @par Sample code:
+ * @code
+#include <notification.h>
+
+{
+ int noti_err = NOTIFICATION_ERROR_NONE;
+ int height;
+
+ // Do something
+
+ noti_err = notification_get_extension_image_size(noti, &height);
+ if (noti_err != NOTIFICATION_ERROR_NONE)
+ return;
+}
+ * @endcode
+ */
+int notification_get_extension_image_size(notification_h noti, int *height);
+
+/**
* @}
*/
*/
typedef enum _notification_ly_type {
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_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.
* notifications with NOTIFICATION_LY_ONGOING_EVENT can not be protected from
* removing by user since tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */
- NOTIFICATION_LY_ONGOING_PROGRESS, /**< Layout for ongoing notification. Used to display progress*/
+ NOTIFICATION_LY_ONGOING_PROGRESS, /**< Layout for ongoing notification. Used to display progress */
+ NOTIFICATION_LY_EXTENSION, /**< Layout for extended notification (Since 4.0) */
NOTIFICATION_LY_MAX, /**< TBD */
} notification_ly_type_e;
NOTIFICATION_TEXT_TYPE_BUTTON_6, /**< Text on button 6 */
NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER, /**< Guide text on the message reply box(Since 3.0) */
NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON, /**< Text on button the on message reply box(Since 3.0) */
+ NOTIFICATION_TEXT_TYPE_CONTENT_EXTENSION, /**< Content for extended notification (Since 4.0) */
NOTIFICATION_TEXT_TYPE_MAX,
} notification_text_type_e;
NOTIFICATION_IMAGE_TYPE_BUTTON_5, /**< Image for button 5 */
NOTIFICATION_IMAGE_TYPE_BUTTON_6, /**< Image for button 6 */
NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON, /**< Image for message reply(Since 3.0) */
+ NOTIFICATION_IMAGE_TYPE_EXTENSION, /**< Image for extended notification (Since 4.0) */
NOTIFICATION_IMAGE_TYPE_MAX,
} notification_image_type_e;
"progress_size, progress_percentage, "
"ongoing_flag, ongoing_value_type, ongoing_current, ongoing_duration, "
"auto_remove, default_button_index, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid) values ("
+ "text_input_max_length, event_flag, extension_image_size, uid) values ("
"%d, "
"%d, "
"'%s', '%s', "
"%d, %d, %d, "
"$progress_size, $progress_percentage, "
"%d, %d, %d, %d, %d,"
- "%d, %d, %d, %d, %d, %d)",
+ "%d, %d, %d, %d, %d, %d, %d)",
noti->type,
noti->layout,
NOTIFICATION_CHECK_STR(noti->caller_pkgname),
noti->delete_timeout,
noti->text_input_max_length,
noti->event_flag,
+ noti->extension_image_size,
noti->uid);
/* Free decoded data */
"progress_size = $progress_size, progress_percentage = $progress_percentage, "
"ongoing_flag = %d, ongoing_value_type = %d, ongoing_current = %d, ongoing_duration = %d, "
"auto_remove = %d, default_button_index = %d, hide_timeout = %d, "
- "delete_timeout = %d, text_input_max_length = %d, event_flag = %d "
+ "delete_timeout = %d, text_input_max_length = %d, event_flag = %d, extension_image_size = %d "
"where priv_id = %d ",
noti->type,
noti->layout,
noti->ongoing_current, noti->ongoing_duration,
noti->auto_remove, noti->default_button_index, noti->hide_timeout,
noti->delete_timeout, noti->text_input_max_length, noti->event_flag,
- noti->priv_id);
+ noti->extension_image_size, noti->priv_id);
/* Free decoded data */
if (args)
noti->delete_timeout = sqlite3_column_int(stmt, col++);
noti->text_input_max_length = sqlite3_column_int(stmt, col++);
noti->event_flag = sqlite3_column_int(stmt, col++);
+ noti->extension_image_size = sqlite3_column_int(stmt, col++);
noti->uid = sqlite3_column_int(stmt, col++);
noti->app_icon_path = NULL;
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
"ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "text_input_max_length, event_flag, extension_image_size, uid "
"from noti_list ";
if (pkgname != NULL && strlen(pkgname) != 0)
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
"ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "text_input_max_length, event_flag, extension_image_size, uid "
"from noti_list where caller_pkgname = ? and tag = ? and uid = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
"ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "text_input_max_length, event_flag, extension_image_size, uid "
"from noti_list where tag = ? and uid = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
"ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "text_input_max_length, event_flag, extension_image_size, uid "
"from noti_list where 1 > 0 ");
if (status == VCONFKEY_TELEPHONY_SIM_INSERTED) {
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
"ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "text_input_max_length, event_flag, extension_image_size, uid "
"from noti_list ");
if (priv_id == NOTIFICATION_PRIV_ID_NONE && group_id == NOTIFICATION_GROUP_ID_NONE) {
"flags_for_property, flag_simmode, display_applist, progress_size, progress_percentage, "
"ongoing_flag, ongoing_value_type, ongoing_current, ongoing_duration, "
"auto_remove, default_button_index, hide_timeout, delete_timeout, text_input_max_length, "
- "event_flag, uid, template_name) values ("
+ "event_flag, extension_image_size, uid, template_name) values ("
"%d, "
"%d, "
"'%s', '%s', "
"%d, %d, %d, $progress_size, $progress_percentage, "
"%d, %d, %d, %d, "
"%d, %d, %d, %d, %d, "
- "%d, %d, '%s')",
+ "%d, %d, %d, '%s')",
noti->type,
noti->layout,
NOTIFICATION_CHECK_STR(noti->caller_pkgname),
noti->delete_timeout,
noti->text_input_max_length,
noti->event_flag,
+ noti->extension_image_size,
noti->uid,
template_name);
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
"ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "text_input_max_length, event_flag, extension_image_size, uid "
"from noti_template where caller_pkgname = ? and template_name = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));