37
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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 CPhoneStartup class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// INCLUDES
|
|
20 |
#include "cphonestartup.h"
|
|
21 |
#include "phonerssbase.h"
|
|
22 |
#include "phonelogger.h"
|
|
23 |
#include "cphonegeneralgsmmessageshandler.h"
|
|
24 |
|
|
25 |
// ================= MEMBER FUNCTIONS =======================
|
|
26 |
|
|
27 |
// C++ default constructor can NOT contain any code, that
|
|
28 |
// might leave.
|
|
29 |
//
|
|
30 |
CPhoneStartup::CPhoneStartup(
|
|
31 |
MPhoneStateMachine* aStateMachine,
|
|
32 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
33 |
TBool aPEReady ) :
|
|
34 |
CPhoneStateStartup( aStateMachine, aViewCommandHandle, NULL )
|
|
35 |
{
|
|
36 |
iPEReady = aPEReady;
|
|
37 |
}
|
|
38 |
|
|
39 |
// -----------------------------------------------------------
|
|
40 |
// CPhoneStartup::~CPhoneStartup()
|
|
41 |
// Destructor
|
|
42 |
// (other items were commented in a header).
|
|
43 |
// -----------------------------------------------------------
|
|
44 |
|
|
45 |
CPhoneStartup::~CPhoneStartup()
|
|
46 |
{
|
|
47 |
}
|
|
48 |
|
|
49 |
// -----------------------------------------------------------
|
|
50 |
// CPhoneStartup::ConstructL()
|
|
51 |
// Constructor
|
|
52 |
// (other items were commented in a header).
|
|
53 |
// -----------------------------------------------------------
|
|
54 |
//
|
|
55 |
void CPhoneStartup::ConstructL()
|
|
56 |
{
|
|
57 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneStartup::ConstructL()");
|
|
58 |
CPhoneStateStartup::ConstructL();
|
|
59 |
}
|
|
60 |
|
|
61 |
// -----------------------------------------------------------
|
|
62 |
// CPhoneStartup::NewL()
|
|
63 |
// Constructor
|
|
64 |
// (other items were commented in a header).
|
|
65 |
// -----------------------------------------------------------
|
|
66 |
//
|
|
67 |
CPhoneStartup* CPhoneStartup::NewL(
|
|
68 |
MPhoneStateMachine* aStateMachine,
|
|
69 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
70 |
TBool aPEReady )
|
|
71 |
{
|
|
72 |
CPhoneStartup* self = new (ELeave)
|
|
73 |
CPhoneStartup( aStateMachine, aViewCommandHandle, aPEReady );
|
|
74 |
|
|
75 |
CleanupStack::PushL( self );
|
|
76 |
self->ConstructL();
|
|
77 |
CleanupStack::Pop( self );
|
|
78 |
|
|
79 |
return self;
|
|
80 |
}
|
|
81 |
|
|
82 |
// -----------------------------------------------------------
|
|
83 |
// CPhoneStartup::HandlePhoneEngineMessageL
|
|
84 |
// -----------------------------------------------------------
|
|
85 |
//
|
|
86 |
void CPhoneStartup::HandlePhoneEngineMessageL(
|
|
87 |
const TInt aMessage,
|
|
88 |
TInt aCallId )
|
|
89 |
{
|
|
90 |
__LOGMETHODSTARTEND(EPhoneUIStates,
|
|
91 |
"CPhoneStartup::HandlePhoneEngineMessageL() ");
|
|
92 |
switch ( aMessage )
|
|
93 |
{
|
|
94 |
case MEngineMonitor::EPEMessageRemoteHeld:
|
|
95 |
CPhoneState::SendGlobalInfoNoteL(
|
|
96 |
EPhoneInformationRemotePutOnHoldNote );
|
|
97 |
break;
|
|
98 |
|
|
99 |
case MEngineMonitor::EPEMessageRemoteResumed:
|
|
100 |
CPhoneState::SendGlobalInfoNoteL(
|
|
101 |
EPhoneInformationConnectedNote );
|
|
102 |
break;
|
|
103 |
|
|
104 |
case MEngineMonitor::EPEMessageIssuingSSRequest: // fall through
|
|
105 |
case MEngineMonitor::EPEMessageCallBarred: // fall through
|
|
106 |
case MEngineMonitor::EPEMessageShowVersion: // fall through
|
|
107 |
case MEngineMonitor::EPEMessageIssuedSSRequest: // fall through
|
|
108 |
case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
|
|
109 |
case MEngineMonitor::EPEMessageIncCallIsForw: // fall through
|
|
110 |
case MEngineMonitor::EPEMessageIncCallForwToC: // fall through
|
|
111 |
case MEngineMonitor::EPEMessageOutCallForwToC: // fall through
|
|
112 |
case MEngineMonitor::EPEMessageForwardUnconditionalModeActive: // fall through
|
|
113 |
case MEngineMonitor::EPEMessageForwardConditionallyModeActive:
|
|
114 |
{
|
|
115 |
CPhoneGeneralGsmMessagesHandler* gsmMsgHandler =
|
|
116 |
CPhoneGeneralGsmMessagesHandler::NewL( *iStateMachine,
|
|
117 |
*iViewCommandHandle,
|
|
118 |
*this );
|
|
119 |
CleanupStack::PushL( gsmMsgHandler );
|
|
120 |
gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId );
|
|
121 |
CleanupStack::PopAndDestroy( gsmMsgHandler );
|
|
122 |
}
|
|
123 |
break;
|
|
124 |
|
|
125 |
default:
|
|
126 |
CPhoneStateStartup::HandlePhoneEngineMessageL(
|
|
127 |
aMessage, aCallId );
|
|
128 |
break;
|
|
129 |
}
|
|
130 |
}
|
|
131 |
|
|
132 |
// End of File
|