messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp
changeset 43 35b64624a9e7
parent 34 84197e66a4bd
child 44 36f374c67aa8
--- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp	Fri Jun 11 13:35:48 2010 +0300
+++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp	Wed Jun 23 18:09:17 2010 +0300
@@ -27,11 +27,12 @@
 #include <apgtask.h> 
 #include <XQSettingsManager>
 #include <xqpublishandsubscribeutils.h>
+#include <xqsystemtoneservice.h>
 
 //USER INCLUDES
 #include "msgnotifier.h"
 #include "msgnotifier_p.h"
-#include "s60qconversions.h"
+#include <xqconversions.h>
 #include "msgstorehandler.h"
 #include "msginfodefs.h"
 #include "conversationidpsconsts.h"
@@ -80,6 +81,12 @@
         delete mSettingsManager;
         }
     
+    if(mSts)
+        {
+        delete mSts;
+        mSts = NULL;
+        }
+    
     QDEBUG_WRITE("MsgNotifierPrivate::~MsgNotifierPrivate : Exit")
 }
 
@@ -115,6 +122,8 @@
     QDEBUG_WRITE_FORMAT("MsgNotifierPrivate::initL "
                            "writing ret value",success)
     
+    mSts = new XQSystemToneService();
+    
     QDEBUG_WRITE("MsgNotifierPrivate::initL : Exit")
 }
 
@@ -205,17 +214,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 ))