366fb32c92908abb365b51bd0ea0b76c212b3b45
[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_MAX,
177                                 /**< Max flag */
178 } notification_text_type_e;
179
180 /**
181  * @brief Enumeration for image type.
182  * @since_tizen 2.3
183  */
184 typedef enum _notification_image_type {
185         NOTIFICATION_IMAGE_TYPE_NONE = -1,
186                                         /**< NONE */
187         NOTIFICATION_IMAGE_TYPE_ICON = 0,
188                                         /**< Icon */
189         NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
190                                                 /**< Indicator icon */
191         NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
192                                         /**< Lock screen icon */
193         NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
194                                         /**< Thumbnail */
195         NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
196                                                 /**< Lock screen thumbnail */
197         NOTIFICATION_IMAGE_TYPE_ICON_SUB,
198                                         /**< Icon */
199         NOTIFICATION_IMAGE_TYPE_BACKGROUND,
200                                                 /**< image displayed on background */
201         NOTIFICATION_IMAGE_TYPE_LIST_1,
202                                                 /**< Image for thumbnail list */
203         NOTIFICATION_IMAGE_TYPE_LIST_2,
204                                                 /**< Image for thumbnail list */
205         NOTIFICATION_IMAGE_TYPE_LIST_3,
206                                                 /**< Image for thumbnail list */
207         NOTIFICATION_IMAGE_TYPE_LIST_4,
208                                                 /**< Image for thumbnail list */
209         NOTIFICATION_IMAGE_TYPE_LIST_5,
210                                                 /**< Image for thumbnail list */
211         NOTIFICATION_IMAGE_TYPE_MAX,
212                                 /**< Max flag */
213 } notification_image_type_e;
214
215 /*typedef enum _notification_button_type {
216         NOTIFICATION_BUTTON_TYPE_NONE = -1,
217         NOTIFICATION_BUTTON_TYPE_RUN = 0,
218         NOTIFICATION_BUTTON_TYPE_VIEW,
219         NOTIFICATION_BUTTON_TYPE_DISMISS,
220         NOTIFICATION_BUTTON_TYPE_MAX,
221 }notification_button_type_e;*/
222
223 /**
224  * @brief Enumeration for application execution type.
225  * @since_tizen 2.3
226  */
227 typedef enum _notification_execute_type {
228         NOTIFICATION_EXECUTE_TYPE_NONE = -1,
229                                         /**< No operation */
230         NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
231                                                 /**< Responding action*/
232         NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,/**< Launching when notification data is single */
233         NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
234                                         /**< Launching when notification data is grouping(multi) */
235         NOTIFICATION_EXECUTE_TYPE_MAX,
236                                 /**< Max flag */
237 } notification_execute_type_e;
238
239 /**
240  * @brief Enumeration for notification type.
241  * @since_tizen 2.3
242  */
243 typedef enum _notification_type {
244         NOTIFICATION_TYPE_NONE = -1,
245                                 /**< None */
246         NOTIFICATION_TYPE_NOTI = 0,
247                                 /**< Notification type */
248         NOTIFICATION_TYPE_ONGOING,
249                                 /**< Ongoing type */
250         NOTIFICATION_TYPE_MAX,
251                         /**< Max flag */
252 } notification_type_e;
253
254 /**
255  * @brief Enumeration for Group ID.
256  * @since_tizen 2.3
257  */
258 enum _notification_group_id {
259         NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
260         NOTIFICATION_GROUP_ID_DEFAULT = 0,
261                                         /**< Notification that has same title is grouping */
262 };
263
264 /**
265  * @brief Enumeration for Private ID.
266  * @since_tizen 2.3
267  */
268 enum _notification_priv_id {
269         NOTIFICATION_PRIV_ID_NONE = -1,
270                                 /**< Internally set priv_id */
271 };
272
273 /**
274  * @brief Enumeration for notification property.
275  * @since_tizen 2.3
276  */
277 enum _notification_property {
278         NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 0x00000001,
279                                                         /**< Display only SIM card inserted */
280         NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 0x00000002,
281                                                         /**< Disable application launch when it selected */
282         NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 0x00000004,
283                                                         /**< Disable auto delete when it selected */
284         NOTIFICATION_PROP_LAUNCH_UG = 0x00000008,
285                                                 /**< Will be deprecated. Notification Tray should launch application using appsvc API */
286         NOTIFICATION_PROP_DISABLE_TICKERNOTI = 0x00000010,
287                                                         /**< Will be deprecated. Use notification_set_display_applist API */
288         NOTIFICATION_PROP_PERMANENT_DISPLAY = 0x00000020,
289                                                         /** < Will be deprecated. */
290         NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 0x00000040,/**< Disable update when it inserted. */
291         NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 0x00000080,/**< Disable update when it deleted. */
292         NOTIFICATION_PROP_VOLATILE_DISPLAY = 0x00000100,/**< Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type */
293 };
294
295 /**
296  * @brief Enumeration for display application list.
297  * @since_tizen 2.3
298  */
299 enum _notificaton_display_applist {
300         NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 0x00000001,/**< Notification Tray(Quickpanel) */
301         NOTIFICATION_DISPLAY_APP_TICKER = 0x00000002,
302                                                 /**< Ticker notification */
303         NOTIFICATION_DISPLAY_APP_LOCK = 0x00000004,
304                                                 /**< Lock screen */
305         NOTIFICATION_DISPLAY_APP_INDICATOR = 0x00000008,/**< Indicator */
306         NOTIFICATION_DISPLAY_APP_HEADS_UP = 0x00000010,/**< Heads-up notification */
307         NOTIFICATION_DISPLAY_APP_ALL = 0xffffffff,
308                                                 /**< All display application */
309 };
310
311 /**
312  * @brief Enumeration for notification operation code.
313  * @since_tizen 2.3
314  */
315 typedef enum _notification_op_type {
316         NOTIFICATION_OP_NONE = 0,       /**< Default */
317         NOTIFICATION_OP_INSERT = 1,     /**< Notification inserted */
318         NOTIFICATION_OP_UPDATE, /**< Notification updated */
319         NOTIFICATION_OP_DELETE, /**< Notification deleted */
320         NOTIFICATION_OP_DELETE_ALL,     /**< Notifications deleted */
321         NOTIFICATION_OP_REFRESH,        /**< Deprecated */
322         NOTIFICATION_OP_SERVICE_READY,  /**< Notification service is ready  */
323 } notification_op_type_e;
324
325 /**
326  * @brief Enumeration for notification operation data code
327  * @since_tizen 2.3
328  */
329 typedef enum _notification_op_data_type {
330         NOTIFICATION_OP_DATA_MIN = 0,   /**< Default */
331         NOTIFICATION_OP_DATA_TYPE,      /**< Operation type */
332         NOTIFICATION_OP_DATA_PRIV_ID,   /**< Private ID */
333         NOTIFICATION_OP_DATA_NOTI,      /**< Notification handler */
334         NOTIFICATION_OP_DATA_EXTRA_INFO_1,      /**< Reserved */
335         NOTIFICATION_OP_DATA_EXTRA_INFO_2,      /**< Reserved */
336         NOTIFICATION_OP_DATA_MAX,       /**< Max flag */
337 } notification_op_data_type_e;
338
339 /**
340  * @brief Enumeration for notification count position in the text.
341  * @since_tizen 2.3
342  */
343 typedef enum _notifcation_count_pos_type {
344         NOTIFICATION_COUNT_POS_NONE = -1,
345                                         /**< Count data is not displaying in the text */
346         NOTIFICATION_COUNT_POS_LEFT = 0,/**< Count data is displaying at the left of the text */
347         NOTIFICATION_COUNT_POS_IN,
348                                 /**< Count data is displaying in the text */
349         NOTIFICATION_COUNT_POS_RIGHT,
350                                 /**< Count data is displaying at the right of the text */
351         NOTIFICATION_COUNT_POS_MAX,
352                                 /**< Max flag */
353 } notification_count_pos_type_e;
354
355 /**
356  * @brief Enumeration for notification variable parameter type.
357  * @since_tizen 2.3
358  */
359 typedef enum _notification_variable_type {
360         NOTIFICATION_VARIABLE_TYPE_NONE = -1,
361                                         /**< Variable parameter type is NONE */
362         NOTIFICATION_VARIABLE_TYPE_INT = 0,
363                                         /**< Variable parameter type is int */
364         NOTIFICATION_VARIABLE_TYPE_DOUBLE,
365                                         /**< Variable parameter type is double */
366         NOTIFICATION_VARIABLE_TYPE_STRING,
367                                         /**< Variable parameter type is string */
368         NOTIFICATION_VARIABLE_TYPE_COUNT,
369                                         /**< Variable parameter type is count */
370         NOTIFICATION_VARIABLE_TYPE_MAX,
371                                 /**< Max flag */
372 } notification_variable_type_e;
373
374 /**
375  * @brief Notification handle.
376  * @since_tizen 2.3
377  */
378 typedef struct _notification *notification_h;
379
380 /**
381  * @brief The structure for notification operation.
382  * @since_tizen 2.3
383  */
384 typedef struct _notification_op {
385         notification_op_type_e type;    /**< Notification operation type */
386         int priv_id;    /**< private ID */
387         int extra_info_1;       /**< Reserved */
388         int extra_info_2;       /**< Reserved */
389         notification_h noti;    /**< Notification handler */
390 } notification_op;
391
392 /**
393  * @}
394  */
395
396 #ifdef __cplusplus
397 }
398 #endif
399 #endif                          /* __NOTIFICATION_TYPE_H__ */