|
1 // Copyright (c) 2008-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 #ifndef CTESTPOPSECURESOCKETTEST_H |
|
17 #define CTESTPOPSECURESOCKETTEST_H |
|
18 |
|
19 |
|
20 #include <test/tefunit.h> |
|
21 #include "emailtestutils.h" |
|
22 #include "scripttestutils.h" |
|
23 #include "miutmsg.h" |
|
24 #include <popsmtm.h> |
|
25 #include <cemailaccounts.h> |
|
26 #include "cactivewaiter.h" |
|
27 |
|
28 //Different type of POP SSL-TLS test |
|
29 enum TypeOfTest |
|
30 { |
|
31 EpopApopTLSok = 0, |
|
32 EpopTlsInvalidUser, |
|
33 }; |
|
34 |
|
35 |
|
36 class CTestPOPSecureSocketTest : public CActiveTestFixture |
|
37 // WARNING: Despite being a C class, CActiveTestFixture is NOT derrived from CBase |
|
38 // ... so don't expect your data members to be zero'ed |
|
39 { |
|
40 |
|
41 public: |
|
42 CTestPOPSecureSocketTest(); |
|
43 virtual ~CTestPOPSecureSocketTest(); |
|
44 void SetupL(); |
|
45 void TearDownL(); |
|
46 TPtr16 ReadServerIp(); |
|
47 void TestRunPopSSLTLSTestsL(); |
|
48 void TestRunPopSSLTLSTestsL2(); |
|
49 void SetSettingsL(TypeOfTest aType,TPtr16 aServerIp); |
|
50 static CTestSuite* CreateSuiteL(const TDesC& aName); |
|
51 void ConnectToRemoteServerL(TypeOfTest aType); |
|
52 void DisconnectL(); |
|
53 private: |
|
54 CEmailTestUtils* iTestUtils; |
|
55 CImPop3Settings* isettings ; |
|
56 CActiveScheduler* ischeduler; |
|
57 RFs itheFs; |
|
58 TMsvId ipop3Service; |
|
59 CBaseServerMtm* iPopServerMtm; |
|
60 CActiveWaiter* iActiveWaiter; |
|
61 CMsvEntrySelection* iSel; |
|
62 TPop3Cmds iCommand; |
|
63 TPopAccount iPopAccount; |
|
64 TInt itestError; |
|
65 TInt ifailed; |
|
66 //HBufC8* iServerIp; |
|
67 //TPtr8 ibufferPtr; |
|
68 |
|
69 |
|
70 }; |
|
71 |
|
72 #endif // CTestPOPSecureSocketTest.h |