201039_03 PDK_4.0.a
authorhgs
Tue, 05 Oct 2010 13:58:47 +0530
changeset 73 ecf6a73a9186
parent 68 e8a69c93c830
child 76 60a8a215b0ec
201039_03
messagingapp/msgappfw/plugins/previewplugin/src/ccspreviewpluginhandler.cpp
messagingapp/msgnotifications/msgnotificationdialogplugin/inc/msgnotificationdialogwidget.h
messagingapp/msgnotifications/msgnotificationdialogplugin/msgnotificationdialogplugin.pro
messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogplugin.cpp
messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp
messagingapp/msgnotifications/msgnotifier/inc/msgnotifier.h
messagingapp/msgnotifications/msgnotifier/src/msgnotifier.cpp
messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp
messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h
messagingapp/msgservices/msgserviceapp/inc/msgservicewindow.h
messagingapp/msgservices/msgserviceapp/inc/msgstorehandler.h
messagingapp/msgservices/msgserviceapp/service_conf.xml
messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp
messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp
messagingapp/msgservices/msgserviceapp/src/msgstorehandler.cpp
messagingapp/msgsettings/settingsview/src/mmssettingsprivate.cpp
messagingapp/msgui/bwins/msguiutilsu.def
messagingapp/msgui/conversationview/inc/msgeditorwidget.h
messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp
messagingapp/msgui/conversationview/src/msgconversationview.cpp
messagingapp/msgui/conversationview/src/msgeditorwidget.cpp
messagingapp/msgui/eabi/msguiutilsu.def
messagingapp/msgui/inc/msgaudiofetcherdialog.h
messagingapp/msgui/msgapp/inc/msgactivityhandler.h
messagingapp/msgui/msgapp/inc/msgmainwindow.h
messagingapp/msgui/msgapp/src/main.cpp
messagingapp/msgui/msgapp/src/msgactivityhandler.cpp
messagingapp/msgui/msgapp/src/msgmainwindow.cpp
messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetchermodel.h
messagingapp/msgui/msgaudiofetcher/inc/msgaudiopreview.h
messagingapp/msgui/msgaudiofetcher/inc/msgaudioselectionengine.h
messagingapp/msgui/msgaudiofetcher/tsrc/tsrc.pri
messagingapp/msgui/msgaudiofetcher/tsrc/tsrc.pro
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/inc/unittest_msgaudiofetcherdialog.h
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/src/unittest_msgaudiofetcherdialog.cpp
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/unittest_msgaudiofetcherdialog.pro
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/unittest_msgaudiofetcherdialog.qrc
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/inc/unittest_msgaudiofetchermodel.h
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/DRM_AMR.dcf
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/DRM_DM.dm
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/Desk.rng
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/Esp.rng
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/drm.amr
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/nondrm.amr
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/src/unittest_msgaudiofetchermodel.cpp
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/unittest_msgaudiofetchermodel.pro
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/unittest_msgaudiofetchermodel.qrc
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiopreview/inc/unittest_msgaudiopreview.h
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiopreview/src/unittest_msgaudiopreview.cpp
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiopreview/unittest_msgaudiopreview.pro
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudioselectionengine/inc/unittest_msgaudioselectionengine.h
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudioselectionengine/src/unittest_msgaudioselectionengine.cpp
messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudioselectionengine/unittest_msgaudioselectionengine.pro
messagingapp/msgui/msguiutils/inc/mmsconformancecheck.h
messagingapp/msgui/msguiutils/inc/msgcontactsutil.h
messagingapp/msgui/msguiutils/inc/msgmediautil.h
messagingapp/msgui/msguiutils/inc/msgsendutil.h
messagingapp/msgui/msguiutils/inc/msgservicelaunchutil.h
messagingapp/msgui/msguiutils/inc/msgservicelaunchutilprivate.h
messagingapp/msgui/msguiutils/msguiutils.pro
messagingapp/msgui/msguiutils/src/msgcontactsutil.cpp
messagingapp/msgui/msguiutils/src/msgservicelaunchutil.cpp
messagingapp/msgui/msguiutils/src/msgservicelaunchutilprivate.cpp
messagingapp/msgui/unifiededitor/src/msgunieditoraddress.cpp
messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp
messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h
messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h
messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h
messagingapp/msgui/unifiedviewer/inc/univiewerutils.h
messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp
messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp
messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp
messagingapp/msgui/unifiedviewer/src/univiewerutils.cpp
messagingapp/msgui/unifiedviewer/unifiedviewer.pro
messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin_p.cpp
messagingapp/shareui/rom/shareuiresources.iby
messagingapp/shareui/shareui.pro
messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp
mmsengine/conf/mmsengine.confml
--- a/messagingapp/msgappfw/plugins/previewplugin/src/ccspreviewpluginhandler.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgappfw/plugins/previewplugin/src/ccspreviewpluginhandler.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -353,20 +353,20 @@
     iMmsMtm->SwitchCurrentEntryL(msgId);
     iMmsMtm->LoadMessageL();
 
-    CUniDataModel* iUniDataModel = CUniDataModel::NewL(ifsSession, *iMmsMtm);
-    CleanupStack::PushL(iUniDataModel);
-    iUniDataModel->RestoreL(*this, ETrue);
+    CUniDataModel* uniDataModel = CUniDataModel::NewL(ifsSession, *iMmsMtm);
+    CleanupStack::PushL(uniDataModel);
+    uniDataModel->RestoreL(*this, ETrue);
     
     //msg property
     TInt msgProperty = 0;
-    if (iUniDataModel->AttachmentList().Count() > 0)
+    if (uniDataModel->AttachmentList().Count() > 0)
         {
         msgProperty |= EPreviewAttachment;
         }
 
     //check for msg forward
     //Validate if the mms msg can be forwarded or not
-    if (ValidateMsgForForward(iUniDataModel))
+    if (ValidateMsgForForward(uniDataModel))
         {
         msgProperty |= EPreviewForward;
         }
@@ -375,7 +375,7 @@
     TPtrC imagePath;
 
     // preview parsing
-    TInt slideCount = iUniDataModel->SmilModel().SlideCount();
+    TInt slideCount = uniDataModel->SmilModel().SlideCount();
     TBool isBodyTextSet = EFalse;
     TBool isImageSet = EFalse;
     TBool isAudioSet = EFalse;
@@ -383,10 +383,10 @@
 
     for (int i = 0; i < slideCount; i++)
         {
-        int slideobjcount = iUniDataModel->SmilModel().SlideObjectCount(i);
+        int slideobjcount = uniDataModel->SmilModel().SlideObjectCount(i);
         for (int j = 0; j < slideobjcount; j++)
             {
-            CUniObject *obj = iUniDataModel->SmilModel(). GetObjectByIndex(i,
+            CUniObject *obj = uniDataModel->SmilModel(). GetObjectByIndex(i,
                     j);
             CMsgMediaInfo *mediaInfo = obj->MediaInfo();
 
--- a/messagingapp/msgnotifications/msgnotificationdialogplugin/inc/msgnotificationdialogwidget.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotificationdialogplugin/inc/msgnotificationdialogwidget.h	Tue Oct 05 13:58:47 2010 +0530
@@ -20,59 +20,10 @@
 
 #include <QObject>
 #include <QVariantMap>
-#include <QRunnable>
 #include <hbdevicedialoginterface.h>
 #include <hbdevicedialog.h>
 #include <hbnotificationdialog.h>
 
-
-/**
- * Class for sending service request
- */
-class ServiceRequestSenderTask :public QObject,public QRunnable
-{
-    Q_OBJECT
-    
-public:
-    /**
-     * Constructor
-     */
-    ServiceRequestSenderTask(qint64 conversationId);
-    
-    /**
-     * Destructor
-     */
-    ~ServiceRequestSenderTask();
-     
-    /**
-     * create and send service request
-     */
-     void run();
-
-private slots:
-
-    /**
-     * Slot invoked after Conversation view is launched.
-     */
-     void onRequestCompleted(const QVariant& value);
-     
-    /**
-     * Slot invoked if error occurred during launch of CV.
-     */
-     void onRequestError(int errorCode, const QString& errorMessage);
-          
-signals:
-
-	/**
-	* Signal is emitted to indicate that Notification Dialog 
-	* can now be closed.
-	*/
-     void serviceRequestCompleted();
-     
-private: 
-     qint64 mConvId;
-};
-
 /**
  * Message notification widget class. 
  * Widget shown for the new message notifications. 
@@ -90,6 +41,11 @@
      * @param parameters variant map list
      */
     MsgNotificationDialogWidget(const QVariantMap &parameters);
+    
+    /** 
+     * Destructor 
+     */
+    ~MsgNotificationDialogWidget();
 
     /**
      * @see HbDeviceDialogInterface
@@ -160,20 +116,20 @@
 private:
     Q_DISABLE_COPY(MsgNotificationDialogWidget)
 
-     /**
+    /**
+      * Current conversation id.
+      */
+    qint64 mConversationId;
+     
+    /**
       * Hold the last error 
       */
      int mLastError;
-    
+
      /**
       * Show event has come or not
       */
-     bool mShowEventReceived;
-    
-     /**
-      * Current conversation id.
-      */
-     qint64 mConversationId;
+     bool mShowEventReceived;     
 };
 
 #endif // MSGNOTIFICATIONDIALOGWIDGET_P_H
--- a/messagingapp/msgnotifications/msgnotificationdialogplugin/msgnotificationdialogplugin.pro	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotificationdialogplugin/msgnotificationdialogplugin.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -44,8 +44,6 @@
 BLD_INF_RULES.prj_exports += \
   "$${LITERAL_HASH}include <platform_paths.hrh>" \
   "rom/msgnotificationdialogplugin.iby             CORE_APP_LAYER_IBY_EXPORT_PATH(msgnotificationdialogplugin.iby)"
-  
-LIBS += -lxqservice
 
 
 symbian:MMP_RULES += SMPSAFE
--- a/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogplugin.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogplugin.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -32,6 +32,7 @@
 // Constants
 const int NoError = 0;
 
+
 // ----------------------------------------------------------------------------
 // MsgNotificationDialogPlugin::MsgNotificationDialogPlugin
 // @see msgnotificationdialogplugin.h
@@ -46,6 +47,7 @@
 // ----------------------------------------------------------------------------
 MsgNotificationDialogPlugin::~MsgNotificationDialogPlugin()
 {
+ 
 }
 
 // ----------------------------------------------------------------------------
--- a/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -14,8 +14,6 @@
  * Description: Widget class for Notificaiton Dialog Plugin
  *
  */
-#include <QThreadPool>
-#include <QRunnable>
 #include "debugtraces.h"
 
 #include <ccsdefs.h>
@@ -24,9 +22,7 @@
 #include <QList>
 #include <hbicon.h>
 #include <hbpopup.h>
-#include <xqservicerequest.h>
-#include <xqaiwrequest.h>
-#include <xqappmgr.h>
+
 
 #include "convergedmessage.h"
 
@@ -38,69 +34,6 @@
 
 static const char NEW_MSG_ICON[] = "qtg_large_new_message";
 
-bool serviceTaskLaunched = false; 
-
-// ----------------------------------------------------------------------------
-// ServiceRequestSenderTask::ServiceRequestSenderTask
-// @see msgnotificationdialogwidget.h
-// ----------------------------------------------------------------------------   
-ServiceRequestSenderTask::ServiceRequestSenderTask(qint64 conversationId):
-mConvId(conversationId)
-     {     
-     }
-
-// ----------------------------------------------------------------------------
-// ServiceRequestSenderTask::~ServiceRequestSenderTask
-// @see msgnotificationdialogwidget.h
-// ----------------------------------------------------------------------------   
-ServiceRequestSenderTask::~ServiceRequestSenderTask()
-     {     
-     }
-     
-// ----------------------------------------------------------------------------
-// ServiceRequestSenderTask::run
-// @see msgnotificationdialogwidget.h
-// ----------------------------------------------------------------------------   
-void ServiceRequestSenderTask::run()
-     {
-     QList<QVariant> args;
-     QString serviceName("com.nokia.services.hbserviceprovider");
-     QString operation("open(qint64)");
-     XQAiwRequest* request;
-     XQApplicationManager appManager;
-     request = appManager.create(serviceName, "conversationview", operation, false); // not embedded
-     if ( request == NULL )
-         {
-         return;       
-         }
-     connect(request,SIGNAL(requestOk(const QVariant&)),
-             this,SLOT(onRequestCompleted(const QVariant&)));
-     
-     connect(request,SIGNAL(requestError(int, const QString&)),
-             this,SLOT(onRequestError(int, const QString&)));
-     
-     args << QVariant(mConvId);
-     request->setArguments(args);
-     request->setSynchronous(true);
-     request->send();
-     delete request;
-     }
-
-void ServiceRequestSenderTask::onRequestCompleted(const QVariant& value)
-    {
-	Q_UNUSED(value);
-    serviceTaskLaunched = false;
-    emit serviceRequestCompleted();
-    }
-
-void ServiceRequestSenderTask::onRequestError(int errorCode, const QString& errorMessage)
-    {
-    Q_UNUSED(errorCode);
-    Q_UNUSED(errorMessage);
-    serviceTaskLaunched = false;
-    emit serviceRequestCompleted();
-    }
-
 // ----------------------------------------------------------------------------
 // MsgNotificationDialogWidget::MsgNotificationDialogWidget
 // @see msgnotificationdialogwidget.h
@@ -108,14 +41,21 @@
 MsgNotificationDialogWidget::MsgNotificationDialogWidget(
                                                 const QVariantMap &parameters)
 : HbNotificationDialog(),
+mConversationId(-1),
 mLastError(NoError),
-mShowEventReceived(false),
-mConversationId(-1)
+mShowEventReceived(false)
 {
     constructDialog(parameters);
 }
 
-                                                
+// ----------------------------------------------------------------------------
+// MsgNotificationDialogWidget::~MsgNotificationDialogWidget
+// @see msgnotificationdialogwidget.h
+// ----------------------------------------------------------------------------                                                
+MsgNotificationDialogWidget::~MsgNotificationDialogWidget()
+{
+}
+
 // ----------------------------------------------------------------------------
 // MsgNotificationDialogWidget::setDeviceDialogParameters
 // @see msgnotificationdialogwidget.h
@@ -194,14 +134,11 @@
     Q_UNUSED(byClient);
     close();
 
-    if (serviceTaskLaunched == false)
+    // If show event has been received, close is signalled from hide event. If not,
+    // hide event does not come and close is signalled from here.
+    if (!mShowEventReceived)
         {
-        // If show event has been received, close is signalled from hide event. If not,
-        // hide event does not come and close is signalled from here.
-        if (!mShowEventReceived)
-            {
-            emit deviceDialogClosed();
-            }
+        emit deviceDialogClosed();
         }
 }
 
@@ -223,10 +160,7 @@
 void MsgNotificationDialogWidget::hideEvent(QHideEvent *event)
 {
     HbNotificationDialog::hideEvent(event);
-    if (serviceTaskLaunched == false)
-        {
-        emit deviceDialogClosed();
-        }
+    emit deviceDialogClosed();
 }
 
 // ----------------------------------------------------------------------------
@@ -245,14 +179,11 @@
 // ----------------------------------------------------------------------------
 void MsgNotificationDialogWidget::widgetActivated()
 {           
-    ServiceRequestSenderTask* task = 
-            new ServiceRequestSenderTask(mConversationId);
-    connect(task,SIGNAL(serviceRequestCompleted()),
-            this,SIGNAL(deviceDialogClosed()));
-    serviceTaskLaunched = true;
-    QThreadPool::globalInstance()->start(task);
-    enableTouchActivation(false);
-    
+    //Emit data to be used by msgnotifier
+    QVariantMap data;
+    data.insert(KConversationIdKey,mConversationId);
+    emit deviceDialogData(data);
+    enableTouchActivation(false);    
 }
 
 // ----------------------------------------------------------------------------
--- a/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier.h	Tue Oct 05 13:58:47 2010 +0530
@@ -23,12 +23,14 @@
 #include <QObject>
 #include <QString>
 #include <QQueue>
+#include <QVariantMap>
 #include "msginfodefs.h"
 
 // CLASS DECLARATION
 class MsgNotifierPrivate;
 class MsgSimNumDetector;
 class MsgErrorWatcher;
+class HbDeviceDialog;
 
 /**
  * Stores the data required for notification.
@@ -117,6 +119,15 @@
      */
     void updateOutboxIndications(MsgInfo& indicatorData);
 
+private slots:
+
+    /**
+     * handleDataReceived
+     * Handler for data recevied signal from HbDeviceDialog
+     * @param data 
+     */
+    void handleDataReceived(QVariantMap data);
+
 private:
     
     /**
@@ -144,6 +155,12 @@
      * Own
      */
    MsgErrorWatcher* mErrorWatcher;
+   
+   /**
+    * Pointer to HbDeviceDialog
+    * Own
+    */
+   HbDeviceDialog* mDeviceDialog;
 };
 
 #endif // MSGNOTIFIER_H
--- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -20,6 +20,9 @@
 #include <hbdevicedialog.h>
 #include <hbindicator.h>
 #include <qfileinfo.h>
+#include <xqservicerequest.h>
+#include <xqaiwrequest.h>
+#include <xqappmgr.h>
 
 //USER INCLUDES
 #include "msgnotifier.h"
@@ -52,7 +55,7 @@
 // @see MsgNotifier.h
 // ----------------------------------------------------------------------------
 MsgNotifier::MsgNotifier(QObject* parent) :
-    QObject(parent)
+    QObject(parent),mDeviceDialog(NULL)
 {
     QDEBUG_WRITE("MsgNotifier::MsgNotifier : Enter")
 
@@ -75,6 +78,7 @@
     delete d_ptr;
     delete mSimHandler;
 	delete mErrorWatcher;
+	delete mDeviceDialog;
 
     QDEBUG_WRITE("MsgNotifier::~MsgNotifier : Enter")
 }
@@ -138,9 +142,15 @@
     notificationData[QString(KMessageSubjectKey)] = description;
     notificationData[QString(KContactAddressKey)] = data.mContactNum;
 
