sync with private git
[platform/core/api/notification.git] / include / notification_type.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_TYPE_H__
23 #define __NOTIFICATION_TYPE_H__
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /**
30  * @ingroup NOTIFICATION_LIBRARY
31  * @defgroup NOTIFICATION_TYPE notification type
32  * @brief Notification type
33  */
34
35 /**
36  * @addtogroup NOTIFICATION_TYPE
37  * @{
38  */
39
40 /**
41  * @brief Enumeration for notification operation code
42  */
43 typedef enum _notification_op_type {
44         NOTIFICATION_OP_NONE = 0,
45         NOTIFICATION_OP_INSERT = 1,
46         NOTIFICATION_OP_UPDATE,
47         NOTIFICATION_OP_DELETE,
48         NOTIFICATION_OP_DELETE_ALL,
49         NOTIFICATION_OP_REFRESH,
50         NOTIFICATION_OP_SERVICE_READY,
51 } notification_op_type_e;
52
53 /**
54  * @brief Enumeration for notification operation data code
55  */
56 typedef enum _notification_op_data_type {
57         NOTIFICATION_OP_DATA_MIN = 0,
58         NOTIFICATION_OP_DATA_TYPE,
59         NOTIFICATION_OP_DATA_PRIV_ID,
60         NOTIFICATION_OP_DATA_NOTI,
61         NOTIFICATION_OP_DATA_EXTRA_INFO_1,
62         NOTIFICATION_OP_DATA_EXTRA_INFO_2,
63         NOTIFICATION_OP_DATA_MAX,
64 } notification_op_data_type_e;
65
66 /**
67  * @brief Enumeration for notification layout type
68  */
69 typedef enum _notification_ly_type {
70         NOTIFICATION_LY_NONE = 0,
71         NOTIFICATION_LY_NOTI_EVENT_SINGLE,
72         NOTIFICATION_LY_NOTI_EVENT_MULTIPLE,
73         NOTIFICATION_LY_NOTI_THUMBNAIL,
74         NOTIFICATION_LY_ONGOING_EVENT,
75         NOTIFICATION_LY_ONGOING_PROGRESS,
76         NOTIFICATION_LY_MAX,
77 } notification_ly_type_e;
78
79 /**
80  * @brief Enumeration for notification sound type.
81  */
82 typedef enum _notification_sound_type {
83         NOTIFICATION_SOUND_TYPE_NONE = -1,
84                                         /**< Default value. Disable sound */
85         NOTIFICATION_SOUND_TYPE_DEFAULT = 0,
86                                         /**< New chat sound */
87         NOTIFICATION_SOUND_TYPE_USER_DATA,
88                                         /**< User sound data */
89         NOTIFICATION_SOUND_TYPE_MAX,
90                                 /**< Max flag */
91 } notification_sound_type_e;
92
93 /**
94  * @brief Enumeration for notification vibration type.
95  */
96 typedef enum _notification_vibration_type {
97         NOTIFICATION_VIBRATION_TYPE_NONE = -1,
98                                         /**< Default value. Disable vibration */
99         NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0,/**< New chat vibration */
100         NOTIFICATION_VIBRATION_TYPE_USER_DATA,
101                                         /**< User vibration data */
102         NOTIFICATION_VIBRATION_TYPE_MAX,/**< Max flag */
103 } notification_vibration_type_e;
104
105 /**
106  * @brief Enumeration for notification led operation.
107  */
108 typedef enum _notification_led_op {
109         NOTIFICATION_LED_OP_OFF = -1,
110                                         /**< Default value. Disable led */
111         NOTIFICATION_LED_OP_ON = 0,/**< turn on led with default color */
112         NOTIFICATION_LED_OP_ON_CUSTOM_COLOR,
113                                         /**< turn on led with custom color */
114         NOTIFICATION_LED_OP_MAX,/**< Max flag */
115 } notification_led_op_e;
116
117 /**
118  * @brief Will be deprecated.
119  */
120 typedef enum _notification_count_display_type {
121         NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1,
122         NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0,
123         NOTIFICATION_COUNT_DISPLAY_TYPE_IN,
124         NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT,
125         NOTIFICATION_COUNT_DISPLAY_TYPE_MAX,
126 } notification_count_display_type_e;
127
128 /**
129  * @brief Enumeration for notification count position in the text.
130  */
131 typedef enum _notifcation_count_pos_type {
132         NOTIFICATION_COUNT_POS_NONE = -1,
133                                         /**< Count data is not displaying in the text */
134         NOTIFICATION_COUNT_POS_LEFT = 0,/**< Count data is displaying at the left of the text */
135         NOTIFICATION_COUNT_POS_IN,
136                                 /**< Count data is displaying in the text */
137         NOTIFICATION_COUNT_POS_RIGHT,
138                                 /**< Count data is displaying at the right of the text */
139         NOTIFICATION_COUNT_POS_MAX,
140                                 /**< Max flag */
141 } notification_count_pos_type_e;
142
143 /**
144  * @brief Enumeration for notification variable parameter type
145  */
146 typedef enum _notification_variable_type {
147         NOTIFICATION_VARIABLE_TYPE_NONE = -1,
148                                         /**< Variable parameter type is NONE */
149         NOTIFICATION_VARIABLE_TYPE_INT = 0,
150                                         /**< Variable parameter type is int */
151         NOTIFICATION_VARIABLE_TYPE_DOUBLE,
152                                         /**< Variable parameter type is double */
153         NOTIFICATION_VARIABLE_TYPE_STRING,
154                                         /**< Variable parameter type is string */
155         NOTIFICATION_VARIABLE_TYPE_COUNT,
156                                         /**< Variable parameter type is count */
157         NOTIFICATION_VARIABLE_TYPE_MAX,
158                                 /**< Max flag */
159 } notification_variable_type_e;
160
161 /**
162  * @brief Enumeration for notification text type.
163  */
164 typedef enum _notification_text_type {
165         NOTIFICATION_TEXT_TYPE_NONE = -1,
166                                         /**< NONE */
167         NOTIFICATION_TEXT_TYPE_TITLE = 0,
168                                         /**< Title */
169         NOTIFICATION_TEXT_TYPE_CONTENT,
170                                 /**< Content */
171         NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
172                                                                 /**< Content for content display option is off of the Settings */
173         NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
174                                                                 /**< text to display event count */
175         NOTIFICATION_TEXT_TYPE_INFO_1,
176                                                                 /**< box contents 1 */
177         NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
178                                                                 /**< box contents 2 */
179         NOTIFICATION_TEXT_TYPE_INFO_2,
180                                                                 /**< box contents 3 */
181         NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
182                                                                 /**< box contents 4 */
183         NOTIFICATION_TEXT_TYPE_INFO_3,
184                                                                 /**< box contents 5 */
185         NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
186                                                                 /**< box contents 5 */
187         NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
188                                         /**< Group title */
189         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
190                                         /**< Group content */
191         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
192                                                                 /**< Group content for content display option is off of the Settings */
193         NOTIFICATION_TEXT_TYPE_MAX,
194                                 /**< Max flag */
195 } notification_text_type_e;
196
197 /**
198  * @brief Enumeration for image text type.
199  */
200 typedef enum _notification_image_type {
201         NOTIFICATION_IMAGE_TYPE_NONE = -1,
202                                         /**< NONE */
203         NOTIFICATION_IMAGE_TYPE_ICON = 0,
204                                         /**< Icon */
205         NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
206                                                 /**< Indicator icon */
207         NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
208                                         /**< Lock screen icon */
209         NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
210                                         /**< Thumbnail */
211         NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
212                                                 /**< Lock screen thumbnail */
213         NOTIFICATION_IMAGE_TYPE_ICON_SUB,
214                                         /**< Icon */
215         NOTIFICATION_IMAGE_TYPE_BACKGROUND,
216                                                 /**< image displayed on background */
217         NOTIFICATION_IMAGE_TYPE_LIST_1,
218                                                 /**< image for multiple event */
219         NOTIFICATION_IMAGE_TYPE_LIST_2,
220                                                 /**< image for multiple event */
221         NOTIFICATION_IMAGE_TYPE_LIST_3,
222                                                 /**< image for multiple event */
223         NOTIFICATION_IMAGE_TYPE_LIST_4,
224                                                 /**< image for multiple event */
225         NOTIFICATION_IMAGE_TYPE_LIST_5,
226                                                 /**< image for multiple event */
227         NOTIFICATION_IMAGE_TYPE_MAX,
228                                 /**< Max flag */
229 } notification_image_type_e;
230
231 /*typedef enum _notification_button_type {
232         NOTIFICATION_BUTTON_TYPE_NONE = -1,
233         NOTIFICATION_BUTTON_TYPE_RUN = 0,
234         NOTIFICATION_BUTTON_TYPE_VIEW,
235         NOTIFICATION_BUTTON_TYPE_DISMISS,
236         NOTIFICATION_BUTTON_TYPE_MAX,
237 }notification_button_type_e;*/
238
239 /**
240  * @brief Enumeration for application execution type.
241  */
242 typedef enum _notification_execute_type {
243         NOTIFICATION_EXECUTE_TYPE_NONE = -1,
244                                         /**< No operation */
245         NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
246                                                 /**< Responding */
247         NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,/**< Launching when notification data is single */
248         NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
249                                         /**< Launching when notification data is grouping(multi) */
250         NOTIFICATION_EXECUTE_TYPE_MAX,
251                                 /**< Max flag */
252 } notification_execute_type_e;
253
254 /**
255  * @brief Enumeration for notification type.
256  */
257 typedef enum _notification_type {
258         NOTIFICATION_TYPE_NONE = -1,
259                                 /**< None */
260         NOTIFICATION_TYPE_NOTI = 0,
261                                 /**< Notification type */
262         NOTIFICATION_TYPE_ONGOING,
263                                 /**< Ongoing type */
264         NOTIFICATION_TYPE_MAX,
265                         /**< Max flag */
266 } notification_type_e;
267
268 /**
269  * @brief Enumeration for Group ID.
270  */
271 enum _notification_group_id {
272         NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
273         NOTIFICATION_GROUP_ID_DEFAULT = 0,
274                                         /**< Notification that has same title is grouping */
275 };
276
277 /**
278  * @brief Enumeration for Private ID.
279  */
280 enum _notification_priv_id {
281         NOTIFICATION_PRIV_ID_NONE = -1,
282                                 /**< Internally set priv_id */
283 };
284
285 /**
286  * @brief Enumeration for notification property
287  */
288 enum _notification_property {
289         NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 0x00000001,
290                                                         /**< Display only SIM card inserted */
291         NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 0x00000002,
292                                                         /**< Disable application launch when it selected */
293         NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 0x00000004,
294                                                         /**< Disable auto delete when it selected */
295         NOTIFICATION_PROP_LAUNCH_UG = 0x00000008,
296                                                 /**< Will be deprecated. Notification Tray should launch application using appsvc API */
297         NOTIFICATION_PROP_DISABLE_TICKERNOTI = 0x00000010,
298                                                         /**< Will be deprecated. Use notification_set_display_applist API */
299         NOTIFICATION_PROP_PERMANENT_DISPLAY = 0x00000020,
300                                                         /** < Will be deprecated. */
301         NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 0x00000040,/**< Disable update when it inserted. */
302         NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 0x00000080,/**< Disable update when it deleted. */
303         NOTIFICATION_PROP_VOLATILE_DISPLAY = 0x00000100,/**< Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type */
304 };
305
306 /**
307  * @brief Enumeration for display application list
308  */
309 enum _notificaton_display_applist {
310         NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 0x00000001,/**< Notification Tray(Quickpanel) */
311         NOTIFICATION_DISPLAY_APP_TICKER = 0x00000002,
312                                                 /**< Ticker notification */
313         NOTIFICATION_DISPLAY_APP_LOCK = 0x00000004,
314                                                 /**< Lock screen */
315         NOTIFICATION_DISPLAY_APP_INDICATOR = 0x00000008,/**< Indicator */
316         NOTIFICATION_DISPLAY_APP_ALL = 0xffffffff,
317                                                 /**< All display application */
318 };
319
320 /**
321  * @brief Notification handle
322  */
323 typedef struct _notification *notification_h;
324
325 /**
326  * @brief Notification operation handle
327  */
328 typedef struct _notification_op {
329         notification_op_type_e type;
330         int priv_id;
331         int extra_info_1;
332         int extra_info_2;
333         notification_h noti;
334 } notification_op;
335 /** 
336  * @}
337  */
338
339 #ifdef __cplusplus
340 }
341 #endif
342 #endif                          /* __NOTIFICATION_TYPE_H__ */