author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 14:15:47 +0300 | |
changeset 46 | bc5a64e5bc3c |
parent 45 | 6b911d05207e |
child 51 | f39ed5e045e0 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2006-2008 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: Battery state monitoring class methods implementation |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// ==================== INCLUDE FILES ==================== |
|
20 |
#include <mpecallhandling.h> |
|
21 |
#include <mpedatastore.h> |
|
22 |
#include <talogger.h> |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
23 |
#include "cpeparsermanufacturerhandler.h" |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
24 |
#include "mpephonemodelinternal.h" |
37 | 25 |
|
26 |
// ================= MEMBER FUNCTIONS ======================= |
|
27 |
||
28 |
// C++ default constructor can NOT contain any code, that |
|
29 |
// might leave. |
|
30 |
// |
|
31 |
CPEParserManufacturerHandler::CPEParserManufacturerHandler( |
|
32 |
MPEPhoneModelInternal& aModel, |
|
33 |
MPECallHandling& aCallHandling, |
|
34 |
RFs& aFsSession ) |
|
35 |
: iModel( aModel ), |
|
36 |
iCallHandling( aCallHandling ), |
|
37 |
iFsSession( aFsSession ) |
|
38 |
{ |
|
39 |
TEFLOGSTRING( KTAOBJECT, "PE CPEParserManufacturerHandler::CPEParserManufacturerHandler()" ); |
|
40 |
} |
|
41 |
||
42 |
// Destructor |
|
43 |
CPEParserManufacturerHandler::~CPEParserManufacturerHandler() |
|
44 |
{ |
|
45 |
TEFLOGSTRING( KTAOBJECT, "PE CPEParserManufacturerHandler::~CPEParserManufacturerHandler()" ); |
|
46 |
} |
|
47 |
||
48 |
// ----------------------------------------------------------------------------- |
|
49 |
// CPhoneManufacturerHandler::ProcessCommandL |
|
50 |
// ----------------------------------------------------------------------------- |
|
51 |
// |
|
52 |
void CPEParserManufacturerHandler::ProcessCommandL( |
|
53 |
TUint aCommand ) // aCommand command enumeration. |
|
54 |
{ |
|
55 |
TEFLOGSTRING( KTAINT, "PE CPEParserManufacturerHandler::ProcessCommandL" ); |
|
56 |
||
57 |
switch ( aCommand ) |
|
58 |
{ |
|
59 |
case EBadPinChange: |
|
60 |
{ |
|
61 |
iModel.SendMessage( MEngineMonitor::EPEMessageBadPin1Change ); |
|
62 |
break; |
|
63 |
} |
|
64 |
case EBadPin2Change: |
|
65 |
{ |
|
66 |
iModel.SendMessage( MEngineMonitor::EPEMessageBadPin2Change ); |
|
67 |
break; |
|
68 |
} |
|
69 |
case EBadPinUnblock: |
|
70 |
{ |
|
71 |
iModel.SendMessage( MEngineMonitor::EPEMessageBadPin1Unblock ); |
|
72 |
break; |
|
73 |
} |
|
74 |
case EBadPin2Unblock: |
|
75 |
{ |
|
76 |
iModel.SendMessage( MEngineMonitor::EPEMessageBadPin2Unblock ); |
|
77 |
break; |
|
78 |
} |
|
79 |
case EActivateRfsNormal: |
|
80 |
{ |
|
81 |
iModel.SendMessage( MEngineMonitor::EPEMessageActivateRfsNormal ); |
|
82 |
break; |
|
83 |
} |
|
84 |
case EActivateRfsDeep: |
|
85 |
{ |
|
86 |
iModel.SendMessage( MEngineMonitor::EPEMessageActivateRfsDeep ); |
|
87 |
break; |
|
88 |
} |
|
89 |
case EShowBtAddress: // *#2820# |
|
90 |
{ |
|
91 |
iModel.SendMessage( MEngineMonitor::EPEMessageShowBTDeviceAddress ); |
|
92 |
break; |
|
93 |
} |
|
94 |
case EBTLoopback: // *#9990# |
|
95 |
{ |
|
96 |
iModel.SendMessage( MEngineMonitor::EPEMessageShowBTLoopback ); |
|
97 |
break; |
|
98 |
} |
|
99 |
case EShowWlanMac: // *#62209526# |
|
100 |
{ |
|
101 |
iModel.SendMessage( MEngineMonitor::EPEMessageShowWlanMacAddress ); |
|
102 |
break; |
|
103 |
} |
|
104 |
default: |
|
105 |
{ |
|
106 |
TEFLOGSTRING( KTAERROR, "PE CPEGSMPARSERMANUFACTURERHANDLER::PROCESSCOMMANDL: UNEXPECTED COMMAND" ); |
|
107 |
break; |
|
108 |
} |
|
109 |
} |
|
110 |
} |
|
111 |
||
112 |
// ----------------------------------------------------------------------------- |
|
113 |
// CPEParserManufacturerHandler::ProcessDebugL |
|
114 |
// ----------------------------------------------------------------------------- |
|
115 |
// |
|
116 |
void CPEParserManufacturerHandler::ProcessDebugL( |
|
117 |
const TDesC& aCode |
|
118 |
) |
|
119 |
{ |
|
120 |
TEFLOGSTRING( KTAINT, "PE CPEParserManufacturerHandler::ProcessDebugL" ); |
|
121 |
||
122 |
if ( aCode.Length() ) |
|
123 |
{ |
|
124 |
TInt cmd = KErrNotFound; |
|
125 |
TLex( aCode.Left( 1 ) ).Val( cmd ); // first character. |
|
126 |
||
127 |
TInt param = KErrNotFound; |
|
128 |
TLex( aCode.Mid( 1 ) ).Val( param ); // rest |
|
129 |
||
130 |
switch ( cmd ) |
|
131 |
{ |
|
132 |
case EPhoneCmdDebugPrint: |
|
133 |
{ |
|
134 |
//Copied from S60 Telephony. To be migrated to CoTe |
|
135 |
TEFLOGSTRING( KTAERROR, "PE CPEGSMPARSERMANUFACTURERHANDLER::PROCESSDEBUGL EPHONECMDDEBUGPRINT" ); |
|
136 |
} |
|
137 |
break; |
|
138 |
||
139 |
case EPhoneCmdHeapFailure: |
|
140 |
{ |
|
141 |
#ifdef PHONE_HEAP_FAILURE_SUPPORT |
|
142 |
if ( param <= 0 ) |
|
143 |
{ |
|
144 |
// Reset alloc failure |
|
145 |
User::__DbgSetAllocFail( |
|
146 |
RHeap::EUser, |
|
147 |
RHeap::ENone, |
|
148 |
1 ); |
|
149 |
} |
|
150 |
else |
|
151 |
{ |
|
152 |
// Set heap failure |
|
153 |
User::__DbgSetAllocFail( |
|
154 |
RHeap::EUser, |
|
155 |
RHeap::ERandom, |
|
156 |
param ); |
|
157 |
} |
|
158 |
#endif // PHONE_HEAP_FAILURE_SUPPORT |
|
159 |
} |
|
160 |
break; |
|
161 |
||
162 |
default: |
|
163 |
break; |
|
164 |
} |
|
165 |
} |
|
166 |
} |
|
167 |
||
168 |
// End of File |