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 );
|
|
93 |
break;
|
|
94 |
|
|
95 |
default:
|
|
96 |
break;
|
|
97 |
}
|
|
98 |
}
|
|
99 |
|
|
100 |
|
|
101 |
// -----------------------------------------------------------------------------
|
|
102 |
// CPESupplementaryServicesMonitor::CLIEventOccurred
|
|
103 |
// -----------------------------------------------------------------------------
|
|
104 |
//
|
|
105 |
EXPORT_C void CPESupplementaryServicesMonitor::CLIEventOccurred(
|
|
106 |
const MCCESsObserver::TCCESsCLIEvent aCallLineEvent )
|
|
107 |
{
|
|
108 |
|
|
109 |
switch( aCallLineEvent )
|
|
110 |
{
|
|
111 |
case ECCESsTempClirSuppressUnsuccessful: /** Temporary CLIR suppression was unsuccessful */
|
|
112 |
iOwner.SendMessage( MEngineMonitor::EPEMessageTempClirSuppressUnsuccessful, KPECallIdNotUsed );
|
|
113 |
break;
|
|
114 |
|
|
115 |
case ECCESsTempClirActivationUnsuccessful: /** Temporary CLIR activation was unsuccessful*/
|
|
116 |
iOwner.SendMessage( MEngineMonitor::EPEMessageTempClirActivationUnsuccessful, KPECallIdNotUsed );
|
|
117 |
break;
|
|
118 |
|
|
119 |
default:
|
|
120 |
break;
|
|
121 |
}
|
|
122 |
|
|
123 |
}
|
|
124 |
|
|
125 |
// -----------------------------------------------------------------------------
|
|
126 |
// CPESupplementaryServicesMonitor::CallForwardEventOccurred
|
|
127 |
// -----------------------------------------------------------------------------
|
|
128 |
//
|
|
129 |
EXPORT_C void CPESupplementaryServicesMonitor::CallForwardEventOccurred(
|
|
130 |
const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
|
|
131 |
const TDesC& /*aRemoteAddress*/ )
|
|
132 |
{
|
|
133 |
TEFLOGSTRING2(
|
|
134 |
KTAMESIN,
|
|
135 |
"CALL: CPESupplementaryServcesMonitor::CallForwardEventOccurred aCallForwardEvent %d",
|
|
136 |
aCallForwardEvent );
|
|
137 |
switch( aCallForwardEvent )
|
|
138 |
{
|
|
139 |
case ECCESsIncCallIsForw: /** Incoming call is forwarded */
|
|
140 |
iOwner.SendMessage( MEngineMonitor::EPEMessageIncCallIsForw, KPECallIdNotUsed );
|
|
141 |
break;
|
|
142 |
|
|
143 |
case ECCESsIncCallForwToC: /** Incoming call was forwarded because of user own settings. */
|
|
144 |
iOwner.SendMessage( MEngineMonitor::EPEMessageIncCallForwToC, KPECallIdNotUsed );
|
|
145 |
break;
|
|
146 |
|
|
147 |
case ECCESsOutCallForwToC: /** outgoing call was forwarded because of user own settings. */
|
|
148 |
iOwner.SendMessage( MEngineMonitor::EPEMessageOutCallForwToC, KPECallIdNotUsed );
|
|
149 |
break;
|
|
150 |
|
|
151 |
case ECCESsForwardUnconditionalModeActive:
|
|
152 |
iOwner.SendMessage( MEngineMonitor::EPEMessageForwardUnconditionalModeActive, KPECallIdNotUsed );
|
|
153 |
break;
|
|
154 |
|
|
155 |
case ECCESsForwardConditionallyModeActive:
|
|
156 |
iOwner.SendMessage( MEngineMonitor::EPEMessageForwardConditionallyModeActive, KPECallIdNotUsed );
|
|
157 |
break;
|
|
158 |
|
|
159 |
case ESsCallWaiting:
|
|
160 |
iOwner.SendMessage( MEngineMonitor::EPEMessageCallWaiting, KPECallIdNotUsed );
|
|
161 |
TEFLOGSTRING( KTAINT, "CPESupplementaryServicesMonitor::CallForwardEventOccurred -> ECCESsCallWaiting" );
|
|
162 |
break;
|
|
163 |
|
|
164 |
default:
|
|
165 |
break;
|
|
166 |
}
|
|
167 |
}
|
|
168 |
|
|
169 |
// -----------------------------------------------------------------------------
|
|
170 |
// CPESupplementaryServicesMonitor::CallCugEventOccurred
|
|
171 |
// -----------------------------------------------------------------------------
|
|
172 |
//
|
|
173 |
EXPORT_C void CPESupplementaryServicesMonitor::CallCugEventOccurred(
|
|
174 |
const MCCESsObserver::TCCESsCugEvent aCugEvent )
|
|
175 |
{
|
|
176 |
// These events can be ingored for now. They don't cause any action in our
|
|
177 |
// layer or in UI.
|
|
178 |
|
|
179 |
switch( aCugEvent )
|
|
180 |
{
|
|
181 |
case ECCESsShowIncCallGroupIndex: // fall through
|
|
182 |
iOwner.SendMessage( MEngineMonitor::EPEMessageShowIncCallGroupIndex, KPECallIdNotUsed );
|
|
183 |
break;
|
|
184 |
case ECCESsRejectedCause:
|
|
185 |
default:
|
|
186 |
break;
|
|
187 |
}
|
|
188 |
}
|
|
189 |
|
|
190 |
// -----------------------------------------------------------------------------
|
|
191 |
// CPESupplementaryServicesMonitor::NotifyCurrentActiveALSLine
|
|
192 |
// -----------------------------------------------------------------------------
|
|
193 |
//
|
|
194 |
EXPORT_C void CPESupplementaryServicesMonitor::NotifyCurrentActiveALSLine(
|
|
195 |
TInt aLine )
|
|
196 |
{
|
|
197 |
TEFLOGSTRING2(
|
|
198 |
KTAMESIN,
|
|
199 |
"CALL: CPESupplementaryServcesMonitor::NotifyCurrentActiveALSLine aLine %d",
|
|
200 |
aLine );
|
|
201 |
|
|
202 |
switch( aLine )
|
|
203 |
{
|
|
204 |
case RMobilePhone::EAlternateLineNotAvailable:
|
|
205 |
iDataStore.SetALSLineSupport( EFalse );
|
|
206 |
iDataStore.SetALSLine( CCCECallParameters::ECCELineTypePrimary );
|
|
207 |
break;
|
|
208 |
|
|
209 |
case RMobilePhone::EAlternateLinePrimary:
|
|
210 |
iDataStore.SetALSLineSupport( ETrue );
|
|
211 |
iDataStore.SetALSLine( CCCECallParameters::ECCELineTypePrimary );
|
|
212 |
break;
|
|
213 |
|
|
214 |
case RMobilePhone::EAlternateLineAuxiliary:
|
|
215 |
iDataStore.SetALSLineSupport( ETrue );
|
|
216 |
iDataStore.SetALSLine( CCCECallParameters::ECCELineTypeAux );
|
|
217 |
break;
|
|
218 |
|
|
219 |
default:
|
|
220 |
break;
|
|
221 |
}
|
|
222 |
|
|
223 |
// Notify that, ALS line changed.
|
|
224 |
iOwner.SendMessage( MEngineMonitor::EPEMessageALSLineChanged, KPECallIdNotUsed );
|
|
225 |
}
|
|
226 |
|
|
227 |
// End of File
|