|
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 // SetDefaultDataFile |
|
17 // [Action Parameters] |
|
18 // FilePath <input>: Name of the Default File path to be set |
|
19 // [Action Description] |
|
20 // Sets the default configuration file of type EMtfDataFile |
|
21 // [APIs Used] |
|
22 // none. |
|
23 // __ACTION_INFO_END__ |
|
24 // |
|
25 // |
|
26 |
|
27 /** |
|
28 @file |
|
29 */ |
|
30 |
|
31 #include "CMtfTestActionSetDefaultDataFile.h" |
|
32 #include "CMtfTestCase.h" |
|
33 #include "CMtfTestActionParameters.h" |
|
34 #include "CMtfConfigurationType.h" |
|
35 |
|
36 |
|
37 CMtfTestAction* CMtfTestActionSetDefaultDataFile::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
38 { |
|
39 CMtfTestActionSetDefaultDataFile* self = new (ELeave) CMtfTestActionSetDefaultDataFile(aTestCase); |
|
40 CleanupStack::PushL(self); |
|
41 self->ConstructL(aActionParameters); |
|
42 CleanupStack::Pop(); |
|
43 return self; |
|
44 } |
|
45 |
|
46 // does nothing |
|
47 CMtfTestActionSetDefaultDataFile::CMtfTestActionSetDefaultDataFile(CMtfTestCase& aTestCase) |
|
48 :CMtfSynchronousTestAction(aTestCase) |
|
49 { |
|
50 } |
|
51 |
|
52 // does nothing |
|
53 CMtfTestActionSetDefaultDataFile::~CMtfTestActionSetDefaultDataFile() |
|
54 { |
|
55 } |
|
56 |
|
57 void CMtfTestActionSetDefaultDataFile::ExecuteActionL() |
|
58 { |
|
59 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionSetDefaultDataFile); |
|
60 HBufC* paramFilePath = ObtainParameterReferenceL<HBufC>(TestCase(),ActionParameters().Parameter(0)); |
|
61 CMtfConfigurationType* configType=CMtfConfigurationType::NewL(CMtfConfigurationType::EMtfDataFile); |
|
62 CleanupStack::PushL(configType); |
|
63 configType->AddConfigurationFilenameL(*paramFilePath); |
|
64 CleanupStack::PopAndDestroy(configType); |
|
65 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionSetDefaultDataFile); |
|
66 TestCase().ActionCompletedL(*this); |
|
67 } |