# HG changeset patch # User Maciej Seroka # Date 1267787710 0 # Node ID 147b85a37c23cba4e802ae89a318b46389e0a619 # Parent e3e31170f643367c747d7927ddb2c7efbe4a5fe0 Fixed Email Smoke Test diff -r e3e31170f643 -r 147b85a37c23 Group/bld.inf --- a/Group/bld.inf Fri Mar 05 09:11:09 2010 +0000 +++ b/Group/bld.inf Fri Mar 05 11:15:10 2010 +0000 @@ -22,7 +22,7 @@ #include "../messaging/Group/bld.inf" #include "../System/Group/bld.inf" //#include "../Timew/Group/bld.inf" -//#include "../email/group/bld.inf" +#include "../email/group/bld.inf" #include "../profiles/group/Bld.inf" #include "../notepad/group/bld.inf" #include "../appinstall/group/Bld.inf" diff -r e3e31170f643 -r 147b85a37c23 Group/smoketest.xml --- a/Group/smoketest.xml Fri Mar 05 09:11:09 2010 +0000 +++ b/Group/smoketest.xml Fri Mar 05 11:15:10 2010 +0000 @@ -47,7 +47,7 @@ - + install @@ -56,7 +56,7 @@ - + install @@ -416,7 +416,7 @@ - + install @@ -515,7 +515,7 @@ - + install @@ -524,7 +524,7 @@ - + install @@ -533,7 +533,7 @@ - + install @@ -650,7 +650,7 @@ - + install @@ -659,7 +659,7 @@ - + install @@ -668,7 +668,7 @@ - + install @@ -677,7 +677,7 @@ - + install @@ -750,7 +750,7 @@ - + execute @@ -783,7 +783,7 @@ - + execute @@ -835,7 +835,7 @@ - + fetch-log @@ -1170,13 +1170,19 @@ smoketest/general/smoketest_mess.ini smoketest/general/smoketest_mess.script - + smoketest/general/smoketest_email.ini + smoketest/general/smoketest_email.script - + smoketest/general/smoketest_bitmap.ini + smoketest/general/smoketest_bitmap.script smoketest/general/smoketest_http.ini smoketest/general/smoketest_http.script smoketest/sms/general/message1.txt + smoketest/general/MachineName.txt + smoketest/emailmessage/general/20KBody.txt + smoketest/emailsettings/general/popsettings_test908.txt + smoketest/bitmap/general/uibench_16bit.mbm smoketest/ethernet/general/delproxy.pl smoketest/winscw_udeb/SmokeTestSecureFSclient.dll smoketest/winscw_udeb/SmokeTestSecureFSserver.exe @@ -1187,9 +1193,14 @@ smoketest/winscw_udeb/Smoketest_System.exe smoketest/winscw_udeb/SmokeTest_Utils.dll - + smoketest/winscw_udeb/t_msgutilityserver.dll + smoketest/winscw_udeb/t_msgpopserver.exe + smoketest/winscw_udeb/t_msgsmtpserver.exe - + smoketest/winscw_udeb/t_animplugin.dll + smoketest/winscw_udeb/t_graphicswservapi.exe + smoketest/winscw_udeb/twsgraphicshare.exe + smoketest/winscw_udeb/twsgraphicunshare.exe smoketest/winscw_udeb/testhttpsuite.exe smoketest/winscw_udeb/ProfileSmokeTestModule.dll smoketest/general/ProfileSmokeTestModule.cfg diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/group/T_PopServer.mmp --- a/email/email/pop/group/T_PopServer.mmp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/group/T_PopServer.mmp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -15,11 +15,11 @@ // // - CAPABILITY ALL -TCB - TARGET t_msgpopserver.exe - TARGETTYPE exe +CAPABILITY ALL -TCB +TARGET t_msgpopserver.exe +TARGETTYPE exe UID 0x1000007A 0x1027406F - VENDORID 0x70000001 +VENDORID 0x70000001 // Include the Framework #include "../../../framework/group/T_MsgFramework.mph" @@ -27,12 +27,14 @@ -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/test -SYSTEMINCLUDE /epoc32/include/comms-infras +APP_LAYER_SYSTEMINCLUDE_SYMBIAN +//USERINCLUDE ../inc ../../../../msgsrvnstore/server/inc +//USERINCLUDE ../../../../../../../app/messaging/email/pop3andsmtpmtm/clientmtms/inc USERINCLUDE ../inc - +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/comms-infras SOURCEPATH ../src SOURCE T_PopServer.cpp SOURCE T_MsgSharedDataPop.cpp @@ -59,6 +61,8 @@ SOURCE T_CheckPopSNAPSetting.cpp SOURCE T_RemovePopSNAPSetting.cpp SOURCE T_CheckPopBMSetting.cpp +SOURCE t_cpop3clientmtm.cpp +SOURCE T_VerifyHeaders.cpp LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib @@ -75,7 +79,8 @@ LIBRARY hal.lib //LIBRARY instrumentationhandler.lib LIBRARY netmeta.lib + EPOCHEAPSIZE 0x1000 0x800000 - +SMPSAFE diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/CExpMailInfo.h --- a/email/email/pop/inc/CExpMailInfo.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/CExpMailInfo.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/CExpMailInfo.inl --- a/email/email/pop/inc/CExpMailInfo.inl Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/CExpMailInfo.inl Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,9 +17,6 @@ - - - /** @file diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_CheckChildrenCountPop.h --- a/email/email/pop/inc/T_CheckChildrenCountPop.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_CheckChildrenCountPop.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_CheckPop3AccessPoint.h --- a/email/email/pop/inc/T_CheckPop3AccessPoint.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_CheckPop3AccessPoint.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_CheckPopBMSetting.h --- a/email/email/pop/inc/T_CheckPopBMSetting.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_CheckPopBMSetting.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_CheckPopSNAPSetting.h --- a/email/email/pop/inc/T_CheckPopSNAPSetting.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_CheckPopSNAPSetting.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_ComparePopEmailMsgs.h --- a/email/email/pop/inc/T_ComparePopEmailMsgs.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_ComparePopEmailMsgs.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ @@ -109,3 +107,4 @@ }; #endif //__T_COMPARE_POP_EMAIL_MSGS_H__ + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_ComparePopSettings.h --- a/email/email/pop/inc/T_ComparePopSettings.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_ComparePopSettings.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_ConnectPop3Server.h --- a/email/email/pop/inc/T_ConnectPop3Server.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_ConnectPop3Server.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ @@ -60,3 +58,4 @@ }; #endif //__T_CONNECT_POP3_SERVER_H__ + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_CopyPopSelection.h --- a/email/email/pop/inc/T_CopyPopSelection.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_CopyPopSelection.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_CreatePopAccount.h --- a/email/email/pop/inc/T_CreatePopAccount.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_CreatePopAccount.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_CreatePopAccountWithoutSmtp.h --- a/email/email/pop/inc/T_CreatePopAccountWithoutSmtp.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_CreatePopAccountWithoutSmtp.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_DeleteAllPopChildren.h --- a/email/email/pop/inc/T_DeleteAllPopChildren.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_DeleteAllPopChildren.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ @@ -64,3 +62,4 @@ }; #endif //__T_DELETE_ALL_POP_CHILDREN_H__ + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_DeletePopAccount.h --- a/email/email/pop/inc/T_DeletePopAccount.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_DeletePopAccount.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_DisConnectPop3Server.h --- a/email/email/pop/inc/T_DisConnectPop3Server.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_DisConnectPop3Server.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ @@ -60,3 +58,4 @@ }; #endif //__T_DIS_CONNECT_POP3_SERVER_H__ + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_ModifyPopSettings.h --- a/email/email/pop/inc/T_ModifyPopSettings.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_ModifyPopSettings.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_ModifyPopSettings2.h --- a/email/email/pop/inc/T_ModifyPopSettings2.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_ModifyPopSettings2.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_MsgAsyncStepPOP.h --- a/email/email/pop/inc/T_MsgAsyncStepPOP.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_MsgAsyncStepPOP.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_MsgSharedDataPop.h --- a/email/email/pop/inc/T_MsgSharedDataPop.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_MsgSharedDataPop.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_MsgSyncStepPop.h --- a/email/email/pop/inc/T_MsgSyncStepPop.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_MsgSyncStepPop.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_PopInvokeAsyncFunction.h --- a/email/email/pop/inc/T_PopInvokeAsyncFunction.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_PopInvokeAsyncFunction.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ @@ -70,3 +68,4 @@ TImPop3PopulateOptions iMailInfo; }; #endif //__T_POP_INVOKE_ASYNC_FUNCTION_H__ + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_PopServer.h --- a/email/email/pop/inc/T_PopServer.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_PopServer.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_RemovePopSNAPSetting.h --- a/email/email/pop/inc/T_RemovePopSNAPSetting.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_RemovePopSNAPSetting.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_SharedDataPop.h --- a/email/email/pop/inc/T_SharedDataPop.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_SharedDataPop.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_StartRamUsageTimer.h --- a/email/email/pop/inc/T_StartRamUsageTimer.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_StartRamUsageTimer.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -22,8 +22,6 @@ - - #ifndef _T_START_RAM_USAGE_TIMER_ #define _T_START_RAM_USAGE_TIMER_ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_StopRamUsageTimer.h --- a/email/email/pop/inc/T_StopRamUsageTimer.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_StopRamUsageTimer.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -22,8 +22,6 @@ - - #ifndef _T_STOP_RAM_USAGE_TIMER_ #define _T_STOP_RAM_USAGE_TIMER_ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_VerfiyPopSettings.h --- a/email/email/pop/inc/T_VerfiyPopSettings.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_VerfiyPopSettings.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/T_VerifyPopAccountsCount.h --- a/email/email/pop/inc/T_VerifyPopAccountsCount.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/inc/T_VerifyPopAccountsCount.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/msvconsts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/email/pop/inc/msvconsts.h Fri Mar 05 11:15:10 2010 +0000 @@ -0,0 +1,123 @@ +// 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: +// msvconsts.h +// + +/** + @file + @internal + @released +*/ +#if !defined(__MSVCONSTS_H__) +#define __MSVCONSTS_H__ + +#include +#include +#include + +// APIs KMsvTempIndexEntryId and KFirstFreeEntryId moved to msvstd.h + +/** +UId for 8-bit/16-bit Character set mechanism. +@internalTechnology +@prototype +*/ +const TInt KUIDCharacterSet = 999; + +/** + @internalComponent + @released +*/ + enum TMtsrDllIndex // Used in CMtmGroupData + { + EMtsrServerComponentIndex, + EMtsrClientComponentIndex, + EMtsrUiComponentIndex, + EMtsrUiDataComponentIndex + }; + + /** +UId for the 16-bit chunk storage mechanism. +@internalTechnology +@prototype +*/ +const TUid KMsvPlainBodyText16={0x10000F90}; + +/** +UId for the 8-bit chunk storage mechanism. +@internalTechnology +@prototype +*/ +const TUid KMsvPlainBodyText8={0x10000F80}; + +/** +* @internalAll +* @released +*/ +const TInt KMsvNumMtmDllTypes=4; +/** +* @internalAll +* @released +*/ +const TUid KUidMsvDataComponent ={0x10003C69}; + +// User Interface MTM +/** +* @internalAll +* @released +*/ +const TUid KUidMtmUiComponent ={KUidMtmUiComponentVal}; +// UI Data MTM +/** +* @internalAll +* @released +*/ +const TUid KUidMtmUiDataComponent ={KUidMtmUiDataComponentVal}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType1Uid={0x10003C62}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType2Uid={0x10003C63}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType3Uid={0x10003C64}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType4Uid={0x10003C65}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType5Uid={0x10003C66}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType6Uid={0x10003C67}; +/** +* @internalComponent +* @released +*/ +const TUid KUidMtmMultipleComponent ={0x10004845}; + +#endif //__MSVCONSTS_H__ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/t_cpop3clientmtm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/email/pop/inc/t_cpop3clientmtm.h Fri Mar 05 11:15:10 2010 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __T_CPOP3CLIENTMTM_H__ +#define __T_CPOP3CLIENTMTM_H__ + +/* User includes */ +#include "T_MsgSyncStepPop.h" + +/* Literals Used */ +_LIT(KUnitTestCPop3ClientMtm,"UnitTestCPop3ClientMtm"); + +/* + * A Unit test case to check the functionality of the API's of class CImap4ClientMtm + */ +class CT_CPop3ClientMtm : public CT_MsgSyncStepPOP, MMsvSessionObserver + { +public: + CT_CPop3ClientMtm(CT_MsgSharedDataPop& aSharedDataPOP); + ~CT_CPop3ClientMtm(); + void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + +private: + void DisplayMsgEntryList(const RArray& aMessageEntries); + void TestValidateMessageL(); + void TestReplyL(); + void TestKErrNotSupportedAPI(); + void TestAddAddresseeL(); + void TestRemoveAddresseeL(); + /* CTestStep implementation */ + virtual TVerdict doTestStepL(); + TMsvId CreateMessageL(); +private: + CMsvSession *iSession; + }; +#endif /*__T_CPOP3CLIENTMTM_H__*/ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/inc/t_verifyheaders.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/email/pop/inc/t_verifyheaders.h Fri Mar 05 11:15:10 2010 +0000 @@ -0,0 +1,40 @@ +// Copyright (c) 2008-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: The header file for CT_MsgVerifyHeaders +// + +// @file + +#ifndef __T_VERIFY_HEADERS_H__ +#define __T_VERIFY_HEADERS_H__ + +// user includes +#include"T_MsgSyncStepPop.h" + +// Literals Used +_LIT(KVerifyHeaders,"VerifyHeaders"); + +/** +Implements the test step which verify the message header parts +*/ +class CT_MsgVerifyHeaders : public CT_MsgSyncStepPOP + { +public: + CT_MsgVerifyHeaders(CT_MsgSharedDataPop& aSharedDataPOP); + // CTestStep implementation + TVerdict doTestStepL(); +private: + TBool VerifyImHeaderPartsL(CMsvEntrySelection* aEntrySelection); + TBool VerifyMimeHeaderPartsL(CMsvEntrySelection* aEntrySelection); + }; +#endif //__T_VERIFY_HEADERS_H__ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_CheckChildrenCountPop.cpp --- a/email/email/pop/src/T_CheckChildrenCountPop.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_CheckChildrenCountPop.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -28,8 +28,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_CheckPop3AccessPoint.cpp --- a/email/email/pop/src/T_CheckPop3AccessPoint.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_CheckPop3AccessPoint.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_CheckPopBMSetting.cpp --- a/email/email/pop/src/T_CheckPopBMSetting.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_CheckPopBMSetting.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_CheckPopSNAPSetting.cpp --- a/email/email/pop/src/T_CheckPopSNAPSetting.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_CheckPopSNAPSetting.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_ComparePopEmailMsgs.cpp --- a/email/email/pop/src/T_ComparePopEmailMsgs.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_ComparePopEmailMsgs.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -18,9 +18,6 @@ // Compares the recieved mails with the expected numbers of lines to test POP3 TOP command // // - - - /** @file */ @@ -37,11 +34,16 @@ #include #include #include - +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include "msvconsts.h" +#include "timrfc822datefield.h" +#endif // Literals Used _LIT(KPopAccountName,"PopAccountName"); +_LIT(KParagraphDelimiter,"\x2029\x2029"); +const TInt KUnicodeValue = 0x0046; /** ConstructL() @@ -599,6 +601,7 @@ TInt CT_MsgComparePopEmailMsgs::CountLinesOfBodyTextL(CMsvEntry& aEntry, TBool& aFooterExists, TInt& aFooterSize) { TInt lines = 0; + TInt count =0; aFooterExists=EFalse; aFooterSize=0; aEntry.SetEntryL(aEntry.EntryId()); @@ -618,17 +621,44 @@ { msvStore1->RestoreBodyTextL(*bodyText1); TUint16 val = CEditableText::ELineBreak; + TUint16 val1 = CEditableText::EParagraphDelimiter; + TUint16 val2 = KUnicodeValue; + TInt n = 0; TInt pos = 0; for(;;) { TPtrC bodyText = bodyText1->Read(pos); n = bodyText.Find(&val, 1); + + // if iStore8BitData flag is set, the line is terminated by "CEditableText::EParagraphDelimiter" + if(msvStore1->IsPresentL(KMsvPlainBodyText8)) + { + if ( 0 == count ) + { + TPtrC buffer = bodyText.Mid(0,n+2); + // eg for 8bit the body look as : This is a simple email message.\x2028\x2029\x2029 + // eg for 16bit the body look as: This is a simple email message.\x2028\x2028\x2029 + if((bodyText.Right(2).Compare(KParagraphDelimiter)==KErrNone) && \ + buffer.Find(&val2,1) != 75) + { + lines++; + count++; + } + // Increment the line if EParagraphDelimiter or 0x0046 is found sequence as eg:1. \x2028\x2029 + // 2. \x2028\x2029\x2028\x2029\x0046 3. \x2028\x2029\x2028\x2029\x2028\x2029 + else if ( (buffer.Find(&val1,1)==0 && n==-1) || (buffer.Find(&val2,1)==1) \ + || (buffer.Find(&val1,1)>0) ) + { + lines++; + } + } + } if(n < 0) break; lines++; pos += n+1; - + //This Check is needed to delete the extra line introduced by communigate Pro Server TInt fpos = CheckIfServerMessageExists(bodyText); if (fpos != KErrNotFound) @@ -876,13 +906,13 @@ */ -////////////////////////// -//// -//// I have no idea what this code is doing. -//// It looks very messy. -//// Someone is going to have to reowrk this code so that we can cancel and do progress -//// -////////////////////////// +// +// +// I have no idea what this code is doing. +// It looks very messy. +// Someone is going to have to reowrk this code so that we can cancel and do progress +// +// void CT_MsgComparePopEmailMsgs::ProgressL(TBool bFinal) { // TODO @@ -997,3 +1027,4 @@ INFO_PRINTF1(_L("T_ComparePopEmailMsgs Completed")); return TestStepResult(); } + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_ComparePopSettings.cpp --- a/email/email/pop/src/T_ComparePopSettings.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_ComparePopSettings.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -20,8 +20,6 @@ // // - - /** @file cexppop3mailinfo.h */ @@ -308,3 +306,4 @@ aEmailAccount.LoadSmtpSettingsL(smtpAccount, aSmtpSettings); aEmailAccount.LoadSmtpIapSettingsL(smtpAccount, aSmtpIapSettings); } + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_ConnectPop3Server.cpp --- a/email/email/pop/src/T_ConnectPop3Server.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_ConnectPop3Server.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -23,8 +23,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_CopyPopSelection.cpp --- a/email/email/pop/src/T_CopyPopSelection.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_CopyPopSelection.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -23,8 +23,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_CreatePopAccount.cpp --- a/email/email/pop/src/T_CreatePopAccount.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_CreatePopAccount.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -24,8 +24,6 @@ // // - - /** @file */ @@ -155,3 +153,4 @@ } return TestStepResult(); } + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_CreatePopAccountWithoutSmtp.cpp --- a/email/email/pop/src/T_CreatePopAccountWithoutSmtp.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_CreatePopAccountWithoutSmtp.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_DeleteAllPopChildren.cpp --- a/email/email/pop/src/T_DeleteAllPopChildren.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_DeleteAllPopChildren.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -21,8 +21,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_DeletePopAccount.cpp --- a/email/email/pop/src/T_DeletePopAccount.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_DeletePopAccount.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -24,8 +24,6 @@ // // - - /** @file */ @@ -134,3 +132,4 @@ } return TestStepResult(); } + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_DisconnectPop3Server.cpp --- a/email/email/pop/src/T_DisconnectPop3Server.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_DisconnectPop3Server.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -23,8 +23,6 @@ // // - - /** @file */ @@ -163,3 +161,5 @@ } return TestStepResult(); } + + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_ModifyPopSettings.cpp --- a/email/email/pop/src/T_ModifyPopSettings.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_ModifyPopSettings.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -51,8 +51,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_ModifyPopSettings2.cpp --- a/email/email/pop/src/T_ModifyPopSettings2.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_ModifyPopSettings2.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_MsgAsyncStepPOP.cpp --- a/email/email/pop/src/T_MsgAsyncStepPOP.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_MsgAsyncStepPOP.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -17,8 +17,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_MsgSharedDataPop.cpp --- a/email/email/pop/src/T_MsgSharedDataPop.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_MsgSharedDataPop.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -13,8 +13,6 @@ // Description: // - - /** @file */ @@ -86,3 +84,4 @@ { delete iPeriodic; } + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_MsgSyncStepPOP.cpp --- a/email/email/pop/src/T_MsgSyncStepPOP.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_MsgSyncStepPOP.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -17,8 +17,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_PopInvokeAsyncFunction.cpp --- a/email/email/pop/src/T_PopInvokeAsyncFunction.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_PopInvokeAsyncFunction.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -30,8 +30,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_PopServer.cpp --- a/email/email/pop/src/T_PopServer.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_PopServer.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -40,10 +40,12 @@ #include "T_CheckPopSNAPSetting.h" #include "T_RemovePopSNAPSetting.h" #include "T_CheckPopBMSetting.h" +#include "t_cpop3clientmtm.h" +#include "t_verifyheaders.h" /** MainL() -This is the main function which installs the active scheduler and +This is the main function which installs the active scheduler and creates an object of the Email server */ LOCAL_C void MainL() @@ -91,20 +93,20 @@ */ { __UHEAP_MARK; - + CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } - TRAP_IGNORE(MainL()); + TRAP_IGNORE(MainL()); delete cleanup; cleanup=NULL; __UHEAP_MARKEND; - + return KErrNone; } - + /** NewL() @@ -124,8 +126,8 @@ CleanupStack::Pop(server); return server; } - - + + /** CT_MsgPopServer() Intializes iSharedDataPOP with NULL @@ -157,11 +159,11 @@ @return The CTestStep object created -*/ +*/ CTestStep* CT_MsgPopServer::CreateTestStepL(const TDesC& aStepName) { CTestStep* testStep = NULL; - + if(aStepName == KVerifyPopSettings) { testStep = new(ELeave) CT_MsgVerifyPopSettings(*iSharedDataPOP); @@ -246,6 +248,14 @@ { testStep = new(ELeave) CT_MsgCheckPopBMSetting(*iSharedDataPOP); } + else if(aStepName == KUnitTestCPop3ClientMtm) + { + testStep = new(ELeave) CT_CPop3ClientMtm(*iSharedDataPOP); + } + else if(aStepName == KVerifyHeaders) + { + testStep = new(ELeave) CT_MsgVerifyHeaders(*iSharedDataPOP); + } else { testStep = CT_MsgServer::CreateTestStepL(aStepName); @@ -253,3 +263,4 @@ return testStep; } + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_RemovePopSNAPSetting.cpp --- a/email/email/pop/src/T_RemovePopSNAPSetting.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_RemovePopSNAPSetting.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_SharedDataPop.cpp --- a/email/email/pop/src/T_SharedDataPop.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_SharedDataPop.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -15,8 +15,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_StartRamUsageTimer.cpp --- a/email/email/pop/src/T_StartRamUsageTimer.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_StartRamUsageTimer.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -23,8 +23,6 @@ // // - - // User includes #include "T_StartRamUsageTimer.h" #include "T_MsgSharedDataPop.h" diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_StopRamUsageTimer.cpp --- a/email/email/pop/src/T_StopRamUsageTimer.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_StopRamUsageTimer.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -24,8 +24,6 @@ // // - - // User includes #include "T_StopRamUsageTimer.h" #include diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_VerifyPopAccountsCount.cpp --- a/email/email/pop/src/T_VerifyPopAccountsCount.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_VerifyPopAccountsCount.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -22,8 +22,6 @@ // // - - /** @file */ @@ -104,3 +102,4 @@ } return TestStepResult(); } + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/T_VerifyPopSettings.cpp --- a/email/email/pop/src/T_VerifyPopSettings.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/pop/src/T_VerifyPopSettings.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -25,8 +25,6 @@ // // - - /** @file */ @@ -173,3 +171,5 @@ } return TestStepResult(); } + + diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/t_cpop3clientmtm.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/email/pop/src/t_cpop3clientmtm.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -0,0 +1,507 @@ +// Copyright (c) 2008-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: +// [TestStep Name] +// UnitTestCPop3ClientMtm +// [Paramaters] +// [TestStep Description] +// Invokes the API of the class CPop3ClientMtm for improving code coverage. +// +// + +#include "t_cpop3clientmtm.h" + +#include +#include +//#include +#include +#include + +/* Literals Used */ +_LIT(KAccountName,"ImapAccountName"); +_LIT8(KConfigFileName, "ImapConfigFileName"); +_LIT(KDataComponentFilename, "c:\\system\\mtm\\testsmtm.dat"); +_LIT(KDummyRealAddress,"test001@msexchange01.closedtest.intra"); +_LIT(KDummyAlliasAddress,"subbutest"); +const TInt KTempId = 10; + +const TUid KUidTestServerMtmType={0x10001304}; +/** + Function : CT_CPop3ClientMtm + Description : Constructor + @param : aSharedDataIMAP Reference to CT_MsgSharedDataImap + @return : N/A +*/ +CT_CPop3ClientMtm::CT_CPop3ClientMtm(CT_MsgSharedDataPop& aSharedDataPOP) +: CT_MsgSyncStepPOP(aSharedDataPOP) + { + SetTestStepName(KUnitTestCPop3ClientMtm); + } + +/** + Function : ~CT_CPop3ClientMtm + Description : Destructor + @return : N/A +*/ +CT_CPop3ClientMtm::~CT_CPop3ClientMtm() + { + } + +void CT_CPop3ClientMtm::TestValidateMessageL() + { + TInt error = KErrGeneral; + INFO_PRINTF1(_L("Testing: Validate Message -- started")); + + TRAP(error, iSession = CMsvSession::OpenSyncL(*this)); + TEST(error == KErrNone); + + CClientMtmRegistry *theClientRegistry=CClientMtmRegistry::NewL(*iSession,KMsvDefaultTimeoutMicroSeconds32); + TEST(theClientRegistry != NULL); + TEST(theClientRegistry->IsPresent(KUidMsgTypePOP3)); + CleanupStack::PushL(theClientRegistry); + + CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering()); + CleanupStack::PushL(cEntry); + + CPop3ClientMtm *theClientMtm=(CPop3ClientMtm*)theClientRegistry->NewMtmL(KUidMsgTypePOP3); + + CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection; + CleanupStack::PushL(selection); + + cEntry->SetEntryL(KMsvRootIndexEntryId); + TMsvEntry service; + service.iType=KUidMsvServiceEntry; + service.iMtm = KUidTestServerMtmType; + cEntry->CreateL(service); + cEntry->SetEntryL(service.Id()); + selection->AppendL(service.Id()); + CleanupStack::PopAndDestroy(selection); + CleanupStack::Pop(cEntry); + + theClientMtm->SetCurrentEntryL(cEntry); + theClientMtm->SaveMessageL(); + INFO_PRINTF1(_L("Testing ValidateMessage with KMsvMessagePartRecipient")); + theClientMtm->ValidateMessage(KMsvMessagePartRecipient); + INFO_PRINTF1(_L("Testing ValidateMessage with KMsvMessagePartOriginator")); + theClientMtm->ValidateMessage(KMsvMessagePartOriginator); + CleanupStack::Pop(theClientRegistry); + delete iSession; + INFO_PRINTF1(_L("Testing: Validate Message -- ended")); + } + +void CT_CPop3ClientMtm::TestKErrNotSupportedAPI() +{ + TInt error = KErrGeneral; + INFO_PRINTF1(_L("Testing: Validate Message -- started")); + + CMsvOperationWait *active = CMsvOperationWait::NewLC(); + TRAP(error, iSession = CMsvSession::OpenSyncL(*this)); + TEST(error == KErrNone); + + CClientMtmRegistry *theClientRegistry=CClientMtmRegistry::NewL(*iSession,KMsvDefaultTimeoutMicroSeconds32); + TEST(theClientRegistry != NULL); + TEST(theClientRegistry->IsPresent(KUidMsgTypePOP3)); + CleanupStack::PushL(theClientRegistry); + + CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering()); + CleanupStack::PushL(cEntry); + + CPop3ClientMtm *theClientMtm=(CPop3ClientMtm*)theClientRegistry->NewMtmL(KUidMsgTypePOP3); + + CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection; + CleanupStack::PushL(selection); + + cEntry->SetEntryL(KMsvRootIndexEntryId); + TMsvEntry service; + service.iType=KUidMsvServiceEntry; + service.iMtm = KUidTestServerMtmType; + cEntry->CreateL(service); + cEntry->SetEntryL(service.Id()); + selection->AppendL(service.Id()); + CleanupStack::PopAndDestroy(selection); + CleanupStack::Pop(cEntry); + + theClientMtm->SetCurrentEntryL(cEntry); + theClientMtm->SaveMessageL(); + INFO_PRINTF1(_L("Testing: API - AddAttachmentL : started")); + TRAP(error, theClientMtm->AddAttachmentL(KAccountName,KConfigFileName, KTempId, active->iStatus)); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - AddAttachmentL : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - AddAttachmentL with FileSession : started")); + RFile *tempFile = NULL; + TRAP(error, theClientMtm->AddAttachmentL(*tempFile,KConfigFileName, KTempId, active->iStatus)); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - AddAttachmentL with FileSession : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - AddLinkedAttachmentL : started")); + TRAP(error, theClientMtm->AddLinkedAttachmentL(KAccountName,KConfigFileName, KTempId, active->iStatus)); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - AddLinkedAttachmentL : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - AddEntryAsAttachmentL : started")); + TRAP(error, theClientMtm->AddEntryAsAttachmentL(KTempId, active->iStatus)); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - AddEntryAsAttachmentL : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - CreateAttachmentL : started")); + TRAP(error, theClientMtm->CreateAttachmentL(KAccountName, *tempFile, KConfigFileName, KTempId, active->iStatus)); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - CreateAttachmentL : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - CreateMessageL : started")); + TRAP(error, theClientMtm->CreateMessageL(KTempId)); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - CreateMessageL : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - DefaultServiceL : started")); + TRAP(error, theClientMtm->DefaultServiceL()); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - DefaultServiceL : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - RemoveDefaultServiceL : started")); + TRAP(error, theClientMtm->RemoveDefaultServiceL()); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - RemoveDefaultServiceL : ended")); + error = KErrGeneral; + INFO_PRINTF1(_L("Testing: API - ChangeDefaultServiceL : started")); + TRAP(error, theClientMtm->ChangeDefaultServiceL(KTempId)); + TEST(error == KErrNotSupported); + INFO_PRINTF1(_L("Testing: API - ChangeDefaultServiceL : ended")); + + CleanupStack::Pop(theClientRegistry); + CleanupStack::PopAndDestroy(active); + delete iSession; +} + +void CT_CPop3ClientMtm::TestReplyL() + { + TInt error = KErrGeneral; + INFO_PRINTF1(_L("Testing: ReplyL -- started")); + + TRAP(error, iSession = CMsvSession::OpenSyncL(*this)); + TEST(error == KErrNone); + + CMsvOperationWait* active = CMsvOperationWait::NewLC(); + + CClientMtmRegistry *theClientRegistry=CClientMtmRegistry::NewL(*iSession,KMsvDefaultTimeoutMicroSeconds32); + TEST(theClientRegistry != NULL); + TEST(theClientRegistry->IsPresent(KUidMsgTypePOP3)); + CleanupStack::PushL(theClientRegistry); + + CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering()); + CleanupStack::PushL(cEntry); + + CPop3ClientMtm *theClientMtm=(CPop3ClientMtm*)theClientRegistry->NewMtmL(KUidMsgTypePOP3); + + CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection; + CleanupStack::PushL(selection); + + cEntry->SetEntryL(KMsvRootIndexEntryId); + TMsvEntry service; + service.iType=KUidMsvServiceEntry; + service.iMtm = KUidTestServerMtmType; + cEntry->CreateL(service); + cEntry->SetEntryL(service.Id()); + selection->AppendL(service.Id()); + CleanupStack::PopAndDestroy(selection); + CleanupStack::Pop(cEntry); + TMsvPartList partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; + + theClientMtm->SetCurrentEntryL(cEntry); + CMsvOperation* operation = NULL; + active->Start(); + operation = theClientMtm->ReplyL(KMsvDraftEntryId, partList, active->iStatus); + CActiveScheduler::Start(); + TEST(operation->iStatus.Int()==KErrNone); + delete operation; + CleanupStack::Pop(theClientRegistry); + CleanupStack::Pop(active); + delete iSession; + INFO_PRINTF1(_L("Testing: ReplyL -- ended")); + } + +void CT_CPop3ClientMtm::TestAddAddresseeL() +{ + TInt error = KErrGeneral; + INFO_PRINTF1(_L("Testing: TestAddAddresseeL -- started")); + + CMsvOperationWait *active = CMsvOperationWait::NewLC(); + TRAP(error, iSession = CMsvSession::OpenSyncL(*this)); + TEST(error == KErrNone); + + CClientMtmRegistry *theClientRegistry=CClientMtmRegistry::NewL(*iSession,KMsvDefaultTimeoutMicroSeconds32); + TEST(theClientRegistry != NULL); + TEST(theClientRegistry->IsPresent(KUidMsgTypePOP3)); + CleanupStack::PushL(theClientRegistry); + + CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering()); + CleanupStack::PushL(cEntry); + + CPop3ClientMtm *theClientMtm=(CPop3ClientMtm*)theClientRegistry->NewMtmL(KUidMsgTypePOP3); + + CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection; + CleanupStack::PushL(selection); + + cEntry->SetEntryL(KMsvRootIndexEntryId); + TMsvEntry service; + service.iType=KUidMsvServiceEntry; + service.iMtm = KUidTestServerMtmType; + cEntry->CreateL(service); + cEntry->SetEntryL(service.Id()); + selection->AppendL(service.Id()); + CleanupStack::PopAndDestroy(selection); + CleanupStack::Pop(cEntry); + + theClientMtm->SetCurrentEntryL(cEntry); + theClientMtm->SaveMessageL(); + INFO_PRINTF1(_L("Testing: API - TestAddAddresseeL with realaddress")); + theClientMtm->AddAddresseeL(KDummyRealAddress); + INFO_PRINTF1(_L("Testing: API - TestAddAddresseeL with realaddress")); + theClientMtm->AddAddresseeL(KDummyRealAddress, KDummyAlliasAddress); + INFO_PRINTF1(_L("Testing: API - TestAddAddresseeL -- ended")); + + CleanupStack::Pop(theClientRegistry); + CleanupStack::PopAndDestroy(active); + delete iSession; +} + +void CT_CPop3ClientMtm::TestRemoveAddresseeL() +{ + TInt error = KErrGeneral; + INFO_PRINTF1(_L("Testing: TestAddAddresseeL -- started")); + + CMsvOperationWait *active = CMsvOperationWait::NewLC(); + TRAP(error, iSession = CMsvSession::OpenSyncL(*this)); + TEST(error == KErrNone); + + CClientMtmRegistry *theClientRegistry=CClientMtmRegistry::NewL(*iSession,KMsvDefaultTimeoutMicroSeconds32); + TEST(theClientRegistry != NULL); + TEST(theClientRegistry->IsPresent(KUidMsgTypePOP3)); + CleanupStack::PushL(theClientRegistry); + + CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering()); + CleanupStack::PushL(cEntry); + + CPop3ClientMtm *theClientMtm=(CPop3ClientMtm*)theClientRegistry->NewMtmL(KUidMsgTypePOP3); + + CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection; + CleanupStack::PushL(selection); + + cEntry->SetEntryL(KMsvRootIndexEntryId); + TMsvEntry service; + service.iType=KUidMsvServiceEntry; + service.iMtm = KUidTestServerMtmType; + cEntry->CreateL(service); + cEntry->SetEntryL(service.Id()); + selection->AppendL(service.Id()); + CleanupStack::PopAndDestroy(selection); + CleanupStack::Pop(cEntry); + + theClientMtm->SetCurrentEntryL(cEntry); + theClientMtm->SaveMessageL(); + theClientMtm->AddAddresseeL(KDummyRealAddress); + INFO_PRINTF1(_L("Testing: API - RemoveAddressee with realaddress")); + TInt firstAddress = 0; + theClientMtm->RemoveAddressee(firstAddress); + INFO_PRINTF1(_L("Testing: API - TestAddAddresseeL -- ended")); + + CleanupStack::Pop(theClientRegistry); + CleanupStack::PopAndDestroy(active); + delete iSession; +} + +void CT_CPop3ClientMtm::HandleSessionEventL(TMsvSessionEvent aEvent, TAny*, TAny*, TAny*) + { + INFO_PRINTF1(_L("Entered Handlesession EventL")); + switch(aEvent) + { + case EMsvEntriesCreated: + INFO_PRINTF1(_L("Entries created")); + break; + case EMsvEntriesChanged: + INFO_PRINTF1(_L("Entries Changed")); + break; + case EMsvEntriesDeleted: + INFO_PRINTF1(_L("Entried Deleted")); + break; + case EMsvEntriesMoved: + INFO_PRINTF1(_L("Entried Moved")); + break; + case EMsvMtmGroupInstalled: + INFO_PRINTF1(_L("Mtm Group Installed")); + break; + case EMsvMtmGroupDeInstalled: + INFO_PRINTF1(_L("Mtm Group De-installed")); + break; + case EMsvGeneralError: + INFO_PRINTF1(_L("General Error occured")); + break; + case EMsvCloseSession: + INFO_PRINTF1(_L("Session Closed")); + break; + case EMsvServerReady: + INFO_PRINTF1(_L("Server Ready")); + break; + case EMsvServerFailedToStart: + INFO_PRINTF1(_L("Failed to start")); + break; + case EMsvCorruptedIndexRebuilt: + INFO_PRINTF1(_L("Corrupted Intex rebuilt")); + break; + case EMsvServerTerminated: + INFO_PRINTF1(_L("Server terminated")); + break; + case EMsvMediaChanged: + INFO_PRINTF1(_L("Media Changed")); + break; + EMsvMediaUnavailable: + INFO_PRINTF1(_L("Media Unavailable")); + break; + case EMsvMediaAvailable: + INFO_PRINTF1(_L("Media Available")); + break; + case EMsvMediaIncorrect: + INFO_PRINTF1(_L("Media Incorrect")); + break; + case EMsvCorruptedIndexRebuilding: + INFO_PRINTF1(_L("Corrupted Index Rebuilding")); + break; + } + INFO_PRINTF1(_L("Exited Handlesession EventL")); + } + +/*TMsvId CT_CPop3ClientMtm::CreateMessageL() + { + // Handle command line arguments + //CCommandLineArguments* cmdLineArg=CCommandLineArguments::NewLC(); + //TInt count = cmdLineArg->Count(); + //TBool isCmdLine=FALSE; + //if (count>2) // Command line arguments? +// { +// if ((!(cmdLineArg->Arg(EArgTestParams).Compare(KTestParams))) && count==EArgEnd) +// isCmdLine=TRUE; +// } + +// testUtils->TestStart(testNo++); +// CTestActive* testActive = new (ELeave) CTestActive(); +// CleanupStack::PushL(testActive); + + TRAP(error, iSession = CMsvSession::OpenSyncL(*this)); + TEST(error == KErrNone); + + TMsvPartList partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; + TMsvEmailTypeList msvEmailTypeList = 0; + + + CMsvOperationWait* active = CMsvOperationWait::NewLC(); + active->Start(); + CImEmailOperation* emailOperation = CImEmailOperation::CreateNewL(active->iStatus, *iSession, KMsvGlobalOutBoxIndexEntryId, partList, msvEmailTypeList, KUidMsgTypeSMTP); + CleanupStack::PushL(emailOperation); + +// TestUiTimer* testUiTimer = TestUiTimer::NewLC(test.Console(), emailOperation); +// testActive->StartL(); +// testUiTimer->IssueRequest(); + CActiveScheduler::Start(); + + TMsvId temp; + TPckgC paramPack(temp); + const TDesC8& progBuf = emailOperation->ProgressL(); + paramPack.Set(progBuf); + TMsvId messageId=paramPack(); + TInt error = emailOperation->iStatus.Int(); + CleanupStack::PopAndDestroy(emailOperation); + CleanupStack::PopAndDestroy(active); + //CleanupStack::PopAndDestroy(3, testActive); // testActive, emailOperation, testUiTimer + //testUtils->TestFinish(testNo-1, error); + //log->AppendComment(_L8(" Messages created in the outbox")); + + // fill in details for email message + testUtils->iMsvEntry->SetEntryL(messageId); + CMsvStore* store = testUtils->iMsvEntry->EditStoreL(); + CleanupStack::PushL(store); + CImHeader* header = CImHeader::NewLC(); + header->RestoreL(*store); + + if (isCmdLine) + { + TBuf<100> buf; + TLex lex(cmdLineArg->Arg(EArgEmail)); + buf=lex.NextToken(); + header->ToRecipients().AppendL(buf); + } + else + header->ToRecipients().AppendL(_L("t_smtc@lon-msgtest06.intra")); + + header->SetSubjectL(_L("Message from T_SMTC Typhoon!!")); + header->StoreL(*store); + store->CommitL(); + CleanupStack::PopAndDestroy(3, cmdLineArg); // cmdLineArg, header, store + + //store some body text!! + CParaFormatLayer* paraFormatLayer=CParaFormatLayer::NewL(); + CleanupStack::PushL(paraFormatLayer); + + CCharFormatLayer* charFormatLayer=CCharFormatLayer::NewL(); + CleanupStack::PushL(charFormatLayer); + + CRichText* bodyText=CRichText::NewL(paraFormatLayer, charFormatLayer, CEditableText::EFlatStorage, 256); + CleanupStack::PushL(bodyText); + + TBuf<100> bodyContents = _L("Test body contents so that we can test the store body text code."); + bodyText->InsertL(0, bodyContents); + + // store the body text + testActive = new (ELeave) CTestActive(); + CleanupStack::PushL(testActive); + + CImEmailMessage* imEmailMessage = CImEmailMessage::NewLC(*(testUtils->iMsvEntry)); + imEmailMessage->StoreBodyTextL(messageId, *bodyText, testActive->iStatus); + testActive->StartL(); + CActiveScheduler::Start(); // wait for the asynch operation to complete + CleanupStack::PopAndDestroy(5, paraFormatLayer); // imEmailMessage, testActive, bodyText, charFormatLayer, paraFormatLayer + + // Add an attachment + testActive = new (ELeave) CTestActive(); + CleanupStack::PushL(testActive); + + imEmailMessage = CImEmailMessage::NewLC(*(testUtils->iMsvEntry)); + CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); + CleanupStack::PushL(attachmentInfo); + imEmailMessage->AttachmentManager().AddAttachmentL(KAttachment1,attachmentInfo,testActive->iStatus); + CleanupStack::Pop(attachmentInfo); + testActive->StartL(); + CActiveScheduler::Start(); // wait for the asynch operation to complete + CleanupStack::PopAndDestroy(2, testActive); + + return messageId; + }*/ + +/** + Function : doTestStepL + Description : + @return : TVerdict - Test step result + @leave : KMsvNullIndexEntryId Invalid IMAP account name specified +*/ +TVerdict CT_CPop3ClientMtm::doTestStepL() + { + INFO_PRINTF1(_L("Test Step : CPop3ClientMtm Started")); + TestValidateMessageL(); + //TestReplyL(); + TestKErrNotSupportedAPI(); + TestAddAddresseeL(); + TestRemoveAddresseeL(); + INFO_PRINTF1(_L("Test Step : CPop3ClientMtm Ended")); + + return TestStepResult(); + } diff -r e3e31170f643 -r 147b85a37c23 email/email/pop/src/t_verifyheaders.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/email/pop/src/t_verifyheaders.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -0,0 +1,266 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: Verify email header + +// @file + +// +// +// [TestStep Name] +// VerifyHeaders +// +// [Paramaters] +// PopAccountName : Name of the Pop account +// ToAddress%d%d : Name of To Address with +// First %d for multiple message entries +// Seconde %d for multiple email addresses +// CcAddress%d%d : Name of Cc Address with +// First %d for multiple message entries +// Seconde %d for multiple email addresses +// BccAddress%d%d : Name of Bcc Address with +// First %d for multiple message entries +// Seconde %d for multiple email addresses +// FromAddress%d : Name of From Address with +// First %d for multiple message entries +// Subject%d : Name of Subject with +// First %d for multiple message entries +// ContentType%d : Name of ContentType with +// First %d for multiple message entries +// ContentSubType%d : Name of ContentSubType with +// First %d for multiple message entries +// +// [Description] +// Veriy the email messge header parts +// +// [APIs Used] +// CMsvEntry::ReadStoreL +// CImHeader::RestoreL +// +// + +// User includes +#include "t_verifyheaders.h" + +// Epoc includes +#include +#include +#include + +// Literals used +_LIT(KPopAccountName,"PopAccountName"); +_LIT(KToAddress,"ToAddress%d%d"); +_LIT(KCcAddress,"CcAddress%d%d"); +_LIT(KBccAddress,"BccAddress%d%d"); +_LIT(KFromAddress,"FromAddress%d"); +_LIT(KSubject,"Subject%d"); + +_LIT(KContentType,"ContentType%d"); +_LIT(KContentSubType,"ContentSubType%d"); + +/** + Function : CT_MsgVerifyHeaders + Description : Constructor + @param : + @return : N/A +*/ +CT_MsgVerifyHeaders::CT_MsgVerifyHeaders(CT_MsgSharedDataPop& aSharedDataPOP) +: CT_MsgSyncStepPOP(aSharedDataPOP) + { + SetTestStepName(KVerifyHeaders); + } + +/** + Function : doTestStepL + Description : Reads the POP account name and the expected header parts from the ini file. + Obtains the header parts of the children entries under the given folder. + @return : TVerdict - Test step result + EPass, if the header part matches + EFail, if the header part does not match +*/ +TVerdict CT_MsgVerifyHeaders::doTestStepL() + { + INFO_PRINTF1(_L("Test Step :VerifyHeaders for POP services ")); + // Read the POP account name from the ini file + TPtrC popAccountName; + if(!GetStringFromConfig(ConfigSection(), KPopAccountName, popAccountName)) + { + ERR_PRINTF1(_L("POP account name is not specified")); + SetTestStepResult(EFail); + } + else + { + // Retrieving the POP service Id based on the account name read from ini + TMsvId popServiceId = CT_MsgUtilsCentralRepository::GetPopServiceIdL((TDes&) popAccountName); + if(popServiceId == KMsvNullIndexEntryId) + { + ERR_PRINTF1(_L("Invalid Pop account name specified")); + SetTestStepResult(EFail); + } + else + { + // Create a selection of the children entries under the given folder and verify the header parts + CMsvEntrySelection* selection = CT_MsgUtils::CreateChildrenSelectionL(iSharedDataPOP.iSession, popServiceId); + CleanupStack::PushL(selection); + // Verify the header parts + TBool status = VerifyImHeaderPartsL(selection); + if (status == EFail ) + { + SetTestStepResult(EFail); + } + // Verify mime header parts + status = VerifyMimeHeaderPartsL(selection); + if (status == EFail ) + { + SetTestStepResult(EFail); + } + CleanupStack::PopAndDestroy(selection); + } + } + return TestStepResult(); + } +TBool CT_MsgVerifyHeaders::VerifyImHeaderPartsL(CMsvEntrySelection* aEntrySelection) + { + TBool status = EPass; + for(int index = 0; index < aEntrySelection->Count(); ++index) + { + CMsvEntry* entry = iSharedDataPOP.iSession->GetEntryL(aEntrySelection->At(index)); + CleanupStack::PushL(entry); + CMsvStore* store = entry->ReadStoreL(); + CleanupStack::PushL(store); + CImHeader* header = CImHeader::NewLC(); + // Retrieve the email message header part from the message store + header->RestoreL(*store); + + // Validate the header fields + TBuf<256> param; + + for(int indexTo = 0; indexTo < header->ToRecipients().Count(); ++indexTo) + { + TPtrC toAddress; + param.Format(KToAddress, index, indexTo); + if(GetStringFromConfig( ConfigSection(), param, toAddress)) + { + TPtrC toAdd = header->ToRecipients()[indexTo]; + if(toAddress.Compare(header->ToRecipients()[indexTo])) + { + ERR_PRINTF1(_L(" To Address is not matched")); + status = EFail; + } + } + } + for(int indexCc = 0; indexCc < header->CcRecipients().Count(); ++indexCc) + { + TPtrC ccAddress; + param.Format(KCcAddress, index, indexCc); + if(GetStringFromConfig( ConfigSection(), param, ccAddress)) + { + TPtrC ccAdd = header->CcRecipients()[indexCc]; + if(ccAddress.Compare(header->CcRecipients()[indexCc])) + { + ERR_PRINTF1(_L("CC Address is not matched")); + status = EFail; + } + } + } + for(int indexBcc = 0; indexBcc < header->BccRecipients().Count(); ++indexBcc) + { + TPtrC bccAddress; + param.Format(KBccAddress, index, indexBcc); + if(GetStringFromConfig( ConfigSection(), param, bccAddress)) + { + TPtrC bccAdd = header->BccRecipients()[indexBcc]; + if(bccAddress.Compare(header->BccRecipients()[indexBcc])) + { + ERR_PRINTF1(_L("BCC Address is not matched")); + status = EFail; + } + } + } + TPtrC fromAddress; + param.Format(KFromAddress, index); + if(GetStringFromConfig( ConfigSection(), param, fromAddress)) + { + TPtrC fromAdd = header->From(); + if(fromAddress.Compare(header->From())) + { + ERR_PRINTF1(_L("From Address is not matched")); + status = EFail; + } + } + TPtrC subject; + param.Format(KSubject, index); + if(GetStringFromConfig( ConfigSection(), param, subject)) + { + TPtrC tsub = header->Subject(); + if(subject.Compare(header->Subject())) + { + ERR_PRINTF1(_L("Subject is not matched")); + status = EFail; + } + } + CleanupStack::PopAndDestroy(header); + CleanupStack::PopAndDestroy(store); + CleanupStack::PopAndDestroy(entry); + } + return status; + } +TBool CT_MsgVerifyHeaders::VerifyMimeHeaderPartsL(CMsvEntrySelection* aEntrySelection) + { + TBool status = EPass; + for(int index = 0; index < aEntrySelection->Count(); ++index) + { + CMsvEntry* entry = iSharedDataPOP.iSession->GetEntryL(aEntrySelection->At(index)); + CleanupStack::PushL(entry); + CMsvStore* store = entry->ReadStoreL(); + CleanupStack::PushL(store); + if (store->IsPresentL(KUidMsgFileMimeHeader)) + { + CImMimeHeader* mimeHeader = CImMimeHeader::NewLC(); + mimeHeader->RestoreL(*store); + + TBuf<256> param; + TPtrC contentType; + param.Format(KContentType, index); + if(GetStringFromConfig( ConfigSection(), param, contentType)) + { + TPtrC8 content8 = mimeHeader->ContentType(); + HBufC* content16 = HBufC::NewLC(content8.Length()); + content16->Des().Copy(content8); + if(contentType.Compare(content16->Des())) + { + ERR_PRINTF1(_L("Content Type is not matched")); + status = EFail; + } + CleanupStack::PopAndDestroy(content16); + } + TPtrC contentSubType; + param.Format(KContentSubType, index); + if(GetStringFromConfig( ConfigSection(), param, contentSubType)) + { + TPtrC8 content8 = mimeHeader->ContentSubType(); + HBufC* content16 = HBufC::NewLC(content8.Length()); + content16->Des().Copy(content8); + if(contentSubType.Compare(content16->Des())) + { + ERR_PRINTF1(_L("Content Sub Type is not matched")); + status = EFail; + } + CleanupStack::PopAndDestroy(content16); + } + CleanupStack::PopAndDestroy(mimeHeader); + } + CleanupStack::PopAndDestroy(store); + CleanupStack::PopAndDestroy(entry); + } + return status; + } diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/group/T_SmtpServer.mmp --- a/email/email/smtp/group/T_SmtpServer.mmp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/group/T_SmtpServer.mmp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -20,20 +20,20 @@ TARGETTYPE exe UID 0x1000007A 0x10274070 VENDORID 0x70000001 + EPOCHEAPSIZE 0x4000 0x1200000 -#include // Include the Framework #include "../../../framework/group/T_MsgFramework.mph" +APP_LAYER_SYSTEMINCLUDE_SYMBIAN + +USERINCLUDE ../inc +//USERINCLUDE ../../../../../../../app/messaging/email/pop3andsmtpmtm/clientmtms/inc +//USERINCLUDE ../../../../../../../app/messaging/email/pop3andsmtpmtm/servermtmutils/inc SYSTEMINCLUDE /epoc32/include SYSTEMINCLUDE /epoc32/include/test SYSTEMINCLUDE /epoc32/include/comms-infras -APP_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc - - SOURCEPATH ../src SOURCE T_SmtpServer.cpp SOURCE T_MsgAsyncStepSMTP.cpp @@ -76,3 +76,4 @@ LIBRARY netmeta.lib EPOCHEAPSIZE 0x1000 0x800000 +SMPSAFE diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/ImCltCvRecv.h --- a/email/email/smtp/inc/ImCltCvRecv.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/ImCltCvRecv.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/ImCltCvRecv.inl --- a/email/email/smtp/inc/ImCltCvRecv.inl Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/ImCltCvRecv.inl Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -35,3 +35,4 @@ else return iClientEntry->Entry().Id(); } + diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/Local_imcvrecv.h --- a/email/email/smtp/inc/Local_imcvrecv.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/Local_imcvrecv.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ @@ -39,6 +37,10 @@ #include #include #include +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include "timrfc822datefield.h" +#include "cimconvertheader.h" +#endif // Forward Declaration class CImHeader; diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_CheckSmtpBMSetting.h --- a/email/email/smtp/inc/T_CheckSmtpBMSetting.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_CheckSmtpBMSetting.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_CheckSmtpSNAPSetting.h --- a/email/email/smtp/inc/T_CheckSmtpSNAPSetting.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_CheckSmtpSNAPSetting.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_CreateSmtpAccount.h --- a/email/email/smtp/inc/T_CreateSmtpAccount.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_CreateSmtpAccount.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_CreateSmtpMessageFromEmailFile.h --- a/email/email/smtp/inc/T_CreateSmtpMessageFromEmailFile.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_CreateSmtpMessageFromEmailFile.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_CreateSmtpMobilityAccount.h --- a/email/email/smtp/inc/T_CreateSmtpMobilityAccount.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_CreateSmtpMobilityAccount.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_ModifySmtpSettings.h --- a/email/email/smtp/inc/T_ModifySmtpSettings.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_ModifySmtpSettings.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_MsgAsyncStepSMTP.h --- a/email/email/smtp/inc/T_MsgAsyncStepSMTP.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_MsgAsyncStepSMTP.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_MsgSharedDataSmtp.h --- a/email/email/smtp/inc/T_MsgSharedDataSmtp.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_MsgSharedDataSmtp.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_MsgSyncStepSMTP.h --- a/email/email/smtp/inc/T_MsgSyncStepSMTP.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_MsgSyncStepSMTP.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_RemoveSmtpSNAPSetting.h --- a/email/email/smtp/inc/T_RemoveSmtpSNAPSetting.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_RemoveSmtpSNAPSetting.h Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_RetrievePlainBodyTextAndCompare.h --- a/email/email/smtp/inc/T_RetrievePlainBodyTextAndCompare.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_RetrievePlainBodyTextAndCompare.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -22,8 +22,6 @@ - - #ifndef __T_RETRIEVEPLAINBODYTEXTANDCOMPARE_H__ #define __T_RETRIEVEPLAINBODYTEXTANDCOMPARE_H__ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_SendSmtpMessage.h --- a/email/email/smtp/inc/T_SendSmtpMessage.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_SendSmtpMessage.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_SmtpCreateForwardMessage.h --- a/email/email/smtp/inc/T_SmtpCreateForwardMessage.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_SmtpCreateForwardMessage.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -21,8 +21,6 @@ - - #ifndef __T_SMTPCREATE_FORWARDMESSAGE_H__ #define __T_SMTPCREATE_FORWARDMESSAGE_H__ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_SmtpCreateReplyMessage.h --- a/email/email/smtp/inc/T_SmtpCreateReplyMessage.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_SmtpCreateReplyMessage.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -21,8 +21,6 @@ - - #ifndef __T_SMTPCREATE_REPLYMESSAGE_H__ #define __T_SMTPCREATE_REPLYMESSAGE_H__ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_SmtpSendEmail.h --- a/email/email/smtp/inc/T_SmtpSendEmail.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_SmtpSendEmail.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ @@ -31,7 +29,7 @@ // user includes -#include +#include #include "T_MsgAsyncStepSMTP.h" #include "T_MsgSharedDataSmtp.h" diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_SmtpServer.h --- a/email/email/smtp/inc/T_SmtpServer.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_SmtpServer.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_StartRamUsageTimer.h --- a/email/email/smtp/inc/T_StartRamUsageTimer.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_StartRamUsageTimer.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -22,8 +22,6 @@ - - #ifndef _T_START_RAM_USAGE_TIMER_ #define _T_START_RAM_USAGE_TIMER_ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_StopRamUsageTimer.h --- a/email/email/smtp/inc/T_StopRamUsageTimer.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_StopRamUsageTimer.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -22,8 +22,6 @@ - - #ifndef _T_STOP_RAM_USAGE_TIMER_ #define _T_STOP_RAM_USAGE_TIMER_ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/T_UtilsSendEmail.h --- a/email/email/smtp/inc/T_UtilsSendEmail.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/T_UtilsSendEmail.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,8 +19,6 @@ - - /** @file */ @@ -31,7 +29,7 @@ // User Includes -#include +#include // Epoc includes diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/cimmessagepart.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/email/smtp/inc/cimmessagepart.h Fri Mar 05 11:15:10 2010 +0000 @@ -0,0 +1,359 @@ +// 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 the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// cimmessagepart.h +// + +/** + * @file + * @ + * @released + */ + +#ifndef __CIMMESSAGEPART_H__ +#define __CIMMESSAGEPART_H__ + +class CImEmailMessage; +class CImMimeHeader; +class CMsvMimeHeaders; +class CImHtmlConverter; + +class TImCreateMessageOptions +/** +@internalComponent +@released +*/ + { +public: + TMsvPartList iMsvPartList; + TMsvEmailTypeList iMsvEmailTypeList; + TUid iMessageType; + }; + + +class CImRemoveMessagePart : public CMsvOperation +/** +@internalComponent +@released +*/ + { +public: + static CImRemoveMessagePart* DeleteAttachmentL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachmentId); + static CImRemoveMessagePart* DeleteAttachedMessageL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachedMessageId); + ~CImRemoveMessagePart(); + const TDesC8& FinalProgress(); + void DoCancel(); + void RunL(); + const TDesC8& ProgressL(); // returns NULL until operation completed - then returns MessageId + TMsvId RemovedAttachmentId(); +private: + CImRemoveMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId); + void ConstructL(TMsvId aAttachmentId); + void ErrorRecovery(TInt aError); + void SelectNextStateL(); // selects next state to go to + void ChangeStateL(); // initiates the next state operation + void SelectAndChangeToNextStateL(); + void RequestComplete(TInt aError); + void Recover(); // leave message in a 'good' state + + void CheckAttachmentParentTypeL(); + void MoveOtherEntryToParentOfFolderL(); + void DeleteAttachmentEntryL(); + void DeleteFolderEntryL(); + void CompleteRemoveMessagePartL(); +private: + enum TImRemoveMessagePartState + { + ECheckAttachmentParentType, + EMoveOtherEntryToParentOfFolder, + EDeleteAttachmentEntry, + EDeleteFolderEntry, + ECompleteRemoveMessagePart, + EFinished + }; + CMsvEntry& iMsvEntry; + CMsvOperation* iMsvOperation; + + CMsvEntrySelection* iMessageEntrySelection; + CImEmailMessage* iEmailMessage; + + TInt iState; + TPckgBuf iDataMember; + TMsvId iMessageId; + TMsvId iFolderToDeleteId; + TInt iAttachmentSize; + TMsvId iAttachmentId; + TMsvId iEntryToMoveId; + }; + +class CImStoreMessagePart : public CMsvOperation +/** +@internalComponent +@released +*/ + { +public: + static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId, const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus ); + static CImStoreMessagePart* AddEntryAsAttachmentL(TMsvId aMessageId,TMsvId aAttachmentMessageId, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus); + static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId,RFile& aFile, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); + static CImStoreMessagePart* AddLinkedAttachmentL(TMsvId aMessageId,const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus ); + static CImStoreMessagePart* CreateAttachmentL(TMsvId aMessageId,const TDesC& aFileName, RFile& aAttachmentFile,CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); + static CImStoreMessagePart* AddRelatedPartL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId); + static CImStoreMessagePart* StoreBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, TBool aUsePlainTextStorage = EFalse); + static CImStoreMessagePart* StoreBodyTextWithMimeHeaderL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, const CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = EFalse); + static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = ETrue); + static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = ETrue); + ~CImStoreMessagePart(); + const TDesC8& FinalProgress(); + void DoCancel(); + void RunL(); + const TDesC8& ProgressL(); +private: + enum TImMessagePart + { + EMessagePartAttachment, + EMessagePartBody, + EMessagePartMessageAttachment + }; + void ConstructL(RFile& aFile); + void ConstructL(RFile& aFile,const TDesC& aAttachmentName); + void ConstructL(const TDesC& aAttachmentFullName, const TDesC8& aContentId); + void ConstructAttachmentInfo(CMsvAttachment* aAttachmentInfo,TInt aAttachmentCreationState); + CImStoreMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = EFalse); + + void ConstructL(); + void ConstructL(const TDesC& aAttachmentFullName); + void ConstructL(TMsvId aAttachmentMessageId); + void ConstructL(const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId); + void ConstructL(CRichText& aRichText); + void ConstructL(CRichText& aRichText, const CImMimeHeader& aMimeHeader); + void ConstructL(CImMimeHeader& aMimeHeader); + void ConstructL(TImMessagePart aMessagePart); + void ErrorRecovery(TInt error); + void SelectNextStateL(); // selects next state to go to + void ChangeStateL(); // initiates the next state operation + void SelectAndChangeToNextStateL(); + void RequestComplete(TInt aError); + void Recover(); + + TBool HTMLMessage() const; + void SetHTMLMessage(TBool aFlag); + TBool MultipartMixedExists() const; + void SetMultipartMixedExists(TBool aFlag); + TBool MultipartMixedCreated() const; + void SetMultipartMixedCreated(TBool aFlag); + TBool MultipartAlternativeExists() const; + void SetMultipartAlternativeExists(TBool aFlag); + TBool MultipartAlternativeCreated() const; + void SetMultipartAlternativeCreated(TBool aFlag); + TBool MultipartRelatedExists() const; + void SetMultipartRelatedExists(TBool aFlag); + TBool MultipartRelatedCreated() const; + void SetMultipartRelatedCreated(TBool aFlag); + TBool TextPartExists() const; + void SetTextPartExists(TBool aFlag); + TBool TextPartCreated() const; + void SetTextPartCreated(TBool aFlag); + TBool AttachmentEntryCreated() const; + void SetAttachmentEntryCreated(TBool aFlag); + + void FindMultipartRelatedFolderL(); + void CheckForSubfolderL(); + void CreateAttachmentEntryL(); + void CopyOrigMessageToMessageL(); + void CreateMultipartMixedFolderEntryL(); + void CreateMultipartAlternativeFolderEntryL(); + void CreateMultipartRelatedFolderEntryL(); + void MoveOriginalMessageEntryChildrenToNewFolderL(); + void CreateTextEntryL(); + void StoreRichTextL(); + void CompleteStoreMessagePartL(); + void CreateHTMLEntryL(); + void PrepareToStoreHTMLEntryTextL(); + void StoreHTMLEntryTextL(); + void RemoveHTMLEntryL(); + void MoveTextEntryToAltFolderL(); + TPtrC GetDefaultAttachmentName(); + void OpenAndReadResourceFileL(); + void StoreMimeHeaderL(); + TBool CreateAttachmentMimeHeaderL(CImMimeHeader& aMimeHeader, const TDesC& aDetails); + void CreateFolderMimeHeaderL(CImMimeHeader& aMimeHeader); + void CreateMessageMimeHeaderL(CImMimeHeader& aMimeHeader); + void AddAttachmentL(); + void AddAttachmentUsingFileHandleL(); + void AddLinkedAttachmentL(); + void AddEntryAsAttachmentL(); + void CreateAttachmentL(); + void DoAttachmentStoreL(); + TInt CheckMimeInAttachmentInfoL(CMsvMimeHeaders& aMsvMimeHeaders); + CImMimeHeader* ProcessAttachmentMimeHeadersL(); + void SetEntryDetailsL(TMsvEntry& aEntry); + void StorePlainTextL(); +private: + enum TImStoreMessagePartState + { + EFindMultipartRelatedFolder, + ECheckForSubfolder, + ECreateAttachmentEntry, + EStoreAttachment, + ECopyOrigMessageToMessage, + ECreateMultipartMixedFolderEntry, + ECreateMultipartRelatedFolderEntry, + ECreateMultipartAlternativeFolderEntry, + EMoveOriginalMessageEntryChildrenToNewFolder, + ECreateTextEntry, + EStoreRichText, + ERemoveHTMLEntry, + EMoveTextToAlternativeFolder, + ECreateHTMLEntry, + EPrepareToStoreHTMLEntryText, + EStoreHTMLEntryText, + ECompleteStoreMessage, + EFinished + ,EStoreHTMLTextInEntry, + EAddEntryAttachment + }; + + enum TImStoreMessagePartFlags + { + KStoreMessagePartClearFlag = 0x00000000, + KStoreMessagePartHTMLMessage = 0x00000001, + KStoreMessagePartMultipartMixedExists = 0x00000002, + KStoreMessagePartMultipartMixedCreated = 0x00000004, + KStoreMessagePartMultipartAlternativeExists = 0x00000008, + KStoreMessagePartMultipartAlternativeCreated = 0x00000010, + KStoreMessagePartTextPartExists = 0x00000020, + KStoreMessagePartTextPartCreated = 0x00000040, + KStoreMessagePartAttachmentEntryCreated = 0x00000080, + KStoreMessagePartOrigMessageEntryChildrenCopied = 0x00000100, + KStoreMessagePartOrigMessageEntryChildrenDeleted = 0x00000200, + KStoreMessagePartMultipartRelatedExists = 0x00000400, + KStoreMessagePartMultipartRelatedCreated = 0x00000800 + }; + CMsvEntry& iMsvEntry; + CMsvOperation* iMsvOperation; + + CRichText* iRichTextToStore; // I don't own this object! + CImMimeHeader* iMimeHeaderOfBodyText; + CRichText* iRichText; + CFileMan* iFileMan; + CMsvEntrySelection* iMessageEntrySelection; + + TInt iState; + TPckgBuf iDataMember; + TMsvId iMessageId; + TImMessagePart iMessagePart; + TMsvId iMixFolderId; + TMsvId iAltFolderId; + TMsvId iRelFolderId; + HBufC* iAttachmentFullName; + TInt iAttachmentSize; + TMsvId iAttachmentId; + TMsvId iTextId; + TMsvId iHtmlId; + TMsvId iRelatedPartId; + TMsvId iAttachmentMessageId; + TUint32 iFlags; + HBufC8* iContentId; + CImEmailMessage* iEmailMessage; + + // Used when converting rich text to html + CParaFormatLayer* iParaLayer; + CCharFormatLayer* iCharLayer; + CImHtmlConverter* iHtmlConverter; + TBool iFinishedConvertingHTML; + CMsvAttachment* iAttachmentInfo; + CMsvStore* iStore; + TInt iAttachmentCreateState; + TBool iIsAddByFileHandle; + RFile* iFileHandle; + RFile iFile; + // Indicates whether to store message body as CRichText or plaintext. + TBool iUsePlainTextStorage; + // Size of the plain text body. + TInt iSizeOfBody; + // Size of the Fwd'ed/ReplyTo plaintext body part. + TInt iSizeFwdReplyBody; + // The error value returned when CRichText is populated with message body text. + TInt iRestoreErr; + enum TImAttachmentCreation + { + EAddAttachment, + EAddAttachmentUsingFileHandle, + EAddLinkedAttachment, + EAddEntryAsAttachment, + ECreateAttachment + }; + }; + +class CImHtmlConverter : public CBase +/** +@internalComponent +@released +*/ + { +public: + static CImHtmlConverter* NewL(CMsvEntry& aMsvEntry, CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); + ~CImHtmlConverter(); + void PrepareToStoreHTMLEntryTextL(TMsvId& aHtmlId, const TMsvId aTextId); + void ResetStoreL(); + void ResetStoreWithoutCommit(); + TBool StoreHTMLEntryTextAL(TRequestStatus& aStatus); + CMsvOperation* ChangeHTMLTextInEnrtyL(TRequestStatus& aStatus); + + void ReadDefaultAttachmentNameL( RResourceFile& resourceFile); + TInt Size() const; + +private: + CImHtmlConverter(CMsvEntry& aMsvEntry, CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); + TFileName HtmlFilename(CMsvEntry& aEntry, TPtrC aFileName); + TPtrC GetDefaultAttachmentName(); + void ConstructL(); + +private: + CMsvEntry& iMsvEntry; + CParaFormatLayer& iParaLayer; + CCharFormatLayer& iCharLayer; + + CConverterBase* iToHTMLConverter; + CCnaConverterList* iConverterList; + + TMsvId iTextId; + TMsvId iHtmlId; + TInt iSize; + HBufC* iDefaultAttachmentName; + CRichText* iRichText; + RDesReadStream iSourceStream; + RFileWriteStream iTargetStream; + CMsvStore* iStore; + RFile iFile; + }; + +class CImStoreResolver : public CBase, public MRichTextStoreResolver +/** +@internalComponent +@released +*/ + { +public: + CImStoreResolver(CStreamStore* aStore); + ~CImStoreResolver(); + // +private: + const CStreamStore& StreamStoreL(TInt aPos)const; + // +private: + CStreamStore* iStore; + }; + +#endif //__CIMMESSAGEPART_H__ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/local_imcvrecv.inl --- a/email/email/smtp/inc/local_imcvrecv.inl Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/local_imcvrecv.inl Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -19,9 +19,6 @@ - - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/local_imutdll.h --- a/email/email/smtp/inc/local_imutdll.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/local_imutdll.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -17,8 +17,6 @@ - - /** @file */ @@ -35,6 +33,9 @@ #include // RResourceFile #endif +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS +#include "timrfc822datefield.h" +#endif /** Panics and errors codes for email message creation. diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/inc/t_smtpcreatenewmessagewithplainbodytext.h --- a/email/email/smtp/inc/t_smtpcreatenewmessagewithplainbodytext.h Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/inc/t_smtpcreatenewmessagewithplainbodytext.h Fri Mar 05 11:15:10 2010 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -21,8 +21,6 @@ - - #ifndef __T_SMTP_CREATENEWMESSAGE_WITHPLAINBODYTEXT_H__ #define __T_SMTP_CREATENEWMESSAGE_WITHPLAINBODYTEXT_H__ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/ImCltCvRecv.cpp --- a/email/email/smtp/src/ImCltCvRecv.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/ImCltCvRecv.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -13,8 +13,6 @@ // Description: // - - /** @file */ @@ -24,7 +22,7 @@ #include #include -#include +#include "cmsvbodytext.h" #include "ImCltCvRecv.h" #ifdef __WINS__ @@ -1011,7 +1009,8 @@ { AddFileExtension(); } - CMsvStore* store = iClientEntry->EditStoreL(); + + CMsvStore* store = iClientEntry->EditStoreL(); CleanupStack::PushL(store); CMsvAttachment* attachment = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); CleanupStack::PushL(attachment); @@ -1101,26 +1100,20 @@ { CMsvStore* entryStore = NULL; TBool commitStore = EFalse; - - TRAPD(error, entryStore = iClientEntry->EditStoreL()); + TRAPD(error, entryStore = iClientEntry->EditStoreL()); if(error==KErrNone) // if store does not exist then the entry is the wrong type { CleanupStack::PushL(entryStore); if (aSettings & KStore822Header) - { Store822HeaderL(*entryStore, commitStore); - } if (aSettings & KStoreMIMEHeader) - { StoreMIMEHeaderL(*entryStore, commitStore); - } if (aSettings & KStoreBodyText) - { StoreBodyTextL(*entryStore, commitStore); - } + // only commit to the store if I wrote something into it if (commitStore) { @@ -1129,7 +1122,7 @@ } StoreEntryDataL(); - CleanupStack::PopAndDestroy(); //entryStore + CleanupStack::PopAndDestroy(); //entryStore } } @@ -1442,3 +1435,5 @@ iParent->At(0).iSize=0; } } + + diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/Local_imcvrecv.cpp --- a/email/email/smtp/src/Local_imcvrecv.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/Local_imcvrecv.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -13,8 +13,6 @@ // Description: // - - /** @file */ @@ -36,7 +34,7 @@ #include // For including KUidMsgTypePOP3 #include // TResourceReader -#include +#include "cmsvbodytext.h" #ifdef __WINS__ #include // for maxfilename lengths @@ -1660,7 +1658,7 @@ if (addExtension) AddFileExtension(); - CMsvStore* store = iServerEntry->EditStoreL(); + CMsvStore* store = iServerEntry->EditStoreL(); CleanupStack::PushL(store); CMsvAttachment* attachment = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); RFile file; @@ -1748,7 +1746,8 @@ RECVLOG(KDeletingAttachFile) { // NOTE - need the braces to stop error for re-definition of store - CMsvStore* store = iServerEntry->EditStoreL(); + + CMsvStore* store = iServerEntry->EditStoreL(); CleanupStack::PushL(store); // Remove the attachment and commit the store. @@ -1784,7 +1783,7 @@ RECVLOG(KDeletingAttachFile) { // NOTE - need the braces to stop error for re-definition of store - CMsvStore* store = iServerEntry->EditStoreL(); + CMsvStore* store = iServerEntry->EditStoreL(); CleanupStack::PushL(store); // Remove the attachment and commit the store. @@ -2251,8 +2250,7 @@ { CMsvStore* entryStore = NULL; TBool commitStore = EFalse; - - TRAPD(error, entryStore = iServerEntry->EditStoreL()); + TRAPD(error, entryStore = iServerEntry->EditStoreL()); if(error==KErrNone) // if store does not exist then the entry is the wrong type { CleanupStack::PushL(entryStore); @@ -2274,9 +2272,9 @@ } StoreEntryDataL(); - CleanupStack::PopAndDestroy(); //entryStore + CleanupStack::PopAndDestroy(); //entryStore } - + } RECVLOG(KDoneStoringEntryStream); } @@ -2506,7 +2504,8 @@ iOutputBody->InsertL(length,*msg); CleanupStack::PopAndDestroy(msg); store=NULL; - store = iServerEntry->EditStoreL(); + store = iServerEntry->EditStoreL(); + CleanupStack::PushL(store); store->StoreBodyTextL(*iOutputBody); store->Commit(); @@ -4018,3 +4017,4 @@ return iServerEntry->Entry().Id(); } } + diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/Local_imutdll.cpp --- a/email/email/smtp/src/Local_imutdll.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/Local_imutdll.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -13,8 +13,6 @@ // Description: // - - /** @file */ @@ -23,11 +21,14 @@ #include // RFs #include // RResourceFile #include // Bafl:: -#include +#include "msvutils.h" #include #include "local_imutdll.h" #include // resource file name +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include "timrfc822datefield.h" +#endif _LIT(KMTFName,"Messaging Test Framework"); diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_CheckSmtpBMSetting.cpp --- a/email/email/smtp/src/T_CheckSmtpBMSetting.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_CheckSmtpBMSetting.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_CheckSmtpSNAPSetting.cpp --- a/email/email/smtp/src/T_CheckSmtpSNAPSetting.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_CheckSmtpSNAPSetting.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_CreateSmtpAccount.cpp --- a/email/email/smtp/src/T_CreateSmtpAccount.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_CreateSmtpAccount.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_CreateSmtpMessageFromEmailFile.cpp --- a/email/email/smtp/src/T_CreateSmtpMessageFromEmailFile.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_CreateSmtpMessageFromEmailFile.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -19,6 +19,8 @@ // EmailFileName : Email file from which the message is to be created // KilobytesExtra : Number of lines of 1024 characters to add to body text // Default value is 0. +// SmtpAccountName : SMTP account name for the SMTP service that would be used for sending the message. +// If SMTP account name is not specified then default SMTP service ID would be used. // [Test Step Description] // Creates an Email message reading the contents from the email file specified // from the config file. @@ -27,8 +29,6 @@ // // - - /** @file */ @@ -41,6 +41,7 @@ // Literals Used +_LIT(KSmtpAccountName, "SmtpAccountName"); _LIT(KEmailFileName, "EmailFileName"); _LIT(KParentFolderName,"ParentFolderName"); _LIT(KKilobytesExtra, "KilobytesExtra"); @@ -136,9 +137,18 @@ { INFO_PRINTF2(_L("The parent folder Id is %d"),parentFolderId ); - // Retrieve the default Smtp service Id + // Retrieve the required SMTP service Id TMsvId smtpServiceId(0); - TRAPD(err,smtpServiceId = CT_MsgUtilsCentralRepository::GetDefaultSmtpServiceIdL()); + TPtrC smtpAccountName; + TInt err; + if( !GetStringFromConfig(ConfigSection(), KSmtpAccountName, smtpAccountName )) + { + TRAP(err, smtpServiceId = CT_MsgUtilsCentralRepository::GetDefaultSmtpServiceIdL()); + } + else + { + TRAP(err, smtpServiceId = CT_MsgUtilsCentralRepository::GetSmtpServiceIdL((TDes&)smtpAccountName)); + } if(smtpServiceId == KMsvNullIndexEntryId) { ERR_PRINTF1(_L("Invalid account name specified")); @@ -251,6 +261,7 @@ CleanupStack::PushL(emailAddress); entry->SetEntryL(messageId); + CMsvStore* store = entry->EditStoreL(); CleanupStack::PushL(store); diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_CreateSmtpMobilityAccount.cpp --- a/email/email/smtp/src/T_CreateSmtpMobilityAccount.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_CreateSmtpMobilityAccount.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_ModifySmtpSettings.cpp --- a/email/email/smtp/src/T_ModifySmtpSettings.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_ModifySmtpSettings.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_MsgAsyncStepSMTP.cpp --- a/email/email/smtp/src/T_MsgAsyncStepSMTP.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_MsgAsyncStepSMTP.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -17,8 +17,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_MsgSharedDataSmtp.cpp --- a/email/email/smtp/src/T_MsgSharedDataSmtp.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_MsgSharedDataSmtp.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -13,8 +13,6 @@ // Description: // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_MsgSyncStepSMTP.cpp --- a/email/email/smtp/src/T_MsgSyncStepSMTP.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_MsgSyncStepSMTP.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -15,8 +15,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_RemoveSmtpSNAPSetting.cpp --- a/email/email/smtp/src/T_RemoveSmtpSNAPSetting.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_RemoveSmtpSNAPSetting.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_RetrievePlainBodyTextAndCompare.cpp --- a/email/email/smtp/src/T_RetrievePlainBodyTextAndCompare.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_RetrievePlainBodyTextAndCompare.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -34,8 +34,6 @@ // // - - /** @file */ @@ -306,3 +304,4 @@ } return TestStepResult(); } + diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_SendSmtpMessage.cpp --- a/email/email/smtp/src/T_SendSmtpMessage.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_SendSmtpMessage.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -17,6 +17,8 @@ // ParentFolderName : Local folder name in which the message to be sent is // present // Subject : Subject of the message to be sent +// SmtpAccountName : SMTP account name to be used for sending the message. If this is +// not specified, message(s) would send using the default SMTP service. // Searches for the message with the specified subject and sends the message if the // message is found. If the local folder name is invalid or if the message is // not found in the given folder,the test step fails. @@ -26,8 +28,6 @@ // // - - /** @file */ @@ -44,6 +44,7 @@ // Literals Used _LIT(KSubject,"Subject"); _LIT(KParentFolderName,"ParentFolderName"); +_LIT(KSmtpAccountName, "SmtpAccountName"); /** @@ -174,22 +175,30 @@ // Retrieve the default Smtp service Id TMsvId smtpServiceId(0); - TRAPD(err, smtpServiceId = CT_MsgUtilsCentralRepository::GetDefaultSmtpServiceIdL()); + TPtrC smtpAccountName; + TInt err; + if( !GetStringFromConfig(ConfigSection(), KSmtpAccountName, smtpAccountName )) + { + TRAP(err, smtpServiceId = CT_MsgUtilsCentralRepository::GetDefaultSmtpServiceIdL()); + } + else + { + TRAP(err, smtpServiceId = CT_MsgUtilsCentralRepository::GetSmtpServiceIdL((TDes&)smtpAccountName)); + } + if(err != KErrNone) { - ERR_PRINTF2(_L("Failure while getting the default SMTP Service Id. error = %d"),err); + ERR_PRINTF2(_L("Failure while getting the SMTP Service Id. error = %d"),err); SetTestStepResult(EFail); } else { - INFO_PRINTF2(_L("The Default Smtp Service Id is %d"),smtpServiceId ); - + INFO_PRINTF2(_L("The SMTP Service Id is %d"),smtpServiceId ); // Setting the current context to the parent of the mesage CMsvEntry* folderEntry = CMsvEntry::NewL(*iSharedDataSMTP.iSession, messageId , TMsvSelectionOrdering()); CleanupStack::PushL(folderEntry); folderEntry->SetEntryL(messageId); folderEntry->SetEntryL(folderEntry->Entry().Parent()); - // Sends the message CT_MsgActive& active=Active(); iOperation = folderEntry->CopyL(messageId, smtpServiceId, active.iStatus); diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_SmtpCreateForwardMessage.cpp --- a/email/email/smtp/src/T_SmtpCreateForwardMessage.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_SmtpCreateForwardMessage.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -37,8 +37,6 @@ // - - // User includes #include "T_SmtpCreateForwardMessage.h" #include @@ -49,7 +47,9 @@ // Epoc includes #include - +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include "cimmessagepart.h" +#endif // Literals Used _LIT(KServiceType, "ServiceType"); @@ -306,7 +306,7 @@ CMsvEntry *entry = CMsvEntry::NewL(*(iSharedDataSMTP.iSession), newMessageId, TMsvSelectionOrdering(KMsvNoGrouping,EMsvSortByNone,ETrue)); CleanupStack::PushL(entry); entry->SetEntryL(newMessageId); // - CMsvStore* store = entry->EditStoreL(); + CMsvStore* store = entry->EditStoreL(); CleanupStack::PushL(store); CImHeader* header = CImHeader::NewLC(); @@ -359,3 +359,4 @@ INFO_PRINTF2(_L("Default Email Address is %s"),iRecipientAddress->Ptr()); CleanupStack::PopAndDestroy(settings); // settings } + diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_SmtpCreateNewMessageWithPlainBodyText.cpp --- a/email/email/smtp/src/T_SmtpCreateNewMessageWithPlainBodyText.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_SmtpCreateNewMessageWithPlainBodyText.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -30,8 +30,6 @@ // // - - // User includes #include "t_smtpcreatenewmessagewithplainbodytext.h" #include @@ -41,6 +39,9 @@ // Epoc includes #include #include +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include "cimmessagepart.h" +#endif // Literals Used _LIT(KSubject, "Subject"); @@ -280,7 +281,7 @@ CMsvEntry *entry = CMsvEntry::NewL(*(iSharedDataSMTP.iSession), newMessageId, TMsvSelectionOrdering(KMsvNoGrouping,EMsvSortByNone,ETrue)); CleanupStack::PushL(entry); entry->SetEntryL(newMessageId); // - CMsvStore* store = entry->EditStoreL(); + CMsvStore* store = entry->EditStoreL(); CleanupStack::PushL(store); CImHeader* header = CImHeader::NewLC(); @@ -311,3 +312,4 @@ CleanupStack::PopAndDestroy(3,entry); // header, store, entry } } + diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_SmtpCreateReplyMessage.cpp --- a/email/email/smtp/src/T_SmtpCreateReplyMessage.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_SmtpCreateReplyMessage.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -34,8 +34,6 @@ // // - - // User includes #include "T_SmtpCreateReplyMessage.h" #include @@ -46,7 +44,9 @@ // Epoc includes #include - +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include "cimmessagepart.h" +#endif // Literals Used _LIT(KServiceType, "ServiceType"); @@ -302,7 +302,7 @@ CMsvEntry *entry = CMsvEntry::NewL(*(iSharedDataSMTP.iSession), newMessageId, TMsvSelectionOrdering(KMsvNoGrouping,EMsvSortByNone,ETrue)); CleanupStack::PushL(entry); entry->SetEntryL(newMessageId); // - CMsvStore* store = entry->EditStoreL(); + CMsvStore* store = entry->EditStoreL(); CleanupStack::PushL(store); CImHeader* header = CImHeader::NewLC(); @@ -323,3 +323,4 @@ CleanupStack::PopAndDestroy(3,entry); // header, store, entry } } + diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_SmtpSendEmail.cpp --- a/email/email/smtp/src/T_SmtpSendEmail.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_SmtpSendEmail.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -32,8 +32,6 @@ // // - - /** @file */ diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_SmtpServer.cpp --- a/email/email/smtp/src/T_SmtpServer.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_SmtpServer.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_StartRamUsageTimer.cpp --- a/email/email/smtp/src/T_StartRamUsageTimer.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_StartRamUsageTimer.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -23,8 +23,6 @@ // // - - // User includes #include "T_StartRamUsageTimer.h" #include "T_MsgSharedDataSmtp.h" diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_StopRamUsageTimer.cpp --- a/email/email/smtp/src/T_StopRamUsageTimer.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_StopRamUsageTimer.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -24,8 +24,6 @@ // // - - // User includes #include "T_StopRamUsageTimer.h" #include diff -r e3e31170f643 -r 147b85a37c23 email/email/smtp/src/T_UtilsSendEmail.cpp --- a/email/email/smtp/src/T_UtilsSendEmail.cpp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/email/smtp/src/T_UtilsSendEmail.cpp Fri Mar 05 11:15:10 2010 +0000 @@ -1,7 +1,7 @@ // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// 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". // @@ -15,8 +15,6 @@ // // - - /** @file */ @@ -400,3 +398,4 @@ } } // End switch (iSendState) } + diff -r e3e31170f643 -r 147b85a37c23 email/testutils/group/T_Utils.mmp --- a/email/testutils/group/T_Utils.mmp Fri Mar 05 09:11:09 2010 +0000 +++ b/email/testutils/group/T_Utils.mmp Fri Mar 05 11:15:10 2010 +0000 @@ -26,7 +26,7 @@ VENDORID 0x70000001 -SYSTEMINCLUDE /epoc32/include +APP_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../inc