|
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 status of the call. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSCALLCONFERENCEMONITOR_H |
|
21 #define MUSCALLCONFERENCEMONITOR_H |
|
22 |
|
23 #include "musunittesting.h" |
|
24 #include "mussesseioninformationapi.h" |
|
25 #include "muscallmonitor.h" |
|
26 |
|
27 #include <etelmm.h> |
|
28 #include <e32base.h> |
|
29 |
|
30 class CMusCallConferenceEventMonitor; |
|
31 |
|
32 /** |
|
33 * Monitors the event of call and set the state to property. |
|
34 * |
|
35 * @lib musaoplugin.dll |
|
36 */ |
|
37 class CMusCallConferenceMonitor : public CActive |
|
38 { |
|
39 |
|
40 public: |
|
41 /** |
|
42 * Two-phased constructor. Leaves on failure. |
|
43 * aCall is not owned. |
|
44 * @return CMusCallConferenceMonitor object. |
|
45 */ |
|
46 static CMusCallConferenceMonitor* NewL( |
|
47 RMobilePhone& aPhone, RMobileLine& aLine, |
|
48 RPointerArray<CMusCallMonitor>& aCallMonitorArray); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CMusCallConferenceMonitor(); |
|
54 |
|
55 /** |
|
56 * Checks the Conference Status and |
|
57 * sets the multimediasharing propery key value |
|
58 */ |
|
59 void SetStateL(); |
|
60 |
|
61 /** |
|
62 * Get Conference Call Status |
|
63 */ |
|
64 |
|
65 RMobileConferenceCall::TMobileConferenceStatus GetConfStatus(); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * C++ constructor. |
|
71 */ |
|
72 CMusCallConferenceMonitor( |
|
73 RMobileLine& aLine, |
|
74 RPointerArray<CMusCallMonitor>& aCallMonitorArray ); |
|
75 |
|
76 /** |
|
77 * Symbian 2nd-phase constructor. |
|
78 */ |
|
79 void ConstructL(RMobilePhone& aPhone); |
|
80 |
|
81 /** |
|
82 * Sets the multimediasharing propery key value |
|
83 * if the value is same before then dont report it. |
|
84 */ |
|
85 void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal); |
|
86 |
|
87 /** |
|
88 * Add / Remove Call Monitors based on Mus criteria |
|
89 */ |
|
90 void MonitorCallL(); |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * Handles an active object's request completion event. |
|
96 */ |
|
97 void RunL(); |
|
98 |
|
99 /** |
|
100 * cancels of an outstanding request |
|
101 */ |
|
102 void DoCancel(); |
|
103 |
|
104 /* |
|
105 * Handles a leave occurring in the request completion |
|
106 * event handler RunL(). |
|
107 * Always return KErrNone since it must handle this error |
|
108 * if it comes to this place. |
|
109 */ |
|
110 TInt RunError( TInt aError ); |
|
111 |
|
112 |
|
113 private: |
|
114 |
|
115 /** |
|
116 * Reference of RMobileLine.Not Owned. |
|
117 */ |
|
118 |
|
119 RMobileLine& iLine; |
|
120 |
|
121 /** |
|
122 * Reference of RMobileConferenceCall. |
|
123 */ |
|
124 RMobileConferenceCall iConfCall; |
|
125 |
|
126 /** |
|
127 * Conference Event. |
|
128 */ |
|
129 RMobileConferenceCall::TMobileConferenceStatus iConfStatus; |
|
130 |
|
131 /** |
|
132 * Array of Call Monitors.Not Owned |
|
133 */ |
|
134 RPointerArray<CMusCallMonitor>& iCallMonitorArray; |
|
135 |
|
136 /** |
|
137 * Monitors the conference call events. For example a particular call |
|
138 * which is in conference dropped will be reported as part of |
|
139 * conference event. |
|
140 */ |
|
141 CMusCallConferenceEventMonitor* iConfCallEvent; |
|
142 |
|
143 MUS_UNITTEST( UT_CMusCallConferenceMonitor ) |
|
144 MUS_UNITTEST( UT_CMusTsyPropertyMonitor ) |
|
145 }; |
|
146 |
|
147 #endif // MUSCALLCONFERENCEMONITOR_H |