|
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 // CreateRegistry |
|
17 // [Action Parameters] |
|
18 // Session <input>: Reference to the session. |
|
19 // MtmRegistry <output>: Reference to the client MTM registry. |
|
20 // [Action Description] |
|
21 // Creates the client MTM registry. |
|
22 // [APIs Used] |
|
23 // none |
|
24 // __ACTION_INFO_END__ |
|
25 // |
|
26 // |
|
27 |
|
28 /** |
|
29 @file |
|
30 */ |
|
31 |
|
32 |
|
33 #include "CMtfTestActionCreateRegistry.h" |
|
34 #include "CMtfTestCase.h" |
|
35 #include "CMtfTestActionParameters.h" |
|
36 |
|
37 #include <msvapi.h> |
|
38 #include <mtclreg.h> |
|
39 |
|
40 |
|
41 CMtfTestAction* CMtfTestActionCreateRegistry::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
42 { |
|
43 CMtfTestActionCreateRegistry* self = new (ELeave) CMtfTestActionCreateRegistry(aTestCase); |
|
44 CleanupStack::PushL(self); |
|
45 self->ConstructL(aActionParameters); |
|
46 CleanupStack::Pop(); |
|
47 return self; |
|
48 } |
|
49 |
|
50 |
|
51 CMtfTestActionCreateRegistry::CMtfTestActionCreateRegistry(CMtfTestCase& aTestCase) |
|
52 : CMtfSynchronousTestAction(aTestCase) |
|
53 { |
|
54 } |
|
55 |
|
56 |
|
57 CMtfTestActionCreateRegistry::~CMtfTestActionCreateRegistry() |
|
58 { |
|
59 } |
|
60 |
|
61 |
|
62 void CMtfTestActionCreateRegistry::ExecuteActionL() |
|
63 { |
|
64 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionCreateRegistry); |
|
65 CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession>(TestCase(),ActionParameters().Parameter(0)); |
|
66 |
|
67 CClientMtmRegistry* paramMtmRegistry = CClientMtmRegistry::NewL(*paramSession); |
|
68 CleanupStack::PushL(paramMtmRegistry); |
|
69 StoreParameterL<CClientMtmRegistry>(TestCase(),*paramMtmRegistry,ActionParameters().Parameter(1)); |
|
70 CleanupStack::Pop(paramMtmRegistry); |
|
71 |
|
72 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionCreateRegistry); |
|
73 TestCase().ActionCompletedL(*this); |
|
74 } |
|
75 |