messagingfw/suplsmshandler/test/testserver/src/Te_LbsSuplSmsTriggerIntegStep.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     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 Sms Trigger Plug-in
       
    15 // 
       
    16 //
       
    17 
       
    18 #if (!defined __TE_LBSSUPLSMSTRIGGERINTEG_STEP__)
       
    19 #define __TE_LBSSUPLSMSTRIGGERINTEG_STEP__
       
    20 
       
    21 /**
       
    22 @file
       
    23 @internalComponent
       
    24 @prototype
       
    25 */
       
    26 
       
    27 #include <testexecutestepbase.h>
       
    28 #include <lbs/lbssuplpushreceiver.h>
       
    29 #include <lbs/lbssuplpush.h>
       
    30 
       
    31 #include "Te_LbsSuplSmsTriggerSender.h"
       
    32 #include "Te_BaseStep.h"
       
    33 #include "Te_WatcherLog.h"
       
    34 
       
    35 /** The string name of the test step */
       
    36 _LIT(KLbsSuplSmsTriggerIntegStep, "LbsSuplSmsTriggerIntegStep");
       
    37 
       
    38 /**
       
    39 This is an integration unit test class for the SUPL Sms Trigger Plug-in.
       
    40 */
       
    41 class CTe_LbsSuplSmsTriggerIntegStep : public CTe_BaseStep, public MTe_LbsSuplSmsTriggerSenderObserver, 
       
    42 		public MLbsSuplPushRecObserver, public MLbsSuplPushObserver
       
    43 	{
       
    44 public:
       
    45 	CTe_LbsSuplSmsTriggerIntegStep();
       
    46 	virtual ~CTe_LbsSuplSmsTriggerIntegStep();
       
    47 	
       
    48 	virtual TVerdict doTestStepPreambleL();
       
    49 	
       
    50 	virtual void OnMessageSent(TInt aError);
       
    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 protected:
       
    56 	virtual void ReallyDoTestStepL();
       
    57 	virtual void SendMessage(TUint aNum);
       
    58 	virtual TBool CompareMessage(TUint aNum, TDesC8& aMsg);
       
    59 		
       
    60 protected:
       
    61 	/** Stores the error code if a error happens in an async function*/
       
    62 	TInt iUnexpectedError;
       
    63 	/** Sends SUPL INIT message via UDP */
       
    64 	CTe_LbsSuplSmsTriggerSender* iSender;
       
    65 	/** The receiver part of the SUPL Push API */
       
    66 	CLbsSuplPushRec* iReceiver;
       
    67 	/** The simulation of the Watcher Framework logger */
       
    68 	CTe_WatcherLog* iWatcherLog;
       
    69 	/** Counter of sent/received messages */
       
    70 	TInt iMsgCount;
       
    71 	/** The total number of messages sent for a test */
       
    72 	TInt iMsgMaxCount;
       
    73 	/** The message buffer used to send/compare messages */
       
    74 	TBuf8<32> iMessage;
       
    75 	/** The number used to fill a sent message */
       
    76 	TUint iSendFillDigit;
       
    77 	/** The number used to check the received message */
       
    78 	TUint iRecvFillDigit;
       
    79 	};
       
    80 		
       
    81 
       
    82 #endif //__TE_LBSSUPLSMSTRIGGERINTEG_STEP__