Fixed build errors caused by 2.4 merge.
[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>
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 #ifndef NOTIFICATION_DEPRECATED_API
30 #if 0//__GNUC__
31 #define NOTIFICATION_DEPRECATED_API __attribute__((deprecated))
32 #else
33 #define NOTIFICATION_DEPRECATED_API
34 #endif
35 #endif
36
37 /**
38  * @file notification_type.h
39  * @brief This file contains type definitions and enumerations for Notification API.
40  */
41
42 /**
43  * @addtogroup NOTIFICATION_MODULE
44  * @{
45  */
46
47 /**
48  * @brief Enumeration for notification layout type.
49  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
50  */
51 typedef enum _notification_ly_type {
52         NOTIFICATION_LY_NONE = 0,
53                 /**< Default */
54         NOTIFICATION_LY_NOTI_EVENT_SINGLE,
55         /**< Layout for notification. Used to inform single event*/
56         NOTIFICATION_LY_NOTI_EVENT_MULTIPLE,
57         /**< Layout for notification. Used to inform multiple event*/
58         NOTIFICATION_LY_NOTI_THUMBNAIL,
59         /**< Layout for notification. Used to display images*/
60         NOTIFICATION_LY_ONGOING_EVENT,
61         /**< Layout for ongoing notification. Used to display text message*/
62         NOTIFICATION_LY_ONGOING_PROGRESS,
63         /**< Layout for ongoing notification. Used to display progress*/
64         NOTIFICATION_LY_MAX,
65                 /**< TBD */
66 } notification_ly_type_e;
67
68 /**
69  * @brief Enumeration for notification lauch option type.
70  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
71  */
72 typedef enum  _notification_launch_option_type {
73         NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1,
74                                         /**< launching with app control */
75 } notification_launch_option_type;
76
77 /**
78  * @brief Enumeration for event type on notification.
79  * @since_tizen 2.4
80  */
81 typedef enum _notification_event_type {
82         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1  = 0,  /** < Event type : Click on button 1 */
83         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_2  = 1,  /** < Event type : Click on button 2 */
84         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_3  = 2,  /** < Event type : Click on button 3 */
85         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_4  = 3,  /** < Event type : Click on button 4 */
86         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_5  = 4,  /** < Event type : Click on button 5 */
87         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_6  = 5,  /** < Event type : Click on button 6 */
88         NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON      = 6,  /** < Event type : Click on icon */
89         NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL = 7,  /** < Event type : Click on thumbnail */
90         NOTIFICATION_EVENT_TYPE_MAX,
91 } notification_event_type_e;
92
93 /**
94  * @brief Enumeration for notification sound type.
95  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
96  */
97 typedef enum _notification_sound_type {
98         NOTIFICATION_SOUND_TYPE_NONE = -1,
99                                         /**< Default value. no sound */
100         NOTIFICATION_SOUND_TYPE_DEFAULT = 0,
101                                         /**< Default sound */
102         NOTIFICATION_SOUND_TYPE_USER_DATA,
103                                         /**< User sound data */
104         NOTIFICATION_SOUND_TYPE_MAX,
105 } notification_sound_type_e;
106
107 /**
108  * @brief Enumeration for notification vibration type.
109  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
110  */
111 typedef enum _notification_vibration_type {
112         NOTIFICATION_VIBRATION_TYPE_NONE = -1,
113                     /**< Default value. No vibration */
114         NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0,/**< Default vibrate pattern */
115         NOTIFICATION_VIBRATION_TYPE_USER_DATA,
116                                         /**< User vibration data */
117         NOTIFICATION_VIBRATION_TYPE_MAX,
118 } notification_vibration_type_e;
119
120 /**
121  * @brief Enumeration for notification LED operation.
122  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
123  */
124 typedef enum _notification_led_op {
125         NOTIFICATION_LED_OP_OFF = -1,
126                                         /**< Default value. Disable the LED notification */
127         NOTIFICATION_LED_OP_ON = 0,/**< Turn on the LED with default color */
128         NOTIFICATION_LED_OP_ON_CUSTOM_COLOR,
129                                         /**< Turn on the LED with custom color */
130         NOTIFICATION_LED_OP_MAX,/**< Max flag */
131 } notification_led_op_e;
132
133 /**
134  * @deprecated Deprecated since 2.3.1
135  * @brief Enumeration for setting display type of count
136  * @since_tizen 2.3
137  */
138 typedef enum _notification_count_display_type {
139         NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1,
140         NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0,       /**< The number is placed to left */
141         NOTIFICATION_COUNT_DISPLAY_TYPE_IN,     /**< The number is placed to center */
142         NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT,  /**< The number is placed to right */
143         NOTIFICATION_COUNT_DISPLAY_TYPE_MAX,
144 } notification_count_display_type_e;
145
146 /**
147  * @brief Enumeration for button
148  * @since_tizen 2.4
149  */
150 typedef enum _notification_button_index {
151         NOTIFICATION_BUTTON_1 = 1, /**< button 1 */
152         NOTIFICATION_BUTTON_2 = 2, /**< button 2 */
153         NOTIFICATION_BUTTON_3 = 3, /**< button 3 */
154         NOTIFICATION_BUTTON_4 = 4, /**< button 4 */
155         NOTIFICATION_BUTTON_5 = 5, /**< button 5 */
156         NOTIFICATION_BUTTON_6 = 6, /**< button 6 */
157 } notification_button_index_e;
158
159 /**
160  * @brief Enumeration for notification text type.
161  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
162  */
163 typedef enum _notification_text_type {
164         NOTIFICATION_TEXT_TYPE_NONE = -1,
165         NOTIFICATION_TEXT_TYPE_TITLE = 0,
166                                         /**< Title */
167         NOTIFICATION_TEXT_TYPE_CONTENT,
168                                 /**< Content */
169         NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
170                                                                 /**< Content for content display option is off of the Settings */
171         NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
172                                                                 /**< Text to display event count */
173         NOTIFICATION_TEXT_TYPE_INFO_1,
174                                                                 /**< Box contents 1 */
175         NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
176                                                                 /**< Box contents 1-1 */
177         NOTIFICATION_TEXT_TYPE_INFO_2,
178                                                                 /**< Box contents 2 */
179         NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
180                                                                 /**< Box contents 2-1 */
181         NOTIFICATION_TEXT_TYPE_INFO_3,
182                                                                 /**< Box contents 3 */
183         NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
184                                                                 /**< Box contents 3-1 */
185         NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
186                                         /**< Group title */
187         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
188                                         /**< Group content */
189         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
190                                                                 /**< Group content for content display option is off of the Settings */
191         NOTIFICATION_TEXT_TYPE_BUTTON_1,
192                                                                 /**< Text on button 1 */
193         NOTIFICATION_TEXT_TYPE_BUTTON_2,
194                                                                 /**< Text on button 2 */
195         NOTIFICATION_TEXT_TYPE_BUTTON_3,
196                                                                 /**< Text on button 3 */
197         NOTIFICATION_TEXT_TYPE_BUTTON_4,
198                                                                 /**< Text on button 4 */
199         NOTIFICATION_TEXT_TYPE_BUTTON_5,
200                                                                 /**< Text on button 5 */
201         NOTIFICATION_TEXT_TYPE_BUTTON_6,
202                                                                 /**< Text on button 6 */
203         NOTIFICATION_TEXT_TYPE_MAX,
204 } notification_text_type_e;
205
206 /**
207  * @brief Enumeration for image type.
208  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
209  */
210 typedef enum _notification_image_type {
211         NOTIFICATION_IMAGE_TYPE_NONE = -1,
212         NOTIFICATION_IMAGE_TYPE_ICON = 0,
213                                         /**< Icon */
214         NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
215                                                 /**< Indicator icon */
216         NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
217                                         /**< Lock screen icon */
218         NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
219                                         /**< Thumbnail */
220         NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
221                                                 /**< Lock screen thumbnail */
222         NOTIFICATION_IMAGE_TYPE_ICON_SUB,
223                                         /**< Icon */
224         NOTIFICATION_IMAGE_TYPE_BACKGROUND,
225                                                 /**< image displayed on background */
226         NOTIFICATION_IMAGE_TYPE_LIST_1,
227                                                 /**< Image for thumbnail list */
228         NOTIFICATION_IMAGE_TYPE_LIST_2,
229                                                 /**< Image for thumbnail list */
230         NOTIFICATION_IMAGE_TYPE_LIST_3,
231                                                 /**< Image for thumbnail list */
232         NOTIFICATION_IMAGE_TYPE_LIST_4,
233                                                 /**< Image for thumbnail list */
234         NOTIFICATION_IMAGE_TYPE_LIST_5,
235                                                 /**< Image for thumbnail list */
236         NOTIFICATION_IMAGE_TYPE_BUTTON_1,
237                                                 /**< Image for button 1 */
238         NOTIFICATION_IMAGE_TYPE_BUTTON_2,
239                                                 /**< Image for button 2 */
240         NOTIFICATION_IMAGE_TYPE_BUTTON_3,
241                                                 /**< Image for button 3 */
242         NOTIFICATION_IMAGE_TYPE_BUTTON_4,
243                                                 /**< Image for button 4 */
244         NOTIFICATION_IMAGE_TYPE_BUTTON_5,
245                                                 /**< Image for button 5 */
246         NOTIFICATION_IMAGE_TYPE_BUTTON_6,
247                                                 /**< Image for button 6 */
248         NOTIFICATION_IMAGE_TYPE_MAX,
249 } notification_image_type_e;
250
251 /**
252  * @brief Enumeration for application execution type.
253  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
254  */
255 typedef enum _notification_execute_type {
256         NOTIFICATION_EXECUTE_TYPE_NONE = -1,
257                                         /**< No operation */
258         NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
259                                                 /**< Responding action*/
260         NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,/**< Launching when notification data is single */
261         NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
262                                         /**< Launching when notification data is grouping(multi) */
263         NOTIFICATION_EXECUTE_TYPE_MAX,
264                                 /**< Max flag */
265 } notification_execute_type_e;
266
267 /**
268  * @brief Enumeration for notification type.
269  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
270  */
271 typedef enum _notification_type {
272         NOTIFICATION_TYPE_NONE = -1,
273                                 /**< None */
274         NOTIFICATION_TYPE_NOTI = 0,
275                                 /**< Notification type */
276         NOTIFICATION_TYPE_ONGOING,
277                                 /**< Ongoing type */
278         NOTIFICATION_TYPE_MAX,
279                         /**< Max flag */
280 } notification_type_e;
281
282 /**
283  * @brief Enumeration for Group ID.
284  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
285  */
286 enum _notification_group_id {
287         NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
288         NOTIFICATION_GROUP_ID_DEFAULT = 0,
289                                         /**< Notification that has same title is grouping */
290 };
291
292 /**
293  * @brief Enumeration for Private ID.
294  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
295  */
296 enum _notification_priv_id {
297         NOTIFICATION_PRIV_ID_NONE = -1,
298                                 /**< Internally set priv_id */
299 };
300
301 /**
302  * @brief Enumeration for notification property.
303  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
304  */
305 enum _notification_property {
306         NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 0x00000001,
307                                                         /**< Display only SIM card inserted */
308         NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 0x00000002,
309                                                         /**< Disable application launch when it selected */
310         NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 0x00000004,
311                                                         /**< Disable auto delete when it selected */
312         NOTIFICATION_PROP_LAUNCH_UG = 0x00000008,
313                                                 /**< Notification Tray should launch application using appsvc API (Deprecated since 2.3.1) */
314         NOTIFICATION_PROP_DISABLE_TICKERNOTI = 0x00000010,
315                                                         /**< Use notification_set_display_applist API (Deprecated since 2.3.1) */
316         NOTIFICATION_PROP_PERMANENT_DISPLAY = 0x00000020,
317                                                         /**< The notification will not be removed (Deprecated since 2.3.1) */
318         NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 0x00000040,/**< Disable update when it inserted. */
319         NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 0x00000080,/**< Disable update when it deleted. */
320         NOTIFICATION_PROP_VOLATILE_DISPLAY = 0x00000100,/**< Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type */
321 };
322
323 /**
324  * @brief Enumeration for display application list.
325  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
326  */
327 enum _notificaton_display_applist {
328         NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 0x00000001, /**< Notification Tray(Quickpanel) */
329         NOTIFICATION_DISPLAY_APP_TICKER = 0x00000002, /**< Ticker notification */
330         NOTIFICATION_DISPLAY_APP_LOCK = 0x00000004, /**< Lock screen */
331         NOTIFICATION_DISPLAY_APP_INDICATOR = 0x00000008,/**< Indicator */
332         NOTIFICATION_DISPLAY_APP_ACTIVE = 0x00000010,/**< Active notification */
333         NOTIFICATION_DISPLAY_APP_ALL = 0x0000000f, /**< All display application except active notification*/
334 };
335
336 /**
337  * @brief Enumeration for notification operation code.
338  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
339  */
340 typedef enum _notification_op_type {
341         NOTIFICATION_OP_NONE = 0,       /**< Default */
342         NOTIFICATION_OP_INSERT = 1,     /**< Notification inserted */
343         NOTIFICATION_OP_UPDATE, /**< Notification updated */
344         NOTIFICATION_OP_DELETE, /**< Notification deleted */
345         NOTIFICATION_OP_DELETE_ALL,     /**< Notifications deleted */
346         NOTIFICATION_OP_REFRESH,        /**< (Deprecated Since 2.3.1) */
347         NOTIFICATION_OP_SERVICE_READY,  /**< Notification service is ready  */
348 } notification_op_type_e;
349
350 /**
351  * @brief Enumeration for notification operation data code
352  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
353  */
354 typedef enum _notification_op_data_type {
355         NOTIFICATION_OP_DATA_MIN = 0,   /**< Default */
356         NOTIFICATION_OP_DATA_TYPE,      /**< Operation type */
357         NOTIFICATION_OP_DATA_PRIV_ID,   /**< Private ID */
358         NOTIFICATION_OP_DATA_NOTI,      /**< Notification handler */
359         NOTIFICATION_OP_DATA_EXTRA_INFO_1,      /**< Reserved */
360         NOTIFICATION_OP_DATA_EXTRA_INFO_2,      /**< Reserved */
361         NOTIFICATION_OP_DATA_MAX,       /**< Max flag */
362 } notification_op_data_type_e;
363
364 /**
365  * @brief Enumeration for notification count position in the text.
366  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
367  */
368 typedef enum _notifcation_count_pos_type {
369         NOTIFICATION_COUNT_POS_NONE = -1,
370                                         /**< Count data is not displaying in the text */
371         NOTIFICATION_COUNT_POS_LEFT = 0,/**< Count data is displaying at the left of the text */
372         NOTIFICATION_COUNT_POS_IN,
373                                 /**< Count data is displaying in the text */
374         NOTIFICATION_COUNT_POS_RIGHT,
375                                 /**< Count data is displaying at the right of the text */
376         NOTIFICATION_COUNT_POS_MAX,
377                                 /**< Max flag */
378 } notification_count_pos_type_e;
379
380 /**
381  * @brief Enumeration for notification variable parameter type.
382  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
383  */
384 typedef enum _notification_variable_type {
385         NOTIFICATION_VARIABLE_TYPE_NONE = -1,
386                                         /**< Variable parameter type is NONE */
387         NOTIFICATION_VARIABLE_TYPE_INT = 0,
388                                         /**< Variable parameter type is int */
389         NOTIFICATION_VARIABLE_TYPE_DOUBLE,
390                                         /**< Variable parameter type is double */
391         NOTIFICATION_VARIABLE_TYPE_STRING,
392                                         /**< Variable parameter type is string */
393         NOTIFICATION_VARIABLE_TYPE_COUNT,
394                                         /**< Variable parameter type is count */
395         NOTIFICATION_VARIABLE_TYPE_MAX,
396                                 /**< Max flag */
397 } notification_variable_type_e;
398
399 /**
400  * @brief Notification handle.
401  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
402  */
403 typedef struct _notification *notification_h;
404
405 /**
406  * @brief The structure for notification operation.
407  * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
408  */
409 typedef struct _notification_op {
410         notification_op_type_e type;    /**< Notification operation type */
411         int priv_id;    /**< private ID */
412         int extra_info_1;       /**< Reserved */
413         int extra_info_2;       /**< Reserved */
414         notification_h noti;    /**< Notification handler */
415 } notification_op;
416
417 /**
418  * @brief Enumeration for permission.
419  * @since_tizen 2.4
420  */
421 typedef enum notification_permission_type {
422     NOTIFICATION_PERMISSION_TYPE_NONE = 0,
423     NOTIFICATION_PERMISSION_TYPE_DELETE = 1,
424     NOTIFICATION_PERMISSION_TYPE_UPDATE = 2,
425 } notification_permission_type_e;
426 /**
427  * @}
428  */
429
430 #ifdef __cplusplus
431 }
432 #endif
433 #endif                          /* __NOTIFICATION_TYPE_H__ */