messagingapp/msgui/appengine/src/conversationssummarymodel.cpp
changeset 34 84197e66a4bd
parent 31 ebfee66fde93
child 43 35b64624a9e7
equal deleted inserted replaced
31:ebfee66fde93 34:84197e66a4bd
    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 #include "ringbc.h"
    25 #include "ringbc.h"
    26 #include "msgcontacthandler.h"
    26 #include "msgcontacthandler.h"
       
    27 #include "debugtraces.h"
       
    28 
    27 #include <ccsclientconversation.h>
    29 #include <ccsclientconversation.h>
    28 #include <ccsconversationentry.h>
    30 #include <ccsconversationentry.h>
    29 #include <QFile>
    31 #include <QFile>
    30 #include <QFileInfo>
    32 #include <QFileInfo>
    31 
    33 
   202 // @see header
   204 // @see header
   203 //---------------------------------------------------------------
   205 //---------------------------------------------------------------
   204 void ConversationsSummaryModel::populateItem(QStandardItem& item, 
   206 void ConversationsSummaryModel::populateItem(QStandardItem& item, 
   205         const CCsClientConversation& conversation)
   207         const CCsClientConversation& conversation)
   206     {
   208     {
       
   209     QCRITICAL_WRITE("ConversationsSummaryModel::populateItem start.");
       
   210             
   207     //get entry
   211     //get entry
   208     CCsConversationEntry* conEntry = conversation.GetConversationEntry(); 
   212     CCsConversationEntry* conEntry = conversation.GetConversationEntry(); 
   209     //error scenario
   213     //error scenario
   210     if(conEntry == NULL)
   214     if(conEntry == NULL)
   211         return;
   215         return;
   279     //set the contactId
   283     //set the contactId
   280     int contactId = conversation.GetContactId();
   284     int contactId = conversation.GetContactId();
   281     item.setData(contactId, ContactId);
   285     item.setData(contactId, ContactId);
   282     
   286     
   283     // unread status        
   287     // unread status        
   284     item.setData(conEntry->IsAttributeSet(ECsAttributeUnread),UnReadStatus);      
   288     item.setData(conEntry->IsAttributeSet(ECsAttributeUnread),UnReadStatus); 
       
   289     
       
   290     QCRITICAL_WRITE("ConversationsSummaryModel::populateItem start.");
   285     }
   291     }
   286 
   292 
   287 
   293 
   288 //---------------------------------------------------------------
   294 //---------------------------------------------------------------
   289 // ConversationsModel::handleBlueToothMessages
   295 // ConversationsModel::handleBlueToothMessages
   367             while (!attList.isEmpty()) {
   373             while (!attList.isEmpty()) {
   368                 delete attList.takeFirst();
   374                 delete attList.takeFirst();
   369             }
   375             }
   370         }
   376         }
   371     }
   377     }
   372     else {
   378 
       
   379    else if(ConvergedMessage::NokiaService == msgSubType){
       
   380         // This is a bio message so lets parse it and see if it has a associated attachment ..        
       
   381         if (bioMsgPlugin->attachmentCount() > 0) {
       
   382 				// TODO : need to confirm if we need to read from attachment
       
   383         }
       
   384         else {// description
       
   385             HBufC* description = entry.Description();
       
   386             QString subject("");
       
   387             if (description && description->Length()) {
       
   388                 subject = (S60QConversions::s60DescToQString(*description));
       
   389                 item.setData(subject, BodyText);
       
   390             }
       
   391 
       
   392         }
       
   393 
       
   394     }
       
   395 
       
   396    else {
   373         // description
   397         // description
   374         HBufC* description = entry.Description();
   398         HBufC* description = entry.Description();
   375         QString subject("");
   399         QString subject("");
   376         if (description && description->Length()) {
   400         if (description && description->Length()) {
   377             subject = (S60QConversions::s60DescToQString(*description));
   401             subject = (S60QConversions::s60DescToQString(*description));