27 #include "tphonecmdparamcallheaderdata.h" |
27 #include "tphonecmdparamcallheaderdata.h" |
28 #include "phonestatedefinitionsgsm.h" |
28 #include "phonestatedefinitionsgsm.h" |
29 #include "phonelogger.h" |
29 #include "phonelogger.h" |
30 #include "tphonecmdparamboolean.h" |
30 #include "tphonecmdparamboolean.h" |
31 #include "tphonecmdparaminteger.h" |
31 #include "tphonecmdparaminteger.h" |
32 #include "tphonecmdparamcallstatedata.h" |
|
33 #include "cphonemainresourceresolver.h" |
32 #include "cphonemainresourceresolver.h" |
34 #include "phonerssbase.h" |
33 #include "phonerssbase.h" |
35 #include "tphonecmdparamglobalnote.h" |
34 #include "tphonecmdparamglobalnote.h" |
36 #include "phoneui.hrh" |
35 #include "phoneui.hrh" |
37 #include "cphonecenrepproxy.h" |
36 #include "cphonecenrepproxy.h" |
38 #include "mphonestorage.h" |
37 #include "mphonestorage.h" |
|
38 #include "phonecallutil.h" |
39 |
39 |
40 // ================= MEMBER FUNCTIONS ======================= |
40 // ================= MEMBER FUNCTIONS ======================= |
41 |
41 |
42 // C++ default constructor can NOT contain any code, that |
42 // C++ default constructor can NOT contain any code, that |
43 // might leave. |
43 // might leave. |
67 // ----------------------------------------------------------- |
67 // ----------------------------------------------------------- |
68 // |
68 // |
69 void CPhoneConferenceAndWaiting::ConstructL() |
69 void CPhoneConferenceAndWaiting::ConstructL() |
70 { |
70 { |
71 CPhoneConference::ConstructL(); |
71 CPhoneConference::ConstructL(); |
72 |
72 iRingingCallId = PhoneCallUtil::CallIdByState( EPEStateRinging ); |
73 TPhoneCmdParamCallStateData callStateData; |
|
74 callStateData.SetCallState( EPEStateRinging ); |
|
75 iViewCommandHandle->HandleCommandL( |
|
76 EPhoneViewGetCallIdByState, &callStateData ); |
|
77 iRingingCallId = callStateData.CallId(); |
|
78 } |
73 } |
79 |
74 |
80 // ----------------------------------------------------------- |
75 // ----------------------------------------------------------- |
81 // CPhoneConferenceAndWaiting::NewL() |
76 // CPhoneConferenceAndWaiting::NewL() |
82 // Constructor |
77 // Constructor |
186 // ----------------------------------------------------------- |
181 // ----------------------------------------------------------- |
187 // |
182 // |
188 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId ) |
183 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId ) |
189 { |
184 { |
190 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConnectedL()"); |
185 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConnectedL()"); |
191 TPhoneCmdParamCallStateData callStateData; |
|
192 if ( iRingingCallId == KErrNotFound ) |
186 if ( iRingingCallId == KErrNotFound ) |
193 { |
187 { |
194 TPhoneCmdParamCallStateData callStateData; |
188 iRingingCallId = PhoneCallUtil::CallIdByState( EPEStateRinging ); |
195 callStateData.SetCallState( EPEStateRinging ); |
|
196 iViewCommandHandle->HandleCommandL( |
|
197 EPhoneViewGetCallIdByState, &callStateData ); |
|
198 iRingingCallId = callStateData.CallId(); |
|
199 } |
189 } |
200 |
190 |
201 if ( iRingingCallId == aCallId ) |
191 if ( iRingingCallId == aCallId ) |
202 { |
192 { |
203 // not a member of conference call |
193 // not a member of conference call |
230 void CPhoneConferenceAndWaiting::HandleIdleL( TInt aCallId ) |
220 void CPhoneConferenceAndWaiting::HandleIdleL( TInt aCallId ) |
231 { |
221 { |
232 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleIdleL()"); |
222 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleIdleL()"); |
233 if ( iRingingCallId == KErrNotFound ) |
223 if ( iRingingCallId == KErrNotFound ) |
234 { |
224 { |
235 TPhoneCmdParamCallStateData callStateData; |
225 iRingingCallId = PhoneCallUtil::CallIdByState( EPEStateRinging ); |
236 callStateData.SetCallState( EPEStateRinging ); |
|
237 iViewCommandHandle->HandleCommandL( |
|
238 EPhoneViewGetCallIdByState, &callStateData ); |
|
239 iRingingCallId = callStateData.CallId(); |
|
240 } |
226 } |
241 |
227 |
242 if( iRingingCallId == aCallId ) |
228 if( iRingingCallId == aCallId ) |
243 { |
229 { |
244 |
230 |
281 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
267 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
282 switch( activeCallCount.Integer() ) |
268 switch( activeCallCount.Integer() ) |
283 { |
269 { |
284 case ENoActiveCalls: // Go to incoming state |
270 case ENoActiveCalls: // Go to incoming state |
285 { |
271 { |
286 BringIncomingToForegroundL(); |
272 BringIncomingToForegroundL(); |
|
273 SetRingingTonePlaybackL( iRingingCallId ); |
287 UpdateCallHeaderAndUiCommandsL( iRingingCallId ); |
274 UpdateCallHeaderAndUiCommandsL( iRingingCallId ); |
288 |
275 |
289 if ( iNumberEntryManager->IsNumberEntryVisibleL() ) |
276 if ( iNumberEntryManager->IsNumberEntryVisibleL() ) |
290 { |
277 { |
291 iNumberEntryManager->SetNumberEntryVisibilityL(EFalse); |
278 iNumberEntryManager->SetNumberEntryVisibilityL(EFalse); |
292 } |
279 } |
293 |
280 |
294 SetRingingTonePlaybackL( iRingingCallId ); |
|
295 SetBackButtonActive(EFalse); |
281 SetBackButtonActive(EFalse); |
296 iStateMachine->ChangeState( EPhoneStateIncoming ); |
282 iStateMachine->ChangeState( EPhoneStateIncoming ); |
297 } |
283 } |
298 break; |
284 break; |
299 |
285 |
344 iViewCommandHandle->ExecuteCommandL( |
330 iViewCommandHandle->ExecuteCommandL( |
345 EPhoneViewPrivateFromConference, aCallId ); |
331 EPhoneViewPrivateFromConference, aCallId ); |
346 |
332 |
347 if ( iRingingCallId == KErrNotFound ) |
333 if ( iRingingCallId == KErrNotFound ) |
348 { |
334 { |
349 TPhoneCmdParamCallStateData callStateData; |
335 iRingingCallId = PhoneCallUtil::CallIdByState( EPEStateRinging ); |
350 callStateData.SetCallState( EPEStateRinging ); |
|
351 iViewCommandHandle->HandleCommandL( |
|
352 EPhoneViewGetCallIdByState, &callStateData ); |
|
353 iRingingCallId = callStateData.CallId(); |
|
354 } |
336 } |
355 |
337 |
356 TPhoneCmdParamBoolean conferenceBubbleExists; |
338 TPhoneCmdParamBoolean conferenceBubbleExists; |
357 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
339 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
358 &conferenceBubbleExists ); |
340 &conferenceBubbleExists ); |