Modify flora license version.
[platform/core/messaging/msg-service.git] / plugin / mms_plugin / include / MmsPluginCodecCommon.h
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
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
7 *
8 *    http://floralicense.org/license/
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_CODEC_COMMON_H
18 #define MMS_PLUGIN_CODEC_COMMON_H
19
20 #include "MmsPluginCodecTypes.h"
21
22 const char *MmsGetTextByCode(MmsCode i, UINT16 code);
23 const char *MmsGetTextValue(MmsCode i, int j);
24 const char *MmsGetTextValuebyField(int field, int value);
25 int MmsGetBinaryType(MmsCode i, UINT16 value);
26 int MmsGetTextType(MmsCode i, char *pValue);
27 UINT16 MmsGetBinaryValue(MmsCode i, int j);
28
29 void *MsgDecodeBase64(unsigned char *pSrc, unsigned long srcLen, unsigned long *len);
30 bool MsgEncode2Base64(void *pSrc, unsigned long srcLen, unsigned long *len, unsigned char *ret);
31 unsigned char *MsgDecodeQuotePrintable(unsigned char *pSrc, unsigned long srcLen, unsigned long *len);
32
33 char *MsgDecodeText(char *pOri);
34
35 const char *MmsDebugGetMimeType(MimeType mimeType);
36 const char *MmsDebugGetMmsReport(MmsReport report);
37 const char *MmsDebugGetMmsReportAllowed(MmsReportAllowed reportAllowed);
38 const char *MmsDebugGetMmsReadStatus(msg_read_report_status_t readStatus);
39 const char *MmsDebugGetMsgType(MmsMsgType msgType);
40 const char *MmsDebugGetResponseStatus(MmsResponseStatus responseStatus);
41 const char *MmsDebugGetRetrieveStatus(MmsRetrieveStatus retrieveStatus);
42 const char *MmsDebugGetMsgStatus(msg_delivery_report_status_t msgStatus);
43 const char *MmsDebugGetMsgClass(MmsMsgClass msgClass);
44 const char *MmsDebugGetDataType(MmsDataType dataType);
45
46 bool MmsInitMsgType(MsgType *pMsgType);
47 bool MmsInitMsgBody(MsgBody *pMsgBody);
48 bool MmsInitMsgContentParam(MsgContentParam *pMsgContentParam);
49 bool MmsInitMsgAttrib(MmsAttrib *pAttrib);
50
51 #ifdef __SUPPORT_DRM__
52 bool MmsInitMsgDRMInfo(MsgDRMInfo *pMsgDrmInfo);
53 void MmsReleaseMsgDRMInfo(MsgDRMInfo *pDrmInfo);
54 #endif//__SUPPORT_DRM__
55
56 bool MmsReleaseMsgBody(MsgBody *pBody, int type);
57 bool MmsReleaseMmsAttrib(MmsAttrib *pAttrib);
58 void MmsReleaseMmsMsg(MmsMsg *pMmsMsg);
59
60 #endif //MMS_PLUGIN_CODEC_COMMON_H