author | hgs |
Fri, 23 Jul 2010 12:55:58 +0300 | |
changeset 52 | a49bfe5190e4 |
parent 46 | bc5a64e5bc3c |
child 51 | f39ed5e045e0 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2002-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: This file contains the implementation of CPESupplementaryServicesMonitor class |
|
15 |
* member functions. |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
||
20 |
// ==================== INCLUDE FILES ==================== |
|
21 |
#include "cpesupplementaryservicesmonitor.h" |
|
22 |
#include "mpemessagesender.h" |
|
23 |
#include <talogger.h> |
|
24 |
#include <mpedatastore.h> |
|
25 |
||
26 |
// EXTERNAL DATA STRUCTURES |
|
27 |
// None. |
|
28 |
||
29 |
// EXTERNAL FUNCTION PROTOTYPES |
|
30 |
// None. |
|
31 |
||
32 |
// CONSTANTS |
|
33 |
// None. |
|
34 |
||
35 |
// MACROS |
|
36 |
// None. |
|
37 |
||
38 |
// LOCAL CONSTANTS AND MACROS |
|
39 |
// None. |
|
40 |
||
41 |
// MODULE DATA STRUCTURES |
|
42 |
// None. |
|
43 |
||
44 |
// LOCAL FUNCTION PROTOTYPES |
|
45 |
// None. |
|
46 |
||
47 |
// ==================== LOCAL FUNCTIONS ==================== |
|
48 |
// None. |
|
49 |
||
50 |
// ================= MEMBER FUNCTIONS ======================= |
|
51 |
||
52 |
// ----------------------------------------------------------------------------- |
|
53 |
// CPESupplementaryServicesMonitor::CPESupplementaryServicesMonitor |
|
54 |
// C++ default constructor can NOT contain any code, that |
|
55 |
// might leave. |
|
56 |
// ----------------------------------------------------------------------------- |
|
57 |
// |
|
58 |
CPESupplementaryServicesMonitor::CPESupplementaryServicesMonitor( |
|
59 |
MPEMessageSender& aOwner, |
|
60 |
MPEDataStore& aDataStore |
|
61 |
) : iOwner( aOwner ), |
|
62 |
iDataStore( aDataStore ) |
|
63 |
{ |
|
64 |
TEFLOGSTRING( KTAOBJECT, |
|
65 |
"CALL: CPESupplementaryServcesMonitor::CPESupplementaryServicesMonitor: complete" ); |
|
66 |
} |
|
67 |
||
68 |
||
69 |
// Destructor |
|
70 |
CPESupplementaryServicesMonitor::~CPESupplementaryServicesMonitor() |
|
71 |
{ |
|
72 |
TEFLOGSTRING( KTAOBJECT, |
|
73 |
"CALL CPESupplementaryServicesMonitor::~CPESupplementaryServicesMonitor: Complete." ); |
|
74 |
} |
|
75 |
||
76 |
// ----------------------------------------------------------------------------- |
|
77 |
// CPESupplementaryServicesMonitor::BarringEventOccurred |
|
78 |
// ----------------------------------------------------------------------------- |
|
79 |
// |
|
80 |
EXPORT_C void CPESupplementaryServicesMonitor::BarringEventOccurred( |
|
81 |
const MCCESsObserver::TCCESsBarringEvent aBarringEvent ) |
|
82 |
{ |
|
83 |
TEFLOGSTRING2( |
|
84 |
KTAMESIN, |
|
85 |
"CALL: CPESupplementaryServcesMonitor::BarringEventOccurred aBarringEvent %d", |
|
86 |
aBarringEvent ); |
|
87 |
switch( aBarringEvent ) |
|
88 |
{ |
|
89 |
case ECCESsIncomingCallBarred: /** Incoming call is barred. (DoCoMo) */ |
|
90 |
case ECCESsAnonymousCallBarred: /** Anonymous call barring. */ |
|
91 |
case ECCESsOutgoingCallBarred: /** Outgoing call barring */ |
|
92 |
iOwner.SendMessage( MEngineMonitor::EPEMessageCallBarred, KPECallIdNotUsed ); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
93 |
if ( aBarringEvent == ECCESsOutgoingCallBarred ) |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
94 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
95 |
iOwner.SendMessage( MEngineMonitor::EPEMessageOutgoingCallBarred, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
96 |
KPECallIdNotUsed ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
97 |
} |
37 | 98 |
break; |
99 |
||
100 |
default: |
|
101 |
break; |
|
102 |
} |
|
103 |
} |
|
104 |
||
105 |
||
106 |
// ----------------------------------------------------------------------------- |
|
107 |
// CPESupplementaryServicesMonitor::CLIEventOccurred |
|
108 |
// ----------------------------------------------------------------------------- |
|
109 |
// |
|
110 |
EXPORT_C void CPESupplementaryServicesMonitor::CLIEventOccurred( |
|
111 |
const MCCESsObserver::TCCESsCLIEvent aCallLineEvent ) |
|
112 |
{ |
|
113 |
||
114 |
switch( aCallLineEvent ) |
|
115 |
{ |
|
116 |
case ECCESsTempClirSuppressUnsuccessful: /** Temporary CLIR suppression was unsuccessful */ |
|
117 |
iOwner.SendMessage( MEngineMonitor::EPEMessageTempClirSuppressUnsuccessful, KPECallIdNotUsed ); |
|
118 |
break; |
|
119 |
||
120 |
case ECCESsTempClirActivationUnsuccessful: /** Temporary CLIR activation was unsuccessful*/ |
|
121 |
iOwner.SendMessage( MEngineMonitor::EPEMessageTempClirActivationUnsuccessful, KPECallIdNotUsed ); |
|
122 |
break; |
|
123 |
||
124 |
default: |
|
125 |
break; |
|
126 |
} |
|
127 |
||
128 |
} |
|
129 |
||
130 |
// ----------------------------------------------------------------------------- |
|
131 |
// CPESupplementaryServicesMonitor::CallForwardEventOccurred |
|
132 |
// ----------------------------------------------------------------------------- |
|
133 |
// |
|
134 |
EXPORT_C void CPESupplementaryServicesMonitor::CallForwardEventOccurred( |
|
135 |
const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent, |
|
136 |
const TDesC& /*aRemoteAddress*/ ) |
|
137 |
{ |
|
138 |
TEFLOGSTRING2( |
|
139 |
KTAMESIN, |
|
140 |
"CALL: CPESupplementaryServcesMonitor::CallForwardEventOccurred aCallForwardEvent %d", |
|
141 |
aCallForwardEvent ); |
|
142 |
switch( aCallForwardEvent ) |
|
143 |
{ |
|
144 |
case ECCESsIncCallIsForw: /** Incoming call is forwarded */ |
|
145 |
iOwner.SendMessage( MEngineMonitor::EPEMessageIncCallIsForw, KPECallIdNotUsed ); |
|
146 |
break; |
|
147 |
||
148 |
case ECCESsIncCallForwToC: /** Incoming call was forwarded because of user own settings. */ |
|
149 |
iOwner.SendMessage( MEngineMonitor::EPEMessageIncCallForwToC, KPECallIdNotUsed ); |
|
150 |
break; |
|
151 |
||
152 |
case ECCESsOutCallForwToC: /** outgoing call was forwarded because of user own settings. */ |
|
153 |
iOwner.SendMessage( MEngineMonitor::EPEMessageOutCallForwToC, KPECallIdNotUsed ); |
|
154 |
break; |
|
155 |
||
156 |
case ECCESsForwardUnconditionalModeActive: |
|
157 |
iOwner.SendMessage( MEngineMonitor::EPEMessageForwardUnconditionalModeActive, KPECallIdNotUsed ); |
|
158 |
break; |
|
159 |
||
160 |
case ECCESsForwardConditionallyModeActive: |
|
161 |
iOwner.SendMessage( MEngineMonitor::EPEMessageForwardConditionallyModeActive, KPECallIdNotUsed ); |
|
162 |
break; |
|
163 |
||
164 |
case ESsCallWaiting: |
|
165 |
iOwner.SendMessage( MEngineMonitor::EPEMessageCallWaiting, KPECallIdNotUsed ); |
|
166 |
TEFLOGSTRING( KTAINT, "CPESupplementaryServicesMonitor::CallForwardEventOccurred -> ECCESsCallWaiting" ); |
|
167 |
break; |
|
168 |
||
169 |
default: |
|
170 |
break; |
|
171 |
} |
|
172 |
} |
|
173 |
||
174 |
// ----------------------------------------------------------------------------- |
|
175 |
// CPESupplementaryServicesMonitor::CallCugEventOccurred |
|
176 |
// ----------------------------------------------------------------------------- |
|
177 |
// |
|
178 |
EXPORT_C void CPESupplementaryServicesMonitor::CallCugEventOccurred( |
|
179 |
const MCCESsObserver::TCCESsCugEvent aCugEvent ) |
|
180 |
{ |
|
181 |
// These events can be ingored for now. They don't cause any action in our |
|
182 |
// layer or in UI. |
|
183 |
||
184 |
switch( aCugEvent ) |
|
185 |
{ |
|
186 |
case ECCESsShowIncCallGroupIndex: // fall through |
|
187 |
iOwner.SendMessage( MEngineMonitor::EPEMessageShowIncCallGroupIndex, KPECallIdNotUsed ); |
|
188 |
break; |
|
189 |
case ECCESsRejectedCause: |
|
190 |
default: |
|
191 |
break; |
|
192 |
} |
|
193 |
} |
|
194 |
||
195 |
// ----------------------------------------------------------------------------- |
|
196 |
// CPESupplementaryServicesMonitor::NotifyCurrentActiveALSLine |
|
197 |
// ----------------------------------------------------------------------------- |
|
198 |
// |
|
199 |
EXPORT_C void CPESupplementaryServicesMonitor::NotifyCurrentActiveALSLine( |
|
200 |
TInt aLine ) |
|
201 |
{ |
|
202 |
TEFLOGSTRING2( |
|
203 |
KTAMESIN, |
|
204 |
"CALL: CPESupplementaryServcesMonitor::NotifyCurrentActiveALSLine aLine %d", |
|
205 |
aLine ); |
|
206 |
||
207 |
switch( aLine ) |
|
208 |
{ |
|
209 |
case RMobilePhone::EAlternateLineNotAvailable: |
|
210 |
iDataStore.SetALSLineSupport( EFalse ); |
|
211 |
iDataStore.SetALSLine( CCCECallParameters::ECCELineTypePrimary ); |
|
212 |
break; |
|
213 |
||
214 |
case RMobilePhone::EAlternateLinePrimary: |
|
215 |
iDataStore.SetALSLineSupport( ETrue ); |
|
216 |
iDataStore.SetALSLine( CCCECallParameters::ECCELineTypePrimary ); |
|
217 |
break; |
|
218 |
||
219 |
case RMobilePhone::EAlternateLineAuxiliary: |
|
220 |
iDataStore.SetALSLineSupport( ETrue ); |
|
221 |
iDataStore.SetALSLine( CCCECallParameters::ECCELineTypeAux ); |
|
222 |
break; |
|
223 |
||
224 |
default: |
|
225 |
break; |
|
226 |
} |
|
227 |
||
228 |
// Notify that, ALS line changed. |
|
229 |
iOwner.SendMessage( MEngineMonitor::EPEMessageALSLineChanged, KPECallIdNotUsed ); |
|
230 |
} |
|
231 |
||
232 |
// End of File |