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