--- a/messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp Fri Jun 04 10:25:39 2010 +0100
+++ b/messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp Fri Jun 11 13:35:48 2010 +0300
@@ -27,6 +27,7 @@
#include "unidatamodelloader.h"
#include "msgcontacthandler.h"
#include "debugtraces.h"
+#include "msgbiouids.h"
// ---------------------------------------------------------------------------
// UniViewerFeederPrivate::UniViewerFeederPrivate
@@ -156,8 +157,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 +249,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 +273,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 +290,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 +302,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 +346,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 +366,13 @@
{
delete mCcAddressList.at(i);
}
+ mCcAddressList.clear();
- mCcAddressList.clear();
+ for (int i = 0; i < mBccAddressList.count(); ++i)
+ {
+ delete mBccAddressList.at(i);
+ }
+ mBccAddressList.clear();
}
// EOF