|
1 /* |
|
2 * Copyright (c) 2005-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "T_DataCommsBase.h" |
|
19 |
|
20 // Epoc includes |
|
21 #include <in_sock.h> |
|
22 #include <es_sock.h> |
|
23 #include <es_enum.h> |
|
24 #include <bt_sock.h> |
|
25 #include <cs_subconevents.h> |
|
26 |
|
27 /*@{*/ |
|
28 /// Constant Literals used. |
|
29 _LIT(KInterfaceDownBuf, "EInterfaceDown"); |
|
30 |
|
31 // TConnectionType |
|
32 _LIT(KConnectionCSD , "EConnectionCSD "); |
|
33 _LIT(KConnectionGPRS, "EConnectionGPRS"); |
|
34 _LIT(KConnectionGPRSR97, "EConnectionGPRSR97"); |
|
35 _LIT(KConnectionGPRSR99, "EConnectionGPRSR99"); |
|
36 _LIT(KConnectionGPRSRel4, "EConnectionGPRSRel4"); |
|
37 _LIT(KConnectionGPRSRel5, "EConnectionGPRSRel5"); |
|
38 //_LIT(KConnectionCDMA, "EConnectionCDMA"); |
|
39 //_LIT(KConnectionCDMA20001xRTT, "EConnectionCDMA20001xRTT"); |
|
40 //_LIT(KConnectionCDMA20001xRTTDO, "EConnectionCDMA20001xRTTDO "); |
|
41 //_LIT(KConnectionCDMA20001xRTTDV, "EConnectionCDMA20001xRTTDV"); |
|
42 //_LIT(KConnectionCDMA20003xRTT, "EConnectionCDMA20003xRTT"); |
|
43 _LIT(KConnectionEthernet, "EConnectionEthernet"); |
|
44 _LIT(KConnectionWLAN, "EConnectionWLAN"); |
|
45 _LIT(KConnectionBTPAN, "EConnectionBTPAN"); |
|
46 |
|
47 // TConnStopType |
|
48 _LIT(KStopAuthoritative, "EStopAuthoritative"); |
|
49 |
|
50 // TConnAttachType |
|
51 _LIT(KAttachTypeMonitor, "EAttachTypeMonitor"); |
|
52 |
|
53 // SockType |
|
54 _LIT(KSockStreamStr, "KSockStream"); |
|
55 _LIT(KSockDatagramStr, "KSockDatagram"); |
|
56 |
|
57 // Protocol |
|
58 _LIT(KProtocolInetTcpStr, "KProtocolInetTcp"); |
|
59 _LIT(KProtocolInetUdpStr, "KProtocolInetUdp"); |
|
60 |
|
61 // AddrFamily |
|
62 _LIT(KAFUnspecStr, "KAFUnspec"); |
|
63 _LIT(KAfInetStr, "KAfInet"); |
|
64 _LIT(KAfInet6Str, "KAfInet6"); |
|
65 |
|
66 // Capability |
|
67 _LIT(ECapabilityTCBStr, "ECapabilityTCB"); |
|
68 _LIT(ECapabilityCommDDStr, "ECapabilityCommDD"); |
|
69 _LIT(ECapabilityPowerMgmtStr, "ECapabilityPowerMgmt"); |
|
70 _LIT(ECapabilityMultimediaDDStr, "ECapabilityMultimediaDD"); |
|
71 _LIT(ECapabilityReadDeviceDataStr, "ECapabilityReadDeviceData"); |
|
72 _LIT(ECapabilityWriteDeviceDataStr, "ECapabilityWriteDeviceData"); |
|
73 _LIT(ECapabilityDRMStr, "ECapabilityDRM"); |
|
74 _LIT(ECapabilityTrustedUIStr, "ECapabilityTrustedUI"); |
|
75 _LIT(ECapabilityProtServStr, "ECapabilityProtServ"); |
|
76 _LIT(ECapabilityDiskAdminStr, "ECapabilityDiskAdmin"); |
|
77 _LIT(ECapabilityNetworkControlStr, "ECapabilityNetworkControl"); |
|
78 _LIT(ECapabilityAllFilesStr, "ECapabilityAllFiles"); |
|
79 _LIT(ECapabilitySwEventStr, "ECapabilitySwEvent"); |
|
80 _LIT(ECapabilityNetworkServicesStr, "ECapabilityNetworkServices"); |
|
81 _LIT(ECapabilityLocalServicesStr, "ECapabilityLocalServices"); |
|
82 _LIT(ECapabilityReadUserDataStr, "ECapabilityReadUserData"); |
|
83 _LIT(ECapabilityWriteUserDataStr, "ECapabilityWriteUserData"); |
|
84 _LIT(ECapabilityLocationStr, "ECapabilityLocation"); |
|
85 _LIT(ECapabilitySurroundingsDDStr, "ECapabilitySurroundingsDD"); |
|
86 _LIT(ECapabilityUserEnvironmentStr, "ECapabilityUserEnvironment"); |
|
87 _LIT(ECapability_LimitStr, "ECapability_Limit"); |
|
88 _LIT(ECapability_HardLimitStr, "ECapability_HardLimit"); |
|
89 _LIT(ECapability_NoneStr, "ECapability_None"); |
|
90 _LIT(ECapability_DeniedStr, "ECapability_Denied"); |
|
91 |
|
92 // ProgressNotification stages |
|
93 _LIT(KStartingSelectionStr, "KStartingSelection"); |
|
94 _LIT(KFinishedSelectionStr, "KFinishedSelection"); |
|
95 _LIT(KConnectionOpenStr, "KConnectionOpen"); |
|
96 _LIT(KLinkLayerOpenStr, "KLinkLayerOpen"); |
|
97 _LIT(KLinkLayerClosedStr, "KLinkLayerClosed"); |
|
98 _LIT(KNonExistentStr, "KNonExistent"); |
|
99 |
|
100 // TSubConnType |
|
101 _LIT(KCreateNew, "ECreateNew"); |
|
102 _LIT(KAttachToDefault, "EAttachToDefault"); |
|
103 |
|
104 // EventGroupUid |
|
105 _LIT(KSubConnGenericEventsImplUidStr, "KSubConnGenericEventsImplUid"); |
|
106 |
|
107 // EventNotification events |
|
108 _LIT(KSubConGenericEventParamsGrantedStr, "KSubConGenericEventParamsGranted"); |
|
109 _LIT(KSubConGenericEventDataClientJoinedStr, "KSubConGenericEventDataClientJoined"); |
|
110 _LIT(KSubConGenericEventDataClientLeftStr, "KSubConGenericEventDataClientLeft"); |
|
111 _LIT(KSubConGenericEventSubConDownStr, "KSubConGenericEventSubConDown"); |
|
112 _LIT(KSubConGenericEventParamsChangedStr, "KSubConGenericEventParamsChanged"); |
|
113 _LIT(KSubConGenericEventParamsRejectedStr, "KSubConGenericEventParamsRejected"); |
|
114 |
|
115 // ParameterSetType |
|
116 |
|
117 _LIT(KAcceptable, "EAcceptable"); |
|
118 _LIT(KRequested, "ERequested"); |
|
119 _LIT(KGranted, "EGranted"); |
|
120 /*@}*/ |
|
121 |
|
122 |
|
123 CT_DataCommsBase::CT_DataCommsBase() |
|
124 { |
|
125 } |
|
126 |
|
127 CT_DataCommsBase::~CT_DataCommsBase() |
|
128 { |
|
129 } |
|
130 |
|
131 void CT_DataCommsBase::RunL( CActive* aActive, TInt /*aIndex*/ ) |
|
132 { |
|
133 ERR_PRINTF2(_L("RunL Stray signal, status = %d"), aActive->iStatus.Int()); |
|
134 SetBlockResult(EFail); |
|
135 } |
|
136 |
|
137 void CT_DataCommsBase::DoCancel( CActive* aActive, TInt /*aIndex*/ ) |
|
138 { |
|
139 ERR_PRINTF2(_L("DoCancel Stray signal, status = %d"), aActive->iStatus.Int()); |
|
140 SetBlockResult(EFail); |
|
141 } |
|
142 |
|
143 void CT_DataCommsBase::MissingParamError( const TDesC& aParamName ) |
|
144 { |
|
145 ERR_PRINTF2(_L("No %S"), &aParamName); |
|
146 SetBlockResult(EFail); |
|
147 } |
|
148 |
|
149 TConnInterfaceState CT_DataCommsBase::InterfaceNotificationState( const TDesC& aState ) |
|
150 { |
|
151 TConnInterfaceState state = EInterfaceUp; |
|
152 if( aState == KInterfaceDownBuf() ) |
|
153 { |
|
154 state = EInterfaceDown; |
|
155 } |
|
156 return state; |
|
157 } |
|
158 |
|
159 TConnectionType CT_DataCommsBase::ConnectionType( const TDesC& aConnectionTypeName ) |
|
160 { |
|
161 TConnectionType connType = EConnectionGeneric; |
|
162 if( aConnectionTypeName == KConnectionCSD() ) |
|
163 { |
|
164 connType = EConnectionCSD; |
|
165 } |
|
166 else if( aConnectionTypeName == KConnectionGPRS() ) |
|
167 { |
|
168 connType = EConnectionGPRS; |
|
169 } |
|
170 else if( aConnectionTypeName == KConnectionGPRSR97() ) |
|
171 { |
|
172 connType = EConnectionGPRSR97; |
|
173 } |
|
174 else if( aConnectionTypeName == KConnectionGPRSR99() ) |
|
175 { |
|
176 connType = EConnectionGPRSR99; |
|
177 } |
|
178 else if( aConnectionTypeName == KConnectionGPRSRel4() ) |
|
179 { |
|
180 connType = EConnectionGPRSRel4; |
|
181 } |
|
182 else if( aConnectionTypeName == KConnectionGPRSRel5() ) |
|
183 { |
|
184 connType = EConnectionGPRSRel5; |
|
185 } |
|
186 /* else if( aConnectionTypeName == KConnectionCDMA() ) |
|
187 { |
|
188 connType = EConnectionCDMA; |
|
189 } |
|
190 else if( aConnectionTypeName == KConnectionCDMA20001xRTT() ) |
|
191 { |
|
192 connType = EConnectionCDMA20001xRTT; |
|
193 } |
|
194 else if( aConnectionTypeName == KConnectionCDMA20001xRTTDO() ) |
|
195 { |
|
196 connType = EConnectionCDMA20001xRTTDO ; |
|
197 } |
|
198 else if( aConnectionTypeName == KConnectionCDMA20001xRTTDV() ) |
|
199 { |
|
200 connType = EConnectionCDMA20001xRTTDV; |
|
201 } |
|
202 else if( aConnectionTypeName == KConnectionCDMA20003xRTT() ) |
|
203 { |
|
204 connType = EConnectionCDMA20003xRTT; |
|
205 }*/ |
|
206 else if( aConnectionTypeName == KConnectionEthernet() ) |
|
207 { |
|
208 connType = EConnectionEthernet; |
|
209 } |
|
210 else if( aConnectionTypeName == KConnectionWLAN() ) |
|
211 { |
|
212 connType = EConnectionWLAN; |
|
213 } |
|
214 else if( aConnectionTypeName == KConnectionBTPAN() ) |
|
215 { |
|
216 connType = EConnectionBTPAN; |
|
217 } |
|
218 return connType; |
|
219 } |
|
220 |
|
221 RConnection::TConnStopType CT_DataCommsBase::ConnectionStopType( const TDesC& aConnectionStopType ) |
|
222 { |
|
223 RConnection::TConnStopType stopType = RConnection::EStopNormal; |
|
224 if( aConnectionStopType == KStopAuthoritative() ) |
|
225 { |
|
226 stopType = RConnection::EStopAuthoritative; |
|
227 } |
|
228 return stopType; |
|
229 } |
|
230 |
|
231 RConnection::TConnAttachType CT_DataCommsBase::ConnectionAttachType( const TDesC& aConnectionAttachType ) |
|
232 { |
|
233 RConnection::TConnAttachType connAttachType = RConnection::EAttachTypeNormal; |
|
234 if( aConnectionAttachType == KAttachTypeMonitor() ) |
|
235 { |
|
236 connAttachType = RConnection::EAttachTypeMonitor; |
|
237 } |
|
238 return connAttachType; |
|
239 } |
|
240 |
|
241 TUint CT_DataCommsBase::ProgressNotificationExpectedStage( const TDesC& aStage) |
|
242 { |
|
243 TUint expectedStage = 0; |
|
244 if ( aStage == KStartingSelectionStr() ) |
|
245 { |
|
246 expectedStage = KStartingSelection; |
|
247 } |
|
248 else if ( aStage == KFinishedSelectionStr() ) |
|
249 { |
|
250 expectedStage = KFinishedSelection; |
|
251 } |
|
252 else if ( aStage == KConnectionOpenStr() ) |
|
253 { |
|
254 expectedStage = KConnectionOpen; |
|
255 } |
|
256 else if ( aStage == KLinkLayerOpenStr() ) |
|
257 { |
|
258 expectedStage = KLinkLayerOpen; |
|
259 } |
|
260 else if ( aStage == KLinkLayerClosedStr() ) |
|
261 { |
|
262 expectedStage = KLinkLayerClosed; |
|
263 } |
|
264 else if ( aStage == KNonExistentStr() ) |
|
265 { |
|
266 expectedStage = 1234; |
|
267 } |
|
268 return expectedStage; |
|
269 } |
|
270 |
|
271 TBool CT_DataCommsBase::GetSockType( const TDesC& aSockTypeStr, TUint& aSockType ) |
|
272 { |
|
273 TBool found = ETrue; |
|
274 |
|
275 if( aSockTypeStr == KSockStreamStr() ) |
|
276 { |
|
277 aSockType = KSockStream; |
|
278 } |
|
279 else if( aSockTypeStr == KSockDatagramStr() ) |
|
280 { |
|
281 aSockType = KSockDatagram; |
|
282 } |
|
283 else |
|
284 { |
|
285 found = EFalse; |
|
286 } |
|
287 |
|
288 return found; |
|
289 } |
|
290 |
|
291 TBool CT_DataCommsBase::GetProtocol( const TDesC& aProtocolStr, TUint& aProtocol ) |
|
292 { |
|
293 TBool found = ETrue; |
|
294 |
|
295 if( aProtocolStr == KProtocolInetTcpStr() ) |
|
296 { |
|
297 aProtocol = KProtocolInetTcp; |
|
298 } |
|
299 else if( aProtocolStr == KProtocolInetUdpStr() ) |
|
300 { |
|
301 aProtocol = KProtocolInetUdp; |
|
302 } |
|
303 else |
|
304 { |
|
305 found = EFalse; |
|
306 } |
|
307 |
|
308 return found; |
|
309 } |
|
310 |
|
311 TBool CT_DataCommsBase::GetAddrFamily( const TDesC& aAddrFamilyStr, TUint& aAddrFamily ) |
|
312 { |
|
313 TBool found = ETrue; |
|
314 |
|
315 if( aAddrFamilyStr == KAFUnspecStr() ) |
|
316 { |
|
317 aAddrFamily = KAFUnspec; |
|
318 } |
|
319 else if( aAddrFamilyStr == KAfInetStr() ) |
|
320 { |
|
321 aAddrFamily = KAfInet; |
|
322 } |
|
323 else if( aAddrFamilyStr == KAfInet6Str() ) |
|
324 { |
|
325 aAddrFamily = KAfInet6; |
|
326 } |
|
327 else |
|
328 { |
|
329 found = EFalse; |
|
330 } |
|
331 |
|
332 return found; |
|
333 } |
|
334 |
|
335 TBool CT_DataCommsBase::GetCapability( const TDesC& aCapabilityStr, TCapability& aCapability ) |
|
336 { |
|
337 TBool found = ETrue; |
|
338 |
|
339 if( aCapabilityStr == ECapabilityTCBStr() ) |
|
340 { |
|
341 aCapability = ECapabilityTCB; |
|
342 } |
|
343 else if( aCapabilityStr == ECapabilityCommDDStr() ) |
|
344 { |
|
345 aCapability = ECapabilityCommDD; |
|
346 } |
|
347 else if( aCapabilityStr == ECapabilityPowerMgmtStr() ) |
|
348 { |
|
349 aCapability = ECapabilityPowerMgmt; |
|
350 } |
|
351 else if( aCapabilityStr == ECapabilityMultimediaDDStr() ) |
|
352 { |
|
353 aCapability = ECapabilityMultimediaDD; |
|
354 } |
|
355 else if( aCapabilityStr == ECapabilityReadDeviceDataStr() ) |
|
356 { |
|
357 aCapability = ECapabilityReadDeviceData; |
|
358 } |
|
359 else if( aCapabilityStr == ECapabilityWriteDeviceDataStr() ) |
|
360 { |
|
361 aCapability = ECapabilityWriteDeviceData; |
|
362 } |
|
363 else if( aCapabilityStr == ECapabilityDRMStr() ) |
|
364 { |
|
365 aCapability = ECapabilityDRM; |
|
366 } |
|
367 else if( aCapabilityStr == ECapabilityTrustedUIStr() ) |
|
368 { |
|
369 aCapability = ECapabilityTrustedUI; |
|
370 } |
|
371 else if( aCapabilityStr == ECapabilityProtServStr() ) |
|
372 { |
|
373 aCapability = ECapabilityProtServ; |
|
374 } |
|
375 else if( aCapabilityStr == ECapabilityDiskAdminStr() ) |
|
376 { |
|
377 aCapability = ECapabilityDiskAdmin; |
|
378 } |
|
379 else if( aCapabilityStr == ECapabilityNetworkControlStr() ) |
|
380 { |
|
381 aCapability = ECapabilityNetworkControl; |
|
382 } |
|
383 else if( aCapabilityStr == ECapabilityAllFilesStr() ) |
|
384 { |
|
385 aCapability = ECapabilityAllFiles; |
|
386 } |
|
387 else if( aCapabilityStr == ECapabilitySwEventStr() ) |
|
388 { |
|
389 aCapability = ECapabilitySwEvent; |
|
390 } |
|
391 else if( aCapabilityStr == ECapabilityNetworkServicesStr() ) |
|
392 { |
|
393 aCapability = ECapabilityNetworkServices; |
|
394 } |
|
395 else if( aCapabilityStr == ECapabilityLocalServicesStr() ) |
|
396 { |
|
397 aCapability = ECapabilityLocalServices; |
|
398 } |
|
399 else if( aCapabilityStr == ECapabilityReadUserDataStr() ) |
|
400 { |
|
401 aCapability = ECapabilityReadUserData; |
|
402 } |
|
403 else if( aCapabilityStr == ECapabilityWriteUserDataStr() ) |
|
404 { |
|
405 aCapability = ECapabilityWriteUserData; |
|
406 } |
|
407 else if( aCapabilityStr == ECapabilityLocationStr() ) |
|
408 { |
|
409 aCapability = ECapabilityLocation; |
|
410 } |
|
411 else if( aCapabilityStr == ECapabilitySurroundingsDDStr() ) |
|
412 { |
|
413 aCapability = ECapabilitySurroundingsDD; |
|
414 } |
|
415 else if( aCapabilityStr == ECapabilityUserEnvironmentStr() ) |
|
416 { |
|
417 aCapability = ECapabilityUserEnvironment; |
|
418 } |
|
419 else if( aCapabilityStr == ECapability_LimitStr() ) |
|
420 { |
|
421 aCapability = ECapability_Limit; |
|
422 } |
|
423 else if( aCapabilityStr == ECapability_HardLimitStr() ) |
|
424 { |
|
425 aCapability = ECapability_HardLimit; |
|
426 } |
|
427 else if( aCapabilityStr == ECapability_NoneStr() ) |
|
428 { |
|
429 aCapability = ECapability_None; |
|
430 } |
|
431 else if( aCapabilityStr == ECapability_DeniedStr() ) |
|
432 { |
|
433 aCapability = ECapability_Denied; |
|
434 } |
|
435 else |
|
436 { |
|
437 found = EFalse; |
|
438 } |
|
439 |
|
440 return found; |
|
441 } |
|
442 |
|
443 TBool CT_DataCommsBase::SubConnectionType( const TDesC& aSubConnTypeStr, RSubConnection::TSubConnType& aSubConnType) |
|
444 { |
|
445 TBool found = ETrue; |
|
446 |
|
447 if( aSubConnTypeStr == KCreateNew() ) |
|
448 { |
|
449 aSubConnType = RSubConnection::ECreateNew; |
|
450 } |
|
451 else if( aSubConnTypeStr == KAttachToDefault() ) |
|
452 { |
|
453 aSubConnType = RSubConnection::EAttachToDefault; |
|
454 } |
|
455 else |
|
456 { |
|
457 found = EFalse; |
|
458 } |
|
459 |
|
460 return found; |
|
461 } |
|
462 |
|
463 TBool CT_DataCommsBase::GetEventGroupUid(const TDesC& aEventGroupUidStr, TInt32& aEventGroupUid) |
|
464 { |
|
465 TBool found = ETrue; |
|
466 |
|
467 if (aEventGroupUidStr == KSubConnGenericEventsImplUidStr()) |
|
468 { |
|
469 aEventGroupUid = KSubConnGenericEventsImplUid; |
|
470 } |
|
471 else |
|
472 { |
|
473 found = EFalse; |
|
474 } |
|
475 |
|
476 return found; |
|
477 } |
|
478 |
|
479 |
|
480 TBool CT_DataCommsBase::GetEventMaskBits(const TDesC& aConstantName, TUint32& aEventMask) |
|
481 { |
|
482 TBool ret = ETrue; |
|
483 |
|
484 if (aConstantName == KSubConGenericEventParamsGrantedStr()) |
|
485 { |
|
486 aEventMask=KSubConGenericEventParamsGranted; |
|
487 } |
|
488 else if (aConstantName == KSubConGenericEventDataClientJoinedStr()) |
|
489 { |
|
490 aEventMask=KSubConGenericEventDataClientJoined; |
|
491 } |
|
492 else if (aConstantName == KSubConGenericEventDataClientLeftStr()) |
|
493 { |
|
494 aEventMask=KSubConGenericEventDataClientLeft; |
|
495 } |
|
496 else if (aConstantName == KSubConGenericEventSubConDownStr()) |
|
497 { |
|
498 aEventMask=KSubConGenericEventSubConDown; |
|
499 } |
|
500 else if (aConstantName == KSubConGenericEventParamsChangedStr()) |
|
501 { |
|
502 aEventMask=KSubConGenericEventParamsChanged; |
|
503 } |
|
504 else if (aConstantName == KSubConGenericEventParamsRejectedStr()) |
|
505 { |
|
506 aEventMask=KSubConGenericEventParamsRejected; |
|
507 } |
|
508 else |
|
509 { |
|
510 TInt location=aConstantName.Match(_L("*|*")); |
|
511 if( location!=KErrNotFound ) |
|
512 { |
|
513 //Converting Left part of the data |
|
514 TPtrC tempStr=aConstantName.Left(location); |
|
515 ret=GetEventMaskBits(tempStr, aEventMask); |
|
516 |
|
517 //Converting right data can be with another "|" |
|
518 tempStr.Set(aConstantName.Mid(location+1)); |
|
519 |
|
520 TUint32 tmp; |
|
521 if ( GetEventMaskBits(tempStr, tmp) ) |
|
522 { |
|
523 aEventMask |= tmp; |
|
524 } |
|
525 else |
|
526 { |
|
527 ret = EFalse; |
|
528 } |
|
529 } |
|
530 else |
|
531 { |
|
532 TInt flagInt; |
|
533 TLex lex(aConstantName); |
|
534 if (lex.Val(flagInt)==KErrNone) |
|
535 { |
|
536 aEventMask=flagInt; |
|
537 } |
|
538 else |
|
539 { |
|
540 ret=EFalse; |
|
541 ERR_PRINTF2(_L("Given flag (%S) is invalid"), &aConstantName); |
|
542 SetBlockResult(EFail); |
|
543 } |
|
544 } |
|
545 } |
|
546 |
|
547 return ret; |
|
548 } |
|
549 |
|
550 TBool CT_DataCommsBase::ParameterSetType( const TDesC& aParameterSetTypeStr, CSubConParameterFamily::TParameterSetType& aParameterSetType ) |
|
551 { |
|
552 TBool found = ETrue; |
|
553 |
|
554 if( aParameterSetTypeStr == KAcceptable() ) |
|
555 { |
|
556 aParameterSetType = CSubConParameterFamily::EAcceptable; |
|
557 } |
|
558 else if( aParameterSetTypeStr == KRequested() ) |
|
559 { |
|
560 aParameterSetType = CSubConParameterFamily::ERequested; |
|
561 } |
|
562 else if( aParameterSetTypeStr == KGranted() ) |
|
563 { |
|
564 aParameterSetType = CSubConParameterFamily::EGranted; |
|
565 } |
|
566 else |
|
567 { |
|
568 found = EFalse; |
|
569 } |
|
570 |
|
571 return found; |
|
572 } |
|
573 |
|
574 TUint32 CT_DataCommsBase::GetLowPowerMode(const TDesC& aConstantName) |
|
575 { |
|
576 _LIT(KEActiveMode, "EActiveMode"); |
|
577 _LIT(KEHoldMode, "EHoldMode"); |
|
578 _LIT(KESniffMode, "ESniffMode"); |
|
579 _LIT(KEParkMode, "EParkMode"); |
|
580 _LIT(KEScatterMode, "EScatterMode"); |
|
581 //_LIT(KEAnyLowPowerMode, "EAnyLowPowerMode"); |
|
582 |
|
583 TUint32 lowPowerMode = EAnyLowPowerMode; |
|
584 |
|
585 if (aConstantName == KEActiveMode) |
|
586 { |
|
587 lowPowerMode = EActiveMode; |
|
588 } |
|
589 else if (aConstantName == KEHoldMode) |
|
590 { |
|
591 lowPowerMode = EHoldMode; |
|
592 } |
|
593 else if (aConstantName == KESniffMode) |
|
594 { |
|
595 lowPowerMode = ESniffMode; |
|
596 } |
|
597 else if (aConstantName == KEParkMode) |
|
598 { |
|
599 lowPowerMode = EParkMode; |
|
600 } |
|
601 else if (aConstantName == KEScatterMode) |
|
602 { |
|
603 lowPowerMode = EScatterMode; |
|
604 } |
|
605 else |
|
606 { |
|
607 lowPowerMode = EAnyLowPowerMode; |
|
608 } |
|
609 |
|
610 return lowPowerMode; |
|
611 } |
|
612 |
|
613 TBool CT_DataCommsBase::GetTShutdown(const TDesC& aConstantName, RSocket::TShutdown& aShutdown) |
|
614 { |
|
615 _LIT(KNormal, "ENormal"); |
|
616 _LIT(KStopInput, "EStopInput"); |
|
617 _LIT(KStopOutput, "EStopOutput"); |
|
618 _LIT(KImmediate, "EImmediate"); |
|
619 |
|
620 TBool ret=ETrue; |
|
621 |
|
622 if (aConstantName == KNormal) |
|
623 { |
|
624 // Complete when socket output/input stopped. |
|
625 aShutdown=RSocket::ENormal; |
|
626 } |
|
627 else if (aConstantName == KStopInput) |
|
628 { |
|
629 // Stop socket input and complete when input is stopped. |
|
630 aShutdown=RSocket::EStopInput; |
|
631 } |
|
632 else if (aConstantName == KStopOutput) |
|
633 { |
|
634 // Stop socket output and complete when output is stopped. |
|
635 aShutdown=RSocket::EStopOutput; |
|
636 } |
|
637 else if (aConstantName == KImmediate) |
|
638 { |
|
639 // Stop socket input/output and complete (abortive close). |
|
640 aShutdown=RSocket::EImmediate; |
|
641 } |
|
642 else |
|
643 { |
|
644 // If we did not find the value go for default |
|
645 // Complete when socket output/input stopped. |
|
646 ret = EFalse; |
|
647 aShutdown=RSocket::ENormal; |
|
648 } |
|
649 |
|
650 return ret; |
|
651 } |
|
652 |
|
653 TInt CT_DataCommsBase::GetTBTPacketType(const TDesC& aConstantName) |
|
654 { |
|
655 _LIT(KEPacketsDM1, "EPacketsDM1"); |
|
656 _LIT(KEPacketsDH1, "EPacketsDH1"); |
|
657 _LIT(KEPacketsDM3, "EPacketsDM1"); |
|
658 _LIT(KEPacketsDH3, "EPacketsDH1"); |
|
659 _LIT(KEPacketsDM5, "EPacketsDM1"); |
|
660 _LIT(KEPacketsDH5, "EPacketsDH1"); |
|
661 _LIT(KEPacketsHV1, "EPacketsHV1"); |
|
662 _LIT(KEPacketsHV2, "EPacketsHV2"); |
|
663 _LIT(KEPacketsHV3, "EPacketsHV3"); |
|
664 _LIT(KEAnyACLPacket, "EAnyACLPacket"); |
|
665 _LIT(KEAnySCOPacket, "EAnySCOPacket"); |
|
666 |
|
667 TInt packetType = EAnyPacket; |
|
668 |
|
669 //Description |
|
670 //Bluetooth SIG specified values for indicating packet types. |
|
671 // |
|
672 //DM1, DH1, DM3, DH3, DM5, DH5 are ACL packet types |
|
673 //HV1, HV2, HV3 are SCO (synchronous link) packet types |
|
674 // |
|
675 // |
|
676 |
|
677 //EPacketsDM1 |
|
678 if (aConstantName == KEPacketsDM1) |
|
679 { |
|
680 packetType = EPacketsDM1; |
|
681 } |
|
682 //DH1 ACL packet type |
|
683 else if (aConstantName == KEPacketsDH1) |
|
684 { |
|
685 packetType = EPacketsDH1; |
|
686 } |
|
687 //EPacketsDM3 |
|
688 else if (aConstantName == KEPacketsDM3) |
|
689 { |
|
690 packetType = EPacketsDM3; |
|
691 } |
|
692 //DH3 ACL packet type |
|
693 else if (aConstantName == KEPacketsDH3) |
|
694 { |
|
695 packetType = EPacketsDH3; |
|
696 } |
|
697 //EPacketsDM5 |
|
698 else if (aConstantName == KEPacketsDM5) |
|
699 { |
|
700 packetType = EPacketsDM5; |
|
701 } |
|
702 //DH5 ACL packet type |
|
703 else if (aConstantName == KEPacketsDH5) |
|
704 { |
|
705 packetType = EPacketsDH5; |
|
706 } |
|
707 //HV1 SCO packet type |
|
708 else if (aConstantName == KEPacketsHV1) |
|
709 { |
|
710 packetType = EPacketsHV1; |
|
711 } |
|
712 //HV2 SCO packet type |
|
713 else if (aConstantName == KEPacketsHV2) |
|
714 { |
|
715 packetType = EPacketsHV2; |
|
716 } |
|
717 //HV3 SCO packet type |
|
718 else if (aConstantName == KEPacketsHV3) |
|
719 { |
|
720 packetType = EPacketsHV3; |
|
721 } |
|
722 |
|
723 //TBTPacketTypeCombinations |
|
724 //Description |
|
725 //Bitmask values to help request combinations of packets. |
|
726 |
|
727 //Any ACL packet |
|
728 else if (aConstantName == KEAnyACLPacket) |
|
729 { |
|
730 packetType = EAnyACLPacket; |
|
731 } |
|
732 //Any SCO packet |
|
733 else if (aConstantName == KEAnySCOPacket) |
|
734 { |
|
735 packetType = EAnySCOPacket; |
|
736 } |
|
737 //Any packet |
|
738 else |
|
739 { |
|
740 packetType = EAnyPacket; |
|
741 } |
|
742 |
|
743 return packetType; |
|
744 } |
|
745 |
|
746 |
|
747 TUint32 CT_DataCommsBase::GetLinkStateNotifierBits(const TDesC& aConstantName) |
|
748 { |
|
749 _LIT(KENotifyMaster, "ENotifyMaster"); |
|
750 _LIT(KENotifySlave, "ENotifySlave"); |
|
751 |
|
752 _LIT(KENotifyActiveMode, "ENotifyActiveMode"); |
|
753 _LIT(KENotifySniffMode, "ENotifySniffMode"); |
|
754 _LIT(KENotifyParkMode, "ENotifyParkMode"); |
|
755 _LIT(KENotifyHoldMode, "ENotifyHoldMode"); |
|
756 |
|
757 _LIT(KENotifyMaxSlots1, "ENotifyMaxSlots1"); |
|
758 _LIT(KENotifyMaxSlots3, "ENotifyMaxSlots3"); |
|
759 _LIT(KENotifyMaxSlots5, "ENotifyMaxSlots5"); |
|
760 |
|
761 _LIT(KENotifyPacketsDM1, "ENotifyPacketsDM1"); |
|
762 _LIT(KENotifyPacketsDH1, "ENotifyPacketsDH1"); |
|
763 _LIT(KENotifyPacketsDM3, "ENotifyPacketsDM3"); |
|
764 _LIT(KENotifyPacketsDH3, "ENotifyPacketsDH3"); |
|
765 _LIT(KENotifyPacketsDM5, "ENotifyPacketsDM5"); |
|
766 _LIT(KENotifyPacketsDH5, "ENotifyPacketsDH5"); |
|
767 |
|
768 _LIT(KENotifyPacketsHV1, "ENotifyPacketsHV1"); |
|
769 _LIT(KENotifyPacketsHV2, "ENotifyPacketsHV2"); |
|
770 _LIT(KENotifyPacketsHV3, "ENotifyPacketsHV3"); |
|
771 |
|
772 _LIT(KENotifyAuthenticationComplete, "ENotifyAuthenticationComplete"); |
|
773 _LIT(KENotifyEncryptionChangeOn, "ENotifyEncryptionChangeOn"); |
|
774 _LIT(KENotifyEncryptionChangeOff, "ENotifyEncryptionChangeOff"); |
|
775 |
|
776 |
|
777 _LIT(KENotifyPhysicalLinkUp, "ENotifyPhysicalLinkUp"); |
|
778 _LIT(KENotifyPhysicalLinkDown, "ENotifyPhysicalLinkDown"); |
|
779 _LIT(KENotifyPhysicalLinkError, "ENotifyPhysicalLinkError"); |
|
780 |
|
781 _LIT(KENotifySCOLinkUp, "ENotifySCOLinkUp"); |
|
782 _LIT(KENotifySCOLinkDown, "ENotifySCOLinkDown"); |
|
783 _LIT(KENotifySCOLinkError, "ENotifySCOLinkError"); |
|
784 |
|
785 TUint32 linkStateNotifierBits = 0; |
|
786 |
|
787 // This is from BTTypes.h |
|
788 |
|
789 // Bitmask values for notifying/requesting notification of the state of a physical link. |
|
790 // |
|
791 // These values have a two fold purpose: |
|
792 // 1) They can be used along with TBTPhysicalLinkStateNotifierCombinations to specify |
|
793 // a set of baseband change events for which notification is desired. |
|
794 // 2) They can be used to notify the state of a physical link or a subset of that state. |
|
795 // For example if only mode change events are being monitored, then at each mode change event |
|
796 // only the bit reperesenting the new mode will be returned, however if the whole link state |
|
797 // is required, then a combination of bit values indicating that state will be returned. |
|
798 // |
|
799 // THESE BIT VALUES MUST ONLY BE USED WHEN REQUESTING NOTIFICATION, OR WHEN PARSING THE |
|
800 // RESULTS OF A NOTIFICATION. All other baseband state activities should use one of the |
|
801 // appropriate Bluetooth SIG specified enums |
|
802 // TBTBasebandRole, TBTLinkMode, TBTLinkModeCombinations, TBTPacketType, |
|
803 // TBTPacketTypeCombinations |
|
804 // |
|
805 |
|
806 //Master |
|
807 if (aConstantName == KENotifyMaster) |
|
808 { |
|
809 linkStateNotifierBits = ENotifyMaster; |
|
810 } |
|
811 //Slave |
|
812 else if (aConstantName == KENotifySlave) |
|
813 { |
|
814 linkStateNotifierBits = ENotifySlave; |
|
815 } |
|
816 |
|
817 //Active Mode |
|
818 else if (aConstantName == KENotifyActiveMode) |
|
819 { |
|
820 linkStateNotifierBits = ENotifyActiveMode; |
|
821 } |
|
822 //Sniff mode |
|
823 else if (aConstantName == KENotifySniffMode) |
|
824 { |
|
825 linkStateNotifierBits = ENotifySniffMode; |
|
826 } |
|
827 //Park mode |
|
828 else if (aConstantName == KENotifyParkMode) |
|
829 { |
|
830 linkStateNotifierBits = ENotifyParkMode; |
|
831 } |
|
832 //Hold mode |
|
833 else if (aConstantName == KENotifyHoldMode) |
|
834 { |
|
835 linkStateNotifierBits = ENotifyHoldMode; |
|
836 } |
|
837 |
|
838 //Max slots 1 |
|
839 else if (aConstantName == KENotifyMaxSlots1) |
|
840 { |
|
841 linkStateNotifierBits = ENotifyMaxSlots1; |
|
842 } |
|
843 //Max slots 3 |
|
844 else if (aConstantName == KENotifyMaxSlots3) |
|
845 { |
|
846 linkStateNotifierBits = ENotifyMaxSlots3; |
|
847 } |
|
848 //Max slots 5 |
|
849 else if (aConstantName == KENotifyMaxSlots5) |
|
850 { |
|
851 linkStateNotifierBits = ENotifyMaxSlots5; |
|
852 } |
|
853 |
|
854 |
|
855 //Packets DM1 |
|
856 else if (aConstantName == KENotifyPacketsDM1) |
|
857 { |
|
858 linkStateNotifierBits = ENotifyPacketsDM1; |
|
859 } |
|
860 //Packets DH1 |
|
861 else if (aConstantName == KENotifyPacketsDH1) |
|
862 { |
|
863 linkStateNotifierBits = ENotifyPacketsDH1; |
|
864 } |
|
865 //Packets DM3 |
|
866 else if (aConstantName == KENotifyPacketsDM3) |
|
867 { |
|
868 linkStateNotifierBits = ENotifyPacketsDM3; |
|
869 } |
|
870 //Packets DH3 |
|
871 else if (aConstantName == KENotifyPacketsDH3) |
|
872 { |
|
873 linkStateNotifierBits = ENotifyPacketsDH3; |
|
874 } |
|
875 //Packets DM5 |
|
876 else if (aConstantName == KENotifyPacketsDM5) |
|
877 { |
|
878 linkStateNotifierBits = ENotifyPacketsDM5; |
|
879 } |
|
880 //Packets DH5 |
|
881 else if (aConstantName == KENotifyPacketsDH5) |
|
882 { |
|
883 linkStateNotifierBits = ENotifyPacketsDH5; |
|
884 } |
|
885 |
|
886 //HV1 |
|
887 else if (aConstantName == KENotifyPacketsHV1) |
|
888 { |
|
889 linkStateNotifierBits = ENotifyPacketsHV1; |
|
890 } |
|
891 //HV2 |
|
892 else if (aConstantName == KENotifyPacketsHV2) |
|
893 { |
|
894 linkStateNotifierBits = ENotifyPacketsHV2; |
|
895 } |
|
896 //HV3 |
|
897 else if (aConstantName == KENotifyPacketsHV3) |
|
898 { |
|
899 linkStateNotifierBits = ENotifyPacketsHV3; |
|
900 } |
|
901 |
|
902 //Authentication Complete |
|
903 else if (aConstantName == KENotifyAuthenticationComplete) |
|
904 { |
|
905 linkStateNotifierBits = ENotifyAuthenticationComplete; |
|
906 } |
|
907 //Encryption Change On |
|
908 else if (aConstantName == KENotifyEncryptionChangeOn) |
|
909 { |
|
910 linkStateNotifierBits = ENotifyEncryptionChangeOn; |
|
911 } |
|
912 //Encryption Change Off |
|
913 else if (aConstantName == KENotifyEncryptionChangeOff) |
|
914 { |
|
915 linkStateNotifierBits = ENotifyEncryptionChangeOff; |
|
916 } |
|
917 //Physical Link Up |
|
918 else if (aConstantName == KENotifyPhysicalLinkUp) |
|
919 { |
|
920 linkStateNotifierBits = ENotifyPhysicalLinkUp; |
|
921 } |
|
922 //Physical Link Down |
|
923 else if (aConstantName == KENotifyPhysicalLinkDown) |
|
924 { |
|
925 linkStateNotifierBits = ENotifyPhysicalLinkDown; |
|
926 } |
|
927 //Physical Link Error |
|
928 else if (aConstantName == KENotifyPhysicalLinkError) |
|
929 { |
|
930 linkStateNotifierBits = ENotifyPhysicalLinkError; |
|
931 } |
|
932 |
|
933 //SCO Link Up |
|
934 else if (aConstantName == KENotifySCOLinkUp) |
|
935 { |
|
936 linkStateNotifierBits = ENotifySCOLinkUp; |
|
937 } |
|
938 //SCO Link Down |
|
939 else if (aConstantName == KENotifySCOLinkDown) |
|
940 { |
|
941 linkStateNotifierBits = ENotifySCOLinkDown; |
|
942 } |
|
943 //SCO Link Error |
|
944 else if (aConstantName == KENotifySCOLinkError) |
|
945 { |
|
946 linkStateNotifierBits = ENotifySCOLinkError; |
|
947 } |
|
948 else |
|
949 { |
|
950 linkStateNotifierBits = 0; |
|
951 } |
|
952 |
|
953 return linkStateNotifierBits; |
|
954 } |
|
955 |
|
956 // method splitted in blocks to save stack space |
|
957 TBool CT_DataCommsBase::GetIntValue(const TDesC& aConstantName, TInt& aValue) |
|
958 { |
|
959 TBool ret= ETrue; |
|
960 // ************************************************************************ |
|
961 // bt_sock.h |
|
962 // ************************************************************************ |
|
963 _LIT(KBTAddrFamilyName, "KBTAddrFamily"); |
|
964 _LIT(KBTLinkManagerName, "KBTLinkManager"); |
|
965 _LIT(KL2CAPName, "KL2CAP"); |
|
966 _LIT(KRFCOMMName, "KRFCOMM"); |
|
967 _LIT(KSDPName, "KSDP"); |
|
968 _LIT(KAVCTPName, "KAVCTP"); |
|
969 _LIT(KTCIL2CAPName, "KTCIL2CAP"); |
|
970 _LIT(KBTMajorName, "KBTMajor"); |
|
971 _LIT(KBTMinorName, "KBTMinor"); |
|
972 _LIT(KBTBuildName, "KBTBuild"); |
|
973 _LIT(KSolInetIpName, "KSolInetIp"); |
|
974 _LIT(KSolBtBlogName, "KSolBtBlog"); |
|
975 _LIT(KSolBtHCIName, "KSolBtHCI"); |
|
976 _LIT(KSolBtLMName, "KSolBtLM"); |
|
977 _LIT(KSolBtL2CAPName, "KSolBtL2CAP"); |
|
978 _LIT(KSolBtRFCOMMName, "KSolBtRFCOMM"); |
|
979 _LIT(KSolBtAVCTPName, "KSolBtAVCTP"); |
|
980 _LIT(KSolBtACLName, "KSolBtACL"); |
|
981 _LIT(KSolBtAVDTPSignallingName, "KSolBtAVDTPSignalling"); |
|
982 _LIT(KSolBtAVDTPMediaName, "KSolBtAVDTPMedia"); |
|
983 _LIT(KSolBtAVDTPReportingName, "KSolBtAVDTPReporting"); |
|
984 _LIT(KSolBtAVDTPRecoveryName, "KSolBtAVDTPRecovery"); |
|
985 _LIT(KSolBtAVDTPInternalName, "KSolBtAVDTPInternal"); |
|
986 _LIT(KSolBtLMProxyName, "KSolBtLMProxy"); |
|
987 _LIT(KSolBtSAPBaseName, "KSolBtSAPBase"); |
|
988 _LIT(KSCOListenQueSizeName, "KSCOListenQueSize"); |
|
989 _LIT(KL2MinMTUName, "KL2MinMTU"); |
|
990 _LIT(KMaxPSMName, "KMaxPSM"); |
|
991 _LIT(KMinUserPSMName, "KMinUserPSM"); |
|
992 _LIT(KMinPSMName, "KMinPSM"); |
|
993 _LIT(KHostResInquiryName, "KHostResInquiry"); |
|
994 _LIT(KHostResNameName, "KHostResName"); |
|
995 _LIT(KHostResIgnoreCacheName, "KHostResIgnoreCache"); |
|
996 _LIT(KHostResCacheName, "KHostResCache"); |
|
997 _LIT(KL2CAPEchoRequestIoctlName, "KL2CAPEchoRequestIoctl"); |
|
998 _LIT(KL2CAPIncomingMTUIoctlName, "KL2CAPIncomingMTUIoctl"); |
|
999 _LIT(KL2CAPOutgoingMTUIoctlName, "KL2CAPOutgoingMTUIoctl"); |
|
1000 _LIT(KL2CAPUpdateChannelConfigIoctlName, "KL2CAPUpdateChannelConfigIoctl"); |
|
1001 _LIT(KDefaultBasebandConnectionTimeoutName, "KDefaultBasebandConnectionTimeout"); |
|
1002 _LIT(KLMAddSCOConnIoctlName, "KLMAddSCOConnIoctl"); |
|
1003 _LIT(KHCIRemoveSCOConnIoctlName, "KHCIRemoveSCOConnIoctl"); |
|
1004 _LIT(KHCIChangePacketTypeIoctlName, "KHCIChangePacketTypeIoctl"); |
|
1005 _LIT(KHCIAuthRequestIoctlName, "KHCIAuthRequestIoctl"); |
|
1006 _LIT(KHCIEncryptIoctlName, "KHCIAuthRequestIoctl"); |
|
1007 _LIT(KHCIChangeLinkKeyIoctlName, "KHCIChangeLinkKeyIoctl"); |
|
1008 _LIT(KHCIMasterLinkKeyIoctlName, "KHCIMasterLinkKeyIoctl"); |
|
1009 _LIT(KHCIHoldModeIoctlName, "KHCIHoldModeIoctl"); |
|
1010 _LIT(KHCISniffModeIoctlName, "KHCISniffModeIoctl"); |
|
1011 _LIT(KHCIExitSniffModeIoctlName, "KHCIExitSniffModeIoctl"); |
|
1012 _LIT(KHCIParkModeIoctlName, "KHCIParkModeIoctl"); |
|
1013 _LIT(KHCIExitParkModeIoctlName, "KHCIExitParkModeIoctl"); |
|
1014 _LIT(KHCIReadPageTimeoutIoctlName, "KHCIReadPageTimeoutIoctl"); |
|
1015 _LIT(KHCIWritePageTimeoutIoctlName, "KHCIWritePageTimeoutIoctl"); |
|
1016 _LIT(KHCIReadScanEnableIoctlName, "KHCIReadScanEnableIoctl"); |
|
1017 _LIT(KHCIWriteScanEnableIoctlName, "KHCIWriteScanEnableIoctl"); |
|
1018 _LIT(KHCIReadDeviceClassIoctlName, "KHCIReadDeviceClassIoctl"); |
|
1019 _LIT(KHCIWriteDeviceClassIoctlName, "KHCIWriteDeviceClassIoctl"); |
|
1020 _LIT(KHCIReadVoiceSettingIoctlName, "KHCIReadVoiceSettingIoctl"); |
|
1021 _LIT(KHCIWriteVoiceSettingIoctlName, "KHCIWriteVoiceSettingIoctl"); |
|
1022 _LIT(KHCIReadHoldModeActivityIoctlName, "KHCIReadHoldModeActivityIoctl"); |
|
1023 _LIT(KHCIWriteHoldModeActivityIoctlName, "KHCIWriteHoldModeActivityIoctl"); |
|
1024 _LIT(KHCILocalVersionIoctlName, "KHCILocalVersionIoctl"); |
|
1025 _LIT(KHCILocalFeaturesIoctlName, "KHCILocalFeaturesIoctl"); |
|
1026 _LIT(KHCICountryCodeIoctlName, "KHCICountryCodeIoctl"); |
|
1027 _LIT(KHCILocalAddressIoctlName, "KHCILocalAddressIoctl"); |
|
1028 _LIT(KHCIWriteDiscoverabilityIoctlName, "KHCIWriteDiscoverabilityIoctl"); |
|
1029 _LIT(KHCIReadDiscoverabilityIoctlName, "KHCIReadDiscoverabilityIoctl"); |
|
1030 _LIT(KHCIReadAuthenticationEnableIoctlName, "KHCIReadAuthenticationEnableIoctl"); |
|
1031 _LIT(KHCIWriteAuthenticationEnableIoctlName, "KHCIWriteAuthenticationEnableIoctl"); |
|
1032 _LIT(KL2CAPPassiveAutoBindName, "KL2CAPPassiveAutoBind"); |
|
1033 _LIT(KRFCOMMModemStatusCmdIoctlName, "KRFCOMMModemStatusCmdIoctl"); |
|
1034 _LIT(KRFCOMMRemoteLineStatusCmdIoctlName, "KRFCOMMRemoteLineStatusCmdIoctl"); |
|
1035 _LIT(KRFCOMMRemotePortNegCmdIoctlName, "KRFCOMMRemotePortNegCmdIoctl"); |
|
1036 _LIT(KRFCOMMRemotePortNegRequestIoctlName, "KRFCOMMRemotePortNegRequestIoctl"); |
|
1037 _LIT(KRFCOMMConfigChangeIndicationIoctlName, "KRFCOMMConfigChangeIndicationIoctl"); |
|
1038 _LIT(KRFCOMMLocalPortParameterName, "KRFCOMMLocalPortParameter"); |
|
1039 _LIT(KRFCOMMGetAvailableServerChannelName, "KRFCOMMGetAvailableServerChannel"); |
|
1040 _LIT(KRFCOMMMaximumSupportedMTUName, "KRFCOMMMaximumSupportedMTU"); |
|
1041 _LIT(KRFCOMMGetDebug1Name, "KRFCOMMGetDebug1"); |
|
1042 _LIT(KRFCOMMGetRemoteModemStatusName, "KRFCOMMGetRemoteModemStatus"); |
|
1043 _LIT(KRFCOMMGetTransmitCreditName, "KRFCOMMGetTransmitCredit"); |
|
1044 _LIT(KRFCOMMGetReceiveCreditName, "KRFCOMMGetReceiveCredit"); |
|
1045 _LIT(KRFCOMMGetReUsedCountName, "KRFCOMMGetReUsedCount"); |
|
1046 _LIT(KRFCOMMFlowTypeCBFCName, "KRFCOMMFlowTypeCBFC"); |
|
1047 _LIT(KRFCOMMLocalModemStatusName, "KRFCOMMLocalModemStatus"); |
|
1048 _LIT(KErrNoneName, "KErrNone"); |
|
1049 _LIT(KErrCancelName, "KErrCancel"); |
|
1050 _LIT(KErrBadHandleName, "KErrBadHandle"); |
|
1051 _LIT(KZero, "Zero"); |
|
1052 _LIT(KOne, "One"); |
|
1053 _LIT(ELMOutboundACLSizeName, "ELMOutboundACLSize"); |
|
1054 _LIT(ELMInboundACLSizeName, "ELMInboundACLSize"); |
|
1055 _LIT(KLMGetACLHandleName, "KLMGetACLHandle"); |
|
1056 _LIT(KLMGetACLLinkCountName, "KLMGetACLLinkCount"); |
|
1057 _LIT(KLMGetACLLinkArrayName, "KLMGetACLLinkArray"); |
|
1058 _LIT(KLMSetBasebandConnectionPolicyName, "KLMSetBasebandConnectionPolicy"); |
|
1059 _LIT(KLMGetBasebandHandleName, "KLMGetBasebandHandle"); |
|
1060 _LIT(EBBSubscribePhysicalLinkName, "EBBSubscribePhysicalLink"); |
|
1061 _LIT(EBBBeginRawName, "EBBBeginRaw"); |
|
1062 _LIT(EBBRequestRoleMasterName, "EBBRequestRoleMaster"); |
|
1063 _LIT(EBBRequestRoleSlaveName, "EBBRequestRoleSlave"); |
|
1064 _LIT(EBBCancelModeRequestName, "EBBCancelModeRequest"); |
|
1065 _LIT(EBBRequestSniffName, "EBBRequestSniff"); |
|
1066 _LIT(EBBRequestParkName, "EBBRequestPark"); |
|
1067 _LIT(EBBRequestPreventRoleChangeName, "EBBRequestPreventRoleChange"); |
|
1068 _LIT(EBBRequestAllowRoleChangeName, "EBBRequestAllowRoleChange"); |
|
1069 _LIT(EBBRequestChangeSupportedPacketTypesName, "EBBRequestChangeSupportedPacketTypes"); |
|
1070 _LIT(EBBEnumeratePhysicalLinksName, "EBBEnumeratePhysicalLinks"); |
|
1071 _LIT(EBBGetPhysicalLinkStateName, "EBBGetPhysicalLinkState"); |
|
1072 _LIT(EBBGetSniffIntervalName, "EBBGetSniffInterval"); |
|
1073 _LIT(EBBRequestLinkAuthenticationName, "EBBRequestLinkAuthentication"); |
|
1074 _LIT(EBBRequestPreventSniffName, "EBBRequestPreventSniff"); |
|
1075 _LIT(EBBRequestPreventHoldName, "EBBRequestPreventHold"); |
|
1076 _LIT(EBBRequestPreventParkName, "EBBRequestPreventPark"); |
|
1077 _LIT(EBBRequestPreventAllLowPowerModesName, "EBBRequestPreventAllLowPowerModes"); |
|
1078 _LIT(EBBRequestAllowSniffName, "EBBRequestAllowSniff"); |
|
1079 _LIT(EBBRequestAllowHoldName, "EBBRequestAllowHold"); |
|
1080 _LIT(EBBRequestAllowParkName, "EBBRequestAllowPark"); |
|
1081 _LIT(EBBRequestAllowAllLowPowerModesName, "EBBRequestAllowAllLowPowerModes"); |
|
1082 _LIT(KBTRegisterCodServiceName, "KBTRegisterCodService"); |
|
1083 _LIT(KBTSecurityDeviceOverrideName, "KBTSecurityDeviceOverride"); |
|
1084 _LIT(KESockDefaultMessageSlotsName, "KESockDefaultMessageSlots"); |
|
1085 _LIT(KUseEmbeddedUniqueIdName, "KUseEmbeddedUniqueId"); |
|
1086 _LIT(KConnProgressDefaultName, "KConnProgressDefault"); |
|
1087 _LIT(KMaxSockAddrSizeName, "KMaxSockAddrSize"); |
|
1088 _LIT(KAfInetName, "KAfInet"); |
|
1089 _LIT(KAfInet6Name, "KAfInet6"); |
|
1090 _LIT(KAFUnspecName, "KAFUnspec"); |
|
1091 _LIT(KSockStreamName, "KSockStream"); |
|
1092 _LIT(KSockDatagramName, "KSockDatagram"); |
|
1093 _LIT(KSockSeqPacketName, "KSockSeqPacket"); |
|
1094 _LIT(KSockRawName, "KSockRaw"); |
|
1095 _LIT(KSOLSocketName, "KSOLSocket"); |
|
1096 _LIT(KLevelUnspecifiedName, "KLevelUnspecified"); |
|
1097 _LIT(KSODebugName, "KSODebug"); |
|
1098 _LIT(KSORecvBufName, "KSORecvBuf"); |
|
1099 _LIT(KSOSendBufName, "KSOSendBuf"); |
|
1100 _LIT(KSoReuseAddrName, "KSoReuseAddr"); |
|
1101 _LIT(KSONonBlockingIOName, "KSONonBlockingIO"); |
|
1102 _LIT(KSOBlockingIOName, "KSOBlockingIO"); |
|
1103 _LIT(KSOSelectPollName, "KSOSelectPoll"); |
|
1104 _LIT(KSOReadBytesPendingName, "KSOReadBytesPending"); |
|
1105 _LIT(KSOUrgentDataOffsetName, "KSOUrgentDataOffset"); |
|
1106 _LIT(KSOSelectLastErrorName, "KSOSelectLastError"); |
|
1107 _LIT(KSOEnableTransferName, "KSOEnableTransfer"); |
|
1108 _LIT(KSODisableTransferName, "KSODisableTransfer"); |
|
1109 _LIT(KSocketBufSizeUndefinedName, "KSocketBufSizeUndefined"); |
|
1110 _LIT(KSocketDefaultBufferSizeName, "KSocketDefaultBufferSize"); |
|
1111 _LIT(KSocketInternalOptionBitName, "KSocketInternalOptionBit"); |
|
1112 _LIT(KIOctlSelectName, "KIOctlSelect"); |
|
1113 _LIT(KSockSelectReadName, "KSockSelectRead"); |
|
1114 _LIT(KSockSelectWriteName, "KSockSelectWrite"); |
|
1115 _LIT(KSockSelectExceptName, "KSockSelectExcept"); |
|
1116 _LIT(KSockSelectReadContinuationName, "KSockSelectReadContinuation"); |
|
1117 _LIT(KSockWriteUrgentName, "KSockWriteUrgent"); |
|
1118 _LIT(KSocketInternalWriteBitName, "KSocketInternalWriteBit"); |
|
1119 _LIT(KSockWriteSystemMaskName, "KSockWriteSystemMask"); |
|
1120 _LIT(KSockReadPeekName, "KSockReadPeek"); |
|
1121 _LIT(KSocketInternalReadBitName, "KSocketInternalReadBit"); |
|
1122 _LIT(KSockReadContinuationName, "KSockReadContinuation"); |
|
1123 _LIT(KSIConnectionLessName, "KSIConnectionLess"); |
|
1124 _LIT(KSIReliableName, "KSIReliable"); |
|
1125 _LIT(KSIInOrderName, "KSIInOrder"); |
|
1126 _LIT(KSIMessageBasedName, "KSIMessageBased"); |
|
1127 _LIT(KSIDatagramName, "KSIDatagram"); |
|
1128 _LIT(KSIStreamBasedName, "KSIStreamBased"); |
|
1129 _LIT(KSIPseudoStreamName, "KSIPseudoStream"); |
|
1130 _LIT(KSIUrgentDataName, "KSIUrgentData"); |
|
1131 _LIT(KSIConnectDataName, "KSIConnectData"); |
|
1132 _LIT(KSIDisconnectDataName, "KSIDisconnectData"); |
|
1133 _LIT(KSIBroadcastName, "KSIBroadcast"); |
|
1134 _LIT(KSIMultiPointName, "KSIMultiPoint"); |
|
1135 _LIT(KSIQOSName, "KSIQOS"); |
|
1136 _LIT(KSIWriteOnlyName, "KSIWriteOnly"); |
|
1137 _LIT(KSIReadOnlyName, "KSIReadOnly"); |
|
1138 _LIT(KSIGracefulCloseName, "KSIGracefulClose"); |
|
1139 _LIT(KSICanReconnectName, "KSICanReconnect"); |
|
1140 _LIT(KSIPeekDataName, "KSIPeekData"); |
|
1141 _LIT(KSIRequiresOwnerInfoName, "KSIRequiresOwnerInfo"); |
|
1142 _LIT(KNSNameResolutionName, "KNSNameResolution"); |
|
1143 _LIT(KNSHeirarchicalNamingName, "KNSHeirarchicalNaming"); |
|
1144 _LIT(KNSRemoteDiscoveryName, "KNSRemoteDiscovery"); |
|
1145 _LIT(KNSServiceResolutionName, "KNSServiceResolution"); |
|
1146 _LIT(KNSNameRegistrationName, "KNSNameRegistration"); |
|
1147 _LIT(KNSServiceRegistrationName, "KNSServiceRegistration"); |
|
1148 _LIT(KNSDynamicAddressingName, "KNSDynamicAddressing"); |
|
1149 _LIT(KNSInfoDatabaseName, "KNSInfoDatabase"); |
|
1150 _LIT(KNSRequiresConnectionStartupName, "KNSRequiresConnectionStartup"); |
|
1151 _LIT(KSocketNoSecurityName, "KSocketNoSecurity"); |
|
1152 _LIT(KSecureSocketsName, "KSecureSockets"); |
|
1153 _LIT(KSocketMessageSizeIsStreamName, "KSocketMessageSizeIsStream"); |
|
1154 _LIT(KSocketMessageSizeUndefinedName, "KSocketMessageSizeUndefined"); |
|
1155 _LIT(KSocketMessageSizeNoLimitName, "KSocketMessageSizeNoLimit"); |
|
1156 _LIT(KUndefinedSockTypeName, "KUndefinedSockType"); |
|
1157 _LIT(KUndefinedProtocolName, "KUndefinedProtocol"); |
|
1158 _LIT(KErrWouldBlockName, "KErrWouldBlock"); |
|
1159 _LIT(KErrConnectionTerminatedName, "KErrConnectionTerminated"); |
|
1160 _LIT(KErrCannotFindProtocolName, "KErrCannotFindProtocol"); |
|
1161 _LIT(KCOLConnectionName, "KCOLConnection"); |
|
1162 _LIT(KCOLProviderName, "KCOLProvider"); |
|
1163 _LIT(KConnInternalOptionBitName, "KConnInternalOptionBit"); |
|
1164 _LIT(KConnWriteUserDataBitName, "KConnWriteUserDataBit"); |
|
1165 _LIT(KConnReadUserDataBitName, "KConnReadUserDataBit"); |
|
1166 _LIT(KCoEnumerateConnectionClientsName, "KCoEnumerateConnectionClients"); |
|
1167 _LIT(KCoGetConnectionClientInfoName, "KCoGetConnectionClientInfo"); |
|
1168 _LIT(KCoGetConnectionSocketInfoName, "KCoGetConnectionSocketInfo"); |
|
1169 _LIT(KConnectionTypeDefaultName, "KConnectionTypeDefault"); |
|
1170 _LIT(KSubConnParamsInterfaceUidName, "KSubConnParamsInterfaceUid"); |
|
1171 _LIT(KSubConnEventInterfaceUidName, "KSubConnEventInterfaceUid"); |
|
1172 _LIT(KSubConnGenericParamsImplUidName, "KSubConnGenericParamsImplUid"); |
|
1173 _LIT(KSubConnGenericEventsImplUidName, "KSubConnGenericEventsImplUid"); |
|
1174 _LIT(KSubConGlobalFamilyName, "KSubConGlobalFamily"); |
|
1175 _LIT(KSubConQoSFamilyName, "KSubConQoSFamily"); |
|
1176 _LIT(KSubConAuthorisationFamilyName, "KSubConAuthorisationFamily"); |
|
1177 _LIT(KNotificationEventMaxSizeName, "KNotificationEventMaxSize"); |
|
1178 |
|
1179 // BT Address Family |
|
1180 if (aConstantName==KBTAddrFamilyName) |
|
1181 { |
|
1182 aValue=KBTAddrFamily; |
|
1183 } |
|
1184 else if (aConstantName==KBTLinkManagerName) |
|
1185 { |
|
1186 aValue=KBTLinkManager; |
|
1187 } |
|
1188 else if (aConstantName==KL2CAPName) |
|
1189 { |
|
1190 aValue=KL2CAP; |
|
1191 } |
|
1192 else if (aConstantName==KRFCOMMName) |
|
1193 { |
|
1194 aValue=KRFCOMM; |
|
1195 } |
|
1196 else if (aConstantName==KSDPName) |
|
1197 { |
|
1198 aValue=KSDP; |
|
1199 } |
|
1200 else if (aConstantName==KAVCTPName) |
|
1201 { |
|
1202 aValue=KAVCTP; |
|
1203 } |
|
1204 else if (aConstantName==KTCIL2CAPName) |
|
1205 { |
|
1206 aValue=KTCIL2CAP; |
|
1207 } |
|
1208 else if (aConstantName==KBTMajorName) |
|
1209 { |
|
1210 aValue=KBTMajor; |
|
1211 } |
|
1212 else if (aConstantName==KBTMinorName) |
|
1213 { |
|
1214 aValue=KBTMinor; |
|
1215 } |
|
1216 else if (aConstantName==KBTBuildName) |
|
1217 { |
|
1218 aValue=KBTBuild; |
|
1219 } |
|
1220 else if (aConstantName==KSolInetIpName) |
|
1221 { |
|
1222 aValue=KSolInetIp; |
|
1223 } |
|
1224 else if (aConstantName==KSolBtBlogName) |
|
1225 { |
|
1226 aValue=KSolBtBlog; |
|
1227 } |
|
1228 else if (aConstantName==KSolBtHCIName) |
|
1229 { |
|
1230 aValue=KSolBtHCI; |
|
1231 } |
|
1232 else if (aConstantName==KSolBtLMName) |
|
1233 { |
|
1234 aValue=KSolBtLM; |
|
1235 } |
|
1236 else if (aConstantName==KSolBtL2CAPName) |
|
1237 { |
|
1238 aValue=KSolBtL2CAP; |
|
1239 } |
|
1240 else if (aConstantName==KSolBtRFCOMMName) |
|
1241 { |
|
1242 aValue=KSolBtRFCOMM; |
|
1243 } |
|
1244 else if (aConstantName==KSolBtAVCTPName) |
|
1245 { |
|
1246 aValue=KSolBtAVCTP; |
|
1247 } |
|
1248 else if (aConstantName==KSolBtACLName) |
|
1249 { |
|
1250 aValue=KSolBtACL; |
|
1251 } |
|
1252 else if (aConstantName==KSolBtAVDTPSignallingName) |
|
1253 { |
|
1254 aValue=KSolBtAVDTPSignalling; |
|
1255 } |
|
1256 else if (aConstantName==KSolBtAVDTPMediaName) |
|
1257 { |
|
1258 aValue=KSolBtAVDTPMedia; |
|
1259 } |
|
1260 else if (aConstantName==KSolBtAVDTPReportingName) |
|
1261 { |
|
1262 aValue=KSolBtAVDTPReporting; |
|
1263 } |
|
1264 else if (aConstantName==KSolBtAVDTPRecoveryName) |
|
1265 { |
|
1266 aValue=KSolBtAVDTPRecovery; |
|
1267 } |
|
1268 else if (aConstantName==KSolBtAVDTPInternalName) |
|
1269 { |
|
1270 aValue=KSolBtAVDTPInternal; |
|
1271 } |
|
1272 else if (aConstantName==KSolBtLMProxyName) |
|
1273 { |
|
1274 aValue=KSolBtLMProxy; |
|
1275 } |
|
1276 else if (aConstantName==KSolBtSAPBaseName) |
|
1277 { |
|
1278 aValue=KSolBtSAPBase; |
|
1279 } |
|
1280 else if (aConstantName==KSCOListenQueSizeName) |
|
1281 { |
|
1282 aValue=KSCOListenQueSize; |
|
1283 } |
|
1284 else if (aConstantName==KL2MinMTUName) |
|
1285 { |
|
1286 aValue=KL2MinMTU; |
|
1287 } |
|
1288 else if (aConstantName==KMaxPSMName) |
|
1289 { |
|
1290 aValue=KMaxPSM; |
|
1291 } |
|
1292 else if (aConstantName==KMinUserPSMName) |
|
1293 { |
|
1294 aValue=KMinUserPSM; |
|
1295 } |
|
1296 else if (aConstantName==KMinPSMName) |
|
1297 { |
|
1298 aValue=KMinPSM; |
|
1299 } |
|
1300 else if (aConstantName==KHostResInquiryName) |
|
1301 { |
|
1302 aValue=KHostResInquiry; |
|
1303 } |
|
1304 else if (aConstantName==KHostResNameName) |
|
1305 { |
|
1306 aValue=KHostResName; |
|
1307 } |
|
1308 else if (aConstantName==KHostResIgnoreCacheName) |
|
1309 { |
|
1310 aValue=KHostResIgnoreCache; |
|
1311 } |
|
1312 else if (aConstantName==KHostResCacheName) |
|
1313 { |
|
1314 aValue=KHostResCache; |
|
1315 } |
|
1316 else if (aConstantName==KL2CAPEchoRequestIoctlName) |
|
1317 { |
|
1318 aValue=KL2CAPEchoRequestIoctl; |
|
1319 } |
|
1320 else if (aConstantName==KL2CAPIncomingMTUIoctlName) |
|
1321 { |
|
1322 aValue=KL2CAPIncomingMTUIoctl; |
|
1323 } |
|
1324 else if (aConstantName==KL2CAPOutgoingMTUIoctlName) |
|
1325 { |
|
1326 aValue=KL2CAPOutgoingMTUIoctl; |
|
1327 } |
|
1328 else if (aConstantName==KL2CAPUpdateChannelConfigIoctlName) |
|
1329 { |
|
1330 aValue=KL2CAPUpdateChannelConfigIoctl; |
|
1331 } |
|
1332 else if (aConstantName==KDefaultBasebandConnectionTimeoutName) |
|
1333 { |
|
1334 aValue=KDefaultBasebandConnectionTimeout; |
|
1335 } |
|
1336 else if (aConstantName==KLMAddSCOConnIoctlName) |
|
1337 { |
|
1338 aValue=KLMAddSCOConnIoctl; |
|
1339 } |
|
1340 else if (aConstantName==KHCIRemoveSCOConnIoctlName) |
|
1341 { |
|
1342 aValue=KHCIRemoveSCOConnIoctl; |
|
1343 } |
|
1344 else if (aConstantName==KHCIChangePacketTypeIoctlName) |
|
1345 { |
|
1346 aValue=KHCIChangePacketTypeIoctl; |
|
1347 } |
|
1348 else if (aConstantName==KHCIAuthRequestIoctlName) |
|
1349 { |
|
1350 aValue=KHCIAuthRequestIoctl; |
|
1351 } |
|
1352 else if (aConstantName==KHCIEncryptIoctlName) |
|
1353 { |
|
1354 aValue=KHCIEncryptIoctl; |
|
1355 } |
|
1356 else if (aConstantName==KHCIChangeLinkKeyIoctlName) |
|
1357 { |
|
1358 aValue=KHCIChangeLinkKeyIoctl; |
|
1359 } |
|
1360 else if (aConstantName==KHCIMasterLinkKeyIoctlName) |
|
1361 { |
|
1362 aValue=KHCIMasterLinkKeyIoctl; |
|
1363 } |
|
1364 else if (aConstantName==KHCIHoldModeIoctlName) |
|
1365 { |
|
1366 aValue=KHCIHoldModeIoctl; |
|
1367 } |
|
1368 else if (aConstantName==KHCISniffModeIoctlName) |
|
1369 { |
|
1370 aValue=KHCISniffModeIoctl; |
|
1371 } |
|
1372 else if (aConstantName==KHCIExitSniffModeIoctlName) |
|
1373 { |
|
1374 aValue=KHCIExitSniffModeIoctl; |
|
1375 } |
|
1376 else if (aConstantName==KHCIParkModeIoctlName) |
|
1377 { |
|
1378 aValue=KHCIParkModeIoctl; |
|
1379 } |
|
1380 else if (aConstantName==KHCIExitParkModeIoctlName) |
|
1381 { |
|
1382 aValue=KHCIExitParkModeIoctl; |
|
1383 } |
|
1384 else if (aConstantName==KHCIReadPageTimeoutIoctlName) |
|
1385 { |
|
1386 aValue=KHCIReadPageTimeoutIoctl; |
|
1387 } |
|
1388 else if (aConstantName==KHCIWritePageTimeoutIoctlName) |
|
1389 { |
|
1390 aValue=KHCIWritePageTimeoutIoctl; |
|
1391 } |
|
1392 else if (aConstantName==KHCIReadScanEnableIoctlName) |
|
1393 { |
|
1394 aValue=KHCIReadScanEnableIoctl; |
|
1395 } |
|
1396 else if (aConstantName==KHCIWriteScanEnableIoctlName) |
|
1397 { |
|
1398 aValue=KHCIWriteScanEnableIoctl; |
|
1399 } |
|
1400 else if (aConstantName==KHCIReadDeviceClassIoctlName) |
|
1401 { |
|
1402 aValue=KHCIReadDeviceClassIoctl; |
|
1403 } |
|
1404 else if (aConstantName==KHCIWriteDeviceClassIoctlName) |
|
1405 { |
|
1406 aValue=KHCIWriteDeviceClassIoctl; |
|
1407 } |
|
1408 else if (aConstantName==KHCIReadVoiceSettingIoctlName) |
|
1409 { |
|
1410 aValue=KHCIReadVoiceSettingIoctl; |
|
1411 } |
|
1412 else if (aConstantName==KHCIWriteVoiceSettingIoctlName) |
|
1413 { |
|
1414 aValue=KHCIWriteVoiceSettingIoctl; |
|
1415 } |
|
1416 else if (aConstantName==KHCIReadHoldModeActivityIoctlName) |
|
1417 { |
|
1418 aValue=KHCIReadHoldModeActivityIoctl; |
|
1419 } |
|
1420 else if (aConstantName==KHCIWriteHoldModeActivityIoctlName) |
|
1421 { |
|
1422 aValue=KHCIWriteHoldModeActivityIoctl; |
|
1423 } |
|
1424 else if (aConstantName==KHCILocalVersionIoctlName) |
|
1425 { |
|
1426 aValue=KHCILocalVersionIoctl; |
|
1427 } |
|
1428 else if (aConstantName==KHCILocalFeaturesIoctlName) |
|
1429 { |
|
1430 aValue=KHCILocalFeaturesIoctl; |
|
1431 } |
|
1432 else if (aConstantName==KHCICountryCodeIoctlName) |
|
1433 { |
|
1434 aValue=KHCICountryCodeIoctl; |
|
1435 } |
|
1436 else if (aConstantName==KHCILocalAddressIoctlName) |
|
1437 { |
|
1438 aValue=KHCILocalAddressIoctl; |
|
1439 } |
|
1440 else if (aConstantName==KHCIWriteDiscoverabilityIoctlName) |
|
1441 { |
|
1442 aValue=KHCIWriteDiscoverabilityIoctl; |
|
1443 } |
|
1444 else if (aConstantName==KHCIReadDiscoverabilityIoctlName) |
|
1445 { |
|
1446 aValue=KHCIReadDiscoverabilityIoctl; |
|
1447 } |
|
1448 else if (aConstantName==KHCIReadAuthenticationEnableIoctlName) |
|
1449 { |
|
1450 aValue=KHCIReadAuthenticationEnableIoctl; |
|
1451 } |
|
1452 else if (aConstantName==KHCIWriteAuthenticationEnableIoctlName) |
|
1453 { |
|
1454 aValue=KHCIWriteAuthenticationEnableIoctl; |
|
1455 } |
|
1456 else if (aConstantName==KL2CAPPassiveAutoBindName) |
|
1457 { |
|
1458 aValue=KL2CAPPassiveAutoBind; |
|
1459 } |
|
1460 else if (aConstantName==KRFCOMMModemStatusCmdIoctlName) |
|
1461 { |
|
1462 aValue=KRFCOMMModemStatusCmdIoctl; |
|
1463 } |
|
1464 else if (aConstantName==KRFCOMMRemoteLineStatusCmdIoctlName) |
|
1465 { |
|
1466 aValue=KRFCOMMRemoteLineStatusCmdIoctl; |
|
1467 } |
|
1468 else if (aConstantName==KRFCOMMRemotePortNegCmdIoctlName) |
|
1469 { |
|
1470 aValue=KRFCOMMRemotePortNegCmdIoctl; |
|
1471 } |
|
1472 else if (aConstantName==KRFCOMMRemotePortNegRequestIoctlName) |
|
1473 { |
|
1474 aValue=KRFCOMMRemotePortNegRequestIoctl; |
|
1475 } |
|
1476 else if (aConstantName==KRFCOMMConfigChangeIndicationIoctlName) |
|
1477 { |
|
1478 aValue=KRFCOMMConfigChangeIndicationIoctl; |
|
1479 } |
|
1480 else if (aConstantName==KRFCOMMLocalPortParameterName) |
|
1481 { |
|
1482 aValue=KRFCOMMLocalPortParameter; |
|
1483 } |
|
1484 else if (aConstantName==KRFCOMMGetAvailableServerChannelName) |
|
1485 { |
|
1486 aValue=KRFCOMMGetAvailableServerChannel; |
|
1487 } |
|
1488 else if (aConstantName==KRFCOMMMaximumSupportedMTUName) |
|
1489 { |
|
1490 aValue=KRFCOMMMaximumSupportedMTU; |
|
1491 } |
|
1492 else if (aConstantName==KRFCOMMGetDebug1Name) |
|
1493 { |
|
1494 aValue=KRFCOMMGetDebug1; |
|
1495 } |
|
1496 else if (aConstantName==KRFCOMMGetRemoteModemStatusName) |
|
1497 { |
|
1498 aValue=KRFCOMMGetRemoteModemStatus; |
|
1499 } |
|
1500 else if (aConstantName==KRFCOMMGetTransmitCreditName) |
|
1501 { |
|
1502 aValue=KRFCOMMGetTransmitCredit; |
|
1503 } |
|
1504 else if (aConstantName==KRFCOMMGetReceiveCreditName) |
|
1505 { |
|
1506 aValue=KRFCOMMGetReceiveCredit; |
|
1507 } |
|
1508 else if (aConstantName==KRFCOMMGetReUsedCountName) |
|
1509 { |
|
1510 aValue=KRFCOMMGetReUsedCount; |
|
1511 } |
|
1512 else if (aConstantName==KRFCOMMFlowTypeCBFCName) |
|
1513 { |
|
1514 aValue=KRFCOMMFlowTypeCBFC; |
|
1515 } |
|
1516 else if (aConstantName==KRFCOMMLocalModemStatusName) |
|
1517 { |
|
1518 aValue=KRFCOMMLocalModemStatus; |
|
1519 } |
|
1520 else if (aConstantName==KErrNoneName) |
|
1521 { |
|
1522 aValue=KErrNone; |
|
1523 } |
|
1524 else if (aConstantName==KErrCancelName) |
|
1525 { |
|
1526 aValue=KErrCancel; |
|
1527 } |
|
1528 else if (aConstantName==KErrBadHandleName) |
|
1529 { |
|
1530 aValue=KErrBadHandle; |
|
1531 } |
|
1532 else if (aConstantName==KZero) |
|
1533 { |
|
1534 aValue=0; |
|
1535 } |
|
1536 else if (aConstantName==KOne) |
|
1537 { |
|
1538 aValue=1; |
|
1539 } |
|
1540 else if (aConstantName==ELMOutboundACLSizeName) |
|
1541 { |
|
1542 aValue=ELMOutboundACLSize; |
|
1543 } |
|
1544 else if (aConstantName==ELMInboundACLSizeName) |
|
1545 { |
|
1546 aValue=ELMInboundACLSize; |
|
1547 } |
|
1548 else if (aConstantName==KLMGetACLHandleName) |
|
1549 { |
|
1550 aValue=KLMGetACLHandle; |
|
1551 } |
|
1552 else if (aConstantName==KLMGetACLLinkCountName) |
|
1553 { |
|
1554 aValue=KLMGetACLLinkCount; |
|
1555 } |
|
1556 else if (aConstantName==KLMGetACLLinkArrayName) |
|
1557 { |
|
1558 aValue=KLMGetACLLinkArray; |
|
1559 } |
|
1560 else if (aConstantName==KLMSetBasebandConnectionPolicyName) |
|
1561 { |
|
1562 aValue=KLMSetBasebandConnectionPolicy; |
|
1563 } |
|
1564 else if (aConstantName==KLMGetBasebandHandleName) |
|
1565 { |
|
1566 aValue=KLMGetBasebandHandle; |
|
1567 } |
|
1568 else if (aConstantName==EBBSubscribePhysicalLinkName) |
|
1569 { |
|
1570 aValue=EBBSubscribePhysicalLink; |
|
1571 } |
|
1572 else if (aConstantName==EBBBeginRawName) |
|
1573 { |
|
1574 aValue=EBBBeginRaw; |
|
1575 } |
|
1576 else if (aConstantName==EBBRequestRoleMasterName) |
|
1577 { |
|
1578 aValue=EBBRequestRoleMaster; |
|
1579 } |
|
1580 else if (aConstantName==EBBRequestRoleSlaveName) |
|
1581 { |
|
1582 aValue=EBBRequestRoleSlave; |
|
1583 } |
|
1584 else if (aConstantName==EBBCancelModeRequestName) |
|
1585 { |
|
1586 aValue=EBBCancelModeRequest; |
|
1587 } |
|
1588 else if (aConstantName==EBBRequestSniffName) |
|
1589 { |
|
1590 aValue=EBBRequestSniff; |
|
1591 } |
|
1592 else if (aConstantName==EBBRequestParkName) |
|
1593 { |
|
1594 aValue=EBBRequestPark; |
|
1595 } |
|
1596 else if (aConstantName==EBBRequestPreventRoleChangeName) |
|
1597 { |
|
1598 aValue=EBBRequestPreventRoleChange; |
|
1599 } |
|
1600 else if (aConstantName==EBBRequestAllowRoleChangeName) |
|
1601 { |
|
1602 aValue=EBBRequestAllowRoleChange; |
|
1603 } |
|
1604 else if (aConstantName==EBBRequestChangeSupportedPacketTypesName) |
|
1605 { |
|
1606 aValue=EBBRequestChangeSupportedPacketTypes; |
|
1607 } |
|
1608 else if (aConstantName==EBBEnumeratePhysicalLinksName) |
|
1609 { |
|
1610 aValue=EBBEnumeratePhysicalLinks; |
|
1611 } |
|
1612 else if (aConstantName==EBBGetPhysicalLinkStateName) |
|
1613 { |
|
1614 aValue=EBBGetPhysicalLinkState; |
|
1615 } |
|
1616 else if (aConstantName==EBBGetSniffIntervalName) |
|
1617 { |
|
1618 aValue=EBBGetSniffInterval; |
|
1619 } |
|
1620 else if (aConstantName==EBBRequestLinkAuthenticationName) |
|
1621 { |
|
1622 aValue=EBBRequestLinkAuthentication; |
|
1623 } |
|
1624 else if (aConstantName==EBBRequestPreventSniffName) |
|
1625 { |
|
1626 aValue=EBBRequestPreventSniff; |
|
1627 } |
|
1628 else if (aConstantName==EBBRequestPreventHoldName) |
|
1629 { |
|
1630 aValue=EBBRequestPreventHold; |
|
1631 } |
|
1632 else if (aConstantName==EBBRequestPreventParkName) |
|
1633 { |
|
1634 aValue=EBBRequestPreventPark; |
|
1635 } |
|
1636 else if (aConstantName==EBBRequestPreventAllLowPowerModesName) |
|
1637 { |
|
1638 aValue=EBBRequestPreventAllLowPowerModes; |
|
1639 } |
|
1640 else if (aConstantName==EBBRequestAllowSniffName) |
|
1641 { |
|
1642 aValue=EBBRequestAllowSniff; |
|
1643 } |
|
1644 else if (aConstantName==EBBRequestAllowHoldName) |
|
1645 { |
|
1646 aValue=EBBRequestAllowHold; |
|
1647 } |
|
1648 else if (aConstantName==EBBRequestAllowParkName) |
|
1649 { |
|
1650 aValue=EBBRequestAllowPark; |
|
1651 } |
|
1652 else if (aConstantName==EBBRequestAllowAllLowPowerModesName) |
|
1653 { |
|
1654 aValue=EBBRequestAllowAllLowPowerModes; |
|
1655 } |
|
1656 else if (aConstantName==KBTRegisterCodServiceName) |
|
1657 { |
|
1658 aValue=KBTRegisterCodService; |
|
1659 } |
|
1660 else if (aConstantName==KBTSecurityDeviceOverrideName) |
|
1661 { |
|
1662 aValue=KBTSecurityDeviceOverride; |
|
1663 } |
|
1664 else if (aConstantName==KESockDefaultMessageSlotsName) |
|
1665 { |
|
1666 aValue=KESockDefaultMessageSlots; |
|
1667 } |
|
1668 else if (aConstantName==KUseEmbeddedUniqueIdName) |
|
1669 { |
|
1670 aValue=KUseEmbeddedUniqueId; |
|
1671 } |
|
1672 else if (aConstantName==KConnProgressDefaultName) |
|
1673 { |
|
1674 aValue=KConnProgressDefault; |
|
1675 } |
|
1676 else if (aConstantName==KMaxSockAddrSizeName) |
|
1677 { |
|
1678 aValue=KMaxSockAddrSize; |
|
1679 } |
|
1680 else if (aConstantName==KAfInetName) |
|
1681 { |
|
1682 aValue=KAfInet; |
|
1683 } |
|
1684 else if (aConstantName==KAfInet6Name) |
|
1685 { |
|
1686 aValue=KAfInet6; |
|
1687 } |
|
1688 else if (aConstantName==KAFUnspecName) |
|
1689 { |
|
1690 aValue=KAFUnspec; |
|
1691 } |
|
1692 else if (aConstantName==KSockStreamName) |
|
1693 { |
|
1694 aValue=KSockStream; |
|
1695 } |
|
1696 else if (aConstantName==KSockDatagramName) |
|
1697 { |
|
1698 aValue=KSockDatagram; |
|
1699 } |
|
1700 else if (aConstantName==KSockSeqPacketName) |
|
1701 { |
|
1702 aValue=KSockSeqPacket; |
|
1703 } |
|
1704 else if (aConstantName==KSockRawName) |
|
1705 { |
|
1706 aValue=KSockRaw; |
|
1707 } |
|
1708 else if (aConstantName==KSOLSocketName) |
|
1709 { |
|
1710 aValue=KSOLSocket; |
|
1711 } |
|
1712 else if (aConstantName==KLevelUnspecifiedName) |
|
1713 { |
|
1714 aValue=KLevelUnspecified; |
|
1715 } |
|
1716 else if (aConstantName==KSODebugName) |
|
1717 { |
|
1718 aValue=KSODebug; |
|
1719 } |
|
1720 else if (aConstantName==KSORecvBufName) |
|
1721 { |
|
1722 aValue=KSORecvBuf; |
|
1723 } |
|
1724 else if (aConstantName==KSOSendBufName) |
|
1725 { |
|
1726 aValue=KSOSendBuf; |
|
1727 } |
|
1728 else if (aConstantName==KSoReuseAddrName) |
|
1729 { |
|
1730 aValue=KSoReuseAddr; |
|
1731 } |
|
1732 else if (aConstantName==KSONonBlockingIOName) |
|
1733 { |
|
1734 aValue=KSONonBlockingIO; |
|
1735 } |
|
1736 else if (aConstantName==KSOBlockingIOName) |
|
1737 { |
|
1738 aValue=KSOBlockingIO; |
|
1739 } |
|
1740 else if (aConstantName==KSOSelectPollName) |
|
1741 { |
|
1742 aValue=KSOSelectPoll; |
|
1743 } |
|
1744 else if (aConstantName==KSOReadBytesPendingName) |
|
1745 { |
|
1746 aValue=KSOReadBytesPending; |
|
1747 } |
|
1748 else if (aConstantName==KSOUrgentDataOffsetName) |
|
1749 { |
|
1750 aValue=KSOUrgentDataOffset; |
|
1751 } |
|
1752 else if (aConstantName==KSOSelectLastErrorName) |
|
1753 { |
|
1754 aValue=KSOSelectLastError; |
|
1755 } |
|
1756 else if (aConstantName==KSOEnableTransferName) |
|
1757 { |
|
1758 aValue=KSOEnableTransfer; |
|
1759 } |
|
1760 else if (aConstantName==KSODisableTransferName) |
|
1761 { |
|
1762 aValue=KSODisableTransfer; |
|
1763 } |
|
1764 else if (aConstantName==KSocketBufSizeUndefinedName) |
|
1765 { |
|
1766 aValue=KSocketBufSizeUndefined; |
|
1767 } |
|
1768 else if (aConstantName==KSocketDefaultBufferSizeName) |
|
1769 { |
|
1770 aValue=KSocketDefaultBufferSize; |
|
1771 } |
|
1772 else if (aConstantName==KSocketInternalOptionBitName) |
|
1773 { |
|
1774 aValue=KSocketInternalOptionBit; |
|
1775 } |
|
1776 else if (aConstantName==KIOctlSelectName) |
|
1777 { |
|
1778 aValue=KIOctlSelect; |
|
1779 } |
|
1780 else if (aConstantName==KSockSelectReadName) |
|
1781 { |
|
1782 aValue=KSockSelectRead; |
|
1783 } |
|
1784 else if (aConstantName==KSockSelectWriteName) |
|
1785 { |
|
1786 aValue=KSockSelectWrite; |
|
1787 } |
|
1788 else if (aConstantName==KSockSelectExceptName) |
|
1789 { |
|
1790 aValue=KSockSelectExcept; |
|
1791 } |
|
1792 else if (aConstantName==KSockSelectReadContinuationName) |
|
1793 { |
|
1794 aValue=KSockSelectReadContinuation; |
|
1795 } |
|
1796 else if (aConstantName==KSockWriteUrgentName) |
|
1797 { |
|
1798 aValue=KSockWriteUrgent; |
|
1799 } |
|
1800 else if (aConstantName==KSocketInternalWriteBitName) |
|
1801 { |
|
1802 aValue=KSocketInternalWriteBit; |
|
1803 } |
|
1804 else if (aConstantName==KSockWriteSystemMaskName) |
|
1805 { |
|
1806 aValue=KSockWriteSystemMask; |
|
1807 } |
|
1808 else if (aConstantName==KSockReadPeekName) |
|
1809 { |
|
1810 aValue=KSockReadPeek; |
|
1811 } |
|
1812 else if (aConstantName==KSocketInternalReadBitName) |
|
1813 { |
|
1814 aValue=KSocketInternalReadBit; |
|
1815 } |
|
1816 else if (aConstantName==KSockReadContinuationName) |
|
1817 { |
|
1818 aValue=KSockReadContinuation; |
|
1819 } |
|
1820 else if (aConstantName==KSIConnectionLessName) |
|
1821 { |
|
1822 aValue=KSIConnectionLess; |
|
1823 } |
|
1824 else if (aConstantName==KSIReliableName) |
|
1825 { |
|
1826 aValue=KSIReliable; |
|
1827 } |
|
1828 else if (aConstantName==KSIInOrderName) |
|
1829 { |
|
1830 aValue=KSIInOrder; |
|
1831 } |
|
1832 else if (aConstantName==KSIMessageBasedName) |
|
1833 { |
|
1834 aValue=KSIMessageBased; |
|
1835 } |
|
1836 else if (aConstantName==KSIDatagramName) |
|
1837 { |
|
1838 aValue=KSIDatagram; |
|
1839 } |
|
1840 else if (aConstantName==KSIStreamBasedName) |
|
1841 { |
|
1842 aValue=KSIStreamBased; |
|
1843 } |
|
1844 else if (aConstantName==KSIPseudoStreamName) |
|
1845 { |
|
1846 aValue=KSIPseudoStream; |
|
1847 } |
|
1848 else if (aConstantName==KSIUrgentDataName) |
|
1849 { |
|
1850 aValue=KSIUrgentData; |
|
1851 } |
|
1852 else if (aConstantName==KSIConnectDataName) |
|
1853 { |
|
1854 aValue=KSIConnectData; |
|
1855 } |
|
1856 else if (aConstantName==KSIDisconnectDataName) |
|
1857 { |
|
1858 aValue=KSIDisconnectData; |
|
1859 } |
|
1860 else if (aConstantName==KSIBroadcastName) |
|
1861 { |
|
1862 aValue=KSIBroadcast; |
|
1863 } |
|
1864 else if (aConstantName==KSIMultiPointName) |
|
1865 { |
|
1866 aValue=KSIMultiPoint; |
|
1867 } |
|
1868 else if (aConstantName==KSIQOSName) |
|
1869 { |
|
1870 aValue=KSIQOS; |
|
1871 } |
|
1872 else if (aConstantName==KSIWriteOnlyName) |
|
1873 { |
|
1874 aValue=KSIWriteOnly; |
|
1875 } |
|
1876 else if (aConstantName==KSIReadOnlyName) |
|
1877 { |
|
1878 aValue=KSIReadOnly; |
|
1879 } |
|
1880 else if (aConstantName==KSIGracefulCloseName) |
|
1881 { |
|
1882 aValue=KSIGracefulClose; |
|
1883 } |
|
1884 else if (aConstantName==KSICanReconnectName) |
|
1885 { |
|
1886 aValue=KSICanReconnect; |
|
1887 } |
|
1888 else if (aConstantName==KSIPeekDataName) |
|
1889 { |
|
1890 aValue=KSIPeekData; |
|
1891 } |
|
1892 else if (aConstantName==KSIRequiresOwnerInfoName) |
|
1893 { |
|
1894 aValue=KSIRequiresOwnerInfo; |
|
1895 } |
|
1896 else if (aConstantName==KNSNameResolutionName) |
|
1897 { |
|
1898 aValue=KNSNameResolution; |
|
1899 } |
|
1900 else if (aConstantName==KNSHeirarchicalNamingName) |
|
1901 { |
|
1902 aValue=KNSHeirarchicalNaming; |
|
1903 } |
|
1904 else if (aConstantName==KNSRemoteDiscoveryName) |
|
1905 { |
|
1906 aValue=KNSRemoteDiscovery; |
|
1907 } |
|
1908 else if (aConstantName==KNSServiceResolutionName) |
|
1909 { |
|
1910 aValue=KNSServiceResolution; |
|
1911 } |
|
1912 else if (aConstantName==KNSNameRegistrationName) |
|
1913 { |
|
1914 aValue=KNSNameRegistration; |
|
1915 } |
|
1916 else if (aConstantName==KNSServiceRegistrationName) |
|
1917 { |
|
1918 aValue=KNSServiceRegistration; |
|
1919 } |
|
1920 else if (aConstantName==KNSDynamicAddressingName) |
|
1921 { |
|
1922 aValue=KNSDynamicAddressing; |
|
1923 } |
|
1924 else if (aConstantName==KNSInfoDatabaseName) |
|
1925 { |
|
1926 aValue=KNSInfoDatabase; |
|
1927 } |
|
1928 else if (aConstantName==KNSRequiresConnectionStartupName) |
|
1929 { |
|
1930 aValue=KNSRequiresConnectionStartup; |
|
1931 } |
|
1932 else if (aConstantName==KSocketNoSecurityName) |
|
1933 { |
|
1934 aValue=KSocketNoSecurity; |
|
1935 } |
|
1936 else if (aConstantName==KSecureSocketsName) |
|
1937 { |
|
1938 aValue=KSecureSockets; |
|
1939 } |
|
1940 else if (aConstantName==KSocketMessageSizeIsStreamName) |
|
1941 { |
|
1942 aValue=KSocketMessageSizeIsStream; |
|
1943 } |
|
1944 else if (aConstantName==KSocketMessageSizeUndefinedName) |
|
1945 { |
|
1946 aValue=KSocketMessageSizeUndefined; |
|
1947 } |
|
1948 else if (aConstantName==KSocketMessageSizeNoLimitName) |
|
1949 { |
|
1950 aValue=KSocketMessageSizeNoLimit; |
|
1951 } |
|
1952 else if (aConstantName==KUndefinedSockTypeName) |
|
1953 { |
|
1954 aValue=KUndefinedSockType; |
|
1955 } |
|
1956 else if (aConstantName==KUndefinedProtocolName) |
|
1957 { |
|
1958 aValue=KUndefinedProtocol; |
|
1959 } |
|
1960 else if (aConstantName==KErrWouldBlockName) |
|
1961 { |
|
1962 aValue=KErrWouldBlock; |
|
1963 } |
|
1964 else if (aConstantName==KErrConnectionTerminatedName) |
|
1965 { |
|
1966 aValue=KErrConnectionTerminated; |
|
1967 } |
|
1968 else if (aConstantName==KErrCannotFindProtocolName) |
|
1969 { |
|
1970 aValue=KErrCannotFindProtocol; |
|
1971 } |
|
1972 else if (aConstantName==KCOLConnectionName) |
|
1973 { |
|
1974 aValue=KCOLConnection; |
|
1975 } |
|
1976 else if (aConstantName==KCOLProviderName) |
|
1977 { |
|
1978 aValue=KCOLProvider; |
|
1979 } |
|
1980 else if (aConstantName==KConnInternalOptionBitName) |
|
1981 { |
|
1982 aValue=KConnInternalOptionBit; |
|
1983 } |
|
1984 else if (aConstantName==KConnWriteUserDataBitName) |
|
1985 { |
|
1986 aValue=KConnWriteUserDataBit; |
|
1987 } |
|
1988 else if (aConstantName==KConnReadUserDataBitName) |
|
1989 { |
|
1990 aValue=KConnReadUserDataBit; |
|
1991 } |
|
1992 else if (aConstantName==KCoEnumerateConnectionClientsName) |
|
1993 { |
|
1994 aValue=KCoEnumerateConnectionClients; |
|
1995 } |
|
1996 else if (aConstantName==KCoGetConnectionClientInfoName) |
|
1997 { |
|
1998 aValue=KCoGetConnectionClientInfo; |
|
1999 } |
|
2000 else if (aConstantName==KCoGetConnectionSocketInfoName) |
|
2001 { |
|
2002 aValue=KCoGetConnectionSocketInfo; |
|
2003 } |
|
2004 else if (aConstantName==KConnectionTypeDefaultName) |
|
2005 { |
|
2006 aValue=KConnectionTypeDefault; |
|
2007 } |
|
2008 else if (aConstantName==KSubConnParamsInterfaceUidName) |
|
2009 { |
|
2010 aValue=KSubConnParamsInterfaceUid; |
|
2011 } |
|
2012 else if (aConstantName==KSubConnEventInterfaceUidName) |
|
2013 { |
|
2014 aValue=KSubConnEventInterfaceUid; |
|
2015 } |
|
2016 else if (aConstantName==KSubConnGenericParamsImplUidName) |
|
2017 { |
|
2018 aValue=KSubConnGenericParamsImplUid; |
|
2019 } |
|
2020 else if (aConstantName==KSubConnGenericEventsImplUidName) |
|
2021 { |
|
2022 aValue=KSubConnGenericEventsImplUid; |
|
2023 } |
|
2024 else if (aConstantName==KSubConGlobalFamilyName) |
|
2025 { |
|
2026 aValue=KSubConGlobalFamily; |
|
2027 } |
|
2028 else if (aConstantName==KSubConQoSFamilyName) |
|
2029 { |
|
2030 aValue=KSubConQoSFamily; |
|
2031 } |
|
2032 else if (aConstantName==KSubConAuthorisationFamilyName) |
|
2033 { |
|
2034 aValue=KSubConAuthorisationFamily; |
|
2035 } |
|
2036 else if (aConstantName==KNotificationEventMaxSizeName) |
|
2037 { |
|
2038 aValue=KNotificationEventMaxSize; |
|
2039 } |
|
2040 else |
|
2041 { |
|
2042 ret=EFalse; |
|
2043 aValue=-1; |
|
2044 } |
|
2045 |
|
2046 return ret; |
|
2047 } |
|
2048 |
|
2049 void CT_DataCommsBase::ConvertWhiteSpace(const TDesC & inputData, TDes & convertedData) |
|
2050 { |
|
2051 for (int pos = 0; pos < inputData.Length(); ++pos) |
|
2052 { |
|
2053 if (inputData[pos] == '\r') |
|
2054 { |
|
2055 convertedData.Append(_L("\\r")); |
|
2056 } |
|
2057 else if (inputData[pos] == '\n') |
|
2058 { |
|
2059 convertedData.Append(_L("\\n")); |
|
2060 } |
|
2061 else |
|
2062 { |
|
2063 convertedData.Append(inputData[pos]); |
|
2064 } |
|
2065 } |
|
2066 } |
|
2067 |
|
2068 void CT_DataCommsBase::PrintProtocol(const TDesC& aDesc, const TProtocolDesc& aProtocol, TBool aShowServiceInfoFlags /* = EFalse */ ) |
|
2069 { |
|
2070 TBuf<KMaxVersionName> versionName(aProtocol.iVersion.Name()); |
|
2071 INFO_PRINTF3(_L("%S.iAddrFamily = %d"), &aDesc, aProtocol.iAddrFamily); |
|
2072 INFO_PRINTF3(_L("%S.iByteOrder = %d"), &aDesc, aProtocol.iByteOrder); |
|
2073 INFO_PRINTF3(_L("%S.iMessageSize = %d"), &aDesc, aProtocol.iMessageSize); |
|
2074 INFO_PRINTF3(_L("%S.iName = %S"), &aDesc, &aProtocol.iName); |
|
2075 INFO_PRINTF3(_L("%S.iNamingServices = %d"), &aDesc, aProtocol.iNamingServices); |
|
2076 INFO_PRINTF3(_L("%S.iProtocol = %d"), &aDesc, aProtocol.iProtocol); |
|
2077 INFO_PRINTF3(_L("%S.iSecurity = %d"), &aDesc, aProtocol.iSecurity); |
|
2078 INFO_PRINTF3(_L("%S.iServiceInfo = %d"), &aDesc, aProtocol.iServiceInfo); |
|
2079 |
|
2080 if( aShowServiceInfoFlags ) |
|
2081 { |
|
2082 INFO_PRINTF3(_L("%S KSIConnectionLess = %d"), &aDesc, (aProtocol.iServiceInfo & KSIConnectionLess) ? 1 : 0); |
|
2083 INFO_PRINTF3(_L("%S KSIConnectData = %d"), &aDesc, (aProtocol.iServiceInfo & KSIConnectData) ? 1 : 0); |
|
2084 INFO_PRINTF3(_L("%S KSIDisconnectData = %d"), &aDesc, (aProtocol.iServiceInfo & KSIDisconnectData) ? 1 : 0); |
|
2085 INFO_PRINTF3(_L("%S KSIUrgentData = %d"), &aDesc, (aProtocol.iServiceInfo & KSIUrgentData) ? 1 : 0); |
|
2086 INFO_PRINTF3(_L("%S KSIPeekData = %d"), &aDesc, (aProtocol.iServiceInfo & KSIPeekData) ? 1 : 0); |
|
2087 INFO_PRINTF3(_L("%S KSIGracefulClose = %d"), &aDesc, (aProtocol.iServiceInfo & KSIGracefulClose) ? 1 : 0); |
|
2088 } |
|
2089 |
|
2090 INFO_PRINTF3(_L("%S.iSockType = %d"), &aDesc, aProtocol.iSockType); |
|
2091 INFO_PRINTF3(_L("%S.iVersion = %S"), &aDesc, &versionName); |
|
2092 INFO_PRINTF1(_L("------------------------------------------------------------")); |
|
2093 } |
|
2094 |
|
2095 TBool CT_DataCommsBase::CompareProtocolInfo(TProtocolDesc& aLhs, TProtocolDesc& aRhs) |
|
2096 { |
|
2097 TBool returnVal = ETrue; |
|
2098 if (aLhs.iAddrFamily != aRhs.iAddrFamily || |
|
2099 aLhs.iByteOrder != aRhs.iByteOrder || |
|
2100 aLhs.iMessageSize != aRhs.iMessageSize || |
|
2101 aLhs.iName != aRhs.iName || |
|
2102 aLhs.iNamingServices != aRhs.iNamingServices || |
|
2103 aLhs.iProtocol != aRhs.iProtocol || |
|
2104 aLhs.iSecurity != aRhs.iSecurity || |
|
2105 aLhs.iServiceInfo != aRhs.iServiceInfo || |
|
2106 aLhs.iSockType != aRhs.iSockType || |
|
2107 aLhs.iVersion.Name() != aRhs.iVersion.Name()) |
|
2108 { |
|
2109 returnVal = EFalse; |
|
2110 } |
|
2111 |
|
2112 return returnVal; |
|
2113 } |
|
2114 |
|
2115 TInt CT_DataCommsBase::GetStringAsInt( const TDesC& aSection, const TDesC& aStrParameter ) |
|
2116 { |
|
2117 |
|
2118 TPtrC valueStr(_L("")); |
|
2119 TInt valueInt; |
|
2120 // First look for an integer value |
|
2121 if (!GetIntFromConfig(aSection, aStrParameter, valueInt)) |
|
2122 { |
|
2123 // Didn't find an integer value - look for a string |
|
2124 TBool hasStringVal = GetStringFromConfig(aSection, aStrParameter, valueStr); |
|
2125 if (hasStringVal) |
|
2126 { |
|
2127 // Found a string error - convert into an integer |
|
2128 if ( !GetIntValue(valueStr, valueInt) ) |
|
2129 { |
|
2130 ERR_PRINTF2(_L("%S constant was not found"), &valueStr); |
|
2131 SetBlockResult(EFail); |
|
2132 } |
|
2133 } |
|
2134 else |
|
2135 { |
|
2136 valueInt = KErrNone; |
|
2137 } |
|
2138 } |
|
2139 |
|
2140 return valueInt; |
|
2141 } |