|
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 // DoImap4ConnectAndPopulateAllMailAndStayOnline |
|
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 // Connects to the IMAP4 server, populates ALL messages from the server and retains |
|
26 // the connection with the server. 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 // KIMAP4MTMConnectAndPopulateAllMailAndStayOnline 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 "CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline.h" |
|
49 #include "CMtfTestCase.h" |
|
50 |
|
51 /** |
|
52 NewL() |
|
53 Constructs a CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline object. |
|
54 Uses two phase construction and leaves nothing on the CleanupStack. |
|
55 @internalTechnology |
|
56 @param aTestCase Test Case to which this Test Action belongs |
|
57 @param aActionParameters Action parameters, must not be NULL |
|
58 @return Created object of type CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline |
|
59 @pre None |
|
60 @post CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline object is created |
|
61 */ |
|
62 CMtfTestAction* CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline:: |
|
63 NewL(CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters) |
|
64 { |
|
65 CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline* self = |
|
66 new (ELeave) CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline(aTestCase); |
|
67 |
|
68 CleanupStack::PushL(self); |
|
69 self->ConstructL(aActionParameters); |
|
70 CleanupStack::Pop(self); |
|
71 return self; |
|
72 } |
|
73 |
|
74 |
|
75 /** |
|
76 CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline constructor |
|
77 Calls the base class' constructor |
|
78 @internalTechnology |
|
79 @param aTestCase Test Case to which this Test Action belongs |
|
80 @pre None |
|
81 @post None |
|
82 */ |
|
83 CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline:: |
|
84 CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline(CMtfTestCase& aTestCase) |
|
85 : CMtfDoInvokeAsyncFunctionWithoutSelectionTestAction(aTestCase) |
|
86 { |
|
87 } |
|
88 |
|
89 |
|
90 /** |
|
91 ExecuteActionL |
|
92 Invokes the asynchronous operation for IMAP4 command |
|
93 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline by calling the base class |
|
94 function ExecuteIMAP4CommandL() |
|
95 @internalTechnology |
|
96 @pre None |
|
97 @post None |
|
98 @leave System wide errors |
|
99 */ |
|
100 void CMtfTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline::ExecuteActionL() |
|
101 { |
|
102 TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline); |
|
103 TestCase().INFO_PRINTF1(_L("KTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline Imap4 command execution")); |
|
104 // Call the base class function to invoke the IMAP4 command asynchronously |
|
105 ExecuteIMAP4CommandL(KIMAP4MTMConnectAndPopulateAllMailAndStayOnline); |
|
106 TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionDoImap4ConnectAndPopulateAllMailAndStayOnline); |
|
107 } |