diff -r a32b19fb291e -r 5b14749788d7 messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp --- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Thu Jun 17 09:57:06 2010 +0100 +++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Thu Jul 22 16:32:06 2010 +0100 @@ -24,20 +24,20 @@ #include #include #include -#include +#include #include #include +#include +#include //USER INCLUDES #include "msgnotifier.h" #include "msgnotifier_p.h" -#include "s60qconversions.h" #include "msgstorehandler.h" #include "msginfodefs.h" #include "conversationidpsconsts.h" #include "debugtraces.h" - // ---------------------------------------------------------------------------- // MsgNotifierPrivate::MsgNotifierPrivate // @see MsgNotifierPrivate.h @@ -80,6 +80,12 @@ delete mSettingsManager; } + if(mSts) + { + delete mSts; + mSts = NULL; + } + QDEBUG_WRITE("MsgNotifierPrivate::~MsgNotifierPrivate : Exit") } @@ -115,6 +121,8 @@ QDEBUG_WRITE_FORMAT("MsgNotifierPrivate::initL " "writing ret value",success) + mSts = new XQSystemToneService(); + QDEBUG_WRITE("MsgNotifierPrivate::initL : Exit") } @@ -205,17 +213,20 @@ if(displayName) { notifData.mDisplayName = - S60QConversions::s60DescToQString(*displayName); + XQConversions::s60DescToQString(*displayName); } if(number) { - notifData.mContactNum = S60QConversions::s60DescToQString(*number); + notifData.mContactNum = XQConversions::s60DescToQString(*number); } if(descrp) { - notifData.mDescription = S60QConversions::s60DescToQString(*descrp); + notifData.mDescription = XQConversions::s60DescToQString(*descrp); } + //Play new message alert tone. + mSts->playTone(XQSystemToneService::SmsAlertTone); + // check whether opened cv id and received // cv id are same and show notification if( showNotification(notifData.mConversationId )) @@ -289,39 +300,44 @@ // @see MsgNotifierPrivate.h // ---------------------------------------------------------------------------- void MsgNotifierPrivate::displayFailedNote(MsgInfo info) -{ - // TODO: use XQAiwRequest - QDEBUG_WRITE("[MsgNotifierPrivate::handleFailedState] : entered") - // change to com.nokia.symbian.messaging (servicename), IMsgErrorNotifier - // as the service name. - XQServiceRequest snd("messaging.com.nokia.symbian.MsgErrorNotifier", - "displayErrorNote(QVariantList)", false); + { + QDEBUG_WRITE("MsgNotifierPrivate::displayFailedNote start.") + + // check whether opened cv id and received + // cv id are same then dont show failed note + if (!showNotification(info.mConversationId)) + { + return; + } - QVariantList args; + //Even if name string is empty we shall add name into args + QString nameString; + info.mDisplayName.removeDuplicates(); info.mDisplayName.sort(); - - QString nameString; - + nameString.append(info.mDisplayName.at(0)); - for(int i = 1; i < info.mDisplayName.count(); ++i){ + for (int i = 1; i < info.mDisplayName.count(); ++i) + { nameString.append(", "); nameString.append(info.mDisplayName.at(i)); - } - - //Even if name string is empty we shall add name into args - QVariant nameV(nameString); - args << nameV; + } - QDEBUG_WRITE("[MsgNotifierPrivate::handleFailedState] : name and contactnumber") - + // create request arguments + QVariantList args; + args << QVariant(nameString); args << info.mConversationId; args << info.mMessageType; + + // TODO: use XQAiwRequest + XQServiceRequest snd("messaging.com.nokia.symbian.MsgErrorNotifier", + "displayErrorNote(QVariantList)", false); + snd << args; snd.send(); - QDEBUG_WRITE("[MsgNotifierPrivate::handleFailedState] : left") - -} + + QDEBUG_WRITE("MsgNotifierPrivate::displayFailedNote end.") + } // ---------------------------------------------------------------------------- // MsgNotifierPrivate::showNotification @@ -363,4 +379,11 @@ wsSession.Close(); return showNotification; } +// ---------------------------------------------------------------------------- +// MsgNotifierPrivate::PartialDeleteConversationList +// @see mcsconversationclientchangeobserver.h +// ---------------------------------------------------------------------------- +void MsgNotifierPrivate::PartialDeleteConversationList( + const CCsClientConversation& aClientConversation){/*empty implementation*/} + //EOF