diff -r a32b19fb291e -r 5b14749788d7 messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp Thu Jun 17 09:57:06 2010 +0100 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp Thu Jul 22 16:32:06 2010 +0100 @@ -18,7 +18,6 @@ #include "univiewerfeeder_p.h" // SYSTEM INCLUDES #include -#include #include // USER INCLUDES @@ -27,6 +26,7 @@ #include "unidatamodelloader.h" #include "msgcontacthandler.h" #include "debugtraces.h" +#include "msgbiouids.h" // --------------------------------------------------------------------------- // UniViewerFeederPrivate::UniViewerFeederPrivate @@ -156,8 +156,8 @@ void UniViewerFeederPrivate::fetchDetailsL() { QDEBUG_WRITE("UniViewerFeederPrivate fetchDetailsL : SMS start"); - if (msgType() == KSenduiMtmSmsUidValue) - { + if (msgType() == KSenduiMtmSmsUidValue || (msgType() == KSenduiMtmBioUidValue + && mEntry.iBioType == KMsgBioNokiaServiceMessage.iUid)) { QString body; mPluginInterface->body(body); q_ptr->emitMsgBody(body); @@ -248,14 +248,21 @@ mPluginInterface->setMessageId(msgId); } - if (msgType() == KSenduiMtmMmsUidValue) - { + else if (msgType() == KSenduiMtmMmsUidValue) { mPluginInterface = mPluginLoader->getDataModelPlugin(ConvergedMessage::Mms); mPluginInterface->setMessageId(msgId); mSlideCount = mPluginInterface->slideCount(); + } + else if (msgType() == KSenduiMtmBioUidValue && mEntry.iBioType + == KMsgBioNokiaServiceMessage.iUid) { + mPluginInterface = mPluginLoader->getDataModelPlugin(ConvergedMessage::BioMsg); + mPluginInterface->setMessageId(msgId); + } + mPluginInterface->toRecipientList(mToAddressList); mPluginInterface->ccRecipientList(mCcAddressList); + mPluginInterface->bccRecipientList(mBccAddressList); } // --------------------------------------------------------------------------- @@ -265,12 +272,10 @@ ConvergedMessageAddressList UniViewerFeederPrivate::toAddressList() { QString alias = QString(); - for (int i = 0; i < mToAddressList.count(); ++i) - { + int count; + for (int i = 0; i < mToAddressList.count(); ++i) { MsgContactHandler::resolveContactDisplayName( - mToAddressList.at(i)->address(), - alias, - 0); + mToAddressList.at(i)->address(), alias, count); mToAddressList.at(i)->setAlias(alias); alias.clear(); } @@ -284,12 +289,10 @@ ConvergedMessageAddressList UniViewerFeederPrivate::ccAddressList() { QString alias = QString(); - for (int i = 0; i < mCcAddressList.count(); ++i) - { + int count; + for (int i = 0; i < mCcAddressList.count(); ++i) { MsgContactHandler::resolveContactDisplayName( - mToAddressList.at(i)->address(), - alias, - 0); + mToAddressList.at(i)->address(), alias, count); mCcAddressList.at(i)->setAlias(alias); alias.clear(); @@ -298,6 +301,35 @@ } // --------------------------------------------------------------------------- +// UniViewerFeederPrivate::bccAddressList +// @see header file +// --------------------------------------------------------------------------- +ConvergedMessageAddressList UniViewerFeederPrivate::bccAddressList() +{ + QString alias = QString(); + int count; + for (int i = 0; i < mBccAddressList.count(); ++i) + { + MsgContactHandler::resolveContactDisplayName( + mBccAddressList.at(i)->address(), + alias, + count); + mBccAddressList.at(i)->setAlias(alias); + alias.clear(); + } + return mBccAddressList; +} + +// --------------------------------------------------------------------------- +// UniViewerFeederPrivate::recipientCount +// @see header file +// --------------------------------------------------------------------------- +int UniViewerFeederPrivate::recipientCount() +{ + return mToAddressList.count() + mCcAddressList.count() + mBccAddressList.count(); +} + +// --------------------------------------------------------------------------- // UniViewerFeederPrivate::messageSize // @see header file // --------------------------------------------------------------------------- @@ -313,10 +345,8 @@ void UniViewerFeederPrivate::fromAddressAndAlias(QString& from, QString& alias) { mPluginInterface->fromAddress(from); - MsgContactHandler::resolveContactDisplayName( - from, - alias, - 0); + int count; + MsgContactHandler::resolveContactDisplayName(from, alias, count); } // --------------------------------------------------------------------------- @@ -335,8 +365,13 @@ { delete mCcAddressList.at(i); } + mCcAddressList.clear(); - mCcAddressList.clear(); + for (int i = 0; i < mBccAddressList.count(); ++i) + { + delete mBccAddressList.at(i); + } + mBccAddressList.clear(); } // EOF