-    // call device dialog to show notification
-    HbDeviceDialog deviceDialog ;
-    deviceDialog.show(NotificationPluginId,notificationData);
+    if(mDeviceDialog == NULL)
+        {
+        // call device dialog to show notification
+        mDeviceDialog = new HbDeviceDialog;
+        connect(mDeviceDialog,SIGNAL(dataReceived(QVariantMap)),
+                this,SLOT(handleDataReceived(QVariantMap)));        
+        }
+    
+    mDeviceDialog->show(NotificationPluginId,notificationData);    
     
     QDEBUG_WRITE("MsgNotifier::displayNewMessageNotification : Exit")
     }
@@ -206,4 +216,36 @@
     QDEBUG_WRITE("MsgNotifier::updateOutboxIndications  Exit")
 }
 
+// ----------------------------------------------------------------------------
+// MsgNotifier::handleDataReceived
+// @see MsgNotifier.h
+// ----------------------------------------------------------------------------
+void MsgNotifier::handleDataReceived(QVariantMap data)
+    {
+    qint64 conversationId = data.value(KConversationIdKey).toLongLong(); 
+
+    QList<QVariant> args;
+    QString serviceName("com.nokia.services.hbserviceprovider");
+    QString operation("open(qint64)");
+    XQAiwRequest* request;
+    XQApplicationManager appManager;
+    request = appManager.create(serviceName, "conversationview", 
+            operation, false); // not embedded
+    if ( request == NULL )
+        {
+        return;       
+        }
+    connect(request,SIGNAL(requestOk(const QVariant&)),
+            this,SLOT(onRequestCompleted(const QVariant&)));
+
+    connect(request,SIGNAL(requestError(int, const QString&)),
+            this,SLOT(onRequestError(int, const QString&)));
+
+    args << QVariant(conversationId);
+    request->setArguments(args);
+    request->setSynchronous(false);
+    request->send();
+    delete request;    
+    }
+
 //EOF
--- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -371,38 +371,42 @@
 // ----------------------------------------------------------------------------
 bool MsgNotifierPrivate::showNotification(int receivedMsgConvId)
 {
-    bool showNotification = true;
+    bool showNotification = false;
     
     RWsSession wsSession ;
-    wsSession.Connect();
+    int err = wsSession.Connect();
 
-    TApaTaskList taskList( wsSession );
-    TApaTask task = taskList.FindApp(KMsgAppUid); // find msgapp is running
-
-    if(task.Exists())
+    if ( KErrNone == err )
         {
-        TApaTask foregndtask =   taskList.FindByPos(0) ;  // foreground app
-        // compare  window group id  
-        // if application is in foregorund, then check the currently
-        // opened conversation is same as received one.
-        if(task.WgId() == foregndtask.WgId() )
+        showNotification = true;
+        TApaTaskList taskList(wsSession);
+        TApaTask task = taskList.FindApp(KMsgAppUid); // find msgapp is running
+
+        if (task.Exists())
             {
-            // get the current conversation ID
-            XQPublishAndSubscribeSettingsKey convIdKey( KMsgCVIdProperty, 
-                    KMsgCVIdKey);
-            QVariant value = mSettingsManager->readItemValue(convIdKey, 
-                    XQSettingsManager::TypeInt);
+            TApaTask foregndtask = taskList.FindByPos(0); // foreground app
+            // compare  window group id  
+            // if application is in foregorund, then check the currently
+            // opened conversation is same as received one.
+            if (task.WgId() == foregndtask.WgId())
+                {
+                // get the current conversation ID
+                XQPublishAndSubscribeSettingsKey convIdKey(KMsgCVIdProperty,
+                        KMsgCVIdKey);
+                QVariant value = mSettingsManager->readItemValue(convIdKey,
+                        XQSettingsManager::TypeInt);
 
-            int openedConvId  = value.toInt();
-            if( openedConvId == receivedMsgConvId)
-                {
-                showNotification = false;
-                QDEBUG_WRITE("processListEntry : Notification not shown")
+                int openedConvId = value.toInt();
+                if (openedConvId == receivedMsgConvId)
+                    {
+                    showNotification = false;
+                    QDEBUG_WRITE("processListEntry : Notification not shown")
+                    }
                 }
             }
+
+        wsSession.Close();
         }
-
-    wsSession.Close();
     return showNotification;
 }
 // ----------------------------------------------------------------------------
--- a/messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h	Tue Oct 05 13:58:47 2010 +0530
@@ -102,6 +102,11 @@
      * @return true if key event handled else false.
      */
     bool handleKeyEvent(int key);
+    
+    /**
+     * Save editor contents to drafts
+     */
+    void saveContentToDraft();
 
 private:
     /*
--- a/messagingapp/msgservices/msgserviceapp/inc/msgservicewindow.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/inc/msgservicewindow.h	Tue Oct 05 13:58:47 2010 +0530
@@ -42,6 +42,13 @@
      * Destructor
      */
     ~MsgServiceWindow();
+
+private slots:
+
+    /**
+     * Calls activity handler save drafts contents
+     */
+    void saveDraftContents(); 
     
 protected:
 
--- a/messagingapp/msgservices/msgserviceapp/inc/msgstorehandler.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/inc/msgstorehandler.h	Tue Oct 05 13:58:47 2010 +0530
@@ -95,6 +95,18 @@
     int setNotificationMessageId(int msgId);
 
     /**
+     * Seeker method for getting sender information
+     * @return QString, sender address
+     */
+    QString notificationSender();
+
+    /**
+     * Seeker method for getting notification time-stamp
+     * @return formatted string of notification time-stamp
+     */
+    QString notificationTimeStamp();
+
+    /**
      * Seeker method for getting mms notification's subject line
      * @return QString, subject of mms notification
      */
--- a/messagingapp/msgservices/msgserviceapp/service_conf.xml	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/service_conf.xml	Tue Oct 05 13:58:47 2010 +0530
@@ -17,7 +17,7 @@
      <customproperty key="aiw_action_text_file">messaging</customproperty>
      <customproperty key="aiw_action_text">txt_share_dblist_message</customproperty>
      <customproperty key="aiw_action_icon">qtg_large_message</customproperty>
-     <customproperty key="blocked_mime_types">video/*</customproperty>
+     <customproperty key="allowed_mime_types">audio/amr,audio/x-amr,audio/sp-midi,image/gif,image/jpeg,image/jpg,image/png,image/vnd.wap.wbmp,text/calendar,text/plain,text/x-vCalendar,text/x-vCard,video/3gpp</customproperty>     
   </interface>
   <interface>
       <name>com.nokia.symbian.IMessageSend</name>
--- a/messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -30,6 +30,7 @@
 
 #include <xqserviceutil.h>
 #include <xqappmgr.h>
+#include <xqaiwdecl.h>
 
 #include "msgunieditorview.h"
 #include "unifiedviewer.h"
@@ -39,18 +40,16 @@
 #include "ringbc.h"
 #include "unidatamodelloader.h"
 #include "unidatamodelplugininterface.h"
-#include "msgcontacthandler.h"
 
 // CONSTANTS
 static const char SEND_EFFECT[] = "sendeffect";
 static const char SEND_EFFECT_FILE[] = ":/effects/sendeffect.fxml";
 
 // LOCALIZATION
-#define LOC_DELETE_MESSAGE hbTrId("txt_messaging_dialog_delete_message")
-// TODO: LOC
-#define LOC_DELETED_MESSAGE "Message is deleted"
-#define LOC_CANNOT_OPEN_MESSAGE "Message in outbox. Cannot be opened"
-#define LOC_UNKNOWN_MSG_TYPE "Unknown Message Type"
+#define LOC_DELETED_MESSAGE hbTrId("txt_messages_dialog_message_has_been_deleted")
+#define LOC_CANNOT_OPEN_MESSAGE hbTrId("txt_messages_dialog_message_is_outgoingcannot_be")
+#define LOC_UNKNOWN_MSG_TYPE hbTrId("txt_messages_dialog_unsupported_message_type")
+#define LOC_SAVE_RINGTONE hbTrId("txt_conversations_dialog_save_ringing_tone")
 
 //----------------------------------------------------------------------------
 // MsgViewInterface::MsgViewInterface
@@ -465,13 +464,25 @@
 }
 
 // ----------------------------------------------------------------------------
+// MsgServiceViewManager::saveContentToDraft
+// @see header
+// ----------------------------------------------------------------------------
+void MsgServiceViewManager::saveContentToDraft()
+{
+    if(mUniEditor)
+    {
+      mUniEditor->saveContentToDrafts();
+    }
+}
+
+// ----------------------------------------------------------------------------
 // MsgServiceViewManager::handleDraftMsg
 // @see header
 // ----------------------------------------------------------------------------
 void MsgServiceViewManager::handleDraftMsg(int msgId, int msgType)
 {
     // show the splash-screen
-    // TODO: This causes cancellation of view switching effects
+    // Note: This causes cancellation of view switching effects
 //    HbSplashScreen::start();
     connect(mMainWindow, SIGNAL(viewReady()), this, SLOT(showOnViewReady()));
     mCurrentView = MsgBaseView::UNIEDITOR;
@@ -529,18 +540,6 @@
     }
     delete pluginLoader;
 
-    // Get vCard display name
-    QString displayName = MsgContactHandler::getVCardDisplayName(filepath);
-    // TODO: use displayname to create a localized string to show in dialog
-    QString loc_str = QString("Save to contacts: ").append(displayName);
-    bool viewVCard = HbDeviceMessageBox::question(loc_str,
-                         HbMessageBox::Ok|HbMessageBox::Cancel);
-    if(!viewVCard)
-    {
-        HbApplication::quit();
-        return;
-    }
-
     // copy private-vCard file to public location for contacts access
     QDir tempDir;
     QString sharedFilePath(QDir::toNativeSeparators(tempDir.tempPath()));
@@ -550,13 +549,10 @@
     QFile::copy(filepath, sharedFilePath);
 
     // Launch vCard viewer service
-    QString service("phonebookservices");
-    QString interface("com.nokia.symbian.IContactsEdit");
-    QString operation("editCreateNewFromVCard(QString)");
     XQApplicationManager appManager;
-    // embedded launch
-    XQAiwRequest* request = 
-            appManager.create(service, interface, operation, true);
+    XQAiwRequest* request = appManager.create(XQI_CONTACTS_EDIT,
+                                XQOP_CONTACTS_EDIT_CREATE_NEW_VCARD, 
+                                true); //embedded
     if(request)
     {
         QList<QVariant> args;
@@ -579,7 +575,7 @@
 void MsgServiceViewManager::handleSmsMmsMsg(int msgId)
 {
     // show the splash-screen
-    // TODO: This causes cancellation of view switching effects
+    // Note: This causes cancellation of view switching effects
 //    HbSplashScreen::start();
     connect(mMainWindow, SIGNAL(viewReady()), this, SLOT(showOnViewReady()));
     mCurrentView = MsgBaseView::UNIVIEWER;
@@ -612,24 +608,57 @@
     }
 
     // notification state e.g. waiting, retrieving etc
+    QString displayTxt;
     QString statusStr;
     int status;
     mStoreHandler->notificationStatus(status, statusStr);
-
-    QString displayTxt;
-    displayTxt.append(mStoreHandler->notificationSubject());
-    displayTxt.append(QChar::LineSeparator);
-    displayTxt.append(mStoreHandler->notificationMsgSize());
-    displayTxt.append(QChar::LineSeparator);
-    displayTxt.append(mStoreHandler->notificationClass());
-    displayTxt.append(QChar::LineSeparator);
-    displayTxt.append(mStoreHandler->notificationExpiryDate());
     if(!statusStr.isEmpty())
     {
-        displayTxt.append(QChar::LineSeparator);
-        displayTxt.append(statusStr);
-    }    
-    HbDeviceMessageBox::information(displayTxt);
+        displayTxt.append(statusStr).append(QChar::LineSeparator);
+    }
+    
+    QString sender = mStoreHandler->notificationSender();
+    if(!sender.isEmpty())
+    {
+        displayTxt.append(sender).append(QChar::LineSeparator);
+    }
+    
+    QString timestamp = mStoreHandler->notificationTimeStamp();
+    if(!timestamp.isEmpty())
+    {
+        displayTxt.append(timestamp).append(QChar::LineSeparator);
+    }
+
+    QString subject = mStoreHandler->notificationSubject();
+    if(!subject.isEmpty())
+    {
+        displayTxt.append(subject).append(QChar::LineSeparator);
+    }
+
+    QString msgSize = mStoreHandler->notificationMsgSize();
+    if(!msgSize.isEmpty())
+    {
+        displayTxt.append(msgSize).append(QChar::LineSeparator);
+    }
+
+    QString msgClass = mStoreHandler->notificationClass();
+    if(!msgClass.isEmpty())
+    {
+        displayTxt.append(msgClass).append(QChar::LineSeparator);
+    }
+
+    QString exprDate = mStoreHandler->notificationExpiryDate();
+    if(!exprDate.isEmpty())
+    {
+        displayTxt.append(exprDate);
+    }
+
+    HbDeviceMessageBox msgbox;
+    msgbox.setText(displayTxt);
+    msgbox.setDismissPolicy(HbPopup::NoDismiss);
+    msgbox.setTimeout(HbPopup::NoTimeout);
+    msgbox.exec();
+    msgbox.close();
     HbApplication::quit();
 }
 
@@ -686,8 +715,7 @@
 
     RingBc* ringBc = new RingBc();
     QString filename = ringBc->toneTitle(filepath);
-    // TODO: use filename to create a localized string to show in dialog
-    QString loc_str = QString("Save ringtone? ").append(filename);
+    QString loc_str = LOC_SAVE_RINGTONE.arg(filename);
     bool save = HbDeviceMessageBox::question(loc_str,
                     HbMessageBox::Save | HbMessageBox::Cancel);
     if(save)
--- a/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -14,7 +14,7 @@
  * Description: Message services manages all messaging Qt highway services. 
  *
  */
-
+#include <hbapplication.h>
 #include "msgservicewindow.h"
 
 #include "msgviewinterface.h"
@@ -56,6 +56,10 @@
     mViewInterface = new MsgViewInterface(mViewManager);
     mUriInterface = new MsgUriHandlerInterface(mViewManager);
     mShareUiInterface = new MsgShareUiInterface(mViewManager);
+    
+    // connect to aboutToQuit signal to save drafts content
+    QObject::connect(qApp, SIGNAL(aboutToQuit()), 
+                this, SLOT(saveDraftContents()));
     }
 
 // ----------------------------------------------------------------------------
@@ -112,4 +116,13 @@
     }
 
 }
+
+//---------------------------------------------------------------
+// MsgServiceWindow::saveActivity
+// @see header
+//---------------------------------------------------------------
+void MsgServiceWindow::saveDraftContents()
+{
+    mViewManager->saveContentToDraft();
+}
 // EOF
--- a/messagingapp/msgservices/msgserviceapp/src/msgstorehandler.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/src/msgstorehandler.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -24,28 +24,33 @@
 #include <mmssettings.h>
 #include <xqconversions.h> // from xqutils
 #include <mmsconst.h>
+#include <HbExtendedLocale>
 #include <QDateTime>
 #include <hbglobal.h>
 
 #include "msgstorehandler.h"
 #include "msgbiouids.h"
 #include "convergedmessage.h"
+#include "msgcontacthandler.h"
 
 // CONSTANTS
 _LIT(KUnixEpoch, "19700000:000000.000000");
 #define BYTES_TO_KBYTES_FACTOR 1024
 
+// @see hbi18ndef.h
+static const char DATE_FORMAT[] = r_qtn_date_short_with_zero;
+static const char TIME_FORMAT[] = r_qtn_time_usual_with_zero;
+
 // LOCALIZATION
-// TODO : use dialog localizations
-#define LOC_MESSAGE_SIZE hbTrId("txt_messaging_list_size")
-#define LOC_CLASS_ADVERTISEMENT hbTrId("txt_messaging_list_advertisement")
-#define LOC_CLASS_INFORMATIONAL hbTrId("txt_messaging_list_informational")
-#define LOC_CLASS_PERSONAL hbTrId("txt_messaging_list_personal")
+#define LOC_MESSAGE_SIZE hbTrId("txt_messages_dialog_size")
+#define LOC_CLASS_ADVERTISEMENT hbTrId("txt_messages_dialog_class_advertisement")
+#define LOC_CLASS_INFORMATIONAL hbTrId("txt_messages_dialog_class_informational")
+#define LOC_CLASS_PERSONAL hbTrId("txt_messages_dialog_class_personal")
 #define LOC_MMS_RETRIEVAL_FAILED hbTrId("txt_messaging_dialog_mms_retrieval_failed")
 #define LOC_MMS_NOTIF_EXPIRED hbTrId("txt_messaging_list_message_expired")  
-#define LOC_MMS_WAITING hbTrId("txt_wireframe_list_multimedia_message_waiting")
+#define LOC_MMS_WAITING hbTrId("txt_messages_dialog_multimedia_message_waiting")
 #define LOC_MMS_RETRIEVING hbTrId("txt_messaging_list_retrieving_message")   
-#define LOC_MMS_EXPIRY_DATE hbTrId("txt_messaging_list_expiry_date")
+#define LOC_MMS_EXPIRY_DATE hbTrId("txt_messages_dialog_expiry_date")
 
 //----------------------------------------------------------------------------
 // MsgStoreHandler::MsgStoreHandler
@@ -449,6 +454,67 @@
             &&  !( aEntry.iMtmData2 & KMmsOperationOngoing ) );
     }
 
