Using gdbus for IPC instead of com-core package
[platform/core/api/notification.git] / include / notification_internal.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>
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_INTERNAL_H__
23 #define __NOTIFICATION_INTERNAL_H__
24 #include <glib.h>
25 #include <notification_error.h>
26 #include <notification_type.h>
27 #include <notification_list.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /**
34  * @addtogroup NOTIFICATION_INTERNAL
35  * @{
36  */
37
38 #define NOTIFICATION_DISPLAY_APP_HEADS_UP NOTIFICATION_DISPLAY_APP_ACTIVE /* To avoid build error */
39 #define NOTIFICATION_ERROR (notification_error_quark ())
40 GQuark notification_error_quark(void);
41
42 /**
43  * @brief This function add deferred task. the registered task will be executed when notification service become ready
44  * @param[in] deferred_task_cb The callback function
45  * @param[in] user_data The user data to be passed to the callback function
46  * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
47  * @see #notification_error_e
48  * @see notification_is_service_ready()
49  */
50 int notification_add_deferred_task(
51                 void (*deferred_task_cb)(void *data), void *user_data);
52
53 /**
54  * @brief This function remove deferred task.
55  * @param[in] deferred_task_cb The callback function
56  * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
57  * @see #notification_error_e
58  * @see notification_is_service_ready()
59  */
60 int notification_del_deferred_task(
61                 void (*deferred_task_cb)(void *data));
62
63 /**
64  * @brief This function will be removed.
65  * @see notification_unresister_changed_cb()
66  */
67 int
68 notification_resister_changed_cb(
69         void (*changed_cb)(void *data, notification_type_e type),
70         void *user_data);
71
72 /**
73  * @brief This function will be removed.
74  * @see notification_resister_changed_cb()
75  */
76 int
77 notification_unresister_changed_cb(
78         void (*changed_cb)(void *data, notification_type_e type));
79
80 /**
81  * @brief Updates the progress of the inserted notification. This only works for the ongoing notification (NOTIFICATION_TYPE_ONGOING).
82  * @details The Notification view on the notification area could be updated.
83  * @param[in] noti Notification handle or NULL if priv_id is valid
84  * @param[in] priv_id Private ID
85  * @param[in] progress Percentage value of progressive data
86  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
87  * @retval NOTIFICATION_ERROR_NONE Success
88  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
89  * @par Sample code:
90  * @code
91 #include <notification.h>
92 ...
93  {
94         int noti_err = NOTIFICATION_ERROR_NONE;
95
96         noti_err  = notification_update_progress(NULL, APP_NOTI_PRIV_ID, 0.6);
97         if(noti_err != NOTIFICATION_ERROR_NONE) {
98                 return;
99         }
100 }
101  * @endcode
102  */
103 int notification_update_progress(notification_h noti,
104                                                   int priv_id,
105                                                   double progress);
106
107 /**
108  * @brief Updates the size of inserted notification data. This only works for the ongoing notification (NOTIFICATION_TYPE_ONGOING).
109  * @details Notification view on notification area could be updated.
110  * @param[in] noti Notification handle or NULL if priv_id is valid
111  * @param[in] priv_id Private ID
112  * @param[in] size Bytes of progressive data
113  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
114  * @retval NOTIFICATION_ERROR_NONE Success
115  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
116  * @par Sample code:
117  * @code
118 #include <notification.h>
119 ...
120  {
121         int noti_err = NOTIFICATION_ERROR_NONE;
122
123         noti_err  = notification_update_size(NULL, APP_NOTI_PRIV_ID, 3000000);
124         if(noti_err != NOTIFICATION_ERROR_NONE) {
125                 return;
126         }
127 }
128  * @endcode
129  */
130 int notification_update_size(notification_h noti,
131                                               int priv_id, double size);
132
133 /**
134  * @brief Updates the content of the inserted notification data. This is only for the ongoing notification (NOTIFICATION_TYPE_ONGOING).
135  * @details Notification view on notification area could be updated.
136  * @param[in] noti Notification handle or NULL if priv_id is valid
137  * @param[in] priv_id Private ID
138  * @param[in] content Text to update
139  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
140  * @retval NOTIFICATION_ERROR_NONE Success
141  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
142  * @par Sample code:
143  * @code
144 #include <notification.h>
145 ...
146  {
147         int noti_err = NOTIFICATION_ERROR_NONE;
148
149         noti_err  = notification_update_content(NULL, APP_NOTI_PRIV_ID, "updated string");
150         if(noti_err != NOTIFICATION_ERROR_NONE) {
151                 return;
152         }
153 }
154  * @endcode
155  */
156 int notification_update_content(notification_h noti,
157                                                          int priv_id,
158                                                          const char *content);
159
160 /**
161  * @brief This function will be deprecated.
162  * @see notification_set_image()
163  *
164  */
165 NOTIFICATION_DEPRECATED_API int notification_set_icon(notification_h noti,
166                                            const char *icon_path);
167
168 /**
169  * @brief This function will be deprecated.
170  * @see notification_get_image()
171  *
172  */
173 NOTIFICATION_DEPRECATED_API int notification_get_icon(notification_h noti,
174                                            char **icon_path);
175
176 /**
177  * @brief This function will be deprecated.
178  * @see notification_set_text()
179  *
180  */
181 NOTIFICATION_DEPRECATED_API int notification_set_title(notification_h noti,
182                                             const char *title,
183                                             const char *loc_title);
184
185 /**
186  * @brief This function will be deprecated.
187  * @see notification_get_text()
188  *
189  */
190 NOTIFICATION_DEPRECATED_API int notification_get_title(notification_h noti,
191                                             char **title,
192                                             char **loc_title);
193
194 /**
195  * @brief This function will be deprecated.
196  * @see notification_set_text()
197  *
198  */
199 NOTIFICATION_DEPRECATED_API int notification_set_content(notification_h noti,
200                                               const char *content,
201                                               const char *loc_content);
202
203 /**
204  * @brief This function will be deprecated.
205  * @see notification_get_text()
206  *
207  */
208 NOTIFICATION_DEPRECATED_API int notification_get_content(notification_h noti,
209                                               char **content,
210                                               char **loc_content);
211
212 /**
213  * @brief This function will be removed.
214  * @see notification_set_execute_option()
215  *
216  */
217 NOTIFICATION_DEPRECATED_API int notification_set_application(notification_h noti, const char *pkgname); /* Do not use this */
218
219 /**
220  * @brief This function will be removed.
221  * @see notification_get_execute_option()
222  *
223  */
224 NOTIFICATION_DEPRECATED_API int notification_get_application(notification_h noti, char **pkgname);      /* Do not use this */
225
226 /**
227  * @brief This function will be deprecated.
228  * @see notification_set_execute_option()
229  *
230  */
231 NOTIFICATION_DEPRECATED_API int notification_set_args(notification_h noti, bundle * args, bundle * group_args); /* Do not use this */
232
233 /**
234  * @brief This function will be deprecated.
235  * @see notification_get_execute_option()
236  *
237  */
238 NOTIFICATION_DEPRECATED_API int notification_get_args(notification_h noti, bundle ** args, bundle ** group_args);       /* Do not use this */
239
240 /**
241  * @brief This function is deprecated.
242  * @see notification_get_grouping_list()
243  *
244  */
245 NOTIFICATION_DEPRECATED_API int notification_get_grouping_list(notification_type_e type,
246                                                     int count,
247                                                     notification_list_h *list);
248
249 /**
250  * @brief This function will be deprecated.
251  * @see notification_delete_by_priv_id()
252  *
253  */
254 NOTIFICATION_DEPRECATED_API int notification_delete_group_by_group_id(const char *pkgname,
255                                                            notification_type_e type,
256                                                            int group_id);
257
258 /**
259  * @brief This function will be deprecated.
260  * @see notification_delete_by_priv_id()
261  *
262  */
263 NOTIFICATION_DEPRECATED_API int notification_delete_group_by_priv_id(const char *pkgname,
264                                                           notification_type_e type,
265                                                           int priv_id);
266 /**
267  * @brief This function will be deprecated.
268  *
269  */
270 NOTIFICATION_DEPRECATED_API int notification_get_count(notification_type_e type,
271                                             const char *pkgname,
272                                             int group_id, int priv_id,
273                                             int *count);
274
275 /**
276  * @brief This function will be deprecated.
277  *
278  */
279 NOTIFICATION_DEPRECATED_API int notifiation_clear(notification_type_e type);
280
281 /**
282  * @internal
283  * @brief This function will be deprecated.
284  * @details Use only for the notification tray's clear button operation.
285  * @param[in] type Notification type
286  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
287  * @retval NOTIFICATION_ERROR_NONE Success
288  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
289  * @see #notification_type_e
290  * @par Sample code:
291  * @code
292 #include <notification.h>
293 ...
294  {
295         int noti_err = NOTIFICATION_ERROR_NONE;
296
297         noti_err  = notification_clear(NOTIFICATION_TYPE_NOTI);
298         if(noti_err != NOTIFICATION_ERROR_NONE) {
299                 return;
300         }
301 }
302  * @endcode
303  */
304 NOTIFICATION_DEPRECATED_API int notification_clear(notification_type_e type);
305
306 /**
307  * @internal
308  * @brief This function will be deprecated.
309  * @return 1 on ready, other value on not ready
310  */
311 NOTIFICATION_DEPRECATED_API int notification_is_service_ready(void);
312
313 /**
314  * @internal
315  * @brief This function will be deprecated.
316  * @param[in] list Notification list handle
317  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
318  * @retval NOTIFICATION_ERROR_NONE Success
319  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
320  * @pre notification_get_grouping_list() or notification_get_detail_list().
321  * @see #notification_op
322  */
323 NOTIFICATION_DEPRECATED_API int notification_op_get_data(notification_op *noti_op,
324                                                        notification_op_data_type_e type,
325                                                        void *data);
326
327 /**
328  * @internal
329  * @brief This function will be deprecated.
330  * @details Caller_pkgname is set automatically when notification_new() is called. We do not recommend to use this API.
331  * @param[in] noti Notification handle
332  * @param[in] pkgname Caller package name
333  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
334  * @retval NOTIFICATION_ERROR_NONE Success
335  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
336  * @par Sample code:
337  * @code
338 #include <notification.h>
339 ...
340 {
341         notification_h noti = NULL;
342         int noti_err = NOTIFICATION_ERROR_NONE;
343
344         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
345         if(noti == NULL) {
346                 return;
347         }
348
349         noti_err  = notification_set_pkgname(noti, "org.tizen.phone");
350         if(noti_err != NOTIFICATION_ERROR_NONE) {
351                 notification_free(noti);
352                 return;
353         }
354 }
355  * @endcode
356  */
357 NOTIFICATION_DEPRECATED_API int notification_set_pkgname(notification_h noti,
358                                               const char *pkgname);
359
360 /**
361  * @internal
362  * @brief This function will be deprecated.
363  * @details If @a pkgname is NULL, caller_pkgname is set internally.
364  * @param[in] pkgname Caller application package name or NULL
365  * @param[in] type Notification type
366  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
367  * @retval NOTIFICATION_ERROR_NONE Success
368  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
369  * @par Sample code:
370  * @code
371 #include <notification.h>
372 ...
373  {
374         int noti_err = NOTIFICATION_ERROR_NONE;
375
376         noti_err  = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
377         if(noti_err != NOTIFICATION_ERROR_NONE) {
378                 return;
379         }
380 }
381  * @endcode
382  */
383 NOTIFICATION_DEPRECATED_API int notification_delete_all_by_type(const char *pkgname,
384                                                      notification_type_e type);
385
386 /**
387  * @internal
388  * @brief This function will be deprecated.
389  * @details If @a pkgname is NULL, caller_pkgname is set internally.
390  * @param[in] pkgname Caller application package name or NULL
391  * @param[in] type Notification type
392  * @param[in] priv_id Priv ID
393  * @return NOTIFICATION_ERROR_NONE if success, other value if failure
394  * @retval NOTIFICATION_ERROR_NONE Success
395  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
396  * @par Sample code:
397  * @code
398 #include <notification.h>
399 ...
400  {
401         int noti_err = NOTIFICATION_ERROR_NONE;
402
403         noti_err  = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, APP_PRIV_ID);
404         if(noti_err != NOTIFICATION_ERROR_NONE) {
405                 return;
406         }
407 }
408  * @endcode
409  */
410 NOTIFICATION_DEPRECATED_API int notification_delete_by_priv_id(const char *pkgname,
411                                                     notification_type_e type,
412                                                     int priv_id);
413
414 /**
415  * @internal
416  * @brief This function will be deprecated.
417  * @details When notification data selected in display application, application launched by appsvc_run_service with service_handle.
418  * @param[in] noti Notification handle
419  * @param[in] type Notification execute type
420  * @param[in] text Basic text for button
421  * @param[in] key Value for localized text
422  * @param[in] service_handle Appsvc bundle data
423  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
424  * @retval NOTIFICATION_ERROR_NONE Success
425  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
426  * @par Sample code:
427  * @code
428 #include <notification.h>
429 ...
430 {
431         notification_h noti = NULL;
432         int noti_err = NOTIFICATION_ERROR_NONE;
433         bundle *b = NULL;
434
435         ...
436
437         b = bundle_create();
438         appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
439         appsvc_set_uri(b,"http://www.samsung.com");
440
441         noti_err  = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b);
442         if(noti_err != NOTIFICATION_ERROR_NONE) {
443                 notification_free(noti);
444                 return;
445         }
446
447         bundle_free(b);
448 }
449  * @endcode
450  */
451 NOTIFICATION_DEPRECATED_API int notification_set_execute_option(notification_h noti,
452                                                      notification_execute_type_e type,
453                                                      const char *text,
454                                                      const char *key,
455                                                      bundle *service_handle);
456
457 /**
458  * @internal
459  * @brief This function will be deprecated.
460  * @remarks ID is valid only after inserting the notification.
461  * @param[in] noti Notification handle
462  * @param[out] group_id Group ID
463  * @param[out] priv_id Private ID
464  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
465  * @retval NOTIFICATION_ERROR_NONE Success
466  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
467  * @par Sample code:
468  * @code
469 #include <notification.h>
470  ...
471   {
472          int noti_err = NOTIFICATION_ERROR_NONE;
473          int group_id, priv_id;
474  
475          noti_err  = notification_get_id(noti, &group_id, &priv_id);
476          if(noti_err != NOTIFICATION_ERROR_NONE) {
477                  return;
478          }
479  }
480  * @endcode
481  */
482 NOTIFICATION_DEPRECATED_API int notification_get_id(notification_h noti,
483                                          int *group_id, int *priv_id);
484
485 /**
486  * @internal
487  * @brief This function will be deprecated.
488  * @param[in] type Notification type
489  * @param[in] group_id Group ID
490  * @param[in] priv_id Priv ID
491  * @return Notification handle(#notification_h) on success, NULL on failure
492  * @retval #notification_h Success
493  * @retval NULL Failure
494  * @see #notification_type_e
495  * @see #notification_h
496  * @par Sample code:
497  * @code
498 #include <notification.h>
499 ...
500 {
501         notification_h noti = NULL;
502
503         noti = notification_load("org.tizen.app", priv_id);
504         if(noti == NULL) {
505                 return;
506         }
507         ...
508 }
509  * @endcode
510  */
511 NOTIFICATION_DEPRECATED_API notification_h notification_load(char *pkgname,
512                                 int priv_id);
513
514 /**
515  * @internal
516  * @brief This function will be deprecated.
517  * @details Available types are #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING.
518  * #NOTIFICATION_TYPE_NOTI is remaining notification data even if device is restarted.
519  * #NOTIFICATION_TYPE_ONGOING can display progressive feather, but notification data is removed after device is restarted.
520  * If group_id is #NOTIFICATION_GROUP_ID_NONE, notification data is not grouped. #NOTIFICATION_GROUP_ID_DEFAULT,
521  * notification data is grouped with same title. Positive number ( > 0 ) is grouped with same number.
522  * If priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id is set internally and return it when notification_insert() call.
523  * Positive number and zero ( >= 0 ) is application set private ID. These ID should have be unique each application package.
524  * @param[in] type Notification type
525  * @param[in] group_id Group ID
526  * @param[in] priv_id Priv ID
527  * @return Notification handle(#notification_h) on success, NULL on failure
528  * @retval #notification_h Success
529  * @retval NULL Failure
530  * @see #notification_type_e
531  * @see #notification_h
532  * @par Sample code:
533  * @code
534 #include <notification.h>
535 ...
536 {
537         notification_h noti = NULL;
538
539         noti = notification_new(NOTIFICATION_TYPE_NOTI, APP_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
540         if(noti == NULL) {
541                 return;
542         }
543         ...
544 }
545  * @endcode
546  */
547 NOTIFICATION_DEPRECATED_API notification_h notification_new(notification_type_e type, int group_id,
548                                 int priv_id);
549
550 /**
551  * @internal
552  * @brief This function will be deprecated.
553  * @param[in] noti Notification handle
554  * @param[in] type Notification execute type
555  * @param[out] text Text for button
556  * @param[out] service_handle Appsvc bundle data
557  * @return NOTIFICATION_ERROR_NONE on success, other value on failure
558  * @retval NOTIFICATION_ERROR_NONE Success
559  * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
560  * @par Sample code:
561  * @code
562 #include <notification.h>
563 ...
564 {
565         notification_h noti = NULL;
566         int noti_err = NOTIFICATION_ERROR_NONE;
567         bundle *b = NULL;
568
569         ...
570
571         noti_err  = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, &b);
572         if(noti_err != NOTIFICATION_ERROR_NONE) {
573                 notification_free(noti);
574                 return;
575         }
576 }
577  * @endcode
578  */
579 NOTIFICATION_DEPRECATED_API int notification_get_execute_option(notification_h noti,
580                                                      notification_execute_type_e type,
581                                                      const char **text,
582                                                      bundle **service_handle);
583
584 /**
585  * @internal
586  * @brief Inserts a notification.
587  * @details The notification will be inserted to the database and then it will appear in the notification area.
588  *          When notification_create() is called, if priv_id is #NOTIFICATION_PRIV_ID_NONE, priv_id returns the internally set priv_id.
589  * @since_tizen 2.3
590  * @privlevel public
591  * @privilege %http://tizen.org/privilege/notification
592  * @param[in]  noti    The notification handle
593  * @param[out] priv_id The private ID
594  * @return #NOTIFICATION_ERROR_NONE on success,
595  *         otherwise any other value on failure
596  * @retval #NOTIFICATION_ERROR_NONE         Success
597  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
598  * @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
599  * @pre Notification handle should be created by notification_create().
600  * @post notification_free().
601  * @par Sample code:
602  * @code
603 #include <notification.h>
604 ...
605  {
606         int noti_err = NOTIFICATION_ERROR_NONE;
607
608         noti_err  = notification_insert(noti, NULL);
609         if(noti_err != NOTIFICATION_ERROR_NONE) {
610                 return;
611         }
612 }
613  * @endcode
614  */
615 int notification_insert(notification_h noti,
616                                          int *priv_id);
617
618 /**
619  * @internal
620  * @brief Updates a notification, asynchronously.
621  * @details The updated notification will appear in the notification area.
622  * @since_tizen 2.3
623  * @privlevel public
624  * @privilege %http://tizen.org/privilege/notification
625  * @remarks This function updates the notification asynchronously.
626  * @param[in] noti      The notification handle that is created by notification_create()
627  * @param[in] result_cb The callback called when an update completed
628  * @param[in] user_data The user data which you want to use in callback
629  * @return #NOTIFICATION_ERROR_NONE on success,
630  *         otherwise any other value on failure
631  * @retval #NOTIFICATION_ERROR_NONE         Success
632  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
633  * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist
634  * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
635  * @par Sample code:
636  * @code
637 #include <notification.h>
638 ...
639  {
640         int noti_err = NOTIFICATION_ERROR_NONE;
641
642         noti_err  = notification_update_async(NULL, result_cb, data);
643         if(noti_err != NOTIFICATION_ERROR_NONE) {
644                 return;
645         }
646 }
647  * @endcode
648  */
649 int notification_update_async(notification_h noti,
650                 void (*result_cb)(int priv_id, int result, void *data), void *user_data);
651
652 /**
653  * @internal
654  * @brief Registers a callback for all notification events.
655  * @details The registered callback could be called for all notification events.
656  * @since_tizen 2.3
657  * @privlevel public
658  * @privilege %http://tizen.org/privilege/notification
659  * @param[in] changed_cb The callback function
660  * @param[in] user_data  The user data
661  * @return #NOTIFICATION_ERROR_NONE on success,
662  *         otherwise any other value on failure
663  * @retval #NOTIFICATION_ERROR_NONE         Success
664  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
665  * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
666  * @see notification_unregister_detailed_changed_cb()
667  * @par Sample code:
668  * @code
669 #include <notification.h>
670 ...
671 {
672         noti_err = notification_register_detailed_changed_cb(app_changed_cb, user_data);
673         if(noti_err != NOTIFICATION_ERROR_NONE) {
674                 return;
675         }
676 }
677  * @endcode
678  */
679 int notification_register_detailed_changed_cb(
680                 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
681                 void *user_data);
682
683 /**
684  * @internal
685  * @brief Unregisters a callback for all notification events.
686  * @since_tizen 2.3
687  * @privlevel public
688  * @privilege %http://tizen.org/privilege/notification
689  * @param[in] changed_cb The callback function
690  * @return #NOTIFICATION_ERROR_NONE on success,
691  *         otherwise any other value on failure
692  * @retval #NOTIFICATION_ERROR_NONE         Success
693  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
694  * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
695  * @see notification_register_detailed_changed_cb()
696  * @par Sample code:
697  * @code
698 #include <notification.h>
699 ...
700 {
701         noti_err = notification_register_detailed_changed_cb(app_changed_cb, user_data);
702         if(noti_err != NOTIFICATION_ERROR_NONE) {
703                 return;
704         }
705 }
706  * @endcode
707  */
708 int notification_unregister_detailed_changed_cb(
709                 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
710                 void *user_data);
711 /**
712  * @}
713  */
714
715 #ifdef __cplusplus
716 }
717 #endif
718 #endif