--- a/email_plat/nmail_settings_api/nmail_settings_api.pri Fri Jul 09 12:17:13 2010 +0300
+++ b/email_plat/nmail_settings_api/nmail_settings_api.pri Fri Jul 23 19:09:50 2010 +0300
@@ -1,24 +1,16 @@
-#
# 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>" \
+ "nmail_settings_api/nmapimailboxsettingsdata.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettingsdata.h)" \
+ "nmail_settings_api/nmapimailboxsettings.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettings.h)" \
+ "nmail_settings_api/nmapisettingsmanager.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapisettingsmanager.h)"
-symbian*: {
- # Build.inf rules
- BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
- "nmail_settings_api/nmapimailboxsettingsdata.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettingsdata.h)" \
- "nmail_settings_api/nmapimailboxsettings.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettings.h)"
-
-}
--- a/email_plat/nmail_settings_api/nmapimailboxsettingsdata.h Fri Jul 09 12:17:13 2010 +0300
+++ b/email_plat/nmail_settings_api/nmapimailboxsettingsdata.h Fri Jul 23 19:09:50 2010 +0300
@@ -45,6 +45,11 @@
const QString NmApiFetchManually = "Manual-Fetch";
const QString NmApiUserDefined = "User-Defined";
+const QString EmailProfileOffsetKUTD = "KUTD";
+const QString EmailProfileOffsetSE = "SE";
+const QString EmailProfileOffsetMF = "MF";
+const QString EmailProfileOffsetUD = "UD";
+
enum NmApiWeekDays
{
Mon = 0x01, Tue = 0x02, Wed = 0x04, Thu = 0x08, Fri = 0x10,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/nmail_settings_api/nmapisettingsmanager.h Fri Jul 23 19:09:50 2010 +0300
@@ -0,0 +1,44 @@
+/*
+ * 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 NMAPISETTINGSMANAGER_H_
+#define NMAPISETTINGSMANAGER_H_
+
+#include <nmapidef.h>
+
+namespace EmailClientApi
+{
+
+class NmApiMailboxSettingsData;
+class NmApiSettingsManagerPrivate;
+class NMAPI_EXPORT NmApiSettingsManager
+{
+public:
+ NmApiSettingsManager(const quint64 mailboxId);
+ ~NmApiSettingsManager();
+
+ bool load(quint64 mailboxId, NmApiMailboxSettingsData &data);
+ bool save(const NmApiMailboxSettingsData &data);
+
+protected:
+ NmApiSettingsManagerPrivate *d;
+
+};
+
+}
+
+#endif /* NMAPISETTINGSMANAGER_H_ */
--- a/emailservices/emaildebug/inc/emailtrace.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emaildebug/inc/emailtrace.h Fri Jul 23 19:09:50 2010 +0300
@@ -22,6 +22,7 @@
#include <QDebug>
#include <QFile>
#include <QThread>
+#include <QDateTime>
/*
* The macros NM_COMMENT_TRACES, NM_ERROR_TRACES, and NM_FUNCTION_TRACES
@@ -33,11 +34,19 @@
* opened, the messages are printed to qDebug(). The DSC2STR() function can
* be used to convert Symbian descriptors to QString objects.
*/
-#if defined(DEBUG) || defined(_DEBUG)
+#if defined(DEBUG) || defined(_DEBUG) || NM_COMMENT_TRACES || NM_ERROR_TRACES || NM_FUNCTION_TRACES
+#ifndef NM_COMMENT_TRACES
#define NM_COMMENT_TRACES 0
+#endif
+
+#ifndef NM_ERROR_TRACES
#define NM_ERROR_TRACES 0
+#endif
+
+#ifndef NM_FUNCTION_TRACES
#define NM_FUNCTION_TRACES 0
+#endif
#if NM_COMMENT_TRACES || NM_ERROR_TRACES || NM_FUNCTION_TRACES
@@ -53,8 +62,9 @@
if (NM_LOG_TO_FILE && !file.isOpen()) {
file.open(QIODevice::Append | QIODevice::Text);
}
+ QDateTime dt = QDateTime::currentDateTime ();
if (file.isWritable()) {
- QDebug(&file).nospace() << msg << '\n';
+ QDebug(&file).nospace() << dt.toString(Qt::ISODate) << " " << msg << '\n';
} else {
qDebug().nospace() << "[Nmail] " << msg;
}
--- a/emailservices/emailframework/bwins/fsmailframeworku.def Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/bwins/fsmailframeworku.def Fri Jul 23 19:09:50 2010 +0300
@@ -10,21 +10,23 @@
?GetTempDirL@CFSMailClient@@QAEAAVTDesC16@@XZ @ 9 NONAME ; class TDesC16 & CFSMailClient::GetTempDirL(void)
?GetFolderByUidL@CFSMailClient@@QAEPAVCFSMailFolder@@VTFSMailMsgId@@0@Z @ 10 NONAME ; class CFSMailFolder * CFSMailClient::GetFolderByUidL(class TFSMailMsgId, class TFSMailMsgId)
?ExtensionL@CFSMailClient@@UAEPAVCEmailExtension@@ABVTUid@@@Z @ 11 NONAME ; class CEmailExtension * CFSMailClient::ExtensionL(class TUid const &)
- ?NewL@CFSMailClient@@SAPAV1@H@Z @ 12 NONAME ; class CFSMailClient * CFSMailClient::NewL(int)
- ?SetMailboxName@CFSMailClient@@QAEXVTFSMailMsgId@@ABVTDesC16@@@Z @ 13 NONAME ; void CFSMailClient::SetMailboxName(class TFSMailMsgId, class TDesC16 const &)
- ?GetMessageByUidL@CFSMailClient@@QAEPAVCFSMailMessage@@VTFSMailMsgId@@00W4TFSMailDetails@@@Z @ 14 NONAME ; class CFSMailMessage * CFSMailClient::GetMessageByUidL(class TFSMailMsgId, class TFSMailMsgId, class TFSMailMsgId, enum TFSMailDetails)
- ?GetMailBoxByUidL@CFSMailClient@@QAEPAVCFSMailBox@@VTFSMailMsgId@@@Z @ 15 NONAME ; class CFSMailBox * CFSMailClient::GetMailBoxByUidL(class TFSMailMsgId)
- ?AuthenticateL@CFSMailClient@@QAEHAAVMFSMailRequestObserver@@@Z @ 16 NONAME ; int CFSMailClient::AuthenticateL(class MFSMailRequestObserver &)
- ?GetBrandManagerL@CFSMailClient@@QAEAAVMFSMailBrandManager@@XZ @ 17 NONAME ; class MFSMailBrandManager & CFSMailClient::GetBrandManagerL(void)
- ??1CFSMailClient@@EAE@XZ @ 18 NONAME ; CFSMailClient::~CFSMailClient(void)
- ?NewLC@CFSMailClient@@SAPAV1@H@Z @ 19 NONAME ; class CFSMailClient * CFSMailClient::NewLC(int)
- ?UnregisterRequestObserver@CFSMailClient@@QAEXH@Z @ 20 NONAME ; void CFSMailClient::UnregisterRequestObserver(int)
- ?RemoveObserver@CFSMailClient@@QAEXAAVMFSMailEventObserver@@@Z @ 21 NONAME ; void CFSMailClient::RemoveObserver(class MFSMailEventObserver &)
- ?SubscribeMailboxEventsL@CFSMailClient@@QAEXVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 22 NONAME ; void CFSMailClient::SubscribeMailboxEventsL(class TFSMailMsgId, class MFSMailEventObserver &)
- ?ListMessages@CFSMailClient@@QAEPAVMFSMailIterator@@VTFSMailMsgId@@0W4TFSMailDetails@@ABV?$RArray@VTFSMailSortCriteria@@@@@Z @ 23 NONAME ; class MFSMailIterator * CFSMailClient::ListMessages(class TFSMailMsgId, class TFSMailMsgId, enum TFSMailDetails, class RArray<class TFSMailSortCriteria> const &)
- ?UnsubscribeMailboxEvents@CFSMailClient@@QAEXVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 24 NONAME ; void CFSMailClient::UnsubscribeMailboxEvents(class TFSMailMsgId, class MFSMailEventObserver &)
- ?CancelAllL@CFSMailClient@@QAEXXZ @ 25 NONAME ; void CFSMailClient::CancelAllL(void)
- ?NewL@CFSMailClient@@SAPAV1@XZ @ 26 NONAME ; class CFSMailClient * CFSMailClient::NewL(void)
- ?AddObserverL@CFSMailClient@@QAEXAAVMFSMailEventObserver@@@Z @ 27 NONAME ; void CFSMailClient::AddObserverL(class MFSMailEventObserver &)
- ?IncReferenceCount@CFSMailClient@@QAEHXZ @ 28 NONAME ; int CFSMailClient::IncReferenceCount(void)
+ ?PrepareMrDescriptionL@CFSMailClient@@UAEXABVTFSMailMsgId@@0@Z @ 12 NONAME ; void CFSMailClient::PrepareMrDescriptionL(class TFSMailMsgId const &, class TFSMailMsgId const &)
+ ?NewL@CFSMailClient@@SAPAV1@H@Z @ 13 NONAME ; class CFSMailClient * CFSMailClient::NewL(int)
+ ?SetMailboxName@CFSMailClient@@QAEXVTFSMailMsgId@@ABVTDesC16@@@Z @ 14 NONAME ; void CFSMailClient::SetMailboxName(class TFSMailMsgId, class TDesC16 const &)
+ ?GetMessageByUidL@CFSMailClient@@QAEPAVCFSMailMessage@@VTFSMailMsgId@@00W4TFSMailDetails@@@Z @ 15 NONAME ; class CFSMailMessage * CFSMailClient::GetMessageByUidL(class TFSMailMsgId, class TFSMailMsgId, class TFSMailMsgId, enum TFSMailDetails)
+ ?GetMailBoxByUidL@CFSMailClient@@QAEPAVCFSMailBox@@VTFSMailMsgId@@@Z @ 16 NONAME ; class CFSMailBox * CFSMailClient::GetMailBoxByUidL(class TFSMailMsgId)
+ ?AuthenticateL@CFSMailClient@@QAEHAAVMFSMailRequestObserver@@@Z @ 17 NONAME ; int CFSMailClient::AuthenticateL(class MFSMailRequestObserver &)
+ ?GetBrandManagerL@CFSMailClient@@QAEAAVMFSMailBrandManager@@XZ @ 18 NONAME ; class MFSMailBrandManager & CFSMailClient::GetBrandManagerL(void)
+ ??1CFSMailClient@@EAE@XZ @ 19 NONAME ; CFSMailClient::~CFSMailClient(void)
+ ?NewLC@CFSMailClient@@SAPAV1@H@Z @ 20 NONAME ; class CFSMailClient * CFSMailClient::NewLC(int)
+ ?UnregisterRequestObserver@CFSMailClient@@QAEXH@Z @ 21 NONAME ; void CFSMailClient::UnregisterRequestObserver(int)
+ ?RemoveObserver@CFSMailClient@@QAEXAAVMFSMailEventObserver@@@Z @ 22 NONAME ; void CFSMailClient::RemoveObserver(class MFSMailEventObserver &)
+ ?SubscribeMailboxEventsL@CFSMailClient@@QAEXVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 23 NONAME ; void CFSMailClient::SubscribeMailboxEventsL(class TFSMailMsgId, class MFSMailEventObserver &)
+ ?ListMessages@CFSMailClient@@QAEPAVMFSMailIterator@@VTFSMailMsgId@@0W4TFSMailDetails@@ABV?$RArray@VTFSMailSortCriteria@@@@@Z @ 24 NONAME ; class MFSMailIterator * CFSMailClient::ListMessages(class TFSMailMsgId, class TFSMailMsgId, enum TFSMailDetails, class RArray<class TFSMailSortCriteria> const &)
+ ?UnsubscribeMailboxEvents@CFSMailClient@@QAEXVTFSMailMsgId@@AAVMFSMailEventObserver@@@Z @ 25 NONAME ; void CFSMailClient::UnsubscribeMailboxEvents(class TFSMailMsgId, class MFSMailEventObserver &)
+ ?CancelAllL@CFSMailClient@@QAEXXZ @ 26 NONAME ; void CFSMailClient::CancelAllL(void)
+ ?GetMailBoxByUidLC@CFSMailClient@@QAEPAVCFSMailBox@@VTFSMailMsgId@@@Z @ 27 NONAME ; class CFSMailBox * CFSMailClient::GetMailBoxByUidLC(class TFSMailMsgId)
+ ?NewL@CFSMailClient@@SAPAV1@XZ @ 28 NONAME ; class CFSMailClient * CFSMailClient::NewL(void)
+ ?AddObserverL@CFSMailClient@@QAEXAAVMFSMailEventObserver@@@Z @ 29 NONAME ; void CFSMailClient::AddObserverL(class MFSMailEventObserver &)
+ ?IncReferenceCount@CFSMailClient@@QAEHXZ @ 30 NONAME ; int CFSMailClient::IncReferenceCount(void)
--- a/emailservices/emailframework/data/fsmailbrandmanager.rss Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/data/fsmailbrandmanager.rss Fri Jul 23 19:09:50 2010 +0300
@@ -24,9 +24,10 @@
#include <microsoft_brand_graphics.mbg>
#include <ovi_brand_graphics.mbg>
#include <aol_brand_graphics.mbg>
+#include <mail_for_exchange_brand_graphics.mbg>
-#include "MailBrandManager.hrh"
-#include "MailBrandManager.rh"
+#include "mailbrandmanager.hrh"
+#include "mailbrandmanager.rh"
// ---------------------------------------------------------
//
@@ -101,46 +102,82 @@
brand_id_match_strings =
{
- BRAND_MATCH_STRING { text = "*ymail.com"; },
- BRAND_MATCH_STRING { text = "*kimo.com"; },
- BRAND_MATCH_STRING { text = "*geocities.com"; },
- BRAND_MATCH_STRING { text = "*rocketmail.com"; },
- BRAND_MATCH_STRING { text = "*wans.net"; },
- BRAND_MATCH_STRING { text = "*wans.net"; },
- BRAND_MATCH_STRING { text = "*yahoo.ca"; },
- BRAND_MATCH_STRING { text = "*yahoo.cn"; },
- BRAND_MATCH_STRING { text = "*yahoo.co.in"; },
- BRAND_MATCH_STRING { text = "*yahoo.in"; },
- BRAND_MATCH_STRING { text = "*yahoo.co.kr"; },
- BRAND_MATCH_STRING { text = "*yahoo.co.uk"; },
- BRAND_MATCH_STRING { text = "*yahoo.com"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.ar"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.br"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.cn"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.hk"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.mx"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.sg"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.tw"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.my"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.vn"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.ph"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.tr"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.co"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.pe"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.ve"; },
- BRAND_MATCH_STRING { text = "*yahoo.de"; },
- BRAND_MATCH_STRING { text = "*yahoo.dk"; },
- BRAND_MATCH_STRING { text = "*yahoo.es"; },
- BRAND_MATCH_STRING { text = "*yahoo.fr"; },
- BRAND_MATCH_STRING { text = "*yahoo.gr"; },
- BRAND_MATCH_STRING { text = "*yahoo.ie"; },
- BRAND_MATCH_STRING { text = "*yahoo.it"; },
- BRAND_MATCH_STRING { text = "*yahoo.no"; },
- BRAND_MATCH_STRING { text = "*yahoo.se"; },
- BRAND_MATCH_STRING { text = "*yahoo.co.id"; },
- BRAND_MATCH_STRING { text = "*yahoo.co.th"; },
- BRAND_MATCH_STRING { text = "*yahoo.pl"; },
- BRAND_MATCH_STRING { text = "*yahoo.cl"; }
+ BRAND_MATCH_STRING { text = "*.ymail.com"; },
+ BRAND_MATCH_STRING { text = "ymail.com"; },
+ BRAND_MATCH_STRING { text = "*.kimo.com"; },
+ BRAND_MATCH_STRING { text = "kimo.com"; },
+ BRAND_MATCH_STRING { text = "*.geocities.com"; },
+ BRAND_MATCH_STRING { text = "geocities.com"; },
+ BRAND_MATCH_STRING { text = "*.rocketmail.com"; },
+ BRAND_MATCH_STRING { text = "rocketmail.com"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.ca"; },
+ BRAND_MATCH_STRING { text = "yahoo.ca"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.cn"; },
+ BRAND_MATCH_STRING { text = "yahoo.cn"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.co.in"; },
+ BRAND_MATCH_STRING { text = "yahoo.co.in"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.in"; },
+ BRAND_MATCH_STRING { text = "yahoo.in"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.co.kr"; },
+ BRAND_MATCH_STRING { text = "yahoo.co.kr"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.co.uk"; },
+ BRAND_MATCH_STRING { text = "yahoo.co.uk"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com"; },
+ BRAND_MATCH_STRING { text = "yahoo.com"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.ar"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.ar"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.br"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.br"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.cn"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.cn"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.hk"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.hk"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.mx"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.mx"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.sg"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.sg"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.tw"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.tw"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.my"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.my"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.vn"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.vn"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.ph"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.ph"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.tr"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.tr"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.co"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.co"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.pe"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.pe"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.ve"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.ve"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.de"; },
+ BRAND_MATCH_STRING { text = "yahoo.de"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.dk"; },
+ BRAND_MATCH_STRING { text = "yahoo.dk"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.es"; },
+ BRAND_MATCH_STRING { text = "yahoo.es"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.fr"; },
+ BRAND_MATCH_STRING { text = "yahoo.fr"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.gr"; },
+ BRAND_MATCH_STRING { text = "yahoo.gr"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.ie"; },
+ BRAND_MATCH_STRING { text = "yahoo.ie"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.it"; },
+ BRAND_MATCH_STRING { text = "yahoo.it"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.no"; },
+ BRAND_MATCH_STRING { text = "yahoo.no"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.se"; },
+ BRAND_MATCH_STRING { text = "yahoo.se"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.co.id"; },
+ BRAND_MATCH_STRING { text = "yahoo.co.id"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.co.th"; },
+ BRAND_MATCH_STRING { text = "yahoo.co.th"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.pl"; },
+ BRAND_MATCH_STRING { text = "yahoo.pl"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.cl"; },
+ BRAND_MATCH_STRING { text = "yahoo.cl"; }
};
graphics =
@@ -161,173 +198,6 @@
red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
};
},
-
- BRAND {
- // Definition of Aol Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\aol_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "*aol.com"; },
- BRAND_MATCH_STRING { text = "*aolchina.com"; },
- BRAND_MATCH_STRING { text = "*myaol.jp"; },
- BRAND_MATCH_STRING { text = "*aol.cz"; },
- BRAND_MATCH_STRING { text = "*aol.ch"; },
- BRAND_MATCH_STRING { text = "*aol.be"; },
- BRAND_MATCH_STRING { text = "*aol.co.nz"; },
- BRAND_MATCH_STRING { text = "*aol.cl"; },
- BRAND_MATCH_STRING { text = "*aol.kr"; },
- BRAND_MATCH_STRING { text = "*aol.co.uk"; },
- BRAND_MATCH_STRING { text = "*aol.ru"; },
- BRAND_MATCH_STRING { text = "*aol.com.au"; },
- BRAND_MATCH_STRING { text = "*aol.com.ar"; },
- BRAND_MATCH_STRING { text = "*aol.com.co"; },
- BRAND_MATCH_STRING { text = "*aol.com.ve"; },
- BRAND_MATCH_STRING { text = "*aol.com.mx"; },
- BRAND_MATCH_STRING { text = "*aol.com.tr"; },
- BRAND_MATCH_STRING { text = "*aol.com.br"; },
- BRAND_MATCH_STRING { text = "*aol.de"; },
- BRAND_MATCH_STRING { text = "*aol.nl"; },
- BRAND_MATCH_STRING { text = "*aol.es"; },
- BRAND_MATCH_STRING { text = "*aol.fr"; },
- BRAND_MATCH_STRING { text = "*aol.dk"; },
- BRAND_MATCH_STRING { text = "*aol.at"; },
- BRAND_MATCH_STRING { text = "*aol.it"; },
- BRAND_MATCH_STRING { text = "*aol.hk"; },
- BRAND_MATCH_STRING { text = "*aol.se"; },
- BRAND_MATCH_STRING { text = "*aol.tw"; },
- BRAND_MATCH_STRING { text = "*aol.jp"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmAol_brand_graphicsAol;
- mask_id = EMbmAol_brand_graphicsAol_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "AOL Mail"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
-
- BRAND {
- // Definition of Aol Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\aol_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "*aim.com"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmAol_brand_graphicsAol;
- mask_id = EMbmAol_brand_graphicsAol_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "AIM Mail"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
-
- BRAND {
- // Definition of Aol Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\aol_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "*aol.pl"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmAol_brand_graphicsAol;
- mask_id = EMbmAol_brand_graphicsAol_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "AOL Poczta"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
- BRAND {
- // Definition of Aol Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\aol_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "*aol.no"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmAol_brand_graphicsAol;
- mask_id = EMbmAol_brand_graphicsAol_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "AOL epost"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
-
- BRAND {
- // Definition of Aol Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\aol_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "*aol.fi"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmAol_brand_graphicsAol;
- mask_id = EMbmAol_brand_graphicsAol_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "AOL Sähköposti"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
BRAND {
// Definition of Yahoo!7 Mail brand
@@ -335,8 +205,10 @@
brand_id_match_strings =
{
- BRAND_MATCH_STRING { text = "*y7mail.com"; },
- BRAND_MATCH_STRING { text = "*yahoo.com.au"; }
+ BRAND_MATCH_STRING { text = "*.y7mail.com"; },
+ BRAND_MATCH_STRING { text = "y7mail.com"; },
+ BRAND_MATCH_STRING { text = "*.yahoo.com.au"; },
+ BRAND_MATCH_STRING { text = "yahoo.com.au"; }
};
graphics =
@@ -357,132 +229,7 @@
red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
};
},
-
- BRAND {
- // Definition of ... Yahoo! Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\yahoo_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "ameritech.net"; },
- BRAND_MATCH_STRING { text = "flash.net"; },
- BRAND_MATCH_STRING { text = "nvbell.net"; },
- BRAND_MATCH_STRING { text = "pacbell.net"; },
- BRAND_MATCH_STRING { text = "prodigy.net"; },
- BRAND_MATCH_STRING { text = "sbcglobal.net"; },
- BRAND_MATCH_STRING { text = "bellsouth.net"; },
- BRAND_MATCH_STRING { text = "snet.net"; },
- BRAND_MATCH_STRING { text = "swbell.net"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmYahoo_brand_graphicsYahoo;
- mask_id = EMbmYahoo_brand_graphicsYahoo_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "AT&T Yahoo! Mail"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
-
- BRAND {
- // Definition of BT Yahoo! Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\yahoo_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "btinternet.com"; },
- BRAND_MATCH_STRING { text = "btopenworld.com"; },
- BRAND_MATCH_STRING { text = "talk21.com"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmYahoo_brand_graphicsYahoo;
- mask_id = EMbmYahoo_brand_graphicsYahoo_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "BT Yahoo! Mail"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
-
- BRAND {
- // Definition of ... Yahoo! Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\yahoo_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "ort.rogers.com"; },
- BRAND_MATCH_STRING { text = "nl.rogers.com"; },
- BRAND_MATCH_STRING { text = "rogers.com"; },
- BRAND_MATCH_STRING { text = "uat.rogers.com"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmYahoo_brand_graphicsYahoo;
- mask_id = EMbmYahoo_brand_graphicsYahoo_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "Rogers Yahoo! Mail"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
-
- BRAND {
- // Definition of Verizon Yahoo! Mail brand
- graphics_file_path = APP_BITMAP_DIR"\\yahoo_brand_graphics.mif";
-
- brand_id_match_strings =
- {
- BRAND_MATCH_STRING { text = "verizon.net"; }
- };
-
- graphics =
- {
- BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
- icon_id = EMbmYahoo_brand_graphicsYahoo;
- mask_id = EMbmYahoo_brand_graphicsYahoo_mask; }
- };
-
- texts =
- {
- BRANDABLE_TEXT { id = EFSMailboxName; text = "Verizon Yahoo! Mail"; }
- };
-
- colors =
- {
- BRANDABLE_COLOR { id = EFSMailboxNameColor;
- red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
- };
- },
-
+
BRAND {
// Definition of Yahoo!Xtra Mail brand
graphics_file_path = APP_BITMAP_DIR"\\yahoo_brand_graphics.mif";
@@ -517,54 +264,98 @@
brand_id_match_strings =
{
- BRAND_MATCH_STRING { text = "*msn.com"; },
- BRAND_MATCH_STRING { text = "*hotmail.com"; },
- BRAND_MATCH_STRING { text = "*hotmail.co.uk"; },
- BRAND_MATCH_STRING { text = "*hotmail.co.jp"; },
- BRAND_MATCH_STRING { text = "*hotmail-int.com"; },
- BRAND_MATCH_STRING { text = "*hotmail.de"; },
- BRAND_MATCH_STRING { text = "*hotmail.fr"; },
- BRAND_MATCH_STRING { text = "*hotmail.it"; },
- BRAND_MATCH_STRING { text = "*hotmail.nl"; },
- BRAND_MATCH_STRING { text = "*hotmail.es"; },
- BRAND_MATCH_STRING { text = "*live.com"; },
- BRAND_MATCH_STRING { text = "*live.at"; },
- BRAND_MATCH_STRING { text = "*live.be"; },
- BRAND_MATCH_STRING { text = "*live.ca"; },
- BRAND_MATCH_STRING { text = "*live.cl"; },
- BRAND_MATCH_STRING { text = "*live.cn"; },
- BRAND_MATCH_STRING { text = "*live.de"; },
- BRAND_MATCH_STRING { text = "*live.dk"; },
- BRAND_MATCH_STRING { text = "*live.fr"; },
- BRAND_MATCH_STRING { text = "*live.hk"; },
- BRAND_MATCH_STRING { text = "*live.it"; },
- BRAND_MATCH_STRING { text = "*live.jp"; },
- BRAND_MATCH_STRING { text = "*live.nl"; },
- BRAND_MATCH_STRING { text = "*live.no"; },
- BRAND_MATCH_STRING { text = "*live.ph"; },
- BRAND_MATCH_STRING { text = "*live.ru"; },
- BRAND_MATCH_STRING { text = "*live.se"; },
- BRAND_MATCH_STRING { text = "*live.ie"; },
- BRAND_MATCH_STRING { text = "*live.in"; },
- BRAND_MATCH_STRING { text = "*live.co.kr"; },
- BRAND_MATCH_STRING { text = "*live.co.uk"; },
- BRAND_MATCH_STRING { text = "*live.co.za"; },
- BRAND_MATCH_STRING { text = "*live.com.ar"; },
- BRAND_MATCH_STRING { text = "*live.com.au"; },
- BRAND_MATCH_STRING { text = "*live.com.mx"; },
- BRAND_MATCH_STRING { text = "*live.com.my"; },
- BRAND_MATCH_STRING { text = "*live.com.pe"; },
- BRAND_MATCH_STRING { text = "*live.com.pk"; },
- BRAND_MATCH_STRING { text = "*live.com.pt"; },
- BRAND_MATCH_STRING { text = "*live.com.sg"; },
- BRAND_MATCH_STRING { text = "*live.com.ve"; },
- BRAND_MATCH_STRING { text = "*live.com.ph"; },
- BRAND_MATCH_STRING { text = "*livemail.com.br"; },
- BRAND_MATCH_STRING { text = "*livemail.tw"; },
- BRAND_MATCH_STRING { text = "*mibli.com"; },
- BRAND_MATCH_STRING { text = "*oxicash.in"; },
- BRAND_MATCH_STRING { text = "*windowslive.com"; },
- BRAND_MATCH_STRING { text = "*windowslive.es"; }
+ BRAND_MATCH_STRING { text = "*.msn.com"; },
+ BRAND_MATCH_STRING { text = "msn.com"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.com"; },
+ BRAND_MATCH_STRING { text = "hotmail.com"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.co.uk"; },
+ BRAND_MATCH_STRING { text = "hotmail.co.uk"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.co.jp"; },
+ BRAND_MATCH_STRING { text = "hotmail.co.jp"; },
+ BRAND_MATCH_STRING { text = "*.hotmail-int.com"; },
+ BRAND_MATCH_STRING { text = "hotmail-int.com"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.de"; },
+ BRAND_MATCH_STRING { text = "hotmail.de"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.fr"; },
+ BRAND_MATCH_STRING { text = "hotmail.fr"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.it"; },
+ BRAND_MATCH_STRING { text = "hotmail.it"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.nl"; },
+ BRAND_MATCH_STRING { text = "hotmail.nl"; },
+ BRAND_MATCH_STRING { text = "*.hotmail.es"; },
+ BRAND_MATCH_STRING { text = "hotmail.es"; },
+ BRAND_MATCH_STRING { text = "*.live.com"; },
+ BRAND_MATCH_STRING { text = "live.com"; },
+ BRAND_MATCH_STRING { text = "*.live.at"; },
+ BRAND_MATCH_STRING { text = "live.at"; },
+ BRAND_MATCH_STRING { text = "*.live.be"; },
+ BRAND_MATCH_STRING { text = "live.be"; },
+ BRAND_MATCH_STRING { text = "*.live.ca"; },
+ BRAND_MATCH_STRING { text = "live.ca"; },
+ BRAND_MATCH_STRING { text = "*.live.cl"; },
+ BRAND_MATCH_STRING { text = "live.cl"; },
+ BRAND_MATCH_STRING { text = "*.live.cn"; },
+ BRAND_MATCH_STRING { text = "live.cn"; },
+ BRAND_MATCH_STRING { text = "*.live.de"; },
+ BRAND_MATCH_STRING { text = "live.de"; },
+ BRAND_MATCH_STRING { text = "*.live.dk"; },
+ BRAND_MATCH_STRING { text = "live.dk"; },
+ BRAND_MATCH_STRING { text = "*.live.fr"; },
+ BRAND_MATCH_STRING { text = "live.fr"; },
+ BRAND_MATCH_STRING { text = "*.live.hk"; },
+ BRAND_MATCH_STRING { text = "live.hk"; },
+ BRAND_MATCH_STRING { text = "*.live.it"; },
+ BRAND_MATCH_STRING { text = "live.it"; },
+ BRAND_MATCH_STRING { text = "*.live.jp"; },
+ BRAND_MATCH_STRING { text = "live.jp"; },
+ BRAND_MATCH_STRING { text = "*.live.nl"; },
+ BRAND_MATCH_STRING { text = "live.nl"; },
+ BRAND_MATCH_STRING { text = "*.live.no"; },
+ BRAND_MATCH_STRING { text = "live.no"; },
+ BRAND_MATCH_STRING { text = "*.live.ph"; },
+ BRAND_MATCH_STRING { text = "live.ph"; },
+ BRAND_MATCH_STRING { text = "*.live.ru"; },
+ BRAND_MATCH_STRING { text = "live.ru"; },
+ BRAND_MATCH_STRING { text = "*.live.se"; },
+ BRAND_MATCH_STRING { text = "live.se"; },
+ BRAND_MATCH_STRING { text = "*.live.ie"; },
+ BRAND_MATCH_STRING { text = "live.ie"; },
+ BRAND_MATCH_STRING { text = "*.live.in"; },
+ BRAND_MATCH_STRING { text = "live.in"; },
+ BRAND_MATCH_STRING { text = "*.live.co.kr"; },
+ BRAND_MATCH_STRING { text = "live.co.kr"; },
+ BRAND_MATCH_STRING { text = "*.live.co.uk"; },
+ BRAND_MATCH_STRING { text = "live.co.uk"; },
+ BRAND_MATCH_STRING { text = "*.live.co.za"; },
+ BRAND_MATCH_STRING { text = "live.co.za"; },
+ BRAND_MATCH_STRING { text = "*.live.com.ar"; },
+ BRAND_MATCH_STRING { text = "live.com.ar"; },
+ BRAND_MATCH_STRING { text = "*.live.com.au"; },
+ BRAND_MATCH_STRING { text = "live.com.au"; },
+ BRAND_MATCH_STRING { text = "*.live.com.mx"; },
+ BRAND_MATCH_STRING { text = "live.com.mx"; },
+ BRAND_MATCH_STRING { text = "*.live.com.my"; },
+ BRAND_MATCH_STRING { text = "live.com.my"; },
+ BRAND_MATCH_STRING { text = "*.live.com.pe"; },
+ BRAND_MATCH_STRING { text = "live.com.pe"; },
+ BRAND_MATCH_STRING { text = "*.live.com.pk"; },
+ BRAND_MATCH_STRING { text = "live.com.pk"; },
+ BRAND_MATCH_STRING { text = "*.live.com.pt"; },
+ BRAND_MATCH_STRING { text = "live.com.pt"; },
+ BRAND_MATCH_STRING { text = "*.live.com.sg"; },
+ BRAND_MATCH_STRING { text = "live.com.sg"; },
+ BRAND_MATCH_STRING { text = "*.live.com.ve"; },
+ BRAND_MATCH_STRING { text = "live.com.ve"; },
+ BRAND_MATCH_STRING { text = "*.live.com.ph"; },
+ BRAND_MATCH_STRING { text = "live.com.ph"; },
+ BRAND_MATCH_STRING { text = "*.livemail.com.br"; },
+ BRAND_MATCH_STRING { text = "livemail.com.br"; },
+ BRAND_MATCH_STRING { text = "*.livemail.tw"; },
+ BRAND_MATCH_STRING { text = "livemail.tw"; },
+ BRAND_MATCH_STRING { text = "*.windowslive.com"; },
+ BRAND_MATCH_STRING { text = "windowslive.com"; },
+ BRAND_MATCH_STRING { text = "*.windowslive.es"; },
+ BRAND_MATCH_STRING { text = "windowslive.es"; }
};
graphics =
@@ -591,7 +382,8 @@
brand_id_match_strings =
{
- BRAND_MATCH_STRING { text = "*ovi.com"; }
+ BRAND_MATCH_STRING { text = "*.ovi.com"; },
+ BRAND_MATCH_STRING { text = "ovi.com"; }
};
graphics =
@@ -610,6 +402,28 @@
{
BRANDABLE_COLOR { id = EFSMailboxNameColor; red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
};
+ },
+
+ BRAND {
+ // definition of Mail for Exchange brand
+ graphics_file_path = APP_BITMAP_DIR"\\mail_for_exchange_brand_graphics.mif";
+
+ brand_id_match_strings =
+ {
+ BRAND_MATCH_STRING { text = "Mail for Exchange"; }
+ };
+
+ graphics =
+ {
+ BRANDABLE_GRAPHIC { id = EFSMailboxIcon;
+ icon_id = EMbmMail_for_exchange_brand_graphicsMail_for_exchange;
+ mask_id = EMbmMail_for_exchange_brand_graphicsMail_for_exchange_mask; }
+ };
+
+ colors =
+ {
+ BRANDABLE_COLOR { id = EFSMailboxNameColor; red = 0xff; green = 0x30; blue = 0x20; alpha = 0xff; }
+ };
}
};
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/emailframework/data/mail_for_exchange.svg Fri Jul 23 19:09:50 2010 +0300
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="88" height="88" viewBox="0 0 88 88">
+<rect fill="none" height="88" width="88"/>
+<polygon fill="#84A8CB" points="13.797,59.469 15.453,62.75 10.761,64.775 "/>
+<polygon fill="#7BA1C7" points="62.822,60.844 67.454,57.852 79.166,59.672 74.484,64.297 "/>
+<polygon fill="#7BA1C7" points="10.021,49.15 15.95,47.283 28.258,50.204 22.063,53.797 "/>
+<polygon fill="#9BB8D5" points="11.714,59.057 10.761,64.775 10.021,49.15 11.435,53.034 "/>
+<linearGradient id="_11" gradientUnits="userSpaceOnUse" x1="72.77" y1="62.84" x2="72.14" y2="80.04">
+<stop stop-color="#97B5D3" offset="0"/>
+<stop stop-color="#7EA4C9" offset="1"/>
+</linearGradient>
+<path d="M79.166,59.672c-2.936,9.025-9.674,13.959-13.182,16.893l8.62-13.314L79.166,59.672z" fill="url(#_11)"/>
+<polygon fill="#7BA1C7" points="12.876,56.288 14.328,60.688 10.761,64.775 11.203,58 "/>
+<polygon fill="#7BA1C7" points="15.25,54 23.313,51.859 18.859,56.875 13.844,55.891 "/>
+<polygon fill="#84A7CB" points="22.529,52.333 28.258,50.204 24.414,53.982 18.668,56.223 "/>
+<linearGradient id="_12" gradientUnits="userSpaceOnUse" x1="30.28" y1="61.64" x2="43.78" y2="69.31">
+<stop stop-color="#A0BBD7" offset="0"/>
+<stop stop-color="#7EA4C9" offset="1"/>
+</linearGradient>
+<path d="M48.67,70.793c3.58,0,6.643-0.996,8.811-2.109c-4.15,4.209-9.992,5.7-13.953,5.7 c-13.027,0-22.402-12.509-24.75-18.286l5.745-2.24C31.158,65.936,40.203,70.793,48.67,70.793z" fill="url(#_12)"/>
+<polygon fill="#90B0D0" points="11,53.781 10.021,49.15 22.529,52.333 14.453,54.641 "/>
+<polygon fill="#91B1D1" points="63.875,66.016 62.822,60.844 75.003,62.926 68.781,66.984 "/>
+<linearGradient id="_13" gradientUnits="userSpaceOnUse" x1="22.31" y1="65.7" x2="44.83" y2="68.75">
+<stop stop-color="#DDE7F1" offset="0"/>
+<stop stop-color="#C2D4E5" offset="1"/>
+</linearGradient>
+<path d="M62.822,60.844c-2.621,6.602-9.156,13.252-19.223,13.252 c-10.282,0-19.287-7.408-24.821-17.998l-5.184-0.488C15.917,59.743,25.484,78.7,43.75,78.7c13.297,0,19.408-9.746,20.422-12.669 L62.822,60.844z" fill="url(#_13)"/>
+<linearGradient id="_14" gradientUnits="userSpaceOnUse" x1="69.5" y1="70.31" x2="15.38" y2="70.31">
+<stop stop-color="#A8C1DA" offset="0"/>
+<stop stop-color="#98B6D4" offset="0.14"/>
+<stop stop-color="#97B5D3" offset="0.67"/>
+<stop stop-color="#A0BBD7" offset="1"/>
+</linearGradient>
+<path d="M75.003,62.926c-4.901,13.627-16.201,20.838-27.737,20.838 c-17.267,0-28.895-15-33.075-22.945l-1.535-3.959c8.831,15.174,18.64,24.109,32.393,24.109c11.688,0,20.42-6.422,23.295-14.047 L75.003,62.926z" fill="url(#_14)"/>
+<path d="M10.844,53.034l4.701,1.284l-1.294,1.35c3.103,5.018,11.175,22.555,30.467,22.555 c8.979,0,16.841-6.492,19.351-12.586l4.85,0.922c-3.79,10.387-15.307,14.918-23.868,14.918c-15.613,0-25.775-12.442-32.281-24.39 l-1.644,1.968L10.844,53.034z" fill="#98B6D4"/>
+<linearGradient id="_15" gradientUnits="userSpaceOnUse" x1="43.19" y1="24.29" x2="54.76" y2="58.04">
+<stop stop-color="#87AACD" offset="0"/>
+<stop stop-color="#9DB9D6" offset="0.17"/>
+<stop stop-color="#A8C1DA" offset="0.5"/>
+<stop stop-color="#A2BDD8" offset="0.76"/>
+<stop stop-color="#87AACD" offset="1"/>
+</linearGradient>
+<path d="M58.648,44.975c0,6.789-2.688,10.896-5.711,13.146c-1.797,1.335-5.822,3.345-5.822,3.345 c12.443-9.374,5.458-34.56-12.553-34.823c3.625-0.734,5.781-1.129,7.201-1.129C51.613,25.512,58.648,36.182,58.648,44.975z" fill="url(#_15)"/>
+<path d="M49.459,47.875c0,6.898-3.8,13.334-11.084,13.334c-4.325,0-14.333-5.535-14.333-18.709 c0-7.689,5.275-12.375,10.792-12.375C43.271,30.125,49.459,39.787,49.459,47.875z" fill="#98B6D4"/>
+<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="47.25" y1="34.33" x2="32.25" y2="52.33">
+<stop stop-color="#DDE7F1" offset="0"/>
+<stop stop-color="#97B5D3" offset="1"/>
+</linearGradient>
+<path d="M49.25,47.875c0,6.898-3.633,12.917-10.917,12.917c-4.325,0-14.125-5.076-14.125-18.25 c0-7.689,5.109-12.125,10.625-12.125C41.978,30.417,49.25,38.554,49.25,47.875z M35.875,26.542c-6.564,0-12.75,5.983-12.75,15.625 c0,9.617,7.249,21.167,17.708,21.167c4.284,0,12.708-3.243,12.708-15.834C53.542,35.913,44.502,26.542,35.875,26.542z" fill="url(#_16)"/>
+<path d="M46.318,46.104c0,4.533-2.313,6.504-4.754,6.504c-0.954-0.016-2.277-0.233-3.086-1.102 c-0.129,0.041-0.56,0.102-0.693,0.102c-3.618,0-5.7-4.024-5.7-7.065c0.001-1.983,1.022-4.791,3.8-4.798 c1.886,0,3.457,1.442,4.319,2.572c0.137,0.18,0.258,0.379,0.26,0.566c0.002,0.21,0.068,5.999,0.072,6.243 c0.002,0.221,0.644,0.26,0.713,0.262c1.188,0,2.484-1.259,2.524-3.605c0-4.724-4.501-9.12-8.524-9.083 c-3.271,0.03-5.488,3.223-5.509,7.067c-0.023,3.882,2.681,10.765,9.667,11.157c0.005,0.777,0.028,2.767,0.03,2.938 c-8.344-0.688-12.106-9.104-12.106-14.776c0.01-5.028,2.711-9.441,7.336-9.441C40.878,33.642,46.318,40.912,46.318,46.104z M38.082,43.448c-0.445-0.491-1.098-0.779-1.707-0.779c-1.438,0-1.866,1.331-1.866,2.269c0,2.203,1.426,3.826,3.068,3.826 c0.29,0,0.566-0.062,0.563-0.277C38.141,48.486,38.127,43.552,38.082,43.448z" fill="#4879AA"/>
+<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="23.68" y1="31.81" x2="28.74" y2="16.09">
+<stop stop-color="#97B5D3" offset="0"/>
+<stop stop-color="#7EA4C9" offset="1"/>
+</linearGradient>
+<path d="M21.841,31.093c1.517-7.152,7.593-14.731,15.543-16.523 c-12.223-1.207-19.357,8.29-21.665,16.711c0,0,0.073,1.031,0.073,1.03L21.841,31.093z" fill="url(#_17)"/>
+<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="46.98" y1="6.55" x2="62.61" y2="15.12">
+<stop stop-color="#8FB0D0" offset="0"/>
+<stop stop-color="#A0BBD7" offset="1"/>
+</linearGradient>
+<path d="M72.594,20.86C58.841,1.271,42.613,3.297,37.359,3.297 c11.892,0.92,21.475,5.828,32.032,20.813L72.594,20.86z" fill="url(#_18)"/>
+<linearGradient id="_19" gradientUnits="userSpaceOnUse" x1="69.16" y1="22.16" x2="24.08" y2="17.66">
+<stop stop-color="#DDE7F1" offset="0"/>
+<stop stop-color="#C2D4E5" offset="1"/>
+</linearGradient>
+<path d="M67.594,31.625C57.518,15.184,46.482,7.656,35.022,7.656 c-12.503,0-23.295,10.224-25.272,22.031l-1.426,2.146c2.287-17.459,15.323-28.53,27.877-28.53c14.976,0,25.434,8.804,33.017,20.477 L67.594,31.625z" fill="url(#_19)"/>
+<polygon fill="#85A8CC" points="76.529,16.32 68.609,35.047 61.375,33.172 54.84,36.833 73.666,39.793 78.023,37.797 80.902,15.665 "/>
+<polygon fill="#7CA2C8" points="69.531,27.641 76.529,16.32 73.666,39.793 69.084,35.577 "/>
+<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="12.53" y1="22" x2="64.94" y2="22">
+<stop stop-color="#A8C1DA" offset="0"/>
+<stop stop-color="#98B6D4" offset="0.14"/>
+<stop stop-color="#97B5D3" offset="0.67"/>
+<stop stop-color="#A0BBD7" offset="1"/>
+</linearGradient>
+<path d="M15.792,32.312c2.844-11.856,11.524-17.781,19.958-17.781 c12.076,0,18.857,7.519,25.261,17.316l4.885,1.809C58.951,22.865,49.361,10.346,35.05,10.346c-11.049,0-20.77,8.923-22.987,19.171 L15.792,32.312z" fill="url(#_20)"/>
+<polygon fill="#82A6CA" points="12.422,29.234 15.792,32.312 8.325,31.834 9.578,29.063 "/>
+<path d="M69.169,23.729l-1.745,6.592c-4.197-6.592-14.98-23.219-32.395-23.219 c-15.737,0-25.085,15.032-25.526,22.091l3.059,0.151c0.745-5.328,7.952-18.523,22.528-18.523c16.141,0,25.055,15.369,29.51,21.796 l-3.828-1.145l-5.933,5.361l7.396-2.13l6.961,0.985l0.897-7.997l6.437-11.371L69.169,23.729z" fill="#98B6D4"/>
+</svg>
\ No newline at end of file
--- a/emailservices/emailframework/eabi/fsmailframeworku.def Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/eabi/fsmailframeworku.def Fri Jul 23 19:09:50 2010 +0300
@@ -14,19 +14,21 @@
_ZN13CFSMailClient16GetMailBoxByUidLE12TFSMailMsgId @ 13 NONAME
_ZN13CFSMailClient16GetMessageByUidLE12TFSMailMsgIdS0_S0_14TFSMailDetails @ 14 NONAME
_ZN13CFSMailClient16ReleaseExtensionEP15CEmailExtension @ 15 NONAME
- _ZN13CFSMailClient17IncReferenceCountEv @ 16 NONAME
- _ZN13CFSMailClient19DeleteMailBoxByUidLE12TFSMailMsgIdR22MFSMailRequestObserver @ 17 NONAME
- _ZN13CFSMailClient20DeleteMessagesByUidLE12TFSMailMsgIdS0_RK6RArrayIS0_E @ 18 NONAME
- _ZN13CFSMailClient20WizardDataAvailableLEv @ 19 NONAME
- _ZN13CFSMailClient23SubscribeMailboxEventsLE12TFSMailMsgIdR20MFSMailEventObserver @ 20 NONAME
- _ZN13CFSMailClient24UnsubscribeMailboxEventsE12TFSMailMsgIdR20MFSMailEventObserver @ 21 NONAME
- _ZN13CFSMailClient25UnregisterRequestObserverEi @ 22 NONAME
- _ZN13CFSMailClient4NewLEi @ 23 NONAME
- _ZN13CFSMailClient4NewLEv @ 24 NONAME
- _ZN13CFSMailClient5CloseEv @ 25 NONAME
- _ZN13CFSMailClient5NewLCEi @ 26 NONAME
- _ZN13CFSMailClient7CancelLEi @ 27 NONAME
- _ZN13CFSMailClientD0Ev @ 28 NONAME
- _ZN13CFSMailClientD1Ev @ 29 NONAME
- _ZN13CFSMailClientD2Ev @ 30 NONAME
+ _ZN13CFSMailClient17GetMailBoxByUidLCE12TFSMailMsgId @ 16 NONAME
+ _ZN13CFSMailClient17IncReferenceCountEv @ 17 NONAME
+ _ZN13CFSMailClient19DeleteMailBoxByUidLE12TFSMailMsgIdR22MFSMailRequestObserver @ 18 NONAME
+ _ZN13CFSMailClient20DeleteMessagesByUidLE12TFSMailMsgIdS0_RK6RArrayIS0_E @ 19 NONAME
+ _ZN13CFSMailClient20WizardDataAvailableLEv @ 20 NONAME
+ _ZN13CFSMailClient21PrepareMrDescriptionLERK12TFSMailMsgIdS2_ @ 21 NONAME
+ _ZN13CFSMailClient23SubscribeMailboxEventsLE12TFSMailMsgIdR20MFSMailEventObserver @ 22 NONAME
+ _ZN13CFSMailClient24UnsubscribeMailboxEventsE12TFSMailMsgIdR20MFSMailEventObserver @ 23 NONAME
+ _ZN13CFSMailClient25UnregisterRequestObserverEi @ 24 NONAME
+ _ZN13CFSMailClient4NewLEi @ 25 NONAME
+ _ZN13CFSMailClient4NewLEv @ 26 NONAME
+ _ZN13CFSMailClient5CloseEv @ 27 NONAME
+ _ZN13CFSMailClient5NewLCEi @ 28 NONAME
+ _ZN13CFSMailClient7CancelLEi @ 29 NONAME
+ _ZN13CFSMailClientD0Ev @ 30 NONAME
+ _ZN13CFSMailClientD1Ev @ 31 NONAME
+ _ZN13CFSMailClientD2Ev @ 32 NONAME
--- a/emailservices/emailframework/emailframework.pro Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/emailframework.pro Fri Jul 23 19:09:50 2010 +0300
@@ -134,6 +134,12 @@
"OPTION HEADERFILE yahoo_brand_graphics.mbg" \
"OPTION SOURCEDIR data" \
"OPTION SOURCES -c16,8 yahoo.svg" \
+ "END" \
+ "START EXTENSION s60/mifconv" \
+ "OPTION TARGETFILE mail_for_exchange_brand_graphics.mif" \
+ "OPTION HEADERFILE mail_for_exchange_brand_graphics.mbg" \
+ "OPTION SOURCEDIR data" \
+ "OPTION SOURCES -c16,8 mail_for_exchange.svg" \
"END"
}
--- a/emailservices/emailframework/inc/CFSMailClient.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/inc/CFSMailClient.h Fri Jul 23 19:09:50 2010 +0300
@@ -213,10 +213,27 @@
* returns email mailbox object related to given mailbox id
*
* @param aMailBoxId mailbox id
- * @return mailbox object ( CFSMailBox ), ownership is transferred to user
+ * @return mailbox object ( CFSMailBox )
+ * or NULL if no matching mailbox found.
+ * Ownership is transferred to user!
*/
IMPORT_C CFSMailBox* GetMailBoxByUidL( const TFSMailMsgId aMailBoxId);
-
+
+
+ /**
+ * returns email mailbox object related to given mailbox id. Otherwise
+ * identical to GetMailBoxByUidL but mailbox object is stored to cleanup
+ * stack.
+ *
+ * @param aMailBoxId mailbox id
+ * @return mailbox object ( CFSMailBox )
+ * or NULL if no matching mailbox found.
+ * CFSMailBox pointer is stored to cleanup stack (even if NULL).
+ * Ownership is transferred to user!
+ */
+ IMPORT_C CFSMailBox* GetMailBoxByUidLC( const TFSMailMsgId aMailBoxId);
+
+
/**
* returns email folder object related to given folder id
*
@@ -374,6 +391,7 @@
*/
IMPORT_C void SetMailboxName( const TFSMailMsgId aMailboxId, const TDesC& aMailboxName );
+
//<qmail>
/**
* increments reference count to framework singleton
@@ -381,7 +399,16 @@
*/
IMPORT_C TInt IncReferenceCount();
//</qmail>
-
+
+
+ /**
+ * Prepares and sets the MR description by converting HTML body to Plain text
+ *
+ * @param aMailboxId mailbox id
+ * @param aMessageId message id
+ */
+ IMPORT_C virtual void PrepareMrDescriptionL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aMessageId );
public: // from CExtendableEmail
/**
--- a/emailservices/emailframework/inc/CFSMailPlugin.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/inc/CFSMailPlugin.h Fri Jul 23 19:09:50 2010 +0300
@@ -1200,6 +1200,16 @@
* @param aMailboxName new name for the mailbox
*/
virtual void SetMailboxName(const TFSMailMsgId& aMailboxId, const TDesC& aMailboxName ) = 0;
+
+ /**
+ * Prepares and sets the MR description by converting HTML body to Plain text
+ *
+ * @param aMailboxId mailbox id
+ * @param aMessageId message id
+ */
+ virtual void PrepareMrDescriptionL( const TFSMailMsgId& /*aMailBoxId*/,
+ const TFSMailMsgId& /*aMessageId*/ )
+ { return; };
protected:
--- a/emailservices/emailframework/src/CFSMailBrand.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/src/CFSMailBrand.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -239,16 +239,32 @@
TBool CFSMailBrand::IsMatching( const TDesC& aBrandId )
{
NM_FUNCTION;
-
+ const TChar KStar = '*';
+ TBool ret = EFalse;
+ TInt intRet = 0;
TInt count = iBrandMatchStrings.Count();
- for(TInt i=0;i<count;i++)
+ for( TInt i=0;i<count;i++ )
{
- if ( aBrandId.MatchC( *iBrandMatchStrings[i] ) == KErrNone )
+ TPtrC brandMatchStringPtr = *iBrandMatchStrings[i];
+ TInt matchPos = aBrandId.MatchC( *iBrandMatchStrings[i] );
+ if ( matchPos >= 0 )
{
- return ETrue;
+ TPtrC rightPartPtr = aBrandId.Right( aBrandId.Length()-matchPos );
+ TChar isStar = brandMatchStringPtr[0];
+ TInt cut = 0;
+ if ( isStar == KStar )
+ {
+ cut = 1;
+ }
+ TPtrC matchString = brandMatchStringPtr.Right( brandMatchStringPtr.Length()-cut );
+ intRet = rightPartPtr.CompareC( matchString );
+ if ( intRet == 0 )
+ {
+ ret = ETrue;
+ }
}
}
- return EFalse;
+ return ret;
}
// -----------------------------------------------------------------------------
--- a/emailservices/emailframework/src/CFSMailClient.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailframework/src/CFSMailClient.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -37,24 +37,28 @@
{
NM_FUNCTION;
- CFSMailClient* client = Instance();
- if(!client)
- {
- client = new (ELeave) CFSMailClient();
- CleanupStack:: PushL(client);
- client->ConstructL(aConfiguration);
- TInt err = Dll::SetTls(static_cast<TAny*>(client));
- User::LeaveIfError(err);
- }
- else
- {
- CleanupStack:: PushL(client);
- }
+ CFSMailClient* client = Instance();
+ if( !client )
+ {
+ client = new (ELeave) CFSMailClient();
+ // The new client needs to be deleted rather than closed, up until
+ // the TLS has been set properly.
+ CleanupStack::PushL( client );
+ client->ConstructL( aConfiguration );
+ TInt err = Dll::SetTls( static_cast<TAny*>( client ));
+ User::LeaveIfError( err );
+ // Now that the TLS has been set, we no longer want the new client
+ // to be deleted if there's a problem, so pop it off the cleanup
+ // stack (it will be pushed back on for closing below).
+ CleanupStack::Pop( client );
+ }
- client->IncReferenceCount();
-
- return client;
-
+ // Increment reference count before calling CleanupClosePushL so that
+ // the reference count is correct if CleanupClosePushL leaves.
+ client->IncReferenceCount();
+ CleanupClosePushL( *client );
+
+ return client;
}
// -----------------------------------------------------------------------------
@@ -138,6 +142,19 @@
}
// -----------------------------------------------------------------------------
+// CFSMailClient::GetMailBoxByUidLC
+// -----------------------------------------------------------------------------
+EXPORT_C CFSMailBox* CFSMailClient::GetMailBoxByUidLC(const TFSMailMsgId aMailBoxId)
+{
+ NM_FUNCTION;
+ CFSMailBox* mailBox = GetMailBoxByUidL( aMailBoxId );
+ CleanupStack::PushL( mailBox );
+ return mailBox;
+}
+
+
+
+// -----------------------------------------------------------------------------
// CFSMailClient::GetFolderByUidL
// -----------------------------------------------------------------------------
EXPORT_C CFSMailFolder* CFSMailClient::GetFolderByUidL( const TFSMailMsgId aMailBoxId,
@@ -559,7 +576,23 @@
plugin->SetMailboxName( aMailboxId, aMailboxName );
}
}
-
+
+// -----------------------------------------------------------------------------
+// CFSMailClient::PrepareMrDescriptionL
+// -----------------------------------------------------------------------------
+EXPORT_C void CFSMailClient::PrepareMrDescriptionL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aMessageId )
+ {
+ NM_FUNCTION;
+ // select plugin
+ CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid( aMessageId );
+ if ( plugin )
+ {
+ // set MR description from the plugin
+ plugin->PrepareMrDescriptionL( aMailBoxId, aMessageId );
+ }
+ }
+
// -----------------------------------------------------------------------------
// CFSMailClient::Close
// -----------------------------------------------------------------------------
--- a/emailservices/emailstore/base_plugin/base_plugin.pro Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/base_plugin.pro Fri Jul 23 19:09:50 2010 +0300
@@ -36,8 +36,8 @@
inc/Map.h \
inc/SafePointerArray.h \
inc/Map.inl \
- inc/baseplugindef.h \
- inc/nestedao.h
+ inc/baseplugindef.h
+
SOURCES += src/BaseMrInfoObject.cpp \
src/BasePlugin.cpp \
src/baseplugindelayedops.cpp \
@@ -48,8 +48,7 @@
src/basepluginparts.cpp \
src/baseplugintranslator.cpp \
src/MailIterator.cpp \
- src/basepluginresourceloader.cpp \
- src/nestedao.cpp
+ src/basepluginresourceloader.cpp
LIBS += -leuser \
-lecom \
--- a/emailservices/emailstore/base_plugin/bwins/basepluginu.def Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/bwins/basepluginu.def Fri Jul 23 19:09:50 2010 +0300
@@ -222,4 +222,6 @@
?GetMailboxDisplayNameL@CBasePlugin@@IAEXIAAVRBuf16@@@Z @ 221 NONAME ; void CBasePlugin::GetMailboxDisplayNameL(unsigned int, class RBuf16 &)
?NewChildPartFromFileL@CBasePlugin@@UAEXABVTFSMailMsgId@@000ABVTDesC16@@1AAVMFSMailRequestObserver@@H@Z @ 222 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)
?RemoveChildPartL@CBasePlugin@@UAEXABVTFSMailMsgId@@0000AAVMFSMailRequestObserver@@H@Z @ 223 NONAME ; void CBasePlugin::RemoveChildPartL(class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
+ ?StartOp@CDelayedOp@@QAEXXZ @ 224 NONAME ; void CDelayedOp::StartOp(void)
+ ?DeleteDelayedOpsManager@CBasePlugin@@QAEXXZ @ 225 NONAME ; void CBasePlugin::DeleteDelayedOpsManager(void)
--- a/emailservices/emailstore/base_plugin/eabi/basepluginu.def Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/eabi/basepluginu.def Fri Jul 23 19:09:50 2010 +0300
@@ -309,4 +309,6 @@
_ZThn4_NK21CBaseMrRecurrenceRule4TypeEv @ 308 NONAME
_ZN11CBasePlugin21NewChildPartFromFileLERK12TFSMailMsgIdS2_S2_S2_RK7TDesC16S5_R22MFSMailRequestObserveri @ 309 NONAME
_ZN11CBasePlugin16RemoveChildPartLERK12TFSMailMsgIdS2_S2_S2_S2_R22MFSMailRequestObserveri @ 310 NONAME
+ _ZN10CDelayedOp7StartOpEv @ 311 NONAME
+ _ZN11CBasePlugin23DeleteDelayedOpsManagerEv @ 312 NONAME
--- a/emailservices/emailstore/base_plugin/inc/BasePlugin.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/inc/BasePlugin.h Fri Jul 23 19:09:50 2010 +0300
@@ -109,6 +109,11 @@
// CFSMailPlugin //
public:
+ /**
+ * This methoed must be called before destruction of
+ * CBasePlugin derived class. To fix bug EIZU-7XVF2Z.
+ */
+ void DeleteDelayedOpsManager();
virtual void ListMailBoxesL(
RArray<TFSMailMsgId>& aMailboxes );
--- a/emailservices/emailstore/base_plugin/inc/baseplugincommonutils.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/inc/baseplugincommonutils.h Fri Jul 23 19:09:50 2010 +0300
@@ -49,4 +49,29 @@
CleanupResetAndDestroyClose<T>::PushL(aRef);
}
+/**
+* Cleanup support for owning pointer arrays
+*/
+
+template<class T>
+class CleanupResetAndDestroy
+{
+private:
+ inline static void ResetAndDestroy( TAny *aPtr )
+ {
+ reinterpret_cast<T*>( aPtr )->ResetAndDestroy();
+ };
+public:
+ inline static void PushL( T& aItem )
+ {
+ TCleanupItem item( &CleanupResetAndDestroy::ResetAndDestroy, &aItem );
+ CleanupStack::PushL( item );
+ };
+} ;
+
+template <class T>
+inline void CleanupResetAndDestroyPushL( T& aRef )
+ {
+ CleanupResetAndDestroy<T>::PushL( aRef );
+ }
#endif
--- a/emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h Fri Jul 23 19:09:50 2010 +0300
@@ -71,7 +71,7 @@
* The base class for the delayed operations. All of the delayed operations must
* derive from it.
*/
-class BASEPLUGIN_EXPORT CDelayedOp : public CAsyncOneShot
+class BASEPLUGIN_EXPORT CDelayedOp : public CActive
{
public:
@@ -82,11 +82,12 @@
CBasePlugin& aPlugin,
MDelayedOpsManager& aManager );
+ void StartOp();
/**
* Derived classes must implement their asynchronous processing in this
* method. The GetPlugin method can only be used from within this method.
*/
- virtual void ExecuteOpL() = 0;
+ virtual TBool ExecuteOpL() = 0;
protected:
--- a/emailservices/emailstore/base_plugin/inc/baseplugindelayedopsprivate.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/inc/baseplugindelayedopsprivate.h Fri Jul 23 19:09:50 2010 +0300
@@ -19,7 +19,6 @@
#include "baseplugindelayedops.h"
-#include "nestedao.h"
/**
* Lets the user enqueue and dequeue asynchronous jobs for handling
@@ -70,7 +69,7 @@
/**
*
*/
-NONSHARABLE_CLASS( CDelayedDeleteMessagesOp ) : public CDelayedOp, public MDeletionHandler
+NONSHARABLE_CLASS( CDelayedDeleteMessagesOp ) : public CDelayedOp
{
public:
@@ -88,12 +87,8 @@
virtual ~CDelayedDeleteMessagesOp();
//CDelayedOp::ExecuteOpL
- virtual void ExecuteOpL();
-
- //From MDeletionHandler
- //Used to delete messages in chunks starting from aStartIndex
- TBool DeleteMessagesInChunksL( TInt aStartIndex );
-
+ virtual TBool ExecuteOpL();
+
private:
void ConstructL( const RArray<TFSMailMsgId>& aMessages );
@@ -112,7 +107,7 @@
TMsgStoreId iFolderId;
RArray<TMsgStoreId> iMessages;
TBool iImmediateDelete;
- TState iState;
+ TInt iIndex;
__LOG_DECLARATION
};
@@ -142,7 +137,7 @@
virtual ~CDelayedSetContentOp();
//CDelayedOp::ExecuteOpL
- virtual void ExecuteOpL();
+ virtual TBool ExecuteOpL();
private:
@@ -200,7 +195,7 @@
virtual ~CDelayedMessageStorerOp();
//CDelayedOp::ExecuteOpL
- virtual void ExecuteOpL();
+ virtual TBool ExecuteOpL();
private:
@@ -254,7 +249,7 @@
virtual ~CDelayedMessageToSendOp();
//CDelayedOp::ExecuteOpL
- virtual void ExecuteOpL();
+ virtual TBool ExecuteOpL();
private:
@@ -302,7 +297,7 @@
virtual ~CDelayedAddNewOrRemoveChildPartOp();
//CDelayedOp::ExecuteOpL
- virtual void ExecuteOpL();
+ virtual TBool ExecuteOpL();
private:
--- a/emailservices/emailstore/base_plugin/inc/nestedao.h Fri Jul 09 12:17:13 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +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: Class used to implement nested active object used to handle
-* deletion of large number of messages by breaking them into smaller chunks
-*
-*/
-
-#ifndef __NESTED_AO_H__
-#define __NESTED_AO_H__
-
-// Include Files
-
-
-#include <e32base.h>
-
-
-class MDeletionHandler
- {
-public:
- enum TState
- {
- EInProgress,
- EFree
- };
- //Deletes messages from aStartIndex KSizeOfChunk at a time
- virtual TBool DeleteMessagesInChunksL( TInt aStartIndex ) = 0;
- };
-//Time interval between issuing 2 requests to delete messages
-const TInt KWaitIntervalInMicroSecs=500;
-//Maximum number of messages deleted in one go
-const TInt KSizeOfChunk=10;
-
-NONSHARABLE_CLASS ( CNestedAO ) : public CTimer
- {
- public:
-
- static CNestedAO* NewL( MDeletionHandler& aDeletionHandler );
- virtual ~CNestedAO();
- // --------------------------------------------------------------------------
- // CNestedAO::DeleteMessagesAsync
- // Used to delete messages asynchronously
- // Deleting a small number of messages at a time
- // ------------
- void DeleteMessagesAsync();
- // --------------------------------------------------------------------------
- // CNestedAO::Rc
- // Used to return the iStatus return value
- // ------------
- TInt Rc() { return iRc; }
-
- private:
- CNestedAO( MDeletionHandler& aDeletionHandler );
- void ConstructL();
-
- // inherited from CActive
- virtual void RunL();
- virtual void DoCancel();
- // --------------------------------------------------------------------------
- // CNestedAO::Stop
- // Stops the scheduler from running
- // Called after all messages are processed
- // or in error condition
- // ------------
- void Stop();
-
- private:
- CActiveSchedulerWait* iNestedWait;
- MDeletionHandler& iDeletionHandler;
- TInt iDeletionIndex;
- TInt iRc;
- };
-
-
-#endif //__NESTED_AO_H__
--- a/emailservices/emailstore/base_plugin/src/BaseMrInfoObject.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/BaseMrInfoObject.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -83,11 +83,10 @@
iSequenceNumber = aMrInfo.MRSequenceNumberL();
iPriority = aMrInfo.PriorityL();
- iOrganizer = CBaseMrAttendee::NewL();
+ iOrganizer = CBaseMrAttendee::NewL( aMrInfo.MROrganizerL() );
//<qmail> Commented out in 10.1
- /*iOrganizer = CBaseMrAttendee::NewL( aMrInfo.MROrganizerL() );
- RPointerArray<MMRAttendee>& attendees = aMrInfo.AttendeesL();
+ /*RPointerArray<MMRAttendee>& attendees = aMrInfo.AttendeesL();
TInt count = attendees.Count();
for ( TInt i = 0; i < count; i++ )
{
@@ -96,6 +95,7 @@
iAttendees.AppendL( attendee );
CleanupStack::Pop( attendee );
}*/
+
//</qmail>
iRrule = CBaseMrRecurrenceRule::NewL( aMrInfo.RecurrenceRuleL() );
--- a/emailservices/emailstore/base_plugin/src/BasePlugin.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/BasePlugin.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -130,12 +130,12 @@
iReqs.ResetAndDestroy();
iReqs.Close();
-
+//<qmail>
// Note that all the ops in iDelayedOpReqs array (if any) have already been
// deleted in the destructor of CDelayedOpsManager class.
iDelayedOpReqs.Reset();
iDelayedOpReqs.Close();
-
+//</qmail>
ResetCache();
__LOG_DESTRUCT
@@ -1253,6 +1253,15 @@
CleanupStack::PopAndDestroy( &folders );
}
+/**
+ * This methoed must be called before destruction of
+ * CBasePlugin derived class. To fix bug EIZU-7XVF2Z.
+ */
+void CBasePlugin::DeleteDelayedOpsManager()
+ {
+ delete iDelayedOpsManager;
+ iDelayedOpsManager = NULL;
+ }
/**
*
--- a/emailservices/emailstore/base_plugin/src/baseplugindelayedops.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/baseplugindelayedops.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -23,7 +23,6 @@
#include "baseplugindelayedops.h"
#include "baseplugindelayedopsprivate.h"
-#include "nestedao.h"
///////////////////////////////////////////////////
// CDelayedOp //
@@ -51,9 +50,17 @@
/**
*
*/
+/*public*/ void CDelayedOp::StartOp()
+ {
+ iStatus = KRequestPending;
+ SetActive();
+ TRequestStatus* pStatus = &iStatus;
+ User::RequestComplete( pStatus, KErrNone );
+ }
/*protected*/ CDelayedOp::CDelayedOp()
- : CAsyncOneShot( CActive::EPriorityIdle )
+ : CActive( CActive::EPriorityIdle )
{
+ CActiveScheduler::Add( this );
}
/**
@@ -62,7 +69,9 @@
/*private virtual*/ void CDelayedOp::RunL()
{
__LOG_ENTER_SUPPRESS( "Run" );
- TRAPD( err, ExecuteOpL() );
+ TBool again( EFalse );
+
+ TRAPD( err, again = ExecuteOpL() );
if ( KErrNone != err )
{
@@ -70,19 +79,27 @@
"Error while executing delayed operation: %d.", err );
}
- //self-destroy.
- iManager->DequeueOp( *this );
-
- //Remove this from iDelayedOpReqs as well.
- for ( TInt i = 0; i < iPlugin->iDelayedOpReqs.Count(); i++ )
+ if ( again )
+ {
+ StartOp();
+ }
+ else
{
- if ( iPlugin->iDelayedOpReqs[i] == this )
- {
- iPlugin->iDelayedOpReqs.Remove( i );
- break;
- }
+ //self-destroy.
+ iManager->DequeueOp( *this );
+//<qmail>
+ //Remove this from iDelayedOpReqs as well.
+ for ( TInt i = 0; i < iPlugin->iDelayedOpReqs.Count(); i++ )
+ {
+ if ( iPlugin->iDelayedOpReqs[i] == this )
+ {
+ iPlugin->iDelayedOpReqs.Remove( i );
+ break;
+ }
+ }
+//</qmail>
+ delete this;
}
- delete this;
}
/**
@@ -138,7 +155,7 @@
{
iDelayedOps.AppendL( aOp );
aOp->SetContext( iPlugin, *this );
- aOp->Call();
+ aOp->StartOp();
}
/**
@@ -246,94 +263,6 @@
/**
*
*/
-/*public virtual*/TBool CDelayedDeleteMessagesOp::DeleteMessagesInChunksL( TInt aStartIndex )
- {
- __LOG_ENTER( "DeleteMessagesInChunksL" );
- TBool done=EFalse;
- TInt endIndex;
-//<qmail>
- TInt result(KErrNone);
- if( aStartIndex + KSizeOfChunk < iMessages.Count() )
- {
- endIndex = aStartIndex + KSizeOfChunk;
- }
- else
- {
- endIndex = iMessages.Count();
- done=ETrue;
- }
- CMailboxInfo& mailBoxInfo
- = GetPlugin().GetMailboxInfoL( iMailBoxId );
- CMsgStoreMailBox& mailBox = mailBoxInfo();
-
- for ( TInt i = aStartIndex; i < endIndex; ++i )
- {
- TMsgStoreId msgId = iMessages[i];
-
- if ( EFalse == iImmediateDelete )
- {
- //try to find the message
- CMsgStoreMessage* theMessage = NULL;
- theMessage = mailBox.FetchMessageL(
- msgId, KMsgStoreInvalidId ) ;
- //save parentId
- TMsgStoreId msgParentId;
- msgParentId =theMessage->ParentId();
- //check if message is in deleted folder or not.
- if ( msgParentId != mailBoxInfo.iRootFolders.iFolders[EFSDeleted] )
- {
- //if not in deleted items then move it there.
- __LOG_WRITE8_FORMAT1_INFO("Moving message 0x%X to the deleted items.", msgId );
- TRAP(result,mailBox.MoveMessageL(
- msgId, KMsgStoreInvalidId,
- mailBoxInfo.iRootFolders.iFolders[EFSDeleted] ));
- if(result == KErrNone)
- {
- GetPlugin().NotifyEventL( iMailBoxId, msgId, KMsgStoreInvalidId , TFSEventMailMoved, msgParentId);
- }
- else
- {
- User::Leave(result);
- }
-
- }
- else
- {
- //in deleted items, really delete it.
- __LOG_WRITE8_FORMAT1_INFO( "Deleting message 0x%X.", msgId );
-
- delete theMessage;
- TRAP(result,mailBox.DeleteMessageL( msgId, iFolderId ));
- if(result == KErrNone)
- {
- GetPlugin().NotifyEventL( iMailBoxId, msgId, KMsgStoreInvalidId, TFSEventMailDeleted, iFolderId );
- }
- else
- {
- User::Leave(result);
- }
- }
- }
- else
- {
- TRAP(result,mailBox.DeleteMessageL( msgId, iFolderId ));
- if(result == KErrNone)
- {
- GetPlugin().NotifyEventL( iMailBoxId, msgId, KMsgStoreInvalidId, TFSEventMailDeleted, iFolderId );
- }
- else
- {
- User::Leave(result);
- }
- }
-//</qmail>
- }
- __LOG_EXIT;
- return done;
- }
-/**
- *
- */
/*private*/
void CDelayedDeleteMessagesOp::ConstructL(
const RArray<TFSMailMsgId>& aMessages )
@@ -366,33 +295,103 @@
TMsgStoreId aMailBoxId,
TMsgStoreId aFolderId )
:
- iMailBoxId( aMailBoxId ), iFolderId( aFolderId ),
- iImmediateDelete( EFalse ), iState ( EFree )
+ iMailBoxId( aMailBoxId ), iFolderId( aFolderId )
{
}
/**
*
*/
-/*private*/ void CDelayedDeleteMessagesOp::ExecuteOpL()
+/*private*/ TBool CDelayedDeleteMessagesOp::ExecuteOpL()
{
__LOG_ENTER( "ExecuteOpL" );
- if ( iState != EFree )
+
+ //Maximum number of messages deleted in one go
+ const TInt KNumOfDeletesBeforeYield = 30;
+
+ //<qmail>
+ TInt result(KErrNone);
+
+ TBool runAgain = ETrue;
+ TInt endIndex = iIndex + KNumOfDeletesBeforeYield;
+
+ if (endIndex >= iMessages.Count())
{
- //this code becomes re-entrant now because we use nested AS.
- // so if we are already authenticating, return right away.
- return;
+ endIndex = iMessages.Count();
+ runAgain = EFalse; // last time, no need to run again.
}
- iState=EInProgress;
- CNestedAO* nestedAO = CNestedAO::NewL( *this );
- //this is a blocking call with nested active scheduler
- //This method makes a callback periodically to DeleteMessagesInChunks
- //to delete the messages one chunk at a time
- nestedAO->DeleteMessagesAsync();
- //continue execution here
- delete nestedAO;
- iState = EFree;
- __LOG_EXIT;
+
+ CMailboxInfo& mailBoxInfo = GetPlugin().GetMailboxInfoL(iMailBoxId);
+ CMsgStoreMailBox& mailBox = mailBoxInfo();
+
+ for (; iIndex < endIndex; iIndex++)
+ {
+ TMsgStoreId msgId = iMessages[iIndex];
+
+ if (EFalse == iImmediateDelete)
+ {
+ //try to find the message
+ CMsgStoreMessage* theMessage = NULL;
+ theMessage = mailBox.FetchMessageL(msgId, KMsgStoreInvalidId);
+ //save parentId
+ TMsgStoreId msgParentId;
+ msgParentId = theMessage->ParentId();
+ //check if message is in deleted folder or not.
+ if (msgParentId != mailBoxInfo.iRootFolders.iFolders[EFSDeleted])
+ {
+ //if not in deleted items then move it there.
+ __LOG_WRITE8_FORMAT1_INFO("Moving message 0x%X to the deleted items.", msgId );
+ TRAP(result,mailBox.MoveMessageL(
+ msgId, KMsgStoreInvalidId,
+ mailBoxInfo.iRootFolders.iFolders[EFSDeleted] ));
+ if (result == KErrNone)
+ {
+ GetPlugin().NotifyEventL(iMailBoxId, msgId,
+ KMsgStoreInvalidId, TFSEventMailMoved,
+ msgParentId);
+ }
+ else
+ {
+ User::Leave(result);
+ }
+
+ }
+ else
+ {
+ //in deleted items, really delete it.
+ __LOG_WRITE8_FORMAT1_INFO( "Deleting message 0x%X.", msgId );
+
+ delete theMessage;
+ TRAP(result,mailBox.DeleteMessageL( msgId, iFolderId ));
+ if (result == KErrNone)
+ {
+ GetPlugin().NotifyEventL(iMailBoxId, msgId,
+ KMsgStoreInvalidId, TFSEventMailDeleted,
+ iFolderId);
+ }
+ else
+ {
+ User::Leave(result);
+ }
+ }
+ }
+ else
+ {
+ TRAP(result,mailBox.DeleteMessageL( msgId, iFolderId ));
+ if (result == KErrNone)
+ {
+ GetPlugin().NotifyEventL(iMailBoxId, msgId,
+ KMsgStoreInvalidId, TFSEventMailDeleted, iFolderId);
+ }
+ else
+ {
+ User::Leave(result);
+ }
+ }
+ //</qmail>
+ }
+ __LOG_EXIT;
+ return runAgain;
}
@@ -465,7 +464,7 @@
/**
* CDelayedOp::ExecuteOpL
*/
-/*public virtual*/ void CDelayedSetContentOp::ExecuteOpL()
+/*public virtual*/ TBool CDelayedSetContentOp::ExecuteOpL()
{
__LOG_ENTER( "ExecuteOpL" )
@@ -494,6 +493,7 @@
CleanupStack::PopAndDestroy( part );
__LOG_EXIT
+ return EFalse;
}
/**
@@ -657,7 +657,7 @@
/**
*
*/
-/*private*/ void CDelayedMessageStorerOp::ExecuteOpL()
+/*private*/ TBool CDelayedMessageStorerOp::ExecuteOpL()
{
__LOG_ENTER( "ExecuteOpL" );
@@ -726,6 +726,7 @@
__LOG_EXIT;
+ return EFalse;
}
@@ -828,7 +829,7 @@
/**
*
*/
-/*private*/ void CDelayedMessageToSendOp::ExecuteOpL()
+/*private*/ TBool CDelayedMessageToSendOp::ExecuteOpL()
{
__LOG_ENTER( "ExecuteOpL" );
@@ -850,6 +851,7 @@
}
__LOG_EXIT;
+ return EFalse;
}
@@ -969,7 +971,7 @@
/**
*
*/
-/*private*/ void CDelayedAddNewOrRemoveChildPartOp::ExecuteOpL()
+/*private*/ TBool CDelayedAddNewOrRemoveChildPartOp::ExecuteOpL()
{
__LOG_ENTER( "ExecuteOpL" );
@@ -1010,5 +1012,6 @@
}
__LOG_EXIT;
+ return EFalse;
}
//</qmail>
--- a/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -384,6 +384,7 @@
break;
}
}
+//<qmail>
count = iDelayedOpReqs.Count();
for ( TInt i = 0; i < count; i++ )
{
@@ -401,6 +402,7 @@
break;
}
}
+//</qmail>
}
--- a/emailservices/emailstore/base_plugin/src/nestedao.cpp Fri Jul 09 12:17:13 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +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: Implementation of a nested active object used to handle deletion
-* of large number of messages by breaking them into smaller chunks
-*
-*/
-
-// Include Files
-//
-
-
-#include "nestedao.h"
-#include "baseplugindelayedops.h"
-#include "baseplugindelayedopsprivate.h"
-
-//Class CNestedAO
-
-// --------------------------------------------------------------------------
-// CNestedAO::NewL
-// ------------
-CNestedAO* CNestedAO::NewL( MDeletionHandler& aDeletionHandler )
- {
- CNestedAO* self = new(ELeave) CNestedAO( aDeletionHandler );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-// --------------------------------------------------------------------------
-// CNestedAO::CNestedAO
-// ------------
-CNestedAO::CNestedAO( MDeletionHandler& aDeletionHandler )
- : CTimer( EPriorityIdle ), iDeletionHandler( aDeletionHandler ), iRc( KErrNone )
- {
- }
-// --------------------------------------------------------------------------
-// CNestedAO::ConstructL()
-// ------------
-void CNestedAO::ConstructL()
- {
- CTimer::ConstructL();
- iNestedWait = new( ELeave ) CActiveSchedulerWait();
- CActiveScheduler::Add( this );
- }
-// --------------------------------------------------------------------------
-// CNestedAO::~CNestedAO
-// ------------
-CNestedAO::~CNestedAO()
- {
- Cancel();
- delete iNestedWait;
- }
-// --------------------------------------------------------------------------
-// CNestedAO::DeleteMessagesAsync
-// Used to delete messages asynchronously
-// Deleting a small number of messages at a time
-// ------------
-void CNestedAO::DeleteMessagesAsync()
- {
- iDeletionIndex = 0;
- After( KWaitIntervalInMicroSecs ); //to invoke RunL after 100 microseconds
- iNestedWait->Start();
- }
-// --------------------------------------------------------------------------
-// CNestedAO::DoCancel
-// ------------
-void CNestedAO::DoCancel()
- {
- iRc = KErrCancel;
- Stop();
- }
-// --------------------------------------------------------------------------
-// CNestedAO::RunL
-// ------------
-void CNestedAO::RunL()
- {
- iRc = iStatus.Int();
- if ( iStatus.Int() == KErrNone )
- {
- TBool done = iDeletionHandler.DeleteMessagesInChunksL( iDeletionIndex );
- if( !done )
- {
- //Increment deletionidex
- iDeletionIndex+=KSizeOfChunk;
- After( KWaitIntervalInMicroSecs );
- }
- else
- {
- Stop();
- }
- }
- else
- {
- Stop();
- }
- }
-
-// --------------------------------------------------------------------------
-// CNestedAO::Stop
-// Stops the scheduler from running
-// Called after all messages are processed
-// or in error condition
-// ------------
-void CNestedAO::Stop()
- {
- if( iNestedWait->IsStarted() )
- {
- // Stop the nested active scheduler (flow-of-control will pick up immediately following the
- // call to iWait.Start().
- iNestedWait->AsyncStop();
- } // end if
- }
--- a/emailservices/nmailagent/inc/nmmailagent.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/nmailagent/inc/nmmailagent.h Fri Jul 23 19:09:50 2010 +0300
@@ -144,8 +144,8 @@
void handleMessageCreatedEvent(const NmId &folderId, const QList<NmId> &messageIds,
const NmId &mailboxId, bool &updateNeeded, bool &activate);
- void handleMessageChangedEvent(const NmId &folderId, const NmId &mailboxId,
- bool &updateNeeded, bool &activate);
+ void handleMessageChangedEvent(const NmId &folderId, const QList<NmId> &messageIds,
+ const NmId &mailboxId, bool &updateNeeded, bool &activate);
void handleMessageDeletedEvent(const NmId &folderId, const QList<NmId> &messageIds,
const NmId &mailboxId, bool &updateNeeded, bool &activate);
--- a/emailservices/nmailagent/src/main.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/nmailagent/src/main.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -22,9 +22,9 @@
#include "ssastartupwatcher.h"
#ifdef __WINSCW__
-const int NmStartupDelay = 14000; // 14s
+const int NmStartupDelay = 4000; // 4s
#else
-const int NmStartupDelay = 4000; // 4s
+const int NmStartupDelay = 1000; // 1s
#endif
NmMailAgent *agent = NULL;
@@ -36,7 +36,7 @@
{
NM_FUNCTION;
NM_COMMENT(QString("nmailagent: startupCallback(): status=%1").arg(status));
-
+
Q_UNUSED(status);
// either it is an error or 'non critical startup' state has been reached
@@ -50,7 +50,7 @@
int main(int argc, char *argv[])
{
NM_FUNCTION;
-
+
QCoreApplication app(argc, argv);
agent = new NmMailAgent;
--- a/emailservices/nmailagent/src/nmmailagent.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/nmailagent/src/nmmailagent.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -79,7 +79,7 @@
mActive(false),
mInboxActive(false)
{
- NM_FUNCTION;
+ NM_FUNCTION;
}
/*!
@@ -98,7 +98,7 @@
mSettingManager(NULL),
mSilenceMode(NmSilenceModeOn) // by default silent mode is on
{
- NM_FUNCTION;
+ NM_FUNCTION;
}
/*!
@@ -599,30 +599,48 @@
\sa updateUnreadCount
\param folderId Id of the folder that includes the message
+ \param messageIds Message ids that are checked
\param mailboxId Id of the mailbox that includes the message
\param updateNeeded Set to <code>true</code> if update needed otherwise not touched
\param activate Set result value of updateUnreadCount method
*/
-void NmMailAgent::handleMessageChangedEvent(const NmId &folderId, const NmId &mailboxId,
+void NmMailAgent::handleMessageChangedEvent(const NmId &folderId,
+ const QList<NmId> &messageIds,
+ const NmId &mailboxId,
bool &updateNeeded, bool &activate)
{
NmMailboxInfo *mailboxInfo = getMailboxInfo(mailboxId);
+ // we are interested only about changes in the inbox
if (folderId == mailboxInfo->mInboxFolderId) {
mailboxInfo->mInboxChangedMessages++;
- }
-
- // If not currently syncronizing the mailbox, this may mean
- // that a message was read/unread
- if (mailboxInfo && mailboxInfo->mSyncState == SyncComplete) {
- // check the unread status again
- int oldCount(mailboxInfo->mUnreadMailIdList.count());
- activate = updateUnreadCount(mailboxId, *mailboxInfo);
+ // If not currently syncronizing the mailbox, this may mean
+ // that a message was read/unread
+ if (mailboxInfo && mailboxInfo->mSyncState == SyncComplete) {
+ // If there was no unread mails in the list, do nothing
+ int oldCount(mailboxInfo->mUnreadMailIdList.count());
+ if (oldCount>0) {
+ // Check how many messages were unread earlier
+ int unreadMessages = 0;
+ foreach (NmId messageId, messageIds) {
+ if (mailboxInfo->mUnreadMailIdList.indexOf(messageId)>=0) {
+ unreadMessages++;
+ }
+ }
- // new unread mails found or no more unread mails in the inbox
- if (oldCount>0 && mailboxInfo->mUnreadMailIdList.count()==0) {
- updateNeeded = true;
+ // Could lead the count drop to 0 => mailbox will be hidden
+ if (unreadMessages > 0) {
+ // check the unread status again
+ activate = updateUnreadCount(mailboxId, *mailboxInfo);
+
+ // no more unread mails in the inbox
+ if (mailboxInfo->mUnreadMailIdList.count()==0) {
+ NM_COMMENT("NmMailAgent:handleMessageChangedEvent - no more unread msgs");
+ updateNeeded = true;
+ }
+ }
+ }
}
}
}
@@ -720,7 +738,7 @@
if (!mailboxInfo) {
// Unable to initialise the mailbox. Try again later.
NM_COMMENT("Cannot initialise mailbox");
-
+
qRegisterMetaType<NmId>("NmId");
QMetaObject::invokeMethod(this, "delayedMailboxCreated",
Qt::QueuedConnection, Q_ARG(NmId,mailboxId));
@@ -769,9 +787,9 @@
}
/*!
- Called when mailbox is initialised with a delay. This may happen at least when
+ Called when mailbox is initialised with a delay. This may happen at least when
NmMailboxCreated event is received.
-
+
\param mailboxId id of the mailbox
*/
void NmMailAgent::delayedMailboxCreated(const NmId mailboxId)
@@ -877,7 +895,7 @@
break;
}
case NmMessageChanged: {
- handleMessageChangedEvent(folderId, mailboxId, updateNeeded, activate);
+ handleMessageChangedEvent(folderId, messageIds, mailboxId, updateNeeded, activate);
break;
}
case NmMessageDeleted: {
--- a/emailservices/nmclientapi/bwins/nmailclientapiu.def Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/nmclientapi/bwins/nmailclientapiu.def Fri Jul 23 19:09:50 2010 +0300
@@ -242,4 +242,8 @@
?getStaticMetaObject@NmApiMessageManager@EmailClientApi@@SAABUQMetaObject@@XZ @ 241 NONAME ; struct QMetaObject const & EmailClientApi::NmApiMessageManager::getStaticMetaObject(void)
?staticMetaObject@NmApiMessageManager@EmailClientApi@@2UQMetaObject@@B @ 242 NONAME ; struct QMetaObject const EmailClientApi::NmApiMessageManager::staticMetaObject
?qt_metacall@NmApiMailboxSettings@EmailClientApi@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 243 NONAME ; int EmailClientApi::NmApiMailboxSettings::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0NmApiSettingsManager@EmailClientApi@@QAE@_K@Z @ 244 NONAME ; EmailClientApi::NmApiSettingsManager::NmApiSettingsManager(unsigned long long)
+ ?save@NmApiSettingsManager@EmailClientApi@@QAE_NABVNmApiMailboxSettingsData@2@@Z @ 245 NONAME ; bool EmailClientApi::NmApiSettingsManager::save(class EmailClientApi::NmApiMailboxSettingsData const &)
+ ?load@NmApiSettingsManager@EmailClientApi@@QAE_N_KAAVNmApiMailboxSettingsData@2@@Z @ 246 NONAME ; bool EmailClientApi::NmApiSettingsManager::load(unsigned long long, class EmailClientApi::NmApiMailboxSettingsData &)
+ ??1NmApiSettingsManager@EmailClientApi@@QAE@XZ @ 247 NONAME ; EmailClientApi::NmApiSettingsManager::~NmApiSettingsManager(void)
--- a/emailservices/nmclientapi/eabi/nmailclientapiu.def Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/nmclientapi/eabi/nmailclientapiu.def Fri Jul 23 19:09:50 2010 +0300
@@ -251,21 +251,27 @@
_ZN14EmailClientApi20NmApiMailboxSettingsD0Ev @ 250 NONAME
_ZN14EmailClientApi20NmApiMailboxSettingsD1Ev @ 251 NONAME
_ZN14EmailClientApi20NmApiMailboxSettingsD2Ev @ 252 NONAME
- _ZN14EmailClientApi24NmApiMailboxSettingsData12setMailboxIdEy @ 253 NONAME
- _ZN14EmailClientApi24NmApiMailboxSettingsData13clearSettingsEv @ 254 NONAME
- _ZN14EmailClientApi24NmApiMailboxSettingsData8setValueEiRK8QVariant @ 255 NONAME
- _ZN14EmailClientApi24NmApiMailboxSettingsDataC1Ev @ 256 NONAME
- _ZN14EmailClientApi24NmApiMailboxSettingsDataC2Ev @ 257 NONAME
- _ZN14EmailClientApi24NmApiMailboxSettingsDataD1Ev @ 258 NONAME
- _ZN14EmailClientApi24NmApiMailboxSettingsDataD2Ev @ 259 NONAME
- _ZNK14EmailClientApi19NmApiMessageManager10metaObjectEv @ 260 NONAME
- _ZNK14EmailClientApi20NmApiMailboxSettings10metaObjectEv @ 261 NONAME
- _ZNK14EmailClientApi24NmApiMailboxSettingsData12listSettingsEv @ 262 NONAME
- _ZNK14EmailClientApi24NmApiMailboxSettingsData12validateDataEv @ 263 NONAME
- _ZNK14EmailClientApi24NmApiMailboxSettingsData8getValueEiR8QVariant @ 264 NONAME
- _ZNK14EmailClientApi24NmApiMailboxSettingsData9mailboxIdEv @ 265 NONAME
- _ZTIN14EmailClientApi19NmApiMessageManagerE @ 266 NONAME
- _ZTIN14EmailClientApi20NmApiMailboxSettingsE @ 267 NONAME
- _ZTVN14EmailClientApi19NmApiMessageManagerE @ 268 NONAME
- _ZTVN14EmailClientApi20NmApiMailboxSettingsE @ 269 NONAME
+ _ZN14EmailClientApi20NmApiSettingsManager4loadEyRNS_24NmApiMailboxSettingsDataE @ 253 NONAME
+ _ZN14EmailClientApi20NmApiSettingsManager4saveERKNS_24NmApiMailboxSettingsDataE @ 254 NONAME
+ _ZN14EmailClientApi20NmApiSettingsManagerC1Ey @ 255 NONAME
+ _ZN14EmailClientApi20NmApiSettingsManagerC2Ey @ 256 NONAME
+ _ZN14EmailClientApi20NmApiSettingsManagerD1Ev @ 257 NONAME
+ _ZN14EmailClientApi20NmApiSettingsManagerD2Ev @ 258 NONAME
+ _ZN14EmailClientApi24NmApiMailboxSettingsData12setMailboxIdEy @ 259 NONAME
+ _ZN14EmailClientApi24NmApiMailboxSettingsData13clearSettingsEv @ 260 NONAME
+ _ZN14EmailClientApi24NmApiMailboxSettingsData8setValueEiRK8QVariant @ 261 NONAME
+ _ZN14EmailClientApi24NmApiMailboxSettingsDataC1Ev @ 262 NONAME
+ _ZN14EmailClientApi24NmApiMailboxSettingsDataC2Ev @ 263 NONAME
+ _ZN14EmailClientApi24NmApiMailboxSettingsDataD1Ev @ 264 NONAME
+ _ZN14EmailClientApi24NmApiMailboxSettingsDataD2Ev @ 265 NONAME
+ _ZNK14EmailClientApi19NmApiMessageManager10metaObjectEv @ 266 NONAME
+ _ZNK14EmailClientApi20NmApiMailboxSettings10metaObjectEv @ 267 NONAME
+ _ZNK14EmailClientApi24NmApiMailboxSettingsData12listSettingsEv @ 268 NONAME
+ _ZNK14EmailClientApi24NmApiMailboxSettingsData12validateDataEv @ 269 NONAME
+ _ZNK14EmailClientApi24NmApiMailboxSettingsData8getValueEiR8QVariant @ 270 NONAME
+ _ZNK14EmailClientApi24NmApiMailboxSettingsData9mailboxIdEv @ 271 NONAME
+ _ZTIN14EmailClientApi19NmApiMessageManagerE @ 272 NONAME
+ _ZTIN14EmailClientApi20NmApiMailboxSettingsE @ 273 NONAME
+ _ZTVN14EmailClientApi19NmApiMessageManagerE @ 274 NONAME
+ _ZTVN14EmailClientApi20NmApiMailboxSettingsE @ 275 NONAME
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/inc/nmapisettingsmanager_p.h Fri Jul 23 19:09:50 2010 +0300
@@ -0,0 +1,83 @@
+/*
+ * 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 NMAPISETTINGSMANAGER_P_H_
+#define NMAPISETTINGSMANAGER_P_H_
+
+#include <QVariant>
+
+#include <nmapimailboxsettingsdata.h>
+#include <cemailaccounts.h>
+
+class CImImap4Settings;
+class CImSmtpSettings;
+class XQSettingsManager;
+class XQCentralRepositoryUtils;
+
+namespace EmailClientApi
+{
+
+class NmApiSettingsManagerPrivate
+{
+public:
+ NmApiSettingsManagerPrivate(const quint64 mailboxId);
+ ~NmApiSettingsManagerPrivate();
+
+ bool load(quint64 mailboxId, NmApiMailboxSettingsData &data);
+ bool save(const NmApiMailboxSettingsData &data);
+
+private:
+ bool writeSettingL(const NmApiMailboxSettingsData &data);
+ bool saveSettings();
+ bool readSetting(NmApiMailboxSettingsData &data);
+ bool readCenRepSetting(NmApiMailboxSettingsData &data);
+ QVariant readFromCenRep(quint32 key) const;
+ bool writeSettingToCenRep(const NmApiMailboxSettingsData &data);
+ bool writeToCenRep(quint32 key, const QVariant &value) const;
+ void setSecurity(QString securityType);
+ QString security() const;
+ QString alwaysOnlineState() const;
+ void setAlwaysOnlineState(const QVariant state);
+ void calculateMailboxOffset();
+ void calculateActiveProfileOffset();
+ qint32 convertToProfileOffset(int profile) const;
+ bool checkAccountType();
+ void initAccountL();
+
+private:
+ NmApiMailboxSettingsData *mSettingsData;
+
+ CEmailAccounts *mAccount;
+ CImPop3Settings *mPop3Settings;
+ CImImap4Settings *mImap4Settings;
+ CImSmtpSettings *mSmtpSettings;
+
+ TSmtpAccount mSmtpAccount;
+ TImapAccount mImap4Account;
+ TPopAccount mPop3Account;
+
+ QString mMailboxType;
+ qint32 mMailboxOffset;
+ qint32 mActiveProfileOffset;
+ XQSettingsManager *mQSettingsManager;
+
+ quint32 mMailboxId;
+};
+
+} //namespace EmailClientApi
+
+#endif // NMAPISETTINGSMANAGER_P_H_
--- a/emailservices/nmclientapi/nmclientapi.pro Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/nmclientapi/nmclientapi.pro Fri Jul 23 19:09:50 2010 +0300
@@ -50,6 +50,7 @@
nmapimessageenvelope.h \
nmapimessagetask.h \
nmapimessagemanager.h \
+ nmapisettingsmanager.h \
nmapimailboxsettings.h
# private headers
@@ -67,6 +68,7 @@
inc/nmapimessagebody_p.h \
inc/nmapimessageenvelope_p.h \
inc/nmapimessagemanager_p.h \
+ inc/nmapisettingsmanager_p.h \
inc/nmapipopimapsettingsmanager.h \
inc/nmapiprivateclasses.h \
inc/nmapitypesconverter.h \
@@ -96,6 +98,8 @@
src/nmapipopimapsettingsmanager.cpp \
src/nmapimessagemanager_p.cpp \
src/nmapimessagemanager.cpp \
+ src/nmapisettingsmanager_p.cpp \
+ src/nmapisettingsmanager.cpp \
src/nmapitypesconverter.cpp
--- a/emailservices/nmclientapi/src/nmapimailboxsettings_p.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapimailboxsettings_p.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -16,6 +16,7 @@
*/
#include "nmapiheaders.h"
+#include <nmapisettingsmanager.h>
namespace EmailClientApi
@@ -64,16 +65,15 @@
bool NmApiMailboxSettingsPrivate::loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data)
{
NM_FUNCTION;
- Q_UNUSED(mailboxId);
- Q_UNUSED(data);
- return false;
+ QScopedPointer<NmApiSettingsManager> settingsManager(new NmApiSettingsManager(mailboxId));
+ return settingsManager->load(mailboxId, data);
}
bool NmApiMailboxSettingsPrivate::saveSettings(const NmApiMailboxSettingsData &data)
{
NM_FUNCTION;
- Q_UNUSED(data);
- return false;
+ QScopedPointer<NmApiSettingsManager> settingsManager(new NmApiSettingsManager(data.mailboxId()));
+ return settingsManager->save(data);
}
bool NmApiMailboxSettingsPrivate::createMailbox(
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapisettingsmanager.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -0,0 +1,54 @@
+/*
+ * 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 <nmapisettingsmanager.h>
+#include "nmapisettingsmanager_p.h"
+#include "nmapiheaders.h"
+
+namespace EmailClientApi
+{
+
+NmApiSettingsManager::NmApiSettingsManager(const quint64 mailboxId)
+{
+ d = new NmApiSettingsManagerPrivate(mailboxId);
+}
+
+NmApiSettingsManager::~NmApiSettingsManager()
+{
+ delete d;
+}
+/*!
+ Loads email settings.
+ \param mailboxId which settings are returned
+ \param data consists of keys and values of settings.
+ \return bool <true> when the setting items were found otherwise <false>.
+ */
+bool NmApiSettingsManager::load(quint64 mailboxId, NmApiMailboxSettingsData &data)
+{
+ return d->load(mailboxId, data);
+}
+
+/*!
+ Saves email settings.
+ \param data consists of keys and values of settings.
+ \return bool <true> when the setting items were successfully saved otherwise <false>.
+ */
+bool NmApiSettingsManager::save(const NmApiMailboxSettingsData &data)
+{
+ return d->save(data);
+}
+
+} // end namespace
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/nmclientapi/src/nmapisettingsmanager_p.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -0,0 +1,782 @@
+/*
+ * 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 <QVariant>
+#include <QList>
+
+#include <xqconversions.h>
+#include <xqsettingsmanager.h>
+#include <xqcentralrepositoryutils.h>
+#include <xqcentralrepositorysearchcriteria.h>
+
+#include <pop3set.h>
+#include <imapset.h>
+#include <smtpset.h>
+#include <iapprefs.h>
+
+#include "ipssettingkeys.h"
+#include "nmapiheaders.h"
+#include <nmapisettingsmanager.h>
+#include "nmapisettingsmanager_p.h"
+
+namespace EmailClientApi
+{
+
+NmApiSettingsManagerPrivate::NmApiSettingsManagerPrivate(const quint64 mailboxId)
+ : mAccount(0),
+ mPop3Settings(0),
+ mImap4Settings(0),
+ mSmtpSettings(0),
+ mMailboxOffset(-1),
+ mMailboxId(0)
+{
+ QT_TRAP_THROWING(mAccount = CEmailAccounts::NewL());
+ mMailboxId = (quint32)mailboxId;
+
+ mQSettingsManager = new XQSettingsManager();
+ Q_CHECK_PTR(mQSettingsManager);
+
+ checkAccountType();
+ QT_TRAP_THROWING(initAccountL());
+ calculateMailboxOffset();
+
+}
+
+NmApiSettingsManagerPrivate::~NmApiSettingsManagerPrivate()
+{
+ delete mPop3Settings;
+ delete mImap4Settings;
+ delete mSmtpSettings;
+ delete mQSettingsManager;
+ delete mAccount;
+}
+
+/*!
+ Loads QMail specific settings.
+ \param mailboxId which settings are returned
+ \param data consists of keys and values of settings.
+ \return bool <true> when the setting items were found otherwise <false>.
+ */
+bool NmApiSettingsManagerPrivate::load(quint64 mailboxId, NmApiMailboxSettingsData &data)
+{
+ mMailboxId = mailboxId;
+ return (readSetting(data) && readCenRepSetting(data));
+}
+
+/*!
+ Saves QMail specific settings.
+ \param data consists of keys and values of settings.
+ \return bool <true> when the setting items were successfully saved otherwise <false>.
+ */
+bool NmApiSettingsManagerPrivate::save(const NmApiMailboxSettingsData &data)
+{
+ TInt err(KErrNone);
+ TRAP(err, writeSettingL(data));
+ return (!err && writeSettingToCenRep(data));
+}
+
+/*!
+ Finds and returns the SMTP specific setting.
+ \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>.
+ */
+bool NmApiSettingsManagerPrivate::readSetting(NmApiMailboxSettingsData &data)
+{
+ if (mMailboxType == NmApiMailboxTypePop) {
+ data.setValue(IncomingLoginName, XQConversions::s60Desc8ToQString(mPop3Settings->LoginName()));
+ data.setValue(IncomingPassword, XQConversions::s60Desc8ToQString(mPop3Settings->Password()));
+ data.setValue(MailboxName, XQConversions::s60DescToQString(mPop3Account.iPopAccountName));
+ data.setValue(IncomingMailServer, XQConversions::s60DescToQString(mPop3Settings->ServerAddress()));
+#if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT)
+ data.setValue(IncomingMailUsesAuthentication, mPop3Settings->POP3Auth());
+#endif
+ data.setValue(IncomingPort, mPop3Settings->Port());
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ data.setValue(IncomingLoginName, XQConversions::s60Desc8ToQString(mImap4Settings->LoginName()));
+ data.setValue(IncomingPassword, XQConversions::s60Desc8ToQString(mImap4Settings->Password()));
+ data.setValue(MailboxName, XQConversions::s60DescToQString(
+ mImap4Account.iImapAccountName));
+ data.setValue(IncomingMailServer, XQConversions::s60DescToQString(
+ mImap4Settings->ServerAddress()));
+#if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT)
+ data.setValue(IncomingMailUsesAuthentication, mImap4Settings->IAMP4Auth());
+#endif
+ data.setValue(IncomingPort, mImap4Settings->Port());
+ data.setValue(FolderPath, XQConversions::s60Desc8ToQString(mImap4Settings->FolderPath()));
+ }
+
+ data.setValue(IncomingMailSecurityType, security());
+ data.setValue(MyName, XQConversions::s60DescToQString(mSmtpSettings->EmailAlias()));
+ data.setValue(EmailAlias, XQConversions::s60DescToQString(mSmtpSettings->EmailAlias()));
+ data.setValue(EmailAddress, XQConversions::s60DescToQString(mSmtpSettings->EmailAddress()));
+ data.setValue(ReplyAddress, XQConversions::s60DescToQString(mSmtpSettings->ReplyToAddress()));
+ data.setValue(OutgoingMailServer, XQConversions::s60DescToQString(mSmtpSettings->ServerAddress()));
+ data.setValue(OutgoingPort, mSmtpSettings->Port());
+ data.setValue(OutgoingLoginName, XQConversions::s60Desc8ToQString(mSmtpSettings->LoginName()));
+ data.setValue(OutgoingPassword, XQConversions::s60Desc8ToQString(mSmtpSettings->Password()));
+ data.setValue(UseOutgoingAuthentication, mSmtpSettings->SMTPAuth());
+ data.setValue(OutgoingMailUsesAuthentication, mSmtpSettings->SMTPAuth());
+ data.setValue(OutgoingSecureSockets, mSmtpSettings->SecureSockets());
+ data.setValue(OutgoingSSLWrapper, mSmtpSettings->SSLWrapper());
+ data.setValue(OutgoingMailSecurityType, XQConversions::s60Desc8ToQString(mSmtpSettings->TlsSslDomain()));
+ return true;
+}
+
+bool NmApiSettingsManagerPrivate::readCenRepSetting(NmApiMailboxSettingsData &data)
+{
+ bool ret = true;
+ QVariant tmp;
+ data.setValue(DownloadPictures, readFromCenRep(IpsServices::EmailKeyPreferenceDownloadPictures));
+ data.setValue(MessageDivider, readFromCenRep(IpsServices::EmailKeyPreferenceMessageDivider));
+
+ tmp = readFromCenRep(IpsServices::EmailKeyReceptionActiveProfile);
+ switch(tmp.toInt()){
+ case 0:
+ data.setValue(ReceptionActiveProfile, EmailClientApi::EmailProfileOffsetKUTD);
+ break;
+ case 1:
+ data.setValue(ReceptionActiveProfile, EmailClientApi::EmailProfileOffsetSE);
+ break;
+ case 2:
+ data.setValue(ReceptionActiveProfile, EmailClientApi::EmailProfileOffsetMF);
+ break;
+ case 3:
+ data.setValue(ReceptionActiveProfile, EmailClientApi::EmailProfileOffsetUD);
+ break;
+ default:
+ data.setValue(ReceptionActiveProfile, EmailClientApi::EmailProfileOffsetKUTD);
+ break;
+ };
+
+ data.setValue(ReceptionUserDefinedProfile, readFromCenRep(IpsServices::EmailKeyReceptionUserDefinedProfile));
+ data.setValue(ReceptionInboxSyncWindow, readFromCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionInboxSyncWindow));
+ data.setValue(ReceptionGenericSyncWindowInMessages, readFromCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionGenericSyncWindowInMessages));
+ data.setValue(ReceptionWeekDays, readFromCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionWeekDays));
+ data.setValue(ReceptionDayStartTime, readFromCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionDayStartTime));
+ data.setValue(ReceptionDayEndTime, readFromCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionDayEndTime));
+ data.setValue(ReceptionRefreshPeriodDayTime, readFromCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionRefreshPeriodDayTime));
+ data.setValue(ReceptionRefreshPeriodOther, readFromCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionRefreshPeriodOther));
+ data.setValue(UserNameHidden, readFromCenRep(IpsServices::EmailKeyUserNameHidden));
+ data.setValue(EmailNotificationState, readFromCenRep(IpsServices::EmailKeyEMNState));
+ data.setValue(FirstEmnReceived, readFromCenRep(IpsServices::EmailKeyFirstEmnReceived));
+ data.setValue(EmnReceivedNotSynced, readFromCenRep(IpsServices::EmailKeyEmnReceivedNotSynced));
+
+ QString aolState = alwaysOnlineState();
+ if(aolState.length()>0)
+ data.setValue(AlwaysOnlineState, aolState);
+
+ data.setValue(AoLastSuccessfulUpdate, readFromCenRep(IpsServices::EmailKeyAoLastSuccessfulUpdateL));
+ data.setValue(AoLastUpdateFailed, readFromCenRep(IpsServices::EmailKeyAoLastUpdateFailed));
+ data.setValue(AoUpdateSuccessfulWithCurSettings, readFromCenRep(IpsServices::EmailKeyAoUpdateSuccessfulWithCurSettings));
+ return ret;
+}
+
+/*!
+ Writes POP3/IMAP4 specific settings.
+ \param data consists of keys and values of settings.
+ */
+bool NmApiSettingsManagerPrivate::writeSettingL(const NmApiMailboxSettingsData &data)
+{
+ HBufC *tmp = 0;
+ HBufC8 *tmp8 = 0;
+ bool ret(false);
+ int key;
+ QVariant settingValue;
+ QList<int> keylist;
+ bool aliasSet = false;
+
+ keylist = data.listSettings();
+ for (int i = 0; i < keylist.size(); i++) {
+ key = keylist[i];
+ data.getValue(key, settingValue);
+ switch (key) {
+ case IncomingLoginName: {
+ tmp8 = XQConversions::qStringToS60Desc8(settingValue.toString());
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetLoginNameL(*tmp8);
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings->SetLoginNameL(*tmp8);
+ }
+ delete tmp8;
+ break;
+ }
+ case IncomingPassword: {
+ tmp8 = XQConversions::qStringToS60Desc8(settingValue.toString());
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetPasswordL(*tmp8);
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings->SetPasswordL(*tmp8);
+ }
+ delete tmp8;
+ break;
+ }
+ case MailboxName: {
+ tmp = XQConversions::qStringToS60Desc(settingValue.toString());
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Account.iPopAccountName.Copy(*tmp);
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Account.iImapAccountName.Copy(*tmp);
+ }
+ delete tmp;
+ break;
+ }
+ case IncomingMailServer: {
+ tmp = XQConversions::qStringToS60Desc(settingValue.toString());
+
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetServerAddressL(*tmp);
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings->SetServerAddressL(*tmp);
+ }
+ delete tmp;
+ break;
+ }
+ case IncomingMailUsesAuthentication: {
+#if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT)
+
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetPOP3Auth(settingValue.toBool());
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings->SetIAMP4Auth(settingValue.toBool());
+ }
+#endif
+ break;
+ }
+ case IncomingMailSecurityType: {
+ setSecurity(settingValue.toString());
+ break;
+ }
+ case IncomingPort: {
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetPort(settingValue.toInt());
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings->SetPort(settingValue.toInt());
+ }
+ break;
+ }
+ case OutgoingPort: {
+ mSmtpSettings->SetPort(settingValue.toInt());
+ break;
+ }
+ case IncomingSecureSockets: {
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetSecureSockets(settingValue.toBool());
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings->SetSecureSockets(settingValue.toBool());
+ }
+ break;
+ }
+ case IncomingSSLWrapper: {
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetSSLWrapper(settingValue.toBool());
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings->SetSSLWrapper(settingValue.toBool());
+ }
+ break;
+ }
+ case EmailAddress: {
+ tmp = XQConversions::qStringToS60Desc(settingValue.toString());
+ mSmtpSettings->SetEmailAddressL(*tmp);
+ break;
+ }
+ case ReplyAddress: {
+ tmp = XQConversions::qStringToS60Desc(settingValue.toString());
+ mSmtpSettings->SetReplyToAddressL(*tmp);
+ break;
+ }
+ case EmailAlias: {
+ QVariant tmpName;
+ if(data.getValue(MyName,tmpName)) {
+ if(tmpName.toString()
+ ==XQConversions::s60DescToQString(mSmtpSettings->EmailAlias())) {
+ aliasSet = true;
+ }
+ }
+ tmp = XQConversions::qStringToS60Desc(settingValue.toString());
+ mSmtpSettings->SetEmailAliasL(*tmp);
+ break;
+ }
+ case MyName: {
+ if(!aliasSet) {
+ tmp = XQConversions::qStringToS60Desc(settingValue.toString());
+ mSmtpSettings->SetEmailAliasL(*tmp);
+ }
+ break;
+ }
+ case OutgoingMailServer: {
+ tmp = XQConversions::qStringToS60Desc(settingValue.toString());
+ mSmtpSettings->SetServerAddressL(*tmp);
+ break;
+ }
+ case OutgoingLoginName: {
+ tmp8 = XQConversions::qStringToS60Desc8(settingValue.toString());
+ mSmtpSettings->SetLoginNameL(*tmp8);
+ break;
+ }
+ case OutgoingPassword: {
+ tmp8 = XQConversions::qStringToS60Desc8(settingValue.toString());
+ mSmtpSettings->SetPasswordL(*tmp8);
+ break;
+ }
+ case UseOutgoingAuthentication:
+ case OutgoingMailUsesAuthentication: {
+ mSmtpSettings->SetSMTPAuth(settingValue.toBool());
+ break;
+ }
+ case OutgoingSecureSockets: {
+ mSmtpSettings->SetSecureSockets(settingValue.toBool());
+ break;
+ }
+ case OutgoingSSLWrapper: {
+ mSmtpSettings->SetSSLWrapper(settingValue.toBool());
+ break;
+ }
+ case OutgoingMailSecurityType: {
+ tmp8 = XQConversions::qStringToS60Desc8(settingValue.toString());
+ mSmtpSettings->SetTlsSslDomainL(*tmp8);
+ break;
+ }
+ case FolderPath: {
+ tmp8 = XQConversions::qStringToS60Desc8(settingValue.toString());
+ mImap4Settings->SetFolderPathL(*tmp8);
+ break;
+ }
+ default: {
+ break;
+ }
+ };
+ }
+ ret = saveSettings();
+ return ret;
+}
+
+/*!
+Writes settings to central repository.
+\param data consists of keys and values of settings.
+ */
+bool NmApiSettingsManagerPrivate::writeSettingToCenRep(
+ const NmApiMailboxSettingsData &data)
+{
+ int key;
+ QVariant settingValue;
+ QList<int> keylist;
+
+ keylist = data.listSettings();
+ bool ret = false;
+ if(keylist.contains(ReceptionActiveProfile)) {
+ data.getValue(ReceptionActiveProfile,settingValue);
+ QVariant profileOffset = 0;
+ if(settingValue.toString() == EmailClientApi::EmailProfileOffsetKUTD) {
+ profileOffset=0;
+ } else if(settingValue.toString() == EmailClientApi::EmailProfileOffsetSE){
+ profileOffset = 1;
+ } else if (settingValue.toString() == EmailClientApi::EmailProfileOffsetMF){
+ profileOffset = 2;
+ } else if (settingValue.toString() == EmailClientApi::EmailProfileOffsetUD) {
+ profileOffset = 3;
+ }
+ ret = writeToCenRep(IpsServices::EmailKeyReceptionActiveProfile, profileOffset);
+ if(ret) {
+ calculateActiveProfileOffset();
+ }
+ }
+ if (ret) {
+ for (int i = 0; i < keylist.size(); i++) {
+ key = keylist[i];
+ data.getValue(key, settingValue);
+ switch (key) {
+ case DownloadPictures: {
+ ret = writeToCenRep(IpsServices::EmailKeyPreferenceDownloadPictures,
+ settingValue);
+ break;
+ }
+ case MessageDivider: {
+ ret = writeToCenRep(IpsServices::EmailKeyPreferenceMessageDivider, settingValue);
+ break;
+ }
+ case ReceptionUserDefinedProfile: {
+ ret = writeToCenRep(IpsServices::EmailKeyReceptionUserDefinedProfile,
+ settingValue);
+ break;
+ }
+ case ReceptionInboxSyncWindow: {
+ ret = writeToCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionInboxSyncWindow, settingValue);
+ break;
+ }
+ case ReceptionGenericSyncWindowInMessages: {
+ ret = writeToCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionGenericSyncWindowInMessages, settingValue);
+ break;
+ }
+ case ReceptionWeekDays: {
+ ret = writeToCenRep(mActiveProfileOffset + IpsServices::EmailKeyReceptionWeekDays,
+ settingValue);
+ break;
+ }
+ case ReceptionDayStartTime: {
+ ret = writeToCenRep(mActiveProfileOffset + IpsServices::EmailKeyReceptionDayStartTime,
+ settingValue);
+ break;
+ }
+ case ReceptionDayEndTime: {
+ ret = writeToCenRep(mActiveProfileOffset + IpsServices::EmailKeyReceptionDayEndTime,
+ settingValue);
+ break;
+ }
+ case ReceptionRefreshPeriodDayTime: {
+ ret = writeToCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionRefreshPeriodDayTime, settingValue);
+ break;
+ }
+ case ReceptionRefreshPeriodOther: {
+ ret = writeToCenRep(mActiveProfileOffset
+ + IpsServices::EmailKeyReceptionRefreshPeriodOther, settingValue);
+ break;
+ }
+ case UserNameHidden: {
+ ret = writeToCenRep(IpsServices::EmailKeyUserNameHidden, settingValue);
+ break;
+ }
+ case EmailNotificationState: {
+ ret = writeToCenRep(IpsServices::EmailKeyEMNState, settingValue);
+ break;
+ }
+ case FirstEmnReceived: {
+ ret = writeToCenRep(IpsServices::EmailKeyFirstEmnReceived, settingValue);
+ break;
+ }
+ case EmnReceivedNotSynced: {
+ ret = writeToCenRep(IpsServices::EmailKeyEmnReceivedNotSynced, settingValue);
+ break;
+ }
+ case AlwaysOnlineState: {
+ setAlwaysOnlineState(settingValue);
+ break;
+ }
+ case AoLastSuccessfulUpdate: {
+ ret = writeToCenRep(IpsServices::EmailKeyAoLastSuccessfulUpdateL, settingValue);
+ break;
+ }
+ case AoLastUpdateFailed: {
+ ret = writeToCenRep(IpsServices::EmailKeyAoLastUpdateFailed, settingValue);
+ break;
+ }
+ case AoUpdateSuccessfulWithCurSettings: {
+ ret = writeToCenRep(IpsServices::EmailKeyAoUpdateSuccessfulWithCurSettings,
+ settingValue);
+ break;
+ }
+ case ReceptionActiveProfile:
+ default: {
+ break;
+ }
+ };
+ }
+ }
+ return ret;
+}
+/*!
+ Stores the POP3/IMAP4 specific settings.
+ \return bool <true> when the settings were succesfully written, otherwise <false>.
+ */
+bool NmApiSettingsManagerPrivate::saveSettings()
+{
+ bool ret(false);
+ if (mMailboxType == NmApiMailboxTypePop) {
+ TRAPD(err, mAccount->SavePopSettingsL(mPop3Account, *mPop3Settings));
+ if (err == KErrNone) {
+ ret = true;
+ }
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ TRAPD(err, mAccount->SaveImapSettingsL(mImap4Account, *mImap4Settings));
+ if (err == KErrNone) {
+ ret = true;
+ }
+ }
+ return ret;
+}
+
+/*!
+ Reads a key value from the Central Repository.
+ \param key Key identifier.
+ \return the settings value for the given key.
+ */
+QVariant NmApiSettingsManagerPrivate::readFromCenRep(quint32 key) const
+{
+ XQCentralRepositorySettingsKey settingKey(IpsServices::EmailMailboxSettingRepository,
+ mMailboxOffset + key);
+ return mQSettingsManager->readItemValue(settingKey);
+}
+
+/*!
+ Writes a key value to the Central Repository.
+ \param key Key identifier.
+ \param value The settings value for the given key.
+ \return Returns <true> if the value was succesfully written, <false> if not.
+ */
+bool NmApiSettingsManagerPrivate::writeToCenRep(quint32 key, const QVariant &value) const
+{
+ XQCentralRepositorySettingsKey settingKey(IpsServices::EmailMailboxSettingRepository,
+ mMailboxOffset + key);
+ return mQSettingsManager->writeItemValue(settingKey, value);
+}
+
+void NmApiSettingsManagerPrivate::setSecurity(QString securityType)
+{
+ if (securityType == NmApiStartTls) {
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetSecureSockets(ETrue);
+ mPop3Settings->SetSSLWrapper(EFalse);
+ }
+ else {
+ mImap4Settings->SetSecureSockets(ETrue);
+ mImap4Settings->SetSSLWrapper(EFalse);
+ }
+ }
+ else if (securityType == NmApiSSLTls) {
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetSecureSockets(EFalse);
+ mPop3Settings->SetSSLWrapper(ETrue);
+ }
+ else {
+ mImap4Settings->SetSecureSockets(EFalse);
+ mImap4Settings->SetSSLWrapper(ETrue);
+ }
+ }
+ else {
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings->SetSecureSockets(EFalse);
+ mPop3Settings->SetSSLWrapper(EFalse);
+ }
+ else {
+ mImap4Settings->SetSecureSockets(EFalse);
+ mImap4Settings->SetSSLWrapper(EFalse);
+ }
+ }
+}
+
+QString NmApiSettingsManagerPrivate::security() const
+{
+ bool ss(false);
+ bool sslw(false);
+ QString securityType("");
+
+ if (mMailboxType == NmApiMailboxTypePop) {
+ ss = mPop3Settings->SecureSockets();
+ sslw = mPop3Settings->SSLWrapper();
+ }
+ else {
+ ss = mImap4Settings->SecureSockets();
+ sslw = mImap4Settings->SSLWrapper();
+ }
+
+ if (ss == true && sslw == false) {
+ securityType = NmApiStartTls;
+ }
+ else if (ss == false && sslw == true) {
+ securityType = NmApiSSLTls;
+ }
+ else {
+ securityType = NmApiSecurityOff;
+ }
+ return securityType;
+}
+
+/*!
+
+ */
+QString NmApiSettingsManagerPrivate::alwaysOnlineState() const
+{
+ TInt profile = IpsServices::EmailSyncProfileManualFetch;
+ QString ret = NmApiOff;
+
+ QVariant state;
+ TInt settingValue = -1;
+ state = readFromCenRep(IpsServices::EmailKeyReceptionActiveProfile);
+ settingValue = state.toInt();
+
+ if (settingValue >= 0) {
+ profile = settingValue;
+ if (profile != IpsServices::EmailSyncProfileManualFetch) {
+ ret = NmApiAlways;
+ }
+ }
+ return ret;
+}
+
+/*!
+
+ */
+void NmApiSettingsManagerPrivate::setAlwaysOnlineState(const QVariant state)
+{
+ //only allowed to switch state off, not on.
+ if (state.toString() == NmApiOff) {
+ writeToCenRep(IpsServices::EmailKeyReceptionActiveProfile,
+ IpsServices::EmailSyncProfileManualFetch);
+ }
+}
+
+void NmApiSettingsManagerPrivate::calculateMailboxOffset()
+{
+ // Find all the keys that match the criteria 0xZZZZZ000, where Z=don't care.
+ // This will give us all the keys that hold the mailbox ids, e.g. 0x00001000, 0x00002000, etc.
+ quint32 partialKey(0x00000000);
+ quint32 bitMask(0x00000FFF);
+ XQCentralRepositorySearchCriteria criteria(IpsServices::EmailMailboxSettingRepository,
+ partialKey, bitMask);
+ // Set the mailbox id is value criteria for the search.
+ criteria.setValueCriteria((int) mMailboxId);
+
+ // Find the keys.
+ XQCentralRepositoryUtils utils(*mQSettingsManager);
+ QList<XQCentralRepositorySettingsKey> foundKeys = utils.findKeys(criteria);
+
+ // We should only get one key as a result.
+ if (foundKeys.count() == 1) {
+ mMailboxOffset = foundKeys[0].key();
+ calculateActiveProfileOffset();
+ }
+ else {
+ mActiveProfileOffset = -1;
+ mMailboxOffset = -1;
+ }
+}
+
+/*!
+ Calculates the active reception schedule profile offset.
+ */
+void NmApiSettingsManagerPrivate::calculateActiveProfileOffset()
+{
+ QVariant activeProfile = readFromCenRep(IpsServices::EmailKeyReceptionActiveProfile);
+ mActiveProfileOffset = convertToProfileOffset(activeProfile.toInt());
+}
+
+/*!
+
+ */
+qint32 NmApiSettingsManagerPrivate::convertToProfileOffset(int profile) const
+{
+ quint32 profileOffset(0);
+ // Possible values are defined in ipssettingkeys.h
+ switch (profile) {
+ case 0: {
+ profileOffset = IpsServices::EmailProfileOffsetKUTD;
+ break;
+ }
+ case 1: {
+ profileOffset = IpsServices::EmailProfileOffsetSE;
+ break;
+ }
+ case 2: {
+ profileOffset = IpsServices::EmailProfileOffsetMF;
+ break;
+ }
+ case 3: {
+ profileOffset = IpsServices::EmailProfileOffsetUD;
+ break;
+ }
+ default: {
+ break;
+ }
+ };
+
+ return profileOffset;
+}
+
+bool NmApiSettingsManagerPrivate::checkAccountType()
+{
+ bool identified = false;
+
+ RArray<TImapAccount> imapAccounts;
+ CleanupClosePushL(imapAccounts);
+ TRAPD(err, mAccount->GetImapAccountsL(imapAccounts));
+ if (err == KErrNone) {
+ for (int i=0; i < imapAccounts.Count(); ++i) {
+ TImapAccount account = imapAccounts[i];
+ if (account.iImapService == mMailboxId) {
+ mImap4Account = account;
+ mMailboxType = NmApiMailboxTypeImap;
+ identified = true;
+ break;
+ }
+ }
+ }
+ CleanupStack::PopAndDestroy(&imapAccounts);
+
+ if (!identified) {
+ RArray<TPopAccount> popAccounts;
+ CleanupClosePushL(popAccounts);
+ TRAPD(err, mAccount->GetPopAccountsL(popAccounts));
+ if (err == KErrNone) {
+ for (int i = 0; i < popAccounts.Count(); ++i) {
+ TPopAccount account = popAccounts[i];
+ if (popAccounts[i].iPopService == mMailboxId) {
+ mPop3Account = account;
+ mMailboxType = NmApiMailboxTypePop;
+ identified = true;
+ break;
+ }
+ }
+ }
+ CleanupStack::PopAndDestroy(&popAccounts);
+ }
+
+ return identified;
+}
+
+void NmApiSettingsManagerPrivate::initAccountL()
+{
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mPop3Settings = new(ELeave) CImPop3Settings();
+ mAccount->LoadPopSettingsL(mPop3Account, *mPop3Settings);
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mImap4Settings = new(ELeave) CImImap4Settings();
+ mAccount->LoadImapSettingsL(mImap4Account, *mImap4Settings);
+ }
+
+ mSmtpSettings = new(ELeave) CImSmtpSettings();
+
+ if (mMailboxType == NmApiMailboxTypePop) {
+ mAccount->GetSmtpAccountL(mPop3Account.iSmtpService, mSmtpAccount);
+ }
+ else if (mMailboxType == NmApiMailboxTypeImap) {
+ mAccount->GetSmtpAccountL(mImap4Account.iSmtpService, mSmtpAccount);
+ }
+ mAccount->LoadSmtpSettingsL(mSmtpAccount, *mSmtpSettings);
+}
+
+} // end namespace
--- a/emailuis/nmailcpplugin/nmailcpplugin.pro Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailcpplugin/nmailcpplugin.pro Fri Jul 23 19:09:50 2010 +0300
@@ -70,6 +70,6 @@
TARGET.CAPABILITY = All -TCB
plugin.sources = nmailcpplugin.dll
-plugin.path = \resource\qt\plugins\controlpanel
+plugin.path = /resource/qt/plugins/controlpanel
DEPLOYMENT += plugin
--- a/emailuis/nmailui/conf/nmmessagelistviewitem.css Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/conf/nmmessagelistviewitem.css Fri Jul 23 19:09:50 2010 +0300
@@ -11,8 +11,8 @@
text-align: left;
}
NmMessageListViewItem::time {
- pref-height: var(hb-param-text-height-tiny);
- pref-width: 13un;
+ pref-height: var(hb-param-text-height-secondary);
+ pref-width: 12un;
size-policy: fixed, fixed;
text-align: right;
}
@@ -21,12 +21,12 @@
text-align: left;
}
NmMessageListViewItem::icon1::icon{
- pref-height: var(hb-param-graphic-size-secondary);
- pref-width: var(hb-param-graphic-size-secondary);
+ pref-height: var(hb-param-graphic-size-primary-small);
+ pref-width: var(hb-param-graphic-size-primary-small);
size-policy: fixed fixed;
}
NmMessageListViewItem::icon2::icon{
- pref-height: var(hb-param-graphic-size-secondary);
- pref-width: var(hb-param-graphic-size-secondary);
+ pref-height: var(hb-param-graphic-size-primary-small);
+ pref-width: var(hb-param-graphic-size-primary-small);
size-policy: fixed fixed;
}
--- a/emailuis/nmailui/conf/nmmessagelistviewitem.widgetml Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/conf/nmmessagelistviewitem.widgetml Fri Jul 23 19:09:50 2010 +0300
@@ -4,11 +4,11 @@
<meshitem src="sender" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)"/>
<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-bottom)"/>
-
- <meshitem src="time" srcEdge="CENTERV" dst="sender" dstEdge="CENTERV"/>
+
<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="BOTTOM" dst="sender" dstEdge="BOTTOM" 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-bottom)"/>
--- a/emailuis/nmailui/conf/nmviewerheader.widgetml Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/conf/nmviewerheader.widgetml Fri Jul 23 19:09:50 2010 +0300
@@ -10,7 +10,7 @@
<meshitem src="subject" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)"/>
<meshitem src="subject" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)"/>
- <meshitem src="subject" srcEdge="TOP" dst="sent" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)"/>
+ <meshitem src="subject" srcEdge="TOP" dst="sent" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)"/>
<meshitem src="subject" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)"/>
<meshitem src="prioicon" srcEdge="CENTERV" dst="sent" dstEdge="CENTERV"/>
--- a/emailuis/nmailui/inc/nmapplication.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/inc/nmapplication.h Fri Jul 23 19:09:50 2010 +0300
@@ -68,6 +68,9 @@
void pushView(NmBaseView *view);
void resetViewStack();
void hideApplication();
+
+private slots:
+ void updateActivity();
signals:
void applicationReady();
@@ -95,6 +98,8 @@
NmId mLastOperationMailbox;
HbMessageBox *mQueryDialog; // Owned
bool mBackButtonPressed;
+ NmId mCurrentMailboxId;
+ bool mActivityUpdateNeeded;
};
#endif // NMAPPLICATION_H
--- a/emailuis/nmailui/inc/nmattachmentpicker.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/inc/nmattachmentpicker.h Fri Jul 23 19:09:50 2010 +0300
@@ -21,6 +21,7 @@
#include <QObject>
class XQAiwRequest;
+class HbListWidgetItem;
/**
* This class manages launching of different attachment pickers
@@ -41,7 +42,9 @@
void fetchOther();
void fetchCameraStill();
void fetchCameraVideo();
-
+ void selectFetcher(HbListWidgetItem *listItem);
+
+
signals:
void attachmentsFetchOk(const QVariant &fileNames);
void attachmentsFetchError(int errorCode, const QString &errorMessage);
--- a/emailuis/nmailui/inc/nmeditorview.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/inc/nmeditorview.h Fri Jul 23 19:09:50 2010 +0300
@@ -45,6 +45,7 @@
class HbMessageBox;
class NmAttachmentManager;
class HbVkbHost;
+class HbListWidget;
class NmEditorView : public NmBaseView,
public NmActionObserver,
@@ -145,6 +146,8 @@
NmAttachmentPicker* mAttachmentPicker; // Owned
bool mCcBccFieldVisible;
QPointer<HbProgressDialog> mServiceSendingDialog; // Owned.
+ bool mIsNotFetchedBefore;
+ HbListWidget *mTBExtnContentWidget; // Owned
};
--- a/emailuis/nmailui/inc/nmmessagelistview.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/inc/nmmessagelistview.h Fri Jul 23 19:09:50 2010 +0300
@@ -80,6 +80,7 @@
void setMailboxName();
void createToolBar();
void setFolderName();
+ void updateSyncIcon();
private:
NmApplication &mApplication;
@@ -93,7 +94,6 @@
NmMessageListModelItem *mLongPressedItem; // Not owned
HbLabel *mNoMessagesLabel; // Not owned
HbGroupBox *mFolderLabel; // Not owned
- HbLabel *mSyncIcon; // Not owned
QModelIndex mActivatedIndex;
bool mViewReady;
NmFolderType mCurrentFolderType;
--- a/emailuis/nmailui/inc/nmmessagelistviewitem.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/inc/nmmessagelistviewitem.h Fri Jul 23 19:09:50 2010 +0300
@@ -60,7 +60,6 @@
HbIconItem *mIcon2; // Owned
qreal mPrimarySize;
qreal mSecondarySize;
- qreal mTinySize;
};
--- a/emailuis/nmailui/inc/nmuiheaders.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/inc/nmuiheaders.h Fri Jul 23 19:09:50 2010 +0300
@@ -92,6 +92,8 @@
#include <hbindicator.h>
#include <hbformatdialog.h>
#include <hbshrinkingvkbhost.h>
+#include <hbactivitymanager.h>
+#include <hbframebackground.h>
#include <cntservicescontact.h>
#include <xqservicerequest.h>
@@ -103,6 +105,8 @@
#include <xqsharablefile.h>
#include <fmfiledialog.h>
#include <xqaiwdecl.h>
+#include <afstorageglobals.h>
+#include <tstasksettings.h>
#include <nmcommon.h>
--- a/emailuis/nmailui/inc/nmviewerheader.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/inc/nmviewerheader.h Fri Jul 23 19:09:50 2010 +0300
@@ -26,7 +26,7 @@
class NmViewerView;
class HbTextItem;
class HbGroupBox;
-class HbTextEdit;
+class HbLabel;
class HbIconItem;
class NmViewerHeader : public HbWidget
@@ -43,10 +43,7 @@
void rescaleHeader(const QSizeF layoutReso);
void setView(NmViewerView* view);
void updateMessageData(NmMessage* message);
-
-private slots:
- void cursorPositionChanged(int oldPos, int newPos);
-
+
private:
void loadWidgets();
void setHeaderData();
@@ -63,7 +60,7 @@
HbTextItem *mSent; // Not owned
HbIconItem *mPrioIcon; // Not owned
HbGroupBox *mHeaderBox; // not owned
- HbTextEdit *mRecipientsBox; // Not owned
+ HbLabel *mRecipientsBox; // Not owned
NmViewerView *mViewerView; // Not owned
};
--- a/emailuis/nmailui/nmailui.pro Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/nmailui.pro Fri Jul 23 19:09:50 2010 +0300
@@ -33,6 +33,7 @@
LIBS += -lnmailuiwidgets
LIBS += -lnmsettingui
LIBS += -lnmutilities
+LIBS += -ltstaskmonitorclient
symbian*: {
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
--- a/emailuis/nmailui/src/nmapplication.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmapplication.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -21,6 +21,12 @@
static const QString NmSendServiceName = "nmail.com.nokia.symbian.IFileShare";
+// Delay before a screenshot is taken after view activation so that view has time to draw itself,
+// testing seems to indicate 500ms to be a good value
+static const int NmActivityUpdateDelayMs = 500;
+
+static const QString NmActivityName = "EmailInboxView";
+
/*!
\class NmApplication
\brief Application class, creates main window and handles view switching.
@@ -45,7 +51,8 @@
mSettingsViewLauncher(NULL),
mViewReady(false),
mQueryDialog(NULL),
- mBackButtonPressed(false)
+ mBackButtonPressed(false),
+ mActivityUpdateNeeded(false)
{
TRAP_IGNORE(mUiEngine = NmUiEngine::instance());
@@ -209,6 +216,9 @@
// NmAttachmentListWidget::paint().
mMainWindow->setOptimizationFlag(QGraphicsView::DontSavePainterState);
}
+
+ // installed to get ApplicationActivate/Deactivate events
+ QCoreApplication::instance()->installEventFilter(this);
}
/*!
@@ -241,6 +251,21 @@
// Exit application if no pending operations are on-going.
}
}
+ else if (event->type()==QEvent::ApplicationActivate) {
+ NM_COMMENT("NmApplication::eventFilter ApplicationActivate");
+
+ // Activity thumbnails must be shown again
+ if (mActivityUpdateNeeded) {
+ mActivityUpdateNeeded = false;
+ updateActivity();
+ }
+ }
+ else if (event->type()==QEvent::ApplicationDeactivate) {
+ NM_COMMENT("NmApplication::eventFilter ApplicationDeactivate");
+
+ // hide the sync indicator when app goes to background
+ mUiEngine->enableSyncIndicator(false);
+ }
if (!consumed) {
consumed = QObject::eventFilter(obj, event);
@@ -288,6 +313,7 @@
if (hideView) {
mMainWindow->removeView(hideView);
}
+ QTimer::singleShot(NmActivityUpdateDelayMs, this, SLOT(updateActivity()));
}
}
@@ -330,6 +356,19 @@
// hide the sync indicator as well
mUiEngine->enableSyncIndicator(false);
+
+ // Hide the mail from the task switcher
+ TsTaskSettings taskSettings;
+ taskSettings.setVisibility(false);
+
+ // Remove also the mailbox item from the task switcher
+ HbApplication* hbApp = dynamic_cast<HbApplication*>(parent());
+ if (hbApp) {
+ hbApp->activityManager()->removeActivity(NmActivityName);
+ }
+
+ // Update the activity when needed
+ mActivityUpdateNeeded = true;
}
/*!
@@ -386,6 +425,7 @@
mActiveViewId=showView->nmailViewId();
// Perform send animation if requested.
mEffects->startEffect(NmUiEffects::NmEditorSendMessageAnimation);
+ QTimer::singleShot(NmActivityUpdateDelayMs, this, SLOT(updateActivity()));
}
delete view;
@@ -442,6 +482,8 @@
// Check the validity of start parameter object.
if (startParam) {
+
+ mCurrentMailboxId = startParam->mailboxId();
if (startParam->service() && mMainWindow) {
// When the message list is started as a service previous views
@@ -552,6 +594,9 @@
{
NM_FUNCTION;
+ HbApplication* hbApp = dynamic_cast<HbApplication*>(parent());
+ hbApp->activityManager()->removeActivity("EmailInboxView");
+
delete mSendServiceInterface;
mSendServiceInterface = NULL;
delete mSendServiceInterface2;
@@ -679,6 +724,7 @@
if( mailboxMetaData ) {
// Launch.
mSettingsViewLauncher->launchSettingsView(mLastOperationMailbox, mailboxMetaData->name());
+ QTimer::singleShot(NmActivityUpdateDelayMs, this, SLOT(updateActivity()));
}
}
}
@@ -695,3 +741,29 @@
NM_COMMENT(QString("NmApplication::updateVisibilityState() : mForegroundService == %1").arg(mForegroundService));
return mForegroundService;
}
+
+/*!
+ Update the thumbnail in the task switcher
+*/
+void NmApplication::updateActivity()
+{
+ NmMailboxMetaData *meta = mUiEngine->mailboxById(mCurrentMailboxId);
+ HbApplication* hbApp = dynamic_cast<HbApplication*>(parent());
+ if (hbApp) {
+ if (meta) {
+ TsTaskSettings tasksettings;
+ tasksettings.setVisibility(false);
+ QVariantHash metadata;
+ metadata.insert(ActivityScreenshotKeyword, QPixmap::grabWidget(mainWindow(), mainWindow()->rect()));
+ metadata.insert(ActivityApplicationName, meta->name());
+ metadata.insert(ActivityVisibility, true);
+ hbApp->activityManager()->removeActivity(NmActivityName);
+ hbApp->activityManager()->addActivity(NmActivityName, QVariant(), metadata);
+ }
+ else {
+ hbApp->activityManager()->removeActivity(NmActivityName);
+ TsTaskSettings tasksettings;
+ tasksettings.setVisibility(true);
+ }
+ }
+}
--- a/emailuis/nmailui/src/nmattachmentpicker.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmattachmentpicker.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -41,32 +41,32 @@
NmAttachmentPicker::~NmAttachmentPicker()
{
NM_FUNCTION;
-
+
delete mRequest;
}
/*!
- Send request to start Photo picker
+ Send request to start Photo picker
*/
void NmAttachmentPicker::fetchImage()
{
NM_FUNCTION;
-
+
fetch(XQI_IMAGE_FETCH, XQOP_IMAGE_FETCH);
}
/*!
- Send request to start Music picker
+ Send request to start Music picker
*/
void NmAttachmentPicker::fetchAudio()
{
NM_FUNCTION;
-
- fetch(XQI_MUSIC_FETCH, XQOP_MUSIC_FETCH);
+
+ fetch(XQI_MUSIC_FETCH, XQOP_MUSIC_FETCH);
}
/*!
- Send request to start Video picker
+ Send request to start Video picker
*/
void NmAttachmentPicker::fetchVideo()
{
@@ -75,19 +75,17 @@
}
/*!
- Send request to start general file picker
+ Send request to start general file picker
*/
void NmAttachmentPicker::fetchOther()
{
NM_FUNCTION;
-
+
QString path;
- path = FmFileDialog::getSaveFileName(0, hbTrId("txt_mail_dialog_select_file"));
-
- if (!path.isEmpty()) {
- QString temp = QDir::toNativeSeparators(path);
- emit attachmentsFetchOk(QVariant(temp));
- }
+ path = FmFileDialog::getOpenFileName(0, hbTrId("txt_mail_dialog_select_file"));
+
+ QString temp = QDir::toNativeSeparators(path);
+ emit attachmentsFetchOk(QVariant(temp));
}
/*!
@@ -120,36 +118,36 @@
bool allowModeSwitch(false); //not allowed to change
bool allowCameraSwitch(true); //allow changes
bool allowQualityChange(true); //allow changes
-
+
QVariantMap parameters;
parameters.insert(XQCAMERA_INDEX, cameraIndex);
parameters.insert(XQCAMERA_QUALITY, quality);
parameters.insert(XQCAMERA_MODE_SWITCH, allowModeSwitch);
parameters.insert(XQCAMERA_INDEX_SWITCH, allowCameraSwitch);
- parameters.insert(XQCAMERA_QUALITY_CHANGE, allowQualityChange);
-
+ parameters.insert(XQCAMERA_QUALITY_CHANGE, allowQualityChange);
+
QList<QVariant> args;
args << mode;
args << parameters;
-
+
fetch(XQI_CAMERA_CAPTURE, "capture(int,QVariantMap)", &args);
}
/*!
- Construct & send appmgr request to start appropriate picker
+ Construct & send appmgr request to start appropriate picker
param <interface> the interface to be connected to
param <operation> the operation of the interface
param <args> the arguments that needed by the operation
*/
-void NmAttachmentPicker::fetch(const QString &interface,
+void NmAttachmentPicker::fetch(const QString &interface,
const QString &operation, const QList<QVariant> *args)
{
NM_FUNCTION;
-
+
delete mRequest;
mRequest = NULL;
XQApplicationManager appMgr;
mRequest = appMgr.create(interface, operation, true);
-
+
if (mRequest) {
mRequest->setSynchronous(false);
if (args) {
@@ -160,7 +158,30 @@
connect(mRequest, SIGNAL(requestError(int, const QString&)),
this, SIGNAL(attachmentsFetchError(int, const QString&)));
-
+
mRequest->send();
- }
+ }
}
+
+/*!
+ Launch the correct fetcher based on the clicked list item.
+*/
+void NmAttachmentPicker::selectFetcher(HbListWidgetItem *listItem)
+{
+ QString itemText = listItem->text();
+ if (itemText == hbTrId("txt_mail_list_photo")) {
+ fetchImage();
+ }
+ else if (itemText == hbTrId("txt_mail_list_music")) {
+ fetchAudio();
+ }
+ else if (itemText == hbTrId("txt_mail_list_video")) {
+ fetchVideo();
+ }
+ else if (itemText == hbTrId("txt_mail_list_other")) {
+ QMetaObject::invokeMethod(this, "fetchOther", Qt::QueuedConnection);
+ }
+ else if (itemText == hbTrId("txt_mail_list_new_photo")) {
+ fetchCameraStill();
+ }
+}
--- a/emailuis/nmailui/src/nmeditorheader.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorheader.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -406,11 +406,12 @@
{
NM_FUNCTION;
+ mAttachmentList->insertAttachment(fileName, fileSize, nmid);
+
if (!mAttachmentList->listWidget().isVisible()) {
mAttachmentList->listWidget().show();
}
- mAttachmentList->insertAttachment(fileName, fileSize, nmid);
sendHeaderHeightChanged();
}
--- a/emailuis/nmailui/src/nmeditorview.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorview.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -18,7 +18,10 @@
// 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 = "editorview";
+
+// extension list item frame.
+static const QString NmPopupListFrame = "qtg_fr_popup_list_normal";
static const QString NmDelimiter("; ");
@@ -52,7 +55,8 @@
mQueryDialog(NULL),
mAttachmentPicker(NULL),
mCcBccFieldVisible(false),
- mServiceSendingDialog(NULL)
+ mServiceSendingDialog(NULL),
+ mIsNotFetchedBefore(true)
{
NM_FUNCTION;
@@ -393,20 +397,23 @@
{
NM_FUNCTION;
- if (startParam.editorStartMode() == NmUiEditorForward
- || startParam.editorStartMode()== NmUiEditorReply
- || startParam.editorStartMode() == NmUiEditorReplyAll) {
+ if (mIsNotFetchedBefore == true) {
+ if (startParam.editorStartMode() == NmUiEditorForward
+ || startParam.editorStartMode()== NmUiEditorReply
+ || startParam.editorStartMode() == NmUiEditorReplyAll) {
- fetchProgressDialogShow();
- mAttaManager.clearObserver();
- mAttaManager.setObserver(this);
- mAttaManager.fetchAllMessageParts(
- startParam.mailboxId(),
- startParam.folderId(),
- startParam.messageId());
- }
- else {
- startMessageCreation(startParam);
+ fetchProgressDialogShow();
+ mAttaManager.clearObserver();
+ mAttaManager.setObserver(this);
+ mAttaManager.fetchAllMessageParts(
+ startParam.mailboxId(),
+ startParam.folderId(),
+ startParam.messageId());
+ mIsNotFetchedBefore = false;
+ }
+ else {
+ startMessageCreation(startParam);
+ }
}
}
@@ -891,32 +898,30 @@
if (extension && mAttachmentPicker) {
connect(mAttachmentPicker, SIGNAL(attachmentsFetchOk(const QVariant &)),
this, SLOT(onAttachmentReqCompleted(const QVariant &)));
-
- HbAction* actionPhoto =
- extension->addAction(hbTrId("txt_mail_list_photo"), extension, SLOT(close()));
- connect(actionPhoto, SIGNAL(triggered()), mAttachmentPicker, SLOT(fetchImage()));
+
+ list[i]->setToolBarExtension(extension);
- HbAction* actionMusic =
- extension->addAction(hbTrId("txt_mail_list_music"), extension, SLOT(close()));
- connect(actionMusic, SIGNAL(triggered()), mAttachmentPicker, SLOT(fetchAudio()));
-
- HbAction* actionVideo =
- extension->addAction(hbTrId("txt_mail_list_video"), extension, SLOT(close()));
- connect(actionVideo, SIGNAL(triggered()), mAttachmentPicker, SLOT(fetchVideo()));
+ //content widget to get the items to a list
+ mTBExtnContentWidget = new HbListWidget();
+ mTBExtnContentWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- HbAction* actionOther =
- extension->addAction(hbTrId("txt_mail_list_other"), extension, SLOT(close()));
- connect(actionOther, SIGNAL(triggered()), mAttachmentPicker, SLOT(fetchOther()));
+ mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_photo"));
+ mTBExtnContentWidget->addItem(hbTrId("txt_mail_list_music"));
+ 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);
- HbAction* actionCameraStill =
- extension->addAction(hbTrId("txt_mail_list_new_photo"), extension, SLOT(close()));
- connect(actionCameraStill, SIGNAL(triggered()), mAttachmentPicker, SLOT(fetchCameraStill()));
+ connect(mTBExtnContentWidget, SIGNAL(activated(HbListWidgetItem*)),
+ mAttachmentPicker, SLOT (selectFetcher(HbListWidgetItem*)));
- HbAction* actionCameraVideo =
- extension->addAction(hbTrId("txt_mail_list_new_video"), extension, SLOT(close()));
- connect(actionCameraVideo, SIGNAL(triggered()), mAttachmentPicker, SLOT(fetchCameraVideo()));
+ connect(mTBExtnContentWidget, SIGNAL(activated(HbListWidgetItem*)),
+ extension, SLOT(close()));
- list[i]->setToolBarExtension(extension);
+ extension->setContentWidget(mTBExtnContentWidget);
}
}
}
--- a/emailuis/nmailui/src/nmmessagelistview.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistview.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -146,6 +146,8 @@
// Menu needs one dummy item so that aboutToShow signal is emitted.
NmAction *dummy = new NmAction(0);
menu()->addAction(dummy);
+ // Set sync icon if needed
+ updateSyncIcon();
}
else {
NM_ERROR(1,"nmailui: resource loading failed");
@@ -228,13 +230,13 @@
// Check start parameter validity, message view cannot
// be updated if given parameter is zero.
- if (startParam&&startParam->viewId()==NmUiViewMessageList&&
+ if (startParam&&startParam->viewId()==NmUiViewMessageList &&
startParam->folderId()!=0) {
// Delete existing start parameter data
delete mStartParam;
- mStartParam=NULL;
+ mStartParam = NULL;
// Store new start parameter data
- mStartParam=startParam;
+ mStartParam = startParam;
// Disconnect signals from previous model
QObject::disconnect(mMessageListModel, SIGNAL(rowsInserted(const QModelIndex&,int,int)),
this, SLOT(itemsAdded(const QModelIndex&,int,int)));
@@ -244,9 +246,20 @@
this, SLOT(reloadViewContents(NmUiStartParam*)));
// Update model pointer and refresh mailbox with new model
mMessageListModel = &mUiEngine.messageListModel(startParam->mailboxId(), startParam->folderId());
+
refreshList();
- // Refresh the mailboxname
+
+ // Refresh the mailbox name
setMailboxName();
+
+ // Store active folder type
+ mCurrentFolderType = mUiEngine.folderTypeById(startParam->mailboxId(),startParam->folderId());
+
+ // Update folder name
+ setFolderName();
+
+ // Set sync icon if needed
+ updateSyncIcon();
}
else {
NM_ERROR(1,"nmailui: invalid message list start parameter");
@@ -354,7 +367,7 @@
// Reload view, ownership of the startparams is passed and old startparams
// are deleted within reloadViewContents function
reloadViewContents(startParam);
- //Set folder text to status bar
+ // Set folder text to status bar
setFolderName();
}
}
@@ -616,7 +629,7 @@
{
NM_FUNCTION;
- if (mStartParam&&mFolderLabel){
+ if (mStartParam && mFolderLabel){
switch (mCurrentFolderType) {
case NmFolderOutbox:
{
@@ -738,3 +751,19 @@
}
}
+/*!
+ Updates sync icon based on sync status from the plugin.
+*/
+void NmMessageListView::updateSyncIcon()
+{
+ if (mStartParam) {
+ NmSyncState syncState = mUiEngine.syncState(mStartParam->mailboxId());
+ if (syncState==Synchronizing) {
+ mUiEngine.enableSyncIndicator(true);
+ }
+ else {
+ mUiEngine.enableSyncIndicator(false);
+ }
+ }
+}
+
--- a/emailuis/nmailui/src/nmmessagelistviewitem.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistviewitem.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -36,8 +36,7 @@
mIcon1(NULL),
mIcon2(NULL),
mPrimarySize(0),
- mSecondarySize(0),
- mTinySize(0)
+ mSecondarySize(0)
{
NM_FUNCTION;
}
@@ -276,10 +275,6 @@
if (found) {
mSecondarySize = currentSize;
}
- found = style()->parameter(QString("hb-param-text-height-tiny"), currentSize );
- if (found) {
- mTinySize = currentSize;
- }
}
/*!
@@ -304,10 +299,6 @@
}
mSubject->setFontSpec(fontSpec);
mSubject->setTextColor(colorRole);
-
- if (mTinySize) {
- fontSpec.setTextHeight(mTinySize);
- }
mTime->setFontSpec(fontSpec);
mTime->setTextColor(colorRole);
}
--- a/emailuis/nmailui/src/nmmessagesearchlistview.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagesearchlistview.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -673,6 +673,14 @@
mUiEngine.search(mStartParam->mailboxId(), searchStrings);
+ // Hide the virtual keyboard
+ QInputContext *ic = qApp->inputContext();
+ if (ic) {
+ QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel);
+ ic->filterEvent(closeEvent);
+ delete closeEvent;
+ }
+
// Hide the "no messages" label if visible and dim the search input.
noMessagesLabelVisibility(false);
setSearchInputMode(NmDimmedMode);
--- a/emailuis/nmailui/src/nmviewerheader.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerheader.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -19,6 +19,7 @@
#include "nmuiheaders.h"
static const qreal NmHeaderLineOpacity = 0.4;
+static const int NmTextWrapWordOrAnywhere = 4;
/*!
\class NmViewerHeader
@@ -256,19 +257,12 @@
if (mHeaderBox) { // Initialize recipient box
if (!mRecipientsBox){
- mRecipientsBox = new HbTextEdit();
+ mRecipientsBox = new HbLabel();
HbStyle::setItemName(mRecipientsBox, "recipients");
- mRecipientsBox->setContextMenuFlags(0);
- mRecipientsBox->setReadOnly(true);
mRecipientsBox->setFontSpec(HbFontSpec(HbFontSpec::Secondary));
- // Set text wrapping for from/to/cc address fields using text document
- QTextOption textOption = mRecipientsBox->document()->defaultTextOption();
- textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
- mRecipientsBox->document()->setDefaultTextOption(textOption);
+ mRecipientsBox->setTextWrapping((Hb::TextWrapping)NmTextWrapWordOrAnywhere);
}
- connect(mRecipientsBox, SIGNAL(cursorPositionChanged(int, int)),
- this, SLOT(cursorPositionChanged(int, int)));
-
+
// Set recipients to text edit field as html
NmAddress sender = mMessage->envelope().sender();
if (mMessage) {
@@ -276,7 +270,6 @@
mMessage->envelope().toRecipients(),
mMessage->envelope().ccRecipients()));
}
- mRecipientsBox->setCursorVisibility(Hb::TextCursorHidden);
mHeaderBox->setContentWidget(mRecipientsBox);
// Set box collapsed as default
mHeaderBox->setCollapsed(true);
@@ -295,7 +288,7 @@
QString result;
result.append("<html><body link=\"blue\" topmargin=\"0\" leftmargin=\"0\" marginheight=\"0\"");
result.append("marginwidth=\"0\">");
- result.append("<font face=\"");
+ result.append("<font color=\"black\" face=\"");
result.append("Nokia Sans");
result.append("\"size=\"3\">");
// Set text in HTML format based on layout direction
@@ -310,7 +303,9 @@
int reciCount = to.count();
for (int i=0; i < reciCount; i++) {
result.append(addressToDisplay(to[i]));
- result.append(" ");
+ if (i!=reciCount-1) {
+ result.append(" ");
+ }
}
reciCount = cc.count();
if (reciCount) {
@@ -319,7 +314,9 @@
result.append(" </b>");
for (int i=0; i < reciCount; i++) {
result.append(addressToDisplay(cc[i]));
- result.append(" ");
+ if (i!=reciCount-1) {
+ result.append(" ");
+ }
}
}
}
@@ -334,7 +331,9 @@
int reciCount = to.count();
for (int i=0; i < reciCount; i++) {
result.append(addressToDisplay(to[i]));
- result.append("; ");
+ if (i!=reciCount-1) {
+ result.append("; ");
+ }
}
reciCount = cc.count();
if (reciCount) {
@@ -343,7 +342,9 @@
result.append(" </b>");
for (int i=0; i < reciCount; i++) {
result.append(addressToDisplay(cc[i]));
- result.append("; ");
+ if (i!=reciCount-1) {
+ result.append("; ");
+ }
}
}
}
@@ -374,19 +375,3 @@
return ret;
}
-/*!
- Function handles cursor position changes in header group box.
- E.g link handler.
-*/
-void NmViewerHeader::cursorPositionChanged(int oldPos, int newPos)
-{
- NM_FUNCTION;
-
- Q_UNUSED(oldPos);
- QString string = mRecipientsBox->anchorAt(newPos);
- if (mViewerView&&string.contains("mailto:",Qt::CaseSensitive)){
- QUrl url(string);
- mViewerView->linkClicked(url);
- }
-}
-
--- a/emailuis/nmailuiwidgets/inc/nmailuiwidgetsheaders.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailuiwidgets/inc/nmailuiwidgetsheaders.h Fri Jul 23 19:09:50 2010 +0300
@@ -47,6 +47,7 @@
#include <hbinstance.h>
#include <hbcolorscheme.h>
#include <hbtapgesture.h>
+#include <hbevent.h>
// nmail
#include <nmaddress.h>
--- a/emailuis/nmailuiwidgets/inc/nmattachmentlistwidget.h Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailuiwidgets/inc/nmattachmentlistwidget.h Fri Jul 23 19:09:50 2010 +0300
@@ -50,6 +50,9 @@
void handleLongPressed(QPointF point);
void handleItemActivated();
void orientationChanged(Qt::Orientation);
+
+protected:
+ virtual void changeEvent(QEvent *event);
signals:
void itemActivated(int index);
@@ -61,6 +64,7 @@
int findItem(const QObject *obj);
void insertItemToLayout(NmAttachmentListItem* item);
void rearrangeLayout();
+ QColor checkColor();
private:
Q_DISABLE_COPY(NmAttachmentListWidget)
--- a/emailuis/nmailuiwidgets/src/nmattachmentlistitem.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmattachmentlistitem.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -63,6 +63,9 @@
NM_FUNCTION;
mTextColor=color;
+ if (mTextColor.isValid() && mFileNameText){
+ mFileNameText->setTextColor(mTextColor);
+ }
}
/*!
--- a/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -19,6 +19,7 @@
static const QString FILE_PATH_DOCML = ":nmattachmentlistwidget.docml";
static const QString ATTACHMENT_WIDGET = "nmattachmentlistwidget";
+static const QString NmAttachmentTextColor = "qtc_default_main_pane_normal";
static const qreal NmItemLineOpacity = 0.4;
@@ -156,9 +157,7 @@
connect(item, SIGNAL(itemLongPressed(QPointF)), this, SLOT(handleLongPressed(QPointF)));
//set texts
- if (mTextColor.isValid()){
- item->setTextColor(mTextColor);
- }
+ item->setTextColor(checkColor());
item->setFileNameText(fileName);
item->setFileSizeText(fileSize);
@@ -264,15 +263,7 @@
// Use text color as a line color if set, otherwise use theme
// normal list content color.
- if (mTextColor.isValid()){
- painter->setPen(mTextColor);
- }
- else{
- QColor col = HbColorScheme::color("list_item_content_normal");
- if (col.isValid()) {
- painter->setPen(col);
- }
- }
+ painter->setPen(checkColor());
painter->setOpacity(NmItemLineOpacity);
// Draw line after each item
int rowCount = mLayout->rowCount();
@@ -467,7 +458,7 @@
NM_ERROR(1,"NmAttachmentListWidget::rearrangeLayout: Layout loading failed!");
return;
}
-
+
//remove all items from the layout
int count(mLayout->count());
for(int i = count - 1; i >= 0; --i){
@@ -475,7 +466,41 @@
}
//then add them back
+ QColor textColor = checkColor();
foreach(NmAttachmentListItem *item, mItemList){
+ item->setTextColor(textColor);
insertItemToLayout(item);
}
}
+
+/*!
+ Helper function to set text color
+*/
+QColor NmAttachmentListWidget::checkColor()
+{
+ NM_FUNCTION;
+
+ QColor retColor;
+
+ if (mTextColor.isValid()){
+ retColor = mTextColor;
+ }
+ else {
+ retColor = HbColorScheme::color(NmAttachmentTextColor);
+ }
+ return retColor;
+}
+
+/*!
+ \reimp
+*/
+
+void NmAttachmentListWidget::changeEvent(QEvent *event)
+{
+ NM_FUNCTION;
+
+ if (event->type() == HbEvent::ThemeChanged) {
+ rearrangeLayout();
+ }
+ return HbWidgetBase::changeEvent(event);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/basepluginresourceloader.h Fri Jul 23 19:09:50 2010 +0300
@@ -0,0 +1,18 @@
+/*
+* 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 "../emailservices/emailstore/base_plugin/inc/basepluginresourceloader.h"
\ No newline at end of file
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -207,6 +207,7 @@
case EStateFetchOnHold:
break;
case EStateDisconnect:
+ NM_COMMENT("CIpsSosAOImapAgent: disconnecting");
if ( !iDoNotDisconnect )
{
CancelAllAndDisconnectL();
@@ -218,6 +219,7 @@
}
break;
case EStateCompleted:
+ NM_COMMENT("CIpsSosAOImapAgent: completed");
TRAP_IGNORE( iOpResponse.OperationCompletedL( iError ) );
SignalSyncCompleted( iServiceId, iError );
iError = KErrNone;
@@ -330,6 +332,7 @@
LoadSettingsL( );
if ( !IsConnected() )
{
+ NM_COMMENT("CIpsSosAOImapAgent: starting sync");
TPckg<MMsvImapConnectionObserver*> parameter(this);
// connect and synchronise starts background sync or idle
CMsvEntrySelection* sel = new ( ELeave ) CMsvEntrySelection();
@@ -345,10 +348,11 @@
}
else
{
+ NM_COMMENT("CIpsSosAOImapAgent: already connected do not sync");
// do not do anything if we are connected, especially do never
// try to sync if sync is is already started (ex. from ips plugin)
// that cause problems with imap flags etc.
- iError = KErrNone;
+ iError = KErrCancel;
iState = EStateCompleted;
SetActiveAndCompleteThis();
}
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -319,11 +319,14 @@
( (iIsRoaming && CanConnectIfRoamingL())||
!iIsRoaming ) )
{
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventStart");
event = EEventNop;
iAgent->LoadSettingsL();
iTimer->Cancel();
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", KIpsSosAOStartDelaySeconds);
iTimer->After( KIpsSosAOStartDelaySeconds );
iState = EStateWaitSyncStart;
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
}
while ( event != EEventNop && iState != EStateError )
@@ -331,14 +334,17 @@
switch ( event )
{
case EEventTimerFired:
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventTimerFired");
event = HandleTimerFiredL();
break;
case EEventStartSync:
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventStartSync");
if ( iState == EStateWaitSyncStart )
{
iError = KErrNone;
iAgent->StartSyncL();
iState = EStateSyncOngoing;
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateSyncOngoing");
}
else if ( iState == EStateIdleAndWaitCommands )
{
@@ -360,7 +366,9 @@
//</QMail>
if ( type == EAOCConnectAfter )
{
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
iState = EStateWaitSyncStart;
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", seconds);
iTimer->After( seconds );
SetEmnReceivedFlagL( ETrue );
@@ -370,6 +378,7 @@
iError = KErrNone;
iAgent->StartSyncL();
iState = EStateSyncOngoing;
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateSyncOngoing");
}
//<QMail>
CleanupStack::PopAndDestroy( 2, settings );
@@ -379,6 +388,7 @@
event = EEventNop;
break;
case EEventFetchMessages:
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventFetchMessages");
if ( ( iState == EStateWaitSyncStart ||
iState == EStateIdleAndWaitCommands ) &&
iFetchMsgArray.Count() > 0 )
@@ -386,6 +396,7 @@
iError = KErrNone;
iAgent->StartFetchMessagesL( iFetchMsgArray );
iFetchMsgArray.Reset();
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateFetchOngoing");
iState = EStateFetchOngoing;
}
else
@@ -396,16 +407,20 @@
event = EEventNop;
break;
case EEventOperationCompleted:
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventOperationCompleted");
event = HandleOperationCompletionL();
break;
case EEventSuspendOperations:
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventSuspendOperations");
SuspendOperations();
iState = EStateSuspended;
event = EEventNop;
break;
case EEventContinueOperations:
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventContinueOperations");
if ( iState == EStateSuspended )
{
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", KIpsSosAOContinueWaitTime);
iTimer->After( KIpsSosAOContinueWaitTime );
}
else
@@ -415,9 +430,11 @@
// ignore if in other states
break;
case EEventStopAndRemoveOps:
+ NM_COMMENT("CIpsSosAOMBoxLogic: event: EEventStopAndRemoveOps");
// notify deletion
iAgent->CancelAllAndDisconnectL();
iTimer->Cancel();
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateError");
iState = EStateError;
event = EEventNop;
break;
@@ -475,12 +492,14 @@
agentState == CIpsSosAOBaseAgent::EStatePopulateOnHold ) )
{
iAgent->ContinueHoldOperations();
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateSyncOngoing");
iState = EStateSyncOngoing;
}
else if ( iState == EStateSuspended &&
agentState == CIpsSosAOBaseAgent::EStateFetchOnHold )
{
iAgent->ContinueHoldOperations();
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateFetchOngoing");
iState = EStateFetchOngoing;
}
else
@@ -506,12 +525,18 @@
//</Qmail>
if ( iState == EStateSyncOngoing )
{
+ INFO_1("CIpsSosAOMBoxLogic: operation completed error: %d", iError);
+ bool doSaveSyncTime = EFalse;
if ( !( iError == KErrNone || iError == KErrCancel ) )
{
++iErrorCounter;
}
else
{
+ if (iError == KErrNone)
+ {
+ doSaveSyncTime = ETrue;
+ }
iError = KErrNone;
iErrorCounter = 0;
}
@@ -529,6 +554,7 @@
settings->SetEmnReceivedButNotSyncedFlag( EFalse );
//</QMail>
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateError");
iState = EStateError;
iErrorCounter = 0;
}
@@ -542,14 +568,17 @@
if ( state == IpsServices::EMailAoOff )
{
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateIdleAndWaitCommands");
iState = EStateIdleAndWaitCommands;
}
else
{
if( !iTimer->IsActive() )
{
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", KIpsSosAOReTryInterval);
iTimer->After( KIpsSosAOReTryInterval );
}
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
iState = EStateWaitSyncStart;
}
@@ -567,7 +596,10 @@
{
// no errors
// update successfull sync time to settings
- SaveSuccessfulSyncTimeL();
+ if (doSaveSyncTime)
+ {
+ SaveSuccessfulSyncTimeL();
+ }
// and adjust timer to sync interval
CalculateToNextIntervalL();
}
@@ -577,6 +609,7 @@
iError = KErrNone;
if ( iTimer->IsActive() )
{
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
iState = EStateWaitSyncStart;
}
else
@@ -600,11 +633,13 @@
{
iAgent->HoldOperations();
}
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateSuspended");
iState = EStateSuspended;
// set suspend watchdog, if clien not continue this
// ensure ao logic to continue
if ( !iTimer->IsActive() )
{
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", KIpsSosAOSuspendWatchdogTime);
iTimer->After( KIpsSosAOSuspendWatchdogTime );
}
}
@@ -649,7 +684,7 @@
{
//<Qmail>
FUNC_LOG;
- iTimer->Cancel();
+ iTimer->Cancel();
TMBoxLogicEvent event = EEventNop;
TTimeIntervalSeconds secondsToConnect = CalculateScheduledSyncTimeL();
@@ -679,7 +714,10 @@
secsFromLastSync.Int() < interval ) )
{
// adjust timer to correct sync time
- iTimer->After(interval - secsFromLastSync.Int());
+ TInt syncAfter = interval - secsFromLastSync.Int();
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", syncAfter);
+ iTimer->After(syncAfter);
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
iState = EStateWaitSyncStart;
}
else
@@ -692,6 +730,7 @@
else if ( secondsToConnect.Int() == KErrNotFound )
{
// means that ao is not on (but emn is)
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateIdleAndWaitCommands");
iState = EStateIdleAndWaitCommands;
if ( settings->EmnReceivedButNotSyncedFlag() )
@@ -702,7 +741,9 @@
}
else
{
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", secondsToConnect);
iTimer->After( secondsToConnect );
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
iState = EStateWaitSyncStart;
@@ -734,19 +775,24 @@
CIpsSosAOSettingsHandler* settings =
CIpsSosAOSettingsHandler::NewL(iSession, iMailboxId);
CleanupStack::PushL(settings);
- iTimer->After(
- settings->InboxRefreshTime() * KAOSecondsInMinute );
+ TInt secs = settings->InboxRefreshTime() * KAOSecondsInMinute;
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", secs);
+ iTimer->After(secs);
CleanupStack::PopAndDestroy(settings);
//</QMail>
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
iState = EStateWaitSyncStart;
}
else if ( interval.Int() > 0 )
{
+ INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", interval);
iTimer->After( interval );
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");
iState = EStateWaitSyncStart;
}
else
{
+ NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateIdleAndWaitCommands");
iState = EStateIdleAndWaitCommands;
}
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOPopAgent.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOPopAgent.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -147,6 +147,7 @@
case EStateFetchOnHold:
break;
case EStateDisconnect:
+ NM_COMMENT("CIpsSosAOPopAgent: disconnecting");
if ( !iDoNotDisconnect )
{
CancelAllAndDisconnectL();
@@ -158,6 +159,7 @@
}
break;
case EStateCompleted:
+ NM_COMMENT("CIpsSosAOImapAgent: completed");
TRAP_IGNORE( iOpResponse.OperationCompletedL( iError ) );
SignalSyncCompleted( iServiceId, iError );
ClearSignaledFlags();
@@ -270,6 +272,7 @@
LoadSettingsL( );
if ( !IsConnected() )
{
+ NM_COMMENT("CIpsSosAOPopAgent: starting sync");
TBuf8<1> dummy;
// connect and synchronise starts background sync or idle
iSelection->ResizeL(0);
@@ -282,6 +285,7 @@
}
else
{
+ NM_COMMENT("CIpsSosAOPopAgent: already connected do not sync");
iState = EStateCompleted;
iError = KErrCancel;
SetActiveAndCompleteThis();
--- a/ipsservices/ipssosplugin/src/ipsplgdisconnectop.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgdisconnectop.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -203,7 +203,7 @@
{
FUNC_LOG;
iStatus = KRequestPending;
-
+ NM_COMMENT("CIpsPlgDisconnectOp: doing disconnect");
TInt cmd = (iTEntry.iMtm == KUidMsgTypePOP3) ? KPOP3MTMDisconnect : KIMAP4MTMDisconnect;
InvokeClientMtmAsyncFunctionL( cmd, iService ); // <qmail> 1 param removed
SetActive();
--- a/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -339,6 +339,7 @@
if ( iDoPlainConnect && !Connected() )
{
TBuf8<1> parameter;
+ NM_COMMENT("CIpsPlgImap4ConnectOp: do plain connect");
// connect and synchronise starts background sync or idle
iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
KIMAP4MTMConnect, *iSelection, parameter, iStatus);
@@ -348,12 +349,14 @@
// in this point cant use "connect and do something" commands,
// use regular sync, when new mails is populated elsewhere.
TBuf8<1> parameter;
+ NM_COMMENT("CIpsPlgImap4ConnectOp: full sync starting");
iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
KIMAP4MTMFullSync, *iSelection, parameter, iStatus);
}
else
{
// the used command requires an observer to be given even though we're not using it
+ NM_COMMENT("CIpsPlgImap4ConnectOp: connect and sync");
TPckg<MMsvImapConnectionObserver*> parameter( NULL );
iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
KIMAP4MTMConnectAndSyncCompleteAfterFullSync,
@@ -372,6 +375,7 @@
{
FUNC_LOG;
+ NM_COMMENT("CIpsPlgImap4ConnectOp: populate all");
// construct partial fetch info according to imap settings
// <qmail> new function to wrap settings loading
CImImap4Settings* settings = GetImapSettingsLC();
--- a/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -1542,11 +1542,11 @@
mimeHeader->RestoreL( *store );
TInt count = mimeHeader->ContentTypeParams().MdcaCount();
- INFO_1("# of CT params: %d", count);
+ //INFO_1("# of CT params: %d", count);
for ( TInt i = 0; i < count; i++ )
{
TPtrC8 key8 = mimeHeader->ContentTypeParams().MdcaPoint( i );
- INFO_1("%S", &key8);
+ //INFO_1("%S", &key8);
TPtr16 keyUppercase16 = HBufC::NewLC( key8.Length() )->Des();
keyUppercase16.Copy( key8 );
keyUppercase16.UpperCase();
--- a/ipsservices/ipssosplugin/src/ipsplgonlineoperation.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgonlineoperation.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -127,6 +127,7 @@
void CIpsPlgOnlineOperation::CompleteObserver( TInt aStatus )
{
FUNC_LOG;
+ NM_COMMENT("CIpsPlgOnlineOperation::CompleteObserver");
TRequestStatus* status = &iObserverRequestStatus;
if (status && status->Int() == KRequestPending)
{
@@ -136,6 +137,7 @@
//if connected, reset activitytimer. if not, there is no reason to.
if ( Connected() )
{
+ NM_COMMENT("CIpsPlgOnlineOperation::reseting activitytimer");
iActivityTimer->ResetTimerOperation();
}
else
--- a/ipsservices/ipssosplugin/src/ipsplgpop3connectop.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgpop3connectop.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -336,6 +336,7 @@
{
FUNC_LOG;
// <qmail> unnecessary: iStatus = KRequestPending;
+ NM_COMMENT("CIpsPlgPop3ConnectOp: connecting");
InvokeClientMtmAsyncFunctionL( KPOP3MTMConnect, iService ); // <qmail> 1 param removed
SetActive();
@@ -354,6 +355,7 @@
void CIpsPlgPop3ConnectOp::DoPopulateL()
{
FUNC_LOG;
+ NM_COMMENT("CIpsPlgPop3ConnectOp: populating");
// <qmail> unnecessary: iStatus = KRequestPending;
// Prepare parameters and include filtering
@@ -420,6 +422,7 @@
{
FUNC_LOG;
// <qmail> unnecessary: iStatus = KRequestPending;
+ NM_COMMENT("CIpsPlgPop3ConnectOp: disconnecting");
InvokeClientMtmAsyncFunctionL( KPOP3MTMDisconnect, iService ); // <qmail> 1 param removed
SetActive();
}
--- a/ipsservices/nmipssettings/inc/nmipssettingshelper.h Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipssettingshelper.h Fri Jul 23 19:09:50 2010 +0300
@@ -156,7 +156,6 @@
HbDataForm &mDataForm;
HbDataFormModel &mDataFormModel;
HbMessageBox *mDeleteConfirmationDialog; // Owned.
- HbMessageBox *mDeleteInformationDialog; // Owned.
HbInputDialog *mIncomingPortInputDialog; // Owned.
HbValidator *mIncomingPortInputValidator; // Owned.
HbInputDialog *mFolderPathInputDialog; // Owned.
--- a/ipsservices/nmipssettings/src/nmipssettingshelper.cpp Fri Jul 09 12:17:13 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingshelper.cpp Fri Jul 23 19:09:50 2010 +0300
@@ -23,6 +23,7 @@
#include <HbGlobal>
#include <HbMessageBox>
#include <HbProgressDialog>
+#include <HbNotificationDialog>
#include <HbInputDialog>
#include <HbDataFormModel>
#include <HbExtendedLocale>
@@ -92,7 +93,6 @@
mDataForm(dataForm),
mDataFormModel(dataFormModel),
mDeleteConfirmationDialog(0),
- mDeleteInformationDialog(0),
mIncomingPortInputDialog(0),
mIncomingPortInputValidator(0),
mFolderPathInputDialog(0),
@@ -111,7 +111,6 @@
{
mContentItems.clear();
delete mDeleteConfirmationDialog;
- delete mDeleteInformationDialog;
delete mIncomingPortInputDialog;
delete mIncomingPortInputValidator;
delete mFolderPathInputDialog;
@@ -635,15 +634,11 @@
// Hide the progress note and display the "mailbox deleted" dialog.
progressNote.close();
- if (!mDeleteInformationDialog) {
- mDeleteInformationDialog =
- new HbMessageBox(HbMessageBox::MessageTypeInformation);
- mDeleteInformationDialog->setText(
- hbTrId("txt_mail_dpophead _1_deleted").arg(mailboxName.toString()));
- mDeleteInformationDialog->setTimeout(HbMessageBox::NoTimeout);
- }
- mDeleteInformationDialog->open(this, SLOT(handleMailboxDeleteUpdate(HbAction *)));
-
+ HbNotificationDialog *note = new HbNotificationDialog();
+ QString noteText = hbTrId("txt_mail_dpophead_1_deleted").arg(mailboxName.toString());
+ note->setTitle(noteText);
+ note->setAttribute(Qt::WA_DeleteOnClose);
+ note->open(this, SLOT(handleMailboxDeleteUpdate(HbAction *)));
} else {
// Failed to delete the mailbox!
progressNote.close();
--- a/layers.sysdef.xml Fri Jul 09 12:17:13 2010 +0300
+++ b/layers.sysdef.xml Fri Jul 23 19:09:50 2010 +0300
@@ -11,7 +11,7 @@
</module>
<!-- Internal code -->
<module name="nmail_tools">
- <unit unitID="nmail.tools" mrp="" bldFile="&layer_real_source_path;\emailuis\nmailuiengine\tsrc\tools" name="qtdemos" proFile="tools.pro" qmakeArgs="-r" filter="nmail_tools"/>
+ <unit unitID="nmail.tools" mrp="" bldFile="&layer_real_source_path;\ipsservices\nmipssettings\tsrc\tools\extendedkeygen" name="qtdemos" proFile="extendedkeygenerator.pro" qmakeArgs="-r" filter="nmail_tools"/>
</module>
<!-- Internal code widget-->
<!-- temporary built from nmail.pro as a workaround to ServiceFW bug on service regisrtations, fix expected on wk18 MCL
--- a/nmail.pro Fri Jul 09 12:17:13 2010 +0300
+++ b/nmail.pro Fri Jul 23 19:09:50 2010 +0300
@@ -42,15 +42,14 @@
emailservices/nmutilities
# Need to remove warnings SYSTEMINCLUDE path "\epoc32\include\mw\hb\..." not found
- system(mkdir \epoc32\include\mw\hb\hbcnf\)
- system(mkdir \epoc32\include\mw\hb\hbservices\)
+ system(mkdir \\epoc32\\include\\mw\\hb\\hbcnf\\)
+ system(mkdir \\epoc32\\include\\mw\\hb\\hbservices\\)
# Need to remove warnings SYSTEMINCLUDE path "\epoc32\include\mw\QtXmlPatterns\" not found
- system(mkdir \epoc32\include\mw\QtXmlPatterns\)
+ system(mkdir \\epoc32\\include\\mw\\QtXmlPatterns\\)
BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
- "emailuis/rom/nmail.iby CORE_APP_LAYER_IBY_EXPORT_PATH(nmail.iby)" \
- "emailuis/rom/nmaillanguage.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(nmaillanguage.iby)" \
-
-
+ "emailuis/rom/nmail.iby CORE_APP_LAYER_IBY_EXPORT_PATH(nmail.iby)" \
+ "emailuis/rom/nmaillanguage.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(nmaillanguage.iby)"
}
+
CONFIG += ordered