+// ---------------------------------------------------------
+// MsgStoreHandler::notificationSender
+// @see header
+// ---------------------------------------------------------
+QString MsgStoreHandler::notificationSender()
+{
+    QString retVal;
+    QString sender;
+    if(iNotificationClient)
+    {
+        TPtrC sndr = iNotificationClient->Sender();
+        sender = XQConversions::s60DescToQString(sndr);
+    }
+    
+    QString displayName;
+    int count;
+    if(-1 != MsgContactHandler::resolveContactDisplayName(
+            sender, displayName, count))
+    {
+        retVal = QString("%1(%2)").arg(displayName).arg(sender);
+    }
+    else
+    {
+        retVal = sender;
+    }
+
+    return retVal;
+}
+
+//---------------------------------------------------------------
+// MsgStoreHandler::notificationTimeStamp
+// @see header
+//---------------------------------------------------------------
+QString MsgStoreHandler::notificationTimeStamp()
+{
+    // Null Check
+    if(!iNotificationClient)
+    {
+        return QString();
+    }
+
+    TMsvEntry entry = iNotificationClient->Entry().Entry();
+    TTime unixEpoch(KUnixEpoch);
+    TTimeIntervalSeconds seconds;
+    TTime timeStamp(entry.iDate.Int64());
+    timeStamp.SecondsFrom(unixEpoch, seconds);
+    
+    QDateTime dateTime;
+    dateTime.setTime_t(seconds.Int());
+    HbExtendedLocale locale = HbExtendedLocale::system();
+
+    QString timeStampStr;
+    if (dateTime.date() == QDateTime::currentDateTime().date()) {
+        timeStampStr = locale.format(dateTime.time(), TIME_FORMAT);
+    }
+    else {
+        timeStampStr = locale.format(dateTime.date(), DATE_FORMAT);
+    }
+    return timeStampStr;
+}
+
 //---------------------------------------------------------------
 // MsgStoreHandler::notificationSubject
 // @see header
--- a/messagingapp/msgsettings/settingsview/src/mmssettingsprivate.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgsettings/settingsview/src/mmssettingsprivate.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -34,7 +34,7 @@
 /**
  * Message Server session event handler 
  */
-class CEventHandler : public MMsvSessionObserver
+class CEventHandler : public CBase, public MMsvSessionObserver
 {
 public:
     void HandleSessionEvent(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2,
@@ -95,8 +95,8 @@
     CEventHandler* pObserver = new (ELeave) CEventHandler();
     CleanupStack::PushL(pObserver);
 
-    CMsvSession* iMsvSession = CMsvSession::OpenSyncL(*pObserver);
-    CleanupStack::PushL(iMsvSession);
+    CMsvSession* msvSession = CMsvSession::OpenSyncL(*pObserver);
+    CleanupStack::PushL( msvSession);
 
     CMmsSettings* mmsSetting = CMmsSettings::NewL();
     CleanupStack::PushL(mmsSetting);
@@ -105,7 +105,7 @@
 
     TMsvId entryToBeKilled = KMsvNullIndexEntryId;
     // Get access to root index
-    CMsvEntry* cEntry = iMsvSession->GetEntryL(KMsvRootIndexEntryId);
+    CMsvEntry* cEntry = msvSession->GetEntryL(KMsvRootIndexEntryId);
     CleanupStack::PushL(cEntry);
 
     entryToBeKilled = mmsSetting->Service();
@@ -114,7 +114,7 @@
                                                ETrue));
     if (entryToBeKilled == KMsvNullIndexEntryId)
     {
-        mmsSetting->CreateNewServiceL(*iMsvSession);
+        mmsSetting->CreateNewServiceL(*msvSession);
     }
 
     CleanupStack::PopAndDestroy(); // cEntry          
--- a/messagingapp/msgui/bwins/msguiutilsu.def	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/bwins/msguiutilsu.def	Tue Oct 05 13:58:47 2010 +0530
@@ -1,47 +1,64 @@
 EXPORTS
 	?checkEmailOverSms@MsgSendUtil@@AAE_NAAVConvergedMessage@@AA_N@Z @ 1 NONAME ; bool MsgSendUtil::checkEmailOverSms(class ConvergedMessage &, bool &)
 	?deleteVCardFromTemp@MsgContactsUtil@@CAXABVQString@@@Z @ 2 NONAME ; void MsgContactsUtil::deleteVCardFromTemp(class QString const &)
-	??1MmsConformanceCheck@@UAE@XZ @ 3 NONAME ; MmsConformanceCheck::~MmsConformanceCheck(void)
-	?mediaDurationL@MsgMediaUtil@@AAEHABVTDesC16@@@Z @ 4 NONAME ; int MsgMediaUtil::mediaDurationL(class TDesC16 const &)
-	??0MsgMediaUtil@@QAE@XZ @ 5 NONAME ; MsgMediaUtil::MsgMediaUtil(void)
-	?trUtf8@MmsConformanceCheck@@SA?AVQString@@PBD0@Z @ 6 NONAME ; class QString MmsConformanceCheck::trUtf8(char const *, char const *)
-	?qt_metacast@MsgSendUtil@@UAEPAXPBD@Z @ 7 NONAME ; void * MsgSendUtil::qt_metacast(char const *)
-	?validateService@MsgSendUtil@@AAE_NPAVUniEditorPluginInterface@@_N@Z @ 8 NONAME ; bool MsgSendUtil::validateService(class UniEditorPluginInterface *, bool)
-	?showPopup@MmsConformanceCheck@@AAEXABVQString@@@Z @ 9 NONAME ; void MmsConformanceCheck::showPopup(class QString const &)
-	??0MsgSendUtil@@QAE@PAVQObject@@@Z @ 10 NONAME ; MsgSendUtil::MsgSendUtil(class QObject *)
-	?metaObject@MsgSendUtil@@UBEPBUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const * MsgSendUtil::metaObject(void) const
-	?longestEmailAddressSize@MsgSendUtil@@AAEHV?$QList@PAVConvergedMessageAddress@@@@@Z @ 12 NONAME ; int MsgSendUtil::longestEmailAddressSize(class QList<class ConvergedMessageAddress *>)
-	?getStaticMetaObject@MmsConformanceCheck@@SAABUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const & MmsConformanceCheck::getStaticMetaObject(void)
-	??_EMsgSendUtil@@UAE@I@Z @ 14 NONAME ; MsgSendUtil::~MsgSendUtil(unsigned int)
-	?staticMetaObject@MsgSendUtil@@2UQMetaObject@@B @ 15 NONAME ; struct QMetaObject const MsgSendUtil::staticMetaObject
-	??0MmsConformanceCheck@@QAE@XZ @ 16 NONAME ; MmsConformanceCheck::MmsConformanceCheck(void)
-	?metaObject@MmsConformanceCheck@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * MmsConformanceCheck::metaObject(void) const
-	?trUtf8@MsgSendUtil@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString MsgSendUtil::trUtf8(char const *, char const *)
-	?getStaticMetaObject@MsgSendUtil@@SAABUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const & MsgSendUtil::getStaticMetaObject(void)
-	?qt_metacall@MmsConformanceCheck@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int MmsConformanceCheck::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?getSmsMsgSize@MsgSendUtil@@AAEHAAVConvergedMessage@@@Z @ 21 NONAME ; int MsgSendUtil::getSmsMsgSize(class ConvergedMessage &)
-	?tr@MsgSendUtil@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString MsgSendUtil::tr(char const *, char const *, int)
-	?validateMsgForForward@MmsConformanceCheck@@QAE_NH@Z @ 23 NONAME ; bool MmsConformanceCheck::validateMsgForForward(int)
-	?checkMaxMsgSizeLimit@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 24 NONAME ; bool MsgSendUtil::checkMaxMsgSizeLimit(class ConvergedMessage &)
-	?trUtf8@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString MmsConformanceCheck::trUtf8(char const *, char const *, int)
-	?tr@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *, int)
-	??1MsgMediaUtil@@QAE@XZ @ 27 NONAME ; MsgMediaUtil::~MsgMediaUtil(void)
-	?send@MsgSendUtil@@QAEHAAVConvergedMessage@@@Z @ 28 NONAME ; int MsgSendUtil::send(class ConvergedMessage &)
-	?trUtf8@MsgSendUtil@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString MsgSendUtil::trUtf8(char const *, char const *, int)
-	?checkMaxRecipientCount@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 30 NONAME ; bool MsgSendUtil::checkMaxRecipientCount(class ConvergedMessage &)
-	?isValidAddress@MsgSendUtil@@QAE_NABVQString@@@Z @ 31 NONAME ; bool MsgSendUtil::isValidAddress(class QString const &)
-	?copyVCardToTemp@MsgContactsUtil@@CA?AVQString@@ABV2@@Z @ 32 NONAME ; class QString MsgContactsUtil::copyVCardToTemp(class QString const &)
-	?getMmsMsgSize@MsgSendUtil@@AAEHAAVConvergedMessage@@@Z @ 33 NONAME ; int MsgSendUtil::getMmsMsgSize(class ConvergedMessage &)
-	?onDialogInsertMedia@MmsConformanceCheck@@AAEXPAVHbAction@@@Z @ 34 NONAME ; void MmsConformanceCheck::onDialogInsertMedia(class HbAction *)
-	?checkModeForInsert@MmsConformanceCheck@@QAEHABVQString@@_N@Z @ 35 NONAME ; int MmsConformanceCheck::checkModeForInsert(class QString const &, bool)
-	?qt_metacast@MmsConformanceCheck@@UAEPAXPBD@Z @ 36 NONAME ; void * MmsConformanceCheck::qt_metacast(char const *)
-	?tr@MmsConformanceCheck@@SA?AVQString@@PBD0@Z @ 37 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *)
-	?staticMetaObject@MmsConformanceCheck@@2UQMetaObject@@B @ 38 NONAME ; struct QMetaObject const MmsConformanceCheck::staticMetaObject
-	?tr@MsgSendUtil@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString MsgSendUtil::tr(char const *, char const *)
-	?saveToDrafts@MsgSendUtil@@QAEJAAVConvergedMessage@@@Z @ 40 NONAME ; long MsgSendUtil::saveToDrafts(class ConvergedMessage &)
-	?launchVCardViewer@MsgContactsUtil@@SA_NABVQString@@@Z @ 41 NONAME ; bool MsgContactsUtil::launchVCardViewer(class QString const &)
-	?mediaDuration@MsgMediaUtil@@QAE?AVQString@@ABV2@@Z @ 42 NONAME ; class QString MsgMediaUtil::mediaDuration(class QString const &)
-	??_EMmsConformanceCheck@@UAE@I@Z @ 43 NONAME ; MmsConformanceCheck::~MmsConformanceCheck(unsigned int)
-	??1MsgSendUtil@@UAE@XZ @ 44 NONAME ; MsgSendUtil::~MsgSendUtil(void)
-	?qt_metacall@MsgSendUtil@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 45 NONAME ; int MsgSendUtil::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?staticMetaObject@MsgServiceLaunchUtil@@2UQMetaObject@@B @ 3 NONAME ; struct QMetaObject const MsgServiceLaunchUtil::staticMetaObject
+	??1MmsConformanceCheck@@UAE@XZ @ 4 NONAME ; MmsConformanceCheck::~MmsConformanceCheck(void)
+	?metaObject@MsgServiceLaunchUtil@@UBEPBUQMetaObject@@XZ @ 5 NONAME ; struct QMetaObject const * MsgServiceLaunchUtil::metaObject(void) const
+	?mediaDurationL@MsgMediaUtil@@AAEHABVTDesC16@@@Z @ 6 NONAME ; int MsgMediaUtil::mediaDurationL(class TDesC16 const &)
+	??0MsgMediaUtil@@QAE@XZ @ 7 NONAME ; MsgMediaUtil::MsgMediaUtil(void)
+	?trUtf8@MmsConformanceCheck@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString MmsConformanceCheck::trUtf8(char const *, char const *)
+	?qt_metacast@MsgSendUtil@@UAEPAXPBD@Z @ 9 NONAME ; void * MsgSendUtil::qt_metacast(char const *)
+	?validateService@MsgSendUtil@@AAE_NPAVUniEditorPluginInterface@@_N@Z @ 10 NONAME ; bool MsgSendUtil::validateService(class UniEditorPluginInterface *, bool)
+	?showPopup@MmsConformanceCheck@@AAEXABVQString@@@Z @ 11 NONAME ; void MmsConformanceCheck::showPopup(class QString const &)
+	??0MsgSendUtil@@QAE@PAVQObject@@@Z @ 12 NONAME ; MsgSendUtil::MsgSendUtil(class QObject *)
+	?metaObject@MsgSendUtil@@UBEPBUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const * MsgSendUtil::metaObject(void) const
+	?longestEmailAddressSize@MsgSendUtil@@AAEHV?$QList@PAVConvergedMessageAddress@@@@@Z @ 14 NONAME ; int MsgSendUtil::longestEmailAddressSize(class QList<class ConvergedMessageAddress *>)
+	?getStaticMetaObject@MmsConformanceCheck@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & MmsConformanceCheck::getStaticMetaObject(void)
+	??_EMsgSendUtil@@UAE@I@Z @ 16 NONAME ; MsgSendUtil::~MsgSendUtil(unsigned int)
+	?staticMetaObject@MsgSendUtil@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const MsgSendUtil::staticMetaObject
+	??0MmsConformanceCheck@@QAE@XZ @ 18 NONAME ; MmsConformanceCheck::MmsConformanceCheck(void)
+	?metaObject@MmsConformanceCheck@@UBEPBUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const * MmsConformanceCheck::metaObject(void) const
+	?trUtf8@MsgSendUtil@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString MsgSendUtil::trUtf8(char const *, char const *)
+	?qt_metacall@MmsConformanceCheck@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 21 NONAME ; int MmsConformanceCheck::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?handleError@MsgServiceLaunchUtil@@AAEXHABVQString@@@Z @ 22 NONAME ; void MsgServiceLaunchUtil::handleError(int, class QString const &)
+	?getStaticMetaObject@MsgSendUtil@@SAABUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const & MsgSendUtil::getStaticMetaObject(void)
+	?getSmsMsgSize@MsgSendUtil@@AAEHAAVConvergedMessage@@@Z @ 24 NONAME ; int MsgSendUtil::getSmsMsgSize(class ConvergedMessage &)
+	?tr@MsgServiceLaunchUtil@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString MsgServiceLaunchUtil::tr(char const *, char const *, int)
+	??_EMsgServiceLaunchUtil@@UAE@I@Z @ 26 NONAME ; MsgServiceLaunchUtil::~MsgServiceLaunchUtil(unsigned int)
+	??0MsgServiceLaunchUtil@@QAE@PAVQObject@@@Z @ 27 NONAME ; MsgServiceLaunchUtil::MsgServiceLaunchUtil(class QObject *)
+	?tr@MsgSendUtil@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString MsgSendUtil::tr(char const *, char const *, int)
+	?validateMsgForForward@MmsConformanceCheck@@QAE_NH@Z @ 29 NONAME ; bool MmsConformanceCheck::validateMsgForForward(int)
+	?checkMaxMsgSizeLimit@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 30 NONAME ; bool MsgSendUtil::checkMaxMsgSizeLimit(class ConvergedMessage &)
+	?trUtf8@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 31 NONAME ; class QString MmsConformanceCheck::trUtf8(char const *, char const *, int)
+	?tr@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *, int)
+	??1MsgMediaUtil@@QAE@XZ @ 33 NONAME ; MsgMediaUtil::~MsgMediaUtil(void)
+	?send@MsgSendUtil@@QAEHAAVConvergedMessage@@@Z @ 34 NONAME ; int MsgSendUtil::send(class ConvergedMessage &)
+	?trUtf8@MsgServiceLaunchUtil@@SA?AVQString@@PBD0H@Z @ 35 NONAME ; class QString MsgServiceLaunchUtil::trUtf8(char const *, char const *, int)
+	?trUtf8@MsgSendUtil@@SA?AVQString@@PBD0H@Z @ 36 NONAME ; class QString MsgSendUtil::trUtf8(char const *, char const *, int)
+	?launchViaSharableFile@MsgServiceLaunchUtil@@AAEXABVQString@@@Z @ 37 NONAME ; void MsgServiceLaunchUtil::launchViaSharableFile(class QString const &)
+	?isValidAddress@MsgSendUtil@@QAE_NABVQString@@@Z @ 38 NONAME ; bool MsgSendUtil::isValidAddress(class QString const &)
+	?checkMaxRecipientCount@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 39 NONAME ; bool MsgSendUtil::checkMaxRecipientCount(class ConvergedMessage &)
+	?qt_metacast@MsgServiceLaunchUtil@@UAEPAXPBD@Z @ 40 NONAME ; void * MsgServiceLaunchUtil::qt_metacast(char const *)
+	?copyVCardToTemp@MsgContactsUtil@@CA?AVQString@@ABV2@@Z @ 41 NONAME ; class QString MsgContactsUtil::copyVCardToTemp(class QString const &)
+	?getMmsMsgSize@MsgSendUtil@@AAEHAAVConvergedMessage@@@Z @ 42 NONAME ; int MsgSendUtil::getMmsMsgSize(class ConvergedMessage &)
+	?onDialogInsertMedia@MmsConformanceCheck@@AAEXPAVHbAction@@@Z @ 43 NONAME ; void MmsConformanceCheck::onDialogInsertMedia(class HbAction *)
+	?checkModeForInsert@MmsConformanceCheck@@QAEHABVQString@@_N@Z @ 44 NONAME ; int MmsConformanceCheck::checkModeForInsert(class QString const &, bool)
+	?qt_metacast@MmsConformanceCheck@@UAEPAXPBD@Z @ 45 NONAME ; void * MmsConformanceCheck::qt_metacast(char const *)
+	?handleOk@MsgServiceLaunchUtil@@AAEXABVQVariant@@@Z @ 46 NONAME ; void MsgServiceLaunchUtil::handleOk(class QVariant const &)
+	?launchContentViewer@MsgServiceLaunchUtil@@QAEXABVQString@@0@Z @ 47 NONAME ; void MsgServiceLaunchUtil::launchContentViewer(class QString const &, class QString const &)
+	?trUtf8@MsgServiceLaunchUtil@@SA?AVQString@@PBD0@Z @ 48 NONAME ; class QString MsgServiceLaunchUtil::trUtf8(char const *, char const *)
+	?tr@MsgServiceLaunchUtil@@SA?AVQString@@PBD0@Z @ 49 NONAME ; class QString MsgServiceLaunchUtil::tr(char const *, char const *)
+	?tr@MmsConformanceCheck@@SA?AVQString@@PBD0@Z @ 50 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *)
+	?getStaticMetaObject@MsgServiceLaunchUtil@@SAABUQMetaObject@@XZ @ 51 NONAME ; struct QMetaObject const & MsgServiceLaunchUtil::getStaticMetaObject(void)
+	?staticMetaObject@MmsConformanceCheck@@2UQMetaObject@@B @ 52 NONAME ; struct QMetaObject const MmsConformanceCheck::staticMetaObject
+	?tr@MsgSendUtil@@SA?AVQString@@PBD0@Z @ 53 NONAME ; class QString MsgSendUtil::tr(char const *, char const *)
+	?saveToDrafts@MsgSendUtil@@QAEJAAVConvergedMessage@@@Z @ 54 NONAME ; long MsgSendUtil::saveToDrafts(class ConvergedMessage &)
+	?launchVCardViewer@MsgContactsUtil@@SA_NABVQString@@@Z @ 55 NONAME ; bool MsgContactsUtil::launchVCardViewer(class QString const &)
+	??1MsgServiceLaunchUtil@@UAE@XZ @ 56 NONAME ; MsgServiceLaunchUtil::~MsgServiceLaunchUtil(void)
+	??_EMmsConformanceCheck@@UAE@I@Z @ 57 NONAME ; MmsConformanceCheck::~MmsConformanceCheck(unsigned int)
+	?mediaDuration@MsgMediaUtil@@QAE?AVQString@@ABV2@@Z @ 58 NONAME ; class QString MsgMediaUtil::mediaDuration(class QString const &)
+	?qt_metacall@MsgServiceLaunchUtil@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 59 NONAME ; int MsgServiceLaunchUtil::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??1MsgSendUtil@@UAE@XZ @ 60 NONAME ; MsgSendUtil::~MsgSendUtil(void)
+	?qt_metacall@MsgSendUtil@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 61 NONAME ; int MsgSendUtil::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?launchContentViewer@MsgServiceLaunchUtil@@QAEXH@Z @ 62 NONAME ; void MsgServiceLaunchUtil::launchContentViewer(int)
 
