37
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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: Implementation of CPhoneCallSetup class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// INCLUDES
|
|
20 |
#include <MediatorDomainUIDs.h>
|
|
21 |
#include "cphonecallsetup.h"
|
|
22 |
#include "mphonestatemachine.h"
|
|
23 |
#include "tphonecmdparamboolean.h"
|
|
24 |
#include "tphonecmdparamcallheaderdata.h"
|
|
25 |
#include "phonestatedefinitionsgsm.h"
|
|
26 |
#include "cphonetimer.h"
|
|
27 |
#include "phonerssbase.h"
|
|
28 |
#include "cphonemainresourceresolver.h"
|
|
29 |
#include "phonelogger.h"
|
|
30 |
#include "cphonegeneralgsmmessageshandler.h"
|
|
31 |
#include "cphonemediatorfactory.h"
|
|
32 |
#include "cphonemediatorsender.h"
|
|
33 |
|
|
34 |
// ================= MEMBER FUNCTIONS =======================
|
|
35 |
|
|
36 |
// C++ default constructor can NOT contain any code, that
|
|
37 |
// might leave.
|
|
38 |
//
|
|
39 |
EXPORT_C CPhoneCallSetup::CPhoneCallSetup(
|
|
40 |
MPhoneStateMachine* aStateMachine,
|
|
41 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
42 |
MPhoneCustomization* aPhoneCustomization ) :
|
|
43 |
CPhoneStateCallSetup( aStateMachine, aViewCommandHandle, aPhoneCustomization )
|
|
44 |
{
|
|
45 |
}
|
|
46 |
|
|
47 |
// -----------------------------------------------------------
|
|
48 |
// CPhoneCallSetup::~CPhoneCallSetup()
|
|
49 |
// Destructor
|
|
50 |
// (other items were commented in a header).
|
|
51 |
// -----------------------------------------------------------
|
|
52 |
//
|
|
53 |
EXPORT_C CPhoneCallSetup::~CPhoneCallSetup()
|
|
54 |
{
|
|
55 |
}
|
|
56 |
|
|
57 |
// -----------------------------------------------------------
|
|
58 |
// CPhoneCallSetup::ConstructL()
|
|
59 |
// Constructor
|
|
60 |
// (other items were commented in a header).
|
|
61 |
// -----------------------------------------------------------
|
|
62 |
//
|
|
63 |
EXPORT_C void CPhoneCallSetup::ConstructL()
|
|
64 |
{
|
|
65 |
CPhoneStateCallSetup::ConstructL();
|
|
66 |
}
|
|
67 |
|
|
68 |
// -----------------------------------------------------------
|
|
69 |
// CPhoneCallSetup::NewL()
|
|
70 |
// Constructor
|
|
71 |
// (other items were commented in a header).
|
|
72 |
// -----------------------------------------------------------
|
|
73 |
//
|
|
74 |
CPhoneCallSetup* CPhoneCallSetup::NewL(
|
|
75 |
MPhoneStateMachine* aStateMachine,
|
|
76 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
77 |
MPhoneCustomization* aPhoneCustomization )
|
|
78 |
{
|
|
79 |
CPhoneCallSetup* self = new (ELeave) CPhoneCallSetup(
|
|
80 |
aStateMachine, aViewCommandHandle, aPhoneCustomization );
|
|
81 |
|
|
82 |
CleanupStack::PushL( self );
|
|
83 |
self->ConstructL();
|
|
84 |
CleanupStack::Pop( self );
|
|
85 |
|
|
86 |
return self;
|
|
87 |
}
|
|
88 |
|
|
89 |
// -----------------------------------------------------------
|
|
90 |
// CPhoneCallSetup::HandlePhoneEngineMessageL
|
|
91 |
// -----------------------------------------------------------
|
|
92 |
//
|
|
93 |
EXPORT_C void CPhoneCallSetup::HandlePhoneEngineMessageL(
|
|
94 |
const TInt aMessage,
|
|
95 |
TInt aCallId )
|
|
96 |
{
|
|
97 |
__LOGMETHODSTARTEND( EPhoneUIStates,
|
|
98 |
"CPhoneCallSetup::HandlePhoneEngineMessageL()");
|
|
99 |
switch ( aMessage )
|
|
100 |
{
|
|
101 |
case MEngineMonitor::EPEMessageConnecting:
|
|
102 |
HandleConnectingL( aCallId );
|
|
103 |
break;
|
|
104 |
|
65
|
105 |
// fall through.
|
37
|
106 |
case MEngineMonitor::EPEMessageIssuingSSRequest:
|
|
107 |
case MEngineMonitor::EPEMessageCallBarred:
|
|
108 |
case MEngineMonitor::EPEMessageIssuedSSRequest:
|
|
109 |
case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
|
|
110 |
case MEngineMonitor::EPEMessageIncCallIsForw:
|
|
111 |
case MEngineMonitor::EPEMessageIncCallForwToC:
|
|
112 |
case MEngineMonitor::EPEMessageOutCallForwToC:
|
|
113 |
case MEngineMonitor::EPEMessageForwardUnconditionalModeActive:
|
|
114 |
case MEngineMonitor::EPEMessageForwardConditionallyModeActive:
|
|
115 |
{
|
|
116 |
__PHONELOG1(
|
|
117 |
EBasic,
|
|
118 |
EPhoneUIStates,
|
|
119 |
"CPhoneCallSetup::HandlePhoneEngineMessageL Start create gsm message handler %d",
|
|
120 |
aMessage );
|
|
121 |
CPhoneGeneralGsmMessagesHandler* gsmMsgHandler =
|
65
|
122 |
CPhoneGeneralGsmMessagesHandler::NewL(
|
|
123 |
*iStateMachine,
|
|
124 |
*iViewCommandHandle,
|
|
125 |
*this );
|
37
|
126 |
CleanupStack::PushL( gsmMsgHandler );
|
|
127 |
gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId );
|
65
|
128 |
CleanupStack::PopAndDestroy( gsmMsgHandler );
|
37
|
129 |
}
|
|
130 |
break;
|
|
131 |
|
|
132 |
default:
|
|
133 |
CPhoneStateCallSetup::HandlePhoneEngineMessageL( aMessage,
|
|
134 |
aCallId );
|
|
135 |
break;
|
|
136 |
}
|
|
137 |
}
|
|
138 |
|
|
139 |
// -----------------------------------------------------------------------------
|
|
140 |
// CPhoneCallSetup::HandleConnectingL
|
|
141 |
// -----------------------------------------------------------------------------
|
|
142 |
//
|
|
143 |
EXPORT_C void CPhoneCallSetup::HandleConnectingL( TInt aCallId )
|
|
144 |
{
|
|
145 |
// Only handle connecting case for GSM protocol. In CDMA, this message is
|
|
146 |
// set when the CDMA network receives the call, not (like in GSM) when
|
|
147 |
// when the remote party receives the call. So, in CDMA, the user
|
|
148 |
// should still be able to cancel the MO call before the call is connected.
|
65
|
149 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneCallSetup::HandleConnectingL()");
|
37
|
150 |
BeginUiUpdateLC();
|
|
151 |
UpdateRemoteInfoDataL ( aCallId );
|
|
152 |
|
|
153 |
TPhoneCmdParamBoolean globalNotifierParam;
|
|
154 |
globalNotifierParam.SetBoolean( EFalse );
|
|
155 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
|
|
156 |
&globalNotifierParam );
|
|
157 |
|
|
158 |
TPhoneCmdParamBoolean booleanParam;
|
|
159 |
booleanParam.SetBoolean( ETrue );
|
|
160 |
iViewCommandHandle->ExecuteCommand( EPhoneViewHsToForegroundAfterCall,
|
|
161 |
&booleanParam );
|
|
162 |
|
74
|
163 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId);
|
37
|
164 |
|
|
165 |
SetToolbarButtonLoudspeakerEnabled();
|
74
|
166 |
UpdateUiCommands();
|
37
|
167 |
EndUiUpdate();
|
|
168 |
iStateMachine->ChangeState( EPhoneStateAlerting );
|
|
169 |
}
|
|
170 |
|
|
171 |
// End of File
|