sync with private git
[apps/home/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>, Youngsub Ko <ys4610.ko@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 /**
30  * @ingroup NOTIFICATION_LIBRARY
31  * @defgroup NOTIFICATION_TYPE notification type
32  * @brief Notification type
33  */
34
35 /**
36  * @addtogroup NOTIFICATION_TYPE
37  * @{
38  */
39
40 /**
41  * @brief Enumeration for notification operation code
42  */
43 typedef enum _notification_op_type {
44         NOTIFICATION_OP_NONE = 0,
45         NOTIFICATION_OP_INSERT = 1,
46         NOTIFICATION_OP_UPDATE,
47         NOTIFICATION_OP_DELETE,
48         NOTIFICATION_OP_DELETE_ALL,
49         NOTIFICATION_OP_REFRESH,
50 } notification_op_type_e;
51
52 /**
53  * @brief Enumeration for notification operation data code
54  */
55 typedef enum _notification_op_data_type {
56         NOTIFICATION_OP_DATA_MIN = 0,
57         NOTIFICATION_OP_DATA_TYPE,
58         NOTIFICATION_OP_DATA_PRIV_ID,
59         NOTIFICATION_OP_DATA_EXTRA_INFO_1,
60         NOTIFICATION_OP_DATA_EXTRA_INFO_2,
61         NOTIFICATION_OP_DATA_MAX,
62 } notification_op_data_type_e;
63
64 /**
65  * @brief Enumeration for notification layout type
66  */
67 typedef enum _notification_ly_type {
68         NOTIFICATION_LY_NONE = 0,
69         NOTIFICATION_LY_NOTI_EVENT_SINGLE,
70         NOTIFICATION_LY_NOTI_EVENT_MULTIPLE,
71         NOTIFICATION_LY_NOTI_THUMBNAIL,
72         NOTIFICATION_LY_ONGOING_EVENT,
73         NOTIFICATION_LY_ONGOING_PROGRESS,
74         NOTIFICATION_LY_MAX,
75 } notification_ly_type_e;
76
77 /**
78  * @brief Enumeration for notification sound type.
79  */
80 typedef enum _notification_sound_type {
81         NOTIFICATION_SOUND_TYPE_NONE = -1,
82                                         /**< Default value. Disable sound */
83         NOTIFICATION_SOUND_TYPE_DEFAULT = 0,
84                                         /**< New chat sound */
85         NOTIFICATION_SOUND_TYPE_USER_DATA,
86                                         /**< User sound data */
87         NOTIFICATION_SOUND_TYPE_MAX,
88                                 /**< Max flag */
89 } notification_sound_type_e;
90
91 /**
92  * @brief Enumeration for notification vibration type.
93  */
94 typedef enum _notification_vibration_type {
95         NOTIFICATION_VIBRATION_TYPE_NONE = -1,
96                                         /**< Default value. Disable vibration */
97         NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0,/**< New chat vibration */
98         NOTIFICATION_VIBRATION_TYPE_USER_DATA,
99                                         /**< User vibration data */
100         NOTIFICATION_VIBRATION_TYPE_MAX,/**< Max flag */
101 } notification_vibration_type_e;
102
103 /**
104  * @brief Enumeration for notification led operation.
105  */
106 typedef enum _notification_led_op {
107         NOTIFICATION_LED_OP_OFF = -1,
108                                         /**< Default value. Disable led */
109         NOTIFICATION_LED_OP_ON = 0,/**< turn on led with default color */
110         NOTIFICATION_LED_OP_ON_CUSTOM_COLOR,
111                                         /**< turn on led with custom color */
112         NOTIFICATION_LED_OP_MAX,/**< Max flag */
113 } notification_led_op_e;
114
115 /**
116  * @brief Will be deprecated.
117  */
118 typedef enum _notification_count_display_type {
119         NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1,
120         NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0,
121         NOTIFICATION_COUNT_DISPLAY_TYPE_IN,
122         NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT,
123         NOTIFICATION_COUNT_DISPLAY_TYPE_MAX,
124 } notification_count_display_type_e;
125
126 /**
127  * @brief Enumeration for notification count position in the text.
128  */
129 typedef enum _notifcation_count_pos_type {
130         NOTIFICATION_COUNT_POS_NONE = -1,
131                                         /**< Count data is not displaying in the text */
132         NOTIFICATION_COUNT_POS_LEFT = 0,/**< Count data is displaying at the left of the text */
133         NOTIFICATION_COUNT_POS_IN,
134                                 /**< Count data is displaying in the text */
135         NOTIFICATION_COUNT_POS_RIGHT,
136                                 /**< Count data is displaying at the right of the text */
137         NOTIFICATION_COUNT_POS_MAX,
138                                 /**< Max flag */
139 } notification_count_pos_type_e;
140
141 /**
142  * @brief Enumeration for notification variable parameter type
143  */
144 typedef enum _notification_variable_type {
145         NOTIFICATION_VARIABLE_TYPE_NONE = -1,
146                                         /**< Variable parameter type is NONE */
147         NOTIFICATION_VARIABLE_TYPE_INT = 0,
148                                         /**< Variable parameter type is int */
149         NOTIFICATION_VARIABLE_TYPE_DOUBLE,
150                                         /**< Variable parameter type is double */
151         NOTIFICATION_VARIABLE_TYPE_STRING,
152                                         /**< Variable parameter type is string */
153         NOTIFICATION_VARIABLE_TYPE_COUNT,
154                                         /**< Variable parameter type is count */
155         NOTIFICATION_VARIABLE_TYPE_MAX,
156                                 /**< Max flag */
157 } notification_variable_type_e;
158
159 /**
160  * @brief Enumeration for notification text type.
161  */
162 typedef enum _notification_text_type {
163         NOTIFICATION_TEXT_TYPE_NONE = -1,
164                                         /**< NONE */
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 2 */
177         NOTIFICATION_TEXT_TYPE_INFO_2,
178                                                                 /**< box contents 3 */
179         NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
180                                                                 /**< box contents 4 */
181         NOTIFICATION_TEXT_TYPE_INFO_3,
182                                                                 /**< box contents 5 */
183         NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
184                                                                 /**< box contents 5 */
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_MAX,
192                                 /**< Max flag */
193 } notification_text_type_e;
194
195 /**
196  * @brief Enumeration for image text type.
197  */
198 typedef enum _notification_image_type {
199         NOTIFICATION_IMAGE_TYPE_NONE = -1,
200                                         /**< NONE */
201         NOTIFICATION_IMAGE_TYPE_ICON = 0,
202                                         /**< Icon */
203         NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
204                                                 /**< Indicator icon */
205         NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
206                                         /**< Lock screen icon */
207         NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
208                                         /**< Thumbnail */
209         NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
210                                                 /**< Lock screen thumbnail */
211         NOTIFICATION_IMAGE_TYPE_ICON_SUB,
212                                         /**< Icon */
213         NOTIFICATION_IMAGE_TYPE_BACKGROUND,
214                                                 /**< image displayed on background */
215         NOTIFICATION_IMAGE_TYPE_LIST_1,
216                                                 /**< image for multiple event */
217         NOTIFICATION_IMAGE_TYPE_LIST_2,
218                                                 /**< image for multiple event */
219         NOTIFICATION_IMAGE_TYPE_LIST_3,
220                                                 /**< image for multiple event */
221         NOTIFICATION_IMAGE_TYPE_LIST_4,
222                                                 /**< image for multiple event */
223         NOTIFICATION_IMAGE_TYPE_LIST_5,
224                                                 /**< image for multiple event */
225         NOTIFICATION_IMAGE_TYPE_MAX,
226                                 /**< Max flag */
227 } notification_image_type_e;
228
229 /*typedef enum _notification_button_type {
230         NOTIFICATION_BUTTON_TYPE_NONE = -1,
231         NOTIFICATION_BUTTON_TYPE_RUN = 0,
232         NOTIFICATION_BUTTON_TYPE_VIEW,
233         NOTIFICATION_BUTTON_TYPE_DISMISS,
234         NOTIFICATION_BUTTON_TYPE_MAX,
235 }notification_button_type_e;*/
236
237 /**
238  * @brief Enumeration for application execution type.
239  */
240 typedef enum _notification_execute_type {
241         NOTIFICATION_EXECUTE_TYPE_NONE = -1,
242                                         /**< No operation */
243         NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0,
244                                                 /**< Responding */
245         NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,/**< Launching when notification data is single */
246         NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
247                                         /**< Launching when notification data is grouping(multi) */
248         NOTIFICATION_EXECUTE_TYPE_MAX,
249                                 /**< Max flag */
250 } notification_execute_type_e;
251
252 /**
253  * @brief Enumeration for notification type.
254  */
255 typedef enum _notification_type {
256         NOTIFICATION_TYPE_NONE = -1,
257                                 /**< None */
258         NOTIFICATION_TYPE_NOTI = 0,
259                                 /**< Notification type */
260         NOTIFICATION_TYPE_ONGOING,
261                                 /**< Ongoing type */
262         NOTIFICATION_TYPE_MAX,
263                         /**< Max flag */
264 } notification_type_e;
265
266 /**
267  * @brief Enumeration for Group ID.
268  */
269 enum _notification_group_id {
270         NOTIFICATION_GROUP_ID_NONE = -1,/**< Not Grouping */
271         NOTIFICATION_GROUP_ID_DEFAULT = 0,
272                                         /**< Notification that has same title is grouping */
273 };
274
275 /**
276  * @brief Enumeration for Private ID.
277  */
278 enum _notification_priv_id {
279         NOTIFICATION_PRIV_ID_NONE = -1,
280                                 /**< Internally set priv_id */
281 };
282
283 /**
284  * @brief Enumeration for notification property
285  */
286 enum _notification_property {
287         NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 0x00000001,
288                                                         /**< Display only SIM card inserted */
289         NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 0x00000002,
290                                                         /**< Disable application launch when it selected */
291         NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 0x00000004,
292                                                         /**< Disable auto delete when it selected */
293         NOTIFICATION_PROP_LAUNCH_UG = 0x00000008,
294                                                 /**< Will be deprecated. Notification Tray should launch application using appsvc API */
295         NOTIFICATION_PROP_DISABLE_TICKERNOTI = 0x00000010,
296                                                         /**< Will be deprecated. Use notification_set_display_applist API */
297         NOTIFICATION_PROP_PERMANENT_DISPLAY = 0x00000020,
298                                                         /** < Will be deprecated. */
299         NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 0x00000040,/**< Disable update when it inserted. */
300         NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 0x00000080,/**< Disable update when it deleted. */
301         NOTIFICATION_PROP_VOLATILE_DISPLAY = 0x00000100,/**< Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type */
302 };
303
304 /**
305  * @brief Enumeration for display application list
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_ALL = 0xffffffff,
315                                                 /**< All display application */
316 };
317
318 /**
319  * @brief Notification handle
320  */
321 typedef struct _notification *notification_h;
322
323 /**
324  * @brief Notification operation handle
325  */
326 typedef struct _notification_op {
327         notification_op_type_e type;
328         int priv_id;
329         int extra_info_1;
330         int extra_info_2;
331 } notification_op;
332 /** 
333  * @}
334  */
335
336 #ifdef __cplusplus
337 }
338 #endif
339 #endif                          /* __NOTIFICATION_TYPE_H__ */