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 will be deprecated.
594 * @see notification_set_execute_option()
597 notification_error_e notification_set_application(notification_h noti, const char *pkgname); /* Do not use this */
600 * @brief This function will be deprecated.
601 * @see notification_get_execute_option()
604 notification_error_e notification_get_application(notification_h noti, char **pkgname); /* Do not use this */
607 * @brief This function will be deprecated.
608 * @see notification_set_execute_option()
611 notification_error_e notification_set_args(notification_h noti, bundle * args, bundle * group_args); /* Do not use this */
614 * @brief This function will be deprecated.
615 * @see notification_get_execute_option()
618 notification_error_e notification_get_args(notification_h noti, bundle ** args, bundle ** group_args); /* Do not use this */
621 * @brief This function set execute option.
622 * @details When notification data selected in display application, application launched by appsvc_run_service with service_handle.
624 * @param[in] noti notification handle
625 * @param[in] type notification execute type
626 * @param[in] text basic text for button
627 * @param[in] key value for localizaed text
628 * @param[in] service_handle appsvc bundle data
629 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
630 * @retval NOTIFICATION_ERROR_NONE - success
631 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
637 #include <notification.h>
640 notification_h noti = NULL;
641 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
647 appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
648 appsvc_set_uri(b,"http://www.samsung.com");
650 noti_err = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b);
651 if(noti_err != NOTIFICATION_ERROR_NONE) {
652 notification_free(noti);
660 notification_error_e notification_set_execute_option(notification_h noti,
661 notification_execute_type_e type,
664 bundle *service_handle);
667 * @brief This function get execute option.
670 * @param[in] noti notification handle
671 * @param[in] type notification execute type
672 * @param[out] text text for button
673 * @param[out] service_handle appsvc bundle data
674 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
675 * @retval NOTIFICATION_ERROR_NONE - success
676 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
682 #include <notification.h>
685 notification_h noti = NULL;
686 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
691 noti_err = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, &b);
692 if(noti_err != NOTIFICATION_ERROR_NONE) {
693 notification_free(noti);
699 notification_error_e notification_get_execute_option(notification_h noti,
700 notification_execute_type_e type,
702 bundle **service_handle);
705 * @brief This function set notification property.
708 * @param[in] noti notification handle
709 * @param[in] flags property with | operation
710 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
711 * @retval NOTIFICATION_ERROR_NONE - success
712 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
718 #include <notification.h>
721 notification_h noti = NULL;
722 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
725 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
730 noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
731 if(noti_err != NOTIFICATION_ERROR_NONE) {
732 notification_free(noti);
738 notification_error_e notification_set_property(notification_h noti,
742 * @brief This function get notification property.
745 * @param[in] noti notification handle
746 * @param[out] flags notification property
747 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
748 * @retval NOTIFICATION_ERROR_NONE - success
749 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
755 #include <notification.h>
758 notification_h noti = NULL;
759 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
762 noti_err = notification_get_property(noti, &flags);
763 if(noti_err != NOTIFICATION_ERROR_NONE) {
769 notification_error_e notification_get_property(notification_h noti,
773 * @brief This function set display application list.
774 * @details All display application is enable(NOTIFICATION_DISPLAY_APP_ALL) if you are not call this API.
776 * @param[in] noti notification handle
777 * @param[in] applist with | operation
778 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
779 * @retval NOTIFICATION_ERROR_NONE - success
780 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
786 #include <notification.h>
789 notification_h noti = NULL;
790 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
793 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
798 noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
799 if(noti_err != NOTIFICATION_ERROR_NONE) {
800 notification_free(noti);
807 notification_error_e notification_set_display_applist(notification_h noti,
811 * @brief This function get display application list.
814 * @param[in] noti notification handle
815 * @param[out] applist display application list.
816 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
817 * @retval NOTIFICATION_ERROR_NONE - success
818 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
824 #include <notification.h>
827 notification_h noti = NULL;
828 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
831 noti_err = notification_get_display_applist(noti, &applist);
832 if(noti_err != NOTIFICATION_ERROR_NONE) {
838 notification_error_e notification_get_display_applist(notification_h noti,
842 * @brief This function set initial size for ongoing type.
843 * @details After notification_insert, it does not upate size. If you want to update size, please call notification_update_size().
845 * @param[in] noti notification handle
846 * @param[in] size double type size.
847 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
848 * @retval NOTIFICATION_ERROR_NONE - success
849 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
855 #include <notification.h>
858 notification_h noti = NULL;
859 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
861 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
866 noti_err = notification_set_size(noti, 0.0);
867 if(noti_err != NOTIFICATION_ERROR_NONE) {
868 notification_free(noti);
874 notification_error_e notification_set_size(notification_h noti,
878 * @brief This function get progress size.
881 * @param[in] noti notification handle
882 * @param[out] size progress size
883 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
884 * @retval NOTIFICATION_ERROR_NONE - success
885 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
891 #include <notification.h>
894 notification_h noti = NULL;
895 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
898 noti_err = notification_get_size(noti, &size);
899 if(noti_err != NOTIFICATION_ERROR_NONE) {
905 notification_error_e notification_get_size(notification_h noti,
909 * @brief This function set initial progress for ongoing type.
910 * @details After notification_insert, it does not upate progress. If you want to update progress, please call notification_update_progress().
912 * @param[in] noti notification handle
913 * @param[in] percentage progress percentage
914 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
915 * @retval NOTIFICATION_ERROR_NONE - success
916 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
922 #include <notification.h>
925 notification_h noti = NULL;
926 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
928 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
933 noti_err = notification_set_progress(noti, 0.0);
934 if(noti_err != NOTIFICATION_ERROR_NONE) {
935 notification_free(noti);
941 notification_error_e notification_set_progress(notification_h noti,
945 * @brief This function get progress percentage.
948 * @param[in] noti notification handle
949 * @param[out] percentage progress percentage
950 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
951 * @retval NOTIFICATION_ERROR_NONE - success
952 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
958 #include <notification.h>
961 notification_h noti = NULL;
962 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
963 double percentage = 0.0;
965 noti_err = notification_get_progress(noti, &percentage);
966 if(noti_err != NOTIFICATION_ERROR_NONE) {
972 notification_error_e notification_get_progress(notification_h noti,
976 * @brief This function set caller_pkgname.
977 * @details caller_pkgname is set automatically when notification_new. We are not recommend to use this API.
979 * @param[in] noti notification handle
980 * @param[in] pkgname caller package name
981 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
982 * @retval NOTIFICATION_ERROR_NONE - success
983 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
989 #include <notification.h>
992 notification_h noti = NULL;
993 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
995 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1000 noti_err = notification_set_pkgname(noti, "org.tizen.phone");
1001 if(noti_err != NOTIFICATION_ERROR_NONE) {
1002 notification_free(noti);
1008 notification_error_e notification_set_pkgname(notification_h noti,
1009 const char *pkgname);
1012 * @brief This function get caller pkgname.
1015 * @param[in] noti notification handle
1016 * @param[out] pkgname caller package name
1017 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1018 * @retval NOTIFICATION_ERROR_NONE - success
1019 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1025 #include <notification.h>
1028 notification_h noti = NULL;
1029 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1030 char *pkgname = NULL;
1032 noti_err = notification_get_pkgname(noti, &pkgname);
1033 if(noti_err != NOTIFICATION_ERROR_NONE) {
1039 notification_error_e notification_get_pkgname(notification_h noti,
1043 * @brief This function set layout type of notification
1044 * @details caller can set displaying layout of notification with this API
1046 * @param[in] noti notification handle
1047 * @param[in] layout type
1048 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1049 * @retval NOTIFICATION_ERROR_NONE - success
1050 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1053 * @see #notification_ly_type_e
1055 notification_error_e notification_set_layout(notification_h noti,
1056 notification_ly_type_e layout);
1059 * @brief This function get layout type of notification
1062 * @param[in] noti notification handle
1063 * @param[out] layout type of notification
1064 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1065 * @retval NOTIFICATION_ERROR_NONE - success
1066 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1069 * @see #notification_ly_type_e
1071 notification_error_e notification_get_layout(notification_h noti,
1072 notification_ly_type_e *layout);
1075 * @brief This function set application badge count.
1078 * @param[in] pkgname If NULL, caller pkgname is set internally.
1079 * @param[in] group_id group id
1080 * @param[in] count badge count
1081 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1082 * @retval NOTIFICATION_ERROR_NONE - success
1083 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1088 #include <notification.h>
1091 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1093 noti_err = notification_set_badge(NULL, NOTIFICATION_GROUP_ID_NONE, 5);
1094 if(noti_err != NOTIFICATION_ERROR_NONE) {
1100 notification_error_e notification_set_badge(const char *pkgname,
1101 int group_id, int count);
1104 * @brief This function get application badge count.
1107 * @param[in] pkgname If NULL, caller pkgname is set internally.
1108 * @param[in] group_id group id
1109 * @param[out] count badge count
1110 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1111 * @retval NOTIFICATION_ERROR_NONE - success
1112 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1117 #include <notification.h>
1120 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1123 noti_err = notification_get_badge(NULL, NOTIFICATION_GROUP_ID_NONE, &count);
1124 if(noti_err != NOTIFICATION_ERROR_NONE) {
1130 notification_error_e notification_get_badge(const char *pkgname,
1131 int group_id, int *count);
1134 * @brief This function get Group ID and Private ID
1137 * @param[in] noti notification handle
1138 * @param[out] group_id Group ID
1139 * @param[out] priv_id Private ID
1140 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1141 * @retval NOTIFICATION_ERROR_NONE - success
1142 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1148 #include <notification.h>
1151 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1152 int group_id, priv_id;
1154 noti_err = notification_get_id(noti, &group_id, &priv_id);
1155 if(noti_err != NOTIFICATION_ERROR_NONE) {
1161 notification_error_e notification_get_id(notification_h noti,
1162 int *group_id, int *priv_id);
1165 * @brief This function get notification type
1168 * @param[in] noti notification handle
1169 * @param[out] type notification type
1170 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1171 * @retval NOTIFICATION_ERROR_NONE - success
1172 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1178 #include <notification.h>
1181 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1182 notification_type_e type;
1184 noti_err = notification_get_type(noti, &type);
1185 if(noti_err != NOTIFICATION_ERROR_NONE) {
1191 notification_error_e notification_get_type(notification_h noti,
1192 notification_type_e * type);
1195 * @brief This function insert notification data.
1196 * @details Notification data is inserted to DB and then notification data is displaying display application.
1197 * When notification_new() call, if priv_id is NOTIFICATION_PRIV_ID_NONE, priv_id is return internally set priv_id.
1199 * @param[in] noti notification handle
1200 * @param[out] priv_id private ID
1201 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1202 * @retval NOTIFICATION_ERROR_NONE - success
1203 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1204 * @pre notification_new()
1205 * @post notification_free()
1206 * @see #notification_h
1209 #include <notification.h>
1212 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1214 noti_err = notification_insert(noti, NULL);
1215 if(noti_err != NOTIFICATION_ERROR_NONE) {
1221 notification_error_e notification_insert(notification_h noti,
1225 * @brief This function update notification data.
1226 * @details Display application update UI.
1228 * @param[in] noti notification handle that is created by notification_new().
1229 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1230 * @retval NOTIFICATION_ERROR_NONE - success
1231 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1232 * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
1235 * @see #notification_h
1238 #include <notification.h>
1241 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1243 noti_err = notification_update(NULL);
1244 if(noti_err != NOTIFICATION_ERROR_NONE) {
1250 notification_error_e notification_update(notification_h noti);
1253 * @brief This function clear all notification of type.
1254 * @details Not recommand API. Only for notification tray's clear button operation.
1256 * @param[in] type notification type
1257 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1258 * @retval NOTIFICATION_ERROR_NONE - success
1259 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1262 * @see #notification_type_e
1265 #include <notification.h>
1268 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1270 noti_err = notifiation_clear(NOTIFICATION_TYPE_NOTI);
1271 if(noti_err != NOTIFICATION_ERROR_NONE) {
1277 notification_error_e notifiation_clear(notification_type_e type);
1280 * @brief This function delete notification by type.
1281 * @details If pkgname is NULL, caller_pkgname is set internally.
1283 * @param[in] pkgname caller application package name or NULL
1284 * @param[in] type notification type
1285 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1286 * @retval NOTIFICATION_ERROR_NONE - success
1287 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1293 #include <notification.h>
1296 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1298 noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
1299 if(noti_err != NOTIFICATION_ERROR_NONE) {
1305 notification_error_e notification_delete_all_by_type(const char *pkgname,
1306 notification_type_e type);
1309 * @brief This function delete group notification data by group ID.
1310 * @details If pkgname is NULL, caller_pkgname is set internally.
1312 * @param[in] pkgname caller application package name or NULL
1313 * @param[in] type notification type
1314 * @param[in] group_id group ID
1315 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1316 * @retval NOTIFICATION_ERROR_NONE - success
1317 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1323 #include <notification.h>
1326 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1328 noti_err = notification_delete_group_by_group_id(NULL, NOTIFICATION_TYPE_NOTI, APP_GROUP_ID);
1329 if(noti_err != NOTIFICATION_ERROR_NONE) {
1335 notification_error_e notification_delete_group_by_group_id(const char *pkgname,
1336 notification_type_e type,
1340 * @brief This function delete group notification data that include priv_id.
1341 * @details If pkgname is NULL, caller_pkgname is set internally.
1343 * @param[in] pkgname caller application package name or NULL
1344 * @param[in] type notification type
1345 * @param[in] priv_id priv ID
1346 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1347 * @retval NOTIFICATION_ERROR_NONE - success
1348 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1354 #include <notification.h>
1357 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1359 noti_err = notification_delete_group_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
1360 if(noti_err != NOTIFICATION_ERROR_NONE) {
1366 notification_error_e notification_delete_group_by_priv_id(const char *pkgname,
1367 notification_type_e type,
1371 * @brief This function delete notification data that private ID is priv_id.
1372 * @details If pkgname is NULL, caller_pkgname is set internally.
1374 * @param[in] pkgname caller application package name or NULL
1375 * @param[in] type notification type
1376 * @param[in] priv_id priv ID
1377 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1378 * @retval NOTIFICATION_ERROR_NONE - success
1379 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1385 #include <notification.h>
1388 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1390 noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
1391 if(noti_err != NOTIFICATION_ERROR_NONE) {
1397 notification_error_e notification_delete_by_priv_id(const char *pkgname,
1398 notification_type_e type,
1402 * @brief This function delete notification data from DB
1403 * @details notification_delete() remove notification data from DB and notification_free release menory of notification data.
1405 * @param[in] noti notification handle
1406 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1407 * @retval NOTIFICATION_ERROR_NONE - success
1408 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1411 * @see #notification_h
1414 #include <notification.h>
1417 notificaton_h noti = NULL;
1418 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1422 noti_err = notification_delete(noti);
1423 if(noti_err != NOTIFICATION_ERROR_NONE) {
1430 notification_error_e notification_delete(notification_h noti);
1433 * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
1434 * @details Display application update UI.
1436 * @param[in] noti notification handle or NULL if priv_id is valid
1437 * @param[in] priv_id private ID
1438 * @param[in] progress % value of progressive data
1439 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1440 * @retval NOTIFICATION_ERROR_NONE - success
1441 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1446 #include <notification.h>
1449 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1451 noti_err = notification_update_progress(NULL, APP_NOTI_PRIV_ID, 0.6);
1452 if(noti_err != NOTIFICATION_ERROR_NONE) {
1458 notification_error_e notification_update_progress(notification_h noti,
1463 * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
1464 * @details Display application update UI.
1466 * @param[in] noti notification handle or NULL if priv_id is valid
1467 * @param[in] priv_id private ID
1468 * @param[in] size bytes of progressive data
1469 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1470 * @retval NOTIFICATION_ERROR_NONE - success
1471 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1476 #include <notification.h>
1479 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1481 noti_err = notification_update_size(NULL, APP_NOTI_PRIV_ID, 3000000);
1482 if(noti_err != NOTIFICATION_ERROR_NONE) {
1488 notification_error_e notification_update_size(notification_h noti,
1489 int priv_id, double size);
1491 notification_error_e notification_update_content(notification_h noti,
1493 const char *content);
1496 * @brief This function create internal structure data and return notification handle.
1497 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1498 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1499 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1500 * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT,
1501 * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
1502 * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
1503 * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
1505 * @param[in] type notification type
1506 * @param[in] group_id Group ID
1507 * @param[in] priv_id Priv ID
1508 * @return notification handle(#notification_h) if success, NULL if failure.
1509 * @retval #notification_h - success
1510 * @retval NULL - failure
1513 * @see #notification_type_e
1514 * @see #notification_h
1517 #include <notification.h>
1520 notification_h noti = NULL;
1522 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1530 notification_h notification_new(notification_type_e type, int group_id,
1534 * @brief This function create internal structure data and return notification handle.
1535 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1536 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1537 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1539 * @param[in] type notification type
1540 * @return notification handle(#notification_h) if success, NULL if failure.
1541 * @retval #notification_h - success
1542 * @retval NULL - failure
1545 * @see #notification_type_e
1546 * @see #notification_h
1549 #include <notification.h>
1552 notification_h noti = NULL;
1554 noti = notification_create(NOTIFICATION_TYPE_NOTI);
1562 notification_h notification_create(notification_type_e type);
1565 * @brief This function create internal structure data and return notification handle.
1566 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1567 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1568 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1569 * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT,
1570 * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
1571 * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
1572 * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
1574 * @param[in] type notification type
1575 * @param[in] group_id Group ID
1576 * @param[in] priv_id Priv ID
1577 * @return notification handle(#notification_h) if success, NULL if failure.
1578 * @retval #notification_h - success
1579 * @retval NULL - failure
1582 * @see #notification_type_e
1583 * @see #notification_h
1586 #include <notification.h>
1589 notification_h noti = NULL;
1591 noti = notification_load(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1599 notification_h notification_load(char *pkgname,
1603 * @brief This function create notification clone.
1604 * @details Newly created notification handle is returned.
1605 * @remarks This clone notification handle should be call notification_free().
1606 * @param[in] noti notification handle
1607 * @param[out] clone newly created notification handle that has same with input noti.
1608 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1609 * @retval NOTIFICATION_ERROR_NONE - success
1610 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1613 * @see #notification_type_e
1614 * @see #notification_h
1617 #include <notification.h>
1620 notification_h noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1621 notification_h clone = NULL;
1623 notification_clone(noti, &clone);
1628 notification_error_e notification_clone(notification_h noti, notification_h *clone);
1631 * @brief This function free internal structure data of notification handle.
1632 * @details Internal data of notification handle is released. Notification data that inserted is not deleted.
1634 * @param[in] noti notification handle
1635 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1636 * @retval NOTIFICATION_ERROR_NONE - success
1637 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1638 * @pre notification_new()
1640 * @see #notification_h
1643 #include <notification.h>
1646 notification_h noti = NULL;
1647 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1649 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1655 noti_err = notification_free(noti);
1656 if(noti_err != NOTIFICATION_ERROR_NONE) {
1662 notification_error_e notification_free(notification_h noti);
1665 * @brief This function register notification chagned callback.
1668 * @param[in] changed_cb callback function
1669 * @param[in] user_data user data
1670 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1671 * @retval NOTIFICATION_ERROR_NONE - success
1672 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1673 * @pre notification_new()
1675 * @see notification_unresister_changed_cb()
1678 #include <notification.h>
1681 noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1682 if(noti_err != NOTIFICATION_ERROR_NONE) {
1688 notification_error_e
1689 notification_resister_changed_cb(
1690 void (*changed_cb)(void *data, notification_type_e type),
1694 * @brief This function unregister notification chagned callback.
1697 * @param[in] changed_cb callback function
1698 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1699 * @retval NOTIFICATION_ERROR_NONE - success
1700 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1701 * @pre notification_new()
1703 * @see notification_resister_changed_cb()
1706 #include <notification.h>
1709 noti_err = notification_unresister_changed_cb(app_changed_cb);
1710 if(noti_err != NOTIFICATION_ERROR_NONE) {
1716 notification_error_e
1717 notification_unresister_changed_cb(
1718 void (*changed_cb)(void *data, notification_type_e type));
1721 * @brief This function register notification chagned callback.
1724 * @param[in] changed_cb callback function
1725 * @param[in] user_data user data
1726 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1727 * @retval NOTIFICATION_ERROR_NONE - success
1728 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1729 * @pre notification_new()
1731 * @see notification_unresister_changed_cb()
1734 #include <notification.h>
1737 noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1738 if(noti_err != NOTIFICATION_ERROR_NONE) {
1744 notification_error_e
1745 notification_register_detailed_changed_cb(
1746 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1750 * @brief This function unregister notification chagned callback.
1753 * @param[in] changed_cb callback function
1754 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1755 * @retval NOTIFICATION_ERROR_NONE - success
1756 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1757 * @pre notification_new()
1759 * @see notification_resister_changed_cb()
1762 #include <notification.h>
1765 noti_err = notification_unresister_changed_cb(app_changed_cb);
1766 if(noti_err != NOTIFICATION_ERROR_NONE) {
1772 notification_error_e
1773 notification_unregister_detailed_changed_cb(
1774 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op_type_e op_type, int *list_priv_id, int num_priv_id),
1778 * @brief This function get notification data count.
1779 * @details Count is the result of the conditions that type, pkgname, group_id, priv_id.
1781 * @param[in] type notification type
1782 * @param[in] pkgname caller application package name
1783 * @param[in] group_id group id
1784 * @param[in] priv_id private id
1785 * @param[out] count notification data number
1786 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1787 * @retval NOTIFICATION_ERROR_NONE - success
1788 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1791 * @see #notification_type_e
1794 #include <notification.h>
1797 notification_list_h noti_list = NULL;
1798 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1801 noti_err = notification_get_count(NOTIFICATION_TYPE_NONE, NULL, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE, &count);
1802 if(noti_err != NOTIFICATION_ERROR_NONE) {
1808 notification_error_e notification_get_count(notification_type_e type,
1809 const char *pkgname,
1810 int group_id, int priv_id,
1814 * @brief This function will be deprecated.
1815 * @see notification_get_grouping_list()
1818 notification_error_e notification_get_list(notification_type_e type,
1820 notification_list_h * list);
1823 * @brief This function return notification grouping list handle.
1824 * @details If count is -1, all of notification list is returned.
1826 * @param[in] type notification type
1827 * @param[in] count returned notification data number
1828 * @param[out] list notification list handle
1829 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1830 * @retval NOTIFICATION_ERROR_NONE - success
1831 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1834 * @see #notification_list_h
1837 #include <notification.h>
1840 notification_list_h noti_list = NULL;
1841 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1843 noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, ¬i_list);
1844 if(noti_err != NOTIFICATION_ERROR_NONE) {
1850 notification_error_e notification_get_grouping_list(notification_type_e type,
1852 notification_list_h *list);
1855 * @brief This function return notification detail list handle of grouping data.
1856 * @details If count is -1, all of notification list is returned.
1858 * @param[in] pkgname caller application package name
1859 * @param[in] group_id group id
1860 * @param[in] priv_id private id
1861 * @param[in] count returned notification data number
1862 * @param[out] list notification list handle
1863 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1864 * @retval NOTIFICATION_ERROR_NONE - success
1865 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1868 * @see #notification_list_h
1871 #include <notification.h>
1874 notification_list_h noti_list = NULL;
1875 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1877 noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, ¬i_list);
1878 if(noti_err != NOTIFICATION_ERROR_NONE) {
1884 notification_error_e notification_get_detail_list(const char *pkgname,
1888 notification_list_h *list);
1891 * @brief This function release notification list.
1894 * @param[in] list notification list handle
1895 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1896 * @retval NOTIFICATION_ERROR_NONE - success
1897 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1898 * @pre notification_get_grouping_list() or notification_get_detail_list ()
1900 * @see #notification_list_h
1903 #include <notification.h>
1906 notification_list_h noti_list = NULL;
1907 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1911 noti_err = notification_free_list(noti_list);
1912 if(noti_err != NOTIFICATION_ERROR_NONE) {
1918 notification_error_e notification_free_list(notification_list_h list);
1925 * @brief You can get the information about notification operation using this function
1928 * @param[in] list notification list handle
1929 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1930 * @retval NOTIFICATION_ERROR_NONE - success
1931 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1932 * @pre notification_get_grouping_list() or notification_get_detail_list ()
1934 * @see #notification_op
1936 notification_error_e notification_op_get_data(notification_op *noti_op,
1937 notification_op_data_type_e type,
1946 #endif /* __NOTIFICATION_H__ */