messagingfw/msgtest/integration/email/inc/poptests.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 1999-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 // Pop3Tests.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __POP3TESTS_H
       
    19 #define __POP3TESTS_H
       
    20 
       
    21 #include "emailsmoke.h"
       
    22 #include "emailsmokecommands.h"
       
    23 #include <cemailaccounts.h>
       
    24 
       
    25 //
       
    26 //
       
    27 // CPop3ClientTest
       
    28 //
       
    29 
       
    30 class CPop3ClientTest : public CEmailClientTest
       
    31 	{
       
    32 public:
       
    33 	static CPop3ClientTest* NewL(CEmailTestUtils& aTestUtils, RTest& aTest);
       
    34 	virtual ~CPop3ClientTest();
       
    35 
       
    36 protected:
       
    37 	virtual void ConstructL();
       
    38 	CPop3ClientTest(CEmailTestUtils& aTestUtils, RTest& aTest);
       
    39 	};
       
    40 
       
    41 
       
    42 //
       
    43 //
       
    44 // CCreatePop3ClientMtm
       
    45 //
       
    46 
       
    47 class CCreatePop3ClientMtm : public CBase, public MBaseTestState
       
    48 	{
       
    49 public:
       
    50 	void StartL(TRequestStatus& aStatus);
       
    51 	CCreatePop3ClientMtm(CEmailClientTest& aTest);
       
    52 
       
    53 private:
       
    54 	CEmailClientTest& iTest;
       
    55 	};
       
    56 
       
    57 
       
    58 
       
    59 
       
    60 //
       
    61 //
       
    62 // CCreatePop3Service
       
    63 //
       
    64 
       
    65 class CCreatePop3Service : public CCreateEmailService
       
    66 	{
       
    67 public:
       
    68 	static CCreatePop3Service* NewL(CEmailClientTest& aTestHarness);
       
    69 	void StartL(TRequestStatus& aStatus);
       
    70 	~CCreatePop3Service();
       
    71 	CImPop3Settings& Settings();
       
    72 
       
    73 private:
       
    74 	void ConstructL();
       
    75 	CCreatePop3Service(CEmailClientTest& aTestHarness);
       
    76 
       
    77 private:
       
    78 	CEmailClientTest& iTestHarness;
       
    79 	CEmailAccounts* iAccount;
       
    80 	CImPop3Settings* iSettings;
       
    81 	CImIAPPreferences* iPopIAP;
       
    82 	};
       
    83 
       
    84 
       
    85 //
       
    86 //
       
    87 // CPop3Connect
       
    88 //
       
    89 
       
    90 class CPop3Connect : public CActive, public MBaseTestState
       
    91 	{
       
    92 public:
       
    93 	CPop3Connect(CEmailClientTest& aParentTestHarness);
       
    94 	void StartL(TRequestStatus& aStatus);
       
    95 	void RunL();
       
    96 	void DoCancel();
       
    97 	~CPop3Connect();
       
    98 
       
    99 private:
       
   100 	CEmailClientTest& iParentTestHarness;
       
   101 	TRequestStatus* iReportStatus;
       
   102 	};
       
   103 
       
   104 
       
   105 //
       
   106 //
       
   107 // CPop3ConnectAndMonitor
       
   108 //
       
   109 
       
   110 class CPop3ConnectAndMonitor : public CActive, public MBaseTestState
       
   111 	{
       
   112 public:
       
   113 	CPop3ConnectAndMonitor(CEmailClientTest& aParentTestHarness, TBool aSynchronise = EFalse);
       
   114 	void StartL(TRequestStatus& aStatus);
       
   115 	void RunL();
       
   116 	void DoCancel();
       
   117 	~CPop3ConnectAndMonitor();
       
   118 
       
   119 private:
       
   120 	void LogCommentFormat(TRefByValue<const TDesC> format,...);
       
   121 
       
   122 private:
       
   123 	CEmailClientTest& iParentTestHarness;
       
   124 	TRequestStatus* iReportStatus;
       
   125 	TBool iSynchronise;
       
   126 	TBool iConnectionError;
       
   127 	};
       
   128 //
       
   129 //
       
   130 // CPopDisconnect
       
   131 //
       
   132 
       
   133 class CPop3Disconnect : public CActive, public MBaseTestState
       
   134 	{
       
   135 public:
       
   136 	CPop3Disconnect(CEmailClientTest& aParentTestHarness);
       
   137 	void StartL(TRequestStatus& aStatus);
       
   138 	void RunL();
       
   139 	void DoCancel();
       
   140 	~CPop3Disconnect();
       
   141 
       
   142 private:
       
   143 	CEmailClientTest& iParentTestHarness;
       
   144 	TRequestStatus* iReportStatus;
       
   145 	};
       
   146 
       
   147 
       
   148 
       
   149 //
       
   150 //
       
   151 // CCheckPop3Operation
       
   152 //
       
   153 
       
   154 class CCheckPop3Operation : public CBase, public MBaseTestState
       
   155 	{
       
   156 public:
       
   157 	CCheckPop3Operation(TInt aExpectedStatus, CPop3ClientTest& aTestHarness);
       
   158 	void StartL(TRequestStatus& aStatus);
       
   159 
       
   160 private:
       
   161 	CPop3ClientTest& iTestHarness;
       
   162 	TInt iExpectedStatus;
       
   163 	};
       
   164 
       
   165 
       
   166 //
       
   167 //
       
   168 // CPop3UseService
       
   169 //
       
   170 
       
   171 class CPop3UseService : public CBase, public MBaseTestState
       
   172 	{
       
   173 public:
       
   174 	CPop3UseService(CPop3ClientTest& aTestHarness);
       
   175 	void StartL(TRequestStatus& aStatus);
       
   176 
       
   177 private:
       
   178 	CPop3ClientTest& iTestHarness;
       
   179 	};
       
   180 
       
   181 
       
   182 
       
   183 //
       
   184 //
       
   185 // CPop3SetSyncLimits
       
   186 //
       
   187 
       
   188 class CPop3SetSyncLimits : public CBase, public MBaseTestState
       
   189 	{
       
   190 	public:
       
   191 		CPop3SetSyncLimits(TInt aInboxSyncLimit, CPop3ClientTest& aTestHarness);
       
   192 		void StartL(TRequestStatus& aStatus);
       
   193 
       
   194 	private:
       
   195 		void LogCommentFormat(TRefByValue<const TDesC> format,...);
       
   196 
       
   197 	private:
       
   198 		CPop3ClientTest&    iTestHarness;
       
   199 		TInt				iInboxSyncLimit;
       
   200 	};
       
   201 
       
   202 #endif