Revision: 201037
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 04 Oct 2010 00:05:37 +0300
changeset 75 47d84de1c893
parent 72 64e38f08e49c
Revision: 201037 Kit: 201039
email_plat/contact_history_model_api/contact_history_model_api.metaxml
email_plat/contact_history_model_api/contact_history_model_api.pri
email_plat/contact_history_model_api/inc/nmcontacthistorymodel.h
email_plat/contact_history_model_api/inc/nmcontacthistorymodelcommon.h
email_plat/email_plat.pro
email_plat/email_services_api/email_services_api.h
email_plat/nmail_client_api/nmail_client_api.pri
email_plat/nmail_client_api/nmapiattachment.h
email_plat/nmail_client_api/nmapicommon.h
email_plat/nmail_client_api/nmapiemailservice.h
email_plat/nmail_client_api/nmapieventnotifier.h
email_plat/nmail_client_api/nmapimessage.h
email_plat/nmail_client_api/nmapimessagecontent.h
email_plat/nmail_client_api/nmapimessageenvelope.h
email_plat/nmail_client_api/nmapimessagemanager.h
email_plat/nmail_client_api/nmapimessagesearch.h
email_plat/nmail_client_api/nmapitextcontent.h
emailservices/emailclientapi/emailclientapi.pro
emailservices/emailcommon/bwins/fsfwcommonlibu.def
emailservices/emailcommon/eabi/fsfwcommonlibu.def
emailservices/emailcommon/emailcommon.pro
emailservices/emailcommon/inc/CFSMailBox.h
emailservices/emailcommon/inc/CFSMailCommon.h
emailservices/emailcommon/inc/CFSMailMessagePart.h
emailservices/emailcommon/inc/CFSMailRequestHandler.h
emailservices/emailcommon/src/CFSMailBox.cpp
emailservices/emailcommon/src/CFSMailMessagePart.cpp
emailservices/emailcommon/src/CFSMailRequestHandler.cpp
emailservices/emaildebug/inc/emailtrace.h
emailservices/emailframework/emailframework.pro
emailservices/emailframework/inc/CFSMailPlugin.h
emailservices/emailframework/inc/CFSMailPlugin.inl
emailservices/emailstore/base_plugin/BWINS/basepluginU.DEF
emailservices/emailstore/base_plugin/EABI/basepluginU.DEF
emailservices/emailstore/base_plugin/base_plugin.pro
emailservices/emailstore/base_plugin/group/BasePlugin.mmp
emailservices/emailstore/base_plugin/inc/BasePlugin.h
emailservices/emailstore/base_plugin/src/BasePlugin.cpp
emailservices/emailstore/base_plugin/src/basepluginparts.cpp
emailservices/emailstore/message_store/MsgStoreRfsPlugin/MsgStoreRfsPlugin.pro
emailservices/emailstore/message_store/MsgStoreRfsPlugin/group/RfsMsgStorePlugin.mmp
emailservices/emailstore/message_store/PointSecMonitor/Group/ImsPointsecMonitor.mmp
emailservices/emailstore/message_store/PointSecMonitor/PointSecMonitor.pro
emailservices/emailstore/message_store/client/client.pro
emailservices/emailstore/message_store/client/group/MessageStoreClient.mmp
emailservices/emailstore/message_store/client/src/RMessageStoreSession.cpp
emailservices/emailstore/message_store/debuglog/debuglog.pro
emailservices/emailstore/message_store/debuglog/group/DebugLog.mmp
emailservices/emailstore/message_store/debuglog/src/DebugLog.cpp
emailservices/emailstore/message_store/exe/exe.pro
emailservices/emailstore/message_store/exe/group/MessageStoreExe.mmp
emailservices/emailstore/message_store/server/group/MessageStoreServer.mmp
emailservices/emailstore/message_store/server/inc/MessageStoreSession.h
emailservices/emailstore/message_store/server/server.pro
emailservices/emailstore/message_store/server/src/ContainerStore.cpp
emailservices/emailstore/message_store/server/src/ContainerStoreAccountTable.cpp
emailservices/emailstore/message_store/server/src/ContainerStoreContainersTable.cpp
emailservices/emailstore/message_store/server/src/ContainerStoreMRUAddressTable.cpp
emailservices/emailstore/message_store/server/src/ContainerStoreSearchHandler.cpp
emailservices/emailstore/message_store/server/src/ContainerStoreSortingTable.cpp
emailservices/emailstore/message_store/server/src/MessageStoreServer.cpp
emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp
emailservices/emailstore/preinstall/group/EmailStorePreInstall.mmp
emailservices/emailstore/preinstall/preinstall.pro
emailservices/nmailagent/nmailagent.pro
emailservices/nmailbase/nmailbase.pro
emailservices/nmclientapi/bwins/nmailclientapiu.def
emailservices/nmclientapi/eabi/nmailclientapiu.def
emailservices/nmclientapi/inc/nmapiattachment_p.h
emailservices/nmclientapi/inc/nmapiengine.h
emailservices/nmclientapi/inc/nmapieventnotifier_p.h
emailservices/nmclientapi/inc/nmapiheaders.h
emailservices/nmclientapi/inc/nmapimessage_p.h
emailservices/nmclientapi/inc/nmapimessagecontent_p.h
emailservices/nmclientapi/inc/nmapimessageenvelope_p.h
emailservices/nmclientapi/inc/nmapimessagemanager_p.h
emailservices/nmclientapi/inc/nmapimessagesearch_p.h
emailservices/nmclientapi/inc/nmapiprivateclasses.h
emailservices/nmclientapi/inc/nmapitextcontent_p.h
emailservices/nmclientapi/inc/nmapitypesconverter.h
emailservices/nmclientapi/nmclientapi.pro
emailservices/nmclientapi/src/nmapiattachment.cpp
emailservices/nmclientapi/src/nmapiattachment_p.cpp
emailservices/nmclientapi/src/nmapiemailservice.cpp
emailservices/nmclientapi/src/nmapiengine.cpp
emailservices/nmclientapi/src/nmapieventnotifier.cpp
emailservices/nmclientapi/src/nmapieventnotifier_p.cpp
emailservices/nmclientapi/src/nmapimessage.cpp
emailservices/nmclientapi/src/nmapimessage_p.cpp
emailservices/nmclientapi/src/nmapimessagecontent.cpp
emailservices/nmclientapi/src/nmapimessagecontent_p.cpp
emailservices/nmclientapi/src/nmapimessageenvelope.cpp
emailservices/nmclientapi/src/nmapimessagemanager.cpp
emailservices/nmclientapi/src/nmapimessagemanager_p.cpp
emailservices/nmclientapi/src/nmapimessagesearch.cpp
emailservices/nmclientapi/src/nmapimessagesearch_p.cpp
emailservices/nmclientapi/src/nmapitextcontent.cpp
emailservices/nmclientapi/src/nmapitextcontent_p.cpp
emailservices/nmclientapi/src/nmapitypesconverter.cpp
emailservices/nmregister/nmregister.pro
emailservices/nmregister/nmregisterinstaller/nmregisterinstaller.cpp
emailservices/nmregister/nmregisterinstaller/nmregisterinstaller.pro
emailservices/nmutilities/bwins/nmutilitiesu.def
emailservices/nmutilities/data/2003EA97.txt
emailservices/nmutilities/eabi/nmutilitiesu.def
emailservices/nmutilities/inc/emailmru.h
emailservices/nmutilities/inc/nmcontacthistorymodel_p.h
emailservices/nmutilities/nmutilities.pro
emailservices/nmutilities/src/emailmru.cpp
emailservices/nmutilities/src/nmcontacthistorymodel.cpp
emailservices/nmutilities/src/nmcontacthistorymodel_p.cpp
emailservices/nmutilities/src/nmcontacthistorymodelitem.cpp
emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/emailmru_stub.cpp
emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/qtcontacts.h
emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.cpp
emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.h
emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.pro
emailuis/nmailcpplugin/nmailcpplugin.pro
emailuis/nmailui/conf/nmeditorview.docml
emailuis/nmailui/conf/nmmessagesearchlistview.docml
emailuis/nmailui/conf/nmviewerheader.css
emailuis/nmailui/inc/nmapplication.h
emailuis/nmailui/inc/nmeditorcontent.h
emailuis/nmailui/inc/nmmessagesearchlistview.h
emailuis/nmailui/inc/nmuiheaders.h
emailuis/nmailui/inc/nmuiviewids.h
emailuis/nmailui/inc/nmutilities.h
emailuis/nmailui/inc/nmviewerheader.h
emailuis/nmailui/inc/nmviewerview.h
emailuis/nmailui/nmailui.pro
emailuis/nmailui/src/main.cpp
emailuis/nmailui/src/nmapplication.cpp
emailuis/nmailui/src/nmeditorcontent.cpp
emailuis/nmailui/src/nmeditorview.cpp
emailuis/nmailui/src/nmmailboxserviceinterface.cpp
emailuis/nmailui/src/nmmessagelistview.cpp
emailuis/nmailui/src/nmmessagelistviewitem.cpp
emailuis/nmailui/src/nmmessagesearchlistview.cpp
emailuis/nmailui/src/nmrecipientfield.cpp
emailuis/nmailui/src/nmsendserviceinterface.cpp
emailuis/nmailui/src/nmuriserviceinterface.cpp
emailuis/nmailui/src/nmutilities.cpp
emailuis/nmailui/src/nmviewerheader.cpp
emailuis/nmailui/src/nmviewerserviceinterface.cpp
emailuis/nmailui/src/nmviewerview.cpp
emailuis/nmailui/translations/mail.qm
emailuis/nmailui/translations/mail.ts
emailuis/nmailuiengine/inc/nmuiengine.h
emailuis/nmailuiengine/nmailuiengine.pro
emailuis/nmailuiengine/src/nmbaseclientplugin.cpp
emailuis/nmailuiengine/src/nmuiengine.cpp
emailuis/nmailuiwidgets/bwins/nmailuiwidgetsu.def
emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def
emailuis/nmailuiwidgets/inc/nmailuiwidgetsheaders.h
emailuis/nmailuiwidgets/inc/nmeditortextedit.h
emailuis/nmailuiwidgets/inc/nmhtmllineedit.h
emailuis/nmailuiwidgets/inc/nmrecipientlineedit.h
emailuis/nmailuiwidgets/nmailuiwidgets.pro
emailuis/nmailuiwidgets/resources/nmattachmentlistwidget.docml
emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp
emailuis/nmailuiwidgets/src/nmeditortextedit.cpp
emailuis/nmailuiwidgets/src/nmhtmllineedit.cpp
emailuis/nmailuiwidgets/src/nmrecipientlineedit.cpp
emailuis/nmframeworkadapter/inc/nmframeworkadapter.h
emailuis/nmframeworkadapter/nmframeworkadapter.pro
emailuis/nmframeworkadapter/src/nmframeworkadapter.cpp
emailuis/nmhswidget/conf/nmhswidget.docml
emailuis/nmhswidget/conf/nmhswidgetlistviewitem.css
emailuis/nmhswidget/conf/nmhswidgetlistviewitem.widgetml
emailuis/nmhswidget/conf/nmhswidgetmail.docml
emailuis/nmhswidget/inc/nmhswidget.h
emailuis/nmhswidget/inc/nmhswidgetconsts.h
emailuis/nmhswidget/inc/nmhswidgetemailengine.h
emailuis/nmhswidget/inc/nmhswidgetemailrow.h
emailuis/nmhswidget/inc/nmhswidgetlistmodel.h
emailuis/nmhswidget/inc/nmhswidgetlistmodelitem.h
emailuis/nmhswidget/inc/nmhswidgetlistviewitem.h
emailuis/nmhswidget/nmhswidget.pro
emailuis/nmhswidget/nmhswidget.qrc
emailuis/nmhswidget/resources/nmhswidget.manifest
emailuis/nmhswidget/rom/nmhswidget.iby
emailuis/nmhswidget/sis/nmhswidget.pkg
emailuis/nmhswidget/sis/nmhswidget_stub.pkg
emailuis/nmhswidget/sis/nmhswidget_stub.sis
emailuis/nmhswidget/src/nmhswidget.cpp
emailuis/nmhswidget/src/nmhswidgetemailengine.cpp
emailuis/nmhswidget/src/nmhswidgetemailrow.cpp
emailuis/nmhswidget/src/nmhswidgetlistmodel.cpp
emailuis/nmhswidget/src/nmhswidgetlistmodelitem.cpp
emailuis/nmhswidget/src/nmhswidgetlistviewitem.cpp
emailuis/nmhswidget/src/nmhswidgettitlerow.cpp
emailuis/nmhswidget/translations/mailwidget.ts
emailuis/nmindicatorplugin/nmindicatorplugin.pro
emailuis/nmindicatorplugin/src/nmsendingindicator.cpp
emailuis/nmindicatorplugin/src/nmsyncindicator.cpp
emailuis/nmsettingui/inc/nmmailboxentryitem.h
emailuis/nmsettingui/inc/nmmailboxselectionview.h
emailuis/nmsettingui/inc/nmmailboxsettingview.h
emailuis/nmsettingui/inc/nmsettingsformcustomitems.h
emailuis/nmsettingui/inc/nmsettingsplugininterface.h
emailuis/nmsettingui/inc/nmsettingsviewfactory.h
emailuis/nmsettingui/inc/nmsettingsviewlauncher.h
emailuis/nmsettingui/nmsettingui.pro
emailuis/nmsettingui/src/nmmailboxentryitem.cpp
emailuis/nmsettingui/src/nmmailboxselectionview.cpp
emailuis/nmsettingui/src/nmmailboxsettingsmanager.cpp
emailuis/nmsettingui/src/nmmailboxsettingview.cpp
emailuis/nmsettingui/src/nmsettingsformcustomitems.cpp
emailuis/nmsettingui/src/nmsettingsviewfactory.cpp
inc/emailmru.h
ipsservices/ipssosaoplugin/inc/IpsSosAOImapPopLogic.h
ipsservices/ipssosaoplugin/ipssosaoplugin.pro
ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp
ipsservices/ipssosaoplugin/src/IpsSosAOImapPopLogic.cpp
ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp
ipsservices/ipssosaoplugin/src/IpsSosAOSettingsHandler.cpp
ipsservices/ipssosplugin/inc/ipsplgeventhandler.h
ipsservices/ipssosplugin/inc/ipsplgsosbaseplugin.h
ipsservices/ipssosplugin/ipssosplugin.pro
ipsservices/ipssosplugin/src/ipsplgeventhandler.cpp
ipsservices/ipssosplugin/src/ipsplgimap4moveremoteop.cpp
ipsservices/ipssosplugin/src/ipsplgimap4populateop.cpp
ipsservices/ipssosplugin/src/ipsplgmessagepartstoreroperation.cpp
ipsservices/ipssosplugin/src/ipsplgpop3fetchoperation.cpp
ipsservices/ipssosplugin/src/ipsplgsmtpoperation.cpp
ipsservices/ipssosplugin/src/ipsplgsosbaseplugin.cpp
ipsservices/nmimapclientplugin/nmimapclientplugin.pro
ipsservices/nmipsmtms/nmipsmtms.pro
ipsservices/nmipssettings/conf/nmipssettings.confml
ipsservices/nmipssettings/inc/nmipsimap4settingsmanager.h
ipsservices/nmipssettings/inc/nmipspop3settingsmanager.h
ipsservices/nmipssettings/inc/nmipssettingscustomitem.h
ipsservices/nmipssettings/inc/nmipssettingshelper.h
ipsservices/nmipssettings/inc/nmipssettingsplugin.h
ipsservices/nmipssettings/inc/nmipssettingstimeeditor.h
ipsservices/nmipssettings/nmipssettings.pro
ipsservices/nmipssettings/src/nmipsextendedsettingsmanager.cpp
ipsservices/nmipssettings/src/nmipsimap4settingsmanager.cpp
ipsservices/nmipssettings/src/nmipspop3settingsmanager.cpp
ipsservices/nmipssettings/src/nmipssettingshelper.cpp
ipsservices/nmipssettings/src/nmipssettingslabeledcombobox.cpp
ipsservices/nmipssettings/src/nmipssettingsmanagerbase.cpp
ipsservices/nmipssettings/src/nmipssettingsmanagerfactory.cpp
ipsservices/nmipssettings/src/nmipssettingsmultiselectionitem.cpp
ipsservices/nmipssettings/src/nmipssettingsplugin.cpp
ipsservices/nmipssettings/src/nmipssettingstimeeditor.cpp
ipsservices/nmipssettings/translations/mailips.qm
ipsservices/nmipssettings/translations/mailips.ts
ipsservices/nmpopclientplugin/nmpopclientplugin.pro
nmail.pro
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/contact_history_model_api/contact_history_model_api.metaxml	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="d5d80d5a65bbd92e5f8f507d9d809c52" dataversion="2.0">
+  <name>Contact History Model API</name>
+  <description>API for getting MVC model for stored contact history email addresses.</description>
+  <type>c++</type>
+  <collection>commonemail</collection>
+  <libs>
+    <lib name="nmutilies.lib"/>
+  </libs>
+  <release category="platform" sinceversion=""/>
+  <attributes>
+    <htmldocprovided>no</htmldocprovided>
+    <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/contact_history_model_api/contact_history_model_api.pri	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,23 @@
+#
+# 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:
+#
+#
+
+symbian*: { 
+    # Build.inf rules
+    BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
+     "contact_history_model_api/inc/nmcontacthistorymodel.h APP_LAYER_PLATFORM_EXPORT_PATH(nmcontacthistorymodel.h)" \
+     "contact_history_model_api/inc/nmcontacthistorymodelcommon.h APP_LAYER_PLATFORM_EXPORT_PATH(nmcontacthistorymodelcommon.h)"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/contact_history_model_api/inc/nmcontacthistorymodel.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,142 @@
+/*
+* 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: Public declaration of Contact History Model API
+*
+*/
+#ifndef NMCONTACTHISTORYMODEL_H
+#define NMCONTACTHISTORYMODEL_H
+
+#include <QAbstractListModel>
+#include <QSharedDataPointer>
+
+#include "nmcontacthistorymodelcommon.h"
+
+// NmContactHistoryModelSubItem - display name is one item, email address/phone number another
+class NmContactHistoryModelSubItem
+{
+public:
+
+inline NmContactHistoryModelSubItem()
+{
+}
+
+inline ~NmContactHistoryModelSubItem()
+{
+}
+    // email address, or concatenated firstName+' '+lastName.
+    QString mItemText;
+    // amount of items in mMatchingRanges is 2*mItemTexts.length() because for each text there is begin/end index
+    // TODO: Fix above^ always two indeces
+    // for example "Ville Virtanen" with query "vi" returns indeces 0,1,6,7
+    QList<int> mMatchingRanges;
+};
+
+class NmContactHistoryModelPrivate;
+class NmContactHistoryModelItemData;
+
+class NMCHMAPI_EXPORT NmContactHistoryModelItem
+{
+public:
+    NmContactHistoryModelItem();
+    NmContactHistoryModelItem(const NmContactHistoryModelItem &other);
+    ~NmContactHistoryModelItem();
+
+public:
+    // contact id is 0xDEAD if not associated with a contact item
+    unsigned int contactId() const;
+
+    void setContactId(unsigned int contactId);
+
+    int subItemCount() const;
+
+    NmContactHistoryModelSubItem subItemAt(int index) const;
+
+    // First entry is display name, second email address.
+    QList<NmContactHistoryModelSubItem> subEntries() const;
+
+    void appendSubItem(NmContactHistoryModelSubItem entry);
+
+private:
+     //
+    QSharedDataPointer<NmContactHistoryModelItemData> d;
+};
+Q_DECLARE_METATYPE(NmContactHistoryModelItem)
+
+/**
+ * Model for contact history queries.
+ *
+ */
+class NMCHMAPI_EXPORT NmContactHistoryModel : public QAbstractListModel
+{
+    Q_OBJECT
+
+public: // The exported API
+
+    /**
+     * Constructor
+     * @param modelType
+     */
+    explicit NmContactHistoryModel(
+        const NmContactHistoryModelType modelType);
+
+    /**
+     * Destructor
+     */
+    ~NmContactHistoryModel();
+
+public: // From QAbstractItemModel
+
+    /**
+     * Get number of rows currently in the model.
+     * @return number of rows
+     */
+    virtual int rowCount(const QModelIndex &parent) const;
+
+    /**
+     * Get various data from the model. Fetched data type is defined
+     * by role input parameter. Only Qt::DisplayRole is supported.
+     */
+    virtual QVariant data(const QModelIndex &index, int role) const;
+
+signals:
+
+    /**
+     * Signaled once model is ready.
+     * @param err, 0 if building model was success
+     */
+    void modelCompleted(int err);
+
+public slots:
+
+    // TODO: query could keep previous query in order to check if results will only get narrowed (a char is appended)
+    void query(const QString &query);
+
+private slots:
+
+    /**
+     * Signaled once query is completed, emits modelCompleted.
+     * @param err, 0 if building model was success
+     */
+    void handleQueryCompleted(int err);
+
+private:
+    /*
+     * Private Implementation
+     * Own
+     */
+    NmContactHistoryModelPrivate *d_ptr;
+
+};
+
+#endif //NMCONTACTHISTORYMODEL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/contact_history_model_api/inc/nmcontacthistorymodelcommon.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,32 @@
+/*
+ * 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:  common header for contact history model.
+ *
+ */
+
+#ifndef NMCONTACTHISTORYMODELCOMMONHEADERS_H_
+#define NMCONTACTHISTORYMODELCOMMONHEADERS_H_
+
+    enum NmContactHistoryModelType {
+        EmailAddressModel,
+        PhoneNumberModel
+    };
+
+ #if defined(NMCHMAPI_LIBRARY)
+ #define NMCHMAPI_EXPORT Q_DECL_EXPORT
+ #else
+ #define NMCHMAPI_EXPORT Q_DECL_IMPORT
+ #endif
+
+#endif /* NMCONTACTHISTORYMODELCOMMONHEADERS_H_ */
--- a/email_plat/email_plat.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/email_plat.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -22,4 +22,5 @@
     include(nmail_settings_api/nmail_settings_api.pri)
     include(nmail_client_api/nmail_client_api.pri)
     include(email_client_api/email_client_api.pri)
+    include(contact_history_model_api/contact_history_model_api.pri)    
 }
--- a/email_plat/email_services_api/email_services_api.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/email_services_api/email_services_api.h	Mon Oct 04 00:05:37 2010 +0300
@@ -44,10 +44,14 @@
 static const QString emailSendToKey = "to";
 static const QString emailSendCcKey = "cc";
 static const QString emailSendBccKey = "bcc";
+
+// MIME type for body text, e.g. "text/html". If this key is not defined,
+// emailSendBodyValueKey is treated as "text/plain".
+static const QString emailSendBodyMimeTypeKey = "mimeType";
+
 static const QString emailSendBodyTextKey = "body";
 static const QString emailSendAttachmentKey = "attachment";
 
-
 /*!
     Mail service name
 */
@@ -157,7 +161,7 @@
                  given mailbox and folder IDs) into the view stack. This means
                  that when the back button is pressed from the viewer view, the
                  message list view will be shown.
-                     
+
     \return 1 if message was opened. 0 if one of the IDs was incorrect.
 
 
--- a/email_plat/nmail_client_api/nmail_client_api.pri	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/nmail_client_api/nmail_client_api.pri	Mon Oct 04 00:05:37 2010 +0300
@@ -31,5 +31,11 @@
             "nmail_client_api/nmapimessagebody.h       APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessagebody.h)" \
             "nmail_client_api/nmapimessageenvelope.h   APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessageenvelope.h)" \
             "nmail_client_api/nmapimessagetask.h       APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessagetask.h)" \
-            "nmail_client_api/nmapimessagemanager.h    APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessagemanager.h)"
+            "nmail_client_api/nmapimessagemanager.h    APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessagemanager.h)" \
+            "nmail_client_api/nmapimessagesearch.h     APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessagesearch.h)" \
+            "nmail_client_api/nmapimessage.h           APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessage.h)" \
+            "nmail_client_api/nmapimessagecontent.h    APP_LAYER_PLATFORM_EXPORT_PATH(nmapimessagecontent.h)" \
+            "nmail_client_api/nmapitextcontent.h       APP_LAYER_PLATFORM_EXPORT_PATH(nmapitextcontent.h)" \
+            "nmail_client_api/nmapiattachment.h        APP_LAYER_PLATFORM_EXPORT_PATH(nmapiattachment.h)"
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/nmail_client_api/nmapiattachment.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,47 @@
+/*
+ * 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:
+ *     Email message attachment public header.
+ */
+
+#ifndef NMAPIATTACHMENT_H_
+#define NMAPIATTACHMENT_H_
+
+#include <QString>
+#include <xqsharablefile.h>
+#include <nmapimessagecontent.h>
+#include <nmapidef.h>
+
+namespace EmailClientApi
+{
+class NmApiAttachmentPrivate;
+
+class NMAPI_EXPORT NmApiAttachment : public NmApiMessageContent
+{
+public:
+    NmApiAttachment();
+    virtual ~NmApiAttachment();
+
+    QString fileName();
+    XQSharableFile file();
+
+    void setFileName(const QString &fileName);
+
+private:
+    
+    NmApiAttachmentPrivate *d;
+};
+}
+
+#endif /* NMAPIATTACHMENT_H_ */
--- a/email_plat/nmail_client_api/nmapicommon.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/nmail_client_api/nmapicommon.h	Mon Oct 04 00:05:37 2010 +0300
@@ -29,7 +29,40 @@
     {
         MailboxCreated, MailboxDeleted
     };
-    
+
+    /*!
+        Email to message priority
+     */
+    enum NmApiMessagePriority
+    {
+        NmApiMessagePriorityLow,
+        NmApiMessagePriorityNormal,
+        NmApiMessagePriorityHigh
+    };
+
+    /*!
+        Enum to message flags
+     */
+    enum NmApiMessageFlag 
+    {
+        NmApiMessageFlagRead = 1,
+        NmApiMessageFlagReadLocally = 2,
+        NmApiMessageFlagLow = 4,
+        NmApiMessageFlagImportant = 8,
+        NmApiMessageFlagFollowUpComplete = 16,
+        NmApiMessageFlagFollowUp = 32,
+        NmApiMessageFlagAttachments = 64,
+        NmApiMessageFlagMultiple = 128,
+        NmApiMessageFlagCalendarMsg = 256,
+        NmApiMessageFlagAnswered = 512,
+        NmApiMessageFlagForwarded = 1024,
+        NmApiMessageFlagOnlyToMe = 2048,
+        NmApiMessageFlagRemoteDeleted = 4096,
+        NmApiMessageFlagHasMsgSender = 8192
+    };
+    Q_DECLARE_FLAGS(NmApiMessageFlags, NmApiMessageFlag)
+    Q_DECLARE_OPERATORS_FOR_FLAGS(NmApiMessageFlags)
+
     /*!
        Enum to describe message events.
      */
@@ -47,6 +80,33 @@
     {
         Inbox, Drafts, Outbox, Sent, Deleted, EOther
     };
+
+    /*!
+        Email list sorting options
+     */
+    enum NmApiMailSortField
+        {
+        MailDontCare,            // user accepts any sort order
+        MailSortByDate,          // sorting is done by date
+        MailSortBySender,        // sorting is done by sender
+        MailSortByRecipient,     // sorting is done by recipients
+        MailSortBySubject,       // sorting is done by subject
+        MailSortByPriority,      // sorting is done by priority
+        MailSortByFlagStatus,    // follow up and completed   
+        MailSortByUnread,        // sorting is based on unread
+        MailSortBySize,          // sorting is done by size
+        MailSortByAttachment     // sorting is based on if message has attachments
+        };
+
+    /*!
+        Email list sort order
+     */
+    enum NmApiMailSortOrder
+        {
+        MailDescending,
+        MailAscending    
+        };
+
     
     /*!
        Enum to describe error types
@@ -56,6 +116,37 @@
         GeneralError = -1, NotSupportedError
     };
     
+    /*!
+        Sort criteria definion Class for searching email messages
+     */
+    class NmApiMailSortCriteria 
+        {
+        public:
+            NmApiMailSortField iField;
+            NmApiMailSortOrder iOrder;
+        };
+    
+    /*!
+        NmApi error codes
+    */
+    const int NmApiNoError = 0;
+    const int NmApiNotFoundError = -1;
+    const int NmApiGeneralError = -2;
+    const int NmApiCancelError = -3;
+    
+    /*!
+        NmApi predefined constants for ContentTypes
+    */
+    const QString NmApiContentTypeMultipartMixed = "multipart/mixed";
+    const QString NmApiContentTypeMultipartAlternative = "multipart/alternative";
+    const QString NmApiContentTypeMultipartDigest = "multipart/digest";
+    const QString NmApiContentTypeMultipartParallel = "multipart/parallel";
+    const QString NmApiContentTypeMultipartRelated =  "multipart/related";
+    const QString NmApiContentTypeTextPlain = "text/plain";
+    const QString NmApiContentTypeTextHtml = "text/html";
+    const QString NmApiContentTypeTypeMessage = "message/rfc822";
+    const QString NmApiContentTypeParamName = " name=";
+    const QString NmApiContentTypeParamCharset = " charset=";
 }
 Q_DECLARE_METATYPE (EmailClientApi::NmApiMailboxEvent)
 Q_DECLARE_METATYPE(EmailClientApi::NmApiMessageEvent)
--- a/email_plat/nmail_client_api/nmapiemailservice.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/nmail_client_api/nmapiemailservice.h	Mon Oct 04 00:05:37 2010 +0300
@@ -33,6 +33,7 @@
 
 class NmApiMessageEnvelope;
 class NmApiMailbox;
+class NmApiMessage;
 
 class NMAPI_EXPORT NmApiEmailService : public QObject
 {
@@ -74,6 +75,16 @@
     bool getMailbox(const quint64 mailboxId, EmailClientApi::NmApiMailbox &mailboxInfo);
 
     /*!
+       gets mail message by id (see also NmApiEventNotifier)
+     */
+    bool getMessage(const quint64 mailboxId, 
+                     const quint64 folderId, 
+                     const quint64 messageId, 
+                     EmailClientApi::NmApiMessage &message);
+
+
+    
+    /*!
        returns isrunning flag value
      */
     bool isRunning() const;
--- a/email_plat/nmail_client_api/nmapieventnotifier.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/nmail_client_api/nmapieventnotifier.h	Mon Oct 04 00:05:37 2010 +0300
@@ -22,7 +22,7 @@
 #include <nmapidef.h>
 #include <nmapicommon.h>
 
-struct NmApiMessage;
+struct NmApiEvent;
 
 namespace EmailClientApi
 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/nmail_client_api/nmapimessage.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* 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:
+*		Api's email message class.
+*/
+
+#ifndef NMAPIMESSAGE_H_
+#define NMAPIMESSAGE_H_
+
+#include <nmapitextcontent.h>
+#include <nmapiattachment.h>
+#include <nmapimessageenvelope.h>
+#include <nmapidef.h>
+#include <QMetaType>
+
+namespace EmailClientApi
+{
+class NmApiMessagePrivate;
+class NmApiMessageEnvelope;
+
+class NMAPI_EXPORT NmApiMessage
+{
+public:
+    NmApiMessage();
+    virtual ~NmApiMessage();
+
+    NmApiTextContent plainTextContent();
+    NmApiTextContent htmlContent();
+    bool isComplete();
+    QList<NmApiAttachment> attachments();
+    void addAttachment(NmApiAttachment &attachment);
+    NmApiMessageEnvelope& envelope();
+    void setPlainTextContent(NmApiTextContent &textContent);
+    void setHtmlContent(NmApiTextContent &textContent);
+    void setComplete(bool complete);
+    void setAttachments(QList<NmApiAttachment> &attachments);
+    void setEnvelope(NmApiMessageEnvelope &envelope);
+    
+private:
+    
+    NmApiMessagePrivate *d;
+};
+} // namespace EmailClientApi
+
+Q_DECLARE_METATYPE(EmailClientApi::NmApiMessage)
+
+#endif /* NMAPIMESSAGE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/nmail_client_api/nmapimessagecontent.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* 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:
+*       Email message content public header.
+*/
+
+#ifndef NMAPIMESSAGECONTENT_H_
+#define NMAPIMESSAGECONTENT_H_
+
+#include <nmapidef.h>
+
+namespace EmailClientApi
+{
+class NmApiMessageContentPrivate;
+
+class NMAPI_EXPORT NmApiMessageContent
+{
+public:
+    NmApiMessageContent();
+    virtual ~NmApiMessageContent();
+
+    QString contentType() const;
+    bool isComplete();
+    quint32 size() const;
+    quint64 id() const;
+    
+    void setContentType(const QString &contentType);
+    void setComplete(bool complete);
+    void setSize(quint32 size);
+    void setId(quint64 id);
+
+private:
+    
+    NmApiMessageContentPrivate *d;
+};
+}
+#endif /*NMAPIMESSAGECONTENT_H_ */
--- a/email_plat/nmail_client_api/nmapimessageenvelope.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/nmail_client_api/nmapimessageenvelope.h	Mon Oct 04 00:05:37 2010 +0300
@@ -23,6 +23,7 @@
 #include <QList>
 
 #include <nmapidef.h>
+#include <nmapicommon.h>
 
 class QString;
 class QDateTime;
@@ -72,6 +73,11 @@
     quint64 parentFolder() const;
 
     /*!
+       getter for id of mailbox
+     */
+    quint64 mailboxId() const;
+    
+    /*!
        getter for subject
      */
     QString subject() const;
@@ -92,6 +98,11 @@
     void getCcRecipients(QList<EmailClientApi::NmApiEmailAddress> &ccRecipients);
 
     /*!
+       getter for bcc recipients
+     */
+    void getBccRecipients(QList<EmailClientApi::NmApiEmailAddress> &bccRecipients);
+
+    /*!
        getter for sent time
      */
     QDateTime sentTime() const;
@@ -142,6 +153,21 @@
     quint64 fetchedSize() const;
 
     /*!
+        getter for priority
+     */
+    NmApiMessagePriority priority() const;
+
+    /*!
+        getter for flags
+     */
+    NmApiMessageFlags flags() const;
+
+    /*!
+        getter for flag
+     */
+     bool isFlagSet(const NmApiMessageFlag flag) const;
+
+    /*!
        setter for id 
      */
     void setId(quint64 id);
@@ -152,6 +178,11 @@
     void setParentFolder(quint64 parentFolder);
 
     /*!
+       setter for mailbox id
+     */
+    void setMailboxId(quint64 mailboxId);
+    
+    /*!
        setter for subject 
      */
     void setSubject(const QString &subject);
@@ -172,6 +203,11 @@
     void setCcRecipients(const QList<EmailClientApi::NmApiEmailAddress> &ccRecipients);
 
     /*!
+       setter for bcc recipients 
+     */
+    void setBccRecipients(const QList<EmailClientApi::NmApiEmailAddress> &bccRecipients);
+
+    /*!
        setter for sent time 
      */
     void setSentTime(QDateTime sentTime);
@@ -202,20 +238,35 @@
     void setContentType(const QString &contentType);
 
     /*!
-       getter for messages plain text 
+       setter for messages plain text 
      */
     void setPlainText(const QString &plainText);
 
     /*!
-       getter for messages fetched size 
+       setter for messages fetched size 
      */
     void setTotalSize(quint64 totalSize);
 
     /*!
-       getter for messages fetched size 
+       setter for messages fetched size 
      */
     void setFetchedSize(quint64 fetchedSize);
 
+    /*!
+       setter for priority
+     */
+    void setPriority(NmApiMessagePriority forwarded);
+
+    /*!
+        setter for flags
+     */
+    void setFlags(const NmApiMessageFlags flags, bool set);
+
+    /*!
+        setter for flag
+     */
+    void setFlag(const NmApiMessageFlag flag, bool set);
+
 private:
     QExplicitlySharedDataPointer<NmApiMessageEnvelopePrivate> d;
 };
--- a/email_plat/nmail_client_api/nmapimessagemanager.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/email_plat/nmail_client_api/nmapimessagemanager.h	Mon Oct 04 00:05:37 2010 +0300
@@ -20,65 +20,49 @@
 
 #include <QObject>
 #include <QList>
+#include <QVariant>
 
 #include <nmapidef.h>
-
-struct NmApiMessage;
-class NmApiEmailMessage;
+#include <nmapimessage.h>
 
 namespace EmailClientApi {
 
-class NmApiFolder;
 class NmApiMessageManagerPrivate;
 
 class NMAPI_EXPORT NmApiMessageManager : public QObject
 {
     Q_OBJECT
-	
 public:
-    NmApiMessageManager(quint64 mailboxId,QObject *parent = 0);
+    NmApiMessageManager(QObject *parent,quint64 mailboxId);
 
     virtual ~NmApiMessageManager();
 
 public slots:
     bool createDraftMessage(const QVariant *initData);
     
-    bool createForwardMessage(const QVariant *initData);
+    bool createForwardMessage(NmApiMessage *orig,const QVariant *initData);
     
-    bool createReplyMessage(const QVariant *initData,bool replyAll);
+    bool createReplyMessage(const NmApiMessage *orig,const QVariant *initData,bool replyAll);
     
-    bool moveMessages(const QList<quint64> messageIds,
-		quint64 sourceFolderId,quint64 targetFolderId);
+    bool moveMessages(const QList<quint64> messageIds,quint64 sourceFolderId,quint64 targetFolderId);
     
-    bool copyMessages(const QList<quint64> messageIds,					
-					quint64 sourceFolder,
-					quint64 targetFolder);
-    
-    bool saveMessage(const ::NmApiMessage &message);
+    bool saveMessage(const NmApiMessage &message);
     
     bool deleteMessages(const QList<quint64> messageIds);
     
-    bool fetch(const NmApiMessage &message);
-    
-    bool send(const NmApiMessage &message);
+    bool fetchMessage(quint64 messageId);
     
-    bool createAttachment(NmApiEmailMessage &message,const QVariant &attachmenSpec);
-
-    bool removeAttachment(NmApiEmailMessage &message,quint64 attachmentId);
+    bool sendMessage(const NmApiMessage &message);
     
-signals:
-	void messagesCopied(int result);
-
-	void messagesCreated(int result);
+    bool createAttachment(NmApiMessage &message,const QVariant &attachmenSpec);
 
-	void messagesMoved(int result);
-
-	void messagesDeleted(int result);
-
+    bool removeAttachment(NmApiMessage &message,quint64 attachmentId);
+    
+	bool fetchAttachment(const NmApiMessage &relatedMessage,quint64 attachmentId);
+	
 private:
-	NmApiMessageManagerPrivate *d;
+    NmApiMessageManagerPrivate* d;
 };
 
-}
-
-#endif
+} // namespace EmailClientApi
+#endif /*NMAPIMESSAGEMANAGER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/nmail_client_api/nmapimessagesearch.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,60 @@
+/*
+ * 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:
+ *     Email messages search public header.
+ */
+
+#ifndef NMAPIMESSAGESEARCH_H_
+#define NMAPIMESSAGESEARCH_H_
+
+#include <nmapidef.h>
+#include <nmapimessagetask.h>
+#include <nmapicommon.h>
+#include <nmapimessage.h>
+
+class NmApiMessageSearchPrivate;
+
+namespace EmailClientApi 
+{
+
+class NMAPI_EXPORT NmApiMessageSearch : public NmApiMessageTask
+{
+    Q_OBJECT
+public:
+    NmApiMessageSearch(QObject *parent, quint64 mailboxId);
+
+    virtual ~NmApiMessageSearch();
+    
+    bool isRunning() const;
+
+    bool initialise(const QList<QString> &searchStrings, EmailClientApi::NmApiMailSortCriteria sortCriteria);
+
+public slots: 
+
+    bool start();
+
+    void cancel();
+    
+signals:
+
+    void messageFound(EmailClientApi::NmApiMessage &message);
+
+    void searchComplete(int result = NmApiNoError);
+
+private:
+    NmApiMessageSearchPrivate* d;
+};
+
+} // namespace EmailClientApi
+#endif /* NMAPIMESSAGESEARCH_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/nmail_client_api/nmapitextcontent.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,45 @@
+/*
+ * 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:
+ *     Email message text content public header.
+ */
+
+#ifndef NMAPITEXTCONTENT_H_
+#define NMAPITEXTCONTENT_H_
+
+#include <QString>
+
+#include <nmapimessagecontent.h>
+#include <nmapidef.h>
+
+namespace EmailClientApi
+{
+class NmApiTextContentPrivate;
+
+class NMAPI_EXPORT NmApiTextContent : public NmApiMessageContent
+{
+public:
+    NmApiTextContent();
+    virtual ~NmApiTextContent();
+
+    QString content() const;
+    void setContent(const QString &content);
+
+private:
+    
+    NmApiTextContentPrivate *d;
+};
+}
+
+#endif /* NMAPITEXTCONTENT_H_ */
--- a/emailservices/emailclientapi/emailclientapi.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailclientapi/emailclientapi.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -94,6 +94,7 @@
         "$${LITERAL_HASH}endif"
 
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
     
     BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
     "rom/emailclientapi.iby CORE_APP_LAYER_IBY_EXPORT_PATH(emailclientapi.iby)"    
--- a/emailservices/emailcommon/bwins/fsfwcommonlibu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/bwins/fsfwcommonlibu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -30,55 +30,55 @@
 	?AddPluginL@CFSMailRequestHandler@@QAEXVTUid@@PAVCFSMailPlugin@@@Z @ 29 NONAME ; void CFSMailRequestHandler::AddPluginL(class TUid, class CFSMailPlugin *)
 	?SetContentDisposition@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 30 NONAME ; void CFSMailMessagePart::SetContentDisposition(class TDesC16 const &)
 	??1CFSMailMessageBase@@UAE@XZ @ 31 NONAME ; CFSMailMessageBase::~CFSMailMessageBase(void)
-	?CurrentSyncState@CFSMailBox@@QBE?AW4TSSMailSyncState@@XZ @ 32 NONAME ; enum TSSMailSyncState CFSMailBox::CurrentSyncState(void) const
-	?NewL@CFSMailFolderBase@@SAPAV1@VTFSMailMsgId@@@Z @ 33 NONAME ; class CFSMailFolderBase * CFSMailFolderBase::NewL(class TFSMailMsgId)
-	?SetAttachmentNameL@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 34 NONAME ; void CFSMailMessagePart::SetAttachmentNameL(class TDesC16 const &)
-	?GetMessageCount@CFSMailFolderBase@@QBEIXZ @ 35 NONAME ; unsigned int CFSMailFolderBase::GetMessageCount(void) const
-	?RemoveChildPartL@CFSMailMessagePart@@QAEXVTFSMailMsgId@@@Z @ 36 NONAME ; void CFSMailMessagePart::RemoveChildPartL(class TFSMailMsgId)
-	?SaveMessagePartsL@CFSMailMessage@@QAEHAAVMFSMailRequestObserver@@@Z @ 37 NONAME ; int CFSMailMessage::SaveMessagePartsL(class MFSMailRequestObserver &)
-	?MoveMessagesL@CFSMailBox@@QAEXABV?$RArray@VTFSMailMsgId@@@@VTFSMailMsgId@@1@Z @ 38 NONAME ; void CFSMailBox::MoveMessagesL(class RArray<class TFSMailMsgId> const &, class TFSMailMsgId, class TFSMailMsgId)
-	?GetFolderName@CFSMailFolderBase@@QBEAAVTDesC16@@XZ @ 39 NONAME ; class TDesC16 & CFSMailFolderBase::GetFolderName(void) const
-	?GetDisplayName@CFSMailAddress@@QBEAAVTDesC16@@XZ @ 40 NONAME ; class TDesC16 & CFSMailAddress::GetDisplayName(void) const
-	?ConstructL@CFSMailFolderBase@@IAEXVTFSMailMsgId@@@Z @ 41 NONAME ; void CFSMailFolderBase::ConstructL(class TFSMailMsgId)
-	?SetSubject@CFSMailMessageBase@@QAEXABVTDesC16@@@Z @ 42 NONAME ; void CFSMailMessageBase::SetSubject(class TDesC16 const &)
-	?CreateReplyMessage@CFSMailBox@@QAEPAVCFSMailMessage@@VTFSMailMsgId@@HABVTDesC16@@@Z @ 43 NONAME ; class CFSMailMessage * CFSMailBox::CreateReplyMessage(class TFSMailMsgId, int, class TDesC16 const &)
-	?CopyContentFileL@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 44 NONAME ; void CFSMailMessagePart::CopyContentFileL(class TDesC16 const &)
-	??1CFSMailBoxBase@@UAE@XZ @ 45 NONAME ; CFSMailBoxBase::~CFSMailBoxBase(void)
-	?NewLC@CFSMailBox@@SAPAV1@VTFSMailMsgId@@@Z @ 46 NONAME ; class CFSMailBox * CFSMailBox::NewLC(class TFSMailMsgId)
-	?GetParentFolderId@CFSMailFolderBase@@QBE?AVTFSMailMsgId@@XZ @ 47 NONAME ; class TFSMailMsgId CFSMailFolderBase::GetParentFolderId(void) const
-	?ConstructL@CFSMailMessageBase@@IAEXABVNmMessageEnvelope@@@Z @ 48 NONAME ; void CFSMailMessageBase::ConstructL(class NmMessageEnvelope const &)
-	?ReleaseExtension@CFSMailMessageBase@@UAEXPAVCEmailExtension@@@Z @ 49 NONAME ; void CFSMailMessageBase::ReleaseExtension(class CEmailExtension *)
-	??_ECFSMailRequestHandler@@UAE@I@Z @ 50 NONAME ; CFSMailRequestHandler::~CFSMailRequestHandler(unsigned int)
-	?NewLC@CFSMailFolder@@SAPAV1@VTFSMailMsgId@@@Z @ 51 NONAME ; class CFSMailFolder * CFSMailFolder::NewLC(class TFSMailMsgId)
-	?NewL@CFSMailAddress@@SAPAV1@XZ @ 52 NONAME ; class CFSMailAddress * CFSMailAddress::NewL(void)
-	?IsMessageL@CFSMailMessagePart@@UBEHXZ @ 53 NONAME ; int CFSMailMessagePart::IsMessageL(void) const
-	?Uid@CEmailExtension@@QBE?AVTUid@@XZ @ 54 NONAME ; class TUid CEmailExtension::Uid(void) const
-	?GetNmMessage@CFSMailMessage@@QAEPAVNmMessage@@XZ @ 55 NONAME ; class NmMessage * CFSMailMessage::GetNmMessage(void)
-	?GetContentToBufferL@CFSMailMessagePart@@QAEXAAVTDes16@@I@Z @ 56 NONAME ; void CFSMailMessagePart::GetContentToBufferL(class TDes16 &, unsigned int)
-	?AddNewAttachmentL@CFSMailMessagePart@@QAEPAV1@ABVTDesC16@@VTFSMailMsgId@@0@Z @ 57 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::AddNewAttachmentL(class TDesC16 const &, class TFSMailMsgId, class TDesC16 const &)
-	?BlockCopyFromL@CFSMailFolderBase@@QAEXV?$RArray@W4TFSFolderType@@@@W4TFSMailBoxStatus@@@Z @ 58 NONAME ; void CFSMailFolderBase::BlockCopyFromL(class RArray<enum TFSFolderType>, enum TFSMailBoxStatus)
-	?GetSender@CFSMailMessageBase@@QBEPAVCFSMailAddress@@XZ @ 59 NONAME ; class CFSMailAddress * CFSMailMessageBase::GetSender(void) const
-	?ClearSearchResultCache@CFSMailBox@@QAEXXZ @ 60 NONAME ; void CFSMailBox::ClearSearchResultCache(void)
-	?CancelRequestL@CFSMailRequestHandler@@QAEXH@Z @ 61 NONAME ; void CFSMailRequestHandler::CancelRequestL(int)
-	?ExtensionL@CFSMailBox@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 62 NONAME ; class CEmailExtension * CFSMailBox::ExtensionL(class TUid const &)
-	?GetMailBoxId@CFSMailMessageBase@@QBE?AVTFSMailMsgId@@XZ @ 63 NONAME ; class TFSMailMsgId CFSMailMessageBase::GetMailBoxId(void) const
-	?ExtensionL@CExtendableEmail@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 64 NONAME ; class CEmailExtension * CExtendableEmail::ExtensionL(class TUid const &)
-	?ListFolders@CFSMailBox@@QAEXVTFSMailMsgId@@AAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 65 NONAME ; void CFSMailBox::ListFolders(class TFSMailMsgId, class RPointerArray<class CFSMailFolder> &)
-	?NewL@CFSMailMessage@@SAPAV1@ABVNmMessage@@@Z @ 66 NONAME ; class CFSMailMessage * CFSMailMessage::NewL(class NmMessage const &)
-	?HtmlBodyPartL@CFSMailMessage@@QAEPAVCFSMailMessagePart@@W4TFSMailMessagePartDataSource@2@@Z @ 67 NONAME ; class CFSMailMessagePart * CFSMailMessage::HtmlBodyPartL(enum CFSMailMessagePart::TFSMailMessagePartDataSource)
-	?ContentDescription@CFSMailMessagePart@@QAEABVTDesC16@@XZ @ 68 NONAME ; class TDesC16 const & CFSMailMessagePart::ContentDescription(void)
-	?SendMessageL@CFSMailBox@@QAEHAAVCFSMailMessage@@AAVMFSMailRequestObserver@@@Z @ 69 NONAME ; int CFSMailBox::SendMessageL(class CFSMailMessage &, class MFSMailRequestObserver &)
-	?GetFolderType@CFSMailFolderBase@@QBE?AW4TFSFolderType@@XZ @ 70 NONAME ; enum TFSFolderType CFSMailFolderBase::GetFolderType(void) const
-	?GetEmailAddress@CFSMailAddress@@QBEAAVTDesC16@@XZ @ 71 NONAME ; class TDesC16 & CFSMailAddress::GetEmailAddress(void) const
-	?FSMailSortCriteria2NM@NmConverter@@SA?AVNmMailSortCriteria@@VTFSMailSortCriteria@@@Z @ 72 NONAME ; class NmMailSortCriteria NmConverter::FSMailSortCriteria2NM(class TFSMailSortCriteria)
-	?NewL@CFSMailBox@@SAPAV1@VTFSMailMsgId@@@Z @ 73 NONAME ; class CFSMailBox * CFSMailBox::NewL(class TFSMailMsgId)
-	?CreateMessageToSendL@CFSMailBox@@QAEHAAVMFSMailRequestObserver@@@Z @ 74 NONAME ; int CFSMailBox::CreateMessageToSendL(class MFSMailRequestObserver &)
-	?FetchMessagesL@CFSMailFolder@@QAEHABV?$RArray@VTFSMailMsgId@@@@W4TFSMailDetails@@AAVMFSMailRequestObserver@@@Z @ 75 NONAME ; int CFSMailFolder::FetchMessagesL(class RArray<class TFSMailMsgId> const &, enum TFSMailDetails, class MFSMailRequestObserver &)
-	?ContentID@CFSMailMessagePart@@QAEABVTDesC16@@XZ @ 76 NONAME ; class TDesC16 const & CFSMailMessagePart::ContentID(void)
-	?RemoveChildPartL@CFSMailMessagePart@@QAEHVTFSMailMsgId@@AAVMFSMailRequestObserver@@@Z @ 77 NONAME ; int CFSMailMessagePart::RemoveChildPartL(class TFSMailMsgId, class MFSMailRequestObserver &)
-	??1CFSMailFolder@@UAE@XZ @ 78 NONAME ; CFSMailFolder::~CFSMailFolder(void)
-	?toQDateTime@NmConverter@@SA?AVQDateTime@@ABVTTime@@@Z @ 79 NONAME ; class QDateTime NmConverter::toQDateTime(class TTime const &)
-	?GetContentFileL@CFSMailMessagePart@@QAE?AVRFile@@XZ @ 80 NONAME ; class RFile CFSMailMessagePart::GetContentFileL(void)
+	?GetTempFileL@CFSMailRequestHandler@@QAE?AVRFile@@VTFSMailMsgId@@AAV?$TBuf@$0BAA@@@@Z @ 32 NONAME ; class RFile CFSMailRequestHandler::GetTempFileL(class TFSMailMsgId, class TBuf<256> &)
+	?CurrentSyncState@CFSMailBox@@QBE?AW4TSSMailSyncState@@XZ @ 33 NONAME ; enum TSSMailSyncState CFSMailBox::CurrentSyncState(void) const
+	?NewL@CFSMailFolderBase@@SAPAV1@VTFSMailMsgId@@@Z @ 34 NONAME ; class CFSMailFolderBase * CFSMailFolderBase::NewL(class TFSMailMsgId)
+	?SetAttachmentNameL@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 35 NONAME ; void CFSMailMessagePart::SetAttachmentNameL(class TDesC16 const &)
+	?GetMessageCount@CFSMailFolderBase@@QBEIXZ @ 36 NONAME ; unsigned int CFSMailFolderBase::GetMessageCount(void) const
+	?RemoveChildPartL@CFSMailMessagePart@@QAEXVTFSMailMsgId@@@Z @ 37 NONAME ; void CFSMailMessagePart::RemoveChildPartL(class TFSMailMsgId)
+	?SaveMessagePartsL@CFSMailMessage@@QAEHAAVMFSMailRequestObserver@@@Z @ 38 NONAME ; int CFSMailMessage::SaveMessagePartsL(class MFSMailRequestObserver &)
+	?MoveMessagesL@CFSMailBox@@QAEXABV?$RArray@VTFSMailMsgId@@@@VTFSMailMsgId@@1@Z @ 39 NONAME ; void CFSMailBox::MoveMessagesL(class RArray<class TFSMailMsgId> const &, class TFSMailMsgId, class TFSMailMsgId)
+	?GetFolderName@CFSMailFolderBase@@QBEAAVTDesC16@@XZ @ 40 NONAME ; class TDesC16 & CFSMailFolderBase::GetFolderName(void) const
+	?GetDisplayName@CFSMailAddress@@QBEAAVTDesC16@@XZ @ 41 NONAME ; class TDesC16 & CFSMailAddress::GetDisplayName(void) const
+	?ConstructL@CFSMailFolderBase@@IAEXVTFSMailMsgId@@@Z @ 42 NONAME ; void CFSMailFolderBase::ConstructL(class TFSMailMsgId)
+	?SetSubject@CFSMailMessageBase@@QAEXABVTDesC16@@@Z @ 43 NONAME ; void CFSMailMessageBase::SetSubject(class TDesC16 const &)
+	?CreateReplyMessage@CFSMailBox@@QAEPAVCFSMailMessage@@VTFSMailMsgId@@HABVTDesC16@@@Z @ 44 NONAME ; class CFSMailMessage * CFSMailBox::CreateReplyMessage(class TFSMailMsgId, int, class TDesC16 const &)
+	?CopyContentFileL@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 45 NONAME ; void CFSMailMessagePart::CopyContentFileL(class TDesC16 const &)
+	??1CFSMailBoxBase@@UAE@XZ @ 46 NONAME ; CFSMailBoxBase::~CFSMailBoxBase(void)
+	?NewLC@CFSMailBox@@SAPAV1@VTFSMailMsgId@@@Z @ 47 NONAME ; class CFSMailBox * CFSMailBox::NewLC(class TFSMailMsgId)
+	?GetParentFolderId@CFSMailFolderBase@@QBE?AVTFSMailMsgId@@XZ @ 48 NONAME ; class TFSMailMsgId CFSMailFolderBase::GetParentFolderId(void) const
+	?ConstructL@CFSMailMessageBase@@IAEXABVNmMessageEnvelope@@@Z @ 49 NONAME ; void CFSMailMessageBase::ConstructL(class NmMessageEnvelope const &)
+	?ReleaseExtension@CFSMailMessageBase@@UAEXPAVCEmailExtension@@@Z @ 50 NONAME ; void CFSMailMessageBase::ReleaseExtension(class CEmailExtension *)
+	??_ECFSMailRequestHandler@@UAE@I@Z @ 51 NONAME ; CFSMailRequestHandler::~CFSMailRequestHandler(unsigned int)
+	?NewLC@CFSMailFolder@@SAPAV1@VTFSMailMsgId@@@Z @ 52 NONAME ; class CFSMailFolder * CFSMailFolder::NewLC(class TFSMailMsgId)
+	?NewL@CFSMailAddress@@SAPAV1@XZ @ 53 NONAME ; class CFSMailAddress * CFSMailAddress::NewL(void)
+	?IsMessageL@CFSMailMessagePart@@UBEHXZ @ 54 NONAME ; int CFSMailMessagePart::IsMessageL(void) const
+	?Uid@CEmailExtension@@QBE?AVTUid@@XZ @ 55 NONAME ; class TUid CEmailExtension::Uid(void) const
+	?GetNmMessage@CFSMailMessage@@QAEPAVNmMessage@@XZ @ 56 NONAME ; class NmMessage * CFSMailMessage::GetNmMessage(void)
+	?GetContentToBufferL@CFSMailMessagePart@@QAEXAAVTDes16@@I@Z @ 57 NONAME ; void CFSMailMessagePart::GetContentToBufferL(class TDes16 &, unsigned int)
+	?AddNewAttachmentL@CFSMailMessagePart@@QAEPAV1@ABVTDesC16@@VTFSMailMsgId@@0@Z @ 58 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::AddNewAttachmentL(class TDesC16 const &, class TFSMailMsgId, class TDesC16 const &)
+	?BlockCopyFromL@CFSMailFolderBase@@QAEXV?$RArray@W4TFSFolderType@@@@W4TFSMailBoxStatus@@@Z @ 59 NONAME ; void CFSMailFolderBase::BlockCopyFromL(class RArray<enum TFSFolderType>, enum TFSMailBoxStatus)
+	?GetSender@CFSMailMessageBase@@QBEPAVCFSMailAddress@@XZ @ 60 NONAME ; class CFSMailAddress * CFSMailMessageBase::GetSender(void) const
+	?ClearSearchResultCache@CFSMailBox@@QAEXXZ @ 61 NONAME ; void CFSMailBox::ClearSearchResultCache(void)
+	?CancelRequestL@CFSMailRequestHandler@@QAEXH@Z @ 62 NONAME ; void CFSMailRequestHandler::CancelRequestL(int)
+	?ExtensionL@CFSMailBox@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 63 NONAME ; class CEmailExtension * CFSMailBox::ExtensionL(class TUid const &)
+	?GetMailBoxId@CFSMailMessageBase@@QBE?AVTFSMailMsgId@@XZ @ 64 NONAME ; class TFSMailMsgId CFSMailMessageBase::GetMailBoxId(void) const
+	?ExtensionL@CExtendableEmail@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 65 NONAME ; class CEmailExtension * CExtendableEmail::ExtensionL(class TUid const &)
+	?ListFolders@CFSMailBox@@QAEXVTFSMailMsgId@@AAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 66 NONAME ; void CFSMailBox::ListFolders(class TFSMailMsgId, class RPointerArray<class CFSMailFolder> &)
+	?NewL@CFSMailMessage@@SAPAV1@ABVNmMessage@@@Z @ 67 NONAME ; class CFSMailMessage * CFSMailMessage::NewL(class NmMessage const &)
+	?HtmlBodyPartL@CFSMailMessage@@QAEPAVCFSMailMessagePart@@W4TFSMailMessagePartDataSource@2@@Z @ 68 NONAME ; class CFSMailMessagePart * CFSMailMessage::HtmlBodyPartL(enum CFSMailMessagePart::TFSMailMessagePartDataSource)
+	?ContentDescription@CFSMailMessagePart@@QAEABVTDesC16@@XZ @ 69 NONAME ; class TDesC16 const & CFSMailMessagePart::ContentDescription(void)
+	?SendMessageL@CFSMailBox@@QAEHAAVCFSMailMessage@@AAVMFSMailRequestObserver@@@Z @ 70 NONAME ; int CFSMailBox::SendMessageL(class CFSMailMessage &, class MFSMailRequestObserver &)
+	?GetFolderType@CFSMailFolderBase@@QBE?AW4TFSFolderType@@XZ @ 71 NONAME ; enum TFSFolderType CFSMailFolderBase::GetFolderType(void) const
+	?GetEmailAddress@CFSMailAddress@@QBEAAVTDesC16@@XZ @ 72 NONAME ; class TDesC16 & CFSMailAddress::GetEmailAddress(void) const
+	?FSMailSortCriteria2NM@NmConverter@@SA?AVNmMailSortCriteria@@VTFSMailSortCriteria@@@Z @ 73 NONAME ; class NmMailSortCriteria NmConverter::FSMailSortCriteria2NM(class TFSMailSortCriteria)
+	?NewL@CFSMailBox@@SAPAV1@VTFSMailMsgId@@@Z @ 74 NONAME ; class CFSMailBox * CFSMailBox::NewL(class TFSMailMsgId)
+	?CreateMessageToSendL@CFSMailBox@@QAEHAAVMFSMailRequestObserver@@@Z @ 75 NONAME ; int CFSMailBox::CreateMessageToSendL(class MFSMailRequestObserver &)
+	?FetchMessagesL@CFSMailFolder@@QAEHABV?$RArray@VTFSMailMsgId@@@@W4TFSMailDetails@@AAVMFSMailRequestObserver@@@Z @ 76 NONAME ; int CFSMailFolder::FetchMessagesL(class RArray<class TFSMailMsgId> const &, enum TFSMailDetails, class MFSMailRequestObserver &)
+	?ContentID@CFSMailMessagePart@@QAEABVTDesC16@@XZ @ 77 NONAME ; class TDesC16 const & CFSMailMessagePart::ContentID(void)
+	?RemoveChildPartL@CFSMailMessagePart@@QAEHVTFSMailMsgId@@AAVMFSMailRequestObserver@@@Z @ 78 NONAME ; int CFSMailMessagePart::RemoveChildPartL(class TFSMailMsgId, class MFSMailRequestObserver &)
+	??1CFSMailFolder@@UAE@XZ @ 79 NONAME ; CFSMailFolder::~CFSMailFolder(void)
+	?toQDateTime@NmConverter@@SA?AVQDateTime@@ABVTTime@@@Z @ 80 NONAME ; class QDateTime NmConverter::toQDateTime(class TTime const &)
 	?AddNewAttachmentL@CFSMailMessage@@QAEHABVTDesC16@@AAVMFSMailRequestObserver@@@Z @ 81 NONAME ; int CFSMailMessage::AddNewAttachmentL(class TDesC16 const &, class MFSMailRequestObserver &)
 	?AppendBCCRecipient@CFSMailMessageBase@@QAEXPAVCFSMailAddress@@@Z @ 82 NONAME ; void CFSMailMessageBase::AppendBCCRecipient(class CFSMailAddress *)
 	?ExtensionL@CFSMailFolder@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 83 NONAME ; class CEmailExtension * CFSMailFolder::ExtensionL(class TUid const &)
@@ -139,65 +139,65 @@
 	?SetSender@CFSMailMessageBase@@QAEXPAVCFSMailAddress@@@Z @ 138 NONAME ; void CFSMailMessageBase::SetSender(class CFSMailAddress *)
 	?FindBodyPartL@CFSMailMessagePart@@QAEPAV1@ABVTDesC16@@W4TFSMailMessagePartDataSource@1@@Z @ 139 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::FindBodyPartL(class TDesC16 const &, enum CFSMailMessagePart::TFSMailMessagePartDataSource)
 	?CreateForwardMessageL@CFSMailBox@@QAEHVTFSMailMsgId@@AAVMFSMailRequestObserver@@ABVTDesC16@@@Z @ 140 NONAME ; int CFSMailBox::CreateForwardMessageL(class TFSMailMsgId, class MFSMailRequestObserver &, class TDesC16 const &)
-	?GetTempFileL@CFSMailRequestHandler@@QAE?AVRFile@@VTFSMailMsgId@@V?$TBuf@$0BAA@@@@Z @ 141 NONAME ; class RFile CFSMailRequestHandler::GetTempFileL(class TFSMailMsgId, class TBuf<256>)
-	?SetMailBoxId@CFSMailFolderBase@@QAEXVTFSMailMsgId@@@Z @ 142 NONAME ; void CFSMailFolderBase::SetMailBoxId(class TFSMailMsgId)
-	?OwnMailAddress@CFSMailBoxBase@@QAEAAVCFSMailAddress@@XZ @ 143 NONAME ; class CFSMailAddress & CFSMailBoxBase::OwnMailAddress(void)
-	?SetContent@CFSMailMessagePart@@QAEXAAVTDes16@@@Z @ 144 NONAME ; void CFSMailMessagePart::SetContent(class TDes16 &)
-	?RemoveMessageL@CFSMailFolder@@QAEXVTFSMailMsgId@@@Z @ 145 NONAME ; void CFSMailFolder::RemoveMessageL(class TFSMailMsgId)
-	?NewLC@CFSMailMessageBase@@SAPAV1@VTFSMailMsgId@@@Z @ 146 NONAME ; class CFSMailMessageBase * CFSMailMessageBase::NewLC(class TFSMailMsgId)
-	?CompleteRequest@CFSMailRequestHandler@@QAEXH@Z @ 147 NONAME ; void CFSMailRequestHandler::CompleteRequest(int)
-	?GetFolderId@CFSMailFolderBase@@QBE?AVTFSMailMsgId@@XZ @ 148 NONAME ; class TFSMailMsgId CFSMailFolderBase::GetFolderId(void) const
-	?SetMRInfo@CFSMailMessagePart@@QAEXPAVMMRInfoObject@@@Z @ 149 NONAME ; void CFSMailMessagePart::SetMRInfo(class MMRInfoObject *)
-	??0CFSMailRequestHandler@@IAE@XZ @ 150 NONAME ; CFSMailRequestHandler::CFSMailRequestHandler(void)
-	?GoOnlineL@CFSMailBox@@QAEXXZ @ 151 NONAME ; void CFSMailBox::GoOnlineL(void)
-	?SetMessageCount@CFSMailFolderBase@@QAEXI@Z @ 152 NONAME ; void CFSMailFolderBase::SetMessageCount(unsigned int)
-	?NewLC@CFSMailMessagePart@@SAPAV1@VTFSMailMsgId@@0@Z @ 153 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::NewLC(class TFSMailMsgId, class TFSMailMsgId)
-	??1CFSMailMessagePart@@UAE@XZ @ 154 NONAME ; CFSMailMessagePart::~CFSMailMessagePart(void)
-	?NewLC@CFSMailMessagePart@@SAPAV1@ABVNmId@@ABVNmMessagePart@@@Z @ 155 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::NewLC(class NmId const &, class NmMessagePart const &)
-	??1TEmailExtensions@@QAE@XZ @ 156 NONAME ; TEmailExtensions::~TEmailExtensions(void)
-	?ContentTypeParameters@CFSMailMessagePart@@QAEAAVCDesC16Array@@XZ @ 157 NONAME ; class CDesC16Array & CFSMailMessagePart::ContentTypeParameters(void)
-	?GetNmMessagePart@CFSMailMessagePart@@QAEPAVNmMessagePart@@XZ @ 158 NONAME ; class NmMessagePart * CFSMailMessagePart::GetNmMessagePart(void)
-	??1CFSMailAddress@@UAE@XZ @ 159 NONAME ; CFSMailAddress::~CFSMailAddress(void)
-	?SetParentFolderId@CFSMailFolderBase@@QAEXVTFSMailMsgId@@@Z @ 160 NONAME ; void CFSMailFolderBase::SetParentFolderId(class TFSMailMsgId)
-	?AttachmentNameL@CFSMailMessagePart@@QAEAAVTDesC16@@XZ @ 161 NONAME ; class TDesC16 & CFSMailMessagePart::AttachmentNameL(void)
-	?GetToRecipients@CFSMailMessageBase@@QAE?AV?$RPointerArray@VCFSMailAddress@@@@XZ @ 162 NONAME ; class RPointerArray<class CFSMailAddress> CFSMailMessageBase::GetToRecipients(void)
-	?SetContentDescription@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 163 NONAME ; void CFSMailMessagePart::SetContentDescription(class TDesC16 const &)
-	?NMMailSortCriteria2FS@NmConverter@@SA?AVTFSMailSortCriteria@@VNmMailSortCriteria@@@Z @ 164 NONAME ; class TFSMailSortCriteria NmConverter::NMMailSortCriteria2FS(class NmMailSortCriteria)
-	?GetContentClass@CFSMailMessagePart@@QAEABVTDesC16@@XZ @ 165 NONAME ; class TDesC16 const & CFSMailMessagePart::GetContentClass(void)
-	?GetContentType@CFSMailMessagePart@@QBEABVTDesC16@@XZ @ 166 NONAME ; class TDesC16 const & CFSMailMessagePart::GetContentType(void) const
-	?SetOwnMailAddressL@CFSMailBoxBase@@QAEXPAVCFSMailAddress@@@Z @ 167 NONAME ; void CFSMailBoxBase::SetOwnMailAddressL(class CFSMailAddress *)
-	?GetPluginByUid@CFSMailRequestHandler@@QAEPAVCFSMailPlugin@@VTFSMailMsgId@@@Z @ 168 NONAME ; class CFSMailPlugin * CFSMailRequestHandler::GetPluginByUid(class TFSMailMsgId)
-	?GetSubFolderCount@CFSMailFolderBase@@QBEIXZ @ 169 NONAME ; unsigned int CFSMailFolderBase::GetSubFolderCount(void) const
-	?SetMRInfoProcessorL@CFSMailBoxBase@@QAEXPAVMMRInfoProcessor@@@Z @ 170 NONAME ; void CFSMailBoxBase::SetMRInfoProcessorL(class MMRInfoProcessor *)
-	?FetchMessagePartL@CFSMailMessagePart@@QAEHVTFSMailMsgId@@AAVMFSMailRequestObserver@@I@Z @ 171 NONAME ; int CFSMailMessagePart::FetchMessagePartL(class TFSMailMsgId, class MFSMailRequestObserver &, unsigned int)
-	?ContentSize@CFSMailMessagePart@@QBEIXZ @ 172 NONAME ; unsigned int CFSMailMessagePart::ContentSize(void) const
-	?InitAsyncRequestL@CFSMailRequestHandler@@QAE?AVTFSPendingRequest@@VTUid@@AAVMFSMailRequestObserver@@@Z @ 173 NONAME ; class TFSPendingRequest CFSMailRequestHandler::InitAsyncRequestL(class TUid, class MFSMailRequestObserver &)
-	?toQString@NmConverter@@SA?AVQString@@ABVTDesC16@@@Z @ 174 NONAME ; class QString NmConverter::toQString(class TDesC16 const &)
-	?GetNmAddress@CFSMailAddress@@QAE?AVNmAddress@@XZ @ 175 NONAME ; class NmAddress CFSMailAddress::GetNmAddress(void)
-	?NewLC@CFSMailRequestHandler@@SAPAV1@AAV?$RPointerArray@VCImplementationInformation@@@@AAV?$RPointerArray@VCFSMailPlugin@@@@@Z @ 176 NONAME ; class CFSMailRequestHandler * CFSMailRequestHandler::NewLC(class RPointerArray<class CImplementationInformation> &, class RPointerArray<class CFSMailPlugin> &)
-	?NewL@CFSMailFolder@@SAPAV1@VTFSMailMsgId@@@Z @ 177 NONAME ; class CFSMailFolder * CFSMailFolder::NewL(class TFSMailMsgId)
-	?SetFetchedContentSize@CFSMailMessagePart@@QAEXI@Z @ 178 NONAME ; void CFSMailMessagePart::SetFetchedContentSize(unsigned int)
-	?RemoveAllRequests@CFSMailRequestHandler@@AAEXXZ @ 179 NONAME ; void CFSMailRequestHandler::RemoveAllRequests(void)
-	?SetMessagePartsStatus@CFSMailMessagePart@@QAEXW4TFSPartFetchState@@@Z @ 180 NONAME ; void CFSMailMessagePart::SetMessagePartsStatus(enum TFSPartFetchState)
-	?SearchL@CFSMailBox@@QAEXABV?$RPointerArray@VTDesC16@@@@ABVTFSMailSortCriteria@@AAVMFSMailBoxSearchObserver@@@Z @ 181 NONAME ; void CFSMailBox::SearchL(class RPointerArray<class TDesC16> const &, class TFSMailSortCriteria const &, class MFSMailBoxSearchObserver &)
-	?SetMessageId@CFSMailMessageBase@@IAEXVTFSMailMsgId@@@Z @ 182 NONAME ; void CFSMailMessageBase::SetMessageId(class TFSMailMsgId)
-	?SetContentType@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 183 NONAME ; void CFSMailMessagePart::SetContentType(class TDesC16 const &)
-	??_ECExtendableEmail@@UAE@I@Z @ 184 NONAME ; CExtendableEmail::~CExtendableEmail(unsigned int)
-	?NextL@CFSMailIterator@@UAEHABVTDesC16@@IAAV?$RPointerArray@VCFSMailMessage@@@@@Z @ 185 NONAME ; int CFSMailIterator::NextL(class TDesC16 const &, unsigned int, class RPointerArray<class CFSMailMessage> &)
-	?ListMessagesL@CFSMailFolder@@QAEPAVMFSMailIterator@@W4TFSMailDetails@@ABV?$RArray@VTFSMailSortCriteria@@@@@Z @ 186 NONAME ; class MFSMailIterator * CFSMailFolder::ListMessagesL(enum TFSMailDetails, class RArray<class TFSMailSortCriteria> const &)
-	?NewLC@CFSMailBoxBase@@SAPAV1@VTFSMailMsgId@@@Z @ 187 NONAME ; class CFSMailBoxBase * CFSMailBoxBase::NewLC(class TFSMailMsgId)
-	?AppendAttachmentsL@CFSMailMessagePart@@QAEXAAV?$RPointerArray@VCFSMailMessagePart@@@@@Z @ 188 NONAME ; void CFSMailMessagePart::AppendAttachmentsL(class RPointerArray<class CFSMailMessagePart> &)
-	?SetFolderName@CFSMailFolderBase@@QAEXABVTDesC16@@@Z @ 189 NONAME ; void CFSMailFolderBase::SetFolderName(class TDesC16 const &)
-	?AppendToRecipient@CFSMailMessageBase@@QAEXPAVCFSMailAddress@@@Z @ 190 NONAME ; void CFSMailMessageBase::AppendToRecipient(class CFSMailAddress *)
-	?AddNewAttachmentL@CFSMailMessage@@QAEPAVCFSMailMessagePart@@ABVTDesC16@@VTFSMailMsgId@@@Z @ 191 NONAME ; class CFSMailMessagePart * CFSMailMessage::AddNewAttachmentL(class TDesC16 const &, class TFSMailMsgId)
-	?SetSettingsUid@CFSMailBoxBase@@QAEXVTUid@@@Z @ 192 NONAME ; void CFSMailBoxBase::SetSettingsUid(class TUid)
-	??0CEmailExtension@@IAE@ABVTUid@@@Z @ 193 NONAME ; CEmailExtension::CEmailExtension(class TUid const &)
-	?GetUnseenCount@CFSMailFolderBase@@QBEIXZ @ 194 NONAME ; unsigned int CFSMailFolderBase::GetUnseenCount(void) const
-	?SetReadOnlyPartSize@CFSMailMessagePart@@QAEXI@Z @ 195 NONAME ; void CFSMailMessagePart::SetReadOnlyPartSize(unsigned int)
-	?SetDate@CFSMailMessageBase@@QAEXVTTime@@@Z @ 196 NONAME ; void CFSMailMessageBase::SetDate(class TTime)
-	?NewL@CFSMailMessage@@SAPAV1@VTFSMailMsgId@@@Z @ 197 NONAME ; class CFSMailMessage * CFSMailMessage::NewL(class TFSMailMsgId)
-	?mailMsgIdToNmId@NmConverter@@SA?AVNmId@@VTFSMailMsgId@@@Z @ 198 NONAME ; class NmId NmConverter::mailMsgIdToNmId(class TFSMailMsgId)
-	?SetEmailAddress@CFSMailAddress@@QAEXABVTDesC16@@@Z @ 199 NONAME ; void CFSMailAddress::SetEmailAddress(class TDesC16 const &)
+	?SetMailBoxId@CFSMailFolderBase@@QAEXVTFSMailMsgId@@@Z @ 141 NONAME ; void CFSMailFolderBase::SetMailBoxId(class TFSMailMsgId)
+	?OwnMailAddress@CFSMailBoxBase@@QAEAAVCFSMailAddress@@XZ @ 142 NONAME ; class CFSMailAddress & CFSMailBoxBase::OwnMailAddress(void)
+	?SetContent@CFSMailMessagePart@@QAEXAAVTDes16@@@Z @ 143 NONAME ; void CFSMailMessagePart::SetContent(class TDes16 &)
+	?RemoveMessageL@CFSMailFolder@@QAEXVTFSMailMsgId@@@Z @ 144 NONAME ; void CFSMailFolder::RemoveMessageL(class TFSMailMsgId)
+	?NewLC@CFSMailMessageBase@@SAPAV1@VTFSMailMsgId@@@Z @ 145 NONAME ; class CFSMailMessageBase * CFSMailMessageBase::NewLC(class TFSMailMsgId)
+	?CompleteRequest@CFSMailRequestHandler@@QAEXH@Z @ 146 NONAME ; void CFSMailRequestHandler::CompleteRequest(int)
+	?GetFolderId@CFSMailFolderBase@@QBE?AVTFSMailMsgId@@XZ @ 147 NONAME ; class TFSMailMsgId CFSMailFolderBase::GetFolderId(void) const
+	?SetMRInfo@CFSMailMessagePart@@QAEXPAVMMRInfoObject@@@Z @ 148 NONAME ; void CFSMailMessagePart::SetMRInfo(class MMRInfoObject *)
+	??0CFSMailRequestHandler@@IAE@XZ @ 149 NONAME ; CFSMailRequestHandler::CFSMailRequestHandler(void)
+	?GoOnlineL@CFSMailBox@@QAEXXZ @ 150 NONAME ; void CFSMailBox::GoOnlineL(void)
+	?SetMessageCount@CFSMailFolderBase@@QAEXI@Z @ 151 NONAME ; void CFSMailFolderBase::SetMessageCount(unsigned int)
+	?NewLC@CFSMailMessagePart@@SAPAV1@VTFSMailMsgId@@0@Z @ 152 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::NewLC(class TFSMailMsgId, class TFSMailMsgId)
+	??1CFSMailMessagePart@@UAE@XZ @ 153 NONAME ; CFSMailMessagePart::~CFSMailMessagePart(void)
+	?NewLC@CFSMailMessagePart@@SAPAV1@ABVNmId@@ABVNmMessagePart@@@Z @ 154 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::NewLC(class NmId const &, class NmMessagePart const &)
+	??1TEmailExtensions@@QAE@XZ @ 155 NONAME ; TEmailExtensions::~TEmailExtensions(void)
+	?ContentTypeParameters@CFSMailMessagePart@@QAEAAVCDesC16Array@@XZ @ 156 NONAME ; class CDesC16Array & CFSMailMessagePart::ContentTypeParameters(void)
+	?GetNmMessagePart@CFSMailMessagePart@@QAEPAVNmMessagePart@@XZ @ 157 NONAME ; class NmMessagePart * CFSMailMessagePart::GetNmMessagePart(void)
+	??1CFSMailAddress@@UAE@XZ @ 158 NONAME ; CFSMailAddress::~CFSMailAddress(void)
+	?SetParentFolderId@CFSMailFolderBase@@QAEXVTFSMailMsgId@@@Z @ 159 NONAME ; void CFSMailFolderBase::SetParentFolderId(class TFSMailMsgId)
+	?AttachmentNameL@CFSMailMessagePart@@QAEAAVTDesC16@@XZ @ 160 NONAME ; class TDesC16 & CFSMailMessagePart::AttachmentNameL(void)
+	?GetToRecipients@CFSMailMessageBase@@QAE?AV?$RPointerArray@VCFSMailAddress@@@@XZ @ 161 NONAME ; class RPointerArray<class CFSMailAddress> CFSMailMessageBase::GetToRecipients(void)
+	?SetContentDescription@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 162 NONAME ; void CFSMailMessagePart::SetContentDescription(class TDesC16 const &)
+	?NMMailSortCriteria2FS@NmConverter@@SA?AVTFSMailSortCriteria@@VNmMailSortCriteria@@@Z @ 163 NONAME ; class TFSMailSortCriteria NmConverter::NMMailSortCriteria2FS(class NmMailSortCriteria)
+	?GetContentClass@CFSMailMessagePart@@QAEABVTDesC16@@XZ @ 164 NONAME ; class TDesC16 const & CFSMailMessagePart::GetContentClass(void)
+	?GetContentType@CFSMailMessagePart@@QBEABVTDesC16@@XZ @ 165 NONAME ; class TDesC16 const & CFSMailMessagePart::GetContentType(void) const
+	?SetOwnMailAddressL@CFSMailBoxBase@@QAEXPAVCFSMailAddress@@@Z @ 166 NONAME ; void CFSMailBoxBase::SetOwnMailAddressL(class CFSMailAddress *)
+	?GetPluginByUid@CFSMailRequestHandler@@QAEPAVCFSMailPlugin@@VTFSMailMsgId@@@Z @ 167 NONAME ; class CFSMailPlugin * CFSMailRequestHandler::GetPluginByUid(class TFSMailMsgId)
+	?GetSubFolderCount@CFSMailFolderBase@@QBEIXZ @ 168 NONAME ; unsigned int CFSMailFolderBase::GetSubFolderCount(void) const
+	?SetMRInfoProcessorL@CFSMailBoxBase@@QAEXPAVMMRInfoProcessor@@@Z @ 169 NONAME ; void CFSMailBoxBase::SetMRInfoProcessorL(class MMRInfoProcessor *)
+	?FetchMessagePartL@CFSMailMessagePart@@QAEHVTFSMailMsgId@@AAVMFSMailRequestObserver@@I@Z @ 170 NONAME ; int CFSMailMessagePart::FetchMessagePartL(class TFSMailMsgId, class MFSMailRequestObserver &, unsigned int)
+	?ContentSize@CFSMailMessagePart@@QBEIXZ @ 171 NONAME ; unsigned int CFSMailMessagePart::ContentSize(void) const
+	?InitAsyncRequestL@CFSMailRequestHandler@@QAE?AVTFSPendingRequest@@VTUid@@AAVMFSMailRequestObserver@@@Z @ 172 NONAME ; class TFSPendingRequest CFSMailRequestHandler::InitAsyncRequestL(class TUid, class MFSMailRequestObserver &)
+	?toQString@NmConverter@@SA?AVQString@@ABVTDesC16@@@Z @ 173 NONAME ; class QString NmConverter::toQString(class TDesC16 const &)
+	?GetNmAddress@CFSMailAddress@@QAE?AVNmAddress@@XZ @ 174 NONAME ; class NmAddress CFSMailAddress::GetNmAddress(void)
+	?NewLC@CFSMailRequestHandler@@SAPAV1@AAV?$RPointerArray@VCImplementationInformation@@@@AAV?$RPointerArray@VCFSMailPlugin@@@@@Z @ 175 NONAME ; class CFSMailRequestHandler * CFSMailRequestHandler::NewLC(class RPointerArray<class CImplementationInformation> &, class RPointerArray<class CFSMailPlugin> &)
+	?NewL@CFSMailFolder@@SAPAV1@VTFSMailMsgId@@@Z @ 176 NONAME ; class CFSMailFolder * CFSMailFolder::NewL(class TFSMailMsgId)
+	?SetFetchedContentSize@CFSMailMessagePart@@QAEXI@Z @ 177 NONAME ; void CFSMailMessagePart::SetFetchedContentSize(unsigned int)
+	?RemoveAllRequests@CFSMailRequestHandler@@AAEXXZ @ 178 NONAME ; void CFSMailRequestHandler::RemoveAllRequests(void)
+	?SetMessagePartsStatus@CFSMailMessagePart@@QAEXW4TFSPartFetchState@@@Z @ 179 NONAME ; void CFSMailMessagePart::SetMessagePartsStatus(enum TFSPartFetchState)
+	?SearchL@CFSMailBox@@QAEXABV?$RPointerArray@VTDesC16@@@@ABVTFSMailSortCriteria@@AAVMFSMailBoxSearchObserver@@@Z @ 180 NONAME ; void CFSMailBox::SearchL(class RPointerArray<class TDesC16> const &, class TFSMailSortCriteria const &, class MFSMailBoxSearchObserver &)
+	?SetMessageId@CFSMailMessageBase@@IAEXVTFSMailMsgId@@@Z @ 181 NONAME ; void CFSMailMessageBase::SetMessageId(class TFSMailMsgId)
+	?SetContentType@CFSMailMessagePart@@QAEXABVTDesC16@@@Z @ 182 NONAME ; void CFSMailMessagePart::SetContentType(class TDesC16 const &)
+	??_ECExtendableEmail@@UAE@I@Z @ 183 NONAME ; CExtendableEmail::~CExtendableEmail(unsigned int)
+	?NextL@CFSMailIterator@@UAEHABVTDesC16@@IAAV?$RPointerArray@VCFSMailMessage@@@@@Z @ 184 NONAME ; int CFSMailIterator::NextL(class TDesC16 const &, unsigned int, class RPointerArray<class CFSMailMessage> &)
+	?ListMessagesL@CFSMailFolder@@QAEPAVMFSMailIterator@@W4TFSMailDetails@@ABV?$RArray@VTFSMailSortCriteria@@@@@Z @ 185 NONAME ; class MFSMailIterator * CFSMailFolder::ListMessagesL(enum TFSMailDetails, class RArray<class TFSMailSortCriteria> const &)
+	?NewLC@CFSMailBoxBase@@SAPAV1@VTFSMailMsgId@@@Z @ 186 NONAME ; class CFSMailBoxBase * CFSMailBoxBase::NewLC(class TFSMailMsgId)
+	?AppendAttachmentsL@CFSMailMessagePart@@QAEXAAV?$RPointerArray@VCFSMailMessagePart@@@@@Z @ 187 NONAME ; void CFSMailMessagePart::AppendAttachmentsL(class RPointerArray<class CFSMailMessagePart> &)
+	?SetFolderName@CFSMailFolderBase@@QAEXABVTDesC16@@@Z @ 188 NONAME ; void CFSMailFolderBase::SetFolderName(class TDesC16 const &)
+	?AppendToRecipient@CFSMailMessageBase@@QAEXPAVCFSMailAddress@@@Z @ 189 NONAME ; void CFSMailMessageBase::AppendToRecipient(class CFSMailAddress *)
+	?AddNewAttachmentL@CFSMailMessage@@QAEPAVCFSMailMessagePart@@ABVTDesC16@@VTFSMailMsgId@@@Z @ 190 NONAME ; class CFSMailMessagePart * CFSMailMessage::AddNewAttachmentL(class TDesC16 const &, class TFSMailMsgId)
+	?SetSettingsUid@CFSMailBoxBase@@QAEXVTUid@@@Z @ 191 NONAME ; void CFSMailBoxBase::SetSettingsUid(class TUid)
+	??0CEmailExtension@@IAE@ABVTUid@@@Z @ 192 NONAME ; CEmailExtension::CEmailExtension(class TUid const &)
+	?GetUnseenCount@CFSMailFolderBase@@QBEIXZ @ 193 NONAME ; unsigned int CFSMailFolderBase::GetUnseenCount(void) const
+	?SetReadOnlyPartSize@CFSMailMessagePart@@QAEXI@Z @ 194 NONAME ; void CFSMailMessagePart::SetReadOnlyPartSize(unsigned int)
+	?SetDate@CFSMailMessageBase@@QAEXVTTime@@@Z @ 195 NONAME ; void CFSMailMessageBase::SetDate(class TTime)
+	?NewL@CFSMailMessage@@SAPAV1@VTFSMailMsgId@@@Z @ 196 NONAME ; class CFSMailMessage * CFSMailMessage::NewL(class TFSMailMsgId)
+	?mailMsgIdToNmId@NmConverter@@SA?AVNmId@@VTFSMailMsgId@@@Z @ 197 NONAME ; class NmId NmConverter::mailMsgIdToNmId(class TFSMailMsgId)
+	?SetEmailAddress@CFSMailAddress@@QAEXABVTDesC16@@@Z @ 198 NONAME ; void CFSMailAddress::SetEmailAddress(class TDesC16 const &)
+	?GetContentFileL@CFSMailMessagePart@@QAE?AVRFile@@H@Z @ 199 NONAME ; class RFile CFSMailMessagePart::GetContentFileL(int)
 	?NextL@CFSMailIterator@@UAEHVTFSMailMsgId@@IAAV?$RPointerArray@VCFSMailMessage@@@@@Z @ 200 NONAME ; int CFSMailIterator::NextL(class TFSMailMsgId, unsigned int, class RPointerArray<class CFSMailMessage> &)
 	?SetUnreadCount@CFSMailFolderBase@@QAEXI@Z @ 201 NONAME ; void CFSMailFolderBase::SetUnreadCount(unsigned int)
 	?SetRCLInfo@CFSMailBoxBase@@QAEXVTUid@@I@Z @ 202 NONAME ; void CFSMailBoxBase::SetRCLInfo(class TUid, unsigned int)
@@ -205,30 +205,31 @@
 	?qstringToHBufCLC@NmConverter@@SAPAVHBufC16@@ABVQString@@@Z @ 204 NONAME ; class HBufC16 * NmConverter::qstringToHBufCLC(class QString const &)
 	?NewLC@CFSMailFolderBase@@SAPAV1@VTFSMailMsgId@@@Z @ 205 NONAME ; class CFSMailFolderBase * CFSMailFolderBase::NewLC(class TFSMailMsgId)
 	?AppendCCRecipient@CFSMailMessageBase@@QAEXPAVCFSMailAddress@@@Z @ 206 NONAME ; void CFSMailMessageBase::AppendCCRecipient(class CFSMailAddress *)
-	?GetMessageId@CFSMailMessageBase@@QBE?AVTFSMailMsgId@@XZ @ 207 NONAME ; class TFSMailMsgId CFSMailMessageBase::GetMessageId(void) const
-	?GetSubject@CFSMailMessageBase@@QBEAAVTDesC16@@XZ @ 208 NONAME ; class TDesC16 & CFSMailMessageBase::GetSubject(void) const
-	?NewL@CFSMailIterator@@SAPAV1@AAVMFSMailIterator@@PAVCFSMailRequestHandler@@@Z @ 209 NONAME ; class CFSMailIterator * CFSMailIterator::NewL(class MFSMailIterator &, class CFSMailRequestHandler *)
-	?RefreshNowL@CFSMailBox@@QAEHAAVMFSMailRequestObserver@@@Z @ 210 NONAME ; int CFSMailBox::RefreshNowL(class MFSMailRequestObserver &)
-	?Extension@TEmailExtensions@@QBEPAVCEmailExtension@@H@Z @ 211 NONAME ; class CEmailExtension * TEmailExtensions::Extension(int) const
-	??1CFSMailRequestHandler@@UAE@XZ @ 212 NONAME ; CFSMailRequestHandler::~CFSMailRequestHandler(void)
-	?DecRef@CEmailExtension@@QAEIXZ @ 213 NONAME ; unsigned int CEmailExtension::DecRef(void)
-	?SetSubFolderCount@CFSMailFolderBase@@QAEXI@Z @ 214 NONAME ; void CFSMailFolderBase::SetSubFolderCount(unsigned int)
-	?AddL@TEmailExtensions@@QAEXPAVCEmailExtension@@@Z @ 215 NONAME ; void TEmailExtensions::AddL(class CEmailExtension *)
-	?ClearCcRecipients@CFSMailMessageBase@@QAEXXZ @ 216 NONAME ; void CFSMailMessageBase::ClearCcRecipients(void)
-	?GetPartId@CFSMailMessagePart@@QBE?AVTFSMailMsgId@@XZ @ 217 NONAME ; class TFSMailMsgId CFSMailMessagePart::GetPartId(void) const
-	?ExtensionL@CFSMailMessageBase@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 218 NONAME ; class CEmailExtension * CFSMailMessageBase::ExtensionL(class TUid const &)
-	?GetReplyToAddress@CFSMailMessageBase@@QAEABVCFSMailAddress@@XZ @ 219 NONAME ; class CFSMailAddress const & CFSMailMessageBase::GetReplyToAddress(void)
-	?IncRef@CEmailExtension@@QAEXXZ @ 220 NONAME ; void CEmailExtension::IncRef(void)
-	?GetMailBoxId@CFSMailFolderBase@@QBE?AVTFSMailMsgId@@XZ @ 221 NONAME ; class TFSMailMsgId CFSMailFolderBase::GetMailBoxId(void) const
-	??1CFSMailBox@@UAE@XZ @ 222 NONAME ; CFSMailBox::~CFSMailBox(void)
-	?FetchedContentSize@CFSMailMessagePart@@QBEIXZ @ 223 NONAME ; unsigned int CFSMailMessagePart::FetchedContentSize(void) const
-	?GetSubFoldersL@CFSMailFolder@@QAEXAAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 224 NONAME ; void CFSMailFolder::GetSubFoldersL(class RPointerArray<class CFSMailFolder> &)
-	?SetFlag@CFSMailMessageBase@@QAEXH@Z @ 225 NONAME ; void CFSMailMessageBase::SetFlag(int)
-	?ConstructL@CFSMailRequestHandler@@IAEXV?$RPointerArray@VCImplementationInformation@@@@V?$RPointerArray@VCFSMailPlugin@@@@@Z @ 226 NONAME ; void CFSMailRequestHandler::ConstructL(class RPointerArray<class CImplementationInformation>, class RPointerArray<class CFSMailPlugin>)
-	?NewLC@CFSMailIterator@@SAPAV1@AAVMFSMailIterator@@PAVCFSMailRequestHandler@@@Z @ 227 NONAME ; class CFSMailIterator * CFSMailIterator::NewLC(class MFSMailIterator &, class CFSMailRequestHandler *)
-	?MoveMessagesL@CFSMailBox@@QAEHAAVMFSMailRequestObserver@@ABV?$RArray@VTFSMailMsgId@@@@VTFSMailMsgId@@2@Z @ 228 NONAME ; int CFSMailBox::MoveMessagesL(class MFSMailRequestObserver &, class RArray<class TFSMailMsgId> const &, class TFSMailMsgId, class TFSMailMsgId)
-	??_ECEmailExtension@@UAE@I@Z @ 229 NONAME ; CEmailExtension::~CEmailExtension(unsigned int)
-	?SetContentSize@CFSMailMessagePart@@QAEXI@Z @ 230 NONAME ; void CFSMailMessagePart::SetContentSize(unsigned int)
-	?GetCCRecipients@CFSMailMessageBase@@QAE?AV?$RPointerArray@VCFSMailAddress@@@@XZ @ 231 NONAME ; class RPointerArray<class CFSMailAddress> CFSMailMessageBase::GetCCRecipients(void)
-	?NewL@CFSMailMessagePart@@SAPAV1@VTFSMailMsgId@@0@Z @ 232 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::NewL(class TFSMailMsgId, class TFSMailMsgId)
+	?HasCapability@CFSMailBox@@QBEHW4TFSMailBoxCapabilities@@@Z @ 207 NONAME ; int CFSMailBox::HasCapability(enum TFSMailBoxCapabilities) const
+	?GetMessageId@CFSMailMessageBase@@QBE?AVTFSMailMsgId@@XZ @ 208 NONAME ; class TFSMailMsgId CFSMailMessageBase::GetMessageId(void) const
+	?GetSubject@CFSMailMessageBase@@QBEAAVTDesC16@@XZ @ 209 NONAME ; class TDesC16 & CFSMailMessageBase::GetSubject(void) const
+	?NewL@CFSMailIterator@@SAPAV1@AAVMFSMailIterator@@PAVCFSMailRequestHandler@@@Z @ 210 NONAME ; class CFSMailIterator * CFSMailIterator::NewL(class MFSMailIterator &, class CFSMailRequestHandler *)
+	?RefreshNowL@CFSMailBox@@QAEHAAVMFSMailRequestObserver@@@Z @ 211 NONAME ; int CFSMailBox::RefreshNowL(class MFSMailRequestObserver &)
+	?Extension@TEmailExtensions@@QBEPAVCEmailExtension@@H@Z @ 212 NONAME ; class CEmailExtension * TEmailExtensions::Extension(int) const
+	??1CFSMailRequestHandler@@UAE@XZ @ 213 NONAME ; CFSMailRequestHandler::~CFSMailRequestHandler(void)
+	?DecRef@CEmailExtension@@QAEIXZ @ 214 NONAME ; unsigned int CEmailExtension::DecRef(void)
+	?SetSubFolderCount@CFSMailFolderBase@@QAEXI@Z @ 215 NONAME ; void CFSMailFolderBase::SetSubFolderCount(unsigned int)
+	?AddL@TEmailExtensions@@QAEXPAVCEmailExtension@@@Z @ 216 NONAME ; void TEmailExtensions::AddL(class CEmailExtension *)
+	?ClearCcRecipients@CFSMailMessageBase@@QAEXXZ @ 217 NONAME ; void CFSMailMessageBase::ClearCcRecipients(void)
+	?GetPartId@CFSMailMessagePart@@QBE?AVTFSMailMsgId@@XZ @ 218 NONAME ; class TFSMailMsgId CFSMailMessagePart::GetPartId(void) const
+	?ExtensionL@CFSMailMessageBase@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 219 NONAME ; class CEmailExtension * CFSMailMessageBase::ExtensionL(class TUid const &)
+	?GetReplyToAddress@CFSMailMessageBase@@QAEABVCFSMailAddress@@XZ @ 220 NONAME ; class CFSMailAddress const & CFSMailMessageBase::GetReplyToAddress(void)
+	?IncRef@CEmailExtension@@QAEXXZ @ 221 NONAME ; void CEmailExtension::IncRef(void)
+	?GetMailBoxId@CFSMailFolderBase@@QBE?AVTFSMailMsgId@@XZ @ 222 NONAME ; class TFSMailMsgId CFSMailFolderBase::GetMailBoxId(void) const
+	??1CFSMailBox@@UAE@XZ @ 223 NONAME ; CFSMailBox::~CFSMailBox(void)
+	?FetchedContentSize@CFSMailMessagePart@@QBEIXZ @ 224 NONAME ; unsigned int CFSMailMessagePart::FetchedContentSize(void) const
+	?GetSubFoldersL@CFSMailFolder@@QAEXAAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 225 NONAME ; void CFSMailFolder::GetSubFoldersL(class RPointerArray<class CFSMailFolder> &)
+	?SetFlag@CFSMailMessageBase@@QAEXH@Z @ 226 NONAME ; void CFSMailMessageBase::SetFlag(int)
+	?ConstructL@CFSMailRequestHandler@@IAEXV?$RPointerArray@VCImplementationInformation@@@@V?$RPointerArray@VCFSMailPlugin@@@@@Z @ 227 NONAME ; void CFSMailRequestHandler::ConstructL(class RPointerArray<class CImplementationInformation>, class RPointerArray<class CFSMailPlugin>)
+	?NewLC@CFSMailIterator@@SAPAV1@AAVMFSMailIterator@@PAVCFSMailRequestHandler@@@Z @ 228 NONAME ; class CFSMailIterator * CFSMailIterator::NewLC(class MFSMailIterator &, class CFSMailRequestHandler *)
+	?MoveMessagesL@CFSMailBox@@QAEHAAVMFSMailRequestObserver@@ABV?$RArray@VTFSMailMsgId@@@@VTFSMailMsgId@@2@Z @ 229 NONAME ; int CFSMailBox::MoveMessagesL(class MFSMailRequestObserver &, class RArray<class TFSMailMsgId> const &, class TFSMailMsgId, class TFSMailMsgId)
+	??_ECEmailExtension@@UAE@I@Z @ 230 NONAME ; CEmailExtension::~CEmailExtension(unsigned int)
+	?SetContentSize@CFSMailMessagePart@@QAEXI@Z @ 231 NONAME ; void CFSMailMessagePart::SetContentSize(unsigned int)
+	?GetCCRecipients@CFSMailMessageBase@@QAE?AV?$RPointerArray@VCFSMailAddress@@@@XZ @ 232 NONAME ; class RPointerArray<class CFSMailAddress> CFSMailMessageBase::GetCCRecipients(void)
+	?NewL@CFSMailMessagePart@@SAPAV1@VTFSMailMsgId@@0@Z @ 233 NONAME ; class CFSMailMessagePart * CFSMailMessagePart::NewL(class TFSMailMsgId, class TFSMailMsgId)
 
--- a/emailservices/emailcommon/eabi/fsfwcommonlibu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/eabi/fsfwcommonlibu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -174,7 +174,7 @@
 	_ZN18CFSMailMessagePart14SetContentTypeERK7TDesC16 @ 173 NONAME
 	_ZN18CFSMailMessagePart15AttachmentNameLEv @ 174 NONAME
 	_ZN18CFSMailMessagePart15GetContentClassEv @ 175 NONAME
-	_ZN18CFSMailMessagePart15GetContentFileLEv @ 176 NONAME
+	_ZN18CFSMailMessagePart15GetContentFileLEi @ 176 NONAME
 	_ZN18CFSMailMessagePart15SetContentClassERK7TDesC16 @ 177 NONAME
 	_ZN18CFSMailMessagePart16CopyContentFileLERK7TDesC16 @ 178 NONAME
 	_ZN18CFSMailMessagePart16GetNmMessagePartEv @ 179 NONAME
@@ -208,7 +208,7 @@
 	_ZN18CFSMailMessagePartD2Ev @ 207 NONAME
 	_ZN21CFSMailRequestHandler10AddPluginLE4TUidP13CFSMailPlugin @ 208 NONAME
 	_ZN21CFSMailRequestHandler10ConstructLE13RPointerArrayI26CImplementationInformationES0_I13CFSMailPluginE @ 209 NONAME
-	_ZN21CFSMailRequestHandler12GetTempFileLE12TFSMailMsgId4TBufILi256EE @ 210 NONAME
+	_ZN21CFSMailRequestHandler12GetTempFileLE12TFSMailMsgIdR4TBufILi256EE @ 210 NONAME
 	_ZN21CFSMailRequestHandler14CancelRequestLEi @ 211 NONAME
 	_ZN21CFSMailRequestHandler14GetPluginByUidE12TFSMailMsgId @ 212 NONAME
 	_ZN21CFSMailRequestHandler15CompleteRequestEi @ 213 NONAME
@@ -222,48 +222,49 @@
 	_ZN21CFSMailRequestHandlerD0Ev @ 221 NONAME
 	_ZN21CFSMailRequestHandlerD1Ev @ 222 NONAME
 	_ZN21CFSMailRequestHandlerD2Ev @ 223 NONAME
-	_ZNK10CFSMailBox16CurrentSyncStateEv @ 224 NONAME
-	_ZNK14CFSMailAddress14GetDisplayNameEv @ 225 NONAME
-	_ZNK14CFSMailAddress15GetEmailAddressEv @ 226 NONAME
-	_ZNK14CFSMailBoxBase5GetIdEv @ 227 NONAME
-	_ZNK14CFSMailBoxBase7GetNameEv @ 228 NONAME
-	_ZNK15CEmailExtension3UidEv @ 229 NONAME
-	_ZNK16TEmailExtensions13FindExtensionERK4TUid @ 230 NONAME
-	_ZNK16TEmailExtensions9ExtensionEi @ 231 NONAME
-	_ZNK17CFSMailFolderBase11GetFolderIdEv @ 232 NONAME
-	_ZNK17CFSMailFolderBase12GetMailBoxIdEv @ 233 NONAME
-	_ZNK17CFSMailFolderBase13GetFolderNameEv @ 234 NONAME
-	_ZNK17CFSMailFolderBase13GetFolderTypeEv @ 235 NONAME
-	_ZNK17CFSMailFolderBase14GetUnreadCountEv @ 236 NONAME
-	_ZNK17CFSMailFolderBase14GetUnseenCountEv @ 237 NONAME
-	_ZNK17CFSMailFolderBase15GetMessageCountEv @ 238 NONAME
-	_ZNK17CFSMailFolderBase17GetParentFolderIdEv @ 239 NONAME
-	_ZNK17CFSMailFolderBase17GetSubFolderCountEv @ 240 NONAME
-	_ZNK18CFSMailMessageBase10GetSubjectEv @ 241 NONAME
-	_ZNK18CFSMailMessageBase11GetFolderIdEv @ 242 NONAME
-	_ZNK18CFSMailMessageBase12GetMailBoxIdEv @ 243 NONAME
-	_ZNK18CFSMailMessageBase12GetMessageIdEv @ 244 NONAME
-	_ZNK18CFSMailMessageBase7GetDateEv @ 245 NONAME
-	_ZNK18CFSMailMessageBase8GetFlagsEv @ 246 NONAME
-	_ZNK18CFSMailMessageBase9GetSenderEv @ 247 NONAME
-	_ZNK18CFSMailMessageBase9IsFlagSetEi @ 248 NONAME
-	_ZNK18CFSMailMessagePart10IsMessageLEv @ 249 NONAME
-	_ZNK18CFSMailMessagePart11ContentSizeEv @ 250 NONAME
-	_ZNK18CFSMailMessagePart14FetchLoadStateEv @ 251 NONAME
-	_ZNK18CFSMailMessagePart14GetContentTypeEv @ 252 NONAME
-	_ZNK18CFSMailMessagePart16ReadOnlyPartSizeEv @ 253 NONAME
-	_ZNK18CFSMailMessagePart18FetchedContentSizeEv @ 254 NONAME
-	_ZNK18CFSMailMessagePart9GetPartIdEv @ 255 NONAME
-	_ZTI15CEmailExtension @ 256 NONAME
-	_ZTI16CExtendableEmail @ 257 NONAME
-	_ZTI21CFSMailRequestHandler @ 258 NONAME
-	_ZTV15CEmailExtension @ 259 NONAME
-	_ZTV16CExtendableEmail @ 260 NONAME
-	_ZTV21CFSMailRequestHandler @ 261 NONAME
-	_ZThn4_N15CFSMailIterator5NextLE12TFSMailMsgIdjR13RPointerArrayI14CFSMailMessageE @ 262 NONAME
-	_ZThn4_N15CFSMailIterator5NextLERK7TDesC16jR13RPointerArrayI14CFSMailMessageE @ 263 NONAME
-	_ZThn4_N15CFSMailIterator9PreviousLE12TFSMailMsgIdjR13RPointerArrayI14CFSMailMessageE @ 264 NONAME
-	_ZThn4_N15CFSMailIterator9PreviousLERK7TDesC16jR13RPointerArrayI14CFSMailMessageE @ 265 NONAME
-	_ZThn4_N15CFSMailIteratorD0Ev @ 266 NONAME
-	_ZThn4_N15CFSMailIteratorD1Ev @ 267 NONAME
+	_ZNK10CFSMailBox13HasCapabilityE22TFSMailBoxCapabilities @ 224 NONAME
+	_ZNK10CFSMailBox16CurrentSyncStateEv @ 225 NONAME
+	_ZNK14CFSMailAddress14GetDisplayNameEv @ 226 NONAME
+	_ZNK14CFSMailAddress15GetEmailAddressEv @ 227 NONAME
+	_ZNK14CFSMailBoxBase5GetIdEv @ 228 NONAME
+	_ZNK14CFSMailBoxBase7GetNameEv @ 229 NONAME
+	_ZNK15CEmailExtension3UidEv @ 230 NONAME
+	_ZNK16TEmailExtensions13FindExtensionERK4TUid @ 231 NONAME
+	_ZNK16TEmailExtensions9ExtensionEi @ 232 NONAME
+	_ZNK17CFSMailFolderBase11GetFolderIdEv @ 233 NONAME
+	_ZNK17CFSMailFolderBase12GetMailBoxIdEv @ 234 NONAME
+	_ZNK17CFSMailFolderBase13GetFolderNameEv @ 235 NONAME
+	_ZNK17CFSMailFolderBase13GetFolderTypeEv @ 236 NONAME
+	_ZNK17CFSMailFolderBase14GetUnreadCountEv @ 237 NONAME
+	_ZNK17CFSMailFolderBase14GetUnseenCountEv @ 238 NONAME
+	_ZNK17CFSMailFolderBase15GetMessageCountEv @ 239 NONAME
+	_ZNK17CFSMailFolderBase17GetParentFolderIdEv @ 240 NONAME
+	_ZNK17CFSMailFolderBase17GetSubFolderCountEv @ 241 NONAME
+	_ZNK18CFSMailMessageBase10GetSubjectEv @ 242 NONAME
+	_ZNK18CFSMailMessageBase11GetFolderIdEv @ 243 NONAME
+	_ZNK18CFSMailMessageBase12GetMailBoxIdEv @ 244 NONAME
+	_ZNK18CFSMailMessageBase12GetMessageIdEv @ 245 NONAME
+	_ZNK18CFSMailMessageBase7GetDateEv @ 246 NONAME
+	_ZNK18CFSMailMessageBase8GetFlagsEv @ 247 NONAME
+	_ZNK18CFSMailMessageBase9GetSenderEv @ 248 NONAME
+	_ZNK18CFSMailMessageBase9IsFlagSetEi @ 249 NONAME
+	_ZNK18CFSMailMessagePart10IsMessageLEv @ 250 NONAME
+	_ZNK18CFSMailMessagePart11ContentSizeEv @ 251 NONAME
+	_ZNK18CFSMailMessagePart14FetchLoadStateEv @ 252 NONAME
+	_ZNK18CFSMailMessagePart14GetContentTypeEv @ 253 NONAME
+	_ZNK18CFSMailMessagePart16ReadOnlyPartSizeEv @ 254 NONAME
+	_ZNK18CFSMailMessagePart18FetchedContentSizeEv @ 255 NONAME
+	_ZNK18CFSMailMessagePart9GetPartIdEv @ 256 NONAME
+	_ZTI15CEmailExtension @ 257 NONAME
+	_ZTI16CExtendableEmail @ 258 NONAME
+	_ZTI21CFSMailRequestHandler @ 259 NONAME
+	_ZTV15CEmailExtension @ 260 NONAME
+	_ZTV16CExtendableEmail @ 261 NONAME
+	_ZTV21CFSMailRequestHandler @ 262 NONAME
+	_ZThn4_N15CFSMailIterator5NextLE12TFSMailMsgIdjR13RPointerArrayI14CFSMailMessageE @ 263 NONAME
+	_ZThn4_N15CFSMailIterator5NextLERK7TDesC16jR13RPointerArrayI14CFSMailMessageE @ 264 NONAME
+	_ZThn4_N15CFSMailIterator9PreviousLE12TFSMailMsgIdjR13RPointerArrayI14CFSMailMessageE @ 265 NONAME
+	_ZThn4_N15CFSMailIterator9PreviousLERK7TDesC16jR13RPointerArrayI14CFSMailMessageE @ 266 NONAME
+	_ZThn4_N15CFSMailIteratorD0Ev @ 267 NONAME
+	_ZThn4_N15CFSMailIteratorD1Ev @ 268 NONAME
 
--- a/emailservices/emailcommon/emailcommon.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/emailcommon.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -79,7 +79,8 @@
     -lecom \
     -lcntmodel \
     -lQtCore  \
-    -lnmailbase
+    -lnmailbase \
+    -lnmutilities
 	
 	defBlock = \      
       "$${LITERAL_HASH}if defined(MARM)" \
@@ -89,8 +90,8 @@
       "$${LITERAL_HASH}endif"
     
     MMP_RULES += defBlock
-
-    MMP_RULES -= "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
+    MMP_RULES += SMPSAFE
+    MMP_RULES -= "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"    
 }
 
 win32 {
--- a/emailservices/emailcommon/inc/CFSMailBox.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/inc/CFSMailBox.h	Mon Oct 04 00:05:37 2010 +0300
@@ -37,6 +37,8 @@
 class CFSMailRequestHandler;
 // </qmail>
 
+class EmailMRU;
+
 /**
  *  mailbox data handling
  *
@@ -396,6 +398,13 @@
      * @return connection status, online / offline
      */
 	    IMPORT_C TFSMailBoxStatus GetMailBoxStatus( );
+	    
+    /**
+     * mailbox capability check for user
+     *
+     * @param aCapa mailbox capability to be checked
+     */
+     IMPORT_C TBool HasCapability(const TFSMailBoxCapabilities aCapability) const; 
 
 
 public: // from  CExtendableEmail
@@ -425,6 +434,21 @@
      */
   	 CFSMailBox();
 
+    /**
+     * Function used internally to inform that Mru list related to this
+     * mailbox should now be updated using the given recipient info. In
+     * other words this function makes sure that the given recipients are
+     * found from the common email mru list.
+     *
+     * @param aRecipients email recipients in TO-field
+     * @param aCCRecipients email recipients in CC-field
+     * @param aBCCRecipients email recipients in BCC-field
+     */
+    void UpdateMrusL(
+        const RPointerArray<CFSMailAddress>& aRecipients,
+        const RPointerArray<CFSMailAddress>& aCCRecipients,
+        const RPointerArray<CFSMailAddress>& aBCCRecipients ) const;
+
  private: // data
 
     /**
@@ -437,6 +461,11 @@
      */
 	 RPointerArray<CFSMailFolder> iFolders;
 
+   /**
+    * MRU list
+    */
+   EmailMRU* iMru;
+
 };
 
 #endif
--- a/emailservices/emailcommon/inc/CFSMailCommon.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/inc/CFSMailCommon.h	Mon Oct 04 00:05:37 2010 +0300
@@ -312,7 +312,7 @@
 _LIT(KFSMailContentTypeTextCalendar, "text/calendar");
 
 
-_LIT(KFSMailContentDispAttachment, " attachment");
+_LIT(KFSMailContentDispAttachment, "attachment");
 //<qmail>
 _LIT(KFSMailContentDispInline, "inline");
 //</qmail>
--- a/emailservices/emailcommon/inc/CFSMailMessagePart.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/inc/CFSMailMessagePart.h	Mon Oct 04 00:05:37 2010 +0300
@@ -262,10 +262,12 @@
     /**
      * Retrieves a read-only file handle for the content file of this message part.
      * The caller must close the file handle.
+     * 
+     * @param aForWriting Open the file for writing
      *
      * @return content file handle 
      */
-     IMPORT_C RFile GetContentFileL();
+     IMPORT_C RFile GetContentFileL( TBool aForWriting = EFalse );
         
     /**
      * copies contents of this message part to given file
--- a/emailservices/emailcommon/inc/CFSMailRequestHandler.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/inc/CFSMailRequestHandler.h	Mon Oct 04 00:05:37 2010 +0300
@@ -153,7 +153,7 @@
       * @param aFileName file name
       */
      // <qmail>
-      RFile GetTempFileL( TFSMailMsgId aContentId,TFileName aFileName );
+      RFile GetTempFileL( TFSMailMsgId aContentId, TFileName &aFileName );
      // </qmail>
 protected:
 
--- a/emailservices/emailcommon/src/CFSMailBox.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailBox.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -31,6 +31,7 @@
 #include "CFSMailFolder.h"
 #include "CFSMailAddress.h"
 // </qmail>
+#include <emailmru.h>
 
 
 // ================= MEMBER FUNCTIONS ==========================================
@@ -68,6 +69,9 @@
 
     // get requesthandler pointer
     iRequestHandler = static_cast<CFSMailRequestHandler*>(Dll::Tls());
+    QT_TRYCATCH_LEAVING({
+    iMru = new EmailMRU();
+    });
 }
 
 // -----------------------------------------------------------------------------
@@ -78,6 +82,9 @@
     NM_FUNCTION;
     // <qmail> Not using KMailboxExtMrCalInfo </qmail>
     iFolders.ResetAndDestroy();
+    QT_TRYCATCH_LEAVING({
+    delete iMru;
+    });
 }
 
 // -----------------------------------------------------------------------------
@@ -424,7 +431,9 @@
 
     if(CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid(GetId()))
         {
-        // <qmail> Removed UpdateMrusL. </qmail>
+        UpdateMrusL( aMessage.GetToRecipients(),
+                     aMessage.GetCCRecipients(),
+                     aMessage.GetBCCRecipients() );
         plugin->SendMessageL( aMessage );
         }
 	}
@@ -445,7 +454,10 @@
 
     if ( plugin )
         {
-        // <qmail> Removed UpdateMrusL. </qmail>
+        UpdateMrusL( aMessage.GetToRecipients(),
+                     aMessage.GetCCRecipients(),
+                     aMessage.GetBCCRecipients() );
+
 
         // init asynchronous request
         request = iRequestHandler->InitAsyncRequestL( GetId().PluginId(),
@@ -663,6 +675,79 @@
 }
 
 // -----------------------------------------------------------------------------
+// CFSMailBox::HasCapability
+// -----------------------------------------------------------------------------
+EXPORT_C TBool CFSMailBox::HasCapability( const TFSMailBoxCapabilities aCapability ) const
+{
+    NM_FUNCTION;
+    
+    TBool capability = EFalse;
+    if ( CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid( GetId() ) )
+        {
+        TRAPD( err,capability = plugin->MailboxHasCapabilityL( aCapability,GetId() )) ;
+        if ( err != KErrNone )
+            {
+            capability = EFalse;
+            }
+        }
+    return capability;
+}
+
+// -----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+// CFSMailBox::UpdateMrusL
+// -----------------------------------------------------------------------------
+void CFSMailBox::UpdateMrusL(
+    const RPointerArray<CFSMailAddress>& aRecipients,
+    const RPointerArray<CFSMailAddress>& aCCRecipients,
+    const RPointerArray<CFSMailAddress>& aBCCRecipients ) const
+    {
+    NM_FUNCTION;
+
+    QT_TRYCATCH_LEAVING({
+        TUint count( aRecipients.Count() );
+        TUint indexer( 0 );
+        while ( indexer < count )
+            {
+            TDesC& address(aRecipients[indexer]->GetEmailAddress() );
+            TDesC& name(aRecipients[indexer]->GetDisplayName() );
+            QString qaddress = QString::fromUtf16(address.Ptr(), address.Length());
+            QString qname = QString::fromUtf16(name.Ptr(), name.Length());
+            iMru->updateMRU(qname, qaddress);
+            indexer++;
+            }
+
+        count = aCCRecipients.Count();
+        indexer = 0 ;
+        while ( indexer < count )
+            {
+            TDesC& address(aCCRecipients[indexer]->GetEmailAddress() );
+            TDesC& name(aCCRecipients[indexer]->GetDisplayName() );
+            QString qaddress = QString::fromUtf16(address.Ptr(), address.Length());
+            QString qname = QString::fromUtf16(name.Ptr(), name.Length());
+            iMru->updateMRU(qname, qaddress);
+            indexer++;
+            }
+
+        count = aBCCRecipients.Count();
+        indexer = 0 ;
+        while ( indexer < count )
+            {
+            TDesC& address(aBCCRecipients[indexer]->GetEmailAddress() );
+            TDesC& name(aBCCRecipients[indexer]->GetDisplayName() );
+            QString qaddress = QString::fromUtf16(address.Ptr(), address.Length());
+            QString qname = QString::fromUtf16(name.Ptr(), name.Length());
+            iMru->updateMRU(qname, qaddress);
+            indexer++;
+            }
+
+    });
+
+    }
+
+// -----------------------------------------------------------------------------
 // CFSMailBox::ReleaseExtension
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailBox::ReleaseExtension( CEmailExtension* aExtension )
@@ -716,4 +801,5 @@
         }
     return extension;
     }
+    
 
--- a/emailservices/emailcommon/src/CFSMailMessagePart.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailMessagePart.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -493,7 +493,7 @@
 // -----------------------------------------------------------------------------
 // CFSMailMessagePart::GetContentFileL
 // -----------------------------------------------------------------------------
-EXPORT_C RFile CFSMailMessagePart::GetContentFileL()
+EXPORT_C RFile CFSMailMessagePart::GetContentFileL( TBool aForWriting )
 	{
     NM_FUNCTION;
 	
@@ -501,7 +501,7 @@
 		{
 		TInt rcode = plugin->GetMessagePartFileL( GetMailBoxId(), GetFolderId(),
 					                            GetMessageId(), GetPartId(),
-					                            iFile );
+					                            iFile, aForWriting);
 		// if content is encrypted, use temp dir files
 		if(rcode == KErrNotSupported)
 		    {
@@ -960,7 +960,7 @@
 	        {
             buffer->Des().Append(KFSMailContentDispInline);
 	        }
-	    else
+	    else if (ContentDisposition().FindF(KFSMailContentDispAttachment) != KErrNotFound)
 	        {
             buffer->Des().Append(KFSMailContentDispAttachment);
 	        }
--- a/emailservices/emailcommon/src/CFSMailRequestHandler.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailRequestHandler.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -251,7 +251,7 @@
 // -----------------------------------------------------------------------------
 // CFSMailRequestHandler::GetTempFileL( )
 // -----------------------------------------------------------------------------
- RFile CFSMailRequestHandler::GetTempFileL( TFSMailMsgId aContentId, TFileName aFileName )
+ RFile CFSMailRequestHandler::GetTempFileL( TFSMailMsgId aContentId, TFileName &aFileName )
 {
     NM_FUNCTION;
 
--- a/emailservices/emaildebug/inc/emailtrace.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emaildebug/inc/emailtrace.h	Mon Oct 04 00:05:37 2010 +0300
@@ -19,54 +19,78 @@
 #define EMAILTRACE_H
 
 #include <QCoreApplication>
+#include <QDateTime>
 #include <QDebug>
 #include <QFile>
-#include <QThread>
-#include <QDateTime>
+#include <QTextStream>
+#include <QAbstractFileEngine>
 
 /*
- * The macros NM_COMMENT_TRACES, NM_ERROR_TRACES, and NM_FUNCTION_TRACES
- * control which debug messages are printed. The trace logging is controlled
- * with the NM_LOG_TO_FILE macro, whereas the NM_LOG_DIRECTORY macro defines
- * which directory is to be used to store the log files. The print_trace()
- * helper function implements printing. Log files are named according to
- * process and thread IDs. If NM_LOG_TO_FILE is zero or a log file cannot be
- * opened, the messages are printed to qDebug(). The DSC2STR() function can
- * be used to convert Symbian descriptors to QString objects.
+ * The macros NM_COMMENT_TRACES, NM_ERROR_TRACES, NM_FUNCTION_TRACES, and
+ * NM_TIMESTAMP_TRACES control which debug messages are printed. The trace
+ * logging is controlled with the NM_LOG_TO_FILE macro, whereas the
+ * NM_LOG_DIRECTORY macro defines which directory is to be used to store the
+ * log files. The print_trace() helper function implements printing. Log
+ * files are named according to process thread IDs. If NM_LOG_TO_FILE is zero
+ * or a log file cannot be opened, the messages are printed to qDebug(). The
+ * DSC2STR() function can be used to convert Symbian descriptors to QString
+ * objects.
+ * 
+ * NOTICE that you can control the tracing system for a component tree by
+ * using qmake. For example, if you only want to enable timestamps for a
+ * component, you can invoke
+ * 
+ *     qmake "DEFINES += DEBUG NM_TIMESTAMP_TRACES=1" -r
+ * 
+ * before compiling the component. You can add as many macro definitions
+ * between the quotation marks as you wish. For example, if you want to log
+ * the trace messages to "c:/logs", add the definitions
+ * 
+ *     NM_LOG_TO_FILE=1 NM_LOG_DIRECTORY=\\\"c:/logs/\\\"
+ * 
+ * between the quotation marks. Do not forget to add the terminating slash
+ * character and notice how the quotation marks around the directory path
+ * have been escaped. This does not work if the log directory does not exist.
  */
-#if defined(DEBUG) || defined(_DEBUG) || NM_COMMENT_TRACES || NM_ERROR_TRACES || NM_FUNCTION_TRACES
+
+// Timestamp traces always ON
+#ifndef NM_TIMESTAMP_TRACES
+#define NM_TIMESTAMP_TRACES 1
+#endif
+
+#ifndef NM_LOG_TO_FILE
+#define NM_LOG_TO_FILE   1
+#endif
+#ifndef NM_LOG_DIRECTORY
+#define NM_LOG_DIRECTORY "c:/data/logs/"
+#endif
+
+#if defined(DEBUG) || defined(_DEBUG)
 
 #ifndef NM_COMMENT_TRACES
-#define NM_COMMENT_TRACES  0
+#define NM_COMMENT_TRACES   0
 #endif
-
 #ifndef NM_ERROR_TRACES
-#define NM_ERROR_TRACES    0
+#define NM_ERROR_TRACES     0
 #endif
-
 #ifndef NM_FUNCTION_TRACES
-#define NM_FUNCTION_TRACES 0
+#define NM_FUNCTION_TRACES  0
 #endif
 
 #if NM_COMMENT_TRACES || NM_ERROR_TRACES || NM_FUNCTION_TRACES
 
-#define NM_LOG_TO_FILE   1
-#define NM_LOG_DIRECTORY "c:/data/logs/"
-
 inline void print_trace(const QString& msg)
 {
     static QFile file(NM_LOG_DIRECTORY+
-                      QString("nmail_p%1_t%2.log").
-                      arg(QCoreApplication::applicationPid()).
-                      arg(QThread::currentThreadId()));
+                      QString("nmail_p%1.log").
+                      arg(QCoreApplication::applicationPid()));
     if (NM_LOG_TO_FILE && !file.isOpen()) {
         file.open(QIODevice::Append | QIODevice::Text);
     }
-    QDateTime dt = QDateTime::currentDateTime ();
     if (file.isWritable()) {
-        QDebug(&file).nospace() << dt.toString(Qt::ISODate) << " " << msg << '\n';
+        QTextStream(&file) << msg << '\n';
     } else {
-        qDebug().nospace() << "[Nmail] " << msg;
+        qDebug("[Nmail] %s",msg.toLatin1().data());
     }
 }
 
@@ -217,4 +241,39 @@
 
 #endif /* NM_FUNCTION_TRACES */
 
+/*
+ * The function NM_TIMESTAMP() prints a timestamp with a message. These traces do not
+ * go to class specific log -files, but to one file called nmail_timestamps.log.
+ */
+#if NM_TIMESTAMP_TRACES
+
+inline void NM_TIMESTAMP(const QString& msg)
+{ 
+    QString timestamp ("TIMESTAMP : " + 
+                       QDateTime::currentDateTime().toUTC().toString("hh:mm:ss.zzz ") + 
+                       msg);
+    
+    QDir directory("c:/data/");
+            if (directory.exists()) {
+                directory.mkdir("logs");
+            }
+            
+    static QFile file(NM_LOG_DIRECTORY +
+                      QString("nmail_timestamps.log"));
+        if (NM_LOG_TO_FILE && !file.isOpen()) {
+            file.open(QIODevice::Append | QIODevice::Text | QIODevice::ReadWrite);
+        }
+        if (file.isWritable()) {
+            QTextStream(&file) << timestamp << '\n';
+        } else {
+            qDebug("[Nmail] %s",timestamp.toLatin1().data());
+        }
+}
+
+#else
+
+#define NM_TIMESTAMP(msg)
+
+#endif /* NM_TIMESTAMP_TRACES */
+
 #endif /* EMAILTRACE_H */
--- a/emailservices/emailframework/emailframework.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailframework/emailframework.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -67,7 +67,8 @@
 
       
     MMP_RULES += debuggerBlock \
-	             defBlock
+	             defBlock \
+                 SMPSAFE
     
     LIBS += -lbafl \
     -leuser \
--- a/emailservices/emailframework/inc/CFSMailPlugin.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailframework/inc/CFSMailPlugin.h	Mon Oct 04 00:05:37 2010 +0300
@@ -160,6 +160,17 @@
      virtual TFSMailBoxStatus GetMailBoxStatus( const TFSMailMsgId& aMailBoxId ) = 0;
 
     /**
+     * checks if mailbox supports given capability
+     *
+     * @param aCapability capability to be checked
+     * @param aMailBoxId id of the target mailbox
+     *
+     * @return true/false
+     */
+     virtual TBool MailboxHasCapabilityL(   TFSMailBoxCapabilities aCapability,
+                                            TFSMailMsgId aMailBoxId ) = 0;
+
+    /**
      * lists existing mailboxes contained by plugin
      *
      * @param aMailBoxes plugin writes list of existing mailboxes into this
@@ -796,7 +807,7 @@
                                                const TFSMailMsgId& aMessagePartId) = 0;
 
     /**
-     * Retrieves a read-only file handle for the content file of this message part.
+     * Retrieves a file handle for the content file of this message part.
      * Should return KErrNotSupported if handle can not be given directly. In that case
      * FW will next ask to copy file to a temporary location so that FW can open the RFile
      * itself. Ownership of the handle is transferred. Caller is responsible for closing the
@@ -806,13 +817,15 @@
      * @param aParentFolderId id of the parent folder where email is located
      * @param aMessageId id of the email part belongs to
      * @param aMessagePartId id of the message part
-     * @param aFileHandle returns the opened read-only file handle
+     * @param aFileHandle returns the opened file handle
+     * @param aForWriting pass ETrue if the file should be opened for writing instead of read-only
      */
      virtual TInt GetMessagePartFileL( const TFSMailMsgId& aMailBoxId,
                                        const TFSMailMsgId& aParentFolderId,
                                        const TFSMailMsgId& aMessageId,
                                        const TFSMailMsgId& aMessagePartId,
-                                       RFile& aFileHandle) = 0;
+                                       RFile& aFileHandle,
+                                       TBool aForWriting = EFalse) = 0;
 
     /**
      * copies contents of this message part to given file
@@ -1046,6 +1059,11 @@
      * @param aMailboxId mailbox id
      */
     virtual HBufC* GetSignatureL( const TFSMailMsgId& aMailBoxId );
+   
+    /**
+     * Returns plugin implementation uid
+     */
+    inline TUid Id( ) const;
 
 protected:
 
--- a/emailservices/emailframework/inc/CFSMailPlugin.inl	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailframework/inc/CFSMailPlugin.inl	Mon Oct 04 00:05:37 2010 +0300
@@ -152,3 +152,14 @@
     return NULL;
     }
 // </qmail>
+
+// <qmail>
+// -----------------------------------------------------------------------------
+// CFSMailPlugin::Id
+// -----------------------------------------------------------------------------
+inline TUid CFSMailPlugin::Id( ) const
+    {
+    return iDtor_ID_Key;
+    }
+// </qmail>
+
--- a/emailservices/emailstore/base_plugin/BWINS/basepluginU.DEF	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/base_plugin/BWINS/basepluginU.DEF	Mon Oct 04 00:05:37 2010 +0300
@@ -1,225 +1,225 @@
 EXPORTS
-	?NewL@CBasePlugin@@SAPAV1@XZ @ 1 NONAME ; class CBasePlugin * CBasePlugin::NewL(void)
-	?AlarmInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 2 NONAME ; class TTime CBaseMrInfoObject::AlarmInUtcL(void) const
-	?AttendeesL@CBaseMrInfoObject@@UAEAAV?$RPointerArray@VMMRAttendee@@@@XZ @ 3 NONAME ; class RPointerArray<class MMRAttendee> & CBaseMrInfoObject::AttendeesL(void)
-	?NewChildPartL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@0000ABVTDesC16@@@Z @ 4 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
-	?AccountEventNotify@CBasePlugin@@UAEXW4TMsgStoreAccountEvent@@JABVTDesC16@@1I@Z @ 5 NONAME ; void CBasePlugin::AccountEventNotify(enum TMsgStoreAccountEvent, long, class TDesC16 const &, class TDesC16 const &, unsigned int)
-	?MRResponse@CBaseMrInfoObject@@UBE?AW4TResponse@MMRInfoObject@@XZ @ 6 NONAME ; enum MMRInfoObject::TResponse CBaseMrInfoObject::MRResponse(void) const
-	?SetDescriptionL@CBaseMrInfoObject@@UAEXABVTDesC16@@@Z @ 7 NONAME ; void CBaseMrInfoObject::SetDescriptionL(class TDesC16 const &)
-	?RefreshNowL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@HH@Z @ 8 NONAME ; void CBasePlugin::RefreshNowL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int, int)
-	?RecurrenceStartTime@CBaseMrRecurrenceRule@@UBE?AVTTime@@XZ @ 9 NONAME ; class TTime CBaseMrRecurrenceRule::RecurrenceStartTime(void) const
-	?NewL@CResourceLoader@@SAPAV1@ABVTDesC16@@@Z @ 10 NONAME ; class CResourceLoader * CResourceLoader::NewL(class TDesC16 const &)
-	?MRSequenceNumberL@CBaseMrInfoObject@@UBEHXZ @ 11 NONAME ; int CBaseMrInfoObject::MRSequenceNumberL(void) const
-	?SetMRRecurrenceIdL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 12 NONAME ; void CBaseMrInfoObject::SetMRRecurrenceIdL(class TTime)
-	?RemoveChildPartL@CBasePlugin@@UAEXABVTFSMailMsgId@@0000@Z @ 13 NONAME ; void CBasePlugin::RemoveChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
-	?TranslateEmailFwMessageL@CBasePlugin@@MAEXAAVCFSMailMessagePart@@AAVCMsgStoreMessagePart@@H@Z @ 14 NONAME ; void CBasePlugin::TranslateEmailFwMessageL(class CFSMailMessagePart &, class CMsgStoreMessagePart &, int)
-	?GetAccountForMsgBoxL@CBasePlugin@@IAEPAVCMsgStoreAccount@@ABVTFSMailMsgId@@@Z @ 15 NONAME ; class CMsgStoreAccount * CBasePlugin::GetAccountForMsgBoxL(class TFSMailMsgId const &)
-	?TranslateEmailFwAttendeeL@CBasePlugin@@IAEXAAVMMROrganizer@@AAVRMsgStoreAddress@@@Z @ 16 NONAME ; void CBasePlugin::TranslateEmailFwAttendeeL(class MMROrganizer &, class RMsgStoreAddress &)
-	?RecurrentMonths@CBaseMrRecurrenceRule@@UBEABV?$RArray@W4TMRRecurrenceMonth@MRRecurrenceRule@@@@XZ @ 17 NONAME ; class RArray<enum MRRecurrenceRule::TMRRecurrenceMonth> const & CBaseMrRecurrenceRule::RecurrentMonths(void) const
-	?SetRecurrenceStartTimeL@CBaseMrRecurrenceRule@@UAEXVTTime@@@Z @ 18 NONAME ; void CBaseMrRecurrenceRule::SetRecurrenceStartTimeL(class TTime)
-	?RecurrentMonthDays@CBaseMrRecurrenceRule@@UBEABV?$RArray@H@@XZ @ 19 NONAME ; class RArray<int> const & CBaseMrRecurrenceRule::RecurrentMonthDays(void) const
-	?ListFoldersL@CBasePlugin@@UAEXABVTFSMailMsgId@@0AAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 20 NONAME ; void CBasePlugin::ListFoldersL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RPointerArray<class CFSMailFolder> &)
-	?GetStandardFolderIdL@CBasePlugin@@UAE?AVTFSMailMsgId@@ABV2@W4TFSFolderType@@@Z @ 21 NONAME ; class TFSMailMsgId CBasePlugin::GetStandardFolderIdL(class TFSMailMsgId const &, enum TFSFolderType)
-	?DeleteMailBoxByUidL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@H@Z @ 22 NONAME ; void CBasePlugin::DeleteMailBoxByUidL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
-	?NewChildPartFromFileL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000ABVTDesC16@@1@Z @ 23 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &)
-	?CopyMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABV?$RArray@VTFSMailMsgId@@@@AAV3@00@Z @ 24 NONAME ; void CBasePlugin::CopyMessagesL(class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class RArray<class TFSMailMsgId> &, class TFSMailMsgId const &, class TFSMailMsgId const &)
-	?RefreshCachedMailBoxDisplayNameL@CBasePlugin@@IAEXAAHABI@Z @ 25 NONAME ; void CBasePlugin::RefreshCachedMailBoxDisplayNameL(int &, unsigned int const &)
-	?StatusL@CBasePlugin@@UAE?AVTFSProgress@@H@Z @ 26 NONAME ; class TFSProgress CBasePlugin::StatusL(int)
-	?CurrentSyncState@CBasePlugin@@UAE?AW4TSSMailSyncState@@ABVTFSMailMsgId@@@Z @ 27 NONAME ; enum TSSMailSyncState CBasePlugin::CurrentSyncState(class TFSMailMsgId const &)
-	?CreateFolderL@CBasePlugin@@UAEPAVCFSMailFolder@@ABVTFSMailMsgId@@0ABVTDesC16@@H@Z @ 28 NONAME ; class CFSMailFolder * CBasePlugin::CreateFolderL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, int)
-	?AccountEventNotifyL@CBasePlugin@@IAEXW4TMsgStoreAccountEvent@@JABVTDesC16@@1I@Z @ 29 NONAME ; void CBasePlugin::AccountEventNotifyL(enum TMsgStoreAccountEvent, long, class TDesC16 const &, class TDesC16 const &, unsigned int)
-	?NotifyEventL@CBasePlugin@@IAEXIIIW4TFSMailEvent@@I@Z @ 30 NONAME ; void CBasePlugin::NotifyEventL(unsigned int, unsigned int, unsigned int, enum TFSMailEvent, unsigned int)
-	?ResetBodyCache@CBasePlugin@@IAEXXZ @ 31 NONAME ; void CBasePlugin::ResetBodyCache(void)
-	?UnsubscribeMailboxEventsL@CBasePlugin@@IAEXABVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 32 NONAME ; void CBasePlugin::UnsubscribeMailboxEventsL(class TFSMailMsgId const &, class MFSMailEventObserver &)
-	?SetAttendeeStatusL@CBaseMrAttendee@@UAEXAAW4TAttendeeStatus@MMRAttendee@@@Z @ 33 NONAME ; void CBaseMrAttendee::SetAttendeeStatusL(enum MMRAttendee::TAttendeeStatus &)
-	?GetCachedBodyChildrenL@CBasePlugin@@IAEAAV?$RPointerArray@VCMsgStoreMessagePart@@@@XZ @ 34 NONAME ; class RPointerArray<class CMsgStoreMessagePart> & CBasePlugin::GetCachedBodyChildrenL(void)
-	?DoCancel@CDelayedOp@@EAEXXZ @ 35 NONAME ; void CDelayedOp::DoCancel(void)
-	?AttachmentsL@CBaseMrInfoObject@@UBEABV?$RPointerArray@VMMRAttachment@@@@XZ @ 36 NONAME ; class RPointerArray<class MMRAttachment> const & CBaseMrInfoObject::AttachmentsL(void) const
-	??1CBaseMrInfoObject@@UAE@XZ @ 37 NONAME ; CBaseMrInfoObject::~CBaseMrInfoObject(void)
-	??_ECBasePlugin@@UAE@I@Z @ 38 NONAME ; CBasePlugin::~CBasePlugin(unsigned int)
-	?GetSignatureL@CBasePlugin@@MAEPAVHBufC16@@ABVTFSMailMsgId@@@Z @ 39 NONAME ; class HBufC16 * CBasePlugin::GetSignatureL(class TFSMailMsgId const &)
-	?GetBrandingIdL@CBasePlugin@@UAEAAVTDesC16@@ABVTFSMailMsgId@@@Z @ 40 NONAME ; class TDesC16 & CBasePlugin::GetBrandingIdL(class TFSMailMsgId const &)
-	?StoreMessagePartsL@CBasePlugin@@UAEXAAV?$RPointerArray@VCFSMailMessagePart@@@@AAVMFSMailRequestObserver@@H@Z @ 41 NONAME ; void CBasePlugin::StoreMessagePartsL(class RPointerArray<class CFSMailMessagePart> &, class MFSMailRequestObserver &, int)
-	??1CBasePlugin@@UAE@XZ @ 42 NONAME ; CBasePlugin::~CBasePlugin(void)
-	?SetRecurrenceTypeL@CBaseMrRecurrenceRule@@UAEXW4TMRRecurrenceType@MRRecurrenceRule@@@Z @ 43 NONAME ; void CBaseMrRecurrenceRule::SetRecurrenceTypeL(enum MRRecurrenceRule::TMRRecurrenceType)
-	?FetchEmailAddressL@CBasePlugin@@IAEPAVCFSMailAddress@@AAVCMsgStorePropertyContainer@@I@Z @ 44 NONAME ; class CFSMailAddress * CBasePlugin::FetchEmailAddressL(class CMsgStorePropertyContainer &, unsigned int)
-	?ConstructL@CBasePlugin@@IAEXXZ @ 45 NONAME ; void CBasePlugin::ConstructL(void)
-	?ExtensionL@CBaseMrInfoObject@@UAEPAXVTUid@@@Z @ 46 NONAME ; void * CBaseMrInfoObject::ExtensionL(class TUid)
-	?LoadLC@CResourceLoader@@QAEPAVHBufC16@@H@Z @ 47 NONAME ; class HBufC16 * CResourceLoader::LoadLC(int)
-	?SetAlarmInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 48 NONAME ; void CBaseMrInfoObject::SetAlarmInUtcL(class TTime)
-	?HandleRemovePartContentL@CBasePlugin@@MAEXAAVCMsgStoreMessage@@AAVCMsgStoreMessagePart@@@Z @ 49 NONAME ; void CBasePlugin::HandleRemovePartContentL(class CMsgStoreMessage &, class CMsgStoreMessagePart &)
-	?CancelSyncL@CBasePlugin@@UAEHABVTFSMailMsgId@@@Z @ 50 NONAME ; int CBasePlugin::CancelSyncL(class TFSMailMsgId const &)
-	?BlockCopyMoveFromFoldersL@CBasePlugin@@MAEXVTFSMailMsgId@@W4TFSFolderType@@AAVCFSMailFolder@@@Z @ 51 NONAME ; void CBasePlugin::BlockCopyMoveFromFoldersL(class TFSMailMsgId, enum TFSFolderType, class CFSMailFolder &)
-	?NewL@CBaseMrRecurrenceRule@@SAPAV1@XZ @ 52 NONAME ; class CBaseMrRecurrenceRule * CBaseMrRecurrenceRule::NewL(void)
-	?NewL@CBaseMrAttendee@@SAPAV1@XZ @ 53 NONAME ; class CBaseMrAttendee * CBaseMrAttendee::NewL(void)
+	?CancelL@CBasePlugin@@UAEXH@Z @ 1 NONAME ; void CBasePlugin::CancelL(int)
+	?NewL@CBaseMrAttendee@@SAPAV1@XZ @ 2 NONAME ; class CBaseMrAttendee * CBaseMrAttendee::NewL(void)
+	?FindFetchRequestL@CBasePlugin@@IAEHIIIIAAUTOngoingFetchInfo@1@@Z @ 3 NONAME ; int CBasePlugin::FindFetchRequestL(unsigned int, unsigned int, unsigned int, unsigned int, struct CBasePlugin::TOngoingFetchInfo &)
+	?WizardDataAvailableL@CBasePlugin@@UAEHXZ @ 4 NONAME ; int CBasePlugin::WizardDataAvailableL(void)
+	?ReportRequestStatusL@CBasePlugin@@MAEXIIIIH@Z @ 5 NONAME ; void CBasePlugin::ReportRequestStatusL(unsigned int, unsigned int, unsigned int, unsigned int, int)
+	?Load2LC@CResourceLoader@@QAEPAVHBufC16@@HH@Z @ 6 NONAME ; class HBufC16 * CResourceLoader::Load2LC(int, int)
+	?DoCancel@CDelayedOp@@EAEXXZ @ 7 NONAME ; void CDelayedOp::DoCancel(void)
+	??1CBaseMrRecurrenceRule@@UAE@XZ @ 8 NONAME ; CBaseMrRecurrenceRule::~CBaseMrRecurrenceRule(void)
+	?GoOnlineL@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 9 NONAME ; void CBasePlugin::GoOnlineL(class TFSMailMsgId const &)
+	??1CDelayedOp@@UAE@XZ @ 10 NONAME ; CDelayedOp::~CDelayedOp(void)
+	?SetStartTimeInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 11 NONAME ; void CBaseMrInfoObject::SetStartTimeInUtcL(class TTime)
+	?NewL@CBaseMrAttendee@@SAPAV1@ABVMMROrganizer@@@Z @ 12 NONAME ; class CBaseMrAttendee * CBaseMrAttendee::NewL(class MMROrganizer const &)
+	?CancelSearch@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 13 NONAME ; void CBasePlugin::CancelSearch(class TFSMailMsgId const &)
+	?RecurrentInterval@CBaseMrRecurrenceRule@@UBEHXZ @ 14 NONAME ; int CBaseMrRecurrenceRule::RecurrentInterval(void) const
+	?CalendarFileName@CBasePlugin@@MBEABVTDesC16@@XZ @ 15 NONAME ; class TDesC16 const & CBasePlugin::CalendarFileName(void) const
+	?AddRecurrenceExceptionL@CBaseMrInfoObject@@UAEXPAVMMRInfoObject@@@Z @ 16 NONAME ; void CBaseMrInfoObject::AddRecurrenceExceptionL(class MMRInfoObject *)
+	?SetRecurrentDaysofMonthL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@UTRecurrentDaysofMonth@MRRecurrenceRule@@@@@Z @ 17 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentDaysofMonthL(class RArray<struct MRRecurrenceRule::TRecurrentDaysofMonth> &)
+	?SetCredentialsL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABVTDesC16@@1@Z @ 18 NONAME ; void CBasePlugin::SetCredentialsL(class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &)
+	?SetAlarmInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 19 NONAME ; void CBaseMrInfoObject::SetAlarmInUtcL(class TTime)
+	?NewL@CBaseMrAttendee@@SAPAV1@ABVMMRAttendee@@@Z @ 20 NONAME ; class CBaseMrAttendee * CBaseMrAttendee::NewL(class MMRAttendee const &)
+	?TranslateMsgStoreDayOfWeek@CBasePlugin@@IAEXKAAVTDayOfWeekFtor@@@Z @ 21 NONAME ; void CBasePlugin::TranslateMsgStoreDayOfWeek(unsigned long, class TDayOfWeekFtor &)
+	?GetStandardFolderIdL@CBasePlugin@@UAE?AVTFSMailMsgId@@ABV2@W4TFSFolderType@@@Z @ 22 NONAME ; class TFSMailMsgId CBasePlugin::GetStandardFolderIdL(class TFSMailMsgId const &, enum TFSFolderType)
+	?DeleteFetchRequest@CBasePlugin@@IAEXAAUTOngoingFetchInfo@1@@Z @ 23 NONAME ; void CBasePlugin::DeleteFetchRequest(struct CBasePlugin::TOngoingFetchInfo &)
+	?CommonName@CBaseMrAttendee@@UBEABVTDesC16@@XZ @ 24 NONAME ; class TDesC16 const & CBaseMrAttendee::CommonName(void) const
+	?RecurrentDaysofMonth@CBaseMrRecurrenceRule@@UBEABV?$RArray@UTRecurrentDaysofMonth@MRRecurrenceRule@@@@XZ @ 25 NONAME ; class RArray<struct MRRecurrenceRule::TRecurrentDaysofMonth> const & CBaseMrRecurrenceRule::RecurrentDaysofMonth(void) const
+	?MRSequenceNumberL@CBaseMrInfoObject@@UBEHXZ @ 26 NONAME ; int CBaseMrInfoObject::MRSequenceNumberL(void) const
+	?MRRecurrenceId@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 27 NONAME ; class TTime CBaseMrInfoObject::MRRecurrenceId(void) const
+	?SubjectL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 28 NONAME ; class TDesC16 const & CBaseMrInfoObject::SubjectL(void) const
+	?GetMessageByUidL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@00W4TFSMailDetails@@@Z @ 29 NONAME ; class CFSMailMessage * CBasePlugin::GetMessageByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, enum TFSMailDetails)
+	?InvalidateCacheIfNecessary@CBasePlugin@@IAEXIII@Z @ 30 NONAME ; void CBasePlugin::InvalidateCacheIfNecessary(unsigned int, unsigned int, unsigned int)
+	?TranslateEmailFwRecipientsL@CBasePlugin@@IAEXAAVCMsgStoreMessagePart@@ABVTDesC8@@AAV?$RPointerArray@VCFSMailAddress@@@@@Z @ 31 NONAME ; void CBasePlugin::TranslateEmailFwRecipientsL(class CMsgStoreMessagePart &, class TDesC8 const &, class RPointerArray<class CFSMailAddress> &)
+	?SetRecurrenceRuleL@CBaseMrInfoObject@@UAEXABVMRRecurrenceRule@@@Z @ 32 NONAME ; void CBaseMrInfoObject::SetRecurrenceRuleL(class MRRecurrenceRule const &)
+	?Load2L@CResourceLoader@@QAEPAVHBufC16@@H@Z @ 33 NONAME ; class HBufC16 * CResourceLoader::Load2L(int)
+	?RemoveAllPropertiesL@CBasePlugin@@KAXAAVCMsgStorePropertyContainer@@ABVTDesC8@@@Z @ 34 NONAME ; void CBasePlugin::RemoveAllPropertiesL(class CMsgStorePropertyContainer &, class TDesC8 const &)
+	?DoCancelSearchL@CBasePlugin@@IAEXABVTFSMailMsgId@@@Z @ 35 NONAME ; void CBasePlugin::DoCancelSearchL(class TFSMailMsgId const &)
+	?GetMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@0ABV?$RArray@VTFSMailMsgId@@@@AAV?$RPointerArray@VCFSMailMessage@@@@W4TFSMailDetails@@@Z @ 36 NONAME ; void CBasePlugin::GetMessagesL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class RPointerArray<class CFSMailMessage> &, enum TFSMailDetails)
+	?GetPlugin@CDelayedOp@@IAEAAVCBasePlugin@@XZ @ 37 NONAME ; class CBasePlugin & CDelayedOp::GetPlugin(void)
+	?LoadLC@CResourceLoader@@QAEPAVHBufC16@@H@Z @ 38 NONAME ; class HBufC16 * CResourceLoader::LoadLC(int)
+	?HandleRemovePartContentL@CBasePlugin@@MAEXAAVCMsgStoreMessage@@AAVCMsgStoreMessagePart@@@Z @ 39 NONAME ; void CBasePlugin::HandleRemovePartContentL(class CMsgStoreMessage &, class CMsgStoreMessagePart &)
+	?SetMRRecurrenceIdL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 40 NONAME ; void CBaseMrInfoObject::SetMRRecurrenceIdL(class TTime)
+	?CreateReplyMessageL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@0HABVTDesC16@@@Z @ 41 NONAME ; class CFSMailMessage * CBasePlugin::CreateReplyMessageL(class TFSMailMsgId const &, class TFSMailMsgId const &, int, class TDesC16 const &)
+	?UnsubscribeMailboxEventsL@CBasePlugin@@IAEXABVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 42 NONAME ; void CBasePlugin::UnsubscribeMailboxEventsL(class TFSMailMsgId const &, class MFSMailEventObserver &)
+	?CreateForwardMessageL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@0ABVTDesC16@@@Z @ 43 NONAME ; class CFSMailMessage * CBasePlugin::CreateForwardMessageL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
+	?UnregisterRequestObserver@CBasePlugin@@UAEXH@Z @ 44 NONAME ; void CBasePlugin::UnregisterRequestObserver(int)
+	?DeleteFolderByUidL@CBasePlugin@@UAEXABVTFSMailMsgId@@0@Z @ 45 NONAME ; void CBasePlugin::DeleteFolderByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &)
+	?NewL@CBaseMrInfoObject@@SAPAV1@AAVMMRInfoObject@@@Z @ 46 NONAME ; class CBaseMrInfoObject * CBaseMrInfoObject::NewL(class MMRInfoObject &)
+	?GoOfflineL@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 47 NONAME ; void CBasePlugin::GoOfflineL(class TFSMailMsgId const &)
+	?ResponseRequested@CBaseMrAttendee@@UBEHXZ @ 48 NONAME ; int CBaseMrAttendee::ResponseRequested(void) const
+	?GetAccountForMsgBoxL@CBasePlugin@@IAEPAVCMsgStoreAccount@@ABVTFSMailMsgId@@@Z @ 49 NONAME ; class CMsgStoreAccount * CBasePlugin::GetAccountForMsgBoxL(class TFSMailMsgId const &)
+	?DeleteDelayedOpsManager@CBasePlugin@@QAEXXZ @ 50 NONAME ; void CBasePlugin::DeleteDelayedOpsManager(void)
+	?SearchL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABV?$RArray@VTFSMailMsgId@@@@ABV?$RPointerArray@VTDesC16@@@@ABVTFSMailSortCriteria@@AAVMFSMailBoxSearchObserver@@@Z @ 51 NONAME ; void CBasePlugin::SearchL(class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class RPointerArray<class TDesC16> const &, class TFSMailSortCriteria const &, class MFSMailBoxSearchObserver &)
+	?StoreMessageL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVCFSMailMessage@@@Z @ 52 NONAME ; void CBasePlugin::StoreMessageL(class TFSMailMsgId const &, class CFSMailMessage &)
+	?Fs@CResourceLoader@@QAEAAVRFs@@XZ @ 53 NONAME ; class RFs & CResourceLoader::Fs(void)
 	?ModificationNotifyL@CBasePlugin@@IAEXIW4TMsgStoreOperation@@W4TMsgStoreContainerType@@KIII@Z @ 54 NONAME ; void CBasePlugin::ModificationNotifyL(unsigned int, enum TMsgStoreOperation, enum TMsgStoreContainerType, unsigned long, unsigned int, unsigned int, unsigned int)
-	?MRRecurrenceId@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 55 NONAME ; class TTime CBaseMrInfoObject::MRRecurrenceId(void) const
-	?AddAttendeeL@CBaseMrInfoObject@@UAEXPAVMMRAttendee@@@Z @ 56 NONAME ; void CBaseMrInfoObject::AddAttendeeL(class MMRAttendee *)
-	?SetAddressL@CBaseMrAttendee@@UAEXABVTDesC16@@@Z @ 57 NONAME ; void CBaseMrAttendee::SetAddressL(class TDesC16 const &)
-	?GetPluginId@CBasePlugin@@MAEIXZ @ 58 NONAME ; unsigned int CBasePlugin::GetPluginId(void)
-	?NewChildPartFromFilePathOrHandleL@CBasePlugin@@IAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000ABVTDesC16@@1HAAVRFile@@@Z @ 59 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartFromFilePathOrHandleL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &, int, class RFile &)
-	?NewL@CBaseMrInfoObject@@SAPAV1@AAVMMRInfoObject@@@Z @ 60 NONAME ; class CBaseMrInfoObject * CBaseMrInfoObject::NewL(class MMRInfoObject &)
-	??1CBaseMrRecurrenceRule@@UAE@XZ @ 61 NONAME ; CBaseMrRecurrenceRule::~CBaseMrRecurrenceRule(void)
-	?SetCommonNameL@CBaseMrAttendee@@UAEXABVTDesC16@@@Z @ 62 NONAME ; void CBaseMrAttendee::SetCommonNameL(class TDesC16 const &)
-	?SetMethod@CBaseMrInfoObject@@QAEXW4TMRMethod@MMRInfoObject@@@Z @ 63 NONAME ; void CBaseMrInfoObject::SetMethod(enum MMRInfoObject::TMRMethod)
-	?NewL@CBaseMrInfoObject@@SAPAV1@XZ @ 64 NONAME ; class CBaseMrInfoObject * CBaseMrInfoObject::NewL(void)
-	?StoreMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAV?$RPointerArray@VCFSMailMessage@@@@AAVMFSMailRequestObserver@@H@Z @ 65 NONAME ; void CBasePlugin::StoreMessagesL(class TFSMailMsgId const &, class RPointerArray<class CFSMailMessage> &, class MFSMailRequestObserver &, int)
-	?SetRecurrentDaysofMonthL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@UTRecurrentDaysofMonth@MRRecurrenceRule@@@@@Z @ 66 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentDaysofMonthL(class RArray<struct MRRecurrenceRule::TRecurrentDaysofMonth> &)
-	?DoClearSearchResultCacheL@CBasePlugin@@IAEXABVTFSMailMsgId@@@Z @ 67 NONAME ; void CBasePlugin::DoClearSearchResultCacheL(class TFSMailMsgId const &)
-	?SupportedFields@CBaseMrInfoObject@@UBEHAAV?$RArray@W4TESMRInfoField@MMRInfoObject@@@@@Z @ 68 NONAME ; int CBaseMrInfoObject::SupportedFields(class RArray<enum MMRInfoObject::TESMRInfoField> &) const
-	?SetPriorityL@CBaseMrInfoObject@@UAEXI@Z @ 69 NONAME ; void CBaseMrInfoObject::SetPriorityL(unsigned int)
-	?SetMRResponseL@CBaseMrInfoObject@@UAEXW4TResponse@MMRInfoObject@@@Z @ 70 NONAME ; void CBaseMrInfoObject::SetMRResponseL(enum MMRInfoObject::TResponse)
-	?SetContext@CDelayedOp@@QAEXAAVCBasePlugin@@AAVMDelayedOpsManager@@@Z @ 71 NONAME ; void CDelayedOp::SetContext(class CBasePlugin &, class MDelayedOpsManager &)
-	?CreateForwardReplyMessageL@CBasePlugin@@IAEPAVCFSMailMessage@@ABVTFSMailMsgId@@0HABVTDesC16@@HH@Z @ 72 NONAME ; class CFSMailMessage * CBasePlugin::CreateForwardReplyMessageL(class TFSMailMsgId const &, class TFSMailMsgId const &, int, class TDesC16 const &, int, int)
-	?StoreMessagePartL@CBasePlugin@@UAEXABVTFSMailMsgId@@00AAVCFSMailMessagePart@@@Z @ 73 NONAME ; void CBasePlugin::StoreMessagePartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class CFSMailMessagePart &)
-	?GetCachedMsgChildrenL@CBasePlugin@@IAEAAV?$RPointerArray@VCMsgStoreMessagePart@@@@XZ @ 74 NONAME ; class RPointerArray<class CMsgStoreMessagePart> & CBasePlugin::GetCachedMsgChildrenL(void)
-	?GetCachedBodyL@CBasePlugin@@IAEPAVCMsgStoreMessagePart@@I@Z @ 75 NONAME ; class CMsgStoreMessagePart * CBasePlugin::GetCachedBodyL(unsigned int)
-	?CreationTimeInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 76 NONAME ; class TTime CBaseMrInfoObject::CreationTimeInUtcL(void) const
-	?RecurrentCount@CBaseMrRecurrenceRule@@UBEIXZ @ 77 NONAME ; unsigned int CBaseMrRecurrenceRule::RecurrentCount(void) const
-	?NewL@CBaseMrRecurrenceRule@@SAPAV1@ABVMRRecurrenceRule@@@Z @ 78 NONAME ; class CBaseMrRecurrenceRule * CBaseMrRecurrenceRule::NewL(class MRRecurrenceRule const &)
-	??1CDelayedOp@@UAE@XZ @ 79 NONAME ; CDelayedOp::~CDelayedOp(void)
-	?ResponseRequested@CBaseMrAttendee@@UBEHXZ @ 80 NONAME ; int CBaseMrAttendee::ResponseRequested(void) const
-	?ListFoldersL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 81 NONAME ; void CBasePlugin::ListFoldersL(class TFSMailMsgId const &, class RPointerArray<class CFSMailFolder> &)
-	?TranslateEmailFwMrL@CBasePlugin@@MAEXAAVMMRInfoObject@@AAVCMsgStorePropertyContainer@@@Z @ 82 NONAME ; void CBasePlugin::TranslateEmailFwMrL(class MMRInfoObject &, class CMsgStorePropertyContainer &)
-	?Load2L@CResourceLoader@@QAEPAVHBufC16@@HH@Z @ 83 NONAME ; class HBufC16 * CResourceLoader::Load2L(int, int)
-	?SetRecurrentMonthsL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@W4TMRRecurrenceMonth@MRRecurrenceRule@@@@@Z @ 84 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentMonthsL(class RArray<enum MRRecurrenceRule::TMRRecurrenceMonth> &)
-	?GoOfflineL@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 85 NONAME ; void CBasePlugin::GoOfflineL(class TFSMailMsgId const &)
-	?FetchMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@0ABV?$RArray@VTFSMailMsgId@@@@W4TFSMailDetails@@AAVMFSMailRequestObserver@@H@Z @ 86 NONAME ; void CBasePlugin::FetchMessagesL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, enum TFSMailDetails, class MFSMailRequestObserver &, int)
-	?SetRecurrentMonthDaysL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@H@@@Z @ 87 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentMonthDaysL(class RArray<int> &)
-	?MoveMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABV?$RArray@VTFSMailMsgId@@@@00@Z @ 88 NONAME ; void CBasePlugin::MoveMessagesL(class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
-	?Load2LC@CResourceLoader@@QAEPAVHBufC16@@H@Z @ 89 NONAME ; class HBufC16 * CResourceLoader::Load2LC(int)
-	?DeleteFolderByUidL@CBasePlugin@@UAEXABVTFSMailMsgId@@0@Z @ 90 NONAME ; void CBasePlugin::DeleteFolderByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &)
-	??_ECDelayedOp@@UAE@I@Z @ 91 NONAME ; CDelayedOp::~CDelayedOp(unsigned int)
-	?SetRecurrentWeekDaysL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@W4TMRRecurrentDay@MRRecurrenceRule@@@@@Z @ 92 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentWeekDaysL(class RArray<enum MRRecurrenceRule::TMRRecurrentDay> &)
-	?Load2L@CResourceLoader@@QAEPAVHBufC16@@HABVTDesC16@@@Z @ 93 NONAME ; class HBufC16 * CResourceLoader::Load2L(int, class TDesC16 const &)
-	?StoreMessageL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVCFSMailMessage@@@Z @ 94 NONAME ; void CBasePlugin::StoreMessageL(class TFSMailMsgId const &, class CFSMailMessage &)
-	?ReportRequestStatusL@CBasePlugin@@MAEXIIIIH@Z @ 95 NONAME ; void CBasePlugin::ReportRequestStatusL(unsigned int, unsigned int, unsigned int, unsigned int, int)
-	?CreateMrReplyMessageL@CBasePlugin@@MAEPAVCFSMailMessage@@ABVTFSMailMsgId@@AAVMMRInfoObject@@0@Z @ 96 NONAME ; class CFSMailMessage * CBasePlugin::CreateMrReplyMessageL(class TFSMailMsgId const &, class MMRInfoObject &, class TFSMailMsgId const &)
-	?SetRecurrentCountL@CBaseMrRecurrenceRule@@UAEXH@Z @ 97 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentCountL(int)
-	?MRMethodL@CBaseMrInfoObject@@UBE?AW4TMRMethod@MMRInfoObject@@XZ @ 98 NONAME ; enum MMRInfoObject::TMRMethod CBaseMrInfoObject::MRMethodL(void) const
-	?UnsubscribeMailboxEvents@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 99 NONAME ; void CBasePlugin::UnsubscribeMailboxEvents(class TFSMailMsgId const &, class MFSMailEventObserver &)
-	?FetchMessagePartsL@CBasePlugin@@UAEXABVTFSMailMsgId@@00ABV?$RArray@VTFSMailMsgId@@@@AAVMFSMailRequestObserver@@HI@Z @ 100 NONAME ; void CBasePlugin::FetchMessagePartsL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class MFSMailRequestObserver &, int, unsigned int)
-	?CancelL@CBasePlugin@@UAEXH@Z @ 101 NONAME ; void CBasePlugin::CancelL(int)
-	?AddAttachmentsL@CBaseMrInfoObject@@UAEXPAVMMRAttachment@@@Z @ 102 NONAME ; void CBaseMrInfoObject::AddAttachmentsL(class MMRAttachment *)
-	?MailboxHasCapabilityL@CBasePlugin@@UAEHW4TFSMailBoxCapabilities@@VTFSMailMsgId@@@Z @ 103 NONAME ; int CBasePlugin::MailboxHasCapabilityL(enum TFSMailBoxCapabilities, class TFSMailMsgId)
-	?LocationL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 104 NONAME ; class TDesC16 const & CBaseMrInfoObject::LocationL(void) const
-	?DoListFoldersL@CBasePlugin@@IAEXVTFSMailMsgId@@IHAAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 105 NONAME ; void CBasePlugin::DoListFoldersL(class TFSMailMsgId, unsigned int, int, class RPointerArray<class CFSMailFolder> &)
-	?SetUidL@CBaseMrInfoObject@@QAEXPAVHBufC16@@@Z @ 106 NONAME ; void CBaseMrInfoObject::SetUidL(class HBufC16 *)
-	?GetContentToBufferL@CBasePlugin@@UAEXABVTFSMailMsgId@@000AAVTDes16@@I@Z @ 107 NONAME ; void CBasePlugin::GetContentToBufferL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDes16 &, unsigned int)
-	?CreateMessageToSendL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@H@Z @ 108 NONAME ; void CBasePlugin::CreateMessageToSendL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
-	?SendMessageL@CBasePlugin@@QAEXAAVCMsgStoreMailBox@@AAVCMsgStoreMessage@@ABVTTime@@@Z @ 109 NONAME ; void CBasePlugin::SendMessageL(class CMsgStoreMailBox &, class CMsgStoreMessage &, class TTime const &)
-	?GetMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@0ABV?$RArray@VTFSMailMsgId@@@@AAV?$RPointerArray@VCFSMailMessage@@@@W4TFSMailDetails@@@Z @ 110 NONAME ; void CBasePlugin::GetMessagesL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class RPointerArray<class CFSMailMessage> &, enum TFSMailDetails)
-	?GetFolderByUidL@CBasePlugin@@UAEPAVCFSMailFolder@@ABVTFSMailMsgId@@0@Z @ 111 NONAME ; class CFSMailFolder * CBasePlugin::GetFolderByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &)
-	?DeleteFetchRequest@CBasePlugin@@IAEXAAUTOngoingFetchInfo@1@@Z @ 112 NONAME ; void CBasePlugin::DeleteFetchRequest(struct CBasePlugin::TOngoingFetchInfo &)
-	?ResetCache@CBasePlugin@@IAEXXZ @ 113 NONAME ; void CBasePlugin::ResetCache(void)
-	?NewL@CBaseMrInfoProcessor@@SAPAV1@AAVCBasePlugin@@@Z @ 114 NONAME ; class CBaseMrInfoProcessor * CBaseMrInfoProcessor::NewL(class CBasePlugin &)
-	?NewChildPartFromFileL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000ABVTDesC16@@AAVRFile@@@Z @ 115 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class RFile &)
-	?GetBodyPartL@CBasePlugin@@IAEPAVCMsgStoreMessagePart@@AAVCMsgStoreMessage@@ABVTDesC16@@@Z @ 116 NONAME ; class CMsgStoreMessagePart * CBasePlugin::GetBodyPartL(class CMsgStoreMessage &, class TDesC16 const &)
-	?GoOnlineL@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 117 NONAME ; void CBasePlugin::GoOnlineL(class TFSMailMsgId const &)
-	?InvalidateCacheIfNecessary@CBasePlugin@@IAEXIII@Z @ 118 NONAME ; void CBasePlugin::InvalidateCacheIfNecessary(unsigned int, unsigned int, unsigned int)
-	?TranslateMsgStoreDayOfWeek@CBasePlugin@@IAEXKAAVTDayOfWeekFtor@@@Z @ 119 NONAME ; void CBasePlugin::TranslateMsgStoreDayOfWeek(unsigned long, class TDayOfWeekFtor &)
-	?SetRecurrentInterval@CBaseMrRecurrenceRule@@UAEXH@Z @ 120 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentInterval(int)
-	?SetEndTimeInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 121 NONAME ; void CBaseMrInfoObject::SetEndTimeInUtcL(class TTime)
-	?GetDelayedOpsManager@CBasePlugin@@QAEAAVMDelayedOpsManager@@XZ @ 122 NONAME ; class MDelayedOpsManager & CBasePlugin::GetDelayedOpsManager(void)
-	?CreateReplyMessageL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@0HABVTDesC16@@@Z @ 123 NONAME ; class CFSMailMessage * CBasePlugin::CreateReplyMessageL(class TFSMailMsgId const &, class TFSMailMsgId const &, int, class TDesC16 const &)
-	?GetCachedMsgL@CBasePlugin@@IAEPAVCMsgStoreMessage@@II@Z @ 124 NONAME ; class CMsgStoreMessage * CBasePlugin::GetCachedMsgL(unsigned int, unsigned int)
-	?UnregisterRequestObserver@CBasePlugin@@UAEXH@Z @ 125 NONAME ; void CBasePlugin::UnregisterRequestObserver(int)
-	?ClearSearchResultCache@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 126 NONAME ; void CBasePlugin::ClearSearchResultCache(class TFSMailMsgId const &)
-	??1CResourceLoader@@UAE@XZ @ 127 NONAME ; CResourceLoader::~CResourceLoader(void)
-	?CommonName@CBaseMrAttendee@@UBEABVTDesC16@@XZ @ 128 NONAME ; class TDesC16 const & CBaseMrAttendee::CommonName(void) const
-	?GetMailboxDisplayNameL@CBasePlugin@@IAEXIAAVRBuf16@@@Z @ 129 NONAME ; void CBasePlugin::GetMailboxDisplayNameL(unsigned int, class RBuf16 &)
-	?Address@CBaseMrAttendee@@UBEABVTDesC16@@XZ @ 130 NONAME ; class TDesC16 const & CBaseMrAttendee::Address(void) const
-	?GetReplyToAddressL@CBasePlugin@@MAEPAVHBufC16@@VTFSMailMsgId@@@Z @ 131 NONAME ; class HBufC16 * CBasePlugin::GetReplyToAddressL(class TFSMailMsgId)
-	?GetMailboxInfoL@CBasePlugin@@IAEAAVCMailboxInfo@@I@Z @ 132 NONAME ; class CMailboxInfo & CBasePlugin::GetMailboxInfoL(unsigned int)
-	?HandleMailboxDeleteL@CBasePlugin@@MAEXABVTFSMailMsgId@@@Z @ 133 NONAME ; void CBasePlugin::HandleMailboxDeleteL(class TFSMailMsgId const &)
-	?SetPartContentFromFileL@CBasePlugin@@UAEXABVTFSMailMsgId@@000ABVTDesC16@@@Z @ 134 NONAME ; void CBasePlugin::SetPartContentFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
-	?DeleteMessagesByUidL@CBasePlugin@@UAEXABVTFSMailMsgId@@0ABV?$RArray@VTFSMailMsgId@@@@@Z @ 135 NONAME ; void CBasePlugin::DeleteMessagesByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &)
-	?SetRecurrenceRuleL@CBaseMrInfoObject@@UAEXABVMRRecurrenceRule@@@Z @ 136 NONAME ; void CBaseMrInfoObject::SetRecurrenceRuleL(class MRRecurrenceRule const &)
-	?SetCreationTimeInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 137 NONAME ; void CBaseMrInfoObject::SetCreationTimeInUtcL(class TTime)
-	?AttendeeRole@CBaseMrAttendee@@UBE?AW4TAttendeeRole@MMRAttendee@@XZ @ 138 NONAME ; enum MMRAttendee::TAttendeeRole CBaseMrAttendee::AttendeeRole(void) const
-	?RecurrentUntil@CBaseMrRecurrenceRule@@UBE?AVTTime@@XZ @ 139 NONAME ; class TTime CBaseMrRecurrenceRule::RecurrentUntil(void) const
-	?AttendeeStatus@CBaseMrAttendee@@UBE?AW4TAttendeeStatus@MMRAttendee@@XZ @ 140 NONAME ; enum MMRAttendee::TAttendeeStatus CBaseMrAttendee::AttendeeStatus(void) const
-	?ListMailBoxesL@CBasePlugin@@UAEXAAV?$RArray@VTFSMailMsgId@@@@@Z @ 141 NONAME ; void CBasePlugin::ListMailBoxesL(class RArray<class TFSMailMsgId> &)
-	?WizardDataAvailableL@CBasePlugin@@UAEHXZ @ 142 NONAME ; int CBasePlugin::WizardDataAvailableL(void)
-	?CancelSearch@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 143 NONAME ; void CBasePlugin::CancelSearch(class TFSMailMsgId const &)
-	?RemoveChildPartL@CBasePlugin@@UAEXABVTFSMailMsgId@@0000AAVMFSMailRequestObserver@@H@Z @ 144 NONAME ; void CBasePlugin::RemoveChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
-	??0CDelayedOp@@IAE@XZ @ 145 NONAME ; CDelayedOp::CDelayedOp(void)
-	?NotifyMailboxEventL@CBasePlugin@@MAEXW4TFSMailEvent@@VTFSMailMsgId@@PAX22@Z @ 146 NONAME ; void CBasePlugin::NotifyMailboxEventL(enum TFSMailEvent, class TFSMailMsgId, void *, void *, void *)
-	?MROrganizerL@CBaseMrInfoObject@@UAEAAVMMROrganizer@@XZ @ 147 NONAME ; class MMROrganizer & CBaseMrInfoObject::MROrganizerL(void)
-	?CalendarFileName@CBasePlugin@@MBEABVTDesC16@@XZ @ 148 NONAME ; class TDesC16 const & CBasePlugin::CalendarFileName(void) const
-	?DeleteDelayedOpsManager@CBasePlugin@@QAEXXZ @ 149 NONAME ; void CBasePlugin::DeleteDelayedOpsManager(void)
-	?NewL@CBaseMrAttendee@@SAPAV1@ABVMMROrganizer@@@Z @ 150 NONAME ; class CBaseMrAttendee * CBaseMrAttendee::NewL(class MMROrganizer const &)
-	?TranslateEmailFwRecipientsL@CBasePlugin@@IAEXAAVCMsgStoreMessagePart@@ABVTDesC8@@AAV?$RPointerArray@VCFSMailAddress@@@@@Z @ 151 NONAME ; void CBasePlugin::TranslateEmailFwRecipientsL(class CMsgStoreMessagePart &, class TDesC8 const &, class RPointerArray<class CFSMailAddress> &)
-	?NotifyGlobalEventL@CBasePlugin@@IAEXW4TFSMailEvent@@VTFSMailMsgId@@PAX22@Z @ 152 NONAME ; void CBasePlugin::NotifyGlobalEventL(enum TFSMailEvent, class TFSMailMsgId, void *, void *, void *)
-	?CreateMessageToSendL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@@Z @ 153 NONAME ; class CFSMailMessage * CBasePlugin::CreateMessageToSendL(class TFSMailMsgId const &)
-	?DescriptionL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 154 NONAME ; class TDesC16 const & CBaseMrInfoObject::DescriptionL(void) const
-	?SetMRSequenceNumber@CBaseMrInfoObject@@QAEXH@Z @ 155 NONAME ; void CBaseMrInfoObject::SetMRSequenceNumber(int)
-	?TranslateEmailFwDayOfWeek@CBasePlugin@@IAEXW4TMRRecurrentDay@MRRecurrenceRule@@AAK@Z @ 156 NONAME ; void CBasePlugin::TranslateEmailFwDayOfWeek(enum MRRecurrenceRule::TMRRecurrentDay, unsigned long &)
-	?GetMailBoxStatus@CBasePlugin@@UAE?AW4TFSMailBoxStatus@@ABVTFSMailMsgId@@@Z @ 157 NONAME ; enum TFSMailBoxStatus CBasePlugin::GetMailBoxStatus(class TFSMailMsgId const &)
-	?ListMessagesL@CBasePlugin@@UAEPAVMFSMailIterator@@ABVTFSMailMsgId@@0W4TFSMailDetails@@ABV?$RArray@VTFSMailSortCriteria@@@@@Z @ 158 NONAME ; class MFSMailIterator * CBasePlugin::ListMessagesL(class TFSMailMsgId const &, class TFSMailMsgId const &, enum TFSMailDetails, class RArray<class TFSMailSortCriteria> const &)
-	?Type@CBaseMrRecurrenceRule@@UBE?AW4TMRRecurrenceType@MRRecurrenceRule@@XZ @ 159 NONAME ; enum MRRecurrenceRule::TMRRecurrenceType CBaseMrRecurrenceRule::Type(void) const
-	?Load2LC@CResourceLoader@@QAEPAVHBufC16@@HH@Z @ 160 NONAME ; class HBufC16 * CResourceLoader::Load2LC(int, int)
-	?CopyMessageAsChildPartL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@0000ABVCFSMailMessage@@@Z @ 161 NONAME ; class CFSMailMessagePart * CBasePlugin::CopyMessageAsChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class CFSMailMessage const &)
-	?TranslateMsgStoreMrL@CBasePlugin@@MAEXABVTFSMailMsgId@@AAVCMsgStorePropertyContainer@@1AAVCFSMailMessagePart@@@Z @ 162 NONAME ; void CBasePlugin::TranslateMsgStoreMrL(class TFSMailMsgId const &, class CMsgStorePropertyContainer &, class CMsgStorePropertyContainer &, class CFSMailMessagePart &)
-	?SetSubjectL@CBaseMrInfoObject@@UAEXABVTDesC16@@@Z @ 163 NONAME ; void CBaseMrInfoObject::SetSubjectL(class TDesC16 const &)
-	?SetStartTimeInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 164 NONAME ; void CBaseMrInfoObject::SetStartTimeInUtcL(class TTime)
-	?RecurrentWeekDays@CBaseMrRecurrenceRule@@UBEABV?$RArray@W4TMRRecurrentDay@MRRecurrenceRule@@@@XZ @ 165 NONAME ; class RArray<enum MRRecurrenceRule::TMRRecurrentDay> const & CBaseMrRecurrenceRule::RecurrentWeekDays(void) const
-	?GetLastSyncStatusL@CBasePlugin@@QAE?BVTFSProgress@@ABVTFSMailMsgId@@@Z @ 166 NONAME ; class TFSProgress const CBasePlugin::GetLastSyncStatusL(class TFSMailMsgId const &)
-	?PriorityL@CBaseMrInfoObject@@UBEIXZ @ 167 NONAME ; unsigned int CBaseMrInfoObject::PriorityL(void) const
-	?GetMailBoxByUidL@CBasePlugin@@UAEPAVCFSMailBox@@ABVTFSMailMsgId@@@Z @ 168 NONAME ; class CFSMailBox * CBasePlugin::GetMailBoxByUidL(class TFSMailMsgId const &)
-	?ReplyToMeetingRequestL@CBaseMrInfoProcessor@@UAEXABVTFSMailMsgId@@0AAVMMRInfoObject@@AAW4TMRInfoResponseMode@MMRInfoProcessor@@ABVTDesC16@@@Z @ 169 NONAME ; void CBaseMrInfoProcessor::ReplyToMeetingRequestL(class TFSMailMsgId const &, class TFSMailMsgId const &, class MMRInfoObject &, enum MMRInfoProcessor::TMRInfoResponseMode &, class TDesC16 const &)
-	?AuthenticateL@CBasePlugin@@UAEXAAVMFSMailRequestObserver@@H@Z @ 170 NONAME ; void CBasePlugin::AuthenticateL(class MFSMailRequestObserver &, int)
-	?MessagePartL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000@Z @ 171 NONAME ; class CFSMailMessagePart * CBasePlugin::MessagePartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
-	?AddRecurrenceExceptionL@CBaseMrInfoObject@@UAEXPAVMMRInfoObject@@@Z @ 172 NONAME ; void CBaseMrInfoObject::AddRecurrenceExceptionL(class MMRInfoObject *)
-	?SearchL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABV?$RArray@VTFSMailMsgId@@@@ABV?$RPointerArray@VTDesC16@@@@ABVTFSMailSortCriteria@@AAVMFSMailBoxSearchObserver@@@Z @ 173 NONAME ; void CBasePlugin::SearchL(class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class RPointerArray<class TDesC16> const &, class TFSMailSortCriteria const &, class MFSMailBoxSearchObserver &)
-	?EndTimeInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 174 NONAME ; class TTime CBaseMrInfoObject::EndTimeInUtcL(void) const
-	?RunL@CDelayedOp@@EAEXXZ @ 175 NONAME ; void CDelayedOp::RunL(void)
-	?SetContentL@CBasePlugin@@UAEXABVTDesC16@@ABVTFSMailMsgId@@111@Z @ 176 NONAME ; void CBasePlugin::SetContentL(class TDesC16 const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
-	?DeleteFetchRequestForPart@CBasePlugin@@IAEHAAUTOngoingFetchInfo@1@@Z @ 177 NONAME ; int CBasePlugin::DeleteFetchRequestForPart(struct CBasePlugin::TOngoingFetchInfo &)
-	?ModificationNotify@CBasePlugin@@UAEXIW4TMsgStoreOperation@@W4TMsgStoreContainerType@@KIII@Z @ 178 NONAME ; void CBasePlugin::ModificationNotify(unsigned int, enum TMsgStoreOperation, enum TMsgStoreContainerType, unsigned long, unsigned int, unsigned int, unsigned int)
-	?StartOp@CDelayedOp@@QAEXXZ @ 179 NONAME ; void CDelayedOp::StartOp(void)
-	?SetReplyOrForwardToFieldL@CBasePlugin@@IAEXAAVCMsgStoreMessage@@@Z @ 180 NONAME ; void CBasePlugin::SetReplyOrForwardToFieldL(class CMsgStoreMessage &)
-	?FindFetchRequestL@CBasePlugin@@IAEHIIIIAAUTOngoingFetchInfo@1@@Z @ 181 NONAME ; int CBasePlugin::FindFetchRequestL(unsigned int, unsigned int, unsigned int, unsigned int, struct CBasePlugin::TOngoingFetchInfo &)
-	?RemovePartContentL@CBasePlugin@@UAEXABVTFSMailMsgId@@00ABV?$RArray@VTFSMailMsgId@@@@@Z @ 182 NONAME ; void CBasePlugin::RemovePartContentL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &)
-	?RecurrenceRuleL@CBaseMrInfoObject@@UBEABVMRRecurrenceRule@@XZ @ 183 NONAME ; class MRRecurrenceRule const & CBaseMrInfoObject::RecurrenceRuleL(void) const
-	?Load2L@CResourceLoader@@QAEPAVHBufC16@@H@Z @ 184 NONAME ; class HBufC16 * CResourceLoader::Load2L(int)
-	?CreateForwardMessageL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@0ABVTDesC16@@@Z @ 185 NONAME ; class CFSMailMessage * CBasePlugin::CreateForwardMessageL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
-	?Fs@CResourceLoader@@QAEAAVRFs@@XZ @ 186 NONAME ; class RFs & CResourceLoader::Fs(void)
-	?NewLC@CBasePlugin@@SAPAV1@XZ @ 187 NONAME ; class CBasePlugin * CBasePlugin::NewLC(void)
-	?NewL@CBaseMrAttendee@@SAPAV1@ABVMMRAttendee@@@Z @ 188 NONAME ; class CBaseMrAttendee * CBaseMrAttendee::NewL(class MMRAttendee const &)
-	?RecurrenceExceptionsL@CBaseMrInfoObject@@UBEABV?$RPointerArray@VMMRInfoObject@@@@XZ @ 189 NONAME ; class RPointerArray<class MMRInfoObject> const & CBaseMrInfoObject::RecurrenceExceptionsL(void) const
-	?SubscribeMailboxEventsL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 190 NONAME ; void CBasePlugin::SubscribeMailboxEventsL(class TFSMailMsgId const &, class MFSMailEventObserver &)
-	?SetLocationL@CBaseMrInfoObject@@UAEXABVTDesC16@@@Z @ 191 NONAME ; void CBaseMrInfoObject::SetLocationL(class TDesC16 const &)
-	?RecurrentDaysofMonth@CBaseMrRecurrenceRule@@UBEABV?$RArray@UTRecurrentDaysofMonth@MRRecurrenceRule@@@@XZ @ 192 NONAME ; class RArray<struct MRRecurrenceRule::TRecurrentDaysofMonth> const & CBaseMrRecurrenceRule::RecurrentDaysofMonth(void) const
-	?ChildPartsL@CBasePlugin@@UAEXABVTFSMailMsgId@@000AAV?$RPointerArray@VCFSMailMessagePart@@@@@Z @ 193 NONAME ; void CBasePlugin::ChildPartsL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RPointerArray<class CFSMailMessagePart> &)
-	?SetUidL@CBaseMrInfoObject@@QAEXABVTDesC16@@@Z @ 194 NONAME ; void CBaseMrInfoObject::SetUidL(class TDesC16 const &)
-	??1CBaseMrInfoProcessor@@UAE@XZ @ 195 NONAME ; CBaseMrInfoProcessor::~CBaseMrInfoProcessor(void)
-	??1CBaseMrAttendee@@UAE@XZ @ 196 NONAME ; CBaseMrAttendee::~CBaseMrAttendee(void)
-	?SubjectL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 197 NONAME ; class TDesC16 const & CBaseMrInfoObject::SubjectL(void) const
-	?UidL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 198 NONAME ; class TDesC16 const & CBaseMrInfoObject::UidL(void) const
-	?RefreshMailboxCacheL@CBasePlugin@@IAEAAVCMailboxInfo@@I@Z @ 199 NONAME ; class CMailboxInfo & CBasePlugin::RefreshMailboxCacheL(unsigned int)
-	?SystemEventNotifyL@CBasePlugin@@IAEXW4TMsgStoreSystemEvent@@@Z @ 200 NONAME ; void CBasePlugin::SystemEventNotifyL(enum TMsgStoreSystemEvent)
-	?SetResponseRequestedL@CBaseMrAttendee@@UAEXH@Z @ 201 NONAME ; void CBaseMrAttendee::SetResponseRequestedL(int)
-	?RecurrentInterval@CBaseMrRecurrenceRule@@UBEHXZ @ 202 NONAME ; int CBaseMrRecurrenceRule::RecurrentInterval(void) const
-	?SetMailboxName@CBasePlugin@@UAEXABVTFSMailMsgId@@ABVTDesC16@@@Z @ 203 NONAME ; void CBasePlugin::SetMailboxName(class TFSMailMsgId const &, class TDesC16 const &)
-	?GetMessagePartFileL@CBasePlugin@@UAEHABVTFSMailMsgId@@000AAVRFile@@@Z @ 204 NONAME ; int CBasePlugin::GetMessagePartFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RFile &)
-	?RemoveObserver@CBasePlugin@@UAEXAAVMFSMailEventObserver@@@Z @ 205 NONAME ; void CBasePlugin::RemoveObserver(class MFSMailEventObserver &)
-	?DoCancelSearchL@CBasePlugin@@IAEXABVTFSMailMsgId@@@Z @ 206 NONAME ; void CBasePlugin::DoCancelSearchL(class TFSMailMsgId const &)
-	?NewChildPartFromFileL@CBasePlugin@@UAEXABVTFSMailMsgId@@000ABVTDesC16@@1AAVMFSMailRequestObserver@@H@Z @ 207 NONAME ; void CBasePlugin::NewChildPartFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &, class MFSMailRequestObserver &, int)
-	?AddObserverL@CBasePlugin@@UAEXAAVMFSMailEventObserver@@@Z @ 208 NONAME ; void CBasePlugin::AddObserverL(class MFSMailEventObserver &)
-	?Load2LC@CResourceLoader@@QAEPAVHBufC16@@HABVTDesC16@@@Z @ 209 NONAME ; class HBufC16 * CResourceLoader::Load2LC(int, class TDesC16 const &)
-	?GetMailBoxAddressL@CBasePlugin@@MAEPAVHBufC16@@VTFSMailMsgId@@@Z @ 210 NONAME ; class HBufC16 * CBasePlugin::GetMailBoxAddressL(class TFSMailMsgId)
-	?SystemEventNotify@CBasePlugin@@UAEXW4TMsgStoreSystemEvent@@@Z @ 211 NONAME ; void CBasePlugin::SystemEventNotify(enum TMsgStoreSystemEvent)
-	?GetPlugin@CDelayedOp@@IAEAAVCBasePlugin@@XZ @ 212 NONAME ; class CBasePlugin & CDelayedOp::GetPlugin(void)
-	?TranslateMsgStorePropsL@CBasePlugin@@MAEXABVTFSMailMsgId@@AAVCMsgStorePropertyContainer@@AAVCFSMailMessagePart@@W4TFSMailDetails@@@Z @ 213 NONAME ; void CBasePlugin::TranslateMsgStorePropsL(class TFSMailMsgId const &, class CMsgStorePropertyContainer &, class CFSMailMessagePart &, enum TFSMailDetails)
-	?SetAttendeeRoleL@CBaseMrAttendee@@UAEXW4TAttendeeRole@MMRAttendee@@@Z @ 214 NONAME ; void CBaseMrAttendee::SetAttendeeRoleL(enum MMRAttendee::TAttendeeRole)
-	?SendMessageL@CBasePlugin@@UAEXAAVCFSMailMessage@@@Z @ 215 NONAME ; void CBasePlugin::SendMessageL(class CFSMailMessage &)
-	??0CBasePlugin@@IAE@XZ @ 216 NONAME ; CBasePlugin::CBasePlugin(void)
-	?SetRecurrenceUntilL@CBaseMrRecurrenceRule@@UAEXVTTime@@@Z @ 217 NONAME ; void CBaseMrRecurrenceRule::SetRecurrenceUntilL(class TTime)
-	?CreateResourceReaderLC@CResourceLoader@@QBEPAVHBufC8@@AAVTResourceReader@@H@Z @ 218 NONAME ; class HBufC8 * CResourceLoader::CreateResourceReaderLC(class TResourceReader &, int) const
-	?RemoveAllPropertiesL@CBasePlugin@@KAXAAVCMsgStorePropertyContainer@@ABVTDesC8@@@Z @ 219 NONAME ; void CBasePlugin::RemoveAllPropertiesL(class CMsgStorePropertyContainer &, class TDesC8 const &)
-	?CopyMessagePartFileL@CBasePlugin@@UAEXABVTFSMailMsgId@@000ABVTDesC16@@@Z @ 220 NONAME ; void CBasePlugin::CopyMessagePartFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
-	?StartTimeInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 221 NONAME ; class TTime CBaseMrInfoObject::StartTimeInUtcL(void) const
-	?GetMessageByUidL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@00W4TFSMailDetails@@@Z @ 222 NONAME ; class CFSMailMessage * CBasePlugin::GetMessageByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, enum TFSMailDetails)
-	?SetCredentialsL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABVTDesC16@@1@Z @ 223 NONAME ; void CBasePlugin::SetCredentialsL(class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &)
+	?SetResponseRequestedL@CBaseMrAttendee@@UAEXH@Z @ 55 NONAME ; void CBaseMrAttendee::SetResponseRequestedL(int)
+	?GetMailboxInfoL@CBasePlugin@@IAEAAVCMailboxInfo@@I@Z @ 56 NONAME ; class CMailboxInfo & CBasePlugin::GetMailboxInfoL(unsigned int)
+	?SetCreationTimeInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 57 NONAME ; void CBaseMrInfoObject::SetCreationTimeInUtcL(class TTime)
+	?FetchMessagePartsL@CBasePlugin@@UAEXABVTFSMailMsgId@@00ABV?$RArray@VTFSMailMsgId@@@@AAVMFSMailRequestObserver@@HI@Z @ 58 NONAME ; void CBasePlugin::FetchMessagePartsL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class MFSMailRequestObserver &, int, unsigned int)
+	?GetBodyPartL@CBasePlugin@@IAEPAVCMsgStoreMessagePart@@AAVCMsgStoreMessage@@ABVTDesC16@@@Z @ 59 NONAME ; class CMsgStoreMessagePart * CBasePlugin::GetBodyPartL(class CMsgStoreMessage &, class TDesC16 const &)
+	?AddAttendeeL@CBaseMrInfoObject@@UAEXPAVMMRAttendee@@@Z @ 60 NONAME ; void CBaseMrInfoObject::AddAttendeeL(class MMRAttendee *)
+	?EndTimeInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 61 NONAME ; class TTime CBaseMrInfoObject::EndTimeInUtcL(void) const
+	?SendMessageL@CBasePlugin@@QAEXAAVCMsgStoreMailBox@@AAVCMsgStoreMessage@@ABVTTime@@@Z @ 62 NONAME ; void CBasePlugin::SendMessageL(class CMsgStoreMailBox &, class CMsgStoreMessage &, class TTime const &)
+	??_ECDelayedOp@@UAE@I@Z @ 63 NONAME ; CDelayedOp::~CDelayedOp(unsigned int)
+	?SetAttendeeRoleL@CBaseMrAttendee@@UAEXW4TAttendeeRole@MMRAttendee@@@Z @ 64 NONAME ; void CBaseMrAttendee::SetAttendeeRoleL(enum MMRAttendee::TAttendeeRole)
+	?RefreshMailboxCacheL@CBasePlugin@@IAEAAVCMailboxInfo@@I@Z @ 65 NONAME ; class CMailboxInfo & CBasePlugin::RefreshMailboxCacheL(unsigned int)
+	?SetRecurrenceStartTimeL@CBaseMrRecurrenceRule@@UAEXVTTime@@@Z @ 66 NONAME ; void CBaseMrRecurrenceRule::SetRecurrenceStartTimeL(class TTime)
+	?RecurrentCount@CBaseMrRecurrenceRule@@UBEIXZ @ 67 NONAME ; unsigned int CBaseMrRecurrenceRule::RecurrentCount(void) const
+	?TranslateEmailFwDayOfWeek@CBasePlugin@@IAEXW4TMRRecurrentDay@MRRecurrenceRule@@AAK@Z @ 68 NONAME ; void CBasePlugin::TranslateEmailFwDayOfWeek(enum MRRecurrenceRule::TMRRecurrentDay, unsigned long &)
+	?CopyMessagePartFileL@CBasePlugin@@UAEXABVTFSMailMsgId@@000ABVTDesC16@@@Z @ 69 NONAME ; void CBasePlugin::CopyMessagePartFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
+	?MRResponse@CBaseMrInfoObject@@UBE?AW4TResponse@MMRInfoObject@@XZ @ 70 NONAME ; enum MMRInfoObject::TResponse CBaseMrInfoObject::MRResponse(void) const
+	?GetCachedMsgL@CBasePlugin@@IAEPAVCMsgStoreMessage@@II@Z @ 71 NONAME ; class CMsgStoreMessage * CBasePlugin::GetCachedMsgL(unsigned int, unsigned int)
+	?SetMethod@CBaseMrInfoObject@@QAEXW4TMRMethod@MMRInfoObject@@@Z @ 72 NONAME ; void CBaseMrInfoObject::SetMethod(enum MMRInfoObject::TMRMethod)
+	??1CBasePlugin@@UAE@XZ @ 73 NONAME ; CBasePlugin::~CBasePlugin(void)
+	?SetSubjectL@CBaseMrInfoObject@@UAEXABVTDesC16@@@Z @ 74 NONAME ; void CBaseMrInfoObject::SetSubjectL(class TDesC16 const &)
+	?StoreMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAV?$RPointerArray@VCFSMailMessage@@@@AAVMFSMailRequestObserver@@H@Z @ 75 NONAME ; void CBasePlugin::StoreMessagesL(class TFSMailMsgId const &, class RPointerArray<class CFSMailMessage> &, class MFSMailRequestObserver &, int)
+	?StartOp@CDelayedOp@@QAEXXZ @ 76 NONAME ; void CDelayedOp::StartOp(void)
+	?MailboxHasCapabilityL@CBasePlugin@@UAEHW4TFSMailBoxCapabilities@@VTFSMailMsgId@@@Z @ 77 NONAME ; int CBasePlugin::MailboxHasCapabilityL(enum TFSMailBoxCapabilities, class TFSMailMsgId)
+	?StoreMessagePartsL@CBasePlugin@@UAEXAAV?$RPointerArray@VCFSMailMessagePart@@@@AAVMFSMailRequestObserver@@H@Z @ 78 NONAME ; void CBasePlugin::StoreMessagePartsL(class RPointerArray<class CFSMailMessagePart> &, class MFSMailRequestObserver &, int)
+	?AccountEventNotifyL@CBasePlugin@@IAEXW4TMsgStoreAccountEvent@@JABVTDesC16@@1I@Z @ 79 NONAME ; void CBasePlugin::AccountEventNotifyL(enum TMsgStoreAccountEvent, long, class TDesC16 const &, class TDesC16 const &, unsigned int)
+	?SupportedFields@CBaseMrInfoObject@@UBEHAAV?$RArray@W4TESMRInfoField@MMRInfoObject@@@@@Z @ 80 NONAME ; int CBaseMrInfoObject::SupportedFields(class RArray<enum MMRInfoObject::TESMRInfoField> &) const
+	?StatusL@CBasePlugin@@UAE?AVTFSProgress@@H@Z @ 81 NONAME ; class TFSProgress CBasePlugin::StatusL(int)
+	?SetRecurrentMonthsL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@W4TMRRecurrenceMonth@MRRecurrenceRule@@@@@Z @ 82 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentMonthsL(class RArray<enum MRRecurrenceRule::TMRRecurrenceMonth> &)
+	?SetContentL@CBasePlugin@@UAEXABVTDesC16@@ABVTFSMailMsgId@@111@Z @ 83 NONAME ; void CBasePlugin::SetContentL(class TDesC16 const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
+	?GetMailBoxAddressL@CBasePlugin@@MAEPAVHBufC16@@VTFSMailMsgId@@@Z @ 84 NONAME ; class HBufC16 * CBasePlugin::GetMailBoxAddressL(class TFSMailMsgId)
+	?TranslateEmailFwAttendeeL@CBasePlugin@@IAEXAAVMMROrganizer@@AAVRMsgStoreAddress@@@Z @ 85 NONAME ; void CBasePlugin::TranslateEmailFwAttendeeL(class MMROrganizer &, class RMsgStoreAddress &)
+	?GetMailBoxStatus@CBasePlugin@@UAE?AW4TFSMailBoxStatus@@ABVTFSMailMsgId@@@Z @ 86 NONAME ; enum TFSMailBoxStatus CBasePlugin::GetMailBoxStatus(class TFSMailMsgId const &)
+	??1CBaseMrAttendee@@UAE@XZ @ 87 NONAME ; CBaseMrAttendee::~CBaseMrAttendee(void)
+	?NewChildPartFromFileL@CBasePlugin@@UAEXABVTFSMailMsgId@@000ABVTDesC16@@1AAVMFSMailRequestObserver@@H@Z @ 88 NONAME ; void CBasePlugin::NewChildPartFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &, class MFSMailRequestObserver &, int)
+	?BlockCopyMoveFromFoldersL@CBasePlugin@@MAEXVTFSMailMsgId@@W4TFSFolderType@@AAVCFSMailFolder@@@Z @ 89 NONAME ; void CBasePlugin::BlockCopyMoveFromFoldersL(class TFSMailMsgId, enum TFSFolderType, class CFSMailFolder &)
+	?RecurrentMonthDays@CBaseMrRecurrenceRule@@UBEABV?$RArray@H@@XZ @ 90 NONAME ; class RArray<int> const & CBaseMrRecurrenceRule::RecurrentMonthDays(void) const
+	??1CBaseMrInfoProcessor@@UAE@XZ @ 91 NONAME ; CBaseMrInfoProcessor::~CBaseMrInfoProcessor(void)
+	?NewL@CBaseMrRecurrenceRule@@SAPAV1@ABVMRRecurrenceRule@@@Z @ 92 NONAME ; class CBaseMrRecurrenceRule * CBaseMrRecurrenceRule::NewL(class MRRecurrenceRule const &)
+	?ChildPartsL@CBasePlugin@@UAEXABVTFSMailMsgId@@000AAV?$RPointerArray@VCFSMailMessagePart@@@@@Z @ 93 NONAME ; void CBasePlugin::ChildPartsL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RPointerArray<class CFSMailMessagePart> &)
+	?SetPartContentFromFileL@CBasePlugin@@UAEXABVTFSMailMsgId@@000ABVTDesC16@@@Z @ 94 NONAME ; void CBasePlugin::SetPartContentFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
+	?ResetBodyCache@CBasePlugin@@IAEXXZ @ 95 NONAME ; void CBasePlugin::ResetBodyCache(void)
+	?Type@CBaseMrRecurrenceRule@@UBE?AW4TMRRecurrenceType@MRRecurrenceRule@@XZ @ 96 NONAME ; enum MRRecurrenceRule::TMRRecurrenceType CBaseMrRecurrenceRule::Type(void) const
+	?ListFoldersL@CBasePlugin@@UAEXABVTFSMailMsgId@@0AAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 97 NONAME ; void CBasePlugin::ListFoldersL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RPointerArray<class CFSMailFolder> &)
+	?SetContext@CDelayedOp@@QAEXAAVCBasePlugin@@AAVMDelayedOpsManager@@@Z @ 98 NONAME ; void CDelayedOp::SetContext(class CBasePlugin &, class MDelayedOpsManager &)
+	??_ECBasePlugin@@UAE@I@Z @ 99 NONAME ; CBasePlugin::~CBasePlugin(unsigned int)
+	?ReplyToMeetingRequestL@CBaseMrInfoProcessor@@UAEXABVTFSMailMsgId@@0AAVMMRInfoObject@@AAW4TMRInfoResponseMode@MMRInfoProcessor@@ABVTDesC16@@@Z @ 100 NONAME ; void CBaseMrInfoProcessor::ReplyToMeetingRequestL(class TFSMailMsgId const &, class TFSMailMsgId const &, class MMRInfoObject &, enum MMRInfoProcessor::TMRInfoResponseMode &, class TDesC16 const &)
+	?GetFolderByUidL@CBasePlugin@@UAEPAVCFSMailFolder@@ABVTFSMailMsgId@@0@Z @ 101 NONAME ; class CFSMailFolder * CBasePlugin::GetFolderByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &)
+	?RecurrenceRuleL@CBaseMrInfoObject@@UBEABVMRRecurrenceRule@@XZ @ 102 NONAME ; class MRRecurrenceRule const & CBaseMrInfoObject::RecurrenceRuleL(void) const
+	?AuthenticateL@CBasePlugin@@UAEXAAVMFSMailRequestObserver@@H@Z @ 103 NONAME ; void CBasePlugin::AuthenticateL(class MFSMailRequestObserver &, int)
+	?DeleteMessagesByUidL@CBasePlugin@@UAEXABVTFSMailMsgId@@0ABV?$RArray@VTFSMailMsgId@@@@@Z @ 104 NONAME ; void CBasePlugin::DeleteMessagesByUidL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &)
+	?UnsubscribeMailboxEvents@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 105 NONAME ; void CBasePlugin::UnsubscribeMailboxEvents(class TFSMailMsgId const &, class MFSMailEventObserver &)
+	?SetEndTimeInUtcL@CBaseMrInfoObject@@UAEXVTTime@@@Z @ 106 NONAME ; void CBaseMrInfoObject::SetEndTimeInUtcL(class TTime)
+	?SetRecurrenceTypeL@CBaseMrRecurrenceRule@@UAEXW4TMRRecurrenceType@MRRecurrenceRule@@@Z @ 107 NONAME ; void CBaseMrRecurrenceRule::SetRecurrenceTypeL(enum MRRecurrenceRule::TMRRecurrenceType)
+	?TranslateEmailFwMessageL@CBasePlugin@@MAEXAAVCFSMailMessagePart@@AAVCMsgStoreMessagePart@@H@Z @ 108 NONAME ; void CBasePlugin::TranslateEmailFwMessageL(class CFSMailMessagePart &, class CMsgStoreMessagePart &, int)
+	?GetPluginId@CBasePlugin@@MAEIXZ @ 109 NONAME ; unsigned int CBasePlugin::GetPluginId(void)
+	?CreateForwardReplyMessageL@CBasePlugin@@IAEPAVCFSMailMessage@@ABVTFSMailMsgId@@0HABVTDesC16@@HH@Z @ 110 NONAME ; class CFSMailMessage * CBasePlugin::CreateForwardReplyMessageL(class TFSMailMsgId const &, class TFSMailMsgId const &, int, class TDesC16 const &, int, int)
+	?SetCommonNameL@CBaseMrAttendee@@UAEXABVTDesC16@@@Z @ 111 NONAME ; void CBaseMrAttendee::SetCommonNameL(class TDesC16 const &)
+	?CreateMessageToSendL@CBasePlugin@@UAEPAVCFSMailMessage@@ABVTFSMailMsgId@@@Z @ 112 NONAME ; class CFSMailMessage * CBasePlugin::CreateMessageToSendL(class TFSMailMsgId const &)
+	?MessagePartL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000@Z @ 113 NONAME ; class CFSMailMessagePart * CBasePlugin::MessagePartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
+	?Load2LC@CResourceLoader@@QAEPAVHBufC16@@HABVTDesC16@@@Z @ 114 NONAME ; class HBufC16 * CResourceLoader::Load2LC(int, class TDesC16 const &)
+	?RefreshNowL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@HH@Z @ 115 NONAME ; void CBasePlugin::RefreshNowL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int, int)
+	?ResetCache@CBasePlugin@@IAEXXZ @ 116 NONAME ; void CBasePlugin::ResetCache(void)
+	?MRMethodL@CBaseMrInfoObject@@UBE?AW4TMRMethod@MMRInfoObject@@XZ @ 117 NONAME ; enum MMRInfoObject::TMRMethod CBaseMrInfoObject::MRMethodL(void) const
+	?RunL@CDelayedOp@@EAEXXZ @ 118 NONAME ; void CDelayedOp::RunL(void)
+	?RemoveChildPartL@CBasePlugin@@UAEXABVTFSMailMsgId@@0000@Z @ 119 NONAME ; void CBasePlugin::RemoveChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
+	?RecurrenceExceptionsL@CBaseMrInfoObject@@UBEABV?$RPointerArray@VMMRInfoObject@@@@XZ @ 120 NONAME ; class RPointerArray<class MMRInfoObject> const & CBaseMrInfoObject::RecurrenceExceptionsL(void) const
+	?SetRecurrentMonthDaysL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@H@@@Z @ 121 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentMonthDaysL(class RArray<int> &)
+	?SetPriorityL@CBaseMrInfoObject@@UAEXI@Z @ 122 NONAME ; void CBaseMrInfoObject::SetPriorityL(unsigned int)
+	?AttendeesL@CBaseMrInfoObject@@UAEAAV?$RPointerArray@VMMRAttendee@@@@XZ @ 123 NONAME ; class RPointerArray<class MMRAttendee> & CBaseMrInfoObject::AttendeesL(void)
+	?Load2L@CResourceLoader@@QAEPAVHBufC16@@HH@Z @ 124 NONAME ; class HBufC16 * CResourceLoader::Load2L(int, int)
+	?NewL@CBasePlugin@@SAPAV1@XZ @ 125 NONAME ; class CBasePlugin * CBasePlugin::NewL(void)
+	?FetchEmailAddressL@CBasePlugin@@IAEPAVCFSMailAddress@@AAVCMsgStorePropertyContainer@@I@Z @ 126 NONAME ; class CFSMailAddress * CBasePlugin::FetchEmailAddressL(class CMsgStorePropertyContainer &, unsigned int)
+	?NewL@CBaseMrInfoProcessor@@SAPAV1@AAVCBasePlugin@@@Z @ 127 NONAME ; class CBaseMrInfoProcessor * CBaseMrInfoProcessor::NewL(class CBasePlugin &)
+	?CopyMessageAsChildPartL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@0000ABVCFSMailMessage@@@Z @ 128 NONAME ; class CFSMailMessagePart * CBasePlugin::CopyMessageAsChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class CFSMailMessage const &)
+	?NotifyGlobalEventL@CBasePlugin@@IAEXW4TFSMailEvent@@VTFSMailMsgId@@PAX22@Z @ 129 NONAME ; void CBasePlugin::NotifyGlobalEventL(enum TFSMailEvent, class TFSMailMsgId, void *, void *, void *)
+	?GetCachedBodyChildrenL@CBasePlugin@@IAEAAV?$RPointerArray@VCMsgStoreMessagePart@@@@XZ @ 130 NONAME ; class RPointerArray<class CMsgStoreMessagePart> & CBasePlugin::GetCachedBodyChildrenL(void)
+	?StartTimeInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 131 NONAME ; class TTime CBaseMrInfoObject::StartTimeInUtcL(void) const
+	?ListMailBoxesL@CBasePlugin@@UAEXAAV?$RArray@VTFSMailMsgId@@@@@Z @ 132 NONAME ; void CBasePlugin::ListMailBoxesL(class RArray<class TFSMailMsgId> &)
+	?SetRecurrenceUntilL@CBaseMrRecurrenceRule@@UAEXVTTime@@@Z @ 133 NONAME ; void CBaseMrRecurrenceRule::SetRecurrenceUntilL(class TTime)
+	?GetBrandingIdL@CBasePlugin@@UAEAAVTDesC16@@ABVTFSMailMsgId@@@Z @ 134 NONAME ; class TDesC16 & CBasePlugin::GetBrandingIdL(class TFSMailMsgId const &)
+	?FetchMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@0ABV?$RArray@VTFSMailMsgId@@@@W4TFSMailDetails@@AAVMFSMailRequestObserver@@H@Z @ 135 NONAME ; void CBasePlugin::FetchMessagesL(class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, enum TFSMailDetails, class MFSMailRequestObserver &, int)
+	?RemovePartContentL@CBasePlugin@@UAEXABVTFSMailMsgId@@00ABV?$RArray@VTFSMailMsgId@@@@@Z @ 136 NONAME ; void CBasePlugin::RemovePartContentL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &)
+	?ClearSearchResultCache@CBasePlugin@@UAEXABVTFSMailMsgId@@@Z @ 137 NONAME ; void CBasePlugin::ClearSearchResultCache(class TFSMailMsgId const &)
+	?Address@CBaseMrAttendee@@UBEABVTDesC16@@XZ @ 138 NONAME ; class TDesC16 const & CBaseMrAttendee::Address(void) const
+	?NotifyEventL@CBasePlugin@@IAEXIIIW4TFSMailEvent@@I@Z @ 139 NONAME ; void CBasePlugin::NotifyEventL(unsigned int, unsigned int, unsigned int, enum TFSMailEvent, unsigned int)
+	?GetMailBoxByUidL@CBasePlugin@@UAEPAVCFSMailBox@@ABVTFSMailMsgId@@@Z @ 140 NONAME ; class CFSMailBox * CBasePlugin::GetMailBoxByUidL(class TFSMailMsgId const &)
+	?SetDescriptionL@CBaseMrInfoObject@@UAEXABVTDesC16@@@Z @ 141 NONAME ; void CBaseMrInfoObject::SetDescriptionL(class TDesC16 const &)
+	?AccountEventNotify@CBasePlugin@@UAEXW4TMsgStoreAccountEvent@@JABVTDesC16@@1I@Z @ 142 NONAME ; void CBasePlugin::AccountEventNotify(enum TMsgStoreAccountEvent, long, class TDesC16 const &, class TDesC16 const &, unsigned int)
+	?SetUidL@CBaseMrInfoObject@@QAEXPAVHBufC16@@@Z @ 143 NONAME ; void CBaseMrInfoObject::SetUidL(class HBufC16 *)
+	?RemoveObserver@CBasePlugin@@UAEXAAVMFSMailEventObserver@@@Z @ 144 NONAME ; void CBasePlugin::RemoveObserver(class MFSMailEventObserver &)
+	?SetRecurrentCountL@CBaseMrRecurrenceRule@@UAEXH@Z @ 145 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentCountL(int)
+	?HandleMailboxDeleteL@CBasePlugin@@MAEXABVTFSMailMsgId@@@Z @ 146 NONAME ; void CBasePlugin::HandleMailboxDeleteL(class TFSMailMsgId const &)
+	?RecurrentMonths@CBaseMrRecurrenceRule@@UBEABV?$RArray@W4TMRRecurrenceMonth@MRRecurrenceRule@@@@XZ @ 147 NONAME ; class RArray<enum MRRecurrenceRule::TMRRecurrenceMonth> const & CBaseMrRecurrenceRule::RecurrentMonths(void) const
+	?AttendeeStatus@CBaseMrAttendee@@UBE?AW4TAttendeeStatus@MMRAttendee@@XZ @ 148 NONAME ; enum MMRAttendee::TAttendeeStatus CBaseMrAttendee::AttendeeStatus(void) const
+	?NewL@CResourceLoader@@SAPAV1@ABVTDesC16@@@Z @ 149 NONAME ; class CResourceLoader * CResourceLoader::NewL(class TDesC16 const &)
+	?SetRecurrentInterval@CBaseMrRecurrenceRule@@UAEXH@Z @ 150 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentInterval(int)
+	?GetDelayedOpsManager@CBasePlugin@@QAEAAVMDelayedOpsManager@@XZ @ 151 NONAME ; class MDelayedOpsManager & CBasePlugin::GetDelayedOpsManager(void)
+	?GetContentToBufferL@CBasePlugin@@UAEXABVTFSMailMsgId@@000AAVTDes16@@I@Z @ 152 NONAME ; void CBasePlugin::GetContentToBufferL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDes16 &, unsigned int)
+	?SetUidL@CBaseMrInfoObject@@QAEXABVTDesC16@@@Z @ 153 NONAME ; void CBaseMrInfoObject::SetUidL(class TDesC16 const &)
+	??1CResourceLoader@@UAE@XZ @ 154 NONAME ; CResourceLoader::~CResourceLoader(void)
+	?CreateFolderL@CBasePlugin@@UAEPAVCFSMailFolder@@ABVTFSMailMsgId@@0ABVTDesC16@@H@Z @ 155 NONAME ; class CFSMailFolder * CBasePlugin::CreateFolderL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, int)
+	?UidL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 156 NONAME ; class TDesC16 const & CBaseMrInfoObject::UidL(void) const
+	?DoClearSearchResultCacheL@CBasePlugin@@IAEXABVTFSMailMsgId@@@Z @ 157 NONAME ; void CBasePlugin::DoClearSearchResultCacheL(class TFSMailMsgId const &)
+	?AddAttachmentsL@CBaseMrInfoObject@@UAEXPAVMMRAttachment@@@Z @ 158 NONAME ; void CBaseMrInfoObject::AddAttachmentsL(class MMRAttachment *)
+	?MoveMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABV?$RArray@VTFSMailMsgId@@@@00@Z @ 159 NONAME ; void CBasePlugin::MoveMessagesL(class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class TFSMailMsgId const &, class TFSMailMsgId const &)
+	?SubscribeMailboxEventsL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 160 NONAME ; void CBasePlugin::SubscribeMailboxEventsL(class TFSMailMsgId const &, class MFSMailEventObserver &)
+	?SetMRSequenceNumber@CBaseMrInfoObject@@QAEXH@Z @ 161 NONAME ; void CBaseMrInfoObject::SetMRSequenceNumber(int)
+	?DescriptionL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 162 NONAME ; class TDesC16 const & CBaseMrInfoObject::DescriptionL(void) const
+	?ListFoldersL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 163 NONAME ; void CBasePlugin::ListFoldersL(class TFSMailMsgId const &, class RPointerArray<class CFSMailFolder> &)
+	?SetRecurrentWeekDaysL@CBaseMrRecurrenceRule@@UAEXAAV?$RArray@W4TMRRecurrentDay@MRRecurrenceRule@@@@@Z @ 164 NONAME ; void CBaseMrRecurrenceRule::SetRecurrentWeekDaysL(class RArray<enum MRRecurrenceRule::TMRRecurrentDay> &)
+	?RemoveChildPartL@CBasePlugin@@UAEXABVTFSMailMsgId@@0000AAVMFSMailRequestObserver@@H@Z @ 165 NONAME ; void CBasePlugin::RemoveChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
+	?CopyMessagesL@CBasePlugin@@UAEXABVTFSMailMsgId@@ABV?$RArray@VTFSMailMsgId@@@@AAV3@00@Z @ 166 NONAME ; void CBasePlugin::CopyMessagesL(class TFSMailMsgId const &, class RArray<class TFSMailMsgId> const &, class RArray<class TFSMailMsgId> &, class TFSMailMsgId const &, class TFSMailMsgId const &)
+	?AlarmInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 167 NONAME ; class TTime CBaseMrInfoObject::AlarmInUtcL(void) const
+	?SendMessageL@CBasePlugin@@UAEXAAVCFSMailMessage@@@Z @ 168 NONAME ; void CBasePlugin::SendMessageL(class CFSMailMessage &)
+	??0CBasePlugin@@IAE@XZ @ 169 NONAME ; CBasePlugin::CBasePlugin(void)
+	?SetAddressL@CBaseMrAttendee@@UAEXABVTDesC16@@@Z @ 170 NONAME ; void CBaseMrAttendee::SetAddressL(class TDesC16 const &)
+	?RecurrentUntil@CBaseMrRecurrenceRule@@UBE?AVTTime@@XZ @ 171 NONAME ; class TTime CBaseMrRecurrenceRule::RecurrentUntil(void) const
+	?SetMRResponseL@CBaseMrInfoObject@@UAEXW4TResponse@MMRInfoObject@@@Z @ 172 NONAME ; void CBaseMrInfoObject::SetMRResponseL(enum MMRInfoObject::TResponse)
+	?NewL@CBaseMrInfoObject@@SAPAV1@XZ @ 173 NONAME ; class CBaseMrInfoObject * CBaseMrInfoObject::NewL(void)
+	?DoListFoldersL@CBasePlugin@@IAEXVTFSMailMsgId@@IHAAV?$RPointerArray@VCFSMailFolder@@@@@Z @ 174 NONAME ; void CBasePlugin::DoListFoldersL(class TFSMailMsgId, unsigned int, int, class RPointerArray<class CFSMailFolder> &)
+	?MROrganizerL@CBaseMrInfoObject@@UAEAAVMMROrganizer@@XZ @ 175 NONAME ; class MMROrganizer & CBaseMrInfoObject::MROrganizerL(void)
+	?NotifyMailboxEventL@CBasePlugin@@MAEXW4TFSMailEvent@@VTFSMailMsgId@@PAX22@Z @ 176 NONAME ; void CBasePlugin::NotifyMailboxEventL(enum TFSMailEvent, class TFSMailMsgId, void *, void *, void *)
+	??0CDelayedOp@@IAE@XZ @ 177 NONAME ; CDelayedOp::CDelayedOp(void)
+	?GetReplyToAddressL@CBasePlugin@@MAEPAVHBufC16@@VTFSMailMsgId@@@Z @ 178 NONAME ; class HBufC16 * CBasePlugin::GetReplyToAddressL(class TFSMailMsgId)
+	?LocationL@CBaseMrInfoObject@@UBEABVTDesC16@@XZ @ 179 NONAME ; class TDesC16 const & CBaseMrInfoObject::LocationL(void) const
+	?DeleteFetchRequestForPart@CBasePlugin@@IAEHAAUTOngoingFetchInfo@1@@Z @ 180 NONAME ; int CBasePlugin::DeleteFetchRequestForPart(struct CBasePlugin::TOngoingFetchInfo &)
+	?Load2LC@CResourceLoader@@QAEPAVHBufC16@@H@Z @ 181 NONAME ; class HBufC16 * CResourceLoader::Load2LC(int)
+	?NewChildPartL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@0000ABVTDesC16@@@Z @ 182 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &)
+	?NewL@CBaseMrRecurrenceRule@@SAPAV1@XZ @ 183 NONAME ; class CBaseMrRecurrenceRule * CBaseMrRecurrenceRule::NewL(void)
+	?SetAttendeeStatusL@CBaseMrAttendee@@UAEXAAW4TAttendeeStatus@MMRAttendee@@@Z @ 184 NONAME ; void CBaseMrAttendee::SetAttendeeStatusL(enum MMRAttendee::TAttendeeStatus &)
+	?DeleteMailBoxByUidL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@H@Z @ 185 NONAME ; void CBasePlugin::DeleteMailBoxByUidL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
+	?TranslateMsgStoreMrL@CBasePlugin@@MAEXABVTFSMailMsgId@@AAVCMsgStorePropertyContainer@@1AAVCFSMailMessagePart@@@Z @ 186 NONAME ; void CBasePlugin::TranslateMsgStoreMrL(class TFSMailMsgId const &, class CMsgStorePropertyContainer &, class CMsgStorePropertyContainer &, class CFSMailMessagePart &)
+	?SystemEventNotifyL@CBasePlugin@@IAEXW4TMsgStoreSystemEvent@@@Z @ 187 NONAME ; void CBasePlugin::SystemEventNotifyL(enum TMsgStoreSystemEvent)
+	??1CBaseMrInfoObject@@UAE@XZ @ 188 NONAME ; CBaseMrInfoObject::~CBaseMrInfoObject(void)
+	?StoreMessagePartL@CBasePlugin@@UAEXABVTFSMailMsgId@@00AAVCFSMailMessagePart@@@Z @ 189 NONAME ; void CBasePlugin::StoreMessagePartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class CFSMailMessagePart &)
+	?CreateMessageToSendL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@H@Z @ 190 NONAME ; void CBasePlugin::CreateMessageToSendL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
+	?AttachmentsL@CBaseMrInfoObject@@UBEABV?$RPointerArray@VMMRAttachment@@@@XZ @ 191 NONAME ; class RPointerArray<class MMRAttachment> const & CBaseMrInfoObject::AttachmentsL(void) const
+	?RecurrenceStartTime@CBaseMrRecurrenceRule@@UBE?AVTTime@@XZ @ 192 NONAME ; class TTime CBaseMrRecurrenceRule::RecurrenceStartTime(void) const
+	?GetMessagePartFileL@CBasePlugin@@UAEHABVTFSMailMsgId@@000AAVRFile@@H@Z @ 193 NONAME ; int CBasePlugin::GetMessagePartFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class RFile &, int)
+	?CreationTimeInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 194 NONAME ; class TTime CBaseMrInfoObject::CreationTimeInUtcL(void) const
+	?GetLastSyncStatusL@CBasePlugin@@QAE?BVTFSProgress@@ABVTFSMailMsgId@@@Z @ 195 NONAME ; class TFSProgress const CBasePlugin::GetLastSyncStatusL(class TFSMailMsgId const &)
+	?GetSignatureL@CBasePlugin@@MAEPAVHBufC16@@ABVTFSMailMsgId@@@Z @ 196 NONAME ; class HBufC16 * CBasePlugin::GetSignatureL(class TFSMailMsgId const &)
+	?SetReplyOrForwardToFieldL@CBasePlugin@@IAEXAAVCMsgStoreMessage@@@Z @ 197 NONAME ; void CBasePlugin::SetReplyOrForwardToFieldL(class CMsgStoreMessage &)
+	?CreateResourceReaderLC@CResourceLoader@@QBEPAVHBufC8@@AAVTResourceReader@@H@Z @ 198 NONAME ; class HBufC8 * CResourceLoader::CreateResourceReaderLC(class TResourceReader &, int) const
+	?ModificationNotify@CBasePlugin@@UAEXIW4TMsgStoreOperation@@W4TMsgStoreContainerType@@KIII@Z @ 199 NONAME ; void CBasePlugin::ModificationNotify(unsigned int, enum TMsgStoreOperation, enum TMsgStoreContainerType, unsigned long, unsigned int, unsigned int, unsigned int)
+	?SystemEventNotify@CBasePlugin@@UAEXW4TMsgStoreSystemEvent@@@Z @ 200 NONAME ; void CBasePlugin::SystemEventNotify(enum TMsgStoreSystemEvent)
+	?GetCachedMsgChildrenL@CBasePlugin@@IAEAAV?$RPointerArray@VCMsgStoreMessagePart@@@@XZ @ 201 NONAME ; class RPointerArray<class CMsgStoreMessagePart> & CBasePlugin::GetCachedMsgChildrenL(void)
+	?CreateMrReplyMessageL@CBasePlugin@@MAEPAVCFSMailMessage@@ABVTFSMailMsgId@@AAVMMRInfoObject@@0@Z @ 202 NONAME ; class CFSMailMessage * CBasePlugin::CreateMrReplyMessageL(class TFSMailMsgId const &, class MMRInfoObject &, class TFSMailMsgId const &)
+	?SetLocationL@CBaseMrInfoObject@@UAEXABVTDesC16@@@Z @ 203 NONAME ; void CBaseMrInfoObject::SetLocationL(class TDesC16 const &)
+	?NewChildPartFromFilePathOrHandleL@CBasePlugin@@IAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000ABVTDesC16@@1HAAVRFile@@@Z @ 204 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartFromFilePathOrHandleL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &, int, class RFile &)
+	?TranslateEmailFwMrL@CBasePlugin@@MAEXAAVMMRInfoObject@@AAVCMsgStorePropertyContainer@@@Z @ 205 NONAME ; void CBasePlugin::TranslateEmailFwMrL(class MMRInfoObject &, class CMsgStorePropertyContainer &)
+	?ConstructL@CBasePlugin@@IAEXXZ @ 206 NONAME ; void CBasePlugin::ConstructL(void)
+	?NewChildPartFromFileL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000ABVTDesC16@@1@Z @ 207 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class TDesC16 const &)
+	?CancelSyncL@CBasePlugin@@UAEHABVTFSMailMsgId@@@Z @ 208 NONAME ; int CBasePlugin::CancelSyncL(class TFSMailMsgId const &)
+	?RefreshCachedMailBoxDisplayNameL@CBasePlugin@@IAEXAAHABI@Z @ 209 NONAME ; void CBasePlugin::RefreshCachedMailBoxDisplayNameL(int &, unsigned int const &)
+	?CurrentSyncState@CBasePlugin@@UAE?AW4TSSMailSyncState@@ABVTFSMailMsgId@@@Z @ 210 NONAME ; enum TSSMailSyncState CBasePlugin::CurrentSyncState(class TFSMailMsgId const &)
+	?AddObserverL@CBasePlugin@@UAEXAAVMFSMailEventObserver@@@Z @ 211 NONAME ; void CBasePlugin::AddObserverL(class MFSMailEventObserver &)
+	?AttendeeRole@CBaseMrAttendee@@UBE?AW4TAttendeeRole@MMRAttendee@@XZ @ 212 NONAME ; enum MMRAttendee::TAttendeeRole CBaseMrAttendee::AttendeeRole(void) const
+	?GetCachedBodyL@CBasePlugin@@IAEPAVCMsgStoreMessagePart@@I@Z @ 213 NONAME ; class CMsgStoreMessagePart * CBasePlugin::GetCachedBodyL(unsigned int)
+	?PriorityL@CBaseMrInfoObject@@UBEIXZ @ 214 NONAME ; unsigned int CBaseMrInfoObject::PriorityL(void) const
+	?RecurrentWeekDays@CBaseMrRecurrenceRule@@UBEABV?$RArray@W4TMRRecurrentDay@MRRecurrenceRule@@@@XZ @ 215 NONAME ; class RArray<enum MRRecurrenceRule::TMRRecurrentDay> const & CBaseMrRecurrenceRule::RecurrentWeekDays(void) const
+	?ListMessagesL@CBasePlugin@@UAEPAVMFSMailIterator@@ABVTFSMailMsgId@@0W4TFSMailDetails@@ABV?$RArray@VTFSMailSortCriteria@@@@@Z @ 216 NONAME ; class MFSMailIterator * CBasePlugin::ListMessagesL(class TFSMailMsgId const &, class TFSMailMsgId const &, enum TFSMailDetails, class RArray<class TFSMailSortCriteria> const &)
+	?Load2L@CResourceLoader@@QAEPAVHBufC16@@HABVTDesC16@@@Z @ 217 NONAME ; class HBufC16 * CResourceLoader::Load2L(int, class TDesC16 const &)
+	?NewChildPartFromFileL@CBasePlugin@@UAEPAVCFSMailMessagePart@@ABVTFSMailMsgId@@000ABVTDesC16@@AAVRFile@@@Z @ 218 NONAME ; class CFSMailMessagePart * CBasePlugin::NewChildPartFromFileL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TDesC16 const &, class RFile &)
+	?SetMailboxName@CBasePlugin@@UAEXABVTFSMailMsgId@@ABVTDesC16@@@Z @ 219 NONAME ; void CBasePlugin::SetMailboxName(class TFSMailMsgId const &, class TDesC16 const &)
+	?NewLC@CBasePlugin@@SAPAV1@XZ @ 220 NONAME ; class CBasePlugin * CBasePlugin::NewLC(void)
+	?ExtensionL@CBaseMrInfoObject@@UAEPAXVTUid@@@Z @ 221 NONAME ; void * CBaseMrInfoObject::ExtensionL(class TUid)
+	?TranslateMsgStorePropsL@CBasePlugin@@MAEXABVTFSMailMsgId@@AAVCMsgStorePropertyContainer@@AAVCFSMailMessagePart@@W4TFSMailDetails@@@Z @ 222 NONAME ; void CBasePlugin::TranslateMsgStorePropsL(class TFSMailMsgId const &, class CMsgStorePropertyContainer &, class CFSMailMessagePart &, enum TFSMailDetails)
+	?GetMailboxDisplayNameL@CBasePlugin@@IAEXIAAVRBuf16@@@Z @ 223 NONAME ; void CBasePlugin::GetMailboxDisplayNameL(unsigned int, class RBuf16 &)
 
--- a/emailservices/emailstore/base_plugin/EABI/basepluginU.DEF	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/base_plugin/EABI/basepluginU.DEF	Mon Oct 04 00:05:37 2010 +0300
@@ -71,7 +71,7 @@
 	_ZN11CBasePlugin19CreateReplyMessageLERK12TFSMailMsgIdS2_iRK7TDesC16 @ 70 NONAME
 	_ZN11CBasePlugin19DeleteMailBoxByUidLERK12TFSMailMsgIdR22MFSMailRequestObserveri @ 71 NONAME
 	_ZN11CBasePlugin19GetContentToBufferLERK12TFSMailMsgIdS2_S2_S2_R6TDes16j @ 72 NONAME
-	_ZN11CBasePlugin19GetMessagePartFileLERK12TFSMailMsgIdS2_S2_S2_R5RFile @ 73 NONAME
+	_ZN11CBasePlugin19GetMessagePartFileLERK12TFSMailMsgIdS2_S2_S2_R5RFilei @ 73 NONAME
 	_ZN11CBasePlugin19ModificationNotifyLEj18TMsgStoreOperation22TMsgStoreContainerTypemjjj @ 74 NONAME
 	_ZN11CBasePlugin19NotifyMailboxEventLE12TFSMailEvent12TFSMailMsgIdPvS2_S2_ @ 75 NONAME
 	_ZN11CBasePlugin19TranslateEmailFwMrLER13MMRInfoObjectR26CMsgStorePropertyContainer @ 76 NONAME
--- a/emailservices/emailstore/base_plugin/base_plugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/base_plugin/base_plugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -68,15 +68,17 @@
     TARGET.UID2 = 0x1000008d
     TARGET.UID3 = 0x2001FDA9
 	
-	defBlock = \      
-	  "$${LITERAL_HASH}if defined(MARM)" \
-	  "DEFFILE  eabi/baseplugin.def" \
+	defBlock = \
+      "$${LITERAL_HASH}if defined(MARM)" \
+      "DEFFILE  eabi/baseplugin.def" \
       "$${LITERAL_HASH}else" \
       "DEFFILE  bwins/baseplugin.def" \
       "$${LITERAL_HASH}endif"
-	
+
     MMP_RULES += "SYSTEMINCLUDE /epoc32/include/ecom" \
-		defBlock
+                 defBlock \
+                 SMPSAFE
+
     MMP_RULES -= "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
 }
 
--- a/emailservices/emailstore/base_plugin/group/BasePlugin.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/base_plugin/group/BasePlugin.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -92,3 +92,5 @@
 #ifdef TRACE_INTO_FILE
 LIBRARY     flogger.lib
 #endif // TRACE_INTO_FILE
+
+SMPSAFE
--- a/emailservices/emailstore/base_plugin/inc/BasePlugin.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/base_plugin/inc/BasePlugin.h	Mon Oct 04 00:05:37 2010 +0300
@@ -331,7 +331,8 @@
             const TFSMailMsgId& aParentFolderId,
             const TFSMailMsgId& aMessageId,
             const TFSMailMsgId& aMessagePartId,
-            RFile& aFileHandle );
+            RFile& aFileHandle,
+            TBool aForWriting = EFalse);
 
          virtual void CopyMessagePartFileL(
             const TFSMailMsgId& aMailBoxId,
--- a/emailservices/emailstore/base_plugin/src/BasePlugin.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/BasePlugin.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -1548,7 +1548,7 @@
                 //copy the body content from the original.
                 TInt startOffset = 0;
                 RBuf8 buf;
-                buf.Create( KQuotedReadBufferSize );
+                buf.CreateL( KQuotedReadBufferSize );
                 CleanupClosePushL( buf );
 
                 do
--- a/emailservices/emailstore/base_plugin/src/basepluginparts.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/basepluginparts.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -253,16 +253,21 @@
 
 
 /**
- * The method will leave with KErrNotSupported if the msgstore is encrypted.
+ * The method will leave with KErrNotSupported if the msgstore is encrypted or if trying to open the file for writing.
  */
 EXPORT_C TInt CBasePlugin::GetMessagePartFileL(
     const TFSMailMsgId& aMailBoxId,
     const TFSMailMsgId& /*aParentFolderId*/,
     const TFSMailMsgId& aMessageId,
     const TFSMailMsgId& aMessagePartId,
-    RFile& aFileHandle )
+    RFile& aFileHandle,
+    TBool aForWriting)
 
     {
+    if (aForWriting)
+        {
+        return KErrNotSupported;
+        }
     CMailboxInfo& mailBox = GetMailboxInfoL( aMailBoxId.Id() );
     
     CMsgStoreMessage* msg = mailBox().FetchMessageL( aMessageId.Id(), KMsgStoreInvalidId );
--- a/emailservices/emailstore/message_store/MsgStoreRfsPlugin/MsgStoreRfsPlugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/MsgStoreRfsPlugin/MsgStoreRfsPlugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -51,8 +51,8 @@
       "$${LITERAL_HASH}endif"
 
     MMP_RULES += defBlock
-
     MMP_RULES += "SYSTEMINCLUDE /epoc32/include/ecom"
+    MMP_RULES += SMPSAFE
 }
 
 win32 {
--- a/emailservices/emailstore/message_store/MsgStoreRfsPlugin/group/RfsMsgStorePlugin.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/MsgStoreRfsPlugin/group/RfsMsgStorePlugin.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -58,5 +58,7 @@
 LIBRARY	   bafl.lib
 LIBRARY    estor.lib
 
+SMPSAFE
+
 // END FILE RfsMsgStorePlugin.mmp
 
--- a/emailservices/emailstore/message_store/PointSecMonitor/Group/ImsPointsecMonitor.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/PointSecMonitor/Group/ImsPointsecMonitor.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -45,3 +45,5 @@
 
 LIBRARY         euser.lib
 LIBRARY			DebugLog.lib
+
+SMPSAFE
--- a/emailservices/emailstore/message_store/PointSecMonitor/PointSecMonitor.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/PointSecMonitor/PointSecMonitor.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -47,6 +47,7 @@
       "$${LITERAL_HASH}endif"
 	
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
 }	
 
 win32 {
--- a/emailservices/emailstore/message_store/client/client.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/client/client.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -88,14 +88,15 @@
     TARGET.UID3 = 0x2001FDA2
 	
     defBlock = \      
-	  "$${LITERAL_HASH}if defined(MARM)" \
-	  "DEFFILE  eabi/messagestoreclient.def" \
+      "$${LITERAL_HASH}if defined(MARM)" \
+      "DEFFILE  eabi/messagestoreclient.def" \
       "$${LITERAL_HASH}else" \
       "DEFFILE  bwins/messagestoreclient.def" \
       "$${LITERAL_HASH}endif"
-	
+
     MMP_RULES += defBlock
-}	
+    MMP_RULES += SMPSAFE
+}
 
 win32 {
 	DESTDIR = ../../../.../bin
--- a/emailservices/emailstore/message_store/client/group/MessageStoreClient.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/client/group/MessageStoreClient.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -84,3 +84,5 @@
 LIBRARY  efsrv.lib
 LIBRARY  debuglog.lib
 LIBRARY  MessageStoreServer.lib
+
+SMPSAFE
--- a/emailservices/emailstore/message_store/client/src/RMessageStoreSession.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/client/src/RMessageStoreSession.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -80,14 +80,14 @@
 // ==========================================================================
 // FUNCTION: Connect
 // ==========================================================================
-TInt RMessageStoreSession::Connect( TBool aLaunchServerIfNeeded, TBool aRetryIndefinitely )
+TInt RMessageStoreSession::Connect( TBool /*aLaunchServerIfNeeded*/, TBool aRetryIndefinitely )
     {
     __LOG_ENTER( "Connect" )
 
     // This flag should only be used in the case where the message store server is being launched as a separate
     // thread within some other process.  In that case, the flag is used to control exactly which process the
     // server will be launched in.  Otherwise, always launch the server on reference.
-    aLaunchServerIfNeeded = ETrue;
+    //aLaunchServerIfNeeded = ETrue;
 
     TBool again = ETrue;    
     TInt  returnValue;
@@ -116,10 +116,18 @@
                 // Do not retry again.
                 again = EFalse;
                 }
-            else if( (returnValue == KErrNotFound) && aLaunchServerIfNeeded )
+            else if( (returnValue == KErrNotFound) || (returnValue == KErrServerTerminated) )
                 {
                 // Start the server as a thread within the current process.            
                 returnValue = StartServer();
+                if ( returnValue != KErrNone )
+                    {
+            				__LOG_WRITE8_FORMAT1_ERROR( "StartServer failed %i", returnValue )
+		                // Wait before trying again.
+		                User::After( KServerRetryIntervalMicroSeconds );             
+		                //stay in the loop even if we failed to start the server,
+		                // in the next look, the CreateSession will fail but we get to try StartServer again
+                    }
                 }
             else
                 {
@@ -1622,7 +1630,7 @@
     
     RBuf8 serializedBuf;
     CleanupClosePushL( serializedBuf );
-    serializedBuf.Create( totalSize );
+    serializedBuf.CreateL( totalSize );
     
     for( TInt i = 0 ; i < count ; i++ )
         {
--- a/emailservices/emailstore/message_store/debuglog/debuglog.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/debuglog/debuglog.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -45,6 +45,7 @@
       "$${LITERAL_HASH}endif"
 	
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
 }	
 
 win32 {
--- a/emailservices/emailstore/message_store/debuglog/group/DebugLog.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/debuglog/group/DebugLog.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -49,7 +49,9 @@
 
 LIBRARY         euser.lib
 LIBRARY         efsrv.lib
-LIBRARY				  sysutil.lib
+LIBRARY         sysutil.lib
+
+SMPSAFE
 
 // END FILE DebugLog.mmp
 
--- a/emailservices/emailstore/message_store/debuglog/src/DebugLog.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/debuglog/src/DebugLog.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -402,7 +402,7 @@
                                       TRefByValue< const TDesC16 > aFmt, 
                                       ... ) const
     {
-	VA_LIST list;
+	VA_LIST list; // coverity[UNINIT]
 	VA_START(list,aFmt);
 
 	RDebugLog* self = const_cast<RDebugLog*>(this);
@@ -445,7 +445,7 @@
                                       TRefByValue< const TDesC8 > aFmt, 
                                       ... ) const
     {
-	VA_LIST list;
+	VA_LIST list; // coverity[UNINIT]
 	VA_START(list,aFmt);
 
 	RDebugLog* self = const_cast<RDebugLog*>(this);
--- a/emailservices/emailstore/message_store/exe/exe.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/exe/exe.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -37,6 +37,7 @@
     TARGET.EPOCHEAPSIZE = 0x400 \ 
     					0x200000
     MMP_RULES += EXPORTUNFROZEN
+    MMP_RULES += SMPSAFE
 }	
 
 win32 {
--- a/emailservices/emailstore/message_store/exe/group/MessageStoreExe.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/exe/group/MessageStoreExe.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -50,4 +50,4 @@
 LIBRARY euser.lib 
 LIBRARY MessageStoreServer.lib
 
-
+SMPSAFE
--- a/emailservices/emailstore/message_store/server/group/MessageStoreServer.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/group/MessageStoreServer.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -95,3 +95,5 @@
 LIBRARY DebugLog.lib
 LIBRARY ImsPointSecMonitor.lib
 LIBRARY platformenv.lib
+
+SMPSAFE
--- a/emailservices/emailstore/message_store/server/inc/MessageStoreSession.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/inc/MessageStoreSession.h	Mon Oct 04 00:05:37 2010 +0300
@@ -97,7 +97,7 @@
         void ContainerStoreAvailable();
 
         // Called by the server to propogate events to the session clients.
-        void SendEventToObserver( TMsgStoreEvent aEvent );
+        void SendEventToObserver( TMsgStoreEvent &aEvent );
 
         // inherited from CSession2
         void CreateL();
--- a/emailservices/emailstore/message_store/server/server.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/server.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -106,6 +106,7 @@
       "$${LITERAL_HASH}endif"
 
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
 }
 
 win32 {
--- a/emailservices/emailstore/message_store/server/src/ContainerStore.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/ContainerStore.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -2385,7 +2385,7 @@
     totalLength += KMsgStorePropertyLocal().Length() + boolPckg.Length() + TPropertiesSerializer::EPerNodeOverhead;
     
     RBuf8 properties;
-    properties.Create( totalLength );
+    properties.CreateL( totalLength );
     CleanupClosePushL( properties );
     
     for ( TUint32 i = EMsgStoreInbox; i <= EMsgStoreDeleted; i++ )
--- a/emailservices/emailstore/message_store/server/src/ContainerStoreAccountTable.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/ContainerStoreAccountTable.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -179,7 +179,7 @@
 	iTable.SetColL( iOwnerIdColNum,        aOwnerId );
 	iTable.SetColL( iMailBoxIdColNum,      aMailboxId );
 	
-	totalCounts.Create( iCountsLength );
+	totalCounts.CreateL( iCountsLength );
     iCustomBehaviorProvider.InitializeCounts( totalCounts );
 	iTable.SetColL( iTotalCountsColNum, totalCounts );
     
--- a/emailservices/emailstore/message_store/server/src/ContainerStoreContainersTable.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/ContainerStoreContainersTable.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -626,7 +626,7 @@
 	
 	RBuf8 myDescendentCounts;
 	CleanupClosePushL( myDescendentCounts );
-	myDescendentCounts.Create( iTable.ColLength( iChildrenCountsColNum ) );
+	myDescendentCounts.CreateL( iTable.ColLength( iChildrenCountsColNum ) );
 	
 	ChildrenCountsL( myDescendentCounts, ETrue  );
 	
--- a/emailservices/emailstore/message_store/server/src/ContainerStoreMRUAddressTable.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/ContainerStoreMRUAddressTable.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -73,8 +73,8 @@
 // ==========================================================================
 void CMruAddress::ConstructL( const TDesC& aEmailAddress, const TDesC& aDisplayName )
     {
-    iEmailAddress.Create( aEmailAddress );
-    iDisplayName.Create( aDisplayName );
+    iEmailAddress.CreateL( aEmailAddress );
+    iDisplayName.CreateL( aDisplayName );
     }
 
 // ==========================================================================
@@ -725,7 +725,7 @@
     
     RBuf8 string8;
     CleanupClosePushL( string8 );
-    string8.Create( iEncryptedBuffer.Length() );
+    string8.CreateL( iEncryptedBuffer.Length() );
     
     if( aString.Size() < iEncryptedBuffer.Length() )
         {        
--- a/emailservices/emailstore/message_store/server/src/ContainerStoreSearchHandler.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/ContainerStoreSearchHandler.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -492,12 +492,12 @@
     RBuf8 val8;
     CleanupClosePushL( val8 );
     
-    val8.Create( aPtr8 );
+    val8.CreateL( aPtr8 );
     
     const TUint16* valuePtr16 = reinterpret_cast<const TUint16*>( val8.Ptr() );
     TPtrC16 val16( valuePtr16, val8.Length() / 2 );
     
-    aBuf.Create( val16.Length() );
+    aBuf.CreateL( val16.Length() );
     aBuf.Copy( val16 );
     
     CleanupStack::PopAndDestroy( &val8 );
--- a/emailservices/emailstore/message_store/server/src/ContainerStoreSortingTable.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/ContainerStoreSortingTable.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -947,7 +947,7 @@
     
     RBuf8 string8;
     CleanupClosePushL( string8 );
-    string8.Create( iEncryptedBuffer.Length() );
+    string8.CreateL( iEncryptedBuffer.Length() );
     
     if( aString.Size() < iEncryptedBuffer.Length() )
         {        
--- a/emailservices/emailstore/message_store/server/src/MessageStoreServer.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/MessageStoreServer.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -1042,12 +1042,12 @@
     RBuf8 val8;
     CleanupClosePushL( val8 );
     
-    val8.Create( aPtr8 );
+    val8.CreateL( aPtr8 );
     
     const TUint16* valuePtr16 = reinterpret_cast<const TUint16*>( val8.Ptr() );
     TPtrC16 val16( valuePtr16, val8.Length() / 2 );
     
-    aBuf.Create( val16 );
+    aBuf.CreateL( val16 );
     
     CleanupStack::PopAndDestroy( &val8 );
     }
--- a/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -78,7 +78,7 @@
 // ==========================================================================
 void CSearchResult::ConstructL( const TDesC8& aPropertyBuf )
     {
-    iPropertyBuf.Create( aPropertyBuf );
+    iPropertyBuf.CreateL( aPropertyBuf );
     }
 
 // ==========================================================================
@@ -686,7 +686,7 @@
 // ==========================================================================
 // FUNCTION: SendEventToObserver
 // ==========================================================================
-void CMessageStoreSession::SendEventToObserver( TMsgStoreEvent aEvent )
+void CMessageStoreSession::SendEventToObserver( TMsgStoreEvent &aEvent )
 	{
 	__LOG_ENTER( "SendEventToObserver" )
 	
@@ -2556,11 +2556,11 @@
     
     RBuf8 addressBuf;
     CleanupClosePushL( addressBuf );
-    addressBuf.Create( KInitialAddressBufSize );
+    addressBuf.CreateL( KInitialAddressBufSize );
     
     RBuf8 dispNameBuf;
     CleanupClosePushL( dispNameBuf );
-    dispNameBuf.Create( KInitialAddressBufSize );
+    dispNameBuf.CreateL( KInitialAddressBufSize );
     
     TInt position = 0;
     while( position < bufSize )
@@ -2571,7 +2571,7 @@
         
         if ( addressBuf.MaxLength() < length16 )
             {
-            addressBuf.ReAlloc( length16 );
+            addressBuf.ReAllocL( length16 );
             }
         aMessage.ReadL( 1, addressBuf, position );
         
@@ -2587,7 +2587,7 @@
         
         if ( dispNameBuf.MaxLength() < length16 )
             {
-            dispNameBuf.ReAlloc( length16 );
+            dispNameBuf.ReAllocL( length16 );
             }
         aMessage.ReadL( 1, dispNameBuf, position );
         
--- a/emailservices/emailstore/preinstall/group/EmailStorePreInstall.mmp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/preinstall/group/EmailStorePreInstall.mmp	Mon Oct 04 00:05:37 2010 +0300
@@ -59,3 +59,5 @@
 LIBRARY         apgrfx.lib      //RApaLsSession
 LIBRARY         bafl.lib
 LIBRARY         DebugLog.lib
+
+SMPSAFE
--- a/emailservices/emailstore/preinstall/preinstall.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/emailstore/preinstall/preinstall.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -45,6 +45,7 @@
     TARGET.UID3 = 0x20021190
     MMP_RULES += "EPOCPROCESSPRIORITY background"
     MMP_RULES += EXPORTUNFROZEN
+    MMP_RULES += SMPSAFE
 }	
 
 win32 {
--- a/emailservices/nmailagent/nmailagent.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmailagent/nmailagent.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -64,6 +64,8 @@
     TARGET.UID2 = 0x100039CE
     TARGET.UID3 = 0x2002C326
     TARGET.CAPABILITY = CAP_APPLICATION
+    
+    MMP_RULES += SMPSAFE
 }
 
 win32 {
--- a/emailservices/nmailbase/nmailbase.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmailbase/nmailbase.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -60,6 +60,7 @@
       "$${LITERAL_HASH}endif"
     
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
 }
 
 win32 {
--- a/emailservices/nmclientapi/bwins/nmailclientapiu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/bwins/nmailclientapiu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -8,9 +8,9 @@
 	?setPlainText@NmApiMessageEnvelope@EmailClientApi@@QAEXABVQString@@@Z @ 7 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setPlainText(class QString const &)
 	??1NmApiSettingsManager@EmailClientApi@@UAE@XZ @ 8 NONAME ; EmailClientApi::NmApiSettingsManager::~NmApiSettingsManager(void)
 	?id@NmApiMailbox@EmailClientApi@@QBE_KXZ @ 9 NONAME ; unsigned long long EmailClientApi::NmApiMailbox::id(void) const
-	?createReplyMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVQVariant@@_N@Z @ 10 NONAME ; bool EmailClientApi::NmApiMessageManager::createReplyMessage(class QVariant const *, bool)
-	?saveMessage@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 11 NONAME ; bool EmailClientApi::NmApiMessageManager::saveMessage(struct NmApiMessage const &)
-	?messagesCopied@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 12 NONAME ; void EmailClientApi::NmApiMessageManager::messagesCopied(int)
+	?createReplyMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVQVariant@@_N@Z @ 10 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::createReplyMessage(class QVariant const *, bool)
+	?saveMessage@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 11 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::saveMessage(struct NmApiMessage const &)
+	?messagesCopied@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 12 NONAME ABSENT ; void EmailClientApi::NmApiMessageManager::messagesCopied(int)
 	?id@NmApiFolder@EmailClientApi@@QBE_KXZ @ 13 NONAME ; unsigned long long EmailClientApi::NmApiFolder::id(void) const
 	?foldersListed@NmApiFolderListing@EmailClientApi@@IAEXH@Z @ 14 NONAME ; void EmailClientApi::NmApiFolderListing::foldersListed(int)
 	??8NmApiFolder@EmailClientApi@@QAE_NABV01@@Z @ 15 NONAME ; bool EmailClientApi::NmApiFolder::operator==(class EmailClientApi::NmApiFolder const &)
@@ -26,9 +26,9 @@
 	?fetchedSize@NmApiMessageBody@EmailClientApi@@QBE_KXZ @ 25 NONAME ; unsigned long long EmailClientApi::NmApiMessageBody::fetchedSize(void) const
 	?setChildFolderIds@NmApiFolder@EmailClientApi@@QAEXAAV?$QList@_K@@@Z @ 26 NONAME ; void EmailClientApi::NmApiFolder::setChildFolderIds(class QList<unsigned long long> &)
 	??0NmApiMessageEnvelope@EmailClientApi@@QAE@XZ @ 27 NONAME ; EmailClientApi::NmApiMessageEnvelope::NmApiMessageEnvelope(void)
-	?removeAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiEmailMessage@@_K@Z @ 28 NONAME ; bool EmailClientApi::NmApiMessageManager::removeAttachment(class NmApiEmailMessage &, unsigned long long)
+	?removeAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiEmailMessage@@_K@Z @ 28 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::removeAttachment(class NmApiEmailMessage &, unsigned long long)
 	??1NmApiMessageEnvelope@EmailClientApi@@UAE@XZ @ 29 NONAME ; EmailClientApi::NmApiMessageEnvelope::~NmApiMessageEnvelope(void)
-	?copyMessages@NmApiMessageManager@EmailClientApi@@QAE_NV?$QList@_K@@_K1@Z @ 30 NONAME ; bool EmailClientApi::NmApiMessageManager::copyMessages(class QList<unsigned long long>, unsigned long long, unsigned long long)
+	?copyMessages@NmApiMessageManager@EmailClientApi@@QAE_NV?$QList@_K@@_K1@Z @ 30 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::copyMessages(class QList<unsigned long long>, unsigned long long, unsigned long long)
 	??4NmApiMailbox@EmailClientApi@@QAEAAV01@ABV01@@Z @ 31 NONAME ; class EmailClientApi::NmApiMailbox & EmailClientApi::NmApiMailbox::operator=(class EmailClientApi::NmApiMailbox const &)
 	??1NmApiMessageManager@EmailClientApi@@UAE@XZ @ 32 NONAME ; EmailClientApi::NmApiMessageManager::~NmApiMessageManager(void)
 	?setSentTime@NmApiMessageEnvelope@EmailClientApi@@QAEXVQDateTime@@@Z @ 33 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setSentTime(class QDateTime)
@@ -51,7 +51,7 @@
 	?mailboxDeleted@NmApiMailboxSettings@EmailClientApi@@IAEXH@Z @ 50 NONAME ; void EmailClientApi::NmApiMailboxSettings::mailboxDeleted(int)
 	??_ENmApiMessageBody@EmailClientApi@@UAE@I@Z @ 51 NONAME ; EmailClientApi::NmApiMessageBody::~NmApiMessageBody(unsigned int)
 	?staticMetaObject@NmApiMailboxSettings@EmailClientApi@@2UQMetaObject@@B @ 52 NONAME ; struct QMetaObject const EmailClientApi::NmApiMailboxSettings::staticMetaObject
-	?messagesDeleted@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 53 NONAME ; void EmailClientApi::NmApiMessageManager::messagesDeleted(int)
+	?messagesDeleted@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 53 NONAME ABSENT ; void EmailClientApi::NmApiMessageManager::messagesDeleted(int)
 	?qt_metacall@NmApiMailboxListing@EmailClientApi@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 54 NONAME ; int EmailClientApi::NmApiMailboxListing::qt_metacall(enum QMetaObject::Call, int, void * *)
 	??_ENmApiMailbox@EmailClientApi@@UAE@I@Z @ 55 NONAME ; EmailClientApi::NmApiMailbox::~NmApiMailbox(unsigned int)
 	?setId@NmApiMessageEnvelope@EmailClientApi@@QAEX_K@Z @ 56 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setId(unsigned long long)
@@ -65,7 +65,7 @@
 	?trUtf8@NmApiMessageManager@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 64 NONAME ; class QString EmailClientApi::NmApiMessageManager::trUtf8(char const *, char const *, int)
 	?isRunning@NmApiFolderListing@EmailClientApi@@QBE_NXZ @ 65 NONAME ; bool EmailClientApi::NmApiFolderListing::isRunning(void) const
 	?metaObject@NmApiMailboxSettings@EmailClientApi@@UBEPBUQMetaObject@@XZ @ 66 NONAME ; struct QMetaObject const * EmailClientApi::NmApiMailboxSettings::metaObject(void) const
-	?messagesMoved@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 67 NONAME ; void EmailClientApi::NmApiMessageManager::messagesMoved(int)
+	?messagesMoved@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 67 NONAME ABSENT ; void EmailClientApi::NmApiMessageManager::messagesMoved(int)
 	?staticMetaObject@NmApiEventNotifier@EmailClientApi@@2UQMetaObject@@B @ 68 NONAME ; struct QMetaObject const EmailClientApi::NmApiEventNotifier::staticMetaObject
 	?tr@NmApiFolderListing@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 69 NONAME ; class QString EmailClientApi::NmApiFolderListing::tr(char const *, char const *, int)
 	?trUtf8@NmApiFolderListing@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 70 NONAME ; class QString EmailClientApi::NmApiFolderListing::trUtf8(char const *, char const *, int)
@@ -74,7 +74,7 @@
 	?tr@NmApiEventNotifier@EmailClientApi@@SA?AVQString@@PBD0@Z @ 73 NONAME ; class QString EmailClientApi::NmApiEventNotifier::tr(char const *, char const *)
 	?sentTime@NmApiMessageEnvelope@EmailClientApi@@QBE?AVQDateTime@@XZ @ 74 NONAME ; class QDateTime EmailClientApi::NmApiMessageEnvelope::sentTime(void) const
 	?saveSettings@NmApiMailboxSettings@EmailClientApi@@QAE_NABVNmApiMailboxSettingsData@2@@Z @ 75 NONAME ; bool EmailClientApi::NmApiMailboxSettings::saveSettings(class EmailClientApi::NmApiMailboxSettingsData const &)
-	?fetch@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 76 NONAME ; bool EmailClientApi::NmApiMessageManager::fetch(struct NmApiMessage const &)
+	?fetch@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 76 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::fetch(struct NmApiMessage const &)
 	?setSubject@NmApiMessageEnvelope@EmailClientApi@@QAEXABVQString@@@Z @ 77 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setSubject(class QString const &)
 	?folderType@NmApiFolder@EmailClientApi@@QBE?AW4NmApiEmailFolderType@2@XZ @ 78 NONAME ; enum EmailClientApi::NmApiEmailFolderType EmailClientApi::NmApiFolder::folderType(void) const
 	?setToRecipients@NmApiMessageEnvelope@EmailClientApi@@QAEXABV?$QList@VNmApiEmailAddress@EmailClientApi@@@@@Z @ 79 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setToRecipients(class QList<class EmailClientApi::NmApiEmailAddress> const &)
@@ -86,7 +86,7 @@
 	?qt_metacast@NmApiFolderListing@EmailClientApi@@UAEPAXPBD@Z @ 85 NONAME ; void * EmailClientApi::NmApiFolderListing::qt_metacast(char const *)
 	?messageEvent@NmApiEventNotifier@EmailClientApi@@IAEXW4NmApiMessageEvent@2@_K1V?$QList@_K@@@Z @ 86 NONAME ; void EmailClientApi::NmApiEventNotifier::messageEvent(enum EmailClientApi::NmApiMessageEvent, unsigned long long, unsigned long long, class QList<unsigned long long>)
 	?setTotalSize@NmApiMessageEnvelope@EmailClientApi@@QAEX_K@Z @ 87 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setTotalSize(unsigned long long)
-	??0NmApiMessageManager@EmailClientApi@@QAE@_KPAVQObject@@@Z @ 88 NONAME ; EmailClientApi::NmApiMessageManager::NmApiMessageManager(unsigned long long, class QObject *)
+	??0NmApiMessageManager@EmailClientApi@@QAE@_KPAVQObject@@@Z @ 88 NONAME ABSENT ; EmailClientApi::NmApiMessageManager::NmApiMessageManager(unsigned long long, class QObject *)
 	?qt_metacall@NmApiMessageTask@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 89 NONAME ; int NmApiMessageTask::qt_metacall(enum QMetaObject::Call, int, void * *)
 	??1NmApiMailbox@EmailClientApi@@UAE@XZ @ 90 NONAME ; EmailClientApi::NmApiMailbox::~NmApiMailbox(void)
 	?getValue@NmApiMailboxSettingsData@EmailClientApi@@QBE_NHAAVQVariant@@@Z @ 91 NONAME ; bool EmailClientApi::NmApiMailboxSettingsData::getValue(int, class QVariant &) const
@@ -123,7 +123,7 @@
 	?trUtf8@NmApiMailboxSettings@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 122 NONAME ; class QString EmailClientApi::NmApiMailboxSettings::trUtf8(char const *, char const *, int)
 	?setHasAttachments@NmApiMessageEnvelope@EmailClientApi@@QAEX_N@Z @ 123 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setHasAttachments(bool)
 	??_ENmApiMessageEnvelope@EmailClientApi@@UAE@I@Z @ 124 NONAME ; EmailClientApi::NmApiMessageEnvelope::~NmApiMessageEnvelope(unsigned int)
-	?createForwardMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVQVariant@@@Z @ 125 NONAME ; bool EmailClientApi::NmApiMessageManager::createForwardMessage(class QVariant const *)
+	?createForwardMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVQVariant@@@Z @ 125 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::createForwardMessage(class QVariant const *)
 	?displayName@NmApiEmailAddress@EmailClientApi@@QBE?AVQString@@XZ @ 126 NONAME ; class QString EmailClientApi::NmApiEmailAddress::displayName(void) const
 	?listMailboxIds@NmApiMailboxSettings@EmailClientApi@@QAE_NAAV?$QList@_K@@@Z @ 127 NONAME ; bool EmailClientApi::NmApiMailboxSettings::listMailboxIds(class QList<unsigned long long> &)
 	??_ENmApiMailboxSettings@EmailClientApi@@UAE@I@Z @ 128 NONAME ; EmailClientApi::NmApiMailboxSettings::~NmApiMailboxSettings(unsigned int)
@@ -173,16 +173,16 @@
 	??4NmApiMessageEnvelope@EmailClientApi@@QAEAAV01@ABV01@@Z @ 172 NONAME ; class EmailClientApi::NmApiMessageEnvelope & EmailClientApi::NmApiMessageEnvelope::operator=(class EmailClientApi::NmApiMessageEnvelope const &)
 	?initialise@NmApiEmailService@EmailClientApi@@QAEXXZ @ 173 NONAME ; void EmailClientApi::NmApiEmailService::initialise(void)
 	?tr@NmApiMailboxListing@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 174 NONAME ; class QString EmailClientApi::NmApiMailboxListing::tr(char const *, char const *, int)
-	?send@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 175 NONAME ; bool EmailClientApi::NmApiMessageManager::send(struct NmApiMessage const &)
+	?send@NmApiMessageManager@EmailClientApi@@QAE_NABUNmApiMessage@@@Z @ 175 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::send(struct NmApiMessage const &)
 	?trUtf8@NmApiMailboxSettings@EmailClientApi@@SA?AVQString@@PBD0@Z @ 176 NONAME ; class QString EmailClientApi::NmApiMailboxSettings::trUtf8(char const *, char const *)
 	?setContent@NmApiMessageBody@EmailClientApi@@QAEXABVQString@@@Z @ 177 NONAME ; void EmailClientApi::NmApiMessageBody::setContent(class QString const &)
-	?createAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiEmailMessage@@ABVQVariant@@@Z @ 178 NONAME ; bool EmailClientApi::NmApiMessageManager::createAttachment(class NmApiEmailMessage &, class QVariant const &)
+	?createAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiEmailMessage@@ABVQVariant@@@Z @ 178 NONAME ABSENT ; bool EmailClientApi::NmApiMessageManager::createAttachment(class NmApiEmailMessage &, class QVariant const &)
 	?isReplied@NmApiMessageEnvelope@EmailClientApi@@QBE_NXZ @ 179 NONAME ; bool EmailClientApi::NmApiMessageEnvelope::isReplied(void) const
 	?cancel@NmApiEnvelopeListing@EmailClientApi@@UAEXXZ @ 180 NONAME ; void EmailClientApi::NmApiEnvelopeListing::cancel(void)
 	?getStaticMetaObject@NmApiEventNotifier@EmailClientApi@@SAABUQMetaObject@@XZ @ 181 NONAME ; struct QMetaObject const & EmailClientApi::NmApiEventNotifier::getStaticMetaObject(void)
 	??0NmApiMessageEnvelope@EmailClientApi@@QAE@ABV01@@Z @ 182 NONAME ; EmailClientApi::NmApiMessageEnvelope::NmApiMessageEnvelope(class EmailClientApi::NmApiMessageEnvelope const &)
 	?trUtf8@NmApiEnvelopeListing@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 183 NONAME ; class QString EmailClientApi::NmApiEnvelopeListing::trUtf8(char const *, char const *, int)
-	?messagesCreated@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 184 NONAME ; void EmailClientApi::NmApiMessageManager::messagesCreated(int)
+	?messagesCreated@NmApiMessageManager@EmailClientApi@@IAEXH@Z @ 184 NONAME ABSENT ; void EmailClientApi::NmApiMessageManager::messagesCreated(int)
 	?setContentType@NmApiMessageEnvelope@EmailClientApi@@QAEXABVQString@@@Z @ 185 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setContentType(class QString const &)
 	?initialized@NmApiEmailService@EmailClientApi@@IAEX_N@Z @ 186 NONAME ; void EmailClientApi::NmApiEmailService::initialized(bool)
 	?qt_metacast@NmApiEventNotifier@EmailClientApi@@UAEPAXPBD@Z @ 187 NONAME ; void * EmailClientApi::NmApiEventNotifier::qt_metacast(char const *)
@@ -247,4 +247,84 @@
 	?start@NmApiFolderListing@EmailClientApi@@UAE_NXZ @ 246 NONAME ; bool EmailClientApi::NmApiFolderListing::start(void)
 	?cancel@NmApiFolderListing@EmailClientApi@@UAEXXZ @ 247 NONAME ; void EmailClientApi::NmApiFolderListing::cancel(void)
 	??_ENmApiSettingsManager@EmailClientApi@@UAE@I@Z @ 248 NONAME ; EmailClientApi::NmApiSettingsManager::~NmApiSettingsManager(unsigned int)
+	??1NmApiMessageContent@EmailClientApi@@UAE@XZ @ 249 NONAME ; EmailClientApi::NmApiMessageContent::~NmApiMessageContent(void)
+	?isComplete@NmApiMessage@EmailClientApi@@QAE_NXZ @ 250 NONAME ; bool EmailClientApi::NmApiMessage::isComplete(void)
+	?fetchMessage@NmApiMessageManager@EmailClientApi@@QAE_N_K@Z @ 251 NONAME ; bool EmailClientApi::NmApiMessageManager::fetchMessage(unsigned long long)
+	??1NmApiAttachment@EmailClientApi@@UAE@XZ @ 252 NONAME ; EmailClientApi::NmApiAttachment::~NmApiAttachment(void)
+	??_ENmApiMessage@EmailClientApi@@UAE@I@Z @ 253 NONAME ; EmailClientApi::NmApiMessage::~NmApiMessage(unsigned int)
+	?file@NmApiAttachment@EmailClientApi@@QAE?AVXQSharableFile@@XZ @ 254 NONAME ; class XQSharableFile EmailClientApi::NmApiAttachment::file(void)
+	?setAttachments@NmApiMessage@EmailClientApi@@QAEXAAV?$QList@VNmApiAttachment@EmailClientApi@@@@@Z @ 255 NONAME ; void EmailClientApi::NmApiMessage::setAttachments(class QList<class EmailClientApi::NmApiAttachment> &)
+	?getBccRecipients@NmApiMessageEnvelope@EmailClientApi@@QAEXAAV?$QList@VNmApiEmailAddress@EmailClientApi@@@@@Z @ 256 NONAME ; void EmailClientApi::NmApiMessageEnvelope::getBccRecipients(class QList<class EmailClientApi::NmApiEmailAddress> &)
+	?setMailboxId@NmApiMessageEnvelope@EmailClientApi@@QAEX_K@Z @ 257 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setMailboxId(unsigned long long)
+	?setContentType@NmApiMessageContent@EmailClientApi@@QAEXABVQString@@@Z @ 258 NONAME ; void EmailClientApi::NmApiMessageContent::setContentType(class QString const &)
+	??0NmApiTextContent@EmailClientApi@@QAE@ABV01@@Z @ 259 NONAME ABSENT ; EmailClientApi::NmApiTextContent::NmApiTextContent(class EmailClientApi::NmApiTextContent const &)
+	?createForwardMessage@NmApiMessageManager@EmailClientApi@@QAE_NPAVNmApiMessage@2@PBVQVariant@@@Z @ 260 NONAME ; bool EmailClientApi::NmApiMessageManager::createForwardMessage(class EmailClientApi::NmApiMessage *, class QVariant const *)
+	?createReplyMessage@NmApiMessageManager@EmailClientApi@@QAE_NPBVNmApiMessage@2@PBVQVariant@@_N@Z @ 261 NONAME ; bool EmailClientApi::NmApiMessageManager::createReplyMessage(class EmailClientApi::NmApiMessage const *, class QVariant const *, bool)
+	??0NmApiMessageContent@EmailClientApi@@QAE@ABV01@@Z @ 262 NONAME ABSENT ; EmailClientApi::NmApiMessageContent::NmApiMessageContent(class EmailClientApi::NmApiMessageContent const &)
+	?setId@NmApiMessageContent@EmailClientApi@@QAEX_K@Z @ 263 NONAME ; void EmailClientApi::NmApiMessageContent::setId(unsigned long long)
+	?setEnvelope@NmApiMessage@EmailClientApi@@QAEXAAVNmApiMessageEnvelope@2@@Z @ 264 NONAME ; void EmailClientApi::NmApiMessage::setEnvelope(class EmailClientApi::NmApiMessageEnvelope &)
+	??0NmApiMessageManager@EmailClientApi@@QAE@PAVQObject@@_K@Z @ 265 NONAME ; EmailClientApi::NmApiMessageManager::NmApiMessageManager(class QObject *, unsigned long long)
+	?isComplete@NmApiMessageContent@EmailClientApi@@QAE_NXZ @ 266 NONAME ; bool EmailClientApi::NmApiMessageContent::isComplete(void)
+	?mailboxId@NmApiMessageEnvelope@EmailClientApi@@QBE_KXZ @ 267 NONAME ; unsigned long long EmailClientApi::NmApiMessageEnvelope::mailboxId(void) const
+	?id@NmApiMessageContent@EmailClientApi@@QBE_KXZ @ 268 NONAME ; unsigned long long EmailClientApi::NmApiMessageContent::id(void) const
+	?setHtmlContent@NmApiMessage@EmailClientApi@@QAEXAAVNmApiTextContent@2@@Z @ 269 NONAME ; void EmailClientApi::NmApiMessage::setHtmlContent(class EmailClientApi::NmApiTextContent &)
+	??0NmApiMessage@EmailClientApi@@QAE@XZ @ 270 NONAME ; EmailClientApi::NmApiMessage::NmApiMessage(void)
+	?sendMessage@NmApiMessageManager@EmailClientApi@@QAE_NABVNmApiMessage@2@@Z @ 271 NONAME ; bool EmailClientApi::NmApiMessageManager::sendMessage(class EmailClientApi::NmApiMessage const &)
+	?setComplete@NmApiMessageContent@EmailClientApi@@QAEX_N@Z @ 272 NONAME ; void EmailClientApi::NmApiMessageContent::setComplete(bool)
+	?size@NmApiMessageContent@EmailClientApi@@QBEIXZ @ 273 NONAME ; unsigned int EmailClientApi::NmApiMessageContent::size(void) const
+	?plainTextContent@NmApiMessage@EmailClientApi@@QAE?AVNmApiTextContent@2@XZ @ 274 NONAME ; class EmailClientApi::NmApiTextContent EmailClientApi::NmApiMessage::plainTextContent(void)
+	??_ENmApiAttachment@EmailClientApi@@UAE@I@Z @ 275 NONAME ; EmailClientApi::NmApiAttachment::~NmApiAttachment(unsigned int)
+	??_ENmApiMessageContent@EmailClientApi@@UAE@I@Z @ 276 NONAME ; EmailClientApi::NmApiMessageContent::~NmApiMessageContent(unsigned int)
+	?envelope@NmApiMessage@EmailClientApi@@QAEAAVNmApiMessageEnvelope@2@XZ @ 277 NONAME ; class EmailClientApi::NmApiMessageEnvelope & EmailClientApi::NmApiMessage::envelope(void)
+	?fetchAttachment@NmApiMessageManager@EmailClientApi@@QAE_NABVNmApiMessage@2@_K@Z @ 278 NONAME ; bool EmailClientApi::NmApiMessageManager::fetchAttachment(class EmailClientApi::NmApiMessage const &, unsigned long long)
+	?htmlContent@NmApiMessage@EmailClientApi@@QAE?AVNmApiTextContent@2@XZ @ 279 NONAME ; class EmailClientApi::NmApiTextContent EmailClientApi::NmApiMessage::htmlContent(void)
+	??1NmApiTextContent@EmailClientApi@@UAE@XZ @ 280 NONAME ; EmailClientApi::NmApiTextContent::~NmApiTextContent(void)
+	?setSize@NmApiMessageContent@EmailClientApi@@QAEXI@Z @ 281 NONAME ; void EmailClientApi::NmApiMessageContent::setSize(unsigned int)
+	?saveMessage@NmApiMessageManager@EmailClientApi@@QAE_NABVNmApiMessage@2@@Z @ 282 NONAME ; bool EmailClientApi::NmApiMessageManager::saveMessage(class EmailClientApi::NmApiMessage const &)
+	?content@NmApiTextContent@EmailClientApi@@QBE?AVQString@@XZ @ 283 NONAME ; class QString EmailClientApi::NmApiTextContent::content(void) const
+	??0NmApiAttachment@EmailClientApi@@QAE@ABV01@@Z @ 284 NONAME ; EmailClientApi::NmApiAttachment::NmApiAttachment(class EmailClientApi::NmApiAttachment const &)
+	??_ENmApiTextContent@EmailClientApi@@UAE@I@Z @ 285 NONAME ; EmailClientApi::NmApiTextContent::~NmApiTextContent(unsigned int)
+	?removeAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiMessage@2@_K@Z @ 286 NONAME ; bool EmailClientApi::NmApiMessageManager::removeAttachment(class EmailClientApi::NmApiMessage &, unsigned long long)
+	??4NmApiMessageContent@EmailClientApi@@QAEAAV01@ABV01@@Z @ 287 NONAME ABSENT ; class EmailClientApi::NmApiMessageContent & EmailClientApi::NmApiMessageContent::operator=(class EmailClientApi::NmApiMessageContent const &)
+	?setContent@NmApiTextContent@EmailClientApi@@QAEXABVQString@@@Z @ 288 NONAME ; void EmailClientApi::NmApiTextContent::setContent(class QString const &)
+	??0NmApiMessageContent@EmailClientApi@@QAE@XZ @ 289 NONAME ; EmailClientApi::NmApiMessageContent::NmApiMessageContent(void)
+	?fileName@NmApiAttachment@EmailClientApi@@QAE?AVQString@@XZ @ 290 NONAME ; class QString EmailClientApi::NmApiAttachment::fileName(void)
+	??4NmApiTextContent@EmailClientApi@@QAEAAV01@ABV01@@Z @ 291 NONAME ABSENT ; class EmailClientApi::NmApiTextContent & EmailClientApi::NmApiTextContent::operator=(class EmailClientApi::NmApiTextContent const &)
+	??1NmApiMessage@EmailClientApi@@UAE@XZ @ 292 NONAME ; EmailClientApi::NmApiMessage::~NmApiMessage(void)
+	?setPlainTextContent@NmApiMessage@EmailClientApi@@QAEXAAVNmApiTextContent@2@@Z @ 293 NONAME ; void EmailClientApi::NmApiMessage::setPlainTextContent(class EmailClientApi::NmApiTextContent &)
+	?setBccRecipients@NmApiMessageEnvelope@EmailClientApi@@QAEXABV?$QList@VNmApiEmailAddress@EmailClientApi@@@@@Z @ 294 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setBccRecipients(class QList<class EmailClientApi::NmApiEmailAddress> const &)
+	?setFileName@NmApiAttachment@EmailClientApi@@QAEXABVQString@@@Z @ 295 NONAME ; void EmailClientApi::NmApiAttachment::setFileName(class QString const &)
+	?attachments@NmApiMessage@EmailClientApi@@QAE?AV?$QList@VNmApiAttachment@EmailClientApi@@@@XZ @ 296 NONAME ; class QList<class EmailClientApi::NmApiAttachment> EmailClientApi::NmApiMessage::attachments(void)
+	??0NmApiAttachment@EmailClientApi@@QAE@XZ @ 297 NONAME ; EmailClientApi::NmApiAttachment::NmApiAttachment(void)
+	?contentType@NmApiMessageContent@EmailClientApi@@QBE?AVQString@@XZ @ 298 NONAME ; class QString EmailClientApi::NmApiMessageContent::contentType(void) const
+	?setComplete@NmApiMessage@EmailClientApi@@QAEX_N@Z @ 299 NONAME ; void EmailClientApi::NmApiMessage::setComplete(bool)
+	?createAttachment@NmApiMessageManager@EmailClientApi@@QAE_NAAVNmApiMessage@2@ABVQVariant@@@Z @ 300 NONAME ; bool EmailClientApi::NmApiMessageManager::createAttachment(class EmailClientApi::NmApiMessage &, class QVariant const &)
+	?addAttachment@NmApiMessage@EmailClientApi@@QAEXAAVNmApiAttachment@2@@Z @ 301 NONAME ; void EmailClientApi::NmApiMessage::addAttachment(class EmailClientApi::NmApiAttachment &)
+	??0NmApiTextContent@EmailClientApi@@QAE@XZ @ 302 NONAME ; EmailClientApi::NmApiTextContent::NmApiTextContent(void)
+	?trUtf8@NmApiMessageSearch@EmailClientApi@@SA?AVQString@@PBD0@Z @ 303 NONAME ; class QString EmailClientApi::NmApiMessageSearch::trUtf8(char const *, char const *)
+	?searchComplete@NmApiMessageSearch@EmailClientApi@@IAEXH@Z @ 304 NONAME ; void EmailClientApi::NmApiMessageSearch::searchComplete(int)
+	??_ENmApiMessageSearch@EmailClientApi@@UAE@I@Z @ 305 NONAME ; EmailClientApi::NmApiMessageSearch::~NmApiMessageSearch(unsigned int)
+	?tr@NmApiMessageSearch@EmailClientApi@@SA?AVQString@@PBD0@Z @ 306 NONAME ; class QString EmailClientApi::NmApiMessageSearch::tr(char const *, char const *)
+	?tr@NmApiMessageSearch@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 307 NONAME ; class QString EmailClientApi::NmApiMessageSearch::tr(char const *, char const *, int)
+	?getStaticMetaObject@NmApiMessageSearch@EmailClientApi@@SAABUQMetaObject@@XZ @ 308 NONAME ; struct QMetaObject const & EmailClientApi::NmApiMessageSearch::getStaticMetaObject(void)
+	??0NmApiMessageSearch@EmailClientApi@@QAE@PAVQObject@@_K@Z @ 309 NONAME ; EmailClientApi::NmApiMessageSearch::NmApiMessageSearch(class QObject *, unsigned long long)
+	?initialise@NmApiMessageSearch@EmailClientApi@@QAE_NABV?$QList@VQString@@@@VNmApiMailSortCriteria@2@@Z @ 310 NONAME ; bool EmailClientApi::NmApiMessageSearch::initialise(class QList<class QString> const &, class EmailClientApi::NmApiMailSortCriteria)
+	?qt_metacall@NmApiMessageSearch@EmailClientApi@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 311 NONAME ; int EmailClientApi::NmApiMessageSearch::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?start@NmApiMessageSearch@EmailClientApi@@UAE_NXZ @ 312 NONAME ; bool EmailClientApi::NmApiMessageSearch::start(void)
+	?qt_metacast@NmApiMessageSearch@EmailClientApi@@UAEPAXPBD@Z @ 313 NONAME ; void * EmailClientApi::NmApiMessageSearch::qt_metacast(char const *)
+	??1NmApiMessageSearch@EmailClientApi@@UAE@XZ @ 314 NONAME ; EmailClientApi::NmApiMessageSearch::~NmApiMessageSearch(void)
+	?metaObject@NmApiMessageSearch@EmailClientApi@@UBEPBUQMetaObject@@XZ @ 315 NONAME ; struct QMetaObject const * EmailClientApi::NmApiMessageSearch::metaObject(void) const
+	?messageFound@NmApiMessageSearch@EmailClientApi@@IAEXAAVNmApiMessage@2@@Z @ 316 NONAME ; void EmailClientApi::NmApiMessageSearch::messageFound(class EmailClientApi::NmApiMessage &)
+	?isRunning@NmApiMessageSearch@EmailClientApi@@QBE_NXZ @ 317 NONAME ; bool EmailClientApi::NmApiMessageSearch::isRunning(void) const
+	??0NmApiMessage@EmailClientApi@@QAE@ABV01@@Z @ 318 NONAME ABSENT ; EmailClientApi::NmApiMessage::NmApiMessage(class EmailClientApi::NmApiMessage const &)
+	?trUtf8@NmApiMessageSearch@EmailClientApi@@SA?AVQString@@PBD0H@Z @ 319 NONAME ; class QString EmailClientApi::NmApiMessageSearch::trUtf8(char const *, char const *, int)
+	?staticMetaObject@NmApiMessageSearch@EmailClientApi@@2UQMetaObject@@B @ 320 NONAME ; struct QMetaObject const EmailClientApi::NmApiMessageSearch::staticMetaObject
+	?cancel@NmApiMessageSearch@EmailClientApi@@UAEXXZ @ 321 NONAME ; void EmailClientApi::NmApiMessageSearch::cancel(void)
+	?setPriority@NmApiMessageEnvelope@EmailClientApi@@QAEXW4NmApiMessagePriority@2@@Z @ 322 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setPriority(enum EmailClientApi::NmApiMessagePriority)
+	?priority@NmApiMessageEnvelope@EmailClientApi@@QBE?AW4NmApiMessagePriority@2@XZ @ 323 NONAME ; enum EmailClientApi::NmApiMessagePriority EmailClientApi::NmApiMessageEnvelope::priority(void) const
+	?setFlags@NmApiMessageEnvelope@EmailClientApi@@QAEXV?$QFlags@W4NmApiMessageFlag@EmailClientApi@@@@_N@Z @ 324 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setFlags(class QFlags<enum EmailClientApi::NmApiMessageFlag>, bool)
+	?isFlagSet@NmApiMessageEnvelope@EmailClientApi@@QBE_NW4NmApiMessageFlag@2@@Z @ 325 NONAME ; bool EmailClientApi::NmApiMessageEnvelope::isFlagSet(enum EmailClientApi::NmApiMessageFlag) const
+	?setFlag@NmApiMessageEnvelope@EmailClientApi@@QAEXW4NmApiMessageFlag@2@_N@Z @ 326 NONAME ; void EmailClientApi::NmApiMessageEnvelope::setFlag(enum EmailClientApi::NmApiMessageFlag, bool)
+	?flags@NmApiMessageEnvelope@EmailClientApi@@QBE?AV?$QFlags@W4NmApiMessageFlag@EmailClientApi@@@@XZ @ 327 NONAME ; class QFlags<enum EmailClientApi::NmApiMessageFlag> EmailClientApi::NmApiMessageEnvelope::flags(void) const
+	?getMessage@NmApiEmailService@EmailClientApi@@QAE_N_K00AAVNmApiMessage@2@@Z @ 328 NONAME ; bool EmailClientApi::NmApiEmailService::getMessage(unsigned long long, unsigned long long, unsigned long long, class EmailClientApi::NmApiMessage &)
 
--- a/emailservices/nmclientapi/eabi/nmailclientapiu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/eabi/nmailclientapiu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -213,25 +213,25 @@
 	_ZTVN14EmailClientApi20NmApiMessageEnvelopeE @ 212 NONAME
 	_ZN14EmailClientApi19NmApiMessageManager11qt_metacallEN11QMetaObject4CallEiPPv @ 213 NONAME
 	_ZN14EmailClientApi19NmApiMessageManager11qt_metacastEPKc @ 214 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager11saveMessageERK12NmApiMessage @ 215 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager12copyMessagesE5QListIyEyy @ 216 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager11saveMessageERK12NmApiMessage @ 215 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManager12copyMessagesE5QListIyEyy @ 216 NONAME ABSENT
 	_ZN14EmailClientApi19NmApiMessageManager12moveMessagesE5QListIyEyy @ 217 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager13messagesMovedEi @ 218 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager13messagesMovedEi @ 218 NONAME ABSENT
 	_ZN14EmailClientApi19NmApiMessageManager14deleteMessagesE5QListIyE @ 219 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager14messagesCopiedEi @ 220 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager15messagesCreatedEi @ 221 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager15messagesDeletedEi @ 222 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager16createAttachmentER17NmApiEmailMessageRK8QVariant @ 223 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager16removeAttachmentER17NmApiEmailMessagey @ 224 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager14messagesCopiedEi @ 220 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManager15messagesCreatedEi @ 221 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManager15messagesDeletedEi @ 222 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManager16createAttachmentER17NmApiEmailMessageRK8QVariant @ 223 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManager16removeAttachmentER17NmApiEmailMessagey @ 224 NONAME ABSENT
 	_ZN14EmailClientApi19NmApiMessageManager16staticMetaObjectE @ 225 NONAME DATA 16
 	_ZN14EmailClientApi19NmApiMessageManager18createDraftMessageEPK8QVariant @ 226 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager18createReplyMessageEPK8QVariantb @ 227 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager18createReplyMessageEPK8QVariantb @ 227 NONAME ABSENT
 	_ZN14EmailClientApi19NmApiMessageManager19getStaticMetaObjectEv @ 228 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager20createForwardMessageEPK8QVariant @ 229 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager4sendERK12NmApiMessage @ 230 NONAME
-	_ZN14EmailClientApi19NmApiMessageManager5fetchERK12NmApiMessage @ 231 NONAME
-	_ZN14EmailClientApi19NmApiMessageManagerC1EyP7QObject @ 232 NONAME
-	_ZN14EmailClientApi19NmApiMessageManagerC2EyP7QObject @ 233 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager20createForwardMessageEPK8QVariant @ 229 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManager4sendERK12NmApiMessage @ 230 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManager5fetchERK12NmApiMessage @ 231 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManagerC1EyP7QObject @ 232 NONAME ABSENT
+	_ZN14EmailClientApi19NmApiMessageManagerC2EyP7QObject @ 233 NONAME ABSENT
 	_ZN14EmailClientApi19NmApiMessageManagerD0Ev @ 234 NONAME
 	_ZN14EmailClientApi19NmApiMessageManagerD1Ev @ 235 NONAME
 	_ZN14EmailClientApi19NmApiMessageManagerD2Ev @ 236 NONAME
@@ -277,4 +277,95 @@
 	_ZN14EmailClientApi20NmApiSettingsManagerD0Ev @ 276 NONAME
 	_ZTIN14EmailClientApi20NmApiSettingsManagerE @ 277 NONAME
 	_ZTVN14EmailClientApi20NmApiSettingsManagerE @ 278 NONAME
+	_ZN14EmailClientApi12NmApiMessage10isCompleteEv @ 279 NONAME
+	_ZN14EmailClientApi12NmApiMessage11attachmentsEv @ 280 NONAME
+	_ZN14EmailClientApi12NmApiMessage11htmlContentEv @ 281 NONAME
+	_ZN14EmailClientApi12NmApiMessage11setCompleteEb @ 282 NONAME
+	_ZN14EmailClientApi12NmApiMessage11setEnvelopeERNS_20NmApiMessageEnvelopeE @ 283 NONAME
+	_ZN14EmailClientApi12NmApiMessage13addAttachmentERNS_15NmApiAttachmentE @ 284 NONAME
+	_ZN14EmailClientApi12NmApiMessage14setAttachmentsER5QListINS_15NmApiAttachmentEE @ 285 NONAME
+	_ZN14EmailClientApi12NmApiMessage14setHtmlContentERNS_16NmApiTextContentE @ 286 NONAME
+	_ZN14EmailClientApi12NmApiMessage16plainTextContentEv @ 287 NONAME
+	_ZN14EmailClientApi12NmApiMessage19setPlainTextContentERNS_16NmApiTextContentE @ 288 NONAME
+	_ZN14EmailClientApi12NmApiMessage8envelopeEv @ 289 NONAME
+	_ZN14EmailClientApi12NmApiMessageC1Ev @ 290 NONAME
+	_ZN14EmailClientApi12NmApiMessageC2Ev @ 291 NONAME
+	_ZN14EmailClientApi12NmApiMessageD0Ev @ 292 NONAME
+	_ZN14EmailClientApi12NmApiMessageD1Ev @ 293 NONAME
+	_ZN14EmailClientApi12NmApiMessageD2Ev @ 294 NONAME
+	_ZN14EmailClientApi15NmApiAttachment11setFileNameERK7QString @ 295 NONAME
+	_ZN14EmailClientApi15NmApiAttachment4fileEv @ 296 NONAME
+	_ZN14EmailClientApi15NmApiAttachment8fileNameEv @ 297 NONAME
+	_ZN14EmailClientApi15NmApiAttachmentC1Ev @ 298 NONAME
+	_ZN14EmailClientApi15NmApiAttachmentC2Ev @ 299 NONAME
+	_ZN14EmailClientApi15NmApiAttachmentD0Ev @ 300 NONAME
+	_ZN14EmailClientApi15NmApiAttachmentD1Ev @ 301 NONAME
+	_ZN14EmailClientApi15NmApiAttachmentD2Ev @ 302 NONAME
+	_ZN14EmailClientApi16NmApiTextContent10setContentERK7QString @ 303 NONAME
+	_ZN14EmailClientApi16NmApiTextContentC1Ev @ 304 NONAME
+	_ZN14EmailClientApi16NmApiTextContentC2Ev @ 305 NONAME
+	_ZN14EmailClientApi16NmApiTextContentD0Ev @ 306 NONAME
+	_ZN14EmailClientApi16NmApiTextContentD1Ev @ 307 NONAME
+	_ZN14EmailClientApi16NmApiTextContentD2Ev @ 308 NONAME
+	_ZN14EmailClientApi19NmApiMessageContent10isCompleteEv @ 309 NONAME
+	_ZN14EmailClientApi19NmApiMessageContent11setCompleteEb @ 310 NONAME
+	_ZN14EmailClientApi19NmApiMessageContent14setContentTypeERK7QString @ 311 NONAME
+	_ZN14EmailClientApi19NmApiMessageContent5setIdEy @ 312 NONAME
+	_ZN14EmailClientApi19NmApiMessageContent7setSizeEj @ 313 NONAME
+	_ZN14EmailClientApi19NmApiMessageContentC1Ev @ 314 NONAME
+	_ZN14EmailClientApi19NmApiMessageContentC2Ev @ 315 NONAME
+	_ZN14EmailClientApi19NmApiMessageContentD0Ev @ 316 NONAME
+	_ZN14EmailClientApi19NmApiMessageContentD1Ev @ 317 NONAME
+	_ZN14EmailClientApi19NmApiMessageContentD2Ev @ 318 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager11saveMessageERKNS_12NmApiMessageE @ 319 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager11sendMessageERKNS_12NmApiMessageE @ 320 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager12fetchMessageEy @ 321 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager15fetchAttachmentERKNS_12NmApiMessageEy @ 322 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager16createAttachmentERNS_12NmApiMessageERK8QVariant @ 323 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager16removeAttachmentERNS_12NmApiMessageEy @ 324 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager18createReplyMessageEPKNS_12NmApiMessageEPK8QVariantb @ 325 NONAME
+	_ZN14EmailClientApi19NmApiMessageManager20createForwardMessageEPNS_12NmApiMessageEPK8QVariant @ 326 NONAME
+	_ZN14EmailClientApi19NmApiMessageManagerC1EP7QObjecty @ 327 NONAME
+	_ZN14EmailClientApi19NmApiMessageManagerC2EP7QObjecty @ 328 NONAME
+	_ZN14EmailClientApi20NmApiMessageEnvelope12setMailboxIdEy @ 329 NONAME
+	_ZN14EmailClientApi20NmApiMessageEnvelope16getBccRecipientsER5QListINS_17NmApiEmailAddressEE @ 330 NONAME
+	_ZN14EmailClientApi20NmApiMessageEnvelope16setBccRecipientsERK5QListINS_17NmApiEmailAddressEE @ 331 NONAME
+	_ZNK14EmailClientApi16NmApiTextContent7contentEv @ 332 NONAME
+	_ZNK14EmailClientApi19NmApiMessageContent11contentTypeEv @ 333 NONAME
+	_ZNK14EmailClientApi19NmApiMessageContent2idEv @ 334 NONAME
+	_ZNK14EmailClientApi19NmApiMessageContent4sizeEv @ 335 NONAME
+	_ZNK14EmailClientApi20NmApiMessageEnvelope9mailboxIdEv @ 336 NONAME
+	_ZTIN14EmailClientApi12NmApiMessageE @ 337 NONAME
+	_ZTIN14EmailClientApi15NmApiAttachmentE @ 338 NONAME
+	_ZTIN14EmailClientApi16NmApiTextContentE @ 339 NONAME
+	_ZTIN14EmailClientApi19NmApiMessageContentE @ 340 NONAME
+	_ZTVN14EmailClientApi12NmApiMessageE @ 341 NONAME
+	_ZTVN14EmailClientApi15NmApiAttachmentE @ 342 NONAME
+	_ZTVN14EmailClientApi16NmApiTextContentE @ 343 NONAME
+	_ZTVN14EmailClientApi19NmApiMessageContentE @ 344 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch10initialiseERK5QListI7QStringENS_21NmApiMailSortCriteriaE @ 345 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch11qt_metacallEN11QMetaObject4CallEiPPv @ 346 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch11qt_metacastEPKc @ 347 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch12messageFoundERNS_12NmApiMessageE @ 348 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch14searchCompleteEi @ 349 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch16staticMetaObjectE @ 350 NONAME DATA 16
+	_ZN14EmailClientApi18NmApiMessageSearch19getStaticMetaObjectEv @ 351 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch5startEv @ 352 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearch6cancelEv @ 353 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearchC1EP7QObjecty @ 354 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearchC2EP7QObjecty @ 355 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearchD0Ev @ 356 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearchD1Ev @ 357 NONAME
+	_ZN14EmailClientApi18NmApiMessageSearchD2Ev @ 358 NONAME
+	_ZNK14EmailClientApi18NmApiMessageSearch10metaObjectEv @ 359 NONAME
+	_ZNK14EmailClientApi18NmApiMessageSearch9isRunningEv @ 360 NONAME
+	_ZTIN14EmailClientApi18NmApiMessageSearchE @ 361 NONAME
+	_ZTVN14EmailClientApi18NmApiMessageSearchE @ 362 NONAME
+	_ZN14EmailClientApi20NmApiMessageEnvelope11setPriorityENS_20NmApiMessagePriorityE @ 363 NONAME
+	_ZN14EmailClientApi20NmApiMessageEnvelope7setFlagENS_16NmApiMessageFlagEb @ 364 NONAME
+	_ZN14EmailClientApi20NmApiMessageEnvelope8setFlagsE6QFlagsINS_16NmApiMessageFlagEEb @ 365 NONAME
+	_ZNK14EmailClientApi20NmApiMessageEnvelope5flagsEv @ 366 NONAME
+	_ZNK14EmailClientApi20NmApiMessageEnvelope8priorityEv @ 367 NONAME
+	_ZNK14EmailClientApi20NmApiMessageEnvelope9isFlagSetENS_16NmApiMessageFlagE @ 368 NONAME
+	_ZN14EmailClientApi17NmApiEmailService10getMessageEyyyRNS_12NmApiMessageE @ 369 NONAME
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/inc/nmapiattachment_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* 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:
+*       Email message attachment private header.
+*/
+
+#ifndef NMAPIATTACHMENT_P_H_
+#define NMAPIATTACHMENT_P_H_
+
+namespace EmailClientApi
+{
+
+class NmApiAttachmentPrivate : public QSharedData
+{
+
+public:
+    
+    NmApiAttachmentPrivate();
+    virtual ~NmApiAttachmentPrivate();
+
+    QString fileName();
+    XQSharableFile file();
+
+    void setFileName(const QString &fileName);
+
+private:
+    QString mFilename;
+};
+}
+
+#endif /* NMAPIATTACHMENT_P_H_ */
--- a/emailservices/nmclientapi/inc/nmapiengine.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapiengine.h	Mon Oct 04 00:05:37 2010 +0300
@@ -18,6 +18,8 @@
 #ifndef NMAPIENGINE_H
 #define NMAPIENGINE_H
 
+#include <CFSMailPlugin.h>
+
 #include "nmcommon.h"
 #include "nmapiprivateclasses.h"
 
@@ -28,6 +30,7 @@
 class NmApiMailbox;
 class NmApiFolder;
 class NmApiMessageEnvelope;
+class NmApiMessage;
 }
 
 class NmApiEngine : public QObject
@@ -51,15 +54,23 @@
 		
     bool getMailboxById(const quint64 mailboxId, EmailClientApi::NmApiMailbox &mailbox);
 
+    bool getMessageById(
+        const quint64 mailboxId,
+        const quint64 folderId,
+        const quint64 messageId,
+        EmailClientApi::NmApiMessage &message);
+    
     void startCollectingEvents();
-    
+
+    bool listMailPlugins(RPointerArray<CFSMailPlugin> &mailPlugins);
+
     signals:
     /*!
        It contains info about event in emailstore.
        
        \arg Contains info about event and related object (message or mailbox list)
      */
-    void emailStoreEvent(NmApiMessage message);
+    void emailStoreEvent(NmApiEvent event);
 
 private slots:
     void mailboxChangedArrived(NmMailboxEvent, const QList<NmId> &mailboxIds);
@@ -72,12 +83,15 @@
 private:
     NmApiEngine();
     virtual ~NmApiEngine();
+    void listMailPlugins();
+    void listMailPluginsL();
 
 private:
     static NmApiEngine *mInstance;//!<Static instance of NmApiEngine. There can be only one instance of engine
     static quint32 mReferenceCount;//!<Count of refences to engine instance
 
     NmApiDataPluginFactory *mFactory;//!<Plugin factory. Is needed to get plugins for emails
+    RPointerArray<CFSMailPlugin> mMailPlugins;
 };
 
 #endif /* NMAPIENGINE_H */
--- a/emailservices/nmclientapi/inc/nmapieventnotifier_p.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapieventnotifier_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -39,9 +39,9 @@
     bool isRunning() const;
     bool start();
     void stop();
-    void events(QList<NmApiMessage> &events);
+    void events(QList<NmApiEvent> &events);
 public slots:
-    void emailStoreEvent(const NmApiMessage &events);
+    void emailStoreEvent(const NmApiEvent &events);
 
 signals:
     void timedOut();
@@ -50,7 +50,7 @@
     QTimer *mEmitSignals;
     NmApiEngine *mEngine;
     bool mIsRunning;
-    QList<NmApiMessage> mBufferOfEvents;
+    QList<NmApiEvent> mBufferOfEvents;
 };
 
 }
--- a/emailservices/nmclientapi/inc/nmapiheaders.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapiheaders.h	Mon Oct 04 00:05:37 2010 +0300
@@ -39,8 +39,9 @@
 #include <iapprefs.h>
 #include <cemailaccounts.h>
 
+#include <e32base.h>
 
-#include <smtpset.h>
+#include <SMTPSET.H>
 
 #include <xqconversions.h>
 
@@ -56,7 +57,11 @@
 
 #include <emailtrace.h>
 
+#include <ecom/ecom.h>
+#include <ecom/implementationinformation.h>
 
+#include <CFSMailPlugin.h>
+#include <CFSMailBox.h>
 
 // nmail_settings_api
 #include <nmapimailboxsettings.h>
@@ -76,8 +81,12 @@
 #include <nmapimessagebody.h>
 #include <nmapimessageenvelope.h>
 #include <nmapimessagetask.h>
+#include <nmapimessage.h>
 #include <nmapimessagemanager.h>
-
+#include <nmapimessagesearch.h>
+#include <nmapimessagecontent.h>
+#include <nmapitextcontent.h>
+#include <nmapiattachment.h>
 
 // own headers
 #include "nmapidatapluginfactory.h"
@@ -97,6 +106,11 @@
 #include "nmapipopimapsettingsmanager.h"
 #include "nmapiprivateclasses.h"
 #include "nmapitypesconverter.h"
+#include "nmapimessagesearch_p.h"
+#include "nmapimessage_p.h"
+#include "nmapimessagecontent_p.h"
+#include "nmapitextcontent_p.h"
+#include "nmapiattachment_p.h"
 
 
 #endif // NMAPIHEADERS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/inc/nmapimessage_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* 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:
+*       Api's email message private implementation.
+*/
+
+#ifndef NMAPIMESSAGE_P_H_
+#define NMAPIMESSAGE_P_H_
+
+namespace EmailClientApi
+{
+
+class NmApiMessagePrivate : public QSharedData
+{
+
+public:
+    NmApiMessagePrivate();
+    virtual ~NmApiMessagePrivate();
+
+    NmApiTextContent plainTextContent();
+    NmApiTextContent htmlContent();
+    bool isComplete();
+    QList<NmApiAttachment> attachments();
+    void addAttachment(NmApiAttachment &attachment);
+    NmApiMessageEnvelope& envelope();
+    void setPlainTextContent(NmApiTextContent &textContent);
+    void setHtmlContent(NmApiTextContent &textContent);
+    void setComplete(bool complete);
+    void setAttachments(QList<NmApiAttachment> &attachments);
+    void setEnvelope(NmApiMessageEnvelope &envelope);
+    
+private:
+    NmApiTextContent mPlainTextContent;
+    NmApiTextContent mHtmlContent;
+    bool mComplete;
+    QList<NmApiAttachment> mAttachments;
+    NmApiMessageEnvelope mEnvelope;
+};
+}
+
+#endif /* NMAPIMESSAGE_P_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/inc/nmapimessagecontent_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* 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:
+*       Email message content private implementation.
+*/
+
+#ifndef NMAPIMESSAGECONTENT_P_H_
+#define NMAPIMESSAGECONTENT_P_H_
+
+namespace EmailClientApi
+{
+
+class NmApiMessageContentPrivate : public QSharedData
+{
+public:
+    NmApiMessageContentPrivate();
+    virtual ~NmApiMessageContentPrivate();
+
+    QString contentType() const;
+    bool isComplete();
+    quint32 size() const;
+    quint64 id() const;
+    
+    void setContentType(const QString &contentType);
+    void setComplete(bool complete);
+    void setSize(quint32 size);
+    void setId(quint64 id);
+
+private:
+    
+    QString mContentType;
+    bool mComplete;
+    quint32 mSize;
+    quint64 mId;
+};
+}
+
+#endif /* NMAPIMESSAGEENVELOPE_P_H_ */
--- a/emailservices/nmclientapi/inc/nmapimessageenvelope_p.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapimessageenvelope_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -32,16 +32,24 @@
     {
     }
 
+    NmApiMessageFlags flags() const;
+    void setFlags(const NmApiMessageFlags flags, bool set);
+    void setFlag(const NmApiMessageFlag flag, bool set);
+    bool isFlagSet(const NmApiMessageFlag flag) const;
+
+public:
     bool read;
     bool attachments;
     bool forwarded;
     bool replied;
 
+    QList<EmailClientApi::NmApiEmailAddress> toRecipients;
     QList<EmailClientApi::NmApiEmailAddress> ccRecipients;
-    QList<EmailClientApi::NmApiEmailAddress> toRecipients;
+    QList<EmailClientApi::NmApiEmailAddress> bccRecipients;
 
     quint64 id;
     quint64 parentFolder;
+    quint64 mailboxId;
 
     QString contentType;
     QString subject;
@@ -52,6 +60,10 @@
     quint64 fetchedSize;
 
     QDateTime sentTime;
+
+private:
+    NmApiMessageFlags messageFlags;
+
 };
 }
 
--- a/emailservices/nmclientapi/inc/nmapimessagemanager_p.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapimessagemanager_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -36,7 +36,7 @@
 {
  Q_OBJECT  
 public:
-    NmApiMessageManagerPrivate(quint64 mailboxId,QObject *parent = 0);
+    NmApiMessageManagerPrivate(QObject *parent,quint64 mailboxId);
     virtual ~NmApiMessageManagerPrivate();
     
 private:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/inc/nmapimessagesearch_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* 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:
+*       Message search private implementation.
+*/
+
+#ifndef NMAPIMESSAGESEARCHPRIVATE_H_
+#define NMAPIMESSAGESEARCHPRIVATE_H_
+
+#include <MFSMailBoxSearchObserver.h>
+#include <CFSMailBox.h>
+#include <nmapicommon.h>
+#include <nmapimessage.h>
+
+class NmApiEngine;
+class CFSMailBox;
+
+class NmApiMessageSearchPrivate : public QObject,
+                                    public MFSMailBoxSearchObserver
+{
+    Q_OBJECT
+
+public:
+    
+    NmApiMessageSearchPrivate(const quint64 mailboxId, QObject *parent = 0);
+
+    ~NmApiMessageSearchPrivate();
+
+    bool initialise(const QList<QString> &searchStrings, EmailClientApi::NmApiMailSortCriteria sortCriteria);
+    
+    bool isRunning() const;
+    
+    bool start();
+    
+    void cancel();
+
+public: // From MFSMailboxSearchObserver
+
+    void MatchFoundL(CFSMailMessage *aMatchMessage);
+
+    void SearchCompletedL();
+
+    void ClientRequiredSearchPriority(TInt *apRequiredSearchPriority); 
+
+private:
+    
+    void initialiseMailbox();
+    
+signals:
+
+    void messageFound(EmailClientApi::NmApiMessage &message);
+
+    void searchComplete(int result = 0); 
+    
+    void canceled();
+    
+private:
+    
+    RPointerArray<TDesC> mSearchStrings;
+    TFSMailSortCriteria mSortCriteria;
+    TFSMailMsgId mMailBoxId;
+    CFSMailBox *mMailBox;
+    bool mIsRunning;
+    NmApiEngine *mEngine;
+    
+};
+
+#endif /* NMAPIMESSAGESEARCHPRIVATE_H_ */
--- a/emailservices/nmclientapi/inc/nmapiprivateclasses.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapiprivateclasses.h	Mon Oct 04 00:05:37 2010 +0300
@@ -44,7 +44,7 @@
    It is grouped in list of object by event when mailbox change and by
    event, mailboxId anf folderId when messages change.
  */
-struct NmApiMessage
+struct NmApiEvent
 {
     NmApiAction action;
     NmApiObjectType objectType;
@@ -55,6 +55,6 @@
     quint64 folderId;
 
 };
-Q_DECLARE_METATYPE(NmApiMessage)
+Q_DECLARE_METATYPE(NmApiEvent)
 
 #endif /* NMAPIPRIVATECLASSES_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/inc/nmapitextcontent_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* 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:
+*       Email message text content private header.
+*/
+
+#ifndef NMAPITEXTCONTENT_P_H_
+#define NMAPITEXTCONTENT_P_H_
+
+namespace EmailClientApi
+{
+
+class NmApiTextContentPrivate : public QSharedData
+{
+
+public:
+    
+    NmApiTextContentPrivate();
+    virtual ~NmApiTextContentPrivate();
+
+    QString content() const;
+    void setContent(const QString &content);
+    
+private:
+    
+    QString mContent;
+};
+}
+
+#endif /* NMAPITEXTCONTENT_P_H_ */
--- a/emailservices/nmclientapi/inc/nmapitypesconverter.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapitypesconverter.h	Mon Oct 04 00:05:37 2010 +0300
@@ -24,6 +24,8 @@
 class NmFolder;
 class NmMessageEnvelope;
 class NmAddress;
+class NmMessage;
+class NmMessagePart;
 /*!
    
  */
@@ -33,6 +35,8 @@
 class NmApiFolder;
 class NmApiMessageEnvelope;
 class NmApiEmailAddress;
+class NmApiMessage;
+class NmApiAttachment;
 }
 
 
@@ -45,6 +49,8 @@
         const NmMessageEnvelope &envelope);
     static QList<EmailClientApi::NmApiEmailAddress> NmAddress2QString(
         const QList<NmAddress> &addresses);
+    static EmailClientApi::NmApiMessage NmMessage2NmApiMessage(NmMessage &message);
+
 };
 
 #endif /* NMTOAPICONVERTER_H_ */
--- a/emailservices/nmclientapi/nmclientapi.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/nmclientapi.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -31,7 +31,7 @@
                 
 DEPENDPATH +=  ../../email_plat/nmail_client_api \
                 ../../email_plat/nmail_settings_api \
-
+                $$APP_LAYER_SYSTEMINCLUDE 
 
 MOC_DIR = tmp
 
@@ -51,7 +51,12 @@
            nmapimessagetask.h \
            nmapimessagemanager.h \
            nmapisettingsmanager.h \
-           nmapimailboxsettings.h
+           nmapimailboxsettings.h \
+           nmapimessagesearch.h \
+           nmapimessage.h \
+           nmapimessagecontent.h \
+           nmapitextcontent.h \
+           nmapiattachment.h
 
 # private headers 
 HEADERS += inc/nmapidatapluginfactory.h \
@@ -68,12 +73,16 @@
            inc/nmapimessagebody_p.h \
            inc/nmapimessageenvelope_p.h \
            inc/nmapimessagemanager_p.h \
-	   inc/nmapisettingsmanager_p.h \
+	       inc/nmapisettingsmanager_p.h \
            inc/nmapipopimapsettingsmanager.h \
            inc/nmapiprivateclasses.h \
            inc/nmapitypesconverter.h \
-           inc/nmapiheaders.h 
-                        
+           inc/nmapiheaders.h \
+           inc/nmapimessagesearch_p.h \
+           inc/nmapimessage_p.h \
+           inc/nmapimessagecontent_p.h \
+           inc/nmapitextcontent_p.h \
+           inc/nmapiattachment_p.h
 SOURCES += src/nmapidatapluginfactory.cpp \
            src/nmapiemailaddress.cpp \
            src/nmapiemailservice.cpp \
@@ -96,11 +105,21 @@
            src/nmapimessagebody.cpp \
            src/nmapimessageenvelope.cpp \
            src/nmapipopimapsettingsmanager.cpp \
-	         src/nmapimessagemanager_p.cpp \
-			     src/nmapimessagemanager.cpp \
-	   src/nmapisettingsmanager_p.cpp \
-	   src/nmapisettingsmanager.cpp \
-           src/nmapitypesconverter.cpp 
+           src/nmapimessagemanager_p.cpp \
+           src/nmapimessagemanager.cpp \
+           src/nmapisettingsmanager_p.cpp \
+           src/nmapisettingsmanager.cpp \
+           src/nmapitypesconverter.cpp \
+           src/nmapimessagesearch.cpp \
+           src/nmapimessagesearch_p.cpp \
+           src/nmapimessage.cpp \
+           src/nmapimessage_p.cpp \
+           src/nmapimessagecontent.cpp \
+           src/nmapimessagecontent_p.cpp \
+           src/nmapitextcontent.cpp \
+           src/nmapitextcontent_p.cpp \
+           src/nmapiattachment.cpp \
+           src/nmapiattachment_p.cpp
 
 
 
@@ -108,27 +127,35 @@
 symbian*: { 
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.CAPABILITY = ALL \
-        -TCB
+        -TCB 
+    TARGET.CAPABILITY += CAP_ECOM_PLUGIN
+
     TARGET.UID2 = 0x1000008D
     TARGET.UID3 = 0x2002C366
     
     INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
 
-	
-	 LIBS += -lnmailbase \
-	 -limcm \
-	 -lxqsettingsmanager \
-	 -lxqutils \
-	 -lnmailuiengine
-				   
+    MMP_RULES += "SYSTEMINCLUDE /epoc32/include/ecom" 
+
+     LIBS += -lnmailbase \
+     -limcm \
+     -lxqsettingsmanager \
+     -lxqutils \
+     -lnmailuiengine \
+     -lFSFWCommonLib \
+     -lECom \
+     -lxqserviceutil \
+     -lefsrv 
+
     defBlock = \      
       "$${LITERAL_HASH}if defined(MARM)" \
       "DEFFILE  eabi/nmailclientapi.def" \
-	  "$${LITERAL_HASH}else" \
+      "$${LITERAL_HASH}else" \
       "DEFFILE  bwins/nmailclientapi.def" \
       "$${LITERAL_HASH}endif"
 
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
     
      BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
     "rom/nmailclientapi.iby CORE_APP_LAYER_IBY_EXPORT_PATH(nmailclientapi.iby)"    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapiattachment.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,67 @@
+/*
+ * 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:
+ *      Email message attachment implementation.
+ */
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+/*!
+    Class constructor.
+*/
+NmApiAttachment::NmApiAttachment()
+{
+    NM_FUNCTION;
+    d = new NmApiAttachmentPrivate();
+}
+
+/*!
+    Class destructor.
+*/
+NmApiAttachment::~NmApiAttachment()
+{
+    NM_FUNCTION;
+}
+
+/*!
+   Getter for filename
+ */
+QString NmApiAttachment::fileName()
+{
+    NM_FUNCTION;
+    return d->fileName();
+}
+
+/*!
+   Getter for file
+ */
+XQSharableFile NmApiAttachment::file()
+{
+    NM_FUNCTION;
+    return d->file();
+}
+
+/*!
+   Setter for filename
+ */
+void NmApiAttachment::setFileName(const QString &fileName)
+{
+    NM_FUNCTION;
+    d->setFileName(fileName);
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapiattachment_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,69 @@
+/*
+ * 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:
+ *      Email attachment private implementation.
+ */
+
+#include "nmapiheaders.h"
+#include <xqsharablefile.h>
+
+namespace EmailClientApi
+{
+
+/*!
+    Class constructor.
+*/
+NmApiAttachmentPrivate::NmApiAttachmentPrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+    Class destructor.
+*/
+NmApiAttachmentPrivate::~NmApiAttachmentPrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+   Getter for filename
+ */
+QString NmApiAttachmentPrivate::fileName()
+{
+    NM_FUNCTION;
+    return mFilename;
+}
+
+/*!
+   Getter for file
+ */
+XQSharableFile NmApiAttachmentPrivate::file()
+{
+    NM_FUNCTION;
+    XQSharableFile *file = new XQSharableFile();
+    file->open(mFilename);
+    return *file;
+}
+
+/*!
+   Setter for filename
+ */
+void NmApiAttachmentPrivate::setFileName(const QString &fileName)
+{
+    NM_FUNCTION;
+    mFilename = fileName;
+}
+
+}
--- a/emailservices/nmclientapi/src/nmapiemailservice.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapiemailservice.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -73,6 +73,23 @@
 }
 
 /*!
+   gets mail message envelope by id (see also NmEventNotifier)
+ */
+bool NmApiEmailService::getMessage(
+    const quint64 mailboxId,
+    const quint64 folderId,
+    const quint64 messageId,
+    EmailClientApi::NmApiMessage &message)
+{
+    NM_FUNCTION;
+    
+    if (!mEngine) {
+        return false;
+    }
+    return mEngine->getMessageById(mailboxId, folderId, messageId, message);
+}
+
+/*!
    Initialises email service. this must be called and initialised signal received 
    before services of the library are used.
  */
--- a/emailservices/nmclientapi/src/nmapiengine.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapiengine.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -17,7 +17,6 @@
 
 #include "nmapiheaders.h"
 
-
 NmApiEngine *NmApiEngine::mInstance = NULL;
 quint32 NmApiEngine::mReferenceCount = 0;
 
@@ -46,6 +45,20 @@
     NM_FUNCTION;
     
     NmApiDataPluginFactory::releaseInstance(mFactory);
+    
+    if (mMailPlugins.Count() > 0) {
+        CFSMailPlugin* plugin = NULL;
+        for (int i = 0; i < mMailPlugins.Count(); ++i) {
+            plugin = mMailPlugins[i];
+            
+            if (plugin) {
+                delete plugin;
+                plugin = NULL;
+            }
+            
+            CFSMailPlugin::Close();
+        }
+    }
 }
 
 /*!
@@ -94,11 +107,11 @@
 {
     NM_FUNCTION;
     
-    NmApiMessage message;
-    message.objectType = EMailbox;
+    NmApiEvent event;
+    event.objectType = EMailbox;
     switch (mailboxEvent) {
         case NmMailboxCreated: {
-            message.action = ENew;
+            event.action = ENew;
             // subscribe all events also for these new mailboxes
             for(int i=0; i<mailboxIds.count(); i++) {
                 mFactory->interfaceInstance()->subscribeMailboxEvents(mailboxIds[i]);
@@ -106,7 +119,7 @@
         }
             break;
         case NmMailboxDeleted: {
-            message.action = EDeleted;
+            event.action = EDeleted;
             // unsubscribe all events from deleted mailboxes
             for(int i=0; i<mailboxIds.count(); i++) {
                 mFactory->interfaceInstance()->unsubscribeMailboxEvents(mailboxIds[i]);
@@ -114,21 +127,21 @@
         }
             break;
         case NmMailboxChanged: {
-            message.action = EChange;
+            event.action = EChange;
         }
             break;
         default:
             break;
     }
 
-    message.folderId = 0;
-    message.mailboxId = 0;
+    event.folderId = 0;
+    event.mailboxId = 0;
 
     for (int i = 0; i < mailboxIds.count(); i++) {
-        message.objectIds.append(mailboxIds.at(i).id());
+        event.objectIds.append(mailboxIds.at(i).id());
     }
 
-    emit emailStoreEvent(message);
+    emit emailStoreEvent(event);
 }
 
 /*!
@@ -148,33 +161,33 @@
 {
     NM_FUNCTION;
     
-    NmApiMessage message;
-    message.objectType = EMessage;
+    NmApiEvent event;
+    event.objectType = EMessage;
     switch (messageEvent) {
         case NmMessageCreated: {
-            message.action = ENew;
+            event.action = ENew;
         }
             break;
         case NmMessageDeleted: {
-            message.action = EDeleted;
+            event.action = EDeleted;
         }
             break;
         case NmMessageChanged: {
-            message.action = EChange;
+            event.action = EChange;
         }
             break;
         default:
             break;
     }
 
-    message.folderId = folderId.id();
-    message.mailboxId = mailboxId.id();
+    event.folderId = folderId.id();
+    event.mailboxId = mailboxId.id();
 
     for (int i = 0; i < messageIds.count(); i++) {
-        message.objectIds.append(messageIds.at(i).id());
+        event.objectIds.append(messageIds.at(i).id());
     }
 
-    emit emailStoreEvent(message);
+    emit emailStoreEvent(event);
 }
 
 /*!
@@ -343,6 +356,57 @@
 }
 
 /*!
+   Return message given by mailbox, folder and message id.
+   
+   \param mailboxId Mailbox id from where message should come
+   \param folderId Folder id from where message should come
+   \param messageId Id of message which should be returned
+   \param message Envelope to fill.
+   
+   \return Return true if it will find any envelope
+ */
+bool NmApiEngine::getMessageById(
+    const quint64 mailboxId,
+    const quint64 folderId,
+    const quint64 messageId,
+    EmailClientApi::NmApiMessage &message)
+{
+    NM_FUNCTION;
+    
+    bool found = false;
+    
+    listMailPlugins();
+
+    CFSMailPlugin *plugin = NULL;
+    CFSMailMessage* fsMessage = NULL;
+    TFSMailMsgId fsMailBoxId = TFSMailMsgId(mailboxId);
+    TFSMailMsgId fsFolderId = TFSMailMsgId(folderId);
+    TFSMailMsgId fsMessageId = TFSMailMsgId(messageId);
+    
+    for (int i = 0; i < mMailPlugins.Count() && !fsMessage; i++){
+        plugin = mMailPlugins[i];
+        if (plugin) {
+            QT_TRY {
+                fsMessage = plugin->GetMessageByUidL(fsMailBoxId,
+                    fsFolderId,
+                    fsMessageId,
+                    EFSMsgDataStructure);
+            }
+            QT_CATCH(...){}
+        }
+    }
+    if (fsMessage) {
+        NmMessage *nmMessage = fsMessage->GetNmMessage();
+        EmailClientApi::NmApiMessage apiMessage = NmToApiConverter::NmMessage2NmApiMessage(*nmMessage);
+        message = apiMessage;
+        found = true;
+        delete fsMessage;
+    }
+    return found;
+}
+
+
+/*!
    Return mailbox given by mailbox id.
    
    \param mailboxId Id of Mailbox which should be returned
@@ -371,3 +435,65 @@
     
     return found;
 }
+
+/*!
+ \fn listMailPlugins 
+ \param mailPlugins List of mail plugins to be listed.
+ \return True if operation completed succesfully, otherwise false.
+ 
+ Lists all mail plugins.  
+ */
+bool NmApiEngine::listMailPlugins(RPointerArray<CFSMailPlugin> &mailPlugins)
+{
+    NM_FUNCTION;
+    bool ret = false;
+    if (mMailPlugins.Count() == 0) {
+        TRAPD(err, listMailPluginsL());
+        if (err == KErrNone){
+            ret = true;
+        }
+    } else {
+        ret = true;
+    }
+    mailPlugins = mMailPlugins;
+    
+    return ret;
+}
+
+/*!
+ \fn listMailPlugins 
+ 
+ Lists all mail plugins.  
+ */
+void NmApiEngine::listMailPlugins()
+{
+    NM_FUNCTION;
+    if (mMailPlugins.Count() == 0) {
+        TRAP_IGNORE(listMailPluginsL());
+    }
+}
+
+/*!
+ \fn ListMailPluginsL
+ 
+ Leaving version of listMailPlugins.
+ */
+void NmApiEngine::listMailPluginsL()
+{
+    NM_FUNCTION;
+
+    RPointerArray<CImplementationInformation> implInfo;
+    CFSMailPlugin::ListImplementationsL(implInfo);
+    CleanupClosePushL(implInfo);    
+    CFSMailPlugin* plugin = NULL;
+    for (int i = 0; i < implInfo.Count(); ++i) {
+        TUid id = implInfo[i]->ImplementationUid();
+        plugin = CFSMailPlugin::NewL(id);
+        
+        if (plugin) {
+            mMailPlugins.AppendL(plugin);
+        }
+    }
+    CleanupStack::Pop(&implInfo);
+}
+
--- a/emailservices/nmclientapi/src/nmapieventnotifier.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapieventnotifier.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -94,10 +94,10 @@
     qRegisterMetaType<EmailClientApi::NmApiMailboxEvent> ("EmailClientApi::NmApiMailboxEvent");
     qRegisterMetaType<EmailClientApi::NmApiMessageEvent> ("EmailClientApi::NmApiMessageEvent");
     
-    QList<NmApiMessage> events;
+    QList<NmApiEvent> events;
     mNmApiEventNotifierPrivate->events(events);
     while (!events.isEmpty()) {
-        NmApiMessage event = events.takeFirst();
+        NmApiEvent event = events.takeFirst();
         switch (event.objectType) {
             case EMailbox:
                 switch (event.action) {
--- a/emailservices/nmclientapi/src/nmapieventnotifier_p.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapieventnotifier_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -69,10 +69,10 @@
     }
     else {
         qRegisterMetaType<QList<quint64> > ("QList<quint64>");
-        qRegisterMetaType<NmApiMessage> ("NmApiMessage");
+        qRegisterMetaType<NmApiEvent> ("NmApiEvent");
 
-        connect(mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), this,
-                SLOT(emailStoreEvent(NmApiMessage)));
+        connect(mEngine, SIGNAL(emailStoreEvent(NmApiEvent)), this,
+                SLOT(emailStoreEvent(NmApiEvent)));
             
         mEngine->startCollectingEvents();
             
@@ -89,14 +89,14 @@
 {
     mIsRunning = false;
     mEmitSignals->stop();
-    disconnect(mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), this,
-            SLOT(emailStoreEvent(NmApiMessage)));
+    disconnect(mEngine, SIGNAL(emailStoreEvent(NmApiEvent)), this,
+            SLOT(emailStoreEvent(NmApiEvent)));
 }
 
 /*!
     Returns event buffer, after function call the buffer is empty
  */
-void NmApiEventNotifierPrivate::events(QList<NmApiMessage> &events)
+void NmApiEventNotifierPrivate::events(QList<NmApiEvent> &events)
 {
     while (!mBufferOfEvents.isEmpty()) {
         events << mBufferOfEvents.takeFirst();
@@ -107,10 +107,10 @@
    Add one email event into buffer.
    
    It is run by \sa NmApiEngine::emailStoreEvent signal.
-   \sa NmApiMessage
+   \sa NmApiEvent
    \param events It contains full info about object and it event.
  */
-void NmApiEventNotifierPrivate::emailStoreEvent(const NmApiMessage &events)
+void NmApiEventNotifierPrivate::emailStoreEvent(const NmApiEvent &events)
 {
     NM_FUNCTION;
     mBufferOfEvents << events;
@@ -127,8 +127,8 @@
     mIsRunning = false;
     mEmitSignals->stop();
 
-    disconnect(mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), this,
-            SLOT(emailStoreEvent(NmApiMessage)));
+    disconnect(mEngine, SIGNAL(emailStoreEvent(NmApiEvent)), this,
+            SLOT(emailStoreEvent(NmApiEvent)));
 
     mBufferOfEvents.clear();
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapimessage.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,173 @@
+/*
+ * 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:
+ *      Api's email message implementation.
+ */
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+/*!
+    Class constructor.
+*/
+NmApiMessage::NmApiMessage()
+{
+    NM_FUNCTION;
+    d = new NmApiMessagePrivate();
+}
+
+/*!
+    Class destructor.
+*/
+NmApiMessage::~NmApiMessage()
+{
+    NM_FUNCTION;
+}
+
+/*!
+ \fn plainTextContent 
+ \return Message plain text content.
+ 
+ Returns message plain text content.
+ */
+NmApiTextContent NmApiMessage::plainTextContent()
+{
+    NM_FUNCTION;
+    return d->plainTextContent();
+}
+
+/*!
+ \fn htmlContent 
+ \return Message html text content.
+ 
+ Returns message html text content.
+ */
+NmApiTextContent NmApiMessage::htmlContent()
+{
+    NM_FUNCTION;
+    return d->htmlContent();
+}
+
+/*!
+ \fn isComplete 
+ \return Message complete state.
+ 
+ Returns message complete state.
+ */
+bool NmApiMessage::isComplete()
+{
+    NM_FUNCTION;
+    return d->isComplete();
+}
+
+/*!
+ \fn getAttachments 
+ \return Message attachment list.
+ 
+ Returns message attachment list.
+ */
+QList<NmApiAttachment> NmApiMessage::attachments()
+{
+    NM_FUNCTION;
+    return d->attachments();
+}
+
+
+/*!
+ \fn addAttachment 
+ \param attachment Attachment.
+ 
+ Add attachment to message.
+ */
+void NmApiMessage::addAttachment(NmApiAttachment &attachment)
+{
+    NM_FUNCTION;
+    d->addAttachment(attachment);
+}
+
+/*!
+ \fn envelope 
+ \return Message envelope.
+ 
+ Returns message envelope.
+ */
+NmApiMessageEnvelope& NmApiMessage::envelope()
+{
+    NM_FUNCTION;
+    return d->envelope();
+}
+
+/*!
+ \fn setPlainTextContent 
+ \param textContent Content.
+ 
+ Setter for plain text content.
+ */
+void NmApiMessage::setPlainTextContent(NmApiTextContent &textContent)
+{
+    NM_FUNCTION;
+    d->setPlainTextContent(textContent);
+}
+
+/*!
+ \fn setHtmlContent 
+ \param textContent Content.
+ 
+ Setter for html text content.
+ */
+void NmApiMessage::setHtmlContent(NmApiTextContent &textContent)
+{
+    NM_FUNCTION;
+    d->setHtmlContent(textContent);
+}
+
+/*!
+ \fn setComplete 
+ \param complete Complete state.
+ 
+ Setter for message complete state.
+ */
+void NmApiMessage::setComplete(bool complete)
+{
+    NM_FUNCTION;
+    d->setComplete(complete);
+}
+
+/*!
+ \fn setAttachments 
+ \param attachments Attachments.
+ 
+ Setter for set attachments to message.
+ */
+void NmApiMessage::setAttachments(QList<NmApiAttachment> &attachments)
+{
+    NM_FUNCTION;
+    d->setAttachments(attachments);
+}
+
+/*!
+ \fn setEnvelope 
+ \param envelope Envelope.
+ 
+ Setter for message envelope.
+ */
+void NmApiMessage::setEnvelope(NmApiMessageEnvelope &envelope)
+{
+    NM_FUNCTION;
+    d->setEnvelope(envelope);
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapimessage_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,173 @@
+/*
+ * 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:
+ *      Api's email message implementation.
+ */
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+/*!
+    Class constructor.
+*/
+NmApiMessagePrivate::NmApiMessagePrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+    Class destructor.
+*/
+NmApiMessagePrivate::~NmApiMessagePrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+ \fn plainTextContent 
+ \return Message plain text content.
+ 
+ Returns message plain text content.
+ */
+NmApiTextContent NmApiMessagePrivate::plainTextContent()
+{
+    NM_FUNCTION;
+    return mPlainTextContent;
+}
+
+/*!
+ \fn htmlContent 
+ \return Message html text content.
+ 
+ Returns message html text content.
+ */
+NmApiTextContent NmApiMessagePrivate::htmlContent()
+{
+    NM_FUNCTION;
+    return mHtmlContent;
+}
+
+/*!
+ \fn isComplete 
+ \return Message complete state.
+ 
+ Returns message complete state.
+ */
+bool NmApiMessagePrivate::isComplete()
+{
+    NM_FUNCTION;
+    return mComplete;
+}
+
+/*!
+ \fn getAttachments 
+ \return Message attachment list.
+ 
+ Returns message attachment list.
+ */
+QList<NmApiAttachment> NmApiMessagePrivate::attachments()
+{
+    NM_FUNCTION;
+    return mAttachments;
+}
+
+
+/*!
+ \fn addAttachment 
+ \param attachment Attachment.
+ 
+ Add attachment to message.
+ */
+void NmApiMessagePrivate::addAttachment(NmApiAttachment &attachment)
+{
+    NM_FUNCTION;
+    mAttachments.append(attachment);
+}
+
+/*!
+ \fn envelope 
+ \return Message envelope.
+ 
+ Returns message envelope.
+ */
+NmApiMessageEnvelope& NmApiMessagePrivate::envelope()
+{
+    NM_FUNCTION;
+    return mEnvelope;
+}
+
+/*!
+ \fn setPlainTextContent 
+ \param textContent Content.
+ 
+ Setter for plain text content.
+ */
+void NmApiMessagePrivate::setPlainTextContent(NmApiTextContent &textContent)
+{
+    NM_FUNCTION;
+    mPlainTextContent = textContent;
+}
+
+/*!
+ \fn setHtmlContent 
+ \param textContent Content.
+ 
+ Setter for html text content.
+ */
+void NmApiMessagePrivate::setHtmlContent(NmApiTextContent &textContent)
+{
+    NM_FUNCTION;
+    mHtmlContent = textContent;
+}
+
+/*!
+ \fn setComplete 
+ \param complete Complete state.
+ 
+ Setter for message complete state.
+ */
+void NmApiMessagePrivate::setComplete(bool complete)
+{
+    NM_FUNCTION;
+    mComplete = complete;
+}
+
+/*!
+ \fn setAttachments 
+ \param attachments Attachments.
+ 
+ Setter for set attachments to message.
+ */
+void NmApiMessagePrivate::setAttachments(QList<NmApiAttachment> &attachments)
+{
+    NM_FUNCTION;
+    mAttachments = attachments;
+    
+}
+
+/*!
+ \fn setEnvelope 
+ \param envelope Envelope.
+ 
+ Setter for message envelope.
+ */
+void NmApiMessagePrivate::setEnvelope(NmApiMessageEnvelope &envelope)
+{
+    NM_FUNCTION;
+    mEnvelope = envelope;
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapimessagecontent.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* 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:
+*       Email message content implementation.
+*/
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+/*!
+   Constructor for NmApiMessageContent
+ */
+NmApiMessageContent::NmApiMessageContent()
+{
+    NM_FUNCTION;
+    d = new NmApiMessageContentPrivate();
+}
+
+/*!
+   Destructor for NmApiMessageContent
+ */
+NmApiMessageContent::~NmApiMessageContent()
+{
+    NM_FUNCTION;
+}
+
+/*!
+   Getter for content type
+ */
+QString NmApiMessageContent::contentType() const
+{
+    NM_FUNCTION;
+    return d->contentType();
+}
+
+/*!
+   Getter for is complete
+ */
+bool NmApiMessageContent::isComplete()
+{
+    NM_FUNCTION;
+    return d->isComplete();
+}
+
+/*!
+   Getter for size
+ */
+quint32 NmApiMessageContent::size() const
+{
+    NM_FUNCTION;
+    return d->size();
+}
+
+/*!
+   Getter for id
+ */
+quint64 NmApiMessageContent::id() const
+{
+     NM_FUNCTION;
+     return d->id();
+}
+
+/*!
+   Setter for content type
+ */
+void NmApiMessageContent::setContentType(const QString &contentType)
+{
+    NM_FUNCTION;
+    d->setContentType(contentType);
+}
+
+/*!
+   Setter for is complete
+ */
+void NmApiMessageContent::setComplete(bool complete)
+{
+    NM_FUNCTION;
+    d->setComplete(complete);
+}
+
+/*!
+   Setter for size
+ */
+void NmApiMessageContent::setSize(quint32 size)
+{
+    NM_FUNCTION;
+    d->setSize(size);
+}
+
+/*!
+   Setter for id
+ */
+void NmApiMessageContent::setId(quint64 id)
+{
+    NM_FUNCTION;
+    d->setId(id);
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapimessagecontent_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,111 @@
+/*
+ * 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:
+ *      Email message content private implementation.
+ */
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+/*!
+   Constructor for NmApiMessageContentPrivate
+ */
+NmApiMessageContentPrivate::NmApiMessageContentPrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+   Destructor for NmApiMessageContentPrivate
+ */
+NmApiMessageContentPrivate::~NmApiMessageContentPrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+   Getter for content type
+ */
+QString NmApiMessageContentPrivate::contentType() const
+{
+    NM_FUNCTION;
+    return mContentType;
+}
+
+/*!
+   Getter for is complete
+ */
+bool NmApiMessageContentPrivate::isComplete()
+{
+    NM_FUNCTION;
+    return mComplete;
+}
+
+/*!
+   Getter for size
+ */
+quint32 NmApiMessageContentPrivate::size() const
+{
+    NM_FUNCTION;
+    return mSize;
+}
+
+/*!
+   Getter for id
+ */
+quint64 NmApiMessageContentPrivate::id() const
+{
+     NM_FUNCTION;
+     return mId;
+}
+
+/*!
+   Setter for content type
+ */
+void NmApiMessageContentPrivate::setContentType(const QString &contentType)
+{
+    NM_FUNCTION;
+    mContentType = contentType;
+}
+
+/*!
+   Setter for is complete
+ */
+void NmApiMessageContentPrivate::setComplete(bool complete)
+{
+    NM_FUNCTION;
+    mComplete = complete;
+}
+
+/*!
+   Setter for size
+ */
+void NmApiMessageContentPrivate::setSize(quint32 size)
+{
+    NM_FUNCTION;
+    mSize = size;
+}
+
+/*!
+   Setter for id
+ */
+void NmApiMessageContentPrivate::setId(quint64 id)
+{
+    NM_FUNCTION;
+    mId = id;
+}
+
+}
--- a/emailservices/nmclientapi/src/nmapimessageenvelope.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapimessageenvelope.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -21,6 +21,55 @@
 
 namespace EmailClientApi
 {
+
+/*!
+    getter for flags
+ */
+NmApiMessageFlags NmApiMessageEnvelopePrivate::flags() const
+{
+    NM_FUNCTION;
+    
+    return messageFlags;
+}
+
+/*!
+    setter for flags
+ */
+void NmApiMessageEnvelopePrivate::setFlags(const NmApiMessageFlags flags, bool set)
+{
+    NM_FUNCTION;
+    
+    if (set) {
+        messageFlags |= flags;
+    } else {
+        messageFlags &= ~flags;
+    }
+}
+
+/*!
+    setter for flag
+ */
+void NmApiMessageEnvelopePrivate::setFlag(const NmApiMessageFlag flag, bool set)
+{
+    NM_FUNCTION;
+    
+    if (set) {
+        messageFlags |= flag;
+    } else {
+        messageFlags &= ~flag;
+    }
+}
+
+/*!
+    getter for flag
+ */
+bool NmApiMessageEnvelopePrivate::isFlagSet(const NmApiMessageFlag flag) const
+{
+    NM_FUNCTION;
+    
+    return messageFlags.testFlag(flag);
+}
+
 /*!
    copying constructor for nmmessageenvelope
  */
@@ -96,6 +145,16 @@
 }
 
 /*!
+   getter for id of mailbox Id
+ */
+quint64 NmApiMessageEnvelope::mailboxId() const
+{
+    NM_FUNCTION;
+    
+    return d->mailboxId;
+}
+
+/*!
    getter for subject
  */
 QString NmApiMessageEnvelope::subject() const
@@ -136,6 +195,16 @@
 }
 
 /*!
+   getter for bcc recipients
+ */
+void NmApiMessageEnvelope::getBccRecipients(QList<EmailClientApi::NmApiEmailAddress> &bccRecipients)
+{
+    NM_FUNCTION;
+    
+    bccRecipients = d->bccRecipients;
+}
+
+/*!
    getter for sent time
  */
 QDateTime NmApiMessageEnvelope::sentTime() const
@@ -228,6 +297,16 @@
 }
 
 /*!
+   setter for mailbox id 
+ */
+void NmApiMessageEnvelope::setMailboxId(quint64 mailboxId)
+{
+    NM_FUNCTION;
+    
+    d->mailboxId = mailboxId;
+}
+
+/*!
    setter for subject 
  */
 void NmApiMessageEnvelope::setSubject(const QString &subject)
@@ -270,6 +349,17 @@
 }
 
 /*!
+   setter for bcc recipients 
+ */
+void NmApiMessageEnvelope::setBccRecipients(
+    const QList<EmailClientApi::NmApiEmailAddress> &bccRecipients)
+{
+    NM_FUNCTION;
+    
+    d->bccRecipients = bccRecipients;
+}
+
+/*!
    setter for sent time 
  */
 void NmApiMessageEnvelope::setSentTime(QDateTime sentTime)
@@ -388,5 +478,84 @@
     
     return d->fetchedSize;
 }
+
+/*!
+    setter for message priority
+ */
+void NmApiMessageEnvelope::setPriority(NmApiMessagePriority priority)
+{
+    NM_FUNCTION;
+    
+    if (priority == NmApiMessagePriorityLow) {
+        d->setFlag(NmApiMessageFlagLow, true);
+        d->setFlag(NmApiMessageFlagImportant, false);
+    }
+    else if (priority == NmApiMessagePriorityHigh) {
+        d->setFlag(NmApiMessageFlagLow, false);
+        d->setFlag(NmApiMessageFlagImportant, true);
+    }
+    else {
+        d->setFlag(NmApiMessageFlagLow, false);
+        d->setFlag(NmApiMessageFlagImportant, false);
+    }
+}
+
+/*!
+    getter for message priority
+ */
+NmApiMessagePriority NmApiMessageEnvelope::priority() const
+{
+    NM_FUNCTION;
+    
+    NmApiMessagePriority ret = NmApiMessagePriorityNormal;
+    if (d->isFlagSet(NmApiMessageFlagImportant)) {
+        ret = NmApiMessagePriorityHigh;
+    }
+    else if (d->isFlagSet(NmApiMessageFlagLow)) {
+        ret = NmApiMessagePriorityLow;
+    }
+    return ret;
 }
 
+/*!
+    Returns message flags
+ */
+NmApiMessageFlags NmApiMessageEnvelope::flags() const
+{
+    NM_FUNCTION;
+    
+    return d->flags();
+}
+
+/*!
+    Returns message flags
+ */
+void NmApiMessageEnvelope::setFlags(const NmApiMessageFlags flags, bool set)
+{
+    NM_FUNCTION;
+    
+    return d->setFlags(flags, set);
+}
+
+/*!
+    Returns message flags
+ */
+void NmApiMessageEnvelope::setFlag(const NmApiMessageFlag flag, bool set)
+{
+    NM_FUNCTION;
+    
+    return d->setFlag(flag, set);
+}
+
+/*!
+    Returns message flags
+ */
+bool NmApiMessageEnvelope::isFlagSet(const NmApiMessageFlag flag) const
+{
+    NM_FUNCTION;
+    
+    return d->isFlagSet(flag);
+}
+
+}
+
--- a/emailservices/nmclientapi/src/nmapimessagemanager.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapimessagemanager.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -27,14 +27,10 @@
 namespace EmailClientApi
 {
 
- NmApiMessageManager::NmApiMessageManager(quint64 mailboxId,QObject *parent)
+NmApiMessageManager::NmApiMessageManager(QObject *parent, quint64 mailboxId)
 	:QObject(parent)
 {
-	d = new NmApiMessageManagerPrivate(mailboxId,this);	
-	connect(d, SIGNAL(messagesCopied(int)),this,SIGNAL(messagesCopied(int)));
-	connect(d, SIGNAL(messagesCreated(int)),this,SIGNAL(messagesCreated(int)));
-	connect(d, SIGNAL(messagesMoved(int)),this,SIGNAL(messagesMoved(int)));
-	connect(d, SIGNAL(messagesDeleted(int)),this,SIGNAL(messagesDeleted(int)));	
+	d = new NmApiMessageManagerPrivate(this, mailboxId);
 }
 
 NmApiMessageManager::~NmApiMessageManager()
@@ -56,20 +52,22 @@
     // creates fw message
     // signaled with forwardMessageCreated(NmApiMessage *message,int result) 
     //    * ownership transferred
- bool NmApiMessageManager::createForwardMessage(const QVariant *initData)
+ bool NmApiMessageManager::createForwardMessage(NmApiMessage *orig,const QVariant *initData)
  {
     NM_FUNCTION;
     Q_UNUSED(initData);
+    Q_UNUSED(orig);
 	return false;
  }
     
     // creates reply message
     // signaled with replyMessageCreated(NmApiMessage *message,int result) 
     //    * ownership transferred
-bool NmApiMessageManager::createReplyMessage(const QVariant *initData,
-													bool replyAll)
+bool NmApiMessageManager::createReplyMessage(const NmApiMessage *orig,
+        const QVariant *initData,bool replyAll)
 {
     NM_FUNCTION;
+    Q_UNUSED(orig);
     Q_UNUSED(initData);
     Q_UNUSED(replyAll);
 	return false;
@@ -89,24 +87,12 @@
 									quint64 sourceFolderId,
 									quint64 targetFolderId)
 {    
-	return d->moveMessages(messageIds,sourceFolderId,targetFolderId);
-}
-
-/*!
- \fn copyMessages 
- \param messageIds Id list of source messages.
- \param sourceFolder Id of the source folder.
- \param targetFolder Id of the target folder.
- \return true if operation was successfully started.
- 
- Starts async copy operation for given messages.  
- Completion signalled with messagesCopied(int result).
- */
-bool NmApiMessageManager::copyMessages(const QList<quint64> messageIds,								
-									quint64 sourceFolder,
-									quint64 targetFolder)
-{
-	return d->copyMessages(messageIds, sourceFolder, targetFolder);
+    NM_FUNCTION;
+    Q_UNUSED(messageIds);
+    Q_UNUSED(sourceFolderId);
+    Q_UNUSED(targetFolderId);
+    return false;
+	//return d->moveMessages(messageIds,sourceFolderId,targetFolderId);
 }
     
 // signaled with messageSaved(quint64 messageId, int result)
@@ -126,15 +112,15 @@
     
     // starts fetching rest of message body from server
     // signaled with messageFetched(quint64 messageId, int result)
-bool NmApiMessageManager::fetch(const NmApiMessage &message)
+bool NmApiMessageManager::fetchMessage(quint64 messageId)
 {
-    Q_UNUSED(message);
+    Q_UNUSED(messageId);
 	return false;
 }
     
     // moves message to outbox. Actual sending time may be immediate or scheduled
     // signaled with messageSent(quint64 messageId, int result)
-bool NmApiMessageManager::send(const NmApiMessage &message)
+bool NmApiMessageManager::sendMessage(const NmApiMessage &message)
 {
     Q_UNUSED(message);
 	return false;
@@ -143,7 +129,7 @@
 // creates new attachment for a message. Currently attachment can be specified as file name (attachmentSpec is QString)
 // signaled with attachmentCreated(quint64 attachemntId)
 //  * 
-bool NmApiMessageManager::createAttachment(NmApiEmailMessage &message,
+bool NmApiMessageManager::createAttachment(NmApiMessage &message,
 										const QVariant &attachmenSpec)
 {
     Q_UNUSED(message);
@@ -153,10 +139,19 @@
                                                       
 // removes attachment from a message
 // signaled with attachmentRemoved(int result)
-bool NmApiMessageManager::removeAttachment(NmApiEmailMessage &message,
-quint64 /*attachmentId*/)
+bool NmApiMessageManager::removeAttachment(NmApiMessage &message,
+quint64 attachmentId)
 {    
     Q_UNUSED(message);
+    Q_UNUSED(attachmentId);
+    return false;
+}
+
+bool NmApiMessageManager::fetchAttachment(const NmApiMessage &relatedMessage,
+        quint64 attachmentId)
+{
+    Q_UNUSED(relatedMessage);
+    Q_UNUSED(attachmentId);
     return false;
 }
  
--- a/emailservices/nmclientapi/src/nmapimessagemanager_p.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapimessagemanager_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -21,7 +21,7 @@
 namespace EmailClientApi
 {
 
-NmApiMessageManagerPrivate::NmApiMessageManagerPrivate(quint64 mailboxId,QObject *parent)
+NmApiMessageManagerPrivate::NmApiMessageManagerPrivate(QObject *parent,quint64 mailboxId)
 : QObject(parent),
   mState(NmApiMessageManagerPrivate::EIdle), mMailboxId(mailboxId)
 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapimessagesearch.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,91 @@
+/*
+ * 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:
+ *      Email messages search implementation.
+ */
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+NmApiMessageSearch::NmApiMessageSearch(QObject *parent, quint64 mailboxId) :
+    NmApiMessageTask(parent)
+{
+    NM_FUNCTION;
+    d = new NmApiMessageSearchPrivate(mailboxId, this);
+    qRegisterMetaType<NmApiMessage> ("EmailClientApi::NmApiMessage");
+    connect(d, SIGNAL(messageFound(EmailClientApi::NmApiMessage&)), this, SIGNAL(messageFound(EmailClientApi::NmApiMessage&)));
+    connect(d, SIGNAL(searchComplete(int)), this, SIGNAL(searchComplete(int)));
+    connect(d, SIGNAL(canceled()), this, SIGNAL(canceled()));
+}
+
+NmApiMessageSearch::~NmApiMessageSearch()
+{
+    NM_FUNCTION;
+}
+
+/*!
+ \fn start 
+ \return true if operation was started otherwise returns false.
+ 
+ Starts search operation for given criterias if operation is not running. Only one search can be performed at a time. 
+ Each found message signaled with messageFound(NmApiMessage &message).
+ Search completed signaled with searchComplete(int result).
+ Cancellation signalled with canceled().
+ */
+bool NmApiMessageSearch::start()
+{
+    NM_FUNCTION;
+    return d->start();
+}
+
+/*!
+ \fn cancel 
+ 
+ Cancels current search operation and reset criterias. If operation is not running, nothing happens except criterias are reset.  
+ Cancellation signalled with canceled().
+ */
+void NmApiMessageSearch::cancel()
+{
+    NM_FUNCTION;
+    d->cancel();
+}
+
+/*!
+ \fn initialise 
+ \param searchStrings List of search criteria strings.
+ \param sortCriteria Sort criteria for search.
+ \return true if initializing is successfully competed otherwise returns false.
+ 
+ Initialize search criterias.  
+ */
+bool NmApiMessageSearch::initialise(const QList<QString> &searchStrings, NmApiMailSortCriteria sortCriteria)
+{
+    NM_FUNCTION;
+    return d->initialise(searchStrings, sortCriteria);
+}
+
+/*!
+ \fn isRunning 
+ \return true if search operation is running otherwise returns false.
+ 
+ Returns information about search operation running.
+ */
+bool NmApiMessageSearch::isRunning() const
+{
+    NM_FUNCTION;
+    return d->isRunning();
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapimessagesearch_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,233 @@
+/*
+* 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:
+*       Email messages search private implementation.
+*/ 
+
+#include "nmapiheaders.h"
+
+/*!
+    \class NmApiMessageSearchPrivate
+    \brief A Qt wrapper class for MFSMailBoxSearchObserver.
+*/
+
+/*!
+    Class constructor.
+*/
+NmApiMessageSearchPrivate::NmApiMessageSearchPrivate(const quint64 mailboxId, QObject *parent) 
+: QObject(parent), 
+  mMailBox(NULL),
+  mIsRunning(false),
+  mEngine(NULL)
+{
+    NM_FUNCTION;
+    NmId mailBoxId(mailboxId);
+    mMailBoxId = TFSMailMsgId(mailBoxId);
+    mEngine = NmApiEngine::instance();
+}
+
+/*!
+    Class destructor.
+*/
+NmApiMessageSearchPrivate::~NmApiMessageSearchPrivate()
+{
+    NM_FUNCTION;
+    
+    mSearchStrings.ResetAndDestroy();
+
+    if (isRunning()) {
+        cancel();
+    }
+
+    if (mMailBox){
+        delete mMailBox;
+        mMailBox = NULL;
+    }
+    
+    NmApiEngine::releaseInstance(mEngine);
+}
+
+/*!
+ \fn isRunning 
+ \return true if search operation is running otherwise returns false.
+ 
+ Returns information about search operation running.
+ */
+bool NmApiMessageSearchPrivate::isRunning() const
+{
+    return mIsRunning;
+}
+
+/*!
+ \fn start 
+ \return true if operation was started otherwise returns false.
+ 
+ Starts search operation for given criterias if operation is not running. Only one search can be performed at a time. 
+ Each found message signaled with messageFound(NmApiMessage &message).
+ Search completed signaled with searchComplete(int result).
+ Cancellation signalled with canceled().
+ */
+bool NmApiMessageSearchPrivate::start()
+{
+    NM_FUNCTION;
+    
+    bool ret = false;
+
+    if (!isRunning() && mSearchStrings.Count() > 0) {
+        if (!mMailBox) {
+            initialiseMailbox();
+        }
+        
+        if (mMailBox) {
+            TRAPD(err, mMailBox->SearchL(mSearchStrings, mSortCriteria, *this));
+            if (err == KErrNone) {
+                mIsRunning = true;
+                ret = true;
+            }
+        }
+    }
+ 
+    return ret;
+}
+
+/*!
+    From MFSMailBoxSearchObserver.
+    Converts the ID of the received message into NmId and emits it with the
+    signal notifying that a match was found.
+
+    \param aMatchMessage A message that matches the search criteria. This class
+                         takes the ownership of the given instance.
+*/
+void NmApiMessageSearchPrivate::MatchFoundL(CFSMailMessage *aMatchMessage)
+{
+    NM_FUNCTION;
+    
+    if (aMatchMessage) {
+        NmMessage *nmmessage = aMatchMessage->GetNmMessage();
+        EmailClientApi::NmApiMessage message = NmToApiConverter::NmMessage2NmApiMessage(*nmmessage);
+        emit messageFound(message);
+        delete aMatchMessage;
+        aMatchMessage = NULL;
+     }
+}
+
+
+/*!
+    From MFSMailBoxSearchObserver.
+    Emits a signal to notify that the search is complete.
+*/
+void NmApiMessageSearchPrivate::SearchCompletedL()
+{
+    NM_FUNCTION;
+    mIsRunning = false;
+    emit searchComplete(EmailClientApi::NmApiNoError); 
+}
+
+
+/*!
+    From MFSMailBoxSearchObserver.
+*/
+void NmApiMessageSearchPrivate::ClientRequiredSearchPriority(
+    TInt *apRequiredSearchPriority)
+{
+    Q_UNUSED(apRequiredSearchPriority);
+}
+
+/*!
+ \fn cancel 
+ 
+ Cancels current search operation. If operation is not running, nothing happens.  
+ Cancellation signalled with canceled().
+ */
+void NmApiMessageSearchPrivate::cancel()
+{
+    NM_FUNCTION;
+    
+    if (isRunning()){
+        if (mMailBox) {
+            mMailBox->CancelSearch();
+            mMailBox->ClearSearchResultCache();
+
+            mSearchStrings.ResetAndDestroy();
+            mSortCriteria.iField = EFSMailDontCare;
+            mSortCriteria.iOrder = EFSMailAscending;
+            mIsRunning = false;
+            emit canceled();
+        }
+    }
+}
+
+/*!
+ \fn initialise 
+ \param searchStrings List of search criteria strings.
+ \param sortCriteria Sort criteria for search.
+ \return true if initializing is successfully completed otherwise returns false.
+ 
+ Initialize search criterias.  
+ */
+bool NmApiMessageSearchPrivate::initialise(const QList<QString> &searchStrings, EmailClientApi::NmApiMailSortCriteria sortCriteria)
+{
+    NM_FUNCTION;
+    bool ret = false;
+
+    if (!isRunning() && searchStrings.count() > 0) {
+        bool appendError = false;
+        mSortCriteria.iField = TFSMailSortField(sortCriteria.iField);
+        mSortCriteria.iOrder = TFSMailSortOrder(sortCriteria.iOrder);
+       
+        mSearchStrings.ResetAndDestroy();
+        
+        for (int i = 0; i < searchStrings.count() && !appendError; ++i) {
+            HBufC *buffer = XQConversions::qStringToS60Desc(searchStrings.at(i));
+            TRAPD(err, mSearchStrings.AppendL(buffer));
+            if (err != KErrNone) {
+                appendError = true;
+            }
+        }
+        
+        if (!appendError) {
+            ret = true;
+        }
+        else {
+            mSearchStrings.ResetAndDestroy();
+        }
+    }
+    
+    return ret;
+}
+
+/*!
+ \fn initialiseMailbox 
+ 
+ Initializes mailbox.  
+ */
+void NmApiMessageSearchPrivate::initialiseMailbox()
+{
+    NM_FUNCTION;
+    RPointerArray<CFSMailPlugin> mailPlugins;
+    if (mEngine) {
+        mEngine->listMailPlugins(mailPlugins);
+    }
+    CFSMailPlugin *plugin = NULL;
+    for (int i = 0; i < mailPlugins.Count() && !mMailBox; i++){
+        plugin = mailPlugins[i];
+        if (plugin) {
+            QT_TRY {
+                mMailBox = plugin->GetMailBoxByUidL(mMailBoxId);
+            }
+            QT_CATCH(...){}            
+        }
+    }
+}
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapitextcontent.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,58 @@
+/*
+ * 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:
+ *      Email message text content implementation.
+ */
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+/*!
+    Class constructor.
+*/
+NmApiTextContent::NmApiTextContent()
+{
+    NM_FUNCTION;
+    d = new NmApiTextContentPrivate();
+}
+
+/*!
+    Class destructor.
+*/
+NmApiTextContent::~NmApiTextContent()
+{
+    NM_FUNCTION;
+}
+
+/*!
+   Getter for content
+ */
+QString NmApiTextContent::content() const
+{
+    NM_FUNCTION;
+    return d->content();
+}
+
+/*!
+   Setter for content
+ */
+void NmApiTextContent::setContent(const QString &content)
+{
+    NM_FUNCTION;
+    d->setContent(content);
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapitextcontent_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,57 @@
+/*
+ * 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:
+ *      Email message text content private implementation.
+ */
+
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+/*!
+    Class constructor.
+*/
+NmApiTextContentPrivate::NmApiTextContentPrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+    Class destructor.
+*/
+NmApiTextContentPrivate::~NmApiTextContentPrivate()
+{
+    NM_FUNCTION;
+}
+
+/*!
+   Getter for content
+ */
+QString NmApiTextContentPrivate::content() const
+{
+    NM_FUNCTION;
+    return mContent;
+}
+
+/*!
+   Setter for content
+ */
+void NmApiTextContentPrivate::setContent(const QString &content)
+{
+    NM_FUNCTION;
+    mContent = content;
+}
+
+}
--- a/emailservices/nmclientapi/src/nmapitypesconverter.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapitypesconverter.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -60,11 +60,14 @@
     
     QList<NmAddress> to = envelope.toRecipients();
     QList<NmAddress> cc = envelope.ccRecipients();
+    QList<NmAddress> bcc = envelope.bccRecipients();
     QList<EmailClientApi::NmApiEmailAddress> to_api = NmAddress2QString(to);
     QList<EmailClientApi::NmApiEmailAddress> cc_api = NmAddress2QString(cc);
+    QList<EmailClientApi::NmApiEmailAddress> bcc_api = NmAddress2QString(bcc);
 
     api_env.setToRecipients(to_api);
     api_env.setCcRecipients(cc_api);
+    api_env.setBccRecipients(bcc_api);
 
     api_env.setHasAttachments(envelope.hasAttachments());
     api_env.setId(envelope.messageId().id());
@@ -76,6 +79,8 @@
     api_env.setSender(envelope.sender().address());
     api_env.setSentTime(envelope.sentTime());
     api_env.setSubject(envelope.subject());
+    api_env.setMailboxId(envelope.messageId().id());
+    api_env.setFlags(static_cast<EmailClientApi::NmApiMessageFlags>(static_cast<int>(envelope.flags())), true);
 
     return api_env;
 }
@@ -100,3 +105,55 @@
     return nmAddresses;
 }
 
+/*!
+   converts nmmessage to client api NmApiMessage
+ */
+EmailClientApi::NmApiMessage NmToApiConverter::NmMessage2NmApiMessage(NmMessage &message)
+{
+    NM_FUNCTION;
+    
+    EmailClientApi::NmApiMessage api_message;
+    QList<NmMessagePart*> attachments;
+    message.attachmentList(attachments);
+
+    if (attachments.size() > 0){
+        QList<EmailClientApi::NmApiAttachment> api_attachments; 
+        for (int i = 0; i < attachments.size(); i++){
+            NmMessagePart *part = attachments.at(i);
+            if (part->contentType().compare(EmailClientApi::NmApiContentTypeTextPlain) != 0 && 
+                part->contentType().compare(EmailClientApi::NmApiContentTypeTextHtml) != 0) {
+                EmailClientApi::NmApiAttachment api_attachment;
+                api_attachment.setFileName(part->attachmentName());
+                api_attachment.setId(part->partId().id());
+                api_attachment.setContentType(part->contentType());
+                api_attachment.setSize(part->size());
+                api_attachments.append(api_attachment);
+            }
+        }
+        api_message.setAttachments(api_attachments);
+    }
+    
+    EmailClientApi::NmApiMessageEnvelope api_envelope = NmMessageEnvelope2NmApiMessageEnvelope(message.envelope());
+    api_message.setEnvelope(api_envelope);
+    const NmMessagePart *plaintext = message.plainTextBodyPart();
+    if (plaintext) {
+        EmailClientApi::NmApiTextContent api_plaintext;
+        api_plaintext.setContent(plaintext->textContent());
+        api_plaintext.setId(plaintext->partId().id());
+        api_plaintext.setContentType(plaintext->contentType());
+        api_plaintext.setSize(plaintext->size());
+        api_message.setPlainTextContent(api_plaintext);
+    }
+    
+    const NmMessagePart *htmlcontent = message.htmlBodyPart();
+    if (htmlcontent) {
+        EmailClientApi::NmApiTextContent api_htmlcontent;
+        api_htmlcontent.setContent(htmlcontent->textContent());
+        api_htmlcontent.setId(htmlcontent->partId().id());
+        api_htmlcontent.setContentType(htmlcontent->contentType());
+        api_htmlcontent.setSize(htmlcontent->size());
+        api_message.setHtmlContent(api_htmlcontent);
+    }
+    
+    return api_message;
+}
--- a/emailservices/nmregister/nmregister.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmregister/nmregister.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -38,6 +38,7 @@
 BLD_INF_RULES.prj_exports += "rom/nmregister.iby		CORE_APP_LAYER_IBY_EXPORT_PATH(nmregister.iby)"
 BLD_INF_RULES.prj_exports += "rom/nmregisterlanguage.iby 		LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(nmregisterlanguage.iby)"
 TARGET.EPOCALLOWDLLDATA = 1
+MMP_RULES += SMPSAFE
 }
 
 TARGET.CAPABILITY = ALL -TCB
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmregister/nmregisterinstaller/nmregisterinstaller.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* 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:
+*
+*/
+
+#include <qservicemanager.h>
+#include <QCoreApplication>
+#include <QFile>
+
+QTM_USE_NAMESPACE
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication app(argc, argv);
+
+    QServiceManager manager;
+
+    if (QFile::exists("c:/private/2002DD16/import/nmregister.xml")) {
+        manager.removeService("nmregister");
+        manager.addService("c:/private/2002DD16/import/nmregister.xml");
+    } else {
+        manager.removeService("nmregister");
+    }  
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmregister/nmregisterinstaller/nmregisterinstaller.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,29 @@
+#
+# 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
+
+QT = core
+CONFIG += no_icon
+
+CONFIG += mobility
+MOBILITY = serviceframework
+
+SOURCES += nmregisterinstaller.cpp
+
+symbian {    
+    TARGET.CAPABILITY = ALL -TCB
+}
--- a/emailservices/nmutilities/bwins/nmutilitiesu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmutilities/bwins/nmutilitiesu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -20,4 +20,47 @@
 	?metaObject@NmUiEventsNotifier@@UBEPBUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const * NmUiEventsNotifier::metaObject(void) const
 	?parseKeyValue@NmUiEventsNotifier@@ABE_NABVQByteArray@@AAW4NmUiEventType@1@AAW4NmUiViewId@@AAVNmId@@@Z @ 20 NONAME ; bool NmUiEventsNotifier::parseKeyValue(class QByteArray const &, enum NmUiEventsNotifier::NmUiEventType &, enum NmUiViewId &, class NmId &) const
 	?keysEqual@NmUiEventsNotifier@@ABE_NABVXQSettingsKey@@ABVXQPublishAndSubscribeSettingsKey@@@Z @ 21 NONAME ; bool NmUiEventsNotifier::keysEqual(class XQSettingsKey const &, class XQPublishAndSubscribeSettingsKey const &) const
+	?tr@NmContactHistoryModel@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString NmContactHistoryModel::tr(char const *, char const *)
+	?qt_metacall@NmContactHistoryModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 23 NONAME ; int NmContactHistoryModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?writeEntry@EmailMRU@@AAE_NHVQString@@0@Z @ 24 NONAME ; bool EmailMRU::writeEntry(int, class QString, class QString)
+	?handleQueryCompleted@NmContactHistoryModel@@AAEXH@Z @ 25 NONAME ; void NmContactHistoryModel::handleQueryCompleted(int)
+	?tr@NmContactHistoryModel@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString NmContactHistoryModel::tr(char const *, char const *, int)
+	??0EmailMRU@@QAE@XZ @ 27 NONAME ; EmailMRU::EmailMRU(void)
+	?writeCenRep@EmailMRU@@AAE_NHVQString@@@Z @ 28 NONAME ; bool EmailMRU::writeCenRep(int, class QString)
+	?subItemAt@NmContactHistoryModelItem@@QBE?AVNmContactHistoryModelSubItem@@H@Z @ 29 NONAME ; class NmContactHistoryModelSubItem NmContactHistoryModelItem::subItemAt(int) const
+	?getStaticMetaObject@NmContactHistoryModel@@SAABUQMetaObject@@XZ @ 30 NONAME ; struct QMetaObject const & NmContactHistoryModel::getStaticMetaObject(void)
+	?updateMRU@EmailMRU@@QAE_NVQString@@0@Z @ 31 NONAME ; bool EmailMRU::updateMRU(class QString, class QString)
+	?staticMetaObject@NmContactHistoryModel@@2UQMetaObject@@B @ 32 NONAME ; struct QMetaObject const NmContactHistoryModel::staticMetaObject
+	?addressKeyByEntryIndex@EmailMRU@@CAHH@Z @ 33 NONAME ; int EmailMRU::addressKeyByEntryIndex(int)
+	?contactId@NmContactHistoryModelItem@@QBEIXZ @ 34 NONAME ; unsigned int NmContactHistoryModelItem::contactId(void) const
+	?query@NmContactHistoryModel@@QAEXABVQString@@@Z @ 35 NONAME ; void NmContactHistoryModel::query(class QString const &)
+	?moveEntry@EmailMRU@@AAEXHH@Z @ 36 NONAME ; void EmailMRU::moveEntry(int, int)
+	?trUtf8@NmContactHistoryModel@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString NmContactHistoryModel::trUtf8(char const *, char const *, int)
+	?metaObject@NmContactHistoryModel@@UBEPBUQMetaObject@@XZ @ 38 NONAME ; struct QMetaObject const * NmContactHistoryModel::metaObject(void) const
+	??1NmContactHistoryModelItem@@QAE@XZ @ 39 NONAME ; NmContactHistoryModelItem::~NmContactHistoryModelItem(void)
+	??_ENmContactHistoryModel@@UAE@I@Z @ 40 NONAME ; NmContactHistoryModel::~NmContactHistoryModel(unsigned int)
+	?reset@EmailMRU@@QAEXXZ @ 41 NONAME ; void EmailMRU::reset(void)
+	?appendSubItem@NmContactHistoryModelItem@@QAEXVNmContactHistoryModelSubItem@@@Z @ 42 NONAME ; void NmContactHistoryModelItem::appendSubItem(class NmContactHistoryModelSubItem)
+	?getEntry@EmailMRU@@QAE_NHAAVQString@@0@Z @ 43 NONAME ; bool EmailMRU::getEntry(int, class QString &, class QString &)
+	?updateEntry@EmailMRU@@AAE_NHVQString@@@Z @ 44 NONAME ; bool EmailMRU::updateEntry(int, class QString)
+	?readCenRep@EmailMRU@@AAE?AVQString@@H@Z @ 45 NONAME ; class QString EmailMRU::readCenRep(int)
+	?searchForAddress@EmailMRU@@AAEHVQString@@@Z @ 46 NONAME ; int EmailMRU::searchForAddress(class QString)
+	?subEntries@NmContactHistoryModelItem@@QBE?AV?$QList@VNmContactHistoryModelSubItem@@@@XZ @ 47 NONAME ; class QList<class NmContactHistoryModelSubItem> NmContactHistoryModelItem::subEntries(void) const
+	??1NmContactHistoryModel@@UAE@XZ @ 48 NONAME ; NmContactHistoryModel::~NmContactHistoryModel(void)
+	?getNextEntryIndex@EmailMRU@@AAEIXZ @ 49 NONAME ; unsigned int EmailMRU::getNextEntryIndex(void)
+	?trUtf8@NmContactHistoryModel@@SA?AVQString@@PBD0@Z @ 50 NONAME ; class QString NmContactHistoryModel::trUtf8(char const *, char const *)
+	??0NmContactHistoryModelItem@@QAE@ABV0@@Z @ 51 NONAME ; NmContactHistoryModelItem::NmContactHistoryModelItem(class NmContactHistoryModelItem const &)
+	?entryCount@EmailMRU@@QBEIXZ @ 52 NONAME ; unsigned int EmailMRU::entryCount(void) const
+	?nameKeyByEntryIndex@EmailMRU@@CAHH@Z @ 53 NONAME ; int EmailMRU::nameKeyByEntryIndex(int)
+	?setContactId@NmContactHistoryModelItem@@QAEXI@Z @ 54 NONAME ; void NmContactHistoryModelItem::setContactId(unsigned int)
+	??0NmContactHistoryModelItem@@QAE@XZ @ 55 NONAME ; NmContactHistoryModelItem::NmContactHistoryModelItem(void)
+	?rowCount@NmContactHistoryModel@@UBEHABVQModelIndex@@@Z @ 56 NONAME ; int NmContactHistoryModel::rowCount(class QModelIndex const &) const
+	?data@NmContactHistoryModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 57 NONAME ; class QVariant NmContactHistoryModel::data(class QModelIndex const &, int) const
+	?entryIndex@EmailMRU@@CAHH@Z @ 58 NONAME ; int EmailMRU::entryIndex(int)
+	?qt_metacast@NmContactHistoryModel@@UAEPAXPBD@Z @ 59 NONAME ; void * NmContactHistoryModel::qt_metacast(char const *)
+	?subItemCount@NmContactHistoryModelItem@@QBEHXZ @ 60 NONAME ; int NmContactHistoryModelItem::subItemCount(void) const
+	??0NmContactHistoryModel@@QAE@W4NmContactHistoryModelType@@@Z @ 61 NONAME ; NmContactHistoryModel::NmContactHistoryModel(enum NmContactHistoryModelType)
+	??1EmailMRU@@QAE@XZ @ 62 NONAME ; EmailMRU::~EmailMRU(void)
+	?modelCompleted@NmContactHistoryModel@@IAEXH@Z @ 63 NONAME ; void NmContactHistoryModel::modelCompleted(int)
+	?nameOrder@EmailMRU@@SAHXZ @ 64 NONAME ; int EmailMRU::nameOrder(void)
 
Binary file emailservices/nmutilities/data/2003EA97.txt has changed
--- a/emailservices/nmutilities/eabi/nmutilitiesu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmutilities/eabi/nmutilitiesu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -22,4 +22,52 @@
 	_ZNK18NmUiEventsNotifier9keysEqualERK13XQSettingsKeyRK32XQPublishAndSubscribeSettingsKey @ 21 NONAME
 	_ZTI18NmUiEventsNotifier @ 22 NONAME
 	_ZTV18NmUiEventsNotifier @ 23 NONAME
+	_ZN21NmContactHistoryModel11qt_metacallEN11QMetaObject4CallEiPPv @ 24 NONAME
+	_ZN21NmContactHistoryModel11qt_metacastEPKc @ 25 NONAME
+	_ZN21NmContactHistoryModel14modelCompletedEi @ 26 NONAME
+	_ZN21NmContactHistoryModel16staticMetaObjectE @ 27 NONAME DATA 16
+	_ZN21NmContactHistoryModel19getStaticMetaObjectEv @ 28 NONAME
+	_ZN21NmContactHistoryModel20handleQueryCompletedEi @ 29 NONAME
+	_ZN21NmContactHistoryModel5queryERK7QString @ 30 NONAME
+	_ZN21NmContactHistoryModelC1E25NmContactHistoryModelType @ 31 NONAME
+	_ZN21NmContactHistoryModelC2E25NmContactHistoryModelType @ 32 NONAME
+	_ZN21NmContactHistoryModelD0Ev @ 33 NONAME
+	_ZN21NmContactHistoryModelD1Ev @ 34 NONAME
+	_ZN21NmContactHistoryModelD2Ev @ 35 NONAME
+	_ZN25NmContactHistoryModelItem12setContactIdEj @ 36 NONAME
+	_ZN25NmContactHistoryModelItem13appendSubItemE28NmContactHistoryModelSubItem @ 37 NONAME
+	_ZN25NmContactHistoryModelItemC1ERKS_ @ 38 NONAME
+	_ZN25NmContactHistoryModelItemC1Ev @ 39 NONAME
+	_ZN25NmContactHistoryModelItemC2ERKS_ @ 40 NONAME
+	_ZN25NmContactHistoryModelItemC2Ev @ 41 NONAME
+	_ZN25NmContactHistoryModelItemD1Ev @ 42 NONAME
+	_ZN25NmContactHistoryModelItemD2Ev @ 43 NONAME
+	_ZN8EmailMRU10entryIndexEi @ 44 NONAME
+	_ZN8EmailMRU10readCenRepEi @ 45 NONAME
+	_ZN8EmailMRU10writeEntryEi7QStringS0_ @ 46 NONAME
+	_ZN8EmailMRU11updateEntryEi7QString @ 47 NONAME
+	_ZN8EmailMRU11writeCenRepEi7QString @ 48 NONAME
+	_ZN8EmailMRU16searchForAddressE7QString @ 49 NONAME
+	_ZN8EmailMRU17getNextEntryIndexEv @ 50 NONAME
+	_ZN8EmailMRU19nameKeyByEntryIndexEi @ 51 NONAME
+	_ZN8EmailMRU22addressKeyByEntryIndexEi @ 52 NONAME
+	_ZN8EmailMRU5resetEv @ 53 NONAME
+	_ZN8EmailMRU8getEntryEiR7QStringS1_ @ 54 NONAME
+	_ZN8EmailMRU9moveEntryEii @ 55 NONAME
+	_ZN8EmailMRU9nameOrderEv @ 56 NONAME
+	_ZN8EmailMRU9updateMRUE7QStringS0_ @ 57 NONAME
+	_ZN8EmailMRUC1Ev @ 58 NONAME
+	_ZN8EmailMRUC2Ev @ 59 NONAME
+	_ZN8EmailMRUD1Ev @ 60 NONAME
+	_ZN8EmailMRUD2Ev @ 61 NONAME
+	_ZNK21NmContactHistoryModel10metaObjectEv @ 62 NONAME
+	_ZNK21NmContactHistoryModel4dataERK11QModelIndexi @ 63 NONAME
+	_ZNK21NmContactHistoryModel8rowCountERK11QModelIndex @ 64 NONAME
+	_ZNK25NmContactHistoryModelItem10subEntriesEv @ 65 NONAME
+	_ZNK25NmContactHistoryModelItem12subItemCountEv @ 66 NONAME
+	_ZNK25NmContactHistoryModelItem9contactIdEv @ 67 NONAME
+	_ZNK25NmContactHistoryModelItem9subItemAtEi @ 68 NONAME
+	_ZNK8EmailMRU10entryCountEv @ 69 NONAME
+	_ZTI21NmContactHistoryModel @ 70 NONAME
+	_ZTV21NmContactHistoryModel @ 71 NONAME
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/inc/emailmru.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2007-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:  Object for accessing most recent used email addresses and
+ * display names.
+ *
+ */
+
+#ifndef EMAILMRU_H_
+#define EMAILMRU_H_
+
+#include <QString>
+#include "emailutilitiesdef.h"
+
+class XQSettingsManager;
+
+
+/*!
+     Key to MRU repository
+ */
+static const qint32 emailMruRepositoryKey = 0x2003EA97;
+
+/*!
+     Where to find the cenrep-index of the newest saved entry
+ */
+static const qint32 currentIndexKey = 0;
+
+/*!
+     Where to find the number of entries
+ */
+static const qint32 countKey = 1;
+
+/*!
+     Key to contacts central repository
+ */
+static const qint32 contactsRepositoryKey = 0x2002FF54;
+
+/*!
+     Setting for name ordering.
+ */
+static const qint32 nameOrderKey = 0x1;
+
+/*!
+     How many entries are kept in MRU repository
+ */
+static const qint32 emailAddressHistorySize = 300;
+
+class EMAIL_UTILITIES_EXPORT EmailMRU
+{
+public:
+
+    EmailMRU();
+
+    ~EmailMRU();
+
+    bool updateMRU(QString displayName, QString emailAddress);
+
+    quint32 entryCount() const;
+
+    bool getEntry(qint32 entryIndex, QString &displayName, QString &address);
+
+    void reset();
+
+    static int nameOrder();
+
+private:
+
+    quint32 getNextEntryIndex();
+
+    bool writeCenRep(qint32 index, QString value);
+
+    QString readCenRep(qint32 index);
+
+    qint32 searchForAddress(QString address);
+
+    static qint32 entryIndex(qint32 crKey);
+
+    static qint32 addressKeyByEntryIndex(qint32 entryIndex);
+
+    static qint32 nameKeyByEntryIndex(qint32 entryIndex);
+
+    void moveEntry(qint32 oldEntryIndex, qint32 newEntryIndex);
+
+    bool writeEntry(qint32 entryIndex, QString displayName, QString emailAddress);
+
+    bool updateEntry(qint32 entryIndex, QString newDisplayName);
+
+private:
+
+    /*!
+        Points to the latest saved entry
+     */
+    qint32 mLatestIndex;
+
+    /*!
+        Pointer to central repository manager
+     */
+    XQSettingsManager* mRepositoryManager;
+
+    /*!
+        Number of entries
+     */
+    quint32 mCount;
+
+};
+
+
+#endif // EMAILMRU_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/inc/nmcontacthistorymodel_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* 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: Private declaration of Contact History Model API
+*
+*/
+
+#ifndef NMCONTACTHISTORYMODELPRIVATE_H
+#define NMCONTACTHISTORYMODELPRIVATE_H
+
+#include <QObject>
+#include <QSharedData>
+#include <qtcontacts.h>
+
+#include "nmcontacthistorymodel.h"
+
+QTM_USE_NAMESPACE
+
+class NmContactHistoryModelItemData : public QSharedData
+{
+public:
+
+NmContactHistoryModelItemData() :
+    mContactId(0xDEAD)
+{
+
+}
+
+~NmContactHistoryModelItemData()
+{
+    mItems.clear();
+}
+
+    unsigned int mContactId;
+    QList<NmContactHistoryModelSubItem> mItems;
+};
+
+class NmContactHistoryModelPrivate : public QObject
+{
+
+    enum nameOrder 
+    {
+        LastNameFirstName = 0x0,
+        LastNameCommaFirstName = 0x1,
+        FirstNameLastName = 0x2
+    };
+
+Q_OBJECT
+
+public:
+
+    NmContactHistoryModelPrivate(const NmContactHistoryModelType modelType);
+    ~NmContactHistoryModelPrivate();
+
+signals:
+
+    void queryCompleted(int err);
+
+private:
+
+    void queryDatabases(const QString &query);
+
+    // Helper functions that are used by queryDatabases();
+    bool queryMruDatabase(const QString &query);
+    QList<QContactLocalId> queryContactDatabase(const QString &query);
+
+    void populateListWithMruItems(const QString &query);
+
+    void populateListWithContactItems(const QList<QContactLocalId> cnt_ids,
+                                      const QString &query);
+
+
+    int rowCount(const QModelIndex &parent) const;
+    QVariant data(const QModelIndex &index, int role) const;
+    void refreshDataModel();
+
+    bool fillMruMatchList();
+    QString obeyContactOrder(const QString &firstName, const QString &lastName);
+
+private:
+
+    // Member variables
+    NmContactHistoryModelType mType;
+    QList<NmContactHistoryModelItem> mModelItemList;
+    QList< QSharedPointer<NmContactHistoryModelItemData> > mPrivateItemList;
+    QContactManager *mContactManager;
+    QHash<QString, QString> mMruList;
+    QMap<QString, QString> mMruMatches;
+    bool mModelReady;
+    TUint32 mNameOrder;
+
+private:  // Friend definitions
+
+    friend class NmContactHistoryModel;
+    friend class TestNmContactHistoryModelPrivate;
+};
+
+#endif //NMCONTACTHISTORYMODELPRIVATE_H
--- a/emailservices/nmutilities/nmutilities.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailservices/nmutilities/nmutilities.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -20,18 +20,22 @@
 TEMPLATE = lib
 TARGET = nmutilities
 QT += core
-DEFINES += BUILD_UTILITIES_DLL
+DEFINES += BUILD_UTILITIES_DLL \
+           NMCHMAPI_LIBRARY
 
 CONFIG += mobility
-MOBILITY += systeminfo
+MOBILITY += systeminfo \
+            contacts
 
 INCLUDEPATH += inc \
+               ../../email_plat/contact_history_model_api \
                ../../inc \
                ../../../inc \
                $$MW_LAYER_SYSTEMINCLUDE
 
 DEPENDPATH += src \
               inc \
+              ../../email_plat/contact_history_model_api \
               ../../../inc 
 
 MOC_DIR = tmp
@@ -40,12 +44,20 @@
              emailutilitiesdef.h \
              emailmailboxinfo_p.h \
              emailmailboxinfo.h \
+             emailmru.h \
              nmuieventsnotifier.h \
-             nmutilitiescommonheaders.h
+             nmutilitiescommonheaders.h \
+             nmcontacthistorymodel_p.h \
+             inc/nmcontacthistorymodelcommon.h \
+             inc/nmcontacthistorymodel.h
              
 SOURCES   += emailmailboxinfo_p.cpp \
              emailmailboxinfo.cpp \
-             nmuieventsnotifier.cpp
+             nmuieventsnotifier.cpp \
+             emailmru.cpp \
+             nmcontacthistorymodelitem.cpp \
+             nmcontacthistorymodel_p.cpp \
+             nmcontacthistorymodel.cpp
 
 symbian*: { 
     TARGET.EPOCALLOWDLLDATA = 1
@@ -65,6 +77,7 @@
       "$${LITERAL_HASH}endif"
     
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
     
     LIBS += -lcentralrepository 
     LIBS += -ltimezonelocalization 
@@ -96,8 +109,12 @@
                              "data/2001E277.txt                     /epoc32/release/winscw/udeb/z/private/10202be9/2001E277.txt" \
                              "data/2001E277.txt                     /epoc32/release/winscw/urel/z/private/10202be9/2001E277.txt" \
                              "data/2001E277.txt                     /epoc32/data/z/private/10202be9/2001E277.txt" \
+                             "data/2003EA97.txt /epoc32/release/winscw/udeb/z/private/10202be9/2003EA97.txt" \
+                             "data/2003EA97.txt /epoc32/release/winscw/urel/z/private/10202be9/2003EA97.txt" \
+                             "data/2003EA97.txt /epoc32/data/z/private/10202be9/2003EA97.txt" \
                              "data/nmutilities.confml               APP_LAYER_CONFML(nmutilities.confml)" \
                              "data/nmutilities_200255BA.crml        APP_LAYER_CRML(nmutilities_200255BA.crml)" \
+                             "inc/emailmru.h APP_LAYER_PLATFORM_EXPORT_PATH(emailmru.h)" \
                              "inc/emailmailboxinfo.h                APP_LAYER_PLATFORM_EXPORT_PATH(emailmailboxinfo.h)" \
                              "inc/nmutilitiescommonheaders.h        APP_LAYER_PLATFORM_EXPORT_PATH(nmutilitiescommonheaders.h)" \
                              "inc/emailutilitiesdef.h               APP_LAYER_PLATFORM_EXPORT_PATH(emailutilitiesdef.h)" \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/src/emailmru.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,350 @@
+/*
+ * Copyright (c) 2007-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:  Object for accessing most recent used email addresses and
+ * display names.
+ *
+ */
+
+#include "emailtrace.h"
+#include "emailmru.h"
+
+#include <XQSettingsManager>
+#include <XQCentralRepositoryUtils>
+#include <XQCentralRepositorySearchCriteria>
+
+/*!
+    Constructor
+ */
+
+// ID 0, Last saved ID.
+// ID 1, Count of MRU Items.
+
+EmailMRU::EmailMRU()
+{
+    NM_FUNCTION;
+
+    mRepositoryManager = new XQSettingsManager();
+    Q_CHECK_PTR(mRepositoryManager);
+
+    mLatestIndex = readCenRep(currentIndexKey).toInt();
+    mCount = readCenRep(countKey).toInt();
+}
+
+/*!
+    Destructor
+ */
+EmailMRU::~EmailMRU()
+{
+    NM_FUNCTION;
+
+    QString entryIndex;
+    entryIndex.setNum(mLatestIndex);
+
+    QString count;
+    count.setNum(mCount);
+
+    writeCenRep(currentIndexKey, entryIndex);
+    writeCenRep(countKey, count);
+
+    delete mRepositoryManager;
+}
+
+/*!
+    Add entry to MRU database
+    \param displayName
+    \param emailAddress
+    \return success, was the update operation successful
+ */
+bool EmailMRU::updateMRU(QString displayName, QString emailAddress)
+{
+    NM_FUNCTION;
+
+    bool success = false;
+    qint32 foundEntryIndex = searchForAddress(emailAddress);
+    if (foundEntryIndex) {
+        success = updateEntry(foundEntryIndex, displayName);
+    }
+
+    else {
+        qint32 entryIndex = getNextEntryIndex();
+        success = writeEntry(entryIndex, displayName, emailAddress);
+        mCount++;
+        if (mCount > emailAddressHistorySize) {
+            mCount = emailAddressHistorySize;
+        }
+    }
+
+    return success;
+}
+
+/*!
+    Get the number of entries
+    \return number of entries
+ */
+quint32 EmailMRU::entryCount() const
+{
+    return mCount;
+}
+
+/*!
+    Get entry details
+    \param entryIndex entry index to look for
+    \param displayName will contain displayname of entry if found
+    \param address will contain address of entry if found
+    \return success
+ */
+bool EmailMRU::getEntry(qint32 entryIndex, QString &displayName, QString &address)
+{
+    NM_FUNCTION;
+
+    bool success = false;
+
+    if ((entryIndex >= 1) && (mCount > 0)) {
+        displayName = readCenRep(nameKeyByEntryIndex(entryIndex));
+        address = readCenRep(addressKeyByEntryIndex(entryIndex));
+        success = true;
+
+        if (address.size()==0) {
+            success = false;
+        }
+    }
+
+    return success;
+}
+
+/*!
+    Resets repository
+ */
+void EmailMRU::reset()
+{
+    NM_FUNCTION;
+
+    XQCentralRepositoryUtils utils(*mRepositoryManager);
+    utils.resetRepository(emailMruRepositoryKey);
+    mLatestIndex = 0;
+    mCount = 0;
+}
+
+/*!
+    Writes to central repository
+    \param index where to write
+    \param value what to write
+    \return success, whether write operation succeeded
+ */
+bool EmailMRU::writeCenRep(qint32 index, QString value)
+{
+    NM_FUNCTION;
+
+    XQCentralRepositorySettingsKey writeKey(emailMruRepositoryKey, index);
+    bool success = mRepositoryManager->writeItemValue(writeKey, value);
+    if (!success) {
+        XQCentralRepositoryUtils utils(*mRepositoryManager);
+        success = utils.createKey(writeKey, value);
+    }
+
+    return success;
+}
+
+/*!
+    Reads from central repository
+    \param index to read
+    \return value
+ */
+QString EmailMRU::readCenRep(qint32 index)
+{
+    NM_FUNCTION;
+
+    XQCentralRepositorySettingsKey readKey(emailMruRepositoryKey, index);
+    return mRepositoryManager->readItemValue(readKey, XQSettingsManager::TypeString).value<QString> ();
+}
+
+/*!
+    Translates entry indexes into real central repository indexes
+    \return central repository index
+ */
+quint32 EmailMRU::getNextEntryIndex()
+{
+    NM_FUNCTION;
+
+    mLatestIndex++;
+
+    if (mLatestIndex > emailAddressHistorySize) {
+        mLatestIndex = 1;
+    }
+
+    return mLatestIndex;
+}
+
+/*!
+    Translates central repository indexes into entry index
+    \param realIndex central repository index
+    \return entry index
+ */
+qint32 EmailMRU::entryIndex(qint32 crKey)
+{
+    NM_FUNCTION;
+
+    qint32 entryIndex = 0;
+
+    if (crKey%2 == 0){
+        entryIndex = crKey/2;
+    }
+    else {
+        entryIndex = (crKey-1)/2;
+    }
+
+    return entryIndex;
+}
+
+/*!
+    Translates entry index into cenrep email address index
+    \param entryIndex
+    \return cenrep email address index
+ */
+qint32 EmailMRU::addressKeyByEntryIndex(qint32 entryIndex)
+{
+    return entryIndex*2+1;
+}
+
+/*!
+    Translates entry index into cenrep displayname index
+    \param entryIndex
+    \return cenrep displayname index
+ */
+qint32 EmailMRU::nameKeyByEntryIndex(qint32 entryIndex)
+{
+    return entryIndex*2;
+}
+
+/*!
+    Checks if MRU list already contains the address
+    \param address to search
+    \return entry index of found address, zero if not found
+ */
+qint32 EmailMRU::searchForAddress(QString address)
+{
+    NM_FUNCTION;
+
+    quint32 partialKey(0x00000000);
+    quint32 bitMask(0x00000000);
+    XQCentralRepositorySearchCriteria criteria(emailMruRepositoryKey, partialKey, bitMask);
+    criteria.setValueCriteria(address);
+
+    // Find the keys.
+    XQCentralRepositoryUtils utils(*mRepositoryManager);
+    QList<XQCentralRepositorySettingsKey> foundKeys = utils.findKeys(criteria);
+
+    qint32 index = 0;
+    // We should only get one key as a result.
+    if (foundKeys.count() == 1) {
+        index = foundKeys[0].key();
+    }
+    return entryIndex(index);
+}
+
+/*!
+    Moves entry, will overwrite the newEntryIndex
+    \param oldEntryIndex entry to be moved
+    \param newEntryIndex where to move
+ */
+void EmailMRU::moveEntry(qint32 oldEntryIndex, qint32 newEntryIndex)
+{
+    NM_FUNCTION;
+
+    // Save the values to be moved
+    QString name = readCenRep(nameKeyByEntryIndex(oldEntryIndex));
+    QString address = readCenRep(addressKeyByEntryIndex(oldEntryIndex));
+
+    // Overwrite values into new entry
+    writeEntry(newEntryIndex, name, address);
+}
+
+/*!
+    Updates displayname and sets entry as newest
+    \param entryIndex to update
+    \param newDisplayName
+    \return success was update operation successfull
+ */
+bool EmailMRU::updateEntry(qint32 entryIndex, QString newDisplayName)
+{
+    NM_FUNCTION;
+
+    // Save address
+    QString address = readCenRep(addressKeyByEntryIndex(entryIndex));
+
+    // Move all entries following the one to be updated
+    // until we go past the newest entry
+    for (qint32 i = entryIndex, j = 0; i != mLatestIndex;) {
+        j = i+1;
+        if (j > emailAddressHistorySize) j = 1;
+
+        moveEntry(j, i);
+
+        i++;
+        if (i > emailAddressHistorySize) i = 1;
+    }
+
+    // Write the updated entry as the newest entry
+    return writeEntry(mLatestIndex, newDisplayName, address);
+}
+
+/*!
+    Writes entry. Overwrites any existing data at give index
+    \param entryIndex to write
+    \param displayName
+    \param emailAddress
+    \return success was update operation successfull
+ */
+bool EmailMRU::writeEntry(qint32 entryIndex, QString displayName, QString emailAddress)
+{
+    NM_FUNCTION;
+
+    bool nameSuccess = false;
+    bool addressSuccess = false;
+
+    nameSuccess = writeCenRep(nameKeyByEntryIndex(entryIndex), displayName);
+    if (nameSuccess) {
+        addressSuccess = writeCenRep(addressKeyByEntryIndex(entryIndex), emailAddress);
+    }
+
+    // Writing name succeeded but writing address not, we destroy the name
+    if (!addressSuccess) {
+        XQCentralRepositoryUtils utils(*mRepositoryManager);
+        XQCentralRepositorySettingsKey deleteKey(emailMruRepositoryKey, nameKeyByEntryIndex(entryIndex));
+        utils.deleteKey(deleteKey);
+    }
+
+    return (nameSuccess & addressSuccess);
+}
+
+/*!
+    Writes entry. Overwrites any existing data at give index
+    \return contacts setting for lastname / firstname order.
+ */
+int EmailMRU::nameOrder()
+{
+    XQSettingsManager *repositoryManager = new XQSettingsManager();
+    Q_CHECK_PTR(repositoryManager);
+
+    XQCentralRepositorySettingsKey readKey(contactsRepositoryKey,
+                                           nameOrderKey);
+
+    int nameOrder = repositoryManager->readItemValue(readKey,
+                                                     XQSettingsManager::TypeInt).toInt();
+
+    delete repositoryManager;
+
+    return nameOrder;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/src/nmcontacthistorymodel.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* 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: Public implementation of Contact History Model API
+*
+*/
+
+#include <QList>
+
+#include "nmcontacthistorymodel.h"
+#include "nmcontacthistorymodel_p.h"
+
+// --------------------------------------------------------------------------
+// Start of implementation (NmContactHistoryModel)
+// --------------------------------------------------------------------------
+/*!
+    Constructor for NmContactHistoryModel
+
+    \param modelType ModelType to be used, Email / Messaging
+*/
+NmContactHistoryModel::NmContactHistoryModel(
+    const NmContactHistoryModelType modelType)
+{
+    d_ptr = new NmContactHistoryModelPrivate(modelType);
+    Q_CHECK_PTR(d_ptr);
+
+    QObject::connect(d_ptr, SIGNAL(queryCompleted(int)), this,
+        SLOT(handleQueryCompleted(int)));
+}
+
+/*!
+    Destructor of NmContactHistoryModel
+ */
+NmContactHistoryModel::~NmContactHistoryModel()
+{
+    delete d_ptr;
+}
+
+/*!
+    Queries contact databases from private implementation
+
+    \param query String to be queried.
+*/
+void NmContactHistoryModel::query(const QString &query)
+{
+    d_ptr->queryDatabases(query);
+}
+
+/*!
+     Signaled once query is completed, emits modelCompleted.
+     Private Slot.
+
+     \param err, 0 if building model was success
+*/
+void NmContactHistoryModel::handleQueryCompleted(int err)
+{
+
+    int lastUpdateIndex = (d_ptr->mPrivateItemList.count())-1;
+
+    if (lastUpdateIndex != -1)
+    {
+        // Notify views that we are about to change model data.
+        beginInsertRows(QModelIndex(),0,lastUpdateIndex);
+        d_ptr->refreshDataModel();
+        endInsertRows();
+
+        // Emit dataChanged();
+        bool validIndex = hasIndex ( lastUpdateIndex, 0 );
+
+        if (validIndex)
+        {
+            dataChanged(index(0,0), index(lastUpdateIndex,0));
+        }
+    }
+
+    emit modelCompleted(err);
+}
+
+/*!
+    Returns the number of rows under the given parent.
+
+    From QAbstractItemModel
+*/
+int NmContactHistoryModel::rowCount(const QModelIndex &parent) const
+{
+    return d_ptr->rowCount(parent);
+}
+
+/*!
+    Returns the data stored under the given role for the item referred
+    to by the index.
+
+    From QAbstractItemModel
+*/
+QVariant NmContactHistoryModel::data(const QModelIndex &index, int role) const
+{
+    return d_ptr->data(index, role);
+}
+
+// --------------------------------------------------------------------------
+// End of implementation (NmContactHistoryModel)
+// --------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/src/nmcontacthistorymodel_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,515 @@
+/*
+* 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: Private implementation of Contact History Model API
+*
+*/
+
+#include "emailmru.h"
+#include "nmcontacthistorymodel_p.h"
+
+// --------------------------------------------------------------------------
+// Start of implementation (NmContactHistoryModelPrivate)
+// --------------------------------------------------------------------------
+/*!
+    Constructor of NmContactHistoryModelPrivate
+
+    \param type The valid values are described by
+    NmContactHistoryModelPrivate::HistoryModelType enum.
+*/
+NmContactHistoryModelPrivate::NmContactHistoryModelPrivate(
+    const NmContactHistoryModelType modelType) :
+    mType(modelType),
+    mContactManager(0),
+    mModelReady(false)
+{
+    mContactManager = new QContactManager("symbian");
+    mNameOrder = EmailMRU::nameOrder();
+}
+
+/*!
+    Destructor of ContactHistoryModel
+*/
+NmContactHistoryModelPrivate::~NmContactHistoryModelPrivate()
+{
+    delete mContactManager;
+    mPrivateItemList.clear();
+    mModelItemList.clear();
+}
+
+/*!
+    Searches contact & MRU  databases according to query parameters.
+    Emits QueryCompleted() when ready.
+
+    \param query Text to be searched
+    \return none
+
+    Note:: QContactManager supports max. ten characters long queries.
+*/
+void NmContactHistoryModelPrivate::queryDatabases(const QString& query)
+{
+    mModelReady = false;
+    // Clear contacts in the list
+    mPrivateItemList.clear();
+    mModelItemList.clear();
+    mMruList.clear();
+    mMruMatches.clear();
+
+    // Modify search to suit our needs
+    // Space must be removed, because it is understood as logigal AND
+    // with QContactManager API
+    QString modifiedQuery = query;
+
+    int spcPosition = query.indexOf(" ");
+
+    if ( spcPosition != -1 )
+        {
+        modifiedQuery = query.left(spcPosition);
+        }
+
+    queryMruDatabase(modifiedQuery);
+    populateListWithMruItems(modifiedQuery);
+
+    if (mContactManager)
+        {
+        // Get matching IDs from Contacts DB
+        QList<QContactLocalId> cnt_ids = queryContactDatabase(modifiedQuery);
+
+        // Populate mPrivateItemList with contact items.
+        populateListWithContactItems(cnt_ids, modifiedQuery);
+        }
+
+    // Currently we will always emit 0 as completion code.
+
+    //TODO: Will be removed, Debug Code.
+    for (int i = 0; i < mPrivateItemList.size(); i++)
+        {
+        QSharedPointer<NmContactHistoryModelItemData> itemData = mPrivateItemList[i];
+
+        QString dbgString = itemData->mItems[0].mItemText;
+        dbgString.append(" ");
+        dbgString.append(itemData->mItems[1].mItemText);
+
+        qDebug(dbgString.toLatin1());
+
+
+        }
+
+    emit queryCompleted(0);
+}
+
+/*!
+    Internal helper function for queryDatabases()
+    Not meant to be used alone.
+
+    \param query Text to be searched
+    \return list of Contact items.
+    \sa queryDatabases( )
+*/
+QList<QContactLocalId> NmContactHistoryModelPrivate::queryContactDatabase(
+    const QString &query)
+{
+    // Define filter
+    QContactDetailFilter df;
+
+    df.setDetailDefinitionName(QContactEmailAddress::DefinitionName,
+                               QContactEmailAddress::FieldEmailAddress );
+
+    df.setMatchFlags( QContactFilter::MatchKeypadCollation );
+
+    // Construct pattern
+    QString pattern = query + QChar(30) + QString("vqwerty");
+    df.setValue( pattern );
+
+    // Get matching IDs
+    QList<QContactLocalId> cnt_ids = mContactManager->contactIds( df );
+
+    return cnt_ids;
+}
+
+/*!
+    Internal helper function for queryDatabases()
+    Not meant to be used alone.
+
+    \param query Text to be searched from MRU
+    \return true on success.
+    \sa queryDatabases( )
+*/
+bool NmContactHistoryModelPrivate::queryMruDatabase(
+    const QString &query)
+{
+    if (mType == EmailAddressModel)
+    {
+        bool mruListFilled = fillMruMatchList();
+
+        if (!mruListFilled)
+        {
+            return false;
+        }
+
+        QHashIterator<QString, QString> i(mMruList);
+
+        while (i.hasNext())
+        {
+            i.next();
+
+            QString address = i.key();
+            QString name = i.value();
+
+            if ((name.length() == 0) && (address.contains('@')))
+            {
+                name = address.left(address.indexOf("@"));
+            }
+
+            if (address.contains(query, Qt::CaseInsensitive))
+            {
+                mMruMatches.insert(name, address);
+            }
+            else if (name.contains(query, Qt::CaseInsensitive))
+            {
+                mMruMatches.insert(name, address);
+            }
+        }
+    }
+
+    return true;
+}
+
+/*!
+    Internal helper function for queryDatabases()
+    Not meant to be used alone.
+
+    \param cnt_ids List of contact IDs
+    \param modifiedQuery Query
+    \sa queryDatabases( )
+*/
+void NmContactHistoryModelPrivate::populateListWithContactItems(
+    const QList<QContactLocalId> cnt_ids,
+    const QString &modifiedQuery)
+{
+    int cntCount = cnt_ids.count();
+    // Populate mPrivateItemList with contact items.
+    for ( int cntIndex = 0; cntIndex < cntCount; cntIndex++)
+    {
+        QContactLocalId cid = cnt_ids.at( cntIndex );
+        // Fetch extended contact information from DB by ID
+        QContact contact = mContactManager->contact( cid );
+
+        // Get number of associated emails for contact
+        int numberOfEmails =  contact.details(
+            QContactEmailAddress::DefinitionName).count();
+
+        if (numberOfEmails == 0)
+        {
+            continue; // Scotty, I need warp speed.
+        }
+
+        // Get contact name details
+        QContactName contactName = contact.detail(
+            QContactName::DefinitionName);
+
+        QString firstName = contactName.value(
+            QContactName::FieldFirstName);
+        QString lastName = contactName.value(
+            QContactName::FieldLastName);
+
+        for (int emailIndex = 0; emailIndex < numberOfEmails; emailIndex++)
+        {
+            // For Display name (ex. John Doe)
+            NmContactHistoryModelSubItem itemSubItem1;
+            // For Email address (ex. john.doe@company.com)
+            NmContactHistoryModelSubItem itemSubItem2;
+
+            int queryLength = modifiedQuery.length();
+
+            // Obey the contacts setting (first name last name order)
+            itemSubItem1.mItemText = obeyContactOrder(firstName, lastName);
+
+            if( firstName.indexOf(modifiedQuery, 0, Qt::CaseInsensitive) == 0)
+            {
+                itemSubItem1.mMatchingRanges.append(0);
+                itemSubItem1.mMatchingRanges.append(queryLength-1);
+            }
+
+            if( lastName.indexOf(modifiedQuery, 0, Qt::CaseInsensitive) == 0)
+            {
+                int indexLN = itemSubItem1.mItemText.indexOf(lastName,
+                    firstName.length(),
+                    Qt::CaseInsensitive );
+
+                itemSubItem1.mMatchingRanges.append(indexLN);
+                itemSubItem1.mMatchingRanges.append(indexLN+(queryLength-1));
+            }
+
+            itemSubItem2.mItemText = contact.details (
+                 QContactEmailAddress::DefinitionName )[emailIndex].value (
+                 QContactEmailAddress::FieldEmailAddress );
+
+            if (itemSubItem2.mItemText.indexOf(modifiedQuery, 0,
+                Qt::CaseInsensitive) == 0 )
+            {
+                itemSubItem2.mMatchingRanges.append(0);
+                itemSubItem2.mMatchingRanges.append(queryLength-1);
+            }
+
+            if ((itemSubItem1.mMatchingRanges.count() != 0) ||
+                (itemSubItem2.mMatchingRanges.count() != 0) )
+            {
+                QSharedPointer<NmContactHistoryModelItemData> itemData
+                    (new NmContactHistoryModelItemData);
+
+                itemData->mContactId = cid;
+                itemData->mItems.append(itemSubItem1);
+                itemData->mItems.append(itemSubItem2);
+
+                mPrivateItemList.append(itemData);
+            }
+        }
+    }
+}
+
+/*!
+    Internal helper function for queryDatabases()
+    Not meant to be used alone.
+
+    \param modifiedQuery Query
+    \sa queryDatabases( )
+*/
+void NmContactHistoryModelPrivate::populateListWithMruItems(
+    const QString &query)
+{
+    QMapIterator<QString, QString> i(mMruMatches);
+
+    while (i.hasNext())
+    {
+        i.next();
+        // For Display name (ex. John Doe)
+        NmContactHistoryModelSubItem itemSubItem1;
+        // For Email address (ex. john.doe@company.com)
+        NmContactHistoryModelSubItem itemSubItem2;
+
+        itemSubItem1.mItemText = i.key();
+        itemSubItem2.mItemText = i.value();
+
+        // markup for first item.
+        if( i.key().indexOf(query, 0, Qt::CaseInsensitive) == 0)
+        {
+            itemSubItem1.mMatchingRanges.append(0);
+            itemSubItem1.mMatchingRanges.append(query.length()-1);
+        }
+
+        QRegExp rx("[,\\s]", Qt::CaseInsensitive);
+        bool separatorExists = i.key().contains(rx);
+
+        if (separatorExists)
+        {
+            int indexLN = i.key().indexOf(",", 0, Qt::CaseInsensitive);
+
+            if (indexLN == -1)
+            {
+                indexLN = i.key().indexOf(" ", 0, Qt::CaseInsensitive);
+            }
+
+            if (indexLN > 0)
+            {
+                int matchPos = i.key().indexOf(query, indexLN, Qt::CaseInsensitive);
+
+                if (matchPos > 0)
+                {
+                    itemSubItem1.mMatchingRanges.append(matchPos);
+                    itemSubItem1.mMatchingRanges.append((matchPos+query.length())-1);
+                }
+            }
+        }
+
+        // markup for second item.
+        if (itemSubItem2.mItemText.indexOf(query, 0, Qt::CaseInsensitive) == 0 )
+         {
+             itemSubItem2.mMatchingRanges.append(0);
+             itemSubItem2.mMatchingRanges.append(query.length()-1);
+         }
+
+        // If match, add to data list.
+        if ((itemSubItem1.mMatchingRanges.count() != 0) ||
+            (itemSubItem2.mMatchingRanges.count() != 0) )
+        {
+            QSharedPointer<NmContactHistoryModelItemData> itemData
+                (new NmContactHistoryModelItemData);
+
+            itemData->mContactId = 0; // No ID available, use 0.
+            itemData->mItems.append(itemSubItem1);
+            itemData->mItems.append(itemSubItem2);
+
+            mPrivateItemList.append(itemData);
+        }
+    }
+}
+
+/*!
+    After queryDatabases has completed this will be called from public class()
+    Not meant to be used alone. (NmContactHistoryModel is using this when needed)
+
+    \sa queryDatabases( )
+*/
+void NmContactHistoryModelPrivate::refreshDataModel()
+{
+    mModelItemList.clear();
+
+    for (int cntIndex = 0;
+             cntIndex < mPrivateItemList.count();
+             cntIndex++)
+    {
+        // Construct modelItem to be added to list.
+        NmContactHistoryModelItem modelItem;
+
+        QSharedPointer<NmContactHistoryModelItemData> itemData(
+            mPrivateItemList[cntIndex]);
+
+        int id = itemData->mContactId;
+        modelItem.setContactId(itemData->mContactId);
+
+        for (int itemIndex = 0;
+                 itemIndex < itemData->mItems.count();
+                 itemIndex++)
+        {
+            QString key = itemData->mItems[itemIndex].mItemText;
+            modelItem.appendSubItem(itemData->mItems[itemIndex]);
+        }
+
+        // Append modelItem to list.
+        mModelItemList.append(modelItem);
+    }
+
+    // Notify views that we are done updating model data.
+    mModelReady = true;
+
+}
+
+/*!
+    This is called by public class NmContactHistoryModel when rowcount() is requested
+    Not meant to be used alone.
+
+*/
+int NmContactHistoryModelPrivate::rowCount(const QModelIndex &parent) const
+{
+    Q_UNUSED(parent);
+    return mModelItemList.count();
+}
+
+/*!
+    This is called by public class NmContactHistoryModel when data() is requested
+    Not meant to be used alone.
+
+*/
+QVariant NmContactHistoryModelPrivate::data(const QModelIndex &index, int role) const
+{
+    if ( mModelReady )
+    {
+        if (!index.isValid() ||
+            index.row() >= mModelItemList.count() ||
+            index.row() < 0)
+        {
+            return QVariant();
+        }
+
+        if (role == Qt::DisplayRole)
+        {
+            QVariant v;
+            NmContactHistoryModelItem i = mModelItemList.at(index.row());
+            v.setValue(i);
+            return v;
+        }
+    }
+
+    return QVariant();
+}
+
+/*!
+    Fills MruMatchList, called from queryMruDatabase.
+    Function uses Email MRU API to fetch information from CenRep
+
+    \sa queryMruDatabase( )
+*/
+bool NmContactHistoryModelPrivate::fillMruMatchList()
+{
+    //TODO: Possible optimization, remove extra calls EmailMRU(), We need to get list only once.
+    EmailMRU *mru = new EmailMRU();
+
+    if (mru)
+    {
+        int addressCount = mru->entryCount();
+
+        for (int i = addressCount; i > 0; i--)
+        {
+            QString key, value; // "Email or Number" & "Display Name"
+            bool success;
+
+            success = mru->getEntry(i, value, key);
+
+            if (success)
+            {
+                mMruList.insertMulti(key, value);
+            }
+        }
+
+        delete mru;
+        return true;
+    }
+    else
+    {
+        return false;
+    }
+}
+
+/*!
+    This is called from populateListWithContactItems() when correct order of
+    first name, last name setting is required
+
+    \param firstName First name
+    \param lastName Last name
+
+    \sa populateListWithContactItems( )
+
+    \return concennated string formatted as contact setting specifies.
+*/
+QString NmContactHistoryModelPrivate::obeyContactOrder(const QString &firstName,
+                                                       const QString &lastName)
+{
+    QString result;
+
+    switch (mNameOrder)
+    {
+        case LastNameFirstName:
+            result = lastName + " " + firstName;
+        break;
+
+        case LastNameCommaFirstName:
+            result = lastName + ", " + firstName;
+        break;
+
+        case FirstNameLastName:
+            result = firstName + " " + lastName;
+        break;
+
+        default:
+            result = firstName + " " + lastName;
+        break;
+    }
+
+    return result;
+}
+
+// --------------------------------------------------------------------------
+// End of implementation (NmContactHistoryModelPrivate)
+// --------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/src/nmcontacthistorymodelitem.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,125 @@
+/*
+* 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: Implementation of NmContactHistoryModelItem
+*
+*/
+
+#include <QList>
+
+#include "nmcontacthistorymodel.h"
+#include "nmcontacthistorymodel_p.h"
+
+// --------------------------------------------------------------------------
+// Start of implementation (NmContactHistoryModelItem)
+// --------------------------------------------------------------------------
+/*!
+     Not meant to be used alone.
+*/
+NmContactHistoryModelItem::NmContactHistoryModelItem()
+{
+    d = new NmContactHistoryModelItemData();
+}
+
+/*!
+    Not meant to be used alone.
+*/
+NmContactHistoryModelItem::NmContactHistoryModelItem(
+    const NmContactHistoryModelItem &other)
+{
+    d = other.d;
+}
+
+/*!
+    Not meant to be used alone.
+*/
+NmContactHistoryModelItem::~NmContactHistoryModelItem()
+{
+}
+
+/*!
+    Not meant to be used alone.
+*/
+unsigned int NmContactHistoryModelItem::contactId() const
+{
+    return d->mContactId;
+}
+
+/*!
+    Not meant to be used alone.
+*/
+void NmContactHistoryModelItem::setContactId(unsigned int contactId)
+{
+    d->mContactId = contactId;
+}
+
+/*!
+    Not meant to be used alone.
+*/
+int NmContactHistoryModelItem::subItemCount() const
+{
+    return d->mItems.count();
+}
+
+/*!
+    Not meant to be used alone.
+*/
+NmContactHistoryModelSubItem NmContactHistoryModelItem::subItemAt(
+    int index) const
+{
+    if ( index <= d->mItems.count() )
+    {
+        return d->mItems[index];
+    }
+    else
+    {
+        return NmContactHistoryModelSubItem();
+    }
+}
+
+/*!
+    Returns SubEntries from private list
+    First entry is contact name
+    Second entry is email address / phone number
+
+    \return List of items.
+*/
+QList<NmContactHistoryModelSubItem> NmContactHistoryModelItem::subEntries(
+    ) const
+{
+    QList<NmContactHistoryModelSubItem> subItemList;
+
+    if (!d->mItems.isEmpty())
+    {
+        for ( int subIndex = 0; subIndex < d->mItems.count(); subIndex++)
+        {
+            subItemList.append(d->mItems[subIndex]);
+        }
+    }
+
+    return subItemList;
+}
+
+/*!
+    Public - Appends subItem to private list
+
+    \param entry subItem to be appended
+*/
+void NmContactHistoryModelItem::appendSubItem(
+    NmContactHistoryModelSubItem entry)
+{
+    d->mItems.append(entry);
+}
+// --------------------------------------------------------------------------
+// End of implementation (NmContactHistoryModelItem)
+// --------------------------------------------------------------------------/*!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/emailmru_stub.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,97 @@
+#include <emailmru.h>
+
+extern bool constructorCalled;
+extern bool destructorCalled;
+extern bool entryCountCalled;
+extern bool getEntryCalled;
+extern bool nameOrderCalled;
+extern bool fillMruWithFalseValues;
+
+EmailMRU::EmailMRU()
+{
+    constructorCalled = true;
+}
+
+EmailMRU::~EmailMRU()
+{
+    destructorCalled = true;
+}
+
+quint32 EmailMRU::entryCount() const
+{
+    entryCountCalled  = true;
+
+    if (!fillMruWithFalseValues)
+    {
+        return 2;
+    }
+    else
+    {
+        return 3;
+    }
+}
+
+bool EmailMRU::getEntry(qint32 entryIndex, QString &displayName, QString &address)
+{
+    getEntryCalled  = true;
+    bool success = false;
+
+    if (!fillMruWithFalseValues)
+    {
+        switch (entryIndex)
+        {
+            case 1:
+                displayName = "Camel Case";
+                address = "camel.case@plusplus.com";
+                success = true;
+            break;
+            case 2:
+                displayName = "Agent Reference";
+                address = "byvalue@plusplus.com";
+                success = true;
+            break;
+            default:
+                displayName = "Default Name";
+                address = "default@default.com";
+                success = false;
+            break;
+        }
+    }
+    else
+    {
+        switch (entryIndex)
+        {
+            case 1:
+                // Without display name
+                displayName = "";
+                address = "camel.case@plusplus.com";
+                success = true;
+            break;
+            case 2:
+                // Email Matching purpose
+                displayName = "Agent Plus";
+                address = "plus@plusplus.com";
+                success = true;
+            break;
+            case 3:
+                // Match in other
+                displayName = "Agent Smith";
+                address = "noreply@mib.com";
+                success = true;
+            break;
+            default:
+                displayName = "Default Name";
+                address = "default@default.com";
+                success = false;
+            break;
+        }
+    }
+
+    return success;
+}
+
+int EmailMRU::nameOrder()
+{
+    nameOrderCalled  = true;
+    return 2;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/qtcontacts.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,784 @@
+#ifndef QTCONTACTS_H
+#define QTCONTACTS_H
+
+#include <QSharedPointer>
+#include <QVariant>
+
+extern bool setDetailDefinitionNameCalled;
+extern bool setMatchFlagsCalled;
+extern bool setValueCalled;
+extern bool ContactIdsCalled;
+extern bool returnZeroEmails;
+
+typedef quint32 QContactLocalId;
+/*
+class UnitTestReporter
+{
+public:
+  inline static void resetFlags()
+  {
+    //mFlagA = false;
+    UnitTestReporter::mFlagB = false;
+  	//mFlagC = false;
+  	UnitTestReporter::mFlagD = false;
+  	//mVariant1.clear();
+  	//mVariant2.clear();
+  }
+
+  inline static void setFlagA()
+  {
+  	mFlagA = true;
+  }
+	inline static void setFlagB()
+	{
+		mFlagB = true;
+	}
+
+	inline static void setFlagC()
+	{
+		mFlagC = true;
+	}
+
+	inline static void setFlagD()
+	{
+		mFlagD = true;
+	}
+
+	inline static void setVariant1(QVariant &variant)
+	{
+		mVariant1 = variant;
+	}
+
+	inline static void setVariant2(QVariant &variant)
+	{
+		mVariant2 = variant;
+	}
+
+	static bool mFlagA;
+	static bool mFlagB;
+	static bool mFlagC;
+	static bool mFlagD;
+	static QVariant mVariant1;
+	static QVariant mVariant2;
+};
+*/
+
+template <int N> struct QLatin1Constant
+{
+    char chars[N];
+
+    bool operator ==(const QLatin1Constant& other) const {return (chars == other.chars) || (qstrcmp(chars, other.chars) == 0);}
+    bool operator !=(const QLatin1Constant& other) const {return !operator==(other);}
+
+    inline const char * latin1() const {return chars;}
+
+    operator QLatin1String() const {return QLatin1String(chars);}
+    operator QString() const {return QString::fromLatin1(chars, N-1);}
+    operator QVariant() const {return QVariant(operator QString());}
+};
+
+#define QTM_USE_NAMESPACE
+#endif
+
+// Stub for ContactManager
+#ifndef QCONTACTMANAGER_H
+#define QCONTACTMANAGER_H
+
+#include <QObject>
+#include <QMap>
+#include <QString>
+#include <QStringList>
+#include <QList>
+#include <QDateTime>
+#include <QGlobal.h>
+
+class QContactSortOrder
+{
+public:
+    inline QContactSortOrder()
+    {
+    }
+
+    inline ~QContactSortOrder()
+    {
+    }
+
+    inline QContactSortOrder(const QContactSortOrder& other)
+    {
+    	Q_UNUSED(other);
+    }
+
+    inline QContactSortOrder& operator=(const QContactSortOrder& other)
+    {
+    	Q_UNUSED(other);
+    	return (const_cast<QContactSortOrder &>(other));
+    }
+
+    enum BlankPolicy {
+        BlanksFirst,
+        BlanksLast,
+    };
+
+    /* Mutators */
+//    void setDetailDefinitionName(const QString& definitionName, const QString& fieldName);
+//    void setBlankPolicy(BlankPolicy blankPolicy);
+//    void setDirection(Qt::SortOrder direction);
+//    void setCaseSensitivity(Qt::CaseSensitivity sensitivity);
+
+    /* Accessors */
+//    QString detailDefinitionName() const;
+//    QString detailFieldName() const;
+//    BlankPolicy blankPolicy() const;
+//    Qt::SortOrder direction() const;
+//    Qt::CaseSensitivity caseSensitivity() const;
+
+//    bool isValid() const;
+
+    inline bool operator==(const QContactSortOrder& other) const
+    {
+    	Q_UNUSED(other);
+    	return true;
+    }
+
+    inline bool operator!=(const QContactSortOrder& other) const {Q_UNUSED(other); return !operator==(other);}
+};
+
+#define Q_DECLARE_LATIN1_CONSTANT(varname, str) static const QLatin1Constant<sizeof(str)> varname
+#define Q_DEFINE_LATIN1_CONSTANT(varname, str) const QLatin1Constant<sizeof(str)> varname = {str}
+
+#define Q_DECLARE_CUSTOM_CONTACT_DETAIL(className, definitionNameString) \
+    className() : QContactDetail(DefinitionName.latin1()) {} \
+    className(const QContactDetail& field) : QContactDetail(field, DefinitionName.latin1()) {} \
+    className& operator=(const QContactDetail& other) {assign(other, DefinitionName.latin1()); return *this;} \
+    \
+    Q_DECLARE_LATIN1_CONSTANT(DefinitionName, definitionNameString);
+
+class QContactDetail
+{
+public:
+
+    inline QContactDetail()
+    {
+    }
+
+    inline explicit QContactDetail(const char* definitionName)
+    {
+    	Q_UNUSED(definitionName);
+		}
+
+    inline explicit QContactDetail(const QString& definitionName)
+    {
+    	Q_UNUSED(definitionName);
+    }
+
+    inline ~QContactDetail()
+    {
+    }
+
+    inline QContactDetail(const QContactDetail& other)
+    {
+    	Q_UNUSED(other);
+    }
+
+    inline QContactDetail& operator=(const QContactDetail& other)
+    {
+   	Q_UNUSED(other);
+   	return (const_cast<QContactDetail &>(other));
+    }
+
+    enum AccessConstraint {
+        NoConstraint = 0,
+        ReadOnly = 0x01,
+        Irremovable = 0x02
+    };
+
+    Q_DECLARE_FLAGS(AccessConstraints, AccessConstraint)
+
+    inline AccessConstraints accessConstraints() const
+    {
+    	return AccessConstraints();
+    }
+
+    // Predefined attribute names and values
+#ifdef Q_QDOC
+    static const QLatin1Constant FieldContext;
+    static const QLatin1Constant ContextHome;
+    static const QLatin1Constant ContextWork;
+    static const QLatin1Constant ContextOther;
+    static const QLatin1Constant FieldDetailUri;
+    static const QLatin1Constant FieldLinkedDetailUris;
+#else
+    Q_DECLARE_LATIN1_CONSTANT(FieldContext, "Context");
+    Q_DECLARE_LATIN1_CONSTANT(ContextHome, "Home");
+    Q_DECLARE_LATIN1_CONSTANT(ContextWork, "Work");
+    Q_DECLARE_LATIN1_CONSTANT(ContextOther, "Other");
+    Q_DECLARE_LATIN1_CONSTANT(FieldDetailUri, "DetailUri");
+    Q_DECLARE_LATIN1_CONSTANT(FieldLinkedDetailUris, "LinkedDetailUris");
+#endif
+
+    bool operator==(const QContactDetail& other) const;
+    bool operator!=(const QContactDetail& other) const {return !(other == *this);}
+
+    inline QString definitionName() const
+    {
+    	return QString();
+    }
+
+    inline bool isEmpty() const
+    {
+    	return false;
+    }
+
+    int key() const;
+    void resetKey();
+
+		inline QString value(const QString& key) const
+		{
+			Q_UNUSED(key);
+			return QString();
+		}
+
+		inline bool setValue(const QString& key, const QVariant& value)
+		{
+			Q_UNUSED(key);
+			Q_UNUSED(value);
+			return true;
+		}
+
+    bool removeValue(const QString& key);
+    bool hasValue(const QString& key) const;
+
+    QVariantMap variantValues() const;
+    QVariant variantValue(const QString& key) const;
+    template <typename T> T value(const QString& key) const
+    {
+        return variantValue(key).value<T>();
+    }
+
+    /* These are probably internal */
+    inline QString value(const char* key) const
+    {
+        return key;
+    }
+
+    inline bool setValue(const char* key, const QVariant& value)
+    {
+        Q_UNUSED(key);
+        Q_UNUSED(value);
+        return true;
+    }
+
+    inline bool removeValue(const char* key)
+    {
+        Q_UNUSED(key);
+        return true;
+    }
+
+    inline bool hasValue(const char* key) const
+    {
+        Q_UNUSED(key);
+        return true;
+    }
+
+    QVariant variantValue(const char *key) const;
+
+    template<typename T> T value(const char *key) const
+    {
+        return variantValue(key).value<T>();
+    }
+
+#ifdef Q_QDOC
+    QString value(const QLatin1Constant& key) const;
+    bool setValue(const QLatin1Constant& key, const QVariant& value);
+    bool removeValue(const QLatin1Constant& key);
+    bool hasValue(const QLatin1Constant& key) const;
+    QVariant variantValue(const QLatin1Constant& key) const;
+    T value(const QLatin1Constant& key) const;
+#else
+
+    template<int N> QString value(const QLatin1Constant<N>& key) const
+    {
+         return value(key.latin1());
+    }
+    template<int N> bool setValue(const QLatin1Constant<N>& key, const QVariant& value)
+    {
+        return setValue(key.latin1(), value);
+    }
+    template<int N> bool removeValue(const QLatin1Constant<N>& key)
+    {
+        return removeValue(key.latin1());
+    }
+    template<int N> bool hasValue(const QLatin1Constant<N>& key) const
+    {
+        return hasValue(key.latin1());
+    }
+    template<int N> QVariant variantValue(const QLatin1Constant<N>& key) const
+    {
+        return variantValue(key.latin1());
+    }
+    template<typename T, int N> T value(const QLatin1Constant<N>& key) const
+    {
+        return value<T>(key.latin1());
+    }
+#endif
+
+    inline void setContexts(const QStringList& contexts)
+    {
+        setValue(FieldContext, contexts);
+    }
+
+    inline void setContexts(const QString& context)
+    {
+        setValue(FieldContext, QStringList(context));
+    }
+
+    inline QStringList contexts() const
+    {
+        return value<QStringList>(FieldContext);
+    }
+
+    inline void setDetailUri(const QString& detailUri)
+    {
+        setValue(FieldDetailUri, detailUri);
+    }
+
+    inline QString detailUri() const
+    {
+        return value(FieldDetailUri);
+    }
+
+    inline void setLinkedDetailUris(const QStringList& linkedDetailUris)
+    {
+        setValue(FieldLinkedDetailUris, linkedDetailUris);
+    }
+
+    inline void setLinkedDetailUris(const QString& linkedDetailUri)
+    {
+        setValue(FieldLinkedDetailUris, QStringList(linkedDetailUri));
+    }
+
+    inline QStringList linkedDetailUris() const
+    {
+        return value<QStringList>(FieldLinkedDetailUris);
+    }
+
+// Protected..
+
+    inline QContactDetail(const QContactDetail &other, const QString& expectedDefinitionId)
+    {
+    	Q_UNUSED(other);
+    	Q_UNUSED(expectedDefinitionId);
+    }
+
+    inline QContactDetail& assign(const QContactDetail &other, const QString& expectedDefinitionId)
+    {
+    	Q_UNUSED(other);
+    	Q_UNUSED(expectedDefinitionId);
+    	return (const_cast<QContactDetail &>(other));
+    }
+
+    inline QContactDetail(const QContactDetail &other, const char* expectedDefinitionId)
+    {
+    	Q_UNUSED(other);
+    	Q_UNUSED(expectedDefinitionId);
+    }
+
+    inline QContactDetail& assign(const QContactDetail &other, const char* expectedDefinitionId)
+    {
+    	Q_UNUSED(other);
+    	Q_UNUSED(expectedDefinitionId);
+    	return (const_cast<QContactDetail &>(other));
+    }
+};
+
+// Stub for QContactFilter
+class QContactFilter
+{
+public:
+    inline QContactFilter()
+    {
+    }
+
+    inline ~QContactFilter()
+    {
+    }
+
+    inline QContactFilter(const QContactFilter& other)
+    {
+    	Q_UNUSED(other);
+  	}
+
+    inline QContactFilter& operator=(const QContactFilter& other)
+    {
+    	Q_UNUSED(other);
+			return (const_cast<QContactFilter &>(other));
+    }
+
+    enum FilterType {
+        InvalidFilter,
+        ContactDetailFilter,
+        ContactDetailRangeFilter,
+        ChangeLogFilter,
+        ActionFilter,
+        RelationshipFilter,
+        IntersectionFilter,
+        UnionFilter,
+        LocalIdFilter,
+        DefaultFilter
+    };
+
+    inline FilterType type() const
+    {
+    	return FilterType();
+  	}
+
+    // Qt::MatchFlags don't quite match here
+    enum MatchFlag {
+        MatchExactly = Qt::MatchExactly,    // 0
+        MatchContains = Qt::MatchContains,  // 1
+        MatchStartsWith = Qt::MatchStartsWith,  // 2
+        MatchEndsWith = Qt::MatchEndsWith, // 3
+        MatchFixedString = Qt::MatchFixedString, // 8
+        MatchCaseSensitive = Qt::MatchCaseSensitive, // 16
+        MatchPhoneNumber = 1024,
+        MatchKeypadCollation = 2048
+    };
+    Q_DECLARE_FLAGS(MatchFlags, MatchFlag)
+};
+
+class QContactEmailAddress : public QContactDetail
+{
+public:
+
+#ifdef Q_QDOC
+    static const QLatin1Constant DefinitionName;
+    static const QLatin1Constant FieldEmailAddress;
+#else
+    Q_DECLARE_CUSTOM_CONTACT_DETAIL(QContactEmailAddress, "EmailAddress")
+    Q_DECLARE_LATIN1_CONSTANT(FieldEmailAddress, "EmailAddress");
+#endif
+
+    void setEmailAddress(const QString& emailAddress) {Q_UNUSED(emailAddress);}
+    QString emailAddress() const {return value(FieldEmailAddress);}
+
+    static QContactFilter match(const QString& emailAddress)
+		{
+			Q_UNUSED(emailAddress);
+			return QContactFilter();
+		}
+};
+
+class QContactName : public QContactDetail
+{
+public:
+
+#ifdef Q_QDOC
+    //static const QLatin1Constant DefinitionName;
+    static const QLatin1Constant FieldPrefix;
+    static const QLatin1Constant FieldFirstName;
+    static const QLatin1Constant FieldMiddleName;
+    static const QLatin1Constant FieldLastName;
+    static const QLatin1Constant FieldSuffix;
+    static const QLatin1Constant FieldCustomLabel;
+#else
+    Q_DECLARE_CUSTOM_CONTACT_DETAIL(QContactName, "Name")
+    Q_DECLARE_LATIN1_CONSTANT(FieldPrefix, "Prefix");
+    Q_DECLARE_LATIN1_CONSTANT(FieldFirstName, "FirstName");
+    Q_DECLARE_LATIN1_CONSTANT(FieldMiddleName, "MiddleName");
+    Q_DECLARE_LATIN1_CONSTANT(FieldLastName, "LastName");
+    Q_DECLARE_LATIN1_CONSTANT(FieldSuffix, "Suffix");
+    Q_DECLARE_LATIN1_CONSTANT(FieldCustomLabel, "CustomLabel");
+#endif
+    //static const QString DefinitionName;
+
+    QString prefix() const {return value(FieldPrefix);}
+    QString firstName() const {return value(FieldFirstName);}
+    QString middleName() const {return value(FieldMiddleName);}
+    QString lastName() const {return value(FieldLastName);}
+    QString suffix() const {return value(FieldSuffix);}
+    QString customLabel() const{return value(FieldCustomLabel);}
+
+    void setPrefix(const QString& prefix) {setValue(FieldPrefix, prefix);}
+    void setFirstName(const QString& firstName) {setValue(FieldFirstName, firstName);}
+    void setMiddleName(const QString& middleName) {setValue(FieldMiddleName, middleName);}
+    void setLastName(const QString& lastName) {setValue(FieldLastName, lastName);}
+    void setSuffix(const QString& suffix) {setValue(FieldSuffix, suffix);}
+    void setCustomLabel(const QString& customLabel) {setValue(FieldCustomLabel, customLabel);}
+
+    // Convenience filter
+    static QContactFilter match(const QString& name);
+    static QContactFilter match(const QString& firstName, const QString& lastName);
+};
+
+// Stub for QContactDetailFilter
+class QContactDetailFilter : public QContactFilter
+{
+public:
+    inline QContactDetailFilter()
+    {
+    }
+
+	  inline QContactDetailFilter(const QContactFilter& other)
+	  {
+    	Q_UNUSED(other);
+	  }
+
+    inline void setDetailDefinitionName(const QString& definition, const QString& fieldName = QString())
+    {
+    	Q_UNUSED(definition);
+    	Q_UNUSED(fieldName);
+    	setDetailDefinitionNameCalled = true;
+    }
+
+    inline void setMatchFlags(QContactFilter::MatchFlags flags)
+    {
+    	Q_UNUSED(flags);
+    	setMatchFlagsCalled = true;
+    }
+
+    inline void setValue(const QVariant& value)
+    {
+			Q_UNUSED(value);
+			setValueCalled = true;
+    }
+};
+
+// Stub for QContactFetchHint
+class QContactFetchHint {
+public:
+
+    inline QContactFetchHint()
+    {
+    }
+
+    inline QContactFetchHint(const QContactFetchHint& other)
+    {
+    	Q_UNUSED(other);
+    }
+
+    inline ~QContactFetchHint()
+    {
+    }
+
+};
+
+class QContact
+{
+public:
+    inline QContact()
+    {
+    }
+
+    inline ~QContact()
+    {
+    }
+
+    QContact(const QContact& other);
+    QContact& operator=(const QContact& other);
+
+    bool operator==(const QContact &other) const;
+    bool operator!=(const QContact &other) const {return !(other == *this);}
+
+    /* Access details of particular type or which support a particular action */
+    QContactDetail detail(const QString& definitionId) const;
+    QList<QContactDetail> details(const QString& definitionId = QString()) const;
+
+    QList<QContactDetail> details(const QString& definitionName, const QString& fieldName, const QString& value) const;
+
+    inline QContactDetail detail(const char* definitionId) const
+    {
+        Q_UNUSED(definitionId);
+        QContactDetail detail;
+
+        detail.setValue(definitionId, definitionId);
+
+        return detail;
+    }
+
+    inline QList<QContactDetail> details(const char* definitionId) const
+    {
+        QList<QContactDetail> tmpList;
+        QContactDetail detail;
+
+        if(!returnZeroEmails)
+        {
+            detail.setValue(definitionId, definitionId);
+            tmpList.append(detail);
+        }
+
+        return tmpList;
+    }
+
+    QList<QContactDetail> details(const char* definitionId, const char* fieldName, const QString& value) const;
+
+    /* Templated retrieval for definition names */
+#ifdef Q_QDOC
+    QContactDetail detail(const QLatin1Constant& definitionName) const;
+    QList<QContactDetail> details(const QLatin1Constant& definitionName) const;
+    QList<QContactDetail> details(const QLatin1Constant& definitionName, const QLatin1Constant& fieldName, const QString& value);
+#else
+    template <int N> QContactDetail detail(const QLatin1Constant<N>& definitionName) const
+    {
+        return detail(definitionName.latin1());
+    }
+    template <int N> QList<QContactDetail> details(const QLatin1Constant<N>& definitionName) const
+    {
+        return details(definitionName.latin1());
+    }
+    template <int N, int M> QList<QContactDetail> details(const QLatin1Constant<N>& definitionName, const QLatin1Constant<M>& fieldName, const QString& value)
+    {
+        return details(definitionName.latin1(), fieldName.latin1(), value);
+    }
+#endif
+
+    /* Templated (type-specific) detail retrieval */
+    template<typename T> QList<T> details() const
+    {
+        QList<QContactDetail> props = details(T::DefinitionName.latin1());
+        QList<T> ret;
+        foreach(QContactDetail prop, props)
+            ret.append(T(prop));
+        return ret;
+    }
+
+    /* Templated (type-specific) detail retrieval base on given detail field name and field value */
+    template<typename T> QList<T> details(const QString& fieldName, const QString& value) const
+    {
+        QList<QContactDetail> props = details(T::DefinitionName, fieldName, value);
+        QList<T> ret;
+        foreach(QContactDetail prop, props)
+            ret.append(T(prop));
+        return ret;
+    }
+
+    template<typename T> QList<T> details(const char* fieldName, const QString& value) const
+    {
+        QList<QContactDetail> props = details(T::DefinitionName.latin1(), fieldName, value);
+        QList<T> ret;
+        foreach(QContactDetail prop, props)
+            ret.append(T(prop));
+        return ret;
+    }
+
+    template<typename T> T detail() const
+    {
+        return T(detail(T::DefinitionName.latin1()));
+    }
+
+};
+
+// Stub for QContactManager
+//class QContactManager : public QObject
+class QContactManager
+{
+//    Q_OBJECT
+
+public:
+
+#if Q_QDOC // qdoc's parser fails to recognise the default map argument
+
+    inline explicit QContactManager(const QString& managerName = QString(), const QMap<QString, QString>& parameters = 0, QObject* parent = 0)
+    {
+			Q_UNUSED(managerName);
+    	Q_UNUSED(parameters;
+			Q_UNUSED(parent);
+    }
+
+    inline QContactManager(const QString& managerName, int implementationVersion, const QMap<QString, QString>& parameters = 0, QObject* parent = 0)
+    {
+			Q_UNUSED(managerName);
+			Q_UNUSED(implementationVersion);
+    	Q_UNUSED(parameters);
+			Q_UNUSED(parent);
+  	}
+
+#else
+
+     inline explicit QContactManager(const QString& managerName = QString(), const QMap<QString, QString>& parameters = (QMap<QString, QString>()), QObject* parent = 0)
+    {
+			Q_UNUSED(managerName);
+    	Q_UNUSED(parameters);
+			Q_UNUSED(parent);
+    }
+
+    inline QContactManager(const QString& managerName, int implementationVersion, const QMap<QString, QString>& parameters = (QMap<QString, QString>()), QObject* parent = 0)
+    {
+    	Q_UNUSED(managerName);
+			Q_UNUSED(implementationVersion);
+    	Q_UNUSED(parameters);
+			Q_UNUSED(parent);
+    }
+
+#endif
+//    explicit QContactManager(QObject* parent);
+
+//    static QContactManager* fromUri(const QString& uri, QObject* parent = 0);
+    inline ~QContactManager()
+    {
+
+    }
+
+    /* Contacts - Accessors and Mutators */
+//    QList<QContactLocalId> contactIds(const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>()) const;
+
+		// QContactLocalId - Check
+		// QContactFilter - Check
+		// QContactSortOrder - Check
+		// QContactFetchHint - Check
+
+
+    inline QList<QContactLocalId> contactIds(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>()) const
+    {
+    	Q_UNUSED(filter);
+    	Q_UNUSED(sortOrders);
+
+    	QList<QContactLocalId> list;
+    	list.append(12);
+    	list.append(24);
+    	list.append(48);
+
+    	ContactIdsCalled = true;
+
+    	return list;
+    }
+
+//    QList<QContact> contacts(const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>(), const QContactFetchHint& fetchHint = QContactFetchHint()) const;
+//    QList<QContact> contacts(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>(), const QContactFetchHint& fetchHint = QContactFetchHint()) const;
+    inline QContact contact(const QContactLocalId& contactId, const QContactFetchHint& fetchHint = QContactFetchHint()) const  // retrieve a contact
+    {
+        Q_UNUSED(fetchHint);
+
+        QContact cnt;
+
+        int keu = contactId;
+
+        switch (keu)
+            {
+            case 12:
+
+            break;
+
+            case 24:
+
+            break;
+
+            case 48:
+
+            break;
+
+            default:
+            break;
+            }
+
+
+
+			return cnt;
+    }
+
+
+
+};
+
+//QTM_END_NAMESPACE
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,476 @@
+/*
+* 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 "qtcontacts.h"
+#include "nmcontacthistorymodel.h"
+
+#include "nmcontacthistorymodel_p.h"
+#include "unittest_nmcontacthistorymodel_p.h"
+
+Q_DEFINE_LATIN1_CONSTANT(QContactEmailAddress::FieldEmailAddress, "EmailAddress");
+Q_DEFINE_LATIN1_CONSTANT(QContactName::DefinitionName, "Name");
+Q_DEFINE_LATIN1_CONSTANT(QContactEmailAddress::DefinitionName, "EmailAddress");
+Q_DEFINE_LATIN1_CONSTANT(QContactName::FieldFirstName, "FirstName");
+Q_DEFINE_LATIN1_CONSTANT(QContactName::FieldLastName, "LastName");
+
+bool constructorCalled;
+bool destructorCalled;
+bool entryCountCalled;
+bool getEntryCalled;
+bool nameOrderCalled;
+
+bool setDetailDefinitionNameCalled;
+bool setMatchFlagsCalled;
+bool setValueCalled;
+bool ContactIdsCalled;
+
+bool fillMruWithFalseValues;
+bool returnZeroEmails;
+
+// -----------------------------------------------------------------------------
+// initTestCase
+// -----------------------------------------------------------------------------
+//
+void TestNmContactHistoryModelPrivate::initTestCase()
+{
+    // Put some allied forces operation names in to array for testing.
+    mTestNames << "Oatmeal" << "Olive" << "Olympic" << "Open Door" << "Opium" <<
+    "Orange" << "Oration" << "Outflank" << "Overlord" << "Overthrow";
+}
+
+// -----------------------------------------------------------------------------
+// init
+// -----------------------------------------------------------------------------
+//
+void TestNmContactHistoryModelPrivate::init()
+{
+    constructorCalled = false;
+    destructorCalled = false;
+    entryCountCalled = false;
+    getEntryCalled = false;
+    nameOrderCalled = false;
+
+    setDetailDefinitionNameCalled = false;
+    setMatchFlagsCalled = false;
+    setValueCalled = false;
+    ContactIdsCalled = false;
+
+    fillMruWithFalseValues = false;
+    returnZeroEmails = false;
+
+    mTestObject = 0;
+    mSignalEmitted = false;
+    mTestObject = new NmContactHistoryModelPrivate(EmailAddressModel);
+
+    QVERIFY(mTestObject);
+
+    mTestObject->mModelReady = false;
+}
+
+// -----------------------------------------------------------------------------
+// cleanup
+// -----------------------------------------------------------------------------
+//
+void TestNmContactHistoryModelPrivate::cleanup()
+{
+    if(mTestObject)
+    {
+        delete mTestObject;
+        mTestObject = 0;
+    }
+}
+
+// -----------------------------------------------------------------------------
+// cleanupTestCase
+// -----------------------------------------------------------------------------
+//
+
+void TestNmContactHistoryModelPrivate::cleanupTestCase()
+{
+    mTestNames.clear();
+}
+
+void TestNmContactHistoryModelPrivate::test_queryMruDatabase() // Ready
+{
+    /* Email MRU Stub will always return following values:
+       (if fillMruWithFalseValue == true)
+
+    displayName = ""; [0]
+    address = "camel.case@plusplus.com";
+
+    displayName = "Agent Plus"; [1]
+    address = "plus@plusplus.com";
+
+    displayName = "Agent Smith"; [2]
+    address = "noreply@mib.com"; */
+
+    mTestObject->mMruMatches.clear();
+    mTestObject->mMruList.clear();
+
+    QVERIFY(mTestObject->mMruMatches.count() == 0);
+
+    // Test query with empty string
+    fillMruWithFalseValues = true;
+
+    bool rValue = mTestObject->queryMruDatabase(QString());
+
+    QVERIFY( entryCountCalled );
+    QVERIFY( getEntryCalled );
+    QVERIFY( rValue );
+
+    //TODO: Fix the "bug"
+    //QVERIFY(mTestObject->mMruMatches.count() == 0);
+
+    // Test query with no display name
+    // and using the start of the email as display name
+    mTestObject->mMruMatches.clear();
+    mTestObject->mMruList.clear();
+
+    rValue = mTestObject->queryMruDatabase("Camel");
+    QVERIFY( rValue );
+
+    rValue = mTestObject->mMruMatches.contains("camel.case");
+    QVERIFY( rValue );
+
+    QVERIFY(mTestObject->mMruMatches.count() == 1);
+
+    // Test query with match in email
+
+    mTestObject->mMruMatches.clear();
+    mTestObject->mMruList.clear();
+
+    rValue = mTestObject->queryMruDatabase("noReply");
+
+    QVERIFY( rValue );
+    rValue = mTestObject->mMruMatches.contains("camel.case");
+    QVERIFY(mTestObject->mMruMatches.count() == 1);
+}
+
+void TestNmContactHistoryModelPrivate::test_queryContactDatabase() // Ready.
+{
+    QVERIFY(mTestObject->mModelItemList.count() == 0);
+    QVERIFY(mTestObject->mPrivateItemList.count() == 0);
+
+    QList<QContactLocalId> rValues;
+
+    rValues = mTestObject->queryContactDatabase("MATRIX");
+
+    QVERIFY( setDetailDefinitionNameCalled );
+    QVERIFY( setMatchFlagsCalled );
+    QVERIFY( setValueCalled );
+    QVERIFY( ContactIdsCalled );
+
+    QVERIFY( rValues.contains(12) );
+    QVERIFY( rValues.contains(24) );
+    QVERIFY( rValues.contains(48) );
+
+}
+
+void TestNmContactHistoryModelPrivate::test_populateListWithMruItems() // Ready
+{
+    QVERIFY(mTestObject->mModelItemList.count() == 0);
+    QVERIFY(mTestObject->mPrivateItemList.count() == 0);
+
+    mTestObject->mMruMatches.clear();
+
+    //MRU (key = name, value = address);
+    mTestObject->mMruMatches.insert("Test Name","name@test.com");
+    mTestObject->mMruMatches.insert("Tset Eman","eman@tset.com");
+    mTestObject->mMruMatches.insert("Tset, Tset","test@name.com");
+
+    mTestObject->populateListWithMruItems("Name");
+
+    QVERIFY( mTestObject->mPrivateItemList.count() == 1 );
+
+    QSharedPointer<NmContactHistoryModelItemData> itemData = mTestObject->mPrivateItemList[0];
+    QVERIFY( itemData->mItems[0].mMatchingRanges.count() == 2 );
+    QVERIFY( itemData->mItems[1].mMatchingRanges.count() == 2 );
+
+    QString dbgString = itemData->mItems[0].mItemText;
+
+    int markup1Start = itemData->mItems[0].mMatchingRanges[0];
+    int markup1Stop = itemData->mItems[0].mMatchingRanges[1];
+
+    int markup2Start = itemData->mItems[1].mMatchingRanges[0];
+    int markup2Stop = itemData->mItems[1].mMatchingRanges[1];
+
+    QVERIFY( markup1Start == 5 );
+    QVERIFY( markup1Stop == 8 );
+
+    QVERIFY( markup2Start == 0 );
+    QVERIFY( markup2Stop == 3 );
+
+    // Second Test (Double markup in the name + no email match)
+    mTestObject->mPrivateItemList.clear();
+    mTestObject->populateListWithMruItems("Tset");
+
+    QVERIFY( mTestObject->mPrivateItemList.count() == 2 );
+
+    itemData = mTestObject->mPrivateItemList[1];
+    QVERIFY( itemData->mItems[0].mMatchingRanges.count() == 4 );
+    QVERIFY( itemData->mItems[1].mMatchingRanges.count() == 0 );
+
+    dbgString = itemData->mItems[0].mItemText;
+
+    markup1Start = itemData->mItems[0].mMatchingRanges[0];
+    markup1Stop = itemData->mItems[0].mMatchingRanges[1];
+
+    markup2Start = itemData->mItems[0].mMatchingRanges[2];
+    markup2Stop = itemData->mItems[0].mMatchingRanges[3];
+
+    QVERIFY( markup1Start == 0 );
+    QVERIFY( markup1Stop == 3 );
+
+    QVERIFY( markup2Start == 6 );
+    QVERIFY( markup2Stop == 9 );
+}
+
+void TestNmContactHistoryModelPrivate::test_populateListWithContactItems() // Ready
+{
+    QVERIFY(mTestObject->mModelItemList.count() == 0);
+    QVERIFY(mTestObject->mPrivateItemList.count() == 0);
+
+    QList<QContactLocalId> cnt_ids;
+    cnt_ids.append(12);
+
+    // Match in first name.
+    mTestObject->populateListWithContactItems(cnt_ids, "First");
+    QVERIFY( mTestObject->mPrivateItemList.count() == 1 );
+    QSharedPointer<NmContactHistoryModelItemData> itemData = mTestObject->mPrivateItemList[0];
+    QVERIFY( itemData->mItems[0].mMatchingRanges.count() == 2 );
+    QString dbgString = itemData->mItems[0].mItemText;
+
+    int markup1Start = itemData->mItems[0].mMatchingRanges[0];
+    int markup1Stop = itemData->mItems[0].mMatchingRanges[1];
+
+    QVERIFY( markup1Start == 0 );
+    QVERIFY( markup1Stop == 4 );
+
+    mTestObject->mPrivateItemList.clear();
+
+    // Match in last name.
+    mTestObject->populateListWithContactItems(cnt_ids, "Last");
+
+    QVERIFY( mTestObject->mPrivateItemList.count() == 1 );
+    itemData = mTestObject->mPrivateItemList[0];
+    QVERIFY( itemData->mItems[0].mMatchingRanges.count() == 2 );
+    dbgString = itemData->mItems[0].mItemText;
+
+    markup1Start = itemData->mItems[0].mMatchingRanges[0];
+    markup1Stop = itemData->mItems[0].mMatchingRanges[1];
+
+    QVERIFY( markup1Start == 10 );
+    QVERIFY( markup1Stop == 13 );
+
+    mTestObject->mPrivateItemList.clear();
+
+    // Match in email.
+    mTestObject->populateListWithContactItems(cnt_ids, "Email");
+    QVERIFY( mTestObject->mPrivateItemList.count() == 1 );
+    itemData = mTestObject->mPrivateItemList[0];
+    QVERIFY( itemData->mItems[1].mMatchingRanges.count() == 2 );
+    dbgString = itemData->mItems[1].mItemText;
+
+    markup1Start = itemData->mItems[1].mMatchingRanges[0];
+    markup1Stop = itemData->mItems[1].mMatchingRanges[1];
+
+    QVERIFY( markup1Start == 0 );
+    QVERIFY( markup1Stop == 4 );
+
+    mTestObject->mPrivateItemList.clear();
+
+    // No emails.
+    returnZeroEmails = true;
+    mTestObject->populateListWithContactItems(cnt_ids, "First");
+    QVERIFY( mTestObject->mPrivateItemList.count() == 0 );
+}
+
+void TestNmContactHistoryModelPrivate::test_queryDatabases() // Ready
+{
+    mSignalEmitted = false;
+    QObject::connect(mTestObject, SIGNAL(queryCompleted(int)), this, SLOT(handleQueryCompleted(int)));
+
+    mTestObject->queryDatabases("Agent");
+
+    QVERIFY( mSignalEmitted );
+
+    QVERIFY( mTestObject->mMruMatches.count() == 1 );
+    QVERIFY( mTestObject->mPrivateItemList.count() == 1 );
+
+    QVERIFY( constructorCalled );
+    QVERIFY( destructorCalled );
+    QVERIFY( entryCountCalled );
+    QVERIFY( getEntryCalled );
+    QVERIFY( nameOrderCalled );
+
+    QVERIFY( setDetailDefinitionNameCalled );
+    QVERIFY( setMatchFlagsCalled );
+    QVERIFY( setValueCalled );
+    QVERIFY( ContactIdsCalled );
+}
+
+void TestNmContactHistoryModelPrivate::refreshDataModel() // Ready
+{
+    mTestObject->mPrivateItemList.clear();
+
+    QVERIFY(mTestObject->mModelItemList.count() == 0);
+    QVERIFY(mTestObject->mPrivateItemList.count() == 0);
+
+    QSharedPointer<NmContactHistoryModelItemData> itemData (new NmContactHistoryModelItemData);
+
+    // For Display name (ex. John Doe)
+    NmContactHistoryModelSubItem itemSubItem1;
+    // For Email address (ex. john.doe@company.com)
+    NmContactHistoryModelSubItem itemSubItem2;
+
+    itemSubItem1.mItemText = "Test Name";
+    itemSubItem2.mItemText = "test@name.com";
+
+    itemSubItem1.mMatchingRanges.append(0);
+    itemSubItem1.mMatchingRanges.append(itemSubItem1.mItemText.length()-1);
+
+    itemSubItem2.mMatchingRanges.append(0);
+    itemSubItem2.mMatchingRanges.append(itemSubItem2.mItemText.length()-1);
+
+    itemData->mContactId = 12;
+    itemData->mItems.append(itemSubItem1);
+    itemData->mItems.append(itemSubItem2);
+
+    mTestObject->mPrivateItemList.append(itemData);
+
+    mTestObject->refreshDataModel();
+
+    QVERIFY( mTestObject->mModelReady );
+
+    QVERIFY(mTestObject->mPrivateItemList.count() == 1);
+    QVERIFY(mTestObject->mModelItemList.count() == 1);
+
+    QSharedPointer<NmContactHistoryModelItemData> testData1
+    (mTestObject->mPrivateItemList[0]);
+
+//    NmContactHistoryModelItem testData1 = mTestObject->mPrivateItemList[0];
+    NmContactHistoryModelItem testData2 = mTestObject->mModelItemList[0];
+
+    QVERIFY(testData1->mContactId == testData2.contactId());
+    QVERIFY(testData2.subItemCount() == 2);
+
+    NmContactHistoryModelSubItem testItem1 = testData2.subItemAt(0);
+    NmContactHistoryModelSubItem testItem2 = testData2.subItemAt(1);
+
+    QVERIFY( testItem1.mItemText == itemSubItem1.mItemText );
+    QVERIFY( testItem2.mItemText == itemSubItem2.mItemText );
+
+    QVERIFY( testItem1.mMatchingRanges.count() == 2 );
+}
+
+void TestNmContactHistoryModelPrivate::test_rowCount() // Ready
+{
+    QVERIFY(mTestObject->mModelItemList.count() == 0);
+
+    NmContactHistoryModelItem item;
+    item.setContactId(0);
+    mTestObject->mModelItemList.append(item);
+
+    QVERIFY(mTestObject->mModelItemList.count() == 1);
+
+    mTestObject->mModelItemList.clear();
+    QVERIFY(mTestObject->mModelItemList.count() == 0);
+
+}
+
+void TestNmContactHistoryModelPrivate::test_data() // Ready
+{
+    QModelIndex testIndex = QModelIndex();
+    QVariant testVariant = mTestObject->data(testIndex, Qt::DisplayRole);
+    QCOMPARE(testVariant, QVariant());
+
+    for (int i = 0; i < 10; i++)
+    {
+        NmContactHistoryModelItem item;
+        item.setContactId(i);
+        mTestObject->mModelItemList.append(item);
+    }
+
+    mTestObject->mModelItemList.clear();
+}
+
+void TestNmContactHistoryModelPrivate::fillMruMatchList() // Ready
+{
+    mTestObject->mMruList.clear();
+    bool success = mTestObject->fillMruMatchList();
+
+    QVERIFY( constructorCalled );
+    QVERIFY( destructorCalled );
+    QVERIFY( entryCountCalled );
+    QVERIFY( getEntryCalled );
+    QVERIFY( nameOrderCalled );
+
+    QVERIFY( success );
+
+    QVERIFY(mTestObject->mMruList.count() == 2);
+
+    bool containsValue = mTestObject->mMruList.contains("camel.case@plusplus.com");
+    QVERIFY(containsValue);
+
+    containsValue = mTestObject->mMruList.contains("byvalue@plusplus.com");
+    QVERIFY( containsValue );
+}
+
+void TestNmContactHistoryModelPrivate::obeyContactOrder() // Ready
+{
+    QString first = "Test";
+    QString last = "Name";
+
+    // LastNameFirstName
+    mTestObject->mNameOrder = 0;
+    QString resultString = mTestObject->obeyContactOrder(first, last);
+    QVERIFY(resultString == "Name Test");
+
+    // LastNameCommaFirstName
+    mTestObject->mNameOrder = 1;
+    resultString = mTestObject->obeyContactOrder(first, last);
+    QVERIFY(resultString == "Name, Test");
+
+    // FirstNameLastName
+    mTestObject->mNameOrder = 2;
+    resultString = mTestObject->obeyContactOrder(first, last);
+    QVERIFY(resultString == "Test Name");
+
+    // Invalid / Default
+    mTestObject->mNameOrder = 0xDEAD;
+    resultString = mTestObject->obeyContactOrder(first, last);
+    QVERIFY(resultString == "Test Name");
+}
+
+// Signals
+
+void TestNmContactHistoryModelPrivate::test_queryCompleted() // Ready
+{
+    mSignalEmitted = false;
+    QObject::connect(mTestObject, SIGNAL(queryCompleted(int)), this, SLOT(handleQueryCompleted(int)));
+    mTestObject->queryDatabases(QString());
+    QVERIFY( mSignalEmitted );
+}
+
+void TestNmContactHistoryModelPrivate::handleQueryCompleted(int err) // Internal
+{
+   Q_UNUSED(err);
+   mSignalEmitted = true;
+}
+
+QTEST_MAIN(TestNmContactHistoryModelPrivate)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* 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:
+*
+*/
+
+#ifndef __UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
+#define __UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
+
+#include <QtTest/QtTest>
+
+class NmContactHistoryModelPrivate;
+
+class TestNmContactHistoryModelPrivate : public QObject
+{
+    Q_OBJECT
+
+signals:
+
+private slots:
+    /**
+     * called before anything else when test starts
+     */
+    void initTestCase();
+
+  /**
+     * will be called before each testfunction is executed.
+     *
+     */
+    void init();
+
+    /**
+     * will be called after every testfunction.
+     *
+     */
+    void cleanup();
+
+    /**
+     * will be called after testing ends
+     *
+     */
+    void cleanupTestCase();
+
+    // Signal
+
+    void test_queryContactDatabase();
+    void test_queryMruDatabase();
+
+    void test_populateListWithContactItems();
+    void test_populateListWithMruItems();
+
+    void test_rowCount();
+    void test_data();
+
+    void refreshDataModel();
+    void fillMruMatchList();
+    void obeyContactOrder();
+
+    void test_queryDatabases();
+
+    void test_queryCompleted();
+    void handleQueryCompleted(int err);
+
+private:
+
+    /**
+     * object under test
+     */
+    NmContactHistoryModelPrivate *mTestObject;
+
+    QStringList mTestNames;
+    bool        mSignalEmitted;
+};
+
+#endif //__UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,54 @@
+#
+# 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: 
+#
+
+TEMPLATE = app
+TARGET = 
+DEPENDPATH += . 
+              
+INCLUDEPATH += . \
+         ../../../../../email_plat/contact_history_model_api/inc \
+               /epoc32/include/mw/QtTest \
+         $$MW_LAYER_SYSTEMINCLUDE 
+
+QT += core
+
+CONFIG += qtestlib
+CONFIG += symbian_test 
+
+# Input
+HEADERS += qtcontacts.h 
+#HEADERS += ../../../../../email_plat/contact_history_model_api/inc/nmcontacthistorymodel.h 
+#HEADERS += /inc/nmcontacthistorymodel.h 
+#HEADERS += nmcontacthistorymodel.h
+HEADERS += ../../../inc/nmcontacthistorymodel_p.h
+#HEADERS += nmcontacthistorymodelcommon.h 
+#HEADERS += nmcontacthistorymodel_p.h
+HEADERS += unittest_nmcontacthistorymodel_p.h         
+
+SOURCES += ../../../src/nmcontacthistorymodelitem.cpp 
+SOURCES += ../../../src/nmcontacthistorymodel_p.cpp 
+
+#SOURCES += ../../../src/nmcontacthistorymodel.cpp 
+SOURCES += emailmru_stub.cpp
+SOURCES += unittest_nmcontacthistorymodel_p.cpp 
+
+
+symbian: { 
+    TARGET.CAPABILITY = CAP_APPLICATION
+    EPOCALLOWDLLDATA = 1
+    TARGET.EPOCHEAPSIZE = 0x20000 0x1600000
+    TARGET.UID3 = 0x20000A06
+}
--- a/emailuis/nmailcpplugin/nmailcpplugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailcpplugin/nmailcpplugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -66,6 +66,7 @@
     BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
     "rom/nmailcpplugin.iby CORE_APP_LAYER_IBY_EXPORT_PATH(nmailcpplugin.iby)"
 
+    MMP_RULES += SMPSAFE
 }
 
 TARGET.CAPABILITY = All -TCB
--- a/emailuis/nmailui/conf/nmeditorview.docml	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/conf/nmeditorview.docml	Mon Oct 04 00:05:37 2010 +0300
@@ -129,6 +129,12 @@
                     </layout>
                 </widget>
             </widget>
+            <widget name="attachmentTypeToolbarExtension" type="HbListWidget">
+                <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint type="PREFERRED" width="expr(var(hb-param-screen-short-edge)*2/3)"/>
+                <sizehint height="0" type="MINIMUM" width="expr(var(hb-param-screen-short-edge)*2/3)"/>
+                <sizehint type="MAXIMUM" width="var(hb-param-screen-short-edge)"/>
+            </widget>
             <layout type="anchor">
                 <anchoritem dst="scrollArea" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
                 <anchoritem dst="scrollArea" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
@@ -136,7 +142,6 @@
                 <anchoritem dst="scrollArea" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
             </layout>
         </widget>
-        <string name="title"/>
     </widget>
     <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
--- a/emailuis/nmailui/conf/nmmessagesearchlistview.docml	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/conf/nmmessagesearchlistview.docml	Mon Oct 04 00:05:37 2010 +0300
@@ -5,20 +5,26 @@
             <widget name="SearchPanel" type="HbSearchPanel">
                 <real name="z" value="1"/>
             </widget>
+            <widget name="MessageTreeList" type="HbTreeView">
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+            </widget>
             <widget name="MessageNoMessages" type="HbLabel">
                 <enums name="textWrapping" value="TextWordWrap"/>
                 <enums name="alignment" value="AlignLeft|AlignVCenter|AlignHCenter|AlignLeading"/>
                 <sizehint height="expr(var(hb-param-screen-height) )" type="PREFERRED" width="expr(var(hb-param-screen-width) )"/>
-                <contentsmargins bottom="0un" left="expr(var(hb-param-margin-indentation) )" right="expr(var(hb-param-margin-indentation) )" top="0un"/>
                 <bool name="enabled" value="FALSE"/>
                 <bool name="visible" value="FALSE"/>
                 <string locid="txt_mail_dblist_no_messages_matched_your_search" name="plainText"/>
                 <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
             </widget>
-            <widget name="MessageTreeList" type="HbTreeView">
-                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+        </widget>
+        <string name="title" value="Search"/>
+    </widget>
+    <section name="portrait">
+        <widget name="Container" role="HbView:widget" type="HbWidget">
+            <widget name="MessageNoMessages" type="HbLabel">
+                <contentsmargins bottom="0un" left="expr(var(hb-param-margin-indentation) )" right="expr(var(hb-param-margin-indentation) )" top="0un"/>
             </widget>
-            <real name="z" value="1"/>
             <layout orientation="Vertical" spacing="0un" type="linear">
                 <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
                 <linearitem itemname="MessageNoMessages"/>
@@ -27,10 +33,25 @@
                 <linearitem itemname="SearchPanel"/>
             </layout>
         </widget>
-        <string name="title" value="Search"/>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+    </section>
+    <section name="landscape">
+        <widget name="Container" role="HbView:widget" type="HbWidget">
+            <widget name="MessageNoMessages" type="HbLabel">
+                <contentsmargins bottom="0un" left="expr(var(hb-param-margin-gene-center-align) )" right="expr(var(hb-param-margin-gene-center-align) )" top="0un"/>
+            </widget>
+            <layout orientation="Vertical" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="MessageNoMessages"/>
+                <linearitem itemname="MessageTreeList"/>
+                <stretchitem stretchfactor="1"/>
+                <linearitem itemname="SearchPanel"/>
+            </layout>
+        </widget>
+    </section>
+    <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
         <uistate name="Common ui state" sections="#common"/>
-        <dummydata objectName="MessageTreeList" section="#common" value="app_tree_template5"/>
+        <uistate name="portrait" sections="#common portrait"/>
+        <uistate name="landscape" sections="#common landscape"/>
+        <dummydata objectName="MessageTreeList" section="#common" value="app_tree_template3"/>
     </metadata>
 </hbdocument>
--- a/emailuis/nmailui/conf/nmviewerheader.css	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/conf/nmviewerheader.css	Mon Oct 04 00:05:37 2010 +0300
@@ -20,4 +20,11 @@
   pref-height: var(hb-param-graphic-size-secondary);
   pref-width: var(hb-param-graphic-size-secondary); 
   size-policy: fixed fixed;   
-}
\ No newline at end of file
+}
+
+HbTextEdit#toField::text{
+    left: 4;
+    right: 4;
+    top: 0;
+    bottom: 0;
+}
--- a/emailuis/nmailui/inc/nmapplication.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmapplication.h	Mon Oct 04 00:05:37 2010 +0300
@@ -41,6 +41,8 @@
 class NmUiEffects;
 class HbMessageBox;
 class QTimer;
+class AfActivation;
+class AfActivityStorage;
 
 class NmApplication : public HbApplication
 {
@@ -108,6 +110,8 @@
     bool mApplicationHidden;
     QTimer* mErrorNoteTimer;                // Owned
     NmId mLastErrorMailboxId;
+    AfActivation* mActivation;              // Owned
+    AfActivityStorage* mActivityStorage;    // Owned
 };
 
 #endif // NMAPPLICATION_H
--- a/emailuis/nmailui/inc/nmeditorcontent.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmeditorcontent.h	Mon Oct 04 00:05:37 2010 +0300
@@ -55,6 +55,10 @@
 private:
     void createConnections();
     void removeEmbeddedImages(QString &bodyContent);
+    void convertBodyStylesToDivision(QString &bodyContent);
+    void createDivisionFromHead(QString &bodyContent);
+    void convertBodyToDiv(QString &bodyContent, const QString &replacementString);
+    void convertBGColorToStyle(QString &bodyContent);
 
 signals:
     void setPlainText(const QString&);
--- a/emailuis/nmailui/inc/nmmessagesearchlistview.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmmessagesearchlistview.h	Mon Oct 04 00:05:37 2010 +0300
@@ -107,6 +107,7 @@
     void sendSoftwareInputPanelRequest(QEvent::Type eventType = QEvent::RequestSoftwareInputPanel);
     void vkbOpened();
     void vkbClosed();
+    void loadOrientationSection();
 
 private: // Data
 
--- a/emailuis/nmailui/inc/nmuiheaders.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmuiheaders.h	Mon Oct 04 00:05:37 2010 +0300
@@ -98,6 +98,7 @@
 #include <HbIconAnimationManager>
 #include <HbVkbHostBridge>
 #include <hbevent.h>
+#include <hbstringutil.h>
 
 #include <cntservicescontact.h>
 #include <xqservicerequest.h>
@@ -110,6 +111,8 @@
 #include <fmfiledialog.h>
 #include <xqaiwdecl.h>
 #include <afstorageglobals.h>
+#include <afactivitystorage.h>
+#include <afactivation.h>
 #include <tstasksettings.h>
 
 #include <nmcommon.h>
--- a/emailuis/nmailui/inc/nmuiviewids.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmuiviewids.h	Mon Oct 04 00:05:37 2010 +0300
@@ -73,7 +73,9 @@
         bool service = false,
         QString *subject = NULL,
         QList<NmAddress*> *ccAddressList = NULL,
-        QList<NmAddress*> *bccAddressList = NULL)
+        QList<NmAddress*> *bccAddressList = NULL,
+        QString *bodyText = NULL,
+        QString *bodyTextMimeType = NULL)
     {
         mViewId = viewId;
         mMailboxId = mailboxId;
@@ -86,6 +88,12 @@
         mSubject = subject;
         mCcAddressList = ccAddressList;
         mBccAddressList = bccAddressList;
+        if (bodyText) {
+            mBodyText = *bodyText;
+		}
+		if (bodyTextMimeType) {
+		    mBodyTextMimeType = *bodyTextMimeType;
+		}
     }
 
     inline ~NmUiStartParam()
@@ -181,21 +189,31 @@
         return *mBccAddressList;
     }
 
-    inline void setMailboxId(NmId mailboxId) 
+    inline void setMailboxId(NmId mailboxId)
     {
         mMailboxId = mailboxId;
     }
-    
-    inline void setFolderId(NmId folderId) 
+
+    inline void setFolderId(NmId folderId)
     {
         mFolderId = folderId;
     }
-    
-    inline void setMessageId(NmId messageId) 
+
+    inline void setMessageId(NmId messageId)
     {
         mMessageId = messageId;
     }
 
+    inline const QString &bodyText() const
+    {
+		return mBodyText;
+	}
+
+    inline const QString &bodyMimeType() const
+    {
+		return mBodyTextMimeType;
+	}
+
 private: // Data
 
     NmUiViewId mViewId;
@@ -209,6 +227,8 @@
     QString *mSubject; // owned
     QList<NmAddress*> *mCcAddressList; // owned
     QList<NmAddress*> *mBccAddressList; // owned
+    QString mBodyText;
+    QString mBodyTextMimeType;
 };
 
 
--- a/emailuis/nmailui/inc/nmutilities.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmutilities.h	Mon Oct 04 00:05:37 2010 +0300
@@ -57,6 +57,7 @@
                                             QObject *receiver = 0,
                                             const char *member = 0);
     static QString createReplyHeader(const NmMessageEnvelope &env);
+    static NmAddress *qstringToNmAddress(QString str);
 };
 
 #endif /* NMUTILITIES_H_ */
--- a/emailuis/nmailui/inc/nmviewerheader.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmviewerheader.h	Mon Oct 04 00:05:37 2010 +0300
@@ -26,7 +26,7 @@
 class NmViewerView;
 class HbTextItem;
 class HbGroupBox;
-class HbLabel;
+class HbTextEdit;
 class HbIconItem;
 
 class NmViewerHeader : public HbWidget
@@ -43,7 +43,10 @@
     void rescaleHeader(const QSizeF layoutReso);
     void setView(NmViewerView* view);
     void updateMessageData(NmMessage* message);
-       
+
+private slots:
+    void anchorTapped(const QString &anchor);
+
 private:
     void loadWidgets();
     void setHeaderData();
@@ -60,7 +63,7 @@
     HbTextItem *mSent;                     // Not owned
     HbIconItem *mPrioIcon;              // Not owned
     HbGroupBox *mHeaderBox;             // not owned
-    HbLabel *mRecipientsBox;         // Not owned
+    HbTextEdit *mRecipientsBox;         // Not owned
     NmViewerView *mViewerView;          // Not owned
 
 };
--- a/emailuis/nmailui/inc/nmviewerview.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/inc/nmviewerview.h	Mon Oct 04 00:05:37 2010 +0300
@@ -107,6 +107,7 @@
     void createToolBar();
     void setAttachmentList();
     void createAndShowWaitDialog();
+    bool isInlineImage(NmMessagePart* part);
 
 private:
     NmApplication &mApplication;
@@ -121,6 +122,7 @@
     NmViewerHeader *mHeaderWidget;                   // Not owned
     NmAttachmentListWidget *mAttaListWidget;         // Not owned
     QPointF mHeaderStartScenePos;
+    QPointer<NmOperation> mMessagePartFetchingOperation;    // Not owned
     QPointer<NmOperation> mMessageFetchingOperation; // Not owned 
     QPointF mLatestScrollPos;
     bool mDisplayingPlainText;
--- a/emailuis/nmailui/nmailui.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/nmailui.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -59,6 +59,7 @@
 LIBS += -lnmsettingui
 LIBS += -lnmutilities
 LIBS += -ltstaskmonitorclient
+LIBS += -lafservice
 
 symbian*: {
     INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
@@ -74,6 +75,8 @@
         -lxqserviceutil \
         -lqtcontacts \
         -lfmfiledialog
+
+    MMP_RULES += SMPSAFE
 }
 
 HEADERS += inc/nmeditorcontent.h \
--- a/emailuis/nmailui/src/main.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/main.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -44,7 +44,7 @@
     }
     
     NmApplication app(argc,argv);
-
+    NM_TIMESTAMP("Application started.");
     int ret = app.exec();
     return ret;
 }
--- a/emailuis/nmailui/src/nmapplication.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmapplication.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -49,7 +49,9 @@
   mQueryDialog(NULL),
   mBackButtonPressed(false),
   mApplicationHidden(false),
-  mErrorNoteTimer(NULL)
+  mErrorNoteTimer(NULL),
+  mActivation(NULL),
+  mActivityStorage(NULL)
 {
     // Load the translation file.
     QTranslator *translator = new QTranslator(this);
@@ -60,9 +62,12 @@
     installTranslator(translator);
     setApplicationName(hbTrId("txt_mail_title_mail"));
     
+    mActivation = new AfActivation(this);
+    mActivityStorage = new AfActivityStorage(this);
+    
     quint64 accountId = 0;
     QString activateId = this->activateId();
-    if (activateReason() == Hb::ActivationReasonActivity &&
+    if (mActivation->reason() == Af::ActivationReasonActivity &&
         activateId.startsWith(NmActivityName) ) {
         QString accountIdString = activateId.mid(NmActivityName.length());
         accountId = accountIdString.toULongLong();
@@ -102,7 +107,9 @@
     
     mEffects = new NmUiEffects(*mMainWindow);
     
-    QObject::connect(this, SIGNAL(activate()), this, SLOT(activityActivated()));
+    QObject::connect(
+            mActivation, SIGNAL(activated(Af::ActivationReason, QString, QVariantHash)), 
+            this, SLOT(activityActivated()));
 }
 
 
@@ -161,6 +168,8 @@
     delete mMainWindow;
     delete mAttaManager;
     delete mSettingsViewLauncher;
+    delete mActivityStorage;
+    delete mActivation;
 }
 
 
@@ -252,6 +261,7 @@
             currentView->viewReady();
             emit applicationReady();
         }
+    NM_TIMESTAMP("Application view ready.");
     }
 }
 
@@ -394,7 +404,10 @@
     taskSettings.setVisibility(false);
     
     // Remove also the mailbox item from the task switcher
-    activityManager()->removeActivity(NmActivityName);
+    bool ok = mActivityStorage->removeActivity(NmActivityName);
+    if(!ok) {
+        NM_COMMENT("Remove activity from Task Switcher failed.");
+    }
 }
 
 
@@ -645,7 +658,10 @@
 {
     NM_FUNCTION;
     
-    activityManager()->removeActivity(NmActivityName);
+    bool ok = mActivityStorage->removeActivity(NmActivityName);
+    if(!ok) {
+        NM_COMMENT("Remove activity from Task Switcher failed.");
+    }
     
     delete mSendServiceInterface;
     mSendServiceInterface = NULL;
@@ -832,8 +848,8 @@
 */
 void NmApplication::updateActivity()
 {
+    bool ok(false);
     NmMailboxMetaData *meta = mUiEngine->mailboxById(mCurrentMailboxId);
-    
     // This will ensure that when service is started as a embedded service and a mail 
     // process already exists the task activity will show the embedded service inside the 
     // calling processes activity and the already running mail process in its own activity.
@@ -845,11 +861,16 @@
             metadata.insert(ActivityScreenshotKeyword, QPixmap::grabWidget(mainWindow(), mainWindow()->rect()));
             metadata.insert(ActivityApplicationName, meta->name());
             metadata.insert(ActivityVisibility, true);
-            activityManager()->removeActivity(NmActivityName);
-            activityManager()->addActivity(NmActivityName, QVariant(), metadata);
+            ok = mActivityStorage->saveActivity(NmActivityName, QVariant(), metadata);
+            if(!ok) {
+                NM_COMMENT("Save activity to Task Switcher failed.");
+            }
         }
         else {
-            activityManager()->removeActivity(NmActivityName);
+            ok = mActivityStorage->removeActivity(NmActivityName);
+            if(!ok) {
+                NM_COMMENT("Remove activity from Task Switcher failed.");
+            }
             TsTaskSettings tasksettings;
             tasksettings.setVisibility(true);
         }
@@ -863,7 +884,7 @@
 {
     quint64 accountId(0);
     QString activateId = this->activateId();
-    if (activateReason() == Hb::ActivationReasonActivity &&
+    if (mActivation->reason() == Af::ActivationReasonActivity &&
             activateId.startsWith(NmActivityName) ) {
         QString accountIdString = activateId.mid(NmActivityName.length());
         accountId = accountIdString.toULongLong();
--- a/emailuis/nmailui/src/nmeditorcontent.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorcontent.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -125,10 +125,18 @@
     }
  
     if (htmlPart) {
-        bodyContent.append(htmlPart->textContent());
+        QString bodyText(htmlPart->textContent());
+        if (editorStartMode==NmUiEditorReply || editorStartMode==NmUiEditorReplyAll || 
+                editorStartMode==NmUiEditorForward) {
+            convertBodyStylesToDivision(bodyText);
+        }
+        
         if(editorStartMode==NmUiEditorReply || editorStartMode==NmUiEditorReplyAll ) {
-            removeEmbeddedImages(bodyContent);
+            removeEmbeddedImages(bodyText);
         }
+        
+        bodyContent.append(bodyText);
+        cursor.insertHtml(bodyContent);
     }
     else if (plainPart) {
         // Plain text part was present, set it to HbTextEdit as HTML
@@ -273,43 +281,45 @@
 void NmEditorContent::ensureCursorVisibility()
 {
     NM_FUNCTION;
-
-    // check which of the editors has the focus and get the x/y coordinates for the cursor position
-    QGraphicsWidget *focused = mScrollAreaContents->focusWidget();
+    
+    QGraphicsItem *focused = NULL;
+    QRectF localRect; // set to empty
     
-    if (focused) {
-        QRectF localRect(0, 0, 0, 0);
-        bool notFound = false;
-        
-        if (focused == mHeader->toEdit()) {
-            localRect = mHeader->toEdit()->rectForCursorPosition();
-        }
-        else if (focused == mHeader->ccEdit()) {
-            localRect = mHeader->ccEdit()->rectForCursorPosition();
-        }
-        else if (focused == mHeader->bccEdit()) {
-            localRect = mHeader->bccEdit()->rectForCursorPosition();
+    // find out which widget has the input focus and get the cursor position ractangle
+    if (mHeader->toEdit() && mHeader->toEdit()->hasInputFocus()) {
+        focused = mHeader->toEdit();
+        localRect = mHeader->toEdit()->rectForCursorPosition();
+    }
+    else if (mHeader->ccEdit() && mHeader->ccEdit()->hasInputFocus()) {
+        focused = mHeader->ccEdit();
+        localRect = mHeader->ccEdit()->rectForCursorPosition();
+    }
+    else if (mHeader->bccEdit() && mHeader->bccEdit()->hasInputFocus()) {
+        focused = mHeader->bccEdit();
+        localRect = mHeader->bccEdit()->rectForCursorPosition();
+    }
+    else if (mHeader->subjectEdit() && mHeader->subjectEdit()->hasInputFocus()) {
+        focused = mHeader->subjectEdit();
+        localRect = mHeader->subjectEdit()->rectForCursorPosition();
+    }
+    else if (mEditorWidget->hasInputFocus()) {
+        focused = mEditorWidget;
+        localRect = mEditorWidget->rectForCursorPosition();
+    }
+
+    // ensure that the cursor position is visible
+    if (focused && !localRect.isEmpty()) {
+        QPointF topLeftPos = focused->mapToItem(mScrollAreaContents, localRect.topLeft());
+        QPointF bottomRightPos =
+            focused->mapToItem(mScrollAreaContents, localRect.bottomRight());
+        qreal marginRight = 0;
+        if (mScrollArea->style()) {
+            mScrollArea->style()->parameter("hb-param-margin-gene-right", marginRight);
         }
-        else if (focused == mHeader->subjectEdit()) {
-            localRect = mHeader->subjectEdit()->rectForCursorPosition();
-        }
-        else if (focused == mEditorWidget) {
-            localRect = mEditorWidget->rectForCursorPosition();
-        }
-        else {
-            notFound = true;
-        }
+        bottomRightPos.rx() += marginRight;
 
-        if (!notFound) {
-            QPointF topLeftPos = focused->mapToItem(mScrollAreaContents, localRect.topLeft());
-            QPointF bottomRightPos =
-                focused->mapToItem(mScrollAreaContents, localRect.bottomRight());
-            qreal marginRight = 0;
-            mScrollArea->style()->parameter("hb-param-margin-gene-right", marginRight);
-            bottomRightPos.rx() += marginRight;
-            mScrollArea->ensureVisible(topLeftPos);
-            mScrollArea->ensureVisible(bottomRightPos);
-        }
+        mScrollArea->ensureVisible(topLeftPos);
+        mScrollArea->ensureVisible(bottomRightPos);
     }
 }
 /*!
@@ -359,3 +369,170 @@
     mHeader->repositHeader(tr);
 }
 
+/*!
+    Removes body bgcolor tag from content and creates DIV from it.
+ */
+void NmEditorContent::convertBodyStylesToDivision(QString &bodyContent)
+{
+    NM_FUNCTION;
+    convertBGColorToStyle(bodyContent);
+  
+    // Make division from the head style body tag
+    createDivisionFromHead(bodyContent);
+}
+
+/*!
+ *  Creates div.reply from the html header styles (if there is any) and applies this 
+ *  style to the message by surrounding the message with the div.reply element.
+ *  
+ *  Example:
+ *  <html><head>
+ *  <style type="text/css">
+ *  body {
+ *  color: #FF0000;
+ *  background-color: #ffffff }
+ *  h3{ color: blue }
+ *  </style></head>
+ *  <body>
+ *  <h3>This is bigger text.</h3>
+ *  This is the body text.
+ *  </body></html>
+ *  
+ *      ---->
+ *      
+ *  <html><head>
+ *  <style type="text/css">
+ *  div.reply {
+ *  color: #FF0000;
+ *  background-color: #ffffff }
+ *  h3 { color: blue }
+ *  </style></head>
+ *  <body>
+ *  <div class="reply">
+ *  <h3>This is bigger text.</h3>
+ *  This is the body text.
+ *  </div></body></html> 
+ *  
+ */
+void NmEditorContent::createDivisionFromHead(QString &bodyContent)
+{
+    NM_FUNCTION;
+    
+    // Regular expression string for searching <head> part that contains <style>
+    QString bodyStyleDefined(
+        "<head"
+        "(\\s)*"    // 0-* white spaces, browsers seem to accept this too.
+        ">"
+        "(.)*"      // 0-* any characters
+        "<style"
+        "(.)*"      // 0-* any characters
+        "</head"
+        "(\\s)*"    // 0-* white spaces
+        ">");
+    QRegExp bodyStyleDefinedRegExp(bodyStyleDefined, Qt::CaseInsensitive);
+    bodyStyleDefinedRegExp.setMinimal(true);
+    
+    QString bodyStartReplacement("<body>\n<div");
+    
+    if(bodyContent.contains(bodyStyleDefinedRegExp)) {
+        QString headPartString = bodyStyleDefinedRegExp.cap(0);
+        QString headBodyStyleString("body(\\s)*");
+        QRegExp bodyStyleReplacementRegExp(headBodyStyleString, Qt::CaseInsensitive);
+        
+        if(headPartString.contains(bodyStyleReplacementRegExp)) {
+            headPartString.replace(bodyStyleReplacementRegExp, "div.reply ");
+            bodyContent.replace(bodyStyleDefinedRegExp, headPartString);
+            
+            bodyStartReplacement = "<body>\n<div class=\"reply\"";
+        }
+    }
+    
+    convertBodyToDiv(bodyContent, bodyStartReplacement);
+}
+
+/*!
+ *  Renames <body...></body> to <div...></div> and creates new <body> element.
+ *  
+ *  Example:
+ *  <body style="background: #00ff00; color: red; border: solid">
+ *  This is the body text.
+ *  </body>
+ *
+ *      ---->
+ *  
+ *  <body>    
+ *  <div style="background: #00ff00; color: red; border: solid">
+ *  This is the body text.
+ *  </div>
+ *  </body>
+ *  
+ *  TODO: Tämä tapahtuu toistaiseksi riippumatta siitä onko bodyssa style-määrittelyä.
+ *  TODO: Entä jos dokumentissa on määritelty useampi <body>? 
+ */
+void NmEditorContent::convertBodyToDiv(QString &bodyContent, const QString &replacementString)
+{
+    NM_FUNCTION;
+    
+    QString bodyStart("<body");
+    QString bodyEnd("</body>");
+    QString bodyEndReplacement("</div></body>");
+    QRegExp bodyStartRegExp(bodyStart, Qt::CaseInsensitive);
+    QRegExp bodyEndRegExp(bodyEnd, Qt::CaseInsensitive);
+    
+    bodyContent.replace(bodyStartRegExp, replacementString);
+    bodyContent.replace(bodyEndRegExp, bodyEndReplacement);    
+}
+
+/*!
+ *  Converts "body bgcolor=#color" attribute to "body style=background: #color".
+ *  
+ *  Example:
+ *  <body bgcolor="blue"></body> 
+ *  
+ *              ----->
+ *  
+ *  <body style="background:blue"></div></body>
+ */
+void NmEditorContent::convertBGColorToStyle(QString &bodyContent)
+{
+    NM_FUNCTION;
+    
+    QString bgColorInBodyFetchString("<body[^<]+(bgcolor(\\s|)=(\\s|)(\"|)(#|))*>");
+    QRegExp bgColorInBodyRegExp(bgColorInBodyFetchString, Qt::CaseInsensitive);
+    
+    if(bodyContent.contains(bgColorInBodyRegExp)) {
+        // There can be only one meaningful bgcolor, the first one.
+        QString bgColorString = bgColorInBodyRegExp.cap(0);
+        
+        // Extract the color code from the string
+        QString colorCode(bgColorString);
+        QRegExp removeBeginningRegExp(
+            "<body"
+            "[^<]+"         // 1...* any character except '<'
+            "bgcolor"
+            "(\\s|)"        // White space or nothing
+            "="
+            "(\\s|)"        // White space or nothing
+            "(\"|)"         // '"' or nothing
+            "(#|)",         // '#' or nothing
+            Qt::CaseInsensitive);
+        colorCode.remove(removeBeginningRegExp);
+        
+        QRegExp removeEndRegExp(""
+            "((\"|\\s)"     // '"' or white space
+            "([^<]*)"       // 0...* any characters except '<'
+            ">)"            // '>'           
+            "|>");          // ... or nothing before this, just '>'
+        colorCode.remove(removeEndRegExp);
+        
+        QString plainBgColorFetchString("bgcolor(\\s|)*=(\\s|)*[^\\s]+(\\s|(?=>))");
+        QString bgColorReplacement("style=\"background: #"+colorCode+"\" ");
+        QRegExp plainBgColorFetchRegExp(plainBgColorFetchString, Qt::CaseInsensitive);
+        
+        // Create temporary string for bgcolor
+        bgColorString.replace(plainBgColorFetchRegExp, bgColorReplacement);
+        
+        // Copy the contents of the temporary string to the message
+        bodyContent.replace(bgColorInBodyRegExp, bgColorString);
+    }    
+}
--- a/emailuis/nmailui/src/nmeditorview.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorview.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -19,6 +19,8 @@
 // Layout file and view
 static const char *NMUI_EDITOR_VIEW_XML = ":/docml/nmeditorview.docml";
 static const char *NMUI_EDITOR_VIEW = "editorview";
+static const char *NMUI_EDITOR_VIEW_ATTACHMENT_EXTENSION =
+    "attachmentTypeToolbarExtension";
 
 // extension list item frame.
 static const QString NmPopupListFrame = "qtg_fr_popup_list_normal";
@@ -27,13 +29,17 @@
 static const QString NmPriorityNormal("normal");
 static const QString NmPriorityHigh("high");
 
+static const QString NmMimeTypeHtml("text/html");
+
+
 /*!
 	\class NmEditorView
 	\brief Mail editor view
 */
 
+
 /*!
-    Constructor
+    Class constructor.
 */
 NmEditorView::NmEditorView(
     NmApplication &application,
@@ -41,78 +47,93 @@
     NmUiEngine &uiEngine,
     NmAttachmentManager &attaManager,
     QGraphicsItem *parent)
-    : NmBaseView(startParam, application, parent),
-      mApplication(application),
-      mUiEngine(uiEngine),
-      mAttaManager(attaManager),
-      mDocumentLoader(NULL),
-      mHeaderWidget(NULL),
-      mMessage(NULL),
-      mContent(NULL),
-      mAttachmentListContextMenu(NULL),
-      mMessageCreationOperation(NULL),
-      mAddAttachmentOperation(NULL),
-      mRemoveAttachmentOperation(NULL),
-      mWaitDialog(NULL),
-      mQueryDialog(NULL),
-      mAttachmentPicker(NULL),
-      mCcBccFieldVisible(false),
-      mServiceSendingDialog(NULL),
-      mHiddenPriorityName(NmPriorityNormal)
+: NmBaseView(startParam, application, parent),
+  mApplication(application),
+  mUiEngine(uiEngine),
+  mAttaManager(attaManager),
+  mDocumentLoader(NULL),
+  mHeaderWidget(NULL),
+  mMessage(NULL),
+  mContent(NULL),
+  mAttachmentListContextMenu(NULL),
+  mMessageCreationOperation(NULL),
+  mAddAttachmentOperation(NULL),
+  mRemoveAttachmentOperation(NULL),
+  mWaitDialog(NULL),
+  mQueryDialog(NULL),
+  mAttachmentPicker(NULL),
+  mCcBccFieldVisible(false),
+  mServiceSendingDialog(NULL),
+  mTBExtnContentWidget(NULL),
+  mHiddenPriorityName(NmPriorityNormal)
 {
     NM_FUNCTION;
-    
-    mDocumentLoader	= new NmUiDocumentLoader( mApplication.mainWindow() );
-    // Set object name
-    setObjectName("NmEditorView");
-    // call the createToolBar on load view layout
+
+    mDocumentLoader = new NmUiDocumentLoader(mApplication.mainWindow());
+
+    // Set the object name.
+    setObjectName(QString(NMUI_EDITOR_VIEW));
+
+    // Load the view layout.
+    loadViewLayout();
+
+    // Create the toolbar.
     createToolBar();
-    // Load view layout
-    loadViewLayout();
 }
 
+
 /*!
-    Destructor
+    Class destructor.
 */
 NmEditorView::~NmEditorView()
 {
     NM_FUNCTION;
-    
+
     if (mRemoveAttachmentOperation && mRemoveAttachmentOperation->isRunning()) {
         mRemoveAttachmentOperation->cancelOperation();
     }
+
     if (mAddAttachmentOperation && mAddAttachmentOperation->isRunning()) {
         mAddAttachmentOperation->cancelOperation();
     }
+
     if (mMessageCreationOperation && mMessageCreationOperation->isRunning()) {
         mMessageCreationOperation->cancelOperation();
     }
+
     delete mMessage;
     mWidgetList.clear();
     delete mDocumentLoader;
     delete mPrioritySubMenu;
-    
+
     if (mAttachmentListContextMenu) {
         mAttachmentListContextMenu->clearActions();
         delete mAttachmentListContextMenu;
     }
+
     delete mWaitDialog;
     delete mQueryDialog;
-    delete mAttachmentPicker;    
+    delete mAttachmentPicker;
     mAttaManager.clearObserver();
     mAttaManager.cancelFetch();
-    
+
     // make sure virtual keyboard is closed
     QInputContext *ic = qApp->inputContext();
+
     if (ic) {
         QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel);
         ic->filterEvent(closeEvent);
         delete closeEvent;
     }
+
+    if (!mTBExtnContentWidget->parent()) {
+        delete mTBExtnContentWidget;
+    }
 }
 
+
 /*!
-    View layout loading from XML
+    Loads the view layout from XML.
 */
 void NmEditorView::loadViewLayout()
 {
@@ -120,39 +141,46 @@
     
     mPrioritySubMenu = NULL;
 
-    // Use document loader to load the view
-    bool ok(false);
-
-    setObjectName(QString(NMUI_EDITOR_VIEW));
+    // Use the document loader to load the view.
     QObjectList objectList;
     objectList.append(this);
-    // Pass the view to documentloader. Document loader uses this view
-    // when docml is parsed, instead of creating new view.
-    // documentloader is created in constructor
+
+    // Pass the view to documentloader. Document loader uses this view when
+    // docml is parsed, instead of creating new view. The document loader is
+    // created in the constructor.
     mDocumentLoader->setObjectTree(objectList);
 
+    bool ok(false);
     mWidgetList = mDocumentLoader->load(NMUI_EDITOR_VIEW_XML, &ok);
 
    if (ok) {
-        mContent = new NmEditorContent(this, mDocumentLoader, 
-            mApplication.networkAccessManager(), mApplication);
+       mContent = new NmEditorContent(this, mDocumentLoader, 
+                                      mApplication.networkAccessManager(),
+                                      mApplication);
 
-        mHeaderWidget = mContent->header();
+       mHeaderWidget = mContent->header();
+
+       // Set default color for user - entered text if editor is in re/reAll/fw
+       // mode.
+       if (mStartParam) {
+           NmUiEditorStartMode mode = mStartParam->editorStartMode();
 
-        // Set default color for user - entered text if editor is in re/reAll/fw mode
-        if (mStartParam) {
-            NmUiEditorStartMode mode = mStartParam->editorStartMode();
-            if (mode == NmUiEditorReply
-                || mode == NmUiEditorReplyAll 
-                || mode == NmUiEditorForward) {
-                mContent->editor()->setCustomTextColor(true, Qt::blue);
-            }
-        }
+           if (mode == NmUiEditorReply ||
+               mode == NmUiEditorReplyAll || 
+               mode == NmUiEditorForward) {
+               mContent->editor()->setCustomTextColor(true, Qt::blue);
+           }
+       }
 
-        // the rest of the view initialization is done in viewReady()
+       // Get the toolbar extension for adding attachments.
+       mTBExtnContentWidget = qobject_cast<HbListWidget *>(
+           mDocumentLoader->findWidget(NMUI_EDITOR_VIEW_ATTACHMENT_EXTENSION));
+
+       // The rest of the view initialization is done in viewReady().
     }
 }
 
+
 /*!
     Reload view contents with new start parameters
     Typically when view is already open and external view activation occurs
@@ -161,7 +189,7 @@
 void NmEditorView::reloadViewContents(NmUiStartParam* startParam)
 {
     NM_FUNCTION;
-    
+
     // Check start parameter validity.
     if (startParam&&startParam->viewId()==NmUiViewMessageEditor) {
         // Delete existing start parameter data
@@ -191,9 +219,9 @@
 void NmEditorView::orientationChanged(Qt::Orientation orientation)
 {
     NM_FUNCTION;
-    
+
     Q_UNUSED(orientation);
-    
+
     // content widget height needs to be set according to the new orientation to get the scroll
 	// area work correctly
 	mHeaderWidget->sendDelayedHeaderHeightChanged();
@@ -205,7 +233,7 @@
  */
 void NmEditorView::vkbOpened()
 {
-    showChrome(false);	
+    showChrome(false);
 }
 
 /*!
@@ -237,7 +265,7 @@
 NmUiViewId NmEditorView::nmailViewId() const
 {
     NM_FUNCTION;
-    
+
     return NmUiViewMessageEditor;
 }
 
@@ -247,9 +275,9 @@
 void NmEditorView::okToExitView()
 {
     NM_FUNCTION;
-       
+
     bool okToExit(true);
-    
+
     if (mContent) {
         NmEditorHeader *header = mContent->header();
         // show the query if the message has not been sent
@@ -259,14 +287,14 @@
             if (header->subjectEdit()) {
                 subjectLength = header->subjectEdit()->text().length();
             }
-            
+
             QList<NmMessagePart*> attachmentList;
             mMessage->attachmentList(attachmentList);
-            
+
             if (mContent->editor()) {
-                okToExit = (subjectLength == 0 && mContent->editor()->document()->isEmpty());            
+                okToExit = (subjectLength == 0 && mContent->editor()->document()->isEmpty());
             }
-    
+
             // content exists, verify exit from user
             if (!okToExit) {
                 if (mQueryDialog) {
@@ -274,14 +302,14 @@
                     mQueryDialog = 0;
                 }
                 // Launch query dialog.
-                mQueryDialog = 
+                mQueryDialog =
                     NmUtilities::displayQuestionNote(hbTrId("txt_mail_dialog_save_message_to_drafts"),
                                                                 this,
                                                                 SLOT(okToExitQuery(HbAction*)));
             }
-        }    
+        }
     }
-    
+
     // no need to query anything, just exit.
     if(okToExit) {
         QMetaObject::invokeMethod(&mApplication,
@@ -296,13 +324,13 @@
 void NmEditorView::okToExitQuery(HbAction *action)
 {
     NM_FUNCTION;
-    
+
     HbMessageBox *dlg = static_cast<HbMessageBox*>(sender());
     // The first action in dialogs action list is for the "Yes"-button.
     if (action == dlg->actions().at(0)) {
         safeToDraft();
-    }    
-    
+    }
+
     // Close the view
     QMetaObject::invokeMethod(&mApplication,
                               "popView",
@@ -340,7 +368,7 @@
 void NmEditorView::aboutToExitView()
 {
     NM_FUNCTION;
-    
+
     // These operations need to be stopped before message can be deleted
     if (mAddAttachmentOperation && mAddAttachmentOperation->isRunning()) {
         mAddAttachmentOperation->cancelOperation();
@@ -365,7 +393,7 @@
 
     // Set mailbox name to title pane
     setMailboxName();
-    
+
     // Connect options menu about to show to create options menu function
     // Menu needs to be create "just-in-time"
     connect(menu(), SIGNAL(aboutToShow()), this, SLOT(createOptionsMenu()));
@@ -373,13 +401,13 @@
     menu()->addAction(dummy);
 
     mVkbHost = new HbShrinkingVkbHost(this);
-    
+
     initializeVKB();
-    
+
     //start to listen VKB open and close signals for hiding the chrome.
     connect(mVkbHost, SIGNAL(keypadOpened()), this, SLOT(vkbOpened()));
     connect(mVkbHost, SIGNAL(keypadClosed()), this, SLOT(vkbClosed()));
-    
+
     connect(mContent->header(), SIGNAL(recipientFieldsHaveContent(bool)),
             this, SLOT(setButtonsDimming(bool)) );
 
@@ -391,16 +419,16 @@
             this, SLOT(openAttachmentTriggered(NmId)));
     connect(mHeaderWidget, SIGNAL(attachmentLongPressed(NmId, QPointF)),
             this, SLOT(attachmentLongPressed(NmId, QPointF)));
-    
+
     if (mStartParam) {
         fetchMessageIfNeeded(*mStartParam);
     }
-    else { // execution cannot proceed without start param 
+    else { // execution cannot proceed without start param
         QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
     }
-    
+
     // Adjust the header width according to the current screen width.
-    mHeaderWidget->adjustHeaderWidth(); 
+    mHeaderWidget->adjustHeaderWidth();
 }
 
 /*!
@@ -411,11 +439,11 @@
 void NmEditorView::fetchMessageIfNeeded(NmUiStartParam &startParam)
 {
     NM_FUNCTION;
-    
+
     if (startParam.editorStartMode() == NmUiEditorForward
         || startParam.editorStartMode()== NmUiEditorReply
         || startParam.editorStartMode() == NmUiEditorReplyAll) {
-    
+
         fetchProgressDialogShow();
         mAttaManager.clearObserver();
         mAttaManager.setObserver(this);
@@ -435,45 +463,45 @@
 void NmEditorView::progressChanged(int value)
 {
     NM_FUNCTION;
-    
+
     Q_UNUSED(value);
 }
 
 /*!
     Slot. Called when attachments fetch is completed. We can start
-    message creation. 
+    message creation.
 */
 void NmEditorView::fetchCompleted(int result)
 {
     NM_FUNCTION;
-    
+
     if (result == NmNoError && mStartParam) {
         startMessageCreation(*mStartParam);
     }
     else {
         // Close "Loading mail content" dialog
         mWaitDialog->close();
-        
+
         // Show a fetching failed note when the failure is not caused by a Device/System failure.
-        if (result != NmNoError && 
+        if (result != NmNoError &&
             result != NmNotFoundError &&
             result != NmGeneralError &&
             result != NmCancelError &&
             result != NmAuthenticationError &&
             result != NmServerConnectionError &&
-            result != NmConnectionError) {         
-            HbNotificationDialog *note = new HbNotificationDialog();            
+            result != NmConnectionError) {
+            HbNotificationDialog *note = new HbNotificationDialog();
             bool enalbeAttribute(true);
-            note->setAttribute(Qt::WA_DeleteOnClose, enalbeAttribute);           
-            note->setIcon(HbIcon(QLatin1String("note_warning")));        
+            note->setAttribute(Qt::WA_DeleteOnClose, enalbeAttribute);
+            note->setIcon(HbIcon(QLatin1String("note_warning")));
             note->setTitle(hbTrId("txt_mail_dpopinfo_loading_failed"));
-            note->setTitleTextWrapping(Hb::TextWordWrap);      
+            note->setTitleTextWrapping(Hb::TextWordWrap);
             note->setDismissPolicy(HbNotificationDialog::TapAnywhere);
-            note->setTimeout(HbNotificationDialog::StandardTimeout);       
+            note->setTimeout(HbNotificationDialog::StandardTimeout);
             note->setSequentialShow(true);
             note->show();
         }
-        
+
         // Go back to Viewer view
         QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
     }
@@ -482,7 +510,7 @@
 void NmEditorView::fetchProgressDialogShow()
 {
     NM_FUNCTION;
-    
+
     delete mWaitDialog;
     mWaitDialog = NULL;
     // Create new wait dialog and set it to me modal with dimmed background
@@ -501,12 +529,12 @@
 void NmEditorView::fetchProgressDialogCancelled()
 {
     NM_FUNCTION;
-    
-    if (mAttaManager.isFetching()) { 
+
+    if (mAttaManager.isFetching()) {
         mAttaManager.cancelFetch();
         mAttaManager.clearObserver();
     }
-    else {   
+    else {
         // For those email has no attachment or attachment has fetched.
         // Go back to Viewer view.
         QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
@@ -516,44 +544,45 @@
 void NmEditorView::startMessageCreation(NmUiStartParam &startParam)
 {
     NM_FUNCTION;
+    NM_TIMESTAMP("Start editor.");
     
     NmUiEditorStartMode startMode = startParam.editorStartMode();
     NmId mailboxId = startParam.mailboxId();
     NmId folderId = startParam.folderId();
     NmId msgId = startParam.messageId();
-    
+
     if (mMessageCreationOperation && mMessageCreationOperation->isRunning()) {
         mMessageCreationOperation->cancelOperation();
     }
-	  
+
     // original message is now fetched so start message creation
     if (startMode == NmUiEditorForward) {
         mMessageCreationOperation = mUiEngine.createForwardMessage(mailboxId, msgId);
     }
     else if (startMode == NmUiEditorReply || startMode == NmUiEditorReplyAll) {
-        mMessageCreationOperation = mUiEngine.createReplyMessage(mailboxId, 
-            msgId, 
+        mMessageCreationOperation = mUiEngine.createReplyMessage(mailboxId,
+            msgId,
             startMode == NmUiEditorReplyAll);
     }
     else if (startMode == NmUiEditorFromDrafts) {
         // Draft opened, so reload message and fill editor with message data.
         mMessage = mUiEngine.message(
-            mStartParam->mailboxId(), 
-            mStartParam->folderId(), 
+            mStartParam->mailboxId(),
+            mStartParam->folderId(),
             mStartParam->messageId());
         fillEditorWithMessageContents();
     }
     else {
         mMessageCreationOperation = mUiEngine.createNewMessage(mailboxId);
     }
-    
+
     // operation continues in messageCreated() once it finishes ok
     if (mMessageCreationOperation) {
         connect(mMessageCreationOperation,
                 SIGNAL(operationCompleted(int)),
                 this,
                 SLOT(messageCreated(int)));
-    }    
+    }
 }
 
 /*!
@@ -562,25 +591,25 @@
 void NmEditorView::startSending()
 {
     NM_FUNCTION;
-    
+
     // The message contents should be verified
     updateMessageWithEditorContents();
-    
+
     // verify addresses before sending
     QList<NmAddress> invalidAddresses;
     if (mMessage) {
         NmUtilities::getRecipientsFromMessage(*mMessage, invalidAddresses, NmUtilities::NmInvalidAddress);
     }
-    
+
     if (invalidAddresses.count() > 0) {
-        
+
         // Invalid addresses found, verify send from user.
         // Set the first failing address to the note.
-        QString noteText = 
+        QString noteText =
             HbParameterLengthLimiter(
                 "txt_mail_dialog_invalid_mail_address_send"
                 ).arg(invalidAddresses.at(0).address());
-        
+
         if (mQueryDialog) {
             delete mQueryDialog;
             mQueryDialog = 0;
@@ -602,7 +631,7 @@
 void NmEditorView::finalizeSending()
 {
     NM_FUNCTION;
-    
+
     QList<NmOperation *> preliminaryOperations;
     if (mAddAttachmentOperation && mAddAttachmentOperation->isRunning()) {
         preliminaryOperations.append(mAddAttachmentOperation);
@@ -620,7 +649,7 @@
 
     // If sending is started as a service, progress dialog needs to be shown
     // so long that sending is finished otherwise we can close pop current view.
-    if (service && mStartParam && mStartParam->service() && 
+    if (service && mStartParam && mStartParam->service() &&
         mUiEngine.isSendingMessage()) {
         connect(&mUiEngine, SIGNAL(sendOperationCompleted()),
             this, SLOT(handleSendOperationCompleted()), Qt::UniqueConnection);
@@ -667,9 +696,9 @@
 void NmEditorView::resizeEvent(QGraphicsSceneResizeEvent *event)
 {
     NM_FUNCTION;
-    
+
     NmBaseView::resizeEvent(event);
-    
+
     emit sizeChanged();
 }
 
@@ -679,6 +708,7 @@
 void NmEditorView::messageCreated(int result)
 {
     NM_FUNCTION;
+    NM_TIMESTAMP("Editor opened.");
     
     delete mMessage;
     mMessage = NULL;
@@ -687,17 +717,17 @@
     if (mWaitDialog) {
         mWaitDialog->close();
     }
-    
+
     if (result == NmNoError && mStartParam && mMessageCreationOperation) {
         NmUiEditorStartMode startMode = mStartParam->editorStartMode();
-        
-        // get message "again" from engine to update the message contents 
+
+        // get message "again" from engine to update the message contents
         mMessage = mUiEngine.message(
-            mStartParam->mailboxId(), 
-            mStartParam->folderId(), 
+            mStartParam->mailboxId(),
+            mStartParam->folderId(),
             mMessageCreationOperation->getMessageId());
-        
-        fillEditorWithMessageContents();       
+
+        fillEditorWithMessageContents();
     }
 }
 
@@ -707,7 +737,7 @@
 void NmEditorView::updateMessageWithEditorContents()
 {
     NM_FUNCTION;
-    
+
     if (mMessage) {
         if (mContent && mContent->editor()) {
             NmMessagePart* bodyPart = mMessage->htmlBodyPart();
@@ -731,7 +761,7 @@
                 // This verification of zero length string isn't needed
                 // after list of addresses
                 if (toFieldText.length() > 0) {
-                    mMessage->envelope().setToRecipients(mContent->header()->toEdit()->emailAddressList());  
+                    mMessage->envelope().setToRecipients(mContent->header()->toEdit()->emailAddressList());
                 }
             }
             if (mContent->header()->ccEdit()) {
@@ -739,7 +769,7 @@
                     mContent->header()->ccEdit()->text();
 
                 if (ccFieldText.length() > 0) {
-                    mMessage->envelope().setCcRecipients(mContent->header()->ccEdit()->emailAddressList());      
+                    mMessage->envelope().setCcRecipients(mContent->header()->ccEdit()->emailAddressList());
                 }
             }
             if (mContent->header()->bccEdit()) {
@@ -747,7 +777,7 @@
                     mContent->header()->bccEdit()->text();
 
                 if (bccFieldText.length() > 0) {
-                    mMessage->envelope().setBccRecipients(mContent->header()->bccEdit()->emailAddressList());  
+                    mMessage->envelope().setBccRecipients(mContent->header()->bccEdit()->emailAddressList());
                 }
             }
         }
@@ -762,7 +792,7 @@
 void NmEditorView::fillEditorWithMessageContents()
 {
     NM_FUNCTION;
-    
+
     if (!mStartParam || !mMessage || !mContent) {
         return;
     }
@@ -774,18 +804,26 @@
 
     if (editorStartMode == NmUiEditorMailto) {
         // Retrieve the message header data e.g. recipients from mStartParam.
-        useStartParam = true;        
+        useStartParam = true;
     }
-    
+
     // Set recipients (to, cc and bcc).
     QString toAddressesString;
     QString ccAddressesString;
     QString bccAddressesString;
 
     if (useStartParam) {
-        toAddressesString = addressListToString(mStartParam->mailtoAddressList());
-        ccAddressesString = addressListToString(mStartParam->ccAddressList());
-        bccAddressesString = addressListToString(mStartParam->bccAddressList());
+        QList<NmAddress *> toAddressList = mStartParam->mailtoAddressList();
+        QList<NmAddress *> ccAddressList = mStartParam->ccAddressList();
+        QList<NmAddress *> bccAddressList = mStartParam->bccAddressList();
+        toAddressesString = addressListToString(toAddressList);
+        ccAddressesString = addressListToString(ccAddressList);
+        bccAddressesString = addressListToString(bccAddressList);
+        // Also add recipients added for example from send service 
+        // interface to recipient line edits.        
+        mContent->header()->toEdit()->addContacts(toAddressList);
+        mContent->header()->ccEdit()->addContacts(ccAddressList);
+        mContent->header()->bccEdit()->addContacts(bccAddressList);
     }
     else {
         toAddressesString = addressListToString(messageEnvelope.toRecipients());
@@ -824,9 +862,9 @@
         setPriority(NmActionResponseCommandNone);
     }
     mHeaderWidget->setPriority(messageEnvelope.priority());
-    
+
     NmMessage *originalMessage = NULL;
-    
+
     // Set the message body.
     if (editorStartMode==NmUiEditorReply||
         editorStartMode==NmUiEditorReplyAll||
@@ -834,8 +872,8 @@
         editorStartMode==NmUiEditorFromDrafts){
 
         // Use the body from the original message.
-        originalMessage = mUiEngine.message(mStartParam->mailboxId(), 
-                                            mStartParam->folderId(), 
+        originalMessage = mUiEngine.message(mStartParam->mailboxId(),
+                                            mStartParam->folderId(),
                                             mStartParam->messageId());
 
         if (originalMessage) {
@@ -860,11 +898,11 @@
         }
 
     }
-    
+
     QString *signature = NULL;
     // return value is not relevant here
     mUiEngine.getSignature(mStartParam->mailboxId(), signature);
-    
+
     mContent->setBodyContent(editorStartMode, originalMessage, signature);
 
     delete signature;
@@ -891,12 +929,21 @@
         addAttachments(*fileList);
     }
 
+    if (mStartParam->bodyText().length()) {
+        // If the content is not HTML, use it as plain text
+        if (mStartParam->bodyMimeType().compare(NmMimeTypeHtml, Qt::CaseInsensitive)) {
+			mContent->editor()->setPlainText(mStartParam->bodyText());
+		}
+		else {
+		    mContent->editor()->setHtml(mStartParam->bodyText());
+		}
+    }
 }
 
 
 /*!
-    createToolBar. Function asks menu commands from extension
-    to be added to toolbar owned by the HbView.
+    Constructs the toolbar according to the actions received from the extension
+    manager.
 */
 void NmEditorView::createToolBar()
 {
@@ -904,59 +951,67 @@
     
     HbToolBar *tb = toolBar();
     NmUiExtensionManager &extMngr = mApplication.extManager();
-    if (tb && &extMngr && mStartParam) {
-        tb->clearActions();
-        NmActionRequest request(this, NmActionToolbar, NmActionContextViewEditor,
-                NmActionContextDataNone, mStartParam->mailboxId(), mStartParam->folderId() );
-        QList<NmAction *> list;
-        extMngr.getActions(request, list);
-        for (int i = 0; i < list.count(); i++) {
-            tb->addAction(list[i]);
-            // If action has NmSendable condition, it is shown only when send action
-            // is available, i.e. when at least one recipient field has data.
-            if( list[i]->availabilityCondition() == NmAction::NmSendable ) {
-                list[i]->setEnabled(false);
-            }
-            else if (list[i]->availabilityCondition() == NmAction::NmAttachable) {
-                HbToolBarExtension* extension = new HbToolBarExtension();
-                mAttachmentPicker = new NmAttachmentPicker(this);
-                
-                if (extension && mAttachmentPicker) {
-                    connect(mAttachmentPicker, SIGNAL(attachmentsFetchOk(const QVariant &)),
-                        this, SLOT(onAttachmentReqCompleted(const QVariant &)));
-                    
-                    connect(this, SIGNAL(titleChanged(QString)), mAttachmentPicker,
-                        SLOT(setTitle(QString)));
+
+    if (!tb || !mStartParam) {
+        return;
+    }
+
+    tb->clearActions();
+
+    NmActionRequest request(this,
+                            NmActionToolbar,
+                            NmActionContextViewEditor,
+                            NmActionContextDataNone,
+                            mStartParam->mailboxId(),
+                            mStartParam->folderId()); 
+    QList<NmAction *> list;
+    extMngr.getActions(request, list);
+
+    for (int i = 0; i < list.count(); i++) {
+        tb->addAction(list[i]);
 
-                    list[i]->setToolBarExtension(extension);
-                    
-                    //content widget to get the items to a list
-                    mTBExtnContentWidget = new HbListWidget();
-                    mTBExtnContentWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
-                    
-                    mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_photo"));
-                    mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_sound"));
-                    mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_video"));
-                    mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_other"));
-                    mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_new_photo"));
-                    mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_new_video"));
-                    HbListViewItem *listView = mTBExtnContentWidget->listItemPrototype();
-                    HbFrameBackground frame(NmPopupListFrame, HbFrameDrawer::NinePieces);
-                    listView->setDefaultFrame(frame);
-                    
-                    connect(mTBExtnContentWidget, SIGNAL(activated(HbListWidgetItem*)), 
-                    		mAttachmentPicker, SLOT (selectFetcher(HbListWidgetItem*)));
+        // If action has NmSendable condition, it is shown only when send
+        // action is available, i.e. when at least one recipient field has
+        // data.
+        if (list[i]->availabilityCondition() == NmAction::NmSendable) {
+            list[i]->setEnabled(false);
+        }
+        else if (list[i]->availabilityCondition() == NmAction::NmAttachable &&
+                 mTBExtnContentWidget) {
+            // Setup the toolbar extension for attachments.
+            HbToolBarExtension* extension = new HbToolBarExtension();
+            extension->setParent(this);
+            list[i]->setToolBarExtension(extension);
+
+            mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_photo"));
+            mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_sound"));
+            mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_video"));
+            mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_other"));
+            mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_new_photo"));
+            mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_new_video"));
+
+            HbListViewItem *listView = mTBExtnContentWidget->listItemPrototype();
+            HbFrameBackground frame(NmPopupListFrame, HbFrameDrawer::NinePieces);
+            listView->setDefaultFrame(frame);
             
-                    connect(mTBExtnContentWidget, SIGNAL(activated(HbListWidgetItem*)),
-                            extension, SLOT(close()));
-                                        
-                    extension->setContentWidget(mTBExtnContentWidget);
-                }
-            }            
-        }        
-    }
+            extension->setContentWidget(mTBExtnContentWidget);
+
+            connect(mTBExtnContentWidget, SIGNAL(activated(HbListWidgetItem*)),
+                    extension, SLOT(close()));
+
+            mAttachmentPicker = new NmAttachmentPicker(this);
+            
+            connect(mAttachmentPicker, SIGNAL(attachmentsFetchOk(const QVariant &)),
+                    this, SLOT(onAttachmentReqCompleted(const QVariant &)));
+            connect(this, SIGNAL(titleChanged(QString)),
+                    mAttachmentPicker, SLOT(setTitle(QString)));
+            connect(mTBExtnContentWidget, SIGNAL(activated(HbListWidgetItem*)), 
+                    mAttachmentPicker, SLOT (selectFetcher(HbListWidgetItem*)));
+        }
+    } // for ()        
 }
 
+
 /*!
     createOptionsMenu. Functions asks menu commands from extension
     to be added to options menu.
@@ -964,7 +1019,7 @@
 void NmEditorView::createOptionsMenu()
 {
     NM_FUNCTION;
-    
+
     menu()->clearActions();
 
 	// Create CC/BCC options menu object
@@ -1003,7 +1058,7 @@
 void NmEditorView::switchCcBccFieldVisibility()
 {
     NM_FUNCTION;
-    
+
     if (mCcBccFieldVisible) {
     	mCcBccFieldVisible = false;
     }
@@ -1020,9 +1075,9 @@
 void NmEditorView::handleActionCommand(NmActionResponse &actionResponse)
 {
     NM_FUNCTION;
-    
+
     NmActionResponseCommand responseCommand = actionResponse.responseCommand();
-    
+
     // Handle options menu
     if (actionResponse.menuType() == NmActionOptionsMenu) {
         setPriority(responseCommand);
@@ -1074,7 +1129,7 @@
 void NmEditorView::setButtonsDimming(bool enabled)
 {
     NM_FUNCTION;
-    
+
     // Set the toolbar action states
     HbToolBar *tb = toolBar();
     if (tb) {
@@ -1109,11 +1164,11 @@
 void NmEditorView::initializeVKB()
 {
     NM_FUNCTION;
-    
+
     if (!mStartParam) {
         return;
     }
-    
+
     NmActionRequest request(this, NmActionVKB, NmActionContextViewEditor,
          NmActionContextDataNone, mStartParam->mailboxId(), mStartParam->folderId() );
     NmUiExtensionManager &extMngr = mApplication.extManager();
@@ -1152,7 +1207,7 @@
 void NmEditorView::setMailboxName()
 {
     NM_FUNCTION;
-    
+
     if (mStartParam){
         NmMailboxMetaData *meta = mUiEngine.mailboxById(mStartParam->mailboxId());
         if (meta){
@@ -1162,28 +1217,28 @@
 }
 
 /*!
-   Adds a prefix to the subject for reply or forward. 
+   Adds a prefix to the subject for reply or forward.
    Strips other occurrences of the prefix from the beginning.
 */
 QString NmEditorView::addSubjectPrefix( NmUiEditorStartMode startMode, const QString &subject )
 {
     NM_FUNCTION;
-    
+
     QString newSubject(subject.trimmed());
-    
-    if (startMode == NmUiEditorReply || startMode == NmUiEditorReplyAll || 
+
+    if (startMode == NmUiEditorReply || startMode == NmUiEditorReplyAll ||
         startMode == NmUiEditorForward) {
-        QString rePrefix(hbTrId("txt_nmailui_reply_subject_prefix"));
-        QString fwPrefix(hbTrId("txt_nmailui_forward_subject_prefix"));
-        
+        QString rePrefix(hbTrId("txt_mail_reply_subject_prefix"));
+        QString fwPrefix(hbTrId("txt_mail_forward_subject_prefix"));
+
         // strip extra prefixes from beginning
         int rePrefixLength(rePrefix.length());
         int fwPrefixLength(fwPrefix.length());
-        
+
         bool startswithRe(newSubject.startsWith(rePrefix, Qt::CaseInsensitive));
         bool startswithFw(newSubject.startsWith(fwPrefix, Qt::CaseInsensitive));
-        
-        while (startswithRe || startswithFw) {            
+
+        while (startswithRe || startswithFw) {
             if (startswithRe) {
                 newSubject.remove(0,rePrefixLength);
                 newSubject = newSubject.trimmed();
@@ -1195,7 +1250,7 @@
             startswithRe = newSubject.startsWith(rePrefix, Qt::CaseInsensitive);
             startswithFw = newSubject.startsWith(fwPrefix, Qt::CaseInsensitive);
         }
-        
+
         if (startMode == NmUiEditorReply || startMode == NmUiEditorReplyAll) {
             newSubject = rePrefix + " " + newSubject;
         }
@@ -1203,19 +1258,19 @@
             newSubject = fwPrefix + " " + newSubject;
         }
     }
-    
+
     return newSubject;
 }
 
 
 /*!
     This slot is called when 'attachment picker' request has been performed succesfully
-    Parameter 'value' contains file currently one file name but later list of the files. 
+    Parameter 'value' contains file currently one file name but later list of the files.
 */
 void NmEditorView::onAttachmentReqCompleted(const QVariant &value)
 {
     NM_FUNCTION;
-    
+
     //temporary fix for music picker back button:
     //it shouldn't emit requestOk signal when nothing is selected
 	if (value.canConvert<QStringList>()) {
@@ -1242,7 +1297,7 @@
 
 /*!
     Closes the wait dialog if one exists.
-    
+
     This slot is called if the mail application has been started as a service
     and is about to close. Closing the application while still sending a message
     may cause unwanted cancelling of the operation.
@@ -1262,9 +1317,10 @@
 /*!
     Add list of attachments
 */
-void NmEditorView::addAttachments(const QStringList& fileNames) 
+void NmEditorView::addAttachments(const QStringList& fileNames)
 {
     NM_FUNCTION;
+    NM_TIMESTAMP("Add attachments.");
     
     // Add attachment name into UI
     foreach (QString fileName, fileNames)  {
@@ -1289,7 +1345,7 @@
                 SIGNAL(operationPartCompleted(const QString &, const NmId &, int)),
                 this,
                 SLOT(oneAttachmentAdded(const QString &, const NmId &, int)));
-    
+
         // Signal to inform the completion of the whole operation
         connect(mAddAttachmentOperation,
                 SIGNAL(operationCompleted(int)),
@@ -1305,11 +1361,11 @@
 void NmEditorView::attachmentLongPressed(NmId attachmentPartId, QPointF point)
 {
     NM_FUNCTION;
-    
+
     // Store id of the attachment to be removed into member.
     // It is used by removeAttachmentTriggered later if 'remove' selected.
     mSelectedAttachment = attachmentPartId;
-	
+
     if (!mAttachmentListContextMenu) {
         mAttachmentListContextMenu = new HbMenu();
     }
@@ -1339,17 +1395,17 @@
 void NmEditorView::oneAttachmentAdded(const QString &fileName, const NmId &msgPartId, int result)
 {
     NM_FUNCTION;
-    
+
     if (result == NmNoError && mMessage) {
         // Need to get the message again because new attachment part has been added.
         NmId mailboxId = mMessage->envelope().mailboxId();
         NmId folderId = mMessage->envelope().folderId();
         NmId msgId = mMessage->envelope().messageId();
-        NmMessagePriority messagePriority = mMessage->envelope().priority();        
-        
+        NmMessagePriority messagePriority = mMessage->envelope().priority();
+
         delete mMessage;
         mMessage = NULL;
-        
+
         mMessage = mUiEngine.message(mailboxId, folderId, msgId);
 
         if (mMessage) {
@@ -1358,7 +1414,7 @@
             // Get attachment list from the message
             QList<NmMessagePart*> attachmentList;
             mMessage->attachmentList(attachmentList);
-        
+
             // Search newly added attachment from the list
             for (int i=0; i<attachmentList.count(); i++) {
                 if (attachmentList[i]->partId() == msgPartId) {
@@ -1385,6 +1441,7 @@
 void NmEditorView::allAttachmentsAdded(int result)
 {
     NM_FUNCTION;
+    NM_TIMESTAMP("All attachments added.");
     
     enableToolBarAttach(true);
     if (result != NmNoError) {
@@ -1393,18 +1450,18 @@
 }
 
 /*!
-   Sets priority for the message object that is being edited 
+   Sets priority for the message object that is being edited
 */
 void NmEditorView::setPriority(NmActionResponseCommand priority)
 {
     NM_FUNCTION;
-    
+
     mHeaderWidget->setPriority(priority);
 
     if (mMessage) {
         NmMessagePriority messagePriority = NmMessagePriorityNormal;
         mHiddenPriorityName = NmPriorityNormal;
-        
+
         if (priority == NmActionResponseCommandPriorityHigh) {
             messagePriority = NmMessagePriorityHigh;
             mHiddenPriorityName = NmPriorityHigh;
@@ -1428,17 +1485,24 @@
 QString NmEditorView::addressListToString(const QList<NmAddress*> &list) const
 {
     NM_FUNCTION;
-    
+
     QString addressesString;
     QList<NmAddress*>::const_iterator i = list.constBegin();
-    
+
     while (i != list.constEnd() && *i) {
-        if (i > list.constBegin()) {
-            // Add the delimiter.
+        // Prioritize display name. Add the delimiter in the end also if
+        // address list ends to display name.
+        if ((*i)->displayName().length() > 0) {
+            addressesString += (*i)->displayName();
             addressesString += NmDelimiter;
         }
-
-        addressesString += (*i)->address();
+        else {
+            if (i > list.constBegin()) {
+                // Add the delimiter.
+                addressesString += NmDelimiter;
+            }
+            addressesString += (*i)->address();
+        }
         ++i;
     }
 
@@ -1456,10 +1520,10 @@
 QString NmEditorView::addressListToString(const QList<NmAddress> &list) const
 {
     NM_FUNCTION;
-    
+
     QString addressesString;
     QList<NmAddress>::const_iterator i = list.constBegin();
-    
+
     while (i != list.constEnd()) {
         if (i > list.constBegin()) {
             // Add the delimiter.
@@ -1479,7 +1543,7 @@
 void NmEditorView::removeAttachmentTriggered()
 {
     NM_FUNCTION;
-    
+
     // Cancel will delete previous operation
     if (mRemoveAttachmentOperation) {
         if (!mRemoveAttachmentOperation->isRunning()) {
@@ -1506,26 +1570,26 @@
 void NmEditorView::attachmentRemoved(int result)
 {
     NM_FUNCTION;
-    
+
     // It is not desided yet what to do if operation fails
     Q_UNUSED(result);
-    
+
     if (mMessage) {
         // Reload message because one attachment has been removed
         NmId mailboxId = mMessage->envelope().mailboxId();
         NmId folderId = mMessage->envelope().folderId();
         NmId msgId = mMessage->envelope().messageId();
-        NmMessagePriority messagePriority = mMessage->envelope().priority();    
+        NmMessagePriority messagePriority = mMessage->envelope().priority();
 
         delete mMessage;
         mMessage = NULL;
-    
+
         mMessage = mUiEngine.message(mailboxId, folderId, msgId);
-        
+
         if(mMessage) {
             // Set the correct priority
-            mMessage->envelope().setPriority(messagePriority);    
-            
+            mMessage->envelope().setPriority(messagePriority);
+
             // If there is no more attachments in the message, set the correct value
             QList<NmMessagePart*> attachmentList;
             mMessage->attachmentList(attachmentList);
@@ -1552,7 +1616,7 @@
     file.close();
     if ( error == NmNotFoundError ) {
         HbMessageBox *box = NmUtilities::displayWarningNote(hbTrId("txt_mail_dialog_unable_to_open_attachment_file_ty"));
-        box->setAttribute(Qt::WA_DeleteOnClose); 
+        box->setAttribute(Qt::WA_DeleteOnClose);
     }
 }
 
@@ -1562,7 +1626,7 @@
 void NmEditorView::enableToolBarAttach(bool enable)
 {
     NM_FUNCTION;
-    
+
     HbToolBar *tb = toolBar();
     if (tb) {
         QList<QAction *> toolbarList = tb->actions();
--- a/emailuis/nmailui/src/nmmailboxserviceinterface.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmmailboxserviceinterface.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -59,8 +59,8 @@
 void NmMailboxServiceInterface::displayInboxByMailboxId(QVariant data)
 {
     NM_FUNCTION;
-
-
+    NM_TIMESTAMP("Opening message list view starts.");
+    
     // Get the given ID and convert it into NmId type.
     NmId mailboxNmId(data.toULongLong());
 
--- a/emailuis/nmailui/src/nmmessagelistview.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistview.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -528,6 +528,7 @@
             case NmActionResponseCommandNewMail: {
                 // Check that given start response has mailbox and folder id's
                 if (actionResponse.mailboxId()!=0){
+                    NM_TIMESTAMP("New Mail chose from menu.");
                     NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
                             actionResponse.mailboxId(), mStartParam->folderId());
                     // startParam ownerhips transfers
@@ -564,16 +565,27 @@
         switch (actionResponse.responseCommand()){
            case NmActionResponseCommandOpen:{
                if (mLongPressedItem){
-                   NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageViewer,
-                       mStartParam->mailboxId(), mStartParam->folderId(),
-                       mLongPressedItem->envelope().messageId());
-                   mApplication.enterNmUiView(startParam);
+                   NmFolderType folderType = mUiEngine.folderTypeById(mStartParam->mailboxId(),
+                                                mStartParam->folderId());
+                   if (folderType==NmFolderDrafts){
+                       NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
+                           mStartParam->mailboxId(), mStartParam->folderId(),
+                           mLongPressedItem->envelope().messageId(),NmUiEditorFromDrafts);
+                       mApplication.enterNmUiView(startParam);
+                   }
+                   else if (folderType!=NmFolderOutbox){
+                       NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageViewer,
+                           mStartParam->mailboxId(), mStartParam->folderId(),
+                           mLongPressedItem->envelope().messageId());
+                       mApplication.enterNmUiView(startParam);
+                   }
                    mLongPressedItem=NULL;
-                   }
-               }
-               break;
-           default:
-               break;
+                 }
+               break;           
+           }
+           default: {
+               break;           
+           }
         }
     }
 
@@ -582,6 +594,7 @@
         if ( actionResponse.responseCommand() == NmActionResponseCommandNewMail ) {
             // Check that given start response has mailbox and folder id's
             if (actionResponse.mailboxId()!=0){
+                NM_TIMESTAMP("New Mail chose from toolbar.");
                 NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
                         actionResponse.mailboxId(), mStartParam->folderId());
                 // startParam ownerhips transfers
@@ -636,9 +649,6 @@
     NmActionRequest request(this, NmActionToolbar, NmActionContextViewMessageList,
             NmActionContextDataNone, mStartParam->mailboxId(), mStartParam->folderId() );
     NmUiExtensionManager &extMngr = mApplication.extManager();
-    if (!&extMngr) {
-        return;
-    }
     QList<NmAction *> list;
     extMngr.getActions(request, list);
     for (int i = 0; i < list.count(); i++) {
--- a/emailuis/nmailui/src/nmmessagelistviewitem.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistviewitem.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -156,10 +156,10 @@
     if (dividersActive || sentLocalDate == currentdate) {
         QString shortTimeSpec = r_qtn_time_usual;
         QTime time = localTime.time();
-        mTime->setText(locale.format(time, shortTimeSpec));
+        mTime->setText( HbStringUtil::convertDigits(locale.format(time, shortTimeSpec)) );
     } else {
         QString shortDateSpec = r_qtn_date_without_year;
-        mTime->setText(locale.format(sentLocalDate, shortDateSpec));
+        mTime->setText( HbStringUtil::convertDigits(locale.format(sentLocalDate, shortDateSpec)) );
     }
 
     // Subject.
--- a/emailuis/nmailui/src/nmmessagesearchlistview.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagesearchlistview.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -29,6 +29,9 @@
 static const QString NmSearchListViewSpinnerAnimation("qtg_anim_mono_loading");
 static const QString NmSearchListViewSpinnerImage("qtg_anim_mono_loading_1");
 
+static const QString NmSearchListViewPortrait("portrait");
+static const QString NmSearchListViewLandscape("landscape");
+
 
 /*!
     \class NmMessageSearchListView
@@ -147,8 +150,12 @@
 void NmMessageSearchListView::viewReady()
 {
     NM_FUNCTION;
+
+    // Load orientation specific sections.
+    loadOrientationSection();
     
     if (!mViewReady){
+
         // Set the mailbox name to the title pane.
         setViewTitle();
 
@@ -788,6 +795,9 @@
 void NmMessageSearchListView::orientationChanged()
 {
     NM_FUNCTION;
+
+    loadOrientationSection();
+
     if (mSelectTextAfterOrientationChange) {
         mLineEdit->selectAll();
         mSelectTextAfterOrientationChange = false;
@@ -835,4 +845,17 @@
     showItems(Hb::ToolBarItem);
 }
 
+/*!
+    Loads orientation specific sections from docml.
+*/
+void NmMessageSearchListView::loadOrientationSection()
+{
+    QString sectionName(NmSearchListViewPortrait);
+    if (mApplication.mainWindow()->orientation() == Qt::Horizontal) {
+        sectionName = NmSearchListViewLandscape;
+    }
+
+    mDocumentLoader->load(NMUI_MESSAGE_SEARCH_VIEW_XML, sectionName);
+}
+
 // End of file.
--- a/emailuis/nmailui/src/nmrecipientfield.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmrecipientfield.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -74,10 +74,10 @@
         this, SIGNAL(editingFinished()));
     connect(mRecipientsEditor, SIGNAL(selectionChanged()),
         this, SIGNAL(selectionChanged()));
-    connect(mLaunchContactsPickerButton, SIGNAL(pressed()),
-            this, SIGNAL(launchContactsPickerButtonClicked()));
-    connect(mLaunchContactsPickerButton, SIGNAL(pressed()),
-            this, SLOT(launchContactsPicker()));
+    connect(mLaunchContactsPickerButton, SIGNAL(clicked()),
+        this, SIGNAL(launchContactsPickerButtonClicked()));
+    connect(mLaunchContactsPickerButton, SIGNAL(clicked()),
+        this, SLOT(launchContactsPicker()), Qt::QueuedConnection);
 }
 
 
--- a/emailuis/nmailui/src/nmsendserviceinterface.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmsendserviceinterface.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -19,6 +19,8 @@
 //  INCLUDES
 #include "nmuiheaders.h"
 
+
+
 /*!
     \class NmStartParamDataHelper
     \brief A helper class for processing the data given to the actual service.
@@ -31,12 +33,14 @@
         Class constructor.
     */
     inline NmStartParamDataHelper()
-    : mSubject(0),
-      mToAddresses(0),
-      mCcAddresses(0),
-      mBccAddresses(0),
-      mAttachmentList(0),
-      mEditorStartMode(NmUiEditorCreateNew)
+    : mSubject(NULL),
+      mToAddresses(NULL),
+      mCcAddresses(NULL),
+      mBccAddresses(NULL),
+      mAttachmentList(NULL),
+      mEditorStartMode(NmUiEditorCreateNew),
+	  mBodyText(NULL),
+	  mMimeType(NULL)
     {
         NM_FUNCTION;
     }
@@ -57,7 +61,7 @@
     inline bool extractData(const QVariant &data)
     {
         NM_FUNCTION;
-        
+
         bool success(false);
 
         if (data.canConvert(QVariant::Map)) {
@@ -93,30 +97,36 @@
     inline void deleteData()
     {
         NM_FUNCTION;
-        
+
         delete mSubject;
-        mSubject = 0;
+        mSubject = NULL;
 
         if (mToAddresses) {
             qDeleteAll(*mToAddresses);
             delete mToAddresses;
-            mToAddresses = 0;
+            mToAddresses = NULL;
         }
 
         if (mCcAddresses) {
             qDeleteAll(*mCcAddresses);
             delete mCcAddresses;
-            mCcAddresses = 0;
+            mCcAddresses = NULL;
         }
 
         if (mBccAddresses) {
             qDeleteAll(*mBccAddresses);
             delete mBccAddresses;
-            mBccAddresses = 0;
+            mBccAddresses = NULL;
         }
 
         delete mAttachmentList;
-        mAttachmentList = 0;
+        mAttachmentList = NULL;
+
+        delete mBodyText;
+        mBodyText = NULL;
+		
+		delete mMimeType;
+		mMimeType = NULL;
     }
 
 
@@ -130,7 +140,7 @@
     inline bool processMap(const QMap<QString, QVariant> &map)
     {
         NM_FUNCTION;
-        
+
         QMap<QString, QVariant>::const_iterator i = map.constBegin();
         QString key;
         QVariant value;
@@ -162,6 +172,26 @@
                 // Extract the "bcc" recipients.
                 addAddressesToList(value, &mBccAddresses);
             }
+            else if (!key.compare(emailSendBodyTextKey, Qt::CaseInsensitive)) {
+                // Make sure only the last bodytext is used
+                delete mBodyText;
+                mBodyText = NULL;
+                // Extract the "body" text
+                mBodyText = new QString(value.toString());
+            }
+            else if (!key.compare(emailSendAttachmentKey, Qt::CaseInsensitive)) {
+                // Extract the "attachment" part
+                if(!mAttachmentList) {
+				    mAttachmentList = new QStringList();
+				}
+				mAttachmentList->append(value.toStringList());
+            }
+            else if (!key.compare(emailSendBodyMimeTypeKey, Qt::CaseInsensitive)) {
+			    delete mMimeType;
+				mMimeType = NULL;
+                // Extract the "mime type" part
+				mMimeType = new QString(value.toString());
+            }
 
             ++i;
         }
@@ -181,7 +211,7 @@
                                    QList<NmAddress*> **list)
     {
         NM_FUNCTION;
-        
+
         if (!list) {
             // Invalid argument!
             return;
@@ -193,7 +223,7 @@
         switch (dataType) {
             case QVariant::String: {
                 // A single address.
-                NmAddress *address = new NmAddress(addresses.toString());
+                NmAddress *address = NmUtilities::qstringToNmAddress(addresses.toString());
                 foundAddresses.append(address);
                 break;
             }
@@ -202,7 +232,7 @@
                 QStringList addressList = addresses.toStringList();
 
                 foreach (QString addressAsString, addressList) {
-                    NmAddress *address = new NmAddress(addressAsString);
+                    NmAddress *address = NmUtilities::qstringToNmAddress(addressAsString);
                     foundAddresses.append(address);
                 }
 
@@ -232,6 +262,8 @@
     QList<NmAddress*> *mBccAddresses; // Not owned.
     QStringList *mAttachmentList; // Not owned.
     NmUiEditorStartMode mEditorStartMode;
+    QString *mBodyText;
+    QString *mMimeType;
 };
 
 
@@ -267,7 +299,7 @@
 NmSendServiceInterface::~NmSendServiceInterface()
 {
     NM_FUNCTION;
-    
+
     delete mStartParam;
     delete mSelectionDialog;
 }
@@ -281,7 +313,7 @@
 void NmSendServiceInterface::selectionDialogClosed(NmId &mailboxId)
 {
     NM_FUNCTION;
-    
+
     if (mailboxId.id()) { // mailbox selected
         launchEditorView(mailboxId);
     }
@@ -304,20 +336,20 @@
 void NmSendServiceInterface::send(QVariant data)
 {
     NM_FUNCTION;
-    
+
     HbMainWindow *mainWindow(NULL);
-    
+
     // Make sure that qmail stays background if user presses back in editorview
     if (mApplication) {
         mApplication->updateVisibilityState();
-        
+
         mainWindow = mApplication->mainWindow();
         mCurrentView = mainWindow->currentView();
-    
+
         // Hide the current view.
         if (mCurrentView) {
             mCurrentView->hide();
-        }    
+        }
     }
 
     // Check the given data.
@@ -358,7 +390,9 @@
         	true, // start as service
 	        dataHelper.mSubject, // message subject
 	        dataHelper.mCcAddresses, // list containing cc recipient addresses
-    	    dataHelper.mBccAddresses // list containing bcc recipient addresses
+    	    dataHelper.mBccAddresses, // list containing bcc recipient addresses
+    	    dataHelper.mBodyText, // body text
+    	    dataHelper.mMimeType // body text mime type
 	    );
 
         if (count == 1) {
@@ -378,7 +412,7 @@
             if (!XQServiceUtil::isEmbedded()) {
                 XQServiceUtil::toBackground(false);
             }
-            
+
             connect(mSelectionDialog, SIGNAL(selectionDialogClosed(NmId&)),
                     this, SLOT(selectionDialogClosed(NmId&)));
             mSelectionDialog->open();
@@ -396,7 +430,7 @@
 {
     NM_FUNCTION;
     NM_COMMENT(QString("NmSendServiceInterface::launchEditorView(): mailboxId=%1").arg(mailboxId.id()));
-    
+
     // Make the previous view visible again.
     if (mCurrentView) {
         mCurrentView->show();
@@ -406,9 +440,9 @@
     if (mStartParam) {
         // Make sure the NMail application is in the foreground
         if (!XQServiceUtil::isEmbedded()) {
-            XQServiceUtil::toBackground(false);    
+            XQServiceUtil::toBackground(false);
         }
-        
+
         mStartParam->setMailboxId(mailboxId);
         mApplication->enterNmUiView(mStartParam);
         mStartParam = NULL; // ownership passed
@@ -420,7 +454,7 @@
 void NmSendServiceInterface::cancelService()
 {
     NM_FUNCTION;
-    
+
     delete mStartParam;
     mStartParam = NULL;
 
--- a/emailuis/nmailui/src/nmuriserviceinterface.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmuriserviceinterface.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -34,7 +34,8 @@
     : mSubject(NULL),
       mToAddresses(NULL),
       mCcAddresses(NULL),
-      mBccAddresses(NULL)
+      mBccAddresses(NULL),
+      mBodyText(NULL)
     {
         NM_FUNCTION;
     }
@@ -66,6 +67,10 @@
             QString to = uri.path();
             QString cc = uri.queryItemValue(emailSendCcKey);
             QString bcc = uri.queryItemValue(emailSendBccKey);
+			QString bodyText = uri.queryItemValue(emailSendBodyTextKey);
+			if (bodyText.length()) {
+			    mBodyText = new QString(bodyText);
+			}
             
             addAddressesToList(to, &mToAddresses);
             addAddressesToList(cc, &mCcAddresses);
@@ -123,25 +128,28 @@
         NM_FUNCTION;
         
         delete mSubject;
-        mSubject = 0;
+        mSubject = NULL;
 
         if (mToAddresses) {
             qDeleteAll(*mToAddresses);
             delete mToAddresses;
-            mToAddresses = 0;
+            mToAddresses = NULL;
         }
 
         if (mCcAddresses) {
             qDeleteAll(*mCcAddresses);
             delete mCcAddresses;
-            mCcAddresses = 0;
+            mCcAddresses = NULL;
         }
 
         if (mBccAddresses) {
             qDeleteAll(*mBccAddresses);
             delete mBccAddresses;
-            mBccAddresses = 0;
+            mBccAddresses = NULL;
         }
+        
+        delete mBodyText;
+        mBodyText = NULL;
     }
 
 public: // Data
@@ -150,6 +158,7 @@
     QList<NmAddress*> *mToAddresses; // Not owned.
     QList<NmAddress*> *mCcAddresses; // Not owned.
     QList<NmAddress*> *mBccAddresses; // Not owned.
+    QString *mBodyText;
 };
 
 /*!
@@ -265,11 +274,12 @@
     	    0, // message id
     	    NmUiEditorMailto, // editor start mode
 	        dataHelper.mToAddresses, // address list
-    	    0, // attachment list
+    	    NULL, // attachment list
         	true, // start as service
 	        dataHelper.mSubject, // message subject
 	        dataHelper.mCcAddresses, // list containing cc recipient addresses
-    	    dataHelper.mBccAddresses // list containing bcc recipient addresses
+    	    dataHelper.mBccAddresses, // list containing bcc recipient addresses
+    	    dataHelper.mBodyText // body text
 	    );
 
         if (count == 1) {
--- a/emailuis/nmailui/src/nmutilities.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmutilities.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -250,7 +250,7 @@
         // NmMinAttachmentSize (0.1Mb) is the minimum size shown for attachment
         sizeMb = NmMinAttachmentSize;
     }   
-    return QString().sprintf("(%.1f Mb)", sizeMb); // Use loc string when available
+    return HbStringUtil::convertDigits(hbTrId("txt_mail_list_l1_mb").arg(sizeMb, 0, 'f', 1));
 }
 
 /*!
@@ -374,3 +374,28 @@
     ret+="<br></body></html>";
     return ret;
 }
+
+/*
+ * Function creates NmAddress object from a string, which can
+ * be just an email address or display name and email address in format
+ * Firstname Lastname <firstname.lastname@example.com>.
+ * \param str email address string
+ * \return NmAddress with address and possible display name 
+ */
+NmAddress *NmUtilities::qstringToNmAddress(QString str)
+{
+    QRegExp NmEmailDisplayNamePattern("<"+NmEmailAddressPattern.pattern()+">$");
+    NmAddress *nmAddress = NULL;
+    str = str.simplified();
+    if (str.contains(NmEmailDisplayNamePattern)) {
+        QString original = str;
+        QString displayName = str.remove(NmEmailDisplayNamePattern).trimmed();
+        QRegExp NmEmailGreaterThenLessThen(">|<");
+        QString address = original.remove(displayName).remove(NmEmailGreaterThenLessThen).trimmed();
+        nmAddress = new NmAddress(displayName,address);
+    }
+    else {
+        nmAddress = new NmAddress(str);
+    }
+    return nmAddress;
+}
--- a/emailuis/nmailui/src/nmviewerheader.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerheader.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -19,7 +19,6 @@
 #include "nmuiheaders.h"
 
 static const qreal NmHeaderLineOpacity = 0.4;
-static const int NmTextWrapWordOrAnywhere = 4;
 
 /*!
     \class NmViewerHeader
@@ -134,75 +133,100 @@
     }
 }
 
+
 /*!
-    Setter for message object
+    Sets the message and updates the UI according to the given message data.
+
+    \param message The message to set.
 */
 void NmViewerHeader::setMessage(NmMessage* message)
 {
     NM_FUNCTION;
     
-    mMessage=message;
+    mMessage = message;
     setHeaderData();
 }
 
 
 /*!
-    Function updates data in already created objects. New message pointer
-    comes from viewer view, ownership is not transferred.
-    This function gets called when message body is fetched and
-    to/cc/bcc data needs to be updated
+    Updates data in already created objects. The given message pointer comes
+    from the viewer view and the ownership of the instance is not transferred.
+    This method gets called when the message body is fetched and recipient
+    (to/cc/bcc) data needs to be updated.
+
+    Note that if the message has been changed, this method should not be called
+    since this method _only_ updates the recipient data! If the message has been
+    changed, call setMessage() instead.
+
+    \param message The message data.
 */
 void NmViewerHeader::updateMessageData(NmMessage* message)
 {
     NM_FUNCTION;
     
-    if (message){
-        mMessage=message;
-        // Set recipients to text edit field as html 
-        NmAddress sender = mMessage->envelope().sender();      
-        if (mRecipientsBox){  
-            mRecipientsBox->setHtml(formatRecipientList(addressToDisplay(sender),
+    if (message) {
+        mMessage = message;
+
+        // Set recipients to the text edit field as html. 
+        NmAddress sender = mMessage->envelope().sender();
+
+        if (mRecipientsBox) {  
+            mRecipientsBox->setHtml(
+                formatRecipientList(addressToDisplay(sender),
                                     mMessage->envelope().toRecipients(), 
                                     mMessage->envelope().ccRecipients()));
-        }       
+        }
     }
 }
 
+
 /*!
-    Function sets data to header area based on message data
+    Sets the data of the header area based on message data.
 */
 void NmViewerHeader::setHeaderData()
 {
     NM_FUNCTION;
     
     if (mMessage) {
-        // Background is all white always, so force text color to black
+        // Background is all white always, so force text color to black.
         QColor textColor(Qt::black);
+        
+        // Get the message envelope.
         const NmMessageEnvelope &envelope = mMessage->envelope();
+
+        // Set the sender.
         const QString dispName = envelope.sender().displayName();
-        if (dispName.length()>0){
+
+        if (dispName.length()) {
             mSenderName = NmUtilities::cleanupDisplayName(dispName);
         }
         else {
+            // Use the address instead.
             mSenderName = envelope.sender().address();
         }
+
         if (mHeaderBox) {
             mHeaderBox->setHeading(mSenderName);
         }
-        // Set subject text
+
+        // Set the subject text.
         if (mSubject){
             QString subjectText = envelope.subject();
-            if (subjectText.length()){
+
+            if (subjectText.length()) {
                 mSubject->setText(subjectText);
             }
             else{
                 mSubject->setText(hbTrId("txt_mail_dblist_val_no_subject"));
             }
-        mSubject->setTextColor(textColor);
+
+            mSubject->setTextColor(textColor);
         }
-        if (mSent){
+
+        if (mSent) {
             HbExtendedLocale locale = HbExtendedLocale::system();
-            QDateTime localTime = envelope.sentTime().addSecs(locale.universalTimeOffset());
+            QDateTime localTime =
+                envelope.sentTime().addSecs(locale.universalTimeOffset());
             QTime time = localTime.time();
             QDate sentLocalDate = localTime.date();
             QString shortDateSpec = r_qtn_date_without_year;
@@ -210,29 +234,34 @@
             QString text = locale.format(sentLocalDate, shortDateSpec);
             text += " ";
             text += locale.format(time, shortTimeSpec);
-            mSent->setText(text);
+            mSent->setText(HbStringUtil::convertDigits(text));
             mSent->setTextColor(textColor);
-        } 
-        if (mPrioIcon){
-            switch (envelope.priority()){
-                case NmMessagePriorityLow:
+        }
+
+        if (mPrioIcon) {
+            switch (envelope.priority()) {
+                case NmMessagePriorityLow: {
                     mPrioIcon->setObjectName("ViewerHeaderPriorityLow");
                     mPrioIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconPriorityLow));
                     mPrioIcon->show();
                     break;
-                case NmMessagePriorityHigh:
+                }
+                case NmMessagePriorityHigh: {
                     mPrioIcon->setObjectName("ViewerHeaderPriorityHigh");
                     mPrioIcon->setIcon(NmIcons::getIcon(NmIcons::NmIconPriorityHigh));
                     mPrioIcon->show();
                     break;
+                }
                 case NmMessagePriorityNormal:
-                default:
+                default: {
                     // Normal priority has no icon so hide the label hide.
                     mPrioIcon->setObjectName("ViewerHeaderPriorityNormal");
                     break;
+                }
             }
         }
     }
+
     createExpandableHeader();
 }
 
@@ -257,10 +286,15 @@
     
     if (mHeaderBox) {        // Initialize recipient box
         if (!mRecipientsBox) {
-            mRecipientsBox = new HbLabel();
-            HbStyle::setItemName(mRecipientsBox, "recipients");
+            mRecipientsBox = new HbTextEdit();
+            mRecipientsBox->setReadOnly(true);
+            mRecipientsBox->document()->
+                    defaultTextOption().setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
+            mRecipientsBox->setObjectName("toField");
+            mRecipientsBox->setBackgroundItem(NULL);
             mRecipientsBox->setFontSpec(HbFontSpec(HbFontSpec::Secondary)); 
-            mRecipientsBox->setTextWrapping((Hb::TextWrapping)NmTextWrapWordOrAnywhere);
+            connect(mRecipientsBox, SIGNAL(anchorTapped(const QString &)),
+                    this, SLOT(anchorTapped(const QString &)));                    
         }              
         if (mMessage) {
             // Set recipients to text edit field as html 
@@ -374,3 +408,15 @@
     return ret;
 }
 
+/*!
+    Function handles cursor position changes in header group box.
+    E.g link handler.
+*/
+void NmViewerHeader::anchorTapped(const QString &anchor)
+{
+    if (mViewerView&&anchor.contains("mailto:",Qt::CaseSensitive)){
+        QUrl url(anchor);     
+        mViewerView->linkClicked(url);
+    }
+}
+
--- a/emailuis/nmailui/src/nmviewerserviceinterface.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerserviceinterface.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -62,7 +62,7 @@
     idList.append(folderId);
     idList.append(messageId);
     QVariant idListAsVariant = QVariant::fromValue(idList);
-    viewMessage(idListAsVariant, QVariant());
+    viewMessage(idListAsVariant, QVariant(EmailBackReturnsToMessageList));
 }
 
 
@@ -78,7 +78,7 @@
 void NmViewerServiceInterface::viewMessage(QVariant idList, QVariant flags)
 {
     NM_FUNCTION;
-    
+
     mAsyncReqId = setCurrentRequestAsync();
 
     NmId mailboxId(0), folderId(0), messageId(0);
@@ -86,7 +86,7 @@
     // Check the given arguments.
     if (idList.canConvert(QVariant::List)) {
         QList<QVariant> ids = idList.toList();
-        
+
         if (ids.count() >= 3) {
             mailboxId = ids[0].toULongLong();
             folderId = ids[1].toULongLong();
@@ -123,7 +123,7 @@
 
         if (addMessageListViewToStack) {
             // Launch the message list view.
-            NmUiStartParam *startParam1 = 
+            NmUiStartParam *startParam1 =
                 new NmUiStartParam(NmUiViewMessageList,
                                    mailboxId,
                                    folderId,
@@ -135,7 +135,7 @@
 
             mApplication->enterNmUiView(startParam1);
         }
-        
+
         // Launch the message view.
         NmUiStartParam *startParam =
             new NmUiStartParam(NmUiViewMessageViewer,
--- a/emailuis/nmailui/src/nmviewerview.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerview.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -33,6 +33,8 @@
 static const QString NmHttpLinkScheme = "http";
 static const QString NmHttpsLinkScheme = "https";
 static const QString NmMailtoLinkScheme = "mailto";
+static const QString NmImagePartInline = "inline";
+static const QString NmImagePartAttachment = "attachment";
 
 // Local constants
 const qreal NmZoomFactor = 1.5;
@@ -64,6 +66,7 @@
 mViewerContent(NULL),
 mWebView(NULL),
 mHeaderWidget(NULL),
+mMessagePartFetchingOperation(NULL),
 mMessageFetchingOperation(NULL),
 mDisplayingPlainText(false),
 mDocumentLoader(NULL),
@@ -258,6 +261,7 @@
 void NmViewerView::loadMessage()
 {
     NM_FUNCTION;
+    NM_TIMESTAMP("Loading message starts.");
     
     if (mMessage) {
         delete mMessage;
@@ -296,7 +300,18 @@
             if (mMessageFetchingOperation && mMessageFetchingOperation->isRunning()) { 
                 mMessageFetchingOperation->cancelOperation();
             }
-            mMessageFetchingOperation = mUiEngine.fetchMessage(mailboxId, folderId, msgId);
+            if (mMessagePartFetchingOperation && mMessagePartFetchingOperation->isRunning()) { 
+                mMessagePartFetchingOperation->cancelOperation();
+            }
+            
+            if(body)
+                {
+                mMessagePartFetchingOperation = mUiEngine.fetchMessagePart(mailboxId, folderId, msgId,body->partId());
+                }
+            else
+                {
+                mMessageFetchingOperation = mUiEngine.fetchMessage(mailboxId, folderId, msgId);
+                }
 
             if (mMessageFetchingOperation) {
                 connect(mMessageFetchingOperation,
@@ -305,6 +320,15 @@
                         SLOT(messageFetched(int)));
                 createAndShowWaitDialog();
             }
+            
+            if (mMessagePartFetchingOperation) {
+                connect(mMessagePartFetchingOperation,
+                        SIGNAL(operationCompleted(int)),
+                        this,
+                        SLOT(messageFetched(int)));
+                createAndShowWaitDialog();
+            }
+            
         } else {
             // message is fetched
             setMessageData();
@@ -321,7 +345,7 @@
     disconnect(mWaitDialog->mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)),
                 this, SLOT(orientationChanged(Qt::Orientation)));
     
-    if (result == NmNoError && mMessageFetchingOperation) {
+    if (result == NmNoError && (mMessageFetchingOperation || mMessagePartFetchingOperation)) {
         if (mMessage) {
             delete mMessage;
             mMessage = NULL;
@@ -351,6 +375,10 @@
         if (mMessageFetchingOperation && mMessageFetchingOperation->isRunning()) { 
 	        mMessageFetchingOperation->cancelOperation();
         }
+        if (mMessagePartFetchingOperation && mMessagePartFetchingOperation->isRunning()) { 
+            mMessagePartFetchingOperation->cancelOperation();
+        }
+        
         mWaitNoteCancelled = true;
         QMetaObject::invokeMethod(&mApplication, "prepareForPopView", Qt::QueuedConnection);
     }
@@ -433,9 +461,8 @@
         mMessage->attachmentList(messageParts);
         for (int i = 0; i < messageParts.count();i++) {
             NmMessagePart *part = messageParts[i];
-            if (part &&
-                ((part->contentDisposition().trimmed().startsWith("inline", Qt::CaseInsensitive)==false) ||
-                 (part->contentType().trimmed().startsWith("image", Qt::CaseInsensitive)==false))) {
+            // Inline images are not displayed in attachment list
+            if (part && !isInlineImage(part)) {               
                 QString fileName = part->attachmentName();
                 // index starts from zero, next index is same as count
                 int attaIndex = mAttaWidget->count();
@@ -448,7 +475,7 @@
                     mAttaIndexUnderFetch = attaIndex;
                 }
                 inserted = true;
-            }
+            }   
         }
         if (inserted) {
             QObject::connect(mAttaWidget, SIGNAL(itemActivated(int)),
@@ -553,8 +580,9 @@
             // Browse through embedded image parts and add those
             // the web view.
             bool isFetched = child->fetchedSize() >= child->size();
-            if(child->contentType().startsWith("image", Qt::CaseInsensitive) &&
-               child->contentDisposition().trimmed().startsWith("inline", Qt::CaseInsensitive)) {
+            // Read inline images to webkit memory if msg part content type IS image and
+            // content disposition IS NOT marked to be attachment
+            if(isInlineImage(child)) {
                 QString contentId = child->contentId();
                 if (isFetched) {
                     int ret = mUiEngine.contentToMessagePart(
@@ -628,32 +656,47 @@
     return msg;
 }
 
+
 /*!
-    Reload view contents with new start parameters
-    Typically when view is already open and external view activation occurs
-    for this same view
+    Reloads the view contents with new given start parameters. Typically, this
+    method is called when the view is already open and an external view
+    activation occurs for this same view.
+
+    \param startParam The new parameters.
 */
 void NmViewerView::reloadViewContents(NmUiStartParam* startParam)
 {
-    // Check start parameter validity, message view cannot
-    // be updated if given parameter is zero.
+    NM_FUNCTION;
+
+    // Check the validity of the start parameters. The message view cannot be
+    // updated if the given message ID is invalid (zero).
     if (startParam && startParam->viewId() == NmUiViewMessageViewer &&
-        startParam->messageId()!= 0) {
-        // Delete existing start parameter data
+        startParam->messageId() != 0) {
+        // Delete the existing start parameters and store the given parameters.
         delete mStartParam;
-        mStartParam = NULL;
-        // Store new start parameter data
         mStartParam = startParam;
-        // Reload viewer with new message information
-        setMessageData();
+
+        // Reload the view using the new message information.
+        setMailboxName();
+        loadMessage(); // Updates mMessage.
+
+        if (mHeaderWidget && mMessage) {
+            // Update the sender, recipient and subject etc.
+            mHeaderWidget->setMessage(mMessage);
+        }
+
+        setMessageData();        
     }
     else {
-        NMLOG("nmailui: Invalid viewer start parameter");
-        // Unused start parameter needs to be deleted
+        NMLOG("NmViewerView::reloadViewContents(): Invalid start parameters!");
+
+        // Since we will not take ownership, the given parameters need to be
+        // deleted.
         delete startParam;
     }
 }
 
+
 /*!
     nmailViewId
 */
@@ -953,6 +996,7 @@
             }
             break;
             case NmActionResponseCommandReplyAll: {
+                NM_TIMESTAMP("Reply All chose.");
                 mAttaManager.cancelFetch();
                 NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
                     mStartParam->mailboxId(), mStartParam->folderId(),
@@ -969,6 +1013,7 @@
             }
             break;
             case NmActionResponseCommandDeleteMail: {
+                NM_TIMESTAMP("Delete from viewer chose.");
                 mAttaManager.cancelFetch();
                 deleteMessage();
                 }
@@ -1033,6 +1078,7 @@
         && (mStartParam->mailboxId()== mailboxId)
         && (mStartParam->folderId()== folderId)
         && (mStartParam->messageId()== messageId)) {
+        NM_TIMESTAMP("Message deleted.");
         mApplication.prepareForPopView();
     }
 }
@@ -1056,3 +1102,34 @@
     // Display wait dialog
     mWaitDialog->show(); 
 }
+
+
+/*!
+    Helper function to determine whether message part is inline image.
+*/
+bool NmViewerView::isInlineImage(NmMessagePart* part)
+{
+    bool ret(false);
+    if (part){
+        // Check whether the message part is image
+        if (part->contentType().trimmed().startsWith("image", Qt::CaseInsensitive)) {
+            bool isMarkedInline(false);
+            bool isMarkedAttachment(false);
+            // Check whether the image has been marked correctly as an inline image
+            if (part->contentDisposition().trimmed().startsWith(NmImagePartInline, Qt::CaseInsensitive)) {
+                isMarkedInline=true;
+            }            
+            // Check whether the image has been marked correctly as an attachment
+            else if (part->contentDisposition().trimmed().startsWith(NmImagePartAttachment, Qt::CaseInsensitive)) {
+                isMarkedAttachment=true;
+            }       
+            // UI handles image as inline if it is correctly marked to be inline
+            // or hasn't been marked at all with content disposition
+            if (isMarkedInline || (!isMarkedInline && !isMarkedAttachment) ) {
+                ret=true;
+            }            
+        }
+    }
+    return ret;
+}
+
Binary file emailuis/nmailui/translations/mail.qm has changed
--- a/emailuis/nmailui/translations/mail.ts	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailui/translations/mail.ts	Mon Oct 04 00:05:37 2010 +0300
@@ -3,7 +3,7 @@
 <TS version="3.0" sourcelanguage="en_GB">
 <context>
 <message numerus="no" id="txt_mail_viewer_no_subject">
-    <comment>text for subject field if there is no subject in the mail message in Mail viewer. In the same field on the previous row the date and time of the message are displayed.</comment>        
+    <comment>Text for subject field if there is no subject in the mail message in Mail viewer. In the same field on the previous row the date and time of the message are displayed.</comment>        
     <source>(No Subject)</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
@@ -23,12 +23,12 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_mail_connection_error">
-    <comment>Error note. This is shown when the sending, receiving etc. occurs.</comment>        
+    <comment>Error note. Occurs when the user switch phone to offline mode and select Refresh from the Options menu. NOTE! Changed to discreet popup (26.08.)</comment>        
     <source>Mail connection error.</source>
     <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-layout_id>qtl_notifdialog_pri</extra-loc-layout_id>    
     <extra-loc-viewid>mail</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
@@ -63,7 +63,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_you_can_not_send_more_than_l1_kb">
-    <comment>Information note. %L1 is the maximum size of all attachments the server allows to be sent at once. If the adds  attachments, which overall size exceeds the limit and presses send this note is shown and the mail is not sent. Maximum number of digits replacing the parameter is 4.</comment>        
+    <comment>Information note. %L1 is the maximum size of all attachments the server allows to be sent at once. If the adds  attachments, which overall size exceeds the limit and presses send this note is shown and the mail is not sent. Maximum number of digits replacing the parameter is 4. Maybe 10.2 content</comment>        
     <source>You can not send more than %L1 Mb as attachments </source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -102,6 +102,16 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_dpopinfo_loading_failed">
+    <comment>Shown when loading of the attachment fails (the user opens a mail with attachments &gt; selects forward &gt; editor starts loading attachments but fails). Linguistic check. NOTE! Status changed (26.08.)</comment>        
+    <source>Loading failed</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>mail</extra-loc-viewid>
+    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_list_photo">
     <comment>Attach toolbar extension item in the editor, opens images fetch for selecting image. Allows the user to attach an image to the message. Note! The text is Image in the visio file but it is not consistent with other apps so it has been decided to change.</comment>        
     <source>Photo</source>
@@ -153,7 +163,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_cannot_download_attachment_1">
-    <comment>Error note. If the user tries to open / save an attachment but downloading it for server fails for some reason. %[]1 is replaced with the name of the attachment.</comment>        
+    <comment>Error note. If the user tries to open / save an attachment but downloading it for server fails for some reason. %[]1 is replaced with the name of the attachment. Maybe 10.2 content?</comment>        
     <source>Cannot download attachment: %[]1 </source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -233,7 +243,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_sending_failed">
-    <comment>This is error note is shown if sending fails. %[]1 is replaced with the name of mail the sending of which failed.</comment>        
+    <comment>This is error note is shown if sending fails. %[]1 is replaced with the name of mail the sending of which failed. Maybe 10.2 content</comment>        
     <source>Sending mail %[]1 failed. Try to send it again or press back to cancel</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -263,7 +273,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_still_sending">
-    <comment>The user cannot access the editor as long as the sending process is ongoing. This note is shown if the user tries to enter email editor. %[]1 is replaced with the name of mail being sent.</comment>        
+    <comment>The user cannot access the editor as long as the sending process is ongoing. This note is shown if the user tries to enter email editor. %[]1 is replaced with the name of mail being sent. Maybe 10.2 content</comment>        
     <source>Still sending mail %[]1. Please wait operation to complete</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -283,7 +293,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_unable_to_complete_command">
-    <comment>Generic error note in mail application</comment>        
+    <comment>Generic error note in mail application. In practice, impossible to tell how to reproduce. Reserved for situations where we don&apos;t have any other text to show. Linguistic verification.</comment>        
     <source>Unable to complete the command</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -313,7 +323,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_list_l1_mb">
-    <comment>the size of the attachment. Maximum number of digits replacing the parameter is 3. The file name truncates if needed. Displayed on the same row and after the name of the attachment.</comment>        
+    <comment>The size of the attachment. Maximum number of digits replacing the parameter is 3. The file name truncates if needed. Displayed on the same row and after the name of the attachment.</comment>        
     <source>(%L1 Mb)</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
@@ -343,7 +353,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_opt_change_folder">
-    <comment>options menu item for changing the folder </comment>        
+    <comment>Options menu item for changing the folder </comment>        
     <source>Folders</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
@@ -443,7 +453,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_loading_mail_content">
-    <comment>Wait note shown until the mail content is loaded. Dublicate. I need to check which one is used in implementation.</comment>        
+    <comment>Wait note shown until the mail content is loaded. </comment>        
     <source>Loading mail content</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
@@ -512,19 +522,9 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mail_dialog_invalid_mail_address">
-    <comment>Note in editor when the user has typed incorrect mail address (e.g. without @-character). %[]1 is replaced with the name of the invalid mail address.</comment>        
-    <source>Invalid mail address: %[]1</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>mail</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_mail_list_new_video">
-    <comment>Attach toolbar extension item in the editor, opens camera for taking a new video</comment>        
-    <source>Camcorder</source>
+    <comment>Attach toolbar extension item in the editor, opens camera for taking a new video. EE changed back to previous based on the mail discussion.</comment>        
+    <source>New video</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
     <extra-loc-viewid>mail_004_b</extra-loc-viewid>
@@ -545,7 +545,7 @@
 <message numerus="no" id="txt_mail_dialog_select_file">
     <comment>Title text in file picker view. File picker view is opened when the user selects &quot;Other&quot; option from attachment list. For attaching files to mail messages. Underneath a list of selectable files is displayed.</comment>        
     <source>Select file</source>
-    <translation variants="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
     <extra-loc-viewid>mail_007</extra-loc-viewid>
     <extra-loc-positionid>dpophead</extra-loc-positionid>
@@ -593,7 +593,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_deleting_mailbox">
-    <comment>Wait note for the case where the mailbox is beign deleted.</comment>        
+    <comment>Wait note for the case where the mailbox is being deleted.</comment>        
     <source>Deleting mailbox</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
@@ -643,7 +643,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_unable_to_open_attachment_file_ty">
-    <comment>Error note. If the user tries to open an attachment which cannot be viewed</comment>        
+    <comment>Error note. Try to open an attachment of a type which can not be opened in a 10.1 device, e.g. zip or ppt file.</comment>        
     <source>Unable to open. Attachment file type not supported</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -655,7 +655,7 @@
 <message numerus="no" id="txt_mail_dialog_send_via">
     <comment>Title for send via dialog. This dialog lists all mailboxes the user has. Underneath the title, a list of mailboxes is displayed. </comment>        
     <source>Send via</source>
-    <translation variants="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
     <extra-loc-viewid>mail</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
@@ -715,7 +715,7 @@
 <message numerus="no" id="txt_mail_select_contacts">
     <comment>Title text shown in status pane when contacts are fetched from Phonebook.</comment>        
     <source>Select contacts</source>
-    <translation variants="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
     <extra-loc-viewid>mail</extra-loc-viewid>
     <extra-loc-positionid>dpophead</extra-loc-positionid>
@@ -725,7 +725,7 @@
 <message numerus="no" id="txt_mail_dialog_no">
     <comment>Button for notes txt_mail_dialog_server_settings_incorrect and txt_mail_dialog_address_or_password_incorrect.</comment>        
     <source>No</source>
-    <translation variants="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
     <extra-loc-viewid>mail_dialog_14_15</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
@@ -792,16 +792,6 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mail_dpophead_loading_mail_content">
-    <comment>Discreet pop-up shown in case the loading of mail content takes more than 2 seconds</comment>        
-    <source>Loading mail content</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_notifdialog_pri2_medium_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_002</extra-loc-viewid>
-    <extra-loc-positionid>dpophead</extra-loc-positionid>
-    <extra-loc-feature>mail</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_mail_opt_folder_sub_inbox">
     <comment>Submenu item for Options menus item Folder (txt_mail_opt_change_folder)</comment>        
     <source>Inbox </source>
@@ -823,7 +813,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_unable_to_add_attachment">
-    <comment>Error note for the case where the selected file cannot be attached (it&apos;s deleted, moved etc. at the same time)</comment>        
+    <comment>Error note. Very rare case, no certain way for reproducing. Only linguistic verification recommended.</comment>        
     <source>Unable to add attachment </source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -835,7 +825,7 @@
 <message numerus="no" id="txt_mail_dialog_yes">
     <comment>Button for notes txt_mail_dialog_server_settings_incorrect and txt_mail_dialog_address_or_password_incorrect.</comment>        
     <source>Yes</source>
-    <translation variants="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
     <extra-loc-viewid>mail_dialog_14_15</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
@@ -843,7 +833,8 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_button_download_rest">
-    <comment>Button that is shown if all the message content is not downloaded while message is opened.</comment>        
+    <comment>Button that is shown if all the message content is not downloaded while message is opened in viewer. Not yet implemented
+</comment>        
     <source>Download rest</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
@@ -883,7 +874,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_mail_address_incorrect">
-    <comment>The information dialog that is shown if the user&apos;s own mail address is incorrect and the user tries to sync or send mail.</comment>        
+    <comment>The information dialog that is shown if the user&apos;s own mail address is incorrect and the user tries to sync or send mail. Linguistic verification is enough at this point. Not implemented yet</comment>        
     <source>Your mail address is incorrect. Check the mail address settings?</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -903,7 +894,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_status_menu_waiting_to_send">
-    <comment>Text for status menu item: indicates that there are unsent messages in outbox. %L1 is the number of unsent mails in that mailbox. L1% is usually less than 10 but can be also more.</comment>        
+    <comment>Visible in the indicator menu when there are emails in the outbox. %L1 is the number of unsent mails in that mailbox. L1% is usually less than 10 but can be also more. To reproduce, start composing a message, change the device to Offline mode and press Send. Then open the indicator menu.</comment>        
     <source>Waiting to send (%L1)</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_notifdialog_sec_medium_graphic</extra-loc-layout_id>    
@@ -913,7 +904,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_do_you_want_to_delete_mfe">
-    <comment>Confirmation note for mailbox deleting. This will delete also contacts, calendar and tasks data, which has been synchronized via this account. This MfE protocol only</comment>        
+    <comment>Confirmation note for mailbox deleting. This will delete also contacts, calendar and tasks data, which has been synchronized via this account. This is for MfE protocol only</comment>        
     <source>Do you want to delete all mail, calendar, contacts and tasks data related to this account?</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
@@ -1013,8 +1004,8 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_list_new_photo">
-    <comment>Attach toolbar extension item in the editor, opens camera for taking a new photo</comment>        
-    <source>Camera</source>
+    <comment>Attach toolbar extension item in the editor, opens camera for taking a new photo. EE changed back to previous based on the mail discussion.</comment>        
+    <source>New photo</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
     <extra-loc-viewid>mail_004_b</extra-loc-viewid>
--- a/emailuis/nmailuiengine/inc/nmuiengine.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiengine/inc/nmuiengine.h	Mon Oct 04 00:05:37 2010 +0300
@@ -225,12 +225,17 @@
     NmUiEngine();
 
     virtual ~NmUiEngine();
-    
+
     void handleFolderDeletedEvent(const QList<NmId> &folderIds,
                             const NmId& mailboxId);
-    
+
     void handleFolderCreatedEvent(const QList<NmId> &folderIds,
-                            const NmId& mailboxId);    
+                            const NmId& mailboxId);
+
+    void createMessageListModel(
+            NmMessageListModel **model,
+            const NmId &mailboxId,
+            const NmId &folderId);
 
 
 private: // Data
--- a/emailuis/nmailuiengine/nmailuiengine.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiengine/nmailuiengine.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -80,6 +80,7 @@
       "$${LITERAL_HASH}endif"
     
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
 }
 
 RESOURCES += nmailuiengine.qrc
--- a/emailuis/nmailuiengine/src/nmbaseclientplugin.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiengine/src/nmbaseclientplugin.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -601,17 +601,9 @@
         case NmActionToolbar:
         {
             mViewerViewRequest = request;
-			Qt::Orientation orientation = Qt::Horizontal;
-			HbMainWindow *mainWindow = static_cast<HbMainWindow*>(HbApplication::activeWindow());
-			if( mainWindow ) {
-            	orientation = mainWindow->orientation();
-			}
 
             // ToolBar Reply action
             NmAction *replyAction = new NmAction(0);
-            if (Qt::Horizontal == orientation) {
-                replyAction->setText(hbTrId("txt_mail_button_reply"));
-            }
             replyAction->setToolTip(hbTrId("txt_mail_button_reply"));
             replyAction->setIcon(NmIcons::getIcon(NmIcons::NmIconReply));
             replyAction->setObjectName("baseclientplugin_reply");
@@ -620,9 +612,6 @@
 
             // ToolBar Reply all action
             NmAction *replyAllAction = new NmAction(0);
-            if (Qt::Horizontal == orientation) {
-                replyAllAction->setText(hbTrId("txt_mail_button_reply_all"));
-            }
             replyAllAction->setToolTip(hbTrId("txt_mail_button_reply_all"));
             replyAllAction->setIcon(NmIcons::getIcon(NmIcons::NmIconReplyAll));
             replyAllAction->setObjectName("baseclientplugin_reply_all");
@@ -631,9 +620,6 @@
 
             // ToolBar Forward action
             NmAction *forwardAction = new NmAction(0);
-            if (Qt::Horizontal == orientation) {
-                forwardAction->setText(hbTrId("txt_mail_button_forward"));
-            }
             forwardAction->setToolTip(hbTrId("txt_mail_button_forward"));
             forwardAction->setIcon(NmIcons::getIcon(NmIcons::NmIconForward));
             forwardAction->setObjectName("baseclientplugin_forward");
@@ -642,9 +628,6 @@
 
             // ToolBar Delete action
             NmAction *deleteAction = new NmAction(0);
-            if (Qt::Horizontal == orientation) {
-                deleteAction->setText(hbTrId("txt_mail_button_delete"));
-            }
             deleteAction->setToolTip(hbTrId("txt_mail_button_delete"));
             deleteAction->setIcon(NmIcons::getIcon(NmIcons::NmIconDelete));
             deleteAction->setObjectName("baseclientplugin_delete");
@@ -682,7 +665,6 @@
             // ToolBar Attach action
             NmAction *attachAction = new NmAction(0);
             attachAction->setObjectName("baseclientplugin_attachaction");
-            attachAction->setText(hbTrId("txt_mail_button_attach"));
             attachAction->setIcon(NmIcons::getIcon(NmIcons::NmIconAttach));
             // Action only available when attachment can be added
             attachAction->setAvailabilityCondition(NmAction::NmAttachable);
@@ -693,7 +675,6 @@
             // ToolBar Send action
             NmAction *sendAction = new NmAction(0);
             sendAction->setObjectName("baseclientplugin_sendaction");
-            sendAction->setText(hbTrId("txt_common_button_send"));
             sendAction->setIcon(NmIcons::getIcon(NmIcons::NmIconSend));
             // Action only available when the message related to it can be sent.
             sendAction->setAvailabilityCondition(NmAction::NmSendable);
--- a/emailuis/nmailuiengine/src/nmuiengine.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiengine/src/nmuiengine.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -42,8 +42,6 @@
   mSaveDraftOperation(NULL),
   mDraftMessage(NULL)
 {
-    NM_FUNCTION;
-
     mPluginFactory = NmDataPluginFactory::instance();
     mDataManager = new NmDataManager();
     // Connect to the plugins to receive change notifications
@@ -92,8 +90,6 @@
 */
 NmUiEngine::~NmUiEngine()
 {
-    NM_FUNCTION;
-
     enableSyncIndicator(false);
 
     if (mMessageSearchListModel) {
@@ -165,8 +161,6 @@
 */
 NmUiEngine *NmUiEngine::instance()
 {
-    NM_FUNCTION;
-
     if (!mInstance) {
     	mInstance = new NmUiEngine();
     }
@@ -179,8 +173,6 @@
 */
 void NmUiEngine::releaseInstance(NmUiEngine *&instance)
 {
-    NM_FUNCTION;
-
     //can't have passed out instances if we don't have any
     if (mInstance) {
         if(instance == mInstance) {
@@ -200,8 +192,6 @@
 */
 NmMailboxListModel &NmUiEngine::mailboxListModel()
 {
-    NM_FUNCTION;
-
     if (!mMailboxListModel) {
         refreshMailboxListModel(); // creates the model too
     }
@@ -215,8 +205,6 @@
 */
 void NmUiEngine::refreshMailboxListModel()
 {
-    NM_FUNCTION;
-
     if (!mMailboxListModel) {
         mMailboxListModel = new NmMailboxListModel(*mDataManager);
 
@@ -250,8 +238,6 @@
 NmMessageListModel &NmUiEngine::messageListModel(const NmId &mailboxId,
                                                  const NmId &folderId)
 {
-    NM_FUNCTION;
-
     QObject *plugin = mPluginFactory->pluginInstance(mailboxId);
     bool isInbox(false);
     if (standardFolderId(mailboxId,NmFolderInbox)==folderId){
@@ -267,41 +253,13 @@
         // or re-create inbox list model when mailbox has changed
         if ((!mInboxListModel&&isInbox)||
             (mInboxListModel&&isInbox&&mailboxId!=mInboxListModel->currentMailboxId())){
-            // Delete previous model and set to NULL. Deleting model will also
-            // delete all items in model.
-            if (mInboxListModel){
-                delete mInboxListModel;
-                mInboxListModel=NULL;
-            }
-            // Create new inbox model
-            mInboxListModel = new NmMessageListModel(*mDataManager);
-            // Initial fill up of inbox list model, otherwise updated in the background
-            QList<NmMessageEnvelope*> messageEnvelopeList;
-            mDataManager->listMessages(mailboxId, folderId, messageEnvelopeList);
-            mInboxListModel->refresh(mailboxId, folderId, messageEnvelopeList);
-
-            while (!messageEnvelopeList.isEmpty()) {
-                delete messageEnvelopeList.takeFirst();
-            }
+            createMessageListModel(&mInboxListModel, mailboxId, folderId);
         }
         // Selected folder is not inbox folder for the mailbox
         else if (!isInbox){
             // Recreate model for other folders when needed, previous model
             // items are deleted from the memory with the old model
-            if (mMessageListModel){
-                delete mMessageListModel;
-                mMessageListModel=NULL;
-            }
-            mMessageListModel = new NmMessageListModel(*mDataManager);
-
-            // Fill up other model
-            QList<NmMessageEnvelope*> messageEnvelopeList;
-            mDataManager->listMessages(mailboxId, folderId, messageEnvelopeList);
-            mMessageListModel->refresh(mailboxId, folderId, messageEnvelopeList);
-
-            while (!messageEnvelopeList.isEmpty()) {
-                delete messageEnvelopeList.takeFirst();
-            }
+            createMessageListModel(&mMessageListModel, mailboxId, folderId);
         }
     }
 
@@ -338,8 +296,6 @@
 */
 NmMessageListModel &NmUiEngine::messageListModelForSearch(const NmId &mailboxId)
 {
-    NM_FUNCTION;
-
     Q_UNUSED(mailboxId);
 
     if (!mMessageSearchListModel) {
@@ -376,8 +332,6 @@
     const NmId &mailboxId,
     NmFolderType folderType)
 {
-    NM_FUNCTION;
-
     NmId value;
     if (folderType != NmFolderOther) {
         NmDataPluginInterface *plugin =
@@ -398,8 +352,6 @@
                       const NmId &folderId,
                       const NmId &messageId)
 {
-    NM_FUNCTION;
-
     NmMessage *message = mDataManager->message(mailboxId, folderId, messageId);
     return message;
 }
@@ -411,8 +363,6 @@
     const NmId &folderId,
     const NmId &messageId )
 {
-    NM_FUNCTION;
-
     QPointer<NmOperation> value(NULL);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -431,8 +381,6 @@
     const NmId &messageId,
     const NmId &messagePartId)
 {
-    NM_FUNCTION;
-
     QPointer<NmOperation> value(NULL);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -451,8 +399,6 @@
     const NmId &messageId,
     const QList<NmId> &messagePartIds)
 {
-    NM_FUNCTION;
-
     QPointer<NmOperation> value(NULL);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -471,8 +417,6 @@
         const NmId &messageId,
         const NmId &messagePartId)
 {
-    NM_FUNCTION;
-
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
     if (plugin) {
@@ -492,8 +436,6 @@
     const NmId &messageId,
     NmMessagePart &messagePart)
 {
-    NM_FUNCTION;
-
     return mDataManager->contentToMessagePart(mailboxId, folderId, messageId, messagePart);
 }
 
@@ -512,7 +454,7 @@
                                const QList<NmId> &messageIdList)
 {
     NM_FUNCTION;
-
+    
     int result(NmNotFoundError);
 
     bool isInbox(false);
@@ -541,8 +483,15 @@
     if (plugin) {
           result = plugin->deleteMessages(mailboxId, folderId, messageIdList);
     }
-
-	return result;
+    
+    // Because the asynchronous delete operation may take some time to
+    // finish, we will not wait for the NmMessageDeleted events from the
+    // protocol plugin. Instead, handleMessageEvent() is invoked directly.
+    // This causes the viewer to exit even though the asychronous delete
+    // operation would take a bit longer to finish.
+    handleMessageEvent(NmMessageDeleted,folderId,messageIdList,mailboxId);
+    
+    return result;
 }
 
 
@@ -563,8 +512,6 @@
         NmEnvelopeProperties property,
         const QList<const NmMessageEnvelope*> &envelopeList)
 {
-    NM_FUNCTION;
-
     QPointer<NmStoreEnvelopesOperation> operation(NULL);
     NmMessageListModel *theMessageListModel = mMessageListModel;
 
@@ -632,8 +579,6 @@
 */
 QPointer<NmMessageCreationOperation> NmUiEngine::createNewMessage(const NmId &mailboxId)
 {
-    NM_FUNCTION;
-
     QPointer<NmMessageCreationOperation> value(NULL);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -651,8 +596,6 @@
         const NmId &mailboxId,
         const NmId &originalMessageId)
 {
-    NM_FUNCTION;
-
     QPointer<NmMessageCreationOperation> value(NULL);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -671,8 +614,6 @@
         const NmId &originalMessageId,
         bool replyAll)
 {
-    NM_FUNCTION;
-
     QPointer<NmMessageCreationOperation> value(NULL);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -688,7 +629,7 @@
 int NmUiEngine::saveMessage(const NmMessage &message)
 {
     NM_FUNCTION;
-
+    
     const NmId &mailboxId = message.envelope().mailboxId();
     int ret(NmNotFoundError);
     NmDataPluginInterface *plugin =
@@ -704,8 +645,6 @@
 */
 int NmUiEngine::refreshMailbox(const NmId &mailboxId )
 {
-    NM_FUNCTION;
-
     int ret(NmNotFoundError);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -723,8 +662,6 @@
 */
 int NmUiEngine::goOnline(const NmId &mailboxId )
 {
-    NM_FUNCTION;
-
     int ret(NmNotFoundError);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -739,8 +676,6 @@
 */
 int NmUiEngine::goOffline(const NmId &mailboxId )
 {
-    NM_FUNCTION;
-
     int ret(NmNotFoundError);
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(mailboxId);
@@ -760,7 +695,7 @@
     const NmId &messageId)
 {
     NM_FUNCTION;
-
+    
     int result(NmNotFoundError);
     NmDataPluginInterface *plugin =
             mPluginFactory->interfaceInstance(mailboxId);
@@ -777,7 +712,7 @@
 void NmUiEngine::removeDraftMessage(NmMessage *message)
 {
     NM_FUNCTION;
-
+    
     if (message) {
         NmDataPluginInterface *plugin =
             mPluginFactory->interfaceInstance(message->envelope().mailboxId());
@@ -808,7 +743,7 @@
                                   const QList<NmOperation*> &preliminaryOperations)
 {
     NM_FUNCTION;
-
+    
     if (message) {
         NmDataPluginInterface *plugin =
             mPluginFactory->interfaceInstance(message->envelope().mailboxId());
@@ -854,7 +789,7 @@
 void NmUiEngine::sendMessage(NmMessage *message, const QList<NmOperation *> &preliminaryOperations)
 {
     NM_FUNCTION;
-
+    
     //First trigger message storing
     if (message) {
         NmDataPluginInterface *plugin =
@@ -890,8 +825,6 @@
  */
 bool NmUiEngine::isSendingMessage() const
 {
-    NM_FUNCTION;
-
     int ret(false);
     if (mSendOperation && mSendOperation->isRunning()) {
         ret = true;
@@ -904,8 +837,6 @@
  */
 const NmMessage *NmUiEngine::messageBeingSent() const
 {
-    NM_FUNCTION;
-
     const NmMessage *message = NULL;
 
     if (mSendOperation) {
@@ -923,8 +854,6 @@
     const NmMessage &message,
     const QList<QString> &fileList)
 {
-    NM_FUNCTION;
-
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(message.envelope().mailboxId());
 
@@ -943,8 +872,6 @@
     const NmMessage &message,
     const NmId &attachmentPartId)
 {
-    NM_FUNCTION;
-
     NmDataPluginInterface *plugin =
         mPluginFactory->interfaceInstance(message.envelope().mailboxId());
 
@@ -960,8 +887,6 @@
  */
 NmSyncState NmUiEngine::syncState(const NmId& mailboxId)
 {
-    NM_FUNCTION;
-
     NmDataPluginInterface *plugin =
                 mPluginFactory->interfaceInstance(mailboxId);
     if (plugin) {
@@ -977,8 +902,6 @@
  */
 NmConnectState NmUiEngine::connectionState(const NmId& mailboxId)
 {
-    NM_FUNCTION;
-
     NmDataPluginInterface *plugin =
                 mPluginFactory->interfaceInstance(mailboxId);
     if (plugin) {
@@ -1002,7 +925,7 @@
                        const QStringList &searchStrings)
 {
     NM_FUNCTION;
-
+    
     // Get the plugin instance.
     QObject *pluginInstance = mPluginFactory->pluginInstance(mailboxId);
 
@@ -1045,8 +968,6 @@
 */
 int NmUiEngine::cancelSearch(const NmId &mailboxId)
 {
-    NM_FUNCTION;
-
     int retVal(NmNoError);
 
     // Get the plugin interface.
@@ -1068,8 +989,6 @@
 */
 NmFolderType NmUiEngine::folderTypeById(NmId mailboxId, NmId folderId)
 {
-    NM_FUNCTION;
-
     NmFolderType ret(NmFolderInbox);
     if (mDataManager){
         ret = mDataManager->folderTypeById(mailboxId,folderId);
@@ -1084,8 +1003,6 @@
 */
 void NmUiEngine::updateActiveFolder(const NmId &mailboxId, const NmId &folderId)
 {
-    NM_FUNCTION;
-
     NmApplicationStateInterface *interface =
         mPluginFactory->applicationStateInterfaceInstance(mailboxId);
     if (interface) {
@@ -1098,8 +1015,6 @@
 */
 void NmUiEngine::handleCompletedSendOperation()
 {
-    NM_FUNCTION;
-
     emit sendOperationCompleted();
 }
 
@@ -1108,8 +1023,6 @@
 */
 void NmUiEngine::handleCompletedRemoveDraftOperation()
 {
-    NM_FUNCTION;
-
     // draft message deletion observing not yet implemented...
 }
 
@@ -1118,8 +1031,6 @@
 */
 void NmUiEngine::handleCompletedSaveDraftOperation()
 {
-    NM_FUNCTION;
-
     // delete message object since it's not needed anymore
     if(mDraftMessage) {
         delete mDraftMessage;
@@ -1132,8 +1043,6 @@
  */
 void NmUiEngine::handleSyncStateEvent(NmSyncState syncState, const NmOperationCompletionEvent &event)
 {
-    NM_FUNCTION;
-
     if ( syncState == SyncComplete ) {
         // signal for reporting about (sync) operation completion status
         emit operationCompleted(event);
@@ -1152,8 +1061,6 @@
 */
 void NmUiEngine::enableSyncIndicator(bool enabled)
 {
-	NM_FUNCTION;
-
     HbIndicator indicator;
     if (enabled) {
         indicator.activate(syncIndicatorName, QVariant());
@@ -1171,8 +1078,6 @@
 */
 int NmUiEngine::getSignature(const NmId &mailboxId, QString *&signature)
 {
-    NM_FUNCTION;
-    
     int retVal(NmNoError);
     
     // Get the plugin interface.
@@ -1195,8 +1100,6 @@
                                     const QList<NmId> &messageIds,
                                     const NmId& mailboxId)
 {
-    NM_FUNCTION;
-
     switch (event) {
         case NmMessageDeleted:
         {
@@ -1217,8 +1120,6 @@
 void NmUiEngine::handleMailboxEvent(NmMailboxEvent event,
                                     const QList<NmId> &mailboxIds)
 {
-    NM_FUNCTION;
-
     switch (event) {
         case NmMailboxDeleted:
         {
@@ -1241,8 +1142,6 @@
 void NmUiEngine::handleFolderEvent(NmFolderEvent event, 
         const QList<NmId> &folderIds, const NmId &mailboxId)
 {
-    NM_FUNCTION;
-
     switch (event) {
         case NmFolderIsDeleted:
             handleFolderDeletedEvent(folderIds, mailboxId);
@@ -1260,8 +1159,6 @@
 void NmUiEngine::handleFolderDeletedEvent(const QList<NmId> &folderIds,
                                           const NmId &mailboxId)
 {
-    NM_FUNCTION;
-
     NmId folderId(0); 
 
     for (int i(0); i < folderIds.count(); i++) {
@@ -1281,7 +1178,6 @@
 void NmUiEngine::handleFolderCreatedEvent(const QList<NmId> &folderIds,
                                           const NmId &mailboxId)
 {
-    NM_FUNCTION;
     Q_UNUSED(folderIds);
     Q_UNUSED(mailboxId);
 }
@@ -1295,8 +1191,6 @@
 */
 void NmUiEngine::handleMatchFound(const NmId &messageId, const NmId &folderId)
 {
-    NM_FUNCTION;
-
     if (!mMessageSearchListModel) {
         // No search list model!
         return;
@@ -1327,8 +1221,6 @@
                         const QList<NmId> &messageIds,
                         const NmId& mailboxId)
 {
-    NM_FUNCTION;
-
     // Forward event to both list models. Models will take care of checking
     // whether event really belongs to current mailbox & folder
     if (mInboxListModel){
@@ -1346,8 +1238,6 @@
 */
 void NmUiEngine::handleConnectEvent(NmConnectState connectState, const NmId &mailboxId, const int errorCode)
 {
-    NM_FUNCTION;
-
     // signal for connection state icon handling
     emit connectionEvent(connectState, mailboxId);
 
@@ -1357,3 +1247,29 @@
         emit operationCompleted(event);
     }
 }
+
+/*!
+     Create message list mode
+ */
+void NmUiEngine::createMessageListModel(
+        NmMessageListModel **model,        
+        const NmId &mailboxId,
+        const NmId &folderId)
+{
+    // Delete previous model and set to NULL. Deleting model will also
+    // delete all items in model.
+    if (*model){
+        delete *model;
+        *model=NULL;
+    }
+    // Create new list model
+    *model = new NmMessageListModel(*mDataManager);
+    // Initial fill up of the list model, otherwise updated in the background
+    QList<NmMessageEnvelope*> messageEnvelopeList;
+    mDataManager->listMessages(mailboxId, folderId, messageEnvelopeList);
+    (*model)->refresh(mailboxId, folderId, messageEnvelopeList);
+
+    while (!messageEnvelopeList.isEmpty()) {
+        delete messageEnvelopeList.takeFirst();
+    }    
+}
--- a/emailuis/nmailuiwidgets/bwins/nmailuiwidgetsu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/bwins/nmailuiwidgetsu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -135,4 +135,7 @@
 	?setPressed@NmAttachmentListItem@@QAEX_N@Z @ 134 NONAME ; void NmAttachmentListItem::setPressed(bool)
 	?setBackgroundColor@NmAttachmentListItem@@QAEXVQColor@@@Z @ 135 NONAME ; void NmAttachmentListItem::setBackgroundColor(class QColor)
 	?setBackgroundColor@NmAttachmentListWidget@@QAEXVQColor@@@Z @ 136 NONAME ; void NmAttachmentListWidget::setBackgroundColor(class QColor)
+	?addContacts@NmRecipientLineEdit@@QAEXV?$QList@PAVNmAddress@@@@@Z @ 137 NONAME ; void NmRecipientLineEdit::addContacts(class QList<class NmAddress *>)
+	?hasInputFocus@NmHtmlLineEdit@@QBE_NXZ @ 138 NONAME ; bool NmHtmlLineEdit::hasInputFocus(void) const
+	?hasInputFocus@NmEditorTextEdit@@QBE_NXZ @ 139 NONAME ; bool NmEditorTextEdit::hasInputFocus(void) const
 
--- a/emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def	Mon Oct 04 00:05:37 2010 +0300
@@ -165,4 +165,7 @@
 	_ZN22NmAttachmentListWidget11changeEventEP6QEvent @ 164 NONAME
 	_ZN20NmAttachmentListItem18setBackgroundColorE6QColor @ 165 NONAME
 	_ZN22NmAttachmentListWidget18setBackgroundColorE6QColor @ 166 NONAME
+	_ZN19NmRecipientLineEdit11addContactsE5QListIP9NmAddressE @ 167 NONAME
+	_ZNK14NmHtmlLineEdit13hasInputFocusEv @ 168 NONAME
+	_ZNK16NmEditorTextEdit13hasInputFocusEv @ 169 NONAME
 
--- a/emailuis/nmailuiwidgets/inc/nmailuiwidgetsheaders.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/inc/nmailuiwidgetsheaders.h	Mon Oct 04 00:05:37 2010 +0300
@@ -51,7 +51,7 @@
 #include <hbcolorscheme.h>
 #include <hbtapgesture.h>
 #include <hbevent.h>
-
+#include <hbinputmethod.h>
 
 // nmail
 #include <nmaddress.h>
--- a/emailuis/nmailuiwidgets/inc/nmeditortextedit.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/inc/nmeditortextedit.h	Mon Oct 04 00:05:37 2010 +0300
@@ -33,6 +33,8 @@
     void setCustomTextColor(bool useCustom, const QColor& color = Qt::black);
     QPair<bool, QColor> customTextColor() const;
 
+    bool hasInputFocus() const;
+
     QRectF rectForCursorPosition() const;
 
 public slots:
--- a/emailuis/nmailuiwidgets/inc/nmhtmllineedit.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/inc/nmhtmllineedit.h	Mon Oct 04 00:05:37 2010 +0300
@@ -37,6 +37,8 @@
 
     QString toPlainText() const;
     QString toHtml() const;
+    
+    bool hasInputFocus() const;
 
     QRectF rectForCursorPosition() const;
 
--- a/emailuis/nmailuiwidgets/inc/nmrecipientlineedit.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/inc/nmrecipientlineedit.h	Mon Oct 04 00:05:37 2010 +0300
@@ -35,6 +35,7 @@
 
     // Get the emailaddress list generated from the content of the lineedit.
     QList<NmAddress> emailAddressList();
+    void addContacts(QList<NmAddress *> contacts);
 	
 public slots:
 #ifdef Q_OS_SYMBIAN
--- a/emailuis/nmailuiwidgets/nmailuiwidgets.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/nmailuiwidgets.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -53,6 +53,7 @@
       "$${LITERAL_HASH}endif"
     
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
 }
 
 win32 {
--- a/emailuis/nmailuiwidgets/resources/nmattachmentlistwidget.docml	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/resources/nmattachmentlistwidget.docml	Mon Oct 04 00:05:37 2010 +0300
@@ -2,6 +2,7 @@
 <hbdocument version="1.0">
     <widget name="nmattachmentlistwidget" type="HbWidget">
         <layout type="grid"/>
+        <sizehint type="PREFERRED" width="expr(var(hb-param-screen-width) )"/>
     </widget>
     <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
--- a/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -460,9 +460,11 @@
     //check which orientation in use
     //if layout is horizontal, items need to be placed in 2 columns.
     if(Qt::Vertical == mOrientation){
+        item->setPreferredWidth( mLayout->geometry().width() );
         mLayout->addItem(item,layout_count,0);
     } else {
         // Qt FW sets the correct width automatically based on the width of the child widgets
+        item->setPreferredWidth( mLayout->geometry().width() / 2);
         mLayout->addItem(item,layout_count / 2, layout_count % 2);
     }
 }
--- a/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -154,6 +154,27 @@
 }
 
 /*!
+ *  Returns true if this widget has the input focus.
+ */
+bool NmEditorTextEdit::hasInputFocus() const
+{
+    NM_FUNCTION;
+
+    bool ret = false;
+    
+    HbInputMethod *inputMethod = HbInputMethod::activeInputMethod();
+    
+    if (inputMethod) {
+        HbInputFocusObject *focusObject = inputMethod->focusObject();
+        if (focusObject) {
+            ret = (focusObject->object() == this);
+        }
+    }
+    
+    return ret; 
+}
+
+/*!
  *  Returns the rectangle for the cursor.
  */
 QRectF NmEditorTextEdit::rectForCursorPosition() const
--- a/emailuis/nmailuiwidgets/src/nmhtmllineedit.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmhtmllineedit.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -102,6 +102,28 @@
 }
 
 /*!
+ *  Returns true if this widget has the input focus.
+ */
+bool NmHtmlLineEdit::hasInputFocus() const
+{
+    NM_FUNCTION;
+
+    bool ret = false;
+    
+    HbInputMethod* inputMethod = HbInputMethod::activeInputMethod();
+    
+    if (inputMethod) {
+        HbInputFocusObject *focusObject = inputMethod->focusObject();
+        if (focusObject) {
+            ret = (focusObject->object() == this);
+        }
+    }
+    
+    return ret; 
+}
+
+
+/*!
  *  Returns the rectangle for the cursor.
  */
 QRectF NmHtmlLineEdit::rectForCursorPosition() const
--- a/emailuis/nmailuiwidgets/src/nmrecipientlineedit.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmrecipientlineedit.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -319,3 +319,16 @@
     Q_UNUSED(text);
     mNeedToGenerateEmailAddressList = true;
 }
+
+/*
+ * If recipient is added from Contacts by Contacts, we need to add it to the list.
+ */
+void NmRecipientLineEdit::addContacts(QList<NmAddress *> contacts)
+{
+    foreach (NmAddress *nmContact,contacts) {
+        if (nmContact && nmContact->displayName().length() > 0) {
+            mRecipientsAddedFromContacts.append(*nmContact);
+            mNeedToGenerateEmailAddressList = true;
+        }
+    }
+}
--- a/emailuis/nmframeworkadapter/inc/nmframeworkadapter.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmframeworkadapter/inc/nmframeworkadapter.h	Mon Oct 04 00:05:37 2010 +0300
@@ -281,11 +281,13 @@
             CFSMailMessagePart *cfsParent, 
             NmMessagePart *nmParent);
 
+    void resetCache(const NmId &mailboxId);
+
     int RefreshMailboxL(NmId mailboxId);
     
-    int GoOnlineL(const NmId& mailboxId);
+    int GoOnlineL(const NmId &mailboxId);
 
-    int GoOfflineL(const NmId& mailboxId);
+    int GoOfflineL(const NmId &mailboxId);
 
     void handleMailboxEvent(
             TFSMailMsgId mailbox,
@@ -327,7 +329,8 @@
     CFSMailBox* mCurrentMailBox; // Owned
     CEmailExtension* mStateExtension; // not owned
 
-
+    NmId mCachedMailboxId;
+    NmId mCachedInboxId;
 };
 
 
--- a/emailuis/nmframeworkadapter/nmframeworkadapter.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmframeworkadapter/nmframeworkadapter.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -13,7 +13,7 @@
 #
 # Description: 
 #
-# Version : %version: e002sa38#31 %
+# Version : %version: e002sa38#32 %
 TEMPLATE = lib
 TARGET = nmframeworkadapter
 
@@ -94,7 +94,8 @@
 
     BLD_INF_RULES.prj_exports += \
     "../rom/nmframeworkadapter.iby             CORE_APP_LAYER_IBY_EXPORT_PATH(nmframeworkadapter.iby)"
-
+    
+    MMP_RULES += SMPSAFE
 }
 
 win32 {
--- a/emailuis/nmframeworkadapter/src/nmframeworkadapter.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmframeworkadapter/src/nmframeworkadapter.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -43,7 +43,7 @@
   mStateExtension(NULL)
 {
     NM_FUNCTION;
-    
+
     // get s60 email framework
     TRAP_IGNORE(mFSfw = CFSMailClient::NewL());
 
@@ -58,12 +58,12 @@
 NmFrameworkAdapter::~NmFrameworkAdapter()
 {
     NM_FUNCTION;
-    
+
     delete mCurrentMailBox;
     mCurrentMailBox = NULL;
-    
-    mStateExtension = NULL;    
-    
+
+    mStateExtension = NULL;
+
     if (mSearchObserver) {
         delete mSearchObserver;
         mSearchObserver = NULL;
@@ -87,7 +87,7 @@
 int NmFrameworkAdapter::listMailboxIds(QList<NmId>& mailboxIdList)
 {
     NM_FUNCTION;
-    
+
     QList<NmMailbox*> mailboxList;
     int ret = listMailboxes(mailboxList);
 
@@ -151,7 +151,7 @@
 int NmFrameworkAdapter::getMailboxById(const NmId& id, NmMailbox*& mailbox)
 {
     NM_FUNCTION;
-    
+
     const TFSMailMsgId mailMsgId(id.pluginId32(), id.id32());
     CFSMailBox *box(NULL);
     TRAPD(err, box = mFSfw->GetMailBoxByUidL(mailMsgId));
@@ -173,6 +173,9 @@
 QPointer<NmOperation> NmFrameworkAdapter::deleteMailboxById(const NmId& mailboxId)
 {
     NM_FUNCTION;
+
+    resetCache(mailboxId);
+
     QPointer<NmOperation> oper = new NmFwaDeleteMailboxOperation(mailboxId, *mFSfw);
     return oper;
 }
@@ -283,7 +286,7 @@
 {
     NM_FUNCTION;
     int err(NmNoError);
-    CFSMailBox* currentMailbox(NULL); 
+    CFSMailBox* currentMailbox(NULL);
     TRAP(err, currentMailbox = mFSfw->GetMailBoxByUidL(mailboxId));
     if (KErrNone == err && currentMailbox) {
         RPointerArray<CFSMailFolder> folders = currentMailbox->ListFolders();
@@ -664,7 +667,7 @@
 QPointer<NmOperation> NmFrameworkAdapter::removeDraftMessage(NmMessage *message)
 {
     NM_FUNCTION;
-    
+
     QPointer<NmOperation> oper = new NmFwaRemoveDraftMessageOperation(*this, message, *mFSfw);
     return oper;
 }
@@ -878,6 +881,13 @@
 {
     NM_FUNCTION;
 
+	// Use cached inbox ID when available
+    if (folderType==NmFolderInbox &&
+        mailboxId==mCachedMailboxId &&
+        mCachedInboxId!=0) {
+        return mCachedInboxId;
+    }
+
     TFSMailMsgId folderId;
     NmId resultId(0);
     CFSMailBox* currentMailbox(NULL);
@@ -916,10 +926,29 @@
     resultId.setPluginId32(static_cast<quint32>(folderId.PluginId().iUid));
     resultId.setId32(folderId.Id());
 
+    // Store cached inbox ID
+    if (folderType==NmFolderInbox) {
+        mCachedMailboxId = mailboxId;
+        mCachedInboxId = resultId;
+    }
+
     return resultId;
 }
 
 /*!
+    Reset cache for the specific mailbox
+
+    \param mailboxId id of the mailbox that cache will be reseted
+*/
+void NmFrameworkAdapter::resetCache(const NmId &mailboxId)
+{
+	if (mailboxId==mCachedMailboxId) {
+        mCachedMailboxId=0;
+        mCachedInboxId=0;
+	}
+}
+
+/*!
     Connect to mailbox if not already connected and refresh.
 
     \param mailboxId Id of the mailbox.
@@ -928,7 +957,9 @@
 int NmFrameworkAdapter::refreshMailbox(NmId mailboxId)
 {
     NM_FUNCTION;
-    
+
+    resetCache(mailboxId);
+
     TRAPD(err, RefreshMailboxL(mailboxId)); // return value not used
     return (err == KErrNone) ? NmNoError : NmGeneralError;
 }
@@ -942,7 +973,7 @@
 int NmFrameworkAdapter::goOnline(const NmId& mailboxId)
 {
     NM_FUNCTION;
-    
+
     TRAPD(err, GoOnlineL(mailboxId)); // return value not used
     return (err == KErrNone) ? NmNoError : NmGeneralError;
 }
@@ -956,7 +987,7 @@
 int NmFrameworkAdapter::goOffline(const NmId& mailboxId)
 {
     NM_FUNCTION;
-    
+
     TRAPD(err, GoOfflineL(mailboxId)); // return value not used
     return (err == KErrNone) ? NmNoError : NmGeneralError;
 }
@@ -1222,11 +1253,11 @@
             break;
 
         // Folder related events:
-        case TFSEventFoldersDeleted:                 
+        case TFSEventFoldersDeleted:
             handleFoldersEvent(param1, param2, NmFolderIsDeleted, mailbox);
             break;
         case TFSEventNewFolder:
-            handleFoldersEvent(param1, param2, NmFolderIsCreated, mailbox);            
+            handleFoldersEvent(param1, param2, NmFolderIsCreated, mailbox);
             break;
 
         // Mailbox related events:
@@ -1305,7 +1336,7 @@
             emit connectionEvent(Connected, id, NmNoError);
             }
             break;
-            
+
         // param1: errorcode
         case TFSEventMailboxOffline: {
             NmId id = NmConverter::mailMsgIdToNmId(mailbox);
@@ -1377,7 +1408,7 @@
 {
     NM_FUNCTION;
     TRAPD(error, getSignatureL(mailboxId, signature));
-    
+
     return error;
 }
 
@@ -1389,7 +1420,7 @@
 void NmFrameworkAdapter::subscribeMailboxEvents(const NmId& mailboxId)
 {
     NM_FUNCTION;
-    
+
     TRAP_IGNORE(mFSfw->SubscribeMailboxEventsL(mailboxId, *this));
 }
 
@@ -1401,7 +1432,7 @@
 void NmFrameworkAdapter::unsubscribeMailboxEvents(const NmId& mailboxId)
 {
     NM_FUNCTION;
-    
+
     mFSfw->UnsubscribeMailboxEvents(mailboxId, *this);
 }
 
@@ -1469,7 +1500,7 @@
 void NmFrameworkAdapter::getSignatureL(const NmId &mailboxId, QString *&signature)
 {
     NM_FUNCTION;
-    
+
     HBufC *sig = mFSfw->GetSignatureL(TFSMailMsgId(mailboxId));
 
     if (sig) {
@@ -1756,7 +1787,7 @@
 void NmFrameworkAdapter::handleSyncstateEvent(TAny* param1, TFSMailMsgId mailbox)
 {
     NM_FUNCTION;
-    
+
     TSSMailSyncState* state = static_cast<TSSMailSyncState*>( param1 );
     NmOperationCompletionEvent event;
     event.mMailboxId = NmConverter::mailMsgIdToNmId(mailbox);
@@ -1766,12 +1797,14 @@
         {
         case StartingSync:
             {
+            NM_TIMESTAMP("Sync started.");
             event.mCompletionCode = NmNoError;
             emit syncStateEvent(Synchronizing, event);
             break;
             }
         case FinishedSuccessfully:
             {
+            NM_TIMESTAMP("Sync completed successfully.");
             event.mCompletionCode = NmNoError;
             emit syncStateEvent(SyncComplete, event);
             break;
@@ -1813,21 +1846,23 @@
     TAny* param1, TAny* param2, NmFolderEvent event, TFSMailMsgId mailbox)
 {
     NM_FUNCTION;
+    
+    Q_UNUSED(param2);
 
     // aParam1: RArray<TFSMailMsgId>* aEntries
     // aParam2: TFSMailMsgId* aParentFolder
-    // aParam3: NULL      
+    // aParam3: NULL
 
     NmId mailboxId(0);
     mailboxId = mailbox.GetNmId();
 
     NmId nmMsgId(0);
-    QList<NmId> folderIds;    
+    QList<NmId> folderIds;
 
+    resetCache(mailboxId);
+    
     RArray<TFSMailMsgId>* fsEntries = reinterpret_cast<RArray<TFSMailMsgId>*> (param1);
-    TFSMailMsgId* fsFolderId = reinterpret_cast<TFSMailMsgId*> (param2);
-    NmId folderId = fsFolderId->GetNmId();
-    NmId inputFolderId = NmFrameworkAdapter::getStandardFolderId(mailboxId, NmFolderInbox);
+    NmId folderId(0);
 
     TFSMailMsgId fsMsgId;
     for(TInt i = 0; i < fsEntries->Count(); i++){
--- a/emailuis/nmhswidget/conf/nmhswidget.docml	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/conf/nmhswidget.docml	Mon Oct 04 00:05:37 2010 +0300
@@ -13,13 +13,27 @@
                     <string locid="txt_mail_widget_info_no_messages" name="plainText" value="No mails!!!"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-tiny)"/>
                 </widget>
+                <widget name="mailListView" type="HbListView">
+                    <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
+                    <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+                    <sizehint height="expr(3*9.75un)" type="PREFERRED" width="46un"/>
+                    <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAlwaysOff"/>
+                    <enums name="verticalScrollBarPolicy" value="ScrollBarAlwaysOff"/>
+                    <bool name="longPressEnabled" value="FALSE"/>
+                    <enums name="clampingStyle" value="BounceBackClamping"/>
+                    <real name="rotation" value="0"/>
+                    <bool name="frictionEnabled" value="TRUE"/>
+                    <bool name="itemRecycling" value="TRUE"/>
+                </widget>
                 <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
                 <sizehint height="expr(3*9.75un )" type="PREFERRED" width="46un"/>
                 <sizehint height="0un" type="MINIMUM" width="0un"/>
                 <sizehint height="2504062.01158un" type="MAXIMUM" width="2504062.01158un"/>
                 <layout orientation="Vertical" spacing="0un" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                    <contentsmargins bottom="1un" left="0un" right="0un" top="0un"/>
                     <linearitem itemname="noMailsLabel"/>
+                    <linearitem itemname="mailListView"/>
                 </layout>
             </widget>
             <widget name="titleLayoutWidget" type="HbWidget">
@@ -44,7 +58,7 @@
                 <widget name="unreadCountLabel" type="HbLabel">
                     <enums name="alignment" value="AlignRight|AlignVCenter|AlignTrailing"/>
                     <real name="z" value="3"/>
-	            <sizepolicy horizontalPolicy="MinimumExpanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizepolicy horizontalPolicy="MinimumExpanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
                     <sizehint height="expr(var(hb-param-text-height-secondary) )" type="MINIMUM" width="0un"/>
                     <sizehint height="expr(var(hb-param-text-height-secondary) )" type="MAXIMUM" width="9un"/>
                     <string locid="txt_mail_widget_list_l1" name="plainText" value="(999)"/>
@@ -112,5 +126,6 @@
     </widget>
     <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
+        <dummydata objectName="mailListView" section="#common" value="app_list_template5"/>
     </metadata>
 </hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/conf/nmhswidgetlistviewitem.css	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,52 @@
+NmHsWidgetListViewItem{
+  layout:portrait;
+}
+
+NmHsWidgetListViewItem:landscape {
+  layout:portrait;
+}
+
+NmHsWidgetListViewItem::sender {
+  top: -var(hb-param-margin-gene-middle-vertical);
+  fixed-height: var(hb-param-text-height-secondary);
+  text-height: var(hb-param-text-height-secondary);
+  text-align: left;
+  text-wrap-mode: no-wrap;
+}
+
+NmHsWidgetListViewItem::time {
+  fixed-height: var(hb-param-text-height-tiny);
+  text-height: var(hb-param-text-height-tiny);
+  fixed-width: 12un;
+  text-align: right;
+  text-wrap-mode: no-wrap;
+}
+
+NmHsWidgetListViewItem::subject {
+  fixed-height: var(hb-param-text-height-secondary);
+  text-height: var(hb-param-text-height-secondary);
+  text-align: left;
+  text-wrap-mode: no-wrap;
+}
+
+NmHsWidgetListViewItem::icon1 {
+  alignment: right;
+  fixed-height: var(hb-param-graphic-size-secondary);
+  fixed-width: var(hb-param-graphic-size-secondary);
+}
+
+NmHsWidgetListViewItem::icon2 {
+  alignment: right;
+  fixed-height: var(hb-param-graphic-size-secondary);
+  fixed-width: var(hb-param-graphic-size-secondary);
+}
+
+NmHsWidgetListViewItem::separator {
+  left: -2px;
+  right: 2px;
+  top: 0;
+  aspect-ratio: ignore;
+  size-polizy-vertical: fixed;
+  size-polizy-horizontal: ignored;
+  fixed-height: 2px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/conf/nmhswidgetlistviewitem.widgetml	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,32 @@
+<hbwidget version="0.1" type="NmHsWidgetListViewItem">
+
+  <layout name="portrait" type="mesh">
+      <meshitem src="separator" srcEdge="TOP" dst="" dstEdge="TOP"/>
+      <meshitem src="separator" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+      <meshitem src="separator" srcEdge="RIGHT" dst="" dstEdge="RIGHT"/> 
+
+      <meshitem src="sender" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)"/> 
+      <meshitem src="sender" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)"/>
+      <meshitem src="sender" srcEdge="BOTTOM" dst="subject" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)"/> 
+             
+      <meshitem src="time" srcEdge="LEFT" dst="sender" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>
+      <meshitem src="time" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)"/>
+      <meshitem src="time" srcEdge="CENTERV" dst="sender" dstEdge="CENTERV" spacing="0"/> 
+             
+      <meshitem src="subject" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)"/>
+      <meshitem src="subject" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)"/>
+      
+      <meshitem src="icon1" srcEdge="CENTERV" dst="subject" dstEdge="CENTERV"/> 
+      <meshitem src="icon1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)"/>    
+   
+      <meshitem src="icon2" srcEdge="CENTERV" dst="subject" dstEdge="CENTERV"/> 
+      <meshitem src="icon2" srcEdge="RIGHT" dst="icon1" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)"/>
+      <meshitem src="icon2" srcEdge="LEFT" dst="subject" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>       
+      
+      <meshitem src="msgicon" srcEdge="TOP" dst="" dstEdge="TOP"/>
+      <meshitem src="msgicon" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+      <meshitem src="msgicon" srcEdge="RIGHT" dst="sender" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)"/>
+      <meshitem src="msgicon" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM"/>
+  </layout>
+  
+</hbwidget>
\ No newline at end of file
--- a/emailuis/nmhswidget/conf/nmhswidgetmail.docml	Fri Sep 17 08:27:21 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.1">
-    <widget name="emailLayoutWidget" type="HbWidget">
-        <widget name="iconSeparator" type="HbLabel">
-            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-            <icon iconName="note_warning" name="icon"/>
-            <enums name="aspectRatioMode" value="IgnoreAspectRatio"/>
-            <real name="z" value="1"/>
-            <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="2" type="PREFERRED" width="50un"/>
-        </widget>
-        <widget name="iconNewMail" type="HbWidget">
-            <real name="z" value="2"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
-            <sizehint type="PREFERRED" width="1.25un"/>
-            <string name="alignment" value="AlignVCenter|AlignHCenter"/>
-            <string name="aspectRatioMode" value="IgnoreAspectRatio"/>
-        </widget>
-        <widget name="labelSender" type="HbLabel">
-            <real name="z" value="3"/>
-            <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-text-height-secondary)" type="PREFERRED" width="33.43284un"/>
-            <string name="plainText" value="Mail Spammer"/>
-            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-        </widget>
-        <widget name="labelTime" type="HbLabel">
-            <enums name="alignment" value="AlignRight|AlignTop|AlignTrailing"/>
-            <real name="z" value="4"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-text-height-tiny)" type="FIXED" width="10un"/>
-            <string name="plainText" value="12:45pm"/>
-            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-tiny)"/>
-        </widget>
-        <widget name="labelSubject" type="HbLabel">
-            <real name="z" value="5"/>
-            <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-text-height-secondary)" type="PREFERRED" width="35un"/>
-            <string name="plainText" value="Check out great new medication.."/>
-            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-        </widget>
-        <widget name="iconThree" type="HbLabel">
-            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-            <icon iconName="note_warning" name="icon"/>
-            <real name="z" value="6"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
-        </widget>
-        <widget name="iconTwo" type="HbLabel">
-            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-            <icon iconName="note_warning" name="icon"/>
-            <real name="z" value="7"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
-        </widget>
-        <widget name="iconOne" type="HbLabel">
-            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-            <icon iconName="note_warning" name="icon"/>
-            <real name="z" value="8"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
-        </widget>
-        <real name="z" value="1"/>
-        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Minimum" verticalStretch="0"/>
-        <sizehint height="expr(1un + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-middle-vertical) + var(hb-param-text-height-secondary) + 1un )" type="PREFERRED" width="46un"/>
-        <sizehint height="expr(2 * var(hb-param-text-height-secondary) + 3 * var(hb-param-margin-gene-middle-vertical) )" type="MINIMUM" width="expr(4*var(hb-param-margin-gene-middle-horizontal)  + 15un )"/>
-        <sizehint height="expr(1un + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-middle-vertical) + var(hb-param-text-height-secondary) + 1un )" type="MAXIMUM" width="2504062.01158un"/>
-        <layout type="anchor">
-            <anchoritem dst="iconSeparator" dstEdge="LEFT" spacing="2" src="" srcEdge="LEFT"/>
-            <anchoritem dst="iconSeparator" dstEdge="TOP" spacing="0" src="" srcEdge="TOP"/>
-            <anchoritem dst="iconSeparator" dstEdge="RIGHT" spacing="-2" src="" srcEdge="RIGHT"/>
-            <anchoritem dst="labelSubject" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="iconNewMail" srcEdge="RIGHT"/>
-            <anchoritem dst="labelSubject" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="labelSender" srcEdge="BOTTOM"/>
-            <anchoritem dst="labelSubject" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="iconOne" srcEdge="LEFT"/>
-            <anchoritem dst="labelTime" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="" srcEdge="RIGHT"/>
-            <anchoritem dst="labelTime" dstEdge="CENTERV" spacing="0un" src="labelSender" srcEdge="CENTERV"/>
-            <anchoritem dst="iconOne" dstEdge="RIGHT" spacing="-0.5un" src="iconTwo" srcEdge="LEFT"/>
-            <anchoritem dst="iconOne" dstEdge="CENTERV" spacing="0un" src="labelSubject" srcEdge="CENTERV"/>
-            <anchoritem dst="iconThree" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="" srcEdge="RIGHT"/>
-            <anchoritem dst="iconThree" dstEdge="CENTERV" spacing="0un" src="iconOne" srcEdge="CENTERV"/>
-            <anchoritem dst="iconTwo" dstEdge="RIGHT" spacing="-0.5un" src="iconThree" srcEdge="LEFT"/>
-            <anchoritem dst="iconTwo" dstEdge="CENTERV" spacing="0un" src="iconOne" srcEdge="CENTERV"/>
-            <anchoritem dst="labelSender" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="iconNewMail" srcEdge="RIGHT"/>
-            <anchoritem dst="labelSender" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="iconSeparator" srcEdge="BOTTOM"/>
-            <anchoritem dst="labelSender" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="labelTime" srcEdge="LEFT"/>
-            <anchoritem dst="iconNewMail" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="" srcEdge="LEFT"/>
-            <anchoritem dst="iconNewMail" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="iconSeparator" srcEdge="BOTTOM"/>
-            <anchoritem dst="iconNewMail" dstEdge="BOTTOM" spacing="expr(-var(hb-param-margin-gene-middle-vertical) )" src="" srcEdge="BOTTOM"/>
-        </layout>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-    </metadata>
-</hbdocument>
--- a/emailuis/nmhswidget/inc/nmhswidget.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/inc/nmhswidget.h	Mon Oct 04 00:05:37 2010 +0300
@@ -30,6 +30,11 @@
 class NmHsWidgetDateTimeObserver;
 class HbLabel;
 class HbDocumentLoader;
+class HbListView;
+class NmHsWidgetListModel;
+class NmHsWidgetListView;
+class QModelIndex;
+
 
 class NmHsWidget : public HbWidget
 {
@@ -48,6 +53,7 @@
 public slots:
     //from home screen fw
     void onInitialize();
+    void onUninitialize();
     void onShow();
     void onHide();
     //engine
@@ -62,6 +68,8 @@
     QString widgetStateProperty();
     //user actions
     void handleExpandCollapseEvent();
+    
+    void openMessage(const QModelIndex& index);
 
 signals: 
     void finished();
@@ -71,16 +79,14 @@
     void setupLocalization();
     void setupUi();
     bool loadDocML(HbDocumentLoader &loader);
-    void updateMailRowsVisibility(const int visibleCount);
     void addNoMailsLabelToLayout();
     void removeNoMailsLabelFromLayout();
     void addEmailRowsToLayout();
     void removeEmailRowsFromLayout();
     void updateLayout(const int visibleCount);
     void toggleExpansionState();  
-
+    void createMailRowsList();
 protected:
-    void createMailRowsList();
     
 private:
     //UI components
@@ -89,7 +95,6 @@
     HbWidget* mWidgetContainer;             //container including title row and mContentContainer
     NmHsWidgetTitleRow* mTitleRow;          //mailbox icon, name, unread count and expand button 
     HbWidget* mContentContainer;            //container for mail rows or mNoMailsLabel
-    QList<NmHsWidgetEmailRow*> mMailRows;   //list including mail row instances
     HbLabel* mNoMailsLabel;                 //label shown in mContentContainer when no mails in inbox
     QGraphicsLinearLayout* mContentLayout;  //layout used in mContentContainer    
     HbFrameDrawer* mBackgroundFrameDrawer;  //drawer for widget background shown in mWidgetContainer
@@ -100,6 +105,8 @@
     QString mAccountIconName;               //name of mailbox icon shown in titlerow
     NmHsWidgetDateTimeObserver* mDateObserver;  //observer for time/locale changes    
     bool mIsExpanded;                       //true when widget expanded, false when collapsed  
+    HbListView* mListView;                  //list view for messages 
+    NmHsWidgetListModel* mListModel;        //list model for mListView
     
 public:    
     friend class TestNmHsWidget;     
--- a/emailuis/nmhswidget/inc/nmhswidgetconsts.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/inc/nmhswidgetconsts.h	Mon Oct 04 00:05:37 2010 +0300
@@ -51,10 +51,12 @@
 /** Widget's localization file name*/
 const QString KNmHsWidgetLocFileName = "mailwidget_";
 /** Widget's localization file location*/
-const QString KNmHsWidgetLocLocation = "z:/resource/qt/translations/";
+const QString KNmHsWidgetLocLocation = "/resource/qt/translations/";
 /** Widget's state property values */
 const QString KNmHsWidgetStateCollapsed = "collapsed";
 const QString KNmHsWidgetStateExpanded = "expanded";
+/** maximum home screen widget height in units */
+const int KNmHsWidgetHSMaxWidgetHeightInUnits = 39;
 
 /**************************************************
  * Title row widget
--- a/emailuis/nmhswidget/inc/nmhswidgetemailengine.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/inc/nmhswidgetemailengine.h	Mon Oct 04 00:05:37 2010 +0300
@@ -46,7 +46,7 @@
     bool initialize(); 
     ~NmHsWidgetEmailEngine();
 
-    int getEnvelopes(QList<NmMessageEnvelope> &list, int maxEnvelopeAmount);
+    int getEnvelopes(QList<NmMessageEnvelope*> &list, int maxEnvelopeAmount);
     int unreadCount();
     QString accountName();
     void deleteAiwRequest();
@@ -58,6 +58,12 @@
             const QList<NmId> &messageIds,
             const NmId& mailboxId);
 
+    void handleFolderEvent(
+                NmFolderEvent event,
+                const QList<NmId> &folderIds,
+                const NmId& mailboxId);
+
+    
     void handleMailboxEvent(NmMailboxEvent event, const QList<NmId> &mailboxIds);
    
     //Activity control
--- a/emailuis/nmhswidget/inc/nmhswidgetemailrow.h	Fri Sep 17 08:27:21 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * 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: 
- *
- */
-
-
-#ifndef NMHSWIDGETEMAILROW_H_
-#define NMHSWIDGETEMAILROW_H_
-
-#include <QDateTime>
-#include <hbwidget.h>
-#include "nmcommon.h"
-#include "nmmessageenvelope.h"
-
-//FORWARD DECLARATIONS:
-class HbLabel;
-class HbFrameItem;
-
-class NmHsWidgetEmailRow : public HbWidget
-{
-    Q_OBJECT
-  
-public:
-    NmHsWidgetEmailRow(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
-    ~NmHsWidgetEmailRow();
-    NmId messageId();
-    bool setupUI();
-    void gestureEvent(QGestureEvent *event);
-
-public slots:
-    void updateMailData( const NmMessageEnvelope& envelope );
-    void updateDateTime();
-    
-signals:
-    void mailViewerLaunchTriggered(const NmId& messageId);
-    
-private:
-    void setIconsToWidget( const NmMessageEnvelope& envelope );
-    void hideIcons();
-    bool loadDocML();
-    bool setupGraphics();
-    void setFontsSize( bool read );
-    void setHighlighedFontsColor( bool pressed );
-    void showHighlight( bool pressed );
-    
-protected:
-    bool event( QEvent *event );
-    
-private:
-    HbLabel *mSenderLabel;
-    HbLabel *mSubjectLabel;
-    HbLabel *mTimeLabel;
-    HbWidget *mNewMailIcon;
-    HbLabel *mSeparatorIcon;
-    NmId mMessageId;
-    QDateTime mMessageSentTime;
-    QList <HbLabel*> mStatusIcons;  
-    NmMessageEnvelope mEnvelope;
-    HbFrameItem* mBackgroundLayoutItem;
-    
-};
-
-#endif // NMHSWIDGETEMAILROW_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/inc/nmhswidgetlistmodel.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,43 @@
+/*
+ * 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:
+ *
+ */
+
+#ifndef NMHSWIDGETLISTMODEL_H_
+#define NMHSWIDGETLISTMODEL_H_
+
+#include <QStandardItemModel>
+
+class NmMessageEnvelope;
+class NmHsWidgetListModelItem;
+
+class NmHsWidgetListModel : public QStandardItemModel
+{
+Q_OBJECT
+public:
+
+    NmHsWidgetListModel(QObject *parent = 0);
+    virtual ~NmHsWidgetListModel();
+    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+    void refresh(QList<NmMessageEnvelope*> &mailboxList);
+
+public slots:
+
+private:
+    NmHsWidgetListModelItem *createMessageListModelItem(const NmMessageEnvelope* env);
+
+};
+
+#endif /* NMHSWIDGETLISTMODEL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/inc/nmhswidgetlistmodelitem.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,37 @@
+/*
+ * 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:
+ *
+ */
+
+#ifndef NMHSWIDGETLISTMODELITEM_H_
+#define NMHSWIDGETLISTMODELITEM_H_
+
+#include <QStandardItem>
+
+class NmMessageEnvelope;
+
+class NmHsWidgetListModelItem : public QStandardItem
+{
+public:
+    NmHsWidgetListModelItem();
+    ~NmHsWidgetListModelItem();
+    void setItemMetaData(NmMessageEnvelope* metaData);
+    NmMessageEnvelope *itemMetaData();
+
+private:
+    NmMessageEnvelope* mMessageEnvelope;
+};
+
+#endif /* NMHSWIDGETLISTMODELITEM_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/inc/nmhswidgetlistviewitem.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* 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 NMHSWIDGETLISTVIEWITEM_H_
+#define NMHSWIDGETLISTVIEWITEM_H_
+
+#include <hblistviewitem.h>
+
+class HbTextItem;
+class HbIconItem;
+class HbFrameItem;
+class NmMessageEnvelope;
+
+
+class NmHsWidgetListViewItem : public HbListViewItem
+{
+    Q_OBJECT
+public:
+    NmHsWidgetListViewItem(QGraphicsItem * parent);
+    virtual ~NmHsWidgetListViewItem();
+    virtual bool canSetModelIndex(const QModelIndex &index) const;
+public: // from HbListViewItem
+    virtual HbAbstractViewItem *createItem();
+    virtual void updateChildItems();
+
+protected:
+    void setFonts(const QColor &colorRole, HbFontSpec &fontSpec);
+    void getFontSizes();   
+    
+private:
+    void createMessageItemLayout();
+    void setContentsToMessageItem(const NmMessageEnvelope &envelope);
+    void setFontsRead();
+    void setFontsUnread();
+ 
+private:
+    HbIconItem *mSeparator;   // Owned
+    HbTextItem *mSender;      // Owned
+    HbTextItem *mSubject;     // Owned
+    HbTextItem *mTime;        // Owned
+    HbFrameItem *mNewMsgIcon; // Owned
+    HbIconItem *mIcon1;        // Owned
+    HbIconItem *mIcon2;        // Owned
+    QList <HbIconItem*> mStatusIcons;  
+    qreal mPrimarySize;
+    qreal mSecondarySize;
+    
+public:    
+    friend class TestNmHsWidgetListViewItem;     
+};
+
+#endif /* NMHSWIDGETLISTVIEWITEM_H_ */
--- a/emailuis/nmhswidget/nmhswidget.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/nmhswidget.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -45,27 +45,34 @@
 BLD_INF_RULES.prj_exports += "resources/nmhswidget.xml 			z:/private/2002DD15/nmhswidget.xml"
 BLD_INF_RULES.prj_exports += "rom/nmhswidget.iby				CORE_APP_LAYER_IBY_EXPORT_PATH(nmhswidget.iby)"
 BLD_INF_RULES.prj_exports += "rom/nmhswidgetlanguage.iby 		LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(nmhswidgetlanguage.iby)"
+BLD_INF_RULES.prj_exports += "sis/nmhswidget_stub.sis     		/epoc32/data/z/system/install/nmhswidget_stub.sis"
 TARGET.EPOCALLOWDLLDATA = 1
+
+MMP_RULES += SMPSAFE
 }
 
 TARGET.CAPABILITY = ALL -TCB
     
 SOURCES += src/nmhswidget.cpp \
     src/nmhswidgetemailengine.cpp \
-    src/nmhswidgetemailrow.cpp \
     src/nmhswidgettitlerow.cpp \
     src/nmhswidgetplugin.cpp \
     src/nmhswidgetdatetimeobserver.cpp \
-    src/nmhswidgetdatetimeobserver_p.cpp
+    src/nmhswidgetdatetimeobserver_p.cpp \
+    src/nmhswidgetlistviewitem.cpp \
+    src/nmhswidgetlistmodel.cpp \
+    src/nmhswidgetlistmodelitem.cpp
 
 HEADERS += inc/nmhswidget.h \
     inc/nmhswidgetconsts.h \
     inc/nmhswidgetemailengine.h \
-    inc/nmhswidgetemailrow.h \
     inc/nmhswidgettitlerow.h \
     inc/nmhswidgetplugin.h \
     inc/nmhswidgetdatetimeobserver.h \
-    inc/nmhswidgetdatetimeobserver_p.h
+    inc/nmhswidgetdatetimeobserver_p.h \
+    inc/nmhswidgetlistviewitem.h \
+    inc/nmhswidgetlistmodel.h \
+    inc/nmhswidgetlistmodelitem.h
 
 INCLUDEPATH += ./inc \
     ../../inc \
@@ -75,5 +82,4 @@
 DEPENDPATH += .
 TRANSLATIONS = mailwidget.ts
 
-DOCML += conf/nmhswidgetmail.docml \
-         conf/nmhswidget.docml
+DOCML += conf/nmhswidget.docml
--- a/emailuis/nmhswidget/nmhswidget.qrc	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/nmhswidget.qrc	Mon Oct 04 00:05:37 2010 +0300
@@ -1,6 +1,9 @@
 <RCC>
     <qresource prefix="/docml">
-        <file alias="nmhswidgetmail.docml">conf/nmhswidgetmail.docml.bin</file>
         <file alias="nmhswidget.docml">conf/nmhswidget.docml.bin</file>
     </qresource>
+    <qresource prefix="/layout" >
+        <file alias="nmhswidgetlistviewitem.css">conf/nmhswidgetlistviewitem.css</file>
+        <file alias="nmhswidgetlistviewitem.widgetml">conf/nmhswidgetlistviewitem.widgetml</file>
+    </qresource>
 </RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/resources/nmhswidget.manifest	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<hswidgetmanifest>
+    <uri>nmhswidget</uri>
+    <title>nmhswidget</title>
+    <hidden>false</hidden>
+    <servicexml>nmhswidget.xml</servicexml>
+</hswidgetmanifest>
--- a/emailuis/nmhswidget/rom/nmhswidget.iby	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/rom/nmhswidget.iby	Mon Oct 04 00:05:37 2010 +0300
@@ -23,4 +23,5 @@
 file=ABI_DIR\BUILD_DIR\nmhswidget.dll                         SHARED_LIB_DIR\nmhswidget.dll
 data=\epoc32\data\z\resource\qt\plugins\nmhswidget.qtplugin   resource\qt\plugins\nmhswidget.qtplugin
 data=ZPRIVATE\2002DD15\nmhswidget.xml      					  private\2002DD15\nmhswidget.xml
+data=ZSYSTEM\install\nmhswidget_stub.sis    				  system\install\nmhswidget_stub.sis
 #endif  // __NMHSWIDGET_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/sis/nmhswidget.pkg	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,145 @@
+;
+; 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: 
+;
+;Language - standard language definitions
+&EN
+
+; Package header
+#{"NmHsWidget Installation package"}, (0x2002DD15), 1, 0, 0
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;notify HS about new provider - keep this always as a first item
+"..\resources\nmhswidget.manifest"               						- "!:\private\20022F35\import\widgetregistry\2002DD15\nmhswidget.manifest",FM,"application\hs-widget-uninstall+xml",RR,RW
+
+;nmhswidget
+"\epoc32\release\armv5\urel\nmhswidget.dll"									- "!:\sys\bin\nmhswidget.dll"
+"\epoc32\data\z\resource\qt\plugins\nmhswidget.qtplugin"		- "!:\private\20022F35\import\widgetregistry\2002DD15\nmhswidget.qtplugin"
+"\epoc32\data\z\private\2002DD15\nmhswidget.xml"						- "!:\private\20022F35\import\widgetregistry\2002DD15\nmhswidget.xml"
+"..\resources\nmhswidget.manifest"               						- "!:\private\20022F35\import\widgetregistry\2002DD15\nmhswidget.manifest"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ar.qm"	- "!:\resource\qt\translations\mailwidget_ar.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_bg.qm"	- "!:\resource\qt\translations\mailwidget_bg.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ca.qm"	- "!:\resource\qt\translations\mailwidget_ca.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_cs.qm"	- "!:\resource\qt\translations\mailwidget_cs.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_da.qm"	- "!:\resource\qt\translations\mailwidget_da.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_de.qm"	- "!:\resource\qt\translations\mailwidget_de.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_el.qm"	- "!:\resource\qt\translations\mailwidget_el.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_en.qm"	- "!:\resource\qt\translations\mailwidget_en.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_en_US.qm"	- "!:\resource\qt\translations\mailwidget_en_US.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_es.qm"	- "!:\resource\qt\translations\mailwidget_es.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_es_419.qm"	- "!:\resource\qt\translations\mailwidget_es_419.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_et.qm"	- "!:\resource\qt\translations\mailwidget_et.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_eu.qm"	- "!:\resource\qt\translations\mailwidget_eu.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_fa.qm"	- "!:\resource\qt\translations\mailwidget_fa.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_fi.qm"	- "!:\resource\qt\translations\mailwidget_fi.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_fr.qm"	- "!:\resource\qt\translations\mailwidget_fr.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_fr_CA.qm"	- "!:\resource\qt\translations\mailwidget_fr_CA.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_gl.qm"	- "!:\resource\qt\translations\mailwidget_gl.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_he.qm"	- "!:\resource\qt\translations\mailwidget_he.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_hi.qm"	- "!:\resource\qt\translations\mailwidget_hi.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_hr.qm"	- "!:\resource\qt\translations\mailwidget_hr.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_hu.qm"	- "!:\resource\qt\translations\mailwidget_hu.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_id.qm"	- "!:\resource\qt\translations\mailwidget_id.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_is.qm"	- "!:\resource\qt\translations\mailwidget_is.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_it.qm"	- "!:\resource\qt\translations\mailwidget_it.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ja.qm"	- "!:\resource\qt\translations\mailwidget_ja.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ko.qm"	- "!:\resource\qt\translations\mailwidget_ko.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_lt.qm"	- "!:\resource\qt\translations\mailwidget_lt.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_lv.qm"	- "!:\resource\qt\translations\mailwidget_lv.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ms.qm"	- "!:\resource\qt\translations\mailwidget_ms.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_nb.qm"	- "!:\resource\qt\translations\mailwidget_nb.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_nl.qm"	- "!:\resource\qt\translations\mailwidget_nl.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_pl.qm"	- "!:\resource\qt\translations\mailwidget_pl.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_pt.qm"	- "!:\resource\qt\translations\mailwidget_pt.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_pt_BR.qm"	- "!:\resource\qt\translations\mailwidget_pt_BR.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ro.qm"	- "!:\resource\qt\translations\mailwidget_ro.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ru.qm"	- "!:\resource\qt\translations\mailwidget_ru.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_sk.qm"	- "!:\resource\qt\translations\mailwidget_sk.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_sl.qm"	- "!:\resource\qt\translations\mailwidget_sl.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_sr.qm"	- "!:\resource\qt\translations\mailwidget_sr.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_sv.qm"	- "!:\resource\qt\translations\mailwidget_sv.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_th.qm"	- "!:\resource\qt\translations\mailwidget_th.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_tl.qm"	- "!:\resource\qt\translations\mailwidget_tl.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_tr.qm"	- "!:\resource\qt\translations\mailwidget_tr.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_uk.qm"	- "!:\resource\qt\translations\mailwidget_uk.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_ur.qm"	- "!:\resource\qt\translations\mailwidget_ur.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_vi.qm"	- "!:\resource\qt\translations\mailwidget_vi.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_zh.qm"	- "!:\resource\qt\translations\mailwidget_zh.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_zh_HK.qm"	- "!:\resource\qt\translations\mailwidget_zh_HK.qm"
+"\epoc32\data\z\resource\qt\translations\mailwidget_zh_TW.qm"	- "!:\resource\qt\translations\mailwidget_zh_TW.qm"
+
+
+;nmregister
+"\epoc32\release\armv5\urel\nmregister.dll"									- "!:\sys\bin\nmregister.dll"
+"\epoc32\data\z\private\2002DD16\nmregister.xml"						- "!:\private\2002DD16\import\nmregister.xml"
+"\epoc32\data\z\resource\qt\plugins\nmregister.qtplugin"		- "!:\resource\qt\plugins\nmregister.qtplugin"
+"\epoc32\data\z\resource\qt\translations\nmregister_ar.qm"	- "!:\resource\qt\translations\nmregister_ar.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_bg.qm"	- "!:\resource\qt\translations\nmregister_bg.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_ca.qm"	- "!:\resource\qt\translations\nmregister_ca.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_cs.qm"	- "!:\resource\qt\translations\nmregister_cs.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_da.qm"	- "!:\resource\qt\translations\nmregister_da.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_de.qm"	- "!:\resource\qt\translations\nmregister_de.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_el.qm"	- "!:\resource\qt\translations\nmregister_el.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_en.qm"	- "!:\resource\qt\translations\nmregister_en.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_en_US.qm"	- "!:\resource\qt\translations\nmregister_en_US.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_es.qm"	- "!:\resource\qt\translations\nmregister_es.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_es_419.qm"	- "!:\resource\qt\translations\nmregister_es_419.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_et.qm"	- "!:\resource\qt\translations\nmregister_et.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_eu.qm"	- "!:\resource\qt\translations\nmregister_eu.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_fa.qm"	- "!:\resource\qt\translations\nmregister_fa.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_fi.qm"	- "!:\resource\qt\translations\nmregister_fi.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_fr.qm"	- "!:\resource\qt\translations\nmregister_fr.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_fr_CA.qm"	- "!:\resource\qt\translations\nmregister_fr_CA.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_gl.qm"	- "!:\resource\qt\translations\nmregister_gl.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_he.qm"	- "!:\resource\qt\translations\nmregister_he.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_hi.qm"	- "!:\resource\qt\translations\nmregister_hi.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_hr.qm"	- "!:\resource\qt\translations\nmregister_hr.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_hu.qm"	- "!:\resource\qt\translations\nmregister_hu.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_id.qm"	- "!:\resource\qt\translations\nmregister_id.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_is.qm"	- "!:\resource\qt\translations\nmregister_is.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_it.qm"	- "!:\resource\qt\translations\nmregister_it.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_ja.qm"	- "!:\resource\qt\translations\nmregister_ja.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_ko.qm"	- "!:\resource\qt\translations\nmregister_ko.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_lt.qm"	- "!:\resource\qt\translations\nmregister_lt.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_lv.qm"	- "!:\resource\qt\translations\nmregister_lv.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_ms.qm"	- "!:\resource\qt\translations\nmregister_ms.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_nb.qm"	- "!:\resource\qt\translations\nmregister_nb.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_nl.qm"	- "!:\resource\qt\translations\nmregister_nl.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_pl.qm"	- "!:\resource\qt\translations\nmregister_pl.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_pt.qm"	- "!:\resource\qt\translations\nmregister_pt.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_pt_BR.qm"	- "!:\resource\qt\translations\nmregister_pt_BR.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_ro.qm"	- "!:\resource\qt\translations\nmregister_ro.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_ru.qm"	- "!:\resource\qt\translations\nmregister_ru.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_sk.qm"	- "!:\resource\qt\translations\nmregister_sk.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_sl.qm"	- "!:\resource\qt\translations\nmregister_sl.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_sr.qm"	- "!:\resource\qt\translations\nmregister_sr.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_sv.qm"	- "!:\resource\qt\translations\nmregister_sv.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_th.qm"	- "!:\resource\qt\translations\nmregister_th.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_tl.qm"	- "!:\resource\qt\translations\nmregister_tl.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_tr.qm"	- "!:\resource\qt\translations\nmregister_tr.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_uk.qm"	- "!:\resource\qt\translations\nmregister_uk.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_ur.qm"	- "!:\resource\qt\translations\nmregister_ur.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_vi.qm"	- "!:\resource\qt\translations\nmregister_vi.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_zh.qm"	- "!:\resource\qt\translations\nmregister_zh.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_zh_HK.qm"	- "!:\resource\qt\translations\nmregister_zh_HK.qm"
+"\epoc32\data\z\resource\qt\translations\nmregister_zh_TW.qm"	- "!:\resource\qt\translations\nmregister_zh_TW.qm"
+
+
+;installer
+"\epoc32\release\armv5\urel\nmregisterinstaller.exe"				- "!:\sys\bin\nmregisterinstaller.exe", FR, RB, RW
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/sis/nmhswidget_stub.pkg	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,40 @@
+;
+; 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: 
+;
+;Language - standard language definitions
+&EN
+
+; Package header
+#{"NmHsWidget stub package"}, (0x2002DD15), 1, 0, 0
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;nmhswidget
+""-"z:\sys\bin\nmhswidget.dll"
+""-"z:\private\20022F35\import\widgetregistry\2002DD15\nmhswidget.qtplugin"
+""-"z:\private\20022F35\import\widgetregistry\2002DD15\nmhswidget.xml"
+""-"z:\private\20022F35\import\widgetregistry\2002DD15\nmhswidget.manifest"
+""-"z:\resource\qt\translations\mailwidget*.qm"
+
+
+;nmregister
+""-"z:\sys\bin\nmregister.dll"
+""-"z:\private\2002DD16\import\nmregister.xml"
+""-"z:\resource\qt\plugins\nmregister.qtplugin"
+""-"z:\resource\qt\translations\nmregister*.qm"
Binary file emailuis/nmhswidget/sis/nmhswidget_stub.sis has changed
--- a/emailuis/nmhswidget/src/nmhswidget.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidget.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -15,23 +15,28 @@
  *
  */
 #include <QtGui>
+#include <QTranslator>
 #include <QGraphicsLinearLayout>
 #include <hbcolorscheme.h>
 #include <hbdocumentloader.h>
-#include <QTranslator>
 #include <hbframedrawer.h>
 #include <hbframeitem.h>
 #include <hblabel.h>
+#include <hbstyleloader.h>
+#include <hblistview.h>
+#include <hbdeviceprofile.h>
 #include "nmcommon.h"
+#include "nmmessageenvelope.h"
 #include "nmhswidget.h"
 #include "nmhswidgetemailengine.h"
-#include "nmmessageenvelope.h"
 #include "nmhswidgettitlerow.h"
-#include "nmhswidgetemailrow.h"
 #include "nmhswidgetconsts.h"
 #include "nmhswidgetdatetimeobserver.h"
+#include "nmhswidgetlistviewitem.h"
+#include "nmhswidgetlistmodel.h"
 #include "emailtrace.h"
 
+
 NmHsWidget::NmHsWidget(QGraphicsItem *parent, Qt::WindowFlags flags)
     : HbWidget(parent, flags), 
       mMainContainer(0),
@@ -47,7 +52,9 @@
       mAccountId(0),
       mAccountIconName(),
       mDateObserver(0),
-      mIsExpanded(false)
+      mIsExpanded(false),
+      mListView(0),
+	  mListModel(0)
 {
     NM_FUNCTION;
 }
@@ -149,6 +156,7 @@
         mContentContainer = static_cast<HbWidget*> (loader.findWidget(KNmHsWidgetContentContainer));
         mEmptySpaceContainer = static_cast<HbWidget*> (loader.findWidget(KNmHsWidgetEmptySpaceContainer));
         mNoMailsLabel = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetNoMailsLabel));
+        mListView = static_cast<HbListView*> (loader.findWidget("mailListView"));
         if (!mMainContainer || !mWidgetContainer || !mContentContainer 
                 || !mEmptySpaceContainer || !mNoMailsLabel ) {
             //something failed in documentloader, no point to continue
@@ -170,10 +178,17 @@
     //Use correct localisation
     mTranslator = new QTranslator();
     QString lang = QLocale::system().name();
-    mTranslator->load(KNmHsWidgetLocFileName + lang, KNmHsWidgetLocLocation);
+
+    //try to load translation from c drive. If not found then try z.
+    bool loadingSucceed = mTranslator->load(KNmHsWidgetLocFileName + lang, "c:" + KNmHsWidgetLocLocation);
+    if(!loadingSucceed){
+        mTranslator->load(KNmHsWidgetLocFileName + lang, "z:" + KNmHsWidgetLocLocation);
+    }
+    
     QCoreApplication::installTranslator(mTranslator);
 }
 
+
 /*!
  Initializes UI. Everything that is not done in docml files should be here.
  return true if ok, in error false.
@@ -212,6 +227,22 @@
 }
 
 /*!
+ Sets correct properties and mail item proto type for mail list view 
+ */
+void NmHsWidget::createMailRowsList()
+{
+	  NM_FUNCTION;
+    connect(mListView, SIGNAL(activated(const QModelIndex&)), this,
+        SLOT(openMessage(const QModelIndex&)));
+
+    // Set the list widget properties.
+    NmHsWidgetListViewItem *prototype = new NmHsWidgetListViewItem(mListView);
+    mListView->setItemPrototype(prototype);
+    mListModel = new NmHsWidgetListModel();
+    mListView->setModel(mListModel);  
+}
+
+/*!
  Initializes the widget.
  
  called by home screen fw when widget is added to home screen
@@ -221,6 +252,10 @@
     NM_FUNCTION;
     
     QT_TRY {
+    
+	    HbStyleLoader::registerFilePath(":/layout/nmhswidgetlistviewitem.widgetml");
+	    HbStyleLoader::registerFilePath(":/layout/nmhswidgetlistviewitem.css");
+	    
 	    // Use document loader to load the contents
 	    HbDocumentLoader loader;
 		//setup localization before docml loading
@@ -257,12 +292,13 @@
             return;
         }
 
+		//set account name to title row
         mTitleRow->updateAccountName(mEngine->accountName());
 
         //create observer for date/time change events
         mDateObserver = new NmHsWidgetDateTimeObserver();
 
-        //Crete MailRows and associated connections
+      	//Crete list for mail items
         createMailRowsList();
 
         updateMailData();
@@ -287,6 +323,9 @@
 	    connect(mTitleRow, SIGNAL( expandCollapseButtonPressed() )
 	            ,this, SLOT( handleExpandCollapseEvent() ) );
 	    
+	    //Get date/time events from date observer
+	    connect(mDateObserver, SIGNAL(dateTimeChanged())
+	            , this, SLOT(updateMailData()));
 	    setMinimumSize(mTitleRow->minimumWidth(), 
 	            mEmptySpaceContainer->minimumHeight() + mTitleRow->minimumHeight());
     }
@@ -297,22 +336,34 @@
 }
 
 /*!
+ Uninitializes the widget.
+ 
+ called by home screen fw when widget is removed from home screen
+ */
+void NmHsWidget::onUninitialize()
+{
+    NM_FUNCTION;
+    HbStyleLoader::unregisterFilePath(":/layout/nmhswidgetlistviewitem.widgetml");
+    HbStyleLoader::unregisterFilePath(":/layout/nmhswidgetlistviewitem.css");
+}
+
+/*!
  updateMailData slot
  */
 void NmHsWidget::updateMailData()
 {
     NM_FUNCTION;
-
-    QList<NmMessageEnvelope> envelopes;
-    int count = 0;
-    if (mIsExpanded) {
-        count = mEngine->getEnvelopes(envelopes, KMaxNumberOfMailsShown);
-    }
-
-    updateLayout(count);
-    //count is safe for envelopes and mMailRows
-    for (int i = 0; i < count; i++) {
-        mMailRows.at(i)->updateMailData(envelopes.at(i));
+    QT_TRY {
+        QList<NmMessageEnvelope*> envelopes; 
+        int count = 0;
+        if (mIsExpanded) {
+            count = mEngine->getEnvelopes(envelopes, KMaxNumberOfMailsShown);
+        }
+        mListModel->refresh( envelopes );
+        updateLayout(count);
+    }QT_CATCH(...) {
+           NM_ERROR(1,"NmHsWidget::updateMailData fail @ catch");
+           emit error();
     }
 }
 
@@ -422,30 +473,6 @@
     }
 }
 
-/*!
- Updates mMailRows list to include KMaxNumberOfMailsShown mail row widgets
- /post mMailRows contains KMaxNumberOfMailsShown mailRows 
- */
-void NmHsWidget::createMailRowsList()
-{
-    NM_FUNCTION;
-
-    //make sure that there are as many email rows as needed
-    while (mMailRows.count() < KMaxNumberOfMailsShown) {
-        NmHsWidgetEmailRow *row = new NmHsWidgetEmailRow(this);
-        if (!row->setupUI()) {
-            NM_ERROR(1, "NmHsWidget::createMailRowsList row->setUpUI() fails");
-            //if setupUI fails no point to proceed
-            emit error();
-            return;
-        }
-        connect(row, SIGNAL(mailViewerLaunchTriggered(const NmId&)), mEngine,
-            SLOT(launchMailAppMailViewer(const NmId&)));
-        connect(mDateObserver, SIGNAL(dateTimeChanged()), row, SLOT(updateDateTime()));
-        mMailRows.append(row);
-    }
-
-}
 
 /*!
  Updates the Layout to contain the right items
@@ -460,12 +487,13 @@
 void NmHsWidget::updateLayout(const int mailCount)
 {
     NM_FUNCTION;
-
+    
+	//collapsed size
+    qreal totalHeight = mEmptySpaceContainer->preferredHeight() + mTitleRow->containerHeight();
+    
     if (mIsExpanded) {
-        //set container height to content height 
-        qreal contentHeight = KMaxNumberOfMailsShown
-                * mMailRows.first()->maximumHeight();
-        mContentContainer->setMaximumHeight(contentHeight);
+        //when expanded, grow as big as possible
+        totalHeight = KNmHsWidgetHSMaxWidgetHeightInUnits * HbDeviceProfile::current().unitValue();
         mContentContainer->setVisible(true);
         if (mailCount == 0) {
             addNoMailsLabelToLayout();
@@ -479,22 +507,18 @@
     else {
         removeNoMailsLabelFromLayout();
         removeEmailRowsFromLayout();
-        mContentContainer->setVisible(false);
-        mContentContainer->setMaximumHeight(0);        
+        mContentContainer->setVisible(false);        
     }
 
-    //resize the widget to new layout size
-    qreal totalHeight = mEmptySpaceContainer->preferredHeight() + mTitleRow->containerHeight() + mContentContainer->maximumHeight();
     //set maximum sizes, otherwise widget will stay huge also when collapsed
     setMaximumHeight(totalHeight);
     mMainContainer->setMaximumHeight(totalHeight);
     mWidgetContainer->setMaximumHeight(totalHeight - mEmptySpaceContainer->preferredHeight());
     //resize here or widget cannot draw mail rows when expanding
+    //TODO: check if this is still needed as list used
     resize(mTitleRow->maximumWidth(), totalHeight);
     mMainContainer->resize(mTitleRow->maximumWidth(), totalHeight);
     mWidgetContainer->resize(mTitleRow->maximumWidth(), totalHeight - mEmptySpaceContainer->preferredHeight());
-
-    updateMailRowsVisibility(mailCount);
 }
 
 /*!
@@ -507,7 +531,7 @@
 {
     NM_FUNCTION;
 
-    if (mNoMailsLabel->isVisible() || mMailRows.isEmpty()) {
+    if ( mNoMailsLabel->isVisible() ) {
         return;
     }
     //Add mNoMailsLabel to layout if not yet there and show it
@@ -529,50 +553,40 @@
 }
 
 /*!
- addEmailRowsToLayout adds every emailrow to the layout
- /post all elements in mMailRows are added to mContentLayout
+ addEmailRowsToLayout adds list widget to content layout
  */
 void NmHsWidget::addEmailRowsToLayout()
 {
     NM_FUNCTION;
-    foreach(NmHsWidgetEmailRow *row, mMailRows)
-        {
-            mContentLayout->addItem(row);
-        }
+    
+    mContentLayout->addItem(mListView);
+    
+    mListView->setVisible(true);
+    
 }
 
 /*!
- removeEmailRowsFromLayout removes every emailrow from the layout
- /post none of the elements in mMailRows are in mContentLayout
+ removeEmailRowsFromLayout removes and hides list widget 
+ from content layout
  */
 void NmHsWidget::removeEmailRowsFromLayout()
 {
     NM_FUNCTION;
-    foreach(NmHsWidgetEmailRow *row, mMailRows)
-        {
-            mContentLayout->removeItem(row);
-        }
+    mContentLayout->removeItem(mListView);
+    mListView->setVisible(false);
 }
 
 /*!
- Updates mail row visibilities in static widget
- /param visibleCount defines how many items do have mail data
- /post all row items having mail data are visible, other rows are hidden
+ openMessage slot
  */
-void NmHsWidget::updateMailRowsVisibility(const int visibleCount)
+void NmHsWidget::openMessage(const QModelIndex& index)
 {
-    NM_FUNCTION;
+     QVariant var = mListModel->data(index,Qt::DisplayRole);
+     if(!var.isNull()){
+         NmMessageEnvelope *envelope = var.value<NmMessageEnvelope*>();
+         mEngine->launchMailAppMailViewer(envelope->messageId());
+     }
 
-    // set visible as many rows as requested by visibleCount param
-    bool isVisible;
-
-    for (int i = 0; i < mMailRows.count(); i++) {
-        isVisible = false;
-        if ((mIsExpanded) && (i < visibleCount)) {
-            isVisible = true;
-        }
-        mMailRows.at(i)->setVisible(isVisible);
-    }
 }
 
 /*!
--- a/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description: 
+ * Description:
  *
  */
 
@@ -20,6 +20,7 @@
 #include <qpluginloader.h>
 #include <xqapplicationmanager.h>
 #include <xqaiwdeclplat.h>
+#include <email_services_api.h>
 #include "nmcommon.h"
 #include "nmmessageenvelope.h"
 #include "nmhswidgetemailengine.h"
@@ -34,14 +35,14 @@
  Constructor
  */
 NmHsWidgetEmailEngine::NmHsWidgetEmailEngine(const NmId& monitoredMailboxId) :
-    mMailboxId(monitoredMailboxId), 
-    mFolderId(0), 
-    mAccountName(), 
+    mMailboxId(monitoredMailboxId),
+    mFolderId(0),
+    mAccountName(),
     mUnreadCount(-1),
-    mEmailInterface(0), 
-    mFactory(0), 
+    mEmailInterface(0),
+    mFactory(0),
     mAccountEventReceivedWhenSuspended(false),
-    mMessageEventReceivedWhenSuspended(false), 
+    mMessageEventReceivedWhenSuspended(false),
     mSuspended(false),
     mUpdateTimer(0),
     mAiwRequest(0)
@@ -58,18 +59,18 @@
 bool NmHsWidgetEmailEngine::initialize()
 {
     NM_FUNCTION;
-        
+
     if (!constructNmPlugin()) {
         //if plugin connection fails, there's no reason to proceed
         return false;
     }
     updateData();
     updateAccount();
-    
+
     mUpdateTimer = new QTimer(this);
     mUpdateTimer->setInterval(NmHsWidgetEmailEngineUpdateTimerValue);
     connect(mUpdateTimer, SIGNAL(timeout()), this, SLOT(handleUpdateTimeout()) );
-    
+
     return true;
 }
 
@@ -102,21 +103,21 @@
 
     if (!mEmailInterface) {
         NM_ERROR(1,"NmHsWidgetEmailEngine::constructNmPlugin() -- mEmailInterface FAILED");
-        return false;       
+        return false;
     }
     //Verify that the mailbox we are interested actually exists.
     //Otherwise emit account deleted event (instead of just returning)
-    QList<NmId> ids; 
+    QList<NmId> ids;
     mEmailInterface->listMailboxIds(ids);
     if(!ids.contains(mMailboxId)){
         NM_ERROR(1,"NmHsWidgetEmailEngine::constructNmPlugin() -- !ids.contains(mMailboxId) FAILED");
         emit exceptionOccured(NmEngineExcAccountDeleted);
         return false;
     }
-    
+
     //retrieve folderID for this mailbox's inbox
     //If NmId equals zero, we don't have the Initial sync done for the account
-    //This is valid at least for IMAP accounts. 
+    //This is valid at least for IMAP accounts.
     //Folder ID is then retrieved later when first message event is received
     mFolderId = mEmailInterface->getStandardFolderId(mMailboxId, NmFolderInbox);
 
@@ -129,6 +130,10 @@
         SLOT( handleMessageEvent(NmMessageEvent, const NmId&,
                 const QList<NmId>&, const NmId&) ));
 
+    connect( pluginInstance, SIGNAL( void folderEvent(
+             NmFolderEvent, const QList<NmId>, const NmId&) ), this,
+             SLOT( void handleFolderEvent( NmFolderEvent, const QList<NmId>, const NmId&)));
+
     connect(pluginInstance, SIGNAL( mailboxEvent(NmMailboxEvent, const QList<NmId>& ) ), this,
         SLOT( handleMailboxEvent(NmMailboxEvent, const QList<NmId>&) ));
 
@@ -159,7 +164,7 @@
     if (mFactory) {
         NmDataPluginFactory::releaseInstance(mFactory);
     }
-    
+
     if (mUpdateTimer){
         mUpdateTimer->stop();
         delete mUpdateTimer;
@@ -169,22 +174,18 @@
 /*!
  getEnvelopes() provides message envelopes as a list of stack objects
  Amount of message envelopes in the list parameter is the smallest of the following factors:
- 'KMaxNumberOfEnvelopesProvided', 'maxEnvelopeAmount', 'amount of available envelopes'. 
- 
+ 'KMaxNumberOfEnvelopesProvided', 'maxEnvelopeAmount', 'amount of available envelopes'.
+
  \param list list to be filled with message envelopes
- \param maxEnvelopeAmount Client side limit for amount of message envelope count. 
+ \param maxEnvelopeAmount Client side limit for amount of message envelope count.
  \return count of envelopes added to list
  */
-int NmHsWidgetEmailEngine::getEnvelopes(QList<NmMessageEnvelope> &list, int maxEnvelopeAmount)
+int NmHsWidgetEmailEngine::getEnvelopes(QList<NmMessageEnvelope*> &list, int maxEnvelopeAmount)
 {
     NM_FUNCTION;
     list.clear(); //Reset the parameter list to avoid side effects
-    int i = 0;
-    for (; i < mEnvelopeList.count() && i < maxEnvelopeAmount; i++) {
-        NmMessageEnvelope env(*mEnvelopeList.at(i));
-        list.append(env);
-    }
-    return i;
+    list.append(mEnvelopeList.mid(0, maxEnvelopeAmount));
+    return list.count();
 }
 
 /*!
@@ -212,12 +213,12 @@
 /*!
  Refresh email data.
  \post mEnvelopeList is refreshed with valid content so that it has
-       valid data with maximum of KMaxNumberOfEnvelopesProvided envelopes. 
-       
+       valid data with maximum of KMaxNumberOfEnvelopesProvided envelopes.
+
  - emits exceptionOccured(NmEngineExcFailure) if fatal error occurs.
  - emits mailDataChanged() if new mail data is set into mEnvelopeList
  - emits unreadCountChanged(mUnreadCount), if mUnreadCount is updated
- 
+
  \return true if everything succeeded, otherwise false
  */
 bool NmHsWidgetEmailEngine::updateData()
@@ -236,7 +237,7 @@
     int msgErr = mEmailInterface->listMessages(mMailboxId, mFolderId, mEnvelopeList,
         KMaxNumberOfEnvelopesProvided);
     if (msgErr) {
-        //retrieval of messages failed.  
+        //retrieval of messages failed.
         return false;
     }
     //emit signal about new message data right away
@@ -282,16 +283,16 @@
     NM_FUNCTION;
     Q_UNUSED(event);
     Q_UNUSED(messageIds);
-    
+
     if (!mEmailInterface) {
         NM_ERROR(1,"NmHsWidgetEmailEngine::handleMessageEvent() -- Interface missing");
         emit exceptionOccured(NmEngineExcFailure); //fatal error
         return; //if interface is missing there's nothing to do
     }
-    
+
     if (mFolderId == NmId(0)) {
-        // inbox was not created in construction phase, so let's
-        // get id now as received first mail event
+        // inbox was not created in construction phase or the folder was deleted in some point,
+        //so let's get the id now as we received first mail event
         mFolderId = mEmailInterface->getStandardFolderId(mMailboxId, NmFolderInbox);
     }
     if ((folderId == mFolderId) && (mailboxId == mMailboxId)) {
@@ -307,6 +308,29 @@
 }
 
 /*!
+ handleFolderEvent slot.
+ If the monitored folder is deleted, clear the envelope list and unread count.
+ Also the mFolderId is set to 0 to indicate the current state so that in device boot up
+ we don't query any messages. When the first message event arrives, the folder ID must be
+ retrieved again.
+ */
+void NmHsWidgetEmailEngine::handleFolderEvent( NmFolderEvent event,
+    const QList<NmId> &folderIds, const NmId& mailboxId)
+{
+    NM_FUNCTION;
+    //react only if the monitored folder for monitored account is deleted
+    if (event == NmFolderIsDeleted && mailboxId == mMailboxId && folderIds.contains(mFolderId) )
+    {
+        resetEnvelopeList();    //cached envelopes to be cleared
+        mUnreadCount = 0;       //unread count to 0
+        mFolderId = NmId(0);    //folder id to zero (indicates the situation where folder is not available)
+        emit mailDataChanged(); //emit data change for UI
+        emit unreadCountChanged(mUnreadCount); // emit unread count change to UI
+    }
+}
+
+
+/*!
  handleMailboxEvent slot.
  */
 void NmHsWidgetEmailEngine::handleMailboxEvent(NmMailboxEvent event, const QList<NmId> &mailboxIds)
@@ -348,7 +372,7 @@
 
 /*!
  Update Account data
- \post if mEmailInterface exists, the mAccountName is refreshed from adapter 
+ \post if mEmailInterface exists, the mAccountName is refreshed from adapter
  and accountNameChanged signal is emitted.
  */
 bool NmHsWidgetEmailEngine::updateAccount()
@@ -408,22 +432,23 @@
 void NmHsWidgetEmailEngine::launchMailAppInboxView()
 {
     NM_FUNCTION;
-    
-    QT_TRY{ 
+    NM_TIMESTAMP("Launch mail application from widget.");
+
+    QT_TRY{
         if (!mAiwRequest) {
             XQApplicationManager appManager;
             mAiwRequest = appManager.create(
                     XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW,
                     false);
-            
+
             if (mAiwRequest) {
-                connect(mAiwRequest, SIGNAL( requestError(int, const QString&) ), 
+                connect(mAiwRequest, SIGNAL( requestError(int, const QString&) ),
                         this, SLOT( aiwRequestError(int, const QString&) ));
-                connect(mAiwRequest, SIGNAL( requestOk(const QVariant&) ), 
+                connect(mAiwRequest, SIGNAL( requestOk(const QVariant&) ),
                         this, SLOT( aiwRequestOk(const QVariant&) ));
                 QList<QVariant> list;
                 list.append(QVariant(mMailboxId.id()));
-            
+
                 mAiwRequest->setSynchronous(false);
                 mAiwRequest->setArguments(list);
                 mAiwRequest->send();
@@ -445,27 +470,31 @@
 void NmHsWidgetEmailEngine::launchMailAppMailViewer(const NmId &messageId)
 {
     NM_FUNCTION;
+    NM_TIMESTAMP("Launch mail viewer from widget.");
 
     QT_TRY{
         if (!mAiwRequest) {
             XQApplicationManager appManager;
             mAiwRequest = appManager.create(
-                    XQI_EMAIL_MESSAGE_VIEW, XQOP_EMAIL_MESSAGE_VIEW,
+                    XQI_EMAIL_MESSAGE_VIEW, "viewMessage(QVariant,QVariant)",
+					//XQOP_EMAIL_MESSAGE_VIEW,
                     false);
-            
+
             if (mAiwRequest) {
-                connect(mAiwRequest, SIGNAL( requestError(int, const QString&) ), 
+                connect(mAiwRequest, SIGNAL( requestError(int, const QString&) ),
                         this, SLOT( aiwRequestError(int, const QString&) ));
-                connect(mAiwRequest, SIGNAL( requestOk(const QVariant&) ), 
+                connect(mAiwRequest, SIGNAL( requestOk(const QVariant&) ),
                         this, SLOT( aiwRequestOk(const QVariant&) ));
 
+                QVariantList messageIdList;
+                messageIdList.append(mMailboxId.id());
+                messageIdList.append(mFolderId.id());
+                messageIdList.append(messageId.id());
+
                 QList<QVariant> argList;
-                QList<QVariant> messageIdList;
-                messageIdList.append(QVariant(mMailboxId.id()));
-                messageIdList.append(QVariant(mFolderId.id()));
-                messageIdList.append(QVariant(messageId.id()));
-                argList.append(messageIdList);
-            
+                argList.append(QVariant(messageIdList));
+                argList.append(quint64(EmailBackReturnsToMessageList));
+
                 mAiwRequest->setSynchronous(false);
                 mAiwRequest->setArguments(argList);
                 mAiwRequest->send();
@@ -487,7 +516,7 @@
     NM_FUNCTION;
 
     Q_UNUSED(result);
-    
+
     deleteAiwRequest();
 }
 
@@ -500,7 +529,7 @@
 
     Q_UNUSED(errorCode);
     Q_UNUSED(errorMessage);
-    
+
     deleteAiwRequest();
 }
 
@@ -512,6 +541,6 @@
     NM_FUNCTION;
 
     delete mAiwRequest;
-    mAiwRequest = NULL;    
+    mAiwRequest = NULL;
 }
 
--- a/emailuis/nmhswidget/src/nmhswidgetemailrow.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,434 +0,0 @@
-/*
- * 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: 
- *
- */
-
-#include <QGraphicsLinearLayout>
-#include <hbdocumentloader.h>
-#include <hblabel.h>
-#include <hbextendedlocale.h>
-#include <hbframedrawer.h>
-#include <hbframeitem.h>
-#include <hbcolorscheme.h>
-#include <hbevent.h>
-#include <hbtapgesture.h>
-#include <hbinstantfeedback.h>
-#include "nmicons.h"
-#include "nmcommon.h"
-#include "nmhswidgetemailrow.h"
-#include "nmhswidgetconsts.h"
-#include "emailtrace.h"
-
-NmHsWidgetEmailRow::NmHsWidgetEmailRow(QGraphicsItem *parent, Qt::WindowFlags flags) :
-    HbWidget(parent, flags), 
-    mSenderLabel(0), 
-    mSubjectLabel(0), 
-    mTimeLabel(0), 
-    mNewMailIcon(0),
-    mSeparatorIcon(0), 
-    mMessageId(0),
-    mBackgroundLayoutItem(0)
-{
-    NM_FUNCTION;
-    grabGesture(Qt::TapGesture);
-}
-
-/*!
- Destructor
- */
-NmHsWidgetEmailRow::~NmHsWidgetEmailRow()
-{
-    NM_FUNCTION;
-}
-
-/*!
- Returns id of message shown
- */
-NmId NmHsWidgetEmailRow::messageId()
-{
-    NM_FUNCTION;
-    return mMessageId;
-
-}
-
-/*
- Setup email row ui
-  Must be called after constructor.
-   /return true if loading succeeded, otherwise false. False indicates that object is unusable.
- */
-bool NmHsWidgetEmailRow::setupUI()
-    {
-    NM_FUNCTION;
-    
-    if(!loadDocML() || !setupGraphics()){
-        return false;
-    }
-    return true;
-    }
-
-
-
-/*!
- Loads layout data and child items from docml file 
-  /return true if loading succeeded, otherwise false. False indicates that object is unusable.
- */
-bool NmHsWidgetEmailRow::loadDocML()
-{
-    NM_FUNCTION;
-
-    QT_TRY{   
-        // Use document loader to load the contents
-        HbDocumentLoader loader;
-        bool ok(false);
-        loader.load(KNmHsWidgetMailRowDocML, &ok);
-        if (!ok) {
-            NM_ERROR(1,"NmHsWidgetEmailRow::loadDocML fail @ loader");
-            return false;
-        }
-    
-        QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
-    
-        //Do the layout stuff and Set layout before next return to avoid memoryleak
-        layout->setContentsMargins(KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin,
-            KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin);
-        layout->setSpacing(KNmHsWidgetContentsMargin);
-        setLayout(layout);
-    
-        //find container widget
-        QGraphicsWidget *container = loader.findWidget(KNmHsWidgetMailRowContainer);
-        if (!container) {
-            NM_ERROR(1,"NmHsWidgetEmailRow::loadDocML fail @ container");
-            return false;
-        }
-        layout->addItem(container);
-    
-        //child items possible to update
-        //separator
-        mSeparatorIcon = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetMailSeparatorIcon));
-    
-        //labels
-        mSenderLabel = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetMailRowSenderLabel));
-        mSubjectLabel = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetMailRowSubjectLabel));
-        mTimeLabel = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetMailRowTimeLabel));
-    
-        //icons
-        mNewMailIcon = static_cast<HbWidget*> (loader.findWidget(KNmHsWidgetMailRowNewMailIcon));
-        // KNmHsWidgetMailRowLeftIcon is not yet used, because followup information is not shown in client side
-        // and thus it is not wanted to be shown in widget side
-        mStatusIcons.append(static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetMailRowRightIcon)));
-        mStatusIcons.append(static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetMailRowMiddleIcon)));
-        mStatusIcons.append(static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetMailRowLeftIcon)));
-    
-        //Verify that items are valid
-        if (!mSenderLabel || !mSubjectLabel || !mTimeLabel || !mNewMailIcon || !mSeparatorIcon) {
-            NM_ERROR(1,"NmHsWidgetEmailRow::loadDocML fail @ labels & icons");
-            return false;
-        }
-        //Verify all mStatusIcons
-        for (int i = 0; i < mStatusIcons.length(); i++) {
-            if (!mStatusIcons.at(i)) {
-                return false;
-            }
-        }
-        
-        return true;
-    }
-    QT_CATCH(...){
-        return false;
-    }
-}
-
-/*
- Setup graphics that cannot be loaded from docml.
-  /return true if loading succeeded, otherwise false. False indicates that object is unusable.
- */
-bool NmHsWidgetEmailRow::setupGraphics()
-    {
-    NM_FUNCTION;
-    
-    HbFrameDrawer* newMailIconFrameDrawer = 0;
-    HbFrameItem* newMailIconFrameItem = 0;
-    HbFrameDrawer* backgroundFrameDrawer = 0;
-    QT_TRY{ 
-        //separator icon
-        HbIcon separatorIcon("qtg_graf_divider_h_thin");
-        mSeparatorIcon->setIcon(separatorIcon);
-        
-        //new email icon
-        newMailIconFrameDrawer = new HbFrameDrawer("qtg_fr_list_new_item",
-            HbFrameDrawer::ThreePiecesVertical);
-        newMailIconFrameItem = new HbFrameItem(newMailIconFrameDrawer);
-        mNewMailIcon->setBackgroundItem(newMailIconFrameItem);
-        
-        //hide all the icons first to avoid blinking
-        hideIcons();
-    
-        //pressed background
-        backgroundFrameDrawer = new HbFrameDrawer("qtg_fr_hsitems_pressed", HbFrameDrawer::NinePieces);
-        mBackgroundLayoutItem = new HbFrameItem( backgroundFrameDrawer );
-        setBackgroundItem( mBackgroundLayoutItem );
-        mBackgroundLayoutItem->hide();
-            
-        return true;
-    }
-    QT_CATCH(...){
-        if(!newMailIconFrameItem && newMailIconFrameDrawer){
-            delete newMailIconFrameDrawer;
-            newMailIconFrameDrawer = NULL;
-        }
-        if(!mBackgroundLayoutItem && backgroundFrameDrawer){
-            delete backgroundFrameDrawer;
-            backgroundFrameDrawer = NULL;
-        }
-        return false;
-    }
-}
-
-/*!
- Sets the data provided as a parameter to the UI components
- \param envelope message envelope representing an email
- */
-void NmHsWidgetEmailRow::updateMailData(const NmMessageEnvelope& envelope)
-{
-    NM_FUNCTION;
-
-    mEnvelope = NmMessageEnvelope(envelope);
-    
-    //hide all icons, so no previous data is messing with the new
-    hideIcons();
-
-    mMessageId = envelope.messageId();
-    //Show sender name if it is available, otherwise show email address
-    QString senderDisplayName = envelope.sender().displayName();
-    if (!senderDisplayName.isNull() && !senderDisplayName.isEmpty()) {
-        mSenderLabel->setPlainText(senderDisplayName);
-    }
-    else {
-        mSenderLabel->setPlainText(envelope.sender().address());
-    }
-
-    //Set subject
-    mSubjectLabel->setPlainText(envelope.subject());
-    
-    mMessageSentTime = envelope.sentTime();
-    updateDateTime();
-    
-    //set new icons to widget based on the data
-    setIconsToWidget( envelope );
-    
-    //set fonts color and size
-    setFontsSize(mEnvelope.isRead());
-    setHighlighedFontsColor(false);
-    }
-
-/*!
-    updateDateTime to label using correct locale
-*/
-void NmHsWidgetEmailRow::updateDateTime()
-    {
-    NM_FUNCTION;
-    //Set Date with locale support
-    //Time shown if message is sent today, otherwise show date
-    HbExtendedLocale locale = HbExtendedLocale::system();
-    QDateTime now = QDateTime::currentDateTime();
-    //change time to locale time. mMessageSentTime is always in GMT
-    QDateTime localTime = mMessageSentTime.addSecs(locale.universalTimeOffset());
-    if ( localTime.date() == now.date() )
-        {
-        //time format specification
-        QString timeSpec = r_qtn_time_usual;
-        mTimeLabel->setPlainText( locale.format(localTime.time(), timeSpec) );
-        }
-    else
-        {
-        QString dateSpec = r_qtn_date_without_year;
-        mTimeLabel->setPlainText( locale.format(localTime.date(), dateSpec) );
-        }
-    }
-
-/*!
- hide icons from widget
- */
-void NmHsWidgetEmailRow::hideIcons()
-{
-    NM_FUNCTION;
-    for (int i = 0; i < mStatusIcons.count(); i++) {
-        mStatusIcons.at(i)->hide();
-    }
-    mNewMailIcon->hide();
-}
-
-/*!
- Set icons to widget
- */
-void NmHsWidgetEmailRow::setIconsToWidget(const NmMessageEnvelope& envelope)
-{
-    NM_FUNCTION;
-
-    bool unreadMail = !envelope.isRead();
-    bool attachment = envelope.hasAttachments();
-    int priority = envelope.priority();
-
-    if (unreadMail) {
-        mNewMailIcon->show();
-    }
-
-    // Here we have list for priority and attachment icons. Later it is easy to add
-    // followup icon or something else if needed.
-    QList<HbIcon> iconList;
-
-    // Priority icon is added to list first thus it is always shown most right.
-    switch (priority) {
-        case NmMessagePriorityLow:
-            iconList.append(NmIcons::getIcon(NmIcons::NmIconPriorityLow));
-            break;
-        case NmMessagePriorityHigh:
-            iconList.append(NmIcons::getIcon(NmIcons::NmIconPriorityHigh));
-            break;
-        case NmMessagePriorityNormal:
-        default:
-            // Normal priority has no icon
-            break;
-    }
-
-    // Attachment icon is always shown on the left side of attachment icon if it
-    // exists. Otherwise in the most right.
-    if (attachment) {
-        iconList.append(NmIcons::getIcon(NmIcons::NmIconAttachment));
-    }
-
-    // Here we show icons added to the iconList in the order they have been added.
-    for (int count = 0; count < iconList.count(); count++) {
-        mStatusIcons.at(count)->setIcon(iconList.at(count));
-        mStatusIcons.at(count)->show();
-    }
-}
-
-
-/*!
-    sets fonts size. Unread and read mails are shown differently
-*/
-void NmHsWidgetEmailRow::setFontsSize( bool read )
-    {
-    NM_FUNCTION;
-    HbFontSpec fontSpec;
-    
-    if(!read){
-        fontSpec.setRole(HbFontSpec::Primary);
-        mTimeLabel->fontSpec().setRole(HbFontSpec::Primary);
-    }
-    else{
-        fontSpec.setRole(HbFontSpec::Secondary);
-        mTimeLabel->fontSpec().setRole(HbFontSpec::Secondary);
-    }  
-    
-    qreal size;
-    bool found = style()->parameter(QString("hb-param-text-height-secondary"), size );
-    if (found) {
-        fontSpec.setTextHeight(size);
-    }
-    
-    mSenderLabel->setFontSpec(fontSpec);
-    mSubjectLabel->setFontSpec(fontSpec);
-    }
-
-/*!
-    sets fonts color.
-    /param bool pressed indicates if row is pressed down or not
-*/
-void NmHsWidgetEmailRow::setHighlighedFontsColor( bool pressed )
-    {
-    NM_FUNCTION;
-    QColor newFontColor;
-    
-    if(pressed){
-        newFontColor = HbColorScheme::color("qtc_hs_list_item_pressed");
-    }
-    else if(mEnvelope.isRead()){
-        newFontColor = HbColorScheme::color("qtc_hs_list_item_content_normal");
-    }
-    else{
-        newFontColor = HbColorScheme::color("qtc_hs_list_item_title_normal");
-    }
- 
-    mSenderLabel->setTextColor(newFontColor);
-    mSubjectLabel->setTextColor(newFontColor);
-    mTimeLabel->setTextColor(newFontColor);
-    }
-
-/*!
-    change background highlight
-    /param bool show if true then shown, false hide
-*/
-void NmHsWidgetEmailRow::showHighlight( bool show )
-    {
-    NM_FUNCTION;
-    
-    if(show){
-        mBackgroundLayoutItem->show();
-    }
-    else{
-        mBackgroundLayoutItem->hide();
-    }
-    }
-
-/*
- * NmHsWidgetEmailRow::gestureEvent(QGestureEvent *event)
- */
-void NmHsWidgetEmailRow::gestureEvent(QGestureEvent *event)
-{
-    NM_FUNCTION;
-    if(!event){
-        return;
-    }
-    HbTapGesture *gesture = qobject_cast<HbTapGesture *>(event->gesture(Qt::TapGesture));
-    if(!gesture){
-        return;
-    }
-    switch (gesture->state()) {
-        case Qt::GestureStarted:
-            setHighlighedFontsColor(true);
-            showHighlight(true);
-        break;
-        case Qt::GestureCanceled:
-            setHighlighedFontsColor(false);
-            showHighlight(false);
-        break;
-        case Qt::GestureFinished:
-            setHighlighedFontsColor(false);
-            showHighlight(false);
-            if (gesture->tapStyleHint() == HbTapGesture::Tap) {
-                HbInstantFeedback::play(HbFeedback::BasicItem);
-                emit mailViewerLaunchTriggered(mMessageId);
-            }
-        break;
-    default: 
-        break;
-    }
-}
-
-/*
- * NmHsWidgetEmailRow::event()
- */
-bool NmHsWidgetEmailRow::event( QEvent *event )
-{
-    NM_FUNCTION;
-    QEvent::Type eventType = event->type();
-    if( eventType == HbEvent::ThemeChanged ){
-        setHighlighedFontsColor(false);
-        return true;
-    }
-    return HbWidget::event(event);
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/src/nmhswidgetlistmodel.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* 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:
+*
+*/
+
+#include <hbnamespace.h>
+#include <nmmessageenvelope.h>
+#include "nmhswidgetlistmodel.h"
+#include "nmhswidgetlistmodelitem.h"
+
+/*!
+    \class NmHsWidgetListModel
+    \brief The NmHsWidgetListModel class represents data model for message list.
+    @alpha
+
+    The NmHsWidgetListModel class uses NmHsWidgetListModelItem class to represent data returned in its'
+    data method to get all information needed for one list row for a widget by calling the method
+    once.
+*/
+
+/*!
+    Constructor
+ */
+NmHsWidgetListModel::NmHsWidgetListModel(QObject *parent)
+:QStandardItemModel(parent)
+{
+    NM_FUNCTION;
+}
+
+/*!
+	Destructor
+ */
+NmHsWidgetListModel::~NmHsWidgetListModel()
+{
+    NM_FUNCTION;
+    
+    clear();
+}
+
+/*!
+    Returns data specified by \a index. Only Qt::DisplayRole is supported in \a role.
+    The refresh method must have been called before this method can return any real data.
+ */
+QVariant NmHsWidgetListModel::data(const QModelIndex &index, int role) const
+{
+    NM_FUNCTION;
+    
+    QVariant qVariant;
+    if (index.isValid() && Qt::DisplayRole == role) {
+        NmHsWidgetListModelItem *item = static_cast<NmHsWidgetListModelItem*>(itemFromIndex(index));
+        NmMessageEnvelope *mailbox = item->itemMetaData();
+        qVariant = QVariant::fromValue(mailbox);
+    }
+    return qVariant;
+}
+
+/*!
+    This refreshes the data of the model.
+    NOTE: safe guard any call to this function with try-catch.
+ */
+void NmHsWidgetListModel::refresh(
+        QList<NmMessageEnvelope*> &envelopeList)
+{
+    NM_FUNCTION;
+    
+    clear();
+    foreach(NmMessageEnvelope *env, envelopeList){
+       NmHsWidgetListModelItem *item = createMessageListModelItem(env);
+       appendRow(item);
+    }
+}
+
+
+/*!
+    Create mailbox item
+    \param mailbox
+ */
+NmHsWidgetListModelItem* NmHsWidgetListModel::createMessageListModelItem(const NmMessageEnvelope* envelope)
+{
+    NM_FUNCTION;
+    
+    NmMessageEnvelope *newMeta = new NmMessageEnvelope(*envelope);
+    NmHsWidgetListModelItem *item = new NmHsWidgetListModelItem();
+    item->setItemMetaData(newMeta);
+    item->setData(Hb::StandardItem, Hb::ItemTypeRole);
+    return item;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/src/nmhswidgetlistmodelitem.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,69 @@
+/*
+ * 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:
+ *
+ */
+
+#include <nmmessageenvelope.h>
+#include "nmhswidgetlistmodelitem.h"
+
+/*!
+ \class NmHsWidgetListModelItem
+ \brief The NmHsWidgetListModelItem class represents data model for mailbox list.
+ */
+
+/*!
+ Constructor
+ */
+NmHsWidgetListModelItem::NmHsWidgetListModelItem() :
+    QStandardItem(), 
+    mMessageEnvelope(NULL)
+{
+    NM_FUNCTION;
+}
+
+/*!
+ Destructor
+ */
+NmHsWidgetListModelItem::~NmHsWidgetListModelItem()
+{
+    NM_FUNCTION;
+
+    delete mMessageEnvelope;
+}
+
+/*!
+ setItemMetaData. Set function for item related meta data object
+ */
+void NmHsWidgetListModelItem::setItemMetaData(NmMessageEnvelope *metaData)
+{
+    NM_FUNCTION;
+
+    if (mMessageEnvelope) {
+        delete mMessageEnvelope;
+    }
+    mMessageEnvelope = metaData;
+    emitDataChanged();
+}
+
+/*!
+itemMetaData. Get function for item related meta data object
+ */
+NmMessageEnvelope *NmHsWidgetListModelItem::itemMetaData()
+{
+    NM_FUNCTION;
+
+    return mMessageEnvelope;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/src/nmhswidgetlistviewitem.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,312 @@
+/*
+* 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 <hbtextitem.h>
+#include <hbiconitem.h>
+#include <hbframeitem.h>
+#include <hbframebackground.h>
+#include <hbextendedlocale.h>
+#include <hbcolorscheme.h>
+#include <nmmessageenvelope.h>
+#include <nmicons.h>
+#include "nmhswidgetlistviewitem.h"
+
+/*!
+    \class NmHsWidgetListViewItem
+    \brief Mail widget list view item inherited from HbListViewItem
+*/
+
+/*!
+    Constructor
+*/
+NmHsWidgetListViewItem::NmHsWidgetListViewItem(QGraphicsItem *parent)
+: HbListViewItem(parent),
+        mSeparator(NULL),
+        mSender(NULL),
+        mSubject(NULL),
+        mTime(NULL),
+        mNewMsgIcon(NULL),
+        mIcon1(NULL),
+        mIcon2(NULL)
+{
+    NM_FUNCTION; 
+}
+
+/*!
+    Destructor
+*/
+NmHsWidgetListViewItem::~NmHsWidgetListViewItem()
+{
+    NM_FUNCTION;
+}
+
+/*!
+    Item creation
+*/
+HbAbstractViewItem* NmHsWidgetListViewItem::createItem()
+{
+    NM_FUNCTION;
+    
+    return new NmHsWidgetListViewItem(*this);
+}
+
+/*!
+    update child items
+*/
+void NmHsWidgetListViewItem::updateChildItems()
+{
+    NM_FUNCTION;
+
+    NmMessageEnvelope *envelope =
+           modelIndex().data(Qt::DisplayRole).value<NmMessageEnvelope*>();
+  
+    createMessageItemLayout();
+    setContentsToMessageItem(*envelope);
+    
+    HbListViewItem::updateChildItems();   
+}
+
+/*!
+    Set item layout.
+    Function does not take ownership of model or model item.
+ */
+void NmHsWidgetListViewItem::createMessageItemLayout()
+{
+    NM_FUNCTION;
+    getFontSizes();
+    // Create separator icon and set name from widgetml.
+    if (!mSeparator) {
+        mSeparator = new HbIconItem(this);
+        HbStyle::setItemName(mSeparator, "separator");
+        mSeparator->setObjectName("ListViewItemMessageSeparator");
+        mSeparator->setIcon(HbIcon("qtg_graf_divider_h_thin"));   
+    }
+    // Create sender label and set name from widgetml.
+    if (!mSender) {
+        mSender = new HbTextItem(this);
+        HbStyle::setItemName(mSender, "sender");
+        mSender->setObjectName("ListViewItemMessageSender");
+    }
+    // Create time label and set name from widgetml.
+    if (!mTime) {
+        mTime = new HbTextItem(this);
+        HbStyle::setItemName(mTime, "time");
+        mTime->setObjectName("ListViewItemMessageTime");
+    }
+    // Create subject label and set name from widgetml.
+    if (!mSubject) {
+        mSubject = new HbTextItem(this);
+        HbStyle::setItemName(mSubject, "subject");
+        mSubject->setObjectName("ListViewItemMessageSubject");
+    }
+    // Set new message icon.
+    if (!mNewMsgIcon) {
+        mNewMsgIcon = new HbFrameItem(this);
+        HbStyle::setItemName(mNewMsgIcon, "msgicon");
+    }
+    
+    // Create priority icon and set name from widgetml.
+    if(!mIcon1){
+        mIcon1 = new HbIconItem(this);
+        HbStyle::setItemName(mIcon1, "icon1");
+        mStatusIcons.append(mIcon1);
+    }
+
+    // Create attachment icon and set name from widgetml.
+    if(!mIcon2){
+        mIcon2 = new HbIconItem(this);
+        HbStyle::setItemName(mIcon2, "icon2");
+        mStatusIcons.append(mIcon2);
+    }
+        
+    //set empty frame as list item only shows background when selected
+    setDefaultFrame(HbFrameBackground("", HbFrameDrawer::OnePiece));
+}
+
+/*!
+    Set item text label contents, icons, etc.
+    Function does not take ownership of model or model item.
+*/
+void NmHsWidgetListViewItem::setContentsToMessageItem(const NmMessageEnvelope &envelope)
+{
+    NM_FUNCTION;
+    // Member variables are created in previous function.
+    // Sender.
+    QString senderDisplayName = envelope.sender().displayName();
+    if (!senderDisplayName.isNull() && !senderDisplayName.isEmpty()) {
+        mSender->setText(senderDisplayName);
+    }
+    else {
+        mSender->setText(envelope.sender().address());
+    }
+
+    // Time.
+    HbExtendedLocale locale = HbExtendedLocale::system();
+    QDateTime localTime = envelope.sentTime().addSecs(locale.universalTimeOffset());
+    QDate sentLocalDate = localTime.date();
+    QDate currentdate = QDate::currentDate();
+    if (sentLocalDate == currentdate) {
+        QString shortTimeSpec = r_qtn_time_usual;
+        QTime time = localTime.time();
+        mTime->setText(locale.format(time, shortTimeSpec));
+    } else {
+        QString shortDateSpec = r_qtn_date_without_year;
+        mTime->setText(locale.format(sentLocalDate, shortDateSpec));
+    }
+    // Subject.
+    QString subjectText = envelope.subject();
+    if (subjectText.length()) {
+        mSubject->setText(subjectText);
+    } else {
+        mSubject->setText(hbTrId("txt_mailwdgt_dblist_val_no_subject"));
+    }
+    
+    // Here we have list for priority and attachment icons. Later it is easy to add
+    // followup icon or something else if needed.
+    QList<HbIcon> iconList;
+    
+    //make sure icons are not shown yet
+    for (int i = 0; i < mStatusIcons.count(); i++) {
+        mStatusIcons.at(i)->hide();
+    }
+    
+    // Priority icon is added to list first thus it is always shown most right.
+    switch (envelope.priority()) {
+        case NmMessagePriorityLow:
+            iconList.append(NmIcons::getIcon(NmIcons::NmIconPriorityLow));
+            break;
+        case NmMessagePriorityHigh:
+            iconList.append(NmIcons::getIcon(NmIcons::NmIconPriorityHigh));
+            break;
+        default:
+            // Normal priority has no icon
+            break;
+    }
+
+    // Attachment icon is always shown on the left side of priority icon if it
+    // exists. Otherwise in the most right.
+    if (envelope.hasAttachments()) {
+        iconList.append(NmIcons::getIcon(NmIcons::NmIconAttachment));
+    }
+
+    // Here we show icons added to the iconList in the order they have been added.
+    for (int count = 0; count < iconList.count(); count++) {
+        mStatusIcons.at(count)->setIcon(iconList.at(count));
+        mStatusIcons.at(count)->show();
+    }
+    
+    // Message read status.
+    bool msgReadStatus(envelope.isRead());
+    HbFrameDrawer *drawer(NULL);
+    HbStyle::setItemName(mNewMsgIcon, "msgicon");
+    if (!msgReadStatus) {
+        setFontsUnread();
+        mNewMsgIcon->setObjectName("ListViewItemMessageIconUnread");
+        drawer = new HbFrameDrawer("qtg_fr_list_new_item",
+                HbFrameDrawer::ThreePiecesVertical);
+        drawer->setFillWholeRect(false);
+        // Set drawer. Takes ownership of the drawer and deletes previous drawer.
+        mNewMsgIcon->setFrameDrawer(drawer);
+        mNewMsgIcon->show();
+   } else {
+        setFontsRead();
+        mNewMsgIcon->setObjectName("ListViewItemMessageIconRead");
+        drawer = new HbFrameDrawer(); // Create empty drawer.
+        drawer->setFillWholeRect(false);
+        // Set drawer. Takes ownership of the drawer and deletes previous drawer.
+        mNewMsgIcon->setFrameDrawer(drawer);
+        mNewMsgIcon->hide();        
+    }
+   repolish();
+}
+
+/*!
+    Boolean value indicating model index availability. Always true since
+    this item prototype is used for both divider and message.
+ */
+bool NmHsWidgetListViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+    NM_FUNCTION;
+    Q_UNUSED(index);
+    // This item class can handle all items in message list.
+    return true;
+}
+
+/*!
+    Set fonts unread.
+ */
+void  NmHsWidgetListViewItem::setFontsUnread()
+{
+    NM_FUNCTION;
+    static QColor colorRole = HbColorScheme::color("qtc_list_item_title_normal");
+    HbFontSpec fontSpec(HbFontSpec::Primary);
+    setFonts(colorRole, fontSpec);
+}
+
+/*!
+    Set fonts read.
+ */
+void  NmHsWidgetListViewItem::setFontsRead()
+{
+    NM_FUNCTION;
+    static QColor colorRole = HbColorScheme::color("qtc_list_item_content_normal");
+    HbFontSpec fontSpec(HbFontSpec::Secondary);
+    setFonts(colorRole, fontSpec);
+}
+
+/*!
+    Get font sizes.
+ */
+void  NmHsWidgetListViewItem::getFontSizes()
+{
+    NM_FUNCTION;
+    // Get font sizes from style.
+    qreal currentSize;
+    bool found = style()->parameter(QString("hb-param-text-height-secondary"), currentSize );
+    if (found) {
+        mPrimarySize = currentSize;
+    }      
+    found = style()->parameter(QString("hb-param-text-height-tiny"), currentSize );
+    if (found) {
+        mSecondarySize = currentSize;
+    }        
+}
+
+/*!
+    Set fonts.
+ */
+void  NmHsWidgetListViewItem::setFonts(const QColor &colorRole, 
+        HbFontSpec &fontSpec)
+{
+    NM_FUNCTION;
+    // Change sizes explicitly since css is overwritten in polish now.    
+    if (mSender && mSubject && mTime) {
+
+        fontSpec.setTextHeight(mPrimarySize);
+        
+        mSender->setFontSpec(fontSpec);
+        mSender->setTextColor(colorRole);
+
+        mSubject->setFontSpec(fontSpec);
+        mSubject->setTextColor(colorRole);
+
+        fontSpec.setTextHeight(mSecondarySize);
+
+        mTime->setFontSpec(fontSpec);        
+        mTime->setTextColor(colorRole);
+    }
+}
--- a/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -298,8 +298,18 @@
     //to avoid opening email account mistakenly  when tabbing expand/collapse button
     //we dont handle events that are on the top, down or right side of the button
     QPointF posFromScene = mapFromScene(event->mapToGraphicsScene(gesture->position()));
-    if(posFromScene.x() < mUnreadCountLabel->geometry().right())
-        {    
+    bool inArea = false;
+    
+    if(this->layoutDirection() == Qt::LeftToRight &&  
+       posFromScene.x() < mUnreadCountLabel->geometry().right()) {
+        inArea = true;
+    }
+    else if(this->layoutDirection() == Qt::RightToLeft && 
+            posFromScene.x() > mUnreadCountLabel->geometry().right()) {
+        inArea = true;
+    }
+    
+    if (inArea) {    
         switch (gesture->state()) {
             case Qt::GestureStarted:
                 setHighlighedFontsColor(true);
--- a/emailuis/nmhswidget/translations/mailwidget.ts	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/translations/mailwidget.ts	Mon Oct 04 00:05:37 2010 +0300
@@ -2,24 +2,34 @@
 <!DOCTYPE TS>
 <TS version="3.0" sourcelanguage="en_GB">
 <context>
+<message numerus="no" id="txt_mailwdgt_dblist_val_no_subject">
+    <comment>Layout ID parent (no children). Text for subject field if there is no subject in the mail message in Mail viewer. </comment>        
+    <source>(No Subject)</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_mailwdgt_dblist_val_no_subject</extra-loc-layout_id>    
+    <extra-loc-viewid>Mailwdgt_002</extra-loc-viewid>
+    <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
+    <extra-loc-feature>Mailwdgt</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_widget_info_no_messages">
-    <comment>Layout ID parent (no children). Same text than in Mail client when mailbox is empty. Informs user that she does not have mail in the Inbox.</comment>        
+    <comment>Layout ID parent (no children). Same text than in Mail client when mailbox is empty. Informs user that she does not have mail in the Inbox. Same for both landscape and portrait orientation.</comment>        
     <source>(No messages)</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_widget_info_no_messages</extra-loc-layout_id>    
-    <extra-loc-viewid>Mail widget_04, Mail widget_P04, Mail widget_L04</extra-loc-viewid>
+    <extra-loc-viewid>Mailwdgt_003</extra-loc-viewid>
     <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Ma</extra-loc-feature>
+    <extra-loc-feature>Mailwdgt</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_widget_list_l1">
-    <comment>Layout ID parent (No children). New mail count in parenthesis after the Mail box name which is the title of the widget. Min number 1 and max number shown 999. Number or brackets are not shown at all if mailbox do not have any new mail. Example in Mail widget_L08.</comment>        
+    <comment>Layout ID parent (No children). New mail count in parenthesis after the Mail box name which is the title of the widget. Min number 1 and max number shown 999. Number or brackets are not shown at all if mailbox do not have any new mail. Example from one mail in Mailwdgt_005 and from empty mailbox in Mailwdgt_003. </comment>        
     <source>(%L1)</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_widget_list_l1</extra-loc-layout_id>    
     <extra-loc-viewid>Mail Widget</extra-loc-viewid>
     <extra-loc-positionid>List</extra-loc-positionid>
-    <extra-loc-feature>Ma</extra-loc-feature>
+    <extra-loc-feature>Mail Widget</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 </context>
--- a/emailuis/nmindicatorplugin/nmindicatorplugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmindicatorplugin/nmindicatorplugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -48,6 +48,8 @@
     LIBS += -leuser
     LIBS += -llibc
     LIBS += -lxqservice
+    
+    MMP_RULES += SMPSAFE
 }
 
 BLD_INF_RULES.prj_exports += \
--- a/emailuis/nmindicatorplugin/src/nmsendingindicator.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmindicatorplugin/src/nmsendingindicator.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -49,7 +49,7 @@
 */
 QVariant NmSendingIndicator::indicatorData(int role) const
 {
-    if (role==DecorationNameRole || role==MonoDecorationNameRole) {
+    if (role==DecorationNameRole) {
 		// Must return non-empty to make the indicator visible
 		return " ";
 	}
@@ -76,7 +76,7 @@
 
     \sa RequestType, HbIndicator
 */
-bool NmSendingIndicator::handleClientRequest( RequestType type,
+bool NmSendingIndicator::handleClientRequest(RequestType type,
         const QVariant &parameter)
 {
     NM_FUNCTION;
--- a/emailuis/nmindicatorplugin/src/nmsyncindicator.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmindicatorplugin/src/nmsyncindicator.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -30,11 +30,9 @@
 
 QVariant NmSyncIndicator::indicatorData(int role) const
 {
-    if (role == DecorationNameRole || role == MonoDecorationNameRole) {
+    if (role == DecorationNameRole) {
         // Must return non-empty to make the indicator visible
         return " ";
     }
-    else {
-        return QVariant();
-    }
+    return QVariant();
 }
--- a/emailuis/nmsettingui/inc/nmmailboxentryitem.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/inc/nmmailboxentryitem.h	Mon Oct 04 00:05:37 2010 +0300
@@ -36,7 +36,7 @@
         const NmId &mailboxId,
         const QString &mailboxName = QString(),
         const HbIcon &mailboxIcon = HbIcon(),
-        const HbDataFormModelItem *parent = 0,
+        const HbDataFormModelItem *parent = NULL,
         const QString &mailboxDescription = QString());
 
     virtual ~NmMailboxEntryItem();
--- a/emailuis/nmsettingui/inc/nmmailboxselectionview.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/inc/nmmailboxselectionview.h	Mon Oct 04 00:05:37 2010 +0300
@@ -45,7 +45,7 @@
         const NmSettingsViewFactory &settingsFactory,
         NmMailboxSettingsManager &settingsManager,
         const QList<NmMailbox *> &mailboxList,
-        QGraphicsItem *parent = 0);
+        QGraphicsItem *parent = NULL);
 
     virtual ~NmMailboxSelectionView();
 
--- a/emailuis/nmsettingui/inc/nmmailboxsettingview.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/inc/nmmailboxsettingview.h	Mon Oct 04 00:05:37 2010 +0300
@@ -39,7 +39,7 @@
     explicit NmMailboxSettingView(const NmId &mailboxId,
         const QString &mailboxName,
         NmMailboxSettingsManager& settingsManager,
-        QGraphicsItem *parent = 0);
+        QGraphicsItem *parent = NULL);
 
     ~NmMailboxSettingView();
 
@@ -51,7 +51,12 @@
 
     void mailboxPropertyChanged(const NmId &mailboxId, QVariant property, QVariant value);
 
-    void itemPress(const QModelIndex &index);
+    void itemActivated(const QModelIndex &index);
+
+    void disablePredictiveText(const QModelIndex &index);
+
+    void queuedScroll(const QModelIndex &index);
+
 
 private:
 
--- a/emailuis/nmsettingui/inc/nmsettingsformcustomitems.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/inc/nmsettingsformcustomitems.h	Mon Oct 04 00:05:37 2010 +0300
@@ -39,13 +39,13 @@
 
 public:
 
-    NmSettingsFormCustomItems(QGraphicsItem *parent=0);
+    NmSettingsFormCustomItems(QGraphicsItem *parent=NULL);
 
     ~NmSettingsFormCustomItems();
 
     bool canSetModelIndex(const QModelIndex &index) const;
 
-    virtual HbAbstractViewItem* createItem();
+    HbAbstractViewItem* createItem();
 
 public slots:
 
@@ -53,7 +53,7 @@
 
 protected:
 
-    virtual HbWidget* createCustomWidget();
+    HbWidget* createCustomWidget();
 };
 
 
--- a/emailuis/nmsettingui/inc/nmsettingsplugininterface.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/inc/nmsettingsplugininterface.h	Mon Oct 04 00:05:37 2010 +0300
@@ -61,6 +61,7 @@
 
 signals:
 
+    /* These signals are available when using the interface  */
     virtual void mailboxListChanged(const NmId &mailboxId, NmSettings::MailboxEventType type) = 0;
     virtual void mailboxPropertyChanged(const NmId &mailboxId, QVariant property, QVariant value) = 0;
     virtual void goOnline(const NmId &mailboxId) = 0;
--- a/emailuis/nmsettingui/inc/nmsettingsviewfactory.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/inc/nmsettingsviewfactory.h	Mon Oct 04 00:05:37 2010 +0300
@@ -31,7 +31,6 @@
 class NmId;
 class NmSettingsViewLauncher;
 class HbView;
-class HbAction;
 
 class NMAILSETTINGUI_EXPORT NmSettingsViewFactory : public CpSettingFormEntryItemData
 {
@@ -43,18 +42,18 @@
         const QString &text = QString(),
         const QString &description = QString(),
         const HbIcon &icon = HbIcon(),
-        const HbDataFormModelItem *parent = 0);
+        const HbDataFormModelItem *parent = NULL);
 
     explicit NmSettingsViewFactory(const NmSettingsViewLauncher *viewLauncher,
         CpItemDataHelper &itemDataHelper,
         const QString &text = QString(),
         const QString &description = QString(),
         const HbIcon &icon = HbIcon(),
-        const HbDataFormModelItem *parent = 0);
-    
-    virtual ~NmSettingsViewFactory();
+        const HbDataFormModelItem *parent = NULL);
 
-    virtual CpBaseSettingView *createSettingView() const;
+    ~NmSettingsViewFactory();
+
+    CpBaseSettingView *createSettingView() const;
 
     void launchSettingView(const NmId &mailboxId,
                            const QString &mailboxName) const;
@@ -62,7 +61,7 @@
 signals:
 
 	void aboutToClose();
-	
+
 private slots:
 
     void backPress();
@@ -75,7 +74,7 @@
 
     // Owned.
     NmMailboxSettingsManager *mSettingsManager;
-    
+
     // Not owned.
     const NmSettingsViewLauncher *mSettingsViewLauncher;
 
--- a/emailuis/nmsettingui/inc/nmsettingsviewlauncher.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/inc/nmsettingsviewlauncher.h	Mon Oct 04 00:05:37 2010 +0300
@@ -29,7 +29,6 @@
 class QString;
 class NmId;
 class HbIcon;
-class HbMainWindow;
 
 
 /*!
--- a/emailuis/nmsettingui/nmsettingui.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/nmsettingui.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -70,6 +70,7 @@
         "$${LITERAL_HASH}endif"
         
     MMP_RULES += defBlock
+    MMP_RULES += SMPSAFE
     
     # Build.inf rules
     BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
--- a/emailuis/nmsettingui/src/nmmailboxentryitem.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/src/nmmailboxentryitem.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -16,8 +16,8 @@
 */
 
 #include <cpitemdatahelper.h>
-#include <hbicon.h>
-#include <hbdataformmodelitem.h>
+#include <HbIcon>
+#include <HbDataFormModelItem>
 
 #include "nmmailboxentryitem.h"
 
@@ -61,8 +61,8 @@
 CpBaseSettingView *NmMailboxEntryItem::createSettingView() const
 {
     NM_FUNCTION;
-    
-    return 0;
+
+    return NULL;
 }
 
 /*!
@@ -71,6 +71,6 @@
 const NmId &NmMailboxEntryItem::id() const
 {
     NM_FUNCTION;
-    
+
     return mMailboxId;
 }
--- a/emailuis/nmsettingui/src/nmmailboxselectionview.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/src/nmmailboxselectionview.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -17,10 +17,10 @@
 
 #include <QScopedPointer>
 #include <QSignalMapper>
-#include <hbdataform.h>
-#include <hbdataformmodel.h>
-#include <hbpushbutton.h>
-#include <hbdataformviewitem.h>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbPushButton>
+#include <HbDataFormViewItem>
 #include <cpitemdatahelper.h>
 #include <nmmailbox.h>
 
@@ -52,7 +52,7 @@
   mRefreshForm(false)
 {
     NM_FUNCTION;
-    
+
     QScopedPointer<QSignalMapper> signalMapper(new QSignalMapper());
 
     // Connect the form's activated signal.
@@ -84,7 +84,7 @@
 NmMailboxSelectionView::~NmMailboxSelectionView()
 {
     NM_FUNCTION;
-    
+
     delete mItemDataHelper;
     delete mModel;
     delete mSignalMapper;
@@ -100,7 +100,7 @@
 void NmMailboxSelectionView::buttonClick(QObject *item)
 {
     NM_FUNCTION;
-    
+
     NmMailboxEntryItem *entryItem = static_cast<NmMailboxEntryItem *>(item);
     const NmId &id = entryItem->id();
     const QString &name = entryItem->text();
@@ -108,7 +108,7 @@
 }
 
 /*!
-    Handels the dataform's activated signal when item is shown. 
+    Handels the dataform's activated signal when item is shown.
     Maps the signal/mailbox item for the buttons.
 
     \param index Data model index.
@@ -117,23 +117,23 @@
 void NmMailboxSelectionView::itemActivate(const QModelIndex &index)
 {
     NM_FUNCTION;
-    
+
     HbDataForm *form = qobject_cast<HbDataForm*>(widget());
     HbDataFormModel *model = static_cast<HbDataFormModel *>(form->model());
     NmMailboxEntryItem *item = static_cast<NmMailboxEntryItem *>(model->itemFromIndex(index));
-    
-    if (!mSignalMapper->mapping(item)) {
-        
-        HbDataFormViewItem *viewItem = 
+
+    if (item && !mSignalMapper->mapping(item)) {
+
+        HbDataFormViewItem *viewItem =
             static_cast<HbDataFormViewItem *>(form->itemByIndex(index));
-        HbPushButton *button = 
+        HbPushButton *button =
             static_cast<HbPushButton *>(viewItem->dataItemContentWidget());
-        
+
         connect(button, SIGNAL(pressed()), mSignalMapper, SLOT(map()));
-    
+
         mSignalMapper->setMapping(button, item);
-    
-        connect(mSignalMapper, SIGNAL(mapped(QObject *)), 
+
+        connect(mSignalMapper, SIGNAL(mapped(QObject *)),
             this, SLOT(buttonClick(QObject *)), Qt::UniqueConnection);
     }
 }
@@ -147,7 +147,7 @@
 void NmMailboxSelectionView::populateDataModel(const QList<NmMailbox *> &mailboxList)
 {
     NM_FUNCTION;
-    
+
     mModel->clear();
     foreach (NmMailbox *mailbox, mailboxList) {
         NmId id = mailbox->id();
@@ -158,7 +158,9 @@
         item.take();
     }
     HbDataForm *form = qobject_cast<HbDataForm*>(widget());
-    form->setModel(mModel);
+    if (form) {
+        form->setModel(mModel);
+	}
 }
 
 /*!
@@ -171,7 +173,7 @@
     NmSettings::MailboxEventType type)
 {
     NM_FUNCTION;
-    
+
     switch (type) {
         case NmSettings::MailboxDeleted: {
             // Search correct item.
@@ -210,9 +212,9 @@
     QVariant property, QVariant value)
 {
     NM_FUNCTION;
-    
+
     // Search correct item.
-    NmMailboxEntryItem *entryItem = 0;
+    NmMailboxEntryItem *entryItem = NULL;
     const int itemCount(mModel->rowCount());
     for (int itemIndex(0); itemIndex < itemCount; ++itemIndex) {
         entryItem = static_cast<NmMailboxEntryItem *>(
--- a/emailuis/nmsettingui/src/nmmailboxsettingsmanager.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/src/nmmailboxsettingsmanager.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -44,7 +44,7 @@
 QStringList pluginFolders()
 {
     NM_FUNCTION;
-    
+
     const QString nmSettingsPluginFolderPath("resource/qt/plugins/nmail/settings");
     QStringList pluginDirectories;
     QFileInfoList driveList = QDir::drives();
@@ -57,7 +57,7 @@
             pluginDirectories.append(pluginDirectory);
         }
     }
-    
+
     return pluginDirectories;
 }
 
@@ -68,10 +68,10 @@
     Contructor of NmMailboxSettingsManager.
 */
 NmMailboxSettingsManager::NmMailboxSettingsManager()
-: mDataManager(0)
+: mDataManager(NULL)
 {
     NM_FUNCTION;
-    
+
     QScopedPointer<NmDataManager> dataManager(new NmDataManager());
     loadPlugins();
     mDataManager = dataManager.take();
@@ -84,7 +84,7 @@
 NmMailboxSettingsManager::~NmMailboxSettingsManager()
 {
     NM_FUNCTION;
-    
+
     unloadPlugins();
     qDeleteAll(mPluginLoaders);
     mPluginLoaders.clear();
@@ -102,7 +102,7 @@
 void NmMailboxSettingsManager::listMailboxes(QList<NmMailbox *> &mailboxList)
 {
     NM_FUNCTION;
-    
+
     mDataManager->listMailboxes(mailboxList);
 }
 
@@ -116,7 +116,7 @@
 HbIcon &NmMailboxSettingsManager::mailboxIcon(const NmId &mailboxId) const
 {
     NM_FUNCTION;
-    
+
     Q_UNUSED(mailboxId);
     // TODO: use some branding feature when it is available.
     return NmIcons::getIcon(NmIcons::NmIconDefaultMailbox);
@@ -136,8 +136,8 @@
     HbDataForm &form, const NmId &mailboxId) const
 {
     NM_FUNCTION;
-    
-    NmSettingsPluginInterface *plugin = 0;
+
+    NmSettingsPluginInterface *plugin = NULL;
 
     foreach (QPluginLoader *loader, mPluginLoaders) {
         QObject *pluginInstance = loader->instance();
@@ -182,7 +182,7 @@
 void NmMailboxSettingsManager::loadPlugins()
 {
     NM_FUNCTION;
-    
+
     QStringList directories(pluginFolders());
 
     foreach (const QString &directoryPath, directories) {
@@ -205,7 +205,7 @@
 void NmMailboxSettingsManager::unloadPlugins()
 {
     NM_FUNCTION;
-    
+
     foreach (QPluginLoader *loader, mPluginLoaders) {
         loader->unload();
     }
--- a/emailuis/nmsettingui/src/nmmailboxsettingview.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/src/nmmailboxsettingview.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -15,14 +15,14 @@
 *
 */
 
-#include <qinputcontext.h>
+#include <QInputContext>
 
-#include <hbinstance.h>
-#include <hbmainwindow.h>
-#include <hbaction.h>
-#include <hbdataform.h>
-#include <hbdataformmodel.h>
-#include <hbdocumentloader.h>
+#include <HbInstance>
+#include <HbMainWindow>
+#include <HbAction>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDocumentLoader>
 
 #include "nmmailboxsettingview.h"
 #include "nmmailboxsettingsmanager.h"
@@ -59,7 +59,7 @@
       mMailboxId(mailboxId.id())
 {
     NM_FUNCTION;
-    
+
     setTitle(mailboxName);
 
     HbDocumentLoader documentLoader;
@@ -78,10 +78,13 @@
     }
 
     if (mForm) {
-        
-        connect(mForm, SIGNAL(pressed(QModelIndex)),
-                this, SLOT(itemPress(QModelIndex)));
-        
+
+        qRegisterMetaType<QModelIndex>("QModelIndex");
+        connect(mForm, SIGNAL(activated(QModelIndex)),
+                this, SLOT(itemActivated(QModelIndex)));
+        connect(mForm, SIGNAL(itemShown(QModelIndex)),
+                this, SLOT(disablePredictiveText(QModelIndex)));
+
         // Fix for dataform item recycling.
         mForm->setItemRecycling(false);
 
@@ -108,7 +111,7 @@
 NmMailboxSettingView::~NmMailboxSettingView()
 {
     NM_FUNCTION;
-    
+
     delete mForm;
     delete mModel;
 }
@@ -124,7 +127,7 @@
     NmSettings::MailboxEventType type)
 {
     NM_FUNCTION;
-    
+
     Q_UNUSED(mailboxId);
     Q_UNUSED(type);
 
@@ -147,7 +150,7 @@
                                                   QVariant value)
 {
     NM_FUNCTION;
-    
+
     Q_UNUSED(mailboxId);
 
     switch (property.toInt()) {
@@ -162,7 +165,7 @@
 }
 
 /*!
-    Returns the mailbox id for this mailbox setting view.    
+    Returns the mailbox id for this mailbox setting view.
 */
 NmId NmMailboxSettingView::mailboxId()
 {
@@ -170,22 +173,22 @@
 }
 
 /*!
-    Called when item is pressed on the view.
+    Called when item is activated on the view.
 
     \param index Index to the pressed item.
 */
-void NmMailboxSettingView::itemPress(const QModelIndex &index)
+void NmMailboxSettingView::itemActivated(const QModelIndex &index)
 {
     NM_FUNCTION;
-    
+
     int type(index.data(HbDataFormModelItem::ItemTypeRole).toInt());
-    
+
     if (type == HbDataFormModelItem::GroupItem) {
-        // Scroll the groupitem to top if needed.
-        HbDataFormViewItem *item = static_cast<HbDataFormViewItem *>(mForm->itemByIndex(index));
-        
-        if (!item->isExpanded()) {
-            mForm->scrollTo(index, HbAbstractItemView::PositionAtTop);
+
+        // Scroll the groupitem to top.
+        if (!mForm->isExpanded(index)) {
+            QMetaObject::invokeMethod(this, "queuedScroll",
+                Qt::QueuedConnection, Q_ARG(QModelIndex, index));
         }else {
             // Hide the virtual keyboard
             QInputContext *ic = qApp->inputContext();
@@ -196,12 +199,40 @@
             }
         }
     }
-    
+
+
+}
+
+/*!
+    Called when item is shown on the view.
+
+    \param index Index to the shown item.
+*/
+void NmMailboxSettingView::disablePredictiveText(const QModelIndex &index)
+{
+    NM_FUNCTION;
+
+    int type(index.data(HbDataFormModelItem::ItemTypeRole).toInt());
+
     if (type == HbDataFormModelItem::TextItem) {
         // Turn off predictive input for line-edit.
         HbDataFormViewItem *item = static_cast<HbDataFormViewItem *>(mForm->itemByIndex(index));
         HbWidget *widget = item->dataItemContentWidget();
-        widget->setInputMethodHints(Qt::ImhNoPredictiveText);
+        if (widget) {
+            widget->setInputMethodHints(Qt::ImhNoPredictiveText);
+		}
     }
 }
+
+/*!
+    Called when view needs to be scrolled.
+
+    \param index Index to the item.
+*/
+void NmMailboxSettingView::queuedScroll(const QModelIndex &index)
+{
+    NM_FUNCTION;
+
+    mForm->scrollTo(index, HbAbstractItemView::PositionAtTop);
+}
 // End of file.
--- a/emailuis/nmsettingui/src/nmsettingsformcustomitems.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/src/nmsettingsformcustomitems.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -58,14 +58,14 @@
 HbAbstractViewItem *NmSettingsFormCustomItems::createItem()
 {
     NM_FUNCTION;
-    
+
     return new NmSettingsFormCustomItems(*this);
 }
 
 bool NmSettingsFormCustomItems::canSetModelIndex(const QModelIndex &index) const
 {
     NM_FUNCTION;
-    
+
     int type(index.data(HbDataFormModelItem::ItemTypeRole).toInt());
     return type==NmButtonItem;
 }
@@ -76,7 +76,7 @@
 void NmSettingsFormCustomItems::restore()
 {
     NM_FUNCTION;
-    
+
     HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
         modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
      if (itemType==NmButtonItem) {
@@ -102,12 +102,12 @@
 HbWidget *NmSettingsFormCustomItems::createCustomWidget()
 {
     NM_FUNCTION;
-    
+
     HbDataFormModelItem::DataItemType itemType =
         static_cast<HbDataFormModelItem::DataItemType>(
             modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
 
-    HbWidget *widget = 0;
+    HbWidget *widget = NULL;
 
     switch (itemType) {
       case NmButtonItem: {
--- a/emailuis/nmsettingui/src/nmsettingsviewfactory.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmsettingui/src/nmsettingsviewfactory.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -57,7 +57,9 @@
     const HbIcon &icon,
     const HbDataFormModelItem *parent)
  : CpSettingFormEntryItemData(itemDataHelper, text, description, icon, parent),
-   mSettingsManager(new NmMailboxSettingsManager()), mSettingsViewLauncher(0),mPrevView(0)
+   mSettingsManager(new NmMailboxSettingsManager()),
+   mSettingsViewLauncher(NULL),
+   mPrevView(NULL)
 {
     NM_FUNCTION;
 }
@@ -82,8 +84,9 @@
     const HbIcon &icon,
     const HbDataFormModelItem *parent)
  : CpSettingFormEntryItemData(itemDataHelper, text, description, icon, parent),
-     mSettingsManager(new NmMailboxSettingsManager()), mSettingsViewLauncher(viewLauncher),
-     mPrevView(0)
+     mSettingsManager(new NmMailboxSettingsManager()),
+     mSettingsViewLauncher(viewLauncher),
+     mPrevView(NULL)
 {
     NM_FUNCTION;
 }
@@ -111,7 +114,7 @@
 {
     NM_FUNCTION;
 
-    CpBaseSettingView *view = 0;
+    CpBaseSettingView *view = NULL;
     QList<NmMailbox *> mailboxList;
     mSettingsManager->listMailboxes(mailboxList);
     const int mailboxCount(mailboxList.count());
@@ -254,7 +257,7 @@
             mainWindow->removeView(currentView);
             currentView->deleteLater();
         }
-        mPrevView = 0;
+        mPrevView = NULL;
     }
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/emailmru.h	Mon Oct 04 00:05:37 2010 +0300
@@ -0,0 +1,18 @@
+/*
+* 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:
+*
+*/
+
+#include "../emailservices/nmutilities/inc/emailmru.h"
--- a/ipsservices/ipssosaoplugin/inc/IpsSosAOImapPopLogic.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosaoplugin/inc/IpsSosAOImapPopLogic.h	Mon Oct 04 00:05:37 2010 +0300
@@ -139,6 +139,19 @@
      */
     void RemoveOrphanLogicsL();
     
+    /**
+     * Takes care of reacting to entries created type of events
+     */
+    void handleEntriesCreatedL(const TAny* aArg1);
+
+    /**
+     * Takes the first entryId from the given selection and 
+     * instantiates a TMsvEntry for that entry.
+     * @param aSelection array of entry ids
+     * @param aEntry On completion, contains the TMsvEntry data
+     */
+    void getFirstEntryFromSelectionL(const CMsvEntrySelection* aSelection, TMsvEntry& aEntry);
+
 private:
     
     CMsvSession&                        iSession;
--- a/ipsservices/ipssosaoplugin/ipssosaoplugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosaoplugin/ipssosaoplugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -96,7 +96,8 @@
     MMP_RULES += ecomResourceBlock \
     defBlock
     
-    MMP_RULES += "TARGETTYPE plugin"  
+    MMP_RULES += "TARGETTYPE plugin"
+    MMP_RULES += SMPSAFE
     
     LIBS += \
     -lecom \
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -284,10 +284,15 @@
 TBool CIpsSosAOImapAgent::IsConnected() const
     {
     FUNC_LOG;
+    TBool ret = EFalse;
     TMsvEntry tentry;
     TMsvId service;
-    iSession.GetEntry( iServiceId, service, tentry );
-    return tentry.Connected();
+    TInt err = iSession.GetEntry( iServiceId, service, tentry );
+    if ( err == KErrNone )
+    {
+        ret = tentry.Connected();
+    }
+    return ret;
     }
 
 // ----------------------------------------------------------------------------
@@ -342,7 +347,7 @@
         const RArray<TMsvId>& /*aFetchMsgArray*/ )
     {
     FUNC_LOG;
-    
+    // implementation removed when not needed anywhere
     }
 
 // ----------------------------------------------------------------------------
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOImapPopLogic.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOImapPopLogic.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -18,9 +18,8 @@
 
 #include "ipssosaopluginheaders.h"
 
-//const TInt KAOSmtpStartDelaySeconds = 310;
 const TInt KIpsSosAOImapPopLogicDefGra = 1;
-//const TInt KIpsSosAoImapPopLogicEventGra = 2;
+const TInt KMailboxCreatedTimeout = 500000; // 0.5 sec
 
 // ----------------------------------------------------------------------------
 // class CIpsSosAOImapPopLogic
@@ -216,6 +215,7 @@
     switch( aEvent )
         {
         case MMsvSessionObserver::EMsvEntriesCreated:
+            handleEntriesCreatedL(aArg1);
             break;
         case MMsvSessionObserver::EMsvEntriesChanged:
             {
@@ -511,5 +511,42 @@
     
     CleanupStack::PopAndDestroy( 3, cEntry );
     }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+void CIpsSosAOImapPopLogic::handleEntriesCreatedL(const TAny* aArg1)
+    {
+    FUNC_LOG;
+    TMsvEntry entry;
+    getFirstEntryFromSelectionL(static_cast<const CMsvEntrySelection*>(aArg1), entry);
+
+    if( entry.iMtm==KSenduiMtmImap4Uid || entry.iMtm==KSenduiMtmPop3Uid)
+        {
+        // handling imap4 or pop3 entry
+        if(entry.iType.iUid==KUidMsvServiceEntryValue)
+            {
+            // new mailbox has been created, starting sync for it
+            User::After(KMailboxCreatedTimeout); // sleep for 0.5 sec; guarantees that mailbox is fully set up, and message server ready to serve it
+            RefreshMailboxListL();
+            SendCommandToSpecificMailboxL( entry.Id(), CIpsSosAOMBoxLogic::ECommandStart );
+            SendCommandToSpecificMailboxL( entry.Id(), CIpsSosAOMBoxLogic::ECommandStartSync );
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+void CIpsSosAOImapPopLogic::getFirstEntryFromSelectionL(const CMsvEntrySelection* aSelection, TMsvEntry& aEntry)
+    {
+    FUNC_LOG;
+    if ( aSelection->Count() == 0)
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TMsvId dummy( KMsvNullIndexEntryIdValue );
+    User::LeaveIfError( iSession.GetEntry( aSelection->At(0), dummy, aEntry ) );
+    }
+
 // End of file
 
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -893,7 +893,8 @@
     CleanupClosePushL(mgr);
     TRAPD(err, mgr.OpenL());
     
-    TCmGenConnSettings set;
+    TCmGenConnSettings set = { ECmUsageOfWlanKnown, 
+            ECmCellularDataUsageConfirm, ECmCellularDataUsageConfirm };
     if(err==KErrNone){
         TRAP(err, mgr.ReadGenConnSettingsL(set));
         }
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOSettingsHandler.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOSettingsHandler.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -19,7 +19,7 @@
 #include "ipssosaopluginheaders.h"
 
 const TInt KAOMinutesInHour = 60;
-
+   
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 CIpsSosAOSettingsHandler* CIpsSosAOSettingsHandler::NewL( 
@@ -383,7 +383,7 @@
 
     TDateTime time;        
     info.iLastSuccessfulUpdate = time; 
-    
+    info.iUpdateSuccessfulWithCurSettings = ETrue;
     QVariant high=NULL;
     QVariant low=NULL;
     QVariant fail=NULL;
@@ -507,7 +507,8 @@
     //create blanc time object for comparison.
     //real current time cannot be used because we only want to
     //compare hours & minutes
-    TDateTime dtNow;
+    TTime zeroTime( 0 );
+    TDateTime dtNow = zeroTime.DateTime();
     dtNow.SetMinute(tmp.Minute());
     dtNow.SetHour(tmp.Hour());
     
--- a/ipsservices/ipssosplugin/inc/ipsplgeventhandler.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgeventhandler.h	Mon Oct 04 00:05:37 2010 +0300
@@ -378,6 +378,11 @@
      * Signal sync completed event via p&s api to all plugin instances
      */
     void SignalSyncCompletedL( const TFSMailMsgId& aAccount, TInt aError );
+    
+    /**
+     * Helper function to check if this is a mailbox related event
+     */
+    TBool IsMailboxOrMediaEvent( MMsvSessionObserver::TMsvSessionEvent aEvent, TAny* aArg );
 
 private: // datak
 
--- a/ipsservices/ipssosplugin/inc/ipsplgsosbaseplugin.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgsosbaseplugin.h	Mon Oct 04 00:05:37 2010 +0300
@@ -364,7 +364,8 @@
         const TFSMailMsgId& aParentFolderId,
         const TFSMailMsgId& aMessageId,
         const TFSMailMsgId& aMessagePartId,
-        RFile& aFileHandle);
+        RFile& aFileHandle,
+        TBool aForWriting = EFalse);
 
     virtual void CopyMessagePartFileL(
         const TFSMailMsgId& aMailBoxId,
--- a/ipsservices/ipssosplugin/ipssosplugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/ipssosplugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -188,7 +188,8 @@
       "inc/ipsplgpropertywatcher.h |../inc/ipsplgpropertywatcher.h"
       
     MMP_RULES -= "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
-      
+
+    MMP_RULES += SMPSAFE
 }
 
 win32 {
--- a/ipsservices/ipssosplugin/src/ipsplgeventhandler.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgeventhandler.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -292,21 +292,20 @@
         IPSAccountsL();
         return;
         }
-    if ( !iPluginObserver && iMBoxObservers.Count()==0 )
+    if ( iMBoxObservers.Count() == 0 )
         {
-        //if no observer we can't relay these events.
-        return;
+        if ( !iPluginObserver )
+            {
+            //if no observer we can't relay these events.
+            return;
+            }
+        if ( !IsMailboxOrMediaEvent(aEvent, aArg2) )
+            {
+            // event is related to messages / folders, can return
+            // because no mailbox observers found
+            return;
+            }
         }
-    //<cmail>
-    if ( iMBoxObservers.Count() == 0 && aArg2 &&
-        (*(TMsvId*) (aArg2)) != KMsvRootIndexEntryIdValue &&
-        aEvent != EMsvMediaChanged )
-        {
-        // event is related to messages / folders, can return
-        // because no mailbox observers found
-        return;
-        }
-    //</cmail>
     
     switch( aEvent )
         {
@@ -1151,19 +1150,22 @@
 void CIpsPlgEventHandler::HandleMediaChangedL( 
     TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/ )
     {
-    TAny* arg1=NULL;
-    TAny* arg2=NULL;
-    TAny* arg3=NULL;    
+    TAny* arg1(NULL);
+    TAny* arg2(NULL);
+    TAny* arg3(NULL);    
     TMsvId service;
     TMsvEntry tChanged;
     TFSMailMsgId mbox;
     TFSMailEvent event( TFSEventMailboxDeleted );
     TInt startPoint(iIPSAccounts.Count()-1);
+
+    if ( !aArg1 || !aArg2 )
+        {
+        return; 
+        }
     TInt from(*(TInt*) (aArg1));
     TInt to(*(TInt*) (aArg2));
-
-    if ( !aArg1 || !aArg2 || 
-         from>KMaxDriveUnitValue || to>KMaxDriveUnitValue )
+    if ( from > KMaxDriveUnitValue || to > KMaxDriveUnitValue )
         {
         // Possibly duplicate event 
         // or some other disinformation
@@ -1739,6 +1741,23 @@
 // <qmail> code removed as it does nothing; keeping the func as it probably will be needed
     }
 
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+TBool CIpsPlgEventHandler::IsMailboxOrMediaEvent( MMsvSessionObserver::TMsvSessionEvent aEvent, 
+                                           TAny* aArg )
+{
+   TBool ret(EFalse); 
+   if ( aArg ) 
+       {
+       if ( (*(TMsvId*)(aArg)) == KMsvRootIndexEntryIdValue 
+             || aEvent == EMsvMediaChanged ) 
+           {
+           ret = ETrue;
+           }
+   }
+   return ret;
+}
+
 // <qmail> not needed
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
--- a/ipsservices/ipssosplugin/src/ipsplgimap4moveremoteop.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgimap4moveremoteop.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -140,7 +140,7 @@
         // Completed, but with an error during move.
         return *iMoveErrorProgress;
         }        
-    TImap4SyncProgress progg;
+    TImap4SyncProgress progg = TImap4SyncProgress();
     progg.iErrorCode = KErrNone;
     progg.iFoldersNotFound = 0;
     TPckgBuf<TImap4SyncProgress> param(progg);
--- a/ipsservices/ipssosplugin/src/ipsplgimap4populateop.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgimap4populateop.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -249,7 +249,7 @@
         }
     else
         {
-        TImap4SyncProgress progg;
+        TImap4SyncProgress progg = TImap4SyncProgress();
     	progg.iFoldersNotFound = 0;
         progg.iErrorCode = KErrNone;
         TPckgBuf<TImap4SyncProgress> param(progg);
--- a/ipsservices/ipssosplugin/src/ipsplgmessagepartstoreroperation.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgmessagepartstoreroperation.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -284,7 +284,7 @@
 	CnvUtfConverter::ConvertFromUnicodeToUtf8(ptr8, *data16);
 
 	// Get text/html part file for write
-	RFile file = aPart->GetContentFileL();
+	RFile file = aPart->GetContentFileL(ETrue);
 	CleanupClosePushL(file);
 
     // if we don't do SetSize(0) characters from the original mail are left in the end of the mail
--- a/ipsservices/ipssosplugin/src/ipsplgpop3fetchoperation.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgpop3fetchoperation.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -79,7 +79,7 @@
         }
     else
         {
-        TPop3Progress progg;
+        TPop3Progress progg = TPop3Progress();
         progg.iTotalSize = 0;
         progg.iErrorCode = KErrNone;
         TPckgBuf<TPop3Progress> param(progg);
--- a/ipsservices/ipssosplugin/src/ipsplgsmtpoperation.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgsmtpoperation.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -361,12 +361,12 @@
         iMsvSession.GetEntry( childs->At(i), service, entry );
         TUint sendState = entry.SendingState();
         
-        if ( iSmtpService == entry.iServiceId &&
-            ( sendState != KMsvSendStateUnknown
-              || sendState != KMsvSendStateUponRequest
-              || sendState != KMsvSendStateSent ) )
+        if ( iSmtpService == entry.iServiceId 
+		     && sendState != KMsvSendStateUnknown
+	         && sendState != KMsvSendStateUponRequest
+              && sendState != KMsvSendStateSent ) 
             {
-            // chage suspended flag to waiting
+            // change suspended flag to waiting
             // is it safe to change flag from suspended to waiting?
             if ( sendState == KMsvSendStateSuspended )
                 {
--- a/ipsservices/ipssosplugin/src/ipsplgsosbaseplugin.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgsosbaseplugin.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -576,38 +576,14 @@
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 const TFSProgress CIpsPlgSosBasePlugin::GetLastSyncStatusL(
-    const TFSMailMsgId& aMailBoxId )
+    const TFSMailMsgId& /*aMailBoxId*/ )
     {
     FUNC_LOG;
-    TMsvEntry tEntry;
-    TMsvId service;
-    TFSProgress progress = { TFSProgress::EFSStatus_Status, 0, 0, KErrNone };
-
     if( !iSessionOk )
         {
         User::Leave( KErrNotReady );
         }
-    iSession->GetEntry( aMailBoxId.Id(), service, tEntry );
-// <qmail>
-    TInt state(0);
-// </qmail>
-    switch( state )
-        {
-        case ESyncFinishedSuccessfully:
-            progress.iProgressStatus = TFSProgress::EFSStatus_RequestComplete;
-            break;
-        case ESyncCancelled:
-            progress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled;
-            break;
-        case ESyncError:
-            progress.iProgressStatus = TFSProgress::EFSStatus_RequestComplete;
-            progress.iError = KErrGeneral;
-            break;
-        default:
-            progress.iProgressStatus = TFSProgress::EFSStatus_Status;
-            progress.iError = state; // probably some symbian error code
-            break;
-        }
+    TFSProgress progress = { TFSProgress::EFSStatus_Status, 0, 0, KErrNone };
     return progress;
     }
 
@@ -1273,7 +1249,8 @@
     const TFSMailMsgId& /* aParentFolderId */,
     const TFSMailMsgId& /* aMessageId */,
     const TFSMailMsgId& aMessagePartId,
-    RFile& aFileHandle)
+    RFile& aFileHandle,
+    TBool aForWriting)
 	{
     FUNC_LOG;
     TInt status( KErrNone );
@@ -1302,10 +1279,16 @@
     if ( attachmentMgr.AttachmentCount() )
         {
 //<qmail>
+    if (aForWriting)
+        {
         // We need to open store for edit to support multipart/alternative
         // structure: we must have a possibility to modify text/html message part
-        //aFileHandle = attachmentMgr.GetAttachmentFileL( 0 );
         aFileHandle = attachmentMgr.GetAttachmentFileForWriteL( 0 );
+        }
+    else
+        {
+        aFileHandle = attachmentMgr.GetAttachmentFileL( 0 );
+        }
 //</qmail>
         }
     else
@@ -1588,7 +1571,7 @@
 TFSProgress CIpsPlgSosBasePlugin::StatusL( TInt aRequestId )
 	{
     FUNC_LOG;
-	TFSProgress status;
+	TFSProgress status = TFSProgress();
 	status.iError = KErrNone;
 	status.iProgressStatus = TFSProgress::EFSStatus_RequestComplete;
 	for ( TInt i = 0; i < iOperations.Count(); i++ )
--- a/ipsservices/nmimapclientplugin/nmimapclientplugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmimapclientplugin/nmimapclientplugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -52,6 +52,8 @@
     LIBS += -lnmailbase \
             -lnmsettingui \
             -lnmailuiengine 
+    
+    MMP_RULES += SMPSAFE
 }
 
 win32 {    
--- a/ipsservices/nmipsmtms/nmipsmtms.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipsmtms/nmipsmtms.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -80,8 +80,9 @@
         "$${LITERAL_HASH}endif"
     
     MMP_RULES += resourceBlock \
-	  defBlock
-    
+                 defBlock \
+                 SMPSAFE
+
     LIBS += -leuser \
     -lcone \
     -lbafl \
Binary file ipsservices/nmipssettings/conf/nmipssettings.confml has changed
--- a/ipsservices/nmipssettings/inc/nmipsimap4settingsmanager.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipsimap4settingsmanager.h	Mon Oct 04 00:05:37 2010 +0300
@@ -34,7 +34,7 @@
         
     NmIpsImap4SettingsManager(const NmId &mailboxId,
                               CEmailAccounts *account,
-                              TImapAccount imapAccount);
+                              TImapAccount &imapAccount);
     virtual ~NmIpsImap4SettingsManager();
     bool readSetting(IpsServices::SettingItem settingItem, QVariant &settingValue);
     bool writeSetting(IpsServices::SettingItem settingItem, const QVariant &settingValue);
--- a/ipsservices/nmipssettings/inc/nmipspop3settingsmanager.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipspop3settingsmanager.h	Mon Oct 04 00:05:37 2010 +0300
@@ -33,7 +33,7 @@
         
     NmIpsPop3SettingsManager(const NmId &mailboxId,
                              CEmailAccounts *account,
-                             TPopAccount popAccount);
+                             TPopAccount &popAccount);
     virtual ~NmIpsPop3SettingsManager();
     bool readSetting(IpsServices::SettingItem settingItem, QVariant &settingValue);
     bool writeSetting(IpsServices::SettingItem settingItem, const QVariant &settingValue);
--- a/ipsservices/nmipssettings/inc/nmipssettingscustomitem.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipssettingscustomitem.h	Mon Oct 04 00:05:37 2010 +0300
@@ -36,10 +36,10 @@
            TimeEditor, MultiSelectionItem};
 
     explicit NmIpsSettingsCustomItem(QGraphicsItem *parent=0);
-    virtual ~NmIpsSettingsCustomItem();
-    virtual HbAbstractViewItem* createItem();
-    virtual bool canSetModelIndex(const QModelIndex &index) const;
-	
+    ~NmIpsSettingsCustomItem();
+    HbAbstractViewItem* createItem();
+    bool canSetModelIndex(const QModelIndex &index) const;
+
 protected:
 
     virtual HbWidget* createCustomWidget();
--- a/ipsservices/nmipssettings/inc/nmipssettingshelper.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipssettingshelper.h	Mon Oct 04 00:05:37 2010 +0300
@@ -27,7 +27,6 @@
 #include "nmsettingscommon.h"
 #include "nmipssettingitems.h"
 
-class QModelIndex;
 class HbDataFormModelItem;
 class HbDataFormModel;
 class HbDataForm;
@@ -59,12 +58,12 @@
     void insertContentItem(IpsServices::SettingItem key, HbDataFormModelItem *value);
     HbDataFormModelItem *contentItem(IpsServices::SettingItem key) const;
     bool isOffline();
-    
+
     void setReceivingScheduleGroupItem(HbDataFormModelItem *item);
     void setServerInfoGroupItem(HbDataFormModelItem *item);
     void createOrUpdateReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item);
     void createServerInfoGroupDynamicItems(bool hiddenItem);
-    
+
     int getCorrectIncomingPortRadioButtonIndex();
     int getCorrectIncomingSecureRadioButtonIndex();
     int getCorrectOutgoingSecureRadioButtonIndex();
@@ -74,7 +73,13 @@
     void handleReceivingScheduleSettingChange(IpsServices::SettingItem settingItem,
         const QVariant &settingValue);
     QString destinationNameFromIdentifier(uint identifier);
-    
+    void incomingSecureConnectionItemChange(int index);
+    void incomingPortChange(int index);
+    void outgoingSecureConnectionItemChange(int index);
+    void outgoingPortChange(int index);
+    void outgoingAuthenticationChange(int index);
+    void folderPathChange(int index);
+
 signals:
 
     void mailboxListChanged(const NmId &mailboxId, NmSettings::MailboxEventType type);
@@ -95,7 +100,7 @@
     void saveIncomingPassword();
     void saveOutgoingUserName();
     void outgoingUserNameTextChange(const QString &text);
-    void saveOutgoingPassword();     
+    void saveOutgoingPassword();
     void saveReplyTo();
     void replyToTextChange(const QString &text);
     void deleteButtonPress();
@@ -104,12 +109,6 @@
     void incomingMailServerTextChange(const QString &text);
     void saveOutgoingMailServer();
     void outgoingMailServerTextChange(const QString &text);
-    void incomingPortChange(int index);
-    void incomingSecureConnectionItemChange(int index);
-    void folderPathChange(int index);
-    void outgoingPortChange(int index);
-    void outgoingSecureConnectionItemChange(int index);
-    void outgoingAuthenticationChange(int index);
     void connectionButtonPress();
 
 private slots:
@@ -125,7 +124,7 @@
     void handleUserDefinedOutgoingPortInput(HbAction *action);
     void handleConnectionSelected(uint status);
     void refreshIndexModified(int index);
-    
+
 private:
 
     enum AppLibUpdateOperation
--- a/ipsservices/nmipssettings/inc/nmipssettingsplugin.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipssettingsplugin.h	Mon Oct 04 00:05:37 2010 +0300
@@ -60,7 +60,13 @@
 
     void createUserDefinedMode();
     void showMailInInboxModified(HbAction*);
-    void inboxSelectionModified(int index);
+    void incomingSecureConnectionModified(HbAction*);
+    void incomingPortModified(HbAction*);
+    void outgoingSecureConnectionModified(HbAction*);
+    void outgoingPortModified(HbAction*);
+    void outgoingAuthenticationModified(HbAction*);
+    void folderPathModified(HbAction*);
+    void popupRadioButtonIndexModified(int index);
 
 private:
 
@@ -68,7 +74,7 @@
     void initPreferenceItems(HbDataFormModelItem &item) const;
     void initReceivingScheduleItems(HbDataFormModelItem &item);
     void initUserInfoItems(HbDataFormModelItem &item) const;
-    void initServerInfoItems(HbDataFormModelItem &item) const;
+    void initServerInfoItems(HbDataFormModelItem &item);
     void setAlwaysOnlineState(TAlwaysOnlineServerAPICommands command, NmId mailboxId) const;
 
     Q_DISABLE_COPY(NmIpsSettingsPlugin)
@@ -80,7 +86,7 @@
     HbDataFormModel *mModel; // Not owned.
     HbDataForm *mForm; // Not owned.
     bool mHiddenItem;
-    int mCurrentInboxIndex;
+    int mSelectedPopupRadioButtonIndex;
 };
 
 #endif // NMIPSSETTINGS_H
--- a/ipsservices/nmipssettings/inc/nmipssettingstimeeditor.h	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipssettingstimeeditor.h	Mon Oct 04 00:05:37 2010 +0300
@@ -21,7 +21,6 @@
 #include <QDateTime>
 #include <HbWidget>
 
-class QGraphicsLinearLayout;
 class QGraphicsItem;
 class HbPushButton;
 class HbDialog;
@@ -68,7 +67,7 @@
 
     QTime mTime;
     QString mLabel;
-    
+
     // Not owned.
     HbAction *mPrimaryAction;
 };
--- a/ipsservices/nmipssettings/nmipssettings.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/nmipssettings.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -79,6 +79,8 @@
     
     CONFIG += mobility
     MOBILITY += bearer serviceframework
+    
+    MMP_RULES += SMPSAFE
 }
 
 symbian: plugin { # copy qtstub and manifest
--- a/ipsservices/nmipssettings/src/nmipsextendedsettingsmanager.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipsextendedsettingsmanager.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -15,9 +15,9 @@
 *
 */
 
-#include <xqsettingsmanager.h>
-#include <xqcentralrepositoryutils.h>
-#include <xqcentralrepositorysearchcriteria.h>
+#include <XQSettingsManager>
+#include <XQCentralRepositoryUtils>
+#include <XQCentralRepositorySearchCriteria>
 #include <QList>
 
 #include "nmipsextendedsettingsmanager.h"
@@ -34,7 +34,7 @@
 // ======== MEMBER FUNCTIONS ========
 
 /*!
-    Constructor    
+    Constructor
     Creates the NmIpsExtendedSettingsManagerfor loading and saving extended mailbox settings.
     \param mailboxId Mailbox identifier.
 */
@@ -54,7 +54,7 @@
     delete mSettingsManager;
 }
 
-/*!     
+/*!
     Reads extended mailbox setting.
     \param settingItem SettingItem enum of the setting to return.
     \param QVariant SettingValue of the found setting value.
@@ -116,8 +116,8 @@
     }
     return ret;
 }
-   
-/*!     
+
+/*!
     Writes extended mailbox setting.
     \param settingItem SettingItem enum of the setting to replace.
     \param settingValue QVariant of the new setting value.
@@ -129,8 +129,12 @@
     return writeSettingToCenRep(mActiveProfileOffset, settingItem, settingValue);
 }
 
-/*!     
-
+/*!
+    Writes extended mailbox setting.
+    \param profileMode profile to save the setting
+    \param settingItem SettingItem enum of the setting to replace.
+    \param settingValue QVariant of the new setting value.
+    \return bool <true> when the setting item was written, otherwise <false>.
 */
 bool NmIpsExtendedSettingsManager::writeSetting(int profileMode,
     IpsServices::SettingItem settingItem, const QVariant &settingValue)
@@ -164,7 +168,11 @@
 }
 
 /*!
-
+    Writes extended mailbox setting.
+    \param pfileOffset offset for the profile
+    \param settingItem SettingItem enum of the setting to replace.
+    \param settingValue QVariant of the new setting value.
+    \return bool <true> when the setting item was written, otherwise <false>.
 */
 bool NmIpsExtendedSettingsManager::writeSettingToCenRep(qint32 profileOffset,
     IpsServices::SettingItem settingItem, const QVariant &settingValue)
@@ -249,6 +257,9 @@
     return mSettingsManager->writeItemValue(settingKey, value);
 }
 
+/*!
+    Calculate CenRep offset for current mailbox
+*/
 void NmIpsExtendedSettingsManager::calculateMailboxOffset()
 {
     // Find all the keys that match the criteria 0xZZZZZ000, where Z=don't care.
@@ -281,7 +292,9 @@
 }
 
 /*!
-
+    Calculate the offset for profile
+    \param profile profile id
+    \return offset for the profile
 */
 qint32 NmIpsExtendedSettingsManager::convertToProfileOffset(int profile)
 {
--- a/ipsservices/nmipssettings/src/nmipsimap4settingsmanager.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipsimap4settingsmanager.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -42,7 +42,7 @@
 */
 NmIpsImap4SettingsManager::NmIpsImap4SettingsManager(const NmId &mailboxId,
     CEmailAccounts *account,
-    TImapAccount imapAccount)
+    TImapAccount &imapAccount)
 : NmIpsSettingsManagerBase(mailboxId, account, IpsServices::EMailImap),
   mImap4Account(imapAccount)
 {
--- a/ipsservices/nmipssettings/src/nmipspop3settingsmanager.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipspop3settingsmanager.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -41,7 +41,7 @@
     \param imapAccount TImapAccount of the mailbox.
 */
 NmIpsPop3SettingsManager::NmIpsPop3SettingsManager(const NmId &mailboxId,
-    CEmailAccounts *account, TPopAccount popAccount)
+    CEmailAccounts *account, TPopAccount &popAccount)
 : NmIpsSettingsManagerBase(mailboxId, account, IpsServices::EMailPop),
   mPop3Account(popAccount)
 {
--- a/ipsservices/nmipssettings/src/nmipssettingshelper.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingshelper.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -48,7 +48,7 @@
 // CONSTANTS
 
 // Dynamic receiving schedule items.
-const IpsServices::SettingItem NmIpsSettingsReceivingScheduleItems[] = {
+static const IpsServices::SettingItem NmIpsSettingsReceivingScheduleItems[] = {
         IpsServices::ReceptionInboxSyncWindow,
         IpsServices::ReceptionWeekDays,
         IpsServices::ReceptionDayStartTime,
@@ -56,17 +56,17 @@
         IpsServices::ReceptionRefreshPeriodDayTime};
 
 // Dynamic receiving schedule item count.
-const int NmIpsSettingsReceivingScheduleItemCount(
+static const int NmIpsSettingsReceivingScheduleItemCount(
     sizeof(NmIpsSettingsReceivingScheduleItems) / sizeof(NmIpsSettingsReceivingScheduleItems[0]));
 
 // Index of ReceptionDayStartTime in NmIpsSettingsReceivingScheduleItems array.
-const int NmIpsSettingsIndexOfReceptionDayStartTime(2);
+static const int NmIpsSettingsIndexOfReceptionDayStartTime(2);
 
 // Index of user defined mode.
-const int NmIpsSettingsIndexOfUserDefinedMode(3);
+static const int NmIpsSettingsIndexOfUserDefinedMode(3);
 
 // Receving schedule item not found value.
-const int NmIpsSettingsRecevingScheduleItemNotFound(-1);
+static const int NmIpsSettingsRecevingScheduleItemNotFound(-1);
 
 
 
@@ -92,13 +92,13 @@
   mSettingsManager(settingsManager),
   mDataForm(dataForm),
   mDataFormModel(dataFormModel),
-  mDeleteConfirmationDialog(0),
-  mIncomingPortInputDialog(0),
-  mIncomingPortInputValidator(0),
-  mFolderPathInputDialog(0),
-  mOutgoingPortInputDialog(0),
-  mOutgoingPortInputValidator(0),
-  mDestinationDialog(0),
+  mDeleteConfirmationDialog(NULL),
+  mIncomingPortInputDialog(NULL),
+  mIncomingPortInputValidator(NULL),
+  mFolderPathInputDialog(NULL),
+  mOutgoingPortInputDialog(NULL),
+  mOutgoingPortInputValidator(NULL),
+  mDestinationDialog(NULL),
   mServerInfoDynamicItemsVisible(false),
   mAbortDynamicRSItemHandling(false),
   mCurrentRefreshIndex(-1)
@@ -316,10 +316,11 @@
                                      << HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_1_hour"))
                                      << HbStringUtil::convertDigits(hbTrId("txt_mailips_setlabel_val_every_4_hours"));
                     formItemData->setContentWidgetData("items", refreshMailItems);
-                    
+                    formItemData->setContentWidgetData("displayMode","popup");
+
                     mDataForm.addConnection(formItemData, SIGNAL(finished(HbAction *)),
                            this, SLOT(refreshPeriodModified(HbAction *)));
-                    
+
                     mDataForm.addConnection(formItemData, SIGNAL(itemSelected(int)),
                            this, SLOT(refreshIndexModified(int)));
                 }
@@ -888,7 +889,7 @@
 int NmIpsSettingsHelper::getCorrectIncomingPortRadioButtonIndex()
 {
     QVariant incomingPort;
-        mSettingsManager.readSetting(IpsServices::IncomingPort, incomingPort);
+    mSettingsManager.readSetting(IpsServices::IncomingPort, incomingPort);
     int index = 0;
     int port = mSettingsManager.determineDefaultIncomingPort();
     if (port == incomingPort.toInt()) {
@@ -1142,6 +1143,7 @@
 {
     // Check what was currently active sync mode.
     QVariant setting;
+    bool profileChanged = false;
     mSettingsManager.readSetting(IpsServices::ReceptionActiveProfile, setting);
     int activeProfile(setting.toInt());
     if (activeProfile != NmIpsSettingsReceivingScheduleUserDefinedProfile) {
@@ -1153,10 +1155,17 @@
             NmIpsSettingsReceivingScheduleUserDefinedProfile);
 
         // select 'user defined' mode
+        emit goOffline(mSettingsManager.mailboxId());
+        mEmitOnline = true;
+        profileChanged = true;
         mSettingsManager.writeSetting(IpsServices::ReceptionActiveProfile,
             NmIpsSettingsReceivingScheduleUserDefinedProfile);
     }
 
+    if (!profileChanged) {
+        emit goOffline(mSettingsManager.mailboxId());
+        mEmitOnline = true;
+    }
     // store selected setting
     mSettingsManager.writeSetting(settingItem, settingValue);
 
--- a/ipsservices/nmipssettings/src/nmipssettingslabeledcombobox.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingslabeledcombobox.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -15,9 +15,9 @@
 *
 */
 
-#include <qgraphicslinearlayout.h>
-#include <hbcombobox.h>
-#include <hblabel.h>
+#include <QGraphicsLinearLayout>
+#include <HbComboBox>
+#include <HbLabel>
 
 #include "nmipssettingslabeledcombobox.h"
 
@@ -39,6 +39,7 @@
 {
     // Create widget layout.
     QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical);
+    layout->setContentsMargins(0,0,0,0);
     this->setLayout(layout); // Takes ownership
 
     // Create combobox.
--- a/ipsservices/nmipssettings/src/nmipssettingsmanagerbase.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingsmanagerbase.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -18,7 +18,7 @@
 #include <QVariant>
 #include <smtpset.h>
 #include <iapprefs.h>
-#include <xqconversions.h>
+#include <XqConversions>
 
 #include "nmipssettingsmanagerbase.h"
 #include "nmipsextendedsettingsmanager.h"
@@ -42,7 +42,7 @@
     successful construction.
     \param accountType AccountType identifier.
 */
-NmIpsSettingsManagerBase::NmIpsSettingsManagerBase(const NmId &mailboxId, CEmailAccounts *account, 
+NmIpsSettingsManagerBase::NmIpsSettingsManagerBase(const NmId &mailboxId, CEmailAccounts *account,
     IpsServices::TIpsSetAccountTypes accountType)
     : mAccountType(accountType),
       mMailboxId(mailboxId.id())
@@ -67,10 +67,10 @@
     delete mExtendedSettingsManager;
 }
 
-/*!     
+/*!
     Finds and returns the SMTP specific setting or uses NmIpsExtendedSettingsManager to find
     extended settings.
-    \param settingItem SettingItem enum of the setting to return 
+    \param settingItem SettingItem enum of the setting to return
     \param QVariant SettingValue of the found setting value.
     \return bool <true> when the setting item was found otherwise <false>.
 */
@@ -78,16 +78,16 @@
                                            QVariant &settingValue)
 {
     bool found(false);
-    
+
     switch (settingItem) {
         case IpsServices::EmailAlias:
             settingValue = XQConversions::s60DescToQString(mSmtpSettings->EmailAlias());
             found = true;
-            break; 
+            break;
         case IpsServices::EmailAddress:
             settingValue = XQConversions::s60DescToQString(mSmtpSettings->EmailAddress());
             found = true;
-            break; 
+            break;
         case IpsServices::ReplyAddress:
             settingValue = XQConversions::s60DescToQString(mSmtpSettings->ReplyToAddress());
             found = true;
@@ -95,7 +95,7 @@
         case IpsServices::OutgoingMailServer:
             settingValue = XQConversions::s60DescToQString(mSmtpSettings->ServerAddress());
             found = true;
-            break; 
+            break;
         case IpsServices::OutgoingPort:
             settingValue = mSmtpSettings->Port();
             found = true;
@@ -103,19 +103,19 @@
         case IpsServices::OutgoingLoginName:
             settingValue = XQConversions::s60Desc8ToQString(mSmtpSettings->LoginName());
             found = true;
-            break; 
+            break;
         case IpsServices::OutgoingPassword:
             settingValue = XQConversions::s60Desc8ToQString(mSmtpSettings->Password());
             found = true;
-            break; 
+            break;
         case IpsServices::SMTPAuthentication:
             settingValue = mSmtpSettings->SMTPAuth();
             found = true;
-            break; 
+            break;
         case IpsServices::OutgoingSecureSockets:
         	settingValue = mSmtpSettings->SecureSockets();
             found = true;
-            break;  
+            break;
         case IpsServices::OutgoingSSLWrapper:
         	settingValue = mSmtpSettings->SSLWrapper();
             found = true;
@@ -133,11 +133,11 @@
         default:
             found = mExtendedSettingsManager->readSetting(settingItem, settingValue);
             break;
-    }   
+    }
     return found;
 }
-   
-/*!     
+
+/*!
     Writes SMTP settings or passes the extended settings to NmIpsExtendedSettingsManager.
     \param settingItem SettingItem enum of the setting to replace.
     \param settingValue QVariant of the new setting value.
@@ -146,9 +146,9 @@
 bool NmIpsSettingsManagerBase::writeSetting(IpsServices::SettingItem settingItem,
                                             const QVariant &settingValue)
 {
-    HBufC *tmp = 0;
-    HBufC8 *tmp8 = 0;
-    
+    HBufC *tmp = NULL;
+    HBufC8 *tmp8 = NULL;
+
     bool ret(false);
     TInt err(KErrNone);
 
@@ -160,7 +160,7 @@
             if (err==KErrNone) {
                 ret = saveSettings();
             }
-            break; 
+            break;
         case IpsServices::EmailAddress:
             tmp = XQConversions::qStringToS60Desc(settingValue.toString());
             TRAP(err, mSmtpSettings->SetEmailAddressL(*tmp));
@@ -168,7 +168,7 @@
             if (err==KErrNone) {
                 ret = saveSettings();
             }
-            break; 
+            break;
         case IpsServices::ReplyAddress:
             tmp = XQConversions::qStringToS60Desc(settingValue.toString());
             TRAP(err, mSmtpSettings->SetReplyToAddressL(*tmp));
@@ -185,7 +185,7 @@
                 ret = saveSettings();
             }
             break;
-        case IpsServices::OutgoingPort:            
+        case IpsServices::OutgoingPort:
             mSmtpSettings->SetPort(settingValue.toInt());
             ret = saveSettings();
             break;
@@ -205,14 +205,14 @@
                 ret = saveSettings();
             }
             break;
-        case IpsServices::SMTPAuthentication:            
+        case IpsServices::SMTPAuthentication:
             mSmtpSettings->SetSMTPAuth(settingValue.toBool());
             ret = saveSettings();
             break;
         case IpsServices::OutgoingSecureSockets:
             mSmtpSettings->SetSecureSockets(settingValue.toBool());
             ret = saveSettings();
-            break;  
+            break;
         case IpsServices::OutgoingSSLWrapper:
             mSmtpSettings->SetSSLWrapper(settingValue.toBool());
             ret = saveSettings();
@@ -222,12 +222,12 @@
             break;
         default:
             ret = mExtendedSettingsManager->writeSetting(settingItem, settingValue);
-            break;    
+            break;
     }
     return ret;
 }
 
-/*!     
+/*!
     Deletes the mailbox.
     \return Error code <code>0</code> if mailbox deletion was successful, otherwise error
             code is returned.
@@ -241,7 +241,7 @@
     return err;
 }
 
-/*!     
+/*!
     Returns the NmId of the mailbox.
     \return Mailbox id.
 */
@@ -250,7 +250,7 @@
     return mMailboxId;
 }
 
-/*!     
+/*!
     Returns the mailbox account type.
     \return Account type.
 */
@@ -268,7 +268,7 @@
     int port(IpsServices::standardSmtpPort);
     if (mSmtpSettings->SSLWrapper()) {
         port = IpsServices::secureSmtpPort;
-    }        
+    }
     return port;
 }
 
--- a/ipsservices/nmipssettings/src/nmipssettingsmanagerfactory.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingsmanagerfactory.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -10,7 +10,7 @@
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
-* 
+*
 * Description:
 *
 */
@@ -32,22 +32,22 @@
 /*!
     Static factory function that creates the appropriate settingsmanager.
     \param mailboxId Id of the mailbox.
-    \return <code>NmIpsImap4SettingsManager</code> if Imap4 mailbox otherwise 
+    \return <code>NmIpsImap4SettingsManager</code> if Imap4 mailbox otherwise
             <code>NmIpsPop3SettingsManager</code> if Pop3 mailbox
 */
 NmIpsSettingsManagerBase *NmIpsSettingsManagerFactory::createSettingManager(const NmId &mailboxId)
 {
-    NmIpsSettingsManagerBase *settingManager = 0;  
+    NmIpsSettingsManagerBase *settingManager = NULL;
     TImapAccount imapAccount;
     TPopAccount popAccount;
-    
+
     QScopedPointer<CEmailAccounts> emailAccounts;
     TRAPD(err, emailAccounts.reset(CEmailAccounts::NewL()));
-    
+
     if (err == KErrNone) {
-        bool isImapAccount = false;        
+        bool isImapAccount = false;
         isImapAccount = isImap4MailAccount(*emailAccounts, mailboxId, imapAccount);
-        if (isImapAccount) { 
+        if (isImapAccount) {
             settingManager = new NmIpsImap4SettingsManager(mailboxId, emailAccounts.data(), imapAccount);
             (void)emailAccounts.take();
         } else {
@@ -70,16 +70,16 @@
     \param imapAccount TImapAccount reference for returning the Imap mailbox if found.
     \return <code>true</code> if the Imap4 mailbox were found otherwise <code>false</code>
 */
-bool NmIpsSettingsManagerFactory::isImap4MailAccount(CEmailAccounts &emailAccounts, 
+bool NmIpsSettingsManagerFactory::isImap4MailAccount(CEmailAccounts &emailAccounts,
     const NmId &mailboxId, TImapAccount &imapAccount)
 {
     bool result = false;
     RArray<TImapAccount> imapAccounts;
     TRAPD(err, emailAccounts.GetImapAccountsL( imapAccounts ));
     if (err == KErrNone) {
-        TInt accountCount( imapAccounts.Count() );        
+        TInt accountCount( imapAccounts.Count() );
         for ( TInt accountIndex( 0 ); accountIndex < accountCount; ++accountIndex ) {
-            // mailboxId.mId contains exactly same value as account.iImapAccountId 
+            // mailboxId.mId contains exactly same value as account.iImapAccountId
             // when refering to same mailbox.
             TImapAccount account = imapAccounts[accountIndex];
             if ( account.iImapService == mailboxId.id32()) {
@@ -87,8 +87,8 @@
                 result = true; //is imap4 box
                 break;
             }
-        } 
-    }  
+        }
+    }
     return result;
 }
 
@@ -100,23 +100,23 @@
     \param popAccount TPopAccount reference for returning the pop mailbox if found.
     \return <code>true</code> if the Pop3 mailbox were found otherwise <code>false</code>
 */
-bool NmIpsSettingsManagerFactory::isPop3MailAccount(CEmailAccounts &emailAccounts, 
+bool NmIpsSettingsManagerFactory::isPop3MailAccount(CEmailAccounts &emailAccounts,
     const NmId &mailboxId, TPopAccount &popAccount)
 {
     bool result = false;
     RArray<TPopAccount> popAccounts;
     TRAPD(err, emailAccounts.GetPopAccountsL(popAccounts));
     if (err == KErrNone) {
-        TInt accountCount = popAccounts.Count();          
+        TInt accountCount = popAccounts.Count();
         for (TInt i = 0; i < accountCount; ++i) {
-            // mailboxId.mId contains exactly same value as account.iPopAccountId 
+            // mailboxId.mId contains exactly same value as account.iPopAccountId
             // when refering to same mailbox.
             TPopAccount account = popAccounts[i];
             if (popAccounts[i].iPopService == mailboxId.id32()) {
                 popAccount = account;
                 result = true; //is pop3 box
                 break;
-            }        
+            }
         }
     }
     return result;
--- a/ipsservices/nmipssettings/src/nmipssettingsmultiselectionitem.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingsmultiselectionitem.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -26,7 +26,7 @@
 #include "nmipssettingsmultiselectionitem.h"
 
 // CONSTANTS
-const QChar NmIpsSettingsMultiSelectionItemSpace(' ');
+static const QChar NmIpsSettingsMultiSelectionItemSpace(' ');
 
 /*!
     \class NmIpsSettingsMultiSelectionItem
@@ -42,17 +42,17 @@
 NmIpsSettingsMultiSelectionItem::NmIpsSettingsMultiSelectionItem(
     QGraphicsItem *parent, Qt::WindowFlags wFlags)
  : HbWidget(parent, wFlags),
-   mButton(0),
-   mSelectionDialog(0)
+   mButton(NULL),
+   mSelectionDialog(NULL)
 {
     // Create widget layout.
     QScopedPointer<QGraphicsLinearLayout> layout(new QGraphicsLinearLayout(Qt::Vertical, this));
+    layout->setContentsMargins(0,0,0,0);
     this->setLayout(layout.data());
 
     // Create button.
-    mButton = new HbPushButton();
+    mButton = new HbPushButton(this);
     layout->addItem(mButton);
-
     connect(mButton, SIGNAL(clicked()), this, SLOT(launchSelectionDialog()));
     (void)layout.take();
 }
@@ -155,7 +155,7 @@
 {
     if (mSelectionDialog) {
         delete mSelectionDialog;
-        mSelectionDialog = 0;
+        mSelectionDialog = NULL;
     }
 
     // Create the dialog.
--- a/ipsservices/nmipssettings/src/nmipssettingsplugin.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingsplugin.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -15,7 +15,6 @@
 *
 */
 
-#include <qplugin.h>
 #include <QCoreApplication>
 #include <QTranslator>
 #include <QScopedPointer>
@@ -41,10 +40,10 @@
 #include "nmipssettingscustomitem.h"
 #include "nmipssettingslabeledcombobox.h"
 
-const QString NmIpsSettingsComboItems("comboItems");
-const QString NmIpsSettingsLabelTexts("labelTexts");
-const QString NmIpsSettingsItems("items");
-const int NmIpsSettingsReceptionUserDefinedProfileEnabled(1);
+static const QString NmIpsSettingsComboItems("comboItems");
+static const QString NmIpsSettingsLabelTexts("labelTexts");
+static const QString NmIpsSettingsItems("items");
+static const int NmIpsSettingsReceptionUserDefinedProfileEnabled(1);
 
 /*!
     \class NmIpsSettingsPlugin
@@ -59,22 +58,22 @@
     Constructor of NmIpsSettingsPlugin.
 */
 NmIpsSettingsPlugin::NmIpsSettingsPlugin()
-: mSettingsHelper(0),
-  mSettingsManager(0),
+: mSettingsHelper(NULL),
+  mSettingsManager(NULL),
   mHiddenItem(false),
-  mCurrentInboxIndex(-1)
+  mSelectedPopupRadioButtonIndex(-1)
 {
     QString lang = QLocale::system().name();
     QString path = "Z:/resource/qt/translations/";
     QString appName = "mailips_";
     QString commonName = "common_";
-    
+
     // Load common strings
 	QScopedPointer<QTranslator> commonTranslator(new QTranslator(this));
     commonTranslator->load(commonName + lang, path);
     QCoreApplication::installTranslator(commonTranslator.data());
-    (void)commonTranslator.take();  
-    
+    (void)commonTranslator.take();
+
     // Load IPS settings specific strings
 	QScopedPointer<QTranslator> translator(new QTranslator(this));
     translator->load(appName + lang, path);
@@ -106,7 +105,7 @@
     // SettingsManager and SettingsHelper needs to be deleted.
     delete mSettingsManager;
     delete mSettingsHelper;
-    mSettingsHelper = 0;
+    mSettingsHelper = NULL;
     mSettingsManager = NmIpsSettingsManagerFactory::createSettingManager(mailboxId);
 
     bool result(false);
@@ -116,11 +115,11 @@
     if (mSettingsManager) {
         // Turns AlwaysOnline OFF
         setAlwaysOnlineState(EServerAPIEmailTurnOff, mailboxId);
-        
+
         // Store model and form pointers.
         mModel = &model;
         mForm = &form;
-        
+
         // Create settings helper.
         mSettingsHelper = new NmIpsSettingsHelper(*mSettingsManager, form, model);
 
@@ -136,7 +135,7 @@
 
         connect(mSettingsHelper, SIGNAL(createUserDefinedMode()),
                 this, SLOT(createUserDefinedMode()));
-        
+
         // Get the value if some ui items need to be hidden.
         QVariant data;
         mSettingsManager->readSetting(IpsServices::UserNameHidden, data);
@@ -155,12 +154,12 @@
 {
     QVariant profileIndex;
     const NmId mailboxId = mSettingsManager->mailboxId();
-    
+
 	mSettingsManager->readSetting(IpsServices::ReceptionActiveProfile, profileIndex);
 	if ((mSettingsHelper->isOffline()) && (profileIndex.toInt() != IpsServices::EmailSyncProfileManualFetch)) {
 		emit goOnline(mailboxId);
 	}
-	
+
 	// Turns AlwaysOnline ON
 	setAlwaysOnlineState(EServerAPIEmailTurnOn, mailboxId);
 }
@@ -300,7 +299,7 @@
 
     QStringList infoList;
     infoList << hbTrId("txt_mailips_list_the_mailbox_is_uptodate_during")           // 0
-             << hbTrId("txt_mailips_list_the_mailbox_is_refreshed_every_15")        // 1
+             << hbTrId("txt_mailips_list_the_mailbox_is_refreshed_every_hour")      // 1
              << hbTrId("txt_mailips_list_the_mailbox_is_refreshed_only_by");        // 2
 
     // If 'user defined' mode is defined then add 'user defined' explanation to label list.
@@ -330,19 +329,20 @@
                   << HbStringUtil::convertDigits("100")
                   << HbStringUtil::convertDigits("500")
                   << hbTrId("txt_mailips_setlabel_val_all");
-    
+
     showMailInInboxItem->setContentWidgetData(NmIpsSettingsItems, showMailItems);
+    showMailInInboxItem->setContentWidgetData("displayMode","popup");
     showMailInInboxItem->setEnabled(true);
     item.appendChild(showMailInInboxItem);
 
     // Active sync profile connection
     mForm->addConnection(infoItem, SIGNAL(currentIndexChanged(int)),
-        mSettingsHelper, SLOT(receivingScheduleChange(int)));
+						 mSettingsHelper, SLOT(receivingScheduleChange(int)));
     mForm->addConnection(showMailInInboxItem, SIGNAL(finished(HbAction *)),
-           this, SLOT(showMailInInboxModified(HbAction *)));
+						 this, SLOT(showMailInInboxModified(HbAction *)));
     mForm->addConnection(showMailInInboxItem, SIGNAL(itemSelected(int)),
-           this, SLOT(inboxSelectionModified(int)));
-    
+						 this, SLOT(popupRadioButtonIndexModified(int)));
+
     // Must be called manually here, because the signal->slot connection set above using
     // HbDataForm::addConnection() is actually established AFTER the properties have first been
     // set to the widget, causing the first currentIndexChanged signal not to reach
@@ -387,8 +387,8 @@
         usernameItem->setEnabled(false);
     }
     item.appendChild(usernameItem);
-    
-    
+
+
     // 3. Password
     QVariant password;
     mSettingsManager->readSetting(IpsServices::IncomingPassword, password);
@@ -419,7 +419,7 @@
     Appends the server info items to the group item.
     \param item Reference to the parent group item.
 */
-void NmIpsSettingsPlugin::initServerInfoItems(HbDataFormModelItem &item) const
+void NmIpsSettingsPlugin::initServerInfoItems(HbDataFormModelItem &item)
 {
     // 1. Incoming mail server address
     QVariant incomingMailServer;
@@ -437,28 +437,37 @@
         incomingMailServerItem->setEnabled(false);
     }
     item.appendChild(incomingMailServerItem);
-    
+
     // 2. Incoming Secure connection
     CpSettingFormItemData *incomingSecureConnectionItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
             "txt_mailips_setlabel_incoming_security"));
+
     mSettingsHelper->insertContentItem(IpsServices::IncomingSecureSockets, incomingSecureConnectionItem);
+
     QStringList showSCItems;
     showSCItems << hbTrId("txt_mailips_setlabel_security_val_on_starttls")
                 << hbTrId("txt_mailips_setlabel_security_val_on_ssltls")
                 << hbTrId("txt_mailips_setlabel_security_val_off");
+
     incomingSecureConnectionItem->setContentWidgetData(QString("items"), showSCItems);
-    int incomingSecureConnectionItemIndex = 
+    incomingSecureConnectionItem->setContentWidgetData("displayMode","popup");
+
+    int incomingSecureConnectionItemIndex =
         mSettingsHelper->getCorrectIncomingSecureRadioButtonIndex();
-    incomingSecureConnectionItem->setContentWidgetData(QString("selected"), 
+    incomingSecureConnectionItem->setContentWidgetData(QString("selected"),
                                                        incomingSecureConnectionItemIndex);
-    mForm->addConnection(incomingSecureConnectionItem, SIGNAL(itemSelected(int)),             
-            mSettingsHelper, SLOT(incomingSecureConnectionItemChange(int)));
+
+    mForm->addConnection(incomingSecureConnectionItem, SIGNAL(finished(HbAction *)),
+						 this, SLOT(incomingSecureConnectionModified(HbAction *)));
+    mForm->addConnection(incomingSecureConnectionItem, SIGNAL(itemSelected(int)),
+						 this, SLOT(popupRadioButtonIndexModified(int)));
+
     if (mHiddenItem) {
         incomingSecureConnectionItem->setEnabled(false);
     }
     item.appendChild(incomingSecureConnectionItem);
-    
+
     // 3. Incoming mail server port
     CpSettingFormItemData *incomingPortItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
@@ -467,33 +476,44 @@
     QStringList incomingPortItems;
     incomingPortItems << hbTrId("txt_mailips_setlabel_incoming_port_default")
                       << hbTrId("txt_mailips_setlabel_incoming_port_user_defined");
+
     incomingPortItem->setContentWidgetData(QString("items"), incomingPortItems);
-    int incomingPortItemIndex = mSettingsHelper->getCorrectIncomingPortRadioButtonIndex(); 
+    incomingPortItem->setContentWidgetData("displayMode","popup");
+
+    int incomingPortItemIndex = mSettingsHelper->getCorrectIncomingPortRadioButtonIndex();
     incomingPortItem->setContentWidgetData(QString("selected"), incomingPortItemIndex);
+
+    mForm->addConnection(incomingPortItem, SIGNAL(finished(HbAction *)),
+   						 this, SLOT(incomingPortModified(HbAction *)));
     mForm->addConnection(incomingPortItem, SIGNAL(itemSelected(int)),
-        mSettingsHelper, SLOT(incomingPortChange(int)));
+					 this, SLOT(popupRadioButtonIndexModified(int)));
+
     if (mHiddenItem) {
         incomingPortItem->setEnabled(false);
     }
     item.appendChild(incomingPortItem);
-    
+
     // 4. Outgoing mail server address
     QVariant outgoingMailServer;
     mSettingsManager->readSetting(IpsServices::OutgoingMailServer, outgoingMailServer);
+
     CpSettingFormItemData *outgoingMailServerItem = new CpSettingFormItemData(
         HbDataFormModelItem::TextItem, hbTrId("txt_mailips_setlabel_outgoing_mail_server"));
+
     mSettingsHelper->insertContentItem(IpsServices::OutgoingMailServer, outgoingMailServerItem);
     outgoingMailServerItem->setContentWidgetData(QString("text"), outgoingMailServer);
+
     mForm->addConnection(outgoingMailServerItem, SIGNAL(editingFinished()),
                          mSettingsHelper, SLOT(saveOutgoingMailServer()));
     mForm->addConnection(outgoingMailServerItem, SIGNAL(textChanged(QString)),
                          mSettingsHelper, SLOT(outgoingMailServerTextChange(QString)));
+
     if (mHiddenItem) {// Starred and dimmed.
         outgoingMailServerItem->setContentWidgetData(QString("echoMode"), HbLineEdit::Password);
         outgoingMailServerItem->setEnabled(false);
     }
     item.appendChild(outgoingMailServerItem);
-    
+
     // 5. Outgoing secure connection
     CpSettingFormItemData *outgoingSecureConnectionItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
@@ -503,13 +523,20 @@
     outgoingShowSCItems << hbTrId("txt_mailips_setlabel_security_val_on_starttls")
                         << hbTrId("txt_mailips_setlabel_security_val_on_ssltls")
                         << hbTrId("txt_mailips_setlabel_security_val_off");
+
     outgoingSecureConnectionItem->setContentWidgetData(QString("items"), outgoingShowSCItems);
-    int outgoingSecureConnectionItemIndex = 
+    outgoingSecureConnectionItem->setContentWidgetData("displayMode","popup");
+
+    int outgoingSecureConnectionItemIndex =
         mSettingsHelper->getCorrectOutgoingSecureRadioButtonIndex();
-    outgoingSecureConnectionItem->setContentWidgetData(QString("selected"), 
+    outgoingSecureConnectionItem->setContentWidgetData(QString("selected"),
                                                        outgoingSecureConnectionItemIndex);
-    mForm->addConnection(outgoingSecureConnectionItem, SIGNAL(itemSelected(int)),             
-            mSettingsHelper, SLOT(outgoingSecureConnectionItemChange(int)));
+
+    mForm->addConnection(outgoingSecureConnectionItem, SIGNAL(finished(HbAction *)),
+      				     this, SLOT(outgoingSecureConnectionModified(HbAction *)));
+    mForm->addConnection(outgoingSecureConnectionItem, SIGNAL(itemSelected(int)),
+				         this, SLOT(popupRadioButtonIndexModified(int)));
+
     if (mHiddenItem) {
         outgoingSecureConnectionItem->setEnabled(false);
     }
@@ -523,16 +550,23 @@
     QStringList outgoingPortItems;
     outgoingPortItems << hbTrId("txt_mailips_setlabel_incoming_port_default")
                       << hbTrId("txt_mailips_setlabel_incoming_port_user_defined");
+
     outgoingPortItem->setContentWidgetData(QString("items"), outgoingPortItems);
-    int outgoingPortItemIndex = mSettingsHelper->getCorrectOutgoingPortRadioButtonIndex(); 
+    outgoingPortItem->setContentWidgetData("displayMode","popup");
+
+    int outgoingPortItemIndex = mSettingsHelper->getCorrectOutgoingPortRadioButtonIndex();
     outgoingPortItem->setContentWidgetData(QString("selected"), outgoingPortItemIndex);
-    mForm->addConnection(outgoingPortItem, SIGNAL(itemSelected(int)),
-        mSettingsHelper, SLOT(outgoingPortChange(int)));
+
+    mForm->addConnection(outgoingPortItem, SIGNAL(finished(HbAction *)),
+					     this, SLOT(outgoingPortModified(HbAction *)));
+	mForm->addConnection(outgoingPortItem, SIGNAL(itemSelected(int)),
+						 this, SLOT(popupRadioButtonIndexModified(int)));
+
     if (mHiddenItem) {
         outgoingPortItem->setEnabled(false);
     }
     item.appendChild(outgoingPortItem);
-    
+
     // 7. Outgoing authentication.
     CpSettingFormItemData *outgoingAuthenticationItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
@@ -542,12 +576,19 @@
     outgoingAuthenticationItems << hbTrId("txt_mailips_setlabel_outgoing_authentication_none")
                                 << hbTrId("txt_mailips_setlabel_outgoing_authentication_same")
                                 << hbTrId("txt_mailips_setlabel_outgoing_authentication_user");
+
     outgoingAuthenticationItem->setContentWidgetData(QString("items"), outgoingAuthenticationItems);
-    int outgoingAuthenticationIndex = 
-        mSettingsHelper->getCorrectOutgoingAuthenticationRadioButtonIndex(); 
+    outgoingAuthenticationItem->setContentWidgetData("displayMode","popup");
+
+    int outgoingAuthenticationIndex =
+        mSettingsHelper->getCorrectOutgoingAuthenticationRadioButtonIndex();
     outgoingAuthenticationItem->setContentWidgetData(QString("selected"), outgoingAuthenticationIndex);
-    mForm->addConnection(outgoingAuthenticationItem, SIGNAL(itemSelected(int)),
-        mSettingsHelper, SLOT(outgoingAuthenticationChange(int)));
+
+    mForm->addConnection(outgoingAuthenticationItem, SIGNAL(finished(HbAction *)),
+    					 this, SLOT(outgoingAuthenticationModified(HbAction *)));
+	mForm->addConnection(outgoingAuthenticationItem, SIGNAL(itemSelected(int)),
+						 this, SLOT(popupRadioButtonIndexModified(int)));
+
     item.appendChild(outgoingAuthenticationItem);
     if (mHiddenItem) {
         outgoingAuthenticationItem->setEnabled(false);
@@ -555,22 +596,29 @@
     if (outgoingAuthenticationIndex == IpsServices::EMailAuthUserAuthentication) {
         mSettingsHelper->createServerInfoGroupDynamicItems(mHiddenItem);
     }
-    
+
     // 8. Folder path
     // This item is only shown for IMAP4 account.
     if (mSettingsManager->accountType() == IpsServices::EMailImap) {
         CpSettingFormItemData *folderPathItem =
             new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
                 "txt_mailips_setlabel_folder_path"));
-        mSettingsHelper->insertContentItem(IpsServices::FolderPath, folderPathItem);    
+        mSettingsHelper->insertContentItem(IpsServices::FolderPath, folderPathItem);
         QStringList folderPathItems;
         folderPathItems << hbTrId("txt_mailips_setlabel_folder_path_val_default")
                         << hbTrId("txt_mailips_setlabel_folder_path_user_defined");
+
         folderPathItem->setContentWidgetData(QString("items"), folderPathItems);
+        folderPathItem->setContentWidgetData("displayMode","popup");
+
         int folderPathItemIndex = mSettingsHelper->getCorrectFolderPathRadioButtonIndex();
         folderPathItem->setContentWidgetData(QString("selected"), folderPathItemIndex);
-        mForm->addConnection(folderPathItem, SIGNAL(itemSelected(int)),
-            mSettingsHelper, SLOT(folderPathChange(int)));
+
+        mForm->addConnection(folderPathItem, SIGNAL(finished(HbAction *)),
+            			     this, SLOT(folderPathModified(HbAction *)));
+		mForm->addConnection(folderPathItem, SIGNAL(itemSelected(int)),
+							 this, SLOT(popupRadioButtonIndexModified(int)));
+
         item.appendChild(folderPathItem);
     }
 }
@@ -585,13 +633,13 @@
 {
     RAlwaysOnlineClientSession aosession;
     TInt err(aosession.Connect());
-    
+
     if (err == KErrNone) {
         TPckgBuf<TMsvId> mboxBuf(mailboxId.id32());
-        
+
         TRAP_IGNORE(aosession.RelayCommandL(command, mboxBuf));
     }
-    
+
     aosession.Close();
 }
 
@@ -639,15 +687,21 @@
 /*!
 Handles mail in inbox modifications.
 
+Index   Value
+0       50
+1       100
+2       500
+3       All
+
 \param action Action that determines whether user clicked OK or cancel.
 */
 void NmIpsSettingsPlugin::showMailInInboxModified(HbAction *action)
 {
     if ((action->text() == hbTrId("txt_common_button_ok"))
-            && (mCurrentInboxIndex >=0 && mCurrentInboxIndex <=3)) {
+            && (mSelectedPopupRadioButtonIndex >=0 && mSelectedPopupRadioButtonIndex <=3)) {
         int conversionTable[] = { 50, 100, 500, 0 };
-        int selectedValue(conversionTable[mCurrentInboxIndex]);
-        
+        int selectedValue(conversionTable[mSelectedPopupRadioButtonIndex]);
+
         QVariant previouslySelectedValue;
         mSettingsManager->readSetting(IpsServices::ReceptionInboxSyncWindow, previouslySelectedValue);
         if (previouslySelectedValue.toInt() != selectedValue) {
@@ -655,22 +709,103 @@
                 IpsServices::ReceptionInboxSyncWindow, selectedValue);
         }
     }
-    mCurrentInboxIndex = -1;
+    mSelectedPopupRadioButtonIndex = -1;
+}
+
+/*!
+Handles incoming secure connection modifications.
+
+\param action Action that determines whether user clicked OK or cancel.
+*/
+void NmIpsSettingsPlugin::incomingSecureConnectionModified(HbAction *action)
+{
+    if(action->text() == hbTrId("txt_common_button_ok") &&
+       mSelectedPopupRadioButtonIndex >=0) {
+       mSettingsHelper->incomingSecureConnectionItemChange(mSelectedPopupRadioButtonIndex);
+    }
+    mSelectedPopupRadioButtonIndex = -1;
 }
+
 /*!
-Handles mail in inbox modifications.
+Handles incoming port modifications.
+
+\param action Action that determines whether user clicked OK or cancel.
+*/
+void NmIpsSettingsPlugin::incomingPortModified(HbAction *action)
+{
+	if ((action->text() == hbTrId("txt_common_button_ok")) &&
+		(mSelectedPopupRadioButtonIndex == IpsServices::NmIpsSettingsDefault ||
+		 mSelectedPopupRadioButtonIndex == IpsServices::NmIpsSettingsUserDefined)) {
+	       mSettingsHelper->incomingPortChange(mSelectedPopupRadioButtonIndex);
+	    }
+	mSelectedPopupRadioButtonIndex = -1;
+}
+
+/*!
+Handles outgoing secure connection modifications.
+
+\param action Action that determines whether user clicked OK or cancel.
+*/
+void NmIpsSettingsPlugin::outgoingSecureConnectionModified(HbAction *action)
+{
+	if (action->text() == hbTrId("txt_common_button_ok") &&
+		mSelectedPopupRadioButtonIndex >= 0) {
+		       mSettingsHelper->outgoingSecureConnectionItemChange(mSelectedPopupRadioButtonIndex);
+		}
+	mSelectedPopupRadioButtonIndex = -1;
+}
 
-Index   Value
-0       50
-1       100
-2       500
-3       All
+/*!
+Handles outgoing port modifications.
+
+\param action Action that determines whether user clicked OK or cancel.
+*/
+void NmIpsSettingsPlugin::outgoingPortModified(HbAction *action)
+{
+	if ((action->text() == hbTrId("txt_common_button_ok")) &&
+		(mSelectedPopupRadioButtonIndex == IpsServices::NmIpsSettingsDefault ||
+		 mSelectedPopupRadioButtonIndex == IpsServices::NmIpsSettingsUserDefined)) {
+	       mSettingsHelper->outgoingPortChange(mSelectedPopupRadioButtonIndex);
+	    }
+	mSelectedPopupRadioButtonIndex = -1;
+}
+
+/*!
+Handles outgoing authentication modifications.
+
+\param action Action that determines whether user clicked OK or cancel.
+*/
+void NmIpsSettingsPlugin::outgoingAuthenticationModified(HbAction *action)
+{
+	if (action->text() == hbTrId("txt_common_button_ok") &&
+		mSelectedPopupRadioButtonIndex >= 0) {
+	       mSettingsHelper->outgoingAuthenticationChange(mSelectedPopupRadioButtonIndex);
+	    }
+	mSelectedPopupRadioButtonIndex = -1;
+}
+
+/*!
+Handles folder path modifications.
+
+\param action Action that determines whether user clicked OK or cancel.
+*/
+void NmIpsSettingsPlugin::folderPathModified(HbAction *action)
+{
+	if ((action->text() == hbTrId("txt_common_button_ok")) &&
+		(mSelectedPopupRadioButtonIndex == IpsServices::NmIpsSettingsDefault ||
+		 mSelectedPopupRadioButtonIndex == IpsServices::NmIpsSettingsUserDefined)) {
+	       mSettingsHelper->folderPathChange(mSelectedPopupRadioButtonIndex);
+	    }
+	mSelectedPopupRadioButtonIndex = -1;
+}
+
+/*!
 
 \param index The index value of the selection.
 */
-void NmIpsSettingsPlugin::inboxSelectionModified(int index)
+void NmIpsSettingsPlugin::popupRadioButtonIndexModified(int index)
 {
-    mCurrentInboxIndex = index;
+    mSelectedPopupRadioButtonIndex = index;
 }
 
 Q_EXPORT_PLUGIN2(nmipssettings, NmIpsSettingsPlugin);
--- a/ipsservices/nmipssettings/src/nmipssettingstimeeditor.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingstimeeditor.cpp	Mon Oct 04 00:05:37 2010 +0300
@@ -22,7 +22,7 @@
 #include <HbDateTimePicker>
 #include <HbAction>
 #include <HbExtendedLocale>
-
+#include <HbStringUtil>
 #include "nmipssettingstimeeditor.h"
 
 /*!
@@ -44,14 +44,14 @@
 {
     // Create widget layout.
     QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical);
+    layout->setContentsMargins(0,0,0,0);
     this->setLayout(layout); // Takes ownership
 
     // Create label.
     mButton = new HbPushButton();
     layout->addItem(mButton); // Takes ownership
 
-    connect( mButton, SIGNAL(clicked()),
-             this, SLOT(launchTimePicker()));
+    connect( mButton, SIGNAL(clicked()), this, SLOT(launchTimePicker()));
 }
 
 /*!
@@ -78,7 +78,8 @@
 void NmIpsSettingsTimeEditor::setTime(QTime time)
 {
     mTime = time;
-    mButton->setText(mTime.toString(timeFormat()));
+    HbExtendedLocale locale(HbExtendedLocale::system());
+    mButton->setText(HbStringUtil::convertDigits(locale.format( mTime, r_qtn_time_usual )));
 }
 
 /*!
Binary file ipsservices/nmipssettings/translations/mailips.qm has changed
--- a/ipsservices/nmipssettings/translations/mailips.ts	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmipssettings/translations/mailips.ts	Mon Oct 04 00:05:37 2010 +0300
@@ -5,7 +5,7 @@
 <message numerus="no" id="txt_mailips_setlabel_security_val_on_starttls">
     <comment>Value for txt_mailips_setlabel_secure_connection. Secure connection on with StartTLS (name of the secure connection protocol )</comment>        
     <source>On (StartTLS)</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_11_12_val</extra-loc-positionid>
@@ -55,7 +55,7 @@
 <message numerus="no" id="txt_mailips_setlabel_folder_path_val_default">
     <comment>Value for txt_mailips_setlabel_folder_path. Default folder path will be used. Refers to all folders. </comment>        
     <source>Default</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_9_val</extra-loc-positionid>
@@ -85,7 +85,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_every_day">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. The value text for Receiving weekdays if all seven days are selected. </comment>        
     <source>Every day</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -95,7 +95,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_tue">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Tuesdays setting item</comment>        
     <source>Tue</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -113,9 +113,9 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_val_every_1_hour">
-    <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every hour</comment>        
-    <source>Every 1 hour</source>
-    <translation variants="no" type="unfinished"></translation>
+    <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every hour. NOTE! Removed the unnecessary number 1 from the draft English</comment>        
+    <source>Every hour</source>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
@@ -143,7 +143,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_the_mailbox_is_refreshed_as_defin">
-    <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_user_defined)</comment>        
+    <comment>Info text to explain the profile (txt_mailips_setlabel_selected_mode_val_user_defined)</comment>        
     <source>The mailbox is refreshed as defined by the user</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
@@ -175,7 +175,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_sun">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Sunday setting item</comment>        
     <source>Sun</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -185,7 +185,7 @@
 <message numerus="no" id="txt_mailips_setlabel_folder_path_user_defined">
     <comment>Value for txt_mailips_setlabel_folder_path. User is able to define the folder path.</comment>        
     <source>User defined</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_9_val</extra-loc-positionid>
@@ -265,7 +265,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_mon">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Monday setting item</comment>        
     <source>Mon</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -275,7 +275,7 @@
 <message numerus="no" id="txt_mailips_setlabel_outgoing_authentication_same">
     <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. Same authentication as for incoming mail</comment>        
     <source>Same as for incoming</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_10_val</extra-loc-positionid>
@@ -293,8 +293,8 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_the_mailbox_is_refreshed_every_15">
-    <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_save_energy)</comment>        
-    <source>The mailbox is refreshed every 15 minutes during daytime</source>
+    <comment>Info text to explain the profile (txt_mailips_setlabel_selected_mode_val_save_energy). NOTE! Draft English changed. Updating happens every 1 hour.</comment>        
+    <source>The mailbox is refreshed every hour during daytime</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b</extra-loc-viewid>
@@ -325,7 +325,7 @@
 <message numerus="no" id="txt_mailips_setlabel_val_keep_uptodate">
     <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is kept up-to-date</comment>        
     <source>Keep up-to-date</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
@@ -333,7 +333,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_the_mailbox_is_uptodate_during">
-    <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_keep_uptoda)</comment>        
+    <comment>info text to explain the profile (txt_mailips_setlabel_selected_mode_val_keep_uptoda)</comment>        
     <source>The mailbox is up-to-date during daytime</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
@@ -355,7 +355,7 @@
 <message numerus="no" id="txt_mailips_setlabel_security_val_on_ssltls">
     <comment>Value for txt_mailips_setlabel_secure_connection. Secure connection on with SLL/TLS (name of the secure connection protocol )</comment>        
     <source>On (SLL/TLS)</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_11_12_val</extra-loc-positionid>
@@ -415,7 +415,7 @@
 <message numerus="no" id="txt_mailips_setlabel_val_all">
     <comment>One of the values for txt_mailips_setlabel_show_mail_in_inbox and txt_mailips_setlabel_show_mail_in_other_folders. The user can select that all the mail messages in the mailbox are synced to phone..</comment>        
     <source>All</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_1_2_val</extra-loc-positionid>
@@ -445,7 +445,7 @@
 <message numerus="no" id="txt_mailips_setlabel_outgoing_authentication_none">
     <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. No authetication</comment>        
     <source>None</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_10_val</extra-loc-positionid>
@@ -485,7 +485,7 @@
 <message numerus="no" id="txt_mailips_setlabel_incoming_port_default">
     <comment>Value for txt_mailips_setlabel_incoming_port</comment>        
     <source>Default</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_13_val</extra-loc-positionid>
@@ -555,7 +555,7 @@
 <message numerus="no" id="txt_mailips_subhead_preferences">
     <comment>Subheding. Group box for expanding/ collapsing preferences in settings view. Opens list of preferences where the user can define the name of the user (My name), Mailbox name and other settings.</comment>        
     <source>Preferences</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_a</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
@@ -595,7 +595,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_wed">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Wednesday setting item</comment>        
     <source>Wed</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -605,7 +605,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_sat">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Saturday setting item</comment>        
     <source>Sat</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -625,7 +625,7 @@
 <message numerus="no" id="txt_mailips_setlabel_security_val_off">
     <comment>Value for txt_mailips_setlabel_secure_connection. Secure connection off</comment>        
     <source>Off</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_11_12_val</extra-loc-positionid>
@@ -655,7 +655,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_none">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Shown if none of the days are selected.</comment>        
     <source>None</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -715,7 +715,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_thu">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Thursday setting item</comment>        
     <source>Thu</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -725,7 +725,7 @@
 <message numerus="no" id="txt_mailips_subhead_receiving_schedule">
     <comment>Subheading. Group box for expanding/ collapsing synchronization settings in settings view. Opens list of settings related to how often/at what intervals the mailbox is synchronized with the content on the mail server ie. how often/at what intervals the devices receives data from the mail server.</comment>        
     <source>Receiving Schedule</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
@@ -735,7 +735,7 @@
 <message numerus="no" id="txt_mailips_subhead_server_info">
     <comment>Subheading. Group box for expanding/ collapsing Server settings in settings view. Opens list of settings related to Server settings (server name, domain name, secure connection on/off). </comment>        
     <source>Server info</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
@@ -765,7 +765,7 @@
 <message numerus="no" id="txt_mailips_setlabel_val_when_i_open_mailbox">
     <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed only and always when the user opens the mailbox</comment>        
     <source>When I open mailbox</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
@@ -795,7 +795,7 @@
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_fri">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Friday setting item</comment>        
     <source>Fri</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
@@ -805,7 +805,7 @@
 <message numerus="no" id="txt_mailips_setlabel_val_every_4_hours">
     <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every four hours</comment>        
     <source>Every 4 hours</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
@@ -815,7 +815,7 @@
 <message numerus="no" id="txt_mailips_setlabel_incoming_port_user_defined">
     <comment>Value for txt_mailips_setlabel_incoming_port</comment>        
     <source>User defined</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_13_val</extra-loc-positionid>
@@ -845,7 +845,7 @@
 <message numerus="no" id="txt_mailips_setlabel_outgoing_authentication_user">
     <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. User defines the authentication</comment>        
     <source>User authentication</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_10_val</extra-loc-positionid>
@@ -875,7 +875,7 @@
 <message numerus="no" id="txt_mailips_setlabel_val_every_15_minutes">
     <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every 15 minutes</comment>        
     <source>Every 15 minutes</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
@@ -883,7 +883,7 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_the_mailbox_is_refreshed_only_by">
-    <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_fetch_manually)</comment>        
+    <comment>Info text to explain the profile (txt_mailips_setlabel_selected_mode_val_fetch_manually)</comment>        
     <source>The mailbox is refreshed only by user request</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
@@ -895,7 +895,7 @@
 <message numerus="no" id="txt_mailips_subhead_user_info">
     <comment>Subheading. Group box for expanding/ collapsing credential settings in settings view. Opens list of settings related to the user info (mail address, username, password) for the mailbox. </comment>        
     <source>User info</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006_c</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
@@ -935,7 +935,7 @@
 <message numerus="no" id="txt_mailips_button_delete_mailbox">
     <comment>Button for deleting the mailbox. </comment>        
     <source>Delete mailbox</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
     <extra-loc-viewid>mail_006</extra-loc-viewid>
     <extra-loc-positionid>Button</extra-loc-positionid>
--- a/ipsservices/nmpopclientplugin/nmpopclientplugin.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/ipsservices/nmpopclientplugin/nmpopclientplugin.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -52,6 +52,8 @@
     LIBS += -lnmailbase \
             -lnmsettingui \
             -lnmailuiengine
+            
+    MMP_RULES += SMPSAFE
 }
 
 win32 {    
--- a/nmail.pro	Fri Sep 17 08:27:21 2010 +0300
+++ b/nmail.pro	Mon Oct 04 00:05:37 2010 +0300
@@ -36,8 +36,8 @@
         emailservices/nmclientapi \
         emailservices/nmailagent \
         emailservices/nmregister \
+        emailservices/nmregister/nmregisterinstaller \
         emailuis/nmhswidget \
-        emailuis/nmhswidget/tsrc/nmhswidgettestapp \
         emailservices/nmutilities
         
     # Need to remove warnings SYSTEMINCLUDE path "\epoc32\include\mw\hb\..." not found