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>
32 #include <notification_setting.h>
39 * @file notification.h
40 * @brief This file contains the notification APIs
44 * @addtogroup NOTIFICATION_MODULE
49 * @brief Set absolute path for image file to display on notification view
52 * @param[in] noti notification handle
53 * @param[in] type notification image type
54 * @param[in] image_path image file full path
55 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
56 * @retval NOTIFICATION_ERROR_NONE - success
57 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
58 * @pre Notification handle should be created by notification_new()
60 * @see #notification_image_type_e
61 * @see notification_new()
64 #include <notification.h>
67 notification_h noti = NULL;
68 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
70 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
75 noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH);
76 if(noti_err != NOTIFICATION_ERROR_NONE) {
77 notification_free(noti);
83 notification_error_e notification_set_image(notification_h noti,
84 notification_image_type_e type,
85 const char *image_path);
88 * @brief Get absolute path for image file
90 * @remarks Do not free image_path. It will be freed when notification_free() or notification_free_list().
91 * @param[in] noti notification handle
92 * @param[in] type notification image type
93 * @param[out] image_path image file full path
94 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
95 * @retval NOTIFICATION_ERROR_NONE - success
96 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
97 * @pre Notification handle should be created by notification_new()
99 * @see #notification_image_type_e
100 * @see notification_new()
103 #include <notification.h>
106 char *image_path = NULL;
107 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
109 noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
110 if(noti_err != NOTIFICATION_ERROR_NONE) {
116 notification_error_e notification_get_image(notification_h noti,
117 notification_image_type_e type,
121 * @brief Set a timestamp
122 * @details If input_time is 0, time information is set by current time.
124 * @param[in] noti notification handle
125 * @param[in] input_time input time
126 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
127 * @retval NOTIFICATION_ERROR_NONE - success
128 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
129 * @pre Notification handle should be created by notification_new()
131 * @see notification_new()
134 #include <notification.h>
137 notification_h noti = NULL;
138 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
140 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
145 noti_err = notification_set_time(noti, time(NULL));
146 if(noti_err != NOTIFICATION_ERROR_NONE) {
147 notification_free(noti);
153 notification_error_e notification_set_time(notification_h noti,
157 * @brief Get a timestamp
158 * @details If ret_time is 0, time information is not set before.
160 * @param[in] noti notification handle
161 * @param[out] ret_time return time value
162 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
163 * @retval NOTIFICATION_ERROR_NONE - success
164 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
165 * @pre Notification handle should be created by notification_new()
167 * @see notification_new()
170 #include <notification.h>
174 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
176 noti_err = notification_get_time(noti, &ret_time);
177 if(noti_err != NOTIFICATION_ERROR_NONE) {
183 notification_error_e notification_get_time(notification_h noti,
187 * @brief Get timestamp that the notification is inserted
188 * @details If ret_time is 0, this notification data is not inserted before.
190 * @param[in] noti notification handle
191 * @param[out] ret_time return time value
192 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
193 * @retval NOTIFICATION_ERROR_NONE - success
194 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
200 #include <notification.h>
204 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
206 noti_err = notification_get_insert_time(noti, &ret_time);
207 if(noti_err != NOTIFICATION_ERROR_NONE) {
213 notification_error_e notification_get_insert_time(notification_h noti,
217 * @brief Set text to display on the notification view
218 * @details Set title, content string. If text is formated data(only support %d, %f, %s), type - value pair should be set.
219 * If %d, type NOTIFICATION_VARIABLE_TYPE_INT and value is integer value.
220 * If %f, type NOTIFICATION_VARIABLE_TYPE_DOUBLE and value is double value.
221 * If %s, type NOTIFICATION_VARIABLE_TYPE_STRING and value is character string.
222 * If type is NOTIFICATION_VARIABLE_TYPE_COUNT, notification count is displaying with text.
223 * If value is NOTIFICATION_COUNT_POS_LEFT, count is displaying at the left of the text.
224 * If value is NOTIFICATION_COUNT_POS_IN, count is displaying in the text that text has %d format.
225 * If value is NOTIFICATION_COUNT_POS_RIGHT, count is displaying at the right of the text.
226 * Variable parameter should be terminated NOTIFICATION_VARIABLE_TYPE_NONE.
228 * @param[in] noti notification handle
229 * @param[in] type notification text type
230 * @param[in] text basic text
231 * @param[in] key text key for localization
232 * @param[in] args_type variable parameter that type - value pair.
233 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
234 * @retval NOTIFICATION_ERROR_NONE - success
235 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
236 * @pre notification handle should be created by notification_new().
241 #include <notification.h>
244 notification_h noti = NULL;
245 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
247 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
252 noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, "I'm Title", "IDS_APP_BODY_IM_TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
253 if(noti_err != NOTIFICATION_ERROR_NONE) {
254 notification_free(noti);
260 notification_error_e notification_set_text(notification_h noti,
261 notification_text_type_e type,
267 * @brief Get the text from the notification handle
270 * @param[in] noti notification handle
271 * @param[in] type notification text type.
272 * @param[out] text text
273 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
274 * @retval NOTIFICATION_ERROR_NONE - success
275 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
281 #include <notification.h>
284 notification_h noti = NULL;
285 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
288 noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
289 if(noti_err != NOTIFICATION_ERROR_NONE) {
295 notification_error_e notification_get_text(notification_h noti,
296 notification_text_type_e type,
300 * @brief Set a timestamp to display on the notification view
301 * @details the timestamp will be converted to formatted string and it will be displayed on the setted text area
303 * @param[in] noti notification handle
304 * @param[in] type notification text type
305 * @param[in] time time stamp
306 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
307 * @retval NOTIFICATION_ERROR_NONE - success
308 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
309 * @pre notification handle should be created by notification_new().
313 notification_error_e notification_set_time_to_text(notification_h noti, notification_text_type_e type,
317 * @brief Get a timestamp from the notification handle
320 * @param[in] noti notification handle
321 * @param[in] type notification text type
322 * @param[in] time pointer of time stamp
323 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
324 * @retval NOTIFICATION_ERROR_NONE - success
325 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
326 * @pre notification handle should be created by notification_new().
330 notification_error_e notification_get_time_from_text(notification_h noti, notification_text_type_e type,
334 * @brief Set text domain to localize the notification
337 * @param[in] noti notification handle
338 * @param[in] domain text domain
339 * @param[in] dir text dir
340 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
341 * @retval NOTIFICATION_ERROR_NONE - success
342 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
348 #include <notification.h>
351 notification_h noti = NULL;
352 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
354 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
359 noti_err = notification_set_text_domain(noti, PACKAGE, LOCALEDIR);
360 if(noti_err != NOTIFICATION_ERROR_NONE) {
361 notification_free(noti);
367 notification_error_e notification_set_text_domain(notification_h noti,
372 * @brief Get text domain from the notification handle
374 * @remarks Do not free returned domain and dir. These are freed when notification_free or notification_free_list.
375 * @param[in] noti notification handle
376 * @param[out] domain domain
377 * @param[out] dir locale dir
378 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
379 * @retval NOTIFICATION_ERROR_NONE - success
380 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
386 #include <notification.h>
389 notification_h noti = NULL;
390 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
394 noti_err = notification_get_text_domain(noti, &domain, &dir);
395 if(noti_err != NOTIFICATION_ERROR_NONE) {
401 notification_error_e notification_get_text_domain(notification_h noti,
406 * @brief Set sound option for the notification
409 * @param[in] noti notification handle
410 * @param[in] type notification sound type
411 * @param[in] path user sound file path
412 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
413 * @retval NOTIFICATION_ERROR_NONE - success
414 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
420 #include <notification.h>
423 notification_h noti = NULL;
424 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
426 noti_err = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL);
427 if(noti_err != NOTIFICATION_ERROR_NONE) {
433 notification_error_e notification_set_sound(notification_h noti,
434 notification_sound_type_e type,
438 * @brief Get sound option from the notification handle
441 * @param[in] noti notification handle
442 * @param[out] type notification sound type
443 * @param[out] path user sound file path
444 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
445 * @retval NOTIFICATION_ERROR_NONE - success
446 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
452 #include <notification.h>
455 notification_h noti = NULL;
456 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
457 notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE;
459 noti_err = notification_get_sound(noti, &type, NULL);
460 if(noti_err != NOTIFICATION_ERROR_NONE) {
466 notification_error_e notification_get_sound(notification_h noti,
467 notification_sound_type_e *type,
471 * @brief Set vibrate option for the notification
474 * @param[in] noti notification handle
475 * @param[in] type notification vibration type
476 * @param[in] path user vibration file path
477 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
478 * @retval NOTIFICATION_ERROR_NONE - success
479 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
485 #include <notification.h>
488 notification_h noti = NULL;
489 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
491 noti_err = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL);
492 if(noti_err != NOTIFICATION_ERROR_NONE) {
498 notification_error_e notification_set_vibration(notification_h noti,
499 notification_vibration_type_e type,
503 * @brief Get vibrate option from the notification handle
506 * @param[in] noti notification handle
507 * @param[out] type notification sound type
508 * @param[out] path user vibration file path
509 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
510 * @retval NOTIFICATION_ERROR_NONE - success
511 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
517 #include <notification.h>
520 notification_h noti = NULL;
521 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
522 notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE;
524 noti_err = notification_get_vibration(noti, &type, NULL);
525 if(noti_err != NOTIFICATION_ERROR_NONE) {
531 notification_error_e notification_get_vibration(notification_h noti,
532 notification_vibration_type_e *type,
536 * @brief Set option of displaying the LED
539 * @param[in] noti notification handle
540 * @param[in] operation led notification operation
541 * @param[in] led_argb notification led color
542 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
543 * @retval NOTIFICATION_ERROR_NONE - success
544 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
550 #include <notification.h>
553 notification_h noti = NULL;
554 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
556 noti_err = notification_set_led(noti, NOTIFICATION_LED_TYPE_DEFAULT, NULL);
557 if(noti_err != NOTIFICATION_ERROR_NONE) {
563 notification_error_e notification_set_led(notification_h noti,
564 notification_led_op_e operation,
568 * @brief Get option of displaying the LED from the notification handle
571 * @param[in] noti notification handle
572 * @param[out] operation led notification operation
573 * @param[out] led_argb notification led color
574 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
575 * @retval NOTIFICATION_ERROR_NONE - success
576 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
582 #include <notification.h>
585 notification_h noti = NULL;
586 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
587 notification_led_type_e type = NOTIFICATION_LED_TYPE_NONE;
589 noti_err = notification_get_led(noti, &type, NULL);
590 if(noti_err != NOTIFICATION_ERROR_NONE) {
596 notification_error_e notification_get_led(notification_h noti,
597 notification_led_op_e *operation,
601 * @brief Set time period of flashing the LED
604 * @param[in] noti notification handle
605 * @param[in] on_ms time for turning on the LED
606 * @param[in] off_ms time for turning on the LED
607 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
608 * @retval NOTIFICATION_ERROR_NONE - success
609 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
615 #include <notification.h>
618 notification_h noti = NULL;
619 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
621 noti_err = notification_set_led_time_period(noti, 100, 100);
622 if(noti_err != NOTIFICATION_ERROR_NONE) {
628 notification_error_e notification_set_led_time_period(notification_h noti,
629 int on_ms, int off_ms);
632 * @brief Get time period of flashing the LED from the notification handle
635 * @param[in] noti notification handle
636 * @param[out] on_ms time for turning on the LED
637 * @param[out] off_ms time for turning on the LED
638 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
639 * @retval NOTIFICATION_ERROR_NONE - success
640 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
646 #include <notification.h>
649 notification_h noti = NULL;
650 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
654 noti_err = notification_get_led_time_period(noti, &led_on_ms, &led_off_ms);
655 if(noti_err != NOTIFICATION_ERROR_NONE) {
661 notification_error_e notification_get_led_time_period(notification_h noti,
662 int *on_ms, int *off_ms);
665 * @brief Set execution option for a notification
666 * @details When notification data selected in display application, application launched by appsvc_run_service with service_handle.
668 * @param[in] noti notification handle
669 * @param[in] type notification execute type
670 * @param[in] text basic text for button
671 * @param[in] key value for localizaed text
672 * @param[in] service_handle appsvc bundle data
673 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
674 * @retval NOTIFICATION_ERROR_NONE - success
675 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
681 #include <notification.h>
684 notification_h noti = NULL;
685 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
691 appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
692 appsvc_set_uri(b,"http://www.samsung.com");
694 noti_err = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b);
695 if(noti_err != NOTIFICATION_ERROR_NONE) {
696 notification_free(noti);
704 notification_error_e notification_set_execute_option(notification_h noti,
705 notification_execute_type_e type,
708 bundle *service_handle);
711 * @brief Get execution option from the notification handle
714 * @param[in] noti notification handle
715 * @param[in] type notification execute type
716 * @param[out] text text for button
717 * @param[out] service_handle appsvc bundle data
718 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
719 * @retval NOTIFICATION_ERROR_NONE - success
720 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
726 #include <notification.h>
729 notification_h noti = NULL;
730 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
735 noti_err = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, &b);
736 if(noti_err != NOTIFICATION_ERROR_NONE) {
737 notification_free(noti);
743 notification_error_e notification_get_execute_option(notification_h noti,
744 notification_execute_type_e type,
746 bundle **service_handle);
749 * @brief Set the property of the notification
752 * @param[in] noti notification handle
753 * @param[in] flags property with | operation
754 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
755 * @retval NOTIFICATION_ERROR_NONE - success
756 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
762 #include <notification.h>
765 notification_h noti = NULL;
766 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
769 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
774 noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
775 if(noti_err != NOTIFICATION_ERROR_NONE) {
776 notification_free(noti);
782 notification_error_e notification_set_property(notification_h noti,
786 * @brief Get the property of the notification from the notification handle
789 * @param[in] noti notification handle
790 * @param[out] flags notification property
791 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
792 * @retval NOTIFICATION_ERROR_NONE - success
793 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
799 #include <notification.h>
802 notification_h noti = NULL;
803 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
806 noti_err = notification_get_property(noti, &flags);
807 if(noti_err != NOTIFICATION_ERROR_NONE) {
813 notification_error_e notification_get_property(notification_h noti,
817 * @brief Set applications to display the notification
818 * @details All display application is enable(NOTIFICATION_DISPLAY_APP_ALL) if you are not call this API.
820 * @param[in] noti notification handle
821 * @param[in] applist with | operation
822 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
823 * @retval NOTIFICATION_ERROR_NONE - success
824 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
830 #include <notification.h>
833 notification_h noti = NULL;
834 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
837 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
842 noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
843 if(noti_err != NOTIFICATION_ERROR_NONE) {
844 notification_free(noti);
851 notification_error_e notification_set_display_applist(notification_h noti,
855 * @brief Get application list to display the notification from the notification handle
858 * @param[in] noti notification handle
859 * @param[out] applist display application list.
860 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
861 * @retval NOTIFICATION_ERROR_NONE - success
862 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
868 #include <notification.h>
871 notification_h noti = NULL;
872 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
875 noti_err = notification_get_display_applist(noti, &applist);
876 if(noti_err != NOTIFICATION_ERROR_NONE) {
882 notification_error_e notification_get_display_applist(notification_h noti,
886 * @brief Set initial size for ongoing type.
887 * @details After notification_insert, it does not upate size. If you want to update size, please call notification_update_size().
889 * @param[in] noti notification handle
890 * @param[in] size double type size.
891 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
892 * @retval NOTIFICATION_ERROR_NONE - success
893 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
899 #include <notification.h>
902 notification_h noti = NULL;
903 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
905 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
910 noti_err = notification_set_size(noti, 0.0);
911 if(noti_err != NOTIFICATION_ERROR_NONE) {
912 notification_free(noti);
918 notification_error_e notification_set_size(notification_h noti,
922 * @brief Get progress size.
925 * @param[in] noti notification handle
926 * @param[out] size progress size
927 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
928 * @retval NOTIFICATION_ERROR_NONE - success
929 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
935 #include <notification.h>
938 notification_h noti = NULL;
939 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
942 noti_err = notification_get_size(noti, &size);
943 if(noti_err != NOTIFICATION_ERROR_NONE) {
949 notification_error_e notification_get_size(notification_h noti,
953 * @brief Set initial progress for ongoing type.
954 * @details After notification_insert, it does not upate progress. If you want to update progress, please call notification_update_progress().
956 * @param[in] noti notification handle
957 * @param[in] percentage progress percentage
958 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
959 * @retval NOTIFICATION_ERROR_NONE - success
960 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
966 #include <notification.h>
969 notification_h noti = NULL;
970 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
972 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
977 noti_err = notification_set_progress(noti, 0.0);
978 if(noti_err != NOTIFICATION_ERROR_NONE) {
979 notification_free(noti);
985 notification_error_e notification_set_progress(notification_h noti,
989 * @brief Get progress from the notification handle
991 * @remarks At the end of the operation, progress should be 1.0
992 * @param[in] noti notification handle
993 * @param[out] percentage progress percentage
994 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
995 * @retval NOTIFICATION_ERROR_NONE - success
996 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1002 #include <notification.h>
1005 notification_h noti = NULL;
1006 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1007 double percentage = 0.0;
1009 noti_err = notification_get_progress(noti, &percentage);
1010 if(noti_err != NOTIFICATION_ERROR_NONE) {
1016 notification_error_e notification_get_progress(notification_h noti,
1017 double *percentage);
1020 * @brief Set the package name of caller
1021 * @details caller_pkgname is set automatically when notification_new. We are not recommend to use this API.
1023 * @param[in] noti notification handle
1024 * @param[in] pkgname caller package name
1025 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1026 * @retval NOTIFICATION_ERROR_NONE - success
1027 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1033 #include <notification.h>
1036 notification_h noti = NULL;
1037 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1039 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1044 noti_err = notification_set_pkgname(noti, "com.samsung.phone");
1045 if(noti_err != NOTIFICATION_ERROR_NONE) {
1046 notification_free(noti);
1052 notification_error_e notification_set_pkgname(notification_h noti,
1053 const char *pkgname);
1056 * @brief Get the package name of caller from the notification handle
1059 * @param[in] noti notification handle
1060 * @param[out] pkgname caller package name
1061 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1062 * @retval NOTIFICATION_ERROR_NONE - success
1063 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1069 #include <notification.h>
1072 notification_h noti = NULL;
1073 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1074 char *pkgname = NULL;
1076 noti_err = notification_get_pkgname(noti, &pkgname);
1077 if(noti_err != NOTIFICATION_ERROR_NONE) {
1083 notification_error_e notification_get_pkgname(notification_h noti,
1087 * @brief Set the layout of the notification view
1088 * @details caller can set displaying layout of notification
1090 * @param[in] noti notification handle
1091 * @param[in] type of layout
1092 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1093 * @retval NOTIFICATION_ERROR_NONE - success
1094 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1097 * @see #notification_ly_type_e
1099 notification_error_e notification_set_layout(notification_h noti,
1100 notification_ly_type_e layout);
1103 * @brief Get the layout of the notification view from the notification handle
1106 * @param[in] noti notification handle
1107 * @param[out] type of layout
1108 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1109 * @retval NOTIFICATION_ERROR_NONE - success
1110 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1113 * @see #notification_ly_type_e
1115 notification_error_e notification_get_layout(notification_h noti,
1116 notification_ly_type_e *layout);
1119 * @brief Get Group ID and Private ID
1121 * @remarks ID is valid only after inserting the notification
1122 * @param[in] noti notification handle
1123 * @param[out] group_id Group ID
1124 * @param[out] priv_id Private ID
1125 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1126 * @retval NOTIFICATION_ERROR_NONE - success
1127 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1133 #include <notification.h>
1136 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1137 int group_id, priv_id;
1139 noti_err = notification_get_id(noti, &group_id, &priv_id);
1140 if(noti_err != NOTIFICATION_ERROR_NONE) {
1146 notification_error_e notification_get_id(notification_h noti,
1147 int *group_id, int *priv_id);
1150 * @brief Get the type of notification
1153 * @param[in] noti notification handle
1154 * @param[out] type notification type
1155 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1156 * @retval NOTIFICATION_ERROR_NONE - success
1157 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1163 #include <notification.h>
1166 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1167 notification_type_e type;
1169 noti_err = notification_get_type(noti, &type);
1170 if(noti_err != NOTIFICATION_ERROR_NONE) {
1176 notification_error_e notification_get_type(notification_h noti,
1177 notification_type_e * type);
1180 * @brief Insert a notification
1181 * @details A notification will be inserted to DB and then it will be appeared on the notification area
1182 * When notification_new() call, if priv_id is NOTIFICATION_PRIV_ID_NONE, priv_id is return internally set priv_id.
1184 * @param[in] noti notification handle
1185 * @param[out] priv_id private ID
1186 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1187 * @retval NOTIFICATION_ERROR_NONE - success
1188 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1189 * @pre notification_new()
1190 * @post notification_free()
1191 * @see #notification_h
1194 #include <notification.h>
1197 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1199 noti_err = notification_insert(noti, NULL);
1200 if(noti_err != NOTIFICATION_ERROR_NONE) {
1206 notification_error_e notification_insert(notification_h noti,
1210 * @brief Update notification data.
1211 * @details The updated notification will be appeared on the notification area
1213 * @param[in] noti notification handle that is created by notification_new().
1214 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1215 * @retval NOTIFICATION_ERROR_NONE - success
1216 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1217 * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
1220 * @see #notification_h
1223 #include <notification.h>
1226 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1228 noti_err = notification_update(NULL);
1229 if(noti_err != NOTIFICATION_ERROR_NONE) {
1235 notification_error_e notification_update(notification_h noti);
1238 * @brief Update a notification
1239 * @details The updated notification will be appeared on the notification area
1240 * @remarks This function update a notification in async manner
1241 * @param[in] noti notification handle that is created by notification_new().
1242 * @param[in] result_cb callback called when update completed
1243 * @param[in] user_data user data which you want to use in callback
1244 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1245 * @retval NOTIFICATION_ERROR_NONE - success
1246 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1247 * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
1250 * @see #notification_h
1253 #include <notification.h>
1256 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1258 noti_err = notification_update_async(NULL, result_cb, data);
1259 if(noti_err != NOTIFICATION_ERROR_NONE) {
1265 notification_error_e notification_update_async(notification_h noti,
1266 void (*result_cb)(int priv_id, int result, void *data), void *user_data);
1269 * @brief This function clear all notification of type.
1270 * @details Not recommand API. Only for notification tray's clear button operation.
1272 * @param[in] type notification type
1273 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1274 * @retval NOTIFICATION_ERROR_NONE - success
1275 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1278 * @see #notification_type_e
1281 #include <notification.h>
1284 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1286 noti_err = notifiation_clear(NOTIFICATION_TYPE_NOTI);
1287 if(noti_err != NOTIFICATION_ERROR_NONE) {
1293 notification_error_e notifiation_clear(notification_type_e type);
1296 * @brief Delete all the notifications of the type.
1297 * @details If pkgname is NULL, caller_pkgname is set internally.
1299 * @param[in] pkgname caller application package name or NULL
1300 * @param[in] type notification type
1301 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1302 * @retval NOTIFICATION_ERROR_NONE - success
1303 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1309 #include <notification.h>
1312 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1314 noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
1315 if(noti_err != NOTIFICATION_ERROR_NONE) {
1321 notification_error_e notification_delete_all_by_type(const char *pkgname,
1322 notification_type_e type);
1325 * @brief Delete a notification by priv_id.
1326 * @details If pkgname is NULL, caller_pkgname is set internally.
1328 * @param[in] pkgname caller application package name or NULL
1329 * @param[in] type notification type
1330 * @param[in] priv_id priv ID
1331 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1332 * @retval NOTIFICATION_ERROR_NONE - success
1333 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1339 #include <notification.h>
1342 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1344 noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
1345 if(noti_err != NOTIFICATION_ERROR_NONE) {
1351 notification_error_e notification_delete_by_priv_id(const char *pkgname,
1352 notification_type_e type,
1356 * @brief Delete a notification with the given handle
1357 * @details notification_delete() remove notification data from DB and notification_free release menory of notification data.
1359 * @param[in] noti notification handle
1360 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1361 * @retval NOTIFICATION_ERROR_NONE - success
1362 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1365 * @see #notification_h
1368 #include <notification.h>
1371 notificaton_h noti = NULL;
1372 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1376 noti_err = notification_delete(noti);
1377 if(noti_err != NOTIFICATION_ERROR_NONE) {
1384 notification_error_e notification_delete(notification_h noti);
1387 * @brief Update progress of inserted notification. Only for the ongoing notification(NOTIFICATION_TYPE_ONGOING)
1388 * @details notification view on notification area could be updated
1390 * @param[in] noti notification handle or NULL if priv_id is valid
1391 * @param[in] priv_id private ID
1392 * @param[in] progress % value of progressive data
1393 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1394 * @retval NOTIFICATION_ERROR_NONE - success
1395 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1400 #include <notification.h>
1403 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1405 noti_err = notification_update_progress(NULL, APP_NOTI_PRIV_ID, 0.6);
1406 if(noti_err != NOTIFICATION_ERROR_NONE) {
1412 notification_error_e notification_update_progress(notification_h noti,
1417 * @brief Update size of inserted notification data. Only for the ongoing notification(NOTIFICATION_TYPE_ONGOING)
1418 * @details notification view on notification area could be updated
1420 * @param[in] noti notification handle or NULL if priv_id is valid
1421 * @param[in] priv_id private ID
1422 * @param[in] size bytes of progressive data
1423 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1424 * @retval NOTIFICATION_ERROR_NONE - success
1425 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1430 #include <notification.h>
1433 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1435 noti_err = notification_update_size(NULL, APP_NOTI_PRIV_ID, 3000000);
1436 if(noti_err != NOTIFICATION_ERROR_NONE) {
1442 notification_error_e notification_update_size(notification_h noti,
1443 int priv_id, double size);
1446 * @brief Update content of inserted notification data. Only for the ongoing notification(NOTIFICATION_TYPE_ONGOING)
1447 * @details notification view on notification area could be updated
1449 * @param[in] noti notification handle or NULL if priv_id is valid
1450 * @param[in] priv_id private ID
1451 * @param[in] content text to update
1452 * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1453 * @retval NOTIFICATION_ERROR_NONE - success
1454 * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1459 #include <notification.h>
1462 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1464 noti_err = notification_update_content(NULL, APP_NOTI_PRIV_ID, "updated string");
1465 if(noti_err != NOTIFICATION_ERROR_NONE) {
1471 notification_error_e notification_update_content(notification_h noti,
1473 const char *content);
1476 * @brief Create internal structure data and return notification handle.
1477 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1478 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1479 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1480 * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT,
1481 * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
1482 * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
1483 * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
1485 * @param[in] type notification type
1486 * @param[in] group_id Group ID
1487 * @param[in] priv_id Priv ID
1488 * @return notification handle(#notification_h) if success, NULL if failure.
1489 * @retval #notification_h - success
1490 * @retval NULL - failure
1493 * @see #notification_type_e
1494 * @see #notification_h
1497 #include <notification.h>
1500 notification_h noti = NULL;
1502 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1510 notification_h notification_new(notification_type_e type, int group_id,
1514 * @brief This function create internal structure data and return notification handle.
1515 * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1516 * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1517 * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1519 * @param[in] type notification type
1520 * @return notification handle(#notification_h) if success, NULL if failure.
1521 * @retval #notification_h - success
1522 * @retval NULL - failure
1525 * @see #notification_type_e
1526 * @see #notification_h
1529 #include <notification.h>
1532 notification_h noti = NULL;
1534 noti = notification_create(NOTIFICATION_TYPE_NOTI);
1542 notification_h notification_create(notification_type_e type);
1545 * @brief load a notification from the notification DB with private id
1548 * @param[in] type notification type
1549 * @param[in] group_id Group ID
1550 * @param[in] priv_id Priv ID
1551 * @return notification handle(#notification_h) if success, NULL if failure.
1552 * @retval #notification_h - success
1553 * @retval NULL - failure
1556 * @see #notification_type_e
1557 * @see #notification_h
1560 #include <notification.h>
1563 notification_h noti = NULL;
1565 noti = notification_load("org.tizen.app", priv_id);
1573 notification_h notification_load(char *pkgname,
1577 * @brief Create a notification clone
1578 * @details Newly created notification handle is returned.
1579 * @remarks This clone notification handle should be call notification_free().
1580 * @param[in] noti notification handle
1581 * @param[out] clone newly created notification handle that has same with input noti.
1582 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1583 * @retval NOTIFICATION_ERROR_NONE - success
1584 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1587 * @see #notification_type_e
1588 * @see #notification_h
1591 #include <notification.h>
1594 notification_h noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1595 notification_h clone = NULL;
1597 notification_clone(noti, &clone);
1602 notification_error_e notification_clone(notification_h noti, notification_h *clone);
1605 * @brief Free internal structure data of notification handle.
1606 * @details Internal data of notification handle is released. Notification data that inserted is not deleted.
1608 * @param[in] noti notification handle
1609 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1610 * @retval NOTIFICATION_ERROR_NONE - success
1611 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1612 * @pre notification_new()
1614 * @see #notification_h
1617 #include <notification.h>
1620 notification_h noti = NULL;
1621 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1623 noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1629 noti_err = notification_free(noti);
1630 if(noti_err != NOTIFICATION_ERROR_NONE) {
1636 notification_error_e notification_free(notification_h noti);
1643 * @addtogroup NOTIFICATION_LIST
1648 * @brief This function return notification list handle.
1649 * @details If count is -1, all of notification list is returned.
1651 * @param[in] type notification type
1652 * @param[in] count returned notification data number
1653 * @param[out] NOTIFICATION_ERROR_NONE if success, other value if failure.
1654 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1655 * @retval NOTIFICATION_ERROR_NONE - success
1656 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1659 * @see #notification_list_h
1662 #include <notification.h>
1665 notification_list_h noti_list = NULL;
1666 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1668 noti_err = notification_get_list(NOTIFICATION_TYPE_NONE, -1, ¬i_list);
1669 if(noti_err != NOTIFICATION_ERROR_NONE) {
1675 notification_error_e notification_get_list(notification_type_e type,
1677 notification_list_h * list);
1680 * @brief This function will be deprecated.
1681 * @see notification_get_grouping_list()
1684 notification_error_e notification_get_grouping_list(notification_type_e type,
1686 notification_list_h *list);
1689 * @brief This function return notification detail list handle of grouping data.
1690 * @details If count is -1, all of notification list is returned.
1692 * @param[in] pkgname caller application package name
1693 * @param[in] group_id group id
1694 * @param[in] priv_id private id
1695 * @param[in] count returned notification data number
1696 * @param[out] list notification list handle
1697 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1698 * @retval NOTIFICATION_ERROR_NONE - success
1699 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1702 * @see #notification_list_h
1705 #include <notification.h>
1708 notification_list_h noti_list = NULL;
1709 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1711 noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, ¬i_list);
1712 if(noti_err != NOTIFICATION_ERROR_NONE) {
1718 notification_error_e notification_get_detail_list(const char *pkgname,
1722 notification_list_h *list);
1725 * @brief Free notification list
1728 * @param[in] list notification list handle
1729 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1730 * @retval NOTIFICATION_ERROR_NONE - success
1731 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1732 * @pre notification_get_grouping_list() or notification_get_detail_list ()
1734 * @see #notification_list_h
1737 #include <notification.h>
1740 notification_list_h noti_list = NULL;
1741 notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1745 noti_err = notification_free_list(noti_list);
1746 if(noti_err != NOTIFICATION_ERROR_NONE) {
1752 notification_error_e notification_free_list(notification_list_h list);
1759 * @brief Register a callback for all notification events
1760 * @details The registered callback could be called for all notification events
1762 * @param[in] changed_cb callback function
1763 * @param[in] user_data user data
1764 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1765 * @retval NOTIFICATION_ERROR_NONE - success
1766 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1767 * @pre notification_new()
1769 * @see notification_unresister_changed_cb()
1772 #include <notification.h>
1775 noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1776 if(noti_err != NOTIFICATION_ERROR_NONE) {
1782 notification_error_e
1783 notification_resister_changed_cb(
1784 void (*changed_cb)(void *data, notification_type_e type),
1788 * @brief Unregister a callback for all notification events
1791 * @param[in] changed_cb callback function
1792 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1793 * @retval NOTIFICATION_ERROR_NONE - success
1794 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1797 * @see notification_resister_changed_cb()
1800 #include <notification.h>
1803 noti_err = notification_unresister_changed_cb(app_changed_cb);
1804 if(noti_err != NOTIFICATION_ERROR_NONE) {
1810 notification_error_e
1811 notification_unresister_changed_cb(
1812 void (*changed_cb)(void *data, notification_type_e type));
1815 * @brief Register a callback for all notification events
1816 * @details The registered callback could be called for all notification events
1818 * @param[in] changed_cb callback function
1819 * @param[in] user_data user data
1820 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1821 * @retval NOTIFICATION_ERROR_NONE - success
1822 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1825 * @see notification_unregister_detailed_changed_cb()
1828 #include <notification.h>
1831 noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1832 if(noti_err != NOTIFICATION_ERROR_NONE) {
1838 notification_error_e
1839 notification_register_detailed_changed_cb(
1840 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1844 * @brief Unregister a callback for all notification events
1847 * @param[in] changed_cb callback function
1848 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1849 * @retval NOTIFICATION_ERROR_NONE - success
1850 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1853 * @see notification_register_detailed_changed_cb()
1856 #include <notification.h>
1859 noti_err = notification_unresister_changed_cb(app_changed_cb);
1860 if(noti_err != NOTIFICATION_ERROR_NONE) {
1866 notification_error_e
1867 notification_unregister_detailed_changed_cb(
1868 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1872 * @brief Get the information of notification event
1875 * @param[in] list notification list handle
1876 * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1877 * @retval NOTIFICATION_ERROR_NONE - success
1878 * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1879 * @pre notification_get_grouping_list() or notification_get_detail_list ()
1881 * @see #notification_op
1883 notification_error_e notification_op_get_data(notification_op *noti_op,
1884 notification_op_data_type_e type,
1891 void notification_call_changed_cb(notification_op *op_list, int op_num);
1893 int notification_is_service_ready(void);
1895 notification_error_e notification_add_deffered_task(
1896 void (*deffered_task_cb)(void *data), void *user_data);
1898 notification_error_e notification_del_deffered_task(
1899 void (*deffered_task_cb)(void *data));
1902 * @addtogroup NOTIFICATION_DEPRECATED
1907 * @brief This function will be deprecated.
1908 * @see notification_set_image()
1911 notification_error_e notification_set_icon(notification_h noti,
1912 const char *icon_path);
1915 * @brief This function will be deprecated.
1916 * @see notification_get_image()
1919 notification_error_e notification_get_icon(notification_h noti,
1923 * @brief This function will be deprecated.
1924 * @see notification_set_text()
1927 notification_error_e notification_set_title(notification_h noti,
1929 const char *loc_title);
1932 * @brief This function will be deprecated.
1933 * @see notification_get_text()
1936 notification_error_e notification_get_title(notification_h noti,
1941 * @brief This function will be deprecated.
1942 * @see notification_set_text()
1945 notification_error_e notification_set_content(notification_h noti,
1946 const char *content,
1947 const char *loc_content);
1950 * @brief This function will be deprecated.
1951 * @see notification_get_text()
1954 notification_error_e notification_get_content(notification_h noti,
1956 char **loc_content);
1959 * @brief This function will be deprecated.
1960 * @see notification_set_execute_option()
1963 notification_error_e notification_set_application(notification_h noti, const char *pkgname); /* Do not use this */
1966 * @brief This function will be deprecated.
1967 * @see notification_get_execute_option()
1970 notification_error_e notification_get_application(notification_h noti, char **pkgname); /* Do not use this */
1973 * @brief This function will be deprecated.
1974 * @see notification_set_execute_option()
1977 notification_error_e notification_set_args(notification_h noti, bundle * args, bundle * group_args); /* Do not use this */
1980 * @brief This function will be deprecated.
1981 * @see notification_get_execute_option()
1984 notification_error_e notification_get_args(notification_h noti, bundle ** args, bundle ** group_args); /* Do not use this */
1987 * @brief This function will be deprecated.
1988 * @see notification_delete_by_priv_id()
1991 notification_error_e notification_delete_group_by_group_id(const char *pkgname,
1992 notification_type_e type,
1996 * @brief This function will be deprecated.
1997 * @see notification_delete_by_priv_id()
2000 notification_error_e notification_delete_group_by_priv_id(const char *pkgname,
2001 notification_type_e type,
2004 * @brief This function will be deprecated.
2007 notification_error_e notification_get_count(notification_type_e type,
2008 const char *pkgname,
2009 int group_id, int priv_id,
2019 #endif /* __NOTIFICATION_H__ */