commsprocess/commsrootserverconfig/TE_rootserver/inc/TestAsynchHandler.h
changeset 72 ae47d0499bee
equal deleted inserted replaced
68:5da8188e392b 72:ae47d0499bee
       
     1 // Copyright (c) 2003-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 // This contains CTestAsynchHandler which is an active object to
       
    16 // handle the asynch calls from the RootServer during testing
       
    17 
       
    18 #if (!defined __TESTASYNCHHANDLER_H__)
       
    19 #define __TESTASYNCHHANDLER_H__
       
    20 
       
    21 #include "c32root.h"
       
    22 #include <e32property.h>
       
    23 
       
    24 class CTestAsynchHandler: public CActive
       
    25     {
       
    26 public:
       
    27 	// construct/destruct
       
    28 	static CTestAsynchHandler* NewLC(RRootServ* aRootServer);
       
    29 	~CTestAsynchHandler();
       
    30 
       
    31 	// requests
       
    32     void TryLoad( const TRSStartModuleParams& aParams, const TDesC8& aIniData );
       
    33 	void TryUnLoad( const TCFModuleName& aName, TRSUnLoadType aType );
       
    34 	void TryBind( TRSBindingInfo& aBindInfo ); 
       
    35 	void TryUnBind( TRSUnBindingInfo& aUnbindInfo );
       
    36     void TryWaitForDeath(void);
       
    37 	void TryCancelDeath();
       
    38 	void WaitForTimer(TInt aTimeout_ms);
       
    39 
       
    40 	typedef enum 
       
    41 		{
       
    42 		EIdle,
       
    43 		ELoading,
       
    44 		EUnLoading,
       
    45 		EBinding,
       
    46 		EUnBinding,
       
    47 		EListeningforDeath,
       
    48 		EWaitingforTimer
       
    49 	} TAsynchHandlerStates;
       
    50 	TAsynchHandlerStates GetiState(void) const { return iState; }
       
    51 
       
    52 private:
       
    53 	// construct/destruct
       
    54 	CTestAsynchHandler();
       
    55 	void ConstructL(RRootServ* aRootServer);
       
    56 
       
    57 	// from CActive
       
    58     void RunL();
       
    59 	void DoCancel();
       
    60 
       
    61     RRootServ* iRootServer;
       
    62 	RTimer iTimer;
       
    63     TAsynchHandlerStates iState;
       
    64 	RProperty iPropertyDeath;
       
    65     };
       
    66 
       
    67 #endif /* __TESTASYNCHHANDLER_H__ */