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_MMS_TYPES_H
18 #define MSG_MMS_TYPES_H
22 * @brief Defines MMS types of messaging framework
27 * @section Introduction
28 * - Introduction : Overview on MMS message Types
30 * - Program : MMS message Types Reference
33 /*==================================================================================================
35 ==================================================================================================*/
43 * @ingroup MESSAGING_FRAMEWORK
44 * @defgroup MESSAGING_MMS_TYPES Messaging MMS Types
49 /*==================================================================================================
51 ==================================================================================================*/
54 * @brief Represents text information.
57 char szTransInId[MAX_SMIL_TRANSIN_ID + 1]; /**< Indicates the In SMIL transition id */
58 char szTransOutId[MAX_SMIL_TRANSOUT_ID + 1]; /**< Indicates the Out SMIL transition id */
59 int nRepeat; /**< Indicates the text needs to be displayed repeatedly */
60 int nBegin; /**< Indicates the begin time */
61 int nEnd; /**< Indicates the end time */
62 int nDurTime; /**< Indicates the duration */
63 int nBgColor; /**< Indicates the background color of the text */
64 bool bBold; /**< Indicates whether the text is bold */
65 bool bUnderLine; /**< Indicates whether the text is underlined */
66 bool bItalic; /**< Indicates whether the text is Italic */
67 bool bReverse; /**< Indicates whether the text is reversed */
68 MmsTextDirection nDirection; /**< Indicates the text direction type. see enum MmsTextDirection */
69 int nSize; /**< Indicates the font size */
70 int nColor; /**< Indicates the font color */
74 * @brief Represents video information.
77 char szTransInId[MAX_SMIL_TRANSIN_ID + 1]; /**< Indicates the In SMIL transition id */
78 char szTransOutId[MAX_SMIL_TRANSOUT_ID + 1]; /**< Indicates the Out SMIL transition id */
79 int nRepeat; /**< Indicates the video needs to be displayed repeatedly */
80 int nBegin; /**< Indicates the begin time */
81 int nEnd; /**< Indicates the end time */
82 int nDurTime; /**< Indicates the duration */
83 int nBgColor; /**< Indicates the background color of the text */
87 * @brief Represents media information.
91 MmsSmilMediaType mediatype; /**< Indicates the SMIL media type. see enum MmsSmilMediaType */
93 char szSrc[MSG_FILEPATH_LEN_MAX + 1];/**< Indicates the media source name */
94 char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */
95 char szFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the file path */
96 char szContentID[MSG_MSG_ID_LEN + 1]; /**< Indicates the content id */
97 char regionId[MAX_SMIL_REGION_ID + 1]; /**< Indicates the region id */
98 char szAlt[MAX_SMIL_ALT_LEN + 1]; /**< Indicates the alternative text to be displayed in failure case */
99 MsgDrmType drmType; /**< Indicates the drm type. see enum MsgDrmType */
100 char szDrm2FullPath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the fullpath of the DRM */
102 MmsSmilText sText; /**< Indicates the text attributes */
103 MmsSmilAVI sAVI; /**< Indicates the video attributes */
106 char szContentType[MSG_MSG_ID_LEN + 1];
107 char szContentLocation[MSG_MSG_ID_LEN + 1];
112 * @brief Represents attachment information.
116 MimeType mediatype; /**< Indicates the file mime type. see enum MimeType */
117 char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */
118 char szFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the file path */
119 int fileSize; /**< Indicates the size of the file */
120 MsgDrmType drmType; /**< Indicates the drm type. see enum MsgDrmType */
121 char szDrm2FullPath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the fullpath of the DRM */
122 char szContentType[MSG_MSG_ID_LEN + 1];
127 * @brief Represents SMIL page information.
131 int mediaCnt; /**< The count of the media */
132 GList *medialist; /**< The pointer to media list */
133 int nDur; /**< Indicates the duration of the page */
134 int nBegin; /**< Indicates the begin time of the page */
135 int nEnd; /**< Indicates the end time of the page */
136 int nMin; /**< Indicates the min attribute of the page */
137 int nMax; /**< Indicates the max attribute of the page */
138 int nRepeat; /**< Indicates the page needs to be displayed repeatedly */
143 * @brief Represents length information.
147 bool bUnitPercent; /**< Indicates the length is in percentage(%) or not */
148 int value; /**< Indicates the value for length */
152 * @brief Represents SMIL region information.
156 char szID[MAX_SMIL_REGION_ID + 1]; /**< Indicates the ID of region information */
157 MMS_LENGTH nLeft; /**< Indicates the left co-ordinate of the region */
158 MMS_LENGTH nTop; /**< Indicates the top co-ordinate of the region */
159 MMS_LENGTH width; /**< Indicates the width of the region */
160 MMS_LENGTH height; /**< Indicates the width of the region */ // '%' rate should be supported
161 bool bBgColor; /**< Indicates the background color set in the region */
162 int bgColor; /**< Indicates the background color of the region */
163 REGION_FIT_TYPE_T fit; /**< Indicates the fit type. see enum REGION_FIT_TYPE_T */
168 * @brief Represents SMIL root layout information.
172 MMS_LENGTH width; /**< Indicates the width of the root layout */
173 MMS_LENGTH height; /**< Indicates the height of the root layout */ // '%' rate should be supported
174 bool bBgColor; /**< Indicates the background color set in the root layout */
175 int bgColor; /**< Indicates the background color of the root layout */
176 }MMS_SMIL_ROOTLAYOUT;
180 * @brief Represents SMIL transition information.
184 char szID[MAX_SMIL_TRANSITION_ID + 1]; /**< Indicates the ID of transition information */
185 MmsSmilTransType nType; /**< Indicates the transition type. see enum MmsSmilTransType */
186 MmsSmilTransSubType nSubType; /**< Indicates the transition sub type. see enum MmsSmilTransSubType */
187 int nDur; /**< Indicates the transition duration */
188 }MMS_SMIL_TRANSITION;
192 * @brief Represents SMIL meta information.
196 char szID[MAX_SMIL_META_ID + 1]; /**< Indicates the ID of meta information */
197 char szName[MAX_SMIL_META_NAME + 1]; /**< Indicates the Name */
198 char szContent[MAX_SMIL_META_CONTENT + 1]; /**< Indicates the content */
203 * @brief Represents application id information for JAVA MMS msg.
207 bool valid; /**< Indicates whether application id information is used or not. */
208 char appId[MAX_MMS_JAVA_APPID_LEN + 1]; /**< application id, it should not exceed 32 chars */
209 char replyToAppId[MAX_MMS_JAVA_APPID_LEN + 1]; /**< reply to application id, application id, it should not exceeded 32 chars */
214 #define MAX_FULL_PATH_SIZE_S 160 // max length for internal file path
218 char szMsgID[MMS_MSG_ID_LEN + 1];
219 char retrievedFilePath[MAX_FULL_PATH_SIZE_S + 1];
220 char szTrID[MMS_TR_ID_LEN + 1];
221 MMS_APPID_INFO_S msgAppId;
224 typedef struct _MMS_HEADER_DATA_S
226 char messageID[MSG_MSG_ID_LEN + 1];
227 char trID[MSG_MSG_ID_LEN + 1];
228 char contentLocation[MSG_MSG_ID_LEN + 1];
229 char szContentType[MSG_MSG_ID_LEN + 1];//string : ex) application/vnd.wap.multipart.related
230 int contentType;//MimeType : ex) application/vnd.wap.multipart.related
231 int messageType;//MmsMsgType : ex) sendreq
232 int mmsVersion;//1.0 1.3
233 int messageClass;//Personal | Advertisement | Informational | Auto
234 int contentClass;//text | image-basic| image-rich | video-basic | video-rich | megapixel | content-basic | content-rich
235 int mmsPriority;//_MSG_PRIORITY_TYPE_E : Low | Normal | High
240 MimeType type; /**< Indicates the multipart mime type. see enum MimeType */
241 char szContentType[MSG_MSG_ID_LEN + 1]; /**< Indicates the content type */
242 char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */
243 char szFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the file path */
244 char szContentID[MSG_MSG_ID_LEN + 1]; /**< Indicates the content id */
245 char szContentLocation[MSG_MSG_ID_LEN + 1]; /**< Indicates the content Location */
246 } MMS_MULTIPART_DATA_S;
249 * @brief Represents MMS message data.
251 typedef struct _MMS_MESSAGE_DATA_S
253 int backup_type; //normal = 0|| backup = 1;
254 char szSmilFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the SMIL file path */
255 int pageCnt; /**< The count of the SMIL pages */
256 GList *pagelist; /**< The pointer to SMIL pages list */
257 int regionCnt; /**< The count of the SMIL regions */
258 GList *regionlist; /**< The pointer to SMIL regions list */
259 int attachCnt; /**< The count of the attachments */
260 GList *attachlist; /**< The pointer to attachment list */
261 int transitionCnt; /**< The count of the SMIL transitions information */
262 GList *transitionlist; /**< The pointer to SMIL transitions list */
263 int metaCnt; /**< The count of the SMIL meta information */
264 GList *metalist; /**< The pointer to SMIL meta list */
265 MMS_SMIL_ROOTLAYOUT rootlayout; /**< Indicates the root layout information */
266 MMS_APPID_INFO_S msgAppId;
267 MMS_HEADER_DATA_S header;
268 MMS_MULTIPART_DATA_S smil;
269 } MMS_MESSAGE_DATA_S;