--- a/messagingapp/msgui/conversationview/inc/msgeditorwidget.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/conversationview/inc/msgeditorwidget.h	Tue Oct 05 13:58:47 2010 +0530
@@ -53,7 +53,8 @@
      * reimplemented from base class.
      */
     void focusInEvent(QFocusEvent *event);    
-    void focusOutEvent(QFocusEvent * event);
+    void focusOutEvent(QFocusEvent *event);
+    void inputMethodEvent(QInputMethodEvent *event);
     
 signals:  
     /**
--- a/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -36,6 +36,7 @@
 #include <QTimer>
 
 #include <ccsdefs.h>
+#include <debugtraces.h>
 
 // USER INCLUDES
 #include "conversationsenginedefines.h"
@@ -50,6 +51,8 @@
 const QString BG_FRAME_NORMAL("qtg_fr_groupbox_normal");
 const QString BG_FRAME_PRESSED("qtg_fr_groupbox_pressed");
 
+static const char PLUS[] = "+";
+
 // LOCALIZATION CONSTANTS
 #define LOC_RECEIVED_FILES hbTrId("txt_messaging_title_received_files")
 #define LOC_MENU_CONTACT_INFO hbTrId("txt_messaging_menu_contact_info")
@@ -141,11 +144,58 @@
 //---------------------------------------------------------------
 ConvergedMessageAddressList MsgContactCardWidget::address()
 {
+    QCRITICAL_WRITE("MsgContactCardWidget::address start.")
     ConvergedMessageAddressList addresses;
     QStandardItemModel* msgModel = ConversationsEngine::instance()->getConversationsModel();
+    
     const int rowCnt = msgModel->rowCount();
-    QModelIndex index = msgModel->index(rowCnt-1, 0);
-    QString addr = index.data(ConversationAddress).toString();
+    
+    QModelIndex recentIndex = msgModel->index(rowCnt-1, 0);
+    QString recentAddr = recentIndex.data(ConversationAddress).toString();
+    
+    
+    QModelIndexList indexList = msgModel->match(msgModel->index(0, 0), SendingState,
+        ConvergedMessage::SentState, -1, Qt::MatchExactly);
+
+    QString addr;
+    
+    bool found = false;
+    if(indexList.count() > 0)
+    {
+        QCRITICAL_WRITE("MsgContactCardWidget::address indexList.")
+        for (int i = indexList.count()-1; i >= 0; --i) 
+        {
+            addr = indexList[i].data(ConversationAddress).toString();
+            if (addr.length() >= recentAddr.length() && addr.endsWith(recentAddr)) 
+            {
+              QCRITICAL_WRITE("MsgContactCardWidget::address inside for indexList.")
+			  found = true; 
+              break;
+            }
+        }
+        
+    }
+    else 
+    {   
+        QCRITICAL_WRITE("MsgContactCardWidget::address inside else of indexList.")
+        for(int i=rowCnt-1; i>=0;--i)
+            {
+            QModelIndex index = msgModel->index(i, 0);
+            addr = index.data(ConversationAddress).toString();
+            if(addr.startsWith(PLUS) && addr.length() >= recentAddr.length() && addr.endsWith(recentAddr))
+                {
+                found = true; 
+                break;
+                }
+            }
+           
+    }
+    
+    if (!found) 
+    {
+        addr = recentAddr;
+    }
+    
     ConvergedMessageAddress* address = new ConvergedMessageAddress(addr);
     // resolve contact
     QString displayname;
@@ -157,6 +207,7 @@
         address->setAlias(displayname);
     }
     addresses.append(address);
+    QCRITICAL_WRITE("MsgContactCardWidget::address end.")
     return addresses;
 }
 
--- a/messagingapp/msgui/conversationview/src/msgconversationview.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgconversationview.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -60,9 +60,12 @@
 #include "unieditorpluginloader.h"
 #include "unieditorplugininterface.h"
 #include "msgaudiofetcherdialog.h"
+#include "msgservicelaunchutil.h"
+
+// LOCALIZATION
+#define LOC_TITLE hbTrId("txt_messaging_title_messaging")
 
 //Item specific menu.
-
 #define LOC_COMMON_OPEN hbTrId("txt_common_menu_open")
 #define LOC_COMMON_DELETE hbTrId("txt_common_menu_delete")
 #define LOC_COMMON_FORWARD hbTrId("txt_common_menu_forward")
@@ -246,11 +249,16 @@
     if (INVALID_CONVID != convId) {
         mContactCardWidget->updateContents();
         if (KBluetoothMsgsConversationId == convId || !(mContactCardWidget->isValidAddress())) {
+            this->menu()->clearActions();
             mMainLayout->removeItem(mEditorWidget);
             mEditorWidget->hide();
             mEditorWidget->setParent(this);
         }
         else {
+            HbMenu *mainMenu = this->menu();
+            if(mainMenu->isEmpty()) {
+               mainMenu->addAction(QString());
+            }
             mMainLayout->addItem(mEditorWidget);
             mEditorWidget->show();
         }
@@ -536,6 +544,9 @@
     if(!action)
         return;
 
+    QList<QVariant> args;
+    args << LOC_TITLE;
+
     QString service("phonebookservices");
     QString interface("com.nokia.symbian.IContactsFetch");
     QString operation("multiFetch(QString,QString)");
@@ -551,22 +562,20 @@
     
     if( VCARD_INSERTION_MODE == mode) //vcard-insert mode
     {
+        args << KCntActionAll;
         connect(request, SIGNAL(requestOk(const QVariant&)),
             this, SLOT(contactsFetchedForVCards(const QVariant&)));      
     }
     else  //contact-insert mode
     {
+        args << KCntActionSms;
         connect(request, SIGNAL(requestOk(const QVariant&)),
             this, SLOT(contactsFetched(const QVariant&)));
     }
     connect (request, SIGNAL(requestError(int,const QString&)), 
         this, SLOT(serviceRequestError(int,const QString&)));
 
-    QList<QVariant> args;
-    args << QString(tr("Phonebook")); 
-    args << KCntActionAll;
     args << KCntFilterDisplayAll;
-
     request->setArguments(args);
     request->send();
     delete request;
@@ -836,24 +845,12 @@
 {
     qint32 messageId = index.data(ConvergedMsgId).toLongLong();
 
-    QList<QVariant> args;
-    QString serviceName("com.nokia.services.btmsgdispservices");
-    QString operation("displaymsg(int)");
-    XQAiwRequest* request;
-    XQApplicationManager appManager;
-    request = appManager.create(serviceName, "displaymsg", operation, false); // embedded
+    // launch using msgservicelaunchutils
     
-    if ( request == NULL )
-        {
-        return;
-        }
-
-    args << QVariant(messageId);
-    request->setSynchronous(true);
-    request->setEmbedded(true);
-    request->setArguments(args);
-    request->send();
-    delete request;    
+    MsgServiceLaunchUtil serviceLaunchUtil;
+    
+    serviceLaunchUtil.launchContentViewer(messageId);
+   
 }
 
 //---------------------------------------------------------------
@@ -866,26 +863,22 @@
     HbMenu *mainMenu = this->menu();
     mainMenu->clearActions();
 
-    // Message type specific menu items
-    QModelIndex index = ConversationsEngine::instance()->getConversationsModel()->index(0, 0);
-    if (ConvergedMessage::BT != index.data(MessageType).toInt())
-    {
-        // Attach sub-menu
-        HbMenu *attachSubMenu = mainMenu->addMenu(LOC_ATTACH);
-        
-        attachSubMenu->addAction(LOC_PHOTO,this, SLOT(fetchImages()));
-        attachSubMenu->addAction(LOC_SOUND,this, SLOT(fetchAudio()));
-		
-        HbAction* addVCard = attachSubMenu->addAction(LOC_VCARD);
-        addVCard->setData(VCARD_INSERTION_MODE);        
-        connect(addVCard, SIGNAL(triggered()),this,SLOT(fetchContacts()));
+    // Attach sub-menu
+    HbMenu *attachSubMenu = mainMenu->addMenu(LOC_ATTACH);
+    
+    attachSubMenu->addAction(LOC_PHOTO,this, SLOT(fetchImages()));
+    attachSubMenu->addAction(LOC_SOUND,this, SLOT(fetchAudio()));
+    
+    HbAction* addVCard = attachSubMenu->addAction(LOC_VCARD);
+    addVCard->setData(VCARD_INSERTION_MODE);        
+    connect(addVCard, SIGNAL(triggered()),this,SLOT(fetchContacts()));
 
-        HbAction *addRecipients = mainMenu->addAction(LOC_ADD_RECIPIENTS);
-        addRecipients->setData(CONTACT_INSERTION_MODE);        
-        connect(addRecipients, SIGNAL(triggered()), this, SLOT(fetchContacts()));
+    HbAction *addRecipients = mainMenu->addAction(LOC_ADD_RECIPIENTS);
+    addRecipients->setData(CONTACT_INSERTION_MODE);        
+    connect(addRecipients, SIGNAL(triggered()), this, SLOT(fetchContacts()));
 
-        mainMenu->addAction(LOC_ADD_SUBJECT,this, SLOT(addSubject()));
-    }
+    mainMenu->addAction(LOC_ADD_SUBJECT,this, SLOT(addSubject()));
+
 }
 
 //---------------------------------------------------------------
@@ -1046,9 +1039,12 @@
         message.setBodyText(mEditorWidget->content());
 
         // add address from contact-card to to-field
+        ConvergedMessageAddressList addresses;
+        addresses = mContactCardWidget->address();
+        
         ConvergedMessageAddress address;
-        address.setAlias(mContactCardWidget->address().at(0)->alias());
-        address.setAddress(mContactCardWidget->address().at(0)->address());
+        address.setAlias(addresses.at(0)->alias());
+        address.setAddress(addresses.at(0)->address());
         message.addToRecipient(address);
 
         if(editorOperation == MsgBaseView::ADD_PHOTO ||
@@ -1508,10 +1504,14 @@
 
     ConvergedMessage message;
     message.setBodyText(mEditorWidget->content());
-    // add address from contact-card to to-field
+   
+    // add address from contact-card to to-field    
+    ConvergedMessageAddressList addresses;
+    addresses = mContactCardWidget->address();
+    
     ConvergedMessageAddress address;
-    address.setAlias(mContactCardWidget->address().at(0)->alias());
-    address.setAddress(mContactCardWidget->address().at(0)->address());
+    address.setAlias(addresses.at(0)->alias());
+    address.setAddress(addresses.at(0)->address());
     message.addToRecipient(address);
     
     //add the attachment as selected from audio picker
--- a/messagingapp/msgui/conversationview/src/msgeditorwidget.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgeditorwidget.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -401,6 +401,19 @@
     }
 
 //---------------------------------------------------------------
+// MsgEditor::inputMethodEvent
+// @see header
+//---------------------------------------------------------------
+void MsgEditor::inputMethodEvent(QInputMethodEvent *event)
+{
+    /*
+     * HbLineEdit is replacing '\n' chars hence
+     * calling base class handler.
+     */
+    HbAbstractEdit::inputMethodEvent(event);
+}
+
+//---------------------------------------------------------------
 // MsgEditor::onSmsCharLimitReached
 // @see header
 //---------------------------------------------------------------
--- a/messagingapp/msgui/eabi/msguiutilsu.def	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/eabi/msguiutilsu.def	Tue Oct 05 13:58:47 2010 +0530
@@ -40,10 +40,27 @@
 	_ZN19MmsConformanceCheckD0Ev @ 39 NONAME
 	_ZN19MmsConformanceCheckD1Ev @ 40 NONAME
 	_ZN19MmsConformanceCheckD2Ev @ 41 NONAME
-	_ZNK11MsgSendUtil10metaObjectEv @ 42 NONAME
-	_ZNK19MmsConformanceCheck10metaObjectEv @ 43 NONAME
-	_ZTI11MsgSendUtil @ 44 NONAME
-	_ZTI19MmsConformanceCheck @ 45 NONAME
-	_ZTV11MsgSendUtil @ 46 NONAME
-	_ZTV19MmsConformanceCheck @ 47 NONAME
+	_ZN20MsgServiceLaunchUtil11handleErrorEiRK7QString @ 42 NONAME
+	_ZN20MsgServiceLaunchUtil11qt_metacallEN11QMetaObject4CallEiPPv @ 43 NONAME
+	_ZN20MsgServiceLaunchUtil11qt_metacastEPKc @ 44 NONAME
+	_ZN20MsgServiceLaunchUtil16staticMetaObjectE @ 45 NONAME DATA 16
+	_ZN20MsgServiceLaunchUtil19getStaticMetaObjectEv @ 46 NONAME
+	_ZN20MsgServiceLaunchUtil19launchContentViewerERK7QStringS2_ @ 47 NONAME
+	_ZN20MsgServiceLaunchUtil19launchContentViewerEi @ 48 NONAME
+	_ZN20MsgServiceLaunchUtil21launchViaSharableFileERK7QString @ 49 NONAME
+	_ZN20MsgServiceLaunchUtil8handleOkERK8QVariant @ 50 NONAME
+	_ZN20MsgServiceLaunchUtilC1EP7QObject @ 51 NONAME
+	_ZN20MsgServiceLaunchUtilC2EP7QObject @ 52 NONAME
+	_ZN20MsgServiceLaunchUtilD0Ev @ 53 NONAME
+	_ZN20MsgServiceLaunchUtilD1Ev @ 54 NONAME
+	_ZN20MsgServiceLaunchUtilD2Ev @ 55 NONAME
+	_ZNK11MsgSendUtil10metaObjectEv @ 56 NONAME
+	_ZNK19MmsConformanceCheck10metaObjectEv @ 57 NONAME
+	_ZNK20MsgServiceLaunchUtil10metaObjectEv @ 58 NONAME
+	_ZTI11MsgSendUtil @ 59 NONAME
+	_ZTI19MmsConformanceCheck @ 60 NONAME
+	_ZTI20MsgServiceLaunchUtil @ 61 NONAME
+	_ZTV11MsgSendUtil @ 62 NONAME
+	_ZTV19MmsConformanceCheck @ 63 NONAME
+	_ZTV20MsgServiceLaunchUtil @ 64 NONAME
 
--- a/messagingapp/msgui/inc/msgaudiofetcherdialog.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/inc/msgaudiofetcherdialog.h	Tue Oct 05 13:58:47 2010 +0530
@@ -19,10 +19,14 @@
 #ifndef MSGAUDIOFETCHERDIALOG_H
 #define MSGAUDIOFETCHERDIALOG_H
 
-#ifdef BUILD_MSGAUDIOFETCHER_DLL
-#define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_EXPORT
+#ifdef AUDIO_FETCHER_UNIT_TEST
+ #define MSGAUDIOFETCHER_DLL_EXPORT
 #else
-#define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_IMPORT
+ #ifdef  BUILD_MSGAUDIOFETCHER_DLL
+  #define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_EXPORT
+ #else
+  #define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_IMPORT
+ #endif
 #endif
 
 // SYSTEM INCLUDES
@@ -138,6 +142,12 @@
      * This to enable the left action in dialog
      */
     bool mSelected;
+#ifdef AUDIO_FETCHER_UNIT_TEST
+    /**
+     * Unit Testing
+     */
+    friend class TestMsgAudioFetcherDialog;
+#endif
 };
 
 #endif /* MSGAUDIOFETCHERVIEW_H */
--- a/messagingapp/msgui/msgapp/inc/msgactivityhandler.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgapp/inc/msgactivityhandler.h	Tue Oct 05 13:58:47 2010 +0530
@@ -68,6 +68,11 @@
      */
     int parseActivityData(const QVariant &activityData);
     
+    /**
+     * This return the Af activity storage instance 
+     */
+    AfActivityStorage*  activitiyStorage();
+    
 private:
     /**
      * main window reference not owned.
--- a/messagingapp/msgui/msgapp/inc/msgmainwindow.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgapp/inc/msgmainwindow.h	Tue Oct 05 13:58:47 2010 +0530
@@ -40,8 +40,7 @@
     /**
      * Constructor
      */
