messagingapp/msgui/appengine/src/conversationssummarymodel.cpp
changeset 27 e4592d119491
parent 25 84d9eb65b26f
child 47 5b14749788d7
--- a/messagingapp/msgui/appengine/src/conversationssummarymodel.cpp	Mon May 03 12:29:07 2010 +0300
+++ b/messagingapp/msgui/appengine/src/conversationssummarymodel.cpp	Fri May 14 15:49:35 2010 +0300
@@ -22,7 +22,8 @@
 #include "convergedmessage.h"
 #include "unidatamodelloader.h"
 #include "unidatamodelplugininterface.h"
-
+#include "ringbc.h"
+#include "msgcontacthandler.h"
 #include <ccsclientconversation.h>
 #include <ccsconversationentry.h>
 #include <QFile>
@@ -301,7 +302,8 @@
         item.setData(ConvergedMessage::VCard, MessageSubType);
 
         //parse vcf file to get the details
-        QString displayName = ConversationsEngineUtility::getVcardDisplayName(description);
+        QString displayName = MsgContactHandler::getVCardDisplayName(
+                description);
         item.setData(displayName, BodyText);
     }
     else 
@@ -341,7 +343,8 @@
             QString attachmentPath = attList[0]->path();
 
             //get display-name and set as bodytext
-            QString displayName = ConversationsEngineUtility::getVcardDisplayName(attachmentPath);
+            QString displayName = MsgContactHandler::getVCardDisplayName(
+                    attachmentPath);
             item.setData(displayName, BodyText);
 
             // clear attachement list : its allocated at data model
@@ -353,6 +356,19 @@
     else if (ConvergedMessage::VCal == msgSubType) {
         //not supported
     }
+    else if (ConvergedMessage::RingingTone == msgSubType) {
+        if (bioMsgPlugin->attachmentCount() > 0) {
+            UniMessageInfoList attList = bioMsgPlugin->attachmentList();
+            QString attachmentPath = attList[0]->path();
+            	
+            //get tone title, and set as bodytext
+            RingBc ringBc;
+            item.setData(ringBc.toneTitle(attachmentPath), BodyText);
+            while (!attList.isEmpty()) {
+                delete attList.takeFirst();
+            }
+        }
+    }
     else {
         // description
         HBufC* description = entry.Description();