1 /* |
|
2 * Copyright (c) 2007 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 "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: Monitors call events from ETel |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSPETELCALLEVENTMONITOR_H |
|
20 #define CSPETELCALLEVENTMONITOR_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <etelmm.h> |
|
24 |
|
25 class CSPCall; |
|
26 class MCCPCallObserver; |
|
27 class MCSPCallObserver; |
|
28 |
|
29 class CSPEtelCallEventMonitor |
|
30 : public CActive |
|
31 { |
|
32 public: //Constructors and descructor |
|
33 |
|
34 /** |
|
35 * Two-phased constructing for the monitor. |
|
36 * @param aObserver the observer for events |
|
37 * @param aCall actual object of the monitoring |
|
38 */ |
|
39 static CSPEtelCallEventMonitor* NewL( MCSPCallObserver& aObserver, |
|
40 RMobileCall& aCall ); |
|
41 |
|
42 /** |
|
43 * C++ default destructor |
|
44 */ |
|
45 virtual ~CSPEtelCallEventMonitor( ); |
|
46 |
|
47 /** |
|
48 * Start monitoring call events |
|
49 */ |
|
50 void StartMonitoring(); |
|
51 |
|
52 protected: // From CActive |
|
53 |
|
54 /** |
|
55 * From CActive |
|
56 * RunL |
|
57 */ |
|
58 void RunL(); |
|
59 |
|
60 |
|
61 /** |
|
62 * From CActive |
|
63 * Cancels the monitor |
|
64 * @since S60 3.2 |
|
65 */ |
|
66 void DoCancel(); |
|
67 |
|
68 |
|
69 private: |
|
70 |
|
71 /** |
|
72 * C++ constructor for the monitor. |
|
73 * @param aObserver observers events |
|
74 * @param aCall actual object of the monitoring |
|
75 */ |
|
76 CSPEtelCallEventMonitor( MCSPCallObserver& aObserver, |
|
77 RMobileCall& aCall ); |
|
78 |
|
79 |
|
80 private: // data |
|
81 |
|
82 /** |
|
83 * Observer for call events. |
|
84 */ |
|
85 MCSPCallObserver& iObserver; |
|
86 |
|
87 /** |
|
88 * ETel call which this monitors |
|
89 */ |
|
90 RMobileCall& iCall; |
|
91 |
|
92 /** |
|
93 * Pointer for recovering from a situation where CCE releases call |
|
94 * during observer-call sequence. |
|
95 */ |
|
96 TBool* iDestrPtr; |
|
97 |
|
98 |
|
99 protected: |
|
100 /** |
|
101 * Call event |
|
102 */ |
|
103 RMobileCall::TMobileCallEvent iCallEvent; |
|
104 |
|
105 }; |
|
106 |
|
107 #endif // CSPETELCALLEVENTMONITOR_H |
|