From: Seunghwan Lee Date: Fri, 25 Jan 2013 07:31:42 +0000 (+0900) Subject: Apply VLD_MMS LOG about File Path & Size X-Git-Tag: accepted/tizen_2.1/20130425.035101~14^2~17^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0ae976e03bd79f978ab8628e8e072aca182a9b7;p=framework%2Fmessaging%2Fmsg-service.git Apply VLD_MMS LOG about File Path & Size --- diff --git a/plugin/mms_plugin/MmsPluginMessage.cpp b/plugin/mms_plugin/MmsPluginMessage.cpp index 4d4cd61..3b0e61c 100755 --- a/plugin/mms_plugin/MmsPluginMessage.cpp +++ b/plugin/mms_plugin/MmsPluginMessage.cpp @@ -938,6 +938,8 @@ msg_error_t MmsMakePreviewInfo(int msgId, MMS_MESSAGE_DATA_S *pMmsMsg) if (pMmsMsg == NULL) return MSG_ERR_NULL_POINTER; + MmsPluginStorage::instance()->removePreviewInfo(msgId); //remove exist previnfo + if (pMmsMsg->pageCnt > 0) { MmsPluginStorage::instance()->insertPreviewInfo(msgId, MSG_MMS_ITEM_TYPE_PAGE, (char *)"pagecount", pMmsMsg->pageCnt); @@ -996,3 +998,39 @@ msg_error_t MmsMakePreviewInfo(int msgId, MMS_MESSAGE_DATA_S *pMmsMsg) return MSG_SUCCESS; } + +void MmsPrintFileInfoForVLD(MMS_MESSAGE_DATA_S *pMmsMsg) +{ + MMS_PAGE_S *pPage = NULL; + MMS_MEDIA_S *pMedia = NULL; + + if (pMmsMsg == NULL) + return; + + if (pMmsMsg->pageCnt > 0) { + for (int i = 0; i < pMmsMsg->pageCnt; i++) { + + pPage = _MsgMmsGetPage(pMmsMsg, i); + + if (pPage == NULL) + continue; + + for (int j = 0; j < pPage->mediaCnt; j++) { + + pMedia = _MsgMmsGetMedia(pPage, j); + if (pMedia == NULL) + continue; + + MSG_MMS_VLD_FILE("[%s], %d", pMedia->szFilePath, MsgGetFileSize(pMedia->szFilePath)); + } + } + } + + int attachCnt = _MsgMmsGetAttachCount(pMmsMsg); + if (attachCnt > 0) { + for (int i = 0; i < pMmsMsg->pageCnt; i++) { + MMS_ATTACH_S *pAttach = _MsgMmsGetAttachment(pMmsMsg, i); + MSG_MMS_VLD_FILE("[%s], %d", pAttach->szFilePath, MsgGetFileSize(pAttach->szFilePath)); + } + } +} diff --git a/plugin/mms_plugin/MmsPluginStorage.cpp b/plugin/mms_plugin/MmsPluginStorage.cpp index 271d062..5c42c02 100755 --- a/plugin/mms_plugin/MmsPluginStorage.cpp +++ b/plugin/mms_plugin/MmsPluginStorage.cpp @@ -100,6 +100,8 @@ void MmsPluginStorage::addMessage(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_I THROW(MsgException::MMS_PLG_ERROR, "MMS Message Compose Error"); } + MmsPrintFileInfoForVLD(&mmsMsgData); + char fileName[MSG_FILENAME_LEN_MAX+1] = {0,}; FILE *pFile = NULL; diff --git a/plugin/mms_plugin/include/MmsPluginMessage.h b/plugin/mms_plugin/include/MmsPluginMessage.h index db549ec..d7fdc12 100755 --- a/plugin/mms_plugin/include/MmsPluginMessage.h +++ b/plugin/mms_plugin/include/MmsPluginMessage.h @@ -42,5 +42,5 @@ bool MmsCheckAdditionalMedia(MMS_MESSAGE_DATA_S *pMsgData, MsgType *partHeader); bool MmsRemovePims(MMS_MESSAGE_DATA_S *pMsgData); msg_error_t MmsMakePreviewInfo(int msgId, MMS_MESSAGE_DATA_S *pMmsMsg); - +void MmsPrintFileInfoForVLD(MMS_MESSAGE_DATA_S *pMmsMsg); #endif //MMS_PLUGIN_MESSAGE_H