|
1 // Copyright (c) 2005-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 // SetUTCOffset |
|
17 // [Action Parameters] |
|
18 // Offset <input>: UTC time offset in seconds. |
|
19 // [Action Description] |
|
20 // Sets the UTC offset to the given number of seconds (+/-). |
|
21 // [APIs Used] |
|
22 // User. |
|
23 // __ACTION_INFO_END__ |
|
24 // |
|
25 // |
|
26 |
|
27 |
|
28 #include "CMtfTestActionSetUTCOffset.h" |
|
29 #include "CMtfTestCase.h" |
|
30 #include "CMtfTestActionParameters.h" |
|
31 |
|
32 #include <msvapi.h> |
|
33 |
|
34 |
|
35 CMtfTestAction* CMtfTestActionSetUTCOffset::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
36 { |
|
37 CMtfTestActionSetUTCOffset* self = new (ELeave) CMtfTestActionSetUTCOffset(aTestCase); |
|
38 CleanupStack::PushL(self); |
|
39 self->ConstructL(aActionParameters); |
|
40 CleanupStack::Pop(self); |
|
41 return self; |
|
42 } |
|
43 |
|
44 |
|
45 CMtfTestActionSetUTCOffset::CMtfTestActionSetUTCOffset(CMtfTestCase& aTestCase) |
|
46 : CMtfSynchronousTestAction(aTestCase) |
|
47 { |
|
48 } |
|
49 |
|
50 |
|
51 CMtfTestActionSetUTCOffset::~CMtfTestActionSetUTCOffset() |
|
52 { |
|
53 } |
|
54 |
|
55 |
|
56 void CMtfTestActionSetUTCOffset::ExecuteActionL() |
|
57 { |
|
58 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionSetUTCOffset); |
|
59 TInt offset = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(0)); |
|
60 |
|
61 User::SetUTCOffset(offset); |
|
62 |
|
63 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionSetUTCOffset ); |
|
64 TestCase().ActionCompletedL(*this); |
|
65 } |
|
66 |