|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalAll |
|
21 */ |
|
22 |
|
23 #ifndef SAT_DEFS_H_ |
|
24 #define SAT_DEFS_H_ |
|
25 |
|
26 // INCLUDES |
|
27 #include <etelsat.h> // Symbian Etel Sat related types |
|
28 |
|
29 #ifndef BERTLV_DEFS_H |
|
30 #define BERTLV_DEFS_H |
|
31 |
|
32 #include <e32base.h> // for class CBase |
|
33 // CONSTANTS |
|
34 const TUint8 KTlvLengthStartPosition = 0x01; |
|
35 const TUint8 KTlvDataAreaStartPosition = 0x02; |
|
36 const TUint8 KTlvHeaderLength = 0x02; |
|
37 const TUint8 KTwoByteLengthCoding = 0x81; |
|
38 const TUint8 KMccAndMncLength = 0x03; |
|
39 const TUint8 KLocationAreaCodeLength = 0x02; |
|
40 const TUint8 KCApduLengthWithoutLc = 0x06; |
|
41 const TUint8 KCommonTlvHeaderLength = 0x02; |
|
42 const TUint8 KDefaultCommandNumber = 0x01; |
|
43 const TUint8 KDefaultGetInkeyCodingScheme = 0x04; |
|
44 const TUint8 KTagValueMask = 0x7f; |
|
45 const TUint8 KTagCrMask = 0x80; |
|
46 const TUint8 KMaxOneByteLength = 0x7f; |
|
47 const TUint8 KReservedTonNpi1 = 0x7F; |
|
48 const TUint8 KReservedTonNpi2 = 0xF7; |
|
49 |
|
50 |
|
51 // In 242 octets, it is possible to pack (242x8)/7=277 characters. |
|
52 // See ref. 3GPP TS 23.038. |
|
53 const TInt16 KTextBufferMaxSize = 277; |
|
54 const TUint8 KCommandQualifier = 4; |
|
55 const TUint8 KTlvMaxSize = 255; |
|
56 |
|
57 // Proactive SIM commands |
|
58 const TUint8 KRefresh = 0x01; |
|
59 const TUint8 KMoreTime = 0x02; |
|
60 const TUint8 KPollInterval = 0x03; |
|
61 const TUint8 KPollingOff = 0x04; |
|
62 const TUint8 KSetUpEventList = 0x05; |
|
63 const TUint8 KSetUpCall = 0x10; |
|
64 const TUint8 KSendSs = 0x11; |
|
65 const TUint8 KSendUssd = 0x12; |
|
66 const TUint8 KSendShortMessage = 0x13; |
|
67 const TUint8 KSendDtmf = 0x14; |
|
68 const TUint8 KLaunchBrowser = 0x15; |
|
69 const TUint8 KPlayTone = 0x20; |
|
70 const TUint8 KDisplayText = 0x21; |
|
71 const TUint8 KGetInkey = 0x22; |
|
72 const TUint8 KGetInput = 0x23; |
|
73 const TUint8 KSelectItem = 0x24; |
|
74 const TUint8 KSetUpMenu = 0x25; |
|
75 const TUint8 KProvideLocalInformation = 0x26; |
|
76 const TUint8 KTimerManagement = 0x27; |
|
77 const TUint8 KSetUpIdleModeText = 0x28; |
|
78 const TUint8 KPerformCardApdu = 0x30; |
|
79 const TUint8 KPowerOnCard = 0x31; |
|
80 const TUint8 KPowerOffCard = 0x32; |
|
81 const TUint8 KGetReaderStatus = 0x33; |
|
82 const TUint8 KRunAtCommand = 0x34; |
|
83 const TUint8 KLanguageNotification = 0x35; |
|
84 const TUint8 KOpenChannel = 0x40; |
|
85 const TUint8 KCloseChannel = 0x41; |
|
86 const TUint8 KReceiveData = 0x42; |
|
87 const TUint8 KSendData = 0x43; |
|
88 const TUint8 KGetChannelStatus = 0x44; |
|
89 const TUint8 KEndOfTheProactiveSession = 0x81; |
|
90 |
|
91 |
|
92 // TAG Values |
|
93 // BER-TLV tags in ME to SIM direction |
|
94 const TUint8 KBerTlvSmsPpDownloadTag = 0xD1; |
|
95 const TUint8 KBerTlvCellBroadcastTag = 0xD2; |
|
96 const TUint8 KBerTlvMenuSelectionTag = 0xD3; |
|
97 const TUint8 KBerTlvCallControlTag = 0xD4; |
|
98 const TUint8 KBerTlvMoShortMessageControlTag = 0xD5; |
|
99 const TUint8 KBerTlvEventDownloadTag = 0xD6; |
|
100 const TUint8 KBerTlvTimerExpirationTag = 0xD7; |
|
101 |
|
102 // BER-TLV tags in SIM to ME direction |
|
103 const TUint8 KBerTlvProactiveSimCommandTag = 0xD0; |
|
104 |
|
105 // SIMPLE-TLV tags in both directions |
|
106 // TLV tags, Tag value, bits 1-7 (Range: '01' - '7E') |
|
107 const TUint8 KTlvCommandDetailsTag = 0x01; |
|
108 const TUint8 KTlvDeviceIdentityTag = 0x02; |
|
109 const TUint8 KTlvResultTag = 0x03; |
|
110 const TUint8 KTlvDurationTag = 0x04; |
|
111 const TUint8 KTlvAlphaIdentifierTag = 0x05; |
|
112 const TUint8 KTlvAddressTag = 0x06; |
|
113 const TUint8 KTlvCapabilityConfigurationParametersTag = 0x07; |
|
114 const TUint8 KTlvSubaddressTag = 0x08; |
|
115 const TUint8 KTlvSsStringTag = 0x09; |
|
116 const TUint8 KTlvUssdStringTag = 0x0A; |
|
117 const TUint8 KTlvSmsTpduTag = 0x0B; |
|
118 const TUint8 KTlvCellBroadcastPageTag = 0x0C; |
|
119 const TUint8 KTlvTextStringTag = 0x0D; |
|
120 const TUint8 KTlvToneTag = 0x0E; |
|
121 const TUint8 KTlvItemTag = 0x0F; |
|
122 const TUint8 KTlvItemIdentifierTag = 0x10; |
|
123 const TUint8 KTlvResponseLengthTag = 0x11; |
|
124 const TUint8 KTlvFileListTag = 0x12; |
|
125 const TUint8 KTlvLocationInformationTag = 0x13; |
|
126 const TUint8 KTlvImeiTag = 0x14; |
|
127 const TUint8 KTlvHelpRequestTag = 0x15; |
|
128 const TUint8 KTlvNetworkMeasurementResultsTag = 0x16; |
|
129 const TUint8 KTlvDefaultTextTag = 0x17; |
|
130 const TUint8 KTlvItemsNextActionIndicatorTag = 0x18; |
|
131 const TUint8 KTlvEventListTag = 0x19; |
|
132 const TUint8 KTlvCauseTag = 0x1A; |
|
133 const TUint8 KTlvLocationStatusTag = 0x1B; |
|
134 const TUint8 KTlvTransactionIdentifierTag = 0x1C; |
|
135 const TUint8 KTlvBccdChannelListTag = 0x1D; |
|
136 const TUint8 KTlvIconIdentifierTag = 0x1E; |
|
137 const TUint8 KTlvItemIconIdentifierListTag = 0x1F; |
|
138 const TUint8 KTlvCardReaderStatusTag = 0x20; |
|
139 const TUint8 KTlvCardAtrTag = 0x21; |
|
140 const TUint8 KTlvCApduTag = 0x22; |
|
141 const TUint8 KTlvRApduTag = 0x23; |
|
142 const TUint8 KTlvTimerIdentifierTag = 0x24; |
|
143 const TUint8 KTlvTimerValueTag = 0x25; |
|
144 const TUint8 KTlvDateTimeAndTimeZoneTag = 0x26; |
|
145 const TUint8 KTlvCallControlRequestedActionTag = 0x27; |
|
146 const TUint8 KTlvAtCommandTag = 0x28; |
|
147 const TUint8 KTlvAtResponseTag = 0x29; |
|
148 const TUint8 KTlvBcRepeatIndicatorTag = 0x2A; |
|
149 const TUint8 KTlvImmediateResponseTag = 0x2B; |
|
150 const TUint8 KTlvDtmfStringTag = 0x2C; |
|
151 const TUint8 KTlvLanguageTag = 0x2D; |
|
152 const TUint8 KTlvTimingAdvanceTag = 0x2E; |
|
153 const TUint8 KTlvAIDTag = 0x2F; |
|
154 const TUint8 KTlvBrowserIdentityTag = 0x30; |
|
155 const TUint8 KTlvUrlTag = 0x31; |
|
156 const TUint8 KTlvBearerTag = 0x32; |
|
157 const TUint8 KTlvProvisioningReferenceFileTag = 0x33; |
|
158 const TUint8 KTlvBrowserTerminationCauseTag = 0x34; |
|
159 const TUint8 KTlvBearerDescriptionTag = 0x35; |
|
160 const TUint8 KTlvChannelDataTag = 0x36; |
|
161 const TUint8 KTlvChannelDataLengthTag = 0x37; |
|
162 const TUint8 KTlvChannelStatusTag = 0x38; |
|
163 const TUint8 KTlvBufferSizeTag = 0x39; |
|
164 const TUint8 KTlvCardReaderIdentifierTag = 0x3A; |
|
165 const TUint8 KTlvTextStringTagUserPassword = 0x3B; |
|
166 const TUint8 KTlvSimMeTransportLevelTag = 0x3C; |
|
167 const TUint8 KTlvURLTag = 0x3D; |
|
168 const TUint8 KTlvOtherAddressTag = 0x3E; |
|
169 const TUint8 KTlvAccessTechnologyTag = 0x3F; |
|
170 const TUint8 KTlvESNTag = 0x46; |
|
171 const TUint8 KTlvNetworkAccessNameTag = 0x47; |
|
172 const TUint8 KTlvTimerIdentifierTagCRBitOn = 0xA4; |
|
173 |
|
174 // TLV Coding |
|
175 |
|
176 // Event download - Event list event coding |
|
177 const TUint8 KEventMTCall = 0x00; |
|
178 const TUint8 KEventCallConnected = 0x01; |
|
179 const TUint8 KEventCallDisconnected = 0x02; |
|
180 const TUint8 KEventLocationStatus = 0x03; |
|
181 const TUint8 KEventUserActivity = 0x04; |
|
182 const TUint8 KEventIdleScreenAvailable = 0x05; |
|
183 const TUint8 KEventCardReaderStatus = 0x06; |
|
184 const TUint8 KEventLanguageSelection = 0x07; |
|
185 const TUint8 KEventBrowserTermination = 0x08; |
|
186 const TUint8 KEventDataAvailable = 0x09; |
|
187 const TUint8 KEventChannelStatus = 0x0A; |
|
188 const TUint8 KEventAccessTechnologyChange = 0x0B; |
|
189 |
|
190 // Event download - Location status coding |
|
191 const TUint8 KLocationStatusNormalService = 0x00; |
|
192 const TUint8 KLocationStatusLimitedService = 0x01; |
|
193 const TUint8 KLocationStatusNoService = 0x02; |
|
194 |
|
195 // Event download - Browser termination coding |
|
196 const TUint8 KBrowserTerminationUser = 0x00; |
|
197 const TUint8 KBrowserTerminationError = 0x01; |
|
198 |
|
199 // REFRESH; |
|
200 const TUint8 KSimInitFullFileChangeNotification = 0x00; |
|
201 const TUint8 KFileChangeNotification = 0x01; |
|
202 const TUint8 KSimInitFileChangeNotification = 0x02; |
|
203 const TUint8 KSimInit = 0x03; |
|
204 const TUint8 KSimReset = 0x04; |
|
205 const TUint8 KUSIMApplicationReset = 0x05; |
|
206 const TUint8 K3GSessionReset = 0x06; |
|
207 const TUint8 KMaxPathLength = 16; |
|
208 |
|
209 // SET UP CALL; |
|
210 const TUint8 KSetUpCallIfNotCurrentlyBusy = 0x00; |
|
211 const TUint8 KSetUpCallIfNotCurrentlyBusyWithRedial = 0x01; |
|
212 const TUint8 KSetUpCallPuttingOtherCallsOnHold = 0x02; |
|
213 const TUint8 KSetUpCallPuttingOtherCallsOnHoldWithRedial = 0x03; |
|
214 const TUint8 KSetUpCallDisconnectingOtherCalls = 0x04; |
|
215 const TUint8 KSetUpCallDisconnectingOtherCallsWithRedial = 0x05; |
|
216 const TUint8 KAuthorityFormatIdentifier = 0x50; |
|
217 const TUint8 KMinutes = 0x00; |
|
218 const TUint8 KSeconds = 0x01; |
|
219 const TUint8 KTenthsOfSeconds = 0x02; |
|
220 |
|
221 // SEND SHORT MESSAGE; |
|
222 const TUint8 KSmsPackingRequiredMask = 0x01; |
|
223 const TUint8 KDCSAlphabetMask = 0x06; |
|
224 const TUint8 KSmsMaxSize = 160; |
|
225 const TUint8 KSmsMaxSizeWithoutPacking = 140; |
|
226 const TUint8 KSMSCommandMaxSize = 152; |
|
227 |
|
228 // DISPLAY TEXT, |
|
229 const TUint8 KPriorityMask = 0x01; |
|
230 const TUint8 KMessageClearMask = 0x80; |
|
231 |
|
232 // GET INKEY, |
|
233 const TUint8 KAlphabetMask = 0x01; |
|
234 const TUint8 KUCS2AlphabetMask = 0x02; |
|
235 const TUint8 KYesNoMask = 0x04; |
|
236 const TUint8 KImmediateDigitResponse = 0x08; |
|
237 const TUint8 KHelpAvailabilityMask = 0x80; |
|
238 |
|
239 // GET INPUT, |
|
240 const TUint8 KUserInputMask = 0x04; |
|
241 const TUint8 KGetInputSmsPackedMask = 0x08; |
|
242 const TUint8 KUCS2DCS = 0x08; |
|
243 const TUint8 K7BitDefaultSmsDCS = 0x00; |
|
244 const TUint8 K8BitDCS = 0x04; |
|
245 |
|
246 // SELECT ITEM. |
|
247 const TUint8 KSelectItemPresentationTypeMask = 0x03; |
|
248 const TUint8 KSelectItemChoiceOfData = 0x01; |
|
249 const TUint8 KSelectItemChoiceOfNavigation = 0x03; |
|
250 const TUint8 KSelectItemSelectUsingSoftKeyMask = 0x04; |
|
251 |
|
252 // SET UP MENU. |
|
253 const TUint8 KSelectionUsingSoftKey = 0x01; |
|
254 |
|
255 // TIMER MANAGEMENT |
|
256 const TUint8 KDeactivateTimer = 0x01; |
|
257 const TUint8 KGetTimerValue = 0x02; |
|
258 |
|
259 // LAUNCH BROWSER |
|
260 const TUint8 KLaunchBrowserIfNotYetLaunched = 0x00; |
|
261 const TUint8 KUseExistingBrowser = 0x02; |
|
262 const TUint8 KCloseAndLaunchNewBrowser = 0x03; |
|
263 |
|
264 // PROVIDE LOCAL INFORMATION |
|
265 const TUint8 KNetworkModeGsm = 0x00; |
|
266 const TUint8 KNetworkModeUtran = 0x03; |
|
267 |
|
268 // BEARER INDEPENDENT PROTOCOL |
|
269 const TUint8 KIPV4 = 0x21; |
|
270 const TUint8 KIPV6 = 0x57; |
|
271 |
|
272 // MO SM CONTROL |
|
273 const TUint8 KMoSmCtrlMaxLengthAddr1Addr2 = 249; |
|
274 |
|
275 // General result |
|
276 // All other values are reserved. |
|
277 // Results '0X' and '1X' indicate that the command has been performed. |
|
278 const TUint8 KCommandPerformedSuccessfully = 0x00; |
|
279 const TUint8 KCommandPerformedWithPartialComprehension = 0x01; |
|
280 const TUint8 KCommandPerformedWithMissingInformation = 0x02; |
|
281 const TUint8 KRefreshPerformedWithAdditionalEfsRead = 0x03; |
|
282 const TUint8 KCommandPerformedSuccessfullyIconCouldNotBeDisplayed = 0x04; |
|
283 const TUint8 KCommandPerformedButModifiedByCallControlBySim = 0x05; |
|
284 const TUint8 KCommandPerformedSuccessfullyLimitedService = 0x06; |
|
285 const TUint8 KCommandPerformedWithModification = 0x07; |
|
286 const TUint8 KProactiveSimSessionTerminatedByTheUser = 0x10; |
|
287 const TUint8 KBackwardMoveInTheProactiveSimSessionRequestedByTheUser = 0x11; |
|
288 const TUint8 KNoResponseFromUser = 0x12; |
|
289 const TUint8 KHelpInformationRequiredByTheUser = 0x13; |
|
290 const TUint8 KUssdOrSsTransactionTerminatedByTheUser = 0x14; |
|
291 |
|
292 // Results '2X' Indicate To The SIM That It May Be Worth Re-Trying The Command |
|
293 // At A Later Opportunity. |
|
294 const TUint8 KMeCurrentlyUnableToProcessCommand = 0x20; |
|
295 const TUint8 KNetworkCurrentlyUnableToProcessCommand = 0x21; |
|
296 const TUint8 KUserDidNotAcceptTheProactiveCommand = 0x22; |
|
297 const TUint8 KUserClearedDownCallBeforeConnectionOrNetworkRelease = 0x23; |
|
298 const TUint8 KActionInContradictionWithTheCurrentTimerState = 0x24; |
|
299 const TUint8 KInteractionWithCallControlBySimTemporaryProblem = 0x25; |
|
300 const TUint8 KLaunchBrowserGenericErrorCode = 0x26; |
|
301 |
|
302 // Results '3X' Indicate That It Is Not Worth The SIM Re-Trying With An |
|
303 // Identical Command, As It Will Only Get The Same Response. However, The |
|
304 // Decision To Retry Lies With The SIM Application. |
|
305 const TUint8 KCommandBeyondMeCapabilities = 0x30; |
|
306 const TUint8 KCommandTypeNotUnderstoodByMe = 0x31; |
|
307 const TUint8 KCommandDataNotUnderstoodByMe = 0x32; |
|
308 const TUint8 KCommandNumberNotKnownByMe = 0x33; |
|
309 const TUint8 KSsReturnError = 0x34; |
|
310 const TUint8 KSmsRpError = 0x35; |
|
311 const TUint8 KErrorRequiredValuesAreMissing = 0x36; |
|
312 const TUint8 KUssdReturnError = 0x37; |
|
313 const TUint8 KMultiplecardCommandsError = 0x38; |
|
314 const TUint8 KSimPermanentProblem = 0x39; |
|
315 const TUint8 KBearerIndependentProtocolError = 0x3a; |
|
316 |
|
317 // Additional information |
|
318 // Contents: For the general result "Command performed successfully", some |
|
319 // proactive commands require additional information in the command result. |
|
320 // This is defined in the subclauses below. For the general results '20', '21', |
|
321 // '26', '34', '35', '37', '38' and '39' and '3A', it is mandatory for the ME |
|
322 // to provide a specific cause value as additional information, as defined in |
|
323 // the subclauses below. For the other general results, the ME may optionally |
|
324 // supply additional information. If additional information is not supplied, |
|
325 // then the length of the value part of the data object need only contain the |
|
326 // general result. See 3GPP TS 11.14 V8.8.0, chapters 12.12.1 - 12.12.11 for |
|
327 // more details. |
|
328 |
|
329 // Additional information for ME problem |
|
330 // Additional information for network problem |
|
331 // Additional information for SS problem |
|
332 const TUint8 KNoSpecificCauseCanBeGiven = 0x00; |
|
333 const TUint8 KScreenIsBusy = 0x01; |
|
334 const TUint8 KMeCurrentlyBusyOnCall = 0x02; |
|
335 const TUint8 KMeCurrentlyBusyOnSsTransaction = 0x03; |
|
336 const TUint8 KNoService = 0x04; |
|
337 const TUint8 KAccessControlClassBar = 0x05; |
|
338 const TUint8 KRadioResourceNotGranted = 0x06; |
|
339 const TUint8 KNotInSpeechCall = 0x07; |
|
340 const TUint8 KMeCurrentlyBusyOnUssdTransaction = 0x08; |
|
341 const TUint8 KMeCurrentlyBusyOnSendDtmfCommand = 0x09; |
|
342 |
|
343 // Additional information for interaction with call control or MO SM control |
|
344 const TUint8 KActionNotAllowed = 0x01; |
|
345 const TUint8 KTypeOfRequestHasChanged = 0x02; |
|
346 |
|
347 // Additional information for MultipleCard commands |
|
348 const TUint8 KCardReaderRemovedOrNotPresent = 0x01; |
|
349 const TUint8 KCardRemovedOrNotPresent = 0x02; |
|
350 const TUint8 KCardReaderBusy = 0x03; |
|
351 const TUint8 KCardPoweredOff = 0x04; |
|
352 const TUint8 KCApduFormatError = 0x05; |
|
353 const TUint8 KMuteCard = 0x06; |
|
354 const TUint8 KTransmissionError = 0x07; |
|
355 const TUint8 KProtocolNotSupported = 0x08; |
|
356 const TUint8 KSpecifiedReaderNotValid = 0x09; |
|
357 |
|
358 // Additional information for Launch Browser problem |
|
359 const TUint8 KBearerUnavailable = 0x01; |
|
360 const TUint8 KBrowserUnavailable = 0x02; |
|
361 const TUint8 KMeUnableToReadTheProvisioningData = 0x03; |
|
362 |
|
363 // Additional information for Bearer Independent Protocol |
|
364 const TUint8 KNoChannelAvailable = 0x01; |
|
365 const TUint8 KChannelClosed = 0x02; |
|
366 const TUint8 KChannelIdentifierNotValid = 0x03; |
|
367 const TUint8 KRequestedBufferSizeNotAvailable = 0x04; |
|
368 const TUint8 KSecurityError = 0x05; |
|
369 const TUint8 KRequestedSimMeInterfaceTransportLevelNotAvailable = 0x06; |
|
370 |
|
371 // Source and Destination device identities are coded as follows: |
|
372 const TUint8 KKeypad = 0x01; |
|
373 const TUint8 KDisplay = 0x02; |
|
374 const TUint8 KEarpiece = 0x03; |
|
375 const TUint8 KAdditionalCardReader0 = 0x10; |
|
376 const TUint8 KAdditionalCardReader1 = 0x11; |
|
377 const TUint8 KAdditionalCardReader2 = 0x12; |
|
378 const TUint8 KAdditionalCardReader3 = 0x13; |
|
379 const TUint8 KAdditionalCardReader4 = 0x14; |
|
380 const TUint8 KAdditionalCardReader5 = 0x15; |
|
381 const TUint8 KAdditionalCardReader6 = 0x16; |
|
382 const TUint8 KAdditionalCardReader7 = 0x17; |
|
383 const TUint8 KChannel1 = 0x21; |
|
384 const TUint8 KChannel2 = 0x22; |
|
385 const TUint8 KChannel3 = 0x23; |
|
386 const TUint8 KChannel4 = 0x24; |
|
387 const TUint8 KChannel5 = 0x25; |
|
388 const TUint8 KChannel6 = 0x26; |
|
389 const TUint8 KChannel7 = 0x27; |
|
390 const TUint8 KSim = 0x81; |
|
391 const TUint8 KMe = 0x82; |
|
392 const TUint8 KNetwork = 0x83; |
|
393 |
|
394 |
|
395 // TLV Specific Data Types |
|
396 enum TTlvSpesificDataType |
|
397 { |
|
398 ETLV_TonAndNpi, |
|
399 ETLV_DiallingNumberString, |
|
400 ETLV_AlphaIdentifier, |
|
401 ETLV_SubAddress, |
|
402 ETLV_CapabilityConfigurationParameters, |
|
403 ETLV_CellBroadcastPage, |
|
404 ETLV_CommandNumber, |
|
405 ETLV_TypeOfCommand, |
|
406 ETLV_CommandQualifier, |
|
407 ETLV_SourceDeviceIdentity, |
|
408 ETLV_DestinationDeviceIdentity, |
|
409 ETLV_TimeUnit, |
|
410 ETLV_TimeInterval, |
|
411 ETLV_IdentifierOfItem, |
|
412 ETLV_TextStringOfItem, |
|
413 ETLV_IdentifierOfItemChosen, |
|
414 ETLV_MinimumLengthOfResponse, |
|
415 ETLV_MaximumLengthOfResponse, |
|
416 ETLV_GeneralResult, |
|
417 ETLV_AdditionalInformationOnResult, |
|
418 ETLV_SmsTPdu, |
|
419 ETLV_DataCodingScheme, |
|
420 ETLV_SsOrUssdString, |
|
421 ETLV_TextString, |
|
422 ETLV_Tone, |
|
423 ETLV_UssdString, |
|
424 ETLV_NumberOfFiles, |
|
425 ETLV_Files, |
|
426 ETLV_LocationAreaCode, |
|
427 ETLV_CellIdentityValue, |
|
428 ETLV_MccAndMnc, |
|
429 ETLV_Imei, |
|
430 ETLV_NetworkMeasurementResults, |
|
431 ETLV_DefaultText, |
|
432 ETLV_ItemsNextActionIndicator, |
|
433 ETLV_EventList, |
|
434 ETLV_Cause, |
|
435 ETLV_LocationStatus, |
|
436 ETLV_TransactionIdentifier, |
|
437 ETLV_BcchChannelList, |
|
438 ETLV_IconIdentifier, |
|
439 ETLV_IconQualifier, |
|
440 ETLV_IconListQualifier, |
|
441 ETLV_IconIdentifierList, |
|
442 ETLV_CardReaderStatus, |
|
443 ETLV_CommandClassCLA, |
|
444 ETLV_CommandInstructionCodeIns, |
|
445 ETLV_P1Parameter, |
|
446 ETLV_P2Parameter, |
|
447 ETLV_Lc, |
|
448 ETLV_Data, |
|
449 ETLV_Le, |
|
450 ETLV_RApduData, |
|
451 ETLV_StatusWordSW1, |
|
452 ETLV_StatusWordSW2, |
|
453 ETLV_TimerIdentifier, |
|
454 ETLV_TimerValue, |
|
455 ETLV_DateTimeAndTimeZone, |
|
456 ETLV_AtCommand, |
|
457 ETLV_AtResponse, |
|
458 ETLV_BcRepeatIndicatorValues, |
|
459 ETLV_DtmfString, |
|
460 ETLV_Language, |
|
461 ETLV_MeStatus, |
|
462 ETLV_TimingAdvance, |
|
463 ETLV_BrowserIdentity, |
|
464 ETLV_Url, |
|
465 ETLV_ListOfBearers, |
|
466 ETLV_PathToProvisioningFile, |
|
467 ETLV_BrowserTerminationCause, |
|
468 ETLV_BearerType, |
|
469 ETLV_BearerParameters, |
|
470 ETLV_ChannelDataString, |
|
471 ETLV_ChannelDataLength, |
|
472 ETLV_BufferSize, |
|
473 ETLV_ChannelStatus, |
|
474 ETLV_IdentifierOfCardReader, |
|
475 ETLV_TypeOfAddress, |
|
476 ETLV_Address, |
|
477 ETLV_TransportProtocolType, |
|
478 ETLV_PortNumber, |
|
479 ETLV_NetworkAccessName, |
|
480 ETLV_CallControlRequestedAction, |
|
481 ETLV_Atr, |
|
482 ETLV_AID |
|
483 }; |
|
484 |
|
485 #endif |
|
486 |
|
487 #ifndef CTLV_H |
|
488 #define CTLV_H |
|
489 |
|
490 // DESCRIPTION |
|
491 // TLV Base class. methods common for CTlv and CBerTlv |
|
492 |
|
493 class CTlvBase : public CBase |
|
494 { |
|
495 public: |
|
496 |
|
497 /** |
|
498 * Constructor |
|
499 */ |
|
500 CTlvBase(); |
|
501 |
|
502 /** |
|
503 * Get pointer to TLV data |
|
504 * @return Pointer to TLV data |
|
505 */ |
|
506 TPtrC8 Data() const; |
|
507 |
|
508 /** |
|
509 * Set TLV data |
|
510 * @param aData: Data to be inserted |
|
511 * @return None |
|
512 */ |
|
513 void SetData( TPtrC8 aData ); |
|
514 |
|
515 /** |
|
516 * Get total size, including tag |
|
517 * @return size |
|
518 */ |
|
519 TInt GetSize() const; |
|
520 |
|
521 /** |
|
522 * Get tag part of TLV |
|
523 * @return tag value |
|
524 */ |
|
525 TUint8 GetTag() const; |
|
526 |
|
527 /** |
|
528 * Returns true if comprehension flag is on |
|
529 * @return boolean |
|
530 */ |
|
531 TBool GetComprehensionRequired() const; |
|
532 |
|
533 /** |
|
534 * Get length part of TLV |
|
535 * @return length |
|
536 */ |
|
537 TUint8 GetLength () const; |
|
538 |
|
539 /** |
|
540 * Get value part of TLV |
|
541 * @return value |
|
542 */ |
|
543 TPtrC8 GetValue() const; |
|
544 |
|
545 protected: // Data |
|
546 |
|
547 TPtrC8 iData; |
|
548 }; |
|
549 |
|
550 |
|
551 // DESCRIPTION |
|
552 // CTlv contains methods to read simple TLV data |
|
553 |
|
554 class CTlv : public CTlvBase |
|
555 { |
|
556 public: // Constructor |
|
557 |
|
558 /** |
|
559 * Default constructor |
|
560 */ |
|
561 IMPORT_C CTlv(); |
|
562 |
|
563 public: // Methods |
|
564 |
|
565 /** |
|
566 * Returns short info defined by aType. |
|
567 * @param aType: wanted data type. |
|
568 * @return wanted data. |
|
569 */ |
|
570 IMPORT_C TUint8 GetShortInfo( TTlvSpesificDataType aType ); |
|
571 |
|
572 /** |
|
573 * Returns the Data defined by aType. Index and length of the |
|
574 * data depends on data type. |
|
575 * @param aType: data type. |
|
576 * @return pointer to the data. |
|
577 */ |
|
578 IMPORT_C TPtrC8 GetData( TTlvSpesificDataType aType ); |
|
579 |
|
580 /** |
|
581 * Returns long info by aType. |
|
582 * @param aType: data type. |
|
583 * @return returned data |
|
584 */ |
|
585 IMPORT_C TUint16 GetLongInfo( TTlvSpesificDataType aType ); |
|
586 }; |
|
587 |
|
588 #endif |
|
589 |
|
590 #ifndef CBERTLV_H |
|
591 #define CBERTLV_H |
|
592 |
|
593 // DESCRIPTION |
|
594 // CBerTlv contains methods to read BER-TLV data |
|
595 |
|
596 class CBerTlv : public CTlvBase |
|
597 { |
|
598 |
|
599 public: // Constructor |
|
600 |
|
601 /** |
|
602 * Default constructor |
|
603 */ |
|
604 IMPORT_C CBerTlv(); |
|
605 |
|
606 public: // Methods |
|
607 |
|
608 /** |
|
609 * Find TLV by tag value |
|
610 * @param aTlv: |
|
611 * @param aTlvTag: TlvTag |
|
612 * @param aItemNbr: number of requested TLV, default is 0 |
|
613 * @return TInt: KErrNone or KErrNotFound |
|
614 */ |
|
615 IMPORT_C TInt TlvByTagValue( CTlv* aTlv, TUint8 aTlvTag, |
|
616 TInt aItemNbr = 0 ); |
|
617 |
|
618 /** |
|
619 * Find several TLVs by tag value |
|
620 * @param aSubBlock: retruns TLVs |
|
621 * @param aSubBlockId: TlvTag |
|
622 * @return TInt: KErrNone or KErrNotFound |
|
623 */ |
|
624 IMPORT_C TInt TlvByTagValueMulti( CTlv* aTlv, TUint8 aTlvTag ); |
|
625 }; |
|
626 |
|
627 #endif |
|
628 |
|
629 #ifndef TSATUTILITY_H |
|
630 #define TSATUTILITY_H |
|
631 |
|
632 // CONSTANTS |
|
633 const TUint8 KZeroCharacterCode = 0x30; |
|
634 const TUint8 KPacked7BitTextMask = 0x0C; |
|
635 const TUint8 KCrShiftedOneBitToLeft = 0x1A; |
|
636 const TUint8 KUCS2TextCodingMask = 0x08; |
|
637 const TUint8 KUCS2ArabicCoding = 0x80; |
|
638 const TUint8 KUCS2GreekCoding = 0x81; |
|
639 const TUint8 KUCS2TurkishCoding = 0x82; |
|
640 // The card ID is always zero as long as only one supported |
|
641 const TUint8 KCardId0 = 0x00; |
|
642 |
|
643 // From 3GPP TS 51.11, 9.4.2 Responses to commands which are postponed |
|
644 const TUint8 KSw1SatBusy = 0x93; |
|
645 |
|
646 // From 3GPP TS 03.40, 9.2.3.22 TP Failure Cause (TP FCS) |
|
647 // SMS-PP SIM DDL error |
|
648 const TUint8 KSmsPpSimDdlError = 0xD5; |
|
649 // SMSP-PP SAT busy |
|
650 const TUint8 KSmsPpSatBusy = 0xD4; |
|
651 |
|
652 // From 3GPP TS 11.11, 9.4 Status conditions returned by the card |
|
653 const TUint8 KSw1NormalEnding = 0x90; |
|
654 const TUint8 KSw2NormalEnding = 0x00; |
|
655 |
|
656 // From 3GPP TS 11.10-4, 27.22.8 MO SHORT MESSAGE CONTROL BY SIM |
|
657 const TUint8 KMoSmCtrlResultAllowed = 0x00; |
|
658 const TUint8 KMoSmCtrlResultNotAllowed = 0x01; |
|
659 const TUint8 KMoSmCtrlResultAllowedWithModifications = 0x02; |
|
660 |
|
661 // From 3GPP TS 22.030 7.0.0 Structure of the MMI (Annex B) |
|
662 const TUint16 KSsAllForwardings = 0x0002; |
|
663 const TUint16 KSsAllCondForwardings = 0x0004; |
|
664 const TUint16 KSsForwUnconditional = 0x0015; |
|
665 const TUint16 KSsForwBusy = 0x0043; |
|
666 const TUint16 KSsForwNoReply = 0x003D; |
|
667 const TUint16 KSsForwNotReachable = 0x003E; |
|
668 |
|
669 // TON NPI |
|
670 // This just indicates that the TON NPI value is not set, TSY specific def. |
|
671 const TUint8 KTonNpiNotSet = 0xff; |
|
672 // From 3GPP TS 27.007-460, 8.33 Set Voice Call Number +CSVM |
|
673 const TUint8 KTonNpiInternational = 0x91; |
|
674 const TUint8 KTonNpiUnknown = 0x81; |
|
675 |
|
676 // General string length limitations |
|
677 const TUint8 KMaxAddressLength = 255; |
|
678 // From 3GPP TS 23.038-450, 6.1.2.3 USSD packing |
|
679 // String max length 160b + additional info in TR (1b) and DCS in PCmd (1b) |
|
680 const TUint8 KMaxUssdStringLengthInChars = 182; |
|
681 const TUint8 KMaxUssdStringLengthInBytes = 161; |
|
682 // Etel accepts SS strings with maximum length 242 |
|
683 const TUint8 KMaxSSStringLength = 242; |
|
684 const TUint8 KSizeOfConversionArray = 63; |
|
685 const TUint8 KNumberMaxLength = 123; |
|
686 const TUint8 KOperatorCodeLength = 3; |
|
687 const TUint8 KAsciiBcdTableLength = 15; |
|
688 |
|
689 // This applies for Parameters, DCS and Protocol ID (3GPP TS 23.038, 5 CBS Data |
|
690 // Coding Scheme; 3GPP TS 23.040, 9.2.3.9 TP Protocol Identifier (TP PID); |
|
691 // 3GPP TS 23.040, 9.2.3.1 - 9.2.3.5 |
|
692 const TUint8 KSmsTpduByteUnknownOrReserved = 0xFF; |
|
693 |
|
694 // Constants used in bit operations |
|
695 const TUint8 KMaskF0 = 0xF0; |
|
696 |
|
697 // Bcd->ascii translation table |
|
698 static const TUint8 KAscii[16] = |
|
699 { |
|
700 '0', '1', '2', '3', '4', '5', '6', '7', |
|
701 '8', '9', '*', '#', 'p', 'w', '.', 0 |
|
702 }; |
|
703 |
|
704 // 3GPP TS 11.11, EFadn |
|
705 static const TUint8 KAsciiToBCD[KAsciiBcdTableLength][2] = |
|
706 { |
|
707 { '0', 0x00 }, { '1', 0x01 }, { '2', 0x02 }, { '3', 0x03 }, |
|
708 { '4', 0x04 }, { '5', 0x05 }, { '6', 0x06 }, { '7', 0x07 }, |
|
709 { '8', 0x08 }, { '9', 0x09 }, { '*', 0x0A }, { '#', 0x0B }, |
|
710 { 'p', 0x0C }, /*DTMF*/ |
|
711 { 'w', 0x0D }, /*Wild*/ |
|
712 { '.', 0x0E }, /*RFU*/ }; |
|
713 |
|
714 // GSM 7-bit ->unicode translation table |
|
715 // See 3GPP TS 23.038 |
|
716 static const TUint16 KUnicode[128] = |
|
717 { |
|
718 0x0040, 0x00A3, 0x0024, 0x00A5, 0x00E8, 0x00E9, 0x00F9, 0x00EC, |
|
719 0x00F2, 0x00C7, 0x000A, 0x00D8, 0x00F8, 0x000D, 0x00C5, 0x00E5, |
|
720 0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8, |
|
721 0x03A3, 0x0398, 0x039E, 0x001B, 0x00C6, 0x00E6, 0x00DF, 0x00C9, |
|
722 0x0020, 0x0021, 0x0022, 0x0023, 0x00A4, 0x0025, 0x0026, 0x0027, |
|
723 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, |
|
724 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, |
|
725 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, |
|
726 0x00A1, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, |
|
727 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, |
|
728 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, |
|
729 0x0058, 0x0059, 0x005A, 0x00C4, 0x00D6, 0x00D1, 0x00DC, 0x00A7, |
|
730 0x00BF, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, |
|
731 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, |
|
732 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, |
|
733 0x0078, 0x0079, 0x007A, 0x00E4, 0x00F6, 0x00F1, 0x00FC, 0x00E0 |
|
734 }; |
|
735 |
|
736 |
|
737 static const TUint16 KUnicode16ToSms7[63][2] = |
|
738 { |
|
739 { 0x0040, 0x00 }, { 0x00A3, 0x01 }, { 0x0024, 0x02 }, { 0x00A5, 0x03 }, |
|
740 { 0x00E8, 0x04 }, { 0x00E9, 0x05 }, { 0x00F9, 0x06 }, { 0x00EC, 0x07 }, |
|
741 { 0x00F2, 0x08 }, { 0x00C7, 0x09 }, { 0x00D8, 0x0B }, { 0x00F8, 0x0C }, |
|
742 { 0x21B5, 0x0D }, { 0x000D, 0x0D }, { 0x2029, 0x0D }, { 0x00C5, 0x0E }, |
|
743 { 0x00E5, 0x0F }, { 0x0394, 0x10 }, { 0x005F, 0x11 }, { 0x03A6, 0x12 }, |
|
744 { 0x0393, 0x13 }, { 0x039B, 0x14 }, { 0x03A9, 0x15 }, { 0x03A0, 0x16 }, |
|
745 { 0x03A8, 0x17 }, { 0x03A3, 0x18 }, { 0x0398, 0x19 }, { 0x039E, 0x1A }, |
|
746 { 0x00C6, 0x1C }, { 0x00E6, 0x1D }, { 0x00DF, 0x1E }, { 0x00C9, 0x1F }, |
|
747 { 0x00A4, 0x24 }, { 0x00A1, 0x40 }, { 0x00C4, 0x5B }, { 0x00D6, 0x5C }, |
|
748 { 0x00D1, 0x5D }, { 0x00DC, 0x5E }, { 0x00A7, 0x5F }, { 0x00BF, 0x60 }, |
|
749 { 0x00E4, 0x7B }, { 0x00F6, 0x7C }, { 0x00F1, 0x7D }, { 0x00FC, 0x7E }, |
|
750 { 0x00E0, 0x7F }, { 0x007B, 0x1B }, { 0x007B, 0x28 }, { 0x007D, 0x1B }, |
|
751 { 0x007D, 0x29 }, { 0x005B, 0x1B }, { 0x005B, 0x3C }, { 0x007E, 0x1B }, |
|
752 { 0x007E, 0x3D }, { 0x005D, 0x1B }, { 0x005D, 0x3E }, { 0x005C, 0x1B }, |
|
753 { 0x005C, 0x2F }, { 0x005E, 0x1B }, { 0x005E, 0x14 }, { 0x007C, 0x1B }, |
|
754 { 0x007C, 0x40 }, { 0x20AC, 0x1B }, { 0x20AC, 0x65 } |
|
755 }; |
|
756 |
|
757 // SMS data coding schemes |
|
758 enum TSmsDcs |
|
759 { |
|
760 ESmsUnknownOrReservedDcs = KSmsTpduByteUnknownOrReserved, |
|
761 ESms7BitDcs = 0x00, |
|
762 ESms8BitDcs = 0x04, |
|
763 ESms16BitDcs = 0x08 |
|
764 }; |
|
765 |
|
766 // DESCRIPTION |
|
767 /** |
|
768 * This class includes small aid fuctions |
|
769 * @since S60 3.1 |
|
770 */ |
|
771 class TSatUtility |
|
772 { |
|
773 |
|
774 public: // New functions |
|
775 |
|
776 /** |
|
777 * Map TON and NPI to RSat TON and NPI values |
|
778 * @param aTonAndNpi: Source TON and NPI |
|
779 * @param aTon: Mapped Type of number |
|
780 * @param aNpi: Mapped Numbering plan |
|
781 */ |
|
782 IMPORT_C static void TonAndNpi( TInt aTonAndNpi, |
|
783 RSat::TTypeOfNumber* aTon, |
|
784 RSat::TNumberingPlan* aNpi ); |
|
785 |
|
786 /** |
|
787 * Converts 7-bit packed string to 8-bit unpacked format |
|
788 * @param aSource: Pointer to the const data |
|
789 * @param aTarget converted 8-bit unpacked string |
|
790 * @return KErrNone or KErrOverflow if string was too long |
|
791 */ |
|
792 IMPORT_C static TInt Packed7to8Unpacked( const TPtrC8 aSource, |
|
793 TDes8& aTarget ); |
|
794 |
|
795 /** |
|
796 * Converts UCS2 string to 7-bit packed format |
|
797 * @param aInput: is source |
|
798 * @param aOutput: converted 7-bit packed string |
|
799 */ |
|
800 IMPORT_C static void UCSToPacked7( const TPtrC aInput, |
|
801 TDes8& aOutput ); |
|
802 |
|
803 /** |
|
804 * Converts Binary Coded Decimal to ASCII |
|
805 * @param aInput is source |
|
806 * @param aOutput converted 8-bit string |
|
807 * @return KErrNone or KErrOverflow if string was too long |
|
808 */ |
|
809 IMPORT_C static TInt BCDToAscii( const TPtrC8 aInput, TDes8& aOutput ); |
|
810 |
|
811 /** |
|
812 * Converts Ascii string to Binary Coded Decimal |
|
813 * @param aInput is source |
|
814 * @param aOutput converted 8-bit string |
|
815 * @return KErrNone or KErrOverflow if string was too long |
|
816 */ |
|
817 IMPORT_C static TInt AsciiToBCD( const TDesC8& aInput, |
|
818 TDes8& aOutput ); |
|
819 |
|
820 /** |
|
821 * Remove Wild 'w' and Expansion digit '.' from EFadn string. |
|
822 * @param aInput is source |
|
823 * @param aOutput converted 8-bit string |
|
824 */ |
|
825 IMPORT_C static void RemoveWildAndExpansionDigit( const TPtrC8 aInput, |
|
826 TDes8& aOutput ); |
|
827 |
|
828 /** |
|
829 * Set Alpha identifier as a Unicode text string |
|
830 * and according to the alphabet used |
|
831 * @param aRawData input data that was extracted with |
|
832 * ETLV_AlphaIdentifier |
|
833 * @param aAlphaId output |
|
834 */ |
|
835 IMPORT_C static void SetAlphaId( const TPtrC8 aRawData, TDes& aAlphaId ); |
|
836 |
|
837 /** |
|
838 * Convert integer to BCD format. If number is more than 100 only last |
|
839 * two digits is converted. |
|
840 * @param aTime time |
|
841 * @return converted BCD value |
|
842 */ |
|
843 IMPORT_C static TUint8 ConvertToSemiOctet( const TInt aTime ); |
|
844 |
|
845 /** |
|
846 * Browse a text in Unicode format, and for some specific characters |
|
847 * replace with the correct byte value |
|
848 * @param aInput: GSM 7 bit default alphabet string |
|
849 * @param aOutput: Unicode 16 string |
|
850 */ |
|
851 IMPORT_C static void Convert7BitToUnicode16( const TDesC8& aInput, |
|
852 TDes16& aOutput ); |
|
853 |
|
854 /** |
|
855 * Converts unicode16 string to 7 bit character mode |
|
856 * @param aInput: Unicode 16 string |
|
857 * @param aOutput: Resulting GSM 7 bit default alphabet string |
|
858 * @return KErrNone or KErrOverflow (input string is too long) |
|
859 */ |
|
860 IMPORT_C static TInt ConvertUnicode16To7Bit( const TDesC16& aInput, |
|
861 TDes8& aOutput ); |
|
862 |
|
863 /** |
|
864 * Fill in a TDuration structure |
|
865 * @param aBerTlv tlv containing duration data |
|
866 * @param aTDuration duration structure |
|
867 */ |
|
868 IMPORT_C static void FillDurationStructure( CBerTlv& aBerTlv, |
|
869 RSat::TDuration& aTDuration ); |
|
870 |
|
871 /** |
|
872 * Fill in a TIconId structure |
|
873 * @param aBerTlv data containing icon address data |
|
874 * @param aTIconId icon id structure |
|
875 * @param aItemNmb item number |
|
876 */ |
|
877 IMPORT_C static void FillIconStructure( CBerTlv& aBerTlv, |
|
878 RSat::TIconId& aTIconId, const TInt aItemNmb = 0 ); |
|
879 |
|
880 /** |
|
881 * Set Text string as a Unicode text string |
|
882 * @param aTextString text string |
|
883 * @param aText unicode output text string |
|
884 */ |
|
885 IMPORT_C static void SetText( CTlv& aTextTlv, TDes& aUnicodeOutput ); |
|
886 |
|
887 /** |
|
888 * Convert Alpha field text string to a Unicode text string. |
|
889 * @param aSource text string |
|
890 * @param aText unicode output text string |
|
891 */ |
|
892 IMPORT_C static void ConvertAlphaFieldsToUnicode( |
|
893 const TDesC8& aSource, TDes& aTarget ); |
|
894 |
|
895 /** |
|
896 * Copy from 16 bit descriptor to 8 bit descriptor with little endian. |
|
897 * Function uses Append method. |
|
898 * @param aSource: source |
|
899 * @param aTarget: target |
|
900 * @return KErrNone or KErrOverflow if string was too long |
|
901 */ |
|
902 IMPORT_C static TInt Copy16to8LE( const TDesC16& aSource, |
|
903 TDes8& aTarget ); |
|
904 |
|
905 /** |
|
906 * Copy from 8 bit descriptor to 16 bit descriptor with little endian. |
|
907 * Function uses Append method. |
|
908 * @param aSource: source |
|
909 * @param aTarget: target |
|
910 * @return KErrNone or KErrOverflow if string was too long |
|
911 */ |
|
912 IMPORT_C static TInt Copy8to16LE( const TDesC8& aSource, |
|
913 TDes16& aTarget ); |
|
914 |
|
915 /** |
|
916 * Finds whether the data coding scheme, coded in CBS format, |
|
917 * is 7-bit, 8-bit or 16-bit |
|
918 * @param aDcs Input data coding scheme |
|
919 * @return Converted DCS ( SMS format ) |
|
920 */ |
|
921 IMPORT_C static TSmsDcs DecodeCbsDcs( const TUint8 aDcs ); |
|
922 |
|
923 /** |
|
924 * Gets 8 bit byte and copy it to the 16 bit byte with right endian. |
|
925 * @param aSource: source |
|
926 * @param aTarget: target |
|
927 * @param aIndex: index |
|
928 * @return KErrNone or KErrOverflow if string was too long |
|
929 */ |
|
930 IMPORT_C static TInt CopyTwo8toOne16LE( const TDesC8& aSource, |
|
931 TUint16& aTarget, const TInt aIndex ); |
|
932 }; |
|
933 |
|
934 #endif |
|
935 |
|
936 const TUint8 KLaunchBrowserCmdQualifierNotUsed = 0x01; |
|
937 const TUint8 KLaunchBrowserCmdQualifierReserved = 0x04; |
|
938 const TUint8 KCsdBearer = 0x01; |
|
939 const TUint8 KGprsBearer = 0x03; |
|
940 |
|
941 const TUint8 KOnlyIfNotBusy = 0x00; |
|
942 const TUint8 KOnlyIfNotBusyWithRedial = 0x01; |
|
943 const TUint8 KHoldOtherCalls = 0x02; |
|
944 const TUint8 KHoldOtherCallsWithRedial = 0x03; |
|
945 const TUint8 KDisconnectOtherCalls = 0x04; |
|
946 const TUint8 KDisconnectOtherCallsWithRedial = 0x05; |
|
947 |
|
948 const TUint8 KSpecificLanguage = 0x01; |
|
949 const TUint8 KBipCsdBearer = 0x01; |
|
950 const TUint8 KBipGprsBearer = 0x02; |
|
951 const TUint8 KBipDefaultBearer = 0x03; |
|
952 const TUint8 KBipLocalLinkBearer = 0x04; |
|
953 const TUint8 KBipSendDataImmediately = 0x01; |
|
954 |
|
955 const TUint8 KNoCause = 0x00; |
|
956 const TUint8 KSmsVPFRelative = 0x10; |
|
957 const TUint8 KSmsVPFEnhanced = 0x08; |
|
958 const TUint8 KSmsVPFAbsolute = 0x18; |
|
959 //const TUint8 KMaxAddressLength = 255; |
|
960 const TUint8 KMaxCommandDetailsLength = 5; |
|
961 const TInt KImeiLength=16; //the structure defined in CSatNotifyLocalInfo was 16 bytes however ETSI TS 123 003 V7.7.0 specifies 15 bytes for IMEIs. |
|
962 //const TUint8 KOperatorCodeLength = 3; |
|
963 const TUint8 KAdditionalInfoMaxSize = 244; |
|
964 |
|
965 typedef TBuf8<KImeiLength> TImeiBuf; |
|
966 |
|
967 const TUint8 KMaxBccLength = 16; |
|
968 const TUint16 KMaxLengthDefaultBearerData = 258; |
|
969 |
|
970 |
|
971 // Max address length |
|
972 const TUint8 KAddrMaxLength = 255; |
|
973 |
|
974 /* |
|
975 * This structure contains local information. |
|
976 * Used in event handling and by CSatNotifyLocalInfo |
|
977 */ |
|
978 struct TLocalInformation |
|
979 { |
|
980 TUint16 iLocationAreaCode; // Location area code |
|
981 TUint16 iCellId; // Cell Id |
|
982 TBuf8<KOperatorCodeLength> iOperatorCode; // Operator code |
|
983 }; |
|
984 |
|
985 |
|
986 struct TTerminalRespData |
|
987 { |
|
988 // Proactive command number |
|
989 TUint8 iPCmdNumber; |
|
990 // Command details tlv |
|
991 TBuf8<KMaxCommandDetailsLength>iCommandDetails; |
|
992 // General result for NotifySetUpEventList |
|
993 TUint8 iGeneralResult; |
|
994 // Additional info |
|
995 TBuf<KAdditionalInfoMaxSize> iAdditionalInfo; |
|
996 }; |
|
997 |
|
998 //icon defs |
|
999 const TUint8 KGetIconDataPckgLength = 2; |
|
1000 const TUint8 KIconInfoLength = 6; |
|
1001 const TUint8 KBasicIconDataLength = 2; |
|
1002 const TUint8 KColourIconDataLength = KIconInfoLength; |
|
1003 const TUint8 KFilePathLength = 8; |
|
1004 /** |
|
1005 * Used for Location Status |
|
1006 */ |
|
1007 const TUint8 KCountryCodeLength = 3; |
|
1008 |
|
1009 |
|
1010 /* |
|
1011 * The data in this structure contains information |
|
1012 * needed in Get Icon, Get image instance and get clut. |
|
1013 */ |
|
1014 struct TIconInfo |
|
1015 { |
|
1016 TUint16 iOffset; // Offset |
|
1017 TUint16 iLength; // Length |
|
1018 TBuf8<KFilePathLength> iSimFilePath; // Sim file path |
|
1019 }; |
|
1020 |
|
1021 |
|
1022 enum TSsStatus |
|
1023 { |
|
1024 ENotBusy, |
|
1025 ESsBusy, |
|
1026 EUssdBusy |
|
1027 }; |
|
1028 |
|
1029 enum TCachedSimAtkFiles |
|
1030 { |
|
1031 ECacheEFSST = 0x01, // EF-SST, (U)SIM Service table |
|
1032 ECacheEFCBMID = 0x02,// EF-CBMID, CB DataDownload message IDs |
|
1033 // Next 0x04, 0x08 etc.. |
|
1034 }; |
|
1035 |
|
1036 /** |
|
1037 * This Structure provides Refresh specific information |
|
1038 * Used: CSatNotifyRefresh::RefreshAllowed() |
|
1039 */ |
|
1040 |
|
1041 struct TRefreshInfo |
|
1042 { |
|
1043 TBuf8<RSat::KRefreshedFileListMaxSize> iFileList; |
|
1044 TBuf8<RSat::KAidMaxSize> iAid; |
|
1045 TUint16 iInternalCache; |
|
1046 }; |
|
1047 |
|
1048 /* |
|
1049 * This structure contains data needed for LocationStatus |
|
1050 * envelope. (used by EventDownload and MoSmContol) |
|
1051 */ |
|
1052 struct TLocationStatusEnvelope |
|
1053 { |
|
1054 TUint8 iLocationStatus; // Location satus |
|
1055 TBuf8<KCountryCodeLength> iCountryCode; // Country code |
|
1056 TUint16 iLocationAreaCode;// Location area code |
|
1057 TUint16 iCellId; // Cell id |
|
1058 }; |
|
1059 |
|
1060 |
|
1061 const TUint8 KMaxCauseLength = 248; |
|
1062 |
|
1063 /** |
|
1064 * This structure contains data needed for CallDisconnected |
|
1065 * envelope. |
|
1066 */ |
|
1067 struct TCallDisconnectedEnvelope |
|
1068 { |
|
1069 TUint8 iCmdNumber; // Command number |
|
1070 TBool iNearEnd; // MO flag |
|
1071 TBool iCauseGiven; // Cause given |
|
1072 TBuf8<KMaxCauseLength> iCause; // Cause |
|
1073 }; |
|
1074 |
|
1075 /** |
|
1076 * This structure contains data needed for MTCall |
|
1077 * envelope. |
|
1078 */ |
|
1079 struct TMTCallEnvelope |
|
1080 { |
|
1081 TUint8 iCmdNumber; // Command number |
|
1082 TUint8 iTONandNPI; // Ton and Npi |
|
1083 TBuf8<KNumberMaxLength> iDiallingNumber;// Calling Party BCD number |
|
1084 TPtrC8 iCalledPartySubAddress; // Calling Party Subaddress |
|
1085 }; |
|
1086 |
|
1087 /* |
|
1088 * This structure contains the address data of the service center |
|
1089 * needed for MO-SMS Control envelope. |
|
1090 */ |
|
1091 struct TAddressData |
|
1092 { |
|
1093 TPtrC8 iRPDestinationAddr; // RP Destination Address |
|
1094 TPtrC8 iTPDestinationAddr; // TP Destination Address |
|
1095 }; |
|
1096 |
|
1097 /** |
|
1098 * The data in this structure is used for a response to the NAA for a |
|
1099 * MO SM Control notification request. The possible values of the |
|
1100 * result are defined in TSatUtility.h |
|
1101 */ |
|
1102 struct TMoSmCtrlData |
|
1103 { |
|
1104 TAddressData iAddressData; // RP and TP Destination addresses |
|
1105 RSat::TAlphaId* iAlphaId; // Pointer to the Alpha ID object |
|
1106 TBool iIsAlphaIdEmpty; // Declares id Alpha ID is empty |
|
1107 TUint8 iResult; // MO SM Ctrl Result, |
|
1108 }; |
|
1109 |
|
1110 |
|
1111 /* |
|
1112 * This structure contains information needed in constructing Call |
|
1113 * Control (call/SS/USSD) Envelope and handling the call control events. |
|
1114 */ |
|
1115 struct TCCInfo |
|
1116 { |
|
1117 TUint8 iTag; // Tag of envelope |
|
1118 TBuf8<KMaxBccLength> iBcc1; // For storing bearer capability 1 |
|
1119 TBuf8<KMaxBccLength> iBcc2; // For storing bearer capability 2 |
|
1120 TBuf8<KMaxAddressLength> iAddress; // For storing address |
|
1121 TUint8 iTonNpi; // For storing ton&npi |
|
1122 TUint8 iDcs; // For storing DCS (only USSD) |
|
1123 }; |
|
1124 |
|
1125 |
|
1126 typedef TBuf8<16> TNmrBuf; |
|
1127 typedef TBuf<32> TBcchListBuf; |
|
1128 |
|
1129 // Cell Broadcast isi msg length |
|
1130 const TUint8 KCbsMsgMaxLength = 92; |
|
1131 |
|
1132 |
|
1133 // -------------- |
|
1134 |
|
1135 // INCLUDES |
|
1136 #include <e32base.h> // Etel base |
|
1137 |
|
1138 // CONSTANTS |
|
1139 |
|
1140 // The internal SAT IPC values are agreed to be between 1001600 - 1002000 |
|
1141 // See ETel_Telephony_Server_Design.doc, chapter 6.3 Policing Custom APIs |
|
1142 const TInt KSatInternalIpcOffset = 1001600; |
|
1143 const TInt KSatInternalIpcMaxOffset = 1002000; |
|
1144 |
|
1145 // Contains IPC definitions used by SAT TSY Layering. |
|
1146 |
|
1147 // TSatTsyLayerIPC enumerates IPC values used by SAT API. |
|
1148 enum TSatTsyLayerIPC |
|
1149 { |
|
1150 ESatTsyReady = KSatInternalIpcOffset, |
|
1151 ESatTsyPCmd, |
|
1152 ESatTsyTimerExpiredIPC, |
|
1153 ESatTsyGetIfPendingNotification, |
|
1154 ESatTsyGetBearerCapability, |
|
1155 ESatTsyGetIMEI, // 1001605 |
|
1156 ESatTsyTimeZone, |
|
1157 ESatTsyTimingAdvance, |
|
1158 ESatTsyCreateEnvelope, |
|
1159 ESatTsySendEnvelope, |
|
1160 ESatTsyEnvelopeError, // 1001610 |
|
1161 ESatTsyMoSmControlEnvelope, |
|
1162 ESatTsyCallConnected, |
|
1163 ESatTsyCallDisconnected, |
|
1164 ESatTsyLocationStatus, |
|
1165 ESatTsyMTCall, // 1001615 |
|
1166 ESatTsyAccessTechnologyChange, |
|
1167 ESatTsyCellBroadcast, |
|
1168 ESatTsySmsPpDdl, |
|
1169 ESatTsyReadCbmids, |
|
1170 ESatTsyNetStatus, // 1001620 |
|
1171 ESatTsyProvideLocalInfo, |
|
1172 ESatTsyLocalInformationNmr, |
|
1173 ESatTsyAccTech, |
|
1174 ESatTsyNotifyLocalInfo, |
|
1175 ESatTsyServiceRequest, // 1001625 |
|
1176 ESatTsyRefresh, |
|
1177 ESatTsyCompleteRefresh, |
|
1178 ESatTsySetPolling, |
|
1179 ESatTsySetProactiveCommandOnGoingStatus, |
|
1180 ESatTsyGetIconData, // 1001630 |
|
1181 ESatTsyGetImageInstance, |
|
1182 ESatTsyGetClut, |
|
1183 ESatTsyCallControlActivation, |
|
1184 ESatTsyMoSmsControlActivation, |
|
1185 ESatTsyUssdControlActivation, // 1001635 |
|
1186 ESatTsySmsPpDdlStatus, |
|
1187 ESatTsySsStatus, |
|
1188 ESatTsyUssdStatus, |
|
1189 ESatTsyImsiChanged, |
|
1190 ESatTsyCheckAtkDataForAlphaId, // 1001640 |
|
1191 ESatTsyCallEvent, |
|
1192 ESatTsySSEvent, |
|
1193 ESatTsyUSSDEvent, |
|
1194 ESatTsyEmergencyNbrCheck, |
|
1195 ESatTsyFdnStatusCheck, // 1001645 |
|
1196 ESatTsyRemoveEventList, |
|
1197 ESatTsySmsDeliverReport |
|
1198 }; // end enum TSatTsyLayerIPC |
|
1199 |
|
1200 |
|
1201 #endif /*SAT_DEFS_H_*/ |