equal
deleted
inserted
replaced
|
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 // CDummyAnswer.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __CDUMMYANSWER_H__ |
|
19 #define __CDUMMYANSWER_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32cons.h> |
|
23 #include <e32def.h> |
|
24 |
|
25 #include "CISVAPIAsync.h" |
|
26 |
|
27 /** |
|
28 An active object that is activated by the call being picked up. Counts the |
|
29 call's duration. |
|
30 */ |
|
31 class CDummyAnswer : public CActive |
|
32 { |
|
33 public: |
|
34 static CDummyAnswer* NewL(MExecAsync* aController); |
|
35 ~CDummyAnswer(); |
|
36 |
|
37 void StartCount(TTimeIntervalMicroSeconds32 aDelay); |
|
38 |
|
39 private: |
|
40 CDummyAnswer(MExecAsync* aController); |
|
41 void ConstructL(); |
|
42 void ResetFirstTime(); |
|
43 |
|
44 void ExampleComplete(); |
|
45 |
|
46 void RunL(); |
|
47 void DoCancel(); |
|
48 |
|
49 private: |
|
50 /** |
|
51 Set to ETrue the first time the example is run or when an active object |
|
52 request is cancelled. |
|
53 */ |
|
54 TBool iFirstTime; |
|
55 /** |
|
56 Pointer to console to which output is printed. |
|
57 */ |
|
58 CConsoleBase* iConsole; |
|
59 /** |
|
60 Timer for timing a call's duration. |
|
61 */ |
|
62 RTimer iTimer; |
|
63 /** |
|
64 Pointer to an MExecAsync object that owns this object. |
|
65 */ |
|
66 MExecAsync* iController; |
|
67 /** |
|
68 The duration of the current call (in seconds). |
|
69 */ |
|
70 TInt iCount; |
|
71 }; |
|
72 |
|
73 #endif // __CDUMMYANSWER_H__ |