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>, Youngsub Ko <ys4610.ko@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 * @defgroup NOTIFICATION_LIBRARY Notification Library
39 * @brief This notification library provides UI notification event. Inserted notification event is displaying Notification Tray, Indicator, etc.
43 * @ingroup NOTIFICATION_LIBRARY
44 * @defgroup NOTIFICATION notification core API
45 * @brief Notification core API
49 * @addtogroup NOTIFICATION
54 * @brief This function will be deprecated.
55 * @see notification_set_image()
58 notification_error_e notification_set_icon(notification_h noti,
59 const char *icon_path);
62 * @brief This function will be deprecated.
63 * @see notification_get_image()
66 notification_error_e notification_get_icon(notification_h noti,
70 * @brief This function set image path according to type.
73 * @param[in] noti notification handle
74 * @param[in] type notification image type
75 * @param[in] image_path image file full path
76 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
77 * @retval NOTIFICATION_ERROR_NONE - success
78 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
79 * @pre Notification handle should be created by notification_new()
81 * @see #notification_image_type_e
82 * @see notification_new()
85 #include <notification.h>
88 notification_h noti = NULL;
89 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
91 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
96 noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH);
97 if(noti_err != NOTIFICATION_ERROR_NONE) {
98 notification_free(noti);
104 notification_error_e notification_set_image(notification_h noti,
105 notification_image_type_e type,
106 const char *image_path);
109 * @brief This function get image path according to type.
111 * @remarks Do not free image_path. It will be freed when notification_free() or notification_free_list().
112 * @param[in] noti notification handle
113 * @param[in] type notification image type
114 * @param[out] image_path image file full path
115 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
116 * @retval NOTIFICATION_ERROR_NONE - success
117 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
118 * @pre Notification handle should be created by notification_new()
120 * @see #notification_image_type_e
121 * @see notification_new()
124 #include <notification.h>
127 char *image_path = NULL;
128 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
130 noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
131 if(noti_err != NOTIFICATION_ERROR_NONE) {
137 notification_error_e notification_get_image(notification_h noti,
138 notification_image_type_e type,
142 * @brief This function set time infomation.
143 * @details If input_time is 0, time information is set by current time.
145 * @param[in] noti notification handle
146 * @param[in] input_time input time
147 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
148 * @retval NOTIFICATION_ERROR_NONE - success
149 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
150 * @pre Notification handle should be created by notification_new()
152 * @see notification_new()
155 #include <notification.h>
158 notification_h noti = NULL;
159 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
161 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
166 noti_err = notification_set_time(noti, time(NULL));
167 if(noti_err != NOTIFICATION_ERROR_NONE) {
168 notification_free(noti);
174 notification_error_e notification_set_time(notification_h noti,
178 * @brief This function get time information.
179 * @details If ret_time is 0, time information is not set before.
181 * @param[in] noti notification handle
182 * @param[out] ret_time return time value
183 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
184 * @retval NOTIFICATION_ERROR_NONE - success
185 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
186 * @pre Notification handle should be created by notification_new()
188 * @see notification_new()
191 #include <notification.h>
195 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
197 noti_err = notification_get_time(noti, &ret_time);
198 if(noti_err != NOTIFICATION_ERROR_NONE) {
204 notification_error_e notification_get_time(notification_h noti,
208 * @brief This function get insert time information.
209 * @details If ret_time is 0, this notification data is not inserted before.
211 * @param[in] noti notification handle
212 * @param[out] ret_time return time value
213 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
214 * @retval NOTIFICATION_ERROR_NONE - success
215 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
221 #include <notification.h>
225 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
227 noti_err = notification_get_insert_time(noti, &ret_time);
228 if(noti_err != NOTIFICATION_ERROR_NONE) {
234 notification_error_e notification_get_insert_time(notification_h noti,
238 * @brief This function will be deprecated.
239 * @see notification_set_text()
242 notification_error_e notification_set_title(notification_h noti,
244 const char *loc_title);
247 * @brief This function will be deprecated.
248 * @see notification_get_text()
251 notification_error_e notification_get_title(notification_h noti,
256 * @brief This function will be deprecated.
257 * @see notification_set_text()
260 notification_error_e notification_set_content(notification_h noti,
262 const char *loc_content);
265 * @brief This function will be deprecated.
266 * @see notification_get_text()
269 notification_error_e notification_get_content(notification_h noti,
274 * @brief This function set text.
275 * @details Set title, content string. If text is formated data(only support %d, %f, %s), type - value pair should be set.
276 * If %d, type NOTIFICATION_VARIABLE_TYPE_INT and value is integer value.
277 * If %f, type NOTIFICATION_VARIABLE_TYPE_DOUBLE and value is double value.
278 * If %s, type NOTIFICATION_VARIABLE_TYPE_STRING and value is character string.
279 * If type is NOTIFICATION_VARIABLE_TYPE_COUNT, notification count is displaying with text.
280 * If value is NOTIFICATION_COUNT_POS_LEFT, count is displaying at the left of the text.
281 * If value is NOTIFICATION_COUNT_POS_IN, count is displaying in the text that text has %d format.
282 * If value is NOTIFICATION_COUNT_POS_RIGHT, count is displaying at the right of the text.
283 * Variable parameter should be terminated NOTIFICATION_VARIABLE_TYPE_NONE.
285 * @param[in] noti notification handle
286 * @param[in] type notification text type
287 * @param[in] text basic text
288 * @param[in] key text key for localization
289 * @param[in] args_type variable parameter that type - value pair.
290 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
291 * @retval NOTIFICATION_ERROR_NONE - success
292 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
293 * @pre notification handle should be created by notification_new().
298 #include <notification.h>
301 notification_h noti = NULL;
302 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
304 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
309 noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, "I'm Title", "IDS_APP_BODY_IM_TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
310 if(noti_err != NOTIFICATION_ERROR_NONE) {
311 notification_free(noti);
317 notification_error_e notification_set_text(notification_h noti,
318 notification_text_type_e type,
324 * @brief This function get text.
327 * @param[in] noti notification handle
328 * @param[in] type notification text type.
329 * @param[out] text text
330 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
331 * @retval NOTIFICATION_ERROR_NONE - success
332 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
338 #include <notification.h>
341 notification_h noti = NULL;
342 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
345 noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
346 if(noti_err != NOTIFICATION_ERROR_NONE) {
352 notification_error_e notification_get_text(notification_h noti,
353 notification_text_type_e type,
357 * @brief This function set timestamp to text. the timestamp value will be converted to string
360 * @param[in] noti notification handle
361 * @param[in] type notification text type
362 * @param[in] time time stamp
363 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
364 * @retval NOTIFICATION_ERROR_NONE - success
365 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
366 * @pre notification handle should be created by notification_new().
370 notification_error_e notification_set_time_to_text(notification_h noti, notification_text_type_e type,
374 * @brief This function get timestamp from text
377 * @param[in] noti notification handle
378 * @param[in] type notification text type
379 * @param[in] time pointer of time stamp
380 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
381 * @retval NOTIFICATION_ERROR_NONE - success
382 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
383 * @pre notification handle should be created by notification_new().
387 notification_error_e notification_get_time_from_text(notification_h noti, notification_text_type_e type,
391 * @brief This function set text domain.
394 * @param[in] noti notification handle
395 * @param[in] domain text domain
396 * @param[in] dir text dir
397 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
398 * @retval NOTIFICATION_ERROR_NONE - success
399 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
405 #include <notification.h>
408 notification_h noti = NULL;
409 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
411 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
416 noti_err = notification_set_text_domain(noti, PACKAGE, LOCALEDIR);
417 if(noti_err != NOTIFICATION_ERROR_NONE) {
418 notification_free(noti);
424 notification_error_e notification_set_text_domain(notification_h noti,
429 * @brief This function get text domain.
431 * @remarks Do not free returned domain and dir. These are freed when notification_free or notification_free_list.
432 * @param[in] noti notification handle
433 * @param[out] domain domain
434 * @param[out] dir locale dir
435 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
436 * @retval NOTIFICATION_ERROR_NONE - success
437 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
443 #include <notification.h>
446 notification_h noti = NULL;
447 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
451 noti_err = notification_get_text_domain(noti, &domain, &dir);
452 if(noti_err != NOTIFICATION_ERROR_NONE) {
458 notification_error_e notification_get_text_domain(notification_h noti,
463 * @brief This function set notification sound.
466 * @param[in] noti notification handle
467 * @param[in] type notification sound type
468 * @param[in] path user sound file path
469 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
470 * @retval NOTIFICATION_ERROR_NONE - success
471 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
477 #include <notification.h>
480 notification_h noti = NULL;
481 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
483 noti_err = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL);
484 if(noti_err != NOTIFICATION_ERROR_NONE) {
490 notification_error_e notification_set_sound(notification_h noti,
491 notification_sound_type_e type,
495 * @brief This function get notification sound.
498 * @param[in] noti notification handle
499 * @param[out] type notification sound type
500 * @param[out] path user sound file path
501 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
502 * @retval NOTIFICATION_ERROR_NONE - success
503 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
509 #include <notification.h>
512 notification_h noti = NULL;
513 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
514 notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE;
516 noti_err = notification_get_sound(noti, &type, NULL);
517 if(noti_err != NOTIFICATION_ERROR_NONE) {
523 notification_error_e notification_get_sound(notification_h noti,
524 notification_sound_type_e *type,
528 * @brief This function set notification vibration.
531 * @param[in] noti notification handle
532 * @param[in] type notification vibration type
533 * @param[in] path user vibration file path
534 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
535 * @retval NOTIFICATION_ERROR_NONE - success
536 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
542 #include <notification.h>
545 notification_h noti = NULL;
546 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
548 noti_err = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL);
549 if(noti_err != NOTIFICATION_ERROR_NONE) {
555 notification_error_e notification_set_vibration(notification_h noti,
556 notification_vibration_type_e type,
560 * @brief This function get notification vibration.
563 * @param[in] noti notification handle
564 * @param[out] type notification sound type
565 * @param[out] path user vibration file path
566 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
567 * @retval NOTIFICATION_ERROR_NONE - success
568 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
574 #include <notification.h>
577 notification_h noti = NULL;
578 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
579 notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE;
581 noti_err = notification_get_vibration(noti, &type, NULL);
582 if(noti_err != NOTIFICATION_ERROR_NONE) {
588 notification_error_e notification_get_vibration(notification_h noti,
589 notification_vibration_type_e *type,
593 * @brief This function set led notification.
596 * @param[in] noti notification handle
597 * @param[in] operation led notification operation
598 * @param[in] led_argb notification led color
599 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
600 * @retval NOTIFICATION_ERROR_NONE - success
601 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
607 #include <notification.h>
610 notification_h noti = NULL;
611 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
613 noti_err = notification_set_led(noti, NOTIFICATION_LED_TYPE_DEFAULT, NULL);
614 if(noti_err != NOTIFICATION_ERROR_NONE) {
620 notification_error_e notification_set_led(notification_h noti,
621 notification_led_op_e operation,
625 * @brief This function get notification led.
628 * @param[in] noti notification handle
629 * @param[out] operation led notification operation
630 * @param[out] led_argb notification led color
631 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
632 * @retval NOTIFICATION_ERROR_NONE - success
633 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
639 #include <notification.h>
642 notification_h noti = NULL;
643 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
644 notification_led_type_e type = NOTIFICATION_LED_TYPE_NONE;
646 noti_err = notification_get_led(noti, &type, NULL);
647 if(noti_err != NOTIFICATION_ERROR_NONE) {
653 notification_error_e notification_get_led(notification_h noti,
654 notification_led_op_e *operation,
658 * @brief This function will be deprecated.
659 * @see notification_set_execute_option()
662 notification_error_e notification_set_application(notification_h noti, const char *pkgname); /* Do not use this */
665 * @brief This function will be deprecated.
666 * @see notification_get_execute_option()
669 notification_error_e notification_get_application(notification_h noti, char **pkgname); /* Do not use this */
672 * @brief This function will be deprecated.
673 * @see notification_set_execute_option()
676 notification_error_e notification_set_args(notification_h noti, bundle * args, bundle * group_args); /* Do not use this */
679 * @brief This function will be deprecated.
680 * @see notification_get_execute_option()
683 notification_error_e notification_get_args(notification_h noti, bundle ** args, bundle ** group_args); /* Do not use this */
686 * @brief This function set execute option.
687 * @details When notification data selected in display application, application launched by appsvc_run_service with service_handle.
689 * @param[in] noti notification handle
690 * @param[in] type notification execute type
691 * @param[in] text basic text for button
692 * @param[in] key value for localizaed text
693 * @param[in] service_handle appsvc bundle data
694 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
695 * @retval NOTIFICATION_ERROR_NONE - success
696 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
702 #include <notification.h>
705 notification_h noti = NULL;
706 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
712 appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
713 appsvc_set_uri(b,"http://www.samsung.com");
715 noti_err = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b);
716 if(noti_err != NOTIFICATION_ERROR_NONE) {
717 notification_free(noti);
725 notification_error_e notification_set_execute_option(notification_h noti,
726 notification_execute_type_e type,
729 bundle *service_handle);
732 * @brief This function get execute option.
735 * @param[in] noti notification handle
736 * @param[in] type notification execute type
737 * @param[out] text text for button
738 * @param[out] service_handle appsvc bundle data
739 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
740 * @retval NOTIFICATION_ERROR_NONE - success
741 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
747 #include <notification.h>
750 notification_h noti = NULL;
751 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
756 noti_err = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, &b);
757 if(noti_err != NOTIFICATION_ERROR_NONE) {
758 notification_free(noti);
764 notification_error_e notification_get_execute_option(notification_h noti,
765 notification_execute_type_e type,
767 bundle **service_handle);
770 * @brief This function set notification property.
773 * @param[in] noti notification handle
774 * @param[in] flags property with | operation
775 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
776 * @retval NOTIFICATION_ERROR_NONE - success
777 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
783 #include <notification.h>
786 notification_h noti = NULL;
787 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
790 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
795 noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
796 if(noti_err != NOTIFICATION_ERROR_NONE) {
797 notification_free(noti);
803 notification_error_e notification_set_property(notification_h noti,
807 * @brief This function get notification property.
810 * @param[in] noti notification handle
811 * @param[out] flags notification property
812 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
813 * @retval NOTIFICATION_ERROR_NONE - success
814 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
820 #include <notification.h>
823 notification_h noti = NULL;
824 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
827 noti_err = notification_get_property(noti, &flags);
828 if(noti_err != NOTIFICATION_ERROR_NONE) {
834 notification_error_e notification_get_property(notification_h noti,
838 * @brief This function set display application list.
839 * @details All display application is enable(NOTIFICATION_DISPLAY_APP_ALL) if you are not call this API.
841 * @param[in] noti notification handle
842 * @param[in] applist with | operation
843 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
844 * @retval NOTIFICATION_ERROR_NONE - success
845 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
851 #include <notification.h>
854 notification_h noti = NULL;
855 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
858 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
863 noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
864 if(noti_err != NOTIFICATION_ERROR_NONE) {
865 notification_free(noti);
872 notification_error_e notification_set_display_applist(notification_h noti,
876 * @brief This function get display application list.
879 * @param[in] noti notification handle
880 * @param[out] applist display application list.
881 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
882 * @retval NOTIFICATION_ERROR_NONE - success
883 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
889 #include <notification.h>
892 notification_h noti = NULL;
893 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
896 noti_err = notification_get_display_applist(noti, &applist);
897 if(noti_err != NOTIFICATION_ERROR_NONE) {
903 notification_error_e notification_get_display_applist(notification_h noti,
907 * @brief This function set initial size for ongoing type.
908 * @details After notification_insert, it does not upate size. If you want to update size, please call notification_update_size().
910 * @param[in] noti notification handle
911 * @param[in] size double type size.
912 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
913 * @retval NOTIFICATION_ERROR_NONE - success
914 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
920 #include <notification.h>
923 notification_h noti = NULL;
924 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
926 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
931 noti_err = notification_set_size(noti, 0.0);
932 if(noti_err != NOTIFICATION_ERROR_NONE) {
933 notification_free(noti);
939 notification_error_e notification_set_size(notification_h noti,
943 * @brief This function get progress size.
946 * @param[in] noti notification handle
947 * @param[out] size progress size
948 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
949 * @retval NOTIFICATION_ERROR_NONE - success
950 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
956 #include <notification.h>
959 notification_h noti = NULL;
960 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
963 noti_err = notification_get_size(noti, &size);
964 if(noti_err != NOTIFICATION_ERROR_NONE) {
970 notification_error_e notification_get_size(notification_h noti,
974 * @brief This function set initial progress for ongoing type.
975 * @details After notification_insert, it does not upate progress. If you want to update progress, please call notification_update_progress().
977 * @param[in] noti notification handle
978 * @param[in] percentage progress percentage
979 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
980 * @retval NOTIFICATION_ERROR_NONE - success
981 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
987 #include <notification.h>
990 notification_h noti = NULL;
991 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
993 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
998 noti_err = notification_set_progress(noti, 0.0);
999 if(noti_err != NOTIFICATION_ERROR_NONE) {
1000 notification_free(noti);
1006 notification_error_e notification_set_progress(notification_h noti,
1010 * @brief This function get progress percentage.
1013 * @param[in] noti notification handle
1014 * @param[out] percentage progress percentage
1015 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1016 * @retval NOTIFICATION_ERROR_NONE - success
1017 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1023 #include <notification.h>
1026 notification_h noti = NULL;
1027 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1028 double percentage = 0.0;
1030 noti_err = notification_get_progress(noti, &percentage);
1031 if(noti_err != NOTIFICATION_ERROR_NONE) {
1037 notification_error_e notification_get_progress(notification_h noti,
1038 double *percentage);
1041 * @brief This function set caller_pkgname.
1042 * @details caller_pkgname is set automatically when notification_new. We are not recommend to use this API.
1044 * @param[in] noti notification handle
1045 * @param[in] pkgname caller package name
1046 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1047 * @retval NOTIFICATION_ERROR_NONE - success
1048 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1054 #include <notification.h>
1057 notification_h noti = NULL;
1058 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1060 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1065 noti_err = notification_set_pkgname(noti, "org.tizen.phone");
1066 if(noti_err != NOTIFICATION_ERROR_NONE) {
1067 notification_free(noti);
1073 notification_error_e notification_set_pkgname(notification_h noti,
1074 const char *pkgname);
1077 * @brief This function get caller pkgname.
1080 * @param[in] noti notification handle
1081 * @param[out] pkgname caller package name
1082 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1083 * @retval NOTIFICATION_ERROR_NONE - success
1084 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1090 #include <notification.h>
1093 notification_h noti = NULL;
1094 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1095 char *pkgname = NULL;
1097 noti_err = notification_get_pkgname(noti, &pkgname);
1098 if(noti_err != NOTIFICATION_ERROR_NONE) {
1104 notification_error_e notification_get_pkgname(notification_h noti,
1108 * @brief This function set layout type of notification
1109 * @details caller can set displaying layout of notification with this API
1111 * @param[in] noti notification handle
1112 * @param[in] layout type
1113 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1114 * @retval NOTIFICATION_ERROR_NONE - success
1115 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1118 * @see #notification_ly_type_e
1120 notification_error_e notification_set_layout(notification_h noti,
1121 notification_ly_type_e layout);
1124 * @brief This function get layout type of notification
1127 * @param[in] noti notification handle
1128 * @param[out] layout type of notification
1129 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1130 * @retval NOTIFICATION_ERROR_NONE - success
1131 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1134 * @see #notification_ly_type_e
1136 notification_error_e notification_get_layout(notification_h noti,
1137 notification_ly_type_e *layout);
1140 * @brief This function set application badge count.
1143 * @param[in] pkgname If NULL, caller pkgname is set internally.
1144 * @param[in] group_id group id
1145 * @param[in] count badge count
1146 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1147 * @retval NOTIFICATION_ERROR_NONE - success
1148 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1153 #include <notification.h>
1156 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1158 noti_err = notification_set_badge(NULL, NOTIFICATION_GROUP_ID_NONE, 5);
1159 if(noti_err != NOTIFICATION_ERROR_NONE) {
1165 notification_error_e notification_set_badge(const char *pkgname,
1166 int group_id, int count);
1169 * @brief This function get application badge count.
1172 * @param[in] pkgname If NULL, caller pkgname is set internally.
1173 * @param[in] group_id group id
1174 * @param[out] count badge count
1175 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1176 * @retval NOTIFICATION_ERROR_NONE - success
1177 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1182 #include <notification.h>
1185 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1188 noti_err = notification_get_badge(NULL, NOTIFICATION_GROUP_ID_NONE, &count);
1189 if(noti_err != NOTIFICATION_ERROR_NONE) {
1195 notification_error_e notification_get_badge(const char *pkgname,
1196 int group_id, int *count);
1199 * @brief This function get Group ID and Private ID
1202 * @param[in] noti notification handle
1203 * @param[out] group_id Group ID
1204 * @param[out] priv_id Private ID
1205 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1206 * @retval NOTIFICATION_ERROR_NONE - success
1207 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1213 #include <notification.h>
1216 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1217 int group_id, priv_id;
1219 noti_err = notification_get_id(noti, &group_id, &priv_id);
1220 if(noti_err != NOTIFICATION_ERROR_NONE) {
1226 notification_error_e notification_get_id(notification_h noti,
1227 int *group_id, int *priv_id);
1230 * @brief This function get notification type
1233 * @param[in] noti notification handle
1234 * @param[out] type notification type
1235 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1236 * @retval NOTIFICATION_ERROR_NONE - success
1237 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1243 #include <notification.h>
1246 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1247 notification_type_e type;
1249 noti_err = notification_get_type(noti, &type);
1250 if(noti_err != NOTIFICATION_ERROR_NONE) {
1256 notification_error_e notification_get_type(notification_h noti,
1257 notification_type_e * type);
1260 * @brief This function insert notification data.
1261 * @details Notification data is inserted to DB and then notification data is displaying display application.
1262 * When notification_new() call, if priv_id is NOTIFICATION_PRIV_ID_NONE, priv_id is return internally set priv_id.
1264 * @param[in] noti notification handle
1265 * @param[out] priv_id private ID
1266 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1267 * @retval NOTIFICATION_ERROR_NONE - success
1268 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1269 * @pre notification_new()
1270 * @post notification_free()
1271 * @see #notification_h
1274 #include <notification.h>
1277 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1279 noti_err = notification_insert(noti, NULL);
1280 if(noti_err != NOTIFICATION_ERROR_NONE) {
1286 notification_error_e notification_insert(notification_h noti,
1290 * @brief This function update notification data.
1291 * @details Display application update UI.
1293 * @param[in] noti notification handle that is created by notification_new().
1294 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1295 * @retval NOTIFICATION_ERROR_NONE - success
1296 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1297 * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
1300 * @see #notification_h
1303 #include <notification.h>
1306 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1308 noti_err = notification_update(NULL);
1309 if(noti_err != NOTIFICATION_ERROR_NONE) {
1315 notification_error_e notification_update(notification_h noti);
1318 * @brief This function clear all notification of type.
1319 * @details Not recommand API. Only for notification tray's clear button operation.
1321 * @param[in] type notification type
1322 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1323 * @retval NOTIFICATION_ERROR_NONE - success
1324 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1327 * @see #notification_type_e
1330 #include <notification.h>
1333 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1335 noti_err = notifiation_clear(NOTIFICATION_TYPE_NOTI);
1336 if(noti_err != NOTIFICATION_ERROR_NONE) {
1342 notification_error_e notifiation_clear(notification_type_e type);
1345 * @brief This function delete notification by type.
1346 * @details If pkgname is NULL, caller_pkgname is set internally.
1348 * @param[in] pkgname caller application package name or NULL
1349 * @param[in] type notification type
1350 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1351 * @retval NOTIFICATION_ERROR_NONE - success
1352 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1358 #include <notification.h>
1361 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1363 noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
1364 if(noti_err != NOTIFICATION_ERROR_NONE) {
1370 notification_error_e notification_delete_all_by_type(const char *pkgname,
1371 notification_type_e type);
1374 * @brief This function delete group notification data by group ID.
1375 * @details If pkgname is NULL, caller_pkgname is set internally.
1377 * @param[in] pkgname caller application package name or NULL
1378 * @param[in] type notification type
1379 * @param[in] group_id group ID
1380 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1381 * @retval NOTIFICATION_ERROR_NONE - success
1382 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1388 #include <notification.h>
1391 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1393 noti_err = notification_delete_group_by_group_id(NULL, NOTIFICATION_TYPE_NOTI, APP_GROUP_ID);
1394 if(noti_err != NOTIFICATION_ERROR_NONE) {
1400 notification_error_e notification_delete_group_by_group_id(const char *pkgname,
1401 notification_type_e type,
1405 * @brief This function delete group notification data that include priv_id.
1406 * @details If pkgname is NULL, caller_pkgname is set internally.
1408 * @param[in] pkgname caller application package name or NULL
1409 * @param[in] type notification type
1410 * @param[in] priv_id priv ID
1411 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1412 * @retval NOTIFICATION_ERROR_NONE - success
1413 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1419 #include <notification.h>
1422 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1424 noti_err = notification_delete_group_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
1425 if(noti_err != NOTIFICATION_ERROR_NONE) {
1431 notification_error_e notification_delete_group_by_priv_id(const char *pkgname,
1432 notification_type_e type,
1436 * @brief This function delete notification data that private ID is priv_id.
1437 * @details If pkgname is NULL, caller_pkgname is set internally.
1439 * @param[in] pkgname caller application package name or NULL
1440 * @param[in] type notification type
1441 * @param[in] priv_id priv ID
1442 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1443 * @retval NOTIFICATION_ERROR_NONE - success
1444 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1450 #include <notification.h>
1453 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1455 noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
1456 if(noti_err != NOTIFICATION_ERROR_NONE) {
1462 notification_error_e notification_delete_by_priv_id(const char *pkgname,
1463 notification_type_e type,
1467 * @brief This function delete notification data from DB
1468 * @details notification_delete() remove notification data from DB and notification_free release menory of notification data.
1470 * @param[in] noti notification handle
1471 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1472 * @retval NOTIFICATION_ERROR_NONE - success
1473 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1476 * @see #notification_h
1479 #include <notification.h>
1482 notificaton_h noti = NULL;
1483 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1487 noti_err = notification_delete(noti);
1488 if(noti_err != NOTIFICATION_ERROR_NONE) {
1495 notification_error_e notification_delete(notification_h noti);
1498 * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
1499 * @details Display application update UI.
1501 * @param[in] noti notification handle or NULL if priv_id is valid
1502 * @param[in] priv_id private ID
1503 * @param[in] progress % value of progressive data
1504 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1505 * @retval NOTIFICATION_ERROR_NONE - success
1506 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1511 #include <notification.h>
1514 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1516 noti_err = notification_update_progress(NULL, APP_NOTI_PRIV_ID, 0.6);
1517 if(noti_err != NOTIFICATION_ERROR_NONE) {
1523 notification_error_e notification_update_progress(notification_h noti,
1528 * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
1529 * @details Display application update UI.
1531 * @param[in] noti notification handle or NULL if priv_id is valid
1532 * @param[in] priv_id private ID
1533 * @param[in] size bytes of progressive data
1534 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1535 * @retval NOTIFICATION_ERROR_NONE - success
1536 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1541 #include <notification.h>
1544 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1546 noti_err = notification_update_size(NULL, APP_NOTI_PRIV_ID, 3000000);
1547 if(noti_err != NOTIFICATION_ERROR_NONE) {
1553 notification_error_e notification_update_size(notification_h noti,
1554 int priv_id, double size);
1556 notification_error_e notification_update_content(notification_h noti,
1558 const char *content);
1561 * @brief This function create internal structure data and return notification handle.
1562 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1563 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1564 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1565 * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT,
1566 * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
1567 * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
1568 * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
1570 * @param[in] type notification type
1571 * @param[in] group_id Group ID
1572 * @param[in] priv_id Priv ID
1573 * @return notification handle(#notification_h) if success, NULL if failure.
1574 * @retval #notification_h - success
1575 * @retval NULL - failure
1578 * @see #notification_type_e
1579 * @see #notification_h
1582 #include <notification.h>
1585 notification_h noti = NULL;
1587 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1595 notification_h notification_new(notification_type_e type, int group_id,
1599 * @brief This function create internal structure data and return notification handle.
1600 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1601 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1602 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1604 * @param[in] type notification type
1605 * @return notification handle(#notification_h) if success, NULL if failure.
1606 * @retval #notification_h - success
1607 * @retval NULL - failure
1610 * @see #notification_type_e
1611 * @see #notification_h
1614 #include <notification.h>
1617 notification_h noti = NULL;
1619 noti = notification_create(NOTIFICATION_TYPE_NOTI);
1627 notification_h notification_create(notification_type_e type);
1630 * @brief This function create internal structure data and return notification handle.
1631 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1632 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1633 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1634 * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT,
1635 * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
1636 * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
1637 * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
1639 * @param[in] type notification type
1640 * @param[in] group_id Group ID
1641 * @param[in] priv_id Priv ID
1642 * @return notification handle(#notification_h) if success, NULL if failure.
1643 * @retval #notification_h - success
1644 * @retval NULL - failure
1647 * @see #notification_type_e
1648 * @see #notification_h
1651 #include <notification.h>
1654 notification_h noti = NULL;
1656 noti = notification_load(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1664 notification_h notification_load(char *pkgname,
1668 * @brief This function create notification clone.
1669 * @details Newly created notification handle is returned.
1670 * @remarks This clone notification handle should be call notification_free().
1671 * @param[in] noti notification handle
1672 * @param[out] clone newly created notification handle that has same with input noti.
1673 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1674 * @retval NOTIFICATION_ERROR_NONE - success
1675 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1678 * @see #notification_type_e
1679 * @see #notification_h
1682 #include <notification.h>
1685 notification_h noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1686 notification_h clone = NULL;
1688 notification_clone(noti, &clone);
1693 notification_error_e notification_clone(notification_h noti, notification_h *clone);
1696 * @brief This function free internal structure data of notification handle.
1697 * @details Internal data of notification handle is released. Notification data that inserted is not deleted.
1699 * @param[in] noti notification handle
1700 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1701 * @retval NOTIFICATION_ERROR_NONE - success
1702 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1703 * @pre notification_new()
1705 * @see #notification_h
1708 #include <notification.h>
1711 notification_h noti = NULL;
1712 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1714 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1720 noti_err = notification_free(noti);
1721 if(noti_err != NOTIFICATION_ERROR_NONE) {
1727 notification_error_e notification_free(notification_h noti);
1730 * @brief This function register notification chagned callback.
1733 * @param[in] changed_cb callback function
1734 * @param[in] user_data user data
1735 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1736 * @retval NOTIFICATION_ERROR_NONE - success
1737 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1738 * @pre notification_new()
1740 * @see notification_unresister_changed_cb()
1743 #include <notification.h>
1746 noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1747 if(noti_err != NOTIFICATION_ERROR_NONE) {
1753 notification_error_e
1754 notification_resister_changed_cb(
1755 void (*changed_cb)(void *data, notification_type_e type),
1759 * @brief This function unregister notification chagned callback.
1762 * @param[in] changed_cb callback function
1763 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1764 * @retval NOTIFICATION_ERROR_NONE - success
1765 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1766 * @pre notification_new()
1768 * @see notification_resister_changed_cb()
1771 #include <notification.h>
1774 noti_err = notification_unresister_changed_cb(app_changed_cb);
1775 if(noti_err != NOTIFICATION_ERROR_NONE) {
1781 notification_error_e
1782 notification_unresister_changed_cb(
1783 void (*changed_cb)(void *data, notification_type_e type));
1786 * @brief This function register notification chagned callback.
1789 * @param[in] changed_cb callback function
1790 * @param[in] user_data user data
1791 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1792 * @retval NOTIFICATION_ERROR_NONE - success
1793 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1794 * @pre notification_new()
1796 * @see notification_unresister_changed_cb()
1799 #include <notification.h>
1802 noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1803 if(noti_err != NOTIFICATION_ERROR_NONE) {
1809 notification_error_e
1810 notification_register_detailed_changed_cb(
1811 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1815 * @brief This function unregister notification chagned callback.
1818 * @param[in] changed_cb callback function
1819 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1820 * @retval NOTIFICATION_ERROR_NONE - success
1821 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1822 * @pre notification_new()
1824 * @see notification_resister_changed_cb()
1827 #include <notification.h>
1830 noti_err = notification_unresister_changed_cb(app_changed_cb);
1831 if(noti_err != NOTIFICATION_ERROR_NONE) {
1837 notification_error_e
1838 notification_unregister_detailed_changed_cb(
1839 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1843 * @brief This function get notification data count.
1844 * @details Count is the result of the conditions that type, pkgname, group_id, priv_id.
1846 * @param[in] type notification type
1847 * @param[in] pkgname caller application package name
1848 * @param[in] group_id group id
1849 * @param[in] priv_id private id
1850 * @param[out] count notification data number
1851 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1852 * @retval NOTIFICATION_ERROR_NONE - success
1853 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1856 * @see #notification_type_e
1859 #include <notification.h>
1862 notification_list_h noti_list = NULL;
1863 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1866 noti_err = notification_get_count(NOTIFICATION_TYPE_NONE, NULL, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE, &count);
1867 if(noti_err != NOTIFICATION_ERROR_NONE) {
1873 notification_error_e notification_get_count(notification_type_e type,
1874 const char *pkgname,
1875 int group_id, int priv_id,
1879 * @brief This function will be deprecated.
1880 * @see notification_get_grouping_list()
1883 notification_error_e notification_get_list(notification_type_e type,
1885 notification_list_h * list);
1888 * @brief This function return notification grouping list handle.
1889 * @details If count is -1, all of notification list is returned.
1891 * @param[in] type notification type
1892 * @param[in] count returned notification data number
1893 * @param[out] list notification list handle
1894 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1895 * @retval NOTIFICATION_ERROR_NONE - success
1896 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1899 * @see #notification_list_h
1902 #include <notification.h>
1905 notification_list_h noti_list = NULL;
1906 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1908 noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, ¬i_list);
1909 if(noti_err != NOTIFICATION_ERROR_NONE) {
1915 notification_error_e notification_get_grouping_list(notification_type_e type,
1917 notification_list_h *list);
1920 * @brief This function return notification detail list handle of grouping data.
1921 * @details If count is -1, all of notification list is returned.
1923 * @param[in] pkgname caller application package name
1924 * @param[in] group_id group id
1925 * @param[in] priv_id private id
1926 * @param[in] count returned notification data number
1927 * @param[out] list notification list handle
1928 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1929 * @retval NOTIFICATION_ERROR_NONE - success
1930 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1933 * @see #notification_list_h
1936 #include <notification.h>
1939 notification_list_h noti_list = NULL;
1940 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1942 noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, ¬i_list);
1943 if(noti_err != NOTIFICATION_ERROR_NONE) {
1949 notification_error_e notification_get_detail_list(const char *pkgname,
1953 notification_list_h *list);
1956 * @brief This function release notification list.
1959 * @param[in] list notification list handle
1960 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1961 * @retval NOTIFICATION_ERROR_NONE - success
1962 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1963 * @pre notification_get_grouping_list() or notification_get_detail_list ()
1965 * @see #notification_list_h
1968 #include <notification.h>
1971 notification_list_h noti_list = NULL;
1972 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1976 noti_err = notification_free_list(noti_list);
1977 if(noti_err != NOTIFICATION_ERROR_NONE) {
1983 notification_error_e notification_free_list(notification_list_h list);
1990 * @brief You can get the information about notification operation using this function
1993 * @param[in] list notification list handle
1994 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1995 * @retval NOTIFICATION_ERROR_NONE - success
1996 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1997 * @pre notification_get_grouping_list() or notification_get_detail_list ()
1999 * @see #notification_op
2001 notification_error_e notification_op_get_data(notification_op *noti_op,
2002 notification_op_data_type_e type,
2011 #endif /* __NOTIFICATION_H__ */