351 |
351 |
352 // parse message |
352 // parse message |
353 iMmsMtm->SwitchCurrentEntryL(msgId); |
353 iMmsMtm->SwitchCurrentEntryL(msgId); |
354 iMmsMtm->LoadMessageL(); |
354 iMmsMtm->LoadMessageL(); |
355 |
355 |
356 CUniDataModel* iUniDataModel = CUniDataModel::NewL(ifsSession, *iMmsMtm); |
356 CUniDataModel* uniDataModel = CUniDataModel::NewL(ifsSession, *iMmsMtm); |
357 CleanupStack::PushL(iUniDataModel); |
357 CleanupStack::PushL(uniDataModel); |
358 iUniDataModel->RestoreL(*this, ETrue); |
358 uniDataModel->RestoreL(*this, ETrue); |
359 |
359 |
360 //msg property |
360 //msg property |
361 TInt msgProperty = 0; |
361 TInt msgProperty = 0; |
362 if (iUniDataModel->AttachmentList().Count() > 0) |
362 if (uniDataModel->AttachmentList().Count() > 0) |
363 { |
363 { |
364 msgProperty |= EPreviewAttachment; |
364 msgProperty |= EPreviewAttachment; |
365 } |
365 } |
366 |
366 |
367 //check for msg forward |
367 //check for msg forward |
368 //Validate if the mms msg can be forwarded or not |
368 //Validate if the mms msg can be forwarded or not |
369 if (ValidateMsgForForward(iUniDataModel)) |
369 if (ValidateMsgForForward(uniDataModel)) |
370 { |
370 { |
371 msgProperty |= EPreviewForward; |
371 msgProperty |= EPreviewForward; |
372 } |
372 } |
373 |
373 |
374 TPtrC videoPath; |
374 TPtrC videoPath; |
375 TPtrC imagePath; |
375 TPtrC imagePath; |
376 |
376 |
377 // preview parsing |
377 // preview parsing |
378 TInt slideCount = iUniDataModel->SmilModel().SlideCount(); |
378 TInt slideCount = uniDataModel->SmilModel().SlideCount(); |
379 TBool isBodyTextSet = EFalse; |
379 TBool isBodyTextSet = EFalse; |
380 TBool isImageSet = EFalse; |
380 TBool isImageSet = EFalse; |
381 TBool isAudioSet = EFalse; |
381 TBool isAudioSet = EFalse; |
382 TBool isVideoSet = EFalse; |
382 TBool isVideoSet = EFalse; |
383 |
383 |
384 for (int i = 0; i < slideCount; i++) |
384 for (int i = 0; i < slideCount; i++) |
385 { |
385 { |
386 int slideobjcount = iUniDataModel->SmilModel().SlideObjectCount(i); |
386 int slideobjcount = uniDataModel->SmilModel().SlideObjectCount(i); |
387 for (int j = 0; j < slideobjcount; j++) |
387 for (int j = 0; j < slideobjcount; j++) |
388 { |
388 { |
389 CUniObject *obj = iUniDataModel->SmilModel(). GetObjectByIndex(i, |
389 CUniObject *obj = uniDataModel->SmilModel(). GetObjectByIndex(i, |
390 j); |
390 j); |
391 CMsgMediaInfo *mediaInfo = obj->MediaInfo(); |
391 CMsgMediaInfo *mediaInfo = obj->MediaInfo(); |
392 |
392 |
393 TPtrC8 mimetype = obj->MimeType(); |
393 TPtrC8 mimetype = obj->MimeType(); |
394 TMsvAttachmentId attachId = obj->AttachmentId(); |
394 TMsvAttachmentId attachId = obj->AttachmentId(); |