4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef __NOTIFICATION_H__
23 #define __NOTIFICATION_H__
28 #include <notification_error.h>
29 #include <notification_type.h>
30 #include <notification_list.h>
31 #include <notification_status.h>
38 * @file notification.h
39 * @brief This file contains the notification API.
43 * @addtogroup NOTIFICATION_MODULE
48 * @brief Sets an absolute path for an image file to display on the notification view.
49 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
50 * @param[in] noti The notification handle
51 * @param[in] type The notification image type
52 * @param[in] image_path The image file full path
53 * @return #NOTIFICATION_ERROR_NONE on success,
54 * otherwise any other value on failure
55 * @retval #NOTIFICATION_ERROR_NONE Success
56 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
57 * @pre Notification handle should be created by notification_create().
58 * @see #notification_image_type_e
59 * @see notification_create()
62 #include <notification.h>
65 notification_h noti = NULL;
66 int noti_err = NOTIFICATION_ERROR_NONE;
68 noti = notification_create(NOTIFICATION_TYPE_NOTI);
73 noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH);
74 if(noti_err != NOTIFICATION_ERROR_NONE) {
75 notification_free(noti);
81 int notification_set_image(notification_h noti,
82 notification_image_type_e type,
83 const char *image_path);
86 * @brief Gets the absolute path of an image file.
87 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
88 * @remarks Do not free @a image_path. It will be freed when notification_free() is called.
89 * @param[in] noti Notification handle
90 * @param[in] type Notification image type
91 * @param[out] image_path image file full path
92 * @return NOTIFICATION_ERROR_NONE on success, other value on failure
93 * @retval NOTIFICATION_ERROR_NONE Success
94 * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
95 * @pre Notification handle should be created by notification_create().
96 * @see #notification_image_type_e
97 * @see notification_create()
100 #include <notification.h>
103 char *image_path = NULL;
104 int noti_err = NOTIFICATION_ERROR_NONE;
106 noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
107 if(noti_err != NOTIFICATION_ERROR_NONE) {
113 int notification_get_image(notification_h noti,
114 notification_image_type_e type,
118 * @brief Sets a timestamp.
119 * @details If input_time is @c 0, time information is taken from the current time.
120 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
121 * @param[in] noti The notification handle
122 * @param[in] input_time The input time
123 * @return #NOTIFICATION_ERROR_NONE on success,
124 * otherwise any other value on failure
125 * @retval #NOTIFICATION_ERROR_NONE Success
126 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
127 * @pre Notification handle should be created by notification_create().
128 * @see notification_create()
131 #include <notification.h>
134 notification_h noti = NULL;
135 int noti_err = NOTIFICATION_ERROR_NONE;
137 noti = notification_create(NOTIFICATION_TYPE_NOTI);
142 noti_err = notification_set_time(noti, time(NULL));
143 if(noti_err != NOTIFICATION_ERROR_NONE) {
144 notification_free(noti);
150 int notification_set_time(notification_h noti,
154 * @brief Gets a timestamp.
155 * @details If ret_time is @c 0, time information is not set before.
156 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
157 * @param[in] noti The notification handle
158 * @param[out] ret_time The return time value
159 * @return #NOTIFICATION_ERROR_NONE on success,
160 * otherwise any other value on failure
161 * @retval #NOTIFICATION_ERROR_NONE Success
162 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
163 * @pre Notification handle should be created by notification_create().
164 * @see notification_create()
167 #include <notification.h>
171 int noti_err = NOTIFICATION_ERROR_NONE;
173 noti_err = notification_get_time(noti, &ret_time);
174 if(noti_err != NOTIFICATION_ERROR_NONE) {
180 int notification_get_time(notification_h noti,
184 * @brief Gets an insertion timestamp of the notification.
185 * @details If ret_time is @c 0, this notification data is not inserted before.
186 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
187 * @param[in] noti The notification handle
188 * @param[out] ret_time The return time value
189 * @return #NOTIFICATION_ERROR_NONE on success,
190 * otherwise any other value on failure
191 * @retval #NOTIFICATION_ERROR_NONE Success
192 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
195 #include <notification.h>
199 int noti_err = NOTIFICATION_ERROR_NONE;
201 noti_err = notification_get_insert_time(noti, &ret_time);
202 if(noti_err != NOTIFICATION_ERROR_NONE) {
208 int notification_get_insert_time(notification_h noti,
212 * @brief Sets the text to display on the notification view.
213 * @details Sets title, content string. If the text is formatted data (only %d, %f, %s are supported), type - value pair should be set.
214 * If %d, the type #NOTIFICATION_VARIABLE_TYPE_INT and the value is an integer.
215 * If %f, the type #NOTIFICATION_VARIABLE_TYPE_DOUBLE and the value is a double.
216 * If %s, the type #NOTIFICATION_VARIABLE_TYPE_STRING and the value is a string.
217 * If the type is #NOTIFICATION_VARIABLE_TYPE_COUNT, notification count is displaying with text.
218 * If the value is #NOTIFICATION_COUNT_POS_LEFT, count is displayed at the left of the text.
219 * If the value is #NOTIFICATION_COUNT_POS_IN, count is displayed in the text when text has %d format.
220 * If the value is #NOTIFICATION_COUNT_POS_RIGHT, count is displayed at the right of the text.
221 * Variable parameters should be terminated #NOTIFICATION_VARIABLE_TYPE_NONE.
222 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
223 * @param[in] noti The notification handle
224 * @param[in] type The notification text type
225 * @param[in] text The basic text
226 * @param[in] key The text key for localization
227 * @param[in] args_type The variable parameter that type - value pair
228 * @return #NOTIFICATION_ERROR_NONE on success,
229 * otherwise any other value on failure
230 * @retval #NOTIFICATION_ERROR_NONE Success
231 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
232 * @pre notification handle should be created by notification_create().
235 #include <notification.h>
238 notification_h noti = NULL;
239 int noti_err = NOTIFICATION_ERROR_NONE;
241 noti = notification_create(NOTIFICATION_TYPE_NOTI);
246 noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, "I'm Title", "IDS_APP_BODY_IM_TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
247 if(noti_err != NOTIFICATION_ERROR_NONE) {
248 notification_free(noti);
254 int notification_set_text(notification_h noti,
255 notification_text_type_e type,
261 * @brief Gets the text from the notification handle.
262 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
263 * @param[in] noti The notification handle
264 * @param[in] type The notification text type
265 * @param[out] text The notification text
266 * @return #NOTIFICATION_ERROR_NONE on success,
267 * otherwise any other value on failure
268 * @retval #NOTIFICATION_ERROR_NONE Success
269 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
272 #include <notification.h>
275 notification_h noti = NULL;
276 int noti_err = NOTIFICATION_ERROR_NONE;
279 noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
280 if(noti_err != NOTIFICATION_ERROR_NONE) {
286 int notification_get_text(notification_h noti,
287 notification_text_type_e type,
291 * @brief Sets the timestamp to display on the notification view.
292 * @details The timestamp will be converted to a formatted string and it will be displayed on the set text area.
293 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
294 * @param[in] noti The notification handle
295 * @param[in] type The notification text type
296 * @param[in] time The timestamp
297 * @return #NOTIFICATION_ERROR_NONE on success,
298 * otherwise any other value on failure
299 * @retval #NOTIFICATION_ERROR_NONE Success
300 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
301 * @pre Notification handle should be created by notification_create().
303 int notification_set_time_to_text(notification_h noti, notification_text_type_e type,
307 * @brief Gets the timestamp from the notification handle.
308 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
309 * @param[in] noti The notification handle
310 * @param[in] type The notification text type
311 * @param[in] time The pointer of time stamp
312 * @return #NOTIFICATION_ERROR_NONE on success,
313 * otherwise any other value on failure
314 * @retval #NOTIFICATION_ERROR_NONE Success
315 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
316 * @pre Notification handle should be created by notification_create().
318 int notification_get_time_from_text(notification_h noti, notification_text_type_e type,
323 * @brief Sets the text domain to localize the notification.
324 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
325 * @param[in] noti The notification handle
326 * @param[in] domain The text domain
327 * @param[in] dir The text dir
328 * @return #NOTIFICATION_ERROR_NONE on success,
329 * otherwise any other value on failure
330 * @retval #NOTIFICATION_ERROR_NONE Success
331 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
334 #include <notification.h>
337 notification_h noti = NULL;
338 int noti_err = NOTIFICATION_ERROR_NONE;
340 noti = notification_create(NOTIFICATION_TYPE_NOTI);
345 noti_err = notification_set_text_domain(noti, PACKAGE, LOCALEDIR);
346 if(noti_err != NOTIFICATION_ERROR_NONE) {
347 notification_free(noti);
353 int notification_set_text_domain(notification_h noti,
359 * @brief Gets the text domain from the notification handle.
360 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
361 * @remarks Do not free returned domain and dir. They are freed when notification_free() or notification_free_list() is called.
362 * @param[in] noti The notification handle
363 * @param[out] domain The domain
364 * @param[out] dir The locale dir
365 * @return #NOTIFICATION_ERROR_NONE on success,
366 * otherwise any other value on failure
367 * @retval #NOTIFICATION_ERROR_NONE Success
368 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
371 #include <notification.h>
374 notification_h noti = NULL;
375 int noti_err = NOTIFICATION_ERROR_NONE;
379 noti_err = notification_get_text_domain(noti, &domain, &dir);
380 if(noti_err != NOTIFICATION_ERROR_NONE) {
386 int notification_get_text_domain(notification_h noti,
391 * @brief Sets the sound type for the notification.
392 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
393 * @param[in] noti The notification handle
394 * @param[in] type The notification sound type
395 * @param[in] path The user sound file path
396 * @return #NOTIFICATION_ERROR_NONE on success,
397 * otherwise any other value on failure
398 * @retval #NOTIFICATION_ERROR_NONE Success
399 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
402 #include <notification.h>
405 notification_h noti = NULL;
406 int noti_err = NOTIFICATION_ERROR_NONE;
408 noti_err = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL);
409 if(noti_err != NOTIFICATION_ERROR_NONE) {
415 int notification_set_sound(notification_h noti,
416 notification_sound_type_e type,
420 * @brief Gets the sound type from the notification handle.
421 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
422 * @param[in] noti The notification handle
423 * @param[out] type The notification sound type
424 * @param[out] path The user sound file path
425 * @return #NOTIFICATION_ERROR_NONE on success,
426 * otherwise any other value on failure
427 * @retval #NOTIFICATION_ERROR_NONE Success
428 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
431 #include <notification.h>
434 notification_h noti = NULL;
435 int noti_err = NOTIFICATION_ERROR_NONE;
436 notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE;
438 noti_err = notification_get_sound(noti, &type, NULL);
439 if(noti_err != NOTIFICATION_ERROR_NONE) {
445 int notification_get_sound(notification_h noti,
446 notification_sound_type_e *type,
450 * @brief Sets the vibration type for the notification.
451 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
452 * @param[in] noti The notification handle
453 * @param[in] type The notification vibration type
454 * @param[in] path The user vibration file path
455 * @return #NOTIFICATION_ERROR_NONE on success,
456 * otherwise any other value on failure
457 * @retval #NOTIFICATION_ERROR_NONE Success
458 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
461 #include <notification.h>
464 notification_h noti = NULL;
465 int noti_err = NOTIFICATION_ERROR_NONE;
467 noti_err = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL);
468 if(noti_err != NOTIFICATION_ERROR_NONE) {
474 int notification_set_vibration(notification_h noti,
475 notification_vibration_type_e type,
479 * @brief Gets the vibrate type from the notification handle.
480 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
481 * @param[in] noti The notification handle
482 * @param[out] type The notification sound type
483 * @param[out] path The user vibration file path
484 * @return #NOTIFICATION_ERROR_NONE on success,
485 * otherwise other value on failure
486 * @retval #NOTIFICATION_ERROR_NONE Success
487 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
490 #include <notification.h>
493 notification_h noti = NULL;
494 int noti_err = NOTIFICATION_ERROR_NONE;
495 notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE;
497 noti_err = notification_get_vibration(noti, &type, NULL);
498 if(noti_err != NOTIFICATION_ERROR_NONE) {
504 int notification_get_vibration(notification_h noti,
505 notification_vibration_type_e *type,
509 * @brief Sets the LED displaying option.
510 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
511 * @param[in] noti The notification handle
512 * @param[in] operation The LED notification operation
513 * @param[in] led_argb The notification led color
514 * @return #NOTIFICATION_ERROR_NONE on success,
515 * otherwise other value on failure
516 * @retval #NOTIFICATION_ERROR_NONE Success
517 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
520 #include <notification.h>
523 notification_h noti = NULL;
524 int noti_err = NOTIFICATION_ERROR_NONE;
526 noti_err = notification_set_led(noti, NOTIFICATION_LED_TYPE_DEFAULT, NULL);
527 if(noti_err != NOTIFICATION_ERROR_NONE) {
533 int notification_set_led(notification_h noti,
534 notification_led_op_e operation,
538 * @brief Gets the LED displaying option from the notification handle.
539 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
540 * @param[in] noti The notification handle
541 * @param[out] operation The LED notification operation
542 * @param[out] led_argb The notification LED color
543 * @return #NOTIFICATION_ERROR_NONE on success,
544 * otherwise any other value on failure
545 * @retval #NOTIFICATION_ERROR_NONE Success
546 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
549 #include <notification.h>
552 notification_h noti = NULL;
553 int noti_err = NOTIFICATION_ERROR_NONE;
554 notification_led_type_e type = NOTIFICATION_LED_TYPE_NONE;
556 noti_err = notification_get_led(noti, &type, NULL);
557 if(noti_err != NOTIFICATION_ERROR_NONE) {
563 int notification_get_led(notification_h noti,
564 notification_led_op_e *operation,
568 * @brief Sets the time period of flashing the LED.
569 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
570 * @param[in] noti The notification handle
571 * @param[in] on_ms The time for turning on the LED
572 * @param[in] off_ms The time for turning off the LED
573 * @return #NOTIFICATION_ERROR_NONE on success,
574 * otherwise any other value on failure
575 * @retval #NOTIFICATION_ERROR_NONE Success
576 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
579 #include <notification.h>
582 notification_h noti = NULL;
583 int noti_err = NOTIFICATION_ERROR_NONE;
585 noti_err = notification_set_led_time_period(noti, 100, 100);
586 if(noti_err != NOTIFICATION_ERROR_NONE) {
592 int notification_set_led_time_period(notification_h noti,
593 int on_ms, int off_ms);
596 * @brief Gets the time period of flashing the LED from the notification handle.
597 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
598 * @param[in] noti The notification handle
599 * @param[out] on_ms The time for turning on the LED
600 * @param[out] off_ms The time for turning on the LED
601 * @return #NOTIFICATION_ERROR_NONE on success,
602 * otherwise any other value on failure
603 * @retval #NOTIFICATION_ERROR_NONE Success
604 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
607 #include <notification.h>
610 notification_h noti = NULL;
611 int noti_err = NOTIFICATION_ERROR_NONE;
615 noti_err = notification_get_led_time_period(noti, &led_on_ms, &led_off_ms);
616 if(noti_err != NOTIFICATION_ERROR_NONE) {
622 int notification_get_led_time_period(notification_h noti,
623 int *on_ms, int *off_ms);
626 * @brief Sets the launch option for a notification.
627 * @details When notification data selected in display application, application launched by app_control_send_launch_request with app_control handle.
628 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
629 * @param[in] noti The notification handle
630 * @param[in] type Launching option type
631 * @param[in] option App Control handler
632 * @return #NOTIFICATION_ERROR_NONE on success,
633 * otherwise any other value on failure
634 * @retval #NOTIFICATION_ERROR_NONE Success
635 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
638 #include <notification.h>
641 notification_h noti = NULL;
642 app_control_h app_control = NULL;
643 int noti_err = NOTIFICATION_ERROR_NONE;
647 app_control_create(&app_control);
648 app_control_set_app_id(app_control, "org.tizen.app");
652 noti_err = notification_set_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)app_control);
653 if(noti_err != NOTIFICATION_ERROR_NONE) {
654 notification_free(noti);
658 app_control_destroy(app_control);
662 int notification_set_launch_option(notification_h noti,
663 notification_launch_option_type type, void *option);
666 * @brief Gets the launch option from the notification handle.
667 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
668 * @remarks You must release @a app_control using app_control_destroy().
669 * @param[in] noti The notification handle
670 * @param[in] type Launching option type
671 * @param[out] option The pointer of App Control handler
672 * @return #NOTIFICATION_ERROR_NONE on success,
673 * otherwise any other value on failure
674 * @retval #NOTIFICATION_ERROR_NONE Success
675 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
678 #include <notification.h>
681 app_control_h app_control = NULL;
682 app_control_create(&app_control);
686 noti_err = notification_get_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&app_control);
687 if(noti_err != NOTIFICATION_ERROR_NONE) {
688 notification_free(noti);
694 int notification_get_launch_option(notification_h noti,
695 notification_launch_option_type type, void *option);
698 * @brief Sets the property of the notification.
699 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
700 * @param[in] noti The notification handle
701 * @param[in] flags The property with | operation
702 * @return #NOTIFICATION_ERROR_NONE on success,
703 * otherwise any other value on failure
704 * @retval #NOTIFICATION_ERROR_NONE Success
705 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
708 #include <notification.h>
711 notification_h noti = NULL;
712 int noti_err = NOTIFICATION_ERROR_NONE;
715 noti = notification_create(NOTIFICATION_TYPE_NOTI);
720 noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
721 if(noti_err != NOTIFICATION_ERROR_NONE) {
722 notification_free(noti);
728 int notification_set_property(notification_h noti,
732 * @brief Gets the property of the notification from the notification handle.
733 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
734 * @param[in] noti The notification handle
735 * @param[out] flags The notification property
736 * @return #NOTIFICATION_ERROR_NONE on success,
737 * otherwise any other value on failure
738 * @retval #NOTIFICATION_ERROR_NONE Success
739 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
742 #include <notification.h>
745 notification_h noti = NULL;
746 int noti_err = NOTIFICATION_ERROR_NONE;
749 noti_err = notification_get_property(noti, &flags);
750 if(noti_err != NOTIFICATION_ERROR_NONE) {
756 int notification_get_property(notification_h noti,
760 * @brief Sets applications to display the notification.
761 * @details All display application is enable(NOTIFICATION_DISPLAY_APP_ALL) if you are not call this API.
762 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
763 * @param[in] noti The notification handle
764 * @param[in] applist The with | operation
765 * @return #NOTIFICATION_ERROR_NONE on success,
766 * otherwise any other value on failure
767 * @retval #NOTIFICATION_ERROR_NONE Success
768 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
771 #include <notification.h>
774 notification_h noti = NULL;
775 int noti_err = NOTIFICATION_ERROR_NONE;
778 noti = notification_create(NOTIFICATION_TYPE_NOTI);
783 noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
784 if(noti_err != NOTIFICATION_ERROR_NONE) {
785 notification_free(noti);
792 int notification_set_display_applist(notification_h noti,
796 * @brief Gets the application list displaying the notification from the notification handle.
797 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
798 * @param[in] noti The notification handle
799 * @param[out] applist The display application list
800 * @return #NOTIFICATION_ERROR_NONE on success,
801 * otherwise any other value on failure
802 * @retval #NOTIFICATION_ERROR_NONE Success
803 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
806 #include <notification.h>
809 notification_h noti = NULL;
810 int noti_err = NOTIFICATION_ERROR_NONE;
813 noti_err = notification_get_display_applist(noti, &applist);
814 if(noti_err != NOTIFICATION_ERROR_NONE) {
820 int notification_get_display_applist(notification_h noti,
824 * @brief Sets the initial size for the ongoing type.
825 * @details After notification_post() call, the size is not updated.
826 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
827 * @param[in] noti The notification handle
828 * @param[in] size The double type size
829 * @return #NOTIFICATION_ERROR_NONE on success,
830 * otherwise any other value on failure
831 * @retval #NOTIFICATION_ERROR_NONE Success
832 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
835 #include <notification.h>
838 notification_h noti = NULL;
839 int noti_err = NOTIFICATION_ERROR_NONE;
841 noti = notification_create(NOTIFICATION_TYPE_NOTI);
846 noti_err = notification_set_size(noti, 0.0);
847 if(noti_err != NOTIFICATION_ERROR_NONE) {
848 notification_free(noti);
854 int notification_set_size(notification_h noti,
858 * @brief Gets the progress size.
859 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
860 * @param[in] noti The notification handle
861 * @param[out] size The progress size
862 * @return #NOTIFICATION_ERROR_NONE on success,
863 * otherwise any other value on failure
864 * @retval #NOTIFICATION_ERROR_NONE Success
865 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
868 #include <notification.h>
871 notification_h noti = NULL;
872 int noti_err = NOTIFICATION_ERROR_NONE;
875 noti_err = notification_get_size(noti, &size);
876 if(noti_err != NOTIFICATION_ERROR_NONE) {
882 int notification_get_size(notification_h noti,
886 * @brief Sets the initial progress for the ongoing type.
887 * @details After the notification_post() call, the progress is not updated.
888 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
889 * @param[in] noti The notification handle
890 * @param[in] percentage The progress percentage
891 * @return #NOTIFICATION_ERROR_NONE on success,
892 * otherwise any other value on failure
893 * @retval #NOTIFICATION_ERROR_NONE Success
894 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
897 #include <notification.h>
900 notification_h noti = NULL;
901 int noti_err = NOTIFICATION_ERROR_NONE;
903 noti = notification_create(NOTIFICATION_TYPE_NOTI);
908 noti_err = notification_set_progress(noti, 0.0);
909 if(noti_err != NOTIFICATION_ERROR_NONE) {
910 notification_free(noti);
916 int notification_set_progress(notification_h noti,
920 * @brief Gets the progress from the notification handle.
921 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
922 * @remarks At the end of the operation, the progress should be @c 1.0.
923 * @param[in] noti The notification handle
924 * @param[out] percentage The progress percentage
925 * @return #NOTIFICATION_ERROR_NONE on success,
926 * otherwise any other value on failure
927 * @retval #NOTIFICATION_ERROR_NONE Success
928 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
931 #include <notification.h>
934 notification_h noti = NULL;
935 int noti_err = NOTIFICATION_ERROR_NONE;
936 double percentage = 0.0;
938 noti_err = notification_get_progress(noti, &percentage);
939 if(noti_err != NOTIFICATION_ERROR_NONE) {
945 int notification_get_progress(notification_h noti,
949 * @brief Sets the layout of the notification view.
950 * @details Caller can set displaying layout of notification.
951 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
952 * @param[in] noti The notification handle
953 * @param[in] layout The type of layout
954 * @return #NOTIFICATION_ERROR_NONE on success,
955 * otherwise any other value on failure
956 * @retval #NOTIFICATION_ERROR_NONE Success
957 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
958 * @see #notification_ly_type_e
960 int notification_set_layout(notification_h noti,
961 notification_ly_type_e layout);
964 * @brief Gets the layout of the notification view from the notification handle.
965 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
966 * @param[in] noti The notification handle
967 * @param[out] layout The type of layout
968 * @return #NOTIFICATION_ERROR_NONE on success,
969 * otherwise any other value on failure
970 * @retval #NOTIFICATION_ERROR_NONE Success
971 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
972 * @see #notification_ly_type_e
974 int notification_get_layout(notification_h noti,
975 notification_ly_type_e *layout);
978 * @brief Gets the type of a notification.
979 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
980 * @param[in] noti The notification handle
981 * @param[out] type The notification type
982 * @return #NOTIFICATION_ERROR_NONE on success,
983 * otherwise any other value on failure
984 * @retval #NOTIFICATION_ERROR_NONE Success
985 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
988 #include <notification.h>
991 int noti_err = NOTIFICATION_ERROR_NONE;
992 notification_type_e type;
994 noti_err = notification_get_type(noti, &type);
995 if(noti_err != NOTIFICATION_ERROR_NONE) {
1001 int notification_get_type(notification_h noti,
1002 notification_type_e * type);
1006 * @brief Inserts a notification.
1007 * @details The notification will be inserted to the database and then it will appear in the notification area.
1008 * When notification_create() is called, if priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id returns the internally set priv_id.
1009 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1011 * @privilege %http://tizen.org/privilege/notification
1012 * @param[in] noti The notification handle
1013 * @param[out] priv_id The private ID
1014 * @return #NOTIFICATION_ERROR_NONE on success,
1015 * otherwise any other value on failure
1016 * @retval #NOTIFICATION_ERROR_NONE Success
1017 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1018 * @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1019 * @pre Notification handle should be created by notification_create().
1020 * @post notification_free().
1023 #include <notification.h>
1026 int noti_err = NOTIFICATION_ERROR_NONE;
1028 noti_err = notification_insert(noti, NULL);
1029 if(noti_err != NOTIFICATION_ERROR_NONE) {
1035 int notification_insert(notification_h noti,
1039 * @brief Updates notification data.
1040 * @details The updated notification will appear in the notification area.
1041 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1043 * @privilege %http://tizen.org/privilege/notification
1044 * @param[in] noti The notification handle that is created by notification_create()
1045 * @return #NOTIFICATION_ERROR_NONE on success,
1046 * otherwise any other value on failure
1047 * @retval #NOTIFICATION_ERROR_NONE Success
1048 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
1049 * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist
1050 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1053 #include <notification.h>
1056 int noti_err = NOTIFICATION_ERROR_NONE;
1058 noti_err = notification_update(NULL);
1059 if(noti_err != NOTIFICATION_ERROR_NONE) {
1065 int notification_update(notification_h noti);
1069 * @brief Updates a notification, asynchronously.
1070 * @details The updated notification will appear in the notification area.
1071 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1073 * @privilege %http://tizen.org/privilege/notification
1074 * @remarks This function updates the notification asynchronously.
1075 * @param[in] noti The notification handle that is created by notification_create()
1076 * @param[in] result_cb The callback called when an update completed
1077 * @param[in] user_data The user data which you want to use in callback
1078 * @return #NOTIFICATION_ERROR_NONE on success,
1079 * otherwise any other value on failure
1080 * @retval #NOTIFICATION_ERROR_NONE Success
1081 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
1082 * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist
1083 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1086 #include <notification.h>
1089 int noti_err = NOTIFICATION_ERROR_NONE;
1091 noti_err = notification_update_async(NULL, result_cb, data);
1092 if(noti_err != NOTIFICATION_ERROR_NONE) {
1098 int notification_update_async(notification_h noti,
1099 void (*result_cb)(int priv_id, int result, void *data), void *user_data);
1102 * @brief Deletes a notification with the given handle.
1103 * @details notification_delete() removes notification data from database and notification_free() releases memory of notification data.
1104 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1106 * @privilege %http://tizen.org/privilege/notification
1107 * @param[in] noti The notification handle
1108 * @return #NOTIFICATION_ERROR_NONE on success,
1109 * otherwise any other value on failure
1110 * @retval #NOTIFICATION_ERROR_NONE Success
1111 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
1112 * @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1115 #include <notification.h>
1118 notificaton_h noti = NULL;
1119 int noti_err = NOTIFICATION_ERROR_NONE;
1123 noti_err = notification_delete(noti);
1124 if(noti_err != NOTIFICATION_ERROR_NONE) {
1131 int notification_delete(notification_h noti);
1134 * @brief Creates internal structure data and returns a notification handle.
1135 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1136 * #NOTIFICATION_TYPE_NOTI is remaining notification data even if device is restarted.
1137 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1138 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1139 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1140 * @param[in] type The notification type
1141 * @return Notification handle(notification_h) on success,
1142 * otherwise @c NULL on failure
1143 * @retval notification_h Success
1144 * @retval NULL Failure
1145 * @exception #NOTIFICATION_ERROR_NONE Success
1146 * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
1147 * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
1148 * @see #notification_type_e
1151 #include <notification.h>
1154 notification_h noti = NULL;
1156 noti = notification_create(NOTIFICATION_TYPE_NOTI);
1164 notification_h notification_create(notification_type_e type);
1167 * @brief Creates a notification clone.
1168 * @details Newly created notification handle is returned.
1169 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1170 * @remarks This cloned notification handle should be freed using notification_free().
1171 * @param[in] noti The notification handle
1172 * @param[out] clone The newly created notification handle that has same with input @a noti
1173 * @return #NOTIFICATION_ERROR_NONE if success,
1174 * otherwise any other value if failure
1175 * @retval #NOTIFICATION_ERROR_NONE Success
1176 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1177 * @see #notification_type_e
1180 #include <notification.h>
1183 notification_h noti = notification_create(NOTIFICATION_TYPE_NOTI);
1184 notification_h clone = NULL;
1186 notification_clone(noti, &clone);
1191 int notification_clone(notification_h noti, notification_h *clone);
1194 * @brief Frees the internal structure data of a notification handle.
1195 * @details Internal data of a notification handle is released. Data of the inserted notification is not deleted.
1196 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1197 * @param[in] noti The notification handle
1198 * @return #NOTIFICATION_ERROR_NONE on success,
1199 * otherwise any other value on failure
1200 * @retval #NOTIFICATION_ERROR_NONE Success
1201 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1202 * @pre Notification handle should be created by notification_create().
1205 #include <notification.h>
1208 notification_h noti = NULL;
1209 int noti_err = NOTIFICATION_ERROR_NONE;
1211 noti = notification_create(NOTIFICATION_TYPE_NOTI);
1217 noti_err = notification_free(noti);
1218 if(noti_err != NOTIFICATION_ERROR_NONE) {
1224 int notification_free(notification_h noti);
1232 * @addtogroup NOTIFICATION_LIST
1238 * @brief Returns the notification list handle.
1239 * @details If count is equal to @c -1, all notifications are returned.
1240 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1242 * @privilege %http://tizen.org/privilege/notification
1243 * @param[in] type The notification type
1244 * @param[in] count The returned notification data number
1245 * @param[out] #NOTIFICATION_ERROR_NONE on success, other value on failure
1246 * @return #NOTIFICATION_ERROR_NONE on success,
1247 * otherwise any other value on failure
1248 * @retval #NOTIFICATION_ERROR_NONE Success
1249 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1250 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1251 * @see #notification_list_h
1254 #include <notification.h>
1257 notification_list_h noti_list = NULL;
1258 int noti_err = NOTIFICATION_ERROR_NONE;
1260 noti_err = notification_get_list(NOTIFICATION_TYPE_NONE, -1, ¬i_list);
1261 if(noti_err != NOTIFICATION_ERROR_NONE) {
1267 int notification_get_list(notification_type_e type,
1269 notification_list_h * list);
1273 * @brief Returns the notification detail list handle of grouping data.
1274 * @details If count is equal to c -1, all notifications are returned.
1275 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1277 * @privilege %http://tizen.org/privilege/notification
1278 * @param[in] pkgname The caller application package name
1279 * @param[in] group_id The group ID
1280 * @param[in] priv_id The private ID
1281 * @param[in] count The returned notification data number
1282 * @param[out] list The notification list handle
1283 * @return #NOTIFICATION_ERROR_NONE if success,
1284 * other value if failure
1285 * @retval #NOTIFICATION_ERROR_NONE Success
1286 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1287 * @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1288 * @see #notification_list_h
1291 #include <notification.h>
1294 notification_list_h noti_list = NULL;
1295 int noti_err = NOTIFICATION_ERROR_NONE;
1297 noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, ¬i_list);
1298 if(noti_err != NOTIFICATION_ERROR_NONE) {
1304 int notification_get_detail_list(const char *pkgname,
1308 notification_list_h *list);
1312 * @brief Frees a notification list.
1313 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1315 * @privilege %http://tizen.org/privilege/notification
1316 * @param[in] list The notification list handle
1317 * @return #NOTIFICATION_ERROR_NONE on success,
1318 * otherwise any other value on failure
1319 * @retval #NOTIFICATION_ERROR_NONE Success
1320 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1321 * @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1322 * @pre notification_get_grouping_list() or notification_get_detail_list().
1323 * @see #notification_list_h
1326 #include <notification.h>
1329 notification_list_h noti_list = NULL;
1330 int noti_err = NOTIFICATION_ERROR_NONE;
1334 noti_err = notification_free_list(noti_list);
1335 if(noti_err != NOTIFICATION_ERROR_NONE) {
1341 int notification_free_list(notification_list_h list);
1348 * @addtogroup NOTIFICATION_MODULE
1354 * @brief Registers a callback for all notification events.
1355 * @details The registered callback could be called for all notification events.
1356 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1358 * @privilege %http://tizen.org/privilege/notification
1359 * @param[in] changed_cb The callback function
1360 * @param[in] user_data The user data
1361 * @return #NOTIFICATION_ERROR_NONE on success,
1362 * otherwise any other value on failure
1363 * @retval #NOTIFICATION_ERROR_NONE Success
1364 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1365 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1366 * @see notification_unregister_detailed_changed_cb()
1369 #include <notification.h>
1372 noti_err = notification_register_detailed_changed_cb(app_changed_cb, user_data);
1373 if(noti_err != NOTIFICATION_ERROR_NONE) {
1379 int notification_register_detailed_changed_cb(
1380 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1385 * @brief Unregisters a callback for all notification events.
1386 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1388 * @privilege %http://tizen.org/privilege/notification
1389 * @param[in] changed_cb The callback function
1390 * @return #NOTIFICATION_ERROR_NONE on success,
1391 * otherwise any other value on failure
1392 * @retval #NOTIFICATION_ERROR_NONE Success
1393 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1394 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1395 * @see notification_register_detailed_changed_cb()
1398 #include <notification.h>
1401 noti_err = notification_register_detailed_changed_cb(app_changed_cb, user_data);
1402 if(noti_err != NOTIFICATION_ERROR_NONE) {
1408 int notification_unregister_detailed_changed_cb(
1409 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1413 * @brief Sets the tag of the notification handle.
1414 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1415 * @param[in] noti Notification handle
1416 * @param[in] tag tag for loading notification handle
1417 * @return #NOTIFICATION_ERROR_NONE on success, other value on failure
1418 * @retval #NOTIFICATION_ERROR_NONE Success
1419 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1420 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1421 * @see notification_get_tag()
1424 #include <notification.h>
1427 notification_h noti = NULL;
1428 int noti_err = NOTIFICATION_ERROR_NONE;
1430 noti = notification_create(NOTIFICATION_TYPE_NOTI);
1436 noti_err = notification_set_tag(noti, tag);
1437 if(noti_err != NOTIFICATION_ERROR_NONE) {
1443 int notification_set_tag(notification_h noti, const char *tag);
1446 * @brief Gets the tag of the notification handle.
1447 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1448 * @param[in] noti Notification handle
1449 * @param[out] tag tag for loading notification handle
1450 * @return #NOTIFICATION_ERROR_NONE on success, other value on failure
1451 * @retval #NOTIFICATION_ERROR_NONE Success
1452 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1453 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1454 * @see notification_set_tag()
1457 #include <notification.h>
1460 int noti_err = NOTIFICATION_ERROR_NONE;
1461 const char *tag = NULL;
1465 noti_err = notification_get_tag(noti, &tag);
1466 if(noti_err != NOTIFICATION_ERROR_NONE) {
1472 int notification_get_tag(notification_h noti, const char **tag);
1475 * @brief Loads a notification from the notification's database with the tag.
1476 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1478 * @privilege %http://tizen.org/privilege/notification
1479 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1480 * @param[in] tag tag for loading notification handle
1481 * @return Notification handle(notification_h) on success, NULL on failure
1482 * @retval notification_h Success
1483 * @retval NULL Failure
1484 * @exception #NOTIFICATION_ERROR_NONE Success
1485 * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
1486 * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
1487 * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1488 * @see #notification_type_e
1491 #include <notification.h>
1494 notification_h noti = NULL;
1496 noti = notification_load_by_tag(tag);
1504 notification_h notification_load_by_tag(const char *tag);
1507 * @brief Deletes all notifications of the given type.
1508 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1510 * @privilege %http://tizen.org/privilege/notification
1511 * @param[in] type Notification type
1512 * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
1513 * @retval #NOTIFICATION_ERROR_NONE Success
1514 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
1515 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1518 #include <notification.h>
1521 int noti_err = NOTIFICATION_ERROR_NONE;
1523 noti_err = notification_delete_all(NOTIFICATION_TYPE_NOTI);
1524 if(noti_err != NOTIFICATION_ERROR_NONE) {
1530 int notification_delete_all(notification_type_e type);
1533 * @brief Posts a notification.
1534 * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
1536 * @privilege %http://tizen.org/privilege/notification
1537 * @param[in] noti Notification handle
1538 * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
1539 * @retval #NOTIFICATION_ERROR_NONE Success
1540 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
1541 * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
1542 * @pre Notification handle should be created by notification_create().
1543 * @post notification_free().
1546 #include <notification.h>
1549 int noti_err = NOTIFICATION_ERROR_NONE;
1551 noti_err = notification_post(noti);
1552 if(noti_err != NOTIFICATION_ERROR_NONE) {
1558 int notification_post(notification_h noti);
1567 #endif /* __NOTIFICATION_H__ */