38 #include "tphonecmdparamquery.h" |
38 #include "tphonecmdparamquery.h" |
39 #include "tphonecmdparamglobalnote.h" |
39 #include "tphonecmdparamglobalnote.h" |
40 #include "cphonestateutilsvoip.h" |
40 #include "cphonestateutilsvoip.h" |
41 #include "cphonestatemachinevoip.h" |
41 #include "cphonestatemachinevoip.h" |
42 |
42 |
43 #include "easydialingcommands.hrh" |
|
44 |
|
45 |
|
46 // ================= MEMBER FUNCTIONS ======================= |
43 // ================= MEMBER FUNCTIONS ======================= |
47 |
44 |
48 // C++ default constructor can NOT contain any code, that |
45 // C++ default constructor can NOT contain any code, that |
49 // might leave. |
46 // might leave. |
50 // |
47 // |
112 "CPhoneStateSingleVoIP::HandlePhoneEngineMessageL() ") |
109 "CPhoneStateSingleVoIP::HandlePhoneEngineMessageL() ") |
113 switch ( aMessage ) |
110 switch ( aMessage ) |
114 { |
111 { |
115 case MEngineMonitor::EPEMessageUnattendedTransferRequest: |
112 case MEngineMonitor::EPEMessageUnattendedTransferRequest: |
116 LaunchUnattendedTransferAcceptanceQueryL(); |
113 LaunchUnattendedTransferAcceptanceQueryL(); |
117 // Forward message to phone customization |
114 break; |
118 CPhoneState::ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId ); |
|
119 break; |
|
120 default: |
115 default: |
121 CPhoneSingleCall::HandlePhoneEngineMessageL( |
116 CPhoneSingleCall::HandlePhoneEngineMessageL( |
122 aMessage, aCallId ); |
117 aMessage, aCallId ); |
123 break; |
118 break; |
124 } |
119 } |
137 |
132 |
138 switch( aCommand ) |
133 switch( aCommand ) |
139 { |
134 { |
140 case EPhoneNumberAcqCmdInternetCall: |
135 case EPhoneNumberAcqCmdInternetCall: |
141 StateUtils().SelectServiceAndDialL(); |
136 StateUtils().SelectServiceAndDialL(); |
142 break; |
137 break; |
143 |
138 |
144 case EPhoneNumberAcqCmdSendCommand: |
139 case EPhoneNumberAcqCmdSendCommand: |
145 // If easydialing has focus, call should be initiated to focused contact. |
140 StartCallingL(); |
146 if ( IsDialingExtensionInFocusL() ) |
|
147 { |
|
148 commandStatus = CPhoneSingleCall::HandleCommandL( aCommand ); |
|
149 } |
|
150 else |
|
151 { |
|
152 StartCallingL(); |
|
153 } |
|
154 break; |
141 break; |
155 |
142 |
156 case EPhoneCmdAcceptUnattendedTransfer: |
143 case EPhoneCmdAcceptUnattendedTransfer: |
157 HandleUnattendedTransferRequestResponseL( ETrue ); |
144 HandleUnattendedTransferRequestResponseL( ETrue ); |
158 break; |
145 break; |
188 &numberEntryCountParam ); |
175 &numberEntryCountParam ); |
189 TInt neLength( numberEntryCountParam.Integer() ); |
176 TInt neLength( numberEntryCountParam.Integer() ); |
190 |
177 |
191 if( IsNumberEntryVisibleL() && neLength ) |
178 if( IsNumberEntryVisibleL() && neLength ) |
192 { |
179 { |
193 if ( IsOnScreenDialerSupported() ) |
180 if ( IsOnScreenDialerSupported() && |
|
181 IsCustomizedDialerVisibleL() ) |
194 { |
182 { |
195 if ( IsDTMFEditorVisibleL() || |
183 return; |
196 IsCustomizedDialerVisibleL() ) |
|
197 { |
|
198 return; |
|
199 } |
|
200 // If easydialing has focus, call should be initiated to focused contact. |
|
201 else if ( IsDialingExtensionInFocusL() ) |
|
202 { |
|
203 CPhoneSingleCall::HandleKeyMessageL( aMessage, aKeyCode ); |
|
204 return; |
|
205 } |
|
206 } |
184 } |
207 |
185 |
208 StartCallingL(); |
186 StartCallingL(); |
209 } |
187 } |
210 else |
188 else |
213 CPhoneSingleCall::HandleKeyMessageL( aMessage, aKeyCode ); |
191 CPhoneSingleCall::HandleKeyMessageL( aMessage, aKeyCode ); |
214 } |
192 } |
215 } |
193 } |
216 break; |
194 break; |
217 |
195 |
218 default: |
196 default: |
219 CPhoneSingleCall::HandleKeyMessageL( aMessage, aKeyCode ); |
197 CPhoneSingleCall::HandleKeyMessageL( aMessage, aKeyCode ); |
220 break; |
198 break; |
221 } |
199 } |
222 } |
200 } |
223 |
201 |
224 // ----------------------------------------------------------- |
202 // ----------------------------------------------------------- |
225 // CPhoneStateSingleVoIP::StartCallingL |
203 // CPhoneStateSingleVoIP::StartCallingL |
226 // ----------------------------------------------------------- |
204 // ----------------------------------------------------------- |
227 // |
205 // |
228 void CPhoneStateSingleVoIP::StartCallingL() |
206 void CPhoneStateSingleVoIP::StartCallingL() |
229 { |
207 { |
230 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
208 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
231 "CPhoneStateSingleVoIP::StartCallingL()" ) |
209 "CPhoneStateSingleVoIP::StartCallingL()" ) |
232 |
210 |
233 TUint serviceId( 0 ); |
211 TUint serviceId( 0 ); |
234 CPhoneStateUtilsVoip& utililty = StateUtils(); |
212 CPhoneStateUtilsVoip& utililty = StateUtils(); |
235 if ( utililty.IsVoipPreferredCall( serviceId ) ) |
213 if ( utililty.IsVoipPreferredCall( serviceId ) ) |
236 { |
214 { |
237 utililty.SelectServiceAndDialL( KNullDesC, serviceId ); |
215 utililty.SelectServiceAndDialL( KNullDesC, serviceId ); |
238 } |
216 } |
239 else |
217 else |
240 { |
218 { |
241 if ( utililty.IsVoipNumber() ) |
219 if ( utililty.IsVoipNumber() ) |
242 { |
220 { |
243 utililty.SelectServiceAndDialL(); |
221 utililty.SelectServiceAndDialL(); |
244 } |
222 } |
245 else |
223 else |
265 DialVoiceCallL(); |
243 DialVoiceCallL(); |
266 |
244 |
267 CleanupStack::PopAndDestroy( phoneNumber ); |
245 CleanupStack::PopAndDestroy( phoneNumber ); |
268 } |
246 } |
269 } |
247 } |
270 } |
248 } |
271 } |
249 } |
272 |
250 |
273 // ----------------------------------------------------------- |
251 // ----------------------------------------------------------- |
274 // CPhoneStateSingleVoIP::LaunchUnattendedTransferAcceptanceQueryL |
252 // CPhoneStateSingleVoIP::LaunchUnattendedTransferAcceptanceQueryL |
275 // Dialog is constructed based on S60 In-Call Operations UI Specification, |
253 // Dialog is constructed based on S60 In-Call Operations UI Specification, |
276 // Section 2.26. |
254 // Section 2.26. |
380 iStateMachine->SendPhoneEngineMessage( |
358 iStateMachine->SendPhoneEngineMessage( |
381 MPEPhoneModel::EPEMessageAcceptUnattendedTransfer ); |
359 MPEPhoneModel::EPEMessageAcceptUnattendedTransfer ); |
382 MPEEngineInfo* info = iStateMachine->PhoneEngineInfo(); |
360 MPEEngineInfo* info = iStateMachine->PhoneEngineInfo(); |
383 const TPEPhoneNumber& transferTarget = |
361 const TPEPhoneNumber& transferTarget = |
384 info->UnattendedTransferTarget( CallId() ); |
362 info->UnattendedTransferTarget( CallId() ); |
385 info->SetIsTransferDial( ETrue ); |
363 |
386 TUint32 serviceId = iStateMachine->PhoneEngineInfo()-> |
364 TUint32 serviceId = iStateMachine->PhoneEngineInfo()-> |
387 ServiceId( CallId() ); |
365 ServiceId( CallId() ); |
388 StateUtils().SelectServiceAndDialL( transferTarget, serviceId ); |
366 StateUtils().SelectServiceAndDialL( transferTarget, serviceId ); |
389 |
|
390 // Store transferor address to phoneengine, this is used for |
|
391 // calling back if transfer call fails for some reason |
|
392 info->SetCallBackAddress( info->RemotePhoneNumber( CallId() ) ); |
|
393 } |
367 } |
394 else |
368 else |
395 { |
369 { |
396 iStateMachine->SendPhoneEngineMessage( |
370 iStateMachine->SendPhoneEngineMessage( |
397 MPEPhoneModel::EPEMessageRejectUnattendedTransfer ); |
371 MPEPhoneModel::EPEMessageRejectUnattendedTransfer ); |
398 iStateMachine->PhoneEngineInfo()->SetCallBackAddress( |
|
399 KNullDesC() ); |
|
400 } |
372 } |
401 } |
373 } |
402 |
374 |
403 |
375 |
404 // ----------------------------------------------------------- |
376 // ----------------------------------------------------------- |