|
1 /* |
|
2 * Copyright (c) 2005-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 "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: Monitor the event of a call |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSCALLEVENTMONITOR_H |
|
21 #define MUSCALLEVENTMONITOR_H |
|
22 |
|
23 #include "musunittesting.h" |
|
24 #include "muscallmonitorbase.h" |
|
25 #include "mmuscallstateobserver.h" |
|
26 |
|
27 #include <etelmm.h> |
|
28 #include <e32base.h> |
|
29 |
|
30 /** |
|
31 * Monitors the event of call and set the state to property. |
|
32 * |
|
33 * @lib musaoplugin.dll |
|
34 */ |
|
35 class CMusCallEventMonitor : public CMusCallMonitorBase |
|
36 { |
|
37 |
|
38 public: |
|
39 /** |
|
40 * Two-phased constructor. Leaves on failure. |
|
41 * aCall is not owned. |
|
42 * @return CMusCallEventMonitor object. |
|
43 */ |
|
44 static CMusCallEventMonitor* NewL(const RMobileCall& aCall, |
|
45 MMusTsyPropertyObserver& aObserver, |
|
46 MMusCallStateObserver& aCallStateObserver ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CMusCallEventMonitor(); |
|
52 |
|
53 private: |
|
54 |
|
55 /** |
|
56 * C++ constructor. |
|
57 */ |
|
58 CMusCallEventMonitor( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver, |
|
59 MMusCallStateObserver& aCallStateObserver ); |
|
60 |
|
61 /** |
|
62 * Symbian 2nd-phase constructor. |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 private: |
|
67 |
|
68 /** |
|
69 * Handles an active object's request completion event. |
|
70 */ |
|
71 void RunL(); |
|
72 |
|
73 /** |
|
74 * cancels of an outstanding request. |
|
75 */ |
|
76 void DoCancel(); |
|
77 |
|
78 |
|
79 private: |
|
80 /** |
|
81 * Mobile Call Events. |
|
82 */ |
|
83 RMobileCall::TMobileCallEvent iCallEvent; |
|
84 |
|
85 MUS_UNITTEST( UT_CMusCallEventMonitor ) |
|
86 |
|
87 }; |
|
88 |
|
89 #endif // MUSCALLMONITOR_H |