-    MsgMainWindow(bool serviceRequest, 
-                  int activityMsgId = -1,
+    MsgMainWindow(bool serviceRequest,
                    QWidget *parent = 0);
 
     /**
@@ -53,7 +52,7 @@
      * Returns view manager.
      */
     MsgViewManager* viewManager();
-
+    
 protected:
 
     /**
@@ -61,7 +60,13 @@
      * @see QGraphicsItem
      */
     void keyPressEvent(QKeyEvent *event);
-
+    
+private:
+    /**
+     * This initializes the member objects
+     */
+    void initialize(bool serviceRequest);
+    
 private:
     MsgServiceInterface* mMsgSI;
     MsgSendServiceInterface* mMsgSendSI;
--- a/messagingapp/msgui/msgapp/src/main.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgapp/src/main.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -25,7 +25,6 @@
 #include <HbSplashScreen>
 
 #include "msgmainwindow.h"
-#include "msgactivityhandler.h"
 #include "msgapplication.h"
 
 //Localised constants
@@ -124,29 +123,10 @@
     qInstallMsgHandler(debugInit);
 #endif
     
-   
-    
-     MsgActivityHandler* activityHandler = new MsgActivityHandler(&app);
-     // connect to aboutToQuit signal to save activity
-     QObject::connect(&app, SIGNAL(aboutToQuit()), 
-                      activityHandler, SLOT(saveActivity()));
-     
-    int activityMsgId = INVALID_MSGID;
-    if(app.activateReason() == Hb::ActivationReasonActivity) {
-          // restoring an activity, not a fresh startup or a service
-          QVariant data = app.activateData();
-          activityMsgId = activityHandler->parseActivityData(data);
-          // set service request to false , since its a activity launch
-          serviceRequest = false; 
-        }
-    // clear the old activities
-     activityHandler->clearActivities();
-     
     // Main window
-    QPointer<MsgMainWindow> mainWindow = new MsgMainWindow(serviceRequest,activityMsgId);
-    app.initViewReady();
-    // Set the main window pointer to activity handler.
-    activityHandler->setMainWindow(mainWindow);
+    QPointer<MsgMainWindow> mainWindow = 
+            new MsgMainWindow(serviceRequest);
+    app.initViewReady();    
     mainWindow->show();
 
     // Event loop
--- a/messagingapp/msgui/msgapp/src/msgactivityhandler.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgapp/src/msgactivityhandler.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -128,3 +128,12 @@
 {
     mMainWindow = mainWindow;
 }
+
+//-----------------------------------------------------------------------------
+// MsgActivityHandler::activitiyStorage
+// @see header
+//-----------------------------------------------------------------------------
+AfActivityStorage*  MsgActivityHandler::activitiyStorage()
+{
+    return mActivityStorage;
+}
--- a/messagingapp/msgui/msgapp/src/msgmainwindow.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgapp/src/msgmainwindow.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -22,24 +22,68 @@
 #include "msgserviceinterface.h"
 #include "msgsendserviceinterface.h"
 #include "conversationsengine.h"
+#include "msgactivityhandler.h"
 
+#include <hbapplication.h>
 #include <QKeyEvent>
+#include <afactivation.h>
+#include <afactivitystorage.h>
 
+const int INVALID_MSGID = -1;
+
+//---------------------------------------------------------------
+// MsgMainWindow::MsgMainWindow
+// Constructor
+//---------------------------------------------------------------
+MsgMainWindow::MsgMainWindow(bool serviceRequest, QWidget *parent) :
+HbMainWindow(parent), mMsgSI(0), mMsgSendSI(0)
+{
+    initialize(serviceRequest);    
+}
 
 //---------------------------------------------------------------
 // MsgMainWindow::MsgMainWindow
 // Constructor
 //---------------------------------------------------------------
-MsgMainWindow::MsgMainWindow(bool serviceRequest,int activityMsgId,QWidget *parent) :
-HbMainWindow(parent), mMsgSI(0), mMsgSendSI(0)
+void MsgMainWindow::initialize(bool serviceRequest)
 {
+    int activityMsgId = INVALID_MSGID;
+    
+    MsgActivityHandler* activityHandler = 
+            new MsgActivityHandler(this);
+        
+    AfActivation *activation = new AfActivation( this );
+    
+    Af::ActivationReason reason = activation->reason();      
+    
+    if (reason == Af::ActivationReasonActivity) 
+        {
+        // set service request to false , since its a activity launch
+        serviceRequest = false;
+        
+        QString actName = activation->name();
+                
+        QVariant data = activityHandler->activitiyStorage()->activityData(actName);        
+        
+        activityMsgId = activityHandler->parseActivityData(data);
+        }
+    
     mViewManager = new MsgViewManager(serviceRequest,this,this,activityMsgId);
     mMsgSI = new MsgServiceInterface(NULL,mViewManager);
     mMsgSendSI = new MsgSendServiceInterface(NULL,mViewManager);
-        
+            
     //Model creation
     ConversationsEngine::instance();
     
+    // clear the old activities
+    activityHandler->clearActivities();
+    
+    // Set the main window pointer to activity handler.
+    activityHandler->setMainWindow(this); 
+    
+    // connect to aboutToQuit signal to save drafts content
+    QObject::connect(qApp, SIGNAL(aboutToQuit()), 
+            activityHandler, SLOT(saveActivity()));
 }
 
 //---------------------------------------------------------------
@@ -90,4 +134,5 @@
     }
 
 }
+
 // End of file
--- a/messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetchermodel.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetchermodel.h	Tue Oct 05 13:58:47 2010 +0530
@@ -122,6 +122,13 @@
      * audio selection engine
      */
     MsgAudioSelectionEngine* mSelectionEngine;
+#ifdef AUDIO_FETCHER_UNIT_TEST
+    /**
+     * Unit Testing
+     */
+    friend class TestMsgAudioFetcherModel;
+#endif
+    
 };
 
 #endif /* MsgAudioFetcherModel_H_ */
--- a/messagingapp/msgui/msgaudiofetcher/inc/msgaudiopreview.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudiopreview.h	Tue Oct 05 13:58:47 2010 +0530
@@ -205,6 +205,12 @@
 
     // plugin for playing 3D effects
     C3DRingingToneInterface* i3dRingingTonePlugin;
+#ifdef AUDIO_FETCHER_UNIT_TEST
+    /**
+     * Unit Testing
+     */
+    friend class TestMsgAudioPreview;
+#endif
 
 };
 
--- a/messagingapp/msgui/msgaudiofetcher/inc/msgaudioselectionengine.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudioselectionengine.h	Tue Oct 05 13:58:47 2010 +0530
@@ -131,6 +131,12 @@
 
     // query error
     TInt iQueryError;
+#ifdef AUDIO_FETCHER_UNIT_TEST
+    /**
+     * Unit Testing
+     */
+    friend class TestMsgAudioSelectionEngine;
+#endif
 };
 #endif /* MSGAUDIOSELECTIONENGINE_H */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/tsrc.pri	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,88 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TEMPLATE = app
