37
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Implements class CSPCall which provides call functionality
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#include <etelmm.h>
|
|
20 |
#include <etel.h>
|
|
21 |
#include <centralrepository.h>
|
|
22 |
#include <settingsinternalcrkeys.h>
|
|
23 |
#include <ccpdefs.h>
|
|
24 |
#include <gsmerror.h>
|
|
25 |
#include <etelsat.h>
|
|
26 |
#include <cccpcallparameters.h>
|
|
27 |
|
|
28 |
#include "cspcall.h"
|
|
29 |
#include "cspetelcallrequester.h"
|
|
30 |
#include "cspetelcalleventmonitor.h"
|
|
31 |
#include "cspcallinfomonitor.h"
|
|
32 |
#include "cspetelcallstatusmonitor.h"
|
|
33 |
#include "cspetelcallcapsmonitor.h"
|
|
34 |
#include "csptransferprovider.h"
|
|
35 |
#include "cspforwardprovider.h"
|
|
36 |
#include "csplogger.h"
|
|
37 |
#include "csppanic.pan"
|
|
38 |
#include "cspconsts.h"
|
|
39 |
#include "cspaudiohandler.h"
|
|
40 |
#include "mcspcommoninfo.h"
|
|
41 |
#include "mcspsecuritysettingobserver.h"
|
|
42 |
#include "tcspskypeidparser.h"
|
|
43 |
#include "cspuuimonitor.h"
|
|
44 |
#include "cspuuimessagesender.h"
|
|
45 |
|
|
46 |
const TInt KTimesToSplitValue = 16;
|
|
47 |
|
|
48 |
|
|
49 |
// ---------------------------------------------------------------------------
|
|
50 |
// CSPCall::~CSPCall
|
|
51 |
// ---------------------------------------------------------------------------
|
|
52 |
//
|
|
53 |
CSPCall::~CSPCall()
|
|
54 |
{
|
|
55 |
CSPLOGSTRING(CSPOBJECT, "CSPCall::~CSPCall <");
|
|
56 |
|
|
57 |
delete iParams;
|
|
58 |
iCommonInfo.IndicateHangupComplete( *this );
|
|
59 |
|
|
60 |
if ( iAudioHandler
|
|
61 |
&& iAudioStatus == ECSPCallAudioStatusActive )
|
|
62 |
{
|
|
63 |
iAudioStatus = ECSPCallAudioStatusInactive;
|
|
64 |
iAudioHandler->Stop();
|
|
65 |
}
|
|
66 |
|
|
67 |
delete iUserToUserInformation;
|
|
68 |
delete iRequester;
|
|
69 |
delete iCallEventMonitor;
|
|
70 |
delete iCallStatusMonitor;
|
|
71 |
delete iCallCapsMonitor;
|
|
72 |
delete iCallInfoMonitor;
|
|
73 |
delete iForwardProvider;
|
|
74 |
delete iTransferProvider;
|
|
75 |
delete iUUIMonitor;
|
|
76 |
delete iUUIMessageSender;
|
|
77 |
delete iSkypeId;
|
|
78 |
|
|
79 |
iObservers.Close();
|
|
80 |
if ( iCall.SubSessionHandle() )
|
|
81 |
{
|
|
82 |
iCall.Close();
|
|
83 |
}
|
|
84 |
|
|
85 |
CSPLOGSTRING(CSPOBJECT, "CSPCall::~CSPCall >");
|
|
86 |
}
|
|
87 |
|
|
88 |
// ---------------------------------------------------------------------------
|
|
89 |
// CSPCall::SetAudioHandler
|
|
90 |
// ---------------------------------------------------------------------------
|
|
91 |
//
|
|
92 |
void CSPCall::SetAudioHandler( CSPAudioHandler* aHandler )
|
|
93 |
{
|
|
94 |
CSPLOGSTRING2(CSPINT, "CSPCall::SetAudioHandler handler: %x", aHandler);
|
|
95 |
iAudioHandler = aHandler;
|
|
96 |
}
|
|
97 |
|
|
98 |
// ---------------------------------------------------------------------------
|
|
99 |
// CSPCall::SecuritySettingChanged
|
|
100 |
// ---------------------------------------------------------------------------
|
|
101 |
//
|
|
102 |
void CSPCall::SecuritySettingChanged( TInt aValue )
|
|
103 |
{
|
|
104 |
switch ( aValue )
|
|
105 |
{
|
|
106 |
case MCSPSecuritySettingObserver::ESecureCall:
|
|
107 |
{
|
|
108 |
CSPLOGSTRING(CSPINT,
|
|
109 |
"CSPCall::SecuritySettingChanged Sending 'secure call' event");
|
|
110 |
NotifyCallEventOccurred( MCCPCallObserver::ECCPSecureCall );
|
|
111 |
break;
|
|
112 |
}
|
|
113 |
case MCSPSecuritySettingObserver::ENotSecureCall:
|
|
114 |
{
|
|
115 |
CSPLOGSTRING(CSPINT,
|
|
116 |
"CSPCall::SecuritySettingChanged Sending 'not secure call' event");
|
|
117 |
NotifyCallEventOccurred( MCCPCallObserver::ECCPNotSecureCall );
|
|
118 |
break;
|
|
119 |
}
|
|
120 |
case MCSPSecuritySettingObserver::ESecureNotSpecified:
|
|
121 |
{
|
|
122 |
CSPLOGSTRING(CSPINT,
|
|
123 |
"CSPCall::SecuritySettingChanged Sending SecureNotSpecified");
|
|
124 |
NotifyCallEventOccurred( MCCPCallObserver::ECCPSecureNotSpecified );
|
|
125 |
break;
|
|
126 |
}
|
|
127 |
|
|
128 |
default:
|
|
129 |
{
|
|
130 |
CSPLOGSTRING(CSPERROR, "CSPCall::SecuritySettingChanged, \
|
|
131 |
unknown event");
|
|
132 |
break;
|
|
133 |
}
|
|
134 |
}
|
|
135 |
}
|
|
136 |
|
|
137 |
// ---------------------------------------------------------------------------
|
|
138 |
// CSPCall::RemoteAlertingToneStatusChanged
|
|
139 |
// Sends EarlyMediaStarted event to observer if network has started to
|
|
140 |
// play remote alerting tone. There is only one known use case: Network
|
|
141 |
// starts playing alerting tone during connecting state.
|
|
142 |
//
|
|
143 |
// This RemoteAlertingToneStatusChanged is called for every call,
|
|
144 |
// so it is calls responsibility to determine if the
|
|
145 |
// observer should be notified.
|
|
146 |
// ---------------------------------------------------------------------------
|
|
147 |
//
|
|
148 |
void CSPCall::RemoteAlertingToneStatusChanged(
|
|
149 |
RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus )
|
|
150 |
{
|
|
151 |
CSPLOGSTRING2(CSPINT,
|
|
152 |
"CSPCall::RemoteAlertingToneStatusChanged new status: %d", aNewStatus );
|
|
153 |
|
|
154 |
if ( aNewStatus == RMmCustomAPI::EUiStopTone ||
|
|
155 |
aNewStatus == RMmCustomAPI::EUiNoTone ) // NW tells us to stop playing
|
|
156 |
{
|
|
157 |
// Connecting is only state where network starts playing the tone.
|
|
158 |
if ( iCallState == MCCPCallObserver::ECCPStateConnecting )
|
|
159 |
{
|
|
160 |
NotifyCallEventOccurred(
|
|
161 |
MCCPCallObserver::ECCCSPEarlyMediaStarted );
|
|
162 |
}
|
|
163 |
}
|
|
164 |
}
|
|
165 |
|
|
166 |
// ---------------------------------------------------------------------------
|
|
167 |
// CSPCall::NotifyCallStateChangedETel
|
|
168 |
// Notifies observers about state changes
|
|
169 |
// ---------------------------------------------------------------------------
|
|
170 |
//
|
|
171 |
void CSPCall::NotifyCallStateChangedETel( RMobileCall::TMobileCallStatus aState )
|
|
172 |
{
|
|
173 |
CSPLOGSTRING3(CSPINT,
|
|
174 |
"CSPCall::NotifyCallStateChangedETel < state: %d this: %x",
|
|
175 |
aState, this );
|
|
176 |
switch ( aState )
|
|
177 |
{
|
|
178 |
/*
|
|
179 |
Cannot receive any mapping call statuses from ETel to following
|
|
180 |
optional states:
|
|
181 |
|
|
182 |
ECCPStateForwarding MO call is being forwarded at receiver end
|
|
183 |
ECCPStateQueued Call is queued locally.
|
|
184 |
|
|
185 |
The commented observer calls are for CS specific call states.
|
|
186 |
*/
|
|
187 |
|
|
188 |
// Indicates that the call is idle or unknown.
|
|
189 |
case RMobileCall::EStatusIdle:
|
|
190 |
case RMobileCall::EStatusUnknown:
|
|
191 |
{
|
|
192 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Idle");
|
|
193 |
|
|
194 |
// If audio still active
|
|
195 |
if ( iAudioStatus == ECSPCallAudioStatusActive
|
|
196 |
&& iAudioHandler
|
|
197 |
&& iParams->CallType() == CCPCall::ECallTypeCSVoice )
|
|
198 |
{
|
|
199 |
iAudioStatus = ECSPCallAudioStatusInactive;
|
|
200 |
iAudioHandler->Stop();
|
|
201 |
}
|
|
202 |
|
|
203 |
// Notify error in case not going through disconnecting
|
|
204 |
if ( iCallState != MCCPCallObserver::ECCPStateDisconnecting
|
|
205 |
&& !iTerminationErrorNotified )
|
|
206 |
{
|
|
207 |
CheckAndNotifyTerminationError();
|
|
208 |
}
|
|
209 |
|
|
210 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateIdle );
|
|
211 |
iCommonInfo.IndicateHangupComplete( *this );
|
|
212 |
break;
|
|
213 |
}
|
|
214 |
// The call is dialling.
|
|
215 |
case RMobileCall::EStatusDialling:
|
|
216 |
CSPLOGSTRING(CSPINT, "CSPCall callstate Dialling");
|
|
217 |
{
|
|
218 |
if ( iAudioHandler && iParams->CallType() == CCPCall:: ECallTypeCSVoice )
|
|
219 |
{
|
|
220 |
iAudioStatus = ECSPCallAudioStatusActive;
|
|
221 |
iAudioHandler->Start();
|
|
222 |
}
|
|
223 |
|
|
224 |
iDontReportTerm = EFalse;
|
|
225 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateDialling );
|
|
226 |
break;
|
|
227 |
}
|
|
228 |
//Indicates that the MT call is ringing but not answered yet by
|
|
229 |
// the local user
|
|
230 |
case RMobileCall::EStatusRinging:
|
|
231 |
{
|
|
232 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Ringing");
|
|
233 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateRinging );
|
|
234 |
break;
|
|
235 |
}
|
|
236 |
// Indicates that the local user has answered the MT call but
|
|
237 |
// the network has not acknowledged the call connection yet.
|
|
238 |
case RMobileCall::EStatusAnswering:
|
|
239 |
{
|
|
240 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Answering");
|
|
241 |
|
|
242 |
if ( !iMobileOriginated
|
|
243 |
&& iAudioHandler
|
|
244 |
&& iAudioStatus == ECSPCallAudioStatusInactive
|
|
245 |
&& iParams->CallType() == CCPCall::ECallTypeCSVoice )
|
|
246 |
{
|
|
247 |
iAudioStatus = ECSPCallAudioStatusActive;
|
|
248 |
iAudioHandler->Start();
|
|
249 |
}
|
|
250 |
|
|
251 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateAnswering );
|
|
252 |
break;
|
|
253 |
}
|
|
254 |
// MO Call: the network notifies to the MS that the remote party
|
|
255 |
// is now ringing.
|
|
256 |
case RMobileCall::EStatusConnecting:
|
|
257 |
{
|
|
258 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETelConnecting");
|
|
259 |
RMmCustomAPI::TRemoteAlertingToneStatus tone =
|
|
260 |
iCommonInfo.GetRemoteAlertingToneStatus();
|
|
261 |
if ( tone == RMmCustomAPI::EUiNoTone ||
|
|
262 |
tone == RMmCustomAPI::EUiStopTone )
|
|
263 |
{
|
|
264 |
NotifyCallStateChangedWithInband( MCCPCallObserver::ECCPStateConnecting );
|
|
265 |
}
|
|
266 |
else
|
|
267 |
{
|
|
268 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateConnecting );
|
|
269 |
}
|
|
270 |
break;
|
|
271 |
}
|
|
272 |
// Indicates that call is connected and active.
|
|
273 |
case RMobileCall::EStatusConnected:
|
|
274 |
{
|
|
275 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Connected");
|
|
276 |
|
|
277 |
iDontReportTerm = ETrue;
|
|
278 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateConnected );
|
|
279 |
break;
|
|
280 |
}
|
|
281 |
// Indicates that call is disconnecting. (Same as RCall::HangingUp)
|
|
282 |
case RMobileCall::EStatusDisconnecting:
|
|
283 |
{
|
|
284 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Disconnecting");
|
|
285 |
|
|
286 |
if ( !iTerminationErrorNotified )
|
|
287 |
{
|
|
288 |
CheckAndNotifyTerminationError();
|
|
289 |
}
|
|
290 |
|
|
291 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateDisconnecting );
|
|
292 |
break;
|
|
293 |
}
|
|
294 |
// Indicates that the call is disconnecting with inband data
|
|
295 |
// (to enable the network to send an audio tone), signifying
|
|
296 |
// that the call is not to be released until user terminates call
|
|
297 |
case RMobileCall::EStatusDisconnectingWithInband:
|
|
298 |
{
|
|
299 |
CSPLOGSTRING(CSPINT,
|
|
300 |
"CSPCall::NotifyCallStateChangedETel DisconnectingWithInband");
|
|
301 |
|
|
302 |
if ( !iTerminationErrorNotified )
|
|
303 |
{
|
|
304 |
CheckAndNotifyTerminationError();
|
|
305 |
}
|
|
306 |
|
|
307 |
NotifyCallStateChangedWithInband(
|
|
308 |
MCCPCallObserver::ECCPStateDisconnecting );
|
|
309 |
break;
|
|
310 |
}
|
|
311 |
// Indicates that the call is connected but on hold.
|
|
312 |
case RMobileCall::EStatusHold:
|
|
313 |
{
|
|
314 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Hold");
|
|
315 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateHold );
|
|
316 |
break;
|
|
317 |
}
|
|
318 |
case RMobileCall::EStatusTransferring:
|
|
319 |
{
|
|
320 |
CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Transferring");
|
|
321 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateTransferring );
|
|
322 |
break;
|
|
323 |
}
|
|
324 |
|
|
325 |
// Indicates that call is undergoing temporary channel loss
|
|
326 |
// and it may or may not be reconnected.
|
|
327 |
case RMobileCall::EStatusReconnectPending: // fall through
|
|
328 |
//Indicates that the call is the non-active half of an alternating
|
|
329 |
// call. This call is waiting for its active half or the remote
|
|
330 |
// end to switch alternating call mode.
|
|
331 |
case RMobileCall::EStatusWaitingAlternatingCallSwitch: // fall through
|
|
332 |
case RMobileCall::EStatusTransferAlerting:
|
|
333 |
{
|
|
334 |
CSPLOGSTRING2(CSPINT,
|
|
335 |
"CSPCall::NotifyCallStateChangedETel no special handling for state %d",
|
|
336 |
aState);
|
|
337 |
break;
|
|
338 |
}
|
|
339 |
|
|
340 |
default:
|
|
341 |
{
|
|
342 |
CSPLOGSTRING(CSPERROR,
|
|
343 |
"CSPCall::NotifyCallStateChangedETel callstate UNKNOWN");
|
|
344 |
break;
|
|
345 |
}
|
|
346 |
}
|
|
347 |
CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyCallStateChangedETel >");
|
|
348 |
}
|
|
349 |
|
|
350 |
// ---------------------------------------------------------------------------
|
|
351 |
// CSPCall::NotifyCallEventOccurred
|
|
352 |
// Notifies observers about call events
|
|
353 |
// ---------------------------------------------------------------------------
|
|
354 |
//
|
|
355 |
void CSPCall::NotifyCallEventOccurred(
|
|
356 |
MCCPCallObserver::TCCPCallEvent aEvent )
|
|
357 |
{
|
|
358 |
CSPLOGSTRING2(CSPINT,
|
|
359 |
"CSPCall::NotifyCallEventOccurred < event: %d", aEvent);
|
|
360 |
|
|
361 |
TInt obsCount = iObservers.Count();
|
|
362 |
for ( TInt i = 0; i < obsCount; i++ )
|
|
363 |
{
|
|
364 |
CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred obs=%d",i);
|
|
365 |
MCCPCallObserver *obs = iObservers[i];
|
|
366 |
if ( obs )
|
|
367 |
{
|
|
368 |
obs->CallEventOccurred( aEvent, this );
|
|
369 |
}
|
|
370 |
|
|
371 |
CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred ok obs=%d",i);
|
|
372 |
}
|
|
373 |
|
|
374 |
CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred > event: %d", aEvent);
|
|
375 |
}
|
|
376 |
|
|
377 |
// ---------------------------------------------------------------------------
|
|
378 |
// CSPCall::NotifyTransferCallEventOccurred
|
|
379 |
// Forward notification of transfer event to it's provider
|
|
380 |
// ---------------------------------------------------------------------------
|
|
381 |
//
|
|
382 |
void CSPCall::NotifyTransferCallEventOccurred(
|
|
383 |
MCCPTransferObserver::TCCPTransferEvent aEvent )
|
|
384 |
{
|
|
385 |
CSPLOGSTRING2(CSPINT, "CSPCall::NotifyTransferCallEventOccurred %d", aEvent);
|
|
386 |
// forward the method call to CSPTransferProvider object
|
|
387 |
iTransferProvider->TransferEventOccurred( aEvent );
|
|
388 |
}
|
|
389 |
|
|
390 |
// ---------------------------------------------------------------------------
|
|
391 |
// CSPCall::NotifyForwardEventOccurred
|
|
392 |
// Notifies observers about call events
|
|
393 |
// ---------------------------------------------------------------------------
|
|
394 |
//
|
|
395 |
void CSPCall::NotifyForwardEventOccurred(
|
|
396 |
MCCPForwardObserver::TCCPForwardEvent aEvent )
|
|
397 |
{
|
|
398 |
CSPLOGSTRING2(CSPINT, "CSPCall::NotifyForwardEventOccurred %d", aEvent);
|
|
399 |
iForwardProvider->NotifyForwardEventOccurred( aEvent );
|
|
400 |
}
|
|
401 |
|
|
402 |
// ---------------------------------------------------------------------------
|
|
403 |
// CSPCall::CallName
|
|
404 |
// Get call name
|
|
405 |
// ---------------------------------------------------------------------------
|
|
406 |
//
|
|
407 |
void CSPCall::CallName( TName& aCallName )
|
|
408 |
{
|
|
409 |
CSPLOGSTRING(CSPINT, "CSPCall::CallName");
|
|
410 |
aCallName.Zero();
|
|
411 |
aCallName.Append( iCallName );
|
|
412 |
}
|
|
413 |
|
|
414 |
// ---------------------------------------------------------------------------
|
|
415 |
// CSPCall::DialRequestFailed
|
|
416 |
// Handles situations when dial fails
|
|
417 |
// ---------------------------------------------------------------------------
|
|
418 |
//
|
|
419 |
void CSPCall::DialRequestFailed( TInt aErrorCode )
|
|
420 |
{
|
|
421 |
CSPLOGSTRING(CSPERROR, "CSPCall::DialRequestFailed");
|
|
422 |
iDialCompletionCode = aErrorCode;
|
|
423 |
|
|
424 |
// If state has not changed
|
|
425 |
// ( e.g. in case of dial could not be initiated by network problem)
|
|
426 |
if ( iCallStatusMonitor->State() ==
|
|
427 |
RMobileCall::RMobileCall::EStatusUnknown )
|
|
428 |
{
|
|
429 |
NotifyErrorOccurred( iRequester->MapError( aErrorCode ) );
|
|
430 |
|
|
431 |
// Force release since otherwise call remains unreleased
|
|
432 |
CSPLOGSTRING(CSPERROR, "CSPCall::DialRequestFailed() Force Idle");
|
|
433 |
NotifyCallStateChanged( MCCPCallObserver::ECCPStateIdle );
|
|
434 |
}
|
|
435 |
|
|
436 |
// If dial request has completed after notifying disconnecting state
|
|
437 |
else if ( iCallState == MCCPCallObserver::ECCPStateDisconnecting
|
|
438 |
&& !iTerminationErrorNotified )
|
|
439 |
{
|
|
440 |
CheckAndNotifyTerminationError();
|
|
441 |
}
|
|
442 |
}
|
|
443 |
|
|
444 |
// ---------------------------------------------------------------------------
|
|
445 |
// CSPCall::EmergencyDialRequestFailed
|
|
446 |
// Handles situations when emergency dial fails
|
|
447 |
// ---------------------------------------------------------------------------
|
|
448 |
//
|
|
449 |
void CSPCall::EmergencyDialRequestFailed( TInt /*aErrorCode*/ )
|
|
450 |
{
|
|
451 |
CSPLOGSTRING(CSPERROR, "CSPCall::EmergencyDialRequestFailed");
|
|
452 |
|
|
453 |
// Always same error code for CCE
|
|
454 |
NotifyErrorOccurred( ECCPEmergencyFailed );
|
|
455 |
|
|
456 |
// Mark that exit code will not be used
|
|
457 |
iTerminationErrorNotified = ETrue;
|
|
458 |
}
|
|
459 |
|
|
460 |
// ---------------------------------------------------------------------------
|
|
461 |
// CSPCall::NotifyErrorOccurred
|
|
462 |
// Notifies observers about errors
|
|
463 |
// ---------------------------------------------------------------------------
|
|
464 |
//
|
|
465 |
void CSPCall::NotifyErrorOccurred( TCCPError aError )
|
|
466 |
{
|
|
467 |
CSPLOGSTRING2(CSPERROR, "CSPCall::NotifyErrorOccurred err %d", aError );
|
|
468 |
|
|
469 |
TInt obsCount = iObservers.Count();
|
|
470 |
for ( TInt i = 0; i < obsCount; i++ )
|
|
471 |
{
|
|
472 |
MCCPCallObserver *obs = iObservers[i];
|
|
473 |
if ( obs )
|
|
474 |
{
|
|
475 |
obs->ErrorOccurred( aError, this );
|
|
476 |
}
|
|
477 |
}
|
|
478 |
}
|
|
479 |
|
|
480 |
// ---------------------------------------------------------------------------
|
|
481 |
// CSPCall::CallCapsChanged
|
|
482 |
// Notifies observers about new capabilities.
|
|
483 |
// ---------------------------------------------------------------------------
|
|
484 |
//
|
|
485 |
void CSPCall::CallCapsChanged( const TUint32 aCapsFlags )
|
|
486 |
{
|
|
487 |
CSPLOGSTRING2(CSPERROR, "CSPCall::CallCapsChanged %b", aCapsFlags );
|
|
488 |
iCapsFlags = aCapsFlags;
|
|
489 |
TInt obsCount = iObservers.Count();
|
|
490 |
for ( TInt i = 0; i < obsCount; i++ )
|
|
491 |
{
|
|
492 |
MCCPCallObserver *obs = iObservers[i];
|
|
493 |
if ( obs )
|
|
494 |
{
|
|
495 |
obs->CallCapsChanged( aCapsFlags, this );
|
|
496 |
}
|
|
497 |
}
|
|
498 |
}
|
|
499 |
|
|
500 |
// ---------------------------------------------------------------------------
|
|
501 |
// From class MCCPCSCall
|
|
502 |
// CSPCall::GetMobileCallInfo
|
|
503 |
// ---------------------------------------------------------------------------
|
|
504 |
//
|
|
505 |
TInt CSPCall::GetMobileCallInfo( TDes8& aCallInfo ) const
|
|
506 |
{
|
|
507 |
CSPLOGSTRING(CSPINT, "CSPCall::GetMobileCallInfo");
|
|
508 |
return iCall.GetMobileCallInfo( aCallInfo );
|
|
509 |
}
|
|
510 |
|
|
511 |
// ---------------------------------------------------------------------------
|
|
512 |
// From class MCCPCSCall
|
|
513 |
// CSPCall::GetMobileDataCallCaps
|
|
514 |
// ---------------------------------------------------------------------------
|
|
515 |
//
|
|
516 |
TInt CSPCall::GetMobileDataCallCaps( TDes8& /*aCaps*/ ) const
|
|
517 |
{
|
|
518 |
CSPLOGSTRING(CSPERROR,
|
|
519 |
"CSPCall::GetMobileDataCallCaps ERROR, Not supported");
|
|
520 |
return KErrNotSupported;
|
|
521 |
}
|
|
522 |
|
|
523 |
// ---------------------------------------------------------------------------
|
|
524 |
// From class MCCPCall
|
|
525 |
// CSPCall::Dial
|
|
526 |
// ---------------------------------------------------------------------------
|
|
527 |
//
|
|
528 |
TInt CSPCall::Dial()
|
|
529 |
{
|
|
530 |
CSPLOGSTRING( CSPREQIN, "CSPCall::Dial" );
|
|
531 |
// Parameters not given, must create empty descriptor.
|
|
532 |
TBuf8<1> params;
|
|
533 |
return Dial(params);
|
|
534 |
}
|
|
535 |
|
|
536 |
// ---------------------------------------------------------------------------
|
|
537 |
// From class MCCPCall
|
|
538 |
// CSPCall::RemoteParty
|
|
539 |
// ---------------------------------------------------------------------------
|
|
540 |
//
|
|
541 |
const TDesC& CSPCall::RemoteParty() const
|
|
542 |
{
|
|
543 |
CSPLOGSTRING(CSPREQIN, "CSPCall::RemoteParty");
|
|
544 |
return iRemotePartyNumber;
|
|
545 |
}
|
|
546 |
|
|
547 |
// ---------------------------------------------------------------------------
|
|
548 |
// From class MCCPCall
|
|
549 |
// CSPCall::RemotePartyName
|
|
550 |
// ---------------------------------------------------------------------------
|
|
551 |
//
|
|
552 |
const TDesC& CSPCall::RemotePartyName()
|
|
553 |
{
|
|
554 |
CSPLOGSTRING(CSPREQIN, "CSPCall::RemotePartyName");
|
|
555 |
return iRemotePartyName;
|
|
556 |
}
|
|
557 |
|
|
558 |
// ---------------------------------------------------------------------------
|
|
559 |
// From class MCCPCall
|
|
560 |
// CSPCall::DialledParty
|
|
561 |
// ---------------------------------------------------------------------------
|
|
562 |
//
|
|
563 |
const TDesC& CSPCall::DialledParty() const
|
|
564 |
{
|
|
565 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::DialledParty %S", &iRemotePartyNumber);
|
|
566 |
return iRemotePartyNumber;
|
|
567 |
}
|
|
568 |
|
|
569 |
// ---------------------------------------------------------------------------
|
|
570 |
// From class MCCPCall
|
|
571 |
// CSPCall::Answer
|
|
572 |
// ---------------------------------------------------------------------------
|
|
573 |
//
|
|
574 |
TInt CSPCall::Answer()
|
|
575 |
{
|
|
576 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Answer <");
|
|
577 |
TInt ret( KErrNone );
|
|
578 |
|
|
579 |
if ( iCallState == MCCPCallObserver::ECCPStateRinging
|
|
580 |
|| iCallState == MCCPCallObserver::ECCPStateQueued )
|
|
581 |
{
|
|
582 |
if( iMobileOriginated )
|
|
583 |
{
|
|
584 |
ret = KErrGeneral;
|
|
585 |
}
|
|
586 |
else if( iCallState != MCCPCallObserver::ECCPStateRinging &&
|
|
587 |
iCallState != MCCPCallObserver::ECCPStateQueued )
|
|
588 |
{
|
|
589 |
ret = KErrAccessDenied;
|
|
590 |
}
|
|
591 |
else
|
|
592 |
{
|
|
593 |
ret = iCommonInfo.IndicateAnswerRequest( *this );
|
|
594 |
}
|
|
595 |
}
|
|
596 |
else
|
|
597 |
{
|
|
598 |
// Not correct state for answer
|
|
599 |
ret = KErrNotReady;
|
|
600 |
}
|
|
601 |
|
|
602 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Answer > ret %d", ret);
|
|
603 |
return ret;
|
|
604 |
}
|
|
605 |
|
|
606 |
// ---------------------------------------------------------------------------
|
|
607 |
// From class MCCPCallCommandHandling
|
|
608 |
// CSPCall::PerformAnswerRequest
|
|
609 |
// ---------------------------------------------------------------------------
|
|
610 |
//
|
|
611 |
TInt CSPCall::PerformAnswerRequest()
|
|
612 |
{
|
|
613 |
CSPLOGSTRING(CSPREQIN, "CSPCall::PerformAnswerRequest");
|
|
614 |
|
|
615 |
TInt ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeAnswer );
|
|
616 |
CSPLOGSTRING3(CSPINT,
|
|
617 |
"CSPCall::Answer request performed, call state %d ret: %d", iCallState, ret);
|
|
618 |
|
|
619 |
return ret;
|
|
620 |
}
|
|
621 |
|
|
622 |
// ---------------------------------------------------------------------------
|
|
623 |
// From class MCCPCall
|
|
624 |
// CSPCall::Reject
|
|
625 |
// ---------------------------------------------------------------------------
|
|
626 |
//
|
|
627 |
TInt CSPCall::Reject()
|
|
628 |
{
|
|
629 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Reject <");
|
|
630 |
TInt ret;
|
|
631 |
if ( iCallState == MCCPCallObserver::ECCPStateRinging
|
|
632 |
|| iCallState == MCCPCallObserver::ECCPStateQueued
|
|
633 |
|| iCallState == MCCPCallObserver::ECCPStateAnswering )
|
|
634 |
{
|
|
635 |
CSPLOGSTRING( CSPREQIN, "CSPCall::Reject 2" );
|
|
636 |
ret = HangUp();
|
|
637 |
}
|
|
638 |
else
|
|
639 |
{
|
|
640 |
ret = KErrNotReady;
|
|
641 |
}
|
|
642 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Reject > ret: %d", ret );
|
|
643 |
return ret;
|
|
644 |
}
|
|
645 |
|
|
646 |
// ---------------------------------------------------------------------------
|
|
647 |
// From class MCCPCall
|
|
648 |
// CSPCall::Queue
|
|
649 |
// ---------------------------------------------------------------------------
|
|
650 |
//
|
|
651 |
TInt CSPCall::Queue()
|
|
652 |
{
|
|
653 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Queue");
|
|
654 |
TBool callWaitingState;
|
|
655 |
iDontReportTerm = ETrue;
|
|
656 |
|
|
657 |
TRAPD( res, iCommonInfo.GetCallWaitingL( *iParams, callWaitingState ) );
|
|
658 |
if( res == KErrNone )
|
|
659 |
{
|
|
660 |
if ( callWaitingState )
|
|
661 |
{
|
|
662 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Queue Call Waiting On");
|
|
663 |
iCallState = MCCPCallObserver::ECCPStateQueued;
|
|
664 |
|
|
665 |
// Notify Queued state
|
|
666 |
TInt obsCount = iObservers.Count ( );
|
|
667 |
for (TInt i = 0; i < obsCount; i++ )
|
|
668 |
{
|
|
669 |
MCCPCallObserver *obs = iObservers[i];
|
|
670 |
if ( obs )
|
|
671 |
{
|
|
672 |
obs->CallStateChanged ( iCallState, this );
|
|
673 |
}
|
|
674 |
}
|
|
675 |
CSPLOGSTRING(CSPOBJECT, "CSPCall::Queue ok");
|
|
676 |
|
|
677 |
return KErrNone;
|
|
678 |
}
|
|
679 |
else
|
|
680 |
{
|
|
681 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Queue Call Waiting Off");
|
|
682 |
}
|
|
683 |
}
|
|
684 |
else
|
|
685 |
{
|
|
686 |
CSPLOGSTRING2(CSPERROR,
|
|
687 |
"CSPCall::Queue Error %d with CR. Call Waiting Off",
|
|
688 |
res);
|
|
689 |
}
|
|
690 |
|
|
691 |
return KErrNotSupported;
|
|
692 |
}
|
|
693 |
|
|
694 |
// ---------------------------------------------------------------------------
|
|
695 |
// From class MCCPCall
|
|
696 |
// CSPCall::Ringing
|
|
697 |
// ---------------------------------------------------------------------------
|
|
698 |
//
|
|
699 |
TInt CSPCall::Ringing()
|
|
700 |
{
|
|
701 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Ringing");
|
|
702 |
iDontReportTerm = ETrue;
|
|
703 |
|
|
704 |
// Ringing state is accepted because MT-call goes to ringing
|
|
705 |
// state in the beginning based on ETel state maching.
|
|
706 |
if ( iCallState == MCCPCallObserver::ECCPStateIdle ||
|
|
707 |
iCallState == MCCPCallObserver::ECCPStateRinging )
|
|
708 |
{
|
|
709 |
NotifyRingingState();
|
|
710 |
return KErrNone;
|
|
711 |
}
|
|
712 |
else if ( iCallState == MCCPCallObserver::ECCPStateAnswering )
|
|
713 |
{
|
|
714 |
// Do nothing if already in Answering state (autoanswer).
|
|
715 |
return KErrNone;
|
|
716 |
}
|
|
717 |
|
|
718 |
return KErrNotReady;
|
|
719 |
}
|
|
720 |
|
|
721 |
// ---------------------------------------------------------------------------
|
|
722 |
// From class MCCPCall
|
|
723 |
// CSPCall::HangUp
|
|
724 |
// ---------------------------------------------------------------------------
|
|
725 |
//
|
|
726 |
TInt CSPCall::HangUp()
|
|
727 |
{
|
|
728 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::HangUp this: %x", this);
|
|
729 |
TInt ret( KErrNone );
|
|
730 |
|
|
731 |
CSPEtelCallRequester::TRequestType req = iRequester->Request();
|
|
732 |
if ( req == CSPEtelCallRequester::ERequestTypeDial ||
|
|
733 |
( req == CSPEtelCallRequester::ERequestTypeDialEmergency ) )
|
|
734 |
{
|
|
735 |
CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 1: Cancel ongoing dial");
|
|
736 |
ret = iRequester->DialCancel();
|
|
737 |
CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp Canceled");
|
|
738 |
}
|
|
739 |
else if ( req == CSPEtelCallRequester::ERequestTypeHangup )
|
|
740 |
{
|
|
741 |
CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 2");
|
|
742 |
ret = KErrAlreadyExists;
|
|
743 |
}
|
|
744 |
else if ( req == CSPEtelCallRequester::ERequestTypeNone
|
|
745 |
&& iCallState != MCCPCallObserver::ECCPStateIdle )
|
|
746 |
{
|
|
747 |
CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 3");
|
|
748 |
ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeHangup );
|
|
749 |
iCommonInfo.IndicateActiveHangup( *this );
|
|
750 |
}
|
|
751 |
else if ( req == CSPEtelCallRequester::ERequestTypeNone )
|
|
752 |
{
|
|
753 |
CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 4");
|
|
754 |
ret = KErrAlreadyExists;
|
|
755 |
}
|
|
756 |
else
|
|
757 |
{
|
|
758 |
CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 5");
|
|
759 |
// Request pending, must be canceled
|
|
760 |
iRequester->Cancel();
|
|
761 |
ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeHangup );
|
|
762 |
iCommonInfo.IndicateActiveHangup( *this );
|
|
763 |
}
|
|
764 |
|
|
765 |
return ret;
|
|
766 |
}
|
|
767 |
|
|
768 |
// ---------------------------------------------------------------------------
|
|
769 |
// From class MCCPCall
|
|
770 |
// CSPCall::Cancel
|
|
771 |
// ---------------------------------------------------------------------------
|
|
772 |
//
|
|
773 |
TInt CSPCall::Cancel()
|
|
774 |
{
|
|
775 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Cancel");
|
|
776 |
return HangUp();
|
|
777 |
}
|
|
778 |
|
|
779 |
// ---------------------------------------------------------------------------
|
|
780 |
// From class MCCPCall
|
|
781 |
// CSPCall::Hold
|
|
782 |
// ---------------------------------------------------------------------------
|
|
783 |
//
|
|
784 |
TInt CSPCall::Hold()
|
|
785 |
{
|
|
786 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Hold this: %x", this);
|
|
787 |
TInt ret;
|
|
788 |
|
|
789 |
if ( iCallState == MCCPCallObserver::ECCPStateConnected )
|
|
790 |
{
|
|
791 |
CSPLOGSTRING(CSPREQOUT, "CSPCall::Hold make request");
|
|
792 |
|
|
793 |
// Set call on hold
|
|
794 |
ret = iRequester->MakeRequest(
|
|
795 |
CSPEtelCallRequester::ERequestTypeHold );
|
|
796 |
if ( ret != KErrNone )
|
|
797 |
{
|
|
798 |
CSPLOGSTRING2(CSPERROR,
|
|
799 |
"CSPCall::Hold ERROR: %d", ret);
|
|
800 |
}
|
|
801 |
}
|
|
802 |
else if ( iCallState == MCCPCallObserver::ECCPStateHold )
|
|
803 |
{
|
|
804 |
CSPLOGSTRING(CSPERROR, "CSPCall::Hold : already held");
|
|
805 |
ret = KErrAlreadyExists;
|
|
806 |
}
|
|
807 |
else
|
|
808 |
{
|
|
809 |
CSPLOGSTRING(CSPERROR, "CSPCall::Hold not allowed");
|
|
810 |
ret = KErrNotReady;
|
|
811 |
}
|
|
812 |
|
|
813 |
return ret;
|
|
814 |
}
|
|
815 |
|
|
816 |
// ---------------------------------------------------------------------------
|
|
817 |
// From class MCCPCall
|
|
818 |
// CSPCall::Resume
|
|
819 |
// ---------------------------------------------------------------------------
|
|
820 |
//
|
|
821 |
TInt CSPCall::Resume()
|
|
822 |
{
|
|
823 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Resume this: %x", this);
|
|
824 |
TInt ret;
|
|
825 |
|
|
826 |
if ( iCallState == MCCPCallObserver::ECCPStateHold )
|
|
827 |
{
|
|
828 |
CSPLOGSTRING(CSPREQOUT, "CSPCall::Resume request");
|
|
829 |
|
|
830 |
ret = iRequester->MakeRequest(
|
|
831 |
CSPEtelCallRequester::ERequestTypeResume );
|
|
832 |
if ( KErrNone != ret )
|
|
833 |
{
|
|
834 |
CSPLOGSTRING2(CSPERROR, "CSPCall::Resume ERROR %d", ret);
|
|
835 |
}
|
|
836 |
}
|
|
837 |
else if ( iCallState == MCCPCallObserver::ECCPStateConnected )
|
|
838 |
{
|
|
839 |
CSPLOGSTRING(CSPERROR, "CSPCall::Resume already connected" );
|
|
840 |
ret = KErrAlreadyExists;
|
|
841 |
}
|
|
842 |
else
|
|
843 |
{
|
|
844 |
CSPLOGSTRING(CSPERROR, "CSPCall::Resume not held state" );
|
|
845 |
ret = KErrNotReady;
|
|
846 |
}
|
|
847 |
|
|
848 |
return ret;
|
|
849 |
}
|
|
850 |
|
|
851 |
// ---------------------------------------------------------------------------
|
|
852 |
// From class MCCPCall
|
|
853 |
// CSPCall::Swap
|
|
854 |
// ---------------------------------------------------------------------------
|
|
855 |
//
|
|
856 |
TInt CSPCall::Swap()
|
|
857 |
{
|
|
858 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Swap this: %x", this);
|
|
859 |
TInt ret;
|
|
860 |
if ( iCallState == MCCPCallObserver::ECCPStateConnected
|
|
861 |
|| iCallState == MCCPCallObserver::ECCPStateHold )
|
|
862 |
{
|
|
863 |
ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeSwap );
|
|
864 |
if ( ret )
|
|
865 |
{
|
|
866 |
CSPLOGSTRING2( CSPERROR, "CSPCall::Swap Error %d", ret );
|
|
867 |
}
|
|
868 |
}
|
|
869 |
else
|
|
870 |
{
|
|
871 |
ret = KErrNotReady;
|
|
872 |
}
|
|
873 |
return ret;
|
|
874 |
}
|
|
875 |
|
|
876 |
// ---------------------------------------------------------------------------
|
|
877 |
// From class MCCPCall
|
|
878 |
// CSPCall::IsMobileOriginated
|
|
879 |
// ---------------------------------------------------------------------------
|
|
880 |
//
|
|
881 |
TBool CSPCall::IsMobileOriginated() const
|
|
882 |
{
|
|
883 |
CSPLOGSTRING(CSPREQIN, "CSPCall::IsMobileOriginated");
|
|
884 |
return iMobileOriginated;
|
|
885 |
}
|
|
886 |
|
|
887 |
// ---------------------------------------------------------------------------
|
|
888 |
// From class MCCPCall
|
|
889 |
// CSPCall::State
|
|
890 |
// ---------------------------------------------------------------------------
|
|
891 |
//
|
|
892 |
MCCPCallObserver::TCCPCallState CSPCall::State() const
|
|
893 |
{
|
|
894 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::State %d", iCallState);
|
|
895 |
return iCallState;
|
|
896 |
}
|
|
897 |
|
|
898 |
// ---------------------------------------------------------------------------
|
|
899 |
// From class MCCPCall
|
|
900 |
// CSPCall::Uid
|
|
901 |
// ---------------------------------------------------------------------------
|
|
902 |
//
|
|
903 |
TUid CSPCall::Uid() const
|
|
904 |
{
|
|
905 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Uid %d", KCSPImplementationUid);
|
|
906 |
return KCSPImplementationUid;
|
|
907 |
}
|
|
908 |
|
|
909 |
// ---------------------------------------------------------------------------
|
|
910 |
// From class MCCPCall
|
|
911 |
// CSPCall::Caps
|
|
912 |
// ---------------------------------------------------------------------------
|
|
913 |
//
|
|
914 |
MCCPCallObserver::TCCPCallControlCaps CSPCall::Caps( ) const
|
|
915 |
{
|
|
916 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Caps %b", iCapsFlags );
|
|
917 |
return (MCCPCallObserver::TCCPCallControlCaps) iCapsFlags;
|
|
918 |
}
|
|
919 |
|
|
920 |
// ---------------------------------------------------------------------------
|
|
921 |
// From class MCCPCall
|
|
922 |
// CSPCall::SetParameters
|
|
923 |
// ---------------------------------------------------------------------------
|
|
924 |
//
|
|
925 |
void CSPCall::SetParameters( const CCCPCallParameters& /*aNewParams*/ )
|
|
926 |
{
|
|
927 |
CSPLOGSTRING(CSPOBJECT, "CSPCall::SetParameters ERROR Can't set params");
|
|
928 |
}
|
|
929 |
|
|
930 |
// ---------------------------------------------------------------------------
|
|
931 |
// From class MCCPCall
|
|
932 |
// CSPCall::Parameters
|
|
933 |
// ---------------------------------------------------------------------------
|
|
934 |
//
|
|
935 |
const CCCPCallParameters& CSPCall::Parameters() const
|
|
936 |
{
|
|
937 |
CSPLOGSTRING(CSPINT, "CSPCall::Parameters");
|
|
938 |
return *iParams;
|
|
939 |
}
|
|
940 |
|
|
941 |
// ---------------------------------------------------------------------------
|
|
942 |
// From class MCCPCall
|
|
943 |
// CSPCall::TransferProvider
|
|
944 |
// ---------------------------------------------------------------------------
|
|
945 |
//
|
|
946 |
MCCPTransferProvider* CSPCall::TransferProviderL(const MCCPTransferObserver&
|
|
947 |
aObserver )
|
|
948 |
{
|
|
949 |
CSPLOGSTRING(CSPREQIN, "CSPCall::TransferProvider");
|
|
950 |
iTransferProvider->AddObserverL( aObserver );
|
|
951 |
return iTransferProvider;
|
|
952 |
}
|
|
953 |
|
|
954 |
// ---------------------------------------------------------------------------
|
|
955 |
// From class MCCPCall
|
|
956 |
// CSPCall::ForwardProvider
|
|
957 |
// ---------------------------------------------------------------------------
|
|
958 |
//
|
|
959 |
MCCPForwardProvider* CSPCall::ForwardProviderL(
|
|
960 |
const MCCPForwardObserver& aObserver )
|
|
961 |
{
|
|
962 |
CSPLOGSTRING(CSPREQIN, "CSPCall::ForwardProvider");
|
|
963 |
iForwardProvider->AddObserverL( aObserver );
|
|
964 |
return iForwardProvider;
|
|
965 |
}
|
|
966 |
|
|
967 |
// ---------------------------------------------------------------------------
|
|
968 |
// From class MCCPCall
|
|
969 |
// CSPCall::AddObserverL
|
|
970 |
// ---------------------------------------------------------------------------
|
|
971 |
//
|
|
972 |
void CSPCall::AddObserverL( const MCCPCallObserver& aObserver )
|
|
973 |
{
|
|
974 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::AddObserverL %x", &aObserver);
|
|
975 |
if ( iObservers.Find( &aObserver ) == KErrNotFound )
|
|
976 |
{
|
|
977 |
iObservers.AppendL( &aObserver );
|
|
978 |
}
|
|
979 |
}
|
|
980 |
|
|
981 |
// ---------------------------------------------------------------------------
|
|
982 |
// From class MCCPCall
|
|
983 |
// Removes observer.
|
|
984 |
// ---------------------------------------------------------------------------
|
|
985 |
//
|
|
986 |
TInt CSPCall::RemoveObserver( const MCCPCallObserver& aObserver )
|
|
987 |
{
|
|
988 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::RemoveObserver %x", &aObserver);
|
|
989 |
|
|
990 |
TInt found = iObservers.Find( &aObserver );
|
|
991 |
if ( found != KErrNotFound )
|
|
992 |
{
|
|
993 |
iObservers.Remove( found );
|
|
994 |
return KErrNone;
|
|
995 |
}
|
|
996 |
|
|
997 |
return found;
|
|
998 |
}
|
|
999 |
|
|
1000 |
// ---------------------------------------------------------------------------
|
|
1001 |
// From class MCCPCall
|
|
1002 |
// CSPCall::IsCallForwarded
|
|
1003 |
// ---------------------------------------------------------------------------
|
|
1004 |
//
|
|
1005 |
TBool CSPCall::IsCallForwarded( ) const
|
|
1006 |
{
|
|
1007 |
CSPLOGSTRING(CSPREQIN, "CSPCall::IsCallForwarded <");
|
|
1008 |
TBool ret( EFalse );
|
|
1009 |
TInt err( KErrNone );
|
|
1010 |
RMobileCall::TMobileCallInfoV3 callInfo;
|
|
1011 |
RMobileCall::TMobileCallInfoV3Pckg pck( callInfo );
|
|
1012 |
err = iCall.GetMobileCallInfo( pck );
|
|
1013 |
if (err == KErrNone )
|
|
1014 |
{
|
|
1015 |
ret = callInfo.iForwarded;
|
|
1016 |
}
|
|
1017 |
|
|
1018 |
CSPLOGSTRING2(CSPREQIN,
|
|
1019 |
"CSPCall::IsCallForwarded > forwarder: %d", ret );
|
|
1020 |
|
|
1021 |
return ret;
|
|
1022 |
}
|
|
1023 |
|
|
1024 |
// ---------------------------------------------------------------------------
|
|
1025 |
// From class MCCPCall
|
|
1026 |
// CSPCall::IsSecured
|
|
1027 |
// ---------------------------------------------------------------------------
|
|
1028 |
//
|
|
1029 |
TBool CSPCall::IsSecured( ) const
|
|
1030 |
{
|
|
1031 |
CSPLOGSTRING(CSPREQIN, "CSPCall::IsSecured");
|
|
1032 |
return iCommonInfo.NetworkSecurityStatus();
|
|
1033 |
}
|
|
1034 |
|
|
1035 |
// ---------------------------------------------------------------------------
|
|
1036 |
// From class MCCPCall
|
|
1037 |
// CSPCall::SecureSpecified
|
|
1038 |
// ---------------------------------------------------------------------------
|
|
1039 |
//
|
|
1040 |
TBool CSPCall::SecureSpecified( ) const
|
|
1041 |
{
|
|
1042 |
CSPLOGSTRING(CSPREQIN, "CSPCall::SecureSpecified");
|
|
1043 |
return iCommonInfo.SecureSpecified();
|
|
1044 |
}
|
|
1045 |
|
|
1046 |
// ---------------------------------------------------------------------------
|
|
1047 |
// From class MCCPCall
|
|
1048 |
// CSPCall::Tone
|
|
1049 |
// ---------------------------------------------------------------------------
|
|
1050 |
//
|
|
1051 |
TCCPTone CSPCall::Tone() const
|
|
1052 |
{
|
|
1053 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Tone <");
|
|
1054 |
TCCPTone tone( ECCPNoSoundSequence );
|
|
1055 |
|
|
1056 |
if ( iCallState == MCCPCallObserver::ECCPStateConnecting )
|
|
1057 |
{
|
|
1058 |
RMmCustomAPI::TRemoteAlertingToneStatus ts = iCommonInfo.GetRemoteAlertingToneStatus();
|
|
1059 |
|
|
1060 |
if (ts == RMmCustomAPI::EUiRbtTone )
|
|
1061 |
{
|
|
1062 |
tone = ECCPRemoteAlerting;
|
|
1063 |
}
|
|
1064 |
else if ( ts == RMmCustomAPI::EUiStopTone )
|
|
1065 |
{
|
|
1066 |
tone = ECCPNoSoundSequence;
|
|
1067 |
}
|
|
1068 |
else
|
|
1069 |
{
|
|
1070 |
// No tone
|
|
1071 |
tone = ECCPNoSoundSequence;
|
|
1072 |
}
|
|
1073 |
}
|
|
1074 |
else
|
|
1075 |
{
|
|
1076 |
// Handle disconnecting tones
|
|
1077 |
TInt callDisconnectingError = ExitCodeError();
|
|
1078 |
CSPLOGSTRING2(CSPINT, "CSPCall::Tone exit code err: %d", callDisconnectingError);
|
|
1079 |
|
|
1080 |
switch( callDisconnectingError )
|
|
1081 |
{
|
|
1082 |
case KErrNone:
|
|
1083 |
// GSM: DIAL TONE (optional) - not used in Nokia phones
|
|
1084 |
CSPLOGSTRING(CSPERROR, "CSPCall::Tone: No sound");
|
|
1085 |
break;
|
|
1086 |
case KErrGsmCCUserBusy:
|
|
1087 |
// GSM: SUBSCRIBER BUSY
|
|
1088 |
tone = ECCPToneUserBusy;
|
|
1089 |
CSPLOGSTRING(CSPINT, "CSPCall::Tone: Subscriber Busy");
|
|
1090 |
break;
|
|
1091 |
// Fall through
|
|
1092 |
case KErrGsmCCNumberChanged:
|
|
1093 |
case KErrGsmCCResponseToStatusEnquiry:
|
|
1094 |
case KErrGsmCCNormalUnspecified:
|
|
1095 |
// GSM: NONE, Nokia phones: radio path not available
|
|
1096 |
tone = ECCPToneRadioPathNotAvailable;
|
|
1097 |
CSPLOGSTRING(CSPINT, "CSPCall::Tone: RadioPathNotAvailable");
|
|
1098 |
break;
|
|
1099 |
case KErrGsmCCNoChannelAvailable:
|
|
1100 |
case KErrGsmCCTemporaryFailure:
|
|
1101 |
case KErrGsmCCSwitchingEquipmentCongestion:
|
|
1102 |
case KErrGsmCCRequestedChannelNotAvailable:
|
|
1103 |
case KErrGsmCCQualityOfServiceNotAvailable:
|
|
1104 |
case KErrGsmCCBearerCapabilityNotCurrentlyAvailable:
|
|
1105 |
// GSM: CONGESTION
|
|
1106 |
tone = ECCPToneCongestion;
|
|
1107 |
CSPLOGSTRING(CSPINT, "CSPCall::Tone: Congestion");
|
|
1108 |
break;
|
|
1109 |
case KErrGsmCCUnassignedNumber:
|
|
1110 |
case KErrGsmCCNoRouteToDestination:
|
|
1111 |
case KErrGsmCCChannelUnacceptable:
|
|
1112 |
case KErrGsmCCOperatorDeterminedBarring:
|
|
1113 |
case KErrGsmCCUserNotResponding:
|
|
1114 |
case KErrGsmCCUserAlertingNoAnswer:
|
|
1115 |
case KErrGsmCCCallRejected:
|
|
1116 |
case KErrGsmCCNonSelectedUserClearing:
|
|
1117 |
case KErrGsmCCDestinationOutOfOrder:
|
|
1118 |
case KErrGsmCCInvalidNumberFormat:
|
|
1119 |
case KErrGsmCCFacilityRejected:
|
|
1120 |
case KErrGsmCCNetworkOutOfOrder:
|
|
1121 |
case KErrGsmCCAccessInformationDiscarded:
|
|
1122 |
case KErrGsmCCResourceNotAvailable:
|
|
1123 |
case KErrGsmCCRequestedFacilityNotSubscribed:
|
|
1124 |
case KErrGsmCCIncomingCallsBarredInCug:
|
|
1125 |
case KErrGsmCCBearerCapabilityNotAuthorised:
|
|
1126 |
case KErrGsmCCServiceNotAvailable:
|
|
1127 |
case KErrGsmCCBearerServiceNotImplemented:
|
|
1128 |
case KErrGsmCCChannelTypeNotImplemented:
|
|
1129 |
case KErrGsmCCAcmGreaterThanAcmMax:
|
|
1130 |
case KErrGsmCCRequestedFacilityNotImplemented:
|
|
1131 |
case KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable:
|
|
1132 |
case KErrGsmCCServiceNotImplemented:
|
|
1133 |
case KErrGsmCCInvalidCallReferenceValue:
|
|
1134 |
case KErrGsmCCChannelDoesNotExist:
|
|
1135 |
case KErrGsmCCSuspendedCallExistsButCallIdentityDoesNotWork:
|
|
1136 |
case KErrGsmCCCallIdentityInUse:
|
|
1137 |
case KErrGsmCCNoCallSuspended:
|
|
1138 |
case KErrGsmCCRequestedCallIdentityAlreadyCleared:
|
|
1139 |
case KErrGsmCCUserNotInCug:
|
|
1140 |
case KErrGsmCCIncompatibleDestination:
|
|
1141 |
case KErrGsmCCInvalidTransitNetworkSelection:
|
|
1142 |
case KErrGsmCCIncompatibleSegmentedMessage:
|
|
1143 |
case KErrGsmCCSemanticallyIncorrectMessage:
|
|
1144 |
case KErrGsmCCInvalidMandatoryInformation:
|
|
1145 |
case KErrGsmCCNonExistentMessageType:
|
|
1146 |
case KErrGsmCCIncompatibleMessageInProtocolState:
|
|
1147 |
case KErrGsmCCNonExistentInformationElement:
|
|
1148 |
case KErrGsmCCConditionalIEError:
|
|
1149 |
case KErrGsmCCIncompatibleMessageInCallState:
|
|
1150 |
case KErrGsmCCRecoveryOnTimerExpiry:
|
|
1151 |
case KErrGsmCCUnspecifiedProtocolError:
|
|
1152 |
case KErrGsmCCUnspecifiedInterworkingError:
|
|
1153 |
// GSM: SPECIAL INFORMATION
|
|
1154 |
tone = ECCPToneSpecialInformation;
|
|
1155 |
CSPLOGSTRING(CSPINT, "CSPCall::Tone: Special Information");
|
|
1156 |
break;
|
|
1157 |
default:
|
|
1158 |
CSPLOGSTRING(CSPERROR, "CSPCall::Tone: ERROR not found");
|
|
1159 |
break;
|
|
1160 |
}
|
|
1161 |
}
|
|
1162 |
|
|
1163 |
CSPLOGSTRING2(CSPREQIN, "CSPCall::Tone > tone: %d", tone);
|
|
1164 |
return tone;
|
|
1165 |
}
|
|
1166 |
|
|
1167 |
// ---------------------------------------------------------------------------
|
|
1168 |
// From class MCCPCSCall
|
|
1169 |
// CSPCall::NoFdnCheck
|
|
1170 |
// ---------------------------------------------------------------------------
|
|
1171 |
//
|
|
1172 |
void CSPCall::NoFDNCheck( )
|
|
1173 |
{
|
|
1174 |
CSPLOGSTRING(CSPREQIN, "CSPCall::NoFDNCheck");
|
|
1175 |
iFdnCheck = EFalse;
|
|
1176 |
}
|
|
1177 |
|
|
1178 |
// ---------------------------------------------------------------------------
|
|
1179 |
// CSPCall::LogDialedNumber
|
|
1180 |
// ---------------------------------------------------------------------------
|
|
1181 |
//
|
|
1182 |
TBool CSPCall::LogDialedNumber() const
|
|
1183 |
{
|
|
1184 |
CSPLOGSTRING(CSPREQIN, "CSPCall::LogDialedNumber true");
|
|
1185 |
return ETrue;
|
|
1186 |
}
|
|
1187 |
|
|
1188 |
// ---------------------------------------------------------------------------
|
|
1189 |
// From class MCCPCSCall
|
|
1190 |
// CSPCall::Dial
|
|
1191 |
// ---------------------------------------------------------------------------
|
|
1192 |
//
|
|
1193 |
TInt CSPCall::Dial( const TDesC8& /*aCallParams*/ )
|
|
1194 |
{
|
|
1195 |
CSPLOGSTRING(CSPREQIN, "CSPCall::Dial");
|
|
1196 |
return iCommonInfo.IndicateDialRequest( *this );
|
|
1197 |
}
|
|
1198 |
|
|
1199 |
// ---------------------------------------------------------------------------
|
|
1200 |
// From class MCCPCallCommandHandling
|
|
1201 |
// CSPCall::PerformDialRequest
|
|
1202 |
// ---------------------------------------------------------------------------
|
|
1203 |
//
|
|
1204 |
TInt CSPCall::PerformDialRequest()
|
|
1205 |
{
|
|
1206 |
CSPLOGSTRING(CSPREQIN, "CSPCall::PerformDialRequest");
|
|
1207 |
iDialCompletionCode = KErrNone;
|
|
1208 |
iTerminationErrorNotified = EFalse;
|
|
1209 |
|
|
1210 |
// Send the User to User Information.
|
|
1211 |
if( iUserToUserInformation->Length() )
|
|
1212 |
{
|
|
1213 |
iUUIMessageSender->SendUUIMessage( *iUserToUserInformation );
|
|
1214 |
}
|
|
1215 |
|
|
1216 |
return DialFdnCond( iFdnCheck );
|
|
1217 |
}
|
|
1218 |
|
|
1219 |
// ---------------------------------------------------------------------------
|
|
1220 |
// CSPCall::CSPCall
|
|
1221 |
// ---------------------------------------------------------------------------
|
|
1222 |
//
|
|
1223 |
CSPCall::CSPCall( RMobileLine& aLine,
|
|
1224 |
TBool aMobileOriginated,
|
|
1225 |
const TDesC& aName,
|
|
1226 |
MCSPCommonInfo& aCommonInfo,
|
|
1227 |
TBool aIsEmergencyCall ) :
|
|
1228 |
iLine( aLine ),
|
|
1229 |
iMobileOriginated( aMobileOriginated ),
|
|
1230 |
iName( aName ),
|
|
1231 |
iCommonInfo( aCommonInfo ),
|
|
1232 |
iTerminationErrorNotified( EFalse ),
|
|
1233 |
iIsEmergencyCall( aIsEmergencyCall),
|
|
1234 |
iFdnCheck(ETrue),
|
|
1235 |
iAudioStatus( ECSPCallAudioStatusInactive )
|
|
1236 |
|
|
1237 |
{
|
|
1238 |
CSPLOGSTRING(CSPOBJECT, "CSPCall::CSPCall");
|
|
1239 |
}
|
|
1240 |
|
|
1241 |
// ---------------------------------------------------------------------------
|
|
1242 |
// CSPCall::ConstructL
|
|
1243 |
// Constructing CSPCall in 2nd phase
|
|
1244 |
// ---------------------------------------------------------------------------
|
|
1245 |
//
|
|
1246 |
void CSPCall::ConstructL( const CCCECallParameters& aParams )
|
|
1247 |
{
|
|
1248 |
CSPLOGSTRING(CSPOBJECT, "CSPCall::ConstructL <");
|
|
1249 |
|
|
1250 |
// Create cloned copy of call parameters
|
|
1251 |
iParams = static_cast<CCCECallParameters*>( aParams.CloneL() );
|
|
1252 |
|
|
1253 |
// Open call handle
|
|
1254 |
OpenCallHandleL();
|
|
1255 |
|
|
1256 |
// Update call info
|
|
1257 |
UpdateCallInfo();
|
|
1258 |
|
|
1259 |
// Update call state from ETel
|
|
1260 |
UpdateCallState();
|
|
1261 |
|
|
1262 |
// Create call handlers for call related requests
|
|
1263 |
// and for monitoring call related events
|
|
1264 |
CreateCallHandlersL();
|
|
1265 |
|
|
1266 |
CSPLOGSTRING(CSPOBJECT, "CSPCall::ConstructL >");
|
|
1267 |
}
|
|
1268 |
|
|
1269 |
// ---------------------------------------------------------------------------
|
|
1270 |
// CSPCall::OpenCallHandleL
|
|
1271 |
// Open call handle, calls either OpenNewCallL or OpenExistingCallL depending
|
|
1272 |
// of the call direction and if the call is a client call
|
|
1273 |
// ---------------------------------------------------------------------------
|
|
1274 |
//
|
|
1275 |
void CSPCall::OpenCallHandleL()
|
|
1276 |
{
|
|
1277 |
CSPLOGSTRING(CSPINT, "CSPCall::OpenCallHandleL <");
|
|
1278 |
|
|
1279 |
if ( iMobileOriginated )
|
|
1280 |
{
|
|
1281 |
// There is no existing call on line, open new call
|
|
1282 |
OpenNewCall();
|
|
1283 |
}
|
|
1284 |
else
|
|
1285 |
{
|
|
1286 |
// Mobile terminated call on line, open existing call
|
|
1287 |
OpenExistingCallL( iName );
|
|
1288 |
}
|
|
1289 |
|
|
1290 |
CSPLOGSTRING(CSPINT, "CSPCall::OpenCallHandleL >");
|
|
1291 |
}
|
|
1292 |
|
|
1293 |
// ---------------------------------------------------------------------------
|
|
1294 |
// CSPCall::UpdateCallInfoL
|
|
1295 |
// Update call info including remote party name and number data
|
|
1296 |
// ---------------------------------------------------------------------------
|
|
1297 |
//
|
|
1298 |
void CSPCall::UpdateCallInfo()
|
|
1299 |
{
|
|
1300 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo <");
|
|
1301 |
RMobileCall::TMobileCallInfoV7 callInfo;
|
|
1302 |
RMobileCall::TMobileCallInfoV7Pckg pck( callInfo );
|
|
1303 |
TInt err = iCall.GetMobileCallInfo( pck );
|
|
1304 |
|
|
1305 |
UpdateCallInfoImpl( callInfo );
|
|
1306 |
|
|
1307 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo >");
|
|
1308 |
}
|
|
1309 |
|
|
1310 |
// ---------------------------------------------------------------------------
|
|
1311 |
// CSPCall::UpdateCallInfoImpl
|
|
1312 |
// Implementation for UpdateCallInfo().
|
|
1313 |
// ---------------------------------------------------------------------------
|
|
1314 |
//
|
|
1315 |
void CSPCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo )
|
|
1316 |
{
|
|
1317 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl <");
|
|
1318 |
|
|
1319 |
if ( iMobileOriginated )
|
|
1320 |
{
|
|
1321 |
// Call wasn't added by ETel monitor, update info accordingly
|
|
1322 |
UpdateCallNameNumberInfo( aCallInfo, EFalse );
|
|
1323 |
}
|
|
1324 |
else
|
|
1325 |
{
|
|
1326 |
// Call was added by ETel monitor, update info accordingly
|
|
1327 |
UpdateCallNameNumberInfo( aCallInfo, ETrue );
|
|
1328 |
}
|
|
1329 |
|
|
1330 |
|
|
1331 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl >");
|
|
1332 |
}
|
|
1333 |
|
|
1334 |
// ---------------------------------------------------------------------------
|
|
1335 |
// CSPCall::UpdateCallOrigin
|
|
1336 |
// Set call origin to CCCECallParameters.
|
|
1337 |
// ---------------------------------------------------------------------------
|
|
1338 |
//
|
|
1339 |
void CSPCall::UpdateCallOrigin( RMobileCall::TMobileCallInfoV7 aCallInfo )
|
|
1340 |
{
|
|
1341 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin <");
|
|
1342 |
|
|
1343 |
if ( RMobileCall::EOriginatorSIM == aCallInfo.iCallParamOrigin )
|
|
1344 |
{
|
|
1345 |
iParams->SetOrigin(CCCECallParameters::ECCECallOriginSAT);
|
|
1346 |
iParams->SetAlphaId(aCallInfo.iAlphaId);
|
|
1347 |
}
|
|
1348 |
|
|
1349 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin >");
|
|
1350 |
}
|
|
1351 |
|
|
1352 |
|
|
1353 |
|
|
1354 |
// ---------------------------------------------------------------------------
|
|
1355 |
// CSPCall::UpdateCallStateL
|
|
1356 |
//
|
|
1357 |
// ---------------------------------------------------------------------------
|
|
1358 |
//
|
|
1359 |
int CSPCall::UpdateCallState()
|
|
1360 |
{
|
|
1361 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallState <");
|
|
1362 |
TInt err( KErrNone );
|
|
1363 |
|
|
1364 |
// Update call state from ETel
|
|
1365 |
RMobileCall::TMobileCallStatus etelState;
|
|
1366 |
err = iCall.GetMobileCallStatus( etelState );
|
|
1367 |
if ( KErrNone == err )
|
|
1368 |
{
|
|
1369 |
iCallState = CCPStateFromETelState( etelState );
|
|
1370 |
}
|
|
1371 |
CSPLOGSTRING2(CSPINT, "CSPCall::UpdateCallState > res %d", err);
|
|
1372 |
|
|
1373 |
return err;
|
|
1374 |
}
|
|
1375 |
|
|
1376 |
// ---------------------------------------------------------------------------
|
|
1377 |
// CSPCall::CreateCallHandlersL
|
|
1378 |
// Create call handlers for call related requests and call monitoring
|
|
1379 |
// ---------------------------------------------------------------------------
|
|
1380 |
//
|
|
1381 |
void CSPCall::CreateCallHandlersL()
|
|
1382 |
{
|
|
1383 |
CSPLOGSTRING(CSPINT, "CSPCall::CreateCallHandlersL <");
|
|
1384 |
|
|
1385 |
iRequester = CSPEtelCallRequester::NewL( *this, iCall );
|
|
1386 |
|
|
1387 |
iCallEventMonitor = CSPEtelCallEventMonitor::NewL( *this, iCall );
|
|
1388 |
iCallEventMonitor->StartMonitoring();
|
|
1389 |
iCallStatusMonitor = CSPEtelCallStatusMonitor::NewL( *this, iCall );
|
|
1390 |
iCallStatusMonitor->StartMonitoring();
|
|
1391 |
|
|
1392 |
iCallCapsMonitor = CSPEtelCallCapsMonitor::NewL( *this, iCall );
|
|
1393 |
iCallCapsMonitor->StartMonitoring();
|
|
1394 |
iCapsFlags = iCallCapsMonitor->FetchCallControlCapsL();
|
|
1395 |
|
|
1396 |
iCallInfoMonitor = CSPCallInfoMonitor::NewL( *this, iCall );
|
|
1397 |
iCallInfoMonitor->StartMonitoring();
|
|
1398 |
|
|
1399 |
// Start UUI monitor and create message sender
|
|
1400 |
iSkypeId = TCSPSkypeIdParser::CreateSkypeIdBufferL();
|
|
1401 |
iUUIMonitor = CSPUUIMonitor::NewL( iCall,*this );
|
|
1402 |
iUUIMonitor->StartMonitor();
|
|
1403 |
iUUIMessageSender = CSPUUIMessageSender::NewL( iCall );
|
|
1404 |
iUserToUserInformation = iParams->UUSId().AllocL();
|
|
1405 |
|
|
1406 |
// Transfer provider
|
|
1407 |
iTransferProvider = CSPTransferProvider::NewL( iCall, *this, iCommonInfo );
|
|
1408 |
|
|
1409 |
// Forward provider
|
|
1410 |
iForwardProvider = CSPForwardProvider::NewL();
|
|
1411 |
|
|
1412 |
CSPLOGSTRING(CSPINT, "CSPCall::CreateCallHandlersL >");
|
|
1413 |
}
|
|
1414 |
|
|
1415 |
// ---------------------------------------------------------------------------
|
|
1416 |
// CSPCall::NotifyRingingState
|
|
1417 |
// Gets to ringing state
|
|
1418 |
// ---------------------------------------------------------------------------
|
|
1419 |
//
|
|
1420 |
void CSPCall::NotifyRingingState( )
|
|
1421 |
{
|
|
1422 |
CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyRingingState");
|
|
1423 |
iCallState = MCCPCallObserver::ECCPStateRinging;
|
|
1424 |
|
|
1425 |
TInt obsCount = iObservers.Count ( );
|
|
1426 |
for (TInt i = 0; i < obsCount; i++ )
|
|
1427 |
{
|
|
1428 |
MCCPCallObserver *obs = iObservers[i];
|
|
1429 |
if ( obs )
|
|
1430 |
{
|
|
1431 |
obs->CallStateChanged ( iCallState, this );
|
|
1432 |
}
|
|
1433 |
}
|
|
1434 |
}
|
|
1435 |
|
|
1436 |
// ---------------------------------------------------------------------------
|
|
1437 |
// CSPCall::CCPStateFromETelState
|
|
1438 |
// Simple mapping between state enumerations.
|
|
1439 |
// ---------------------------------------------------------------------------
|
|
1440 |
//
|
|
1441 |
MCCPCallObserver::TCCPCallState CSPCall::CCPStateFromETelState(
|
|
1442 |
RMobileCall::TMobileCallStatus aEtelState )
|
|
1443 |
{
|
|
1444 |
MCCPCallObserver::TCCPCallState ret = MCCPCallObserver::ECCPStateIdle;
|
|
1445 |
switch ( aEtelState )
|
|
1446 |
{
|
|
1447 |
case RMobileCall::EStatusUnknown:
|
|
1448 |
{
|
|
1449 |
CSPLOGSTRING( CSPREQIN,
|
|
1450 |
"CSPCall::State > RMobileCall::Unknown" );
|
|
1451 |
ret = MCCPCallObserver::ECCPStateIdle;
|
|
1452 |
break;
|
|
1453 |
}
|
|
1454 |
case RMobileCall::EStatusIdle:
|
|
1455 |
{
|
|
1456 |
CSPLOGSTRING( CSPREQIN,
|
|
1457 |
"CSPCall::State > RMobileCall::EStatusIdle" );
|
|
1458 |
ret = MCCPCallObserver::ECCPStateIdle;
|
|
1459 |
break;
|
|
1460 |
}
|
|
1461 |
case RMobileCall::EStatusRinging:
|
|
1462 |
{
|
|
1463 |
CSPLOGSTRING( CSPREQIN,
|
|
1464 |
"CSPCall::State > RMobileCall::EStatusRinging" );
|
|
1465 |
ret = MCCPCallObserver::ECCPStateRinging;
|
|
1466 |
break;
|
|
1467 |
}
|
|
1468 |
// Map the following to connecting status
|
|
1469 |
case RMobileCall::EStatusDialling:
|
|
1470 |
{
|
|
1471 |
CSPLOGSTRING( CSPREQIN, "CSPCall::State > \
|
|
1472 |
RMobileCall::EStatusDialling" );
|
|
1473 |
ret = MCCPCallObserver::ECCPStateDialling;
|
|
1474 |
break;
|
|
1475 |
}
|
|
1476 |
case RMobileCall::EStatusConnecting:
|
|
1477 |
{
|
|
1478 |
CSPLOGSTRING( CSPREQIN, "CSPCall::State > \
|
|
1479 |
RMobileCall::Connecting" );
|
|
1480 |
ret = MCCPCallObserver::ECCPStateConnecting;
|
|
1481 |
break;
|
|
1482 |
}
|
|
1483 |
case RMobileCall::EStatusAnswering:
|
|
1484 |
{
|
|
1485 |
CSPLOGSTRING( CSPREQIN, "CSPCall::State > \
|
|
1486 |
RMobileCall::Answering" );
|
|
1487 |
ret = MCCPCallObserver::ECCPStateAnswering;
|
|
1488 |
break;
|
|
1489 |
}
|
|
1490 |
// Call is connected and active.
|
|
1491 |
case RMobileCall::EStatusConnected:
|
|
1492 |
{
|
|
1493 |
CSPLOGSTRING( CSPREQIN,
|
|
1494 |
"CSPCall::State > RMobileCall::EStatusConnected" );
|
|
1495 |
ret = MCCPCallObserver::ECCPStateConnected;
|
|
1496 |
break;
|
|
1497 |
}
|
|
1498 |
case RMobileCall::EStatusDisconnectingWithInband:
|
|
1499 |
case RMobileCall::EStatusDisconnecting:
|
|
1500 |
{
|
|
1501 |
CSPLOGSTRING( CSPREQIN,
|
|
1502 |
"CSPCall::State > RMobileCall::EStatusDisconnecting/Inband?");
|
|
1503 |
ret = MCCPCallObserver::ECCPStateDisconnecting;
|
|
1504 |
break;
|
|
1505 |
}
|
|
1506 |
case RMobileCall::EStatusReconnectPending:
|
|
1507 |
{
|
|
1508 |
CSPLOGSTRING( CSPREQIN,
|
|
1509 |
"CSPCall::State > RMobileCall::EStatusHangingUp" );
|
|
1510 |
ret = MCCPCallObserver::ECCPStateDisconnecting;
|
|
1511 |
break;
|
|
1512 |
}
|
|
1513 |
case RMobileCall::EStatusHold:
|
|
1514 |
{
|
|
1515 |
CSPLOGSTRING( CSPREQIN,
|
|
1516 |
"CSPCall::State > RMobileCall::EStatusHold" );
|
|
1517 |
ret = MCCPCallObserver::ECCPStateHold;
|
|
1518 |
break;
|
|
1519 |
}
|
|
1520 |
case RMobileCall::EStatusWaitingAlternatingCallSwitch:
|
|
1521 |
{
|
|
1522 |
// This state is not used in real life.
|
|
1523 |
CSPLOGSTRING( CSPREQIN,
|
|
1524 |
"CSPCall::State > RMobileCall::EStatusWaitingAlternatingCallSwitch" );
|
|
1525 |
ret = MCCPCallObserver::ECCPStateConnected;
|
|
1526 |
break;
|
|
1527 |
}
|
|
1528 |
case RMobileCall::EStatusTransferring:
|
|
1529 |
{
|
|
1530 |
CSPLOGSTRING( CSPREQIN,
|
|
1531 |
"CSPCall::State > RMobileCall::EStatusHold" );
|
|
1532 |
ret = MCCPCallObserver::ECCPStateTransferring;
|
|
1533 |
break;
|
|
1534 |
}
|
|
1535 |
case RMobileCall::EStatusTransferAlerting:
|
|
1536 |
{
|
|
1537 |
CSPLOGSTRING( CSPREQIN,
|
|
1538 |
"CSPCall::State > RMobileCall::EStatusHold" );
|
|
1539 |
ret = MCCPCallObserver::ECCPStateTransferring;
|
|
1540 |
break;
|
|
1541 |
}
|
|
1542 |
default:
|
|
1543 |
{
|
|
1544 |
CSPLOGSTRING( CSPREQIN,
|
|
1545 |
"CSPCall::CCPStateFromETelState unhandled state ");
|
|
1546 |
}
|
|
1547 |
}
|
|
1548 |
|
|
1549 |
CSPLOGSTRING3(CSPINT,
|
|
1550 |
"CSPCall::CCPStateFromETelState ETel: %d CCP: %d", aEtelState, ret);
|
|
1551 |
return ret;
|
|
1552 |
}
|
|
1553 |
|
|
1554 |
// ---------------------------------------------------------------------------
|
|
1555 |
// CSPCall::NotifyCallStateChanged
|
|
1556 |
// Notifies observers about state changes
|
|
1557 |
// ---------------------------------------------------------------------------
|
|
1558 |
//
|
|
1559 |
void CSPCall::NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState )
|
|
1560 |
{
|
|
1561 |
CSPLOGSTRING3(CSPINT,
|
|
1562 |
"CSPCall::NotifyCallStateChanged < state: %d this: %x",
|
|
1563 |
aState, this );
|
|
1564 |
|
|
1565 |
iCallState = aState;
|
|
1566 |
TBool notifyObservers( ETrue );
|
|
1567 |
|
|
1568 |
if ( !iMobileOriginated && MCCPCallObserver::ECCPStateRinging == aState )
|
|
1569 |
{
|
|
1570 |
CSPLOGSTRING2(CSPINT, "CSPCall::No notify on ringing MT", aState);
|
|
1571 |
notifyObservers = EFalse;
|
|
1572 |
}
|
|
1573 |
|
|
1574 |
if ( notifyObservers )
|
|
1575 |
{
|
|
1576 |
TInt obsCount = iObservers.Count();
|
|
1577 |
for ( TInt i = 0; i < obsCount; i++ )
|
|
1578 |
{
|
|
1579 |
MCCPCallObserver *obs = iObservers[i];
|
|
1580 |
if ( obs )
|
|
1581 |
{
|
|
1582 |
obs->CallStateChanged( aState, this );
|
|
1583 |
}
|
|
1584 |
}
|
|
1585 |
}
|
|
1586 |
|
|
1587 |
CSPLOGSTRING3(CSPINT,
|
|
1588 |
"CSPCall::NotifyCallStateChanged > state: %d this: %x",
|
|
1589 |
aState, this );
|
|
1590 |
}
|
|
1591 |
|
|
1592 |
// ---------------------------------------------------------------------------
|
|
1593 |
// CSPCall::NotifyCallStateChangedWithInband
|
|
1594 |
// Notifies observers about state changes
|
|
1595 |
// ---------------------------------------------------------------------------
|
|
1596 |
//
|
|
1597 |
void CSPCall::NotifyCallStateChangedWithInband(
|
|
1598 |
MCCPCallObserver::TCCPCallState aState )
|
|
1599 |
{
|
|
1600 |
CSPLOGSTRING3(CSPINT,
|
|
1601 |
"CSPCall::NotifyCallStateChangedWithInBand < state: %d this: %x",
|
|
1602 |
aState, this );
|
|
1603 |
|
|
1604 |
iCallState = aState;
|
|
1605 |
|
|
1606 |
if ( !iMobileOriginated && MCCPCallObserver::ECCPStateRinging == aState )
|
|
1607 |
{
|
|
1608 |
CSPLOGSTRING2(CSPINT, "CSPCall::No notify on ringing MT", aState);
|
|
1609 |
}
|
|
1610 |
else
|
|
1611 |
{
|
|
1612 |
TInt obsCount = iObservers.Count();
|
|
1613 |
for ( TInt i = 0; i < obsCount; i++ )
|
|
1614 |
{
|
|
1615 |
MCCPCallObserver *obs = iObservers[i];
|
|
1616 |
if ( obs )
|
|
1617 |
{
|
|
1618 |
obs->CallStateChangedWithInband( aState, this );
|
|
1619 |
}
|
|
1620 |
}
|
|
1621 |
}
|
|
1622 |
CSPLOGSTRING3(CSPINT,
|
|
1623 |
"CSPCall::NotifyCallStateChangedWithInband > state: %d this: %x",
|
|
1624 |
aState, this);
|
|
1625 |
}
|
|
1626 |
|
|
1627 |
// ---------------------------------------------------------------------------
|
|
1628 |
// CSPCall::ReadRepositoryL
|
|
1629 |
// Reads the given information from Central Repository.
|
|
1630 |
// ---------------------------------------------------------------------------
|
|
1631 |
//
|
|
1632 |
void CSPCall::ReadRepositoryL( TUid aUid, TUint aKey, TInt& aVal)
|
|
1633 |
{
|
|
1634 |
CSPLOGSTRING(CSPINT, "CSPCall::ReadRepositoryL");
|
|
1635 |
|
|
1636 |
CRepository* cr = CRepository::NewL( aUid );
|
|
1637 |
TInt err = cr->Get( aKey, aVal );
|
|
1638 |
delete cr;
|
|
1639 |
User::LeaveIfError( err );
|
|
1640 |
}
|
|
1641 |
|
|
1642 |
// ---------------------------------------------------------------------------
|
|
1643 |
// CSPCall::CheckAndNotifyTerminationError
|
|
1644 |
// Reads error code from ETel.
|
|
1645 |
// ---------------------------------------------------------------------------
|
|
1646 |
//
|
|
1647 |
void CSPCall::CheckAndNotifyTerminationError()
|
|
1648 |
{
|
|
1649 |
CSPLOGSTRING2(CSPINT,
|
|
1650 |
"CSPCall::CheckAndNotifyTerminationError dial completion code: %d",
|
|
1651 |
iDialCompletionCode);
|
|
1652 |
|
|
1653 |
// Emergency error handling is separated into CSPEtelCallRequester
|
|
1654 |
if ( !iIsEmergencyCall )
|
|
1655 |
{
|
|
1656 |
TInt termErr = ExitCodeError();
|
|
1657 |
CSPLOGSTRING2(CSPINT,
|
|
1658 |
"CSPCall::CheckAndNotifyTerminationError exit code error: %d",
|
|
1659 |
termErr);
|
|
1660 |
|
|
1661 |
if ( termErr == KErrNone )
|
|
1662 |
{
|
|
1663 |
// Handle KErrGsmCCUnassignedNumber correctly
|
|
1664 |
// because the value is not stored in exit code.
|
|
1665 |
termErr = iDialCompletionCode;
|
|
1666 |
CSPLOGSTRING(CSPINT,
|
|
1667 |
"CSPCall::CheckAndNotifyTerminationError use dial completion code");
|
|
1668 |
}
|
|
1669 |
|
|
1670 |
if ( termErr == KErrGsmRRPreEmptiveRelease )
|
|
1671 |
{
|
|
1672 |
// Error KErrGsmRRPreEmptiveRelease occurs when there is active call
|
|
1673 |
// and user make emergency call, can be ignored.
|
|
1674 |
CSPLOGSTRING3(
|
|
1675 |
CSPERROR,
|
|
1676 |
"CSPCall::CheckAndNotifyTerminationError preemptive release, ignore: %d",
|
|
1677 |
termErr,
|
|
1678 |
this );
|
|
1679 |
}
|
|
1680 |
else if ( iDontReportTerm
|
|
1681 |
&& ( termErr == KErrGsmCCNormalUnspecified
|
|
1682 |
|| termErr == KErrGsmCCCallRejected ) )
|
|
1683 |
{
|
|
1684 |
// Not an error, since this happens on normal
|
|
1685 |
// call termination situation after connected call.
|
|
1686 |
CSPLOGSTRING3(CSPERROR,
|
|
1687 |
"CSPCall::CheckAndNotifyTerminationError DISCARD this: %x err: %d",
|
|
1688 |
this,
|
|
1689 |
termErr);
|
|
1690 |
}
|
|
1691 |
else if ( termErr )
|
|
1692 |
{
|
|
1693 |
TCCPError ccpErr(ECCPErrorNone);
|
|
1694 |
|
|
1695 |
// Only a couple of error codes can have diagnostic information.
|
|
1696 |
// aDiagnostic ought to be undefined in other situatios,
|
|
1697 |
// but at least in this way we can really guarantee it.
|
|
1698 |
if ( termErr == KErrGsmCCFacilityRejected ||
|
|
1699 |
termErr == KErrGsmCCRequestedFacilityNotSubscribed ||
|
|
1700 |
termErr == KErrGsmCCIncomingCallsBarredInCug ||
|
|
1701 |
termErr == KErrGsmCCRequestedFacilityNotImplemented ||
|
|
1702 |
termErr == KErrGsmCCUserNotInCug )
|
|
1703 |
{
|
|
1704 |
TName name;
|
|
1705 |
CallName( name );
|
|
1706 |
TInt diagErr = iCommonInfo.GetDiagnosticError( name );
|
|
1707 |
ccpErr = iRequester->MapError( diagErr );
|
|
1708 |
|
|
1709 |
// Finally use exit code if diagnostic did not contain
|
|
1710 |
// any useful information.
|
|
1711 |
if ( ccpErr == ECCPRequestFailure )
|
|
1712 |
{
|
|
1713 |
ccpErr = iRequester->MapError( termErr );
|
|
1714 |
}
|
|
1715 |
}
|
|
1716 |
else
|
|
1717 |
{
|
|
1718 |
ccpErr = iRequester->MapError( termErr );
|
|
1719 |
}
|
|
1720 |
|
|
1721 |
NotifyErrorOccurred( ccpErr );
|
|
1722 |
iTerminationErrorNotified = ETrue;
|
|
1723 |
}
|
|
1724 |
}
|
|
1725 |
}
|
|
1726 |
|
|
1727 |
// ---------------------------------------------------------------------------
|
|
1728 |
// CSPCall::ExitCodeError
|
|
1729 |
// Reads error code from ETel call info's iExitCode.
|
|
1730 |
// ---------------------------------------------------------------------------
|
|
1731 |
//
|
|
1732 |
TInt CSPCall::ExitCodeError() const
|
|
1733 |
{
|
|
1734 |
CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError < this: %x",
|
|
1735 |
this );
|
|
1736 |
TInt callError;
|
|
1737 |
RMobileCall::TMobileCallInfoV3 callInfo;
|
|
1738 |
RMobileCall::TMobileCallInfoV3Pckg pck( callInfo );
|
|
1739 |
TInt getErr = iCall.GetMobileCallInfo( pck );
|
|
1740 |
// Is there value in higher 16 bits
|
|
1741 |
if ( KErrNone == getErr && (callInfo.iExitCode & 0xFFFF0000) )
|
|
1742 |
{
|
|
1743 |
CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError callInfo.iExitCode %d",
|
|
1744 |
callInfo.iExitCode );
|
|
1745 |
callError = ( callInfo.iExitCode >> KTimesToSplitValue );
|
|
1746 |
|
|
1747 |
if ( callError > KErrEtelGsmBase )
|
|
1748 |
// Not in valid exteded range
|
|
1749 |
{
|
|
1750 |
// Ignore invalid extented code
|
|
1751 |
if ( ( callInfo.iExitCode & 0x0000FFFF ) == KErrNone )
|
|
1752 |
// core error is zero
|
|
1753 |
{
|
|
1754 |
callError = KErrNone;
|
|
1755 |
}
|
|
1756 |
else
|
|
1757 |
{
|
|
1758 |
callError = ( ( callInfo.iExitCode & 0x0000FFFF )
|
|
1759 |
| 0xFFFF0000 );
|
|
1760 |
}
|
|
1761 |
}
|
|
1762 |
}
|
|
1763 |
// Higher and lower 16 bits are zero
|
|
1764 |
else if ( !( callInfo.iExitCode & 0xFFFFFFFF ) )
|
|
1765 |
{
|
|
1766 |
callError = KErrNone;
|
|
1767 |
}
|
|
1768 |
else
|
|
1769 |
{
|
|
1770 |
// No extended error, expand value to full range
|
|
1771 |
callError = ( callInfo.iExitCode | 0xFFFF0000 );
|
|
1772 |
}
|
|
1773 |
|
|
1774 |
CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError > err: %d", callError);
|
|
1775 |
|
|
1776 |
return callError;
|
|
1777 |
}
|
|
1778 |
|
|
1779 |
// ---------------------------------------------------------------------------
|
|
1780 |
// CSPCall::UUSMessageReceived
|
|
1781 |
// ---------------------------------------------------------------------------
|
|
1782 |
//
|
|
1783 |
void CSPCall::UUSMessageReceived( TDesC& aMessage )
|
|
1784 |
{
|
|
1785 |
CSPLOGSTRING(CSPREQIN, "CSPCall::UUSMessageReceived");
|
|
1786 |
TCSPSkypeIdParser parser;
|
|
1787 |
|
|
1788 |
TPtr ptr = iSkypeId->Des();
|
|
1789 |
ptr.Zero();
|
|
1790 |
const TInt error( parser.Parse( aMessage, ptr ) );
|
|
1791 |
|
|
1792 |
if ( !error )
|
|
1793 |
{
|
|
1794 |
iRemotePartyName = ptr;
|
|
1795 |
NotifyCallEventOccurred( MCCPCallObserver::ECCPNotifyRemotePartyInfoChange );
|
|
1796 |
}
|
|
1797 |
CSPLOGSTRING2(CSPINT, "CSPCall::UUSMessageReceived err: %d", error );
|
|
1798 |
}
|
|
1799 |
|
|
1800 |
// ---------------------------------------------------------------------------
|
|
1801 |
// CSPCall::NotifyRemotePartyInfoChanged
|
|
1802 |
// ---------------------------------------------------------------------------
|
|
1803 |
//
|
|
1804 |
void CSPCall::NotifyRemotePartyInfoChanged(const TDesC& aRemoteParty)
|
|
1805 |
{
|
|
1806 |
CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyRemotePartyInfoChanged");
|
|
1807 |
iRemotePartyName = aRemoteParty;
|
|
1808 |
NotifyCallEventOccurred( MCCPCallObserver::ECCPNotifyRemotePartyInfoChange );
|
|
1809 |
}
|
|
1810 |
|
|
1811 |
// ---------------------------------------------------------------------------
|
|
1812 |
// CSPCall::DontReportTerminationError
|
|
1813 |
// ---------------------------------------------------------------------------
|
|
1814 |
//
|
|
1815 |
void CSPCall::DontReportTerminationError()
|
|
1816 |
{
|
|
1817 |
CSPLOGSTRING(CSPREQIN, "CSPCall::DontReportTerminationError");
|
|
1818 |
iDontReportTerm = ETrue;
|
|
1819 |
}
|
|
1820 |
|
|
1821 |
// ---------------------------------------------------------------------------
|
|
1822 |
// CSPCall::UpdateCallNameNumberInfo
|
|
1823 |
// Update call info including remote party name and number data
|
|
1824 |
// ---------------------------------------------------------------------------
|
|
1825 |
//
|
|
1826 |
void CSPCall::UpdateCallNameNumberInfo(
|
|
1827 |
RMobileCall::TMobileCallInfoV3& aCallInfo,
|
|
1828 |
TBool aCallAddedByMonitor )
|
|
1829 |
{
|
|
1830 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo <");
|
|
1831 |
|
|
1832 |
iCallName.Zero();
|
|
1833 |
iRemotePartyNumber.Zero();
|
|
1834 |
iRemotePartyName.Zero();
|
|
1835 |
|
|
1836 |
if ( aCallAddedByMonitor )
|
|
1837 |
{
|
|
1838 |
CSPLOGSTRING(CSPINT,
|
|
1839 |
"CSPCall::UpdateCallNameNumberInfo call added by monitor");
|
|
1840 |
|
|
1841 |
// If call was created by ETel line status or incoming call monitor
|
|
1842 |
// the call name is already known, only remote party info is fetched from
|
|
1843 |
// call info
|
|
1844 |
iCallName.Append( iName );
|
|
1845 |
iRemotePartyName.Append( aCallInfo.iRemoteParty.iCallingName );
|
|
1846 |
iRemotePartyNumber.Append( aCallInfo.iRemoteParty.iRemoteNumber.iTelNumber );
|
|
1847 |
}
|
|
1848 |
else
|
|
1849 |
{
|
|
1850 |
CSPLOGSTRING(CSPINT,
|
|
1851 |
"CSPCall::UpdateCallNameNumberInfo call added by plugin owner");
|
|
1852 |
|
|
1853 |
// The call was not created by monitor and the remote number is already known,
|
|
1854 |
// fetch only call name from call info
|
|
1855 |
iCallName.Append( aCallInfo.iCallName );
|
|
1856 |
iRemotePartyNumber.Append( iName );
|
|
1857 |
}
|
|
1858 |
|
|
1859 |
CSPLOGSTRING2(CSPINT,
|
|
1860 |
"CSPCall::UpdateCallNameNumberInfo iCallName: %S", &iCallName );
|
|
1861 |
CSPLOGSTRING2(CSPINT,
|
|
1862 |
"CSPCall::UpdateCallNameNumberInfo iRemotePartyNumber: %S", &iRemotePartyNumber );
|
|
1863 |
CSPLOGSTRING2(CSPINT,
|
|
1864 |
"CSPCall::UpdateCallNameNumberInfo iRemotePartyName: %S", &iRemotePartyName );
|
|
1865 |
|
|
1866 |
CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo >");
|
|
1867 |
}
|
|
1868 |
|
|
1869 |
// ---------------------------------------------------------------------------
|
|
1870 |
// CSPCall::OpenNewCall
|
|
1871 |
// Open new call
|
|
1872 |
// ---------------------------------------------------------------------------
|
|
1873 |
//
|
|
1874 |
void CSPCall::OpenNewCall()
|
|
1875 |
{
|
|
1876 |
CSPLOGSTRING(CSPINT, "CSPCall::OpenNewCall <");
|
|
1877 |
|
|
1878 |
// Open new call
|
|
1879 |
__ASSERT_ALWAYS( iCall.OpenNewCall( iLine ) == KErrNone,
|
|
1880 |
Panic( ECSPPanicNoEtel ) );
|
|
1881 |
|
|
1882 |
CSPLOGSTRING(CSPINT, "CSPCall::OpenNewCall >");
|
|
1883 |
}
|
|
1884 |
|
|
1885 |
// ---------------------------------------------------------------------------
|
|
1886 |
// CSPCall::OpenExistingCallL
|
|
1887 |
// Open existing call
|
|
1888 |
// ---------------------------------------------------------------------------
|
|
1889 |
//
|
|
1890 |
void CSPCall::OpenExistingCallL( const TDesC& aName )
|
|
1891 |
{
|
|
1892 |
CSPLOGSTRING2(CSPINT,
|
|
1893 |
"CSPCall::OpenExistingCallL < aName: %S", &aName);
|
|
1894 |
|
|
1895 |
// Open existing call with given name from current line
|
|
1896 |
TInt err = iCall.OpenExistingCall( iLine, aName );
|
|
1897 |
|
|
1898 |
if ( KErrNone != err )
|
|
1899 |
{
|
|
1900 |
CSPLOGSTRING2(CSPERROR,
|
|
1901 |
"CSPCall::OpenCallHandleL OpenExistingCall error: %d, leaving", err);
|
|
1902 |
User::Leave( err );
|
|
1903 |
}
|
|
1904 |
|
|
1905 |
CSPLOGSTRING(CSPINT, "CSPCall::OpenExistingCallL >");
|
|
1906 |
}
|
|
1907 |
|
|
1908 |
// End of File
|
|
1909 |
|