diff -r 9f5ae1728557 -r db3f5fa34ec7 messagingfw/msgtestfw/TestActions/Email/Pop3/src/CMtfTestActionPop3TopBase.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingfw/msgtestfw/TestActions/Email/Pop3/src/CMtfTestActionPop3TopBase.cpp Wed Nov 03 22:41:46 2010 +0530 @@ -0,0 +1,66 @@ +// Copyright (c) 2004-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: +// + +/** + @file +*/ + +#include "CMtfTestCase.h" +#include "MtfTestActionUtilsUser.h" +#include "CMtfTestActionPop3TopBase.h" +#include "CMtfTestActionParameters.h" +#include "CPop3MailInfo.h" + + +CMtfTestActionPop3TopBase::CMtfTestActionPop3TopBase(CMtfTestCase& aTestCase) + : CMtfTestAction(aTestCase) + { + } + +CMtfTestActionPop3TopBase::~CMtfTestActionPop3TopBase() + { + delete iOperation; + } + +void CMtfTestActionPop3TopBase::DoCancel() + { + iOperation->Cancel(); + } + +void CMtfTestActionPop3TopBase::RunL() + { + TInt err = MtfTestActionUtilsUser::FinalProgressStatus( *iOperation, iStatus ); + delete iOperation; + iOperation = NULL; + User::LeaveIfError(err); + TestCase().ActionCompletedL(*this); + } + +void CMtfTestActionPop3TopBase::DoInvokeAsyncFunctionL( TPop3Cmds aCommand ) + { + TMsvId paramServiceId = ObtainValueParameterL(TestCase(), ActionParameters().Parameter(0)); + CPop3ClientMtm *paramMtm = ObtainParameterReferenceL(TestCase(),ActionParameters().Parameter(1)); + CPop3MailInfo *paramMailInfo = ObtainParameterReferenceL(TestCase(),ActionParameters().Parameter(2)); + CMsvEntrySelection* paramSelection = ObtainParameterReferenceL(TestCase(),ActionParameters().Parameter(3)); + + TPop3MailInfoBuf paramPack( paramMailInfo->MailInfo() ); + paramSelection->InsertL( 0, paramServiceId ); + iOperation = paramMtm->InvokeAsyncFunctionL( aCommand, *paramSelection, paramPack, iStatus ); + CActiveScheduler::Add(this); + iStatus = KRequestPending; + SetActive(); + } + +