2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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://floralicense.org
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
59 * @brief Defines message struct handle.
62 typedef struct _msg_struct{
67 /*==================================================================================================
69 ==================================================================================================*/
72 * @brief Represents address information.
77 msg_address_type_t addressType; /**< The type of an address in case of an Email or a mobile phone */
78 msg_recipient_type_t recipientType; /**< The type of recipient address in case of To, Cc, and Bcc */
79 msg_contact_id_t contactId; /**< The contact ID of address */
80 char addressVal[MAX_ADDRESS_VAL_LEN+1]; /**< The actual value of an address */
81 char displayName[MAX_DISPLAY_NAME_LEN+1]; /**< The display name of an address */
86 * @brief Represents port number information.
90 bool valid; /**< Indicates whether port information is used or not. */
91 unsigned short dstPort; /**< Recipient port number, not greater than 16 bit */
92 unsigned short srcPort; /**< Sender port number, not greater than 16 bit */
97 * @brief Represents MMS Sending Option Structure in application.
103 bool bUseDeliveryCustomTime;
105 msg_priority_type_t priority;
110 * @brief Represents SMS Sending Option Structure in application.
119 * @brief Represents MSG Sending Option Structure in application.
126 msg_struct_t mmsSendOpt;
127 msg_struct_t smsSendOpt;
134 MMS_TIMETYPE_NONE = -1, // fixme: backward compatibility
135 MMS_TIMETYPE_ERROR = -1, // error return in Get method
136 MMS_TIMETYPE_RELATIVE = 0, // default
137 MMS_TIMETYPE_ABSOLUTE = 1
149 * @brief Represents MMS Sending Option Structure in framework.
154 bool bUseDeliveryCustomTime;
155 msg_priority_type_t priority;
156 MmsTimeStruct expiryTime;
157 MmsTimeStruct deliveryTime;
158 } MMS_SENDINGOPT_INFO_S;
162 * @brief Represents SMS Sending Option Structure in framework.
167 } SMS_SENDINGOPT_INFO_S;
171 * @brief Represents MSG Sending Option Structure in framework.
181 MMS_SENDINGOPT_INFO_S mmsSendOptInfo;
182 SMS_SENDINGOPT_INFO_S smsSendOptInfo;
184 } MSG_SENDINGOPT_INFO_S;
188 * @brief Represents a request in the application. \n
189 * Applications compose a request and send it to the framework via Message handle. \n
190 * 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.
207 msg_contact_id_t contactId; /**< The contact id of message common informatioin */
208 MSG_ADDRESS_INFO_S msgAddrInfo; /**< The pointer to message common informatioin */
209 } MSG_THREAD_LIST_INDEX_S;
213 msg_contact_id_t contactId; /**< The contact id of message common informatioin */
214 msg_struct_t msgAddrInfo; /**< The pointer to message common informatioin */
215 } MSG_THREAD_LIST_INDEX_INFO_S;
219 * @brief Represents Peer Count Info.
223 int totalCount; /**< Indicates the total number of messages from the Peer. */
224 int unReadCount; /**< Indicates the unread messages from the Peer. */
225 int smsMsgCount; /**< Indicates the SMS messages from the Peer. */
226 int mmsMsgCount; /**< Indicates the MMS messages from the Peer. */
227 }MSG_THREAD_COUNT_INFO_S;
231 * @brief Represents the request information of Push Message (SI, SL).
235 msg_push_action_t action;
236 unsigned long received;
237 unsigned long created;
238 unsigned long expires;
239 char id[MAX_WAPPUSH_ID_LEN + 1];
240 char href[MAX_WAPPUSH_HREF_LEN + 1];
241 char contents[MAX_WAPPUSH_CONTENTS_LEN + 1];
242 } MSG_PUSH_MESSAGE_S;
246 * @brief Represents the request information of Push Message (CO).
252 char invalObjectUrl[MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN + 1];
253 char invalServiceUrl[MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN + 1];
254 } MSG_PUSH_CACHEOP_S;
258 * @brief Represents the SyncML Message Information.
265 }MSG_SYNCML_MESSAGE_S;
269 * @brief Represents the SyncML Message Data.
273 msg_syncml_message_type_t syncmlType;
275 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
277 char wspHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
278 }MSG_SYNCML_MESSAGE_DATA_S;
282 * @brief Represents the SyncML Message Data.
286 char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
288 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
289 }MSG_LBS_MESSAGE_DATA_S;
294 char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1];
296 char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
297 char pushAppId[MAX_WAPPUSH_ID_LEN + 1];
298 char pushContentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1];
299 }MSG_PUSH_MESSAGE_DATA_S;
302 * @brief Represents the Report Status Data.
306 char addressVal[MAX_ADDRESS_VAL_LEN + 1];
310 } MSG_REPORT_STATUS_INFO_S;
315 char contentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1];
316 char appId[MAX_WAPPUSH_ID_LEN + 1];
317 char pkgName[MSG_FILEPATH_LEN_MAX + 1];
319 }MSG_PUSH_EVENT_INFO_S;
325 #endif // MSG_TYPES_H