sync with private git
[platform/core/api/notification.git] / include / notification.h
1 /*
2  *  libnotification
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
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>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  */
21
22 #ifndef __NOTIFICATION_H__
23 #define __NOTIFICATION_H__
24
25 #include <time.h>
26 #include <bundle.h>
27
28 #include <notification_error.h>
29 #include <notification_type.h>
30 #include <notification_list.h>
31 #include <notification_status.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /**
38  * @defgroup NOTIFICATION_LIBRARY Notification Library
39  * @brief This notification library provides UI notification event. Inserted notification event is displaying Notification Tray, Indicator, etc.
40  */
41
42 /**
43  * @ingroup NOTIFICATION_LIBRARY
44  * @defgroup NOTIFICATION notification core API
45  * @brief Notification core API
46  */
47
48 /**
49  * @addtogroup NOTIFICATION
50  * @{
51  */
52
53 /**
54  * @brief This function will be deprecated.
55  * @see notification_set_image()
56  *
57  */
58 notification_error_e notification_set_icon(notification_h noti,
59                                            const char *icon_path);
60
61 /**
62  * @brief This function will be deprecated.
63  * @see notification_get_image()
64  *
65  */
66 notification_error_e notification_get_icon(notification_h noti,
67                                            char **icon_path);
68
69 /**
70  * @brief This function set image path according to type.
71  * @details 
72  * @remarks
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()
80  * @post
81  * @see #notification_image_type_e
82  * @see notification_new()
83  * @par Sample code:
84  * @code
85 #include <notification.h>
86 ...
87 {
88         notification_h noti = NULL;
89         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
90
91         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
92         if(noti == NULL) {
93                 return;
94         }
95
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);
99                 return;
100         }
101 }
102  * @endcode
103  */
104 notification_error_e notification_set_image(notification_h noti,
105                                             notification_image_type_e type,
106                                             const char *image_path);
107
108 /**
109  * @brief This function get image path according to type.
110  * @details 
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()
119  * @post
120  * @see #notification_image_type_e
121  * @see notification_new()
122  * @par Sample code:
123  * @code
124  #include <notification.h>
125  ...
126  {
127         char *image_path = NULL;
128         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
129         
130         noti_err  = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
131         if(noti_err != NOTIFICATION_ERROR_NONE) {
132                 return;
133         }
134 }
135  * @endcode
136  */
137 notification_error_e notification_get_image(notification_h noti,
138                                             notification_image_type_e type,
139                                             char **image_path);
140
141 /**
142  * @brief This function set time infomation.
143  * @details If input_time is 0, time information is set by current time.
144  * @remarks
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()
151  * @post
152  * @see notification_new()
153  * @par Sample code:
154  * @code
155 #include <notification.h>
156  ...
157   {
158          notification_h noti = NULL;
159          notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
160          
161          noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
162          if(noti == NULL) {
163                  return;
164          }
165  
166          noti_err  = notification_set_time(noti, time(NULL));
167          if(noti_err != NOTIFICATION_ERROR_NONE) {
168                 notification_free(noti);
169                  return;
170          }
171  }
172  * @endcode
173  */
174 notification_error_e notification_set_time(notification_h noti,
175                                            time_t input_time);
176
177 /**
178  * @brief This function get time information.
179  * @details If ret_time is 0, time information is not set before.
180  * @remarks
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()
187  * @post
188  * @see notification_new()
189  * @par Sample code:
190  * @code
191  #include <notification.h>
192  ...
193  {
194         time_t ret_time;
195         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
196         
197         noti_err  = notification_get_time(noti, &ret_time);
198         if(noti_err != NOTIFICATION_ERROR_NONE) {
199                 return;
200         }
201 }
202  * @endcode
203  */
204 notification_error_e notification_get_time(notification_h noti,
205                                            time_t * ret_time);
206
207 /**
208  * @brief This function get insert time information.
209  * @details If ret_time is 0, this notification data is not inserted before.
210  * @remarks
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
216  * @pre 
217  * @post
218  * @see 
219  * @par Sample code:
220  * @code
221  #include <notification.h>
222   ...
223   {
224          time_t ret_time;
225          notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
226          
227          noti_err  = notification_get_insert_time(noti, &ret_time);
228          if(noti_err != NOTIFICATION_ERROR_NONE) {
229                  return;
230          }
231  }
232  * @endcode
233  */
234 notification_error_e notification_get_insert_time(notification_h noti,
235                                                   time_t * ret_time);
236
237 /**
238  * @brief This function will be deprecated.
239  * @see notification_set_text()
240  *
241  */
242 notification_error_e notification_set_title(notification_h noti,
243                                             const char *title,
244                                             const char *loc_title);
245
246 /**
247  * @brief This function will be deprecated.
248  * @see notification_get_text()
249  *
250  */
251 notification_error_e notification_get_title(notification_h noti,
252                                             char **title,
253                                             char **loc_title);
254
255 /**
256  * @brief This function will be deprecated.
257  * @see notification_set_text()
258  *
259  */
260 notification_error_e notification_set_content(notification_h noti,
261                                               const char *content,
262                                               const char *loc_content);
263
264 /**
265  * @brief This function will be deprecated.
266  * @see notification_get_text()
267  *
268  */
269 notification_error_e notification_get_content(notification_h noti,
270                                               char **content,
271                                               char **loc_content);
272
273 /**
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.
284  * @remarks
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().
294  * @post
295  * @see
296  * @par Sample code:
297  * @code
298 #include <notification.h>
299 ...
300 {
301         notification_h noti = NULL;
302         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
303
304         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
305         if(noti == NULL) {
306                 return;
307         }
308
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);
312                 return;
313         }
314 }
315  * @endcode
316  */
317 notification_error_e notification_set_text(notification_h noti,
318                                            notification_text_type_e type,
319                                            const char *text,
320                                            const char *key,
321                                            int args_type, ...);
322
323 /**
324  * @brief This function get text.
325  * @details
326  * @remarks
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
333  * @pre
334  * @post
335  * @see
336  * @par Sample code:
337  * @code
338 #include <notification.h>
339 ...
340 {
341         notification_h noti = NULL;
342         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
343         char *text = NULL;
344
345         noti_err  = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
346         if(noti_err != NOTIFICATION_ERROR_NONE) {
347                 return;
348         }
349 }
350  * @endcode
351  */
352 notification_error_e notification_get_text(notification_h noti,
353                                            notification_text_type_e type,
354                                            char **text);
355
356 /**
357  * @brief This function set timestamp to text. the timestamp value will be converted to string
358  * @details set
359  * @remarks
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().
367  * @post
368  * @see
369  */
370 notification_error_e notification_set_time_to_text(notification_h noti, notification_text_type_e type,
371                                                                 time_t time);
372
373 /**
374  * @brief This function get timestamp from text
375  * @details set
376  * @remarks
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().
384  * @post
385  * @see
386  */
387 notification_error_e notification_get_time_from_text(notification_h noti, notification_text_type_e type,
388                                                                 time_t *time);
389
390 /**
391  * @brief This function set text domain.
392  * @details
393  * @remarks
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
400  * @pre
401  * @post
402  * @see
403  * @par Sample code:
404  * @code
405 #include <notification.h>
406 ...
407 {
408         notification_h noti = NULL;
409         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
410
411         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
412         if(noti == NULL) {
413                 return;
414         }
415
416         noti_err  = notification_set_text_domain(noti, PACKAGE, LOCALEDIR);
417         if(noti_err != NOTIFICATION_ERROR_NONE) {
418                 notification_free(noti);
419                 return;
420         }
421 }
422  * @endcode
423  */
424 notification_error_e notification_set_text_domain(notification_h noti,
425                                                   const char *domain,
426                                                   const char *dir);
427
428 /**
429  * @brief This function get text domain.
430  * @details
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
438  * @pre
439  * @post
440  * @see
441  * @par Sample code:
442  * @code
443 #include <notification.h>
444 ...
445 {
446         notification_h noti = NULL;
447         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
448         char *domain = NULL;
449         char *dir = NULL;
450
451         noti_err  = notification_get_text_domain(noti, &domain, &dir);
452         if(noti_err != NOTIFICATION_ERROR_NONE) {
453                 return;
454         }
455 }
456  * @endcode
457  */
458 notification_error_e notification_get_text_domain(notification_h noti,
459                                                   char **domain,
460                                                   char **dir);
461
462 /**
463  * @brief This function set notification sound.
464  * @details
465  * @remarks
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
472  * @pre
473  * @post
474  * @see
475  * @par Sample code:
476  * @code
477 #include <notification.h>
478 ...
479 {
480         notification_h noti = NULL;
481         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
482
483         noti_err  = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL);
484         if(noti_err != NOTIFICATION_ERROR_NONE) {
485                 return;
486         }
487 }
488  * @endcode
489  */
490 notification_error_e notification_set_sound(notification_h noti,
491                                             notification_sound_type_e type,
492                                             const char *path);
493
494 /**
495  * @brief This function get notification sound.
496  * @details
497  * @remarks
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
504  * @pre
505  * @post
506  * @see
507  * @par Sample code:
508  * @code
509 #include <notification.h>
510 ...
511 {
512         notification_h noti = NULL;
513         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
514         notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE;
515
516         noti_err  = notification_get_sound(noti, &type, NULL);
517         if(noti_err != NOTIFICATION_ERROR_NONE) {
518                 return;
519         }
520 }
521  * @endcode
522  */
523 notification_error_e notification_get_sound(notification_h noti,
524                                             notification_sound_type_e *type,
525                                             const char **path);
526
527 /**
528  * @brief This function set notification vibration.
529  * @details
530  * @remarks
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
537  * @pre
538  * @post
539  * @see
540  * @par Sample code:
541  * @code
542 #include <notification.h>
543 ...
544 {
545         notification_h noti = NULL;
546         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
547
548         noti_err  = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL);
549         if(noti_err != NOTIFICATION_ERROR_NONE) {
550                 return;
551         }
552 }
553  * @endcode
554  */
555 notification_error_e notification_set_vibration(notification_h noti,
556                                                 notification_vibration_type_e type,
557                                                 const char *path);
558
559 /**
560   * @brief This function get notification vibration.
561   * @details
562   * @remarks
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
569   * @pre
570   * @post
571   * @see 
572   * @par Sample code:
573   * @code
574 #include <notification.h>
575 ...
576  {
577         notification_h noti = NULL;
578         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
579         notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE;
580
581         noti_err  = notification_get_vibration(noti, &type, NULL);
582         if(noti_err != NOTIFICATION_ERROR_NONE) {
583                 return;
584         }
585 }
586   * @endcode
587   */
588 notification_error_e notification_get_vibration(notification_h noti,
589                                                 notification_vibration_type_e *type,
590                                                 const char **path);
591
592 /**
593  * @brief This function set led notification.
594  * @details
595  * @remarks
596  * @param[in] noti notification handle
597  * @param[in] operation led notification operation
598  * @param[in] led_argb notification led color
599  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
600  * @retval NOTIFICATION_ERROR_NONE - success
601  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
602  * @pre
603  * @post
604  * @see
605  * @par Sample code:
606  * @code
607 #include <notification.h>
608 ...
609 {
610         notification_h noti = NULL;
611         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
612
613         noti_err  = notification_set_led(noti, NOTIFICATION_LED_TYPE_DEFAULT, NULL);
614         if(noti_err != NOTIFICATION_ERROR_NONE) {
615                 return;
616         }
617 }
618  * @endcode
619  */
620 notification_error_e notification_set_led(notification_h noti,
621                                                 notification_led_op_e operation,
622                                                 int led_argb);
623
624 /**
625   * @brief This function get notification led.
626   * @details
627   * @remarks
628   * @param[in] noti notification handle
629   * @param[out] operation led notification operation
630   * @param[out] led_argb notification led color
631   * @return NOTIFICATION_ERROR_NONE if success, other value if failure
632   * @retval NOTIFICATION_ERROR_NONE - success
633   * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
634   * @pre
635   * @post
636   * @see
637   * @par Sample code:
638   * @code
639 #include <notification.h>
640 ...
641  {
642         notification_h noti = NULL;
643         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
644         notification_led_type_e type = NOTIFICATION_LED_TYPE_NONE;
645
646         noti_err  = notification_get_led(noti, &type, NULL);
647         if(noti_err != NOTIFICATION_ERROR_NONE) {
648                 return;
649         }
650 }
651   * @endcode
652   */
653 notification_error_e notification_get_led(notification_h noti,
654                                                 notification_led_op_e *operation,
655                                                 int *led_argb);
656
657 /**
658  * @brief This function set time period of flashing LED
659  * @details
660  * @remarks
661  * @param[in] noti notification handle
662  * @param[in] on_ms time for turning on the LED
663  * @param[in] off_ms time for turning on the LED
664  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
665  * @retval NOTIFICATION_ERROR_NONE - success
666  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
667  * @pre
668  * @post
669  * @see
670  * @par Sample code:
671  * @code
672 #include <notification.h>
673 ...
674 {
675         notification_h noti = NULL;
676         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
677
678         noti_err  = notification_set_led_time_period(noti, 100, 100);
679         if(noti_err != NOTIFICATION_ERROR_NONE) {
680                 return;
681         }
682 }
683  * @endcode
684  */
685 notification_error_e notification_set_led_time_period(notification_h noti,
686                                                 int on_ms, int off_ms);
687
688 /**
689   * @brief This function get time period of flashing LED
690   * @details
691   * @remarks
692   * @param[in] noti notification handle
693   * @param[out] on_ms time for turning on the LED
694   * @param[out] off_ms time for turning on the LED
695   * @return NOTIFICATION_ERROR_NONE if success, other value if failure
696   * @retval NOTIFICATION_ERROR_NONE - success
697   * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
698   * @pre
699   * @post
700   * @see
701   * @par Sample code:
702   * @code
703 #include <notification.h>
704 ...
705  {
706         notification_h noti = NULL;
707         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
708         int led_on_ms = 0;
709         int led_off_ms = 0;
710
711         noti_err  = notification_get_led_time_period(noti, &led_on_ms, &led_off_ms);
712         if(noti_err != NOTIFICATION_ERROR_NONE) {
713                 return;
714         }
715 }
716   * @endcode
717   */
718 notification_error_e notification_get_led_time_period(notification_h noti,
719                                                 int *on_ms, int *off_ms);
720
721 /**
722  * @brief This function will be deprecated.
723  * @see notification_set_execute_option()
724  *
725  */
726 notification_error_e notification_set_application(notification_h noti, const char *pkgname);    /* Do not use this */
727
728 /**
729  * @brief This function will be deprecated.
730  * @see notification_get_execute_option()
731  *
732  */
733 notification_error_e notification_get_application(notification_h noti, char **pkgname); /* Do not use this */
734
735 /**
736  * @brief This function will be deprecated.
737  * @see notification_set_execute_option()
738  *
739  */
740 notification_error_e notification_set_args(notification_h noti, bundle * args, bundle * group_args);    /* Do not use this */
741
742 /**
743  * @brief This function will be deprecated.
744  * @see notification_get_execute_option()
745  *
746  */
747 notification_error_e notification_get_args(notification_h noti, bundle ** args, bundle ** group_args);  /* Do not use this */
748
749 /**
750  * @brief This function set execute option.
751  * @details When notification data selected in display application, application launched by appsvc_run_service with service_handle.
752  * @remarks
753  * @param[in] noti notification handle
754  * @param[in] type notification execute type
755  * @param[in] text basic text for button
756  * @param[in] key value for localizaed text
757  * @param[in] service_handle appsvc bundle data
758  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
759  * @retval NOTIFICATION_ERROR_NONE - success
760  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
761  * @pre
762  * @post
763  * @see
764  * @par Sample code:
765  * @code
766 #include <notification.h>
767 ...
768 {
769         notification_h noti = NULL;
770         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
771         bundle *b = NULL;
772
773         ...
774
775         b = bundle_create();
776         appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
777         appsvc_set_uri(b,"http://www.samsung.com");
778
779         noti_err  = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b);
780         if(noti_err != NOTIFICATION_ERROR_NONE) {
781                 notification_free(noti);
782                 return;
783         }
784
785         bundle_free(b);
786 }
787  * @endcode
788  */
789 notification_error_e notification_set_execute_option(notification_h noti,
790                                                      notification_execute_type_e type,
791                                                      const char *text,
792                                                      const char *key,
793                                                      bundle *service_handle);
794
795 /**
796  * @brief This function get execute option.
797  * @details
798  * @remarks
799  * @param[in] noti notification handle
800  * @param[in] type notification execute type
801  * @param[out] text text for button
802  * @param[out] service_handle appsvc bundle data
803  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
804  * @retval NOTIFICATION_ERROR_NONE - success
805  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
806  * @pre
807  * @post
808  * @see
809  * @par Sample code:
810  * @code
811 #include <notification.h>
812 ...
813 {
814         notification_h noti = NULL;
815         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
816         bundle *b = NULL;
817
818         ...
819
820         noti_err  = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, &b);
821         if(noti_err != NOTIFICATION_ERROR_NONE) {
822                 notification_free(noti);
823                 return;
824         }
825 }
826  * @endcode
827  */
828 notification_error_e notification_get_execute_option(notification_h noti,
829                                                      notification_execute_type_e type,
830                                                      const char **text,
831                                                      bundle **service_handle);
832
833 /**
834  * @brief This function set notification property.
835  * @details
836  * @remarks
837  * @param[in] noti notification handle
838  * @param[in] flags property with | operation
839  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
840  * @retval NOTIFICATION_ERROR_NONE - success
841  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
842  * @pre
843  * @post
844  * @see
845  * @par Sample code:
846  * @code
847 #include <notification.h>
848 ...
849 {
850         notification_h noti = NULL;
851         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
852         bundle *b = NULL;
853
854         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
855         if(noti == NULL) {
856                 return;
857         }
858
859         noti_err  = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
860         if(noti_err != NOTIFICATION_ERROR_NONE) {
861                 notification_free(noti);
862                 return;
863         }
864 }
865  * @endcode
866  */
867 notification_error_e notification_set_property(notification_h noti,
868                                                int flags);
869
870 /**
871  * @brief This function get notification property.
872  * @details
873  * @remarks
874  * @param[in] noti notification handle
875  * @param[out] flags notification property
876  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
877  * @retval NOTIFICATION_ERROR_NONE - success
878  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
879  * @pre
880  * @post
881  * @see
882  * @par Sample code:
883  * @code
884 #include <notification.h>
885 ...
886 {
887         notification_h noti = NULL;
888         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
889         int flags = 0;
890
891         noti_err  = notification_get_property(noti, &flags);
892         if(noti_err != NOTIFICATION_ERROR_NONE) {
893                 return;
894         }
895 }
896  * @endcode
897  */
898 notification_error_e notification_get_property(notification_h noti,
899                                                int *flags);
900
901 /**
902  * @brief This function set display application list.
903  * @details All display application is enable(NOTIFICATION_DISPLAY_APP_ALL) if you are not call this API.
904  * @remarks
905  * @param[in] noti notification handle
906  * @param[in] applist with | operation
907  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
908  * @retval NOTIFICATION_ERROR_NONE - success
909  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
910  * @pre
911  * @post
912  * @see
913  * @par Sample code:
914  * @code
915 #include <notification.h>
916 ...
917 {
918         notification_h noti = NULL;
919         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
920         bundle *b = NULL;
921
922         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
923         if(noti == NULL) {
924                 return;
925         }
926
927         noti_err  = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
928         if(noti_err != NOTIFICATION_ERROR_NONE) {
929                 notification_free(noti);
930                 return;
931         }
932 }
933 }
934  * @endcode
935  */
936 notification_error_e notification_set_display_applist(notification_h noti,
937                                                       int applist);
938
939 /**
940  * @brief This function get display application list.
941  * @details
942  * @remarks
943  * @param[in] noti notification handle
944  * @param[out] applist display application list.
945  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
946  * @retval NOTIFICATION_ERROR_NONE - success
947  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
948  * @pre
949  * @post
950  * @see
951  * @par Sample code:
952  * @code
953 #include <notification.h>
954 ...
955 {
956         notification_h noti = NULL;
957         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
958         int applist = 0;
959
960         noti_err  = notification_get_display_applist(noti, &applist);
961         if(noti_err != NOTIFICATION_ERROR_NONE) {
962                 return;
963         }
964 }
965  * @endcode
966  */
967 notification_error_e notification_get_display_applist(notification_h noti,
968                                                       int *applist);
969
970 /**
971  * @brief This function set initial size for ongoing type.
972  * @details After notification_insert, it does not upate size. If you want to update size, please call notification_update_size().
973  * @remarks
974  * @param[in] noti notification handle
975  * @param[in] size double type size.
976  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
977  * @retval NOTIFICATION_ERROR_NONE - success
978  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
979  * @pre
980  * @post
981  * @see
982  * @par Sample code:
983  * @code
984 #include <notification.h>
985 ...
986 {
987         notification_h noti = NULL;
988         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
989
990         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
991         if(noti == NULL) {
992                 return;
993         }
994
995         noti_err  = notification_set_size(noti, 0.0);
996         if(noti_err != NOTIFICATION_ERROR_NONE) {
997                 notification_free(noti);
998                 return;
999         }
1000 }
1001  * @endcode
1002  */
1003 notification_error_e notification_set_size(notification_h noti,
1004                                            double size);
1005
1006 /**
1007  * @brief This function get progress size.
1008  * @details
1009  * @remarks
1010  * @param[in] noti notification handle
1011  * @param[out] size progress size
1012  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1013  * @retval NOTIFICATION_ERROR_NONE - success
1014  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1015  * @pre
1016  * @post
1017  * @see
1018  * @par Sample code:
1019  * @code
1020 #include <notification.h>
1021 ...
1022 {
1023         notification_h noti = NULL;
1024         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1025         double size = 0.0;
1026
1027         noti_err  = notification_get_size(noti, &size);
1028         if(noti_err != NOTIFICATION_ERROR_NONE) {
1029                 return;
1030         }
1031 }
1032  * @endcode
1033  */
1034 notification_error_e notification_get_size(notification_h noti,
1035                                            double *size);
1036
1037 /**
1038  * @brief This function set initial progress for ongoing type.
1039  * @details After notification_insert, it does not upate progress. If you want to update progress, please call notification_update_progress().
1040  * @remarks
1041  * @param[in] noti notification handle
1042  * @param[in] percentage progress percentage
1043  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1044  * @retval NOTIFICATION_ERROR_NONE - success
1045  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1046  * @pre
1047  * @post
1048  * @see
1049  * @par Sample code:
1050  * @code
1051 #include <notification.h>
1052 ...
1053 {
1054         notification_h noti = NULL;
1055         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1056
1057         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1058         if(noti == NULL) {
1059                 return;
1060         }
1061
1062         noti_err  = notification_set_progress(noti, 0.0);
1063         if(noti_err != NOTIFICATION_ERROR_NONE) {
1064                 notification_free(noti);
1065                 return;
1066         }
1067 }
1068  * @endcode
1069  */
1070 notification_error_e notification_set_progress(notification_h noti,
1071                                                double percentage);
1072
1073 /**
1074  * @brief This function get progress percentage.
1075  * @details
1076  * @remarks
1077  * @param[in] noti notification handle
1078  * @param[out] percentage progress percentage
1079  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1080  * @retval NOTIFICATION_ERROR_NONE - success
1081  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1082  * @pre
1083  * @post
1084  * @see
1085  * @par Sample code:
1086  * @code
1087 #include <notification.h>
1088 ...
1089 {
1090         notification_h noti = NULL;
1091         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1092         double percentage = 0.0;
1093
1094         noti_err  = notification_get_progress(noti, &percentage);
1095         if(noti_err != NOTIFICATION_ERROR_NONE) {
1096                 return;
1097         }
1098 }
1099  * @endcode
1100  */
1101 notification_error_e notification_get_progress(notification_h noti,
1102                                                double *percentage);
1103
1104 /**
1105  * @brief This function set caller_pkgname.
1106  * @details caller_pkgname is set automatically when notification_new. We are not recommend to use this API.
1107  * @remarks
1108  * @param[in] noti notification handle
1109  * @param[in] pkgname caller package name
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
1113  * @pre
1114  * @post
1115  * @see
1116  * @par Sample code:
1117  * @code
1118 #include <notification.h>
1119 ...
1120 {
1121         notification_h noti = NULL;
1122         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1123
1124         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1125         if(noti == NULL) {
1126                 return;
1127         }
1128
1129         noti_err  = notification_set_pkgname(noti, "org.tizen.phone");
1130         if(noti_err != NOTIFICATION_ERROR_NONE) {
1131                 notification_free(noti);
1132                 return;
1133         }
1134 }
1135  * @endcode
1136  */
1137 notification_error_e notification_set_pkgname(notification_h noti,
1138                                               const char *pkgname);
1139
1140 /**
1141  * @brief This function get caller pkgname.
1142  * @details
1143  * @remarks
1144  * @param[in] noti notification handle
1145  * @param[out] pkgname caller package name
1146  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1147  * @retval NOTIFICATION_ERROR_NONE - success
1148  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1149  * @pre
1150  * @post
1151  * @see
1152  * @par Sample code:
1153  * @code
1154 #include <notification.h>
1155 ...
1156 {
1157         notification_h noti = NULL;
1158         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1159         char *pkgname = NULL;
1160
1161         noti_err  = notification_get_pkgname(noti, &pkgname);
1162         if(noti_err != NOTIFICATION_ERROR_NONE) {
1163                 return;
1164         }
1165 }
1166  * @endcode
1167  */
1168 notification_error_e notification_get_pkgname(notification_h noti,
1169                                               char **pkgname);
1170
1171 /**
1172  * @brief This function set layout type of notification
1173  * @details caller can set displaying layout of notification with this API
1174  * @remarks
1175  * @param[in] noti notification handle
1176  * @param[in] layout type
1177  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1178  * @retval NOTIFICATION_ERROR_NONE - success
1179  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1180  * @pre
1181  * @post
1182  * @see #notification_ly_type_e
1183  */
1184 notification_error_e notification_set_layout(notification_h noti,
1185                 notification_ly_type_e layout);
1186
1187 /**
1188  * @brief This function get layout type of notification
1189  * @details
1190  * @remarks
1191  * @param[in] noti notification handle
1192  * @param[out] layout type of notification
1193  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1194  * @retval NOTIFICATION_ERROR_NONE - success
1195  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1196  * @pre
1197  * @post
1198  * @see #notification_ly_type_e
1199  */
1200 notification_error_e notification_get_layout(notification_h noti,
1201                 notification_ly_type_e *layout);
1202
1203 /**
1204  * @brief This function set application badge count.
1205  * @details
1206  * @remarks
1207  * @param[in] pkgname If NULL, caller pkgname is set internally.
1208  * @param[in] group_id group id
1209  * @param[in] count badge count
1210  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1211  * @retval NOTIFICATION_ERROR_NONE - success
1212  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1213  * @pre 
1214  * @post
1215  * @see
1216  * @par Sample code:
1217 #include <notification.h>
1218  ...
1219   {
1220          notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1221          
1222          noti_err  = notification_set_badge(NULL, NOTIFICATION_GROUP_ID_NONE, 5);
1223          if(noti_err != NOTIFICATION_ERROR_NONE) {
1224                  return;
1225          }
1226  }
1227  * @endcode
1228  */
1229 notification_error_e notification_set_badge(const char *pkgname,
1230                                             int group_id, int count);
1231
1232 /**
1233  * @brief This function get application badge count.
1234  * @details
1235  * @remarks
1236  * @param[in] pkgname If NULL, caller pkgname is set internally.
1237  * @param[in] group_id group id
1238  * @param[out] count badge count
1239  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1240  * @retval NOTIFICATION_ERROR_NONE - success
1241  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1242  * @pre 
1243  * @post
1244  * @see
1245  * @par Sample code:
1246 #include <notification.h>
1247  ...
1248   {
1249          notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1250          int count = 0;
1251          
1252          noti_err  = notification_get_badge(NULL, NOTIFICATION_GROUP_ID_NONE, &count);
1253          if(noti_err != NOTIFICATION_ERROR_NONE) {
1254                  return;
1255          }
1256  }
1257  * @endcode
1258  */
1259 notification_error_e notification_get_badge(const char *pkgname,
1260                                             int group_id, int *count);
1261
1262 /**
1263  * @brief This function get Group ID and Private ID
1264  * @details
1265  * @remarks
1266  * @param[in] noti notification handle
1267  * @param[out] group_id Group ID
1268  * @param[out] priv_id Private ID
1269  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1270  * @retval NOTIFICATION_ERROR_NONE - success
1271  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1272  * @pre 
1273  * @post
1274  * @see 
1275  * @par Sample code:
1276  * @code
1277 #include <notification.h>
1278  ...
1279   {
1280          notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1281          int group_id, priv_id;
1282  
1283          noti_err  = notification_get_id(noti, &group_id, &priv_id);
1284          if(noti_err != NOTIFICATION_ERROR_NONE) {
1285                  return;
1286          }
1287  }
1288  * @endcode
1289  */
1290 notification_error_e notification_get_id(notification_h noti,
1291                                          int *group_id, int *priv_id);
1292
1293 /**
1294  * @brief This function get notification type
1295  * @details
1296  * @remarks
1297  * @param[in] noti notification handle
1298  * @param[out] type notification type
1299  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1300  * @retval NOTIFICATION_ERROR_NONE - success
1301  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide parameter
1302  * @pre 
1303  * @post
1304  * @see 
1305  * @par Sample code:
1306  * @code
1307 #include <notification.h>
1308 ...
1309  {
1310         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1311         notification_type_e type;
1312
1313         noti_err  = notification_get_type(noti, &type);
1314         if(noti_err != NOTIFICATION_ERROR_NONE) {
1315                 return;
1316         }
1317 }
1318  * @endcode
1319  */
1320 notification_error_e notification_get_type(notification_h noti,
1321                                            notification_type_e * type);
1322
1323 /**
1324  * @brief This function insert notification data.
1325  * @details Notification data is inserted to DB and then notification data is displaying display application.
1326  * When notification_new() call, if priv_id is NOTIFICATION_PRIV_ID_NONE, priv_id is return internally set priv_id.
1327  * @remarks
1328  * @param[in] noti notification handle
1329  * @param[out] priv_id private ID
1330  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1331  * @retval NOTIFICATION_ERROR_NONE - success
1332  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1333  * @pre notification_new()
1334  * @post notification_free()
1335  * @see #notification_h
1336  * @par Sample code:
1337  * @code
1338 #include <notification.h>
1339 ...
1340  {
1341         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1342
1343         noti_err  = notification_insert(noti, NULL);
1344         if(noti_err != NOTIFICATION_ERROR_NONE) {
1345                 return;
1346         }
1347 }
1348  * @endcode
1349  */
1350 notification_error_e notification_insert(notification_h noti,
1351                                          int *priv_id);
1352
1353 /**
1354  * @brief This function update notification data.
1355  * @details Display application update UI.
1356  * @remarks
1357  * @param[in] noti notification handle that is created by notification_new().
1358  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1359  * @retval NOTIFICATION_ERROR_NONE - success
1360  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1361  * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
1362  * @pre
1363  * @post
1364  * @see #notification_h
1365  * @par Sample code:
1366  * @code
1367 #include <notification.h>
1368 ...
1369  {
1370         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1371
1372         noti_err  = notification_update(NULL);
1373         if(noti_err != NOTIFICATION_ERROR_NONE) {
1374                 return;
1375         }
1376 }
1377  * @endcode
1378  */
1379 notification_error_e notification_update(notification_h noti);
1380
1381 /**
1382  * @brief This function updates notification data.
1383  * @details Display application update UI.
1384  * @remarks
1385  * @param[in] noti notification handle that is created by notification_new().
1386  * @param[in] result_cb callback called when update completed
1387  * @param[in] user_data user data which you want to use in callback
1388  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1389  * @retval NOTIFICATION_ERROR_NONE - success
1390  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1391  * @retval NOTIFICATION_ERROR_NOT_EXIST_ID - not exist priv id
1392  * @pre
1393  * @post
1394  * @see #notification_h
1395  * @par Sample code:
1396  * @code
1397 #include <notification.h>
1398 ...
1399  {
1400         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1401
1402         noti_err  = notification_update_async(NULL, result_cb, data);
1403         if(noti_err != NOTIFICATION_ERROR_NONE) {
1404                 return;
1405         }
1406 }
1407  * @endcode
1408  */
1409 notification_error_e notification_update_async(notification_h noti,
1410                 void (*result_cb)(int priv_id, int result, void *data), void *user_data);
1411
1412 /**
1413  * @brief This function clear all notification of type.
1414  * @details Not recommand API. Only for notification tray's clear button operation.
1415  * @remarks
1416  * @param[in] type notification type
1417  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1418  * @retval NOTIFICATION_ERROR_NONE - success
1419  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1420  * @pre
1421  * @post
1422  * @see #notification_type_e
1423  * @par Sample code:
1424  * @code
1425 #include <notification.h>
1426 ...
1427  {
1428         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1429
1430         noti_err  = notifiation_clear(NOTIFICATION_TYPE_NOTI);
1431         if(noti_err != NOTIFICATION_ERROR_NONE) {
1432                 return;
1433         }
1434 }
1435  * @endcode
1436  */
1437 notification_error_e notifiation_clear(notification_type_e type);
1438
1439 /**
1440  * @brief This function delete notification by type. 
1441  * @details If pkgname is NULL, caller_pkgname is set internally.
1442  * @remarks
1443  * @param[in] pkgname caller application package name or NULL
1444  * @param[in] type notification type
1445  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1446  * @retval NOTIFICATION_ERROR_NONE - success
1447  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1448  * @pre
1449  * @post
1450  * @see
1451  * @par Sample code:
1452  * @code
1453 #include <notification.h>
1454 ...
1455  {
1456         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1457
1458         noti_err  = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
1459         if(noti_err != NOTIFICATION_ERROR_NONE) {
1460                 return;
1461         }
1462 }
1463  * @endcode
1464  */
1465 notification_error_e notification_delete_all_by_type(const char *pkgname,
1466                                                      notification_type_e type);
1467
1468 /**
1469  * @brief This function delete group notification data by group ID.
1470  * @details If pkgname is NULL, caller_pkgname is set internally.
1471  * @remarks
1472  * @param[in] pkgname caller application package name or NULL
1473  * @param[in] type notification type
1474  * @param[in] group_id group ID
1475  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1476  * @retval NOTIFICATION_ERROR_NONE - success
1477  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1478  * @pre
1479  * @post
1480  * @see
1481  * @par Sample code:
1482  * @code
1483 #include <notification.h>
1484 ...
1485  {
1486         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1487
1488         noti_err  = notification_delete_group_by_group_id(NULL, NOTIFICATION_TYPE_NOTI, APP_GROUP_ID);
1489         if(noti_err != NOTIFICATION_ERROR_NONE) {
1490                 return;
1491         }
1492 }
1493  * @endcode
1494  */
1495 notification_error_e notification_delete_group_by_group_id(const char *pkgname,
1496                                                            notification_type_e type,
1497                                                            int group_id);
1498
1499 /**
1500  * @brief This function delete group notification data that include priv_id.
1501  * @details If pkgname is NULL, caller_pkgname is set internally.
1502  * @remarks
1503  * @param[in] pkgname caller application package name or NULL
1504  * @param[in] type notification type
1505  * @param[in] priv_id priv ID
1506  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1507  * @retval NOTIFICATION_ERROR_NONE - success
1508  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1509  * @pre
1510  * @post
1511  * @see
1512  * @par Sample code:
1513  * @code
1514 #include <notification.h>
1515 ...
1516  {
1517         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1518
1519         noti_err  = notification_delete_group_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
1520         if(noti_err != NOTIFICATION_ERROR_NONE) {
1521                 return;
1522         }
1523 }
1524  * @endcode
1525  */
1526 notification_error_e notification_delete_group_by_priv_id(const char *pkgname,
1527                                                           notification_type_e type,
1528                                                           int priv_id);
1529
1530 /**
1531  * @brief This function delete notification data that private ID is priv_id.
1532  * @details If pkgname is NULL, caller_pkgname is set internally.
1533  * @remarks
1534  * @param[in] pkgname caller application package name or NULL
1535  * @param[in] type notification type
1536  * @param[in] priv_id priv ID
1537  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1538  * @retval NOTIFICATION_ERROR_NONE - success
1539  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1540  * @pre
1541  * @post
1542  * @see
1543  * @par Sample code:
1544  * @code
1545 #include <notification.h>
1546 ...
1547  {
1548         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1549
1550         noti_err  = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
1551         if(noti_err != NOTIFICATION_ERROR_NONE) {
1552                 return;
1553         }
1554 }
1555  * @endcode
1556  */
1557 notification_error_e notification_delete_by_priv_id(const char *pkgname,
1558                                                     notification_type_e type,
1559                                                     int priv_id);
1560
1561 /**
1562  * @brief This function delete notification data from DB
1563  * @details notification_delete() remove notification data from DB and notification_free release menory of notification data.
1564  * @remarks
1565  * @param[in] noti notification handle
1566  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1567  * @retval NOTIFICATION_ERROR_NONE - success
1568  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1569  * @pre
1570  * @post
1571  * @see #notification_h
1572  * @par Sample code:
1573  * @code
1574 #include <notification.h>
1575 ...
1576  {
1577         notificaton_h noti = NULL;
1578         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1579
1580         ...
1581
1582         noti_err  = notification_delete(noti);
1583         if(noti_err != NOTIFICATION_ERROR_NONE) {
1584                 return;
1585         }
1586
1587 }
1588  * @endcode
1589  */
1590 notification_error_e notification_delete(notification_h noti);
1591
1592 /**
1593  * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
1594  * @details Display application update UI.
1595  * @remarks
1596  * @param[in] noti notification handle or NULL if priv_id is valid
1597  * @param[in] priv_id private ID
1598  * @param[in] progress % value of progressive data
1599  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1600  * @retval NOTIFICATION_ERROR_NONE - success
1601  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1602  * @pre
1603  * @post
1604  * @par Sample code:
1605  * @code
1606 #include <notification.h>
1607 ...
1608  {
1609         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1610
1611         noti_err  = notification_update_progress(NULL, APP_NOTI_PRIV_ID, 0.6);
1612         if(noti_err != NOTIFICATION_ERROR_NONE) {
1613                 return;
1614         }
1615 }
1616  * @endcode
1617  */
1618 notification_error_e notification_update_progress(notification_h noti,
1619                                                   int priv_id,
1620                                                   double progress);
1621
1622 /**
1623  * @brief This function update progressive data of inserted notification data. Only work at NOTIFICATION_TYPE_ONGOING type.
1624  * @details Display application update UI.
1625  * @remarks
1626  * @param[in] noti notification handle or NULL if priv_id is valid
1627  * @param[in] priv_id private ID
1628  * @param[in] size bytes of progressive data
1629  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
1630  * @retval NOTIFICATION_ERROR_NONE - success
1631  * @retval NOTIFICATION_ERROR_INVALID_DATA - Invalide input value
1632  * @pre
1633  * @post
1634  * @par Sample code:
1635  * @code
1636 #include <notification.h>
1637 ...
1638  {
1639         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1640
1641         noti_err  = notification_update_size(NULL, APP_NOTI_PRIV_ID, 3000000);
1642         if(noti_err != NOTIFICATION_ERROR_NONE) {
1643                 return;
1644         }
1645 }
1646  * @endcode
1647  */
1648 notification_error_e notification_update_size(notification_h noti,
1649                                               int priv_id, double size);
1650
1651 notification_error_e notification_update_content(notification_h noti,
1652                                                          int priv_id,
1653                                                          const char *content);
1654
1655 /**
1656  * @brief This function create internal structure data and return notification handle.
1657  * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1658  * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1659  * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1660  * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT, 
1661  * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
1662  * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
1663  * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
1664  * @remarks
1665  * @param[in] type notification type
1666  * @param[in] group_id Group ID
1667  * @param[in] priv_id Priv ID
1668  * @return notification handle(#notification_h) if success, NULL if failure.
1669  * @retval #notification_h - success
1670  * @retval NULL - failure
1671  * @pre
1672  * @post
1673  * @see #notification_type_e
1674  * @see #notification_h
1675  * @par Sample code:
1676  * @code
1677 #include <notification.h>
1678 ...
1679 {
1680         notification_h noti = NULL;
1681
1682         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1683         if(noti == NULL) {
1684                 return;
1685         }
1686         ...
1687 }
1688  * @endcode
1689  */
1690 notification_h notification_new(notification_type_e type, int group_id,
1691                                 int priv_id);
1692
1693 /**
1694  * @brief This function create internal structure data and return notification handle.
1695  * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1696  * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1697  * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1698  * @remarks
1699  * @param[in] type notification type
1700  * @return notification handle(#notification_h) if success, NULL if failure.
1701  * @retval #notification_h - success
1702  * @retval NULL - failure
1703  * @pre
1704  * @post
1705  * @see #notification_type_e
1706  * @see #notification_h
1707  * @par Sample code:
1708  * @code
1709 #include <notification.h>
1710 ...
1711 {
1712         notification_h noti = NULL;
1713
1714         noti = notification_create(NOTIFICATION_TYPE_NOTI);
1715         if(noti == NULL) {
1716                 return;
1717         }
1718         ...
1719 }
1720  * @endcode
1721  */
1722 notification_h notification_create(notification_type_e type);
1723
1724 /**
1725  * @brief This function create internal structure data and return notification handle.
1726  * @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
1727  * #NOTIFICATION_TYPE_NOTI is remaining notification data evenif device is restarted.
1728  * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
1729  * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouping. #NOTIFICATION_GROUP_ID_DEFAULT,
1730  * notification data is grouping with same title. Positive number ( > 0 ) is grouping with same number.
1731  * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
1732  * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
1733  * @remarks
1734  * @param[in] type notification type
1735  * @param[in] group_id Group ID
1736  * @param[in] priv_id Priv ID
1737  * @return notification handle(#notification_h) if success, NULL if failure.
1738  * @retval #notification_h - success
1739  * @retval NULL - failure
1740  * @pre
1741  * @post
1742  * @see #notification_type_e
1743  * @see #notification_h
1744  * @par Sample code:
1745  * @code
1746 #include <notification.h>
1747 ...
1748 {
1749         notification_h noti = NULL;
1750
1751         noti = notification_load(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1752         if(noti == NULL) {
1753                 return;
1754         }
1755         ...
1756 }
1757  * @endcode
1758  */
1759 notification_h notification_load(char *pkgname,
1760                                 int priv_id);
1761
1762 /**
1763  * @brief This function create notification clone.
1764  * @details Newly created notification handle is returned.
1765  * @remarks This clone notification handle should be call notification_free().
1766  * @param[in] noti notification handle
1767  * @param[out] clone newly created notification handle that has same with input noti.
1768  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1769  * @retval NOTIFICATION_ERROR_NONE - success
1770  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1771  * @pre
1772  * @post
1773  * @see #notification_type_e
1774  * @see #notification_h
1775  * @par Sample code:
1776  * @code
1777 #include <notification.h>
1778 ...
1779 {
1780         notification_h noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1781         notification_h clone = NULL;
1782
1783         notification_clone(noti, &clone);
1784         ...
1785 }
1786  * @endcode
1787  */
1788 notification_error_e notification_clone(notification_h noti, notification_h *clone);
1789
1790 /**
1791  * @brief This function free internal structure data of notification handle.
1792  * @details Internal data of notification handle is released. Notification data that inserted is not deleted.
1793  * @remarks
1794  * @param[in] noti notification handle
1795  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1796  * @retval NOTIFICATION_ERROR_NONE - success
1797  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1798  * @pre notification_new()
1799  * @post
1800  * @see #notification_h
1801  * @par Sample code:
1802  * @code
1803 #include <notification.h>
1804 ...
1805 {
1806         notification_h noti = NULL;
1807         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1808
1809         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
1810         if(noti == NULL) {
1811                 return;
1812         }
1813         ...
1814
1815         noti_err = notification_free(noti);
1816         if(noti_err != NOTIFICATION_ERROR_NONE) {
1817                 return;
1818         }
1819 }
1820  * @endcode
1821  */
1822 notification_error_e notification_free(notification_h noti);
1823
1824 /**
1825  * @brief This function register notification chagned callback.
1826  * @details 
1827  * @remarks
1828  * @param[in] changed_cb callback function
1829  * @param[in] user_data user data
1830  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1831  * @retval NOTIFICATION_ERROR_NONE - success
1832  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1833  * @pre notification_new()
1834  * @post
1835  * @see notification_unresister_changed_cb()
1836  * @par Sample code:
1837  * @code
1838 #include <notification.h>
1839 ...
1840 {
1841         noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1842         if(noti_err != NOTIFICATION_ERROR_NONE) {
1843                 return;
1844         }
1845 }
1846  * @endcode
1847  */
1848 notification_error_e
1849 notification_resister_changed_cb(
1850         void (*changed_cb)(void *data, notification_type_e type),
1851         void *user_data);
1852
1853 /**
1854  * @brief This function unregister notification chagned callback.
1855  * @details 
1856  * @remarks
1857  * @param[in] changed_cb callback function
1858  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1859  * @retval NOTIFICATION_ERROR_NONE - success
1860  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1861  * @pre notification_new()
1862  * @post
1863  * @see notification_resister_changed_cb()
1864  * @par Sample code:
1865  * @code
1866 #include <notification.h>
1867 ...
1868 {
1869         noti_err = notification_unresister_changed_cb(app_changed_cb);
1870         if(noti_err != NOTIFICATION_ERROR_NONE) {
1871                 return;
1872         }
1873 }
1874  * @endcode
1875  */
1876 notification_error_e
1877 notification_unresister_changed_cb(
1878         void (*changed_cb)(void *data, notification_type_e type));
1879
1880 /**
1881  * @brief This function register notification chagned callback.
1882  * @details
1883  * @remarks
1884  * @param[in] changed_cb callback function
1885  * @param[in] user_data user data
1886  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1887  * @retval NOTIFICATION_ERROR_NONE - success
1888  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1889  * @pre notification_new()
1890  * @post
1891  * @see notification_unresister_changed_cb()
1892  * @par Sample code:
1893  * @code
1894 #include <notification.h>
1895 ...
1896 {
1897         noti_err = notification_resister_changed_cb(app_changed_cb, user_data);
1898         if(noti_err != NOTIFICATION_ERROR_NONE) {
1899                 return;
1900         }
1901 }
1902  * @endcode
1903  */
1904 notification_error_e
1905 notification_register_detailed_changed_cb(
1906                 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1907                 void *user_data);
1908
1909 /**
1910  * @brief This function unregister notification chagned callback.
1911  * @details
1912  * @remarks
1913  * @param[in] changed_cb callback function
1914  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1915  * @retval NOTIFICATION_ERROR_NONE - success
1916  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1917  * @pre notification_new()
1918  * @post
1919  * @see notification_resister_changed_cb()
1920  * @par Sample code:
1921  * @code
1922 #include <notification.h>
1923 ...
1924 {
1925         noti_err = notification_unresister_changed_cb(app_changed_cb);
1926         if(noti_err != NOTIFICATION_ERROR_NONE) {
1927                 return;
1928         }
1929 }
1930  * @endcode
1931  */
1932 notification_error_e
1933 notification_unregister_detailed_changed_cb(
1934                 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
1935                 void *user_data);
1936
1937 /**
1938  * @brief This function get notification data count.
1939  * @details Count is the result of the conditions that type, pkgname, group_id, priv_id.
1940  * @remarks
1941  * @param[in] type notification type
1942  * @param[in] pkgname caller application package name
1943  * @param[in] group_id group id
1944  * @param[in] priv_id private id
1945  * @param[out] count notification data number
1946  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1947  * @retval NOTIFICATION_ERROR_NONE - success
1948  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1949  * @pre
1950  * @post
1951  * @see #notification_type_e
1952  * @par Sample code:
1953  * @code
1954 #include <notification.h>
1955 ...
1956 {
1957         notification_list_h noti_list = NULL;
1958         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
1959         int count = 0;
1960         
1961         noti_err = notification_get_count(NOTIFICATION_TYPE_NONE, NULL, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE, &count);
1962         if(noti_err != NOTIFICATION_ERROR_NONE) {
1963                 return;
1964         }
1965 }
1966  * @endcode
1967  */
1968 notification_error_e notification_get_count(notification_type_e type,
1969                                             const char *pkgname,
1970                                             int group_id, int priv_id,
1971                                             int *count);
1972
1973 /**
1974  * @brief This function will be deprecated.
1975  * @see notification_get_grouping_list()
1976  *
1977  */
1978 notification_error_e notification_get_list(notification_type_e type,
1979                                            int count,
1980                                            notification_list_h * list);
1981
1982 /**
1983  * @brief This function return notification grouping list handle.
1984  * @details If count is -1, all of notification list is returned.
1985  * @remarks
1986  * @param[in] type notification type
1987  * @param[in] count returned notification data number
1988  * @param[out] list notification list handle
1989  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
1990  * @retval NOTIFICATION_ERROR_NONE - success
1991  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
1992  * @pre
1993  * @post
1994  * @see #notification_list_h
1995  * @par Sample code:
1996  * @code
1997 #include <notification.h>
1998 ...
1999 {
2000         notification_list_h noti_list = NULL;
2001         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
2002         
2003         noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, &noti_list);
2004         if(noti_err != NOTIFICATION_ERROR_NONE) {
2005                 return;
2006         }
2007 }
2008  * @endcode
2009  */
2010 notification_error_e notification_get_grouping_list(notification_type_e type,
2011                                                     int count,
2012                                                     notification_list_h *list);
2013
2014 /**
2015  * @brief This function return notification detail list handle of grouping data.
2016  * @details If count is -1, all of notification list is returned.
2017  * @remarks
2018  * @param[in] pkgname caller application package name
2019  * @param[in] group_id group id
2020  * @param[in] priv_id private id
2021  * @param[in] count returned notification data number
2022  * @param[out] list notification list handle
2023  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
2024  * @retval NOTIFICATION_ERROR_NONE - success
2025  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
2026  * @pre
2027  * @post
2028  * @see #notification_list_h
2029  * @par Sample code:
2030  * @code
2031 #include <notification.h>
2032 ...
2033 {
2034         notification_list_h noti_list = NULL;
2035         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
2036         
2037         noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, &noti_list);
2038         if(noti_err != NOTIFICATION_ERROR_NONE) {
2039                 return;
2040         }
2041 }
2042  * @endcode
2043  */
2044 notification_error_e notification_get_detail_list(const char *pkgname,
2045                                                   int group_id,
2046                                                   int priv_id,
2047                                                   int count,
2048                                                   notification_list_h *list);
2049
2050 /**
2051  * @brief This function release notification list.
2052  * @details
2053  * @remarks
2054  * @param[in] list notification list handle
2055  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
2056  * @retval NOTIFICATION_ERROR_NONE - success
2057  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
2058  * @pre notification_get_grouping_list() or notification_get_detail_list ()
2059  * @post
2060  * @see #notification_list_h
2061  * @par Sample code:
2062  * @code
2063 #include <notification.h>
2064 ...
2065 {
2066         notification_list_h noti_list = NULL;
2067         notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
2068
2069         ...
2070         
2071         noti_err = notification_free_list(noti_list);
2072         if(noti_err != NOTIFICATION_ERROR_NONE) {
2073                 return;
2074         }
2075 }
2076  * @endcode
2077  */
2078 notification_error_e notification_free_list(notification_list_h list);
2079
2080 /** 
2081  * @}
2082  */
2083
2084 /**
2085  * @brief You can get the information about notification operation using this function
2086  * @details
2087  * @remarks
2088  * @param[in] list notification list handle
2089  * @return NOTIFICATION_ERROR_NONE if success, other value if failure.
2090  * @retval NOTIFICATION_ERROR_NONE - success
2091  * @retval NOTIFICATION_ERROR_INVALID_DATA - invalid parameter
2092  * @pre notification_get_grouping_list() or notification_get_detail_list ()
2093  * @post
2094  * @see #notification_op
2095  */
2096 notification_error_e notification_op_get_data(notification_op *noti_op,
2097                                                        notification_op_data_type_e type,
2098                                                        void *data);
2099
2100 /**
2101  * @}
2102  */
2103
2104 void notification_call_changed_cb(notification_op *op_list, int op_num);
2105
2106 int notification_is_service_ready(void);
2107
2108 notification_error_e notification_add_deffered_task(
2109                 void (*deffered_task_cb)(void *data), void *user_data);
2110
2111 notification_error_e notification_del_deffered_task(
2112                 void (*deffered_task_cb)(void *data));
2113
2114 #ifdef __cplusplus
2115 }
2116 #endif
2117 #endif                          /* __NOTIFICATION_H__ */