+TARGET.CAPABILITY  = All -TCB
+DEFINES += AUDIO_FETCHER_UNIT_TEST
+DEPENDPATH += .
+DEPENDPATH += inc
+DEPENDPATH += src
+
+DEPENDPATH += ../../inc
+DEPENDPATH += ../../src
+DEPENDPATH += ../../../inc
+
+
+# Platforms
+SYMBIAN_PLATFORMS = WINSCW \
+    ARMV5
+
+# msgui inc
+#INCLUDEPATH += ../../../inc
+
+# msgui tsrc
+INCLUDEPATH += ../../../tsrc/shared
+
+# messaging inc 
+#INCLUDEPATH += ../../../../../inc
+
+#INCLUDEPATH += ../../../msguiutils/inc
+#INCLUDEPATH += ../../../../msgutils/unieditorutils/editorgenutils/inc
+#INCLUDEPATH += ../../../appengine/inc
+#INCLUDEPATH += ../../../../smartmessaging/ringbc/inc
+#INCLUDEPATH += ../../../../msgsettings/settingsview/inc
+#INCLUDEPATH += ../../../../msgutils/unidatamodel/univcaldataplugin/inc
+
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+QT += testlib
+QT -= gui
+CONFIG += hb
+CONFIG += symbian_test
+
+
+#HEADERS
+HEADERS += msgaudioselectionengine.h \
+           msgaudiofetchermodel.h \
+           ../inc/msgaudiofetcherdialog.h \
+           msgaudiopreview.h
+
+#SOURCES           
+SOURCES += msgaudioselectionengine.cpp \
+           msgaudiofetchermodel.cpp \
+           msgaudiofetcherdialog.cpp \
+           msgaudiopreview.cpp
+
+
+# Libs
+LIBS += -lxqutils \
+        -lmdeclient \
+        -lcentralrepository \
+        -lProfileEng \
+        -lmediaclientaudio \
+        -lDrmAudioPlayUtility \
+        -lDRMCommon \
+        -lDrmRights \
+        -lDrmHelper \
+        -ldrmutility \
+        -lapmime \
+        -lecom \
+        -lxqservice \
+        -lapgrfx
+
+
+symbian:MMP_RULES += SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/tsrc.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TEMPLATE = subdirs
+
+
+
+SUBDIRS += unittest_msgaudiofetcherdialog
+SUBDIRS += unittest_msgaudiofetchermodel
+SUBDIRS += unittest_msgaudiopreview
+SUBDIRS += unittest_msgaudioselectionengine
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/inc/unittest_msgaudiofetcherdialog.h	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "msgaudiofetcherdialog.h"
+
+class TestMsgAudioFetcherDialog:public QObject{
+    Q_OBJECT
+public:
+    TestMsgAudioFetcherDialog();
+    
+    ~TestMsgAudioFetcherDialog();
+    
+private slots:
+    
+    void initTestCase();
+    
+    void test_Constructor();
+
+    void test_initMainWidget();
+
+    void test_initActions();  
+    
+    void test_doDelayedConstruction();
+    
+    void test_onSelectAction();
+    
+    void test_reset();
+
+    void cleanupTestCase();
+    
+private:
+    MsgAudioFetcherDialog* mAudioFetcherDialog;
+    HbMainWindow *mTestMainWindow;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/src/unittest_msgaudiofetcherdialog.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "unittest_msgaudiofetcherdialog.h"
+#include <QtTest/QtTest>
+#include <HbTextItem>
+#include <HbMainWindow>
+#include <HbColorScheme>
+#include <HbAction>
+#include <QtTest/QSignalSpy>
+#include <Qstring>
+#include "msguitest.h"
+#define LOC_SELECT_SELECT hbTrId("txt_common_button_select")
+const QString LIST_ITEM_TITLE("qtc_list_item_title_normal");
+TestMsgAudioFetcherDialog::TestMsgAudioFetcherDialog(): mAudioFetcherDialog(0),mTestMainWindow(0)
+    {
+
+    }
+TestMsgAudioFetcherDialog::~TestMsgAudioFetcherDialog()
+    {
+    
+    }
+void TestMsgAudioFetcherDialog::initTestCase()
+    {
+        mTestMainWindow = new HbMainWindow();
+        mAudioFetcherDialog = new MsgAudioFetcherDialog();
+        mAudioFetcherDialog->show();
+    }
+
+void TestMsgAudioFetcherDialog::test_Constructor()
+    {
+        QVERIFY(mAudioFetcherDialog->dismissPolicy() == HbDialog::NoDismiss);
+        QVERIFY(mAudioFetcherDialog->frameType() == HbDialog::Strong);
+        QVERIFY(mAudioFetcherDialog->isModal()==true);    
+    }
+
+void TestMsgAudioFetcherDialog::test_initMainWidget()
+    {
+        HbTextItem* heading =  static_cast<HbTextItem*>(mAudioFetcherDialog->headingWidget());
+        QVERIFY(heading != NULL);
+        QVERIFY(heading->textColor() == HbColorScheme::color( LIST_ITEM_TITLE ));
+        QVERIFY(heading->alignment() == Qt::AlignLeft);      
+    }
+
+void TestMsgAudioFetcherDialog::test_initActions()
+    {
+        QVERIFY(mAudioFetcherDialog->mLeftAction != NULL);
+        QVERIFY(mAudioFetcherDialog->mLeftAction->text() == LOC_SELECT_SELECT);
+    }
+
+void TestMsgAudioFetcherDialog::test_doDelayedConstruction()
+{ 
+    QVERIFY(mAudioFetcherDialog->mListView != NULL);
+    QVERIFY(mAudioFetcherDialog->mListView->selectionMode() == HbAbstractItemView::SingleSelection);
+    QVERIFY(mAudioFetcherDialog->mFetcherModel != NULL);
+    QVERIFY(long((mAudioFetcherDialog->mListView->model())) == long(mAudioFetcherDialog->mFetcherModel));
+    QVERIFY(mAudioFetcherDialog->mListView->uniformItemSizes() == TRUE);
+    QVERIFY(mAudioFetcherDialog->contentWidget() == mAudioFetcherDialog->mListView);
+    QVERIFY(mAudioFetcherDialog->mAudioPreview != NULL);    
+}
+
+
+
+void TestMsgAudioFetcherDialog::test_onSelectAction()
+    {  
+        QSignalSpy audioSelect(mAudioFetcherDialog, SIGNAL(audioSelected(QString&)));
+        QCOMPARE( audioSelect.count(), 0 );
+        mAudioFetcherDialog->onSelectAction();
+        QCOMPARE( audioSelect.count(), 1 );        
+    }
+
+void TestMsgAudioFetcherDialog::test_reset()
+    {
+        mAudioFetcherDialog->reset();
+        QVERIFY(mAudioFetcherDialog->mSelected == false);
+        QVERIFY(mAudioFetcherDialog->mLeftAction->isEnabled() == false);
+    }
+void TestMsgAudioFetcherDialog::cleanupTestCase()
+    {
+        if(mAudioFetcherDialog){
+            delete mAudioFetcherDialog;
+            mAudioFetcherDialog = NULL;
+        }
+        if (mTestMainWindow) {
+            delete mTestMainWindow;
+            mTestMainWindow = NULL;
+        }
+    }
+
+MSGUI_TEST_MAIN(TestMsgAudioFetcherDialog)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/unittest_msgaudiofetcherdialog.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TARGET = unittest_msgaudiofetcherdialog
+TARGET.UID3 = 0x20024324
+include(../tsrc.pri)
+
+#RESOURCES += unittest_msgaudiofetcherdialog.qrc
+
+# Input
+HEADERS += unittest_msgaudiofetcherdialog.h
+SOURCES += unittest_msgaudiofetcherdialog.cpp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetcherdialog/unittest_msgaudiofetcherdialog.qrc	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/">
+        <file alias="test_avatar">resources/test_avatar.jpg</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/inc/unittest_msgaudiofetchermodel.h	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "MsgAudioFetcherModel.h"
+class HbMainWindow;
+class HbListView;
+class TestMsgAudioFetcherModel:public QObject
+    {
+    Q_OBJECT
+public:
+    TestMsgAudioFetcherModel();
+    ~TestMsgAudioFetcherModel();
+private slots:
+
+    void initTestCase();
+    
+    void test_Constructor();
+    
+    void test_init();
+    
+    void test_addToneFiles();
+    
+    void test_insertIndex();
+    
+    void test_clearAll();
+    
+    void test_queryComplete();
+    
+    void test_isDRM_data();
+    
+    void test_isDRM();
+
+    void cleanupTestCase();
+private:
+
+    MsgAudioFetcherModel* mMsgAudioFetcherModel;
+    HbMainWindow* mTestMainWindow;
+    HbListView* mListView;
+    };
Binary file messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/DRM_AMR.dcf has changed
Binary file messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/DRM_DM.dm has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/Desk.rng	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,1 @@
+J:u•Í¬Á¡½¹”±¼
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/Esp.rng	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,1 @@
+J:eÍÁ¥½¹…”
Binary file messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/drm.amr has changed
Binary file messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/resources/nondrm.amr has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/src/unittest_msgaudiofetchermodel.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "unittest_msgaudiofetchermodel.h"
+#include <QtTest/QtTest>
+#include <HbMainWindow>
+#include <HbListView>
+#include "msguitest.h"
+
+TestMsgAudioFetcherModel::TestMsgAudioFetcherModel():mTestMainWindow(NULL),mListView(NULL),mMsgAudioFetcherModel(NULL)
+    {
+
+    }
+
+TestMsgAudioFetcherModel::~TestMsgAudioFetcherModel()
+    {
+
+    }
+
+void TestMsgAudioFetcherModel::initTestCase()
+    {
+        mTestMainWindow = new HbMainWindow();
+        mListView = new HbListView();
+        mMsgAudioFetcherModel = new MsgAudioFetcherModel(this);
+        mListView->setModel(mMsgAudioFetcherModel);
+        mTestMainWindow->addView(mListView);        
+    }
+void TestMsgAudioFetcherModel::test_Constructor()
+    {
+        QVERIFY(mMsgAudioFetcherModel->mSelectionEngine != NULL);
+    }
+
+void TestMsgAudioFetcherModel::test_init()
+    {
+        QVERIFY(mMsgAudioFetcherModel->mSelectionEngine != NULL);    
+    }
+
+void TestMsgAudioFetcherModel::test_addToneFiles()
+    {
+        QDir dir("c:\\data\\testAudioFetcher");
+        mMsgAudioFetcherModel->addToneFiles(dir);
+        int rowCount = mMsgAudioFetcherModel->rowCount();
+        QVERIFY(mMsgAudioFetcherModel->rowCount() != 0);
+    }
+
+void TestMsgAudioFetcherModel::test_insertIndex()
+    {
+        QDir dir("c:\\data\\testAudioFetcher");
+        mMsgAudioFetcherModel->addToneFiles(dir);
+        /*As already 4 file are present int the list, So index for file AAA should be 0 and ZZZ should be 4*/
+        int index = mMsgAudioFetcherModel->insertIndex(0,mMsgAudioFetcherModel->rowCount(),"AAA");
+        QVERIFY(index == 0);
+        index = mMsgAudioFetcherModel->insertIndex(0,mMsgAudioFetcherModel->rowCount(),"zzz");
+        QVERIFY(index == 4);
+    }
+
+void TestMsgAudioFetcherModel::test_clearAll()
+{    
+
+    QVERIFY(mMsgAudioFetcherModel->rowCount() != 0);
+    /*test_addToneFiles is already called so this count should not be 0*/
+    mMsgAudioFetcherModel->clearAll();
+    
+    QVERIFY(mMsgAudioFetcherModel->rowCount() == 0) ;
+    QVERIFY(mMsgAudioFetcherModel->columnCount() == 0);
+}
+
+void TestMsgAudioFetcherModel::test_queryComplete()
+{
+    QStringList nameList;
+    QStringList uriList;
+    nameList.append("drm.amr");
+    nameList.append("nondrm.amr");
+    
+    uriList.append("c:\\data\\testAudioFetcher\\drm.amr");
+    uriList.append("c:\\data\\testAudioFetcher\\nondrm.amr");
+    mMsgAudioFetcherModel->queryComplete(nameList,uriList);
+    QVERIFY(mMsgAudioFetcherModel->rowCount() == 2);
+}
+
+void TestMsgAudioFetcherModel::test_isDRM()
+    {
+        QFETCH(QString, fileName);
+        QFETCH(bool, expectedResult);
+        bool result = mMsgAudioFetcherModel->isDRM(fileName);
+        QVERIFY(result == expectedResult);
+    }
+void TestMsgAudioFetcherModel::test_isDRM_data()
+    {
+        QTest::addColumn<QString>("fileName");
+        QTest::addColumn<bool>("expectedResult");
+        QTest::newRow("NON DRM File")<< "c:\\data\\testAudioFetcher\\drm.amr" << false;
+        QTest::newRow("NON DRM File")<< "c:\\data\\testAudioFetcher\\nondrm.amr" << false;
+        QTest::newRow("DRM File")<< "c:\\data\\testAudioFetcher\\DRM_AMR.dcf" << true;
+    } 
+
+void TestMsgAudioFetcherModel::cleanupTestCase()
+    {          
+            if(mMsgAudioFetcherModel)
+                delete mMsgAudioFetcherModel;
+            if(mListView)
+                delete mListView;
+            if(mTestMainWindow)
+                delete mTestMainWindow;
+    }
+MSGUI_TEST_MAIN(TestMsgAudioFetcherModel)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/unittest_msgaudiofetchermodel.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TARGET = unittest_msgaudiofetchermodel
+TARGET.UID3 = 0x20024325
+BLD_INF_RULES.prj_testexports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
+    "./resources/nondrm.amr	c:/data/testAudioFetcher/nondrm.amr" \ 
+    "./resources/drm.amr		c:/data/testAudioFetcher/drm.amr" \
+    "./resources/DRM_DM.dm	c:/data/testAudioFetcher/DRM_DM.dm" \
+    "./resources/DRM_AMR.dcf	c:/data/testAudioFetcher/DRM_AMR.dcf" \
+    "./resources/Esp.rng	c:/data/testAudioFetcher/Esp.rng" \
+    "./resources/Desk.rng	c:/data/testAudioFetcher/Desk.rng"
+    
+include(../tsrc.pri)
+
+RESOURCES += unittest_msgaudiofetchermodel.qrc
+
+# Input
+HEADERS += unittest_msgaudiofetchermodel.h
+SOURCES += unittest_msgaudiofetchermodel.cpp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiofetchermodel/unittest_msgaudiofetchermodel.qrc	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,9 @@
+<RCC>
+    <qresource prefix="/">
+    <file alias="nondrm.amr">resources/nondrm.amr</file>
+		<file alias="drm.amr">resources/drm.amr</file>
+		<file alias="DRM_DM.dm">resources/DRM_DM.dm</file>
+		<file alias="Esp.dm">resources/Esp.rng</file>
+		<file alias="Desk.dm">resources/Desk.rng</file>		
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiopreview/inc/unittest_msgaudiopreview.h	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "msgaudiopreview.h"
+class TestMsgAudioPreview:public QObject
+    {
+    Q_OBJECT
+    
+public:
+    TestMsgAudioPreview();
+    ~TestMsgAudioPreview();
+private slots:
+
+    void initTestCase();
+    
+    void test_Constructor();
+    
+    void test_PlayL_IsPlaying();
+    
+    void test_Stop();
+    
+    void cleanupTestCase();
+
+private:
+    MsgAudioPreview* mMsgAudioPreview;
+    };
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiopreview/src/unittest_msgaudiopreview.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "unittest_msgaudiopreview.h"
+#include <QtTest/QtTest>
+#include <HbMainWindow>
+#include <XQConversions>
+#include "msguitest.h"
+
+#include <audiopreference.h>
+TestMsgAudioPreview::TestMsgAudioPreview()
+    {
+    
+    }
+TestMsgAudioPreview::~TestMsgAudioPreview()
+    {
+    
+    }
+
+void TestMsgAudioPreview::initTestCase()
+    {
+        mMsgAudioPreview = new MsgAudioPreview(this);
+        QVERIFY(mMsgAudioPreview != NULL);
+    }
+    
+void TestMsgAudioPreview::test_Constructor()
+    {
+        QVERIFY(mMsgAudioPreview->iMediaType == KErrNotFound);
+        QVERIFY(mMsgAudioPreview->iRingingVolume == KErrNotFound);
+        QVERIFY(mMsgAudioPreview->iRingingType == KErrNotFound);
+        QVERIFY(mMsgAudioPreview->iVibra == KErrNotFound);
+        QVERIFY(mMsgAudioPreview->i3DEffect == KErrNotFound);
+        QVERIFY(mMsgAudioPreview->i3DEcho == KErrNotFound);
+        QVERIFY(mMsgAudioPreview->iFileSize == KErrNotFound);    
+        QVERIFY(mMsgAudioPreview->iFullName == 0);    
+        QVERIFY(mMsgAudioPreview->iActiveProfileRead == EFalse);
+        QVERIFY(mMsgAudioPreview->iPlayerStatus == MsgAudioPreview::EPlayerNotCreated);
+        QVERIFY(mMsgAudioPreview->iAudioPlayerStatus == MsgAudioPreview::EPlayerNotCreated);
+        QVERIFY(mMsgAudioPreview->iTonePlayerStatus == MsgAudioPreview::EPlayerNotCreated);
+    }
+
+void TestMsgAudioPreview::test_PlayL_IsPlaying()
+    {
+        QString str("c:\\data\\testAudioFetcher\\drm.amr");
+        mMsgAudioPreview->SetAttr(str);
+        QVERIFY(XQConversions::s60DescToQString( mMsgAudioPreview->iFullName->Des()) == str);
+        mMsgAudioPreview->Play();
+        QVERIFY(mMsgAudioPreview->IsPlaying() == true);
+    }
+
+void TestMsgAudioPreview::test_Stop()
+    {
+        mMsgAudioPreview->Stop();
+        QVERIFY(mMsgAudioPreview->iAudioPlayer == 0);
+        QVERIFY(mMsgAudioPreview->iAudioPlayerStatus == MsgAudioPreview::EPlayerNotCreated);
+        QVERIFY(mMsgAudioPreview->iTonePlayer == 0);
+        QVERIFY(mMsgAudioPreview->iTonePlayerStatus == MsgAudioPreview::EPlayerNotCreated);
+    }
+
+    
+void TestMsgAudioPreview::cleanupTestCase()
+    {
+        if(mMsgAudioPreview)
+            {
+                delete mMsgAudioPreview;
+            }        
+    }
+MSGUI_TEST_MAIN(TestMsgAudioPreview)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudiopreview/unittest_msgaudiopreview.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TARGET = unittest_msgaudiopreview
+TARGET.UID3 = 0x20024326
+
+include(../tsrc.pri)
+
+#RESOURCES += unittest_msgaudiopreview.qrc
+
+# Input
+HEADERS += unittest_msgaudiopreview.h
+SOURCES += unittest_msgaudiopreview.cpp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudioselectionengine/inc/unittest_msgaudioselectionengine.h	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "msgaudioselectionengine.h"
+class TestMsgAudioSelectionEngine:public QObject
+    {
+    Q_OBJECT
+public:
+    TestMsgAudioSelectionEngine();
+    ~TestMsgAudioSelectionEngine();
+private slots:
+    void initTestCase();
+    void test_Constructor();
+    void test_CreateMetaDataSession();
+    void test_QueryTones();
+    void test_SetAttr();
+    void test_PropertyDefL();
+    void test_HandleObjectNotification();
+    void test_HandleObjectPresentNotification();
+    void test_HandleSessionOpened();
+    void test_HandleSessionError();    
+    void cleanupTestCase();
+private:
+    MsgAudioSelectionEngine* mMsgAudioSelectionEngine;
+    };
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudioselectionengine/src/unittest_msgaudioselectionengine.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Item decorator of the message list view.
+ *
+ */
+
+#include "unittest_msgaudioselectionengine.h"
+#include <QtTest/QtTest>
+#include <HbMainWindow>
+#include "msguitest.h"
+#include <XQConversions>
+
+TestMsgAudioSelectionEngine::TestMsgAudioSelectionEngine()
+    {
+
+    }
+
+TestMsgAudioSelectionEngine::~TestMsgAudioSelectionEngine()
+    {
+    
+    }
+
+void TestMsgAudioSelectionEngine::initTestCase()
+    {
+        mMsgAudioSelectionEngine = new MsgAudioSelectionEngine();
+        QVERIFY(mMsgAudioSelectionEngine != NULL);
+    }
+
+void TestMsgAudioSelectionEngine::test_Constructor()
+    {
+        QVERIFY(mMsgAudioSelectionEngine->iQuery == NULL);
+    }
+
+void TestMsgAudioSelectionEngine::test_CreateMetaDataSession()
+    {
+        mMsgAudioSelectionEngine->CreateMetaDataSession();
+        QVERIFY(mMsgAudioSelectionEngine->iSession != NULL);
+    }
+
+void TestMsgAudioSelectionEngine::test_QueryTones()
+    {
+        QTest::qWait(10000);
+        mMsgAudioSelectionEngine->QueryTones();
+        QVERIFY(mMsgAudioSelectionEngine->iQuery != NULL);
+    
+    }
+
+void TestMsgAudioSelectionEngine::test_SetAttr()
+    {
+        mMsgAudioSelectionEngine->SetAttr(MsgAudioSelectionEngine::EAttrFileSize,20);
+        QVERIFY(mMsgAudioSelectionEngine->iMaxFileSize == 20);
+    }
+
+
+void TestMsgAudioSelectionEngine::test_PropertyDefL()
+    {
+        CMdEPropertyDef& tempMdEPropertyDef = MsgAudioSelectionEngine::PropertyDefL(mMsgAudioSelectionEngine->iSession, MsgAudioSelectionEngine::EAttrFileName);
+        QString str = XQConversions::s60DescToQString(tempMdEPropertyDef.Name());
+        QVERIFY(str.isEmpty() != true); 
+    }
+
+void TestMsgAudioSelectionEngine::test_HandleSessionOpened()
+    {
+    QSignalSpy mdeSignalSessionError(mMsgAudioSelectionEngine, SIGNAL(mdeSessionError(int)));
+    QSignalSpy mdeSignalSessionOpened(mMsgAudioSelectionEngine, SIGNAL(mdeSessionOpened()));
+    CMdESession* lSession;
+    
+    QCOMPARE( mdeSignalSessionOpened.count(), 0);    
+    mMsgAudioSelectionEngine->HandleSessionOpened(*lSession, KErrNone);
+    QCOMPARE( mdeSignalSessionOpened.count(), 1); 
+    
+    QCOMPARE( mdeSignalSessionError.count(), 0 );    
+    mMsgAudioSelectionEngine->HandleSessionOpened(*lSession, 1);
+    QCOMPARE( mdeSignalSessionError.count(), 1);  
+    }
+
+void TestMsgAudioSelectionEngine::test_HandleObjectNotification()
+    {
+    CMdESession* lSession;
+    RArray<TItemId> lItemID;
+    QSignalSpy signalnotifyObjectChanged(mMsgAudioSelectionEngine, SIGNAL(notifyObjectChanged()));
+    
+    QCOMPARE( signalnotifyObjectChanged.count(), 0);
+    mMsgAudioSelectionEngine->HandleObjectNotification(*lSession, ENotifyAdd,lItemID);
+    QCOMPARE( signalnotifyObjectChanged.count(), 1);
+    QTest::qWait(10000);
+    }
+
+void TestMsgAudioSelectionEngine::test_HandleObjectPresentNotification()
+    {
+    CMdESession* lSession;
+    QSignalSpy signalnotifyObjectChanged(mMsgAudioSelectionEngine, SIGNAL(notifyObjectChanged()));
+    RArray<TItemId> lItemID;
+    lItemID.Append(10);
+    lItemID.Append(20);
+    lItemID.Append(30);    
+
+    QCOMPARE( signalnotifyObjectChanged.count(), 0);
+    mMsgAudioSelectionEngine->HandleObjectPresentNotification(*lSession,true,lItemID);
+    QCOMPARE( signalnotifyObjectChanged.count(), 1);
+    QTest::qWait(10000);
+    }
+
+void TestMsgAudioSelectionEngine::test_HandleSessionError()
+    {
+    QSignalSpy mdeSignalSessionError(mMsgAudioSelectionEngine, SIGNAL(mdeSessionError(int)));
+    CMdESession* lSession;
+    
+    QCOMPARE( mdeSignalSessionError.count(), 0);
+    mMsgAudioSelectionEngine->HandleSessionError(*lSession, 1);
+    QCOMPARE( mdeSignalSessionError.count(), 1); 
+    
+    QVERIFY(mMsgAudioSelectionEngine->iSession == 0);
+    QVERIFY(mMsgAudioSelectionEngine->iSessionOpen == EFalse);
+
+    }
+
+void TestMsgAudioSelectionEngine::cleanupTestCase()
+    {
+    if(mMsgAudioSelectionEngine)
+        delete mMsgAudioSelectionEngine;
+    }
+    
+MSGUI_TEST_MAIN(TestMsgAudioSelectionEngine)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msgaudiofetcher/tsrc/unittest_msgaudioselectionengine/unittest_msgaudioselectionengine.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TARGET = unittest_msgaudioselectionengine
+TARGET.UID3 = 0x20024327
+
+include(../tsrc.pri)
+
+#RESOURCES += unittest_msgaudioselectionengine.qrc
+
+# Input
+HEADERS += unittest_msgaudioselectionengine.h
+SOURCES += unittest_msgaudioselectionengine.cpp
\ No newline at end of file
--- a/messagingapp/msgui/msguiutils/inc/mmsconformancecheck.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msguiutils/inc/mmsconformancecheck.h	Tue Oct 05 13:58:47 2010 +0530
@@ -23,7 +23,7 @@
 #include <MsgMediaInfo.h>
 #include <qstring.h>
 
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
  #define MSGUI_UTILS_DLL_EXPORT
 #else
 #ifdef BUILD_MSGUI_UTILS_DLL
@@ -115,7 +115,7 @@
      */
     TUint32 iConfStatus;
     
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
     /**
      * Unit Testing
      */
--- a/messagingapp/msgui/msguiutils/inc/msgcontactsutil.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msguiutils/inc/msgcontactsutil.h	Tue Oct 05 13:58:47 2010 +0530
@@ -19,7 +19,7 @@
 #ifndef MSGCONTACTSUTIL_H_
 #define MSGCONTACTSUTIL_H_
 
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
  #define MSGUI_UTILS_DLL_EXPORT
 #else
 #ifdef BUILD_MSGUI_UTILS_DLL
@@ -43,7 +43,7 @@
     static QString copyVCardToTemp(const QString& filepath);
     static void deleteVCardFromTemp(const QString& filepath);
     
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
     /**
      * Unit Testing
      */
--- a/messagingapp/msgui/msguiutils/inc/msgmediautil.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msguiutils/inc/msgmediautil.h	Tue Oct 05 13:58:47 2010 +0530
@@ -18,7 +18,7 @@
 #ifndef MSG_MEDIA_UTIL_H
 #define MSG_MEDIA_UTIL_H
 
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
  #define MSGUI_UTILS_DLL_EXPORT
 #else
 #ifdef BUILD_MSGUI_UTILS_DLL
@@ -62,7 +62,7 @@
      */
     TInt mediaDurationL(const TDesC& mediaFile);
     
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
     /**
      * Unit Testing
      */
--- a/messagingapp/msgui/msguiutils/inc/msgsendutil.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msguiutils/inc/msgsendutil.h	Tue Oct 05 13:58:47 2010 +0530
@@ -22,7 +22,7 @@
 #include <QObject>
 #include "convergedmessage.h"
 
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
  #define MSGUI_UTILS_DLL_EXPORT
 #else
 #ifdef BUILD_MSGUI_UTILS_DLL
@@ -145,7 +145,7 @@
      */
     UniEditorGenUtils* mUniEditorGenUtils;
 
-#ifdef MSGUI_UNIT_TEST
+#ifdef MSGUIUTILS_UNIT_TEST
     /**
      * Unit Testing
      */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msguiutils/inc/msgservicelaunchutil.h	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ * 
+ * Description:This class provides duration of media file by parsing it
+ *
+ */
+
+#ifndef MSGSERVICELAUNCHUTIL_H_
+#define MSGSERVICELAUNCHUTIL_H_
+
+#ifdef BUILD_MSGUI_UTILS_DLL
+#define MSGUI_UTILS_DLL_EXPORT Q_DECL_EXPORT
+#else
+#define MSGUI_UTILS_DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+#include <QObject>
+
+/**
+ * This class provides duration of media file by parsing it
+ * 
+ */
+class MSGUI_UTILS_DLL_EXPORT MsgServiceLaunchUtil : public QObject
+{
+    Q_OBJECT
+    
+public:   
+    /**
+     * Constructor
+     */
+    MsgServiceLaunchUtil(QObject* parent=0);
+    
+    /**
+     * Destructor
+     */
+    ~MsgServiceLaunchUtil();
+    
+    /**
+     * Utility function to launch different content viewers.
+     * @param mimeType Mime type of the content.
+     * @param filePath Absolute file path of content.
+     */
+    void launchContentViewer(
+            const QString &mimeType, 
+            const QString &filePath);    
+    
+    /**
+     * Utility function to launch different content viewers.
+     * @param mimeType Mime type of the content.
+     * @param filePath Absolute file path of content.
+     */
+    void launchContentViewer(int messageId); 
+
+private slots:
+
+    /**
+     * Service launch complete.
+     */
+    void handleOk(const QVariant& result);
+
+    /**
+     * Service launch errors.
+     */
+    void handleError(int errorCode, const QString& errorMessage);
+    
+private:
+    
+    /**
+     * This launches any sharable content using XQSharable
+     * @param filePath reference to sharable file path
+    */
+    void launchViaSharableFile(const QString &filePath);   
+    
+};    
+
+#endif /* MSGSERVICELAUNCHUTIL_H_ */
+
+//eof
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msguiutils/inc/msgservicelaunchutilprivate.h	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+#ifndef MSGSERVICELAUNCHUTILPRIVATE_H_
+#define MSGSERVICELAUNCHUTILPRIVATE_H_
+
+
+#include <msvapi.h>
+
+
+class CMsgServiceLaunchUtilPrivate: 
+public CBase, public MMsvSessionObserver
+    {    
+public:
+    static CMsgServiceLaunchUtilPrivate* NewL();
+    ~CMsgServiceLaunchUtilPrivate();
+    HBufC* GetMessagePath(TInt aMessageId, TInt aError);
+    HBufC8* GetMimeType();
+
+private: // From MMsvSessionObserver
+    void HandleSessionEventL(TMsvSessionEvent aEvent, 
+            TAny* aArg1, TAny* aArg2, TAny* aArg3);
+    
+private:
+    void GetMessagePathL(TPtr aMsgPath, const TInt aMessageId);
+    void StoreMessageMimeTypeL(TPtr aMsgPath);
+       
+private:
+    CMsgServiceLaunchUtilPrivate();
+    void ConstructL();
+    
+private:
+    CMsvSession* iMsvSession;
+    HBufC8*      iMimeType;
+    };
+
+#endif /* MSGSERVICELAUNCHUTILPRIVATE_H_ */
+
--- a/messagingapp/msgui/msguiutils/msguiutils.pro	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msguiutils/msguiutils.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -56,12 +56,17 @@
 HEADERS += msgsendutil.h \
            mmsconformancecheck.h \
            msgmediautil.h \
-           msgcontactsutil.h
+           msgcontactsutil.h \
+           msgservicelaunchutil.h \
+           msgservicelaunchutilprivate.h
            
 SOURCES += msgsendutil.cpp \
            mmsconformancecheck.cpp \
            msgmediautil.cpp \
-           msgcontactsutil.cpp
+           msgcontactsutil.cpp \
+           msgservicelaunchutil.cpp \
+           msgservicelaunchutilprivate.cpp
+           
     
 # Libs
 LIBS += -lxqservice \
@@ -75,7 +80,10 @@
     -lapmime \
     -lunidatamodelloader \
     -lxqutils \
-    -lefsrv
+    -lefsrv \
+    -lxqserviceutil \
+    -lmsgs \
+    -lapgrfx
     
 
 
--- a/messagingapp/msgui/msguiutils/src/msgcontactsutil.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/msguiutils/src/msgcontactsutil.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -65,7 +65,9 @@
     {
 	    QList<QVariant> args;
         args << newfilepath;
-       request->setArguments(args);
+        request->setArguments(args);
+        request->setEmbedded(true);
+        request->setSynchronous(true);
         QVariant retValue;
         bool res = request->send(retValue);
         delete request;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msguiutils/src/msgservicelaunchutil.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ * 
+ * Description:Message service launch utility
+ *
+ */
+
+// SYSTEM INCLUDES
+#include <xqaiwrequest.h>
+#include <xqrequestinfo.h>
+#include <xqappmgr.h>
+#include <hbglobal.h>
+#include <xqconversions.h>
+
+#include "msgservicelaunchutil.h"
+#include "msgcontactsutil.h"
+#include "msgservicelaunchutilprivate.h"
+#include "debugtraces.h"
+
+// LOCAL CONSTANTS
+#define LOC_TITLE   hbTrId("txt_messaging_title_messaging")
+const QString VCARD_MIMETYPE("text/X-vCard");
+
+//--------------------------------------------------------------
+// MsgServiceLaunchUtil::MsgServiceLaunchUtil
+// Constructor
+//--------------------------------------------------------------
+MsgServiceLaunchUtil::MsgServiceLaunchUtil(QObject* parent):
+QObject(parent)
+{
+    //nothing required
+}
+
+//--------------------------------------------------------------
+// MsgServiceLaunchUtil::~MsgServiceLaunchUtil
+// Destructor
+//--------------------------------------------------------------
+MsgServiceLaunchUtil::~MsgServiceLaunchUtil()
+{
+    //nothing required
+}
+
+//---------------------------------------------------------------
+// MsgServiceLaunchUtil::launchContentViewer
+// @see header file
+//---------------------------------------------------------------
+void MsgServiceLaunchUtil::launchContentViewer(
+        const QString &mimeType, 
+        const QString &filePath)
+{
+    if (mimeType.contains(VCARD_MIMETYPE, Qt::CaseInsensitive)) {
+        MsgContactsUtil::launchVCardViewer(filePath);
+    }
+    else {
+        MsgServiceLaunchUtil::launchViaSharableFile(filePath);
+    }
+}
+
+//---------------------------------------------------------------
+// MsgServiceLaunchUtil::launchContentViewer
+// @see header file
+//---------------------------------------------------------------
+void MsgServiceLaunchUtil::launchContentViewer(
+        int messageId)
+{
+    // get the mimeType and filepath from messageId
+    CMsgServiceLaunchUtilPrivate* util_p = 0;
+        
+    TRAPD(error, util_p = CMsgServiceLaunchUtilPrivate::NewL());
+    
+    if(error == KErrNone)
+        {
+        HBufC* fileName = 0;
+        fileName = util_p->GetMessagePath(messageId, error);
+        
+        if(error == KErrNone)
+            {
+            QString attachmentFName = XQConversions::s60DescToQString(
+                    fileName->Des());
+            QString mimeType = XQConversions::s60Desc8ToQString(
+                    util_p->GetMimeType()->Des());
+            
+            launchContentViewer(mimeType, attachmentFName);
+                
+            }
+        if (fileName){
+            delete fileName;
+        }
+        }
+    if(util_p){
+        delete util_p; 
+    }    
+}
+
+//---------------------------------------------------------------
+// MsgServiceLaunchUtil::launchViaSharableFile
+// @see header file
+//---------------------------------------------------------------
+void MsgServiceLaunchUtil::launchViaSharableFile(
+        const QString &filePath)
+{
+    XQSharableFile sf;
+    XQAiwRequest* request = 0;
+
+    if (!sf.open(filePath)) {
+        return;
+    }
+
+    // Get handlers
+    XQApplicationManager appManager;
+    QList<XQAiwInterfaceDescriptor> fileHandlers = appManager.list(sf);
+    if (fileHandlers.count() > 0) {
+        XQAiwInterfaceDescriptor d = fileHandlers.first();
+        request = appManager.create(sf, d);
+
+        if (!request) {
+            sf.close();
+            return;
+        }
+    }
+    else {
+        sf.close();
+        return;
+    }
+
+    // Result handlers
+    connect(request, 
+            SIGNAL(requestOk(const QVariant&)), 
+            this, 
+            SLOT(handleOk(const QVariant&)),
+            Qt::UniqueConnection);
+    connect(request, 
+            SIGNAL(requestError(int,const QString&)), 
+            this,
+            SLOT(handleError(int,const QString&)), 
+            Qt::UniqueConnection);
+
+    request->setEmbedded(true);
+    request->setSynchronous(false);
+
+    // Fill args
+    QList<QVariant> args;
+    args << qVariantFromValue(sf);
+    request->setArguments(args);
+
+    // Fill headers
+    QString key("WindowTitle");
+    QVariant value(QString(LOC_TITLE));
+    XQRequestInfo info;
+    info.setInfo(key, value);
+    request->setInfo(info);
+
+    request->send();
+
+    // Cleanup
+    sf.close();
+    delete request;
+}
+
+//---------------------------------------------------------------
+// MsgServiceLaunchUtil::handleOk
+// @see header file
+//---------------------------------------------------------------
+void MsgServiceLaunchUtil::handleOk(
+        const QVariant& result)
+{
+   //do nothing
+    Q_UNUSED(result)
+}
+
+//---------------------------------------------------------------
+// MsgServiceLaunchUtil::handleError
+// @see header file
+//---------------------------------------------------------------
+void MsgServiceLaunchUtil::handleError(
+        int errorCode, 
+        const QString& errorMessage)
+{
+    //do nothing
+    Q_UNUSED(errorCode)
+    Q_UNUSED(errorMessage)
+}
+
+//eof
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/msguiutils/src/msgservicelaunchutilprivate.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+#include <mmsvattachmentmanager.h>
+#include <apgcli.h>
+#include "msgservicelaunchutilprivate.h"
+
+const TInt32 KUidMsgTypeBtTInt32 = 0x10009ED5;
+
+    
+CMsgServiceLaunchUtilPrivate* CMsgServiceLaunchUtilPrivate::NewL()
+    {
+    CMsgServiceLaunchUtilPrivate* me = new (ELeave) CMsgServiceLaunchUtilPrivate();
+    CleanupStack::PushL(me);
+    me->ConstructL();
+    CleanupStack::Pop(me);
+    return me;
+    }
+
+CMsgServiceLaunchUtilPrivate::CMsgServiceLaunchUtilPrivate()
+    {
+    
+    }
+
+void CMsgServiceLaunchUtilPrivate::ConstructL()
+    {
+    iMsvSession = CMsvSession::OpenSyncL(*this);
+    }
+
+CMsgServiceLaunchUtilPrivate::~CMsgServiceLaunchUtilPrivate()
+    {
+    if ( iMsvSession )
+        {
+        delete iMsvSession;
+        }
+    delete iMimeType;
+    }
+
+HBufC* CMsgServiceLaunchUtilPrivate::GetMessagePath(
+        TInt aMessageId, 
+        TInt aError)
+    {
+    HBufC* fileName = NULL;
+    TRAP(aError, fileName = HBufC::NewL(KMaxPath));   
+    if(aError < KErrNone)
+        {
+        return fileName;
+        }
+    
+    TRAP(aError, GetMessagePathL(fileName->Des(), aMessageId));
+    return fileName;
+    }
+
+void CMsgServiceLaunchUtilPrivate::GetMessagePathL(
+        TPtr aMsgPath, const TInt aMessageId)
+    {
+    CMsvEntry* messageEntry = iMsvSession->GetEntryL(aMessageId);
+    CleanupStack::PushL(messageEntry); //1st push
+    
+    TMsvEntry entry = messageEntry->Entry();
+    if(entry.MtmData1() == KUidMsgTypeBtTInt32)
+        {
+        CMsvStore* store = messageEntry->ReadStoreL();
+        CleanupStack::PushL(store); //2nd push
+
+        //get file handle for the attachment & the complete path of the file
+        RFile attachmentFile;
+        attachmentFile = store->AttachmentManagerL().GetAttachmentFileL(0);
+        CleanupClosePushL(attachmentFile); //3rd push
+        User::LeaveIfError(attachmentFile.FullName(aMsgPath));
+        CleanupStack::PopAndDestroy(&attachmentFile);
+        StoreMessageMimeTypeL(aMsgPath);
+        
+        //mark attachment as Read
+        TMsvEntry attachEntry = messageEntry->Entry();
+        attachEntry.SetUnread(EFalse);
+        messageEntry->ChangeL(attachEntry);
+        
+        CleanupStack::PopAndDestroy(store);
+        CleanupStack::PopAndDestroy(messageEntry);
+        }
+    else
+        {
+        CMsvEntry* attachmentEntry = iMsvSession->GetEntryL((*messageEntry)[0].Id());
+        CleanupStack::PushL(attachmentEntry); //2nd push
+            
+        CMsvStore* store = attachmentEntry->ReadStoreL();
+        CleanupStack::PushL(store);  //3rd push
+        
+        //get file handle for the attachment & the complete path of the file
+        RFile attachmentFile;
+        attachmentFile = store->AttachmentManagerL().GetAttachmentFileL(0);
+        CleanupClosePushL(attachmentFile);
+        User::LeaveIfError(attachmentFile.FullName(aMsgPath));
+        CleanupStack::PopAndDestroy(&attachmentFile);
+        StoreMessageMimeTypeL(aMsgPath);
+        
+        //mark attachment as Read
+        TMsvEntry attachEntry = attachmentEntry->Entry();
+        attachEntry.SetUnread(EFalse);
+        attachmentEntry->ChangeL(attachEntry);
+        
+        CleanupStack::PopAndDestroy(store);
+        CleanupStack::PopAndDestroy(attachmentEntry);
+        CleanupStack::PopAndDestroy(messageEntry);
+        }
+    }
+
+void CMsgServiceLaunchUtilPrivate::HandleSessionEventL(
+        TMsvSessionEvent aEvent, 
+        TAny* aArg1, TAny* aArg2, TAny* aArg3)
+    {
+    (void) aEvent;
+    (void) aArg1;
+    (void) aArg2;
+    (void) aArg3;
+    }
+
+void CMsgServiceLaunchUtilPrivate::StoreMessageMimeTypeL(TPtr aMsgPath)
+    {
+    RFs rfs;
+    RFile file;
+    
+    User::LeaveIfError(rfs.Connect());
+    
+    User::LeaveIfError(rfs.ShareProtected());
+    
+    User::LeaveIfError(file.Open(rfs, aMsgPath, EFileShareReadersOrWriters | EFileRead));
+    
+    TDataRecognitionResult dataType;
+    RApaLsSession apaSession;
+    
+    if(apaSession.Connect() == KErrNone)
+        {
+        if (apaSession.RecognizeData(file, dataType) == KErrNone)
+            {
+            if(iMimeType)
+                {
+                delete iMimeType;
+                iMimeType = NULL;
+                }
+        
+            iMimeType = dataType.iDataType.Des8().AllocL();
+            
+            rfs.Close();
+            apaSession.Close();
+            }
+        }
+
+    rfs.Close();
+    }
+
+HBufC8* CMsgServiceLaunchUtilPrivate::GetMimeType()
+    {
+    return iMimeType;
+    }
+
--- a/messagingapp/msgui/unifiededitor/src/msgunieditoraddress.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditoraddress.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -43,6 +43,8 @@
 
 // Constants
 const int KDefaultGsmNumberMatchLength = 7;  //matching unique ph numbers
+
+#define LOC_TITLE hbTrId("txt_messaging_title_messaging")
 #define LOC_SMS_RECIPIENT_LIMIT_REACHED hbTrId("txt_messaging_dialog_number_of_recipients_exceeded")
 #define LOC_MMS_RECIPIENT_LIMIT_REACHED hbTrId("txt_messaging_dpopinfo_unable_to_add_more_recipien")
 #define LOC_DIALOG_OK hbTrId("txt_common_button_ok")
@@ -99,33 +101,41 @@
     QString service("phonebookservices");
     QString interface("com.nokia.symbian.IContactsFetch");
     QString operation("multiFetch(QString,QString)");
-    XQAiwRequest* request;
     XQApplicationManager appManager;
-    request = appManager.create(service, interface, operation, true); // embedded
+    XQAiwRequest* request = appManager.create(service, interface, operation, true); // embedded
+	
     if ( request == NULL )
         {
-        return;
+        	return;
         }
-
+		
+    request->setSynchronous(false);
+	
     // Result handlers
     connect (request, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&)));
     connect (request, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&)));
 
     QList<QVariant> args;
