messagingfw/suplwappushhandler/test/src/Te_LbsSuplWapPushStep.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2007-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 // This is an integration unit test class for the SUPL WAP Push Plug-in
       
    15 // 
       
    16 //
       
    17 
       
    18 #if (!defined __TE_LBSSUPLWAPPUSH_STEP__)
       
    19 #define __TE_LBSSUPLWAPPUSH_STEP__
       
    20 
       
    21 /**
       
    22 @file
       
    23 @internalComponent
       
    24 @prototype
       
    25 */
       
    26 
       
    27 #include <test/testexecutestepbase.h>
       
    28 #include <lbs/lbssuplpushreceiver.h>
       
    29 #include <lbs/lbssuplpush.h>
       
    30 
       
    31 #include "Te_BaseStep.h"
       
    32 
       
    33 /** The string name of the test step */
       
    34 _LIT(KLbsSuplWapPushStep, "LbsSuplWapPushStep");
       
    35 
       
    36 class CPushMessage;
       
    37 class CLbsSuplWapPush;
       
    38 
       
    39 /**
       
    40 This is an integration unit test class for the SUPL WAP Push Plug-in.
       
    41 */
       
    42 class CTe_LbsSuplWapPushStep : public CTe_BaseStep, public MLbsSuplPushRecObserver, 
       
    43 	public MLbsSuplPushObserver
       
    44 	{
       
    45 public:
       
    46 	CTe_LbsSuplWapPushStep();
       
    47 	virtual ~CTe_LbsSuplWapPushStep();
       
    48 	
       
    49 	virtual TVerdict doTestStepPreambleL();
       
    50 	
       
    51 	virtual void OnSuplInit(TLbsSuplPushChannel aChannel, TLbsSuplPushRequestId aReqId, TDesC8& aMsg);
       
    52 	virtual void OnSuplInitComplete(TLbsSuplPushChannel aChannel, TLbsSuplPushRequestId aReqId, 
       
    53 			TInt aError, TInt aReserved);
       
    54 	
       
    55 private:
       
    56 	virtual void ReallyDoTestStepL();
       
    57 	CLbsSuplWapPush* MakePluginLC();
       
    58 	CPushMessage* MakeMessageLC(TUint aNum);
       
    59 	TBool CompareMessage(TUint aNum, TDesC8& aMsg);
       
    60 	
       
    61 		
       
    62 private:
       
    63 	/** Stores the error code if a error happens in an async function*/
       
    64 	TInt iUnexpectedError;
       
    65 	/** The receiver part of the SUPL Push API */
       
    66 	CLbsSuplPushRec* iReceiver;
       
    67 	/** Counter of sent/received messages */
       
    68 	TInt iMsgCount;
       
    69 	/** The total number of messages sent for a test */
       
    70 	TInt iMsgMaxCount;
       
    71 	/** The number used to fill a sent message */
       
    72 	TUint iSendFillDigit;
       
    73 	/** The number used to check the received message */
       
    74 	TUint iRecvFillDigit;
       
    75 	/** The flag that message was received by the receiver */
       
    76 	TBool iReceived;
       
    77 	/** The error code returned to the sender */
       
    78 	TInt iSenderError;
       
    79 	};
       
    80 		
       
    81 
       
    82 #endif //__TE_LBSSUPLWAPPUSH_STEP__