2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef MSG_STORAGE_TYPES_H_
18 #define MSG_STORAGE_TYPES_H_
20 /*==================================================================================================
22 ==================================================================================================*/
24 #include "msg_types.h"
26 /*==================================================================================================
28 ==================================================================================================*/
31 * @brief Represents message id list.
35 int nCount; /**< The count of message id informatioin */
36 msg_message_id_t *msgIdList; /**< The pointer to message id informatioin */
40 /*==================================================================================================
42 ==================================================================================================*/
45 * @brief Represents a folder type. \n
46 * The values for this type SHOULD be in _MSG_FOLDER_TYPE_E.
48 typedef unsigned char msg_folder_type_t;
52 * @brief Represents a sort type. \n
53 * The values for this type SHOULD be in \ref _MSG_SORT_TYPE_E.
55 typedef unsigned char msg_sort_type_t;
59 * @brief Represents a Saved SIM message ID.
61 typedef signed short msg_sim_id_t;
65 * @brief Represents a message type for quick panel. \n
66 * The values for this type SHOULD be in \ref _MSG_QUICKPANEL_TYPE_E.
68 typedef unsigned char msg_quickpanel_type_t;
72 * @brief Represents a storage change CB type. \n
73 * The values for this type SHOULD be in \ref _MSG_STORAGE_CHANGE_TYPE_E.
75 typedef unsigned char msg_storage_change_type_t;
78 /** @brief Prototype of the function that will be called when the database of message framework is changed.
79 * Applications SHOULD implement this callback function and register it into Message handle.
80 * For how to register this callback function, please refer to msg_reg_storage_change_callback.
81 * The callback function runs in the application process, not in the framework process.
82 * @param[in] handle is Message handle.
83 * @param[in] user_param is a pointer to user data.
86 typedef void (*msg_storage_change_cb)(msg_handle_t handle, msg_storage_change_type_t storageChangeType, msg_id_list_s *pMsgIdList, void *user_param);
89 /*==================================================================================================
91 ==================================================================================================*/
94 * @brief Represents the values of a storage type. \n
95 * This enum is used as the value of msg_storage_id_t.
97 enum _MSG_STORAGE_ID_E
99 MSG_STORAGE_UNKNOWN = 0, /**< Storage Id is unknown. */
100 MSG_STORAGE_PHONE, /**< Storage Id is Phone. */
101 MSG_STORAGE_SIM, /**< Storage Id is SIM card. */
106 * @brief Represents the values of a storage type. \n
107 * This enum is used as the value of msg_folder_id_t.
109 enum _MSG_FOLDER_ID_E
111 MSG_IOSBOX_ID = -1, /**< Indicates INBOX, OUTBOX and SENTBOX group folder id. (Only for search option.) */
112 MSG_ALLBOX_ID = 0, /**< Indicates INBOX, OUTBOX, SENTBOX and DRAFTBOX group folder id. (Only for search option.) */
119 MSG_SMS_TEMPLATE_ID = 7,
120 MSG_MMS_TEMPLATE_ID = 8,
122 // new folder should be placed here
129 * @brief Represents the values of a folder type. \n
130 * This enum is used as the value of msg_folder_type_t.
132 enum _MSG_FOLDER_TYPE_E
134 MSG_FOLDER_TYPE_INBOX = 1, /**< Inbox folder */
135 MSG_FOLDER_TYPE_OUTBOX, /**< Outbox folder */
136 MSG_FOLDER_TYPE_DRAFT, /**< Draft folder */
137 MSG_FOLDER_TYPE_SPAMBOX, /**< Spambox folder */
138 MSG_FOLDER_TYPE_TEMPLATE, /**< Template folder */
139 MSG_FOLDER_TYPE_USER_DEF /**< Folder which is created by a user */
144 * @brief Represents the values of a sort type. \n
145 * This enum is used as the value of msg_sort_type_t.
147 enum _MSG_SORT_TYPE_E
149 MSG_SORT_BY_UNKNOWN = 0, /**< Unknown sort type */
150 MSG_SORT_BY_DISPLAY_FROM, /**< Sort by display from */
151 MSG_SORT_BY_DISPLAY_TO, /**< Sort by display to */
152 MSG_SORT_BY_DISPLAY_TIME, /**< Sort by display time */
153 MSG_SORT_BY_MSG_TYPE, /**< Sort by msg type */
154 MSG_SORT_BY_READ_STATUS, /**< Sort by read status */
155 MSG_SORT_BY_STORAGE_TYPE, /**< Sort by storage type */
156 MSG_SORT_BY_THREAD_NAME, /**< Sort by name for thread view*/
157 MSG_SORT_BY_THREAD_DATE, /**< Sort by date for thread view*/
158 MSG_SORT_BY_THREAD_COUNT, /**< Sort by count for thread view*/
163 * @brief Represents the values of a message type for quick panel. \n
164 * This enum is used as the value of msg_quickpanel_type_t.
166 enum _MSG_QUICKPANEL_TYPE_E
168 MSG_QUICKPANEL_SMS = 0,
170 MSG_QUICKPANEL_DELIVER_REP,
171 MSG_QUICKPANEL_READ_REP,
172 MSG_QUICKPANEL_VOICEMAIL,
173 MSG_QUICKPANEL_MMS_NOTI,
179 enum _MSG_COUNT_LIMIT_MAILBOX_TYPE_E
181 MSG_COUNT_LIMIT_INBOX_TYPE,
182 MSG_COUNT_LIMIT_OUTBOX_TYPE,
183 MSG_COUNT_LIMIT_SENTBOX_TYPE,
184 MSG_COUNT_LIMIT_DRAFTBOX_TYPE,
185 MSG_COUNT_LIMIT_CBMSGBOX_TYPE,
186 MSG_COUNT_LIMIT_MAILBOX_TYPE_MAX,
189 enum _MSG_COUNT_LIMIT_MSG_TYPE_E
191 MSG_COUNT_LIMIT_SMS_TYPE,
192 MSG_COUNT_LIMIT_MMS_TYPE,
193 MSG_COUNT_LIMIT_CB_TYPE,
194 MSG_COUNT_LIMIT_WAPPUSH_TYPE,
195 MSG_COUNT_LIMIT_PROVISION_TYPE,
196 MSG_COUNT_LIMIT_MSG_TYPE_MAX,
199 enum _MSG_STORAGE_CHANGE_TYPE_E
202 MSG_STORAGE_CHANGE_INSERT = 1,
203 MSG_STORAGE_CHANGE_UPDATE,
204 MSG_STORAGE_CHANGE_DELETE,
207 MSG_STORAGE_CHANGE_CONTACT,
211 #endif /* MSG_STORAGE_TYPES_H_ */