messagingfw/msgtestfw/TestActions/Sms/inc/CMtfTestActionCheckMessageSendingState.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2004-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 
       
    17 #ifndef __CMTF_TEST_ACTION_CHECK_MESSAGE_SENDINGSTATE_H__
       
    18 #define __CMTF_TEST_ACTION_CHECK_MESSAGE_SENDINGSTATE_H__
       
    19 
       
    20 #include "CMtfTestAction.h"
       
    21 
       
    22 class CMsvEntry;
       
    23 class MMsvEntryObserver;
       
    24 class RTimer;
       
    25 
       
    26 _LIT(KTestActionCheckMessageSendingState,"CheckMessageSendingState");
       
    27 
       
    28 /**
       
    29 This test action waits for the expected message states.
       
    30 
       
    31 It checks for the following message states: Failed, SendingState, Scheduled,
       
    32 and PendingConditions.  The action first gets the settings (expected states and 
       
    33 time out value) from the configuration.  It then listens on the target message 
       
    34 entry for any entry events.  If the message states match the expected states within
       
    35 the time out limit, the action passes.  Otherwise, the action fails.
       
    36 
       
    37 @internalTechnology
       
    38 */
       
    39 class CMtfTestActionCheckMessageSendingState : public CMtfTestAction,public MMsvEntryObserver
       
    40 	{
       
    41 public:
       
    42 	static CMtfTestAction* NewL(CMtfTestCase& aTestCase, CMtfTestActionParameters* ActionParameters);
       
    43 	virtual ~CMtfTestActionCheckMessageSendingState(); 
       
    44 
       
    45 public:
       
    46 	//method from CMtfTestAction
       
    47 	virtual void ExecuteActionL();
       
    48 
       
    49 protected:
       
    50 	//methods from CActive
       
    51 	virtual void DoCancel();
       
    52 	virtual void RunL();
       
    53 	
       
    54 private:
       
    55 	//method from MMsvEntryObserver
       
    56 	virtual void HandleEntryEventL(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
       
    57 	
       
    58 	TBool IsMessageStateMet();
       
    59 	CMtfTestActionCheckMessageSendingState(CMtfTestCase& aTestCase);
       
    60 
       
    61 private:
       
    62 	RTimer		iExpireTimer;
       
    63 	CMsvEntry* 	iMsvEntry;
       
    64 			
       
    65 	TInt 		iExpectedSendingState;
       
    66 	TInt 		iExpectedPendingConditionMet;
       
    67 	TInt		iExpectedFailed;
       
    68 	TInt		iExpectedScheduled;
       
    69 	};
       
    70 
       
    71 #endif //__CMTF_TEST_ACTION_CHECK_MESSAGE_SENDINGSTATE_H__