messagingfw/msgtestfw/TestActions/Base/src/CMtfTestActionAppendToSelection.cpp
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // __ACTION_INFO_BEGIN__ 
       
    15 // [Action Name]
       
    16 // AppendToSelection
       
    17 // [Action Parameters]
       
    18 // Selection <input>: Reference to the selection.
       
    19 // EntryId   <input>: Value of the entry id.
       
    20 // [Action Description]
       
    21 // Adds the entry to the selection.
       
    22 // [APIs Used]
       
    23 // CMsvEntrySelection::AppendL
       
    24 // __ACTION_INFO_END__
       
    25 // 
       
    26 //
       
    27 
       
    28 /**
       
    29  @file
       
    30 */
       
    31 
       
    32 #include "CMtfTestActionAppendToSelection.h"
       
    33 #include "CMtfTestCase.h"
       
    34 #include "CMtfTestActionParameters.h"
       
    35 
       
    36 
       
    37 CMtfTestAction* CMtfTestActionAppendToSelection::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters)
       
    38 	{
       
    39 	CMtfTestActionAppendToSelection* self = new (ELeave) CMtfTestActionAppendToSelection(aTestCase);
       
    40 	CleanupStack::PushL(self);
       
    41 	self->ConstructL(aActionParameters);
       
    42 	CleanupStack::Pop();
       
    43 	return self;
       
    44 	}
       
    45 	
       
    46 
       
    47 CMtfTestActionAppendToSelection::CMtfTestActionAppendToSelection(CMtfTestCase& aTestCase)
       
    48 	: CMtfSynchronousTestAction(aTestCase)
       
    49 	{
       
    50 	}
       
    51 
       
    52 
       
    53 CMtfTestActionAppendToSelection::~CMtfTestActionAppendToSelection()
       
    54 	{
       
    55 	}
       
    56 
       
    57 
       
    58 void CMtfTestActionAppendToSelection::ExecuteActionL()
       
    59 	{
       
    60 	TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionAppendToSelection);
       
    61 	CMsvEntrySelection* paramSelection = ObtainParameterReferenceL<CMsvEntrySelection>(TestCase(),ActionParameters().Parameter(0));
       
    62 	TMsvId paramEntryId = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));
       
    63 
       
    64 	paramSelection->AppendL(paramEntryId);
       
    65 
       
    66 	TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionAppendToSelection);
       
    67 	TestCase().ActionCompletedL(*this);
       
    68 	}
       
    69 
       
    70