|
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 // CreatePop3MailInfo |
|
17 // [Action Parameters] |
|
18 // MaxEmailSize <input> : Value of the maximum email size. |
|
19 // DestinationFolder <input> : Value for the folder id |
|
20 // PopulationLimit <input> : Value for the number of lines to fetch |
|
21 // Pop3MailInfo <output>: Reference to the created TImPop3GetMailInfo2 object |
|
22 // [Action Description] |
|
23 // Creates a POP3 mail info object TImPop3GetMailInfo and stores it |
|
24 // [APIs Used] |
|
25 // TImPop3GetMailInfo::iMaxEmailSize |
|
26 // TImPop3GetMailInfo::iDestinationFolder |
|
27 // TImPop3GetMailInfo::iPopulationLimit |
|
28 // __ACTION_INFO_END__ |
|
29 // |
|
30 // |
|
31 |
|
32 /** |
|
33 @file |
|
34 */ |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 #include <msvapi.h> |
|
40 #include <miutset.h> |
|
41 |
|
42 #include "CMtfTestActionCreatePop3MailInfo.h" |
|
43 #include "CMtfTestCase.h" |
|
44 #include "CMtfTestActionParameters.h" |
|
45 #include "CPop3MailInfo.h" |
|
46 |
|
47 |
|
48 CMtfTestAction* CMtfTestActionCreatePop3MailInfo::NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
49 { |
|
50 CMtfTestActionCreatePop3MailInfo* self = new (ELeave) CMtfTestActionCreatePop3MailInfo(aTestCase); |
|
51 CleanupStack::PushL(self); |
|
52 self->ConstructL(aActionParameters); |
|
53 CleanupStack::Pop(); |
|
54 return self; |
|
55 } |
|
56 |
|
57 |
|
58 CMtfTestActionCreatePop3MailInfo::CMtfTestActionCreatePop3MailInfo(CMtfTestCase& aTestCase) |
|
59 : CMtfSynchronousTestAction(aTestCase) |
|
60 { |
|
61 } |
|
62 |
|
63 |
|
64 CMtfTestActionCreatePop3MailInfo::~CMtfTestActionCreatePop3MailInfo() |
|
65 { |
|
66 } |
|
67 |
|
68 void CMtfTestActionCreatePop3MailInfo::ExecuteActionL() |
|
69 { |
|
70 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionCreatePop3MailInfo); |
|
71 TInt paramMaxEmailSize = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(0)); |
|
72 TInt paramPopLimit = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(1)); |
|
73 |
|
74 CPop3MailInfo* pop3MailInfo = new (ELeave) CPop3MailInfo; |
|
75 CleanupStack::PushL( pop3MailInfo ); |
|
76 pop3MailInfo->MailInfo().SetMaxEmailSize( static_cast< TInt32 >(paramMaxEmailSize) ); |
|
77 pop3MailInfo->MailInfo().SetPopulationLimit( static_cast< TInt32 >(paramPopLimit) ); |
|
78 StoreParameterL<CPop3MailInfo>( TestCase(), *pop3MailInfo, ActionParameters().Parameter(2)); |
|
79 CleanupStack::Pop(); // pop3MailInfo |
|
80 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionCreatePop3MailInfo); |
|
81 TestCase().ActionCompletedL(*this); |
|
82 } |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |