Adjust coding rules
[platform/core/api/notification.git] / include / notification_status_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_STATUS_INTERNAL_DEF_H__
18 #define __NOTIFICATION_STATUS_INTERNAL_DEF_H__
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif /* __cplusplus */
23
24 /**
25  * @file notification_status_internal.h
26  */
27
28 /**
29  * @addtogroup NOTIFICATION_STATUS
30  * @{
31  */
32
33 /**
34  * @internal
35  * @brief Unregisters a callback for all notification events.
36  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
37  * @privlevel public
38  * @privilege %http://tizen.org/privilege/notification
39  * @param[in] changed_cb The callback function
40  * @return #NOTIFICATION_ERROR_NONE on success,
41  *         otherwise any other value on failure
42  * @retval #NOTIFICATION_ERROR_NONE         Success
43  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
44  * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
45  * @see notification_register_detailed_changed_cb()
46  * @par Sample code:
47  * @code
48 #include <notification.h>
49 ...
50 {
51         noti_err = notification_register_detailed_changed_cb(app_changed_cb, user_data);
52         if(noti_err != NOTIFICATION_ERROR_NONE) {
53                 return;
54         }
55 }
56  * @endcode
57  */
58 int notification_unregister_detailed_changed_cb(
59                 void (*detailed_changed_cb)(void *data, notification_type_e type, notification_op *op_list, int num_op),
60                 void *user_data);
61
62 /**
63  * @internal
64  * @brief Called when a new message is posted.
65  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
66  * @param[in] message The message posted
67  * @param[in] data    The user data
68  * @pre notification_status_monitor_message_cb_set() used to register this callback.
69  * @see notification_status_monitor_message_cb_set()
70 */
71 typedef void (*notification_status_message_cb)(const char *message, void *data);
72
73 /**
74  * @internal
75  * @brief Registers a callback to receive a message.
76  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
77  * @param[in] callback The callback function
78  * @param[in] data     The user_data
79  * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
80  * @retval #NOTIFICATION_ERROR_NONE Success
81  * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
82  * @retval #NOTIFICATION_ERROR_FROM_DBUS Error from DBus
83  */
84 int notification_status_monitor_message_cb_set(notification_status_message_cb callback, void *user_data);
85
86 /**
87  * @internal
88  * @brief Unregisters a callback to receive a message.
89  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
90  * @param[in] callback The callback function
91  * @param[in] data     The user_data
92  * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
93  * @retval #NOTIFICATION_ERROR_NONE Success
94  */
95 int notification_status_monitor_message_cb_unset(void);
96
97 /**
98  * @}
99  */
100
101 #ifdef __cplusplus
102 }
103 #endif /* __cplusplus */
104 #endif /* __NOTIFICATION_STATUS_INTERNAL_DEF_H__ */
105