update tizen source
[framework/messaging/msg-service.git] / plugin / mms_plugin / include / MmsPluginMessage.h
1 /*
2 *
3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
4 *
5 * This file is part of msg-service.
6 *
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 *          Sangkoo Kim <sangkoo.kim@samsung.com>
9 *          Seunghwan Lee <sh.cat.lee@samsung.com>
10 *          SoonMin Jung <sm0415.jung@samsung.com>
11 *          Jae-Young Lee <jy4710.lee@samsung.com>
12 *          KeeBum Kim <keebum.kim@samsung.com>
13 *
14 * PROPRIETARY/CONFIDENTIAL
15 *
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
21 *
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
28 *
29 */
30
31 #ifndef MMS_PLUGIN_MESSAGE_H
32 #define MMS_PLUGIN_MESSAGE_H
33
34
35 /*==================================================================================================
36                                                         INCLUDE FILES
37 ==================================================================================================*/
38 #include "MsgTypes.h"
39 #include "MsgInternalTypes.h"
40 #include "MsgMmsTypes.h"
41 #include "MsgSettingTypes.h"
42 #include "MmsPluginMIME.h"
43 #include "MsgMmsTypes.h"
44
45 /*==================================================================================================
46                                                         DEFINES
47 ==================================================================================================*/
48 #define         MMS_CONTENT_ID_LEN                              100
49 #define         MMS_LOCALE_RESP_TEXT_LEN                90
50 #define         MMS_TEXT_LEN                                            2000
51 #define         MMS_READ_REPORT_STRING_READ             "Read:"
52 #define         MMS_READ_REPORT_STRING_DELETED  "Deleted:"
53
54 #define         MSG_ATTACH_MAX          20
55 #define         MSG_LINE_LEN                                            1024
56 #define         MSG_SUBJ_LEN                                            40
57 #define         MSG_DATE_LEN                                            50
58 #define         MSG_BOUNDARY_LEN                                        70
59 #define         MSG_LOCALE_NAME_LEN                             150
60 #define         MSG_LOCALE_SUBJ_LEN                             (3 * MSG_SUBJ_LEN)
61 #define         MSG_ADDR_LEN                                            MAX_ADDRESS_VAL_LEN
62 #define         MSG_LOCALE_ADDR_LEN                             (3 * MAX_ADDRESS_VAL_LEN)
63 #define         MSG_LOCALE_FILENAME_LEN_MAX             (3 * 255)
64 #define         MSG_LOCALE_SIGN_LEN                                     (3 * MAX_SIGN_VAL_LEN)
65 #define         MSG_MAILBOX_NAME_LEN            10
66
67 #define         MsgContentType                                          MimeType
68 #define         MsgRecipientType                                        MSG_RECIPIENT_TYPE_T
69 #define         MMS_VERSION                                             0x92
70 #define         MSG_STR_ADDR_DELIMETER                  ";"
71 #define         MSG_CH_ADDR_DELIMETER                   ';'
72 #ifdef __SUPPORT_DRM__
73 #define         MSG_DRM_MAX_CMD                                 (2 * 1024)
74 #endif
75
76 #define         MSG_MMS_DECODE_BUFFER_MAX       (2 * 1024)
77 #define         MSG_MMS_ENCODE_BUFFER_MAX       (2 * 1024)
78
79 /*==================================================================================================
80                                                         TYPES
81 ==================================================================================================*/
82 typedef unsigned int                    UINT;
83 typedef unsigned long int               UINT32;
84 typedef unsigned char                   UINT8;
85 typedef unsigned short int              UINT16;
86 typedef unsigned long                   ULONG;
87 typedef unsigned char                   UCHAR;
88 typedef unsigned short                  MCHAR;
89 typedef unsigned short                  USHORT;
90
91 typedef int                                             MmsMsgID;
92
93 typedef struct _MsgAddress      MsgAddress;
94 typedef struct _MsgBody         MsgBody;
95 typedef struct _MsgMultipart    MsgMultipart;
96 typedef struct _MsgMessage      MsgMessage;
97
98 typedef struct _MsgHeaderAddress        MsgHeaderAddress;
99
100 /*==================================================================================================
101                                                         ENUMS
102 ==================================================================================================*/
103
104 typedef enum {
105         MMS_DATATYPE_NONE = -1,
106         MMS_DATATYPE_READ = 0,
107         MMS_DATATYPE_SENT = 1,
108         MMS_DATATYPE_NOTIFY = 2,
109         MMS_DATATYPE_UNSENT = 3,
110         MMS_DATATYPE_DRAFT = 4,
111         MMS_DATATYPE_SENDING = 6,
112         MMS_DATATYPE_RETRIEVING = 7,
113         MMS_DATATYPE_UNRETV = 8,
114         MMS_DATATYPE_TEMPLATE = 9,
115         MMS_DATATYPE_DRM_RO_WAITING = 10        // DRM RO WAITING
116
117 } MmsDataType;
118
119 typedef enum {
120         MMS_MSGTYPE_ERROR = -1, // error return in Get method
121         MMS_MSGTYPE_SEND_REQ = 0,       // default
122         MMS_MSGTYPE_SEND_CONF = 1,
123         MMS_MSGTYPE_NOTIFICATION_IND = 2,
124         MMS_MSGTYPE_NOTIFYRESP_IND = 3,
125         MMS_MSGTYPE_RETRIEVE_CONF = 4,
126         MMS_MSGTYPE_ACKNOWLEDGE_IND = 5,
127         MMS_MSGTYPE_DELIVERY_IND = 6,
128         MMS_MSGTYPE_READREC_IND = 7,
129         MMS_MSGTYPE_READORG_IND = 8,
130         MMS_MSGTYPE_FORWARD_REQ = 9,
131         MMS_MSGTYPE_FORWARD_CONF = 10,
132         MMS_MSGTYPE_READ_REPLY = 11,    // for internal use
133
134         MMS_MSGTYPE_MAX
135 } MmsMsgType;
136
137 typedef enum {
138         MMS_PRIORITY_ERROR = -1,                        // error return in Get method
139         MMS_PRIORITY_LOW = 0,                   // default
140         MMS_PRIORITY_NORMAL = 1,
141         MMS_PRIORITY_HIGH = 2
142 } MmsPriority;
143
144
145 typedef enum {
146         MMS_SENDER_VISIBLE_ERROR = -1,  // error return in Get method
147         MMS_SENDER_SHOW = 0,
148         MMS_SENDER_HIDE = 1
149 } MmsSenderVisible;
150
151
152 typedef enum {
153         MMS_REPORT_ERROR = -1,  // error return in Get method
154         MMS_REPORT_YES = 0,
155         MMS_REPORT_NO = 1
156 } MmsReport;
157
158
159 typedef enum {
160         MMS_REPORTALLOWED_ERROR = -1,   // error return in Get method
161         MMS_REPORTALLOWED_YES = 0,
162         MMS_REPORTALLOWED_NO = 1
163 } MmsReportAllowed;
164
165
166 typedef enum {
167         MMS_RECEIVE_READ_REPORT_ALLOWED,
168         MMS_RECEIVE_READ_REPORT_PROMPT,
169         MMS_RECEIVE_READ_REPORT_NOT_ALLOWED,
170 } MmsRecvReadReportType ;
171
172
173 typedef enum {
174         MMS_MSGSTATUS_NONE = -1,        // backward compatibility
175         MMS_MSGSTATUS_ERROR = -1,       // error return in Get method
176         MMS_MSGSTATUS_EXPIRED = 0,
177         MMS_MSGSTATUS_RETRIEVED = 1,
178         MMS_MSGSTATUS_REJECTED = 2,
179         MMS_MSGSTATUS_DEFERRED = 3,
180         MMS_MSGSTATUS_UNRECOGNISED = 4, // This value SHALL not be used in the M-Delivery.ind PDU.
181         MMS_MSGSTATUS_INDETERMINATE = 5,
182         MMS_MSGSTATUS_FORWARDED = 6,
183         MMS_MSGSTATUS_UNREACHABLE = 7
184 } MmsMsgStatus;
185
186
187 typedef enum {
188         MMS_READSTATUS_NONE = -1,                       // no touch status
189         MMS_IS_READ = 0,
190         MMS_IS_DELETED = 1
191 } MmsReadStatus;
192
193
194 typedef enum {
195         MMS_ADDRESS_PRESENT_TOKEN,
196         MMS_INSERT_ADDRESS_TOKEN
197 } MmsAddressType;
198
199 typedef enum {
200         MSG_PARAM_REPORT_TYPE_DELIVERY_STATUS,
201         MSG_PARAM_REPORT_TYPE_NUM,
202         MSG_PARAM_REPORT_TYPE_UNKNOWN,
203 } MsgParamReportType;
204
205 /* Response status */
206 typedef enum {
207         MMS_RESPSTATUS_ERROR = -1,      // error return in Get method
208         MMS_RESPSTATUS_OK = 0,  // default value
209         MMS_RESPSTAUTS_ERROR_UNSPECIFIED = 1,
210         MMS_RESPSTAUTS_ERROR_SERVICEDENIED = 2,
211         MMS_RESPSTAUTS_ERROR_MESSAGEFORMATCORRUPT = 3,
212         MMS_RESPSTAUTS_ERROR_SENDINGADDRESSUNRESOLVED = 4,
213         MMS_RESPSTAUTS_ERROR_MESSAGENOTFOUND = 5,
214         MMS_RESPSTAUTS_ERROR_NETWORKPROBLEM = 6,
215         MMS_RESPSTAUTS_ERROR_CONTENTNOTACCEPTED = 7,
216         MMS_RESPSTAUTS_ERROR_UNSUPPORTEDMESSAGE = 8,
217
218         MMS_RESPSTAUTS_ERROR_TRANSIENT_FAILURE = 9,
219         MMS_RESPSTAUTS_ERROR_TRANSIENT_SENDING_ADDRESS_UNRESOLVED = 10,
220         MMS_RESPSTAUTS_ERROR_TRANSIENT_MESSAGE_NOT_FOUND = 11,
221         MMS_RESPSTAUTS_ERROR_TRANSIENT_NETWORK_PROBLEM = 12,
222
223         MMS_RESPSTAUTS_ERROR_PERMANENT_FAILURE = 13,
224         MMS_RESPSTAUTS_ERROR_PERMANENT_SERVICE_DENIED = 14,
225         MMS_RESPSTAUTS_ERROR_PERMANENT_MESSAGE_FORMAT_CORRUPT = 15,
226         MMS_RESPSTAUTS_ERROR_PERMANENT_SENDING_ADDRESS_UNRESOLVED = 16,
227         MMS_RESPSTAUTS_ERROR_PERMANENT_MESSAGE_NOT_FOUND = 17,
228         MMS_RESPSTAUTS_ERROR_PERMANENT_CONTENT_NOT_ACCEPTED = 18,
229         MMS_RESPSTAUTS_ERROR_PERMANENT_REPLY_CHARGING_LIMITATIONS_NOT_MET = 19,
230         MMS_RESPSTAUTS_ERROR_PERMANENT_REPLY_CHARGING_REQUEST_NOT_ACCEPTED = 20,
231         MMS_RESPSTAUTS_ERROR_PERMANENT_REPLY_CHARGING_FORWARDING_DENIED = 21,
232         MMS_RESPSTAUTS_ERROR_PERMANENT_REPLY_CHARGING_NOT_SUPPORTED = 22
233 } MmsResponseStatus;
234
235
236 typedef enum {
237         MMS_RETRSTATUS_ERROR = -1,      // error return in Get method
238         MMS_RETRSTATUS_OK = 0,
239         MMS_RETRSTATUS_TRANSIENT_FAILURE = 1,
240         MMS_RETRSTATUS_TRANSIENT_MESSAGE_NOT_FOUND = 2,
241         MMS_RETRSTATUS_TRANSIENT_NETWORK_PROBLEM = 3,
242         MMS_RETRSTATUS_PERMANENT_FAILURE = 4,
243         MMS_RETRSTATUS_PERMANENT_SERVICE_DENIED = 5,
244         MMS_RETRSTATUS_PERMANENT_MESSAGE_NOT_FOUND = 6,
245         MMS_RETRSTATUS_PERMANENT_CONTENT_UNSUPPORT = 7
246 } MmsRetrieveStatus;
247
248
249 typedef enum {
250         MMS_REPLY_NONE = -1,    // error return in Get method
251         MMS_REPLY_REQUESTED = 0,
252         MMS_REPLY_REQUESTED_TEXT_ONLY = 1,
253         MMS_REPLY_ACCEPTED = 2,
254         MMS_REPLY_ACCEPTED_TEXT_ONLY = 3
255 } MmsReplyChargeType;
256
257
258 typedef enum {
259         MMS_STATUS_ERROR = -1,  // error return in Get method
260         MMS_STATUS_INITIAL = 0,
261         MMS_STATUS_REQUESTING = 1,
262         MMS_STATUS_SUCCESS = 2,
263         MMS_STATUS_FAIL = 3,
264         MMS_STATUS_NUM = 4,
265 } MmsDataStatus;
266
267
268 typedef enum {
269         MMS_EDIT_STYLE_THIS_PAGE = 0,
270         MMS_EDIT_STYLE_ALL_PAGE,
271 } MmsEditStyleMode;
272
273 typedef enum {
274         MMS_SPECIAL_MSG_TYPE_NONE = 0,
275         MMS_SPECIAL_MSG_TYPE_SYSTEM_TEMPLATE,   // system template .
276         MMS_SPECIAL_MSG_TYPE_VOICE_MESSAGE,             //voice message service
277
278         MMS_SPECIAL_MSG_TYPE_VDF_POSTCARD,              //postcard service, or Generic Postcard Service
279         MMS_SPECIAL_MSG_TYPE_POSTCARD_EXT1,             //Stickers Service
280         MMS_SPECIAL_MSG_TYPE_POSTCARD_EXT2,             //Photo 10x15
281         MMS_SPECIAL_MSG_TYPE_POSTCARD_EXT3,             //8 Photos
282         MMS_SPECIAL_MSG_TYPE_POSTCARD_EXT4,             // 4 Photos
283 } MmsSpecialMsgType;
284
285 typedef enum {
286         MMS_MM_CLASS_TEXT,
287         MMS_MM_CLASS_IMAGE_BASIC,
288         MMS_MM_CLASS_IMAGE_RICH,
289         MMS_MM_CLASS_VIDEO_BASIC,
290         MMS_MM_CLASS_VIDEO_RICH,
291         MMS_MM_CLASS_MEGAPIXEL,
292         MMS_MM_CLASS_CONTENT_BASIC,
293         MMS_MM_CLASS_CONTENT_RICH,
294         MMS_MM_CLASS_OTHER
295 } MmsUiMmClass;
296
297 typedef enum {
298         MMS_MSGCLASS_ERROR = -1,        // error return in Get method
299         MMS_MSGCLASS_PERSONAL = 0,      // default
300         MMS_MSGCLASS_ADVERTISEMENT = 1,
301         MMS_MSGCLASS_INFORMATIONAL = 2,
302         MMS_MSGCLASS_AUTO = 3
303 } MmsMsgClass;
304
305
306 /*==================================================================================================
307                                                         Structures
308 ==================================================================================================*/
309
310 typedef struct {
311         MmsReplyChargeType chargeType;
312         MmsTimeStruct deadLine;
313         int chargeSize;
314         char szChargeID[MMS_MSG_ID_LEN + 1];
315 } MmsReplyCharge;
316
317
318 typedef struct _MmsMsgMultiStatus {
319         char szTo[MAX_ADDRESS_VAL_LEN + 1];
320         bool bDeliveryReportIsRead;
321         bool bDeliveyrReportIsLast;
322         MSG_DELIVERY_REPORT_STATUS_T msgStatus;
323         UINT32 handledTime;
324
325         bool bReadReplyIsRead;
326         bool bReadReplyIsLast;
327         MSG_READ_REPORT_STATUS_T readStatus;
328         UINT32 readTime;
329
330         struct _MmsMsgMultiStatus *pNext;
331 } MmsMsgMultiStatus;
332
333 typedef struct _MMS_ATTRIB_S {
334         MsgContentType contentType;
335         MmsDataType dataType;
336         UINT32 date;
337         UINT8 version;
338
339         char szFrom[MSG_LOCALE_ADDR_LEN + 11];          //"/TYPE=PLMN", /"TYPE=IPv4", "/TYPE=IPv6"
340         char szSubject[MSG_LOCALE_SUBJ_LEN + 1];
341         char *szTo;
342         char *szCc;
343         char *szBcc;
344
345         MmsPriority priority;
346
347         MmsReplyCharge replyCharge;
348         bool bChargingMsgReplied;
349
350         bool bHideAddress;
351         bool bAskDeliveryReport;
352         bool bReportAllowed;
353         MmsRecvReadReportType readReportAllowedType;
354
355         bool bAskReadReply;
356         bool bRead;
357
358         MmsRecvReadReportSendStatus readReportSendStatus;
359
360         bool bReadReportSent;
361
362         bool bLeaveCopy;
363         bool bUseExpiryCustomTime;              // for expiry custom time
364         bool bUseDeliveryCustomTime;    // for expiry custom time
365         MmsEditStyleMode editStyleMode;                 //editStyle on All Page
366
367         MmsSpecialMsgType specialMsgType;                       // instead of bPostcard
368
369 #ifdef __SUPPORT_DRM__
370         MsgDrmType drmType;
371         int roWaitingTimerMax;          // DRM RO WAITING
372         char *pszDrmData;                       // DRM Data to draw mailbox icon
373 #endif
374
375         int msgSize;
376         MmsMsgClass msgClass;
377         MmsTimeStruct expiryTime;
378         MmsTimeStruct expiryCustomTime;         // for expiry custom time,
379         MmsTimeStruct deliveryTime;
380         MmsTimeStruct deliveryCustomTime;       // for expiry custom time
381
382         //for ReadMsg, When Sending notifyResp.ind
383         MSG_DELIVERY_REPORT_STATUS_T msgStatus;
384
385         MmsResponseStatus responseStatus;
386         MmsRetrieveStatus retrieveStatus;
387         char szResponseText[MMS_LOCALE_RESP_TEXT_LEN + 1];
388         char szRetrieveText[MMS_LOCALE_RESP_TEXT_LEN + 1];
389
390         MmsMsgMultiStatus *pMultiStatus;
391         bool bRetrieveNow;
392 } MmsAttrib;
393
394
395 typedef struct _MsgContentParam {
396         int charset;
397         char szBoundary[MSG_BOUNDARY_LEN + 1];
398         char szFileName[MSG_FILENAME_LEN_MAX + 1];
399         char szName[MSG_LOCALE_FILENAME_LEN_MAX + 1];
400
401 #ifdef FEATURE_JAVA_MMS
402         char *szApplicationID;
403         char *szReplyToApplicationID;
404 #endif
405
406         int type;
407         void *pPresentation;
408         char szStart[MSG_MSG_ID_LEN + 1];
409         char szStartInfo[MSG_MSG_ID_LEN + 1];
410
411         MsgParamReportType reportType; //only used as parameter of Content-Type: multipart/report; report-type=delivery-status;
412 } MsgContentParam;
413
414 #ifdef __SUPPORT_DRM__
415 typedef struct _MsgDRMInfo {
416         MsgDrmType drmType;
417         MsgContentType contentType;
418         char *szContentURI;
419         char *szContentName;
420         char *szContentDescription;
421         char *szContentVendor;
422         char *szRightIssuer;
423         char *szDrm2FullPath;
424         int roWaitingTimerMax;          // DRM RO WAITING
425         bool bFwdLock;
426         char *pszContentType;
427         bool bNoRingTone;
428         bool bNoScreen;
429 } MsgDRMInfo;
430 #endif
431
432 typedef struct _MsgType {
433         int offset;
434         int size;
435         int contentSize;
436         int section;
437         int type;
438 #ifdef __SUPPORT_DRM__
439         MsgDRMInfo drmInfo;
440 #endif
441         int encoding;
442         int disposition;
443         char szContentID[MSG_MSG_ID_LEN + 1];
444         char szContentLocation[MSG_MSG_ID_LEN + 1];
445         char szOrgFilePath[MSG_FILEPATH_LEN_MAX];
446
447         char szContentRepPos[30];
448         char szContentRepSize[30];
449         char szContentRepIndex[8];
450 #ifdef __SUPPORT_DRM__
451         int nDrmConvertedStatus;
452 #endif
453
454         MsgContentParam param;
455 } MsgType;
456
457 struct _MsgAddress {
458         int type;                                       //MSG_ADDR_TYPE_PHONE/EMAIL/IPV4/IPV6
459         MsgRecipientType recipientType;                 // TO, CC, BCC
460         char szName[MSG_LOCALE_NAME_LEN + 1];
461         char szAddr[MSG_ADDR_LEN + 1];
462         MsgAddress *pNext;
463         bool bDoNotShow;                                // temporary clip
464
465         // sorting
466         ULONG uLastRecentTime;          // last recent time save item
467         ULONG uMostUseCount;                    // most use count item.
468         int index;                                      // index sorting..
469 };
470
471 typedef struct _MsgHeader {
472         MsgAddress *pFrom;
473         MsgAddress *pTo;
474         MsgAddress *pCC;
475         char szReturnPath[MSG_ADDR_LEN + 1];
476         char szDate[MSG_DATE_LEN];
477         char szSubject[MSG_LOCALE_SUBJ_LEN + 1];
478         char szMsgID[MSG_MSG_ID_LEN + 1];
479 } MsgHeader;
480
481
482 struct _MsgBody {
483         int offset;
484         int size;
485         char szOrgFilePath[MSG_FILEPATH_LEN_MAX];
486         MsgType presentationType;
487         MsgBody *pPresentationBody;
488
489         union {
490                 char *pText;
491                 void *pBinary;
492                 MsgMultipart *pMultipart;
493                 MsgMessage *pMessage;
494         } body;
495 };
496
497 struct _MsgMultipart {
498         MsgType type;
499         MsgBody *pBody;
500         MsgMultipart *pNext;
501 };
502
503 struct _MsgMessage {
504         MsgHeader header;
505         MsgType type;
506         MsgBody *pBody;
507 };
508
509
510 typedef struct _MMS_MESSAGE_S {
511         MmsAttrib mmsAttrib;
512         MSG_MESSAGE_ID_T msgID;
513         int mailbox;            // mailbox type,MMS_MAILBOX_XXX
514         char szFileName[MSG_FILENAME_LEN_MAX];
515         char szTrID[MMS_TR_ID_LEN + 1];
516         char szMsgID[MMS_MSG_ID_LEN + 1];
517         char szForwardMsgID[MMS_MSG_ID_LEN + 1];
518         char szContentLocation[MMS_LOCATION_LEN + 1];
519         int nPartCount;
520         MsgType msgType;
521         MsgBody msgBody;
522 } MmsMsg;
523
524 struct _MsgHeaderAddress {
525         char *szAddr;
526         MsgHeaderAddress *pNext;
527 };
528
529
530 bool MmsInitMsgType(MsgType *pMsgType);
531 bool MmsInitMsgBody(MsgBody *pMsgBody);
532 bool MmsInitMsgContentParam(MsgContentParam *pMsgContentParam);
533 bool MmsInitMsgAttrib(MmsAttrib *pAttrib);
534 bool MmsSetMsgAddressList(MmsAttrib *pAttrib, const MSG_MESSAGE_INFO_S *pMsgInfo);
535 char *MmsComposeAddress(const MSG_MESSAGE_INFO_S *pMsgInfo, int recipientType);
536 bool MmsGetMsgBodyfromMsgInfo(const MSG_MESSAGE_INFO_S *pMsgInfo, MMS_MESSAGE_DATA_S *pMsgBody, char *pFileData);
537 bool MmsGetSmilRawData(MMS_MESSAGE_DATA_S *pMsgBody, char *pRawData, int *nSize);
538 bool MmsInsertPresentation(MmsMsg *pMsg, MsgContentType mimeType, char *pData, int size);
539 bool MmsInsertPartFromFile(MmsMsg *pMsg, char *szTitleName, char *szOrgFilePath, char *szContentID);
540 bool MmsIsMultipart(int type);
541 bool MmsGetTypeByFileName(int *type, char *szFileName);
542 MsgMultipart *MmsMakeMultipart(MsgContentType mimeType, char *szTitleName, char *szOrgFilePath, void *pData, int offset, int size, char *szContentID);
543 bool MmsIsText(int type);
544 bool MmsIsVitemContent(int type, char *pszName);
545 bool MmsComposeMessage(MmsMsg *pMmsMsg, MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, MMS_MESSAGE_DATA_S *pMsgData, char *pFileData);
546 void MmsComposeNotiMessage(MmsMsg *pMmsMsg, MSG_MESSAGE_ID_T msgID);
547 bool MmsGetMmsMessageBody(MmsMsg *pMmsMsg, char *retrievedFilePath);
548 bool MmsComposeForwardHeader(MmsMsg *pMmsMsg, const MSG_MESSAGE_INFO_S *pMsgInfo);
549 bool MmsComposeForwardMessage(MmsMsg *pMmsMsg, char *retrievedFilePath);
550 #ifdef MMS_DELIEVERY_IND_ENABLED
551 MmsMsgMultiStatus *MmsComposeDeliveryIndMessage(MmsMsg *pMmsMsg, MSG_MESSAGE_ID_T msgId);
552 #endif
553 void MmsComposeReadReportMessage(MmsMsg *pMmsMsg, const MSG_MESSAGE_INFO_S *pMsgInfo, MSG_MESSAGE_ID_T selectedMsgId);
554 MmsMsgMultiStatus *MmsGetMultiStatus(MSG_MESSAGE_ID_T msgId);
555 int MmsSearchMsgId(char *toNumber, char *szMsgID);
556 void MmsUpdateDeliveryReport(MSG_MESSAGE_ID_T msgId, MmsMsgMultiStatus *pStatus);
557 void MmsUpdateReadReport(MSG_MESSAGE_ID_T msgId, MmsMsgMultiStatus *pStatus);
558 MsgMultipart *MmsAllocMultipart(void);
559 bool _MsgIsASCII(char *pszText);
560 bool _MsgReplaceNonAscii(char *szInText, char **szOutText, char replaceChar);
561 bool _MsgIsSpace(char *pszText);
562 bool _MsgReplaceSpecialChar(char *szInText, char **szOutText, char specialChar);
563 char *MsgStrAppend(char *szInputStr1, char *szInputStr2);
564 char *MsgStrCopy(const char *string);
565 char *MsgStrNCopy(const char *string, int length);
566 int     MsgStrlen(char *pStr);
567 bool _MsgConvertCharToHex(char pSrc, char *pDest);
568 MSG_ERROR_T MmsAddAttachment(MMS_MESSAGE_DATA_S *pMsgData, MMS_MEDIA_S *pMedia);
569 bool MmsCheckAdditionalMedia(MMS_MESSAGE_DATA_S *pMsgData, MsgType *partHeader);
570 #ifdef __SUPPORT_DRM__
571 bool __MsgInitMsgDRMInfo(MsgDRMInfo *pMsgDrmInfo);
572 #endif
573
574 #endif