-    args << QString(tr("Phonebook"));
-    args << KCntActionAll;
+    args << LOC_TITLE;
+    args << KCntActionSms;
     args << KCntFilterDisplayAll;
 
     request->setArguments(args);
     request->send();
-    delete request;
-
+    
     //unblock click signal after some delay.
     QTimer::singleShot(250,this,SLOT(unblockSignals()));
 }
 
 void MsgUnifiedEditorAddress::handleOk(const QVariant& value)
 {
+    // delete the request
+    XQAiwRequest* request = qobject_cast<XQAiwRequest*>(this->sender());
+    if(request)
+    {
+        delete request;        
+    }
+	
    CntServicesContactList contactList =
            qVariantValue<CntServicesContactList>(value);
     int count = contactList.count();
@@ -147,12 +157,19 @@
         addrlist << address;
     }
     setAddresses(addrlist);
+    
 }
 
 void MsgUnifiedEditorAddress::handleError(int errorCode, const QString& errorMessage)
 {
     Q_UNUSED(errorMessage)
     Q_UNUSED(errorCode)
+	
+    XQAiwRequest* request = qobject_cast<XQAiwRequest*>(this->sender());
+    if(request)
+    {
+       delete request;      
+    }
 }
 
 // ----------------------------------------------------------------------------
--- a/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -88,6 +88,7 @@
 const int MAX_VCARDS(1000);
 
 // LOCALIZED CONSTANTS
+#define LOC_TITLE hbTrId("txt_messaging_title_messaging")
 //To,Cc.Bcc
 #define LOC_TO  hbTrId("txt_messaging_formlabel_to")
 #define LOC_CC hbTrId("txt_messaging_formlabel_cc")
@@ -244,7 +245,7 @@
 void MsgUnifiedEditorView::addMenu()
 {
     //Create Menu Options
-    HbMenu* mainMenu = new HbMenu();
+    HbMenu* mainMenu = this->menu();
     mainMenu->setFocusPolicy(Qt::NoFocus);
 	
     //if subject field / cc,bcc fields are already present don't add corresponding actions.
@@ -278,7 +279,6 @@
     connect(lowPriorityAction, SIGNAL(triggered()), this, SLOT(changePriority()));
     connect(deleteMsgAction,SIGNAL(triggered()),this, SLOT(deleteMessage()));
 
-    setMenu(mainMenu);
 }
 
 void MsgUnifiedEditorView::openDraftsMessage(const QVariantList& editorData)
@@ -1478,15 +1478,18 @@
     QString service("phonebookservices");
     QString interface("com.nokia.symbian.IContactsFetch");
     QString operation("multiFetch(QString,QString)");
-    XQAiwRequest* request;
-    XQApplicationManager appManager;
-    request = appManager.create(service, interface, operation, true); //embedded
+  
+    XQApplicationManager appManager;   
+    XQAiwRequest* request = appManager.create(service, interface, operation, true); //embedded
+	
     if ( request == NULL )
     {
         QCRITICAL_WRITE("AIW-ERROR: NULL request");
         return;
     }
-
+	
+    request->setSynchronous(false); // synchronous
+	
     // Result handlers
     connect (request, SIGNAL(requestOk(const QVariant&)),
         this, SLOT(contactsFetched(const QVariant&)));
