messagingfw/msgtest/integration/biomsg/inc/parsertest.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 //
       
    15 
       
    16 #include "smstestutils.h"
       
    17 
       
    18 #include <msvapi.h>
       
    19 
       
    20 class TestUiTimer : public CTimer
       
    21 	{
       
    22 public:
       
    23 	static TestUiTimer* NewLC(CSmsTestUtils& aTestUtils);
       
    24 	~TestUiTimer();
       
    25 
       
    26 	void RunL();
       
    27 	void DoCancel();
       
    28 	void ConstructL();
       
    29 	void IssueRequest();
       
    30 	void SetOperation(CMsvOperation*);
       
    31 	TTimeIntervalMicroSeconds32 period;
       
    32 protected:
       
    33 	TestUiTimer(CSmsTestUtils& aTestUtils);
       
    34 	
       
    35 	CMsvOperation*				iOperation;
       
    36 	CSmsTestUtils&				iSmsTest;
       
    37 	};
       
    38 
       
    39 class CMsvEntrySelection;
       
    40 class CBIOClientMtm;
       
    41 class CInternetAccessTester;
       
    42 //class CWapAccessTester;
       
    43 class CParserTest : public CBase
       
    44 	{
       
    45 public:
       
    46 	static CParserTest* NewL(CSmsTestUtils& aTestUtils);
       
    47 	void StartL(CMsvEntrySelection* aReceived);
       
    48 	~CParserTest();
       
    49 private:
       
    50 	CParserTest(CSmsTestUtils& aTestUtils);
       
    51 	
       
    52 	virtual void ConstructL();
       
    53 
       
    54 	CMsvSession& Session()	{return *iSmsTest.iMsvSession;}
       
    55 	CMsvEntry& MsvEntry()	{return *iSmsTest.iMsvEntry;}
       
    56 	CSmsClientMtm& Client()	{return *iSmsTest.iSmsClientMtm;}
       
    57 
       
    58 	void CreateParserL();
       
    59 	void ReParseL();
       
    60 	void ReProcessL();
       
    61 	void ProcessError(TInt& aError);
       
    62 
       
    63 	void CheckMessageTypeL();
       
    64 
       
    65 	void TestInternetAccessL();
       
    66 	void TestWapAccessL();
       
    67 
       
    68 	CMsvEntrySelection*		iBioMessages;
       
    69 	CMsvEntrySelection*		iSelection;
       
    70 
       
    71 	TInt					iCurrentMessageNum;
       
    72 
       
    73 	CSmsTestUtils&			iSmsTest;
       
    74 	CMsvOperation*			iOperation;
       
    75 	CBIOClientMtm*			iBioClientMtm;
       
    76 	TestUiTimer*			iTimer;
       
    77 
       
    78 	TInt					iCurrentTest;
       
    79 	TBool					iAllTestsSuccessful;
       
    80 
       
    81 	CInternetAccessTester*	iIapTester;
       
    82 //	CWapAccessTester*		iWapTester;
       
    83 
       
    84 	CClientMtmRegistry*		iClientMtmRegistry;
       
    85 
       
    86 	enum TSmsSendTestState
       
    87 		{
       
    88 		EGetMessages,
       
    89 		ECreateParser,
       
    90 		EParseAndProcess,
       
    91 		ETryReparse,
       
    92 		ETryReprocess
       
    93 		} iState;
       
    94 	};