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.
89 msg_address_type_t addressType; /**< The type of an address in case of an Email or a mobile phone */
90 msg_recipient_type_t recipientType; /**< The type of recipient address in case of To, Cc, and Bcc */
91 msg_contact_id_t contactId; /**< The contact ID of address */
92 char addressVal[MAX_ADDRESS_VAL_LEN+1]; /**< The actual value of an address */
93 char displayName[MAX_DISPLAY_NAME_LEN+1]; /**< The display name of an address */
98 * @brief Represents port number information.
101 bool valid; /**< Indicates whether port information is used or not. */
102 unsigned short dstPort; /**< Recipient port number, not greater than 16 bit */
103 unsigned short srcPort; /**< Sender port number, not greater than 16 bit */
108 * @brief Represents MMS Sending Option Structure in application.
113 bool bUseDeliveryCustomTime;
115 msg_priority_type_t priority;
120 * @brief Represents SMS Sending Option Structure in application.
128 * @brief Represents MSG Sending Option Structure in application.
134 msg_struct_t mmsSendOpt;
135 msg_struct_t smsSendOpt;
140 MMS_TIMETYPE_NONE = -1, /**< fixme: backward compatibility */
141 MMS_TIMETYPE_ERROR = -1, /**< error return in Get method */
142 MMS_TIMETYPE_RELATIVE = 0, /**< default */
143 MMS_TIMETYPE_ABSOLUTE = 1
154 * @brief Represents MMS Sending Option Structure in framework.
158 bool bUseDeliveryCustomTime;
159 msg_priority_type_t priority;
160 MmsTimeStruct expiryTime;
161 MmsTimeStruct deliveryTime;
162 } MMS_SENDINGOPT_INFO_S;
166 * @brief Represents SMS Sending Option Structure in framework.
170 } SMS_SENDINGOPT_INFO_S;
174 * @brief Represents MSG Sending Option Structure in framework.
182 MMS_SENDINGOPT_INFO_S mmsSendOptInfo;
183 SMS_SENDINGOPT_INFO_S smsSendOptInfo;
185 } MSG_SENDINGOPT_INFO_S;
189 * @brief Represents a request in the application. \n
190 * Applications compose a request and send it to the framework via Message handle. \n
191 * This request ID is used to manage the request by the framework.
194 msg_request_id_t reqId; /**< Indicates the request ID, which is unique.
195 When applications submit a request to the framework, this value will be set by the framework. */
196 msg_struct_t msg; /**< Indicates the message structure to be sent by applications. */
197 msg_struct_t sendOpt;
202 * @brief Represents Address information list.
206 msg_contact_id_t contactId; /**< The contact id of message common informatioin */
207 MSG_ADDRESS_INFO_S msgAddrInfo; /**< The pointer to message common informatioin */
208 } MSG_THREAD_LIST_INDEX_S;
211 msg_contact_id_t contactId; /**< The contact id of message common informatioin */
212 msg_struct_t msgAddrInfo; /**< The pointer to message common informatioin */
213 } MSG_THREAD_LIST_INDEX_INFO_S;
217 * @brief Represents Peer Count Info.
220 int totalCount; /**< Indicates the total number of messages from the Peer. */
221 int unReadCount; /**< Indicates the unread messages from the Peer. */
222 int smsMsgCount; /**< Indicates the SMS messages from the Peer. */
223 int mmsMsgCount; /**< Indicates the MMS messages from the Peer. */
224 } MSG_THREAD_COUNT_INFO_S;
228 * @brief Represents the request information of Push Message (SI, SL).
231 msg_push_action_t action;
232 unsigned long received;
233 unsigned long created;
234 unsigned long expires;
235 char id[MAX_WAPPUSH_ID_LEN + 1];
236 char href[MAX_WAPPUSH_HREF_LEN + 1];
237 char contents[MAX_WAPPUSH_CONTENTS_LEN + 1];
238 } MSG_PUSH_MESSAGE_S;
242 * @brief Represents the request information of Push Message (CO).
247 char invalObjectUrl[MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN + 1];
248 char invalServiceUrl[MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN + 1];
249 } MSG_PUSH_CACHEOP_S;
253 * @brief Represents the SyncML Message Information.
259 } MSG_SYNCML_MESSAGE_S;
263 * @brief Represents the SyncML Message Data.
266 msg_syncml_message_type_t syncmlType;
268 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
270 char wspHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
272 } MSG_SYNCML_MESSAGE_DATA_S;
276 * @brief Represents the SyncML Message Data.
279 char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
281 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
282 } MSG_LBS_MESSAGE_DATA_S;
286 char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
288 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
289 char pushAppId[MAX_WAPPUSH_ID_LEN + 1];
290 char pushContentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1];
291 } MSG_PUSH_MESSAGE_DATA_S;
294 * @brief Represents the Report Status Data.
297 char addressVal[MAX_ADDRESS_VAL_LEN + 1];
301 } MSG_REPORT_STATUS_INFO_S;
305 char contentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1];
306 char appId[MAX_WAPPUSH_ID_LEN + 1];
307 char pkgName[MSG_FILEPATH_LEN_MAX + 1];
309 } MSG_PUSH_EVENT_INFO_S;
313 msg_message_id_t msg_id;
314 char mime_type[MAX_MIME_TYPE_LEN+1];
315 char media_item[MSG_FILEPATH_LEN_MAX+1];
316 char thumb_path[MSG_FILEPATH_LEN_MAX+1];
323 #endif /* MSG_TYPES_H */