|
1 // Copyright (c) 2006-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 // |
|
15 |
|
16 #include "cactivewaiter.h" |
|
17 #include "ctestimapservermtmpopulate.h" |
|
18 |
|
19 |
|
20 CTestImapServerMtmPopulate::CTestImapServerMtmPopulate( ) |
|
21 { |
|
22 |
|
23 } |
|
24 |
|
25 CTestImapServerMtmPopulate::~CTestImapServerMtmPopulate( ) |
|
26 { |
|
27 |
|
28 } |
|
29 |
|
30 void CTestImapServerMtmPopulate::TestPopulateL( ) |
|
31 { |
|
32 INFO_PRINTF1( _L( "TestPopulateL" ) ); |
|
33 |
|
34 DoConnectL( ); |
|
35 ASSERT_EQUALS( iActiveWaiter->iStatus.Int( ), KErrNone ); |
|
36 |
|
37 DoPopulateL( ); // TODO get correct ID |
|
38 ASSERT_EQUALS( iActiveWaiter->iStatus.Int( ), KErrNone ); |
|
39 |
|
40 // check progress |
|
41 const TDesC8& progBuf = iImapServerMtm->Progress( ); |
|
42 |
|
43 TImap4CompoundProgress temp; |
|
44 TPckgC<TImap4CompoundProgress> paramPack( temp ); |
|
45 |
|
46 paramPack.Set( progBuf ); |
|
47 TImap4CompoundProgress progress = paramPack( ); |
|
48 |
|
49 DoDisconnectL( ); |
|
50 ASSERT_EQUALS( iActiveWaiter->iStatus.Int( ), KErrNone ); |
|
51 |
|
52 INFO_PRINTF1( _L( "TestPopulateL complete" ) ); |
|
53 } |
|
54 |
|
55 CTestSuite* CTestImapServerMtmPopulate::CreateSuiteL( const TDesC& aName ) |
|
56 { |
|
57 SUB_SUITE; |
|
58 ADD_ASYNC_TEST_STEP( TestPopulateL ); |
|
59 END_SUITE; |
|
60 } |
|
61 |
|
62 void CTestImapServerMtmPopulate::DoPopulateL( ) |
|
63 { |
|
64 iSelection->Reset( ); |
|
65 iSelection->AppendL( iImapAccount.iImapService ); |
|
66 |
|
67 iImapServerMtm->StartCommandL( *iSelection, |
|
68 KIMAP4MTMPopulate, |
|
69 KNullDesC8, |
|
70 iActiveWaiter->iStatus ); |
|
71 |
|
72 iActiveWaiter->WaitActive( ); |
|
73 |
|
74 } |