sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This file contains the definition of the class MTransitionObserver sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @test sl@0: */ sl@0: sl@0: #ifndef __TRANSITIONOBSERVER_H__ sl@0: #define __TRANSITIONOBSERVER_H__ sl@0: sl@0: class CTransition; sl@0: sl@0: /** sl@0: @internalAll sl@0: Comments : Provides a callback method to the CUnitTest to indicate that the sl@0: specified transition has completed an asynchronous function. sl@0: */ sl@0: sl@0: class MTransitionObserver sl@0: { sl@0: public: sl@0: /** sl@0: @fn virtual void SetCurrentTransition(CTransition& aTransition) = 0 sl@0: Intended Usage : Passes the transition which is about to run. sl@0: This allows transition information can be retrieved and sl@0: Repeat() can then be called on the transition. sl@0: @since 7.0 sl@0: @param aTransition The transition to set as current sl@0: @return void sl@0: @pre None sl@0: @post aTransition will be stored as a pointer to the currently executing transition sl@0: */ sl@0: sl@0: virtual void SetCurrentTransition(CTransition& aTransition) = 0; sl@0: sl@0: /** sl@0: @fn virtual void Complete(CTransition& aTransition, TInt aAsyncPostCheckError) = 0 sl@0: Intended Usage : Called to indicate that an asynchronous function on the specified sl@0: transition has completed. sl@0: @since 7.0 sl@0: @param aTransition The transition which has completed sl@0: @param aAsyncPostCheckError An error code from the second phase of post-condition sl@0: validation done after the transition's asynchronous request had completed. sl@0: Used for asynchronous transitions only - for synchronous transitions, 2-phase sl@0: post-condition checking does not apply, and a value of KErrNone is supplied. sl@0: @pre None sl@0: @post Depends on observer implementation. For example, aTransition has completed, sl@0: therefore if all transitions have completed the unit test is complete. sl@0: */ sl@0: sl@0: virtual void Complete(CTransition& aTransition, TInt aAsyncPostCheckError) = 0; sl@0: }; sl@0: sl@0: #endif