4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef __NOTIFICATION_TYPE_H__
23 #define __NOTIFICATION_TYPE_H__
29 #ifndef NOTIFICATION_DEPRECATED_API
31 #define NOTIFICATION_DEPRECATED_API __attribute__((deprecated))
33 #define NOTIFICATION_DEPRECATED_API
38 * @file notification_type.h
39 * @brief This file contains type definitions and enumerations for Notification API.
43 * @addtogroup NOTIFICATION_MODULE
48 * @brief Enumeration for notification layout type.
51 typedef enum _notification_ly_type {
52 NOTIFICATION_LY_NONE = 0,
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*/
66 } notification_ly_type_e;
69 * @brief Enumeration for notification lauch option type.
72 typedef enum _notification_launch_option_type {
73 NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1,
74 /**< launching with app control */
75 } notification_launch_option_type;
78 * @brief Enumeration for event type on notification.
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;
91 * @brief Enumeration for notification sound type.
94 typedef enum _notification_sound_type {
95 NOTIFICATION_SOUND_TYPE_NONE = -1,
96 /**< Default value. no sound */
97 NOTIFICATION_SOUND_TYPE_DEFAULT = 0,
99 NOTIFICATION_SOUND_TYPE_USER_DATA,
100 /**< User sound data */
101 NOTIFICATION_SOUND_TYPE_MAX,
103 } notification_sound_type_e;
106 * @brief Enumeration for notification vibration type.
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;
119 * @brief Enumeration for notification LED operation.
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;
132 * @brief This will be deprecated.
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;
144 * @brief Enumeration for notification text type.
147 typedef enum _notification_text_type {
148 NOTIFICATION_TEXT_TYPE_NONE = -1,
150 NOTIFICATION_TEXT_TYPE_TITLE = 0,
152 NOTIFICATION_TEXT_TYPE_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,
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,
178 } notification_text_type_e;
181 * @brief Enumeration for image type.
184 typedef enum _notification_image_type {
185 NOTIFICATION_IMAGE_TYPE_NONE = -1,
187 NOTIFICATION_IMAGE_TYPE_ICON = 0,
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,
195 NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
196 /**< Lock screen thumbnail */
197 NOTIFICATION_IMAGE_TYPE_ICON_SUB,
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,
213 } notification_image_type_e;
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;*/
224 * @brief Enumeration for application execution type.
227 typedef enum _notification_execute_type {
228 NOTIFICATION_EXECUTE_TYPE_NONE = -1,
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,
237 } notification_execute_type_e;
240 * @brief Enumeration for notification type.
243 typedef enum _notification_type {
244 NOTIFICATION_TYPE_NONE = -1,
246 NOTIFICATION_TYPE_NOTI = 0,
247 /**< Notification type */
248 NOTIFICATION_TYPE_ONGOING,
250 NOTIFICATION_TYPE_MAX,
252 } notification_type_e;
255 * @brief Enumeration for Group ID.
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 */
265 * @brief Enumeration for Private ID.
268 enum _notification_priv_id {
269 NOTIFICATION_PRIV_ID_NONE = -1,
270 /**< Internally set priv_id */
274 * @brief Enumeration for notification property.
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 */
296 * @brief Enumeration for display application list.
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,
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 */
312 * @brief Enumeration for notification operation code.
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;
326 * @brief Enumeration for notification operation data code
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;
340 * @brief Enumeration for notification count position in the text.
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,
353 } notification_count_pos_type_e;
356 * @brief Enumeration for notification variable parameter type.
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,
372 } notification_variable_type_e;
375 * @brief Notification handle.
378 typedef struct _notification *notification_h;
381 * @brief The structure for notification operation.
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 */
399 #endif /* __NOTIFICATION_TYPE_H__ */