int *led_argb);
/**
+ * @brief This function set time period of flashing LED
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[in] on_ms time for turning on the LED
+ * @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
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_set_led_time_period(noti, 100, 100);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_set_led_time_period(notification_h noti,
+ int on_ms, int off_ms);
+
+/**
+ * @brief This function get time period of flashing LED
+ * @details
+ * @remarks
+ * @param[in] noti notification handle
+ * @param[out] on_ms time for turning on the LED
+ * @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
+ * @pre
+ * @post
+ * @see
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+ {
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ int led_on_ms = 0;
+ int led_off_ms = 0;
+
+ noti_err = notification_get_led_time_period(noti, &led_on_ms, &led_off_ms);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+notification_error_e notification_get_led_time_period(notification_h noti,
+ int *on_ms, int *off_ms);
+
+/**
* @brief This function will be deprecated.
* @see notification_set_execute_option()
*
return NOTIFICATION_ERROR_NONE;
}
+EXPORT_API notification_error_e notification_set_led_time_period(notification_h noti,
+ int on_ms, int off_ms)
+{
+ /* Check noti is valid data */
+ if (noti == NULL) {
+ return NOTIFICATION_ERROR_INVALID_DATA;
+ }
+
+ /* Save led operation */
+ noti->led_on_ms = on_ms;
+ noti->led_off_ms = off_ms;
+
+ return NOTIFICATION_ERROR_NONE;
+}
+
+EXPORT_API notification_error_e notification_get_led_time_period(notification_h noti,
+ int *on_ms, int *off_ms)
+{
+ /* check noti and operation is valid data */
+ if (noti == NULL) {
+ return NOTIFICATION_ERROR_INVALID_DATA;
+ }
+
+ /* Check noti is valid data */
+ if (noti == NULL) {
+ return NOTIFICATION_ERROR_INVALID_DATA;
+ }
+
+ if (on_ms)
+ *(on_ms) = noti->led_on_ms;
+ if (off_ms)
+ *(off_ms) = noti->led_off_ms;
+
+ return NOTIFICATION_ERROR_NONE;
+}
+
EXPORT_API notification_error_e notification_set_application(notification_h noti,
const char *pkgname)
{
}
new_noti->led_operation = noti->led_operation;
new_noti->led_argb = noti->led_argb;
+ new_noti->led_on_ms = noti->led_on_ms;
+ new_noti->led_off_ms = noti->led_off_ms;
if(noti->domain != NULL) {
new_noti->domain = strdup(noti->domain);
"args, group_args, "
"b_execute_option, "
"b_service_responding, b_service_single_launch, b_service_multi_launch, "
- "sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb,"
+ "sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, flag_simmode, display_applist, "
"progress_size, progress_percentage) values ("
"%d, "
"'%s', '%s', "
"'%s', "
"'%s', '%s', '%s', "
- "%d, '%s', %d, '%s', %d, %d,"
+ "%d, '%s', %d, '%s', %d, %d, %d, %d,"
"%d, %d, %d, "
"$progress_size, $progress_percentage)",
noti->type,
NOTIFICATION_CHECK_STR(noti->vibration_path),
noti->led_operation,
noti->led_argb,
+ noti->led_on_ms,
+ noti->led_off_ms,
noti->flags_for_property, flag_simmode, noti->display_applist);
/* Free decoded data */
"sound_type = %d, sound_path = '%s', "
"vibration_type = %d, vibration_path = '%s', "
"led_operation = %d, led_argb = %d, "
+ "led_on_ms = %d, led_off_ms = %d, "
"flags_for_property = %d, flag_simmode = %d, "
"display_applist = %d, "
"progress_size = $progress_size, progress_percentage = $progress_percentage "
NOTIFICATION_CHECK_STR(noti->vibration_path),
noti->led_operation,
noti->led_argb,
+ noti->led_on_ms,
+ noti->led_off_ms,
noti->flags_for_property, flag_simmode, noti->display_applist,
noti->priv_id);
noti->vibration_path = notification_db_column_text(stmt, col++);
noti->led_operation = sqlite3_column_int(stmt, col++);
noti->led_argb = sqlite3_column_int(stmt, col++);
+ noti->led_on_ms = sqlite3_column_int(stmt, col++);
+ noti->led_off_ms = sqlite3_column_int(stmt, col++);
noti->flags_for_property = sqlite3_column_int(stmt, col++);
noti->display_applist = sqlite3_column_int(stmt, col++);
"b_text, b_key, b_format_args, num_format_args, "
"text_domain, text_dir, time, insert_time, args, group_args, "
"b_execute_option, b_service_responding, b_service_single_launch, b_service_multi_launch, "
- "sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb,"
+ "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 "
"from noti_list ";
"b_text, b_key, b_format_args, num_format_args, "
"text_domain, text_dir, time, insert_time, args, group_args, "
"b_execute_option, b_service_responding, b_service_single_launch, b_service_multi_launch, "
- "sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb,"
+ "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 "
"from noti_list ");
"b_text, b_key, b_format_args, num_format_args, "
"text_domain, text_dir, time, insert_time, args, group_args, "
"b_execute_option, b_service_responding, b_service_single_launch, b_service_multi_launch, "
- "sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb,"
+ "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 "
"from noti_list ");