2 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
22 * @brief Defines common types of messaging framework
27 * @section Introduction
28 * - Introduction : Overview on Message Common Types
30 * - Program : Message Common Types Reference
33 /*==================================================================================================
35 ==================================================================================================*/
41 #include "msg_types.h"
44 * @ingroup MESSAGING_FRAMEWORK
45 * @defgroup MESSAGING_COMMON_TYPES Messaging Common Types
49 /*==================================================================================================
51 ==================================================================================================*/
54 * @brief Defines the enabled MMS version
56 #define MMS_V1_2 // MMS Version : MMS_V1_0 / MMS_V1_1 / MMS_V1_2
60 * @brief Defines the notification method
62 #define MSG_NOTI_INTEGRATION
65 * @brief Defines the enabled drm
67 #define MSG_DRM_SUPPORT (0)
69 #define MAX_TELEPHONY_HANDLE_CNT (3)
72 * @brief Defines message struct handle.
75 typedef struct _msg_struct{
80 /*==================================================================================================
82 ==================================================================================================*/
85 * @brief Represents address information.
90 msg_address_type_t addressType; /**< The type of an address in case of an Email or a mobile phone */
91 msg_recipient_type_t recipientType; /**< The type of recipient address in case of To, Cc, and Bcc */
92 msg_contact_id_t contactId; /**< The contact ID of address */
93 char addressVal[MAX_ADDRESS_VAL_LEN+1]; /**< The actual value of an address */
94 char displayName[MAX_DISPLAY_NAME_LEN+1]; /**< The display name of an address */
99 * @brief Represents port number information.
103 bool valid; /**< Indicates whether port information is used or not. */
104 unsigned short dstPort; /**< Recipient port number, not greater than 16 bit */
105 unsigned short srcPort; /**< Sender port number, not greater than 16 bit */
110 * @brief Represents MMS Sending Option Structure in application.
116 bool bUseDeliveryCustomTime;
118 msg_priority_type_t priority;
123 * @brief Represents SMS Sending Option Structure in application.
132 * @brief Represents MSG Sending Option Structure in application.
139 msg_struct_t mmsSendOpt;
140 msg_struct_t smsSendOpt;
147 MMS_TIMETYPE_NONE = -1, // fixme: backward compatibility
148 MMS_TIMETYPE_ERROR = -1, // error return in Get method
149 MMS_TIMETYPE_RELATIVE = 0, // default
150 MMS_TIMETYPE_ABSOLUTE = 1
162 * @brief Represents MMS Sending Option Structure in framework.
167 bool bUseDeliveryCustomTime;
168 msg_priority_type_t priority;
169 MmsTimeStruct expiryTime;
170 MmsTimeStruct deliveryTime;
171 } MMS_SENDINGOPT_INFO_S;
175 * @brief Represents SMS Sending Option Structure in framework.
180 } SMS_SENDINGOPT_INFO_S;
184 * @brief Represents MSG Sending Option Structure in framework.
194 MMS_SENDINGOPT_INFO_S mmsSendOptInfo;
195 SMS_SENDINGOPT_INFO_S smsSendOptInfo;
197 } MSG_SENDINGOPT_INFO_S;
201 * @brief Represents a request in the application. \n
202 * Applications compose a request and send it to the framework via Message handle. \n
203 * This request ID is used to manage the request by the framework.
207 msg_request_id_t reqId; /**< Indicates the request ID, which is unique.
208 When applications submit a request to the framework, this value will be set by the framework. */
209 msg_struct_t msg; /**< Indicates the message structure to be sent by applications. */
210 msg_struct_t sendOpt;
215 * @brief Represents Address information list.
220 msg_contact_id_t contactId; /**< The contact id of message common informatioin */
221 MSG_ADDRESS_INFO_S msgAddrInfo; /**< The pointer to message common informatioin */
222 } MSG_THREAD_LIST_INDEX_S;
226 msg_contact_id_t contactId; /**< The contact id of message common informatioin */
227 msg_struct_t msgAddrInfo; /**< The pointer to message common informatioin */
228 } MSG_THREAD_LIST_INDEX_INFO_S;
232 * @brief Represents Peer Count Info.
236 int totalCount; /**< Indicates the total number of messages from the Peer. */
237 int unReadCount; /**< Indicates the unread messages from the Peer. */
238 int smsMsgCount; /**< Indicates the SMS messages from the Peer. */
239 int mmsMsgCount; /**< Indicates the MMS messages from the Peer. */
240 }MSG_THREAD_COUNT_INFO_S;
244 * @brief Represents the request information of Push Message (SI, SL).
248 msg_push_action_t action;
249 unsigned long received;
250 unsigned long created;
251 unsigned long expires;
252 char id[MAX_WAPPUSH_ID_LEN + 1];
253 char href[MAX_WAPPUSH_HREF_LEN + 1];
254 char contents[MAX_WAPPUSH_CONTENTS_LEN + 1];
255 } MSG_PUSH_MESSAGE_S;
259 * @brief Represents the request information of Push Message (CO).
265 char invalObjectUrl[MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN + 1];
266 char invalServiceUrl[MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN + 1];
267 } MSG_PUSH_CACHEOP_S;
271 * @brief Represents the SyncML Message Information.
278 }MSG_SYNCML_MESSAGE_S;
282 * @brief Represents the SyncML Message Data.
286 msg_syncml_message_type_t syncmlType;
288 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
290 char wspHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
292 }MSG_SYNCML_MESSAGE_DATA_S;
296 * @brief Represents the SyncML Message Data.
300 char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
302 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
303 }MSG_LBS_MESSAGE_DATA_S;
308 char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
310 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
311 char pushAppId[MAX_WAPPUSH_ID_LEN + 1];
312 char pushContentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1];
313 }MSG_PUSH_MESSAGE_DATA_S;
316 * @brief Represents the Report Status Data.
320 char addressVal[MAX_ADDRESS_VAL_LEN + 1];
324 } MSG_REPORT_STATUS_INFO_S;
329 char contentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1];
330 char appId[MAX_WAPPUSH_ID_LEN + 1];
331 char pkgName[MSG_FILEPATH_LEN_MAX + 1];
333 }MSG_PUSH_EVENT_INFO_S;
338 msg_message_id_t msg_id;
339 char mime_type[MAX_MIME_TYPE_LEN+1];
340 char media_item[MSG_FILEPATH_LEN_MAX+1];
341 char thumb_path[MSG_FILEPATH_LEN_MAX+1];
348 #endif // MSG_TYPES_H