20 #include "conversationsengineutility.h" |
20 #include "conversationsengineutility.h" |
21 #include "s60qconversions.h" |
21 #include "s60qconversions.h" |
22 #include "convergedmessage.h" |
22 #include "convergedmessage.h" |
23 #include "unidatamodelloader.h" |
23 #include "unidatamodelloader.h" |
24 #include "unidatamodelplugininterface.h" |
24 #include "unidatamodelplugininterface.h" |
25 |
25 #include "ringbc.h" |
|
26 #include "msgcontacthandler.h" |
26 #include <ccsclientconversation.h> |
27 #include <ccsclientconversation.h> |
27 #include <ccsconversationentry.h> |
28 #include <ccsconversationentry.h> |
28 #include <QFile> |
29 #include <QFile> |
29 #include <QFileInfo> |
30 #include <QFileInfo> |
30 |
31 |
299 { |
300 { |
300 //message sub-type |
301 //message sub-type |
301 item.setData(ConvergedMessage::VCard, MessageSubType); |
302 item.setData(ConvergedMessage::VCard, MessageSubType); |
302 |
303 |
303 //parse vcf file to get the details |
304 //parse vcf file to get the details |
304 QString displayName = ConversationsEngineUtility::getVcardDisplayName(description); |
305 QString displayName = MsgContactHandler::getVCardDisplayName( |
|
306 description); |
305 item.setData(displayName, BodyText); |
307 item.setData(displayName, BodyText); |
306 } |
308 } |
307 else |
309 else |
308 { |
310 { |
309 if (description.contains(".vcs")) // "vCalendar" |
311 if (description.contains(".vcs")) // "vCalendar" |
339 if (bioMsgPlugin->attachmentCount() > 0) { |
341 if (bioMsgPlugin->attachmentCount() > 0) { |
340 UniMessageInfoList attList = bioMsgPlugin->attachmentList(); |
342 UniMessageInfoList attList = bioMsgPlugin->attachmentList(); |
341 QString attachmentPath = attList[0]->path(); |
343 QString attachmentPath = attList[0]->path(); |
342 |
344 |
343 //get display-name and set as bodytext |
345 //get display-name and set as bodytext |
344 QString displayName = ConversationsEngineUtility::getVcardDisplayName(attachmentPath); |
346 QString displayName = MsgContactHandler::getVCardDisplayName( |
|
347 attachmentPath); |
345 item.setData(displayName, BodyText); |
348 item.setData(displayName, BodyText); |
346 |
349 |
347 // clear attachement list : its allocated at data model |
350 // clear attachement list : its allocated at data model |
348 while (!attList.isEmpty()) { |
351 while (!attList.isEmpty()) { |
349 delete attList.takeFirst(); |
352 delete attList.takeFirst(); |
350 } |
353 } |
351 } |
354 } |
352 } |
355 } |
353 else if (ConvergedMessage::VCal == msgSubType) { |
356 else if (ConvergedMessage::VCal == msgSubType) { |
354 //not supported |
357 //not supported |
|
358 } |
|
359 else if (ConvergedMessage::RingingTone == msgSubType) { |
|
360 if (bioMsgPlugin->attachmentCount() > 0) { |
|
361 UniMessageInfoList attList = bioMsgPlugin->attachmentList(); |
|
362 QString attachmentPath = attList[0]->path(); |
|
363 |
|
364 //get tone title, and set as bodytext |
|
365 RingBc ringBc; |
|
366 item.setData(ringBc.toneTitle(attachmentPath), BodyText); |
|
367 while (!attList.isEmpty()) { |
|
368 delete attList.takeFirst(); |
|
369 } |
|
370 } |
355 } |
371 } |
356 else { |
372 else { |
357 // description |
373 // description |
358 HBufC* description = entry.Description(); |
374 HBufC* description = entry.Description(); |
359 QString subject(""); |
375 QString subject(""); |