Changes by ACR.
[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  = 1,  /** < Event type : Click on button 1 */
83         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_2  = 2,  /** < Event type : Click on button 2 */
84         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_3  = 3,  /** < Event type : Click on button 3 */
85         NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_4  = 4,  /** < Event type : Click on button 4 */
86         NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON      = 5,  /** < Event type : Click on icon */
87         NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL = 6,  /** < Event type : Click on thumbnail */
88 } notification_event_type_e;
89
90 /**
91  * @brief Enumeration for notification sound type.
92  * @since_tizen 2.3
93  */
94 typedef enum _notification_sound_type {
95         NOTIFICATION_SOUND_TYPE_NONE = -1,
96                                         /**< Default value. no sound */
97         NOTIFICATION_SOUND_TYPE_DEFAULT = 0,
98                                         /**< Default sound */
99         NOTIFICATION_SOUND_TYPE_USER_DATA,
100                                         /**< User sound data */
101         NOTIFICATION_SOUND_TYPE_MAX,
102                                 /**< Max flag */
103 } notification_sound_type_e;
104
105 /**
106  * @brief Enumeration for notification vibration type.
107  * @since_tizen 2.3
108  */
109 typedef enum _notification_vibration_type {
110         NOTIFICATION_VIBRATION_TYPE_NONE = -1,
111                     /**< Default value. No vibration */
112         NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0,/**< Default vibrate pattern */
113         NOTIFICATION_VIBRATION_TYPE_USER_DATA,
114                                         /**< User vibration data */
115         NOTIFICATION_VIBRATION_TYPE_MAX,/**< Max flag */
116 } notification_vibration_type_e;
117
118 /**
119  * @brief Enumeration for notification LED operation.
120  * @since_tizen 2.3
121  */
122 typedef enum _notification_led_op {
123         NOTIFICATION_LED_OP_OFF = -1,
124                                         /**< Default value. Disable the LED notification */
125         NOTIFICATION_LED_OP_ON = 0,/**< Turn on the LED with default color */
126         NOTIFICATION_LED_OP_ON_CUSTOM_COLOR,
127                                         /**< Turn on the LED with custom color */
128         NOTIFICATION_LED_OP_MAX,/**< Max flag */
129 } notification_led_op_e;
130
131 /**
132  * @brief This will be deprecated.
133  * @since_tizen 2.3
134  */
135 typedef enum _notification_count_display_type {
136         NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1,      /**< None */
137         NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0,       /**< The number is placed to left */
138         NOTIFICATION_COUNT_DISPLAY_TYPE_IN,     /**< The number is placed to center */
139         NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT,  /**< The number is placed to right */
140         NOTIFICATION_COUNT_DISPLAY_TYPE_MAX,    /**< Max flag */
141 } notification_count_display_type_e;
142
143 /**
144  * @brief Enumeration for notification text type.
145  * @since_tizen 2.3
146  */
147 typedef enum _notification_text_type {
148         NOTIFICATION_TEXT_TYPE_NONE = -1,
149                                         /**< NONE */
150         NOTIFICATION_TEXT_TYPE_TITLE = 0,
151                                         /**< Title */
152         NOTIFICATION_TEXT_TYPE_CONTENT,
153                                 /**< Content */
154         NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
155                                                                 /**< Content for content display option is off of the Settings */
156         NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
157                                                                 /**< Text to display event count */
158         NOTIFICATION_TEXT_TYPE_INFO_1,
159                                                                 /**< Box contents 1 */
160         NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
161                                                                 /**< Box contents 1-1 */
162         NOTIFICATION_TEXT_TYPE_INFO_2,
163                                                                 /**< Box contents 2 */
164         NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
165                                                                 /**< Box contents 2-1 */
166         NOTIFICATION_TEXT_TYPE_INFO_3,
167                                                                 /**< Box contents 3 */
168         NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
169                                                                 /**< Box contents 3-1 */
170         NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
171                                         /**< Group title */
172         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
173                                         /**< Group content */
174         NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
175                                                                 /**< Group content for content display option is off of the Settings */
176         NOTIFICATION_TEXT_TYPE_BUTTON_1,
177                                                                 /**< Text on button 1 */
178         NOTIFICATION_TEXT_TYPE_BUTTON_2,
179                                                                 /**< Text on button 2 */
180         NOTIFICATION_TEXT_TYPE_BUTTON_3,
181                                                                 /**< Text on button 3 */
182         NOTIFICATION_TEXT_TYPE_BUTTON_4,
183                                                                 /**< Text on button 4 */
184         NOTIFICATION_TEXT_TYPE_MAX,
185                                 /**< Max flag */
186 } notification_text_type_e;
187
188 /**
189  * @brief Enumeration for image type.
190  * @since_tizen 2.3
191  */
192 typedef enum _notification_image_type {
193         NOTIFICATION_IMAGE_TYPE_NONE = -1,
194                                         /**< NONE */
195         NOTIFICATION_IMAGE_TYPE_ICON = 0,
196                                         /**< Icon */
197         NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
198                                                 /**< Indicator icon */
199         NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
200                                         /**< Lock screen icon */
201         NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
202                                         /**< Thumbnail */
203         NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
204                                                 /**< Lock screen thumbnail */
205         NOTIFICATION_IMAGE_TYPE_ICON_SUB,
206                                         /**< Icon */
207         NOTIFICATION_IMAGE_TYPE_BACKGROUND,
208                                                 /**< image displayed on background */
209         NOTIFICATION_IMAGE_TYPE_LIST_1,
210                                                 /**< Image for thumbnail list */
211         NOTIFICATION_IMAGE_TYPE_LIST_2,
212                                                 /**< Image for thumbnail list */
213         NOTIFICATION_IMAGE_TYPE_LIST_3,
214                                                 /**< Image for thumbnail list */
215         NOTIFICATION_IMAGE_TYPE_LIST_4,
216                                                 /**< Image for thumbnail list */
217         NOTIFICATION_IMAGE_TYPE_LIST_5,
218                                                 /**< Image for thumbnail list */
219         NOTIFICATION_IMAGE_TYPE_MAX,
220                                 /**< Max flag */
221 } notification_image_type_e;
222
223 /*typedef enum _notification_button_type {
224         NOTIFICATION_BUTTON_TYPE_NONE = -1,
225         NOTIFICATION_BUTTON_TYPE_RUN = 0,
226         NOTIFICATION_BUTTON_TYPE_VIEW,
227         NOTIFICATION_BUTTON_TYPE_DISMISS,
228         NOTIFICATION_BUTTON_TYPE_MAX,
229 }notification_button_type_e;*/
230
231 /**
232  * @brief Enumeration for application execution type.
233  * @since_tizen 2.3
234  */
235 typedef enum _notification_execute_type {
236         NOTIFICATION_EXECUTE_TYPE_NONE = -1,
237                                         /**< No operation */
238         NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
239                                                 /**< Responding action*/
240         NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,/**< Launching when notification data is single */
241         NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
242                                         /**< Launching when notification data is grouping(multi) */
243         NOTIFICATION_EXECUTE_TYPE_MAX,
244                                 /**< Max flag */
245 } notification_execute_type_e;
246
247 /**
248  * @brief Enumeration for notification type.
249  * @since_tizen 2.3
250  */
251 typedef enum _notification_type {
252         NOTIFICATION_TYPE_NONE = -1,
253                                 /**< None */
254         NOTIFICATION_TYPE_NOTI = 0,
255                                 /**< Notification type */
256         NOTIFICATION_TYPE_ONGOING,
257                                 /**< Ongoing type */
258         NOTIFICATION_TYPE_MAX,
259                         /**< Max flag */
260 } notification_type_e;
261
262 /**
263  * @brief Enumeration for Group ID.
264  * @since_tizen 2.3
265  */
266 enum _notification_group_id {
267         NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
268         NOTIFICATION_GROUP_ID_DEFAULT = 0,
269                                         /**< Notification that has same title is grouping */
270 };
271
272 /**
273  * @brief Enumeration for Private ID.
274  * @since_tizen 2.3
275  */
276 enum _notification_priv_id {
277         NOTIFICATION_PRIV_ID_NONE = -1,
278                                 /**< Internally set priv_id */
279 };
280
281 /**
282  * @brief Enumeration for notification property.
283  * @since_tizen 2.3
284  */
285 enum _notification_property {
286         NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 0x00000001,
287                                                         /**< Display only SIM card inserted */
288         NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 0x00000002,
289                                                         /**< Disable application launch when it selected */
290         NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 0x00000004,
291                                                         /**< Disable auto delete when it selected */
292         NOTIFICATION_PROP_LAUNCH_UG = 0x00000008,
293                                                 /**< Will be deprecated. Notification Tray should launch application using appsvc API */
294         NOTIFICATION_PROP_DISABLE_TICKERNOTI = 0x00000010,
295                                                         /**< Will be deprecated. Use notification_set_display_applist API */
296         NOTIFICATION_PROP_PERMANENT_DISPLAY = 0x00000020,
297                                                         /** < Will be deprecated. */
298         NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 0x00000040,/**< Disable update when it inserted. */
299         NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 0x00000080,/**< Disable update when it deleted. */
300         NOTIFICATION_PROP_VOLATILE_DISPLAY = 0x00000100,/**< Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type */
301 };
302
303 /**
304  * @brief Enumeration for display application list.
305  * @since_tizen 2.3
306  */
307 enum _notificaton_display_applist {
308         NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 0x00000001,/**< Notification Tray(Quickpanel) */
309         NOTIFICATION_DISPLAY_APP_TICKER = 0x00000002,
310                                                 /**< Ticker notification */
311         NOTIFICATION_DISPLAY_APP_LOCK = 0x00000004,
312                                                 /**< Lock screen */
313         NOTIFICATION_DISPLAY_APP_INDICATOR = 0x00000008,/**< Indicator */
314         NOTIFICATION_DISPLAY_APP_HEADS_UP = 0x00000010,/**< Heads-up notification */
315         NOTIFICATION_DISPLAY_APP_ALL = 0xffffffff,
316                                                 /**< All display application */
317 };
318
319 /**
320  * @brief Enumeration for notification operation code.
321  * @since_tizen 2.3
322  */
323 typedef enum _notification_op_type {
324         NOTIFICATION_OP_NONE = 0,       /**< Default */
325         NOTIFICATION_OP_INSERT = 1,     /**< Notification inserted */
326         NOTIFICATION_OP_UPDATE, /**< Notification updated */
327         NOTIFICATION_OP_DELETE, /**< Notification deleted */
328         NOTIFICATION_OP_DELETE_ALL,     /**< Notifications deleted */
329         NOTIFICATION_OP_REFRESH,        /**< Deprecated */
330         NOTIFICATION_OP_SERVICE_READY,  /**< Notification service is ready  */
331 } notification_op_type_e;
332
333 /**
334  * @brief Enumeration for notification operation data code
335  * @since_tizen 2.3
336  */
337 typedef enum _notification_op_data_type {
338         NOTIFICATION_OP_DATA_MIN = 0,   /**< Default */
339         NOTIFICATION_OP_DATA_TYPE,      /**< Operation type */
340         NOTIFICATION_OP_DATA_PRIV_ID,   /**< Private ID */
341         NOTIFICATION_OP_DATA_NOTI,      /**< Notification handler */
342         NOTIFICATION_OP_DATA_EXTRA_INFO_1,      /**< Reserved */
343         NOTIFICATION_OP_DATA_EXTRA_INFO_2,      /**< Reserved */
344         NOTIFICATION_OP_DATA_MAX,       /**< Max flag */
345 } notification_op_data_type_e;
346
347 /**
348  * @brief Enumeration for notification count position in the text.
349  * @since_tizen 2.3
350  */
351 typedef enum _notifcation_count_pos_type {
352         NOTIFICATION_COUNT_POS_NONE = -1,
353                                         /**< Count data is not displaying in the text */
354         NOTIFICATION_COUNT_POS_LEFT = 0,/**< Count data is displaying at the left of the text */
355         NOTIFICATION_COUNT_POS_IN,
356                                 /**< Count data is displaying in the text */
357         NOTIFICATION_COUNT_POS_RIGHT,
358                                 /**< Count data is displaying at the right of the text */
359         NOTIFICATION_COUNT_POS_MAX,
360                                 /**< Max flag */
361 } notification_count_pos_type_e;
362
363 /**
364  * @brief Enumeration for notification variable parameter type.
365  * @since_tizen 2.3
366  */
367 typedef enum _notification_variable_type {
368         NOTIFICATION_VARIABLE_TYPE_NONE = -1,
369                                         /**< Variable parameter type is NONE */
370         NOTIFICATION_VARIABLE_TYPE_INT = 0,
371                                         /**< Variable parameter type is int */
372         NOTIFICATION_VARIABLE_TYPE_DOUBLE,
373                                         /**< Variable parameter type is double */
374         NOTIFICATION_VARIABLE_TYPE_STRING,
375                                         /**< Variable parameter type is string */
376         NOTIFICATION_VARIABLE_TYPE_COUNT,
377                                         /**< Variable parameter type is count */
378         NOTIFICATION_VARIABLE_TYPE_MAX,
379                                 /**< Max flag */
380 } notification_variable_type_e;
381
382 /**
383  * @brief Notification handle.
384  * @since_tizen 2.3
385  */
386 typedef struct _notification *notification_h;
387
388 /**
389  * @brief The structure for notification operation.
390  * @since_tizen 2.3
391  */
392 typedef struct _notification_op {
393         notification_op_type_e type;    /**< Notification operation type */
394         int priv_id;    /**< private ID */
395         int extra_info_1;       /**< Reserved */
396         int extra_info_2;       /**< Reserved */
397         notification_h noti;    /**< Notification handler */
398 } notification_op;
399
400 /**
401  * @}
402  */
403
404 #ifdef __cplusplus
405 }
406 #endif
407 #endif                          /* __NOTIFICATION_TYPE_H__ */