@@ -1494,7 +1497,7 @@
         this, SLOT(serviceRequestError(int,const QString&)));
 
     QList<QVariant> args;
-    args << QString(tr("Phonebook"));
+    args << LOC_TITLE;
     args << KCntActionAll;
     args << KCntFilterDisplayAll;
 
@@ -1503,7 +1506,6 @@
     {
         QDEBUG_WRITE_FORMAT("AIW-ERROR: Request Send failed:",request->lastError());
     }
-    delete request;
 }
 
 //---------------------------------------------------------------
@@ -1515,17 +1517,14 @@
     QString service("photos");
     QString interface("com.nokia.symbian.IImageFetch");
     QString operation("fetch()");
-    XQAiwRequest* request = NULL;
     XQApplicationManager appManager;
-    request = appManager.create(service,interface, operation, true);//embedded
-  
+    XQAiwRequest* request = appManager.create(service,interface, operation, true);//embedded
     if(!request)
     {     
         QCRITICAL_WRITE("AIW-ERROR: NULL request");
         return;
     }
-    
-    request->setSynchronous(true); // synchronous
+    request->setSynchronous(false); // synchronous
 
     connect(request, SIGNAL(requestOk(const QVariant&)),
         this, SLOT(imagesFetched(const QVariant&)));
@@ -1537,7 +1536,6 @@
     {
         QDEBUG_WRITE_FORMAT("AIW-ERROR: Request Send failed:" , request->lastError());
     }  
-    delete request;
 }
 
 //---------------------------------------------------------------
@@ -1566,6 +1564,12 @@
 //---------------------------------------------------------------
 void MsgUnifiedEditorView::contactsFetched(const QVariant& value)
 {
+    XQAiwRequest* request = qobject_cast<XQAiwRequest*>(this->sender());
+    if(request)
+    {
+        delete request;
+    }
+
     // create a vcard for each contact fetched and add as attachment
     QStringList attachmentList;
     if(createVCards(value, attachmentList) == KErrNone)
@@ -1580,6 +1584,12 @@
 //---------------------------------------------------------------
 void MsgUnifiedEditorView::imagesFetched(const QVariant& result )
 {
+    XQAiwRequest* request = qobject_cast<XQAiwRequest*>(this->sender());
+    if(request)
+    {
+        delete request;        
+    }
+	
     if(result.canConvert<QStringList>())
     {
         QStringList fileList = result.value<QStringList>();
@@ -1598,6 +1608,14 @@
 void MsgUnifiedEditorView::serviceRequestError(int errorCode, const QString& errorMessage)
 {
     QDEBUG_WRITE_FORMAT(errorMessage,errorCode);
+    Q_UNUSED(errorCode)
+    Q_UNUSED(errorMessage)
+
+    XQAiwRequest* request = qobject_cast<XQAiwRequest*>(this->sender());
+    if(request)
+    {
+        delete request;	
+    }
 }
 
 //---------------------------------------------------------------
--- a/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h	Tue Oct 05 13:58:47 2010 +0530
@@ -26,7 +26,7 @@
 class HbIconItem;
 class HbIcon;
 class HbFrameItem;
-class UniViewerUtils;
+class MsgServiceLaunchUtil;
 class UniMessageInfo;
 
 /**
@@ -136,10 +136,10 @@
     HbFrameItem *mFrameItem;
 
     /**
-     * UniViewerUtils object.
+     * MsgServiceLaunchUtil object.
      * Own
      */
-    UniViewerUtils *mViewerUtils;
+    MsgServiceLaunchUtil *mViewerUtils;
 
     /**
      * Media file path.
--- a/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h	Tue Oct 05 13:58:47 2010 +0530
@@ -19,7 +19,7 @@
 #define UNI_VIEWER_AUDIO_WIDGET_H
 
 // FORWARD DECLARATIONS
-class UniViewerUtils;
+class MsgServiceLaunchUtil;
 class UniMessageInfo;
 
 #include <HbPushButton>
@@ -97,10 +97,10 @@
 private:
 
     /**
-     * UniViewerUtils object.
+     * MsgServiceLaunchUtil object.
      * Own
      */
-    UniViewerUtils *mViewerUtils;
+    MsgServiceLaunchUtil *mViewerUtils;
 
     /**
      * Media file path.
--- a/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h	Tue Oct 05 13:58:47 2010 +0530
@@ -21,7 +21,7 @@
 #include <HbIconItem>
 
 // FORWARD DECLARATIONS
-class UniViewerUtils;
+class MsgServiceLaunchUtil;
 class UniMessageInfo;
 class ThumbnailManager;
 
@@ -131,10 +131,10 @@
     UniMessageInfo *mInfo;
 
     /**
-     * UniViewerUtils object.
+     * MsgServiceLaunchUtil object.
      * Own
      */
-    UniViewerUtils *mViewerUtils;
+    MsgServiceLaunchUtil *mViewerUtils;
 
     /**
      * ThumbnailManager
--- a/messagingapp/msgui/unifiedviewer/inc/univiewerutils.h	Fri Sep 17 20:16:33 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Utility class for univiewer.
- *
- */
-
-#ifndef UNI_VIEWER_UTILS_H
-#define UNI_VIEWER_UTILS_H
-
-// SYSTEM INCLUDES
-#include <QObject>
-
-// FORWARD DECLARATIONS
-
-/**
- * @class UniViewerUtils
- * @brief Utility class for univiewer. Contains common functionality required
- * for widgets.
- */
-
-class UniViewerUtils: public QObject
-{
-Q_OBJECT
-
-public:
-
-    /**
-     * Constructor
-     */
-    explicit UniViewerUtils(QObject *parent = 0);
-
-    /**
-     * Destructor
-     */
-    virtual ~UniViewerUtils();
-
-    /**
-     * Utility function to launch different content viewers.
-     * @param mimeType Mime type of the content.
-     * @param filePath Absolute file path of content.
-     */
-    void launchContentViewer(const QString &mimeType, const QString &filePath);
-
-signals:
-
-    /**
-     * Service launch complete.
-     */
-    void requestOk(const QVariant& result);
-
-    /**
-     * Service launch errors.
-     */
-    void requestError(int errorCode, const QString& errorMessage);
-
-private slots:
-
-    /**
-     * Service launch complete.
-     */
-    void handleOk(const QVariant& result);
-
-    /**
-     * Service launch errors.
-     */
-    void handleError(int errorCode, const QString& errorMessage);
-
-private:
-
-    /**
-     * Launch content viewer using XQSharableFile.
-     * @param filePath Absolute path of content.
-     */
-    void launchViaSharableFile(const QString &filePath);
-
-};
-
-#endif // UNI_VIEWER_UTILS_H
-//eof
--- a/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -30,7 +30,7 @@
 #include <QTimer>
 
 // USER INCLUDES
-#include "univiewerutils.h"
+#include "msgservicelaunchutil.h"
 #include "unidatamodelplugininterface.h"
 
 // LOCAL CONSTANTS
@@ -172,7 +172,7 @@
     this->ungrabGesture(Qt::TapGesture);
     
     if (!mViewerUtils) {
-        mViewerUtils = new UniViewerUtils(this);
+        mViewerUtils = new MsgServiceLaunchUtil(this);
     }
     mViewerUtils->launchContentViewer(mMimeType, mMediaPath);
     
@@ -180,6 +180,8 @@
     QTimer::singleShot(300,this,SLOT(regrabGesture()));
 }
 
+
+
 //----------------------------------------------------------------------------
 // UniViewerAttachmentWidget::handleShortTap
 // @see header file
--- a/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -23,7 +23,7 @@
 
 // USER INCLUDES
 #include "msgmediautil.h"
-#include "univiewerutils.h"
+#include "msgservicelaunchutil.h"
 #include "unidatamodelplugininterface.h"
 
 // LOCAL CONSTANTS
@@ -151,7 +151,7 @@
     this->ungrabGesture(Qt::TapGesture);
     
     if (!mViewerUtils) {
-        mViewerUtils = new UniViewerUtils(this);
+        mViewerUtils = new MsgServiceLaunchUtil(this);
     }
     mViewerUtils->launchContentViewer(mMimeType, mMediaPath);
     
@@ -159,6 +159,8 @@
     QTimer::singleShot(300,this,SLOT(regrabGesture()));
 }
 
+
+
 //---------------------------------------------------------------
 // UniViewerAudioWidget::regrabGesture
 // @see header file
--- a/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -27,7 +27,7 @@
 #include <thumbnailmanager_qt.h>
 
 // USER INCLUDES
-#include "univiewerutils.h"
+#include "msgservicelaunchutil.h"
 #include "unidatamodelplugininterface.h"
 
 // LOCAL CONSTANTS
@@ -162,7 +162,7 @@
     this->ungrabGesture(Qt::TapGesture);
 
     if (!mViewerUtils) {
-        mViewerUtils = new UniViewerUtils(this);
+        mViewerUtils = new MsgServiceLaunchUtil(this);
     }
     mViewerUtils->launchContentViewer(mMimeType, mPixmapPath);
 
@@ -170,6 +170,8 @@
     QTimer::singleShot(300,this,SLOT(regrabGesture()));
 }
 
+
+
 //---------------------------------------------------------------
 // UniViewerPixmapWidget::regrabGesture
 // @see header file
--- a/messagingapp/msgui/unifiedviewer/src/univiewerutils.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Utility class for univiewer.
- *
- */
-
-#include "univiewerutils.h"
-
-// SYSTEM INCLUDES
-#include <xqaiwrequest.h>
-#include <xqrequestinfo.h>
-#include <xqappmgr.h>
-#include <hbglobal.h>
-
-// USER INCLUDES
-#include "msgcontactsutil.h"
-
-// LOCAL CONSTANTS
-#define LOC_TITLE   hbTrId("txt_messaging_title_messaging")
-
-const QString IMAGE_MIMETYPE("image");
-const QString AUDIO_MIMETYPE("audio");
-const QString VCARD_MIMETYPE("text/X-vCard");
-const QString VIDEO_MIMETYPE("video");
-
-//---------------------------------------------------------------
-// UniViewerUtils::UniViewerUtils
-// @see header file
-//---------------------------------------------------------------
-UniViewerUtils::UniViewerUtils(QObject *parent) :
-    QObject(parent)
-{
-}
-
-//---------------------------------------------------------------
-// UniViewerUtils::~UniViewerUtils
-// @see header file
-//---------------------------------------------------------------
-UniViewerUtils::~UniViewerUtils()
-{
-}
-
-//---------------------------------------------------------------
-// UniViewerUtils::addAttachmentWidget
-// @see header file
-//---------------------------------------------------------------
-void UniViewerUtils::launchContentViewer(const QString &mimeType, const QString &filePath)
-{
-    if (mimeType.contains(VCARD_MIMETYPE, Qt::CaseInsensitive)) {
-        MsgContactsUtil::launchVCardViewer(filePath);
-    }
-    else {
-        launchViaSharableFile(filePath);
-    }
-}
-
-//---------------------------------------------------------------
-// UniViewerUtils::handleOk
-// @see header file
-//---------------------------------------------------------------
-void UniViewerUtils::handleOk(const QVariant& result)
-{
-    emit requestOk(result);
-}
-
-//---------------------------------------------------------------
-// UniViewerUtils::handleError
-// @see header file
-//---------------------------------------------------------------
-void UniViewerUtils::handleError(int errorCode, const QString& errorMessage)
-{
-    emit requestError(errorCode, errorMessage);
-}
-
-//---------------------------------------------------------------
-// UniViewerUtils::launchViaSharableFile
-// @see header file
-//---------------------------------------------------------------
-void UniViewerUtils::launchViaSharableFile(const QString &filePath)
-{
-    XQSharableFile sf;
-    XQAiwRequest* request = 0;
-
-    if (!sf.open(filePath)) {
-        return;
-    }
-
-    // Get handlers
-    XQApplicationManager appManager;
-    QList<XQAiwInterfaceDescriptor> fileHandlers = appManager.list(sf);
-    if (fileHandlers.count() > 0) {
-        XQAiwInterfaceDescriptor d = fileHandlers.first();
-        request = appManager.create(sf, d);
-
-        if (!request) {
-            sf.close();
-            return;
-        }
-    }
-    else {
-        sf.close();
-        return;
-    }
-
-    // Result handlers
-    connect(request, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&)),
-        Qt::UniqueConnection);
-    connect(request, SIGNAL(requestError(int,const QString&)), this,
-        SLOT(handleError(int,const QString&)), Qt::UniqueConnection);
-
-    request->setEmbedded(true);
-    request->setSynchronous(true);
-
-    // Fill args
-    QList<QVariant> args;
-    args << qVariantFromValue(sf);
-    request->setArguments(args);
-
-    // Fill headers
-    QString key("WindowTitle");
-    QVariant value(QString(LOC_TITLE));
-    XQRequestInfo info;
-    info.setInfo(key, value);
-    request->setInfo(info);
-
-    request->send();
-
-    // Cleanup
-    sf.close();
-    delete request;
-}
-
-//EOF
--- a/messagingapp/msgui/unifiedviewer/unifiedviewer.pro	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/unifiedviewer.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -65,7 +65,6 @@
            inc/univiewslidewidget.h \
            inc/uniscrollarea.h \
            ../inc/msgbaseview.h \
-           inc/univiewerutils.h \
            inc/univiewerbodywidget.h \
            inc/univiewerdetailswidget.h \
            inc/univieweraddresswidget.h \
@@ -82,7 +81,6 @@
            src/univiewerfeeder_p.cpp \
            src/univiewslidewidget.cpp \
            src/uniscrollarea.cpp \
-           src/univiewerutils.cpp \
            src/univiewerbodywidget.cpp \
            src/univiewerdetailswidget.cpp \
            src/univieweraddresswidget.cpp \
--- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin_p.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin_p.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -50,7 +50,7 @@
 {
     q_ptr = NULL;
     
-    if(attachmentProcessed == EFalse && iAttachmentCount == 1)
+    if(attachmentProcessed == EFalse && iAttachmentCount == 1 && iMsvEntry)
     {
        TRAP_IGNORE( CMsvStore* store = iMsvEntry->EditStoreL();
         CleanupStack::PushL(store);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/shareui/rom/shareuiresources.iby	Tue Oct 05 13:58:47 2010 +0530
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: shareuiresources.iby
+*
+*/
+
+
+#ifndef __SHAREUIRESOURCES_IBY__
+#define __SHAREUIRESOURCES_IBY__
+
+#include <data_caging_paths_for_iby.hrh>
+
+data=DATAZ_\QT_TRANSLATIONS_DIR\share.qm                       QT_TRANSLATIONS_DIR\share.qm 
+
+#endif  // __SHAREUIRESOURCES_IBY__
--- a/messagingapp/shareui/shareui.pro	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/shareui/shareui.pro	Tue Oct 05 13:58:47 2010 +0530
@@ -40,7 +40,8 @@
 BLD_INF_RULES.prj_exports += \
      "$${LITERAL_HASH}include <platform_paths.hrh>" \
      "sis/shareui_stub.sis   /epoc32/data/z/system/install/shareui_stub.sis" \
-     "rom/shareui.iby  CORE_APP_LAYER_IBY_EXPORT_PATH(shareui.iby)" 
+     "rom/shareui.iby  CORE_APP_LAYER_IBY_EXPORT_PATH(shareui.iby)" \
+      "rom/shareuiresources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(shareuiresources.iby)" \
      
 defBlock = \      
 	  "$${LITERAL_HASH}if defined(EABI)" \
--- a/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -20,7 +20,7 @@
 #include <pathinfo.h>
 #include <f32file.h>
 #include <hbmessagebox.h>
-#include <HbDeviceMessageBox>
+#include <hbdevicenotificationdialog.h>
 
 // USER INCLUDES
 #include "ringbc_p.h"
@@ -29,11 +29,7 @@
 #include "debugtraces.h"
 
 // LOCALIZATION
-// TODO: Get localized strings
-#define LOC_RINGTONE_CORRUPTED "Ringing Tone Corrupted"
-#define LOC_OUT_OF_MEMORY "No memory to save"
-#define LOC_RINGTONE_SAVING_ERROR "Error in Saving"
-#define LOC_RINGTONE_SAVED "Saved succesfully"
+#define LOC_RINGTONE_SAVED hbTrId("txt_messages_dpopinfo_ringing_tone_saved")
 
 // ----------------------------------------------------------------------------
 // RingBcPrivate::RingBcPrivate
@@ -83,36 +79,11 @@
     QDEBUG_WRITE("RingBcPrivate::saveTone : Enter")
     QString statusStr;
     TRAPD(error, saveToneL(path));
-    if (error)
+    if(error == KErrNone)
         {
-        QDEBUG_WRITE_FORMAT("RingBcPrivate::saveTone Error code =",error)
-        if(error == KErrCorrupt)
-            {
-            statusStr = LOC_RINGTONE_CORRUPTED;
-            QDEBUG_WRITE("RingBcPrivate::saveTone : Ringing tone corrupted")
-            }
-        else if(error == KErrNoMemory || error == KErrDiskFull)
-            {
-            statusStr = LOC_OUT_OF_MEMORY;
-            QDEBUG_WRITE("RingBcPrivate::saveTone : Low memory")
-            }
-        else
-            {
-            statusStr = LOC_RINGTONE_SAVING_ERROR;
-            QDEBUG_WRITE("RingBcPrivate::saveTone : Error in Saving")
-            }
-        }
-    else
-        {
-        statusStr = LOC_RINGTONE_SAVED;
-        QDEBUG_WRITE("RingBcPrivate::saveTone : Ringing tone saved successfully")
+        HbDeviceNotificationDialog::notification(QString(), LOC_RINGTONE_SAVED);
         }
     
-    HbDeviceMessageBox msgbox;
-    msgbox.setMessageBoxType(HbMessageBox::MessageTypeInformation);
-    msgbox.setText(statusStr);
-    msgbox.setAction(NULL, HbDeviceMessageBox::AcceptButtonRole);
-    msgbox.show();
     QDEBUG_WRITE("RingBcPrivate::saveTone : Exit")
     }
 
Binary file mmsengine/conf/mmsengine.confml has changed