|
1 // Copyright (c) 2004-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 // GetIrMTMCommandParameters |
|
17 // [Action Parameters] |
|
18 // CconnectionTiemout <input>: Connection timeout value. |
|
19 // PutTimeout <input>: Put timeout value. |
|
20 // CommandParameters <output>: Reference to the command parameters. |
|
21 // [Action Description] |
|
22 // Returns the Ir MTM command parameters. |
|
23 // [APIs Used] |
|
24 // none. |
|
25 // __ACTION_INFO_END__ |
|
26 // |
|
27 // |
|
28 |
|
29 #include "CMtfTestActionGetIrMTMCommandParameters.h" |
|
30 #include "CMtfTestCase.h" |
|
31 #include "CMtfTestActionParameters.h" |
|
32 |
|
33 #include <ircmtm.h> |
|
34 |
|
35 CMtfTestAction* CMtfTestActionGetIrMTMCommandParameters::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
36 { |
|
37 CMtfTestActionGetIrMTMCommandParameters* self = new (ELeave) CMtfTestActionGetIrMTMCommandParameters(aTestCase); |
|
38 CleanupStack::PushL(self); |
|
39 self->ConstructL(aActionParameters); |
|
40 CleanupStack::Pop(); |
|
41 return self; |
|
42 } |
|
43 |
|
44 |
|
45 CMtfTestActionGetIrMTMCommandParameters::CMtfTestActionGetIrMTMCommandParameters(CMtfTestCase& aTestCase) |
|
46 : CMtfSynchronousTestAction(aTestCase) |
|
47 { |
|
48 } |
|
49 |
|
50 |
|
51 CMtfTestActionGetIrMTMCommandParameters::~CMtfTestActionGetIrMTMCommandParameters() |
|
52 { |
|
53 } |
|
54 |
|
55 |
|
56 void CMtfTestActionGetIrMTMCommandParameters::ExecuteActionL() |
|
57 { |
|
58 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionGetIrMTMCommandParameters); |
|
59 TInt paramConnectionTimeout = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(0)); |
|
60 TInt paramPutTimeout = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(1)); |
|
61 |
|
62 CIrClientMtm::STimeouts sendParams; |
|
63 |
|
64 sendParams.iConnectTimeout = paramConnectionTimeout; |
|
65 sendParams.iPutTimeout = paramPutTimeout; |
|
66 |
|
67 TPckgBuf<CIrClientMtm::STimeouts> sendParamsBuf(sendParams); |
|
68 |
|
69 HBufC8* paramCommandParameters = sendParamsBuf.AllocL(); |
|
70 |
|
71 CleanupStack::PushL(paramCommandParameters); |
|
72 |
|
73 StoreParameterL<HBufC8>(TestCase(),*paramCommandParameters,ActionParameters().Parameter(2)); |
|
74 CleanupStack::Pop(paramCommandParameters); |
|
75 |
|
76 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionGetIrMTMCommandParameters); |
|
77 |
|
78 TestCase().ActionCompletedL(*this); |
|
79 } |
|
80 |
|
81 |