24
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
#include "cmmdatacalltsy.h"
|
|
20 |
#include "cmmdatalinetsy.h"
|
|
21 |
#include "cmmphonetsy.h"
|
|
22 |
#include "cmmtsyreqhandlestore.h"
|
|
23 |
#include "cmmcalllist.h"
|
|
24 |
#include "CMmCommonStaticUtility.h"
|
|
25 |
#include "MmTsy_numberOfSlots.h"
|
|
26 |
#include "cmmlinelist.h"
|
|
27 |
#include "cmmmessagemanagerbase.h"
|
|
28 |
#include <ctsy/pluginapi/cmmdatapackage.h>
|
|
29 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
30 |
#include "cmmcallgsmwcdmaext.h"
|
|
31 |
#include <etelmmerr.h>
|
|
32 |
|
|
33 |
|
|
34 |
// ======== MEMBER FUNCTIONS ========
|
|
35 |
|
|
36 |
CMmDataCallTsy::CMmDataCallTsy()
|
|
37 |
{
|
|
38 |
}
|
|
39 |
|
|
40 |
CMmDataCallTsy* CMmDataCallTsy::NewL(
|
|
41 |
CMmPhoneTsy* aMmPhone, CMmDataLineTsy* aMmLine,
|
|
42 |
RMobilePhone::TMobileService aMode,
|
|
43 |
TDes& aName,
|
|
44 |
CMmMessageManagerBase* aMessageManager )
|
|
45 |
{
|
|
46 |
TFLOGSTRING2("TSY: CMmDataCallTsy::NewL. Call name: %S", &aName);
|
|
47 |
|
|
48 |
CMmDataCallTsy* mmCall = NULL;
|
|
49 |
|
|
50 |
//check input parameters
|
|
51 |
if ( NULL != aMmPhone && NULL != aMmLine &&
|
|
52 |
RMobilePhone::ECircuitDataService == aMode )
|
|
53 |
{
|
|
54 |
mmCall = new( ELeave ) CMmDataCallTsy;
|
|
55 |
CleanupClosePushL( *mmCall );
|
|
56 |
mmCall->iMmPhone = aMmPhone;
|
|
57 |
mmCall->iMmLine = aMmLine;
|
|
58 |
mmCall->iCallName = aName;
|
|
59 |
mmCall->iCallMode = aMode;
|
|
60 |
mmCall->iMessageManager = aMessageManager;
|
|
61 |
mmCall->ConstructL( aMode );
|
|
62 |
CleanupStack::Pop( mmCall );
|
|
63 |
}
|
|
64 |
|
|
65 |
return mmCall;
|
|
66 |
}
|
|
67 |
|
|
68 |
CMmDataCallTsy::~CMmDataCallTsy()
|
|
69 |
{
|
|
70 |
TFLOGSTRING3("TSY: CMmDataCallTsy::~CMmDataCallTsy - Call deleted iCallId: %d iCallName: %S",
|
|
71 |
iCallId, &iCallName);
|
|
72 |
|
|
73 |
// If Dial fails, Symbian CSD agent will close the call immediately.
|
|
74 |
// This means that TSY has not yet received call status indications,
|
|
75 |
// where call status changes to idle. Thus responses from modem are
|
|
76 |
// passed to call object.
|
|
77 |
// Here we need to recover dataport if it is used.
|
|
78 |
CCallBase::SetUnowned();
|
|
79 |
|
|
80 |
// Check if dataport is loaned!
|
|
81 |
if ( iLoanedCommPort.iPort.Compare( KNullDesC) != 0 )
|
|
82 |
{
|
|
83 |
//Create package
|
|
84 |
CCallDataPackage package;
|
|
85 |
//Set call id and call mode
|
|
86 |
package.SetCallIdAndMode( iCallId, iCallMode );
|
|
87 |
//Pack commport
|
|
88 |
package.PackData( &iLoanedCommPort );
|
|
89 |
|
|
90 |
//Send request to the Domestic OS layer.
|
|
91 |
if( iMessageManager )
|
|
92 |
{
|
|
93 |
TRAP_IGNORE(
|
|
94 |
iMessageManager->HandleRequestL(
|
|
95 |
EEtelCallRecoverDataPort, &package );
|
|
96 |
);
|
|
97 |
}
|
|
98 |
|
|
99 |
iLoanedCommPort.iCsy.Zero();
|
|
100 |
iLoanedCommPort.iPort.Zero();
|
|
101 |
}
|
|
102 |
|
|
103 |
iRetDataCallCaps = NULL;
|
|
104 |
iRetHscsdInfo = NULL;
|
|
105 |
}
|
|
106 |
|
|
107 |
|
|
108 |
// ---------------------------------------------------------------------------
|
|
109 |
// CMmDataCallTsy::InitInternalAttributes
|
|
110 |
// Initialises miscellaneous internal attributes.
|
|
111 |
// (other items were commented in a header).
|
|
112 |
// ---------------------------------------------------------------------------
|
|
113 |
//
|
|
114 |
void CMmDataCallTsy::InitInternalAttributes()
|
|
115 |
{
|
|
116 |
CMmCallTsy::InitInternalAttributes();
|
|
117 |
|
|
118 |
//set call capabilities
|
|
119 |
iCallCaps.iFlags =
|
|
120 |
RCall::KCapsData | RCall::KCapsDial | RCall::KCapsConnect;
|
|
121 |
|
|
122 |
// Boolean that indicates if this call object is finished data call.
|
|
123 |
// Required as Symbian CSD agent in situation where first data call
|
|
124 |
// fails due wrong number and it then opens second data call, which
|
|
125 |
// dials correct number. Call status notifications go to wrong call
|
|
126 |
// object (the first one) and causes problems for clients.
|
|
127 |
iIsFinishedDataCall = EFalse;
|
|
128 |
|
|
129 |
//data call params
|
|
130 |
iRetDataCallCaps = NULL;
|
|
131 |
iLoanedCommPort.iCsy.Zero();
|
|
132 |
iLoanedCommPort.iPort.Zero();
|
|
133 |
}
|
|
134 |
|
|
135 |
// ---------------------------------------------------------------------------
|
|
136 |
// CMmDataCallTsy::DoExtFuncL
|
|
137 |
// DoExtFuncL is called by the Etel server when it has an "extended", i.e.
|
|
138 |
// non-core ETel request for the TSY. To process a request handle, request
|
|
139 |
// type and request data are passed to the TSY.
|
|
140 |
// (other items were commented in a header).
|
|
141 |
// ---------------------------------------------------------------------------
|
|
142 |
//
|
|
143 |
TInt CMmDataCallTsy::DoExtFuncL(
|
|
144 |
const TTsyReqHandle aTsyReqHandle,
|
|
145 |
const TInt aIpc,
|
|
146 |
const TDataPackage& aPackage )
|
|
147 |
{
|
|
148 |
TFLOGSTRING3("TSY: CMmDataCallTsy::DoExtFuncL - IPC: %d Handle: %d",
|
|
149 |
aIpc, aTsyReqHandle);
|
|
150 |
|
|
151 |
TInt ret( KErrNone );
|
|
152 |
|
|
153 |
TAny* dataPtr = aPackage.Ptr1();
|
|
154 |
TAny* dataPtr2 = aPackage.Ptr2();
|
|
155 |
|
|
156 |
// The request data has to extracted from TDataPackage and the TAny*
|
|
157 |
// pointers have to be "cast" to the expected request data type
|
|
158 |
|
|
159 |
// NOTE! Do not put any Cancel methods here.
|
|
160 |
switch ( aIpc )
|
|
161 |
{
|
|
162 |
// Call Status
|
|
163 |
// Get Call Status
|
|
164 |
case EMobileCallGetMobileCallStatus:
|
|
165 |
ret = GetMobileCallStatus( aTsyReqHandle,
|
|
166 |
reinterpret_cast<RMobileCall::TMobileCallStatus*>(dataPtr) );
|
|
167 |
break;
|
|
168 |
// Notify Call Status Change
|
|
169 |
case EMobileCallNotifyMobileCallStatusChange:
|
|
170 |
ret = NotifyMobileCallStatusChange(
|
|
171 |
reinterpret_cast<RMobileCall::TMobileCallStatus*>(dataPtr) );
|
|
172 |
break;
|
|
173 |
// Transfer One Call to Remote Party of Another Call
|
|
174 |
case EMobileCallTransfer:
|
|
175 |
ret = TransferL( aTsyReqHandle );
|
|
176 |
break;
|
|
177 |
// Notify Call Event
|
|
178 |
case EMobileCallNotifyCallEvent:
|
|
179 |
ret = NotifyCallEvent(
|
|
180 |
reinterpret_cast<RMobileCall::TMobileCallEvent*>( dataPtr) );
|
|
181 |
break;
|
|
182 |
// Call Control
|
|
183 |
// Get Call Capabilities
|
|
184 |
case EMobileCallGetMobileCallCaps:
|
|
185 |
ret = GetMobileCallCaps( aTsyReqHandle, aPackage.Des1n() );
|
|
186 |
break;
|
|
187 |
|
|
188 |
//Notify Call Capabilities Change
|
|
189 |
case EMobileCallNotifyMobileCallCapsChange:
|
|
190 |
ret = NotifyMobileCallCapsChange(aPackage.Des1n());
|
|
191 |
break;
|
|
192 |
|
|
193 |
// Call Information
|
|
194 |
// Get Mobile Call Information
|
|
195 |
case EMobileCallGetMobileCallInfo:
|
|
196 |
ret = GetMobileCallInfo( aTsyReqHandle, aPackage.Des1n() );
|
|
197 |
break;
|
|
198 |
// Notify Change of Remote Party Information
|
|
199 |
case EMobileCallNotifyRemotePartyInfoChange:
|
|
200 |
ret = NotifyRemotePartyInfoChange(
|
|
201 |
reinterpret_cast<RMobileCall::TMobileCallRemotePartyInfoV1Pckg*>(
|
|
202 |
aPackage.Des1n()) );
|
|
203 |
break;
|
|
204 |
// Data Call Capabilities
|
|
205 |
// Get Data Call Capabilities
|
|
206 |
case EMobileCallGetMobileDataCallCaps:
|
|
207 |
ret = GetMobileDataCallCaps( aTsyReqHandle, aPackage.Des1n() );
|
|
208 |
break;
|
|
209 |
// Notify Change of Data Call Capabilities
|
|
210 |
case EMobileCallNotifyMobileDataCallCapsChange:
|
|
211 |
ret = NotifyMobileDataCallCapsChange( aTsyReqHandle,
|
|
212 |
aPackage.Des1n() );
|
|
213 |
break;
|
|
214 |
// Data Call RLP Parameters
|
|
215 |
// Get Data Call RLP Range
|
|
216 |
case EMobileCallGetMobileDataCallRLPRange:
|
|
217 |
ret = GetMobileDataCallRLPRange( aTsyReqHandle,
|
|
218 |
reinterpret_cast<TInt*>(dataPtr),
|
|
219 |
reinterpret_cast<RMobileCall::TMobileDataRLPRangesV1Pckg*>(
|
|
220 |
dataPtr2) );
|
|
221 |
break;
|
|
222 |
// High Speed Circuit Switched Data (HCSCD)
|
|
223 |
// Set Dynamic HSCSD Call Parameters
|
|
224 |
case EMobileCallSetDynamicHscsdParams:
|
|
225 |
ret = SetDynamicHscsdParams( aTsyReqHandle,
|
|
226 |
reinterpret_cast<RMobileCall::TMobileCallAiur*>(dataPtr),
|
|
227 |
reinterpret_cast<TInt*>(dataPtr2) );
|
|
228 |
break;
|
|
229 |
// Get Current HSCSD Call Information
|
|
230 |
case EMobileCallGetCurrentHscsdInfo:
|
|
231 |
ret = GetCurrentHscsdInfo( aTsyReqHandle, aPackage.Des1n() );
|
|
232 |
break;
|
|
233 |
// Notify Change of HSCSD Call Information
|
|
234 |
case EMobileCallNotifyHscsdInfoChange:
|
|
235 |
ret = NotifyHscsdInfoChange( aTsyReqHandle, aPackage.Des1n() );
|
|
236 |
break;
|
|
237 |
// Order to notify if privacy is confirmed
|
|
238 |
case EMobileCallNotifyPrivacyConfirmation:
|
|
239 |
ret = NotifyPrivacyConfirmation(
|
|
240 |
reinterpret_cast<RMobilePhone::TMobilePhonePrivacy*>(dataPtr) );
|
|
241 |
break;
|
|
242 |
// Dial a call ( DialNoFdnCheck )
|
|
243 |
case EMobileCallDialNoFdnCheck:
|
|
244 |
ret = DialNoFdnCheck( aTsyReqHandle, aPackage.Des1n(),
|
|
245 |
aPackage.Des2u() );
|
|
246 |
break;
|
|
247 |
// Unsupported features
|
|
248 |
case EMobileCallDialEmergencyCall:
|
|
249 |
case EMobileCallHold:
|
|
250 |
case EMobileCallResume:
|
|
251 |
case EMobileCallSwap:
|
|
252 |
case EMobileCallGoOneToOne:
|
|
253 |
|
|
254 |
case EMobileCallSwitchAlternatingCall:
|
|
255 |
case EMobileCallNotifyAlternatingCallSwitch:
|
|
256 |
case EMobileCallSetPrivacy:
|
|
257 |
case EMobileCallSetTrafficChannel:
|
|
258 |
case EMobileCallNotifyTrafficChannelConfirmation:
|
|
259 |
case EMobileCallGetUUSCaps:
|
|
260 |
case EMobileCallNotifyUUSCapsChange:
|
|
261 |
case EMobileCallActivateUUS:
|
|
262 |
case EMobileCallSendUUI:
|
|
263 |
case EMobileCallReceiveUUI:
|
|
264 |
case EMobileCallHangupWithUUI:
|
|
265 |
case EMobileCallAnswerWithUUI:
|
|
266 |
case EMobileCallNotifyVoiceFallback:
|
|
267 |
case EMobileCallDeflect:
|
|
268 |
case EMobileCallActivateCCBS:
|
|
269 |
case EMobileCallRejectCCBS:
|
|
270 |
default:
|
|
271 |
ret = KErrNotSupported;
|
|
272 |
break;
|
|
273 |
}
|
|
274 |
|
|
275 |
return ret;
|
|
276 |
}
|
|
277 |
|
|
278 |
// ---------------------------------------------------------------------------
|
|
279 |
// CMmDataCallTsy::ReqModeL
|
|
280 |
// ReqModeL is called from the ETel server's CTelObject::ReqAnalyserL in order
|
|
281 |
// to check the type of request it has.
|
|
282 |
// (other items were commented in a header).
|
|
283 |
// ---------------------------------------------------------------------------
|
|
284 |
//
|
|
285 |
CTelObject::TReqMode CMmDataCallTsy::ReqModeL(
|
|
286 |
const TInt aIpc )
|
|
287 |
{
|
|
288 |
TFLOGSTRING2("TSY: CMmDataCallTsy::ReqModeL - IPC: %d", aIpc);
|
|
289 |
|
|
290 |
CTelObject::TReqMode ret( 0 ); // default return value
|
|
291 |
|
|
292 |
switch ( aIpc )
|
|
293 |
{
|
|
294 |
// No Flow Control
|
|
295 |
// All disabled
|
|
296 |
// TSYs wishing to implement their own buffering algorithm will
|
|
297 |
// place all requests in this category.
|
|
298 |
// This category will also be used by the RecoverDataPort request
|
|
299 |
// that must be passed to the TSY to indicate that it may use
|
|
300 |
// the communications port after a loan.
|
|
301 |
|
|
302 |
// Get methods that do not use Licencee specific TSY and return
|
|
303 |
// immediately. Flow control not required.
|
|
304 |
case EEtelCallGetInfo:
|
|
305 |
case EEtelCallGetStatus:
|
|
306 |
case EEtelCallGetCaps:
|
|
307 |
case EEtelCallGetBearerServiceInfo:
|
|
308 |
case EEtelCallGetOwnershipStatus:
|
|
309 |
case EEtelCallGetCallParams:
|
|
310 |
case EEtelCallGetCallDuration:
|
|
311 |
case EEtelCallGetFaxSettings:
|
|
312 |
case EMobileCallGetMobileCallStatus:
|
|
313 |
case EMobileCallGetMobileCallInfo:
|
|
314 |
case EMobileCallGetMobileDataCallCaps:
|
|
315 |
case EMobileCallGetMobileCallCaps:
|
|
316 |
case EMobileCallGetCurrentHscsdInfo:
|
|
317 |
case EMobileCallGetMobileDataCallRLPRange:
|
|
318 |
case EMobileCallGetUUSCaps:
|
|
319 |
case EMobileCallActivateUUS:
|
|
320 |
case EMobileCallSendUUI:
|
|
321 |
case EMobileCallReceiveUUI:
|
|
322 |
case EMobileCallHangupWithUUI:
|
|
323 |
case EMobileCallAnswerWithUUI:
|
|
324 |
// Other methods that do not use Licencee specific TSY and return
|
|
325 |
// immediately.
|
|
326 |
// Flow control not required.
|
|
327 |
case EEtelCallAcquireOwnership:
|
|
328 |
case EEtelCallTransferOwnership:
|
|
329 |
case EEtelCallSetFaxSettings:
|
|
330 |
// Methods that can propably take a long time and cannot therefore be
|
|
331 |
// flow controlled. Solution: All these methods must check req handle
|
|
332 |
// table before handling the request. In case that the request table
|
|
333 |
// indicates that same method has been called and has not been
|
|
334 |
// completed, the method should return KErrServerBusy.
|
|
335 |
case EMobileCallTransfer:
|
|
336 |
// This is also included here due to the fact that Emergency call
|
|
337 |
// should never be blocked by flow control. KErrServerBusy returned
|
|
338 |
// when already already dialing.
|
|
339 |
case EMobileCallDialEmergencyCall:
|
|
340 |
// HangUp cannot be flow controlled. Client should for example be able
|
|
341 |
// to terminate a call while another call is e.g. in Dialling state.
|
|
342 |
case EEtelCallHangUp:
|
|
343 |
// Answer was mixed with Hangup. Therefore this is also No flow
|
|
344 |
// control type
|
|
345 |
case EEtelCallAnswer:
|
|
346 |
// dial is not flow controlled as compeltion may take a while and that
|
|
347 |
// blocks for example PS data activation in 3G while dialing.
|
|
348 |
case EEtelCallDial:
|
|
349 |
case EMobileCallDialNoFdnCheck:
|
|
350 |
break;
|
|
351 |
// Flow Controlled Services
|
|
352 |
// KReqModeFlowControlObeyed
|
|
353 |
// Commands that change the state of the phone, e.g. clearing the
|
|
354 |
// AoC counter; are commands that the TSY should only deal with
|
|
355 |
// one at a time.
|
|
356 |
|
|
357 |
//Voice call related methods that should be handled one at the time.
|
|
358 |
case EEtelCallConnect:
|
|
359 |
case EMobileCallHold:
|
|
360 |
case EMobileCallResume:
|
|
361 |
case EMobileCallSwap:
|
|
362 |
case EMobileCallDeflect:
|
|
363 |
case EMobileCallGoOneToOne:
|
|
364 |
//Data call related methods that should be handled one at the time.
|
|
365 |
case EEtelCallLoanDataPort:
|
|
366 |
case EEtelCallRecoverDataPort:
|
|
367 |
case EMobileCallSwitchAlternatingCall:
|
|
368 |
case EMobileCallSetDynamicHscsdParams:
|
|
369 |
case EMobileCallSetPrivacy:
|
|
370 |
case EMobileCallSetTrafficChannel:
|
|
371 |
ret = KReqModeFlowControlObeyed;
|
|
372 |
break;
|
|
373 |
// ReqModePostImmediately
|
|
374 |
// Requests that notify a client about a change of state, where
|
|
375 |
// the TSY needs to distinguish between different clients.
|
|
376 |
//ret=KReqModeRePostImmediately;
|
|
377 |
|
|
378 |
// KReqModeMultipleCompletionEnabled
|
|
379 |
// (a) commands that may take some time, but which the TSY can
|
|
380 |
// handle more than one of concurrently, or
|
|
381 |
// (b) notifications that the TSY does not wish to be re-posted
|
|
382 |
// immediately, so the server does no buffering.
|
|
383 |
//ret=KReqModeMultipleCompletionEnabled;
|
|
384 |
|
|
385 |
// KReqModeMultipleCompletionEnabled | KReqModeFlowControlObeyed
|
|
386 |
// A command that may take some time and which the TSY can only
|
|
387 |
// deal with one at a time.
|
|
388 |
//ret = KReqModeMultipleCompletionEnabled |
|
|
389 |
// KReqModeFlowControlObeyed;
|
|
390 |
//break;
|
|
391 |
|
|
392 |
// Notifications
|
|
393 |
// KReqModeMultipleCompletionEnabled | ReqModePostImmediately
|
|
394 |
// Requests that notify a client about a change of state.
|
|
395 |
// Since these requests do not require the issuing of any modem
|
|
396 |
// commands, they do not have to obey flow control.
|
|
397 |
// The TSY never gets more than one of these outstanding per
|
|
398 |
// CTelObject
|
|
399 |
case EEtelCallNotifyHookChange:
|
|
400 |
case EEtelCallNotifyStatusChange:
|
|
401 |
case EEtelCallNotifyDurationChange:
|
|
402 |
case EEtelCallCapsChangeNotification:
|
|
403 |
case EMobileCallNotifyCallEvent:
|
|
404 |
case EMobileCallNotifyMobileCallStatusChange:
|
|
405 |
case EMobileCallNotifyRemotePartyInfoChange:
|
|
406 |
case EMobileCallNotifyPrivacyConfirmation:
|
|
407 |
case EMobileCallNotifyTrafficChannelConfirmation:
|
|
408 |
case EMobileCallNotifyHscsdInfoChange:
|
|
409 |
case EMobileCallNotifyMobileDataCallCapsChange:
|
|
410 |
case EMobileCallNotifyAlternatingCallSwitch:
|
|
411 |
case EMobileCallNotifyMobileCallCapsChange:
|
|
412 |
case EMobileCallNotifyVoiceFallback:
|
|
413 |
case EMobileCallNotifyUUSCapsChange:
|
|
414 |
ret = KReqModeMultipleCompletionEnabled |
|
|
415 |
KReqModeRePostImmediately;
|
|
416 |
break;
|
|
417 |
// Cancel Requests
|
|
418 |
// It is not necessary to include the Cancel methods in ReqModeL.
|
|
419 |
// The ETel server never calls ReqModeL with a Cancel IPC.
|
|
420 |
|
|
421 |
// Other variations of return values are unusable
|
|
422 |
|
|
423 |
// Default: Call CCallBase's ReqModeL.
|
|
424 |
default:
|
|
425 |
//Direct the request to the CCallBase
|
|
426 |
ret = CCallBase::ReqModeL( aIpc );
|
|
427 |
break;
|
|
428 |
}
|
|
429 |
|
|
430 |
return ret;
|
|
431 |
}
|
|
432 |
|
|
433 |
// ---------------------------------------------------------------------------
|
|
434 |
// CMmDataCallTsy::NumberOfSlotsL
|
|
435 |
// NumberOfSlotsL is called by the server when it is registering a new
|
|
436 |
// NOTIFICATION. It enables the TSY to tell the server how many buffer slots
|
|
437 |
// to allocate for "repost immediately" notifications that may trigger before
|
|
438 |
// clients collect them.
|
|
439 |
// (other items were commented in a header).
|
|
440 |
// ---------------------------------------------------------------------------
|
|
441 |
//
|
|
442 |
TInt CMmDataCallTsy::NumberOfSlotsL(
|
|
443 |
const TInt aIpc )
|
|
444 |
{
|
|
445 |
// There is a buffer in the ETel server for each type of NOTIFICATION and
|
|
446 |
// the size of the buffer is determined by the TSY. When the ETel server
|
|
447 |
// discovers that a request is "repost immediately" it will ask the TSY
|
|
448 |
// how big a buffer it wants by calling CTelObject::NumberOfSlotsL( ).
|
|
449 |
//
|
|
450 |
// It is up to the TSY developer's judgement how many buffer slots this
|
|
451 |
// method returns for each notification. If there is a danger that
|
|
452 |
// a particular notification could trigger frequently and in rapid
|
|
453 |
// succession (e.g. call group change notification) then at least 10 or
|
|
454 |
// 20 slots may be required. For a notification that triggers rarely,
|
|
455 |
// perhaps 1 or 2 slots is enough.
|
|
456 |
//
|
|
457 |
// So if the ETel server has stored a few occurrences of a particular
|
|
458 |
// notification, when a client subsequently calls that notification
|
|
459 |
// request, the ETel server will complete the client's request with
|
|
460 |
// the saved data.
|
|
461 |
|
|
462 |
TInt numberOfSlots( 1 );
|
|
463 |
|
|
464 |
switch ( aIpc )
|
|
465 |
{
|
|
466 |
case EEtelCallNotifyHookChange:
|
|
467 |
numberOfSlots = KMmCallHookChangeSlots;
|
|
468 |
break;
|
|
469 |
case EEtelCallNotifyStatusChange:
|
|
470 |
numberOfSlots = KMmCallStatusChangeSlots;
|
|
471 |
break;
|
|
472 |
case EEtelCallNotifyDurationChange:
|
|
473 |
numberOfSlots = KMmCallDurationChangeSlots;
|
|
474 |
break;
|
|
475 |
case EEtelCallCapsChangeNotification:
|
|
476 |
numberOfSlots = KMmCallCapsChangeSlots;
|
|
477 |
break;
|
|
478 |
case EMobileCallNotifyCallEvent:
|
|
479 |
numberOfSlots = KMmCallCallEventSlots;
|
|
480 |
break;
|
|
481 |
case EMobileCallNotifyMobileCallStatusChange:
|
|
482 |
numberOfSlots = KMmCallMobileCallStatusChangeSlots;
|
|
483 |
break;
|
|
484 |
case EMobileCallNotifyRemotePartyInfoChange:
|
|
485 |
numberOfSlots = KMmCallRemotePartyInfoChangeSlots;
|
|
486 |
break;
|
|
487 |
case EMobileCallNotifyPrivacyConfirmation:
|
|
488 |
numberOfSlots = KMmCallPrivacyConfirmationSlots;
|
|
489 |
break;
|
|
490 |
case EMobileCallNotifyTrafficChannelConfirmation:
|
|
491 |
numberOfSlots = KMmCallTrafficChannelConfirmationSlots;
|
|
492 |
break;
|
|
493 |
case EMobileCallNotifyHscsdInfoChange:
|
|
494 |
numberOfSlots = KMmCallHscsdInfoChangeSlots;
|
|
495 |
break;
|
|
496 |
case EMobileCallNotifyMobileDataCallCapsChange:
|
|
497 |
numberOfSlots = KMmCallMobileDataCallCapsChangeSlots;
|
|
498 |
break;
|
|
499 |
case EMobileCallNotifyAlternatingCallSwitch:
|
|
500 |
numberOfSlots = KMmCallAlternatingCallSwitchSlots;
|
|
501 |
break;
|
|
502 |
case EMobileCallNotifyMobileCallCapsChange:
|
|
503 |
numberOfSlots = KMmCallMobileCallCapsChangeSlots;
|
|
504 |
break;
|
|
505 |
case EMobileCallNotifyVoiceFallback:
|
|
506 |
numberOfSlots = KMmCallVoiceFallbackSlots;
|
|
507 |
break;
|
|
508 |
case EMobileCallNotifyUUSCapsChange:
|
|
509 |
numberOfSlots = KMmCallUUSCapsChangeSlots;
|
|
510 |
break;
|
|
511 |
default:
|
|
512 |
// Unknown or invalid Call IPC
|
|
513 |
User::Leave( KErrNotSupported );
|
|
514 |
break;
|
|
515 |
}
|
|
516 |
|
|
517 |
return numberOfSlots;
|
|
518 |
}
|
|
519 |
|
|
520 |
// ---------------------------------------------------------------------------
|
|
521 |
// CMmDataCallTsy::CancelService
|
|
522 |
// CancelService is called by the ETel server when it is "cleaning-up" any
|
|
523 |
// still outstanding asynchronous requests before closing a client's
|
|
524 |
// sub-session. This will happen if a client closes its R-class handle without
|
|
525 |
// cancelling outstanding asynchronous requests. Only Mobile API requests are
|
|
526 |
// handled here.
|
|
527 |
// (other items were commented in a header).
|
|
528 |
// ---------------------------------------------------------------------------
|
|
529 |
//
|
|
530 |
TInt CMmDataCallTsy::CancelService(
|
|
531 |
const TInt aIpc,
|
|
532 |
const TTsyReqHandle aTsyReqHandle )
|
|
533 |
{
|
|
534 |
TFLOGSTRING3("TSY: CMmDataCallTsy::CancelService - IPC: %d, Req handle: %d",
|
|
535 |
aIpc, aTsyReqHandle);
|
|
536 |
|
|
537 |
TInt ret( KErrNone );
|
|
538 |
|
|
539 |
//When the clients close their sub-sessions (eg. by calling RPhone::Close)
|
|
540 |
//they may not have cancelled all their outstanding asynchronous requests
|
|
541 |
//before closing. It is up to the ETel server to clean up in this
|
|
542 |
//situation, so the server will find the list of outstanding requests
|
|
543 |
//related to that sub-session object and pass these outstanding IPC req
|
|
544 |
//numbers, one at a time, to the CancelService function in the TSY.
|
|
545 |
switch ( aIpc )
|
|
546 |
{
|
|
547 |
//TSY has started a request and it is not possible to then cancel this
|
|
548 |
//request. The best thing for the TSY to do in this case is to proceed
|
|
549 |
//as though the Cancel never happened. The server's call to the TSY
|
|
550 |
//cancel function will return synchronously. The TSY then continues to
|
|
551 |
//wait for the original acknowledgement and when it receives it,
|
|
552 |
//the TSY will complete the original request.
|
|
553 |
case EMobileCallSetDynamicHscsdParams:
|
|
554 |
case EMobileCallHold:
|
|
555 |
case EMobileCallResume:
|
|
556 |
case EMobileCallSwap:
|
|
557 |
case EMobileCallGoOneToOne:
|
|
558 |
case EMobileCallDeflect:
|
|
559 |
case EMobileCallTransfer:
|
|
560 |
case EMobileCallNotifyTrafficChannelConfirmation:
|
|
561 |
break;
|
|
562 |
//Cancel methods that are not supported
|
|
563 |
case EMobileCallDialEmergencyCall:
|
|
564 |
case EMobileCallSwitchAlternatingCall:
|
|
565 |
case EMobileCallNotifyAlternatingCallSwitch:
|
|
566 |
case EMobileCallGetMobileDataCallRLPRange:
|
|
567 |
case EMobileCallNotifyVoiceFallback:
|
|
568 |
case EMobileCallNotifyUUSCapsChange:
|
|
569 |
case EMobileCallActivateUUS:
|
|
570 |
case EMobileCallSendUUI:
|
|
571 |
case EMobileCallReceiveUUI:
|
|
572 |
case EMobileCallHangupWithUUI:
|
|
573 |
case EMobileCallAnswerWithUUI:
|
|
574 |
ret = KErrNotSupported;
|
|
575 |
break;
|
|
576 |
//Notification Cancels, no special requirements.
|
|
577 |
case EMobileCallNotifyMobileDataCallCapsChange:
|
|
578 |
ret = NotifyMobileDataCallCapsChangeCancel( aTsyReqHandle );
|
|
579 |
break;
|
|
580 |
case EMobileCallNotifyHscsdInfoChange:
|
|
581 |
ret = NotifyHscsdInfoChangeCancel( aTsyReqHandle );
|
|
582 |
break;
|
|
583 |
case EMobileCallNotifyMobileCallCapsChange:
|
|
584 |
ret = NotifyMobileCallCapsChangeCancel( aTsyReqHandle );
|
|
585 |
break;
|
|
586 |
case EMobileCallNotifyMobileCallStatusChange:
|
|
587 |
ret = NotifyMobileCallStatusChangeCancel( aTsyReqHandle );
|
|
588 |
break;
|
|
589 |
case EMobileCallNotifyCallEvent:
|
|
590 |
ret = NotifyCallEventCancel( aTsyReqHandle );
|
|
591 |
break;
|
|
592 |
case EMobileCallNotifyRemotePartyInfoChange:
|
|
593 |
ret = NotifyRemotePartyInfoChangeCancel( aTsyReqHandle );
|
|
594 |
break;
|
|
595 |
case EMobileCallNotifyPrivacyConfirmation:
|
|
596 |
ret = NotifyPrivacyConfirmationCancel( aTsyReqHandle );
|
|
597 |
break;
|
|
598 |
//Default case
|
|
599 |
default:
|
|
600 |
//call CCallBase
|
|
601 |
ret = CCallBase::CancelService( aIpc, aTsyReqHandle );
|
|
602 |
break;
|
|
603 |
}
|
|
604 |
|
|
605 |
return ret;
|
|
606 |
}
|
|
607 |
|
|
608 |
// ---------------------------------------------------------------------------
|
|
609 |
// CMmDataCallTsy::CompleteNotifyStatusChange
|
|
610 |
// Complete notification when status changes. If the new status requires, this
|
|
611 |
// method will ask call protocol extension to update it's status and
|
|
612 |
// capabilities and line owning this call to update it's status.
|
|
613 |
// (other items were commented in a header).
|
|
614 |
// ---------------------------------------------------------------------------
|
|
615 |
//
|
|
616 |
void CMmDataCallTsy::CompleteNotifyStatusChange(
|
|
617 |
TInt aResult,
|
|
618 |
CMmDataPackage* aDataPackage )
|
|
619 |
{
|
|
620 |
if ( iGhostCall )
|
|
621 |
{
|
|
622 |
HandleGhostCallStatusChange( aResult, aDataPackage );
|
|
623 |
}
|
|
624 |
else
|
|
625 |
{
|
|
626 |
TInt callIndex( 0 );
|
|
627 |
TInt extendedError(
|
|
628 |
CMmCommonStaticUtility::ExtendedErrorCode( aResult ) );
|
|
629 |
TInt ret( KErrNone );
|
|
630 |
TBool timerStarted( EFalse );
|
|
631 |
TBool statusChanged ( EFalse );
|
|
632 |
TBool mobileStatusChanged ( EFalse );
|
|
633 |
CMmDataCallTsy* mmCall = NULL;
|
|
634 |
RMobileCall::TMobileCallStatus callStatus( RMobileCall::EStatusIdle );
|
|
635 |
CCallDataPackage* callDataPackage =
|
|
636 |
reinterpret_cast<CCallDataPackage*>( aDataPackage );
|
|
637 |
|
|
638 |
callDataPackage->UnPackData( callStatus );
|
|
639 |
|
|
640 |
TFLOGSTRING2("TSY: CMmDataCallTsy::CompleteNotifyStatusChange - \
|
|
641 |
aResult: %d", aResult );
|
|
642 |
TFLOGSTRING3("TSY: CMmDataCallTsy::CompleteNotifyStatusChange - \
|
|
643 |
Call status: %d, Call name: %S", callStatus, &iCallName);
|
|
644 |
|
|
645 |
switch( callStatus )
|
|
646 |
{
|
|
647 |
case RMobileCall::EStatusIdle:
|
|
648 |
// stop the call duration timer
|
|
649 |
timerStarted = iCallTimer->Stop();
|
|
650 |
// Check air time timer only if call was in active state
|
|
651 |
// (call timer was started)
|
|
652 |
if ( timerStarted )
|
|
653 |
{
|
|
654 |
iMmPhone->AirTimeTimerCheckStop();
|
|
655 |
UpdateLifeTimer();
|
|
656 |
}
|
|
657 |
|
|
658 |
iCallStatus = RCall::EStatusIdle;
|
|
659 |
iMobileCallStatus = RMobileCall::EStatusIdle;
|
|
660 |
|
|
661 |
SetUnowned();
|
|
662 |
ClearCallStatus();
|
|
663 |
RecoverDataPort(0);
|
|
664 |
statusChanged = ETrue;
|
|
665 |
|
|
666 |
if ( KErrNone != aResult )
|
|
667 |
{
|
|
668 |
if ( KErrGsmReleaseByUser == aResult ||
|
|
669 |
KErrGsmBusyUserRequest == aResult )
|
|
670 |
{
|
|
671 |
// aResult must be KErrNone to indicate the client
|
|
672 |
// that HangUp has successfully completed
|
|
673 |
CompleteHangUp( KErrNone );
|
|
674 |
if ( this != iMmPhone->WaitingCallForData() )
|
|
675 |
{
|
|
676 |
CompleteAnswerIncomingCall(
|
|
677 |
KErrGsmBusyUserRequest );
|
|
678 |
}
|
|
679 |
}
|
|
680 |
else
|
|
681 |
{
|
|
682 |
// Set last exit code
|
|
683 |
iLastExitCode = aResult;
|
|
684 |
CompleteHangUp( aResult );
|
|
685 |
if ( this != iMmPhone->WaitingCallForData() )
|
|
686 |
{
|
|
687 |
CompleteAnswerIncomingCall( aResult );
|
|
688 |
}
|
|
689 |
}
|
|
690 |
CompleteDial( aResult );
|
|
691 |
CompleteDialNoFdn( aResult );
|
|
692 |
}
|
|
693 |
// Try to complete Dial and HangUp; If completes happens from
|
|
694 |
// here, something has gone wrong. Done to prevent TSY from
|
|
695 |
// hanging.
|
|
696 |
else
|
|
697 |
{
|
|
698 |
iLastExitCode = KErrGeneral;
|
|
699 |
TInt errorValue = CMmCommonStaticUtility::EpocErrorCode(
|
|
700 |
KErrNotReady, KErrNotFound );
|
|
701 |
CompleteDial( errorValue );
|
|
702 |
CompleteDialNoFdn( errorValue );
|
|
703 |
CompleteHangUp( errorValue );
|
|
704 |
if ( this != iMmPhone->WaitingCallForData() )
|
|
705 |
{
|
|
706 |
CompleteAnswerIncomingCall( errorValue );
|
|
707 |
}
|
|
708 |
}
|
|
709 |
// save last id. Required by Conference call implementation
|
|
710 |
SetPreviousCallId( iCallId );
|
|
711 |
// reset call id
|
|
712 |
iCallId = -1;
|
|
713 |
|
|
714 |
// reset caps.
|
|
715 |
iCallCaps.iFlags |=
|
|
716 |
RCall::KCapsDial | RCall::KCapsConnect;
|
|
717 |
iCallCaps.iFlags &= ~( RCall::KCapsAnswer );
|
|
718 |
|
|
719 |
// Check if KCapsHangup or dataport caps still exists
|
|
720 |
// If it does, remove and complete notification.
|
|
721 |
if ( ( RCall::KCapsHangUp ==
|
|
722 |
( iCallCaps.iFlags & RCall::KCapsHangUp ) ) ||
|
|
723 |
( RCall::KCapsLoanDataPort ==
|
|
724 |
( iCallCaps.iFlags & RCall::KCapsLoanDataPort ) ) ||
|
|
725 |
( RCall::KCapsRecoverDataPort ==
|
|
726 |
( iCallCaps.iFlags & RCall::KCapsRecoverDataPort) ) )
|
|
727 |
{
|
|
728 |
iCallCaps.iFlags &= ~(
|
|
729 |
RCall::KCapsHangUp |
|
|
730 |
RCall::KCapsLoanDataPort |
|
|
731 |
RCall::KCapsRecoverDataPort );
|
|
732 |
CompleteNotifyCapsChange();
|
|
733 |
}
|
|
734 |
|
|
735 |
// Call Transfer handling
|
|
736 |
if ( ServiceRequested( EMultimodeCallTransfer ) )
|
|
737 |
{
|
|
738 |
// Complete Transfer
|
|
739 |
CompleteTransfer( KErrNone );
|
|
740 |
}
|
|
741 |
break;
|
|
742 |
// End of case KCallStatusIdle
|
|
743 |
case RMobileCall::EStatusDialling:
|
|
744 |
#ifdef REQHANDLE_TIMER
|
|
745 |
iTsyReqHandleStore->StopTimeout( EMultimodeCallDial );
|
|
746 |
iTsyReqHandleStore->StopTimeout(
|
|
747 |
EMultimodeCallDialNoFdnCheck );
|
|
748 |
#endif
|
|
749 |
iCallStatus = RCall::EStatusDialling;
|
|
750 |
iMobileCallStatus = RMobileCall::EStatusDialling;
|
|
751 |
statusChanged = ETrue;
|
|
752 |
if ( iDialCancelFlag != CMmCallTsy::EDialCancelNotCalled )
|
|
753 |
{
|
|
754 |
TTsyReqHandle dialCancelHandle =
|
|
755 |
iTsyReqHandleStore->GetTsyReqHandle(
|
|
756 |
EMultimodeCallDial );
|
|
757 |
TTsyReqHandle dialCancelHandleNoFdn =
|
|
758 |
iTsyReqHandleStore->GetTsyReqHandle(
|
|
759 |
EMultimodeCallDialNoFdnCheck );
|
|
760 |
|
|
761 |
if ( 0 < dialCancelHandle )
|
|
762 |
{
|
|
763 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteNotifyStatusChange. - HangUp - EMultimodeCallDial");
|
|
764 |
HangUp( dialCancelHandle );
|
|
765 |
}
|
|
766 |
else if ( 0 < dialCancelHandleNoFdn )
|
|
767 |
{
|
|
768 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteNotifyStatusChange. - HangUp - EMultimodeCallDialNoFdnCheck");
|
|
769 |
HangUp( dialCancelHandleNoFdn );
|
|
770 |
}
|
|
771 |
else
|
|
772 |
{
|
|
773 |
iDialCancelFlag = CMmCallTsy::EDialCancelNotCalled;
|
|
774 |
}
|
|
775 |
}
|
|
776 |
break;
|
|
777 |
case RMobileCall::EStatusConnecting:
|
|
778 |
iCallStatus = RCall::EStatusConnecting;
|
|
779 |
iMobileCallStatus = RMobileCall::EStatusConnecting;
|
|
780 |
statusChanged = ETrue;
|
|
781 |
break;
|
|
782 |
case RMobileCall::EStatusRinging:
|
|
783 |
iCallStatus = RCall::EStatusRinging;
|
|
784 |
iMobileCallStatus = RMobileCall::EStatusRinging;
|
|
785 |
statusChanged = ETrue;
|
|
786 |
|
|
787 |
// Set caps.
|
|
788 |
iCallCaps.iFlags &= ~(
|
|
789 |
RCall::KCapsDial | RCall::KCapsConnect );
|
|
790 |
|
|
791 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
792 |
if ( ( NULL == iMmPhone->CallList()->GetMmCallByStatus(
|
|
793 |
RMobileCall::EStatusConnected ) ) &&
|
|
794 |
( NULL == iMmPhone->CallList()->GetMmCallByStatus(
|
|
795 |
RMobileCall::EStatusHold ) ) )
|
|
796 |
{
|
|
797 |
iCallCaps.iFlags |= RCall::KCapsAnswer;
|
|
798 |
}
|
|
799 |
//complete caps change notification
|
|
800 |
CompleteNotifyCapsChange();
|
|
801 |
|
|
802 |
// Check if the call is for Call Back functionality.
|
|
803 |
// E.g. client has dialled server, which calls back to
|
|
804 |
// save user the data call charging.
|
|
805 |
TFLOGSTRING("TSY: CMmDataCallTsy::Check for waiting call");
|
|
806 |
if ( this == iMmPhone->WaitingCallForData() )
|
|
807 |
{
|
|
808 |
// Client has already tried to answer the incoming
|
|
809 |
// call, so do it now
|
|
810 |
CallComingForWaitingCall();
|
|
811 |
}
|
|
812 |
break;
|
|
813 |
case RMobileCall::EStatusAnswering:
|
|
814 |
// Set caps
|
|
815 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
816 |
iCallCaps.iFlags &= ~(
|
|
817 |
RCall::KCapsDial |
|
|
818 |
RCall::KCapsAnswer );
|
|
819 |
|
|
820 |
|
|
821 |
iCallStatus = RCall::EStatusAnswering;
|
|
822 |
iMobileCallStatus = RMobileCall::EStatusAnswering;
|
|
823 |
statusChanged = ETrue;
|
|
824 |
break;
|
|
825 |
case RMobileCall::EStatusConnected:
|
|
826 |
if ( KErrMMEtelCallForbidden == aResult )
|
|
827 |
{
|
|
828 |
CMmCallList* callList = iMmPhone->CallList();
|
|
829 |
|
|
830 |
for( TInt i=0; i< callList->GetNumberOfObjects();i++)
|
|
831 |
{
|
|
832 |
CMmDataCallTsy* call =
|
|
833 |
reinterpret_cast<CMmDataCallTsy*>(
|
|
834 |
iMmPhone->CallList()->GetMmCallByIndex( i ) );
|
|
835 |
|
|
836 |
// if there is call with status Answering, complete
|
|
837 |
// it with CALL_CAUSE_NOT_ALLOWED
|
|
838 |
if( RCall::EStatusAnswering == call->Status() )
|
|
839 |
{
|
|
840 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteNotifyStatusChange Answering not allowed!");
|
|
841 |
TInt errorValue =
|
|
842 |
CMmCommonStaticUtility::EpocErrorCode(
|
|
843 |
KErrAccessDenied, KErrMMEtelCallForbidden );
|
|
844 |
call->CompleteAnswerIncomingCall( errorValue );
|
|
845 |
}
|
|
846 |
}
|
|
847 |
}
|
|
848 |
// check previous status. If status is answering
|
|
849 |
if ( RCall::EStatusAnswering == iCallStatus )
|
|
850 |
{
|
|
851 |
// don't start timers if error occurred
|
|
852 |
if ( KErrNone == aResult )
|
|
853 |
{
|
|
854 |
//Start call duration monitoring
|
|
855 |
iCallTimer->Start();
|
|
856 |
//Check if start the air time duration monitoring
|
|
857 |
iMmPhone->AirTimeTimerCheckStart();
|
|
858 |
}
|
|
859 |
|
|
860 |
}
|
|
861 |
// If it was connecting and dial cancel has not been activated
|
|
862 |
else if ( ( iCallStatus == RCall::EStatusConnecting ||
|
|
863 |
iCallStatus == RCall::EStatusDialling ) &&
|
|
864 |
CMmCallTsy::EDialCancelNotCalled == iDialCancelFlag )
|
|
865 |
{
|
|
866 |
// Start call duration monitoring
|
|
867 |
iCallTimer->Start();
|
|
868 |
// start air time duration monitoring
|
|
869 |
iMmPhone->AirTimeTimerCheckStart();
|
|
870 |
}
|
|
871 |
|
|
872 |
// Don't update status if it has not changed.
|
|
873 |
if ( RCall::EStatusConnected != iCallStatus ||
|
|
874 |
RMobileCall::EStatusConnected != iMobileCallStatus )
|
|
875 |
{
|
|
876 |
iCallStatus = RCall::EStatusConnected;
|
|
877 |
iMobileCallStatus = RMobileCall::EStatusConnected;
|
|
878 |
statusChanged = ETrue;
|
|
879 |
}
|
|
880 |
break;
|
|
881 |
case RMobileCall::EStatusDisconnecting:
|
|
882 |
// When call is released, this call object becomes "used".
|
|
883 |
// Thus set iIsFinishedDataCall to ETrue.
|
|
884 |
iIsFinishedDataCall = ETrue;
|
|
885 |
|
|
886 |
// Core status
|
|
887 |
iCallStatus = RCall::EStatusHangingUp;
|
|
888 |
statusChanged = ETrue;
|
|
889 |
// Mobile status
|
|
890 |
iMobileCallStatus = RMobileCall::EStatusDisconnecting;
|
|
891 |
mobileStatusChanged = ETrue;
|
|
892 |
|
|
893 |
if ( iCallDirection == RMobileCall::EMobileTerminated )
|
|
894 |
{
|
|
895 |
// CompleteDial in case remote user is busy
|
|
896 |
CompleteDial( aResult );
|
|
897 |
CompleteDialNoFdn( aResult );
|
|
898 |
}
|
|
899 |
|
|
900 |
// Set last exit code
|
|
901 |
if ( KErrGsmReleaseByUser == aResult ||
|
|
902 |
KErrGsmBusyUserRequest == aResult ||
|
|
903 |
KErrGsmCCNormalUnspecified == extendedError ||
|
|
904 |
KErrNone == aResult )
|
|
905 |
{
|
|
906 |
iLastExitCode = KErrNone;
|
|
907 |
}
|
|
908 |
else
|
|
909 |
{
|
|
910 |
// set last exit code
|
|
911 |
iLastExitCode = aResult;
|
|
912 |
}
|
|
913 |
|
|
914 |
// reset caps.
|
|
915 |
if ( RCall::KCapsLoanDataPort ==
|
|
916 |
( iCallCaps.iFlags & RCall::KCapsLoanDataPort ) )
|
|
917 |
{
|
|
918 |
iCallCaps.iFlags &= ~( RCall::KCapsLoanDataPort );
|
|
919 |
CompleteNotifyCapsChange();
|
|
920 |
}
|
|
921 |
break;
|
|
922 |
case RMobileCall::EStatusDisconnectingWithInband:
|
|
923 |
// When call is released, this call object becomes "used".
|
|
924 |
// Thus set iIsFinishedDataCall to ETrue.
|
|
925 |
iIsFinishedDataCall = ETrue;
|
|
926 |
// Core status
|
|
927 |
iCallStatus = RCall::EStatusHangingUp;
|
|
928 |
statusChanged = ETrue;
|
|
929 |
// Mobile status
|
|
930 |
iMobileCallStatus =
|
|
931 |
RMobileCall::EStatusDisconnectingWithInband;
|
|
932 |
mobileStatusChanged = ETrue;
|
|
933 |
// CompleteDial in case remote user is busy
|
|
934 |
CompleteDial( aResult );
|
|
935 |
CompleteDialNoFdn( aResult );
|
|
936 |
// Set last exit code
|
|
937 |
if ( KErrGsmReleaseByUser == aResult ||
|
|
938 |
KErrGsmBusyUserRequest == aResult ||
|
|
939 |
KErrGsmCCNormalUnspecified == extendedError ||
|
|
940 |
KErrNone == aResult )
|
|
941 |
{
|
|
942 |
iLastExitCode = KErrNone;
|
|
943 |
}
|
|
944 |
else
|
|
945 |
{
|
|
946 |
// set last exit code
|
|
947 |
iLastExitCode = aResult;
|
|
948 |
}
|
|
949 |
|
|
950 |
//reset caps.
|
|
951 |
if ( RCall::KCapsLoanDataPort ==
|
|
952 |
( iCallCaps.iFlags & RCall::KCapsLoanDataPort ) )
|
|
953 |
{
|
|
954 |
iCallCaps.iFlags &= ~( RCall::KCapsLoanDataPort );
|
|
955 |
CompleteNotifyCapsChange();
|
|
956 |
}
|
|
957 |
break;
|
|
958 |
case RMobileCall::EStatusHold:
|
|
959 |
case RMobileCall::EStatusUnknown:
|
|
960 |
case RMobileCall::EStatusReconnectPending:
|
|
961 |
case RMobileCall::EStatusWaitingAlternatingCallSwitch:
|
|
962 |
case RMobileCall::EStatusTransferring:
|
|
963 |
case RMobileCall::EStatusTransferAlerting:
|
|
964 |
default:
|
|
965 |
// nothing to do
|
|
966 |
break;
|
|
967 |
}
|
|
968 |
|
|
969 |
//reset req handle. Returns the deleted req handle
|
|
970 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
971 |
EMultimodeCallNotifyStatusChange );
|
|
972 |
|
|
973 |
if ( ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
974 |
&& statusChanged )
|
|
975 |
{
|
|
976 |
*iRetStatus = iCallStatus;
|
|
977 |
//reset req handle.
|
|
978 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
979 |
EMultimodeCallNotifyStatusChange );
|
|
980 |
|
|
981 |
ReqCompleted( reqHandle, ret );
|
|
982 |
}
|
|
983 |
|
|
984 |
// reset req handle. Returns the deleted req handle
|
|
985 |
reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
986 |
EMultimodeCallNotifyMobileCallStatusChange );
|
|
987 |
|
|
988 |
if ( ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
989 |
&& (statusChanged || mobileStatusChanged) )
|
|
990 |
{
|
|
991 |
*iRetMobileCallStatus = iMobileCallStatus;
|
|
992 |
// reset req handle.
|
|
993 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
994 |
EMultimodeCallNotifyMobileCallStatusChange );
|
|
995 |
ReqCompleted( reqHandle, ret );
|
|
996 |
}
|
|
997 |
|
|
998 |
// Update also line's status
|
|
999 |
if ( statusChanged || mobileStatusChanged )
|
|
1000 |
{
|
|
1001 |
iMmLine->CompleteNotifyStatusChange();
|
|
1002 |
}
|
|
1003 |
|
|
1004 |
// Inform extension dll about the current status. Enables dynamic
|
|
1005 |
// capability updates. Must be done before Notifying caps change
|
|
1006 |
if ( KErrNone == iMmCallExtInterface->
|
|
1007 |
CompleteNotifyStatusChange( iMobileCallStatus ) )
|
|
1008 |
{
|
|
1009 |
CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
1010 |
CompleteNotifyMobileDataCallCapsChange();
|
|
1011 |
}
|
|
1012 |
|
|
1013 |
mmCall = reinterpret_cast<CMmDataCallTsy*>(
|
|
1014 |
iMmPhone->CallList()->GetMmCallByIndex( callIndex ) );
|
|
1015 |
while ( mmCall )
|
|
1016 |
{
|
|
1017 |
if ( RMobileCall::EStatusIdle != mmCall->MobileCallStatus() &&
|
|
1018 |
this != mmCall )
|
|
1019 |
{
|
|
1020 |
if ( KErrNone ==
|
|
1021 |
mmCall->ActiveCallExtension()->
|
|
1022 |
CompleteNotifyStatusChange( mmCall->MobileCallStatus() ) )
|
|
1023 |
{
|
|
1024 |
mmCall->CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
1025 |
mmCall->CompleteNotifyMobileDataCallCapsChange();
|
|
1026 |
}
|
|
1027 |
}
|
|
1028 |
callIndex++;
|
|
1029 |
mmCall = reinterpret_cast<CMmDataCallTsy*>(
|
|
1030 |
iMmPhone->CallList()->GetMmCallByIndex( callIndex ) );
|
|
1031 |
}
|
|
1032 |
}
|
|
1033 |
}
|
|
1034 |
|
|
1035 |
// ---------------------------------------------------------------------------
|
|
1036 |
// CMmDataCallTsy::Dial
|
|
1037 |
// This CORE API method dials to the given number.
|
|
1038 |
// (other items were commented in a header).
|
|
1039 |
// ---------------------------------------------------------------------------
|
|
1040 |
//
|
|
1041 |
TInt CMmDataCallTsy::Dial(
|
|
1042 |
const TTsyReqHandle aTsyReqHandle,
|
|
1043 |
const TDesC8* aCallParams,
|
|
1044 |
TDesC* aTelNumber )
|
|
1045 |
{
|
|
1046 |
TFLOGSTRING3("TSY: CMmDataCallTsy::Dial - Req handle: %d, Call name: %S",
|
|
1047 |
aTsyReqHandle, &iCallName);
|
|
1048 |
|
|
1049 |
if( aCallParams->Length()!= 0)
|
|
1050 |
{
|
|
1051 |
if(sizeof(RCall::TCallParams) > aCallParams->Length())
|
|
1052 |
{
|
|
1053 |
TFLOGSTRING ("TSY: CMmDataCallTsy::Dial bad size argument");
|
|
1054 |
// Complete the request with appropiate error
|
|
1055 |
return KErrArgument;
|
|
1056 |
}
|
|
1057 |
}
|
|
1058 |
CMmCallList* callList = iMmPhone->CallList();
|
|
1059 |
TBool dialFlag( EFalse );
|
|
1060 |
|
|
1061 |
for(TInt i=0; i< callList->GetNumberOfObjects();i++)
|
|
1062 |
{
|
|
1063 |
CMmCallTsy* call = callList->GetMmCallByIndex( i );
|
|
1064 |
if( call->GetDialFlag() )
|
|
1065 |
{
|
|
1066 |
dialFlag = ETrue;
|
|
1067 |
i= callList->GetNumberOfObjects();
|
|
1068 |
}
|
|
1069 |
}
|
|
1070 |
|
|
1071 |
if(!dialFlag )
|
|
1072 |
{
|
|
1073 |
TFLOGSTRING("TSY: CMmDataCallTsy::Dial ONGOING" );
|
|
1074 |
SetDialFlag( ETrue );
|
|
1075 |
TTsyReqHandle dialHandle =
|
|
1076 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallDial );
|
|
1077 |
|
|
1078 |
// reset exit code
|
|
1079 |
iLastExitCode = KErrNone;
|
|
1080 |
|
|
1081 |
// reset finished data call flag
|
|
1082 |
iIsFinishedDataCall = EFalse;
|
|
1083 |
|
|
1084 |
if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo() )
|
|
1085 |
{
|
|
1086 |
TFLOGSTRING("TSY: Offline mode ON, Dial request is not allowed" );
|
|
1087 |
TInt ret = CMmCommonStaticUtility::EpocErrorCode(
|
|
1088 |
KErrGeneral, KErrGsmOfflineOpNotAllowed );
|
|
1089 |
|
|
1090 |
// Complete the request with appropiate error
|
|
1091 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
1092 |
}
|
|
1093 |
|
|
1094 |
// check that status is Idle
|
|
1095 |
else if ( RMobileCall::EStatusIdle != iMobileCallStatus )
|
|
1096 |
{
|
|
1097 |
// The request cannot be forwarded since this call object
|
|
1098 |
// is still in use.
|
|
1099 |
// Complete request with status value informing the client
|
|
1100 |
// about the situation.
|
|
1101 |
TFLOGSTRING("TSY: CMmDataCallTsy::Dial - KErrNotReady");
|
|
1102 |
ReqCompleted( aTsyReqHandle, KErrNotReady );
|
|
1103 |
}
|
|
1104 |
else if ( 0 < dialHandle )
|
|
1105 |
{
|
|
1106 |
// The request is already in processing because of previous request
|
|
1107 |
// Complete request with status value informing the client about
|
|
1108 |
// the situation.
|
|
1109 |
TFLOGSTRING("TSY: CMmDataCallTsy::Dial - KErrServerBusy");
|
|
1110 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
1111 |
}
|
|
1112 |
else
|
|
1113 |
{
|
|
1114 |
|
|
1115 |
TInt ret( KErrNone );
|
|
1116 |
TInt trapError( KErrNone );
|
|
1117 |
TCallOwnership ownerShip = EOwnedFalse;
|
|
1118 |
|
|
1119 |
if(aCallParams->Length() >0)
|
|
1120 |
{
|
|
1121 |
RCall::TCallParamsPckg* paramsPckg = reinterpret_cast<RCall::TCallParamsPckg*>(
|
|
1122 |
const_cast<TDesC8*>( aCallParams ) );
|
|
1123 |
RCall::TCallParams& params = ( *paramsPckg )();
|
|
1124 |
|
|
1125 |
// save call params
|
|
1126 |
iCallParams.iSpeakerControl = params.iSpeakerControl;
|
|
1127 |
iCallParams.iSpeakerVolume = params.iSpeakerVolume;
|
|
1128 |
iCallParams.iInterval = params.iInterval;
|
|
1129 |
iCallParams.iWaitForDialTone = params.iWaitForDialTone;
|
|
1130 |
}
|
|
1131 |
else
|
|
1132 |
{
|
|
1133 |
iCallParams.iSpeakerControl = RCall::EMonitorSpeakerControlAlwaysOff;
|
|
1134 |
iCallParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeOff;
|
|
1135 |
iCallParams.iInterval = 0;
|
|
1136 |
iCallParams.iWaitForDialTone = RCall::EDialToneWait;
|
|
1137 |
}
|
|
1138 |
|
|
1139 |
// set call direction
|
|
1140 |
iCallDirection = RMobileCall::EMobileOriginated;
|
|
1141 |
|
|
1142 |
// Check if there already is an active or connecting call
|
|
1143 |
TInt numberOfObjects = iMmPhone->CallList()->
|
|
1144 |
GetNumberOfObjects();
|
|
1145 |
for ( TInt i = 0; i < numberOfObjects; i++ )
|
|
1146 |
{
|
|
1147 |
CMmDataCallTsy* mmCall = reinterpret_cast<CMmDataCallTsy*>(
|
|
1148 |
iMmPhone->CallList()->GetMmCallByIndex( i ) );
|
|
1149 |
if ( !( RMobileCall::EStatusUnknown ==
|
|
1150 |
mmCall->MobileCallStatus() ||
|
|
1151 |
RMobileCall::EStatusIdle ==
|
|
1152 |
mmCall->MobileCallStatus() ||
|
|
1153 |
RMobileCall::EStatusDisconnecting ==
|
|
1154 |
mmCall->MobileCallStatus() ||
|
|
1155 |
RMobileCall::EStatusDisconnectingWithInband ==
|
|
1156 |
mmCall->MobileCallStatus() ) )
|
|
1157 |
{
|
|
1158 |
ret = KErrEtelCallAlreadyActive;
|
|
1159 |
break;
|
|
1160 |
}
|
|
1161 |
}
|
|
1162 |
|
|
1163 |
// Return value can also be priorityclient!
|
|
1164 |
ownerShip = CheckOwnership( aTsyReqHandle );
|
|
1165 |
|
|
1166 |
if ( KErrNone == ret && ( EOwnedUnowned == ownerShip ||
|
|
1167 |
EOwnedPriorityClient == ownerShip ) )
|
|
1168 |
{
|
|
1169 |
SetOwnership( aTsyReqHandle );
|
|
1170 |
|
|
1171 |
if ( KErrNone == ret )
|
|
1172 |
{
|
|
1173 |
TFLOGSTRING("TSY: CMmDataCallTsy::Dial - DialDataCall");
|
|
1174 |
TRAP( trapError,
|
|
1175 |
ret = iMmCallExtInterface->DialDataCallL(
|
|
1176 |
iCallMode, aCallParams, aTelNumber );
|
|
1177 |
);
|
|
1178 |
if ( KErrNone != trapError )
|
|
1179 |
{
|
|
1180 |
//error handling. DialDataCall() leaved.
|
|
1181 |
ret = trapError;
|
|
1182 |
}
|
|
1183 |
// If dial succeeded, continue
|
|
1184 |
if ( KErrNone == ret )
|
|
1185 |
{
|
|
1186 |
RPhone::TStatus modemStatus;
|
|
1187 |
modemStatus.iModemDetected = RPhone::EDetectedPresent;
|
|
1188 |
modemStatus.iMode = RPhone::EModeEstablishingLink;
|
|
1189 |
iMmPhone->CompleteNotifyModemDetected( modemStatus );
|
|
1190 |
|
|
1191 |
//update core status
|
|
1192 |
iCallCaps.iFlags &= ~(
|
|
1193 |
RCall::KCapsDial | RCall::KCapsConnect );
|
|
1194 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
1195 |
//complete core caps change
|
|
1196 |
CompleteNotifyCapsChange();
|
|
1197 |
}
|
|
1198 |
}
|
|
1199 |
}
|
|
1200 |
|
|
1201 |
if ( KErrNone != ret )
|
|
1202 |
{
|
|
1203 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1204 |
ClearCallStatus();
|
|
1205 |
}
|
|
1206 |
else
|
|
1207 |
{
|
|
1208 |
#ifdef REQHANDLE_TIMER
|
|
1209 |
// set timer for the request
|
|
1210 |
SetTypeOfResponse( EMultimodeCallDial, aTsyReqHandle );
|
|
1211 |
#else
|
|
1212 |
// set timer
|
|
1213 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
1214 |
EMultimodeCallDial, aTsyReqHandle );
|
|
1215 |
#endif
|
|
1216 |
}
|
|
1217 |
}
|
|
1218 |
|
|
1219 |
return KErrNone;
|
|
1220 |
}
|
|
1221 |
else
|
|
1222 |
return KErrServerBusy;
|
|
1223 |
}
|
|
1224 |
|
|
1225 |
// ---------------------------------------------------------------------------
|
|
1226 |
// CMmDataCallTsy::CompleteDial
|
|
1227 |
// Completes a Dial request.
|
|
1228 |
// (other items were commented in a header).
|
|
1229 |
// ---------------------------------------------------------------------------
|
|
1230 |
//
|
|
1231 |
void CMmDataCallTsy::CompleteDial(
|
|
1232 |
TInt aResult )
|
|
1233 |
{
|
|
1234 |
TFLOGSTRING2("TSY: CMmDataCallTsy::CompleteDial - Result: %d", aResult );
|
|
1235 |
TFLOGSTRING3("TSY: CMmDataCallTsy::CompleteDial - Call Id: %d, Call name: %S",
|
|
1236 |
iCallId, &iCallName);
|
|
1237 |
|
|
1238 |
// Set dial flag to false
|
|
1239 |
SetDialFlag( EFalse );
|
|
1240 |
|
|
1241 |
// reset req handle. Returns the deleted req handle
|
|
1242 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1243 |
EMultimodeCallDial );
|
|
1244 |
|
|
1245 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
1246 |
{
|
|
1247 |
if ( aResult != KErrNone )
|
|
1248 |
{
|
|
1249 |
// The creation has failed.
|
|
1250 |
iLastExitCode = aResult;
|
|
1251 |
ClearCallStatus();
|
|
1252 |
|
|
1253 |
//Dial has failed, update core status - dial possible again
|
|
1254 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
1255 |
iCallCaps.iFlags &= ~( RCall::KCapsHangUp );
|
|
1256 |
|
|
1257 |
//complete caps change notification
|
|
1258 |
CompleteNotifyCapsChange();
|
|
1259 |
}
|
|
1260 |
|
|
1261 |
ReqCompleted( reqHandle, aResult );
|
|
1262 |
|
|
1263 |
}
|
|
1264 |
|
|
1265 |
// Set also new call caps to enable dataport loaning!
|
|
1266 |
if ( RCall::EStatusConnected == iCallStatus &&
|
|
1267 |
KErrNone == aResult )
|
|
1268 |
{
|
|
1269 |
iCallCaps.iFlags |= RCall::KCapsLoanDataPort;
|
|
1270 |
iMmCallExtInterface->AddGSMCallCaps(
|
|
1271 |
RCall::KCapsLoanDataPort );
|
|
1272 |
|
|
1273 |
//complete caps change notification
|
|
1274 |
CompleteNotifyCapsChange();
|
|
1275 |
CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
1276 |
}
|
|
1277 |
}
|
|
1278 |
|
|
1279 |
// ---------------------------------------------------------------------------
|
|
1280 |
// CMmDataCallTsy::AnswerIncomingCall
|
|
1281 |
// This CORE API method is used for answering to an incoming call.
|
|
1282 |
// (other items were commented in a header).
|
|
1283 |
// ---------------------------------------------------------------------------
|
|
1284 |
//
|
|
1285 |
TInt CMmDataCallTsy::AnswerIncomingCall(
|
|
1286 |
const TTsyReqHandle aTsyReqHandle,
|
|
1287 |
const TDesC8* )
|
|
1288 |
{
|
|
1289 |
TFLOGSTRING2("TSY: CMmDataCallTsy::AnswerIncomingCall. \n\t\t\t Handle: %d",
|
|
1290 |
aTsyReqHandle);
|
|
1291 |
|
|
1292 |
TTsyReqHandle answerCallHandle =
|
|
1293 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallAnswer );
|
|
1294 |
|
|
1295 |
if ( 0 < answerCallHandle )
|
|
1296 |
{
|
|
1297 |
//The request is already in processing because of previous request
|
|
1298 |
//Complete request with status value informing the client about
|
|
1299 |
//the situation.
|
|
1300 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
1301 |
}
|
|
1302 |
else
|
|
1303 |
{
|
|
1304 |
TInt ret( KErrNone );
|
|
1305 |
//call object is under use again
|
|
1306 |
iIsFinishedDataCall = EFalse;
|
|
1307 |
//reset exit code
|
|
1308 |
iLastExitCode = KErrNone;
|
|
1309 |
|
|
1310 |
if ( EOwnedUnowned == CheckOwnership( aTsyReqHandle ) )
|
|
1311 |
{
|
|
1312 |
// If Answering is allowed (KCapsAnswer is set) or
|
|
1313 |
// if automatic answer is to be enabled (call status idle)
|
|
1314 |
if ( iCallCaps.iFlags & RCall::KCapsAnswer ||
|
|
1315 |
RCall::EStatusIdle == iCallStatus )
|
|
1316 |
{
|
|
1317 |
SetOwnership( aTsyReqHandle );
|
|
1318 |
|
|
1319 |
if ( KErrNone == ret )
|
|
1320 |
{
|
|
1321 |
//Answer incoming call
|
|
1322 |
TRAPD( trapError,
|
|
1323 |
ret = iMmCallExtInterface->
|
|
1324 |
AnswerIncomingDataCallL( iCallId );
|
|
1325 |
);
|
|
1326 |
|
|
1327 |
if ( KErrNone != trapError )
|
|
1328 |
{
|
|
1329 |
//error handling. Object cannot be created.
|
|
1330 |
ret = trapError;
|
|
1331 |
}
|
|
1332 |
|
|
1333 |
if ( KErrNone == ret )
|
|
1334 |
{
|
|
1335 |
//Remove answering, dialing and connecting
|
|
1336 |
//capabilities
|
|
1337 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
1338 |
iCallCaps.iFlags &= ~( RCall::KCapsAnswer |
|
|
1339 |
RCall::KCapsDial | RCall::KCapsConnect );
|
|
1340 |
CompleteNotifyCapsChange();
|
|
1341 |
}
|
|
1342 |
}
|
|
1343 |
}
|
|
1344 |
else
|
|
1345 |
{
|
|
1346 |
ret = KErrNotReady;
|
|
1347 |
}
|
|
1348 |
}
|
|
1349 |
else if ( EOwnedTrue == CheckOwnership( aTsyReqHandle ) ||
|
|
1350 |
EOwnedPriorityClient == CheckOwnership( aTsyReqHandle ) )
|
|
1351 |
{
|
|
1352 |
// SOS architechture Call Back functionality tries to answer
|
|
1353 |
// incoming call even before the current MO call is fully
|
|
1354 |
// released. So, save pointer to this CMmDataCallTsy object
|
|
1355 |
// into CMmPhoneTsy.
|
|
1356 |
iMmPhone->SetWaitingCallForData( this );
|
|
1357 |
//Remove answering, dialing and connecting capabilities.
|
|
1358 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
1359 |
iCallCaps.iFlags &= ~(
|
|
1360 |
RCall::KCapsAnswer | RCall::KCapsDial | RCall::KCapsConnect );
|
|
1361 |
CompleteNotifyCapsChange();
|
|
1362 |
}
|
|
1363 |
// Else return error
|
|
1364 |
else
|
|
1365 |
{
|
|
1366 |
ret = KErrEtelNotCallOwner;
|
|
1367 |
}
|
|
1368 |
|
|
1369 |
//error handling
|
|
1370 |
if ( KErrNone != ret )
|
|
1371 |
{
|
|
1372 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1373 |
ClearCallStatus();
|
|
1374 |
}
|
|
1375 |
else
|
|
1376 |
{
|
|
1377 |
#ifdef REQHANDLE_TIMER
|
|
1378 |
//set timer for the request
|
|
1379 |
SetTypeOfResponse( EMultimodeCallAnswer, aTsyReqHandle );
|
|
1380 |
#else
|
|
1381 |
//timer set
|
|
1382 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
1383 |
EMultimodeCallAnswer, aTsyReqHandle );
|
|
1384 |
#endif
|
|
1385 |
}
|
|
1386 |
}
|
|
1387 |
|
|
1388 |
return KErrNone;
|
|
1389 |
}
|
|
1390 |
|
|
1391 |
// ---------------------------------------------------------------------------
|
|
1392 |
// CMmDataCallTsy::AnswerIncomingCallCancel
|
|
1393 |
// TSY has started a request and it is not possible to then cancel this
|
|
1394 |
// request. The best thing for the TSY to do in this case is to call
|
|
1395 |
// HangUp method to do this and set a flag so that we can know that
|
|
1396 |
// AnswerIncomingCallCancel handling is going on.
|
|
1397 |
// (other items were commented in a header).
|
|
1398 |
// ---------------------------------------------------------------------------
|
|
1399 |
//
|
|
1400 |
TInt CMmDataCallTsy::AnswerIncomingCallCancel(
|
|
1401 |
const TTsyReqHandle aTsyReqHandle )
|
|
1402 |
{
|
|
1403 |
TFLOGSTRING3("TSY: CMmDataCallTsy::AnswerIncomingCallCancel. Req handle: %d, Call name: %S",
|
|
1404 |
aTsyReqHandle, &iCallName);
|
|
1405 |
|
|
1406 |
TInt ret( KErrNone );
|
|
1407 |
|
|
1408 |
if( iAnswerCancelFlag )
|
|
1409 |
{
|
|
1410 |
ret = KErrServerBusy;
|
|
1411 |
}
|
|
1412 |
else
|
|
1413 |
{
|
|
1414 |
iAnswerCancelFlag = ETrue;
|
|
1415 |
|
|
1416 |
if ( 0 < iCallId )
|
|
1417 |
{
|
|
1418 |
HangUp( aTsyReqHandle );
|
|
1419 |
}
|
|
1420 |
else
|
|
1421 |
{
|
|
1422 |
TFLOGSTRING2("TSY: CMmDataCallTsy::AnswerIncomingCallCancel -- iCallStatus = %d",
|
|
1423 |
iCallStatus);
|
|
1424 |
if ( RCall::EStatusUnknown == iCallStatus )
|
|
1425 |
{
|
|
1426 |
// Cancel automatic answering
|
|
1427 |
|
|
1428 |
//Create package
|
|
1429 |
CCallDataPackage package;
|
|
1430 |
//Set call id and call mode
|
|
1431 |
package.SetCallIdAndMode( iCallId, iCallMode );
|
|
1432 |
// This is needed, messhandler tries to get two pointers.
|
|
1433 |
// Without this second pointer is NULL and crashes
|
|
1434 |
TBool autoStChangeDisable( EFalse );
|
|
1435 |
TInt hangUpCause( KErrGsmReleaseByUser );
|
|
1436 |
//Pack call parameters and mobile call info
|
|
1437 |
package.PackData( &hangUpCause, &autoStChangeDisable );
|
|
1438 |
|
|
1439 |
//Send request to the Domestic OS layer.
|
|
1440 |
TRAPD( leaveError,
|
|
1441 |
ret = iMessageManager->HandleRequestL(
|
|
1442 |
EEtelCallHangUp, &package );
|
|
1443 |
);
|
|
1444 |
|
|
1445 |
//send failure
|
|
1446 |
if ( KErrNone != ret || KErrNone != leaveError )
|
|
1447 |
{
|
|
1448 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1449 |
}
|
|
1450 |
}
|
|
1451 |
CompleteAnswerIncomingCall( KErrCancel );
|
|
1452 |
}
|
|
1453 |
}
|
|
1454 |
|
|
1455 |
return ret;
|
|
1456 |
}
|
|
1457 |
|
|
1458 |
// ---------------------------------------------------------------------------
|
|
1459 |
// CMmDataCallTsy::CompleteAnswerIncomingCall
|
|
1460 |
// Completes answer request to client.
|
|
1461 |
// (other items were commented in a header).
|
|
1462 |
// ---------------------------------------------------------------------------
|
|
1463 |
//
|
|
1464 |
void CMmDataCallTsy::CompleteAnswerIncomingCall(
|
|
1465 |
TInt aResult )
|
|
1466 |
{
|
|
1467 |
TFLOGSTRING2("TSY: CMmDataCallTsy::CompleteAnswerIncomingCall - Result: %d",
|
|
1468 |
aResult );
|
|
1469 |
TFLOGSTRING3("TSY: CMmDataCallTsy::CompleteAnswerIncomingCall - Call Id: %d, Call name: %S",
|
|
1470 |
iCallId, &iCallName);
|
|
1471 |
|
|
1472 |
//reset req handle. Returns the deleted req handle
|
|
1473 |
TTsyReqHandle reqHandle =
|
|
1474 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallAnswer );
|
|
1475 |
|
|
1476 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
1477 |
{
|
|
1478 |
if ( KErrNone != aResult )
|
|
1479 |
{
|
|
1480 |
TInt extendedError(
|
|
1481 |
CMmCommonStaticUtility::ExtendedErrorCode( aResult ) );
|
|
1482 |
|
|
1483 |
if ( KErrGsmCCNormalUnspecified == extendedError )
|
|
1484 |
{
|
|
1485 |
//Call MT released while answer request was ongoing
|
|
1486 |
//Set Symbian error value to disconnected.
|
|
1487 |
aResult = CMmCommonStaticUtility::EpocErrorCode(
|
|
1488 |
KErrGeneral, KErrDisconnected );
|
|
1489 |
}
|
|
1490 |
else
|
|
1491 |
{
|
|
1492 |
iCallCaps.iFlags |= RCall::KCapsAnswer | RCall::KCapsDial;
|
|
1493 |
iCallCaps.iFlags &= ~( RCall::KCapsHangUp );
|
|
1494 |
|
|
1495 |
CompleteNotifyCapsChange();
|
|
1496 |
}
|
|
1497 |
|
|
1498 |
iLastExitCode = aResult;
|
|
1499 |
|
|
1500 |
ClearCallStatus();
|
|
1501 |
}
|
|
1502 |
|
|
1503 |
ReqCompleted( reqHandle, aResult );
|
|
1504 |
|
|
1505 |
}
|
|
1506 |
|
|
1507 |
// Set also new call caps to enable dataport loaning!
|
|
1508 |
if ( RCall::EStatusConnected == iCallStatus &&
|
|
1509 |
KErrNone == aResult )
|
|
1510 |
{
|
|
1511 |
iCallCaps.iFlags |= RCall::KCapsLoanDataPort;
|
|
1512 |
iMmCallExtInterface->AddGSMCallCaps(
|
|
1513 |
RCall::KCapsLoanDataPort );
|
|
1514 |
|
|
1515 |
//complete caps change notification
|
|
1516 |
CompleteNotifyCapsChange();
|
|
1517 |
CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
1518 |
}
|
|
1519 |
|
|
1520 |
}
|
|
1521 |
|
|
1522 |
// ---------------------------------------------------------------------------
|
|
1523 |
// CMmDataCallTsy::HangUp
|
|
1524 |
// This CORE API method disconnects the call. Used with normal voice calls,
|
|
1525 |
// emergency calls as well as data calls. DialCancel also uses this method.
|
|
1526 |
// (other items were commented in a header).
|
|
1527 |
// ---------------------------------------------------------------------------
|
|
1528 |
//
|
|
1529 |
TInt CMmDataCallTsy::HangUp(
|
|
1530 |
const TTsyReqHandle aTsyReqHandle )
|
|
1531 |
{
|
|
1532 |
TFLOGSTRING3("TSY: CMmDataCallTsy::HangUp - Req. handle: %d, Call name: %S",
|
|
1533 |
aTsyReqHandle, &iCallName);
|
|
1534 |
|
|
1535 |
TInt hangUpCause( KErrNone );
|
|
1536 |
TInt ret( KErrNone );
|
|
1537 |
|
|
1538 |
TTsyReqHandle hangUpHandle =
|
|
1539 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallHangUp );
|
|
1540 |
TTsyReqHandle dialHandle =
|
|
1541 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallDial );
|
|
1542 |
TTsyReqHandle dialHandleNoFdnCheck =
|
|
1543 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallDialNoFdnCheck );
|
|
1544 |
|
|
1545 |
if ( 0 < hangUpHandle || iHangUpFlag )
|
|
1546 |
{
|
|
1547 |
//The request is already in processing because of previous request
|
|
1548 |
//Complete request with status value informing the client about
|
|
1549 |
//the situation.
|
|
1550 |
TFLOGSTRING("TSY: CMmDataCallTsy::HangUp - KErrServerBusy");
|
|
1551 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
1552 |
}
|
|
1553 |
else if ( RCall::EStatusIdle == iCallStatus &&
|
|
1554 |
EMultimodeCallReqHandleUnknown == dialHandle )
|
|
1555 |
{
|
|
1556 |
//Call object is already in idle state. Complete HangUp request with
|
|
1557 |
//error.
|
|
1558 |
TFLOGSTRING("TSY: CMmDataCallTsy::HangUp - KErrNotReady");
|
|
1559 |
ReqCompleted( aTsyReqHandle, KErrNotReady );
|
|
1560 |
}
|
|
1561 |
else
|
|
1562 |
{
|
|
1563 |
// If this was not called by DialCancel or AnswerIncomingCallCancel
|
|
1564 |
if ( CMmCallTsy::EDialCancelNotCalled == iDialCancelFlag &&
|
|
1565 |
!iAnswerCancelFlag )
|
|
1566 |
{
|
|
1567 |
#ifdef REQHANDLE_TIMER
|
|
1568 |
//set timer for the request
|
|
1569 |
SetTypeOfResponse( EMultimodeCallHangUp, aTsyReqHandle );
|
|
1570 |
#else
|
|
1571 |
//save HangUp request handle, set timer
|
|
1572 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
1573 |
EMultimodeCallHangUp, aTsyReqHandle );
|
|
1574 |
#endif
|
|
1575 |
}
|
|
1576 |
|
|
1577 |
//decide the hangup cause
|
|
1578 |
if ( RCall::EStatusRinging == iCallStatus )
|
|
1579 |
{
|
|
1580 |
iLastExitCode = KErrGsmCallRejected;
|
|
1581 |
hangUpCause = KErrGsmBusyUserRequest;
|
|
1582 |
}
|
|
1583 |
else
|
|
1584 |
{
|
|
1585 |
hangUpCause = KErrGsmReleaseByUser;
|
|
1586 |
}
|
|
1587 |
|
|
1588 |
// Call handling
|
|
1589 |
//If the call is ringing e.g. MT call, we do not have ownership
|
|
1590 |
//yet. So let the client reject the call without checking
|
|
1591 |
//ownership.
|
|
1592 |
if ( RCall::EStatusRinging == iCallStatus )
|
|
1593 |
{
|
|
1594 |
TFLOGSTRING("TSY: CMmDataCallTsy::HangUp - Reject incoming call");
|
|
1595 |
}
|
|
1596 |
//Phone Application is the first client that is started, it
|
|
1597 |
//will always be the priority client and thus able to hangup calls
|
|
1598 |
//Owner of the call is also able to hangup the call.
|
|
1599 |
else if ( ( CCallBase::CheckPriorityClient( aTsyReqHandle ) ) ||
|
|
1600 |
( CheckOwnership( aTsyReqHandle ) != EOwnedFalse ) )
|
|
1601 |
{
|
|
1602 |
ret = KErrNone;
|
|
1603 |
}
|
|
1604 |
// If call is not owned, complete with error
|
|
1605 |
else if ( CCallBase::EOwnedTrue !=
|
|
1606 |
CheckOwnership( aTsyReqHandle ) )
|
|
1607 |
{
|
|
1608 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallHangUp );
|
|
1609 |
ret = KErrEtelNotCallOwner;
|
|
1610 |
ReqCompleted( aTsyReqHandle, KErrEtelNotCallOwner );
|
|
1611 |
}
|
|
1612 |
|
|
1613 |
if ( KErrNone == ret )
|
|
1614 |
{
|
|
1615 |
//Create package
|
|
1616 |
CCallDataPackage package;
|
|
1617 |
//Set call id and call mode
|
|
1618 |
package.SetCallIdAndMode( iCallId, iCallMode );
|
|
1619 |
|
|
1620 |
// This is needed, messhandler tries to get two pointers. Without
|
|
1621 |
// this second pointer is NULL and crashes
|
|
1622 |
TBool autoStChangeDisable = EFalse;
|
|
1623 |
//Pack call parameters and mobile call info
|
|
1624 |
package.PackData( &hangUpCause, &autoStChangeDisable );
|
|
1625 |
//Send request to the Domestic OS layer.
|
|
1626 |
TRAPD( leaveError,
|
|
1627 |
ret = iMessageManager->HandleRequestL(
|
|
1628 |
EEtelCallHangUp, &package );
|
|
1629 |
);
|
|
1630 |
|
|
1631 |
//send failure
|
|
1632 |
if ( KErrNone != ret || KErrNone != leaveError )
|
|
1633 |
{
|
|
1634 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallHangUp );
|
|
1635 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1636 |
}
|
|
1637 |
else
|
|
1638 |
{
|
|
1639 |
//update core status - hangup not possible now.
|
|
1640 |
//remove also dataport caps
|
|
1641 |
iCallCaps.iFlags &= ~(
|
|
1642 |
RCall::KCapsHangUp | RCall::KCapsLoanDataPort );
|
|
1643 |
|
|
1644 |
iMmCallExtInterface->RemoveGSMCallCaps(
|
|
1645 |
RCall::KCapsHangUp | RCall::KCapsLoanDataPort );
|
|
1646 |
|
|
1647 |
//complete core caps change
|
|
1648 |
CompleteNotifyCapsChange();
|
|
1649 |
CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
1650 |
//set HangUp flag to ongoing
|
|
1651 |
iHangUpFlag = ETrue;
|
|
1652 |
}
|
|
1653 |
}
|
|
1654 |
}
|
|
1655 |
|
|
1656 |
return KErrNone;
|
|
1657 |
}
|
|
1658 |
|
|
1659 |
// ---------------------------------------------------------------------------
|
|
1660 |
// CMmDataCallTsy::CompleteHangUp
|
|
1661 |
// Completes call hangup (both normal and emergency calls). If the cause value
|
|
1662 |
// is different than the sent one, the call release requset has failed. In
|
|
1663 |
// this case the causeValue describes the fail cause. Otherwise the call
|
|
1664 |
// releasing has succeeded.
|
|
1665 |
// (other items were commented in a header).
|
|
1666 |
// ---------------------------------------------------------------------------
|
|
1667 |
//
|
|
1668 |
void CMmDataCallTsy::CompleteHangUp(
|
|
1669 |
TInt aResult )
|
|
1670 |
{
|
|
1671 |
TFLOGSTRING2("TSY: CMmDataCallTsy::CompleteHangUp.\n \t\t\t Result: %d",
|
|
1672 |
aResult );
|
|
1673 |
TFLOGSTRING3("TSY: CMmDataCallTsy::CompleteHangUp - Call Id: %d, Call name: %S",
|
|
1674 |
iCallId, &iCallName);
|
|
1675 |
|
|
1676 |
TInt ret( KErrNone );
|
|
1677 |
|
|
1678 |
// Complete for HangUp request
|
|
1679 |
// (not to DialCancel or AnswerIncomingCallCancel)
|
|
1680 |
if ( CMmCallTsy::EDialCancelNotCalled == iDialCancelFlag &&
|
|
1681 |
!iAnswerCancelFlag )
|
|
1682 |
{
|
|
1683 |
//reset req handle. Returns the deleted req handle
|
|
1684 |
TTsyReqHandle reqHandle =
|
|
1685 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallHangUp );
|
|
1686 |
|
|
1687 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
1688 |
{
|
|
1689 |
//if hangup request failed
|
|
1690 |
if ( KErrNone != aResult )
|
|
1691 |
{
|
|
1692 |
//Hangup failed, it should be still possible to carry out
|
|
1693 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
1694 |
iMmCallExtInterface->AddGSMCallCaps(
|
|
1695 |
RCall::KCapsHangUp );
|
|
1696 |
|
|
1697 |
//Call status is not idle. HangUp request failed, complete
|
|
1698 |
//HangUp request with error.
|
|
1699 |
if ( RCall::EStatusIdle != iCallStatus )
|
|
1700 |
{
|
|
1701 |
// ignore KErrGsmReleaseByUser, which means that the call ended
|
|
1702 |
// because the local user released the call, and must be treated
|
|
1703 |
// as a normal return code from the LTSY
|
|
1704 |
ret = ( (aResult == KErrGsmReleaseByUser) ? KErrNone : aResult );
|
|
1705 |
}
|
|
1706 |
}
|
|
1707 |
else
|
|
1708 |
{
|
|
1709 |
//Dial hangup has succeeded, update core status -
|
|
1710 |
//dial possible again
|
|
1711 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
1712 |
|
|
1713 |
if ( KErrGsmCallRejected != iLastExitCode )
|
|
1714 |
{
|
|
1715 |
iLastExitCode = KErrNone;
|
|
1716 |
}
|
|
1717 |
|
|
1718 |
//Bring back also the connecting capability
|
|
1719 |
iCallCaps.iFlags |= RCall::KCapsConnect;
|
|
1720 |
//If client refuses to answer, remove the answering capability
|
|
1721 |
iCallCaps.iFlags &= ~( RCall::KCapsAnswer );
|
|
1722 |
}
|
|
1723 |
ReqCompleted( reqHandle, ret );
|
|
1724 |
|
|
1725 |
//complete caps change notification
|
|
1726 |
CompleteNotifyCapsChange();
|
|
1727 |
CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
1728 |
|
|
1729 |
//Change modem state to idle
|
|
1730 |
RPhone::TStatus modemStatus;
|
|
1731 |
modemStatus.iModemDetected = RPhone::EDetectedPresent;
|
|
1732 |
modemStatus.iMode = RPhone::EModeIdle;
|
|
1733 |
iMmPhone->CompleteNotifyModemDetected( modemStatus );
|
|
1734 |
// Reset call extension attributes
|
|
1735 |
iMmCallExtInterface->ResetInternalAttributes();
|
|
1736 |
}
|
|
1737 |
}
|
|
1738 |
// Complete for DialCancel or AnswerIncomingCallCancel, success
|
|
1739 |
else if ( KErrNone == aResult )
|
|
1740 |
{
|
|
1741 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteHangUp - EMultimodeCallDial");
|
|
1742 |
// Find out if this is cancelling of Dial
|
|
1743 |
TTsyReqHandle cancelHandle =
|
|
1744 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallDial );
|
|
1745 |
|
|
1746 |
if ( NULL == cancelHandle )
|
|
1747 |
{
|
|
1748 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteHangUp - EMultimodeCallDialNoFdnCheck");
|
|
1749 |
// Find out if this is cancelling of DialNoFdnCheck
|
|
1750 |
cancelHandle = iTsyReqHandleStore->
|
|
1751 |
ResetTsyReqHandle( EMultimodeCallDialNoFdnCheck );
|
|
1752 |
|
|
1753 |
if ( NULL == cancelHandle )
|
|
1754 |
{
|
|
1755 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteHangUp - EMultimodeCallAnswer");
|
|
1756 |
// Find out if this is cancelling of AnswerIncomingCall
|
|
1757 |
cancelHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1758 |
EMultimodeCallAnswer );
|
|
1759 |
}
|
|
1760 |
}
|
|
1761 |
|
|
1762 |
if ( 0 < cancelHandle )
|
|
1763 |
{
|
|
1764 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteHangUp with KErrCancel");
|
|
1765 |
|
|
1766 |
// Complete with error value KErrCancel
|
|
1767 |
ReqCompleted( cancelHandle, KErrCancel );
|
|
1768 |
|
|
1769 |
// Cancel has succeeded, update core status -
|
|
1770 |
// dial possible again
|
|
1771 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
1772 |
// Bring back also the connecting capability
|
|
1773 |
iCallCaps.iFlags |= RCall::KCapsConnect;
|
|
1774 |
// If client refuses to answer, remove the answering capability
|
|
1775 |
iCallCaps.iFlags &= ~( RCall::KCapsAnswer );
|
|
1776 |
// Complete caps change notification
|
|
1777 |
CompleteNotifyCapsChange();
|
|
1778 |
|
|
1779 |
// Change modem state to idle
|
|
1780 |
RPhone::TStatus modemStatus;
|
|
1781 |
modemStatus.iModemDetected = RPhone::EDetectedPresent;
|
|
1782 |
modemStatus.iMode = RPhone::EModeIdle;
|
|
1783 |
iMmPhone->CompleteNotifyModemDetected( modemStatus );
|
|
1784 |
// Reset call extension attributes
|
|
1785 |
iMmCallExtInterface->ResetInternalAttributes();
|
|
1786 |
}
|
|
1787 |
}
|
|
1788 |
// Cancel failed and the request succeeded (connected)
|
|
1789 |
else if ( RCall::EStatusConnected == iCallStatus )
|
|
1790 |
{
|
|
1791 |
// Find out if this is cancelling of Dial
|
|
1792 |
TTsyReqHandle cancelHandle =
|
|
1793 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallDial );
|
|
1794 |
|
|
1795 |
if ( NULL == cancelHandle )
|
|
1796 |
{
|
|
1797 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteHangUp - cancelling of EMultimodeCallDialNoFdnCheck");
|
|
1798 |
// Find out if this is cancelling of DialNoFdnCheck
|
|
1799 |
TTsyReqHandle cancelHandle =
|
|
1800 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1801 |
EMultimodeCallDialNoFdnCheck );
|
|
1802 |
|
|
1803 |
if ( NULL == cancelHandle )
|
|
1804 |
{
|
|
1805 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteHangUp - cancelling of AnswerIncomingCall");
|
|
1806 |
// Find out if this is cancelling of AnswerIncomingCall
|
|
1807 |
cancelHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1808 |
EMultimodeCallAnswer );
|
|
1809 |
}
|
|
1810 |
}
|
|
1811 |
|
|
1812 |
|
|
1813 |
// Cancel to Dial or AnswerIncomingCall
|
|
1814 |
if ( 0 < cancelHandle )
|
|
1815 |
{
|
|
1816 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteHangUp - with KErrNone");
|
|
1817 |
// Complete with success (KErrNone)
|
|
1818 |
ReqCompleted( cancelHandle, KErrNone );
|
|
1819 |
|
|
1820 |
// Succeeded, update core status - hangup possible again
|
|
1821 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
1822 |
// Complete caps change notification
|
|
1823 |
CompleteNotifyCapsChange();
|
|
1824 |
}
|
|
1825 |
}
|
|
1826 |
|
|
1827 |
// Reset cancel flags
|
|
1828 |
iDialCancelFlag = CMmCallTsy::EDialCancelNotCalled;
|
|
1829 |
iAnswerCancelFlag = EFalse;
|
|
1830 |
// reset the HangUp flag
|
|
1831 |
iHangUpFlag = EFalse;
|
|
1832 |
}
|
|
1833 |
|
|
1834 |
// ---------------------------------------------------------------------------
|
|
1835 |
// CMmDataCallTsy::GetOwnershipStatus
|
|
1836 |
// Get call ownership status.
|
|
1837 |
// (other items were commented in a header).
|
|
1838 |
// ---------------------------------------------------------------------------
|
|
1839 |
//
|
|
1840 |
TInt CMmDataCallTsy::GetOwnershipStatus(
|
|
1841 |
const TTsyReqHandle aTsyReqHandle,
|
|
1842 |
RCall::TOwnershipStatus* aOwnershipStatus )
|
|
1843 |
{
|
|
1844 |
TCallOwnership ownerShip = CheckOwnership( aTsyReqHandle );
|
|
1845 |
|
|
1846 |
switch ( ownerShip )
|
|
1847 |
{
|
|
1848 |
case EOwnedUnowned:
|
|
1849 |
*aOwnershipStatus = RCall::EOwnershipUnowned;
|
|
1850 |
break;
|
|
1851 |
case EOwnedTrue:
|
|
1852 |
*aOwnershipStatus = RCall::EOwnershipOwnedByThisClient;
|
|
1853 |
break;
|
|
1854 |
case EOwnedFalse:
|
|
1855 |
*aOwnershipStatus = RCall::EOwnershipOwnedByAnotherClient;
|
|
1856 |
break;
|
|
1857 |
case EOwnedPriorityClient:
|
|
1858 |
if ( CCallBase::CheckPriorityClient( aTsyReqHandle ) )
|
|
1859 |
{
|
|
1860 |
*aOwnershipStatus = RCall::EOwnershipOwnedByThisClient;
|
|
1861 |
}
|
|
1862 |
else
|
|
1863 |
{
|
|
1864 |
*aOwnershipStatus = RCall::EOwnershipOwnedByAnotherClient;
|
|
1865 |
}
|
|
1866 |
break;
|
|
1867 |
default:
|
|
1868 |
//all possible values are switched, nothing to do here...
|
|
1869 |
break;
|
|
1870 |
}
|
|
1871 |
|
|
1872 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
1873 |
|
|
1874 |
return KErrNone;
|
|
1875 |
}
|
|
1876 |
|
|
1877 |
// ---------------------------------------------------------------------------
|
|
1878 |
// CMmDataCallTsy::TransferOwnership
|
|
1879 |
// Transfers the call ownership.
|
|
1880 |
// (other items were commented in a header).
|
|
1881 |
// ---------------------------------------------------------------------------
|
|
1882 |
//
|
|
1883 |
TInt CMmDataCallTsy::TransferOwnership(
|
|
1884 |
const TTsyReqHandle aTsyReqHandle )
|
|
1885 |
{
|
|
1886 |
// If call is not owned, complete with error
|
|
1887 |
if ( CCallBase::EOwnedTrue != CheckOwnership( aTsyReqHandle ) )
|
|
1888 |
{
|
|
1889 |
ReqCompleted( aTsyReqHandle, KErrEtelNotCallOwner );
|
|
1890 |
}
|
|
1891 |
// If list is empty, complete with error
|
|
1892 |
else if ( iList->iAcquireList.IsEmpty() )
|
|
1893 |
{
|
|
1894 |
ReqCompleted( aTsyReqHandle, KErrEtelNoClientInterestedInThisCall );
|
|
1895 |
}
|
|
1896 |
else
|
|
1897 |
{
|
|
1898 |
CAcquireEntry* entry = iList->iAcquireList.First();
|
|
1899 |
if ( entry )
|
|
1900 |
{
|
|
1901 |
SetOwnership( entry->iTsyReqHandle );
|
|
1902 |
ReqCompleted( entry->iTsyReqHandle, KErrNone );
|
|
1903 |
iList->Remove( entry );
|
|
1904 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
1905 |
}
|
|
1906 |
else
|
|
1907 |
{
|
|
1908 |
ReqCompleted( aTsyReqHandle, KErrGeneral );
|
|
1909 |
}
|
|
1910 |
}
|
|
1911 |
|
|
1912 |
return KErrNone;
|
|
1913 |
}
|
|
1914 |
|
|
1915 |
// ---------------------------------------------------------------------------
|
|
1916 |
// CMmDataCallTsy::AcquireOwnership
|
|
1917 |
// Acquire the call ownership.
|
|
1918 |
// (other items were commented in a header).
|
|
1919 |
// ---------------------------------------------------------------------------
|
|
1920 |
//
|
|
1921 |
TInt CMmDataCallTsy::AcquireOwnership(
|
|
1922 |
const TTsyReqHandle aTsyReqHandle )
|
|
1923 |
{
|
|
1924 |
TInt trapError;
|
|
1925 |
// Check if the call is unowned?
|
|
1926 |
if ( CheckOwnership( aTsyReqHandle ) == CCallBase::EOwnedUnowned )
|
|
1927 |
{
|
|
1928 |
// It is, return with error
|
|
1929 |
ReqCompleted( aTsyReqHandle, KErrEtelCallNotActive );
|
|
1930 |
}
|
|
1931 |
else
|
|
1932 |
{
|
|
1933 |
CAcquireEntry* entry = NULL;
|
|
1934 |
// Call is owned, add this req handle to acquire list
|
|
1935 |
// coverity [resource_leak]
|
|
1936 |
// TRAP macro releases memory while exception caught and trapError != KErrNone
|
|
1937 |
TRAP( trapError, ( entry = CAcquireEntry::NewL( aTsyReqHandle ) ) );
|
|
1938 |
if ( trapError != KErrNone )
|
|
1939 |
{
|
|
1940 |
//error handling. Object cannot be created.
|
|
1941 |
ReqCompleted( aTsyReqHandle, trapError );
|
|
1942 |
}
|
|
1943 |
else if ( NULL != entry )
|
|
1944 |
{
|
|
1945 |
iList->iAcquireList.AddLast( *entry );
|
|
1946 |
}
|
|
1947 |
}
|
|
1948 |
|
|
1949 |
return KErrNone;
|
|
1950 |
}
|
|
1951 |
|
|
1952 |
// ---------------------------------------------------------------------------
|
|
1953 |
// CMmDataCallTsy::AcquireOwnershipCancel
|
|
1954 |
// Cancel the call ownership acquire.
|
|
1955 |
// (other items were commented in a header).
|
|
1956 |
// ---------------------------------------------------------------------------
|
|
1957 |
//
|
|
1958 |
TInt CMmDataCallTsy::AcquireOwnershipCancel(
|
|
1959 |
const TTsyReqHandle aTsyReqHandle )
|
|
1960 |
{
|
|
1961 |
CAcquireEntry* entry = iList->FindByTsyReqHandle( aTsyReqHandle );
|
|
1962 |
if ( NULL != entry )
|
|
1963 |
{
|
|
1964 |
iList->Remove( entry );
|
|
1965 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1966 |
}
|
|
1967 |
else
|
|
1968 |
{
|
|
1969 |
ReqCompleted( aTsyReqHandle, KErrNotFound );
|
|
1970 |
}
|
|
1971 |
|
|
1972 |
return KErrNone;
|
|
1973 |
}
|
|
1974 |
|
|
1975 |
// ---------------------------------------------------------------------------
|
|
1976 |
// CMmDataCallTsy::RelinquishOwnership
|
|
1977 |
// Relinquish the call ownership.
|
|
1978 |
// (other items were commented in a header).
|
|
1979 |
// ---------------------------------------------------------------------------
|
|
1980 |
//
|
|
1981 |
TInt CMmDataCallTsy::RelinquishOwnership()
|
|
1982 |
{
|
|
1983 |
if ( iList->iAcquireList.IsEmpty() )
|
|
1984 |
{
|
|
1985 |
SetUnowned();
|
|
1986 |
if ( RCall::EStatusConnected != iCallStatus )
|
|
1987 |
{
|
|
1988 |
RelinquishOwnershipCompleted( KErrNone );
|
|
1989 |
}
|
|
1990 |
}
|
|
1991 |
else
|
|
1992 |
{
|
|
1993 |
CAcquireEntry* entry = iList->iAcquireList.First();
|
|
1994 |
if ( entry )
|
|
1995 |
{
|
|
1996 |
SetOwnership( entry->iTsyReqHandle );
|
|
1997 |
ReqCompleted( entry->iTsyReqHandle, KErrNone );
|
|
1998 |
iList->Remove( entry );
|
|
1999 |
}
|
|
2000 |
RelinquishOwnershipCompleted( KErrNone );
|
|
2001 |
}
|
|
2002 |
|
|
2003 |
return KErrNone;
|
|
2004 |
}
|
|
2005 |
|
|
2006 |
// ---------------------------------------------------------------------------
|
|
2007 |
// CMmDataCallTsy::RegisterNotification
|
|
2008 |
// RegisterNotification is called when the server recognises that this
|
|
2009 |
// notification is being posted for the first time on this sub-session object.
|
|
2010 |
// It enables the TSY to "turn on" any regular notification messages that it
|
|
2011 |
// may receive from DOS. Currently does not really do anything but returns
|
|
2012 |
// KErrNone to ETel server in case of known notification request type.
|
|
2013 |
// (other items were commented in a header).
|
|
2014 |
// ---------------------------------------------------------------------------
|
|
2015 |
//
|
|
2016 |
TInt CMmDataCallTsy::RegisterNotification(
|
|
2017 |
const TInt aIpc )
|
|
2018 |
{
|
|
2019 |
TInt ret( KErrNone );
|
|
2020 |
|
|
2021 |
switch ( aIpc )
|
|
2022 |
{
|
|
2023 |
case EEtelCallNotifyHookChange:
|
|
2024 |
case EEtelCallNotifyStatusChange:
|
|
2025 |
case EEtelCallNotifyDurationChange:
|
|
2026 |
case EEtelCallCapsChangeNotification:
|
|
2027 |
case EMobileCallNotifyCallEvent:
|
|
2028 |
case EMobileCallNotifyMobileCallStatusChange:
|
|
2029 |
case EMobileCallNotifyRemotePartyInfoChange:
|
|
2030 |
case EMobileCallNotifyPrivacyConfirmation:
|
|
2031 |
case EMobileCallNotifyTrafficChannelConfirmation:
|
|
2032 |
case EMobileCallNotifyHscsdInfoChange:
|
|
2033 |
case EMobileCallNotifyMobileDataCallCapsChange:
|
|
2034 |
case EMobileCallNotifyAlternatingCallSwitch:
|
|
2035 |
case EMobileCallNotifyMobileCallCapsChange:
|
|
2036 |
case EMobileCallNotifyVoiceFallback:
|
|
2037 |
case EMobileCallNotifyUUSCapsChange:
|
|
2038 |
ret = KErrNone;
|
|
2039 |
break;
|
|
2040 |
default:
|
|
2041 |
// Unknown or invalid IPC
|
|
2042 |
ret = KErrNotSupported;
|
|
2043 |
break;
|
|
2044 |
}
|
|
2045 |
|
|
2046 |
return ret;
|
|
2047 |
}
|
|
2048 |
|
|
2049 |
// ---------------------------------------------------------------------------
|
|
2050 |
// CMmDataCallTsy::DeregisterNotification
|
|
2051 |
// DeregisterNotification is called when the server recognises that this
|
|
2052 |
// notification will not be posted again because the last client to have a
|
|
2053 |
// handle on this sub-session object has just closed the handle. It enables
|
|
2054 |
// the TSY to "turn off" any regular notification messages that it may receive
|
|
2055 |
// from DOS. Currently does not really do anything but returns KErrNone to
|
|
2056 |
// ETel server in case of known notification request type.
|
|
2057 |
// (other items were commented in a header).
|
|
2058 |
// ---------------------------------------------------------------------------
|
|
2059 |
//
|
|
2060 |
TInt CMmDataCallTsy::DeregisterNotification(
|
|
2061 |
const TInt aIpc )
|
|
2062 |
{
|
|
2063 |
TInt ret ( KErrNone );
|
|
2064 |
|
|
2065 |
switch ( aIpc )
|
|
2066 |
{
|
|
2067 |
case EEtelCallNotifyHookChange:
|
|
2068 |
case EEtelCallNotifyStatusChange:
|
|
2069 |
case EEtelCallNotifyDurationChange:
|
|
2070 |
case EEtelCallCapsChangeNotification:
|
|
2071 |
case EMobileCallNotifyCallEvent:
|
|
2072 |
case EMobileCallNotifyMobileCallStatusChange:
|
|
2073 |
case EMobileCallNotifyRemotePartyInfoChange:
|
|
2074 |
case EMobileCallNotifyPrivacyConfirmation:
|
|
2075 |
case EMobileCallNotifyTrafficChannelConfirmation:
|
|
2076 |
case EMobileCallNotifyHscsdInfoChange:
|
|
2077 |
case EMobileCallNotifyMobileDataCallCapsChange:
|
|
2078 |
case EMobileCallNotifyAlternatingCallSwitch:
|
|
2079 |
case EMobileCallNotifyMobileCallCapsChange:
|
|
2080 |
case EMobileCallNotifyVoiceFallback:
|
|
2081 |
case EMobileCallNotifyUUSCapsChange:
|
|
2082 |
ret = KErrNone;
|
|
2083 |
break;
|
|
2084 |
default:
|
|
2085 |
// Unknown or invalid IPC
|
|
2086 |
ret = KErrNotSupported;
|
|
2087 |
break;
|
|
2088 |
}
|
|
2089 |
|
|
2090 |
return ret;
|
|
2091 |
}
|
|
2092 |
|
|
2093 |
// ---------------------------------------------------------------------------
|
|
2094 |
// CMmDataCallTsy::ClearCallStatus
|
|
2095 |
// Clears internal call status.
|
|
2096 |
// (other items were commented in a header).
|
|
2097 |
// ---------------------------------------------------------------------------
|
|
2098 |
//
|
|
2099 |
void CMmDataCallTsy::ClearCallStatus()
|
|
2100 |
{
|
|
2101 |
SetUnowned();
|
|
2102 |
CMmCallTsy::ClearCallStatus();
|
|
2103 |
}
|
|
2104 |
|
|
2105 |
#ifdef REQHANDLE_TIMER
|
|
2106 |
|
|
2107 |
// ---------------------------------------------------------------------------
|
|
2108 |
// CMmDataCallTsy::SetTypeOfResponse
|
|
2109 |
// Sets the type of response for a given Handle. Automatic mode includes an
|
|
2110 |
// automatic response in case of non response from the Domestic OS Layer in a
|
|
2111 |
// specified time.
|
|
2112 |
// (other items were commented in a header).
|
|
2113 |
// ---------------------------------------------------------------------------
|
|
2114 |
//
|
|
2115 |
void CMmDataCallTsy::SetTypeOfResponse(
|
|
2116 |
const TInt aReqHandleType,
|
|
2117 |
const TTsyReqHandle aTsyReqHandle )
|
|
2118 |
{
|
|
2119 |
//Sets the type of response for a given Handle. Automatic mode includes an
|
|
2120 |
//automatic response in case of non response from the Licencee specific
|
|
2121 |
//TSY in a specified time.
|
|
2122 |
TInt timeOut( 0 );
|
|
2123 |
|
|
2124 |
//example switch
|
|
2125 |
switch ( aReqHandleType )
|
|
2126 |
{
|
|
2127 |
case EMultimodeCallDial:
|
|
2128 |
case EMultimodeCallDialNoFdnCheck:
|
|
2129 |
timeOut = KMmCallDialTimeOut;
|
|
2130 |
break;
|
|
2131 |
case EMultimodeCallAnswer:
|
|
2132 |
// If call mode is data and client is expecting call back from
|
|
2133 |
// server, set timeout value to KMmCallAnswerCallBackTimeOut
|
|
2134 |
if ( this == iMmPhone->WaitingCallForData() )
|
|
2135 |
{
|
|
2136 |
timeOut = KMmCallAnswerCallBackTimeOut;
|
|
2137 |
}
|
|
2138 |
else
|
|
2139 |
{
|
|
2140 |
timeOut = KMmCallAnswerTimeOut;
|
|
2141 |
}
|
|
2142 |
break;
|
|
2143 |
case EMultimodeCallHangUp:
|
|
2144 |
timeOut = KMmCallHangUpTimeOut;
|
|
2145 |
break;
|
|
2146 |
case EMultimodeCallTransfer:
|
|
2147 |
timeOut = KMmCallTransferTimeOut;
|
|
2148 |
break;
|
|
2149 |
case EMultimodeCallSetDynamicHscsdParams:
|
|
2150 |
timeOut = KMmCallSetDynamicHscsdParamsTimeOut;
|
|
2151 |
break;
|
|
2152 |
//Can't use timer:
|
|
2153 |
// - all notifications
|
|
2154 |
//case EMultimodeCallNotifyStatusChange:
|
|
2155 |
//case EMultimodeCallNotifyDurationChange:
|
|
2156 |
//case EMultimodeCallCapsChangeNotification:
|
|
2157 |
//case EMultimodeCallNotifyMobileCallStatusChange:
|
|
2158 |
//case EMultimodeCallNotifyCallEvent:
|
|
2159 |
//case EMultimodeCallNotifyRemotePartyInfoChange:
|
|
2160 |
//case EMultimodeCallNotifyMobileCallCapsChange:
|
|
2161 |
//case EMultimodeCallNotifyDataCallCapsChange:
|
|
2162 |
//case EMultimodeCallNotifyHscsdInfoChange:
|
|
2163 |
//case EMultimodeCallNotifyPrivacyConfirmation:
|
|
2164 |
|
|
2165 |
case EMultimodeMobileCallHold:
|
|
2166 |
case EMultimodeMobileCallResume:
|
|
2167 |
case EMultimodeMobileCallSwap:
|
|
2168 |
case EMultimodeMobileCallDeflectCall:
|
|
2169 |
case EMultimodeMobileCallDialEmergencyCall:
|
|
2170 |
case EMultimodeCallGoOneToOne:
|
|
2171 |
default:
|
|
2172 |
//does not use timer
|
|
2173 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
2174 |
aReqHandleType,
|
|
2175 |
aTsyReqHandle );
|
|
2176 |
break;
|
|
2177 |
}
|
|
2178 |
|
|
2179 |
if ( timeOut > 0 )
|
|
2180 |
{
|
|
2181 |
//the timeout parameter is given in seconds.
|
|
2182 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
2183 |
aReqHandleType, aTsyReqHandle, timeOut );
|
|
2184 |
}
|
|
2185 |
}
|
|
2186 |
|
|
2187 |
// ---------------------------------------------------------------------------
|
|
2188 |
// CMmDataCallTsy::Complete
|
|
2189 |
// Completes the request due timer expiration.
|
|
2190 |
// (other items were commented in a header).
|
|
2191 |
// ---------------------------------------------------------------------------
|
|
2192 |
//
|
|
2193 |
void CMmDataCallTsy::Complete(
|
|
2194 |
TInt aReqHandleType,
|
|
2195 |
TInt aError )
|
|
2196 |
{
|
|
2197 |
//All possible TSY req handle types are listed in the
|
|
2198 |
//switch case below.
|
|
2199 |
switch( aReqHandleType )
|
|
2200 |
{
|
|
2201 |
//cases handled with automatic completion
|
|
2202 |
case EMultimodeCallSetDynamicHscsdParams:
|
|
2203 |
CompleteSetDynamicHscsdParams( aError );
|
|
2204 |
break;
|
|
2205 |
|
|
2206 |
//Can't use timer:
|
|
2207 |
// - all notifications
|
|
2208 |
//case EMultimodeCallNotifyStatusChange:
|
|
2209 |
//case EMultimodeCallNotifyDurationChange:
|
|
2210 |
//case EMultimodeCallCapsChangeNotification:
|
|
2211 |
//case EMultimodeCallNotifyMobileCallStatusChange:
|
|
2212 |
//case EMultimodeCallNotifyCallEvent:
|
|
2213 |
//case EMultimodeCallNotifyRemotePartyInfoChange:
|
|
2214 |
//case EMultimodeCallNotifyMobileCallCapsChange:
|
|
2215 |
//case EMultimodeCallNotifyDataCallCapsChange:
|
|
2216 |
//case EMultimodeCallNotifyHscsdInfoChange:
|
|
2217 |
//case EMultimodeCallNotifyPrivacyConfirmation:
|
|
2218 |
|
|
2219 |
case EMultimodeCallDial:
|
|
2220 |
case EMultimodeCallDialNoFdnCheck:
|
|
2221 |
case EMultimodeCallAnswer:
|
|
2222 |
case EMultimodeCallHangUp:
|
|
2223 |
case EMultimodeMobileCallHold:
|
|
2224 |
case EMultimodeMobileCallResume:
|
|
2225 |
case EMultimodeMobileCallSwap:
|
|
2226 |
case EMultimodeMobileCallDeflectCall:
|
|
2227 |
case EMultimodeMobileCallDialEmergencyCall:
|
|
2228 |
case EMultimodeCallTransfer:
|
|
2229 |
case EMultimodeCallGoOneToOne:
|
|
2230 |
default:
|
|
2231 |
CMmCallTsy::Complete( aReqHandleType, aError );
|
|
2232 |
break;
|
|
2233 |
}
|
|
2234 |
}
|
|
2235 |
#endif
|
|
2236 |
|
|
2237 |
// ---------------------------------------------------------------------------
|
|
2238 |
// CMmDataCallTsy::CallComingForWaitingCall
|
|
2239 |
// Starts to answer an incoming call.
|
|
2240 |
// (other items were commented in a header).
|
|
2241 |
// ---------------------------------------------------------------------------
|
|
2242 |
//
|
|
2243 |
void CMmDataCallTsy::CallComingForWaitingCall()
|
|
2244 |
{
|
|
2245 |
//Incoming call detected, which is directed to this call object
|
|
2246 |
//which should be waiting for incoming call
|
|
2247 |
TFLOGSTRING("TSY: CMmDataCallTsy::CallComingForWaitingCall");
|
|
2248 |
|
|
2249 |
TInt ret( KErrNone );
|
|
2250 |
|
|
2251 |
TFLOGSTRING("TSY: CMmDataCallTsy::AnswerIncomingCall - Data call");
|
|
2252 |
//Answer incoming call
|
|
2253 |
TRAPD( trapError,
|
|
2254 |
ret = iMmCallExtInterface->AnswerIncomingDataCallL( iCallId );
|
|
2255 |
);
|
|
2256 |
|
|
2257 |
if ( KErrNone != trapError )
|
|
2258 |
{
|
|
2259 |
//error handling. Object cannot be created.
|
|
2260 |
ret = trapError;
|
|
2261 |
}
|
|
2262 |
|
|
2263 |
if ( KErrNone == ret )
|
|
2264 |
{
|
|
2265 |
// SOS architechture Call Back functionality tries to answer
|
|
2266 |
// incoming call even before the current MO call is fully
|
|
2267 |
// released. This is done by dialup agent (CsdAgx/CsdAgt),
|
|
2268 |
// which does not wait for the previous call to get
|
|
2269 |
// disconnected. As the call is now answered, NULL the pointer
|
|
2270 |
// to this CMmDataCallTsy object from CMmPhoneTsy.
|
|
2271 |
iMmPhone->SetWaitingCallForData( NULL );
|
|
2272 |
}
|
|
2273 |
}
|
|
2274 |
|
|
2275 |
// ---------------------------------------------------------------------------
|
|
2276 |
// CMmDataCallTsy::IsFinishedData
|
|
2277 |
// Returns boolean that indicates if call object is already been used in
|
|
2278 |
// data calls. This means that call has been already released or disconnected.
|
|
2279 |
// (other items were commented in a header).
|
|
2280 |
// ---------------------------------------------------------------------------
|
|
2281 |
//
|
|
2282 |
TBool CMmDataCallTsy::IsFinishedData() const
|
|
2283 |
{
|
|
2284 |
return iIsFinishedDataCall;
|
|
2285 |
}
|
|
2286 |
|
|
2287 |
// ---------------------------------------------------------------------------
|
|
2288 |
// CMmDataCallTsy::LoanDataPort
|
|
2289 |
// This CORE API method loans dataport to client.
|
|
2290 |
// (other items were commented in a header).
|
|
2291 |
// ---------------------------------------------------------------------------
|
|
2292 |
//
|
|
2293 |
TInt CMmDataCallTsy::LoanDataPort(
|
|
2294 |
const TTsyReqHandle aTsyReqHandle,
|
|
2295 |
RCall::TCommPort* aCommPort )
|
|
2296 |
{
|
|
2297 |
TFLOGSTRING2("TSY: CMmDataCallTsy::LoanDataPort - Client taking control: %S",
|
|
2298 |
&iCallName );
|
|
2299 |
|
|
2300 |
TInt ret( KErrNone );
|
|
2301 |
|
|
2302 |
// Check if the port is loaned!
|
|
2303 |
if ( iLoanedCommPort.iPort.Compare( KNullDesC) == 0 )
|
|
2304 |
{
|
|
2305 |
// Check ownership
|
|
2306 |
TCallOwnership ownerShip = CheckOwnership( aTsyReqHandle );
|
|
2307 |
// If not yet owned, take ownership.
|
|
2308 |
if ( EOwnedUnowned == ownerShip || EOwnedPriorityClient == ownerShip )
|
|
2309 |
{
|
|
2310 |
SetOwnership( aTsyReqHandle );
|
|
2311 |
}
|
|
2312 |
// Else check if this req handle already owns the call.
|
|
2313 |
else if ( CCallBase::EOwnedTrue != ownerShip )
|
|
2314 |
{
|
|
2315 |
ret = KErrEtelNotCallOwner;
|
|
2316 |
}
|
|
2317 |
|
|
2318 |
// If port can be loaned, request access to dataport
|
|
2319 |
if ( ret == KErrNone )
|
|
2320 |
{
|
|
2321 |
//Create package
|
|
2322 |
CCallDataPackage package;
|
|
2323 |
//Set call id and call mode
|
|
2324 |
package.SetCallIdAndMode( iCallId, iCallMode );
|
|
2325 |
//Pack commport
|
|
2326 |
package.PackData( aCommPort );
|
|
2327 |
|
|
2328 |
//Send request to the Domestic OS layer.
|
|
2329 |
TRAPD( trapError,
|
|
2330 |
ret = iMessageManager->HandleRequestL(
|
|
2331 |
EEtelCallLoanDataPort, &package );
|
|
2332 |
);
|
|
2333 |
|
|
2334 |
if ( KErrNone != trapError )
|
|
2335 |
{
|
|
2336 |
//error handling, leaved.
|
|
2337 |
ret = trapError;
|
|
2338 |
}
|
|
2339 |
|
|
2340 |
if ( KErrNone == ret )
|
|
2341 |
{
|
|
2342 |
iLoanedCommPort.iCsy.Copy( aCommPort->iCsy );
|
|
2343 |
iLoanedCommPort.iPort.Copy( aCommPort->iPort );
|
|
2344 |
|
|
2345 |
// If dataport was available, changed new call caps and
|
|
2346 |
// complete notification!
|
|
2347 |
iCallCaps.iFlags |=
|
|
2348 |
RCall::KCapsData |
|
|
2349 |
RCall::KCapsHangUp |
|
|
2350 |
RCall::KCapsRecoverDataPort;
|
|
2351 |
iCallCaps.iFlags &= ~( RCall::KCapsLoanDataPort );
|
|
2352 |
|
|
2353 |
iMmCallExtInterface->AddGSMCallCaps(
|
|
2354 |
RCall::KCapsRecoverDataPort );
|
|
2355 |
iMmCallExtInterface->RemoveGSMCallCaps(
|
|
2356 |
RCall::KCapsLoanDataPort );
|
|
2357 |
|
|
2358 |
CompleteNotifyCapsChange();
|
|
2359 |
CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
2360 |
}
|
|
2361 |
else
|
|
2362 |
{
|
|
2363 |
SetUnowned();
|
|
2364 |
}
|
|
2365 |
}
|
|
2366 |
}
|
|
2367 |
else
|
|
2368 |
{
|
|
2369 |
ret = KErrEtelPortAlreadyLoaned;
|
|
2370 |
}
|
|
2371 |
|
|
2372 |
// Complete request if result is KErrNone.
|
|
2373 |
// Return possible error to CCallBase base class because it sets
|
|
2374 |
// iLoanDataport to TRUE if KErrNone is returned. This may cause
|
|
2375 |
// serious problems when the data call object is closed and data port
|
|
2376 |
// is not really loaned. ETel completes request in case where error is
|
|
2377 |
// returned.
|
|
2378 |
if ( KErrNone == ret )
|
|
2379 |
{
|
|
2380 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2381 |
}
|
|
2382 |
|
|
2383 |
return ret;
|
|
2384 |
}
|
|
2385 |
|
|
2386 |
// ---------------------------------------------------------------------------
|
|
2387 |
// CMmDataCallTsy::LoanDataPortCancel
|
|
2388 |
// Cancels dataport loaning to client. LoanDataPort always
|
|
2389 |
// completes immediately, this is never used.
|
|
2390 |
// (other items were commented in a header).
|
|
2391 |
// ---------------------------------------------------------------------------
|
|
2392 |
//
|
|
2393 |
TInt CMmDataCallTsy::LoanDataPortCancel(
|
|
2394 |
const TTsyReqHandle )
|
|
2395 |
{
|
|
2396 |
return KErrNone;
|
|
2397 |
}
|
|
2398 |
|
|
2399 |
// ---------------------------------------------------------------------------
|
|
2400 |
// CMmDataCallTsy::RecoverDataPort
|
|
2401 |
// This CORE API method recovers dataport from client.
|
|
2402 |
// (other items were commented in a header).
|
|
2403 |
// ---------------------------------------------------------------------------
|
|
2404 |
//
|
|
2405 |
TInt CMmDataCallTsy::RecoverDataPort(
|
|
2406 |
const TTsyReqHandle aTsyReqHandle )
|
|
2407 |
{
|
|
2408 |
TFLOGSTRING2("TSY: CMmDataCallTsy::RecoverDataPort - Client returning control: %S",
|
|
2409 |
&iCallName );
|
|
2410 |
|
|
2411 |
TInt ret( KErrNone );
|
|
2412 |
|
|
2413 |
// Check if the port is loaned!
|
|
2414 |
if ( iLoanedCommPort.iPort.Compare( KNullDesC) != 0 )
|
|
2415 |
{
|
|
2416 |
//Create package
|
|
2417 |
CCallDataPackage package;
|
|
2418 |
//Set call id and call mode
|
|
2419 |
package.SetCallIdAndMode( iCallId, iCallMode );
|
|
2420 |
//Pack commport
|
|
2421 |
package.PackData( &iLoanedCommPort );
|
|
2422 |
|
|
2423 |
//Send request to the Domestic OS layer.
|
|
2424 |
TRAPD( trapError,
|
|
2425 |
ret = iMessageManager->HandleRequestL(
|
|
2426 |
EEtelCallRecoverDataPort, &package );
|
|
2427 |
);
|
|
2428 |
|
|
2429 |
if ( KErrNone != trapError )
|
|
2430 |
{
|
|
2431 |
//error handling, leaved.
|
|
2432 |
ret = trapError;
|
|
2433 |
}
|
|
2434 |
|
|
2435 |
iLoanedCommPort.iCsy.Zero();
|
|
2436 |
iLoanedCommPort.iPort.Zero();
|
|
2437 |
|
|
2438 |
// Set new call caps!
|
|
2439 |
iCallCaps.iFlags |= RCall::KCapsLoanDataPort;
|
|
2440 |
iCallCaps.iFlags &= ~( RCall::KCapsRecoverDataPort );
|
|
2441 |
|
|
2442 |
iMmCallExtInterface->AddGSMCallCaps(
|
|
2443 |
RCall::KCapsLoanDataPort );
|
|
2444 |
iMmCallExtInterface->RemoveGSMCallCaps(
|
|
2445 |
RCall::KCapsRecoverDataPort );
|
|
2446 |
}
|
|
2447 |
else
|
|
2448 |
{
|
|
2449 |
ret = KErrEtelPortNotLoanedToClient;
|
|
2450 |
}
|
|
2451 |
|
|
2452 |
if(0 != aTsyReqHandle)
|
|
2453 |
{
|
|
2454 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2455 |
}
|
|
2456 |
|
|
2457 |
return KErrNone;
|
|
2458 |
}
|
|
2459 |
|
|
2460 |
// ---------------------------------------------------------------------------
|
|
2461 |
// CMmDataCallTsy::RecoverDataPortAndRelinquishOwnership
|
|
2462 |
// Recovers dataport from client and relinquishes ownership.
|
|
2463 |
// (other items were commented in a header).
|
|
2464 |
// ---------------------------------------------------------------------------
|
|
2465 |
//
|
|
2466 |
TInt CMmDataCallTsy::RecoverDataPortAndRelinquishOwnership()
|
|
2467 |
{
|
|
2468 |
TFLOGSTRING2("TSY: CMmDataCallTsy::RecoverDataPortAndRelinquishOwnership - \
|
|
2469 |
Client returning control: %S", &iCallName );
|
|
2470 |
|
|
2471 |
TInt ret( KErrNone );
|
|
2472 |
|
|
2473 |
// Check if the port is loaned!
|
|
2474 |
if ( iLoanedCommPort.iPort.Compare( KNullDesC) != 0 )
|
|
2475 |
{
|
|
2476 |
//Create package
|
|
2477 |
CCallDataPackage package;
|
|
2478 |
//Set call id and call mode
|
|
2479 |
package.SetCallIdAndMode( iCallId, iCallMode );
|
|
2480 |
//Pack commport
|
|
2481 |
package.PackData( &iLoanedCommPort );
|
|
2482 |
|
|
2483 |
//Send request to the Domestic OS layer.
|
|
2484 |
TRAPD( trapError,
|
|
2485 |
ret = iMessageManager->HandleRequestL(
|
|
2486 |
EEtelCallRecoverDataPort, &package );
|
|
2487 |
);
|
|
2488 |
|
|
2489 |
if ( KErrNone != trapError )
|
|
2490 |
{
|
|
2491 |
//error handling, leaved.
|
|
2492 |
ret = trapError;
|
|
2493 |
}
|
|
2494 |
|
|
2495 |
iLoanedCommPort.iCsy.Zero();
|
|
2496 |
iLoanedCommPort.iPort.Zero();
|
|
2497 |
|
|
2498 |
if ( iList->iAcquireList.IsEmpty() )
|
|
2499 |
{
|
|
2500 |
SetUnowned();
|
|
2501 |
|
|
2502 |
if ( KErrNone == ret )
|
|
2503 |
{
|
|
2504 |
// Call owner is closing data call handle. Call
|
|
2505 |
// RecoverDataPortAndRelinquishOwnershipCompleted method.
|
|
2506 |
RecoverDataPortAndRelinquishOwnershipCompleted( KErrNone );
|
|
2507 |
}
|
|
2508 |
}
|
|
2509 |
else
|
|
2510 |
{
|
|
2511 |
CAcquireEntry* entry = iList->iAcquireList.First();
|
|
2512 |
if ( entry )
|
|
2513 |
{
|
|
2514 |
SetOwnership( entry->iTsyReqHandle );
|
|
2515 |
ReqCompleted( entry->iTsyReqHandle, KErrNone );
|
|
2516 |
iList->Remove( entry );
|
|
2517 |
}
|
|
2518 |
// Set new call caps!
|
|
2519 |
iCallCaps.iFlags |= RCall::KCapsLoanDataPort;
|
|
2520 |
iCallCaps.iFlags &= ~( RCall::KCapsRecoverDataPort );
|
|
2521 |
|
|
2522 |
iMmCallExtInterface->AddGSMCallCaps(
|
|
2523 |
RCall::KCapsLoanDataPort );
|
|
2524 |
iMmCallExtInterface->RemoveGSMCallCaps(
|
|
2525 |
RCall::KCapsRecoverDataPort );
|
|
2526 |
}
|
|
2527 |
}
|
|
2528 |
else
|
|
2529 |
{
|
|
2530 |
ret = KErrEtelPortNotLoanedToClient;
|
|
2531 |
}
|
|
2532 |
|
|
2533 |
return ret;
|
|
2534 |
}
|
|
2535 |
|
|
2536 |
// ---------------------------------------------------------------------------
|
|
2537 |
// CMmDataCallTsy::Connect
|
|
2538 |
// Set correct data call attributes, depending on parameter extension.
|
|
2539 |
// (other items were commented in a header).
|
|
2540 |
// ---------------------------------------------------------------------------
|
|
2541 |
//
|
|
2542 |
TInt CMmDataCallTsy::Connect(
|
|
2543 |
const TTsyReqHandle aTsyReqHandle,
|
|
2544 |
const TDesC8* aCallParams )
|
|
2545 |
{
|
|
2546 |
TFLOGSTRING("TSY: CMmDataCallTsy::Connect");
|
|
2547 |
if ( CheckOwnership( aTsyReqHandle ) == CCallBase::EOwnedUnowned )
|
|
2548 |
{
|
|
2549 |
SetOwnership( aTsyReqHandle );
|
|
2550 |
}
|
|
2551 |
TDes8* callParams = reinterpret_cast<TDes8*>(const_cast<TDesC8*> (aCallParams));
|
|
2552 |
if(callParams->MaxLength() == 0)
|
|
2553 |
{
|
|
2554 |
// default parameters...
|
|
2555 |
iCallParams.iSpeakerControl = RCall::EMonitorSpeakerControlAlwaysOff;
|
|
2556 |
iCallParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeOff;
|
|
2557 |
iCallParams.iInterval = 0;
|
|
2558 |
iCallParams.iWaitForDialTone = RCall::EDialToneWait;
|
|
2559 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2560 |
|
|
2561 |
return KErrNone;
|
|
2562 |
}
|
|
2563 |
if(callParams->MaxLength() == sizeof(RCall::TCallParams))
|
|
2564 |
{
|
|
2565 |
// only RCall parameters
|
|
2566 |
RCall::TCallParamsPckg* paramsPckg =
|
|
2567 |
reinterpret_cast<RCall::TCallParamsPckg*>(callParams);
|
|
2568 |
RCall::TCallParams& params = ( *paramsPckg )();
|
|
2569 |
|
|
2570 |
iCallParams.iSpeakerControl = params.iSpeakerControl;
|
|
2571 |
iCallParams.iSpeakerVolume = params.iSpeakerVolume;
|
|
2572 |
iCallParams.iInterval = params.iInterval;
|
|
2573 |
iCallParams.iWaitForDialTone = params.iWaitForDialTone;
|
|
2574 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2575 |
|
|
2576 |
return KErrNone;
|
|
2577 |
}
|
|
2578 |
if(sizeof(RMobileCall::TMobileCallParamsV1) > aCallParams->Length())
|
|
2579 |
{
|
|
2580 |
TFLOGSTRING ("TSY: CMmDataCallTsy::Connect bad size argument");
|
|
2581 |
// Complete the request with appropiate error
|
|
2582 |
return KErrArgument;
|
|
2583 |
}
|
|
2584 |
RMobileCall::TMobileCallParamsV1Pckg* paramsPckgV1 =
|
|
2585 |
reinterpret_cast<RMobileCall::TMobileCallParamsV1Pckg*> ( callParams );
|
|
2586 |
RMobileCall::TMobileCallParamsV1& paramsV1 = ( *paramsPckgV1 )();
|
|
2587 |
|
|
2588 |
if ( CheckOwnership( aTsyReqHandle ) == CCallBase::EOwnedUnowned )
|
|
2589 |
{
|
|
2590 |
SetOwnership( aTsyReqHandle );
|
|
2591 |
}
|
|
2592 |
|
|
2593 |
|
|
2594 |
iCallParams.iSpeakerControl = paramsV1.iSpeakerControl;
|
|
2595 |
iCallParams.iSpeakerVolume = paramsV1.iSpeakerVolume;
|
|
2596 |
iCallParams.iInterval = paramsV1.iInterval;
|
|
2597 |
iCallParams.iWaitForDialTone = paramsV1.iWaitForDialTone;
|
|
2598 |
|
|
2599 |
if ( ( paramsV1.ExtensionId() == KETelExtMultimodeV1 ) ||
|
|
2600 |
( paramsV1.ExtensionId() ==
|
|
2601 |
RMobileCall::KETelMobileDataCallParamsV1 ) ||
|
|
2602 |
( paramsV1.ExtensionId() ==
|
|
2603 |
RMobileCall::KETelMobileDataCallParamsV2 ) ||
|
|
2604 |
( paramsV1.ExtensionId() ==
|
|
2605 |
RMobileCall::KETelMobileDataCallParamsV8 ) ||
|
|
2606 |
( paramsV1.ExtensionId() ==
|
|
2607 |
RMobileCall::KETelMobileHscsdCallParamsV1 )||
|
|
2608 |
( paramsV1.ExtensionId() ==
|
|
2609 |
RMobileCall::KETelMobileHscsdCallParamsV2 )||
|
|
2610 |
( paramsV1.ExtensionId() ==
|
|
2611 |
RMobileCall::KETelMobileHscsdCallParamsV7 )||
|
|
2612 |
( paramsV1.ExtensionId() ==
|
|
2613 |
RMobileCall::KETelMobileHscsdCallParamsV8 ))
|
|
2614 |
{
|
|
2615 |
iCallParams.iIdRestrict = paramsV1.iIdRestrict;
|
|
2616 |
iCallParams.iCug = paramsV1.iCug;
|
|
2617 |
iCallParams.iAutoRedial = paramsV1.iAutoRedial;
|
|
2618 |
}
|
|
2619 |
|
|
2620 |
if ( ( paramsV1.ExtensionId() ==
|
|
2621 |
RMobileCall::KETelMobileDataCallParamsV1 ) ||
|
|
2622 |
( paramsV1.ExtensionId() ==
|
|
2623 |
RMobileCall::KETelMobileDataCallParamsV2 ) ||
|
|
2624 |
( paramsV1.ExtensionId() ==
|
|
2625 |
RMobileCall::KETelMobileDataCallParamsV8 ) ||
|
|
2626 |
( paramsV1.ExtensionId() ==
|
|
2627 |
RMobileCall::KETelMobileHscsdCallParamsV1 )||
|
|
2628 |
( paramsV1.ExtensionId() ==
|
|
2629 |
RMobileCall::KETelMobileHscsdCallParamsV2 )||
|
|
2630 |
( paramsV1.ExtensionId() ==
|
|
2631 |
RMobileCall::KETelMobileHscsdCallParamsV7 )||
|
|
2632 |
( paramsV1.ExtensionId() ==
|
|
2633 |
RMobileCall::KETelMobileHscsdCallParamsV8 ))
|
|
2634 |
{
|
|
2635 |
iMmCallExtInterface->Connect( aCallParams );
|
|
2636 |
}
|
|
2637 |
|
|
2638 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2639 |
|
|
2640 |
|
|
2641 |
return KErrNone;
|
|
2642 |
}
|
|
2643 |
|
|
2644 |
// ---------------------------------------------------------------------------
|
|
2645 |
// CMmDataCallTsy::ConnectChancel
|
|
2646 |
// Cancels connecting of a (data) call (Not Supported).
|
|
2647 |
// (other items were commented in a header).
|
|
2648 |
// ---------------------------------------------------------------------------
|
|
2649 |
//
|
|
2650 |
TInt CMmDataCallTsy::ConnectCancel(
|
|
2651 |
const TTsyReqHandle )
|
|
2652 |
{
|
|
2653 |
return KErrNone;
|
|
2654 |
}
|
|
2655 |
|
|
2656 |
// ---------------------------------------------------------------------------
|
|
2657 |
// CMmDataCallTsy::GetMobileDataCallCaps
|
|
2658 |
// Get data call caps.
|
|
2659 |
// (other items were commented in a header).
|
|
2660 |
// ---------------------------------------------------------------------------
|
|
2661 |
//
|
|
2662 |
TInt CMmDataCallTsy::GetMobileDataCallCaps(
|
|
2663 |
const TTsyReqHandle aTsyReqHandle,
|
|
2664 |
TDes8* aCaps )
|
|
2665 |
{
|
|
2666 |
TInt ret( KErrArgument );
|
|
2667 |
|
|
2668 |
if ( sizeof ( RMobileCall::TMobileCallDataCapsV1 ) <= aCaps->MaxLength() )
|
|
2669 |
{
|
|
2670 |
RMobileCall::TMobileCallDataCapsV1Pckg* callDataCapsV1Pckg =
|
|
2671 |
reinterpret_cast<RMobileCall::TMobileCallDataCapsV1Pckg*>( aCaps );
|
|
2672 |
RMobileCall::TMobileCallDataCapsV1& callDataCapsV1 =
|
|
2673 |
( *callDataCapsV1Pckg )();
|
|
2674 |
|
|
2675 |
if ( KETelExtMultimodeV1 == callDataCapsV1.ExtensionId() )
|
|
2676 |
{
|
|
2677 |
// The call will only have data capabilities if this call has been
|
|
2678 |
// opened from the phone's data line.
|
|
2679 |
ret = KErrNone;
|
|
2680 |
iMmCallExtInterface->GetMobileDataCallCapsV1( callDataCapsV1 );
|
|
2681 |
}
|
|
2682 |
}
|
|
2683 |
|
|
2684 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2685 |
|
|
2686 |
return KErrNone;
|
|
2687 |
}
|
|
2688 |
|
|
2689 |
// ---------------------------------------------------------------------------
|
|
2690 |
// CMmDataCallTsy::NotifyMobileDataCallCapsChange
|
|
2691 |
// Notifies change of the data call capabilities.
|
|
2692 |
// (other items were commented in a header).
|
|
2693 |
// ---------------------------------------------------------------------------
|
|
2694 |
//
|
|
2695 |
TInt CMmDataCallTsy::NotifyMobileDataCallCapsChange(
|
|
2696 |
const TTsyReqHandle,
|
|
2697 |
TDes8* aCaps )
|
|
2698 |
{
|
|
2699 |
TInt ret( KErrArgument );
|
|
2700 |
|
|
2701 |
if ( sizeof ( RMobileCall::TMobileCallDataCapsV1 ) <= aCaps->MaxLength() )
|
|
2702 |
{
|
|
2703 |
RMobileCall::TMobileCallDataCapsV1Pckg* callDataCapsV1Pckg =
|
|
2704 |
reinterpret_cast<RMobileCall::TMobileCallDataCapsV1Pckg*>( aCaps );
|
|
2705 |
RMobileCall::TMobileCallDataCapsV1& callDataCapsV1 =
|
|
2706 |
( *callDataCapsV1Pckg )();
|
|
2707 |
|
|
2708 |
if ( KETelExtMultimodeV1 == callDataCapsV1.ExtensionId() )
|
|
2709 |
{
|
|
2710 |
ret = KErrNone;
|
|
2711 |
iRetDataCallCaps = aCaps;
|
|
2712 |
iReqHandleType = EMultimodeCallNotifyDataCallCapsChange;
|
|
2713 |
}
|
|
2714 |
}
|
|
2715 |
|
|
2716 |
return ret;
|
|
2717 |
}
|
|
2718 |
|
|
2719 |
// ---------------------------------------------------------------------------
|
|
2720 |
// CMmDataCallTsy::NotifyMobileDataCallCapsChangeCancel
|
|
2721 |
// Cancels MobileDataCallCaps change notifications.
|
|
2722 |
// (other items were commented in a header).
|
|
2723 |
// ---------------------------------------------------------------------------
|
|
2724 |
//
|
|
2725 |
TInt CMmDataCallTsy::NotifyMobileDataCallCapsChangeCancel(
|
|
2726 |
const TTsyReqHandle aTsyReqHandle )
|
|
2727 |
{
|
|
2728 |
iRetDataCallCaps = NULL;
|
|
2729 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2730 |
EMultimodeCallNotifyDataCallCapsChange );
|
|
2731 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2732 |
|
|
2733 |
return KErrNone;
|
|
2734 |
}
|
|
2735 |
|
|
2736 |
// ---------------------------------------------------------------------------
|
|
2737 |
// CMmDataCallTsy::CompleteNotifyMobileDataCallCapsChange
|
|
2738 |
// Complete a NotifyMobileDataCallCapsChange request.
|
|
2739 |
// (other items were commented in a header).
|
|
2740 |
// ---------------------------------------------------------------------------
|
|
2741 |
//
|
|
2742 |
void CMmDataCallTsy::CompleteNotifyMobileDataCallCapsChange()
|
|
2743 |
{
|
|
2744 |
//reset req handle. Returns the deleted req handle
|
|
2745 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2746 |
EMultimodeCallNotifyDataCallCapsChange );
|
|
2747 |
|
|
2748 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
2749 |
{
|
|
2750 |
RMobileCall::TMobileCallDataCapsV1Pckg* callDataCapsV1Pckg =
|
|
2751 |
reinterpret_cast<RMobileCall::TMobileCallDataCapsV1Pckg*>(
|
|
2752 |
iRetDataCallCaps );
|
|
2753 |
RMobileCall::TMobileCallDataCapsV1& callDataCapsV1 =
|
|
2754 |
( *callDataCapsV1Pckg )();
|
|
2755 |
|
|
2756 |
iMmCallExtInterface->GetMobileDataCallCapsV1( callDataCapsV1 );
|
|
2757 |
|
|
2758 |
iRetDataCallCaps = NULL;
|
|
2759 |
|
|
2760 |
ReqCompleted( reqHandle, KErrNone );
|
|
2761 |
}
|
|
2762 |
}
|
|
2763 |
|
|
2764 |
// ---------------------------------------------------------------------------
|
|
2765 |
// CMmDataCallTsy::GetBearerServiceInfo
|
|
2766 |
// Get bearer service info.
|
|
2767 |
// (other items were commented in a header).
|
|
2768 |
// ---------------------------------------------------------------------------
|
|
2769 |
//
|
|
2770 |
TInt CMmDataCallTsy::GetBearerServiceInfo(
|
|
2771 |
const TTsyReqHandle aTsyReqHandle,
|
|
2772 |
RCall::TBearerService* aBearerService )
|
|
2773 |
{
|
|
2774 |
// If the call is not connected, the request will return KErrNotFound.
|
|
2775 |
TInt ret( KErrNotFound );
|
|
2776 |
// Reset info variables. Info is also unknown for voice call.
|
|
2777 |
aBearerService->iBearerCaps =
|
|
2778 |
RCall::KBearerCapsCompressionNone | RCall::KBearerCapsProtocolUnknown;
|
|
2779 |
aBearerService->iBearerSpeed = RCall::EBearerDataUnknown;
|
|
2780 |
|
|
2781 |
if ( RCall::EStatusConnected == iCallStatus )
|
|
2782 |
{
|
|
2783 |
ret = iMmCallExtInterface->GetBearerServiceInfo( aBearerService );
|
|
2784 |
}
|
|
2785 |
|
|
2786 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2787 |
|
|
2788 |
return KErrNone;
|
|
2789 |
}
|
|
2790 |
|
|
2791 |
// ---------------------------------------------------------------------------
|
|
2792 |
// CMmDataCallTsy::SetDynamicHscsdParams
|
|
2793 |
// Set HSCSD dynamic data parameters.
|
|
2794 |
// (other items were commented in a header).
|
|
2795 |
// ---------------------------------------------------------------------------
|
|
2796 |
//
|
|
2797 |
TInt CMmDataCallTsy::SetDynamicHscsdParams(
|
|
2798 |
const TTsyReqHandle aTsyReqHandle,
|
|
2799 |
RMobileCall::TMobileCallAiur* aAiur,
|
|
2800 |
TInt* aRxTimeslots )
|
|
2801 |
{
|
|
2802 |
TInt ret( KErrNone );
|
|
2803 |
// HSCSD parameters can be set only if this call has been opened
|
|
2804 |
// from the phone's data line.
|
|
2805 |
TFLOGSTRING3("TSY: CMmDataCallTsy::SetDynamicHscsdParams.\n \t\t\t Air Intrf: %d\n \t\t\t RX slots: %d",
|
|
2806 |
*aAiur, *aRxTimeslots);
|
|
2807 |
|
|
2808 |
iReqHandleType = EMultimodeCallSetDynamicHscsdParams;
|
|
2809 |
|
|
2810 |
TRAP_IGNORE(
|
|
2811 |
ret = iMmCallExtInterface->SetDynamicHscsdParamsL(
|
|
2812 |
aAiur, aRxTimeslots );
|
|
2813 |
);
|
|
2814 |
|
|
2815 |
// If not a data call or extension returned error.
|
|
2816 |
if ( KErrNone != ret )
|
|
2817 |
{
|
|
2818 |
ReqCompleted( aTsyReqHandle, KErrNotFound );
|
|
2819 |
}
|
|
2820 |
|
|
2821 |
return KErrNone;
|
|
2822 |
}
|
|
2823 |
|
|
2824 |
// ---------------------------------------------------------------------------
|
|
2825 |
// CMmDataCallTsy::SetDynamicHscsdParamsCancel
|
|
2826 |
// Cancel SetDynamicHscsdParams request.
|
|
2827 |
// Not possible, as SetDynamicHscsdParams request is completed immediately.
|
|
2828 |
// (other items were commented in a header).
|
|
2829 |
// ---------------------------------------------------------------------------
|
|
2830 |
//
|
|
2831 |
TInt CMmDataCallTsy::SetDynamicHscsdParamsCancel(
|
|
2832 |
const TTsyReqHandle ) const
|
|
2833 |
{
|
|
2834 |
return KErrNone;
|
|
2835 |
}
|
|
2836 |
|
|
2837 |
// ---------------------------------------------------------------------------
|
|
2838 |
// CMmDataCallTsy::CompleteSetDynamicHscsdParams
|
|
2839 |
// Complete a SetDynamicHscsdParams request.
|
|
2840 |
// (other items were commented in a header).
|
|
2841 |
// ---------------------------------------------------------------------------
|
|
2842 |
//
|
|
2843 |
void CMmDataCallTsy::CompleteSetDynamicHscsdParams(
|
|
2844 |
TInt aErrorCode )
|
|
2845 |
{
|
|
2846 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteSetDynamicHscsdParams");
|
|
2847 |
//reset req handle. Returns the deleted req handle
|
|
2848 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2849 |
EMultimodeCallSetDynamicHscsdParams );
|
|
2850 |
|
|
2851 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
2852 |
{
|
|
2853 |
ReqCompleted( reqHandle, aErrorCode );
|
|
2854 |
}
|
|
2855 |
}
|
|
2856 |
|
|
2857 |
// ---------------------------------------------------------------------------
|
|
2858 |
// CMmDataCallTsy::GetCurrentHscsdInfo
|
|
2859 |
// Get current HSCSD info.
|
|
2860 |
// (other items were commented in a header).
|
|
2861 |
// ---------------------------------------------------------------------------
|
|
2862 |
//
|
|
2863 |
TInt CMmDataCallTsy::GetCurrentHscsdInfo(
|
|
2864 |
const TTsyReqHandle aTsyReqHandle,
|
|
2865 |
TDes8* aHSCSDInfo )
|
|
2866 |
{
|
|
2867 |
TFLOGSTRING("TSY: CMmDataCallTsy::GetCurrentHscsdInfo");
|
|
2868 |
TInt ret( KErrNone );
|
|
2869 |
// HSCSD info can be read only if this call has been opened from the
|
|
2870 |
// phone's data line and call is connected.
|
|
2871 |
// Connected here means that TSY gas has received CONNECT: XXXX from modem
|
|
2872 |
// When CONNECT: XXXX has been received, TSY has completed clients request
|
|
2873 |
// which can be dial or answer.
|
|
2874 |
// Thus those req handles should be unknown, otherwise the call is not yet
|
|
2875 |
// connected.
|
|
2876 |
if ( ( EMultimodeCallReqHandleUnknown ==
|
|
2877 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallDial ) ) &&
|
|
2878 |
( EMultimodeCallReqHandleUnknown ==
|
|
2879 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallAnswer ) ) &&
|
|
2880 |
( EMultimodeCallReqHandleUnknown ==
|
|
2881 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallDialNoFdnCheck ) ) )
|
|
2882 |
{
|
|
2883 |
ret = iMmCallExtInterface->GetCurrentHscsdInfo( aHSCSDInfo );
|
|
2884 |
}
|
|
2885 |
else
|
|
2886 |
{
|
|
2887 |
RMobileCall::TMobileCallHscsdInfoV1Pckg* hscsdInfoPckg =
|
|
2888 |
reinterpret_cast<RMobileCall::TMobileCallHscsdInfoV1Pckg*>(
|
|
2889 |
aHSCSDInfo );
|
|
2890 |
RMobileCall::TMobileCallHscsdInfoV1& hscsdInfo = (*hscsdInfoPckg)();
|
|
2891 |
|
|
2892 |
hscsdInfo.iAiur = RMobileCall::EAiurBpsUnspecified;
|
|
2893 |
hscsdInfo.iRxTimeSlots = 0;
|
|
2894 |
hscsdInfo.iTxTimeSlots = 0;
|
|
2895 |
hscsdInfo.iCodings = RMobileCall::ETchCodingUnspecified;
|
|
2896 |
|
|
2897 |
ret = KErrEtelCallNotActive;
|
|
2898 |
}
|
|
2899 |
|
|
2900 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2901 |
|
|
2902 |
return KErrNone;
|
|
2903 |
}
|
|
2904 |
|
|
2905 |
// ---------------------------------------------------------------------------
|
|
2906 |
// CMmDataCallTsy::NotifyHscsdInfoChange
|
|
2907 |
// Notifies change of the HSCSD info.
|
|
2908 |
// (other items were commented in a header).
|
|
2909 |
// ---------------------------------------------------------------------------
|
|
2910 |
//
|
|
2911 |
TInt CMmDataCallTsy::NotifyHscsdInfoChange(
|
|
2912 |
const TTsyReqHandle,
|
|
2913 |
TDes8* aHSCSDInfo )
|
|
2914 |
{
|
|
2915 |
// HSCSD info can be read only if this call has been opened
|
|
2916 |
// from the phone's data line.
|
|
2917 |
// Save request handle and ptr to aHSCSDInfo.
|
|
2918 |
iRetHscsdInfo = aHSCSDInfo;
|
|
2919 |
iReqHandleType = EMultimodeCallNotifyHscsdInfoChange;
|
|
2920 |
|
|
2921 |
return KErrNone;
|
|
2922 |
}
|
|
2923 |
|
|
2924 |
// ---------------------------------------------------------------------------
|
|
2925 |
// CMmDataCallTsy::NotifyHscsdInfoChangeCancel
|
|
2926 |
// Cancels HSCSD info change notifications.
|
|
2927 |
// (other items were commented in a header).
|
|
2928 |
// ---------------------------------------------------------------------------
|
|
2929 |
//
|
|
2930 |
TInt CMmDataCallTsy::NotifyHscsdInfoChangeCancel(
|
|
2931 |
const TTsyReqHandle aTsyReqHandle )
|
|
2932 |
{
|
|
2933 |
TInt ret( KErrNone );
|
|
2934 |
|
|
2935 |
iRetHscsdInfo = NULL;
|
|
2936 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2937 |
EMultimodeCallNotifyHscsdInfoChange );
|
|
2938 |
ret = KErrCancel;
|
|
2939 |
|
|
2940 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2941 |
|
|
2942 |
return KErrNone;
|
|
2943 |
}
|
|
2944 |
|
|
2945 |
// ---------------------------------------------------------------------------
|
|
2946 |
// CMmDataCallTsy::CompleteNotifyHscsdInfoChange
|
|
2947 |
// Complete a NotifyHscsdInfoChange request.
|
|
2948 |
// (other items were commented in a header).
|
|
2949 |
// ---------------------------------------------------------------------------
|
|
2950 |
//
|
|
2951 |
void CMmDataCallTsy::CompleteNotifyHscsdInfoChange()
|
|
2952 |
{
|
|
2953 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteNotifyHscsdInfoChange");
|
|
2954 |
//reset req handle. Returns the deleted req handle
|
|
2955 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2956 |
EMultimodeCallNotifyHscsdInfoChange );
|
|
2957 |
|
|
2958 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
2959 |
{
|
|
2960 |
TInt ret = iMmCallExtInterface->GetCurrentHscsdInfo( iRetHscsdInfo );
|
|
2961 |
iRetHscsdInfo = NULL;
|
|
2962 |
ReqCompleted( reqHandle, ret );
|
|
2963 |
}
|
|
2964 |
}
|
|
2965 |
|
|
2966 |
// ---------------------------------------------------------------------------
|
|
2967 |
// CMmDataCallTsy::GetMobileDataCallRLPRange
|
|
2968 |
// Get Data Call RLP Range.
|
|
2969 |
// (other items were commented in a header).
|
|
2970 |
// ---------------------------------------------------------------------------
|
|
2971 |
//
|
|
2972 |
TInt CMmDataCallTsy::GetMobileDataCallRLPRange(
|
|
2973 |
const TTsyReqHandle aTsyReqHandle,
|
|
2974 |
TInt*,
|
|
2975 |
TDes8* )
|
|
2976 |
{
|
|
2977 |
ReqCompleted( aTsyReqHandle, KErrNotSupported );
|
|
2978 |
|
|
2979 |
return KErrNone;
|
|
2980 |
}
|
|
2981 |
|
|
2982 |
// ---------------------------------------------------------------------------
|
|
2983 |
// CMmDataCallTsy::DialNoFdnCheck
|
|
2984 |
// This CORE API method dials to the given number.
|
|
2985 |
// (other items were commented in a header).
|
|
2986 |
// ---------------------------------------------------------------------------
|
|
2987 |
//
|
|
2988 |
TInt CMmDataCallTsy::DialNoFdnCheck(
|
|
2989 |
const TTsyReqHandle aTsyReqHandle,
|
|
2990 |
const TDesC8* aCallParams,
|
|
2991 |
TDesC* aTelNumber )
|
|
2992 |
{
|
|
2993 |
TFLOGSTRING3("TSY: CMmDataCallTsy::DialNoFdnCheck - Req handle: %d, Call name: %S",
|
|
2994 |
aTsyReqHandle, &iCallName);
|
|
2995 |
|
|
2996 |
CMmCallList* callList = iMmPhone->CallList();
|
|
2997 |
TBool dialFlag( EFalse );
|
|
2998 |
|
|
2999 |
for(TInt i=0; i< callList->GetNumberOfObjects();i++)
|
|
3000 |
{
|
|
3001 |
CMmCallTsy* call = callList->GetMmCallByIndex( i );
|
|
3002 |
if( call->GetDialFlag() )
|
|
3003 |
{
|
|
3004 |
dialFlag = ETrue;
|
|
3005 |
i= callList->GetNumberOfObjects();
|
|
3006 |
}
|
|
3007 |
}
|
|
3008 |
|
|
3009 |
if( !dialFlag )
|
|
3010 |
{
|
|
3011 |
TFLOGSTRING("TSY: CMmDataCallTsy::DialNoFdnCheck ONGOING" );
|
|
3012 |
|
|
3013 |
SetDialFlag( ETrue );
|
|
3014 |
|
|
3015 |
TTsyReqHandle dialHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
3016 |
EMultimodeCallDialNoFdnCheck );
|
|
3017 |
|
|
3018 |
// reset exit code
|
|
3019 |
iLastExitCode = KErrNone;
|
|
3020 |
|
|
3021 |
// reset finished data call flag
|
|
3022 |
iIsFinishedDataCall = EFalse;
|
|
3023 |
|
|
3024 |
if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo() )
|
|
3025 |
{
|
|
3026 |
TFLOGSTRING("TSY: CMmDataCallTsy - DialNoFdnCheck - Offline mode ON, Dial request is not allowed" );
|
|
3027 |
TInt ret = CMmCommonStaticUtility::EpocErrorCode(
|
|
3028 |
KErrGeneral, KErrGsmOfflineOpNotAllowed );
|
|
3029 |
SetDialFlag( EFalse );
|
|
3030 |
TFLOGSTRING("TSY: CMmDataCallTsy::DialNoFdnCheck - RF inactive -> dial-flag false" );
|
|
3031 |
// Complete the request with appropiate error
|
|
3032 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
3033 |
}
|
|
3034 |
|
|
3035 |
// check that status is Idle
|
|
3036 |
else if ( RMobileCall::EStatusIdle != iMobileCallStatus )
|
|
3037 |
{
|
|
3038 |
// Request cannot be forwarded since this call object
|
|
3039 |
// is still in use.
|
|
3040 |
// Complete request with status value informing the client
|
|
3041 |
// about the situation.
|
|
3042 |
TFLOGSTRING("TSY: CMmDataCallTsy::DialNoFdnCheck - KErrNotReady");
|
|
3043 |
ReqCompleted( aTsyReqHandle, KErrNotReady );
|
|
3044 |
}
|
|
3045 |
else if ( 0 < dialHandle )
|
|
3046 |
{
|
|
3047 |
// Request is already in processing because of previous request
|
|
3048 |
// Complete request with status value informing the client about
|
|
3049 |
// the situation.
|
|
3050 |
TFLOGSTRING("TSY: CMmDataCallTsy::DialNoFdnCheck - KErrServerBusy");
|
|
3051 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
3052 |
}
|
|
3053 |
else
|
|
3054 |
{
|
|
3055 |
TInt ret( KErrNone );
|
|
3056 |
TInt trapError( KErrNone );
|
|
3057 |
TCallOwnership ownerShip = EOwnedFalse;
|
|
3058 |
|
|
3059 |
RMobileCall::TMobileCallParamsV1Pckg* paramsPckgV1 =
|
|
3060 |
reinterpret_cast<RMobileCall::TMobileCallParamsV1Pckg*>(
|
|
3061 |
const_cast<TDesC8*>( aCallParams ) );
|
|
3062 |
RMobileCall::TMobileCallParamsV1& paramsV1 = ( *paramsPckgV1 )();
|
|
3063 |
|
|
3064 |
// save call params
|
|
3065 |
iCallParams.iSpeakerControl = paramsV1.iSpeakerControl;
|
|
3066 |
iCallParams.iSpeakerVolume = paramsV1.iSpeakerVolume;
|
|
3067 |
iCallParams.iInterval = paramsV1.iInterval;
|
|
3068 |
iCallParams.iWaitForDialTone = paramsV1.iWaitForDialTone;
|
|
3069 |
|
|
3070 |
// set call direction
|
|
3071 |
iCallDirection = RMobileCall::EMobileOriginated;
|
|
3072 |
|
|
3073 |
// Check if there already is an active or connecting call
|
|
3074 |
TInt numberOfObjects = iMmPhone->CallList()->
|
|
3075 |
GetNumberOfObjects();
|
|
3076 |
for ( TInt i = 0; i < numberOfObjects; i++ )
|
|
3077 |
{
|
|
3078 |
CMmDataCallTsy* mmCall = reinterpret_cast<CMmDataCallTsy*>(
|
|
3079 |
iMmPhone->CallList()->GetMmCallByIndex( i ) );
|
|
3080 |
if ( !( RMobileCall::EStatusUnknown ==
|
|
3081 |
mmCall->MobileCallStatus() ||
|
|
3082 |
RMobileCall::EStatusIdle ==
|
|
3083 |
mmCall->MobileCallStatus() ||
|
|
3084 |
RMobileCall::EStatusDisconnecting ==
|
|
3085 |
mmCall->MobileCallStatus() ||
|
|
3086 |
RMobileCall::EStatusDisconnectingWithInband ==
|
|
3087 |
mmCall->MobileCallStatus() ) )
|
|
3088 |
{
|
|
3089 |
ret = KErrEtelCallAlreadyActive;
|
|
3090 |
break;
|
|
3091 |
}
|
|
3092 |
}
|
|
3093 |
|
|
3094 |
// Return value can also be priorityclient!
|
|
3095 |
ownerShip = CheckOwnership( aTsyReqHandle );
|
|
3096 |
|
|
3097 |
if ( KErrNone == ret && ( EOwnedUnowned == ownerShip ||
|
|
3098 |
EOwnedPriorityClient == ownerShip ) )
|
|
3099 |
{
|
|
3100 |
SetOwnership( aTsyReqHandle );
|
|
3101 |
|
|
3102 |
if ( KErrNone == ret )
|
|
3103 |
{
|
|
3104 |
SetDialTypeId( KMultimodeCallTypeIDNoFdnCheck );
|
|
3105 |
|
|
3106 |
TFLOGSTRING("TSY: CMmDataCallTsy::DialNoFdnCheck - DialDataCall");
|
|
3107 |
TRAP( trapError,
|
|
3108 |
ret = iMmCallExtInterface->DialDataCallL(
|
|
3109 |
iCallMode, aCallParams, aTelNumber );
|
|
3110 |
);
|
|
3111 |
if ( KErrNone != trapError )
|
|
3112 |
{
|
|
3113 |
//error handling. DialDataCall() leaved.
|
|
3114 |
ret = trapError;
|
|
3115 |
}
|
|
3116 |
// If dial succeeded, continue
|
|
3117 |
if ( KErrNone == ret )
|
|
3118 |
{
|
|
3119 |
RPhone::TStatus modemStatus;
|
|
3120 |
modemStatus.iModemDetected = RPhone::EDetectedPresent;
|
|
3121 |
modemStatus.iMode = RPhone::EModeEstablishingLink;
|
|
3122 |
iMmPhone->CompleteNotifyModemDetected( modemStatus );
|
|
3123 |
|
|
3124 |
//update core status
|
|
3125 |
iCallCaps.iFlags &= ~(
|
|
3126 |
RCall::KCapsDial | RCall::KCapsConnect );
|
|
3127 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
3128 |
//complete core caps change
|
|
3129 |
CompleteNotifyCapsChange();
|
|
3130 |
}
|
|
3131 |
}
|
|
3132 |
}
|
|
3133 |
|
|
3134 |
if ( KErrNone != ret )
|
|
3135 |
{
|
|
3136 |
ReqCompleted( aTsyReqHandle, ret );
|
|
3137 |
ClearCallStatus();
|
|
3138 |
}
|
|
3139 |
else
|
|
3140 |
{
|
|
3141 |
#ifdef REQHANDLE_TIMER
|
|
3142 |
// set timer for the request
|
|
3143 |
SetTypeOfResponse( EMultimodeCallDialNoFdnCheck,
|
|
3144 |
aTsyReqHandle );
|
|
3145 |
#else
|
|
3146 |
// set timer
|
|
3147 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
3148 |
EMultimodeCallDialNoFdnCheck, aTsyReqHandle );
|
|
3149 |
#endif
|
|
3150 |
}
|
|
3151 |
}
|
|
3152 |
|
|
3153 |
return KErrNone;
|
|
3154 |
}
|
|
3155 |
else
|
|
3156 |
{
|
|
3157 |
return KErrServerBusy;
|
|
3158 |
}
|
|
3159 |
}
|
|
3160 |
|
|
3161 |
// ---------------------------------------------------------------------------
|
|
3162 |
// CMmDataCallTsy::CompleteDialNoFdn
|
|
3163 |
// Completes a Dial request.
|
|
3164 |
// (other items were commented in a header).
|
|
3165 |
// ---------------------------------------------------------------------------
|
|
3166 |
//
|
|
3167 |
void CMmDataCallTsy::CompleteDialNoFdn(
|
|
3168 |
TInt aResult )
|
|
3169 |
{
|
|
3170 |
TFLOGSTRING2("TSY: CMmDataCallTsy::CompleteDialNoFdn - Result: %d", aResult );
|
|
3171 |
TFLOGSTRING3("TSY: CMmDataCallTsy::CompleteDialNoFdn - Call Id: %d, Call name: %S",
|
|
3172 |
iCallId, &iCallName);
|
|
3173 |
|
|
3174 |
// Set dial flag to false
|
|
3175 |
SetDialFlag( EFalse );
|
|
3176 |
|
|
3177 |
// reset req handle. Returns the deleted req handle
|
|
3178 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3179 |
EMultimodeCallDialNoFdnCheck );
|
|
3180 |
|
|
3181 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
3182 |
{
|
|
3183 |
if ( aResult != KErrNone )
|
|
3184 |
{
|
|
3185 |
// The creation has failed.
|
|
3186 |
iLastExitCode = aResult;
|
|
3187 |
ClearCallStatus();
|
|
3188 |
|
|
3189 |
//Dial has failed, update core status - dial possible again
|
|
3190 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
3191 |
iCallCaps.iFlags &= ~( RCall::KCapsHangUp );
|
|
3192 |
|
|
3193 |
//complete caps change notification
|
|
3194 |
CompleteNotifyCapsChange();
|
|
3195 |
}
|
|
3196 |
TFLOGSTRING2("TSY: CMmDataCallTsy::CompleteDialNoFdn before ReqComplete %d", aResult );
|
|
3197 |
ReqCompleted( reqHandle, aResult );
|
|
3198 |
|
|
3199 |
TFLOGSTRING("TSY: CMmDataCallTsy::CompleteDialNoFdn - set dialtype to none ");
|
|
3200 |
//Set dial type to none
|
|
3201 |
SetDialTypeId( KMultimodeCallTypeDialNone );
|
|
3202 |
}
|
|
3203 |
|
|
3204 |
// Set also new call caps to enable dataport loaning!
|
|
3205 |
if ( RCall::EStatusConnected == iCallStatus &&
|
|
3206 |
KErrNone == aResult )
|
|
3207 |
{
|
|
3208 |
iCallCaps.iFlags |= RCall::KCapsLoanDataPort;
|
|
3209 |
iMmCallExtInterface->AddGSMCallCaps(
|
|
3210 |
RCall::KCapsLoanDataPort );
|
|
3211 |
|
|
3212 |
//complete caps change notification
|
|
3213 |
CompleteNotifyCapsChange();
|
|
3214 |
CompleteNotifyMobileCallCapsChange( KErrNone );
|
|
3215 |
}
|
|
3216 |
}
|
|
3217 |
|
|
3218 |
#ifdef TF_LOGGING_ENABLED
|
|
3219 |
// ---------------------------------------------------------------------------
|
|
3220 |
// CMmCallTsy::ReqCompleted
|
|
3221 |
// Overloads CTelObject::ReqCompleted for logging purposes. It prints the
|
|
3222 |
// aTsyReqHandle and aError variable in the log file and then calls
|
|
3223 |
// CTelObject::ReqCompleted.
|
|
3224 |
// (other items were commented in a header).
|
|
3225 |
// ---------------------------------------------------------------------------
|
|
3226 |
//
|
|
3227 |
void CMmDataCallTsy::ReqCompleted(
|
|
3228 |
const TTsyReqHandle aTsyReqHandle,
|
|
3229 |
const TInt aError )
|
|
3230 |
{
|
|
3231 |
//Overloads CTelObject::ReqCompleted for logging purposes. It
|
|
3232 |
//prints the aTsyReqHandle and aError variable in the log file and then
|
|
3233 |
//calls CTelObject::ReqCompleted.
|
|
3234 |
TFLOGSTRING3("TSY: CMmDataCallTsy::Request Completed. Handle:%d Error:%d", aTsyReqHandle, aError);
|
|
3235 |
|
|
3236 |
CTelObject::ReqCompleted(aTsyReqHandle,aError);
|
|
3237 |
}
|
|
3238 |
#endif
|
|
3239 |
|
|
3240 |
// End of File
|