14 * Description: Monitor that observes the Line and create call monitor |
14 * Description: Monitor that observes the Line and create call monitor |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
|
19 |
19 #ifndef MUSTSYPROPERTYMONITOR_H |
20 #ifndef MUSTSYPROPERTYMONITOR_H |
20 #define MUSTSYPROPERTYMONITOR_H |
21 #define MUSTSYPROPERTYMONITOR_H |
21 |
22 |
|
23 #include "musunittesting.h" |
|
24 #include "mussesseioninformationapi.h" |
|
25 #include "mmustsypropertyobserver.h" |
22 // Enable the below line if Kodiak Ptt has to be monitered |
26 // Enable the below line if Kodiak Ptt has to be monitered |
23 // #include "mmusptteventobserver.h" |
27 // #include "mmusptteventobserver.h" |
24 #include <etel.h> |
|
25 #include <etelmm.h> |
28 #include <etelmm.h> |
26 #include <e32base.h> |
29 #include <e32base.h> |
27 #include <e32property.h> |
30 #include <e32property.h> |
28 #include <ctsydomainpskeys.h> |
|
29 |
|
30 #include "musunittesting.h" |
|
31 #include "mussesseioninformationapi.h" |
|
32 #include "mmustsypropertyobserver.h" |
|
33 #include "mmuscallstateobserver.h" |
|
34 |
31 |
35 class CMusCallMonitor; |
32 class CMusCallMonitor; |
36 class CMusVoipCallMonitor; |
|
37 class CMusPTTCallMonitor; |
33 class CMusPTTCallMonitor; |
38 class CMusCallConferenceMonitor; |
34 class CMusCallConferenceMonitor; |
|
35 class CMusClirMonitor; |
39 |
36 |
40 /** |
37 /** |
41 * This class monitors the line event,if call is connected |
38 * This class monitors the line event,if call is connected |
42 * it creats new call event monitor . If call is disconnected |
39 * it creats new call event monitor . If call is disconnected |
43 * it removes the call monitor . Also it responds to Ptt Events. |
40 * it removes the call monitor . Also it responds to Ptt Events. |
54 public: // constructors and destructor |
51 public: // constructors and destructor |
55 |
52 |
56 /** |
53 /** |
57 * Two-phased constructor. |
54 * Two-phased constructor. |
58 */ |
55 */ |
59 static CMusTsyPropertyMonitor* NewL( RMobilePhone& aPhone, |
56 static CMusTsyPropertyMonitor* NewL( RMobilePhone& aPhone ); |
60 MMusCallStateObserver& aCallStateObserver ); |
|
61 |
57 |
62 /** |
58 /** |
63 * Destructor. |
59 * Destructor. |
64 */ |
60 */ |
65 ~CMusTsyPropertyMonitor(); |
61 ~CMusTsyPropertyMonitor(); |
72 |
68 |
73 /** |
69 /** |
74 * Function from MMusTsyPropertyObserver |
70 * Function from MMusTsyPropertyObserver |
75 */ |
71 */ |
76 void NotifyCallStateChanged(NMusSessionInformationApi::TMusCallEvent aVal, TName& aCallName); |
72 void NotifyCallStateChanged(NMusSessionInformationApi::TMusCallEvent aVal, TName& aCallName); |
77 |
|
78 /** |
|
79 * Checks from the corresponding monitors if the data is ready. |
|
80 */ |
|
81 TBool IsDataReadyL(); |
|
82 |
73 |
83 private: |
74 private: |
84 |
75 |
85 /** |
76 /** |
86 * C++ constructor. |
77 * C++ constructor. |
87 */ |
78 */ |
88 CMusTsyPropertyMonitor( RMobilePhone& aPhone, MMusCallStateObserver& aCallStateObserve ); |
79 CMusTsyPropertyMonitor( RMobilePhone& aPhone ); |
89 |
80 |
90 /** |
81 /** |
91 * Symbian 2nd-phase constructor. |
82 * Symbian 2nd-phase constructor. |
92 */ |
83 */ |
93 void ConstructL(); |
84 void ConstructL(); |
94 |
85 |
95 |
86 |
96 private: // functions from base class CActive |
87 private: // functions from base class CActive |
97 |
88 |
98 /** |
89 /** |
99 * Handles an active object's request completion event. |
90 * Handles an active object's request completion event. |
142 void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal); |
133 void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal); |
143 |
134 |
144 /** |
135 /** |
145 * Add / Remove Call Monitors based on Mus criteria |
136 * Add / Remove Call Monitors based on Mus criteria |
146 */ |
137 */ |
147 void MonitorCallL(const TPSCTsyCallState& aCallState, |
138 void MonitorCallL(); |
148 const TPSCTsyCallType& aCallType); |
|
149 |
|
150 /** |
|
151 * Add / Remove Call Monitors based on Mus criteria |
|
152 */ |
|
153 void MonitorCSCallL(); |
|
154 |
|
155 private: // Voip related |
|
156 /* |
|
157 * If the call Monitor doesnt exist then it creats one new |
|
158 * CMusCallMonitor class and add into array. |
|
159 * Leavs if objects creation fails. |
|
160 */ |
|
161 void AddVoipCallMonitorL( TName& aCallName ); |
|
162 |
|
163 /* |
|
164 * It removs the CMusCallMonitor object from array |
|
165 * based on the call name. |
|
166 */ |
|
167 |
|
168 void RemoveVoipCallMonitor( TName& aCallName ); |
|
169 |
|
170 /** |
|
171 * Add / Remove Call Monitors based on Mus criteria |
|
172 */ |
|
173 void MonitorVoipCallL(const TPSCTsyCallState& aCallState); |
|
174 |
|
175 /** |
|
176 * Removes and reset the voip call monitor array |
|
177 */ |
|
178 void RemoveAllVoipCallMonitors( ); |
|
179 |
|
180 /** |
|
181 * Checks multimediasharing call criteria's |
|
182 */ |
|
183 void CheckCallCriteriaL(); |
|
184 |
|
185 |
139 |
186 /** |
140 /** |
187 * Delete all call monitor |
141 * Delete all call monitor |
188 */ |
142 */ |
189 void RemoveAllCallMonitor(); |
143 void RemoveAllCallMonitor(); |
228 * Array of Call Monitors. |
182 * Array of Call Monitors. |
229 */ |
183 */ |
230 RPointerArray<CMusCallMonitor> iCallMonitorArray; |
184 RPointerArray<CMusCallMonitor> iCallMonitorArray; |
231 |
185 |
232 /** |
186 /** |
233 * Array of voip Call Monitors. |
|
234 */ |
|
235 RPointerArray<CMusVoipCallMonitor> iVoipCallMonitorArray; |
|
236 |
|
237 /** |
|
238 * Conference call monitor, owned. |
187 * Conference call monitor, owned. |
239 */ |
188 */ |
240 CMusCallConferenceMonitor* iConferenceMonitor; |
189 CMusCallConferenceMonitor* iConferenceMonitor; |
241 |
190 |
242 /** |
191 /** |
243 * Instance of RProperty. |
192 * Instance of RProperty. |
244 */ |
193 */ |
245 RProperty iPropertyEvent; |
194 RProperty iPropertyEvent; |
246 |
195 |
247 /* |
196 CMusClirMonitor* iClirMonitor; |
248 * Reference of callstate observer not owned |
197 |
249 */ |
|
250 MMusCallStateObserver& iCallStateObserver; |
|
251 |
198 |
252 MUS_UNITTEST( UT_CMusTsyPropertyMonitor ) |
199 MUS_UNITTEST( UT_CMusTsyPropertyMonitor ) |
253 MUS_UNITTEST( UT_CMusAoPlugin ) |
200 |
254 |
|
255 }; |
201 }; |
256 |
202 |
257 #endif // MUSTSYPROPERTYMONITOR_H |
203 #endif // MUSTSYPROPERTYMONITOR_H |