1 /* |
|
2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef LIWTC_ASYNC_H |
|
24 #define LIWTC_ASYNC_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <liwcommon.h> |
|
28 #include <e32base.h> |
|
29 #include <liwgenericparam.h> |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CLiwServiceHandler; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * CLiwTC2 class. |
|
38 * |
|
39 */ |
|
40 class CLiw_AsyncTC : public CActive, public MLiwNotifyCallback/*, public MLiwTest*/ |
|
41 { |
|
42 public: |
|
43 enum TRequestType {ECount, EStop=1000} ; |
|
44 |
|
45 public: // Constructors and destructor |
|
46 /** |
|
47 * Symbian default constructor. |
|
48 */ |
|
49 // void ConstructL(CLiwTestLogHandler& aLogger, CLiwTestAppContainer& aContainer); |
|
50 |
|
51 /** |
|
52 * Constructor. |
|
53 */ |
|
54 CLiw_AsyncTC( CLiwServiceHandler *iServiceHandler, TRequestType aRequest = ECount, TInt aPriority = EPriorityStandard); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CLiw_AsyncTC(); |
|
60 |
|
61 TUid Id() const; |
|
62 |
|
63 public: |
|
64 void DoCancel(); |
|
65 void RunL(); |
|
66 void RequestFunction( TRequestType aRequest ); |
|
67 void ReadyToGo(); |
|
68 void SetIncrementCounter( TInt aCount = 1 ); |
|
69 TUint CountValue () const; |
|
70 TRequestType iRequest; |
|
71 TInt iCmdID; |
|
72 |
|
73 TInt HandleNotifyL( |
|
74 TInt aCmdId, |
|
75 TInt aEventId, |
|
76 CLiwGenericParamList& aEventParamList, |
|
77 const CLiwGenericParamList& aInParamList); |
|
78 |
|
79 public: // MLiwTest |
|
80 TInt AsyncCase(TInt aTcNo); |
|
81 |
|
82 /*Test Items*/ |
|
83 void LIW_ASYNC_001(); |
|
84 void LIW_ASYNC_002(); |
|
85 void LIW_ASYNC_003(TInt aEventState=0); |
|
86 void LIW_ASYNC_004(); |
|
87 |
|
88 private: // Data |
|
89 CLiwServiceHandler* iServiceHandler; |
|
90 TInt iTransID; |
|
91 TInt iAsyncCount; |
|
92 TInt tcNo; |
|
93 TInt iResult; |
|
94 TUint iCount; |
|
95 TUint iIncrementCount; |
|
96 |
|
97 }; |
|
98 |
|
99 #endif |
|
100 |
|
101 // End of File |
|