author | hgs |
Fri, 17 Sep 2010 17:09:12 +0300 | |
changeset 74 | d1c62c765e48 |
parent 65 | 2a5d4ab426d3 |
permissions | -rw-r--r-- |
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 CPhoneIdle class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDES |
|
20 |
#include "cphoneidle.h" |
|
21 |
#include "phonerssbase.h" |
|
22 |
#include "phonelogger.h" |
|
23 |
#include "cphonegeneralgsmmessageshandler.h" |
|
24 |
#include "tphonecmdparamboolean.h" |
|
25 |
||
26 |
// ================= MEMBER FUNCTIONS ======================= |
|
27 |
||
28 |
// C++ default constructor can NOT contain any code, that |
|
29 |
// might leave. |
|
30 |
// |
|
31 |
EXPORT_C CPhoneIdle::CPhoneIdle( |
|
32 |
MPhoneStateMachine* aStateMachine, |
|
33 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
34 |
MPhoneCustomization* aPhoneCustomization ) : |
|
35 |
CPhoneStateIdle( aStateMachine, aViewCommandHandle, aPhoneCustomization ) |
|
36 |
{ |
|
37 |
} |
|
38 |
||
39 |
// ----------------------------------------------------------- |
|
40 |
// CPhoneIdle::~CPhoneIdle() |
|
41 |
// Destructor |
|
42 |
// (other items were commented in a header). |
|
43 |
// ----------------------------------------------------------- |
|
44 |
||
45 |
EXPORT_C CPhoneIdle::~CPhoneIdle() |
|
46 |
{ |
|
47 |
} |
|
48 |
||
49 |
// ----------------------------------------------------------- |
|
50 |
// CPhoneIdle::ConstructL() |
|
51 |
// Constructor |
|
52 |
// (other items were commented in a header). |
|
53 |
// ----------------------------------------------------------- |
|
54 |
// |
|
55 |
EXPORT_C void CPhoneIdle::ConstructL() |
|
56 |
{ |
|
57 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneIdle::ConstructL()"); |
|
58 |
CPhoneStateIdle::ConstructL(); |
|
59 |
} |
|
60 |
||
61 |
// ----------------------------------------------------------- |
|
62 |
// CPhoneIdle::NewL() |
|
63 |
// Constructor |
|
64 |
// (other items were commented in a header). |
|
65 |
// ----------------------------------------------------------- |
|
66 |
// |
|
67 |
CPhoneIdle* CPhoneIdle::NewL( |
|
68 |
MPhoneStateMachine* aStateMachine, |
|
69 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
70 |
MPhoneCustomization* aPhoneCustomization ) |
|
71 |
{ |
|
72 |
CPhoneIdle* self = new (ELeave) |
|
73 |
CPhoneIdle( aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
74 |
||
75 |
CleanupStack::PushL( self ); |
|
76 |
self->ConstructL(); |
|
77 |
CleanupStack::Pop( self ); |
|
78 |
||
79 |
return self; |
|
80 |
} |
|
81 |
||
82 |
// ----------------------------------------------------------- |
|
83 |
// CPhoneIdle::HandlePhoneEngineMessageL |
|
84 |
// ----------------------------------------------------------- |
|
85 |
// |
|
86 |
EXPORT_C void CPhoneIdle::HandlePhoneEngineMessageL( |
|
87 |
const TInt aMessage, |
|
88 |
TInt aCallId ) |
|
89 |
{ |
|
90 |
__LOGMETHODSTARTEND(EPhoneUIStates, |
|
91 |
"CPhoneIdle::HandlePhoneEngineMessageL() "); |
|
92 |
switch ( aMessage ) |
|
93 |
{ |
|
94 |
case MEngineMonitor::EPEMessageRemoteHeld: |
|
95 |
CPhoneState::SendGlobalInfoNoteL( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
96 |
EPhoneInformationRemotePutOnHoldNote, ETrue ); |
37 | 97 |
break; |
98 |
||
99 |
case MEngineMonitor::EPEMessageRemoteResumed: |
|
100 |
CPhoneState::SendGlobalInfoNoteL( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
101 |
EPhoneInformationConnectedNote, ETrue ); |
37 | 102 |
break; |
103 |
||
104 |
case MEngineMonitor::EPEMessageAudioOutputChanged: |
|
105 |
HandleAudioOutputChangedL(); |
|
106 |
break; |
|
107 |
||
65 | 108 |
case MEngineMonitor::EPEMessageIssuedSSRequest: // fall through |
37 | 109 |
case MEngineMonitor::EPEMessageIssuingSSRequest: // fall through |
110 |
case MEngineMonitor::EPEMessageCallBarred: // fall through |
|
111 |
case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful: |
|
112 |
case MEngineMonitor::EPEMessageIncCallIsForw: // fall through |
|
113 |
case MEngineMonitor::EPEMessageIncCallForwToC: // fall through |
|
114 |
case MEngineMonitor::EPEMessageOutCallForwToC: // fall through |
|
115 |
case MEngineMonitor::EPEMessageForwardUnconditionalModeActive: // fall through |
|
116 |
case MEngineMonitor::EPEMessageForwardConditionallyModeActive: |
|
117 |
{ |
|
118 |
CPhoneGeneralGsmMessagesHandler* gsmMsgHandler = |
|
119 |
CPhoneGeneralGsmMessagesHandler::NewL( *iStateMachine, |
|
120 |
*iViewCommandHandle, |
|
121 |
*this ); |
|
122 |
CleanupStack::PushL( gsmMsgHandler ); |
|
123 |
gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
124 |
CleanupStack::PopAndDestroy( gsmMsgHandler ); |
|
125 |
} |
|
126 |
break; |
|
127 |
||
128 |
default: |
|
129 |
CPhoneStateIdle::HandlePhoneEngineMessageL( |
|
130 |
aMessage, aCallId ); |
|
131 |
break; |
|
132 |
} |
|
133 |
} |
|
134 |
||
135 |
// ----------------------------------------------------------- |
|
136 |
// CPhoneIdle::HandleErrorL |
|
137 |
// ----------------------------------------------------------- |
|
138 |
// |
|
139 |
EXPORT_C void CPhoneIdle::HandleErrorL( const TPEErrorInfo& aErrorInfo ) |
|
140 |
{ |
|
141 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneIdle::HandleErrorL() "); |
|
142 |
CPhoneState::HandleErrorL( aErrorInfo ); |
|
143 |
} |
|
144 |
||
145 |
// End of File |