Apply VLD_MMS LOG about File Path & Size
authorSeunghwan Lee <sh.cat.lee@samsung.com>
Fri, 25 Jan 2013 07:31:42 +0000 (16:31 +0900)
committerSeunghwan Lee <sh.cat.lee@samsung.com>
Fri, 25 Jan 2013 07:31:42 +0000 (16:31 +0900)
plugin/mms_plugin/MmsPluginMessage.cpp
plugin/mms_plugin/MmsPluginStorage.cpp
plugin/mms_plugin/include/MmsPluginMessage.h

index 4d4cd61656c3a5a64aa50551adf6f0c0008a5a7a..3b0e61cbc48f3e7a104e9a2db47766228b20fbb8 100755 (executable)
@@ -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));
+               }
+       }
+}
index 271d0626adaa8fdee193b3ff89106475ab789e7e..5c42c02345dcd35ad958310ff8e45c034f3922f7 100755 (executable)
@@ -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;
index db549ecd62f0179fed95f5d0f4a09caad8c0e420..d7fdc12e3ddad698592436c710fe2b1fa4839e9e 100755 (executable)
@@ -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