# HG changeset patch # User hgs # Date 1279901390 -10800 # Node ID 15bc1d5d6267e91a96197458050e5e7f4ba5dec9 # Parent d845db10c0d4a0bba83988f6ac7991167845d432 201029 diff -r d845db10c0d4 -r 15bc1d5d6267 email_plat/nmail_settings_api/nmail_settings_api.pri --- 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 " \ + "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 " \ - "nmail_settings_api/nmapimailboxsettingsdata.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettingsdata.h)" \ - "nmail_settings_api/nmapimailboxsettings.h APP_LAYER_PLATFORM_EXPORT_PATH(nmapimailboxsettings.h)" - -} diff -r d845db10c0d4 -r 15bc1d5d6267 email_plat/nmail_settings_api/nmapimailboxsettingsdata.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, diff -r d845db10c0d4 -r 15bc1d5d6267 email_plat/nmail_settings_api/nmapisettingsmanager.h --- /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 + +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_ */ diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emaildebug/inc/emailtrace.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 #include #include +#include /* * 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; } diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/bwins/fsmailframeworku.def --- 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 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 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) diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/data/fsmailbrandmanager.rss --- 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 #include #include +#include -#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; } + }; } }; } diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/data/mail_for_exchange.svg --- /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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/eabi/fsmailframeworku.def --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/emailframework.pro --- 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" } diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/inc/CFSMailClient.h --- 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 ); + // /** * increments reference count to framework singleton @@ -381,7 +399,16 @@ */ IMPORT_C TInt IncReferenceCount(); // - + + + /** + * 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 /** diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/inc/CFSMailPlugin.h --- 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: diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/src/CFSMailBrand.cpp --- 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= 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; } // ----------------------------------------------------------------------------- diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailframework/src/CFSMailClient.cpp --- 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(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( 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 // ----------------------------------------------------------------------------- diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/base_plugin.pro --- 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 \ diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/bwins/basepluginu.def --- 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) diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/eabi/basepluginu.def --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/inc/BasePlugin.h --- 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& aMailboxes ); diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/inc/baseplugincommonutils.h --- 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::PushL(aRef); } +/** +* Cleanup support for owning pointer arrays +*/ + +template +class CleanupResetAndDestroy +{ +private: + inline static void ResetAndDestroy( TAny *aPtr ) + { + reinterpret_cast( aPtr )->ResetAndDestroy(); + }; +public: + inline static void PushL( T& aItem ) + { + TCleanupItem item( &CleanupResetAndDestroy::ResetAndDestroy, &aItem ); + CleanupStack::PushL( item ); + }; +} ; + +template +inline void CleanupResetAndDestroyPushL( T& aRef ) + { + CleanupResetAndDestroy::PushL( aRef ); + } #endif diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h --- 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: diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/inc/baseplugindelayedopsprivate.h --- 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& aMessages ); @@ -112,7 +107,7 @@ TMsgStoreId iFolderId; RArray 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: diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/inc/nestedao.h --- 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 - - -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__ diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/src/BaseMrInfoObject.cpp --- 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() ); // Commented out in 10.1 - /*iOrganizer = CBaseMrAttendee::NewL( aMrInfo.MROrganizerL() ); - RPointerArray& attendees = aMrInfo.AttendeesL(); + /*RPointerArray& attendees = aMrInfo.AttendeesL(); TInt count = attendees.Count(); for ( TInt i = 0; i < count; i++ ) { @@ -96,6 +95,7 @@ iAttendees.AppendL( attendee ); CleanupStack::Pop( attendee ); }*/ + // iRrule = CBaseMrRecurrenceRule::NewL( aMrInfo.RecurrenceRuleL() ); diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/src/BasePlugin.cpp --- 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(); - +// // Note that all the ops in iDelayedOpReqs array (if any) have already been // deleted in the destructor of CDelayedOpsManager class. iDelayedOpReqs.Reset(); iDelayedOpReqs.Close(); - +// 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; + } /** * diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/src/baseplugindelayedops.cpp --- 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 ); +// + //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; + } + } +// + 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; -// - 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); - } - } -// - } - __LOG_EXIT; - return done; - } -/** - * - */ /*private*/ void CDelayedDeleteMessagesOp::ConstructL( const RArray& 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; + + // + 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); + } + } + // + } + __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; } // diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/src/basepluginmisc.cpp --- 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; } } +// count = iDelayedOpReqs.Count(); for ( TInt i = 0; i < count; i++ ) { @@ -401,6 +402,7 @@ break; } } +// } diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/emailstore/base_plugin/src/nestedao.cpp --- 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 - } diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmailagent/inc/nmmailagent.h --- 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 &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 &messageIds, + const NmId &mailboxId, bool &updateNeeded, bool &activate); void handleMessageDeletedEvent(const NmId &folderId, const QList &messageIds, const NmId &mailboxId, bool &updateNeeded, bool &activate); diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmailagent/src/main.cpp --- 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; diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmailagent/src/nmmailagent.cpp --- 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 true 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 &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"); 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: { diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmclientapi/bwins/nmailclientapiu.def --- 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) diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmclientapi/eabi/nmailclientapiu.def --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmclientapi/inc/nmapisettingsmanager_p.h --- /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 + +#include +#include + +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_ diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmclientapi/nmclientapi.pro --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmclientapi/src/nmapimailboxsettings_p.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 namespace EmailClientApi @@ -64,16 +65,15 @@ bool NmApiMailboxSettingsPrivate::loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data) { NM_FUNCTION; - Q_UNUSED(mailboxId); - Q_UNUSED(data); - return false; + QScopedPointer settingsManager(new NmApiSettingsManager(mailboxId)); + return settingsManager->load(mailboxId, data); } bool NmApiMailboxSettingsPrivate::saveSettings(const NmApiMailboxSettingsData &data) { NM_FUNCTION; - Q_UNUSED(data); - return false; + QScopedPointer settingsManager(new NmApiSettingsManager(data.mailboxId())); + return settingsManager->save(data); } bool NmApiMailboxSettingsPrivate::createMailbox( diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmclientapi/src/nmapisettingsmanager.cpp --- /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 +#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 when the setting items were found otherwise . + */ +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 when the setting items were successfully saved otherwise . + */ +bool NmApiSettingsManager::save(const NmApiMailboxSettingsData &data) +{ + return d->save(data); +} + +} // end namespace diff -r d845db10c0d4 -r 15bc1d5d6267 emailservices/nmclientapi/src/nmapisettingsmanager_p.cpp --- /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 +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "ipssettingkeys.h" +#include "nmapiheaders.h" +#include +#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 when the setting items were found otherwise . + */ +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 when the setting items were successfully saved otherwise . + */ +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 when the setting item was found otherwise . + */ +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 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 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 when the settings were succesfully written, otherwise . + */ +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 if the value was succesfully written, 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 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 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 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailcpplugin/nmailcpplugin.pro --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/conf/nmmessagelistviewitem.css --- 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; } diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/conf/nmmessagelistviewitem.widgetml --- 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 @@ - - + - + + diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/conf/nmviewerheader.widgetml --- 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 @@ - + diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/inc/nmapplication.h --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/inc/nmattachmentpicker.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 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); diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/inc/nmeditorview.h --- 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 mServiceSendingDialog; // Owned. + bool mIsNotFetchedBefore; + HbListWidget *mTBExtnContentWidget; // Owned }; diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/inc/nmmessagelistview.h --- 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; diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/inc/nmmessagelistviewitem.h --- 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; }; diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/inc/nmuiheaders.h --- 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 #include #include +#include +#include #include #include @@ -103,6 +105,8 @@ #include #include #include +#include +#include #include diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/inc/nmviewerheader.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 }; diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/nmailui.pro --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmapplication.cpp --- 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(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(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(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); + } + } +} diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmattachmentpicker.cpp --- 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 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 the interface to be connected to param the operation of the interface param the arguments that needed by the operation */ -void NmAttachmentPicker::fetch(const QString &interface, +void NmAttachmentPicker::fetch(const QString &interface, const QString &operation, const QList *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(); + } +} diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmeditorheader.cpp --- 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(); } diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmeditorview.cpp --- 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); } } } diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmmessagelistview.cpp --- 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); + } + } +} + diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmmessagelistviewitem.cpp --- 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); } diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmmessagesearchlistview.cpp --- 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); diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailui/src/nmviewerheader.cpp --- 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(""); - result.append(""); // 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(" "); 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(" "); 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); - } -} - diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailuiwidgets/inc/nmailuiwidgetsheaders.h --- 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 #include #include +#include // nmail #include diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailuiwidgets/inc/nmattachmentlistwidget.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) diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailuiwidgets/src/nmattachmentlistitem.cpp --- 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); + } } /*! diff -r d845db10c0d4 -r 15bc1d5d6267 emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp --- 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); +} diff -r d845db10c0d4 -r 15bc1d5d6267 inc/basepluginresourceloader.h --- /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 diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosaoplugin/src/IpsSosAOImapAgent.cpp --- 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 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(); } diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp --- 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 @@ // 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"); } // 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 @@ // 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 ); // + 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 @@ { // 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); // + 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; } diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosaoplugin/src/IpsSosAOPopAgent.cpp --- 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(); diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosplugin/src/ipsplgdisconnectop.cpp --- 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 ); // 1 param removed SetActive(); diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp --- 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 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 // new function to wrap settings loading CImImap4Settings* settings = GetImapSettingsLC(); diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp --- 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(); diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosplugin/src/ipsplgonlineoperation.cpp --- 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 diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/ipssosplugin/src/ipsplgpop3connectop.cpp --- 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; // unnecessary: iStatus = KRequestPending; + NM_COMMENT("CIpsPlgPop3ConnectOp: connecting"); InvokeClientMtmAsyncFunctionL( KPOP3MTMConnect, iService ); // 1 param removed SetActive(); @@ -354,6 +355,7 @@ void CIpsPlgPop3ConnectOp::DoPopulateL() { FUNC_LOG; + NM_COMMENT("CIpsPlgPop3ConnectOp: populating"); // unnecessary: iStatus = KRequestPending; // Prepare parameters and include filtering @@ -420,6 +422,7 @@ { FUNC_LOG; // unnecessary: iStatus = KRequestPending; + NM_COMMENT("CIpsPlgPop3ConnectOp: disconnecting"); InvokeClientMtmAsyncFunctionL( KPOP3MTMDisconnect, iService ); // 1 param removed SetActive(); } diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/nmipssettings/inc/nmipssettingshelper.h --- 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. diff -r d845db10c0d4 -r 15bc1d5d6267 ipsservices/nmipssettings/src/nmipssettingshelper.cpp --- 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 #include #include +#include #include #include #include @@ -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(); diff -r d845db10c0d4 -r 15bc1d5d6267 layers.sysdef.xml --- 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 @@ - +