26
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2004 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 defines the interface of the Network Handling
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef NWHandlingEngine_H
|
|
21 |
#define NWHandlingEngine_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <rmmcustomapi.h>
|
|
26 |
#include <etelpckt.h> // for RPacketService::TDynamicCapsFlags
|
|
27 |
|
|
28 |
|
|
29 |
// CONSTANTS
|
|
30 |
// Max length of network country code.
|
|
31 |
const TInt KNWCountryCodeLength = 4; // This value is defined in multimode etel definition document.
|
|
32 |
// Max length of network identity code.
|
|
33 |
const TInt KNWIdentityLength = 8; // This value is defined in multimode etel definition document.
|
|
34 |
// Max length of network display alpha tag
|
|
35 |
const TInt KNWDisplayTagLength = 30; // New EtelMM API defition describe this value to be 32, but etelmm.h contains value 30.
|
|
36 |
// Max length of network short name.
|
|
37 |
const TInt KNWShortNameLength = 10; // New EtelMM API defition describe this value to be 8, but etelmm.h contains value 10.
|
|
38 |
// Max length of network long name.
|
|
39 |
const TInt KNWLongNameLength = 20; // New EtelMM API defition describe this value to be 16, but etelmm.h contains value 20.
|
|
40 |
// Max length of service provider name.
|
|
41 |
const TInt KNWServiceProviderNameLength = 16;
|
|
42 |
// Max length of network provider name.
|
|
43 |
const TInt KNWProviderNameLength = 25;
|
|
44 |
// Max length of MCN name.
|
|
45 |
const TInt KNWMCNNameLength = 20;
|
|
46 |
// Max length of VIAG text tag
|
|
47 |
const TInt KNWViagTextTagLength = 13;
|
|
48 |
// Max length of PLMN field
|
|
49 |
const TInt KNWPLMNFieldLength = 251;
|
|
50 |
|
|
51 |
|
|
52 |
// DATA TYPES
|
|
53 |
// MCN name
|
|
54 |
typedef TBuf<KNWMCNNameLength> TNWMCNName;
|
|
55 |
// Viag text tag
|
|
56 |
typedef TBuf<KNWViagTextTagLength> TNWViagTextTag;
|
|
57 |
// MCC in GSM and TDMA
|
|
58 |
typedef TBuf<KNWCountryCodeLength> TNWCountryCode;
|
|
59 |
// MNC in GSM and SID in TDMA
|
|
60 |
typedef TBuf<KNWIdentityLength> TNWIdentity;
|
|
61 |
// Network Alpha-tag
|
|
62 |
typedef TBuf<KNWDisplayTagLength> TNWDisplayTag;
|
|
63 |
// The short name of the network operator
|
|
64 |
typedef TBuf<KNWShortNameLength> TNWShortName;
|
|
65 |
// The long name of the network operator
|
|
66 |
typedef TBuf<KNWLongNameLength> TNWLongName;
|
|
67 |
// Service provider name
|
|
68 |
typedef TBuf<KNWServiceProviderNameLength> TNWServiceProviderName;
|
|
69 |
// The PLMN Field
|
|
70 |
typedef TBuf<KNWPLMNFieldLength> TNWPLMNField;
|
|
71 |
// Network provider name
|
|
72 |
typedef TBuf<KNWProviderNameLength> TNWProviderName;
|
|
73 |
// The Programmable Operator Name type.
|
|
74 |
typedef RMmCustomAPI::TOperatorNameInfo TNWOperatorNameInfo;
|
|
75 |
// Display of the registered PLMN.
|
|
76 |
typedef TUint32 TNWDisplayRequirementsFlags;
|
|
77 |
|
|
78 |
|
|
79 |
enum TNWRegistrationStatus
|
|
80 |
{
|
|
81 |
ENWRegistrationUnknown,
|
|
82 |
ENWNotRegisteredNoService,
|
|
83 |
ENWNotRegisteredEmergencyOnly,
|
|
84 |
ENWNotRegisteredSearching,
|
|
85 |
ENWRegisteredBusy,
|
|
86 |
ENWRegisteredOnHomeNetwork,
|
|
87 |
ENWRegistrationDenied,
|
|
88 |
ENWRegisteredRoaming
|
|
89 |
};
|
|
90 |
|
|
91 |
enum TNWMode
|
|
92 |
{
|
|
93 |
ENWModeUnknown,
|
|
94 |
ENWModeUnregistered,
|
|
95 |
ENWModeGsm,
|
|
96 |
ENWModeAmps,
|
|
97 |
ENWModeCdma95,
|
|
98 |
ENWModeCdma2000,
|
|
99 |
ENWModeWcdma,
|
|
100 |
ENWModeTdcdma
|
|
101 |
};
|
|
102 |
|
|
103 |
enum TNWStatus
|
|
104 |
{
|
|
105 |
ENWStatusUnknown,
|
|
106 |
ENWStatusAvailable,
|
|
107 |
ENWStatusCurrent,
|
|
108 |
ENWStatusForbidden
|
|
109 |
};
|
|
110 |
|
|
111 |
enum TNWDisplayRequirements
|
|
112 |
{
|
|
113 |
ENWDisplayPLMNNotRequired = 0x00000001,
|
|
114 |
ENWDisplayPLMNRequired = 0x00000002,
|
|
115 |
ENWDisplaySPNRequired = 0x00000004,
|
|
116 |
ENWDisplaySPNNotRequired = 0x00000008
|
|
117 |
};
|
|
118 |
|
|
119 |
enum TNWViagIndicatorType //enum for viag indicator type
|
|
120 |
{
|
|
121 |
ENWViagIndicatorTypeNone,
|
|
122 |
ENWViagIndicatorTypeHomeZone,
|
|
123 |
ENWViagIndicatorTypeCityZone
|
|
124 |
};
|
|
125 |
|
|
126 |
enum TNWMCNIndicatorType //enum for mcn indicator type
|
|
127 |
{
|
|
128 |
ENWMCNIndicatorTypeNone,
|
|
129 |
ENWMCNIndicatorTypeActive
|
|
130 |
};
|
|
131 |
|
|
132 |
// CDMA enumerations for TNWInfo
|
|
133 |
enum TNWNoServiceMode
|
|
134 |
{
|
|
135 |
ENWNotRegisteredOutOfRange,
|
|
136 |
ENWNotRegisteredPowerSaveMode
|
|
137 |
};
|
|
138 |
|
|
139 |
// CDMA enumerations for TNWInfo
|
|
140 |
enum TNWVoicePrivacyStatus
|
|
141 |
{
|
|
142 |
ENWVoicePrivacyStatusOff,
|
|
143 |
ENWVoicePrivacyStatusOn,
|
|
144 |
ENWVoicePrivacyStatusUnknown
|
|
145 |
};
|
|
146 |
|
|
147 |
enum TNWRead
|
|
148 |
{
|
|
149 |
ESPNEFRead,
|
|
150 |
ENPNEFRead,
|
|
151 |
EProgEFRead,
|
|
152 |
EViagEFRead,
|
|
153 |
EFullFileChange
|
|
154 |
};
|
|
155 |
|
|
156 |
#ifdef RD_PHONE_NG
|
|
157 |
enum TNWNetworkSelectionSetting
|
|
158 |
{
|
|
159 |
ENWNetworkSelectionUnknown,
|
|
160 |
ENWNetworkSelectionAutomatic,
|
|
161 |
ENWNetworkSelectionManual
|
|
162 |
};
|
|
163 |
#endif // RD_PHONE_RG
|
|
164 |
// CLASS DECLARATION
|
|
165 |
|
|
166 |
//Network info definition
|
|
167 |
struct TNWInfo
|
|
168 |
{
|
|
169 |
TNWRegistrationStatus iRegistrationStatus; // Network registration status
|
|
170 |
TNWMode iNetworkMode; // Mode of the network
|
|
171 |
TNWStatus iStatus; // Status of the Network
|
|
172 |
TNWCountryCode iCountryCode; // MCC in GSM and TDMA
|
|
173 |
TNWIdentity iNetworkId; // MNC in GSM and SID in TDMA
|
|
174 |
TNWDisplayTag iDisplayTag; // Network Alpha-tag
|
|
175 |
TNWShortName iShortName; // The short name of the operator
|
|
176 |
TNWLongName iLongName; // The long name of the operator
|
|
177 |
TNWViagIndicatorType iViagIndicatorType; // Zone indicator type
|
|
178 |
TNWViagTextTag iViagTextTag; // Viag text tag
|
|
179 |
TNWMCNIndicatorType iMCNIndicatorType; // MCN indicator type
|
|
180 |
TNWMCNName iMCNName; // MCN name
|
|
181 |
TNWServiceProviderName iSPName; // Service provider name
|
|
182 |
TNWDisplayRequirementsFlags iServiceProviderNameDisplayReq; // Service provider name display required
|
|
183 |
TNWProviderName iNPName; // Network provider name
|
|
184 |
TNWOperatorNameInfo iOperatorNameInfo; // Operator name
|
|
185 |
TNWNoServiceMode iNoServerMode; //
|
|
186 |
TNWVoicePrivacyStatus iVoicePrivacyStatus; // Voice Privacy Status
|
|
187 |
TNWPLMNField iPLMNField; // Contains a number of PLMN network names coded as TLV objects
|
|
188 |
#ifdef RD_PHONE_NG
|
|
189 |
TNWNetworkSelectionSetting iSelectionSetting; // Contains a network selection setting manual/automatic etc.
|
|
190 |
#endif // RD_PHONE_NG
|
|
191 |
RPacketService::TDynamicCapsFlags iDynamicCapsFlags; // Dynamic packet data capabilities
|
|
192 |
// (used to hide alpha tag when CS registration is unsuccessful)
|
|
193 |
};
|
|
194 |
|
|
195 |
// CLASS DECLARATION
|
|
196 |
|
|
197 |
/**
|
|
198 |
* Offers message interface from network handling to client
|
|
199 |
*
|
|
200 |
* @lib networkhandling.lib
|
|
201 |
* @since Series 60_2.8
|
|
202 |
*/
|
|
203 |
class MNWMessageObserver
|
|
204 |
{
|
|
205 |
public:
|
|
206 |
|
|
207 |
enum TNWMessages
|
|
208 |
{
|
|
209 |
// COMMON NETWORK MESSAGES 0 - 99
|
|
210 |
|
|
211 |
// Message will be sent when current network information changed
|
|
212 |
ENWMessageNetworkInfoChange,
|
|
213 |
// Message will be sent when network mode changed (e.g.Gsm to Wcdma )
|
|
214 |
ENWMessageNetworkModeChange,
|
|
215 |
// Message will be sent when network registration status changed
|
|
216 |
ENWMessageNetworkRegistrationStatusChange,
|
|
217 |
// Message will be sent when programmable operator name changed
|
|
218 |
ENWMessageProgrammableOperatorInfoChange,
|
|
219 |
// Message will be sent when network provider changed
|
|
220 |
ENWMessageNetworkProviderNameChange,
|
|
221 |
// Message will be sent when service provider changed
|
|
222 |
ENWMessageServiceProviderNameChange,
|
|
223 |
// Message will be sent when NW starts update Operator Name Info
|
|
224 |
ENWMessageProgrammableOperatorInfoUpdating,
|
|
225 |
// Message will be sent when NW starts update Network Service Provider Name
|
|
226 |
ENWMessageNetworkProviderNameUpdating,
|
|
227 |
// Message will be sent when NW starts update Service Provider Name
|
|
228 |
ENWMessageServiceProviderNameUpdating,
|
|
229 |
// Message will be sent when allow refresh is called.
|
|
230 |
ENWMessageAllowRefresh,
|
|
231 |
// Message will be sent when networkSelection setting changed
|
|
232 |
#ifdef RD_PHONE_NG
|
|
233 |
ENWMessageNetworkSelectionSettingChange,
|
|
234 |
#endif // RD_PHONE_NG
|
|
235 |
|
|
236 |
// GSM SPECIFIC MESSAGES 100 - 199
|
|
237 |
|
|
238 |
// Message will be sent when cell re-selection occured
|
|
239 |
ENWMessageNetworkCellReselection = 100,
|
|
240 |
// Message will be sent when network connection failured
|
|
241 |
ENWMessageNetworkConnectionFailure,
|
|
242 |
// Message will be sent when MCN CBS message was reveived
|
|
243 |
ENWMessageCurrentCellInfoMessage,
|
|
244 |
// Message will be sent when Viag CBS message was reveived
|
|
245 |
// and completely handled.
|
|
246 |
ENWMessageCurrentHomeZoneMessage,
|
|
247 |
// Message will be sent when cell info display changed
|
|
248 |
ENWMessageNetworkIndicatorChange,
|
|
249 |
// Message will be sent when dynamic packet data capabilities change
|
|
250 |
// (Used to hide alpha tag when CS registration is unsuccessful)
|
|
251 |
ENWMessageDynamicCapsChange,
|
|
252 |
|
|
253 |
// CDMA SPECIFIC MESSAGES 200 - 299
|
|
254 |
|
|
255 |
ENWMessageNetworkEmergencyMode = 200,
|
|
256 |
ENWMessageVoicePrivacyStatusChange,
|
|
257 |
ENWMessageStartSystemSearchRequestCompleteOk,
|
|
258 |
ENWMessageStartSystemSearchRequestCompleteFail,
|
|
259 |
ENWMessageStopProtocolStackRequestCompleteOk,
|
|
260 |
ENWMessageStopProtocolStackRequestCompleteFail
|
|
261 |
|
|
262 |
};
|
|
263 |
|
|
264 |
enum TNWOperation
|
|
265 |
{
|
|
266 |
ENWNone,
|
|
267 |
// Fetching Service Provider Name
|
|
268 |
ENWGetServiceProviderName,
|
|
269 |
// Fetching Network Provider Name
|
|
270 |
ENWGetNetworkProviderName,
|
|
271 |
// Fetching Programmable Operator Name
|
|
272 |
ENWGetProgrammableOperatorName,
|
|
273 |
// Notifying network registration status change
|
|
274 |
ENWNotifyNetworkRegistrationStatusChange,
|
|
275 |
};
|
|
276 |
|
|
277 |
/**
|
|
278 |
* Offers message interface to the client
|
|
279 |
* @param aMessage
|
|
280 |
* This methods execute time must be short,since code
|
|
281 |
* starting to run from RunL.
|
|
282 |
*/
|
|
283 |
virtual void HandleNetworkMessage( const TNWMessages aMessage ) = 0;
|
|
284 |
|
|
285 |
/**
|
|
286 |
* Offers error message interface to the client
|
|
287 |
* @param aOperation operation which failed
|
|
288 |
* @param aErrorCode returned Symbian OS error code
|
|
289 |
*
|
|
290 |
*/
|
|
291 |
virtual void HandleNetworkError( const TNWOperation aOperation, TInt aErrorCode ) = 0;
|
|
292 |
};
|
|
293 |
|
|
294 |
|
|
295 |
#endif // NWHandlingEngine_H
|
|
296 |
|
|
297 |
// End of File
|