1. Support multiple IDS strings.
[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 2.3
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 2.3
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 2.3
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 2.3
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 2.3
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  * @brief This will be deprecated.
135  * @since_tizen 2.3
136  */
137 typedef enum _notification_count_display_type {
138         NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1,
139         NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0,       /**< The number is placed to left */
140         NOTIFICATION_COUNT_DISPLAY_TYPE_IN,     /**< The number is placed to center */
141         NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT,  /**< The number is placed to right */
142         NOTIFICATION_COUNT_DISPLAY_TYPE_MAX,
143 } notification_count_display_type_e;
144
145 /**
146  * @brief Enumeration for notification text type.
147  * @since_tizen 2.3
148  */
149 typedef enum _notification_text_type {
150         NOTIFICATION_TEXT_TYPE_NONE = -1,
151         NOTIFICATION_TEXT_TYPE_TITLE = 0,
152                                         /**< Title */
153         NOTIFICATION_TEXT_TYPE_CONTENT,
154                                 /**< Content */
155         NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
156                                                                 /**< Content for content display option is off of the Settings */
157         NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
158                                                                 /**< Text to display event count */
159         NOTIFICATION_TEXT_TYPE_INFO_1,
160                                                                 /**< Box contents 1 */
161         NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
162                                                                 /**< Box contents 1-1 */
163         NOTIFICATION_TEXT_TYPE_INFO_2,
164                                                                 /**< Box contents 2 */
165         NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
166                                                                 /**< Box contents 2-1 */
167         NOTIFICATION_TEXT_TYPE_INFO_3,
168                                                                 /**< Box contents 3 */
169         NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
170                                                                 /**< Box contents 3-1 */
171         NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
172                                         /**< Group title */
173         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
174                                         /**< Group content */
175         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
176                                                                 /**< Group content for content display option is off of the Settings */
177         NOTIFICATION_TEXT_TYPE_BUTTON_1,
178                                                                 /**< Text on button 1 */
179         NOTIFICATION_TEXT_TYPE_BUTTON_2,
180                                                                 /**< Text on button 2 */
181         NOTIFICATION_TEXT_TYPE_BUTTON_3,
182                                                                 /**< Text on button 3 */
183         NOTIFICATION_TEXT_TYPE_BUTTON_4,
184                                                                 /**< Text on button 4 */
185         NOTIFICATION_TEXT_TYPE_BUTTON_5,
186                                                                 /**< Text on button 5 */
187         NOTIFICATION_TEXT_TYPE_BUTTON_6,
188                                                                 /**< Text on button 6 */
189         NOTIFICATION_TEXT_TYPE_MAX,
190 } notification_text_type_e;
191
192 /**
193  * @brief Enumeration for image type.
194  * @since_tizen 2.3
195  */
196 typedef enum _notification_image_type {
197         NOTIFICATION_IMAGE_TYPE_NONE = -1,
198         NOTIFICATION_IMAGE_TYPE_ICON = 0,
199                                         /**< Icon */
200         NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
201                                                 /**< Indicator icon */
202         NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
203                                         /**< Lock screen icon */
204         NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
205                                         /**< Thumbnail */
206         NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
207                                                 /**< Lock screen thumbnail */
208         NOTIFICATION_IMAGE_TYPE_ICON_SUB,
209                                         /**< Icon */
210         NOTIFICATION_IMAGE_TYPE_BACKGROUND,
211                                                 /**< image displayed on background */
212         NOTIFICATION_IMAGE_TYPE_LIST_1,
213                                                 /**< Image for thumbnail list */
214         NOTIFICATION_IMAGE_TYPE_LIST_2,
215                                                 /**< Image for thumbnail list */
216         NOTIFICATION_IMAGE_TYPE_LIST_3,
217                                                 /**< Image for thumbnail list */
218         NOTIFICATION_IMAGE_TYPE_LIST_4,
219                                                 /**< Image for thumbnail list */
220         NOTIFICATION_IMAGE_TYPE_LIST_5,
221                                                 /**< Image for thumbnail list */
222         NOTIFICATION_IMAGE_TYPE_BUTTON_1,
223                                                 /**< Image for button 1 */
224         NOTIFICATION_IMAGE_TYPE_BUTTON_2,
225                                                 /**< Image for button 2 */
226         NOTIFICATION_IMAGE_TYPE_BUTTON_3,
227                                                 /**< Image for button 3 */
228         NOTIFICATION_IMAGE_TYPE_BUTTON_4,
229                                                 /**< Image for button 4 */
230         NOTIFICATION_IMAGE_TYPE_BUTTON_5,
231                                                 /**< Image for button 5 */
232         NOTIFICATION_IMAGE_TYPE_BUTTON_6,
233                                                 /**< Image for button 6 */
234         NOTIFICATION_IMAGE_TYPE_MAX,
235 } notification_image_type_e;
236
237 /**
238  * @brief Enumeration for application execution type.
239  * @since_tizen 2.3
240  */
241 typedef enum _notification_execute_type {
242         NOTIFICATION_EXECUTE_TYPE_NONE = -1,
243                                         /**< No operation */
244         NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
245                                                 /**< Responding action*/
246         NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,/**< Launching when notification data is single */
247         NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
248                                         /**< Launching when notification data is grouping(multi) */
249         NOTIFICATION_EXECUTE_TYPE_MAX,
250                                 /**< Max flag */
251 } notification_execute_type_e;
252
253 /**
254  * @brief Enumeration for notification type.
255  * @since_tizen 2.3
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  * @since_tizen 2.3
271  */
272 enum _notification_group_id {
273         NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
274         NOTIFICATION_GROUP_ID_DEFAULT = 0,
275                                         /**< Notification that has same title is grouping */
276 };
277
278 /**
279  * @brief Enumeration for Private ID.
280  * @since_tizen 2.3
281  */
282 enum _notification_priv_id {
283         NOTIFICATION_PRIV_ID_NONE = -1,
284                                 /**< Internally set priv_id */
285 };
286
287 /**
288  * @brief Enumeration for notification property.
289  * @since_tizen 2.3
290  */
291 enum _notification_property {
292         NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 0x00000001,
293                                                         /**< Display only SIM card inserted */
294         NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 0x00000002,
295                                                         /**< Disable application launch when it selected */
296         NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 0x00000004,
297                                                         /**< Disable auto delete when it selected */
298         NOTIFICATION_PROP_LAUNCH_UG = 0x00000008,
299                                                 /**< Will be deprecated. Notification Tray should launch application using appsvc API */
300         NOTIFICATION_PROP_DISABLE_TICKERNOTI = 0x00000010,
301                                                         /**< Will be deprecated. Use notification_set_display_applist API */
302         NOTIFICATION_PROP_PERMANENT_DISPLAY = 0x00000020,
303                                                         /** < Will be deprecated. */
304         NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 0x00000040,/**< Disable update when it inserted. */
305         NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 0x00000080,/**< Disable update when it deleted. */
306         NOTIFICATION_PROP_VOLATILE_DISPLAY = 0x00000100,/**< Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type */
307 };
308
309 /**
310  * @brief Enumeration for display application list.
311  * @since_tizen 2.3
312  */
313 enum _notificaton_display_applist {
314         NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 0x00000001,/**< Notification Tray(Quickpanel) */
315         NOTIFICATION_DISPLAY_APP_TICKER = 0x00000002,
316                                                 /**< Ticker notification */
317         NOTIFICATION_DISPLAY_APP_LOCK = 0x00000004,
318                                                 /**< Lock screen */
319         NOTIFICATION_DISPLAY_APP_INDICATOR = 0x00000008,/**< Indicator */
320         NOTIFICATION_DISPLAY_APP_HEADS_UP = 0x00000010,/**< Heads-up notification */
321         NOTIFICATION_DISPLAY_APP_ALL = 0xffffffff,
322                                                 /**< All display application */
323 };
324
325 /**
326  * @brief Enumeration for notification operation code.
327  * @since_tizen 2.3
328  */
329 typedef enum _notification_op_type {
330         NOTIFICATION_OP_NONE = 0,       /**< Default */
331         NOTIFICATION_OP_INSERT = 1,     /**< Notification inserted */
332         NOTIFICATION_OP_UPDATE, /**< Notification updated */
333         NOTIFICATION_OP_DELETE, /**< Notification deleted */
334         NOTIFICATION_OP_DELETE_ALL,     /**< Notifications deleted */
335         NOTIFICATION_OP_REFRESH,        /**< Deprecated */
336         NOTIFICATION_OP_SERVICE_READY,  /**< Notification service is ready  */
337 } notification_op_type_e;
338
339 /**
340  * @brief Enumeration for notification operation data code
341  * @since_tizen 2.3
342  */
343 typedef enum _notification_op_data_type {
344         NOTIFICATION_OP_DATA_MIN = 0,   /**< Default */
345         NOTIFICATION_OP_DATA_TYPE,      /**< Operation type */
346         NOTIFICATION_OP_DATA_PRIV_ID,   /**< Private ID */
347         NOTIFICATION_OP_DATA_NOTI,      /**< Notification handler */
348         NOTIFICATION_OP_DATA_EXTRA_INFO_1,      /**< Reserved */
349         NOTIFICATION_OP_DATA_EXTRA_INFO_2,      /**< Reserved */
350         NOTIFICATION_OP_DATA_MAX,       /**< Max flag */
351 } notification_op_data_type_e;
352
353 /**
354  * @brief Enumeration for notification count position in the text.
355  * @since_tizen 2.3
356  */
357 typedef enum _notifcation_count_pos_type {
358         NOTIFICATION_COUNT_POS_NONE = -1,
359                                         /**< Count data is not displaying in the text */
360         NOTIFICATION_COUNT_POS_LEFT = 0,/**< Count data is displaying at the left of the text */
361         NOTIFICATION_COUNT_POS_IN,
362                                 /**< Count data is displaying in the text */
363         NOTIFICATION_COUNT_POS_RIGHT,
364                                 /**< Count data is displaying at the right of the text */
365         NOTIFICATION_COUNT_POS_MAX,
366                                 /**< Max flag */
367 } notification_count_pos_type_e;
368
369 /**
370  * @brief Enumeration for notification variable parameter type.
371  * @since_tizen 2.3
372  */
373 typedef enum _notification_variable_type {
374         NOTIFICATION_VARIABLE_TYPE_NONE = -1,
375                                         /**< Variable parameter type is NONE */
376         NOTIFICATION_VARIABLE_TYPE_INT = 0,
377                                         /**< Variable parameter type is int */
378         NOTIFICATION_VARIABLE_TYPE_DOUBLE,
379                                         /**< Variable parameter type is double */
380         NOTIFICATION_VARIABLE_TYPE_STRING,
381                                         /**< Variable parameter type is string */
382         NOTIFICATION_VARIABLE_TYPE_COUNT,
383                                         /**< Variable parameter type is count */
384         NOTIFICATION_VARIABLE_TYPE_MAX,
385                                 /**< Max flag */
386 } notification_variable_type_e;
387
388 /**
389  * @brief Notification handle.
390  * @since_tizen 2.3
391  */
392 typedef struct _notification *notification_h;
393
394 /**
395  * @brief The structure for notification operation.
396  * @since_tizen 2.3
397  */
398 typedef struct _notification_op {
399         notification_op_type_e type;    /**< Notification operation type */
400         int priv_id;    /**< private ID */
401         int extra_info_1;       /**< Reserved */
402         int extra_info_2;       /**< Reserved */
403         notification_h noti;    /**< Notification handler */
404 } notification_op;
405
406 /**
407  * @brief Enumeration for permission.
408  * @since_tizen 2.4
409  */
410 typedef enum notification_permission_type {
411     NOTIFICATION_PERMISSION_TYPE_NONE = 0,
412     NOTIFICATION_PERMISSION_TYPE_DELETE = 1,
413     NOTIFICATION_PERMISSION_TYPE_UPDATE = 2,
414 } notification_permission_type_e;
415 /**
416  * @}
417  */
418
419 #ifdef __cplusplus
420 }
421 #endif
422 #endif                          /* __NOTIFICATION_TYPE_H__ */