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