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