3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
31 #ifndef MSG_STORAGE_TYPES_H
32 #define MSG_STORAGE_TYPES_H
36 * @file MsgStorageTypes.h
37 * @brief Defines transport types of messaging framework
43 * @section Introduction
44 * - Introduction : Overview on Messaging Storage Types
46 * - Program : Messaging Storage Types Reference
49 /*==================================================================================================
51 ==================================================================================================*/
58 * @ingroup MESSAGING_FRAMEWORK
59 * @defgroup MESSAGING_STORAGE_TYPES Messaging Storage Types
63 /*==================================================================================================
65 ==================================================================================================*/
66 #define MAX_FOLDER_NAME_SIZE 20
67 #define MAX_SEGMENT_NUM 12
70 /*==================================================================================================
72 ==================================================================================================*/
75 * @brief Represents a folder type. \n
76 * The values for this type SHOULD be in _MSG_FOLDER_TYPE_E.
78 typedef unsigned char MSG_FOLDER_TYPE_T;
82 * @brief Represents a sort type. \n
83 * The values for this type SHOULD be in \ref _MSG_SORT_TYPE_E.
85 typedef unsigned char MSG_SORT_TYPE_T;
89 * @brief Represents a Saved SIM message ID.
91 typedef signed short MSG_SIM_ID_T;
95 * @brief Represents a message type for quick panel. \n
96 * The values for this type SHOULD be in \ref _MSG_QUICKPANEL_TYPE_E.
98 typedef unsigned char MSG_QUICKPANEL_TYPE_T;
102 * @brief Represents a storage change CB type. \n
103 * The values for this type SHOULD be in \ref _MSG_STORAGE_CHANGE_TYPE_E.
105 typedef unsigned char MSG_STORAGE_CHANGE_TYPE_T;
108 /*==================================================================================================
110 ==================================================================================================*/
112 * @brief Represents the count of read/unread messages.
116 int nReadCnt; /**< The count of read messages */
117 int nUnreadCnt; /**< The count of unread messages */
118 int nSms; /**< The count of sms type messages */
119 int nMms; /**< The count of mms type messages */
124 * @brief Represents message thread view information list.
128 int nCount; /**< The count of message thread informatioin */
129 msg_thread_view_t *msgThreadInfo; /**< The pointer to message thread informatioin */
130 } MSG_THREAD_VIEW_LIST_S;
134 * @brief Represents message information list.
138 int nCount; /**< The count of message informatioin */
139 msg_message_t *msgInfo; /**< The pointer to message informatioin */
144 * @brief Represents message id list.
148 int nCount; /**< The count of message id informatioin */
149 MSG_MESSAGE_ID_T *msgIdList; /**< The pointer to message id informatioin */
154 * @brief Represents a reject message information.
158 MSG_MESSAGE_ID_T msgId; /**< Indicates the unique message ID. */
159 char msgText[MAX_MSG_TEXT_LEN+1]; /**< Indicates the message text. */
161 } MSG_REJECT_MSG_INFO_S;
165 * @brief Represents reject message list.
169 int nCount; /**< The count of reject message informatioin */
170 MSG_REJECT_MSG_INFO_S *rejectMsgInfo; /**< The pointer to reject message informatioin */
171 }MSG_REJECT_MSG_LIST_S;
175 * @brief Represents folder information.
179 MSG_FOLDER_ID_T folderId; /**< Indicates the unique folder ID. */
180 char folderName[MAX_FOLDER_NAME_SIZE+1]; /**< Indicates the name of the folder. */
181 MSG_FOLDER_TYPE_T folderType; /**< Indicates the folder type. */
186 * @brief Represents a folder list.
190 int nCount; /**< The count of folder information */
191 MSG_FOLDER_INFO_S *folderInfo; /**< The pointer to folder information */
196 * @brief Represents contact information.
200 MSG_CONTACT_ID_T contactId; /**< Indicates the unique contact ID. */
201 char displayName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the display name of contact. */
202 char firstName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the first name of contact. */
203 char lastName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the last name of contact. */
204 char imagePath[MAX_IMAGE_PATH_LEN+1]; /**< Indicates the image path of contact. */
205 } MSG_CONTACT_INFO_S;
209 * @brief Represents a sort rule. \n
210 * The sort rule structure includes a sort type and a sort order. \n
211 * Applications can use the sort rule when querying messages.
215 MSG_SORT_TYPE_T sortType; /**< Indicates the sort type */
216 bool bAscending; /**< Indicates the sort order which is ascending or descending */
221 * @brief Represents SIM ID List.
225 unsigned int count; /**< The total number of SIM Msg ID*/
226 MSG_SIM_ID_T simId[MAX_SEGMENT_NUM]; /**< The SIM Msg ID List */
231 * @brief Represents recipien list information.
236 MSG_ADDRESS_INFO_S* recipientAddr;
237 } MSG_RECIPIENTS_LIST_S;
241 * @brief Represents search condition values.
245 MSG_FOLDER_ID_T folderId;
246 MSG_MESSAGE_TYPE_T msgType;
250 } MSG_SEARCH_CONDITION_S;
253 /** @brief Prototype of the function that will be called when the database of message framework is changed.
254 * Applications SHOULD implement this callback function and register it into Message handle.
255 * For how to register this callback function, please refer to msg_reg_storage_change_callback.
256 * The callback function runs in the application process, not in the framework process.
257 * @param[in] handle is Message handle.
258 * @param[in] user_param is a pointer to user data.
261 typedef void (*msg_storage_change_cb)(MSG_HANDLE_T handle, MSG_STORAGE_CHANGE_TYPE_T storageChangeType, MSG_MSGID_LIST_S *pMsgIdList, void *user_param);
264 /*==================================================================================================
266 ==================================================================================================*/
269 * @brief Represents the values of a storage type. \n
270 * This enum is used as the value of MSG_STORAGE_ID_T.
272 enum _MSG_STORAGE_ID_E
274 MSG_STORAGE_UNKNOWN = 0, /**< Storage Id is unknown. */
275 MSG_STORAGE_PHONE, /**< Storage Id is Phone. */
276 MSG_STORAGE_SIM, /**< Storage Id is SIM card. */
281 * @brief Represents the values of a storage type. \n
282 * This enum is used as the value of MSG_FOLDER_ID_T.
284 enum _MSG_FOLDER_ID_E
286 MSG_IOSBOX_ID = -1, /**< Indicates INBOX, OUTBOX and SENTBOX group folder id. (Only for search option.) */
287 MSG_ALLBOX_ID = 0, /**< Indicates INBOX, OUTBOX, SENTBOX and DRAFTBOX group folder id. (Only for search option.) */
294 // new folder should be placed here
301 * @brief Represents the values of a folder type. \n
302 * This enum is used as the value of MSG_FOLDER_TYPE_T.
304 enum _MSG_FOLDER_TYPE_E
306 MSG_FOLDER_TYPE_INBOX = 1, /**< Inbox folder */
307 MSG_FOLDER_TYPE_OUTBOX, /**< Outbox folder */
308 MSG_FOLDER_TYPE_DRAFT, /**< Draft folder */
309 MSG_FOLDER_TYPE_USER_DEF /**< Folder which is created by a user */
314 * @brief Represents the values of a sort type. \n
315 * This enum is used as the value of MSG_SORT_TYPE_T.
317 enum _MSG_SORT_TYPE_E
319 MSG_SORT_BY_UNKNOWN = 0, /**< Unknown sort type */
320 MSG_SORT_BY_DISPLAY_FROM, /**< Sort by display from */
321 MSG_SORT_BY_DISPLAY_TO, /**< Sort by display to */
322 MSG_SORT_BY_DISPLAY_TIME, /**< Sort by display time */
323 MSG_SORT_BY_MSG_TYPE, /**< Sort by msg type */
324 MSG_SORT_BY_READ_STATUS, /**< Sort by read status */
325 MSG_SORT_BY_STORAGE_TYPE, /**< Sort by storage type */
326 MSG_SORT_BY_THREAD_NAME, /**< Sort by name for thread view*/
327 MSG_SORT_BY_THREAD_DATE, /**< Sort by date for thread view*/
328 MSG_SORT_BY_THREAD_COUNT, /**< Sort by count for thread view*/
333 * @brief Represents the values of a message type for quick panel. \n
334 * This enum is used as the value of MSG_QUICKPANEL_TYPE_T.
336 enum _MSG_QUICKPANEL_TYPE_E
338 MSG_QUICKPANEL_SMS = 0,
340 MSG_QUICKPANEL_DELIVER_REP,
341 MSG_QUICKPANEL_READ_REP,
342 MSG_QUICKPANEL_VOICEMAIL,
343 MSG_QUICKPANEL_MMS_NOTI,
349 enum _MSG_COUNT_LIMIT_MAILBOX_TYPE_E
351 MSG_COUNT_LIMIT_INBOX_TYPE,
352 MSG_COUNT_LIMIT_OUTBOX_TYPE,
353 MSG_COUNT_LIMIT_SENTBOX_TYPE,
354 MSG_COUNT_LIMIT_DRAFTBOX_TYPE,
355 MSG_COUNT_LIMIT_CBMSGBOX_TYPE,
356 MSG_COUNT_LIMIT_MAILBOX_TYPE_MAX,
359 enum _MSG_COUNT_LIMIT_MSG_TYPE_E
361 MSG_COUNT_LIMIT_SMS_TYPE,
362 MSG_COUNT_LIMIT_MMS_TYPE,
363 MSG_COUNT_LIMIT_CB_TYPE,
364 MSG_COUNT_LIMIT_WAPPUSH_TYPE,
365 MSG_COUNT_LIMIT_PROVISION_TYPE,
366 MSG_COUNT_LIMIT_MSG_TYPE_MAX,
369 enum _MSG_STORAGE_CHANGE_TYPE_E
372 MSG_STORAGE_CHANGE_INSERT = 1,
373 MSG_STORAGE_CHANGE_UPDATE,
374 MSG_STORAGE_CHANGE_DELETE,
377 MSG_STORAGE_CHANGE_CONTACT,
380 #endif // MSG_STORAGE_TYPES_H