Merge from master.
[framework/messaging/msg-service.git] / plugin / mms_plugin / include / MmsPluginMessage.h
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
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
7 *
8 *    http://floralicense.org
9 *
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.
15 */
16
17 #ifndef MMS_PLUGIN_MESSAGE_H
18 #define MMS_PLUGIN_MESSAGE_H
19
20 #include "MmsPluginTypes.h"
21 #include "MmsPluginCodec.h"
22
23 MsgMultipart *MmsAllocMultipart(void);
24 MsgMultipart *MmsMakeMultipart(MimeType mimeType, char *szTitleName, char *szOrgFilePath, char *szContentID, char *szContentLocation);
25
26 bool MmsIsMultipart(int type);
27 bool MmsIsText(int type);
28 bool MmsIsVitemContent(int type, char *pszName);
29
30 bool MmsComposeMessage(MmsMsg *pMmsMsg, MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, MMS_MESSAGE_DATA_S *pMsgData, char *pFileData);
31 void MmsComposeNotiMessage(MmsMsg *pMmsMsg, msg_message_id_t msgID);
32 void MmsComposeReadReportMessage(MmsMsg *pMmsMsg, const MSG_MESSAGE_INFO_S *pMsgInfo, msg_message_id_t selectedMsgId);
33 bool MmsComposeSendReq(MmsMsg *pMmsMsg, MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, MMS_MESSAGE_DATA_S *pMsgData);
34
35
36 bool MmsEncodeMmsMessage(MmsMsg *pMmsMsg, const char *raw_filepath);
37
38 bool MmsMakeMmsData(MmsMsg *pMsg, MMS_MESSAGE_DATA_S *pMmsMsg);
39
40 bool MmsCheckAdditionalMedia(MMS_MESSAGE_DATA_S *pMsgData, MsgType *partHeader);
41
42 bool MmsRemovePims(MMS_MESSAGE_DATA_S *pMsgData);
43
44 msg_error_t MmsMakePreviewInfo(int msgId, MMS_MESSAGE_DATA_S *pMmsMsg);
45
46 void MmsPrintFileInfoForVLD(MMS_MESSAGE_DATA_S *pMmsMsg);
47 int MmsUpdatePreviewData(MSG_MESSAGE_INFO_S *pMsgInfo);
48 #endif //MMS_PLUGIN_MESSAGE_H