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 "cmmcalltsy.h"
|
|
20 |
#include <featmgr/featurecontrol.h>
|
|
21 |
#include <featureuids.h>
|
|
22 |
#include "cmmphonetsy.h"
|
|
23 |
#include "cmmlinetsy.h"
|
|
24 |
#include "cmmtsyreqhandlestore.h"
|
|
25 |
#include "cmmcalllist.h"
|
|
26 |
#include "CMmCommonStaticUtility.h"
|
|
27 |
#include "cmmlinelist.h"
|
|
28 |
#include "cmmmessagemanagerbase.h"
|
|
29 |
#include <ctsy/pluginapi/cmmdatapackage.h>
|
|
30 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
31 |
#include "cmmcallgsmwcdmaext.h"
|
|
32 |
#include <ctsy/pluginapi/mtelephonyaudiocontrol.h>
|
|
33 |
|
|
34 |
// ======== MEMBER FUNCTIONS ========
|
|
35 |
|
|
36 |
CMmCallTsy::CMmCallTsy() :
|
|
37 |
iCallParamsPckg(iCallParams),
|
|
38 |
iReqHandleType(EMultimodeCallReqHandleUnknown)
|
|
39 |
{
|
|
40 |
}
|
|
41 |
|
|
42 |
void CMmCallTsy::ConstructL(
|
|
43 |
RMobilePhone::TMobileService aMode )
|
|
44 |
{
|
|
45 |
#ifdef REQHANDLE_TIMER
|
|
46 |
//Create req handle store
|
|
47 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( this, iMmPhone,
|
|
48 |
EMultimodeCallMaxNumOfRequests, iCallReqHandles);
|
|
49 |
#else
|
|
50 |
//Create req handle store
|
|
51 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL(
|
|
52 |
EMultimodeCallMaxNumOfRequests, iCallReqHandles);
|
|
53 |
#endif
|
|
54 |
|
|
55 |
iCallMode = aMode;
|
|
56 |
|
|
57 |
//Call ownership change request list
|
|
58 |
iList = CAcquireOwnerList::NewL();
|
|
59 |
|
|
60 |
//initialise call duration notifier
|
|
61 |
iCallTimer = CHeartbeatRunner::NewL( this );
|
|
62 |
|
|
63 |
//Initialise extension modules
|
|
64 |
InitExtensionModulesL( aMode );
|
|
65 |
|
|
66 |
//Initialise miscellaneous internal attributes
|
|
67 |
InitInternalAttributes();
|
|
68 |
}
|
|
69 |
|
|
70 |
CMmCallTsy::~CMmCallTsy()
|
|
71 |
{
|
|
72 |
TFLOGSTRING3("TSY: CMmCallTsy::~CMmCallTsy. Call deleted iCallId:%d iCallName:%S",iCallId, &iCallName);
|
|
73 |
|
|
74 |
TInt trapError( KErrNone );
|
|
75 |
|
|
76 |
//Hang up call if call is still connecting or active and hang up is not
|
|
77 |
//called
|
|
78 |
if( iTsyReqHandleStore )
|
|
79 |
{
|
|
80 |
if ( !( RMobileCall::EStatusIdle == iMobileCallStatus ||
|
|
81 |
RMobileCall::EStatusDisconnecting == iMobileCallStatus ||
|
|
82 |
RMobileCall::EStatusDisconnectingWithInband == iMobileCallStatus )
|
|
83 |
&& ( 0 == iTsyReqHandleStore->GetTsyReqHandle(
|
|
84 |
EMultimodeCallHangUp ) ) )
|
|
85 |
{
|
|
86 |
TBool timerStarted = EFalse;
|
|
87 |
if( iCallTimer )
|
|
88 |
{
|
|
89 |
timerStarted = iCallTimer->Stop();
|
|
90 |
}
|
|
91 |
//Check air time timer only if call was in active state(call timer
|
|
92 |
//was started)
|
|
93 |
if ( timerStarted )
|
|
94 |
{
|
|
95 |
if( iMmPhone )
|
|
96 |
{
|
|
97 |
iMmPhone->AirTimeTimerCheckStop();
|
|
98 |
//TODO: attention reviewers - please check if UpdateLifeTimer should/shouldn't be called here
|
|
99 |
UpdateLifeTimer();
|
|
100 |
}
|
|
101 |
}
|
|
102 |
|
|
103 |
//Send call release request before deleting this object
|
|
104 |
TInt symbianHangUpCause( KErrGsmReleaseByUser );
|
|
105 |
|
|
106 |
//Create package
|
|
107 |
CCallDataPackage package;
|
|
108 |
//Set call id and call mode
|
|
109 |
package.SetCallIdAndMode( iCallId, iCallMode );
|
|
110 |
|
|
111 |
TBool autoStChangeDisable = EFalse;
|
|
112 |
//Pack call parameters and mobile call info
|
|
113 |
package.PackData( &symbianHangUpCause, &autoStChangeDisable );
|
|
114 |
//Send request to the Domestic OS layer.
|
|
115 |
if( iMessageManager )
|
|
116 |
{
|
|
117 |
TRAP( trapError,
|
|
118 |
iMessageManager->HandleRequestL( EEtelCallHangUp, &package );
|
|
119 |
);
|
|
120 |
// inform telephony audio control that we're hanging up the call
|
|
121 |
if ( iTelephonyAudioControlSetup && iTelephonyAudioControl )
|
|
122 |
{
|
|
123 |
iTelephonyAudioControl->TeardownTelephonyAudio( iCallName,
|
|
124 |
KErrNone );
|
|
125 |
TFLOGSTRING2("TSY: CMmCallTsy::~CMmCallTsy Call routing tear down: Call name:%S", &iCallName );
|
|
126 |
}
|
|
127 |
|
|
128 |
}
|
|
129 |
|
|
130 |
// We can't do nothing if hanguprequest fails here,
|
|
131 |
// because call object is closed.
|
|
132 |
}
|
|
133 |
}
|
|
134 |
|
|
135 |
//delete req handle store
|
|
136 |
if ( iTsyReqHandleStore )
|
|
137 |
{
|
|
138 |
delete iTsyReqHandleStore;
|
|
139 |
}
|
|
140 |
iTsyReqHandleStore = NULL;
|
|
141 |
|
|
142 |
//delete req handle store
|
|
143 |
if ( iList )
|
|
144 |
{
|
|
145 |
delete iList;
|
|
146 |
}
|
|
147 |
iList = NULL;
|
|
148 |
|
|
149 |
//delete call ownership change request list
|
|
150 |
if ( iCallTimer )
|
|
151 |
{
|
|
152 |
delete iCallTimer;
|
|
153 |
}
|
|
154 |
iCallTimer = NULL;
|
|
155 |
|
|
156 |
//Decrement number of opened calls from line.
|
|
157 |
if( iMmLine )
|
|
158 |
{
|
|
159 |
iMmLine->DecrementNumberOfCalls();
|
|
160 |
}
|
|
161 |
|
|
162 |
// Remove the call from the list of calls
|
|
163 |
if( iMmPhone )
|
|
164 |
{
|
|
165 |
iMmPhone->CallList()->RemoveObject( this );
|
|
166 |
}
|
|
167 |
|
|
168 |
//delete call extension
|
|
169 |
if ( iMmCallExtInterface )
|
|
170 |
{
|
|
171 |
delete iMmCallExtInterface;
|
|
172 |
}
|
|
173 |
iMmCallExtInterface = NULL;
|
|
174 |
|
|
175 |
iMmPhone = NULL;
|
|
176 |
iMmLine = NULL;
|
|
177 |
iCallTimer = NULL;
|
|
178 |
iRetNotifyMobileCallCaps = NULL;
|
|
179 |
iRetCaps = NULL;
|
|
180 |
iRetStatus = NULL;
|
|
181 |
iRetMobileCallStatus = NULL;
|
|
182 |
iRetRemotePartyInfo = NULL;
|
|
183 |
iRetTimeIntervalSeconds = NULL;
|
|
184 |
iRetCallEvent = NULL;
|
|
185 |
iList = NULL;
|
|
186 |
iTsyReqHandleStore = NULL;
|
|
187 |
iRetPrivacyStatus = NULL;
|
|
188 |
iMessageManager = NULL;
|
|
189 |
iRetUUI = NULL;
|
|
190 |
}
|
|
191 |
|
|
192 |
// ---------------------------------------------------------------------------
|
|
193 |
// CMmCallTsy::InitExtensionModulesL
|
|
194 |
// Initialises extension modules for CMmCallTsy
|
|
195 |
// (other items were commented in a header).
|
|
196 |
// ---------------------------------------------------------------------------
|
|
197 |
//
|
|
198 |
void CMmCallTsy::InitExtensionModulesL(
|
|
199 |
RMobilePhone::TMobileService aMode )
|
|
200 |
{
|
|
201 |
RMobilePhone::TMobilePhoneNetworkMode currentMode;
|
|
202 |
iMmPhone->GetStaticExtensionMode( ¤tMode );
|
|
203 |
|
|
204 |
iMmCallExtInterface = reinterpret_cast<CMmCallExtInterface*>
|
|
205 |
(CMmCallGsmWcdmaExt::NewL( this, aMode, iMessageManager ) );
|
|
206 |
|
|
207 |
}
|
|
208 |
|
|
209 |
// ---------------------------------------------------------------------------
|
|
210 |
// CMmCallTsy::InitInternalAttributes
|
|
211 |
// Initialises miscellaneous internal attributes.
|
|
212 |
// (other items were commented in a header).
|
|
213 |
// ---------------------------------------------------------------------------
|
|
214 |
//
|
|
215 |
void CMmCallTsy::InitInternalAttributes()
|
|
216 |
{
|
|
217 |
//Set status parameters
|
|
218 |
iCallStatus = RCall::EStatusIdle;
|
|
219 |
iMobileCallStatus = RMobileCall::EStatusIdle;
|
|
220 |
|
|
221 |
//Initialise call params
|
|
222 |
iCallParams.iSpeakerControl = RCall::EMonitorSpeakerControlOnUntilCarrier;
|
|
223 |
iCallParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeLow;
|
|
224 |
iCallParams.iInterval = 4;
|
|
225 |
iCallParams.iWaitForDialTone = RCall::EDialToneWait;
|
|
226 |
iCallParams.iIdRestrict = RMobileCall::EIdRestrictDefault;
|
|
227 |
iCallParams.iCug.iExplicitInvoke = EFalse;
|
|
228 |
iCallParams.iCug.iCugIndex = 0;
|
|
229 |
iCallParams.iCug.iSuppressPrefCug = EFalse;
|
|
230 |
iCallParams.iCug.iSuppressOA = EFalse;
|
|
231 |
iCallParams.iAutoRedial = EFalse;
|
|
232 |
// CallParamsV2
|
|
233 |
iCallParams.iBearerMode = RMobileCall::EMulticallNotSupported;
|
|
234 |
|
|
235 |
// CallParamsV7
|
|
236 |
iCallParams.iCallParamOrigin = RMobileCall::EOriginatorUnknown;
|
|
237 |
iCallParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode;
|
|
238 |
iCallParams.iIconId.iQualifier = RMobileCall::EIconQualifierNotSet;
|
|
239 |
iCallParams.iIconId.iIdentifier = 0;
|
|
240 |
iCallParams.iAlphaId.Zero();
|
|
241 |
iCallParams.iSubAddress.Zero();
|
|
242 |
iCallParams.iBearerCap1.Zero();
|
|
243 |
iCallParams.iBearerCap2.Zero();
|
|
244 |
iCallParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode;
|
|
245 |
|
|
246 |
iDialCancelFlag = CMmCallTsy::EDialCancelNotCalled;
|
|
247 |
iAnswerCancelFlag = EFalse;
|
|
248 |
iHangUpFlag = EFalse;
|
|
249 |
|
|
250 |
//this is required for the Conference call.
|
|
251 |
iPreviousCallId = -1;
|
|
252 |
|
|
253 |
//Initialize last exit code
|
|
254 |
iLastExitCode = KErrNotFound;
|
|
255 |
//this is required for custom tsy
|
|
256 |
iDiagnosticOctet = NULL;
|
|
257 |
|
|
258 |
//by default a call object has been created through ETel
|
|
259 |
iGhostCall = EFalse;
|
|
260 |
iEtelOriginated = ETrue;
|
|
261 |
|
|
262 |
iPreviousCallControlCaps = 0;
|
|
263 |
iIsRemoteReleasedCall = EFalse;
|
|
264 |
}
|
|
265 |
|
|
266 |
// ---------------------------------------------------------------------------
|
|
267 |
// CMmCallTsy::OpenNewObjectByNameL
|
|
268 |
// Creates new object and returns a pointer to it. Not supported.
|
|
269 |
// (other items were commented in a header).
|
|
270 |
// ---------------------------------------------------------------------------
|
|
271 |
//
|
|
272 |
CTelObject* CMmCallTsy::OpenNewObjectByNameL(
|
|
273 |
const TDesC& )
|
|
274 |
{
|
|
275 |
//Not supported
|
|
276 |
User::Leave( KErrNotSupported );
|
|
277 |
//lint -e{527} "unreachable code"
|
|
278 |
return NULL;
|
|
279 |
}
|
|
280 |
|
|
281 |
// ---------------------------------------------------------------------------
|
|
282 |
// CMmCallTsy::OpenNewObjectL
|
|
283 |
// Creates new object and returns a pointer to it. Not supported.
|
|
284 |
// (other items were commented in a header).
|
|
285 |
// ---------------------------------------------------------------------------
|
|
286 |
//
|
|
287 |
CTelObject* CMmCallTsy::OpenNewObjectL(
|
|
288 |
TDes& )
|
|
289 |
{
|
|
290 |
// Not supported
|
|
291 |
User::Leave( KErrNotSupported );
|
|
292 |
//lint -e{527} "unreachable code"
|
|
293 |
return NULL;
|
|
294 |
}
|
|
295 |
|
|
296 |
// ---------------------------------------------------------------------------
|
|
297 |
// CMmCallTsy::ExtFunc
|
|
298 |
// TRAP's all CMmCallTsy related MM API requests in case that they fail. This
|
|
299 |
// method functions only as a centralized TRAP for the DoExtFuncL method that
|
|
300 |
// does the actual mapping of IPC number to TSY method call.
|
|
301 |
// (other items were commented in a header).
|
|
302 |
// ---------------------------------------------------------------------------
|
|
303 |
//
|
|
304 |
TInt CMmCallTsy::ExtFunc(
|
|
305 |
const TTsyReqHandle aTsyReqHandle,
|
|
306 |
const TInt aIpc,
|
|
307 |
const TDataPackage& aPackage )
|
|
308 |
{
|
|
309 |
TInt ret( KErrNone );
|
|
310 |
TInt trapError( KErrNone );
|
|
311 |
|
|
312 |
// Ensure the ReqHandleType is unset.
|
|
313 |
// This will detect cases where this method indirectly calls itself
|
|
314 |
// (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
|
|
315 |
// Such cases are not supported because iReqHandleType is in the context of this class instance,
|
|
316 |
// not this request, and we don't want the values set by the inner request and the outer request
|
|
317 |
// interfering with each other.
|
|
318 |
__ASSERT_DEBUG(iReqHandleType==EMultimodeCallReqHandleUnknown, User::Invariant());
|
|
319 |
|
|
320 |
|
|
321 |
//before processing further the request, check if offline mode status
|
|
322 |
//is enabled and if the given request can be perfomed in that case.
|
|
323 |
if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo () &&
|
|
324 |
!IsRequestPossibleInOffline( aIpc ) )
|
|
325 |
{
|
|
326 |
TFLOGSTRING2("TSY: Offline mode ON, request is not allowed: %d", aIpc );
|
|
327 |
ret = CMmCommonStaticUtility::EpocErrorCode(
|
|
328 |
KErrGeneral, KErrGsmOfflineOpNotAllowed );
|
|
329 |
|
|
330 |
//Complete the request with appropiate error
|
|
331 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
332 |
}
|
|
333 |
else
|
|
334 |
{
|
|
335 |
TRAP( trapError, ret = DoExtFuncL( aTsyReqHandle, aIpc, aPackage ); );
|
|
336 |
|
|
337 |
if ( trapError != KErrNone )
|
|
338 |
{
|
|
339 |
//error handling. Object cannot be created.
|
|
340 |
ReqCompleted( aTsyReqHandle, trapError );
|
|
341 |
}
|
|
342 |
else if ( ret != KErrNone )
|
|
343 |
{
|
|
344 |
ReqCompleted( aTsyReqHandle, ret );
|
|
345 |
}
|
|
346 |
//save request handle
|
|
347 |
if ( EMultimodeCallReqHandleUnknown != iReqHandleType )
|
|
348 |
{
|
|
349 |
#ifdef REQHANDLE_TIMER
|
|
350 |
SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
|
|
351 |
#else
|
|
352 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
353 |
iReqHandleType, aTsyReqHandle );
|
|
354 |
#endif
|
|
355 |
// We've finished with this value now. Clear it so it doesn't leak
|
|
356 |
// up to any other instances of this method down the call stack
|
|
357 |
iReqHandleType = EMultimodeCallReqHandleUnknown;
|
|
358 |
}
|
|
359 |
|
|
360 |
}
|
|
361 |
|
|
362 |
return KErrNone;
|
|
363 |
}
|
|
364 |
|
|
365 |
// ---------------------------------------------------------------------------
|
|
366 |
// CMmCallTsy::GetInfo
|
|
367 |
// This CORE API method returns core Call information.
|
|
368 |
// (other items were commented in a header).
|
|
369 |
// ---------------------------------------------------------------------------
|
|
370 |
//
|
|
371 |
TInt CMmCallTsy::GetInfo(
|
|
372 |
const TTsyReqHandle aTsyReqHandle,
|
|
373 |
RCall::TCallInfo* aCallInfo )
|
|
374 |
{
|
|
375 |
//Fill Core Call information
|
|
376 |
aCallInfo->iCallName = iCallName;
|
|
377 |
aCallInfo->iStatus = iCallStatus;
|
|
378 |
aCallInfo->iLineName = iMmLine->LineName();
|
|
379 |
aCallInfo->iHookStatus = RCall::EHookStatusUnknown;
|
|
380 |
aCallInfo->iDuration = GetCallDurationInSeconds();
|
|
381 |
|
|
382 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
383 |
return KErrNone;
|
|
384 |
}
|
|
385 |
|
|
386 |
// ---------------------------------------------------------------------------
|
|
387 |
// CMmCallTsy::NotifyCapsChange
|
|
388 |
// This CORE API method requests notifications when core caps change.
|
|
389 |
// (other items were commented in a header).
|
|
390 |
// ---------------------------------------------------------------------------
|
|
391 |
//
|
|
392 |
TInt CMmCallTsy::NotifyCapsChange(
|
|
393 |
const TTsyReqHandle aTsyReqHandle,
|
|
394 |
RCall::TCaps* aCaps )
|
|
395 |
{
|
|
396 |
iRetCaps = aCaps;
|
|
397 |
//Store the current capabilities
|
|
398 |
iPreviousCaps = iCallCaps;
|
|
399 |
|
|
400 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
401 |
EMultimodeCallCapsChangeNotification, aTsyReqHandle );
|
|
402 |
|
|
403 |
return KErrNone;
|
|
404 |
}
|
|
405 |
|
|
406 |
// ---------------------------------------------------------------------------
|
|
407 |
// CMmCallTsy::NotifyCapsChangeCancel
|
|
408 |
// This CORE API method cancels core caps change notifications.
|
|
409 |
// (other items were commented in a header).
|
|
410 |
// ---------------------------------------------------------------------------
|
|
411 |
//
|
|
412 |
TInt CMmCallTsy::NotifyCapsChangeCancel(
|
|
413 |
const TTsyReqHandle aTsyReqHandle )
|
|
414 |
{
|
|
415 |
iRetCaps = NULL;
|
|
416 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
417 |
EMultimodeCallCapsChangeNotification );
|
|
418 |
|
|
419 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
420 |
|
|
421 |
return KErrNone;
|
|
422 |
}
|
|
423 |
|
|
424 |
// ---------------------------------------------------------------------------
|
|
425 |
// CMmCallTsy::CompleteNotifyCapsChange
|
|
426 |
// Complete notification when caps change.
|
|
427 |
// (other items were commented in a header).
|
|
428 |
// ---------------------------------------------------------------------------
|
|
429 |
//
|
|
430 |
void CMmCallTsy::CompleteNotifyCapsChange()
|
|
431 |
{
|
|
432 |
//reset req handle. Returns the deleted req handle
|
|
433 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
434 |
EMultimodeCallCapsChangeNotification );
|
|
435 |
|
|
436 |
//if caps have changed and client has requested capability notifications
|
|
437 |
if ( EMultimodeCallReqHandleUnknown != reqHandle &&
|
|
438 |
iRetCaps != NULL &&
|
|
439 |
iCallCaps.iFlags != iPreviousCaps.iFlags )
|
|
440 |
{
|
|
441 |
iRetCaps->iFlags = iCallCaps.iFlags;
|
|
442 |
ReqCompleted( reqHandle, KErrNone );
|
|
443 |
}
|
|
444 |
}
|
|
445 |
|
|
446 |
// ---------------------------------------------------------------------------
|
|
447 |
// CMmCallTsy::NotifyHookChange
|
|
448 |
// This CORE API method requests notifications on hook change.
|
|
449 |
// Feature not supported.
|
|
450 |
// (other items were commented in a header).
|
|
451 |
// ---------------------------------------------------------------------------
|
|
452 |
//
|
|
453 |
TInt CMmCallTsy::NotifyHookChange(
|
|
454 |
const TTsyReqHandle aTsyReqHandle,
|
|
455 |
RCall::THookStatus* )
|
|
456 |
{
|
|
457 |
ReqCompleted( aTsyReqHandle, KErrNotSupported );
|
|
458 |
return KErrNone;
|
|
459 |
}
|
|
460 |
|
|
461 |
// ---------------------------------------------------------------------------
|
|
462 |
// CMmCallTsy::NotifyHookChange
|
|
463 |
// This CORE API method cancels hook change notifications.
|
|
464 |
// Feature not supported.
|
|
465 |
// (other items were commented in a header).
|
|
466 |
// ---------------------------------------------------------------------------
|
|
467 |
//
|
|
468 |
TInt CMmCallTsy::NotifyHookChangeCancel(
|
|
469 |
const TTsyReqHandle aTsyReqHandle )
|
|
470 |
{
|
|
471 |
ReqCompleted( aTsyReqHandle, KErrNotSupported );
|
|
472 |
return KErrNone;
|
|
473 |
}
|
|
474 |
|
|
475 |
// ---------------------------------------------------------------------------
|
|
476 |
// CMmCallTsy::NotifyStatusChange
|
|
477 |
// This CORE API method requests notifications when Core status changes.
|
|
478 |
// (other items were commented in a header).
|
|
479 |
// ---------------------------------------------------------------------------
|
|
480 |
//
|
|
481 |
TInt CMmCallTsy::NotifyStatusChange(
|
|
482 |
const TTsyReqHandle aTsyReqHandle,
|
|
483 |
RCall::TStatus* aStatus )
|
|
484 |
{
|
|
485 |
// Save request handle and ptr to aStatus.
|
|
486 |
iRetStatus = aStatus;
|
|
487 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
488 |
EMultimodeCallNotifyStatusChange, aTsyReqHandle );
|
|
489 |
return KErrNone;
|
|
490 |
}
|
|
491 |
|
|
492 |
// ---------------------------------------------------------------------------
|
|
493 |
// CMmCallTsy::NotifyStatusChangeCancel
|
|
494 |
// This CORE API method cancels core status change notifications.
|
|
495 |
// (other items were commented in a header).
|
|
496 |
// ---------------------------------------------------------------------------
|
|
497 |
//
|
|
498 |
TInt CMmCallTsy::NotifyStatusChangeCancel(
|
|
499 |
const TTsyReqHandle aTsyReqHandle )
|
|
500 |
{
|
|
501 |
iRetStatus = NULL;
|
|
502 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallNotifyStatusChange );
|
|
503 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
504 |
return KErrNone;
|
|
505 |
}
|
|
506 |
|
|
507 |
// ---------------------------------------------------------------------------
|
|
508 |
// CMmCallTsy::HandleGhostCallStatusChange
|
|
509 |
// Handles status change notifications of a call object that is not monitored
|
|
510 |
// by any client (handle to this call object has not been opened by any client).
|
|
511 |
// (other items were commented in a header).
|
|
512 |
// ---------------------------------------------------------------------------
|
|
513 |
//
|
|
514 |
void CMmCallTsy::HandleGhostCallStatusChange(
|
|
515 |
TInt aResult,
|
|
516 |
CMmDataPackage* aDataPackage )
|
|
517 |
{
|
|
518 |
RMobileCall::TMobileCallStatus callStatus( RMobileCall::EStatusIdle );
|
|
519 |
RMobileCall::TMobileCallStatus receivedCallStatus(
|
|
520 |
RMobileCall::EStatusIdle );
|
|
521 |
|
|
522 |
aDataPackage->UnPackData( receivedCallStatus );
|
|
523 |
|
|
524 |
TTsyReqHandle mobileStatusHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
525 |
EMultimodeCallNotifyMobileCallStatusChange );
|
|
526 |
|
|
527 |
//client is ready for receiving status change indications
|
|
528 |
//or call has entered either idle or active status -> no
|
|
529 |
//more status changes are assumed soon.
|
|
530 |
if ( mobileStatusHandle ||
|
|
531 |
( receivedCallStatus == RMobileCall::EStatusConnected ) ||
|
|
532 |
( receivedCallStatus == RMobileCall::EStatusIdle ) )
|
|
533 |
{
|
|
534 |
//this call is not anymore a ghost call
|
|
535 |
iGhostCall = EFalse;
|
|
536 |
|
|
537 |
//idle state indicated -> no more indications waited.
|
|
538 |
if ( RMobileCall::EStatusIdle == receivedCallStatus )
|
|
539 |
{
|
|
540 |
//ghost call has terminated, inform client
|
|
541 |
CompleteNotifyStatusChange( aResult, aDataPackage );
|
|
542 |
}
|
|
543 |
//complete one or more simulated status change indications
|
|
544 |
else
|
|
545 |
{
|
|
546 |
if ( RMobileCall::EStatusDisconnecting == receivedCallStatus ||
|
|
547 |
RMobileCall::EStatusDisconnectingWithInband ==
|
|
548 |
receivedCallStatus )
|
|
549 |
{
|
|
550 |
CompleteNotifyStatusChange( aResult, aDataPackage );
|
|
551 |
}
|
|
552 |
else
|
|
553 |
{
|
|
554 |
//Send simulated status indications to the client
|
|
555 |
//since it has missed the real ones.
|
|
556 |
if ( receivedCallStatus >= RMobileCall::EStatusDialling )
|
|
557 |
{
|
|
558 |
callStatus = RMobileCall::EStatusDialling;
|
|
559 |
aDataPackage->PackData( &callStatus );
|
|
560 |
CompleteNotifyStatusChange( aResult, aDataPackage );
|
|
561 |
}
|
|
562 |
if ( receivedCallStatus >= RMobileCall::EStatusConnecting )
|
|
563 |
{
|
|
564 |
callStatus = RMobileCall::EStatusConnecting;
|
|
565 |
aDataPackage->PackData( &callStatus );
|
|
566 |
CompleteNotifyStatusChange( aResult, aDataPackage );
|
|
567 |
}
|
|
568 |
if ( receivedCallStatus >= RMobileCall::EStatusConnected )
|
|
569 |
{
|
|
570 |
callStatus = RMobileCall::EStatusConnected;
|
|
571 |
aDataPackage->PackData( &callStatus );
|
|
572 |
CompleteNotifyStatusChange( aResult, aDataPackage );
|
|
573 |
}
|
|
574 |
}
|
|
575 |
}
|
|
576 |
}
|
|
577 |
}
|
|
578 |
|
|
579 |
// ---------------------------------------------------------------------------
|
|
580 |
// CMmCallTsy::NotifyDurationChange
|
|
581 |
// This CORE API method requests notification when call duration changes.
|
|
582 |
// (other items were commented in a header).
|
|
583 |
// ---------------------------------------------------------------------------
|
|
584 |
//
|
|
585 |
TInt CMmCallTsy::NotifyDurationChange(
|
|
586 |
const TTsyReqHandle aTsyReqHandle,
|
|
587 |
TTimeIntervalSeconds* aTime )
|
|
588 |
{
|
|
589 |
iRetTimeIntervalSeconds = aTime;
|
|
590 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
591 |
EMultimodeCallNotifyDurationChange, aTsyReqHandle );
|
|
592 |
|
|
593 |
if ( iCallStatus == RCall::EStatusConnected && iCallTimer != NULL)
|
|
594 |
{
|
|
595 |
//start duration notifications immediately
|
|
596 |
iCallTimer->Start();
|
|
597 |
}
|
|
598 |
|
|
599 |
return KErrNone;
|
|
600 |
}
|
|
601 |
|
|
602 |
// ---------------------------------------------------------------------------
|
|
603 |
// CMmCallTsy::NotifyDurationChangeCancel
|
|
604 |
// This CORE API method cancels call duration change notifications.
|
|
605 |
// (other items were commented in a header).
|
|
606 |
// ---------------------------------------------------------------------------
|
|
607 |
//
|
|
608 |
TInt CMmCallTsy::NotifyDurationChangeCancel(
|
|
609 |
const TTsyReqHandle aTsyReqHandle )
|
|
610 |
{
|
|
611 |
iRetTimeIntervalSeconds = NULL;
|
|
612 |
|
|
613 |
if ( iCallTimer != NULL )
|
|
614 |
{
|
|
615 |
//stop notifications
|
|
616 |
iCallTimer->Stop();
|
|
617 |
}
|
|
618 |
|
|
619 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
620 |
EMultimodeCallNotifyDurationChange );
|
|
621 |
|
|
622 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
623 |
|
|
624 |
return KErrNone;
|
|
625 |
}
|
|
626 |
|
|
627 |
// ---------------------------------------------------------------------------
|
|
628 |
// CMmCallTsy::CompleteNotifyCallDurationChange
|
|
629 |
// Complete notification when duration changes. Timer causes calling of
|
|
630 |
// this completion every second. Type is not defined because this is
|
|
631 |
// called by iCallTimer.
|
|
632 |
// (other items were commented in a header).
|
|
633 |
// ---------------------------------------------------------------------------
|
|
634 |
//
|
|
635 |
void CMmCallTsy::CompleteNotifyCallDurationChange()
|
|
636 |
{
|
|
637 |
//reset req handle. Returns the deleted req handle
|
|
638 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
639 |
EMultimodeCallNotifyDurationChange );
|
|
640 |
|
|
641 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
642 |
{
|
|
643 |
//get current duration.
|
|
644 |
*iRetTimeIntervalSeconds = GetCallDurationInSeconds();
|
|
645 |
ReqCompleted( reqHandle, KErrNone );
|
|
646 |
}
|
|
647 |
}
|
|
648 |
|
|
649 |
// ---------------------------------------------------------------------------
|
|
650 |
// CMmCallTsy::GetStatus
|
|
651 |
// This CORE API methods returns core call status through the aStatus param.
|
|
652 |
// (other items were commented in a header).
|
|
653 |
// ---------------------------------------------------------------------------
|
|
654 |
//
|
|
655 |
TInt CMmCallTsy::GetStatus(
|
|
656 |
const TTsyReqHandle aTsyReqHandle,
|
|
657 |
RCall::TStatus* aStatus )
|
|
658 |
{
|
|
659 |
*aStatus = iCallStatus;
|
|
660 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
661 |
return KErrNone;
|
|
662 |
}
|
|
663 |
|
|
664 |
// ---------------------------------------------------------------------------
|
|
665 |
// CMmCallTsy::GetCaps
|
|
666 |
// This CORE API method returns Core call capabilities.
|
|
667 |
// (other items were commented in a header).
|
|
668 |
// ---------------------------------------------------------------------------
|
|
669 |
//
|
|
670 |
TInt CMmCallTsy::GetCaps(
|
|
671 |
const TTsyReqHandle aTsyReqHandle,
|
|
672 |
RCall::TCaps* aCaps )
|
|
673 |
{
|
|
674 |
*aCaps = iCallCaps;
|
|
675 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
676 |
return KErrNone;
|
|
677 |
}
|
|
678 |
|
|
679 |
// ---------------------------------------------------------------------------
|
|
680 |
// CMmCallTsy::DialCancel
|
|
681 |
// This CORE API method cancels an outstanding dial request.Calls HangUp
|
|
682 |
// method to do this and set a flag so that we can know that DialCancel
|
|
683 |
// handling is going on.
|
|
684 |
// (other items were commented in a header).
|
|
685 |
// ---------------------------------------------------------------------------
|
|
686 |
//
|
|
687 |
TInt CMmCallTsy::DialCancel(
|
|
688 |
const TTsyReqHandle aTsyReqHandle )
|
|
689 |
{
|
|
690 |
TFLOGSTRING3("TSY: CMmCallTsy::DialCancel. Req handle: %d, Call name: %S", aTsyReqHandle, &iCallName);
|
|
691 |
|
|
692 |
TInt ret( KErrGeneral );
|
|
693 |
|
|
694 |
//check if dial cancel has been called
|
|
695 |
if ( CMmCallTsy::EDialCancelNotCalled != iDialCancelFlag )
|
|
696 |
{
|
|
697 |
ret = KErrServerBusy;
|
|
698 |
}
|
|
699 |
else
|
|
700 |
{
|
|
701 |
ret = KErrNone;
|
|
702 |
iDialCancelFlag = CMmCallTsy::EDialCancelCallCalled;
|
|
703 |
|
|
704 |
if ( iCallId > 0 || (GetDialFlag()&& iCallStatus!=RMobileCall::EStatusIdle) )
|
|
705 |
{
|
|
706 |
if ( RMobileCall::EStatusDisconnecting != iMobileCallStatus )
|
|
707 |
{
|
|
708 |
TFLOGSTRING("TSY: CMmCallTsy::DialCancel Hangup called");
|
|
709 |
HangUp( aTsyReqHandle );
|
|
710 |
}
|
|
711 |
else
|
|
712 |
{
|
|
713 |
TFLOGSTRING("TSY: CMmCallTsy::DialCancel skipped Hangup call");
|
|
714 |
}
|
|
715 |
}
|
|
716 |
}
|
|
717 |
return ret;
|
|
718 |
}
|
|
719 |
|
|
720 |
// ---------------------------------------------------------------------------
|
|
721 |
// CMmCallTsy::CompleteDial
|
|
722 |
// Completes a Dial request.
|
|
723 |
// (other items were commented in a header).
|
|
724 |
// ---------------------------------------------------------------------------
|
|
725 |
//
|
|
726 |
void CMmCallTsy::CompleteDial(
|
|
727 |
TInt aResult )
|
|
728 |
{
|
|
729 |
TFLOGSTRING2("TSY: CMmCallTsy::CompleteDial. Result:%d", aResult );
|
|
730 |
TFLOGSTRING3("TSY: CMmCallTsy::CompleteDial. Call Id:%d Call name:%S", iCallId, &iCallName);
|
|
731 |
|
|
732 |
//Set dial flag to false
|
|
733 |
SetDialFlag( EFalse );
|
|
734 |
|
|
735 |
TTsyReqHandle reqHandle ( EMultimodeCallReqHandleUnknown );
|
|
736 |
|
|
737 |
if ( KETelExt3rdPartyV1 == iExtensionId )
|
|
738 |
{
|
|
739 |
//3rd Party Client
|
|
740 |
//reset req handle. Returns the deleted req handle
|
|
741 |
TFLOGSTRING("TSY: CMmCallTsy::CompleteDial. EMultimodeCallDialISV");
|
|
742 |
reqHandle =
|
|
743 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallDialISV );
|
|
744 |
|
|
745 |
}
|
|
746 |
else
|
|
747 |
{
|
|
748 |
//reset req handle. Returns the deleted req handle
|
|
749 |
TFLOGSTRING("TSY: CMmCallTsy::CompleteDial. EMultimodeCallDial");
|
|
750 |
reqHandle =
|
|
751 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallDial );
|
|
752 |
}
|
|
753 |
|
|
754 |
|
|
755 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
756 |
{
|
|
757 |
if ( aResult != KErrNone )
|
|
758 |
{
|
|
759 |
// The creation has failed.
|
|
760 |
iLastExitCode = aResult;
|
|
761 |
ClearCallStatus();
|
|
762 |
|
|
763 |
//Dial has failed, update core status - dial possible again
|
|
764 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
765 |
iCallCaps.iFlags &= ~( RCall::KCapsHangUp );
|
|
766 |
|
|
767 |
//complete caps change notification
|
|
768 |
CompleteNotifyCapsChange();
|
|
769 |
}
|
|
770 |
|
|
771 |
ReqCompleted( reqHandle, aResult );
|
|
772 |
}
|
|
773 |
}
|
|
774 |
|
|
775 |
// ---------------------------------------------------------------------------
|
|
776 |
// CMmCallTsy::AnswerIncomingCallCancel
|
|
777 |
// TSY has started a request and it is not possible to then cancel this
|
|
778 |
// request. The best thing for the TSY to do in this case is to call
|
|
779 |
// HangUp method to do this and set a flag so that we can know that
|
|
780 |
// AnswerIncomingCallCancel handling is going on.
|
|
781 |
// (other items were commented in a header).
|
|
782 |
// ---------------------------------------------------------------------------
|
|
783 |
//
|
|
784 |
TInt CMmCallTsy::AnswerIncomingCallCancel(
|
|
785 |
const TTsyReqHandle aTsyReqHandle )
|
|
786 |
{
|
|
787 |
TFLOGSTRING3("TSY: CMmCallTsy::AnswerIncomingCallCancel. Req handle: %d, Call name: %S", aTsyReqHandle, &iCallName);
|
|
788 |
|
|
789 |
TInt ret( KErrNone );
|
|
790 |
|
|
791 |
if( iAnswerCancelFlag )
|
|
792 |
{
|
|
793 |
ret = KErrServerBusy;
|
|
794 |
}
|
|
795 |
else
|
|
796 |
{
|
|
797 |
iAnswerCancelFlag = ETrue;
|
|
798 |
|
|
799 |
if ( 0 < iCallId )
|
|
800 |
{
|
|
801 |
HangUp( aTsyReqHandle );
|
|
802 |
}
|
|
803 |
}
|
|
804 |
|
|
805 |
return ret;
|
|
806 |
}
|
|
807 |
|
|
808 |
// ---------------------------------------------------------------------------
|
|
809 |
// CMmCallTsy::CompleteAnswerIncomingCall
|
|
810 |
// Completes answer request to client.
|
|
811 |
// (other items were commented in a header).
|
|
812 |
// ---------------------------------------------------------------------------
|
|
813 |
//
|
|
814 |
void CMmCallTsy::CompleteAnswerIncomingCall(
|
|
815 |
TInt aResult )
|
|
816 |
{
|
|
817 |
TFLOGSTRING2("TSY: CMmCallTsy::CompleteAnswerIncomingCall. Result:%d", aResult );
|
|
818 |
TFLOGSTRING3("TSY: CMmCallTsy::CompleteAnswerIncomingCall. Call Id:%d Call name:%S", iCallId, &iCallName);
|
|
819 |
|
|
820 |
TTsyReqHandle reqHandle ( EMultimodeCallReqHandleUnknown );
|
|
821 |
|
|
822 |
TFLOGSTRING2("TSY: CMmCallTsy::CompleteAnswerIncomingCall. iExtensionId:%d", iExtensionId );
|
|
823 |
|
|
824 |
if ( KETelExt3rdPartyV1 == iExtensionId )
|
|
825 |
{
|
|
826 |
//3rd Party Client
|
|
827 |
//reset req handle. Returns the deleted req handle
|
|
828 |
reqHandle =
|
|
829 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallAnswerISV );
|
|
830 |
}
|
|
831 |
else
|
|
832 |
{
|
|
833 |
//reset req handle. Returns the deleted req handle
|
|
834 |
reqHandle =
|
|
835 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallAnswer );
|
|
836 |
}
|
|
837 |
|
|
838 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
839 |
{
|
|
840 |
if ( KErrNone != aResult )
|
|
841 |
{
|
|
842 |
TInt extendedError(
|
|
843 |
CMmCommonStaticUtility::ExtendedErrorCode( aResult ) );
|
|
844 |
|
|
845 |
if ( KErrGsmCCNormalUnspecified == extendedError )
|
|
846 |
{
|
|
847 |
//Call MT released while answer request was ongoing
|
|
848 |
//Set Symbian error value to disconnected.
|
|
849 |
aResult = CMmCommonStaticUtility::EpocErrorCode(
|
|
850 |
KErrGeneral, KErrDisconnected );
|
|
851 |
}
|
|
852 |
else
|
|
853 |
{
|
|
854 |
iCallCaps.iFlags |= RCall::KCapsAnswer | RCall::KCapsDial;
|
|
855 |
iCallCaps.iFlags &= ~( RCall::KCapsHangUp );
|
|
856 |
|
|
857 |
CompleteNotifyCapsChange();
|
|
858 |
}
|
|
859 |
|
|
860 |
iLastExitCode = aResult;
|
|
861 |
|
|
862 |
ClearCallStatus();
|
|
863 |
}
|
|
864 |
ReqCompleted( reqHandle, aResult );
|
|
865 |
}
|
|
866 |
}
|
|
867 |
|
|
868 |
// ---------------------------------------------------------------------------
|
|
869 |
// CMmCallTsy::HangUpCancel
|
|
870 |
// CORE API method. TSY has started a request and it is not possible to then
|
|
871 |
// cancel this request. The best thing for the TSY to do in this case is to
|
|
872 |
// proceed as though the Cancel never happened. The server's call to the TSY
|
|
873 |
// cancel function will return synchronously. The TSY then continues to wait
|
|
874 |
// for the HangUp() acknowledgemnt and when it receives it, the TSY will
|
|
875 |
// complete the original HangUp request.
|
|
876 |
// (other items were commented in a header).
|
|
877 |
// ---------------------------------------------------------------------------
|
|
878 |
//
|
|
879 |
TInt CMmCallTsy::HangUpCancel(
|
|
880 |
const TTsyReqHandle )
|
|
881 |
{
|
|
882 |
return KErrNone;
|
|
883 |
}
|
|
884 |
|
|
885 |
// ---------------------------------------------------------------------------
|
|
886 |
// CMmCallTsy::CompleteHangUp
|
|
887 |
// Completes call hangup (both normal and emergency calls). If the cause value
|
|
888 |
// is different than the sent one, the call release requset has failed. In
|
|
889 |
// this case the causeValue describes the fail cause. Otherwise the call
|
|
890 |
// releasing has succeeded.
|
|
891 |
// (other items were commented in a header).
|
|
892 |
// ---------------------------------------------------------------------------
|
|
893 |
//
|
|
894 |
void CMmCallTsy::CompleteHangUp(
|
|
895 |
TInt aResult )
|
|
896 |
{
|
|
897 |
TFLOGSTRING2("TSY: CMmCallTsy::CompleteHangUp.\n \t\t\t Result:%d", aResult );
|
|
898 |
TFLOGSTRING3("TSY: CMmCallTsy::CompleteHangUp. Call Id:%d Call name:%S", iCallId, &iCallName);
|
|
899 |
|
|
900 |
TInt ret( KErrNone );
|
|
901 |
|
|
902 |
// Complete for HangUp request
|
|
903 |
// (not to DialCancel or AnswerIncomingCallCancel)
|
|
904 |
if ( CMmCallTsy::EDialCancelNotCalled == iDialCancelFlag &&
|
|
905 |
!iAnswerCancelFlag )
|
|
906 |
{
|
|
907 |
//reset req handle. Returns the deleted req handle
|
|
908 |
TTsyReqHandle reqHandle =
|
|
909 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallHangUp );
|
|
910 |
|
|
911 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
912 |
{
|
|
913 |
//if hangup request failed
|
|
914 |
if ( KErrNone != aResult )
|
|
915 |
{
|
|
916 |
//Hangup failed, it should be still possible to carry out
|
|
917 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
918 |
|
|
919 |
//Call status is not idle. HangUp request failed, complete
|
|
920 |
//HangUp request with error.
|
|
921 |
if ( RCall::EStatusIdle != iCallStatus )
|
|
922 |
{
|
|
923 |
// ignore KErrGsmReleaseByUser, which means that the call ended
|
|
924 |
// because the local user released the call, and must be treated
|
|
925 |
// as a normal return code from the LTSY
|
|
926 |
ret = ( (aResult == KErrGsmReleaseByUser) ? KErrNone : aResult );
|
|
927 |
}
|
|
928 |
}
|
|
929 |
else
|
|
930 |
{
|
|
931 |
//Dial hangup has succeeded, update core status -
|
|
932 |
//dial possible again
|
|
933 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
934 |
|
|
935 |
if ( KErrGsmCallRejected != iLastExitCode )
|
|
936 |
{
|
|
937 |
iLastExitCode = KErrNone;
|
|
938 |
}
|
|
939 |
//If client refuses to answer, remove the answering capability
|
|
940 |
iCallCaps.iFlags &= ~( RCall::KCapsAnswer );
|
|
941 |
}
|
|
942 |
ReqCompleted( reqHandle, ret );
|
|
943 |
|
|
944 |
//complete caps change notification
|
|
945 |
CompleteNotifyCapsChange();
|
|
946 |
}
|
|
947 |
}
|
|
948 |
// Complete for DialCancel or AnswerIncomingCallCancel, success
|
|
949 |
else if ( KErrNone == aResult )
|
|
950 |
{
|
|
951 |
// Find out if this is cancelling of Dial
|
|
952 |
TTsyReqHandle cancelHandle = iTsyReqHandleStore->
|
|
953 |
ResetTsyReqHandle( EMultimodeCallDial );
|
|
954 |
|
|
955 |
if ( cancelHandle == NULL )
|
|
956 |
{
|
|
957 |
// Find out if this is cancelling of AnswerIncomingCall
|
|
958 |
cancelHandle = iTsyReqHandleStore->
|
|
959 |
ResetTsyReqHandle( EMultimodeCallAnswer );
|
|
960 |
|
|
961 |
if( NULL == cancelHandle )
|
|
962 |
{
|
|
963 |
// Find out if this is cancelling of AnswerIncomingCallISV
|
|
964 |
cancelHandle = iTsyReqHandleStore->
|
|
965 |
ResetTsyReqHandle( EMultimodeCallAnswerISV );
|
|
966 |
|
|
967 |
if( NULL == cancelHandle )
|
|
968 |
{
|
|
969 |
// Find out if this is cancelling of DialISV
|
|
970 |
cancelHandle = iTsyReqHandleStore->
|
|
971 |
ResetTsyReqHandle( EMultimodeCallDialISV );
|
|
972 |
|
|
973 |
if ( NULL == cancelHandle )
|
|
974 |
{
|
|
975 |
// Find out if this is cancelling of DialNoFdnCheck
|
|
976 |
cancelHandle = iTsyReqHandleStore->
|
|
977 |
ResetTsyReqHandle( EMultimodeCallDialNoFdnCheck );
|
|
978 |
}
|
|
979 |
}
|
|
980 |
}
|
|
981 |
}
|
|
982 |
|
|
983 |
if ( 0 < cancelHandle )
|
|
984 |
{
|
|
985 |
// Complete with error value KErrCancel
|
|
986 |
ReqCompleted( cancelHandle, KErrCancel );
|
|
987 |
|
|
988 |
// Cancel has succeeded, update core status -
|
|
989 |
// dial possible again
|
|
990 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
991 |
|
|
992 |
// If client refuses to answer, remove the answering capability
|
|
993 |
iCallCaps.iFlags &= ~( RCall::KCapsAnswer );
|
|
994 |
|
|
995 |
// Complete caps change notification
|
|
996 |
CompleteNotifyCapsChange();
|
|
997 |
}
|
|
998 |
}
|
|
999 |
// Cancel failed and the request succeeded (connected)
|
|
1000 |
else if ( RCall::EStatusConnected == iCallStatus )
|
|
1001 |
{
|
|
1002 |
// Find out if this is cancelling of Dial
|
|
1003 |
TTsyReqHandle cancelHandle = iTsyReqHandleStore->
|
|
1004 |
ResetTsyReqHandle( EMultimodeCallDial );
|
|
1005 |
|
|
1006 |
if ( cancelHandle == NULL )
|
|
1007 |
{
|
|
1008 |
// Find out if this is cancelling of AnswerIncomingCall
|
|
1009 |
cancelHandle = iTsyReqHandleStore->
|
|
1010 |
ResetTsyReqHandle( EMultimodeCallAnswer );
|
|
1011 |
|
|
1012 |
if( NULL == cancelHandle )
|
|
1013 |
{
|
|
1014 |
// Find out if this is cancelling of AnswerIncomingCallISV
|
|
1015 |
cancelHandle = iTsyReqHandleStore->
|
|
1016 |
ResetTsyReqHandle( EMultimodeCallAnswerISV );
|
|
1017 |
|
|
1018 |
if( NULL == cancelHandle )
|
|
1019 |
{
|
|
1020 |
// Find out if this is cancelling of DialISV
|
|
1021 |
cancelHandle = iTsyReqHandleStore->
|
|
1022 |
ResetTsyReqHandle( EMultimodeCallDialISV );
|
|
1023 |
|
|
1024 |
if ( NULL == cancelHandle )
|
|
1025 |
{
|
|
1026 |
// Find out if this is cancelling of DialNoFdnCheck
|
|
1027 |
cancelHandle = iTsyReqHandleStore->
|
|
1028 |
ResetTsyReqHandle( EMultimodeCallDialNoFdnCheck );
|
|
1029 |
}
|
|
1030 |
}
|
|
1031 |
}
|
|
1032 |
}
|
|
1033 |
|
|
1034 |
// Cancel to Dial or AnswerIncomingCall
|
|
1035 |
if ( 0 < cancelHandle )
|
|
1036 |
{
|
|
1037 |
// Complete with success (KErrNone)
|
|
1038 |
ReqCompleted( cancelHandle, KErrNone );
|
|
1039 |
|
|
1040 |
// Succeeded, update core status - hangup possible again
|
|
1041 |
iCallCaps.iFlags |= RCall::KCapsHangUp;
|
|
1042 |
|
|
1043 |
// Complete caps change notification
|
|
1044 |
CompleteNotifyCapsChange();
|
|
1045 |
}
|
|
1046 |
}
|
|
1047 |
|
|
1048 |
// Reset cancel flags
|
|
1049 |
iDialCancelFlag = CMmCallTsy::EDialCancelNotCalled;
|
|
1050 |
iAnswerCancelFlag = EFalse;
|
|
1051 |
// Reset HangUp flag
|
|
1052 |
iHangUpFlag = EFalse;
|
|
1053 |
}
|
|
1054 |
|
|
1055 |
// ---------------------------------------------------------------------------
|
|
1056 |
// CMmCallTsy::GetOwnershipStatus
|
|
1057 |
// Get call ownership status.
|
|
1058 |
// (other items were commented in a header).
|
|
1059 |
// ---------------------------------------------------------------------------
|
|
1060 |
//
|
|
1061 |
TInt CMmCallTsy::GetOwnershipStatus(
|
|
1062 |
const TTsyReqHandle,
|
|
1063 |
RCall::TOwnershipStatus* )
|
|
1064 |
{
|
|
1065 |
return KErrNotSupported;
|
|
1066 |
}
|
|
1067 |
|
|
1068 |
// ---------------------------------------------------------------------------
|
|
1069 |
// CMmCallTsy::TransferOwnership
|
|
1070 |
// Transfers the call ownership.
|
|
1071 |
// (other items were commented in a header).
|
|
1072 |
// ---------------------------------------------------------------------------
|
|
1073 |
//
|
|
1074 |
TInt CMmCallTsy::TransferOwnership(
|
|
1075 |
const TTsyReqHandle )
|
|
1076 |
{
|
|
1077 |
return KErrNotSupported;
|
|
1078 |
}
|
|
1079 |
|
|
1080 |
// ---------------------------------------------------------------------------
|
|
1081 |
// CMmCallTsy::AcquireOwnership
|
|
1082 |
// Acquire the call ownership.
|
|
1083 |
// (other items were commented in a header).
|
|
1084 |
// ---------------------------------------------------------------------------
|
|
1085 |
//
|
|
1086 |
TInt CMmCallTsy::AcquireOwnership(
|
|
1087 |
const TTsyReqHandle )
|
|
1088 |
{
|
|
1089 |
return KErrNotSupported;
|
|
1090 |
}
|
|
1091 |
|
|
1092 |
// ---------------------------------------------------------------------------
|
|
1093 |
// CMmCallTsy::AcquireOwnershipCancel
|
|
1094 |
// Cancel the call ownership acquire.
|
|
1095 |
// (other items were commented in a header).
|
|
1096 |
// ---------------------------------------------------------------------------
|
|
1097 |
//
|
|
1098 |
TInt CMmCallTsy::AcquireOwnershipCancel(
|
|
1099 |
const TTsyReqHandle )
|
|
1100 |
{
|
|
1101 |
return KErrNotSupported;
|
|
1102 |
}
|
|
1103 |
|
|
1104 |
// ---------------------------------------------------------------------------
|
|
1105 |
// CMmCallTsy::RelinquishOwnership
|
|
1106 |
// Relinquish the call ownership.
|
|
1107 |
// (other items were commented in a header).
|
|
1108 |
// ---------------------------------------------------------------------------
|
|
1109 |
//
|
|
1110 |
TInt CMmCallTsy::RelinquishOwnership()
|
|
1111 |
{
|
|
1112 |
return KErrNotSupported;
|
|
1113 |
}
|
|
1114 |
|
|
1115 |
// ---------------------------------------------------------------------------
|
|
1116 |
// CMmCallTsy::GetCallParams
|
|
1117 |
// This CORE API method is used for getting Core call parameters.
|
|
1118 |
// (other items were commented in a header).
|
|
1119 |
// ---------------------------------------------------------------------------
|
|
1120 |
//
|
|
1121 |
TInt CMmCallTsy::GetCallParams(
|
|
1122 |
const TTsyReqHandle aTsyReqHandle,
|
|
1123 |
TDes8* aParams )
|
|
1124 |
{
|
|
1125 |
|
|
1126 |
if(sizeof(RMobileCall::TMobileCallParamsV1) > aParams->MaxLength())
|
|
1127 |
{
|
|
1128 |
TFLOGSTRING ("TSY: CMmCallTsy::GetCallParams bad size argument");
|
|
1129 |
// Complete the request with appropiate error
|
|
1130 |
return KErrArgument;
|
|
1131 |
}
|
|
1132 |
|
|
1133 |
RMobileCall::TMobileCallParamsV1Pckg* paramsPckgV1 =
|
|
1134 |
reinterpret_cast<RMobileCall::TMobileCallParamsV1Pckg*>( aParams );
|
|
1135 |
RMobileCall::TMobileCallParamsV1& paramsV1 = ( *paramsPckgV1 )();
|
|
1136 |
|
|
1137 |
paramsV1.iSpeakerControl = iCallParams.iSpeakerControl;
|
|
1138 |
paramsV1.iSpeakerVolume = iCallParams.iSpeakerVolume;
|
|
1139 |
paramsV1.iInterval = iCallParams.iInterval;
|
|
1140 |
paramsV1.iWaitForDialTone = iCallParams.iWaitForDialTone;
|
|
1141 |
|
|
1142 |
//let extension to update mode specific params as well
|
|
1143 |
iMmCallExtInterface->GetCallParams( aParams );
|
|
1144 |
|
|
1145 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
1146 |
return KErrNone;
|
|
1147 |
}
|
|
1148 |
|
|
1149 |
// ---------------------------------------------------------------------------
|
|
1150 |
// CMmCallTsy::GetCallDuration
|
|
1151 |
// This CORE API method is used for getting call duration. Calls
|
|
1152 |
// GetCallDurationInSeconds() method to return the current call duration.
|
|
1153 |
// See details from there.
|
|
1154 |
// (other items were commented in a header).
|
|
1155 |
// ---------------------------------------------------------------------------
|
|
1156 |
//
|
|
1157 |
TInt CMmCallTsy::GetCallDuration(
|
|
1158 |
const TTsyReqHandle aTsyReqHandle,
|
|
1159 |
TTimeIntervalSeconds* aTime )
|
|
1160 |
{
|
|
1161 |
//get duration
|
|
1162 |
*aTime = GetCallDurationInSeconds();
|
|
1163 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
1164 |
return KErrNone;
|
|
1165 |
}
|
|
1166 |
|
|
1167 |
// ---------------------------------------------------------------------------
|
|
1168 |
// CMmCallTsy::CallId
|
|
1169 |
// Returns call ID.of this call
|
|
1170 |
// (other items were commented in a header).
|
|
1171 |
// ---------------------------------------------------------------------------
|
|
1172 |
//
|
|
1173 |
TInt CMmCallTsy::CallId() const
|
|
1174 |
{
|
|
1175 |
return iCallId;
|
|
1176 |
}
|
|
1177 |
|
|
1178 |
// ---------------------------------------------------------------------------
|
|
1179 |
// CMmCallTsy::SetCallId
|
|
1180 |
// Sets call ID.
|
|
1181 |
// (other items were commented in a header).
|
|
1182 |
// ---------------------------------------------------------------------------
|
|
1183 |
//
|
|
1184 |
TInt CMmCallTsy::SetCallId(
|
|
1185 |
TInt aCallId )
|
|
1186 |
{
|
|
1187 |
TInt ret( KErrGeneral );
|
|
1188 |
|
|
1189 |
if ( aCallId <= KMaxCallIdValue )
|
|
1190 |
{
|
|
1191 |
iCallId = aCallId;
|
|
1192 |
ret = KErrNone;
|
|
1193 |
}
|
|
1194 |
return ret;
|
|
1195 |
}
|
|
1196 |
|
|
1197 |
// ---------------------------------------------------------------------------
|
|
1198 |
// CMmCallTsy::SetCallStatus
|
|
1199 |
// Sets call Status.
|
|
1200 |
// (other items were commented in a header).
|
|
1201 |
// ---------------------------------------------------------------------------
|
|
1202 |
//
|
|
1203 |
void CMmCallTsy::SetCallStatus(
|
|
1204 |
RCall::TStatus aCallStatus,
|
|
1205 |
RMobileCall::TMobileCallStatus aMobileCallStatus )
|
|
1206 |
{
|
|
1207 |
iCallStatus = aCallStatus;
|
|
1208 |
iMobileCallStatus = aMobileCallStatus;
|
|
1209 |
}
|
|
1210 |
|
|
1211 |
// ---------------------------------------------------------------------------
|
|
1212 |
// CMmCallTsy::SetPreviousCallId
|
|
1213 |
// Sets previous active call ID. The Call ID is set when the call goes to idle
|
|
1214 |
// state. Before the previous call ID is set, all other calls are checked and
|
|
1215 |
// if they have the same previous call ID, their call id will be cleared. This
|
|
1216 |
// is required by Conference call implementation.
|
|
1217 |
// (other items were commented in a header).
|
|
1218 |
// ---------------------------------------------------------------------------
|
|
1219 |
//
|
|
1220 |
void CMmCallTsy::SetPreviousCallId(
|
|
1221 |
TInt aCurrentId )
|
|
1222 |
{
|
|
1223 |
if ( aCurrentId > 0 )
|
|
1224 |
{
|
|
1225 |
CMmCallTsy* mmCall = NULL;
|
|
1226 |
|
|
1227 |
for ( TInt i = 0; i < iMmPhone->CallList()->
|
|
1228 |
GetNumberOfObjects(); i++ )
|
|
1229 |
{
|
|
1230 |
mmCall = iMmPhone->CallList()->GetMmCallByIndex( i );
|
|
1231 |
|
|
1232 |
if ( mmCall->PreviousCallId() == aCurrentId )
|
|
1233 |
{
|
|
1234 |
mmCall->SetPreviousCallId( -1 );
|
|
1235 |
}
|
|
1236 |
}
|
|
1237 |
}
|
|
1238 |
iPreviousCallId = aCurrentId;
|
|
1239 |
}
|
|
1240 |
|
|
1241 |
// ---------------------------------------------------------------------------
|
|
1242 |
// CMmCallTsy::PreviousCallId
|
|
1243 |
// Returns previous active call ID. The Call ID is reset when the call goes to
|
|
1244 |
// idle state. This is required by Conference call implementation.
|
|
1245 |
// (other items were commented in a header).
|
|
1246 |
// ---------------------------------------------------------------------------
|
|
1247 |
//
|
|
1248 |
TInt CMmCallTsy::PreviousCallId() const
|
|
1249 |
{
|
|
1250 |
return iPreviousCallId;
|
|
1251 |
}
|
|
1252 |
|
|
1253 |
// ---------------------------------------------------------------------------
|
|
1254 |
// CMmCallTsy::ResetPreviousCallId
|
|
1255 |
// Resets previous active call ID. The Call ID is reset when the call goes to
|
|
1256 |
// idle state. This is required by Conference call implementation.
|
|
1257 |
// (other items were commented in a header).
|
|
1258 |
// ---------------------------------------------------------------------------
|
|
1259 |
//
|
|
1260 |
void CMmCallTsy::ResetPreviousCallId()
|
|
1261 |
{
|
|
1262 |
iPreviousCallId = -1;
|
|
1263 |
}
|
|
1264 |
|
|
1265 |
// ---------------------------------------------------------------------------
|
|
1266 |
// CMmCallTsy::CallMode
|
|
1267 |
// Returns call mode.
|
|
1268 |
// (other items were commented in a header).
|
|
1269 |
// ---------------------------------------------------------------------------
|
|
1270 |
//
|
|
1271 |
RMobilePhone::TMobileService CMmCallTsy::CallMode() const
|
|
1272 |
{
|
|
1273 |
return iCallMode;
|
|
1274 |
}
|
|
1275 |
|
|
1276 |
// ---------------------------------------------------------------------------
|
|
1277 |
// CMmCallTsy::CallDirection
|
|
1278 |
// Returns call direction.
|
|
1279 |
// (other items were commented in a header).
|
|
1280 |
// ---------------------------------------------------------------------------
|
|
1281 |
//
|
|
1282 |
RMobileCall::TMobileCallDirection CMmCallTsy::CallDirection() const
|
|
1283 |
{
|
|
1284 |
return iCallDirection;
|
|
1285 |
}
|
|
1286 |
|
|
1287 |
// ---------------------------------------------------------------------------
|
|
1288 |
// CMmCallTsy::SetCallDirection
|
|
1289 |
// Sets call direction.
|
|
1290 |
// (other items were commented in a header).
|
|
1291 |
// ---------------------------------------------------------------------------
|
|
1292 |
//
|
|
1293 |
TInt CMmCallTsy::SetCallDirection(
|
|
1294 |
RMobileCall::TMobileCallDirection aCallDirection )
|
|
1295 |
{
|
|
1296 |
iCallDirection = aCallDirection;
|
|
1297 |
return KErrNone;
|
|
1298 |
}
|
|
1299 |
|
|
1300 |
// ---------------------------------------------------------------------------
|
|
1301 |
// CMmCallTsy::CallName
|
|
1302 |
// Returns call name.
|
|
1303 |
// (other items were commented in a header).
|
|
1304 |
// ---------------------------------------------------------------------------
|
|
1305 |
//
|
|
1306 |
const TDesC& CMmCallTsy::CallName() const
|
|
1307 |
{
|
|
1308 |
return iCallName;
|
|
1309 |
}
|
|
1310 |
|
|
1311 |
// ---------------------------------------------------------------------------
|
|
1312 |
// CMmCallTsy::SetCallName
|
|
1313 |
// Sets call name.
|
|
1314 |
// (other items were commented in a header).
|
|
1315 |
// ---------------------------------------------------------------------------
|
|
1316 |
//
|
|
1317 |
void CMmCallTsy::SetCallName(
|
|
1318 |
const TName& aCallName )
|
|
1319 |
{
|
|
1320 |
iCallName = aCallName;
|
|
1321 |
}
|
|
1322 |
|
|
1323 |
// ---------------------------------------------------------------------------
|
|
1324 |
// CMmCallTsy::SetCallCaps
|
|
1325 |
// Sets call capabilities.
|
|
1326 |
// (other items were commented in a header).
|
|
1327 |
// ---------------------------------------------------------------------------
|
|
1328 |
//
|
|
1329 |
void CMmCallTsy::SetCallCaps(
|
|
1330 |
TUint32 aCallCaps )
|
|
1331 |
{
|
|
1332 |
iCallCaps.iFlags = aCallCaps;
|
|
1333 |
CompleteNotifyCapsChange();
|
|
1334 |
}
|
|
1335 |
|
|
1336 |
// ---------------------------------------------------------------------------
|
|
1337 |
// CMmCallTsy::CallCaps
|
|
1338 |
// Returns call capabilities.
|
|
1339 |
// (other items were commented in a header).
|
|
1340 |
// ---------------------------------------------------------------------------
|
|
1341 |
//
|
|
1342 |
TUint32 CMmCallTsy::CallCaps() const
|
|
1343 |
{
|
|
1344 |
//get call caps
|
|
1345 |
TUint32 aCallCaps = iCallCaps.iFlags;
|
|
1346 |
//return them
|
|
1347 |
return aCallCaps;
|
|
1348 |
}
|
|
1349 |
|
|
1350 |
// ---------------------------------------------------------------------------
|
|
1351 |
// CMmCallTsy::GetMobileCallCaps
|
|
1352 |
// This function returns the call control and call event dynamic capabilities.
|
|
1353 |
// (other items were commented in a header).
|
|
1354 |
// ---------------------------------------------------------------------------
|
|
1355 |
//
|
|
1356 |
TInt CMmCallTsy::GetMobileCallCaps(
|
|
1357 |
const TTsyReqHandle aTsyReqHandle,
|
|
1358 |
TDes8* aCaps )
|
|
1359 |
{
|
|
1360 |
TInt ret( KErrArgument );
|
|
1361 |
|
|
1362 |
if ( sizeof ( RMobileCall::TMobileCallCapsV1 ) <= aCaps->MaxLength() )
|
|
1363 |
{
|
|
1364 |
RMobileCall::TMobileCallCapsV1Pckg* callCapsV1Pckg =
|
|
1365 |
reinterpret_cast<RMobileCall::TMobileCallCapsV1Pckg*>( aCaps );
|
|
1366 |
RMobileCall::TMobileCallCapsV1& callCapsV1 =
|
|
1367 |
( *callCapsV1Pckg )();
|
|
1368 |
|
|
1369 |
if ( KETelExtMultimodeV1 == callCapsV1.ExtensionId() )
|
|
1370 |
{
|
|
1371 |
ret = KErrNone;
|
|
1372 |
iMmCallExtInterface->GetMobileCallCapsV1( callCapsV1 );
|
|
1373 |
}
|
|
1374 |
}
|
|
1375 |
|
|
1376 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1377 |
return KErrNone;
|
|
1378 |
}
|
|
1379 |
|
|
1380 |
|
|
1381 |
// ---------------------------------------------------------------------------
|
|
1382 |
// CMmCallTsy::NotifyMobileCallCapsChange
|
|
1383 |
// Notifies the change of Mobile Call Capabilities.
|
|
1384 |
// (other items were commented in a header).
|
|
1385 |
// ---------------------------------------------------------------------------
|
|
1386 |
//
|
|
1387 |
TInt CMmCallTsy::NotifyMobileCallCapsChange(
|
|
1388 |
TDes8* aCaps )
|
|
1389 |
{
|
|
1390 |
TInt ret( KErrArgument );
|
|
1391 |
|
|
1392 |
if ( sizeof ( RMobileCall::TMobileCallCapsV1 ) <= aCaps->MaxLength() )
|
|
1393 |
{
|
|
1394 |
RMobileCall::TMobileCallCapsV1Pckg* callCapsV1Pckg =
|
|
1395 |
reinterpret_cast<RMobileCall::TMobileCallCapsV1Pckg*>( aCaps );
|
|
1396 |
RMobileCall::TMobileCallCapsV1& callCapsV1 =
|
|
1397 |
( *callCapsV1Pckg )();
|
|
1398 |
|
|
1399 |
if ( KETelExtMultimodeV1 == callCapsV1.ExtensionId() )
|
|
1400 |
{
|
|
1401 |
ret = KErrNone;
|
|
1402 |
iRetNotifyMobileCallCaps = aCaps;
|
|
1403 |
iReqHandleType = EMultimodeCallNotifyMobileCallCapsChange;
|
|
1404 |
}
|
|
1405 |
}
|
|
1406 |
return ret;
|
|
1407 |
|
|
1408 |
}
|
|
1409 |
|
|
1410 |
// ---------------------------------------------------------------------------
|
|
1411 |
// CMmCallTsy::NotifyMobileCallCapsChangeCancel
|
|
1412 |
// Cancels an outstanding asynchronous NotifyMobileCallCapsChange request.
|
|
1413 |
// (other items were commented in a header).
|
|
1414 |
// ---------------------------------------------------------------------------
|
|
1415 |
//
|
|
1416 |
TInt CMmCallTsy::NotifyMobileCallCapsChangeCancel(
|
|
1417 |
const TTsyReqHandle aTsyReqHandle )
|
|
1418 |
{
|
|
1419 |
//reset pointer
|
|
1420 |
iRetNotifyMobileCallCaps = NULL;
|
|
1421 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1422 |
EMultimodeCallNotifyMobileCallCapsChange );
|
|
1423 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1424 |
return KErrNone;
|
|
1425 |
}
|
|
1426 |
|
|
1427 |
// ---------------------------------------------------------------------------
|
|
1428 |
// CMmCallTsy::CompleteNotifyMobileCallCapsChange
|
|
1429 |
// Completes a NotifyMobileCallCapsChange method. The caps request is directed
|
|
1430 |
// to the currently active protocol extension.
|
|
1431 |
// (other items were commented in a header).
|
|
1432 |
// ---------------------------------------------------------------------------
|
|
1433 |
//
|
|
1434 |
void CMmCallTsy::CompleteNotifyMobileCallCapsChange(
|
|
1435 |
TInt aErrorCode )
|
|
1436 |
{
|
|
1437 |
//get req handle.
|
|
1438 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
1439 |
EMultimodeCallNotifyMobileCallCapsChange );
|
|
1440 |
|
|
1441 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
1442 |
{
|
|
1443 |
RMobileCall::TMobileCallCapsV1Pckg* callCapsV1Pckg =
|
|
1444 |
reinterpret_cast<RMobileCall::TMobileCallCapsV1Pckg*>(
|
|
1445 |
iRetNotifyMobileCallCaps );
|
|
1446 |
RMobileCall::TMobileCallCapsV1& callCapsV1 =
|
|
1447 |
( *callCapsV1Pckg )();
|
|
1448 |
|
|
1449 |
iMmCallExtInterface->GetMobileCallCapsV1( callCapsV1 );
|
|
1450 |
|
|
1451 |
if (callCapsV1.iCallControlCaps != iPreviousCallControlCaps )
|
|
1452 |
{
|
|
1453 |
//reset req handle.
|
|
1454 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1455 |
EMultimodeCallNotifyMobileCallCapsChange );
|
|
1456 |
|
|
1457 |
iPreviousCallControlCaps = callCapsV1.iCallControlCaps;
|
|
1458 |
iRetNotifyMobileCallCaps = NULL;
|
|
1459 |
ReqCompleted( reqHandle, aErrorCode );
|
|
1460 |
}
|
|
1461 |
}
|
|
1462 |
}
|
|
1463 |
|
|
1464 |
// ---------------------------------------------------------------------------
|
|
1465 |
// CMmCallTsy::CompleteNotifyMobileCallCapsChange
|
|
1466 |
// Returns a pointer to the active extension.
|
|
1467 |
// (other items were commented in a header).
|
|
1468 |
// ---------------------------------------------------------------------------
|
|
1469 |
//
|
|
1470 |
CMmCallExtInterface* CMmCallTsy::ActiveCallExtension()
|
|
1471 |
{
|
|
1472 |
return iMmCallExtInterface;
|
|
1473 |
}
|
|
1474 |
|
|
1475 |
// ---------------------------------------------------------------------------
|
|
1476 |
// CMmCallTsy::ClearCallStatus
|
|
1477 |
// Clears internal call status.
|
|
1478 |
// (other items were commented in a header).
|
|
1479 |
// ---------------------------------------------------------------------------
|
|
1480 |
//
|
|
1481 |
void CMmCallTsy::ClearCallStatus()
|
|
1482 |
{
|
|
1483 |
iCallDirection = RMobileCall::EDirectionUnknown;
|
|
1484 |
iEtelOriginated = ETrue;
|
|
1485 |
}
|
|
1486 |
|
|
1487 |
// ---------------------------------------------------------------------------
|
|
1488 |
// CMmCallTsy::Status
|
|
1489 |
// Returns the current core call status. Can be called from TSY classes.
|
|
1490 |
// (other items were commented in a header).
|
|
1491 |
// ---------------------------------------------------------------------------
|
|
1492 |
//
|
|
1493 |
RCall::TStatus CMmCallTsy::Status() const
|
|
1494 |
{
|
|
1495 |
return iCallStatus;
|
|
1496 |
}
|
|
1497 |
|
|
1498 |
// ---------------------------------------------------------------------------
|
|
1499 |
// CMmCallTsy::MobileCallStatus
|
|
1500 |
// Returns the current mobile call status. Can be called from TSY classes.
|
|
1501 |
// (other items were commented in a header).
|
|
1502 |
// ---------------------------------------------------------------------------
|
|
1503 |
//
|
|
1504 |
RMobileCall::TMobileCallStatus CMmCallTsy::MobileCallStatus() const
|
|
1505 |
{
|
|
1506 |
return iMobileCallStatus;
|
|
1507 |
}
|
|
1508 |
|
|
1509 |
// ---------------------------------------------------------------------------
|
|
1510 |
// CMmCallTsy::GetMobileCallStatus
|
|
1511 |
// Returns the current status of the call through the aStatus argument.
|
|
1512 |
// (other items were commented in a header).
|
|
1513 |
// ---------------------------------------------------------------------------
|
|
1514 |
//
|
|
1515 |
TInt CMmCallTsy::GetMobileCallStatus(
|
|
1516 |
const TTsyReqHandle aTsyReqHandle,
|
|
1517 |
RMobileCall::TMobileCallStatus* aStatus )
|
|
1518 |
{
|
|
1519 |
*aStatus = iMobileCallStatus;
|
|
1520 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
1521 |
return KErrNone;
|
|
1522 |
}
|
|
1523 |
|
|
1524 |
// ---------------------------------------------------------------------------
|
|
1525 |
// CMmCallTsy::NotifyMobileCallStatusChange
|
|
1526 |
// Allows a client to be notified when the call changes state. The request
|
|
1527 |
// completes when the call changes state, the new state being passed in the
|
|
1528 |
// aStatus parameter.
|
|
1529 |
// (other items were commented in a header).
|
|
1530 |
// ---------------------------------------------------------------------------
|
|
1531 |
//
|
|
1532 |
TInt CMmCallTsy::NotifyMobileCallStatusChange(
|
|
1533 |
RMobileCall::TMobileCallStatus* aStatus )
|
|
1534 |
{
|
|
1535 |
iRetMobileCallStatus = aStatus;
|
|
1536 |
iReqHandleType = EMultimodeCallNotifyMobileCallStatusChange;
|
|
1537 |
return KErrNone;
|
|
1538 |
}
|
|
1539 |
|
|
1540 |
// ---------------------------------------------------------------------------
|
|
1541 |
// CMmCallTsy::NotifyMobileCallStatusChangeCancel
|
|
1542 |
// Cancels an outstanding asynchronous NotifyMobileCallStatusChange request.
|
|
1543 |
// (other items were commented in a header).
|
|
1544 |
// ---------------------------------------------------------------------------
|
|
1545 |
//
|
|
1546 |
TInt CMmCallTsy::NotifyMobileCallStatusChangeCancel(
|
|
1547 |
const TTsyReqHandle aTsyReqHandle )
|
|
1548 |
{
|
|
1549 |
iRetMobileCallStatus = NULL;
|
|
1550 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1551 |
EMultimodeCallNotifyMobileCallStatusChange );
|
|
1552 |
|
|
1553 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1554 |
return KErrNone;
|
|
1555 |
}
|
|
1556 |
|
|
1557 |
// ---------------------------------------------------------------------------
|
|
1558 |
// CMmCallTsy::NotifyCallEvent
|
|
1559 |
// Allows clients to be notified when various call events occur. These events
|
|
1560 |
// may be generated locally (i.e. from within the ME) or remotely (by the
|
|
1561 |
// remote connected party). The request completes when an event occurs. Upon
|
|
1562 |
// completion, the aEvent parameter will return the event type.
|
|
1563 |
// (other items were commented in a header).
|
|
1564 |
// ---------------------------------------------------------------------------
|
|
1565 |
//
|
|
1566 |
TInt CMmCallTsy::NotifyCallEvent(
|
|
1567 |
RMobileCall::TMobileCallEvent* aEvent )
|
|
1568 |
{
|
|
1569 |
iRetCallEvent = aEvent;
|
|
1570 |
iReqHandleType = EMultimodeCallNotifyCallEvent;
|
|
1571 |
return KErrNone;
|
|
1572 |
}
|
|
1573 |
|
|
1574 |
// ---------------------------------------------------------------------------
|
|
1575 |
// CMmCallTsy::NotifyCallEventCancel
|
|
1576 |
// This method cancels an outstanding asynchronous NotifyCallEvent request.
|
|
1577 |
// (other items were commented in a header).
|
|
1578 |
// ---------------------------------------------------------------------------
|
|
1579 |
//
|
|
1580 |
TInt CMmCallTsy::NotifyCallEventCancel(
|
|
1581 |
const TTsyReqHandle aTsyReqHandle )
|
|
1582 |
{
|
|
1583 |
iRetCallEvent = NULL;
|
|
1584 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallNotifyCallEvent );
|
|
1585 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1586 |
return KErrNone;
|
|
1587 |
}
|
|
1588 |
|
|
1589 |
// ---------------------------------------------------------------------------
|
|
1590 |
// CMmCallTsy::CompleteNotifyCallEvent
|
|
1591 |
// Allows clients to be notified when various call events occur.
|
|
1592 |
// (other items were commented in a header).
|
|
1593 |
// ---------------------------------------------------------------------------
|
|
1594 |
//
|
|
1595 |
void CMmCallTsy::CompleteNotifyCallEvent(
|
|
1596 |
RMobileCall::TMobileCallEvent aEvent )
|
|
1597 |
{
|
|
1598 |
//reset req handle. Returns the deleted req handle
|
|
1599 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1600 |
EMultimodeCallNotifyCallEvent );
|
|
1601 |
|
|
1602 |
if ( EMultimodeCallReqHandleUnknown != reqHandle &&
|
|
1603 |
iRetCallEvent != NULL )
|
|
1604 |
{
|
|
1605 |
if( IsPartOfConference() && RMobileCall::ERemoteTerminated == aEvent )
|
|
1606 |
{
|
|
1607 |
TFLOGSTRING("TSY: iIsRemoteReleasedCall = ETrue");
|
|
1608 |
iIsRemoteReleasedCall = ETrue;
|
|
1609 |
}
|
|
1610 |
*iRetCallEvent = aEvent;
|
|
1611 |
ReqCompleted( reqHandle, KErrNone );
|
|
1612 |
}
|
|
1613 |
}
|
|
1614 |
|
|
1615 |
// ---------------------------------------------------------------------------
|
|
1616 |
// CMmCallTsy::CompleteNotifyRemoteCallEvent
|
|
1617 |
// Informs common TSY about a remote event (that cannot be understood from
|
|
1618 |
// status indication.
|
|
1619 |
// (other items were commented in a header).
|
|
1620 |
// ---------------------------------------------------------------------------
|
|
1621 |
//
|
|
1622 |
void CMmCallTsy::CompleteNotifyRemoteCallEvent(
|
|
1623 |
const CMmDataPackage* aDataPackage )
|
|
1624 |
{
|
|
1625 |
RMobileCall::TMobileCallEvent callEvent( RMobileCall::ERemoteHold );
|
|
1626 |
aDataPackage->UnPackData( callEvent );
|
|
1627 |
|
|
1628 |
switch ( callEvent )
|
|
1629 |
{
|
|
1630 |
case RMobileCall::ERemoteHold:
|
|
1631 |
case RMobileCall::ERemoteResume:
|
|
1632 |
case RMobileCall::ERemoteTerminated:
|
|
1633 |
case RMobileCall::ERemoteConferenceCreate:
|
|
1634 |
CompleteNotifyCallEvent( callEvent );
|
|
1635 |
break;
|
|
1636 |
//local events handled by CMmCallTsy::CompleteNotifyStatusChange
|
|
1637 |
case RMobileCall::ELocalHold:
|
|
1638 |
case RMobileCall::ELocalResume:
|
|
1639 |
case RMobileCall::ELocalDeflectCall:
|
|
1640 |
case RMobileCall::ELocalTransfer:
|
|
1641 |
//not supported cases
|
|
1642 |
case RMobileCall::ERemoteTransferring:
|
|
1643 |
case RMobileCall::ERemoteTransferAlerting:
|
|
1644 |
case RMobileCall::ERemoteBarred:
|
|
1645 |
case RMobileCall::ERemoteForwarding:
|
|
1646 |
case RMobileCall::ERemoteWaiting:
|
|
1647 |
case RMobileCall::ELocalBarred:
|
|
1648 |
default:
|
|
1649 |
break;
|
|
1650 |
}
|
|
1651 |
}
|
|
1652 |
|
|
1653 |
// ---------------------------------------------------------------------------
|
|
1654 |
// CMmCallTsy::GetMobileCallInfo
|
|
1655 |
// The method returns a current snapshot of the call information
|
|
1656 |
// described in the TMobileCallInfoVx class. The class is packaged into
|
|
1657 |
// a TMobileCallInfoVxPckg before being passed to the GetMobileCallInfo method.
|
|
1658 |
// This method actually calls FillMobileCallInfo method to get mobile call
|
|
1659 |
// information.
|
|
1660 |
// (other items were commented in a header).
|
|
1661 |
// ---------------------------------------------------------------------------
|
|
1662 |
//
|
|
1663 |
TInt CMmCallTsy::GetMobileCallInfo(
|
|
1664 |
const TTsyReqHandle aTsyReqHandle,
|
|
1665 |
TDes8* aInfo )
|
|
1666 |
{
|
|
1667 |
//get the mobile call information
|
|
1668 |
TInt ret = FillMobileCallInfo( aInfo );
|
|
1669 |
|
|
1670 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1671 |
return KErrNone;
|
|
1672 |
}
|
|
1673 |
|
|
1674 |
// ---------------------------------------------------------------------------
|
|
1675 |
// CMmCallTsy::FillMobileCallInfo
|
|
1676 |
// The method fills a current snapshot of the call information described in
|
|
1677 |
// the TMobileCallInfoVx class to the aInfo. The mode specific fields will
|
|
1678 |
// be filled by the extension.
|
|
1679 |
// (other items were commented in a header).
|
|
1680 |
// ---------------------------------------------------------------------------
|
|
1681 |
//
|
|
1682 |
TInt CMmCallTsy::FillMobileCallInfo(
|
|
1683 |
TDes8* aInfo )
|
|
1684 |
{
|
|
1685 |
TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo");
|
|
1686 |
|
|
1687 |
TInt ret = KErrArgument;
|
|
1688 |
TInt extensionId = 0;
|
|
1689 |
|
|
1690 |
if ( sizeof ( RMobilePhone::TMultimodeType ) <= aInfo->MaxLength() )
|
|
1691 |
{
|
|
1692 |
RMobilePhone::TMultimodeTypePckg* infoParamsPckg =
|
|
1693 |
reinterpret_cast<RMobilePhone::TMultimodeTypePckg*>(
|
|
1694 |
aInfo );
|
|
1695 |
RMobilePhone::TMultimodeType& callInfo = ( *infoParamsPckg )();
|
|
1696 |
|
|
1697 |
// get extensionid from the recieved data
|
|
1698 |
extensionId = callInfo.ExtensionId();
|
|
1699 |
TFLOGSTRING2("TSY: CMmCallTsy::FillMobileCallInfo - extensionid=%d",callInfo.ExtensionId());
|
|
1700 |
}
|
|
1701 |
|
|
1702 |
//TMobileCallInfoV1
|
|
1703 |
if ( KETelExtMultimodeV1 == extensionId ||
|
|
1704 |
KETelExtMultimodeV3 == extensionId ||
|
|
1705 |
KEtelExtMultimodeV7 == extensionId ||
|
|
1706 |
KEtelExtMultimodeV8 == extensionId )
|
|
1707 |
{
|
|
1708 |
TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V1");
|
|
1709 |
|
|
1710 |
// Set ret to KErrNone. We can fill this parameter class.
|
|
1711 |
ret = KErrNone;
|
|
1712 |
|
|
1713 |
RMobileCall::TMobileCallInfoV1Pckg* paramsPckgV1 =
|
|
1714 |
reinterpret_cast<RMobileCall::TMobileCallInfoV1Pckg*>( aInfo );
|
|
1715 |
RMobileCall::TMobileCallInfoV1& info = ( *paramsPckgV1 )();
|
|
1716 |
|
|
1717 |
// set mobilecallinfo default values
|
|
1718 |
FillMobileCallInfoDefaults( &info );
|
|
1719 |
|
|
1720 |
// fill specific data
|
|
1721 |
iMmCallExtInterface->FillMobileCallInfo( &info );
|
|
1722 |
}
|
|
1723 |
|
|
1724 |
// TMobileCallInfoV3
|
|
1725 |
if ( KETelExtMultimodeV3 == extensionId ||
|
|
1726 |
KEtelExtMultimodeV7 == extensionId ||
|
|
1727 |
KEtelExtMultimodeV8 == extensionId )
|
|
1728 |
{
|
|
1729 |
TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V3");
|
|
1730 |
|
|
1731 |
RMobileCall::TMobileCallInfoV3Pckg* paramsPckgV3 =
|
|
1732 |
reinterpret_cast<RMobileCall::TMobileCallInfoV3Pckg*>( aInfo );
|
|
1733 |
RMobileCall::TMobileCallInfoV3& info = ( *paramsPckgV3 )();
|
|
1734 |
|
|
1735 |
// fill specific data
|
|
1736 |
iMmCallExtInterface->FillMobileCallInfoV3( &info ) ;
|
|
1737 |
}
|
|
1738 |
|
|
1739 |
// TMobileCallInfoV7
|
|
1740 |
if ( KEtelExtMultimodeV7 == extensionId ||
|
|
1741 |
KEtelExtMultimodeV8 == extensionId )
|
|
1742 |
{
|
|
1743 |
TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V7");
|
|
1744 |
|
|
1745 |
RMobileCall::TMobileCallInfoV7Pckg* paramsPckgV7 =
|
|
1746 |
reinterpret_cast<RMobileCall::TMobileCallInfoV7Pckg*>( aInfo );
|
|
1747 |
RMobileCall::TMobileCallInfoV7& info = ( *paramsPckgV7 )();
|
|
1748 |
|
|
1749 |
// fill specific data
|
|
1750 |
iMmCallExtInterface->FillMobileCallInfoV7( &info );
|
|
1751 |
}
|
|
1752 |
|
|
1753 |
// TMobileCallInfoV8
|
|
1754 |
if ( KEtelExtMultimodeV8 == extensionId )
|
|
1755 |
{
|
|
1756 |
TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V8");
|
|
1757 |
|
|
1758 |
RMobileCall::TMobileCallInfoV8Pckg* paramsPckgV8 =
|
|
1759 |
reinterpret_cast<RMobileCall::TMobileCallInfoV8Pckg*>( aInfo );
|
|
1760 |
RMobileCall::TMobileCallInfoV8& info = ( *paramsPckgV8 )();
|
|
1761 |
|
|
1762 |
// fill specific data
|
|
1763 |
iMmCallExtInterface->FillMobileCallInfoV8( &info );
|
|
1764 |
}
|
|
1765 |
|
|
1766 |
TFLOGSTRING2("TSY: CMmCallTsy::FillMobileCallInfo end. ret=%d",ret);
|
|
1767 |
|
|
1768 |
return ret;
|
|
1769 |
}
|
|
1770 |
|
|
1771 |
// ---------------------------------------------------------------------------
|
|
1772 |
// CMmCallTsy::NotifyRemotePartyInfoChange
|
|
1773 |
// This method allows the client to be notified of any change in the remote
|
|
1774 |
// party information.
|
|
1775 |
// (other items were commented in a header).
|
|
1776 |
// ---------------------------------------------------------------------------
|
|
1777 |
//
|
|
1778 |
TInt CMmCallTsy::NotifyRemotePartyInfoChange(
|
|
1779 |
TDes8* aRemotePartyInfo )
|
|
1780 |
{
|
|
1781 |
TInt ret = KErrNone;
|
|
1782 |
|
|
1783 |
if( sizeof( RMobileCall::TMobileCallRemotePartyInfoV1 ) > aRemotePartyInfo->MaxLength() )
|
|
1784 |
{
|
|
1785 |
TFLOGSTRING ("TSY: CMmCallTsy::NotifyRemotePartyInfoChange Bad size argument");
|
|
1786 |
|
|
1787 |
// Complete the request with appropiate error
|
|
1788 |
ret = KErrArgument;
|
|
1789 |
}
|
|
1790 |
else
|
|
1791 |
{
|
|
1792 |
iRetRemotePartyInfo = aRemotePartyInfo;
|
|
1793 |
iReqHandleType = EMultimodeCallNotifyRemotePartyInfoChange;
|
|
1794 |
}
|
|
1795 |
|
|
1796 |
return ret;
|
|
1797 |
}
|
|
1798 |
|
|
1799 |
// ---------------------------------------------------------------------------
|
|
1800 |
// CMmCallTsy::NotifyRemotePartyInfoChangeCancel
|
|
1801 |
// This method cancels an outstanding asynchronous NotifyRemotePartyInfoChange
|
|
1802 |
// request.
|
|
1803 |
// (other items were commented in a header).
|
|
1804 |
// ---------------------------------------------------------------------------
|
|
1805 |
//
|
|
1806 |
TInt CMmCallTsy::NotifyRemotePartyInfoChangeCancel(
|
|
1807 |
const TTsyReqHandle aTsyReqHandle )
|
|
1808 |
{
|
|
1809 |
iRetRemotePartyInfo = NULL;
|
|
1810 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1811 |
EMultimodeCallNotifyRemotePartyInfoChange );
|
|
1812 |
|
|
1813 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1814 |
return KErrNone;
|
|
1815 |
}
|
|
1816 |
|
|
1817 |
// ---------------------------------------------------------------------------
|
|
1818 |
// CMmCallTsy::CompleteNotifyRemotePartyInfoChange
|
|
1819 |
// Completes a NotifyRemotePartyInfoChange method.
|
|
1820 |
// (other items were commented in a header).
|
|
1821 |
// ---------------------------------------------------------------------------
|
|
1822 |
//
|
|
1823 |
void CMmCallTsy::CompleteNotifyRemotePartyInfoChange()
|
|
1824 |
{
|
|
1825 |
//reset req handle. Returns the deleted req handle
|
|
1826 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1827 |
EMultimodeCallNotifyRemotePartyInfoChange );
|
|
1828 |
|
|
1829 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
1830 |
{
|
|
1831 |
iMmCallExtInterface->GetRemotePartyInfo(
|
|
1832 |
reinterpret_cast<RMobileCall::TMobileCallRemotePartyInfoV1Pckg*>
|
|
1833 |
( iRetRemotePartyInfo ) );
|
|
1834 |
ReqCompleted( reqHandle, KErrNone );
|
|
1835 |
}
|
|
1836 |
}
|
|
1837 |
|
|
1838 |
// ---------------------------------------------------------------------------
|
|
1839 |
// CMmCallTsy::CompleteNotifyMobileCallInfoChange
|
|
1840 |
// Notifies common TSY about mobile call information change.
|
|
1841 |
// (other items were commented in a header).
|
|
1842 |
// ---------------------------------------------------------------------------
|
|
1843 |
//
|
|
1844 |
void CMmCallTsy::CompleteNotifyMobileCallInfoChange(
|
|
1845 |
CMmDataPackage* aDataPackage )
|
|
1846 |
{
|
|
1847 |
//set data to gsm extension
|
|
1848 |
//( direction added because not uppdated in messagehandler)
|
|
1849 |
iMmCallExtInterface->SetMobileCallData(
|
|
1850 |
aDataPackage, iCallDirection );
|
|
1851 |
//call completenotify remotepartyinfochange
|
|
1852 |
CompleteNotifyRemotePartyInfoChange();
|
|
1853 |
}
|
|
1854 |
|
|
1855 |
// ---------------------------------------------------------------------------
|
|
1856 |
// CMmCallTsy::TransferL
|
|
1857 |
// This method allows a client to transfer a call so that the remote party of
|
|
1858 |
// one call ends up connected to the remote party of another call while this
|
|
1859 |
// user drops out of both calls.
|
|
1860 |
// (other items were commented in a header).
|
|
1861 |
// ---------------------------------------------------------------------------
|
|
1862 |
//
|
|
1863 |
TInt CMmCallTsy::TransferL(
|
|
1864 |
const TTsyReqHandle aTsyReqHandle )
|
|
1865 |
{
|
|
1866 |
TInt ret( KErrServerBusy );
|
|
1867 |
|
|
1868 |
TTsyReqHandle transferHandle =
|
|
1869 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallTransfer );
|
|
1870 |
|
|
1871 |
if ( !transferHandle )
|
|
1872 |
{
|
|
1873 |
ret = iMmCallExtInterface->TransferL();
|
|
1874 |
|
|
1875 |
if ( KErrNone != ret )
|
|
1876 |
{
|
|
1877 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1878 |
}
|
|
1879 |
else
|
|
1880 |
{
|
|
1881 |
//save tsy req handle type
|
|
1882 |
iReqHandleType = EMultimodeCallTransfer;
|
|
1883 |
}
|
|
1884 |
}
|
|
1885 |
else
|
|
1886 |
{
|
|
1887 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1888 |
}
|
|
1889 |
return KErrNone;
|
|
1890 |
}
|
|
1891 |
|
|
1892 |
// ---------------------------------------------------------------------------
|
|
1893 |
// CMmCallTsy::CompleteTransfer
|
|
1894 |
// This method completes an outstanding asynchronous Transfer request.
|
|
1895 |
// (other items were commented in a header).
|
|
1896 |
// ---------------------------------------------------------------------------
|
|
1897 |
//
|
|
1898 |
void CMmCallTsy::CompleteTransfer(
|
|
1899 |
TInt aErrorCode )
|
|
1900 |
{
|
|
1901 |
//reset req handle. Returns the deleted req handle
|
|
1902 |
TTsyReqHandle reqHandle =
|
|
1903 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallTransfer );
|
|
1904 |
|
|
1905 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
1906 |
{
|
|
1907 |
ReqCompleted( reqHandle, aErrorCode );
|
|
1908 |
}
|
|
1909 |
}
|
|
1910 |
|
|
1911 |
// ---------------------------------------------------------------------------
|
|
1912 |
// CMmCallTsy::NotifyPrivacyConfirmation
|
|
1913 |
// This method allows the client to be notified when the network has confirmed
|
|
1914 |
// the privacy setting.
|
|
1915 |
// (other items were commented in a header).
|
|
1916 |
// ---------------------------------------------------------------------------
|
|
1917 |
//
|
|
1918 |
TInt CMmCallTsy::NotifyPrivacyConfirmation(
|
|
1919 |
RMobilePhone::TMobilePhonePrivacy* aPrivacyStatus )
|
|
1920 |
{
|
|
1921 |
iRetPrivacyStatus = aPrivacyStatus;
|
|
1922 |
iReqHandleType = EMultimodeCallNotifyPrivacyConfirmation;
|
|
1923 |
return KErrNone;
|
|
1924 |
}
|
|
1925 |
|
|
1926 |
// ---------------------------------------------------------------------------
|
|
1927 |
// CMmCallTsy::NotifyPrivacyConfirmationCancel
|
|
1928 |
// Cancels an outstanding asynchronous NotifyPrivacyConfirmation request.
|
|
1929 |
// (other items were commented in a header).
|
|
1930 |
// ---------------------------------------------------------------------------
|
|
1931 |
//
|
|
1932 |
TInt CMmCallTsy::NotifyPrivacyConfirmationCancel(
|
|
1933 |
const TTsyReqHandle aTsyReqHandle )
|
|
1934 |
{
|
|
1935 |
iRetPrivacyStatus = NULL;
|
|
1936 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1937 |
EMultimodeCallNotifyPrivacyConfirmation );
|
|
1938 |
|
|
1939 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1940 |
return KErrNone;
|
|
1941 |
}
|
|
1942 |
|
|
1943 |
// ---------------------------------------------------------------------------
|
|
1944 |
// CMmCallTsy::CompleteNotifyPrivacyConfirmation
|
|
1945 |
// Completes a NotifyPrivacyConfirmation request.
|
|
1946 |
// (other items were commented in a header).
|
|
1947 |
// ---------------------------------------------------------------------------
|
|
1948 |
//
|
|
1949 |
void CMmCallTsy::CompleteNotifyPrivacyConfirmation(
|
|
1950 |
RMobilePhone::TMobilePhonePrivacy aStatus )
|
|
1951 |
{
|
|
1952 |
//reset req handle. Returns the deleted req handle
|
|
1953 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1954 |
EMultimodeCallNotifyPrivacyConfirmation );
|
|
1955 |
|
|
1956 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
1957 |
{
|
|
1958 |
*iRetPrivacyStatus = aStatus;
|
|
1959 |
ReqCompleted( reqHandle, KErrNone );
|
|
1960 |
}
|
|
1961 |
}
|
|
1962 |
|
|
1963 |
// ---------------------------------------------------------------------------
|
|
1964 |
// CMmCallTsy::Line
|
|
1965 |
// Return the line from which this call object has been opened from.
|
|
1966 |
// (other items were commented in a header).
|
|
1967 |
// ---------------------------------------------------------------------------
|
|
1968 |
//
|
|
1969 |
CMmLineTsy* CMmCallTsy::Line()
|
|
1970 |
{
|
|
1971 |
//Return the line from which this call object has been opened from.
|
|
1972 |
return iMmLine;
|
|
1973 |
}
|
|
1974 |
|
|
1975 |
// ---------------------------------------------------------------------------
|
|
1976 |
// CMmCallTsy::Phone
|
|
1977 |
// This method returns pointer to the Phone object.
|
|
1978 |
// (other items were commented in a header).
|
|
1979 |
// ---------------------------------------------------------------------------
|
|
1980 |
//
|
|
1981 |
CMmPhoneTsy* CMmCallTsy::Phone()
|
|
1982 |
{
|
|
1983 |
//This method returns pointer to the Phone object.
|
|
1984 |
return iMmPhone;
|
|
1985 |
}
|
|
1986 |
|
|
1987 |
// ---------------------------------------------------------------------------
|
|
1988 |
// CMmCallTsy::GetCallDurationInSeconds
|
|
1989 |
// Returns call duration in seconds. If call is not active, the duration of
|
|
1990 |
// the last successful call will be returned.
|
|
1991 |
// (other items were commented in a header).
|
|
1992 |
// ---------------------------------------------------------------------------
|
|
1993 |
//
|
|
1994 |
TTimeIntervalSeconds CMmCallTsy::GetCallDurationInSeconds()
|
|
1995 |
{
|
|
1996 |
// If the call is active, NumberOfBeats will return the current duration
|
|
1997 |
// If the call is not active, NumberOfBeats will return the last
|
|
1998 |
// call duration
|
|
1999 |
TTimeIntervalSeconds duration ( iCallTimer->NumberOfBeats() );
|
|
2000 |
return duration;
|
|
2001 |
}
|
|
2002 |
|
|
2003 |
// ---------------------------------------------------------------------------
|
|
2004 |
// CMmCallTsy::IsServiceLocallyRequested
|
|
2005 |
// Return ETrue if this type of request is requested by any of TSY's client.
|
|
2006 |
// (other items were commented in a header).
|
|
2007 |
// ---------------------------------------------------------------------------
|
|
2008 |
//
|
|
2009 |
TBool CMmCallTsy::IsServiceLocallyRequested(
|
|
2010 |
CMmCallTsy::TCallRequestTypes aReqType )
|
|
2011 |
{
|
|
2012 |
//Return ETrue if this type of request is requested by any TSY's client.
|
|
2013 |
//create parameter callCount and get number of objects from call list to
|
|
2014 |
//it
|
|
2015 |
TInt callCount = iMmPhone->CallList()->GetNumberOfObjects();
|
|
2016 |
CMmCallTsy* mmCall = NULL;
|
|
2017 |
TBool ret( EFalse);
|
|
2018 |
|
|
2019 |
for ( TInt i = 0; i < callCount; i++ )
|
|
2020 |
{
|
|
2021 |
mmCall = reinterpret_cast<CMmCallTsy*>(
|
|
2022 |
iMmPhone->CallList()->GetObjectByIndex(i));
|
|
2023 |
|
|
2024 |
if( mmCall->ServiceRequested( aReqType ) )
|
|
2025 |
{
|
|
2026 |
ret = ETrue;
|
|
2027 |
break;
|
|
2028 |
}
|
|
2029 |
}
|
|
2030 |
return ret;
|
|
2031 |
}
|
|
2032 |
|
|
2033 |
// ---------------------------------------------------------------------------
|
|
2034 |
// CMmCallTsy::GetGhostCall
|
|
2035 |
// Return ETrue if this call is a Ghost Call
|
|
2036 |
// (other items were commented in a header).
|
|
2037 |
// ---------------------------------------------------------------------------
|
|
2038 |
//
|
|
2039 |
TBool CMmCallTsy::GetGhostCall() const
|
|
2040 |
{
|
|
2041 |
return iGhostCall;
|
|
2042 |
}
|
|
2043 |
|
|
2044 |
// ---------------------------------------------------------------------------
|
|
2045 |
// CMmCallTsy::GetDiagnostics
|
|
2046 |
// Returns value of iDiagnosticOctect internal attribute
|
|
2047 |
// (other items were commented in a header).
|
|
2048 |
// ---------------------------------------------------------------------------
|
|
2049 |
//
|
|
2050 |
TUint8 CMmCallTsy::GetDiagnostics() const
|
|
2051 |
{
|
|
2052 |
return iDiagnosticOctet;
|
|
2053 |
}
|
|
2054 |
|
|
2055 |
// ---------------------------------------------------------------------------
|
|
2056 |
// CMmCallTsy::SetDiagnostics
|
|
2057 |
// Sets aDiagnosticOctet into internal variable iDiagnosticOctet
|
|
2058 |
// (other items were commented in a header).
|
|
2059 |
// ---------------------------------------------------------------------------
|
|
2060 |
//
|
|
2061 |
void CMmCallTsy::SetDiagnostics(
|
|
2062 |
TUint8 aDiagnosticOctet )
|
|
2063 |
{
|
|
2064 |
iDiagnosticOctet = aDiagnosticOctet;
|
|
2065 |
}
|
|
2066 |
|
|
2067 |
// ---------------------------------------------------------------------------
|
|
2068 |
// CMmCallTsy::GetCallReqHandleStore
|
|
2069 |
// Returns pointer to iTsyReqHandleStore
|
|
2070 |
// (other items were commented in a header).
|
|
2071 |
// ---------------------------------------------------------------------------
|
|
2072 |
//
|
|
2073 |
CMmTsyReqHandleStore* CMmCallTsy::GetCallReqHandleStore()
|
|
2074 |
{
|
|
2075 |
return iTsyReqHandleStore;
|
|
2076 |
}
|
|
2077 |
|
|
2078 |
// ---------------------------------------------------------------------------
|
|
2079 |
// CMmCallTsy::SetUnownedCallObjectFlag
|
|
2080 |
// TSY creates automatically call object for incoming call or ghost call that
|
|
2081 |
// is created using AT-commands. This method sets flag indicating if a client
|
|
2082 |
// has't opened existing call object for this call.
|
|
2083 |
// (other items were commented in a header).
|
|
2084 |
// ---------------------------------------------------------------------------
|
|
2085 |
//
|
|
2086 |
void CMmCallTsy::SetUnownedCallObjectFlag(
|
|
2087 |
TBool aIsUnownedCallObject )
|
|
2088 |
{
|
|
2089 |
iUnownedCallObject = aIsUnownedCallObject;
|
|
2090 |
}
|
|
2091 |
|
|
2092 |
// ---------------------------------------------------------------------------
|
|
2093 |
// CMmCallTsy::IsUnownedCallObject
|
|
2094 |
// TSY creates automatically call object for incoming call or ghost call that
|
|
2095 |
// is created using AT-commands. This flag indicates that client haven't
|
|
2096 |
// opened existing call object for this call.
|
|
2097 |
// (other items were commented in a header).
|
|
2098 |
// ---------------------------------------------------------------------------
|
|
2099 |
//
|
|
2100 |
TBool CMmCallTsy::IsUnownedCallObject() const
|
|
2101 |
{
|
|
2102 |
return iUnownedCallObject;
|
|
2103 |
}
|
|
2104 |
|
|
2105 |
// ---------------------------------------------------------------------------
|
|
2106 |
// CMmCallTsy::SetGhostCall
|
|
2107 |
// Sets a flag that indicates that this call is not created through ETel
|
|
2108 |
// (other items were commented in a header).
|
|
2109 |
// ---------------------------------------------------------------------------
|
|
2110 |
//
|
|
2111 |
void CMmCallTsy::SetGhostCall(
|
|
2112 |
TBool aValue )
|
|
2113 |
{
|
|
2114 |
//Sets a flag that indicates that this call is not created through ETel
|
|
2115 |
iGhostCall = aValue;
|
|
2116 |
|
|
2117 |
if ( aValue )
|
|
2118 |
{
|
|
2119 |
iEtelOriginated = EFalse;
|
|
2120 |
}
|
|
2121 |
}
|
|
2122 |
|
|
2123 |
// ---------------------------------------------------------------------------
|
|
2124 |
// CMmCallTsy::ETelOriginated
|
|
2125 |
// Returns ETrue is this call has been originated through ETel API
|
|
2126 |
// (other items were commented in a header).
|
|
2127 |
// ---------------------------------------------------------------------------
|
|
2128 |
//
|
|
2129 |
TBool CMmCallTsy::ETelOriginated() const
|
|
2130 |
{
|
|
2131 |
return iEtelOriginated;
|
|
2132 |
}
|
|
2133 |
|
|
2134 |
// ---------------------------------------------------------------------------
|
|
2135 |
// CMmCallTsy::ServiceRequested
|
|
2136 |
// Returns ETrue if this service is pending on this call object
|
|
2137 |
// (other items were commented in a header).
|
|
2138 |
// ---------------------------------------------------------------------------
|
|
2139 |
//
|
|
2140 |
TBool CMmCallTsy::ServiceRequested(
|
|
2141 |
CMmCallTsy::TCallRequestTypes aReqType )
|
|
2142 |
{
|
|
2143 |
TBool ret( EFalse );
|
|
2144 |
|
|
2145 |
if( CMmCallTsy::EMultimodeCallReqHandleUnknown !=
|
|
2146 |
iTsyReqHandleStore->GetTsyReqHandle( aReqType ) )
|
|
2147 |
{
|
|
2148 |
//Returns ETrue if this service is pending on this call object
|
|
2149 |
ret = ETrue;
|
|
2150 |
}
|
|
2151 |
return ret;
|
|
2152 |
}
|
|
2153 |
|
|
2154 |
#ifdef REQHANDLE_TIMER
|
|
2155 |
// ---------------------------------------------------------------------------
|
|
2156 |
// CMmCallTsy::Complete
|
|
2157 |
// Completes the request due timer expiration
|
|
2158 |
// (other items were commented in a header).
|
|
2159 |
// ---------------------------------------------------------------------------
|
|
2160 |
//
|
|
2161 |
void CMmCallTsy::Complete(
|
|
2162 |
TInt aReqHandleType,
|
|
2163 |
TInt aError )
|
|
2164 |
{
|
|
2165 |
//All possible TSY req handle types are listed in the
|
|
2166 |
//switch case below.
|
|
2167 |
switch( aReqHandleType )
|
|
2168 |
{
|
|
2169 |
//cases handled with automatic completion
|
|
2170 |
case EMultimodeCallDial:
|
|
2171 |
case EMultimodeCallDialISV:
|
|
2172 |
CompleteDial( aError );
|
|
2173 |
break;
|
|
2174 |
case EMultimodeCallDialNoFdnCheck:
|
|
2175 |
CompleteDialNoFdn( aError );
|
|
2176 |
break;
|
|
2177 |
case EMultimodeCallAnswer:
|
|
2178 |
case EMultimodeCallAnswerISV:
|
|
2179 |
CompleteAnswerIncomingCall( aError );
|
|
2180 |
break;
|
|
2181 |
case EMultimodeCallHangUp:
|
|
2182 |
CompleteHangUp( aError );
|
|
2183 |
break;
|
|
2184 |
case EMultimodeCallTransfer:
|
|
2185 |
CompleteTransfer( aError );
|
|
2186 |
break;
|
|
2187 |
|
|
2188 |
//Can't use timer:
|
|
2189 |
// - all notifications
|
|
2190 |
//case EMultimodeCallNotifyStatusChange:
|
|
2191 |
//case EMultimodeCallNotifyDurationChange:
|
|
2192 |
//case EMultimodeCallCapsChangeNotification:
|
|
2193 |
//case EMultimodeCallNotifyMobileCallStatusChange:
|
|
2194 |
//case EMultimodeCallNotifyCallEvent:
|
|
2195 |
//case EMultimodeCallNotifyRemotePartyInfoChange:
|
|
2196 |
//case EMultimodeCallNotifyMobileCallCapsChange:
|
|
2197 |
//case EMultimodeCallNotifyDataCallCapsChange:
|
|
2198 |
//case EMultimodeCallNotifyHscsdInfoChange:
|
|
2199 |
//case EMultimodeCallNotifyPrivacyConfirmation:
|
|
2200 |
|
|
2201 |
case EMultimodeMobileCallHold:
|
|
2202 |
case EMultimodeMobileCallResume:
|
|
2203 |
case EMultimodeMobileCallSwap:
|
|
2204 |
case EMultimodeMobileCallDeflectCall:
|
|
2205 |
case EMultimodeMobileCallDialEmergencyCall:
|
|
2206 |
case EMultimodeCallGoOneToOne:
|
|
2207 |
case EMultimodeCallSetDynamicHscsdParams:
|
|
2208 |
default:
|
|
2209 |
ReqCompleted(
|
|
2210 |
iTsyReqHandleStore->ResetTsyReqHandle( aReqHandleType ),
|
|
2211 |
aError );
|
|
2212 |
break;
|
|
2213 |
}
|
|
2214 |
}
|
|
2215 |
#endif
|
|
2216 |
|
|
2217 |
|
|
2218 |
#ifdef TF_LOGGING_ENABLED
|
|
2219 |
// ---------------------------------------------------------------------------
|
|
2220 |
// CMmCallTsy::ReqCompleted
|
|
2221 |
// Overloads CTelObject::ReqCompleted for logging purposes. It prints the
|
|
2222 |
// aTsyReqHandle and aError variable in the log file and then calls
|
|
2223 |
// CTelObject::ReqCompleted.
|
|
2224 |
// (other items were commented in a header).
|
|
2225 |
// ---------------------------------------------------------------------------
|
|
2226 |
//
|
|
2227 |
void CMmCallTsy::ReqCompleted(
|
|
2228 |
const TTsyReqHandle aTsyReqHandle,
|
|
2229 |
const TInt aError )
|
|
2230 |
{
|
|
2231 |
//Overloads CTelObject::ReqCompleted for logging purposes. It
|
|
2232 |
//prints the aTsyReqHandle and aError variable in the log file and then
|
|
2233 |
//calls CTelObject::ReqCompleted.
|
|
2234 |
TFLOGSTRING3("TSY: CMmCallTsy::Request Completed. Handle:%d Error:%d", aTsyReqHandle, aError);
|
|
2235 |
|
|
2236 |
CTelObject::ReqCompleted(aTsyReqHandle,aError);
|
|
2237 |
}
|
|
2238 |
#endif
|
|
2239 |
|
|
2240 |
// ---------------------------------------------------------------------------
|
|
2241 |
// CMmCallTsy::IsPartOfConference
|
|
2242 |
// Returns ETrue if this call is part of a conference
|
|
2243 |
// ---------------------------------------------------------------------------
|
|
2244 |
//
|
|
2245 |
TBool CMmCallTsy::IsPartOfConference() const
|
|
2246 |
{
|
|
2247 |
return iIsPartOfConference;
|
|
2248 |
}
|
|
2249 |
|
|
2250 |
// ---------------------------------------------------------------------------
|
|
2251 |
// CMmCallTsy::SetPartOfConference
|
|
2252 |
// Sets the flag indicating that this call is part of a MO conference
|
|
2253 |
// ---------------------------------------------------------------------------
|
|
2254 |
//
|
|
2255 |
void CMmCallTsy::SetPartOfConference( TBool aPartOfConference )
|
|
2256 |
{
|
|
2257 |
iIsPartOfConference = aPartOfConference;
|
|
2258 |
|
|
2259 |
#ifdef TF_LOGGING_METHOD
|
|
2260 |
if ( iIsPartOfConference )
|
|
2261 |
{
|
|
2262 |
TFLOGSTRING2( "TSY: CMmCallTsy::SetPartOfConference: Call %d has joined the conference", iCallId );
|
|
2263 |
}
|
|
2264 |
else
|
|
2265 |
{
|
|
2266 |
TFLOGSTRING( "TSY: CMmCallTsy::SetPartOfConference: Call has left the conference" );
|
|
2267 |
}
|
|
2268 |
#endif // TF_LOGGING_METHOD
|
|
2269 |
|
|
2270 |
}
|
|
2271 |
// ---------------------------------------------------------------------------
|
|
2272 |
// CMmCallTsy::IsRequestPossibleInOffLine
|
|
2273 |
// Checks wether a ETel request can be performed or not while offline mode is
|
|
2274 |
// enabled
|
|
2275 |
// ---------------------------------------------------------------------------
|
|
2276 |
//
|
|
2277 |
TBool CMmCallTsy::IsRequestPossibleInOffline( TInt aIpc ) const
|
|
2278 |
{
|
|
2279 |
// we assume here that most of the requests are possible, thefore
|
|
2280 |
// we switch for the not possible ones, optimizing a bit the checking.
|
|
2281 |
TBool isRequestPossible ( ETrue );
|
|
2282 |
|
|
2283 |
switch ( aIpc )
|
|
2284 |
{
|
|
2285 |
case EMobileCallDialEmergencyCall://OK (when flag is enabled)
|
|
2286 |
{
|
|
2287 |
isRequestPossible = EFalse;
|
|
2288 |
RFeatureControl featureControl;
|
|
2289 |
TInt err = featureControl.Open();
|
|
2290 |
if ( (err == KErrNone) && (featureControl.FeatureSupported(NFeature::KEmergencyCallsEnabledInOfflineMode) == KFeatureSupported) )
|
|
2291 |
{
|
|
2292 |
isRequestPossible = ETrue;
|
|
2293 |
}
|
|
2294 |
featureControl.Close();
|
|
2295 |
}
|
|
2296 |
break;
|
|
2297 |
//case EMobileCallGetMobileCallStatus: //OK
|
|
2298 |
//case EMobileCallNotifyMobileCallStatusChange://OK
|
|
2299 |
case EMobileCallHold://NO
|
|
2300 |
case EMobileCallResume://NO
|
|
2301 |
case EMobileCallSwap://NO
|
|
2302 |
case EMobileCallTransfer://NO
|
|
2303 |
case EMobileCallGoOneToOne://NO
|
|
2304 |
//case EMobileCallNotifyCallEvent://OK
|
|
2305 |
//case EMobileCallGetMobileCallCaps: //OK
|
|
2306 |
//case EMobileCallNotifyMobileCallCapsChange: //OK
|
|
2307 |
//case EMobileCallGetMobileCallInfo://OK
|
|
2308 |
//case EMobileCallNotifyRemotePartyInfoChange://OK
|
|
2309 |
//case EMobileCallNotifyPrivacyConfirmation://OK
|
|
2310 |
//case EMobileCallGetMobileDataCallCaps: //OK
|
|
2311 |
//case EMobileCallNotifyMobileDataCallCapsChange: //OK
|
|
2312 |
//case EMobileCallGetMobileDataCallRLPRange://OK
|
|
2313 |
//case EMobileCallSetDynamicHscsdParams://OK
|
|
2314 |
//case EMobileCallGetCurrentHscsdInfo://OK
|
|
2315 |
//case EMobileCallNotifyHscsdInfoChange://OK
|
|
2316 |
isRequestPossible = EFalse;
|
|
2317 |
break;
|
|
2318 |
default:
|
|
2319 |
break;
|
|
2320 |
}
|
|
2321 |
|
|
2322 |
return isRequestPossible;
|
|
2323 |
|
|
2324 |
}
|
|
2325 |
|
|
2326 |
// ---------------------------------------------------------------------------
|
|
2327 |
// CMmCallTsy::GetFaxSettings
|
|
2328 |
// This CORE API method is used for getting fax settings
|
|
2329 |
// (not supported by default).
|
|
2330 |
// (other items were commented in a header).
|
|
2331 |
// ---------------------------------------------------------------------------
|
|
2332 |
//
|
|
2333 |
TInt CMmCallTsy::GetFaxSettings(
|
|
2334 |
const TTsyReqHandle,
|
|
2335 |
RCall::TFaxSessionSettings* )
|
|
2336 |
{
|
|
2337 |
return KErrNotSupported;
|
|
2338 |
}
|
|
2339 |
|
|
2340 |
// ---------------------------------------------------------------------------
|
|
2341 |
// CMmCallTsy::SetFaxSettings
|
|
2342 |
// This CORE API method is used for set fax settings
|
|
2343 |
// (not supported by default).
|
|
2344 |
// (other items were commented in a header).
|
|
2345 |
// ---------------------------------------------------------------------------
|
|
2346 |
//
|
|
2347 |
TInt CMmCallTsy::SetFaxSettings(
|
|
2348 |
const TTsyReqHandle,
|
|
2349 |
const RCall::TFaxSessionSettings*)
|
|
2350 |
{
|
|
2351 |
return KErrNotSupported;
|
|
2352 |
}
|
|
2353 |
|
|
2354 |
|
|
2355 |
// ---------------------------------------------------------------------------
|
|
2356 |
// CMmCallTsy::SetExtensionId
|
|
2357 |
// Set iExtensionId attribute
|
|
2358 |
// (other items were commented in a header).
|
|
2359 |
// ---------------------------------------------------------------------------
|
|
2360 |
//
|
|
2361 |
void CMmCallTsy::SetExtensionId(
|
|
2362 |
TInt aExtensionId )
|
|
2363 |
{
|
|
2364 |
iExtensionId = aExtensionId;
|
|
2365 |
TFLOGSTRING2("TSY: CMmCallTsy::SetExtensionId.iExtensionId:%d",iExtensionId );
|
|
2366 |
}
|
|
2367 |
|
|
2368 |
// ---------------------------------------------------------------------------
|
|
2369 |
// CMmCallTsy::GetExtensionId
|
|
2370 |
// Get iExtensionId attribute
|
|
2371 |
// (other items were commented in a header).
|
|
2372 |
// ---------------------------------------------------------------------------
|
|
2373 |
//
|
|
2374 |
TInt CMmCallTsy::GetExtensionId()
|
|
2375 |
{
|
|
2376 |
return iExtensionId;
|
|
2377 |
}
|
|
2378 |
|
|
2379 |
// ---------------------------------------------------------------------------
|
|
2380 |
// CMmCallTsy::SetDialFlag
|
|
2381 |
// Sets iDialFlag boolean value
|
|
2382 |
// (other items were commented in a header).
|
|
2383 |
// ---------------------------------------------------------------------------
|
|
2384 |
//
|
|
2385 |
void CMmCallTsy::SetDialFlag(
|
|
2386 |
TBool aDialFlag )
|
|
2387 |
{
|
|
2388 |
iDialFlag= aDialFlag;
|
|
2389 |
TFLOGSTRING2("TSY: CMmCallTsy::SetDialFlag. iDialFlag:%d",iDialFlag );
|
|
2390 |
}
|
|
2391 |
|
|
2392 |
// ---------------------------------------------------------------------------
|
|
2393 |
// CMmCallTsy::GetDialFlag
|
|
2394 |
// Returns iDialFlag boolean value
|
|
2395 |
// (other items were commented in a header).
|
|
2396 |
// ---------------------------------------------------------------------------
|
|
2397 |
//
|
|
2398 |
TBool CMmCallTsy::GetDialFlag()
|
|
2399 |
{
|
|
2400 |
|
|
2401 |
TFLOGSTRING2("TSY: CMmCallTsy::GetDialFlag. iDialFlag:%d",iDialFlag );
|
|
2402 |
return iDialFlag;
|
|
2403 |
}
|
|
2404 |
|
|
2405 |
// ---------------------------------------------------------------------------
|
|
2406 |
// CMmCallTsy::IsRemoteReleasedCall
|
|
2407 |
// Returns iIsRemoteReleasedCall boolean value
|
|
2408 |
// (other items were commented in a header).
|
|
2409 |
// ---------------------------------------------------------------------------
|
|
2410 |
//
|
|
2411 |
TBool CMmCallTsy::IsRemoteReleasedCall() const
|
|
2412 |
{
|
|
2413 |
TFLOGSTRING("TSY: CMmCallTsy::IsRemoteReleasedCall()");
|
|
2414 |
return iIsRemoteReleasedCall;
|
|
2415 |
}
|
|
2416 |
|
|
2417 |
// ---------------------------------------------------------------------------
|
|
2418 |
// CMmCallTsy::ActivateUUS
|
|
2419 |
// Specifies which User-To-User Signalling service(s) should be activated.
|
|
2420 |
// (other items were commented in a header).
|
|
2421 |
// ---------------------------------------------------------------------------
|
|
2422 |
//
|
|
2423 |
TInt CMmCallTsy::ActivateUUS( const TTsyReqHandle aTsyReqHandle,
|
|
2424 |
RMobileCall::TMobileCallUUSRequestV1Pckg* aUUSRequest )
|
|
2425 |
{
|
|
2426 |
// Support only implicit-UUS1 service,
|
|
2427 |
// save the UUS-Request and send it during the Dial so that
|
|
2428 |
// UUS-Request can be mapped on LTSY side to correct phone call (with id).
|
|
2429 |
// details of the message send, see CMmVoiceCallTsy::Dial
|
|
2430 |
|
|
2431 |
// To support UUS2 and UUS3 services in future the logic must be
|
|
2432 |
// changed so that the UUS information can be sended to LTSY immediately.
|
|
2433 |
|
|
2434 |
// Unpack UUS parameters
|
|
2435 |
RMobileCall::TMobileCallUUSRequestV1 requestUUS = ( *aUUSRequest )();
|
|
2436 |
TFLOGSTRING3("TSY: CMmCallTsy::ActivateUUS() -ServiceReq:%u -UUI:%S", requestUUS.iServiceReq, &requestUUS.iUUI );
|
|
2437 |
// handle implicit UUS1 request only
|
|
2438 |
if ( requestUUS.iServiceReq & RMobileCall::KUUS1Implicit )
|
|
2439 |
{
|
|
2440 |
// take a copy of the UUS request
|
|
2441 |
iUUSRequest = requestUUS;
|
|
2442 |
// complete req, with KErrNone
|
|
2443 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2444 |
}
|
|
2445 |
else
|
|
2446 |
{
|
|
2447 |
// other UUS services are not supported in this phase
|
|
2448 |
ReqCompleted( aTsyReqHandle, KErrNotSupported );
|
|
2449 |
}
|
|
2450 |
|
|
2451 |
return KErrNone;
|
|
2452 |
}
|
|
2453 |
|
|
2454 |
// ---------------------------------------------------------------------------
|
|
2455 |
// CMmCallTsy::ReceiveUUI
|
|
2456 |
// Enables the client to receive the next incoming UUI message or in case
|
|
2457 |
// already received, return the buffered UUI.
|
|
2458 |
// (other items were commented in a header).
|
|
2459 |
// ---------------------------------------------------------------------------
|
|
2460 |
//
|
|
2461 |
TInt CMmCallTsy::ReceiveUUI( const TTsyReqHandle aTsyReqHandle,
|
|
2462 |
RMobileCall::TMobileCallUUI* aUUI )
|
|
2463 |
{
|
|
2464 |
TFLOGSTRING("TSY: CMmCallTsy::ReceiveUUI()" );
|
|
2465 |
|
|
2466 |
// check are there any UUI information already in the buffer (UUS1)
|
|
2467 |
if ( 0 < iReceivedUUI.Length() )
|
|
2468 |
{
|
|
2469 |
TFLOGSTRING2("TSY: CMmCallTsy::ReceiveUUI() - information in BUFFER:%S", &iReceivedUUI );
|
|
2470 |
// copy and empty the buffered information
|
|
2471 |
*aUUI = iReceivedUUI;
|
|
2472 |
iReceivedUUI.Zero();
|
|
2473 |
|
|
2474 |
// complete the request
|
|
2475 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2476 |
}
|
|
2477 |
else
|
|
2478 |
{
|
|
2479 |
TFLOGSTRING("TSY: CMmCallTsy::ReceiveUUI() - wait for next incoming UUI message" );
|
|
2480 |
// Save request handle and pointer of the UUI message.
|
|
2481 |
iRetUUI = aUUI;
|
|
2482 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
2483 |
EMultimodeCallReceiveUUI, aTsyReqHandle );
|
|
2484 |
}
|
|
2485 |
|
|
2486 |
return KErrNone;
|
|
2487 |
}
|
|
2488 |
|
|
2489 |
// ---------------------------------------------------------------------------
|
|
2490 |
// CMmCallTsy::ReceiveUUICancel
|
|
2491 |
// Use this method to cancel a previously placed asynchronous
|
|
2492 |
// EMobileCallReceiveUUI request.
|
|
2493 |
// (other items were commented in a header).
|
|
2494 |
// ---------------------------------------------------------------------------
|
|
2495 |
//
|
|
2496 |
TInt CMmCallTsy::ReceiveUUICancel( const TTsyReqHandle aTsyReqHandle )
|
|
2497 |
{
|
|
2498 |
TFLOGSTRING("TSY: CMmCallTsy::ReceiveUUICancel()");
|
|
2499 |
|
|
2500 |
// reset the client side pointer, empty buffer and cancel the handle
|
|
2501 |
iRetUUI = NULL;
|
|
2502 |
iReceivedUUI.Zero();
|
|
2503 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallReceiveUUI );
|
|
2504 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2505 |
return KErrNone;
|
|
2506 |
}
|
|
2507 |
|
|
2508 |
// ---------------------------------------------------------------------------
|
|
2509 |
// CMmCallTsy::CompleteReceiveUUI
|
|
2510 |
// This method completes an outstanding ReceiveUUI request.
|
|
2511 |
// (other items were commented in a header).
|
|
2512 |
// ---------------------------------------------------------------------------
|
|
2513 |
//
|
|
2514 |
void CMmCallTsy::CompleteReceiveUUI( CMmDataPackage* aDataPackage,
|
|
2515 |
TInt aResult )
|
|
2516 |
{
|
|
2517 |
TFLOGSTRING("TSY: CMmCallTsy::CompleteReceiveUUI()" );
|
|
2518 |
|
|
2519 |
RMobileCall::TMobileCallUUI* receiveUUI = NULL;
|
|
2520 |
aDataPackage->UnPackData( &receiveUUI );
|
|
2521 |
|
|
2522 |
TFLOGSTRING2("TSY: CMmCallTsy::CompleteReceiveUUI() - receiveUUI:%S", &receiveUUI );
|
|
2523 |
|
|
2524 |
// reset req handle. Returns the deleted req handle
|
|
2525 |
TTsyReqHandle reqHandle =
|
|
2526 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallReceiveUUI );
|
|
2527 |
|
|
2528 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
2529 |
{
|
|
2530 |
TFLOGSTRING("TSY: CMmCallTsy::CompleteReceiveUUI() - Handle found, complete" );
|
|
2531 |
// Update the client side data through pointer
|
|
2532 |
*iRetUUI = *receiveUUI;
|
|
2533 |
// Null client side pointer, data copied
|
|
2534 |
iRetUUI = NULL;
|
|
2535 |
// complete req
|
|
2536 |
ReqCompleted( reqHandle, aResult );
|
|
2537 |
}
|
|
2538 |
else if ( KErrNone == aResult )
|
|
2539 |
{
|
|
2540 |
TFLOGSTRING("TSY: CMmCallTsy::CompleteReceiveUUI() - Handle NOT found, buffer" );
|
|
2541 |
// set initial information to the buffer
|
|
2542 |
iReceivedUUI = *receiveUUI;
|
|
2543 |
}
|
|
2544 |
}
|
|
2545 |
|
|
2546 |
// ---------------------------------------------------------------------------
|
|
2547 |
// CMmCallTsy::SetDialTypeId
|
|
2548 |
// Set iDialTypeId attribute
|
|
2549 |
// (other items were commented in a header).
|
|
2550 |
// ---------------------------------------------------------------------------
|
|
2551 |
//
|
|
2552 |
void CMmCallTsy::SetDialTypeId(
|
|
2553 |
TUint8 aDialType )
|
|
2554 |
{
|
|
2555 |
iDialTypeId = aDialType;
|
|
2556 |
TFLOGSTRING2("TSY: CMmCallTsy::SetDialTypeId.iDialType:%d",aDialType );
|
|
2557 |
}
|
|
2558 |
|
|
2559 |
// ---------------------------------------------------------------------------
|
|
2560 |
// CMmCallTsy::GetDialTypeId
|
|
2561 |
// Returns iDialTypeId value
|
|
2562 |
// (other items were commented in a header).
|
|
2563 |
// ---------------------------------------------------------------------------
|
|
2564 |
//
|
|
2565 |
TUint8 CMmCallTsy::GetDialTypeId()
|
|
2566 |
{
|
|
2567 |
|
|
2568 |
TFLOGSTRING2("TSY: CMmCallTsy::GetDialType. iDialType:%d",iDialTypeId );
|
|
2569 |
return iDialTypeId;
|
|
2570 |
}
|
|
2571 |
|
|
2572 |
// ---------------------------------------------------------------------------
|
|
2573 |
// CMmCallTsy::CompleteDialNoFdn
|
|
2574 |
// Completes a Dial request.
|
|
2575 |
// (other items were commented in a header).
|
|
2576 |
// ---------------------------------------------------------------------------
|
|
2577 |
//
|
|
2578 |
void CMmCallTsy::CompleteDialNoFdn(
|
|
2579 |
TInt aResult )
|
|
2580 |
{
|
|
2581 |
TFLOGSTRING2("TSY: CMmCallTsy::CompleteDialNoFdn. Result:%d", aResult );
|
|
2582 |
TFLOGSTRING3("TSY: CMmCallTsy::CompleteDialNoFdn. Call Id:%d Call name:%S", iCallId, &iCallName);
|
|
2583 |
|
|
2584 |
//Set dial flag to false
|
|
2585 |
SetDialFlag( EFalse );
|
|
2586 |
|
|
2587 |
TTsyReqHandle reqHandle ( EMultimodeCallReqHandleUnknown );
|
|
2588 |
|
|
2589 |
// Reset req handle. Returns the deleted req handle
|
|
2590 |
reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2591 |
EMultimodeCallDialNoFdnCheck );
|
|
2592 |
|
|
2593 |
if ( EMultimodeCallReqHandleUnknown != reqHandle )
|
|
2594 |
{
|
|
2595 |
if ( aResult != KErrNone )
|
|
2596 |
{
|
|
2597 |
// The creation has failed.
|
|
2598 |
iLastExitCode = aResult;
|
|
2599 |
ClearCallStatus();
|
|
2600 |
|
|
2601 |
//Dial has failed, update core status - dial possible again
|
|
2602 |
iCallCaps.iFlags |= RCall::KCapsDial;
|
|
2603 |
iCallCaps.iFlags &= ~( RCall::KCapsHangUp );
|
|
2604 |
|
|
2605 |
//complete caps change notification
|
|
2606 |
CompleteNotifyCapsChange();
|
|
2607 |
}
|
|
2608 |
//Complete request
|
|
2609 |
ReqCompleted( reqHandle, aResult );
|
|
2610 |
}
|
|
2611 |
|
|
2612 |
//Set dial type to none
|
|
2613 |
SetDialTypeId( KMultimodeCallTypeDialNone );
|
|
2614 |
}
|
|
2615 |
|
|
2616 |
// ---------------------------------------------------------------------------
|
|
2617 |
// CMmCallTsy::UpdateLifeTimer
|
|
2618 |
// When the last call from conference call becomes idle, we are updating
|
|
2619 |
// life time duration param with remaining call duration
|
|
2620 |
// ---------------------------------------------------------------------------
|
|
2621 |
//
|
|
2622 |
void CMmCallTsy::UpdateLifeTimer()
|
|
2623 |
{
|
|
2624 |
if ( iMmPhone->NumberOfActiveCalls() == 0 )
|
|
2625 |
{
|
|
2626 |
TTimeIntervalSeconds tis;
|
|
2627 |
iMmPhone->GetAirTimeDuration(tis);
|
|
2628 |
TUint32 duration;
|
|
2629 |
duration = tis.Int();
|
|
2630 |
duration = duration % iMmPhone->KLifeTimeUpdateInterval;
|
|
2631 |
|
|
2632 |
TFLOGSTRING2("TSY: CMmCallTsy::UpdateLifeTimer - \
|
|
2633 |
duration: %d", duration);
|
|
2634 |
|
|
2635 |
//errors: trap and ignore
|
|
2636 |
CMmDataPackage dataPackage;
|
|
2637 |
dataPackage.PackData( &duration );
|
|
2638 |
|
|
2639 |
#ifdef USING_CTSY_DISPATCHER
|
|
2640 |
TRAP_IGNORE(iMessageManager->HandleRequestL(
|
|
2641 |
ECtsyUpdateLifeTimeReq, &dataPackage );
|
|
2642 |
);
|
|
2643 |
#else
|
|
2644 |
TRAP_IGNORE(iMessageManager->HandleRequestL(
|
|
2645 |
EMmTsyUpdateLifeTimeIPC, &dataPackage );
|
|
2646 |
);
|
|
2647 |
#endif //USING_CTSY_DISPATCHER
|
|
2648 |
}
|
|
2649 |
}
|
|
2650 |
// CMmCallTsy::FillMobileCallInfoDefaults
|
|
2651 |
// The method fills a current snapshot of the call information described in
|
|
2652 |
// the TMobileCallInfoV1 class to the aInfo. The mode specific fields will
|
|
2653 |
// be filled by the extension.
|
|
2654 |
// (other items were commented in a header).
|
|
2655 |
// ---------------------------------------------------------------------------
|
|
2656 |
//
|
|
2657 |
TInt CMmCallTsy::FillMobileCallInfoDefaults(
|
|
2658 |
RMobileCall::TMobileCallInfoV1* aInfo )
|
|
2659 |
{
|
|
2660 |
TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfoDefaults");
|
|
2661 |
|
|
2662 |
//set validity fields to 0 in the beginning.
|
|
2663 |
aInfo->iValid = 0;
|
|
2664 |
//The name of the call
|
|
2665 |
aInfo->iCallName.Copy( iCallName );
|
|
2666 |
//The name of the line on which the call is open
|
|
2667 |
aInfo->iLineName.Copy( iMmLine->LineName() );
|
|
2668 |
//The current status of the call
|
|
2669 |
aInfo->iStatus = iMobileCallStatus;
|
|
2670 |
|
|
2671 |
//The time & date the call started.
|
|
2672 |
TDateTime temp( iCallTimer->GetTimerStartTime()->DateTime() );
|
|
2673 |
aInfo->iStartTime.Set(
|
|
2674 |
temp.Year(), temp.Month(), temp.Day(),
|
|
2675 |
temp.Hour(), temp.Minute(), temp.Second(), temp.MicroSecond() );
|
|
2676 |
|
|
2677 |
//The current duration of the call
|
|
2678 |
aInfo->iDuration = GetCallDurationInSeconds();
|
|
2679 |
|
|
2680 |
//Set validity indication
|
|
2681 |
aInfo->iValid |= RMobileCall::KCallStartTime | RMobileCall::KCallDuration;
|
|
2682 |
|
|
2683 |
//Client call Id. Note! Call server uses different call Id.
|
|
2684 |
aInfo->iCallId = iCallId;
|
|
2685 |
aInfo->iValid |= RMobileCall::KCallId;
|
|
2686 |
|
|
2687 |
//The reason for termination of a finished call. Will equal KErrNone if
|
|
2688 |
//the call ended normally and KErrNotFound if the call has not ended.
|
|
2689 |
aInfo->iExitCode = iLastExitCode;
|
|
2690 |
aInfo->iValid |= RMobileCall::KCallExitCode;
|
|
2691 |
|
|
2692 |
//ETrue if the call is an emergency call or EFalse if it is not.
|
|
2693 |
aInfo->iEmergency = iEmergencyCall;
|
|
2694 |
aInfo->iValid |= RMobileCall::KCallEmergency;
|
|
2695 |
TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfoDefaults end");
|
|
2696 |
return KErrNone;
|
|
2697 |
}
|
|
2698 |
|
|
2699 |
// End of File
|