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