diff -r 000000000000 -r 8e480a14352b messagingfw/msgtestfw/TestActions/Base/src/CMtfTestActionGetBaseConstants.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingfw/msgtestfw/TestActions/Base/src/CMtfTestActionGetBaseConstants.cpp Mon Jan 18 20:36:02 2010 +0200 @@ -0,0 +1,92 @@ +// Copyright (c) 2003-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: +// __ACTION_INFO_BEGIN__ +// [Action Name] +// GetBaseConstants +// [Action Parameters] +// InboxFolderId : Value of the local inbox folder id. +// OutboxFolderId : Value of the local outbox folder id. +// DraftsFolderId : Value of the local drafts folder id. +// SentFolderId : Value of the local sent folder id. +// DeletedFolderId : Value of the local deleted folder id. +// [Action Description] +// Initialises base related constants. +// [APIs Used] +// none. +// __ACTION_INFO_END__ +// +// + +/** + @file +*/ + +#include "CMtfTestActionGetBaseConstants.h" +#include "CMtfTestCase.h" +#include "CMtfTestActionParameters.h" + +#include + + +CMtfTestAction* CMtfTestActionGetBaseConstants::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) + { + CMtfTestActionGetBaseConstants* self = new (ELeave) CMtfTestActionGetBaseConstants(aTestCase); + CleanupStack::PushL(self); + self->ConstructL(aActionParameters); + CleanupStack::Pop(); + return self; + } + + +CMtfTestActionGetBaseConstants::CMtfTestActionGetBaseConstants(CMtfTestCase& aTestCase) + : CMtfSynchronousTestAction(aTestCase) + { + } + + +CMtfTestActionGetBaseConstants::~CMtfTestActionGetBaseConstants() + { + } + + +void CMtfTestActionGetBaseConstants::ExecuteActionL() + { + TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionGetBaseConstants); + TMsvId paramInboxFolderId = KMsvGlobalInBoxIndexEntryId; + StoreParameterL(TestCase(),paramInboxFolderId,ActionParameters().Parameter(0)); + + TMsvId paramOutboxFolderId = KMsvGlobalOutBoxIndexEntryId; + StoreParameterL(TestCase(),paramOutboxFolderId,ActionParameters().Parameter(1)); + + TMsvId paramDraftsFolderId = KMsvDraftEntryId; + StoreParameterL(TestCase(),paramDraftsFolderId,ActionParameters().Parameter(2)); + + TMsvId paramSentFolderId = KMsvSentEntryId; + StoreParameterL(TestCase(),paramSentFolderId,ActionParameters().Parameter(3)); + + TMsvId paramDeletedFolderId = KMsvDeletedEntryFolderEntryId; + StoreParameterL(TestCase(),paramDeletedFolderId,ActionParameters().Parameter(4)); + + if (ActionParameters().Count() > 5) + { // Add extra default params for root index, without having to change all the ini files. + TMsvId paramRootIndexEntryId = KMsvRootIndexEntryId; + StoreParameterL(TestCase(),paramRootIndexEntryId,ActionParameters().Parameter(5)); + } + + + TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionGetBaseConstants ); + TestCase().ActionCompletedL(*this); + } + +