|
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 // GetBaseConstants |
|
17 // [Action Parameters] |
|
18 // InboxFolderId <output>: Value of the local inbox folder id. |
|
19 // OutboxFolderId <output>: Value of the local outbox folder id. |
|
20 // DraftsFolderId <output>: Value of the local drafts folder id. |
|
21 // SentFolderId <output>: Value of the local sent folder id. |
|
22 // DeletedFolderId <output>: Value of the local deleted folder id. |
|
23 // [Action Description] |
|
24 // Initialises base related constants. |
|
25 // [APIs Used] |
|
26 // none. |
|
27 // __ACTION_INFO_END__ |
|
28 // |
|
29 // |
|
30 |
|
31 /** |
|
32 @file |
|
33 */ |
|
34 |
|
35 #include "CMtfTestActionGetBaseConstants.h" |
|
36 #include "CMtfTestCase.h" |
|
37 #include "CMtfTestActionParameters.h" |
|
38 |
|
39 #include <miutset.h> |
|
40 |
|
41 |
|
42 CMtfTestAction* CMtfTestActionGetBaseConstants::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
43 { |
|
44 CMtfTestActionGetBaseConstants* self = new (ELeave) CMtfTestActionGetBaseConstants(aTestCase); |
|
45 CleanupStack::PushL(self); |
|
46 self->ConstructL(aActionParameters); |
|
47 CleanupStack::Pop(); |
|
48 return self; |
|
49 } |
|
50 |
|
51 |
|
52 CMtfTestActionGetBaseConstants::CMtfTestActionGetBaseConstants(CMtfTestCase& aTestCase) |
|
53 : CMtfSynchronousTestAction(aTestCase) |
|
54 { |
|
55 } |
|
56 |
|
57 |
|
58 CMtfTestActionGetBaseConstants::~CMtfTestActionGetBaseConstants() |
|
59 { |
|
60 } |
|
61 |
|
62 |
|
63 void CMtfTestActionGetBaseConstants::ExecuteActionL() |
|
64 { |
|
65 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionGetBaseConstants); |
|
66 TMsvId paramInboxFolderId = KMsvGlobalInBoxIndexEntryId; |
|
67 StoreParameterL<TMsvId>(TestCase(),paramInboxFolderId,ActionParameters().Parameter(0)); |
|
68 |
|
69 TMsvId paramOutboxFolderId = KMsvGlobalOutBoxIndexEntryId; |
|
70 StoreParameterL<TMsvId>(TestCase(),paramOutboxFolderId,ActionParameters().Parameter(1)); |
|
71 |
|
72 TMsvId paramDraftsFolderId = KMsvDraftEntryId; |
|
73 StoreParameterL<TMsvId>(TestCase(),paramDraftsFolderId,ActionParameters().Parameter(2)); |
|
74 |
|
75 TMsvId paramSentFolderId = KMsvSentEntryId; |
|
76 StoreParameterL<TMsvId>(TestCase(),paramSentFolderId,ActionParameters().Parameter(3)); |
|
77 |
|
78 TMsvId paramDeletedFolderId = KMsvDeletedEntryFolderEntryId; |
|
79 StoreParameterL<TMsvId>(TestCase(),paramDeletedFolderId,ActionParameters().Parameter(4)); |
|
80 |
|
81 if (ActionParameters().Count() > 5) |
|
82 { // Add extra default params for root index, without having to change all the ini files. |
|
83 TMsvId paramRootIndexEntryId = KMsvRootIndexEntryId; |
|
84 StoreParameterL<TMsvId>(TestCase(),paramRootIndexEntryId,ActionParameters().Parameter(5)); |
|
85 } |
|
86 |
|
87 |
|
88 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionGetBaseConstants ); |
|
89 TestCase().ActionCompletedL(*this); |
|
90 } |
|
91 |
|
92 |