|
1 // Copyright (c) 2005-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 // TestAsynchHandler.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #if (!defined __TESTASCYNCHRONUSHANDLER_STEP_H__) |
|
19 #define __TESTASCYNCHRONUSHANDLER_STEP_H__ |
|
20 #include <test/testexecutestepbase.h> |
|
21 #include "Te_ConfiguratorSuiteStepBase.h" |
|
22 #include <comms-infras/c32startcli.h> |
|
23 #include <e32property.h> |
|
24 using namespace RootServer; |
|
25 |
|
26 |
|
27 class CCanceledLoadCpm : public CActive |
|
28 { |
|
29 |
|
30 public: |
|
31 ~CCanceledLoadCpm(); |
|
32 static CCanceledLoadCpm* NewL(); |
|
33 // requests |
|
34 void TryLoad(const TCFModuleName& aName); |
|
35 void TryUnLoad( const TCFModuleName& aName, TRSUnLoadType aType ); |
|
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 RRsConfigurator& Configurator() |
|
52 { |
|
53 return iConfigurator; |
|
54 } |
|
55 private: |
|
56 // construct/destruct |
|
57 CCanceledLoadCpm(); |
|
58 void ConstructL(); |
|
59 // from CActive |
|
60 void RunL(); |
|
61 void DoCancel(); |
|
62 TCFModuleName iName; |
|
63 RRsConfigurator iConfigurator; |
|
64 RTimer iTimer; |
|
65 TAsynchHandlerStates iState; |
|
66 RProperty iPropertyDeath; |
|
67 }; |
|
68 |
|
69 #endif |
|
70 |