|
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 // DoImap4PopulateNewMailWhenAlreadyConnected |
|
17 // [Action Parameters] |
|
18 // TMsvId paramServiceId <input> : Value of IMAP4 Service Id |
|
19 // CImap4ClientMtm paramMtm <input> : Reference to Imap4 client MTM |
|
20 // TImImap4GetMailInfo or TImImap4GetMailInfo paramDownloadLimits <input> |
|
21 // : The Full or Partial download |
|
22 // download limits |
|
23 // TMsvId paramFolderId <input> : Destination folder id |
|
24 // [Action Description] |
|
25 // Populate all new messages from the IMAP4 server. A connection needs to be established |
|
26 // with the IMAP4 server before executing this Test Action. Does a Partial or Full download of mails based on the |
|
27 // type of the download limits (TImImap4GetMailInfo or TImImap4GetPartialMailInfo) provided |
|
28 // as input to the Test Action. |
|
29 // Calls the CImap4ClientMtm::InvokeAsyncFunctionL() with the IMAP4 command |
|
30 // KIMAP4MTMPopulateNewMailWhenAlreadyConnected by calling the ExecuteIMAP4CommandL() |
|
31 // function of the base class. |
|
32 // [APIs Used] |
|
33 // CMsvEntry::SetEntryL() |
|
34 // CMsvEntrySelection::AppendL() |
|
35 // CMsvEntrySelection::ResizeL() |
|
36 // CImap4ClientMtm::InvokeAsyncFunctionL() |
|
37 // __ACTION_INFO_END__ |
|
38 // |
|
39 // |
|
40 |
|
41 /** |
|
42 @file |
|
43 @internalTechnology |
|
44 */ |
|
45 |
|
46 |
|
47 // User include |
|
48 #include "CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected.h" |
|
49 #include "CMtfTestCase.h" |
|
50 |
|
51 |
|
52 /** |
|
53 NewL() |
|
54 Constructs a CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected object. |
|
55 Uses two phase construction and leaves nothing on the CleanupStack. |
|
56 @internalTechnology |
|
57 @param aTestCase Test Case to which this Test Action belongs |
|
58 @param aActionParameters Action parameters, must not be NULL |
|
59 @return Created object of type CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected |
|
60 @pre None |
|
61 @post CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected object is created |
|
62 */ |
|
63 CMtfTestAction* CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected:: |
|
64 NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
65 { |
|
66 |
|
67 CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected* self = |
|
68 new (ELeave) CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected |
|
69 (aTestCase); |
|
70 CleanupStack::PushL(self); |
|
71 self->ConstructL(aActionParameters); |
|
72 CleanupStack::Pop(self); |
|
73 return self; |
|
74 } |
|
75 |
|
76 |
|
77 /** |
|
78 CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected constructor |
|
79 Calls the base class' constructor |
|
80 @internalTechnology |
|
81 @param aTestCase Test Case to which this Test Action belongs |
|
82 @pre None |
|
83 @post None |
|
84 */ |
|
85 CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected:: |
|
86 CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected |
|
87 (CMtfTestCase& aTestCase) |
|
88 : CMtfDoInvokeAsyncFunctionWithoutSelectionTestAction(aTestCase) |
|
89 { |
|
90 } |
|
91 |
|
92 |
|
93 /** |
|
94 ExecuteActionL |
|
95 Invokes the asynchronous operation for IMAP4 command |
|
96 KIMAP4MTMPopulateNewMailWhenAlreadyConnected by calling the base class |
|
97 function ExecuteIMAP4CommandL() |
|
98 |
|
99 @internalTechnology |
|
100 @pre None |
|
101 @post None |
|
102 @leave System wide errors |
|
103 */ |
|
104 void CMtfTestActionDoImap4PopulateNewMailWhenAlreadyConnected::ExecuteActionL() |
|
105 { |
|
106 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionDoImap4PopulateNewMailWhenAlreadyConnected); |
|
107 TestCase().INFO_PRINTF1(_L("KIMAP4MTMPopulateNewMailWhenAlreadyConnected Imap4 command execution")); |
|
108 // Call the base class function to invoke the IMAP4 command asynchronously |
|
109 ExecuteIMAP4CommandL(KIMAP4MTMPopulateNewMailWhenAlreadyConnected); |
|
110 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionDoImap4PopulateNewMailWhenAlreadyConnected); |
|
111 } |