3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
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>
14 * PROPRIETARY/CONFIDENTIAL
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.
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.
31 #ifndef MSG_UTIL_FUNCTION_H
32 #define MSG_UTIL_FUNCTION_H
35 /*==================================================================================================
37 ==================================================================================================*/
38 #include "MsgStorageTypes.h"
39 #include "MsgSettingTypes.h"
40 #include "MsgInternalTypes.h"
41 #include "MsgCmdTypes.h"
43 /*==================================================================================================
45 ==================================================================================================*/
48 int MsgEncodeCountInfo(MSG_COUNT_INFO_S *pCountInfo, char **ppDest);
50 int MsgEncodeCountByMsgType(int MsgCount, char **ppDest);
52 int MsgEncodeRecipientList(MSG_RECIPIENTS_LIST_S *pRecipientList, char **ppDest);
54 int MsgEncodeMsgId(MSG_MESSAGE_ID_T *pMsgId, char **ppDest);
56 int MsgEncodeMsgInfo(MSG_MESSAGE_INFO_S *pMsgInfo, char **ppDest);
58 int MsgEncodeMsgInfo(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S* pSendOptInfo, char **ppDest);
60 int MsgEncodeFolderViewList(MSG_LIST_S *pFolderViewList, char **ppDest);
62 int MsgEncodeFolderList(MSG_FOLDER_LIST_S *pFolderList, char **ppDest);
64 int MsgEncodeSetting(MSG_SETTING_S *pSetting, char **ppDest);
66 int MsgEncodeMsgType(MSG_MESSAGE_TYPE_S *pMsgType, char **ppDest);
68 int MsgEncodeThreadViewList(MSG_THREAD_VIEW_LIST_S *pThreadViewList, char **ppDest);
70 int MsgEncodeConversationViewList(MSG_LIST_S *pConvViewList, char **ppDest);
72 int MsgEncodeMsgGetContactCount(MSG_THREAD_COUNT_INFO_S *threadCountInfo, char **ppDest);
74 int MsgEncodeMemSize(unsigned int *memsize, char **ppDest);
76 int MsgEncodeSyncMLOperationData(int msgId, int extId, char **ppDest);
78 int MsgEncodeStorageChangeData(const MSG_STORAGE_CHANGE_TYPE_T storageChangeType, const MSG_MSGID_LIST_S *pMsgIdList, char **ppDest);
80 int MsgEncodeReportStatus(MSG_REPORT_STATUS_INFO_S* pReportStatus, char **ppDest);
84 void MsgDecodeMsgId(char *pSrc, MSG_MESSAGE_ID_T *pMsgId);
86 void MsgDecodeCountInfo(char *pSrc, MSG_COUNT_INFO_S *pCountInfo);
88 void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S* pSendOptInfo);
90 void MsgDecodeFolderViewList(char *pSrc, MSG_LIST_S *pFolderViewList);
92 void MsgDecodeRecipientList(char *pSrc, MSG_RECIPIENTS_LIST_S *pRecipientList);
94 void MsgDecodeFolderList(char *pSrc, MSG_FOLDER_LIST_S *pFolderList);
96 void MsgDecodeSetting(char *pSrc, MSG_SETTING_S *pSetting);
98 void MsgDecodeMsgType(char *pSrc, MSG_MESSAGE_TYPE_S* pMsgType);
100 void MsgDecodeThreadViewList(char *pSrc, MSG_THREAD_VIEW_LIST_S *pThreadViewList);
102 void MsgDecodeConversationViewList(char *pSrc, MSG_LIST_S *pConvViewList);
104 void MsgDecodeContactCount(char *pSrc, MSG_THREAD_COUNT_INFO_S *pMsgThreadCountList);
106 void MsgDecodeMemSize(char *pSrc, unsigned int *memsize);
108 void MsgDecodeReportStatus(char *pSrc, MSG_REPORT_STATUS_INFO_S *pReportStatus);
112 int MsgMakeEvent(const void *pData, int DataSize, MSG_EVENT_TYPE_T MsgEvent, MSG_ERROR_T MsgError, void **ppEvent);
115 #endif // MSG_UTIL_FUNCTION_H