|
1 /* |
|
2 * Copyright (c) 2005-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 the call. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSAOCALLMONITOR_H |
|
21 #define MUSPROPERTYMONITOR_H |
|
22 |
|
23 #include "musunittesting.h" |
|
24 #include <etelmm.h> |
|
25 #include <e32base.h> |
|
26 #include <e32property.h> |
|
27 |
|
28 class CMusManager; |
|
29 |
|
30 /** |
|
31 * Monitor, which observes status of current cs call |
|
32 * |
|
33 * @lib musaoplugin.dll |
|
34 */ |
|
35 class CMusPropertyMonitor : public CActive |
|
36 { |
|
37 |
|
38 public: // constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. Leaves on failure. |
|
42 */ |
|
43 static CMusPropertyMonitor* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~CMusPropertyMonitor(); |
|
49 |
|
50 private: |
|
51 |
|
52 /** |
|
53 * C++ constructor. |
|
54 */ |
|
55 CMusPropertyMonitor(); |
|
56 |
|
57 /** |
|
58 * Symbian 2nd-phase constructor. |
|
59 */ |
|
60 void ConstructL(); |
|
61 |
|
62 /** |
|
63 * Starts Mus Manager Client.In turn it will start Mus Manager |
|
64 * Server and Availability Plugin. |
|
65 */ |
|
66 void StartMusClientL(); |
|
67 |
|
68 /* |
|
69 * Stops Mus Manager Client. |
|
70 */ |
|
71 void StopMusClient(); |
|
72 |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Handles an active object's request completion event. |
|
78 */ |
|
79 void RunL(); |
|
80 |
|
81 /** |
|
82 * cancels of an outstanding request |
|
83 */ |
|
84 void DoCancel(); |
|
85 |
|
86 /* |
|
87 * Handles a leave occurring in the request completion |
|
88 * event handler RunL(). |
|
89 * Always return KErrNone since it must handle this error |
|
90 * if it comes to this place. |
|
91 */ |
|
92 TInt RunError( TInt aError ); |
|
93 |
|
94 |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * Instance of RProperty. |
|
100 */ |
|
101 RProperty iPropertyEvent; |
|
102 |
|
103 /** |
|
104 * Instance of MusManager Client. Owned. |
|
105 */ |
|
106 CMusManager* iManager; |
|
107 |
|
108 MUS_UNITTEST( UT_CMusPropertyMonitor ) |
|
109 |
|
110 }; |
|
111 |
|
112 #endif // MUSPROPERTYMONITOR_H |